mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-01 09:17:44 +03:00
feat(form-decompile,form-compile): формат и формат редактирования (Format/EditFormat)
Ключи format/editFormat на InputField/LabelField/CheckBoxField (1408/958
файлов в корпусе). LocalStringType как inputHint/title: строка или {ru,en} —
переиспользование Emit-MLText (компилятор) и Get-LangText (декомпилятор).
Декомпилятор: хелпер Add-FormatProps в 3 ветках. Зеркало py.
Round-trip чистый (0 остатка на 30 формах с Format/EditFormat). Кейс
input-fields: format/editFormat строкой на input/check + мультиязык-объект
на labelField; снэпшот сертифицирован загрузкой в 1С.
Заодно добавлены забытые ключи (format/editFormat/choiceParameters/
choiceParameterLinks/typeLink) в allowlist knownKeys (ps1+py), чтобы не
сыпать ложный warning «unknown key».
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
d0bb26b068
commit
929d1676bb
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.71 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.72 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -2439,6 +2439,7 @@ function Emit-Element {
|
||||
"wrap"=1;"openButton"=1;"listChoiceMode"=1;"showInFooter"=1
|
||||
"extendedEditMultipleValues"=1;"chooseType"=1;"autoCellHeight"=1
|
||||
"choiceButtonRepresentation"=1;"footerHorizontalAlign"=1;"headerHorizontalAlign"=1
|
||||
"format"=1;"editFormat"=1;"choiceParameters"=1;"choiceParameterLinks"=1;"typeLink"=1
|
||||
# label/hyperlink
|
||||
"hyperlink"=1;"formatted"=1
|
||||
# group-specific
|
||||
@@ -2938,6 +2939,10 @@ function Emit-Input {
|
||||
Emit-MLText -tag "InputHint" -text $el.inputHint -indent $inner
|
||||
}
|
||||
|
||||
# Формат / формат редактирования (LocalStringType — строка или {ru,en})
|
||||
if ($el.format) { Emit-MLText -tag "Format" -text $el.format -indent $inner }
|
||||
if ($el.editFormat) { Emit-MLText -tag "EditFormat" -text $el.editFormat -indent $inner }
|
||||
|
||||
Emit-ChoiceList -el $el -indent $inner
|
||||
|
||||
# Связи по типу / связи параметров выбора / параметры выбора
|
||||
@@ -2982,6 +2987,10 @@ function Emit-Check {
|
||||
|
||||
Emit-Layout -el $el -indent $inner
|
||||
|
||||
# Формат / формат редактирования (LocalStringType — строка или {ru,en})
|
||||
if ($el.format) { Emit-MLText -tag "Format" -text $el.format -indent $inner }
|
||||
if ($el.editFormat) { Emit-MLText -tag "EditFormat" -text $el.editFormat -indent $inner }
|
||||
|
||||
# Оформление (цвета/шрифты/граница) — перед компаньонами
|
||||
Emit-Appearance -el $el -indent $inner -profile 'field'
|
||||
|
||||
@@ -3448,6 +3457,10 @@ function Emit-LabelField {
|
||||
if ($el.hyperlink -eq $true) { X "$inner<Hiperlink>true</Hiperlink>" }
|
||||
Emit-Layout -el $el -indent $inner
|
||||
|
||||
# Формат / формат редактирования (LocalStringType — строка или {ru,en})
|
||||
if ($el.format) { Emit-MLText -tag "Format" -text $el.format -indent $inner }
|
||||
if ($el.editFormat) { Emit-MLText -tag "EditFormat" -text $el.editFormat -indent $inner }
|
||||
|
||||
# Оформление (цвета/шрифты/граница + header/footer) — перед компаньонами
|
||||
Emit-Appearance -el $el -indent $inner -profile 'field'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user