mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-05 09:40:52 +03:00
feat(form-decompile,form-compile): табличные скаляры ChoiceMode/SelectionMode/RowSelectionMode/Vertical-HorizontalLines + дегейт UseAlternationRowColor/InitialTreeView/RowPictureDataPath/RowsPicture (кластер Table scalars)
Свойства таблицы, терявшиеся на раундтрипе. Часть была захвачена в декомпиляторе под gate динсписка (<UpdateOnDataChange>) → терялась на обычных ValueTable-таблицах. Новые скаляры (захват + эмиссия, все типы таблиц): - choiceMode (компилятор уже эмитил — добавлен захват), selectionMode (SingleRow/…), rowSelectionMode (Row/…), verticalLines/horizontalLines (явное false). Дегейт (вынесены из блока динсписка в общую обработку Table — ловятся на ЛЮБОЙ таблице): - useAlternationRowColor, initialTreeView, rowsPicture — захват/эмиссия без gate. - rowPictureDataPath — инверсия умного дефолта DefaultPicture осталась дин-список-only; обычные таблицы захватывают/эмитят литерал. Зеркало form-compile.py идентично (py==ps1 проверено). Валидация: все 7 целевых — 0 LOST / 0 ADDED; round-trip на ValueTable-формах (АдреснаяКнига и др.); регресс 33/33 ps+py; harness 8448→8368 (на честной метрике после фикса атрибуции), 0 fail. Остаток по таблицам — companion-контент (ExtendedTooltip/AutoCommandBar/ContextMenu) и цвета/шрифты — отдельные кластеры. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1b56e7a735
commit
e905d5f576
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.42 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.43 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -2342,6 +2342,7 @@ function Emit-Element {
|
||||
"excludedCommands"=1
|
||||
"choiceMode"=1;"initialTreeView"=1;"enableDrag"=1;"enableStartDrag"=1
|
||||
"rowPictureDataPath"=1;"tableAutofill"=1
|
||||
"rowSelectionMode"=1;"verticalLines"=1;"horizontalLines"=1
|
||||
# dynamic-list table block
|
||||
"defaultItem"=1;"useAlternationRowColor"=1;"fileDragMode"=1;"autoRefresh"=1
|
||||
"autoRefreshPeriod"=1;"choiceFoldersAndItems"=1;"restoreCurrentRow"=1;"showRoot"=1
|
||||
@@ -2972,9 +2973,7 @@ function Emit-LabelField {
|
||||
# DSL-ключ переопределяет; декомпилятор инвертирует (опускает значения = дефолту).
|
||||
function Emit-DynListTableBlock {
|
||||
param($el, [string]$indent)
|
||||
# UseAlternationRowColor — специфично для list-таблицы (defaultItem/fileDragMode/
|
||||
# enableStartDrag — общие, эмитятся в Emit-Layout)
|
||||
if ($el.useAlternationRowColor -eq $true) { X "$indent<UseAlternationRowColor>true</UseAlternationRowColor>" }
|
||||
# (useAlternationRowColor — общее свойство таблицы, эмитится в Emit-Table)
|
||||
# Group A (гарант. блок, n=5079): дефолт + override
|
||||
$ar = if ($el.autoRefresh -eq $true) { "true" } else { "false" }
|
||||
X "$indent<AutoRefresh>$ar</AutoRefresh>"
|
||||
@@ -3037,6 +3036,11 @@ function Emit-Table {
|
||||
X "$inner<SearchStringLocation>$($el.searchStringLocation)</SearchStringLocation>"
|
||||
}
|
||||
if ($el.choiceMode -eq $true) { X "$inner<ChoiceMode>true</ChoiceMode>" }
|
||||
if ($el.useAlternationRowColor -eq $true) { X "$inner<UseAlternationRowColor>true</UseAlternationRowColor>" }
|
||||
if ($el.selectionMode) { X "$inner<SelectionMode>$($el.selectionMode)</SelectionMode>" }
|
||||
if ($el.rowSelectionMode) { X "$inner<RowSelectionMode>$($el.rowSelectionMode)</RowSelectionMode>" }
|
||||
if ($el.verticalLines -eq $false) { X "$inner<VerticalLines>false</VerticalLines>" }
|
||||
if ($el.horizontalLines -eq $false) { X "$inner<HorizontalLines>false</HorizontalLines>" }
|
||||
if ($el.initialTreeView) { X "$inner<InitialTreeView>$($el.initialTreeView)</InitialTreeView>" }
|
||||
if ($el.enableDrag -eq $true) { X "$inner<EnableDrag>true</EnableDrag>" }
|
||||
if ($el.rowPictureDataPath) { X "$inner<RowPictureDataPath>$($el.rowPictureDataPath)</RowPictureDataPath>" }
|
||||
|
||||
Reference in New Issue
Block a user