From 87bc2743464c4e9a226f994c5470f2e614d5bff5 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Fri, 22 May 2026 22:07:51 +0300 Subject: [PATCH] =?UTF-8?q?feat(skd-decompile):=20top-level=20=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BA=D0=B8=20=D0=BD=D0=B0=20StructureItemTable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build-Structure для table теперь читает selection / outputParameters / conditionalAppearance прямо на самой , не только внутри row/column. Эффект на sample30: −906 строк diff (большой эффект — многие отчёты с таблицами имеют top-level selection и outputParameters для названия таблицы и формата вывода). Co-Authored-By: Claude Opus 4.7 --- .../skd-decompile/scripts/skd-decompile.ps1 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 index 98aa9364..fa9df9d6 100644 --- a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 +++ b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 @@ -1,4 +1,4 @@ -# skd-decompile v0.45 — Decompile 1C DCS Template.xml to JSON DSL (draft) +# skd-decompile v0.46 — Decompile 1C DCS Template.xml to JSON DSL (draft) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -1819,6 +1819,21 @@ function Build-Structure { $rows += (Build-TableAxisBlock -node $rn -loc "$loc/$idx/row" -includeName $true) } if ($rows.Count -gt 0) { $entry['rows'] = $rows } + # top-level selection / outputParameters / conditionalAppearance на самой + # таблице (отдельно от row/column) + $tSelN = $it.SelectSingleNode("dcsset:selection", $ns) + if ($tSelN) { + $tSelI = Build-Selection -selNode $tSelN -loc "$loc/$idx/selection" + if ($tSelI.Count -gt 0) { $entry['selection'] = $tSelI } + } + $tOpN = $it.SelectSingleNode("dcsset:outputParameters", $ns) + $tOp = Build-OutputParameters -opNode $tOpN + if ($tOp -and $tOp.Count -gt 0) { $entry['outputParameters'] = $tOp } + $tCaN = $it.SelectSingleNode("dcsset:conditionalAppearance", $ns) + if ($tCaN) { + $tCa = Build-ConditionalAppearance -caNode $tCaN -loc "$loc/$idx/ca" + if ($tCa.Count -gt 0) { $entry['conditionalAppearance'] = $tCa } + } $items += $entry $idx++ continue