From ac72ca8a516dd60a31c14a416836d22416493521 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Fri, 22 May 2026 18:55:02 +0300 Subject: [PATCH] =?UTF-8?q?feat(skd-compile):=20nested=20children=20+=20us?= =?UTF-8?q?e=3Dfalse=20=D0=BD=D0=B0=20StructureItemGroup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit В реальных отчётах внутри table row / column / chart axis (point/series) часто живут вложенные группы — StructureItemGroup в children, со своими groupItems / filter / order / selection / outputParameters / nested children глубже. До этого Emit-TableAxisBlock эмитил только axis-level поля, без children. Также: на самой StructureItemGroup может быть use=false (отключённая ветка структуры в settings) — добавлено в DSL и в эмит. Co-Authored-By: Claude Opus 4.7 --- .claude/skills/skd-compile/scripts/skd-compile.ps1 | 13 ++++++++++++- .claude/skills/skd-compile/scripts/skd-compile.py | 9 ++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1 index 83717196..542c332b 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.ps1 +++ b/.claude/skills/skd-compile/scripts/skd-compile.ps1 @@ -1,4 +1,4 @@ -# skd-compile v1.48 — Compile 1C DCS from JSON +# skd-compile v1.49 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$DefinitionFile, @@ -2519,6 +2519,12 @@ function Emit-TableAxisBlock { if ($block.outputParameters) { Emit-OutputParameters -params $block.outputParameters -indent $indent } + # nested children (StructureItemGroup внутри table row/column или chart axis) + if ($block.children) { + foreach ($child in $block.children) { + Emit-StructureItem -item $child -indent $indent + } + } if ($block.viewMode) { X "$indent$(Esc-Xml "$($block.viewMode)")" } @@ -2539,6 +2545,11 @@ function Emit-StructureItem { if ($type -eq "group") { X "$indent" + # use=false — отключённая ветка структуры + if ($item.use -eq $false) { + X "$indent`tfalse" + } + if ($item.name) { X "$indent`t$(Esc-Xml "$($item.name)")" } diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py index 23d988ea..b97423c7 100644 --- a/.claude/skills/skd-compile/scripts/skd-compile.py +++ b/.claude/skills/skd-compile/scripts/skd-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# skd-compile v1.48 — Compile 1C DCS from JSON +# skd-compile v1.49 — Compile 1C DCS from JSON # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import json @@ -2091,6 +2091,10 @@ def emit_table_axis_block(lines, block, indent, emit_name=True): emit_selection(lines, block['selection'], indent) if block.get('outputParameters'): emit_output_parameters(lines, block['outputParameters'], indent) + # nested children (StructureItemGroup внутри table row/column или chart axis) + if block.get('children'): + for child in block['children']: + emit_structure_item(lines, child, indent) if block.get('viewMode'): lines.append(f'{indent}{esc_xml(str(block["viewMode"]))}') if block.get('userSettingID'): @@ -2106,6 +2110,9 @@ def emit_structure_item(lines, item, indent): if item_type == 'group': lines.append(f'{indent}') + if item.get('use') is False: + lines.append(f'{indent}\tfalse') + if item.get('name'): lines.append(f'{indent}\t{esc_xml(str(item["name"]))}')