mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-19 09:09:41 +03:00
feat(skd-decompile): nested children в table axis + structure-group default
Три связанных изменения: - Build-TableAxisBlock читает вложенные <dcsset:item> как children (StructureItemGroup внутри row/column/point/series) - Build-Structure принимает <dcsset:item> без явного xsi:type как StructureItemGroup (реальные XML используют такую default-форму для вложенных групп — раньше попадало в sentinel) - Чтение use=false на StructureItemGroup Эффект на sample30: −3253 строки diff (массовая категория — table row almost always содержит nested grouping). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# skd-decompile v0.34 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
# skd-decompile v0.35 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
@@ -1710,6 +1710,9 @@ function Build-TableAxisBlock {
|
|||||||
$opNode = $node.SelectSingleNode("dcsset:outputParameters", $ns)
|
$opNode = $node.SelectSingleNode("dcsset:outputParameters", $ns)
|
||||||
$op = Build-OutputParameters -opNode $opNode
|
$op = Build-OutputParameters -opNode $opNode
|
||||||
if ($op -and $op.Count -gt 0) { $entry['outputParameters'] = $op }
|
if ($op -and $op.Count -gt 0) { $entry['outputParameters'] = $op }
|
||||||
|
# nested children (StructureItemGroup внутри table row/column или chart axis)
|
||||||
|
$children = Build-Structure -node $node -loc "$loc/children"
|
||||||
|
if ($children.Count -gt 0) { $entry['children'] = $children }
|
||||||
# user-settings on the axis itself
|
# user-settings on the axis itself
|
||||||
# viewMode: сохраняем даже Normal если node присутствует
|
# viewMode: сохраняем даже Normal если node присутствует
|
||||||
$avmNode = $node.SelectSingleNode("dcsset:viewMode", $ns)
|
$avmNode = $node.SelectSingleNode("dcsset:viewMode", $ns)
|
||||||
@@ -1804,12 +1807,17 @@ function Build-Structure {
|
|||||||
$idx++
|
$idx++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if ($xt -ne 'StructureItemGroup') {
|
# <dcsset:item> без xsi:type → StructureItemGroup (default form, встречается
|
||||||
|
# во вложенных children внутри table row / structure group)
|
||||||
|
if ($xt -and $xt -ne 'StructureItemGroup') {
|
||||||
$items += (New-Sentinel -kind "StructureItem:$xt" -loc $loc -detail 'Тип структуры пока не покрыт')
|
$items += (New-Sentinel -kind "StructureItem:$xt" -loc $loc -detail 'Тип структуры пока не покрыт')
|
||||||
$idx++
|
$idx++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
$entry = [ordered]@{}
|
$entry = [ordered]@{}
|
||||||
|
# use=false на самой группе — отключённая ветка структуры
|
||||||
|
$gUse = Get-Text $it "dcsset:use"
|
||||||
|
if ($gUse -eq 'false') { $entry['use'] = $false }
|
||||||
# Optional name
|
# Optional name
|
||||||
$nm = Get-Text $it "dcsset:name"
|
$nm = Get-Text $it "dcsset:name"
|
||||||
if ($nm) { $entry['name'] = $nm }
|
if ($nm) { $entry['name'] = $nm }
|
||||||
|
|||||||
Reference in New Issue
Block a user