mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-25 22:21:01 +03:00
feat(form-decompile,form-compile): формат динамического заголовка группы/страницы (Format при titleDataPath)
Раундтрип терял <Format> на UsualGroup/Page — формат значения пути к данным заголовка (<TitleDataPath>): мультиязычный формат вида БЛ=; БИ=* / BF=; BT=* (напр. УчетныеЗаписиЭДО/ УчетнаяЗапись — 4 группы/страницы, 40 строк diff с каскадом структурных v8:item-обёрток). Корпус (acc+erp 8.3.24): <Format>-блоки — LabelField 1784, InputField 1480 (уже обрабатывались), UsualGroup 13, Page 10 (пробел). Механизм формата уже был у полей (Add-FormatProps / Emit-MLText); подключён к группе/странице. decompile: Add-FormatProps в ветках UsualGroup/Page (захват format/editFormat). compile (ps1+py): Emit-MLText <Format>/<EditFormat> в Emit-Group/Emit-Page (рядом с titleDataPath). Верификация: таргет-раундтрип 11 форм с group/page Format → категория закрыта (0 Format LOST; целевая форма match, было 40→0); остаток — др. категория ListSettings + 1 ring3 (SpreadsheetDocument). Регресс form-compile 43/43 (ps1+py); 1С-cert кейса groups (группа с Format+TitleDataPath грузится). spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cb3dda0d53
commit
3340d48898
@@ -1,4 +1,4 @@
|
||||
# form-decompile v0.105 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# form-decompile v0.106 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
|
||||
param(
|
||||
@@ -1612,6 +1612,8 @@ function Decompile-Element {
|
||||
$crt = $node.SelectSingleNode("lf:CollapsedRepresentationTitle", $ns); if ($crt) { $ct = Get-LangText $crt; if ($null -ne $ct -and $ct -ne '') { $obj['collapsedTitle'] = $ct } }
|
||||
if ((Get-Child $node 'United') -eq 'false') { $obj['united'] = $false }
|
||||
if ((Get-Child $node 'Collapsed') -eq 'true') { $obj['collapsed'] = $true }
|
||||
# Формат значения пути к данным заголовка (<Format>; парный к titleDataPath группы)
|
||||
Add-FormatProps $obj $node
|
||||
$kids = Decompile-Children $node
|
||||
if ($kids) { $obj['children'] = $kids }
|
||||
}
|
||||
@@ -1855,6 +1857,8 @@ function Decompile-Element {
|
||||
# Картинка страницы (иконка вкладки) — конвенция ValuesPicture (дефолт LoadTransparent=false)
|
||||
$pp = Get-PictureRef $node 'Picture'; if ($null -ne $pp) { $obj['picture'] = $pp }
|
||||
$st = Get-Child $node 'ShowTitle'; if ($null -ne $st) { $obj['showTitle'] = ($st -eq 'true') } # факт. значение (явный true тоже)
|
||||
# Формат значения пути к данным заголовка (<Format>; парный к titleDataPath страницы)
|
||||
Add-FormatProps $obj $node
|
||||
$kids = Decompile-Children $node
|
||||
if ($kids) { $obj['children'] = $kids }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user