diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1
index 4e6dc8b2..79c51d10 100644
--- a/.claude/skills/form-compile/scripts/form-compile.ps1
+++ b/.claude/skills/form-compile/scripts/form-compile.ps1
@@ -1,4 +1,4 @@
-# form-compile v1.65 — Compile 1C managed form from JSON or object metadata
+# form-compile v1.66 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$JsonPath,
@@ -2830,6 +2830,9 @@ function Emit-Group {
Emit-CommonFlags -el $el -indent $inner
Emit-Layout -el $el -indent $inner
+ # Оформление (цвета/шрифты/граница) — перед компаньоном
+ Emit-Appearance -el $el -indent $inner -profile 'field'
+
# Companion: ExtendedTooltip
Emit-Companion -tag "ExtendedTooltip" -name "${name}РасширеннаяПодсказка" -indent $inner -content $el.extendedTooltip
@@ -2869,6 +2872,9 @@ function Emit-ColumnGroup {
Emit-CommonFlags -el $el -indent $inner
Emit-Layout -el $el -indent $inner
+ # Оформление (цвета/шрифты/граница) — перед компаньоном
+ Emit-Appearance -el $el -indent $inner -profile 'field'
+
# Companion: ExtendedTooltip
Emit-Companion -tag "ExtendedTooltip" -name "${name}РасширеннаяПодсказка" -indent $inner -content $el.extendedTooltip
@@ -3381,6 +3387,9 @@ function Emit-Table {
X "$inner"
}
+ # Оформление (цвета/граница таблицы) — перед компаньонами
+ Emit-Appearance -el $el -indent $inner -profile 'field'
+
# Companions
Emit-CompanionPanel -tag "ContextMenu" -name "${name}КонтекстноеМеню" -indent $inner -panel $el.contextMenu
# AutoCommandBar: приоритет commandBar-свойства (контент); иначе tableAutofill-shorthand; иначе пусто.
@@ -3598,6 +3607,9 @@ function Emit-PictureDecoration {
if ($el.hyperlink -eq $true) { X "$innertrue" }
Emit-Layout -el $el -indent $inner
+ # Оформление PictureDecoration: XSD расщепляет appearance вокруг Title (Border после Title)
+ # + позиция Picture — отдельный кластер, пока не разводим (декомпилятор захватывает в keys).
+
# Companions
Emit-CompanionPanel -tag "ContextMenu" -name "${name}КонтекстноеМеню" -indent $inner -panel $el.contextMenu
Emit-Companion -tag "ExtendedTooltip" -name "${name}РасширеннаяПодсказка" -indent $inner -content $el.extendedTooltip
@@ -3629,6 +3641,9 @@ function Emit-PictureField {
# Скаляр (Ref) или объект {src, loadTransparent}; LoadTransparent эмитится всегда.
Emit-PictureRef -val $el.valuesPicture -picTag 'ValuesPicture' -indent $inner
+ # Оформление (цвета/шрифты/граница) — перед компаньонами
+ Emit-Appearance -el $el -indent $inner -profile 'field'
+
# Companions
Emit-CompanionPanel -tag "ContextMenu" -name "${name}КонтекстноеМеню" -indent $inner -panel $el.contextMenu
Emit-Companion -tag "ExtendedTooltip" -name "${name}РасширеннаяПодсказка" -indent $inner -content $el.extendedTooltip
@@ -3671,6 +3686,9 @@ function Emit-Calendar {
if ($null -ne $el.heightInMonths) { X "$inner$($el.heightInMonths)" }
if ($null -ne $el.showMonthsPanel) { $v = if ($el.showMonthsPanel) { "true" } else { "false" }; X "$inner$v" }
+ # Оформление (цвета/шрифты/граница) — перед компаньонами
+ Emit-Appearance -el $el -indent $inner -profile 'field'
+
# Companions
Emit-CompanionPanel -tag "ContextMenu" -name "${name}КонтекстноеМеню" -indent $inner -panel $el.contextMenu
Emit-Companion -tag "ExtendedTooltip" -name "${name}РасширеннаяПодсказка" -indent $inner -content $el.extendedTooltip
diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py
index 737845cd..3d7a6b3d 100644
--- a/.claude/skills/form-compile/scripts/form-compile.py
+++ b/.claude/skills/form-compile/scripts/form-compile.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# form-compile v1.65 — Compile 1C managed form from JSON or object metadata
+# form-compile v1.66 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -2744,6 +2744,9 @@ def emit_group(lines, el, name, eid, indent):
emit_common_flags(lines, el, inner)
emit_layout(lines, el, inner)
+ # Оформление (цвета/шрифты/граница) — перед компаньоном
+ emit_appearance(lines, el, inner, 'field')
+
# Companion: ExtendedTooltip
emit_companion(lines, 'ExtendedTooltip', f'{name}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430', inner, el.get('extendedTooltip'))
@@ -2780,6 +2783,9 @@ def emit_column_group(lines, el, name, eid, indent):
emit_common_flags(lines, el, inner)
emit_layout(lines, el, inner)
+ # Оформление (цвета/шрифты/граница) — перед компаньоном
+ emit_appearance(lines, el, inner, 'field')
+
emit_companion(lines, 'ExtendedTooltip', f'{name}РасширеннаяПодсказка', inner, el.get('extendedTooltip'))
if el.get('children') and len(el['children']) > 0:
@@ -3101,6 +3107,9 @@ def emit_table(lines, el, name, eid, indent):
lines.append(f'{inner}\t{cmd}')
lines.append(f'{inner}')
+ # Оформление (цвета/граница таблицы) — перед компаньонами
+ emit_appearance(lines, el, inner, 'field')
+
# Companions
emit_companion_panel(lines, 'ContextMenu', f'{name}\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435\u041c\u0435\u043d\u044e', inner, el.get('contextMenu'))
# AutoCommandBar — with optional Autofill control
@@ -3293,6 +3302,9 @@ def emit_picture_decoration(lines, el, name, eid, indent):
lines.append(f'{inner}true')
emit_layout(lines, el, inner)
+ # Оформление PictureDecoration: XSD расщепляет appearance вокруг Title (Border после Title)
+ # + позиция Picture — отдельный кластер, пока не разводим (декомпилятор захватывает в keys).
+
# Companions
emit_companion_panel(lines, 'ContextMenu', f'{name}\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435\u041c\u0435\u043d\u044e', inner, el.get('contextMenu'))
emit_companion(lines, 'ExtendedTooltip', f'{name}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430', inner, el.get('extendedTooltip'))
@@ -3325,6 +3337,9 @@ def emit_picture_field(lines, el, name, eid, indent):
# Скаляр (Ref) или объект {src, loadTransparent}; LoadTransparent эмитится всегда.
emit_picture_ref(lines, el.get('valuesPicture'), 'ValuesPicture', inner)
+ # Оформление (цвета/шрифты/граница) — перед компаньонами
+ emit_appearance(lines, el, inner, 'field')
+
# Companions
emit_companion_panel(lines, 'ContextMenu', f'{name}\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435\u041c\u0435\u043d\u044e', inner, el.get('contextMenu'))
emit_companion(lines, 'ExtendedTooltip', f'{name}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430', inner, el.get('extendedTooltip'))
@@ -3363,6 +3378,9 @@ def emit_calendar(lines, el, name, eid, indent):
if el.get('showMonthsPanel') is not None:
lines.append(f'{inner}{"true" if el["showMonthsPanel"] else "false"}')
+ # Оформление (цвета/шрифты/граница) — перед компаньонами
+ emit_appearance(lines, el, inner, 'field')
+
# Companions
emit_companion_panel(lines, 'ContextMenu', f'{name}\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435\u041c\u0435\u043d\u044e', inner, el.get('contextMenu'))
emit_companion(lines, 'ExtendedTooltip', f'{name}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430', inner, el.get('extendedTooltip'))
diff --git a/docs/form-dsl-spec.md b/docs/form-dsl-spec.md
index b0d7973e..d19a7f84 100644
--- a/docs/form-dsl-spec.md
+++ b/docs/form-dsl-spec.md
@@ -197,7 +197,7 @@ companion-панели с собственным контентом. Оба не
### 4.1e. Оформление элемента (цвета / шрифты / граница)
-Прямые свойства оформления элемента. Ключи — англ. camelCase 1:1 с тегами; **принимаются рус. синонимы** (forgiving). Применимо к полям (input/check/radio/labelField), декорациям (label) и кнопкам (button); порядок тегов в XML — по базовому типу (профиль), компилятор расставляет сам.
+Прямые свойства оформления элемента. Ключи — англ. camelCase 1:1 с тегами; **принимаются рус. синонимы** (forgiving). Применимо к полям (input/check/radio/labelField/picField/calendar), декорациям (label), кнопкам (button), группам (group/columnGroup) и таблицам (table); порядок тегов в XML — по базовому типу (профиль), компилятор расставляет сам. (PictureDecoration пока не поддержан — у него XSD расщепляет оформление вокруг `
`.)
| Ключ | Тег | Рус. синоним |
|------|-----|--------------|
diff --git a/tests/skills/cases/form-compile/dynamic-list-parameters.json b/tests/skills/cases/form-compile/dynamic-list-parameters.json
index 8db393a7..538f5b5e 100644
--- a/tests/skills/cases/form-compile/dynamic-list-parameters.json
+++ b/tests/skills/cases/form-compile/dynamic-list-parameters.json
@@ -38,9 +38,9 @@
} }
],
"elements": [
- { "table": "Список", "path": "Список", "columns": [
+ { "table": "Список", "path": "Список", "backColor": "web:Honeydew", "borderColor": "style:BorderColor", "columns": [
{ "input": "Код", "path": "Список.Код" },
- { "input": "Наименование", "path": "Список.Наименование" }
+ { "input": "Наименование", "path": "Список.Наименование", "titleTextColor": "web:FireBrick", "border": { "width": 1, "style": "Single" } }
]}
]
}
diff --git a/tests/skills/cases/form-compile/element-appearance.json b/tests/skills/cases/form-compile/element-appearance.json
index 8808bdd4..5dcace61 100644
--- a/tests/skills/cases/form-compile/element-appearance.json
+++ b/tests/skills/cases/form-compile/element-appearance.json
@@ -1,5 +1,5 @@
{
- "name": "Оформление элементов — цвета/шрифты/граница на decoration/input/button (профили порядка)",
+ "name": "Оформление элементов — цвета/шрифты/граница на decoration/input/button/group (профили порядка)",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
@@ -33,7 +33,10 @@
{ "button": "ОК", "title": "ОК",
"backColor": "web:Honeydew",
"borderColor": "style:BorderColor",
- "font": "style:NormalTextFont" }
+ "font": "style:NormalTextFont" },
+ { "group": "ГруппаОформление", "backColor": "web:Honeydew", "children": [
+ { "input": "Цена2", "path": "Объект.Цена", "textColor": "web:DimGray" }
+ ]}
]
}
}
diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-parameters/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-parameters/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml
index f8f9f3f4..dc375f64 100644
--- a/tests/skills/cases/form-compile/snapshots/dynamic-list-parameters/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml
+++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-parameters/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml
@@ -27,6 +27,8 @@
false
Auto
true
+ web:Honeydew
+ style:BorderColor
false
@@ -64,6 +66,10 @@
Список.Наименование
+ web:FireBrick
+
+ Single
+
diff --git a/tests/skills/cases/form-compile/snapshots/element-appearance/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/element-appearance/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml
index ea05bd7e..6e7d0b98 100644
--- a/tests/skills/cases/form-compile/snapshots/element-appearance/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml
+++ b/tests/skills/cases/form-compile/snapshots/element-appearance/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml
@@ -56,9 +56,21 @@
+
+ web:Honeydew
+
+
+
+ Объект.Цена
+ web:DimGray
+
+
+
+
+
-
+
cfg:CatalogObject.Товары