mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-05 03:00:22 +03:00
feat(form-decompile,form-compile): DisplayImportance форменного AutoCommandBar
Форменная командная панель (<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">) может нести DisplayImportance="Low"/"VeryLow" (адаптивная важность). Декомпилятор не захватывал этот атрибут, маркер autoCmdBar создавался только при halign/autofill-false/children → DisplayImportance терялся; компилятор не эмитил. Декомпилятор: захват $acb DisplayImportance + расширен гейт маркера (DI тоже триггерит сохранение autoCmdBar-элемента). Компилятор: DI-Attr на тег форменного AutoCommandBar (обе ветки open/self-closing). Зеркало py. Корпус: 11 форменных ACB с DisplayImportance. Выборка 11 форм (ПерепискаСКонтролирующимиОрганами/ФормаГрупповойОтправки, …): match 11/11, TOTAL→0. ps1==py байт-в-байт. Регресс 43/43. 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
831c80d9f0
commit
6cfc504509
@@ -1,4 +1,4 @@
|
||||
# form-decompile v0.138 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# form-decompile v0.139 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
|
||||
param(
|
||||
@@ -2583,11 +2583,13 @@ $acb = $root.SelectSingleNode("lf:AutoCommandBar", $ns)
|
||||
if ($acb) {
|
||||
$haln = Get-Child $acb 'HorizontalAlign'
|
||||
$acbAutofill = Get-Child $acb 'Autofill'
|
||||
$acbDI = $acb.GetAttribute("DisplayImportance") # адаптивная важность форменной панели (атрибут тега)
|
||||
$acbKids = Decompile-Children $acb
|
||||
$acbObj = $null
|
||||
if ($haln -or ($acbAutofill -eq 'false') -or $acbKids) {
|
||||
if ($haln -or ($acbAutofill -eq 'false') -or $acbKids -or $acbDI) {
|
||||
$acbObj = [ordered]@{}
|
||||
$acbObj['autoCmdBar'] = $acb.GetAttribute("name")
|
||||
if ($acbDI) { $acbObj['displayImportance'] = $acbDI }
|
||||
if ($haln) { $acbObj['horizontalAlign'] = $haln }
|
||||
if ($acbAutofill -eq 'false') { $acbObj['autofill'] = $false }
|
||||
if ($acbKids) { $acbObj['children'] = $acbKids }
|
||||
|
||||
Reference in New Issue
Block a user