mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-06 10:10:52 +03:00
feat(form-decompile,form-compile): батч скаляров (IncompleteChoiceMode/EqualColumnsWidth/ChildrenAlign/ImageScale/Zoomable/Shape/PictureLocation) + форменные ShowCloseButton/HorizontalAlign/ChildrenAlign/ShowTitle + PictureDecoration NonselectedPictureText + ShowTitle factual
Из топа list-iter2 (формы из корпуса): - Generic-скаляры (input/radio/group/picDecoration/button через Emit-Layout): IncompleteChoiceMode, EqualColumnsWidth(bool), ChildrenAlign, ImageScale, Zoomable(bool), Shape, PictureLocation. - Форменные свойства → KNOWN_FORM_PROPS (декомпилятор) + авто-PascalCase Emit-Properties: ShowCloseButton, HorizontalAlign, ChildrenAlign, ShowTitle. - PictureDecoration NonselectedPictureText (ML, как у picField; после Title). - ShowTitle factual у UsualGroup/Page/ColumnGroup — раньше ловили/эмитили только false, явный <ShowTitle>true> терялся (8989 в корпусе); теперь true/false при наличии. ⚠️ Table HeaderHeight/FooterHeight/CurrentRowUse НЕ добавлены: строгий Table-XSD требует точной позиции тегов (Representation→…→HeaderHeight→Footer→…→CurrentRowUse→RowFilter), generic-позиция ломает загрузку (XDTO exception) — отдельная задача по позициям в Emit-Table. Зеркало py. Выборка 82 формы: 0 корневых утечек батч-тегов (остаток — CFE-форма с потерянным контейнером расширения, не связано). Кейсы table/radio-tumbler-strings/groups/element-appearance/ input-fields расширены и сертифицированы в 1С (явный ShowTitle=true, форменные props, picDecoration NPT, button Shape/PictureLocation). Регресс 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
330447c95f
commit
6e4fdb443a
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.124 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.125 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -3024,6 +3024,17 @@ $script:genericScalars = @(
|
||||
@{ Tag='ScrollOnCompress'; Key='scrollOnCompress'; Kind='bool' }
|
||||
# Сочетание клавиш — общее свойство (input/group/radio/page/picField/label/table/check; команда — отд. путь, §7)
|
||||
@{ Tag='Shortcut'; Key='shortcut'; Kind='value' }
|
||||
# Батч простых скаляров (input/radio/group/picDecoration/button): режим выбора незаполненного,
|
||||
# равная ширина колонок, выравнивание детей, масштаб/зум картинки, форма/положение картинки кнопки.
|
||||
# (Table HeaderHeight/FooterHeight/CurrentRowUse — НЕ здесь: строгий Table-XSD требует точной
|
||||
# позиции, generic-позиция ломает загрузку; отдельная задача в Emit-Table.)
|
||||
@{ Tag='IncompleteChoiceMode'; Key='incompleteChoiceMode'; Kind='value' }
|
||||
@{ Tag='EqualColumnsWidth'; Key='equalColumnsWidth'; Kind='bool' }
|
||||
@{ Tag='ChildrenAlign'; Key='childrenAlign'; Kind='value' }
|
||||
@{ Tag='ImageScale'; Key='imageScale'; Kind='value' }
|
||||
@{ Tag='Zoomable'; Key='zoomable'; Kind='bool' }
|
||||
@{ Tag='Shape'; Key='shape'; Kind='value' }
|
||||
@{ Tag='PictureLocation'; Key='pictureLocation'; Kind='value' }
|
||||
)
|
||||
|
||||
function Emit-GenericScalars {
|
||||
@@ -3511,7 +3522,7 @@ function Emit-Group {
|
||||
}
|
||||
|
||||
# ShowTitle
|
||||
if ($el.showTitle -eq $false) { X "$inner<ShowTitle>false</ShowTitle>" }
|
||||
if ($null -ne $el.showTitle) { X "$inner<ShowTitle>$(if ($el.showTitle){'true'}else{'false'})</ShowTitle>" }
|
||||
# Заголовок свёрнутого представления (collapsible/popup) — мультиязычный текст
|
||||
if ($el.collapsedTitle) { Emit-MLText -tag "CollapsedRepresentationTitle" -text $el.collapsedTitle -indent $inner }
|
||||
|
||||
@@ -3557,7 +3568,7 @@ function Emit-ColumnGroup {
|
||||
}
|
||||
if ($orientation) { X "$inner<Group>$orientation</Group>" }
|
||||
|
||||
if ($el.showTitle -eq $false) { X "$inner<ShowTitle>false</ShowTitle>" }
|
||||
if ($null -ne $el.showTitle) { X "$inner<ShowTitle>$(if ($el.showTitle){'true'}else{'false'})</ShowTitle>" }
|
||||
# showInHeader эмитится общим Emit-CommonElementProps (через Emit-Layout)
|
||||
|
||||
Emit-CommonFlags -el $el -indent $inner
|
||||
@@ -4407,7 +4418,7 @@ function Emit-Page {
|
||||
}
|
||||
if ($orientation) { X "$inner<Group>$orientation</Group>" }
|
||||
}
|
||||
if ($el.showTitle -eq $false) { X "$inner<ShowTitle>false</ShowTitle>" }
|
||||
if ($null -ne $el.showTitle) { X "$inner<ShowTitle>$(if ($el.showTitle){'true'}else{'false'})</ShowTitle>" }
|
||||
Emit-Layout -el $el -indent $inner
|
||||
|
||||
# Оформление страницы (BackColor / TitleTextColor / TitleFont) — после ShowTitle, перед компаньоном
|
||||
@@ -4533,6 +4544,8 @@ function Emit-PictureDecoration {
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-DecorationTitle -el $el -name $name -indent $inner
|
||||
# Текст при невыбранной картинке (NonselectedPictureText) — после Title (порядок корпуса)
|
||||
if ($null -ne $el.nonselectedPictureText) { Emit-MLText -tag "NonselectedPictureText" -text $el.nonselectedPictureText -indent $inner }
|
||||
Emit-CommonFlags -el $el -indent $inner
|
||||
|
||||
# Источник картинки — ТОЛЬКО $el.src (у PictureDecoration ключ 'picture' = тип/имя элемента, не источник).
|
||||
|
||||
Reference in New Issue
Block a user