mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-20 17:40:59 +03:00
feat(form-compile): свойство collapsed для сворачиваемых групп
Добавлен ключ collapsed (для group=collapsible) → <Collapsed>true</Collapsed>: группа создаётся уже свёрнутой. Раньше DSL умел только включать сворачиваемое поведение, но начальное состояние задать было нельзя. Также уточнено описание united: оно про выравнивание левого края полей ввода (сквозное/локальное), а не про объединение рамок группы. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
3d80191ca7
commit
ebf92a8780
@@ -183,7 +183,8 @@ powershell.exe -NoProfile -File .claude/skills/form-compile/scripts/form-compile
|
|||||||
| Ключ | Описание |
|
| Ключ | Описание |
|
||||||
|------|----------|
|
|------|----------|
|
||||||
| `showTitle: true` | Показывать заголовок группы |
|
| `showTitle: true` | Показывать заголовок группы |
|
||||||
| `united: false` | Не объединять рамку |
|
| `united: false` | Левый край полей ввода выравнивается только в пределах этой группы (по умолчанию `true` — сквозное выравнивание по самому длинному заголовку, в т.ч. с соседними группами) |
|
||||||
|
| `collapsed: true` | Только для `"group": "collapsible"` — группа создаётся свёрнутой |
|
||||||
| `representation` | `"none"`, `"normal"`, `"weak"`, `"strong"` |
|
| `representation` | `"none"`, `"normal"`, `"weak"`, `"strong"` |
|
||||||
| `children: [...]` | Вложенные элементы |
|
| `children: [...]` | Вложенные элементы |
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# form-compile v1.18 — Compile 1C managed form from JSON or object metadata
|
# form-compile v1.19 — Compile 1C managed form from JSON or object metadata
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[string]$JsonPath,
|
[string]$JsonPath,
|
||||||
@@ -1911,7 +1911,7 @@ function Emit-Element {
|
|||||||
# label/hyperlink
|
# label/hyperlink
|
||||||
"hyperlink"=1
|
"hyperlink"=1
|
||||||
# group-specific
|
# group-specific
|
||||||
"showTitle"=1;"united"=1
|
"showTitle"=1;"united"=1;"collapsed"=1
|
||||||
# hierarchy
|
# hierarchy
|
||||||
"children"=1;"columns"=1
|
"children"=1;"columns"=1
|
||||||
# table-specific
|
# table-specific
|
||||||
@@ -2022,6 +2022,7 @@ function Emit-Group {
|
|||||||
if ($groupVal -eq "collapsible") {
|
if ($groupVal -eq "collapsible") {
|
||||||
X "$inner<Group>Vertical</Group>"
|
X "$inner<Group>Vertical</Group>"
|
||||||
X "$inner<Behavior>Collapsible</Behavior>"
|
X "$inner<Behavior>Collapsible</Behavior>"
|
||||||
|
if ($el.collapsed -eq $true) { X "$inner<Collapsed>true</Collapsed>" }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Representation
|
# Representation
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# form-compile v1.18 — Compile 1C managed form from JSON or object metadata
|
# form-compile v1.19 — Compile 1C managed form from JSON or object metadata
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
import argparse
|
import argparse
|
||||||
import copy
|
import copy
|
||||||
@@ -1350,7 +1350,7 @@ KNOWN_KEYS = {
|
|||||||
"multiLine", "passwordMode", "choiceButton", "clearButton",
|
"multiLine", "passwordMode", "choiceButton", "clearButton",
|
||||||
"spinButton", "dropListButton", "markIncomplete", "skipOnInput", "inputHint",
|
"spinButton", "dropListButton", "markIncomplete", "skipOnInput", "inputHint",
|
||||||
"hyperlink",
|
"hyperlink",
|
||||||
"showTitle", "united",
|
"showTitle", "united", "collapsed",
|
||||||
"children", "columns",
|
"children", "columns",
|
||||||
"changeRowSet", "changeRowOrder", "header", "footer",
|
"changeRowSet", "changeRowOrder", "header", "footer",
|
||||||
"commandBarLocation", "searchStringLocation",
|
"commandBarLocation", "searchStringLocation",
|
||||||
@@ -1833,6 +1833,8 @@ def emit_group(lines, el, name, eid, indent):
|
|||||||
if group_val == 'collapsible':
|
if group_val == 'collapsible':
|
||||||
lines.append(f'{inner}<Group>Vertical</Group>')
|
lines.append(f'{inner}<Group>Vertical</Group>')
|
||||||
lines.append(f'{inner}<Behavior>Collapsible</Behavior>')
|
lines.append(f'{inner}<Behavior>Collapsible</Behavior>')
|
||||||
|
if el.get('collapsed') is True:
|
||||||
|
lines.append(f'{inner}<Collapsed>true</Collapsed>')
|
||||||
|
|
||||||
# Representation
|
# Representation
|
||||||
if el.get('representation'):
|
if el.get('representation'):
|
||||||
|
|||||||
Reference in New Issue
Block a user