mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-05 11:10:20 +03:00
feat(skd-compile): nested children + use=false на StructureItemGroup
В реальных отчётах внутри 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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
6e3632e5ff
commit
ac72ca8a51
@@ -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<dcsset:viewMode>$(Esc-Xml "$($block.viewMode)")</dcsset:viewMode>"
|
||||
}
|
||||
@@ -2539,6 +2545,11 @@ function Emit-StructureItem {
|
||||
if ($type -eq "group") {
|
||||
X "$indent<dcsset:item xsi:type=`"dcsset:StructureItemGroup`">"
|
||||
|
||||
# use=false — отключённая ветка структуры
|
||||
if ($item.use -eq $false) {
|
||||
X "$indent`t<dcsset:use>false</dcsset:use>"
|
||||
}
|
||||
|
||||
if ($item.name) {
|
||||
X "$indent`t<dcsset:name>$(Esc-Xml "$($item.name)")</dcsset:name>"
|
||||
}
|
||||
|
||||
@@ -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}<dcsset:viewMode>{esc_xml(str(block["viewMode"]))}</dcsset:viewMode>')
|
||||
if block.get('userSettingID'):
|
||||
@@ -2106,6 +2110,9 @@ def emit_structure_item(lines, item, indent):
|
||||
if item_type == 'group':
|
||||
lines.append(f'{indent}<dcsset:item xsi:type="dcsset:StructureItemGroup">')
|
||||
|
||||
if item.get('use') is False:
|
||||
lines.append(f'{indent}\t<dcsset:use>false</dcsset:use>')
|
||||
|
||||
if item.get('name'):
|
||||
lines.append(f'{indent}\t<dcsset:name>{esc_xml(str(item["name"]))}</dcsset:name>')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user