mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-23 21:21:04 +03:00
feat(form-decompile,form-compile): WarningOnEdit на check/radio/labelField (не только input)
`<WarningOnEdit>` (мультиязычный текст предупреждения при редактировании) встречается на InputField (576), CheckBoxField (119), RadioButtonField (54), LabelField (1) по корпусу 8.3.24, но компилятор эмитил и декомпилятор ловил его только у InputField → терялся на check/radio/labelField. Расширил эмиссию (Emit-Check/Emit-Radio/Emit-LabelField, после Emit-Layout перед Format) + захват в декомпиляторе (инлайн SelectSingleNode+Get-LangText в трёх обработчиках, как у InputField). Парный enum `warningOnEditRepresentation` (Show/DontShow) уже был generic-скаляром на любом поле — не трогаю. 1С толерантна к позиции тега внутри поля (сертифицировано загрузкой). Зеркало py (байт-в-байт). Выборка 46 форм с WarningOnEdit на check/radio: 0 потерь WarningOnEdit. Кейсы input-fields (+check multilang, +labelField) и radio-tumbler-strings (+radio) сертифицированы в 1С. Регресс 43/43 (ps1+py). 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
606ac10fdb
commit
c4f600a36b
@@ -1,4 +1,4 @@
|
||||
# form-decompile v0.88 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# form-decompile v0.89 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
|
||||
param(
|
||||
@@ -1613,6 +1613,7 @@ function Decompile-Element {
|
||||
if ($null -eq $cbt) { $obj['checkBoxType'] = '' }
|
||||
elseif ($cbt -ne 'Auto') { $obj['checkBoxType'] = $cbt.Substring(0,1).ToLower() + $cbt.Substring(1) }
|
||||
Add-TitleLocation $obj $node 'Right'
|
||||
$woe = $node.SelectSingleNode("lf:WarningOnEdit", $ns); if ($woe) { $t = Get-LangText $woe; if ($null -ne $t) { $obj['warningOnEdit'] = $t } }
|
||||
Add-FormatProps $obj $node
|
||||
}
|
||||
'RadioButtonField' {
|
||||
@@ -1622,6 +1623,7 @@ function Decompile-Element {
|
||||
Add-TitleLocation $obj $node 'None'
|
||||
$rbt = Get-Child $node 'RadioButtonType'; if ($rbt) { $obj['radioButtonType'] = $rbt }
|
||||
$cc = Get-Child $node 'ColumnsCount'; if ($cc) { $obj['columnsCount'] = [int]$cc }
|
||||
$woe = $node.SelectSingleNode("lf:WarningOnEdit", $ns); if ($woe) { $t = Get-LangText $woe; if ($null -ne $t) { $obj['warningOnEdit'] = $t } }
|
||||
$cl = Decompile-ChoiceList $node; if ($cl) { $obj['choiceList'] = $cl }
|
||||
}
|
||||
'LabelDecoration' {
|
||||
@@ -1642,6 +1644,7 @@ function Decompile-Element {
|
||||
if ((Get-Child $node 'Hiperlink') -eq 'true') { $obj['hyperlink'] = $true }
|
||||
# PasswordMode на LabelField — платформа эмитит явный false (редко); захват факт. значения
|
||||
$pm = Get-Child $node 'PasswordMode'; if ($null -ne $pm) { $obj['passwordMode'] = ($pm -eq 'true') }
|
||||
$woe = $node.SelectSingleNode("lf:WarningOnEdit", $ns); if ($woe) { $t = Get-LangText $woe; if ($null -ne $t) { $obj['warningOnEdit'] = $t } }
|
||||
Add-FormatProps $obj $node
|
||||
}
|
||||
'PictureDecoration' {
|
||||
|
||||
Reference in New Issue
Block a user