diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index 27ce058e..cd8775e7 100644 --- a/.claude/skills/form-compile/scripts/form-compile.ps1 +++ b/.claude/skills/form-compile/scripts/form-compile.ps1 @@ -1,4 +1,4 @@ -# form-compile v1.40 — Compile 1C managed form from JSON or object metadata +# form-compile v1.41 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$JsonPath, @@ -2405,9 +2405,21 @@ function Emit-CommonFlags { # историческим выводом input/label, чтобы не сдвигать существующие снапшоты. # -skipHeight: для Table (height → HeightInTableRows, эмитится в Emit-Table). # -multiLineDefault: input без явного autoMaxWidth при multiLine → AutoMaxWidth=false. +# Общие свойства элемента (любой тип, включая Button/cmdBar): default/skip/drag. +function Emit-CommonElementProps { + param($el, [string]$indent) + if ($el.defaultItem -eq $true) { X "$indenttrue" } + if ($el.PSObject.Properties['skipOnInput'] -and $null -ne $el.skipOnInput) { + $siv = if ($el.skipOnInput -eq $true) { 'true' } else { 'false' } + X "$indent$siv" + } + if ($el.enableStartDrag -eq $true) { X "$indenttrue" } + if ($el.fileDragMode) { X "$indent$($el.fileDragMode)" } +} + function Emit-Layout { param($el, [string]$indent, [switch]$skipHeight, [bool]$multiLineDefault = $false) - if ($el.skipOnInput -eq $true) { X "$indenttrue" } + Emit-CommonElementProps -el $el -indent $indent $amwExplicit = ($el.PSObject.Properties.Name -contains 'autoMaxWidth') if ($amwExplicit) { if ($el.autoMaxWidth -eq $false) { X "$indentfalse" } @@ -2960,10 +2972,9 @@ function Emit-LabelField { # DSL-ключ переопределяет; декомпилятор инвертирует (опускает значения = дефолту). function Emit-DynListTableBlock { param($el, [string]$indent) - # Group B (условные опц.): defaultItem / useAlternationRowColor / fileDragMode - if ($el.defaultItem -eq $true) { X "$indenttrue" } + # UseAlternationRowColor — специфично для list-таблицы (defaultItem/fileDragMode/ + # enableStartDrag — общие, эмитятся в Emit-Layout) if ($el.useAlternationRowColor -eq $true) { X "$indenttrue" } - if ($el.fileDragMode) { X "$indent$($el.fileDragMode)" } # Group A (гарант. блок, n=5079): дефолт + override $ar = if ($el.autoRefresh -eq $true) { "true" } else { "false" } X "$indent$ar" @@ -3019,7 +3030,6 @@ function Emit-Table { } if ($el.choiceMode -eq $true) { X "$innertrue" } if ($el.initialTreeView) { X "$inner$($el.initialTreeView)" } - if ($el.enableStartDrag -eq $true) { X "$innertrue" } if ($el.enableDrag -eq $true) { X "$innertrue" } if ($el.rowPictureDataPath) { X "$inner$($el.rowPictureDataPath)" } if ($el.rowsPicture) { @@ -3143,6 +3153,7 @@ function Emit-Button { X "$indent