mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-07 04:00:20 +03:00
feat(form-decompile,form-compile): AutoSaveUserSettings дин-списка (settings.autoSaveUserSettings)
Свойство <AutoSaveUserSettings> внутри <Settings xsi:type="DynamicList"> (после MainTable) — авто-сохранение пользовательских настроек дин-списка. В корпусе только false (дефолт true → платформа эмитит отклонение). Не обрабатывалось → терялось (ROOT Attribute>AutoSaveUserSettings 292 на 178 формах). Ключ settings.autoSaveUserSettings (bool); декомпилятор захватывает факт. значение, компилятор эмитит после MainTable при наличии ключа. Зеркало py. Таргет-верификация (выборка 50 из 178): 0 остатка, 27 стали match, 0 регрессов. Кейс dynamic-list-form расширен (+autoSaveUserSettings), сертифицирован в 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
6d9c41507c
commit
dd9af25e67
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.109 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.110 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -5206,6 +5206,8 @@ function Emit-Attributes {
|
||||
# Schema-параметры дин-списка (DataCompositionSchemaParameter) — после Field*, до MainTable.
|
||||
Emit-DLParameters -params $st.parameters -indent $si
|
||||
if ($st.mainTable) { X "$si<MainTable>$(Normalize-MetaTypeRef "$($st.mainTable)")</MainTable>" }
|
||||
# AutoSaveUserSettings — после MainTable (дефолт true; эмитим только при заданном ключе = отклонении).
|
||||
if ($null -ne $st.autoSaveUserSettings) { X "$si<AutoSaveUserSettings>$(if ($st.autoSaveUserSettings){'true'}else{'false'})</AutoSaveUserSettings>" }
|
||||
# ListSettings: filter/order/conditionalAppearance (skd-грамматика) + каноничные блок-GUID.
|
||||
# Нет items → контейнеры всё равно эмитятся (blockMeta) = каноничный пустой скелет платформы.
|
||||
$lsi = "$si`t"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.109 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.110 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -4922,6 +4922,9 @@ def emit_attributes(lines, attrs, indent, conditional_appearance=None):
|
||||
emit_dl_parameters(lines, s.get('parameters'), si)
|
||||
if s.get('mainTable'):
|
||||
lines.append(f'{si}<MainTable>{normalize_meta_type_ref(str(s["mainTable"]))}</MainTable>')
|
||||
# AutoSaveUserSettings — после MainTable (дефолт true; эмитим только при заданном ключе = отклонении).
|
||||
if s.get('autoSaveUserSettings') is not None:
|
||||
lines.append(f'{si}<AutoSaveUserSettings>{"true" if s["autoSaveUserSettings"] else "false"}</AutoSaveUserSettings>')
|
||||
# ListSettings: filter/order/conditionalAppearance (skd-грамматика) + каноничные блок-GUID.
|
||||
# Нет items → контейнеры всё равно эмитятся (blockMeta) = каноничный пустой скелет платформы.
|
||||
lsi = f'{si}\t'
|
||||
|
||||
Reference in New Issue
Block a user