diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1
index f2a08427..b3004d89 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.49 — Compile 1C managed form from JSON or object metadata
+# form-compile v1.50 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$JsonPath,
@@ -2400,6 +2400,8 @@ function Emit-Element {
"name"=1;"path"=1;"title"=1;"tooltip"=1;"tooltipRepresentation"=1;"extendedTooltip"=1
# companion-панели (свойства): командная панель + контекстное меню
"commandBar"=1;"contextMenu"=1
+ # источник команд группы/панели (ButtonGroup/CommandBar)
+ "commandSource"=1
# visibility & state
"visible"=1;"hidden"=1;"enabled"=1;"disabled"=1;"readOnly"=1;"userVisible"=1
# events ("events" — основной формат; on/handlers — legacy, принимаются ради совместимости)
@@ -3488,6 +3490,8 @@ function Emit-CommandBar {
Emit-Title -el $el -name $name -indent $inner
+ if ($el.commandSource) { X "$inner$($el.commandSource)" }
+
if ($el.autofill -eq $true) { X "$innertrue" }
Emit-CommonFlags -el $el -indent $inner
@@ -3514,6 +3518,8 @@ function Emit-ButtonGroup {
Emit-Title -el $el -name $name -indent $inner
+ if ($el.commandSource) { X "$inner$($el.commandSource)" }
+
if ($el.representation) {
X "$inner$($el.representation)"
}
diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py
index 99ca2f81..62827f53 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.49 — Compile 1C managed form from JSON or object metadata
+# form-compile v1.50 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -1780,7 +1780,7 @@ KNOWN_KEYS = {
"excludedCommands",
"pagesRepresentation",
"type", "command", "commandName", "stdCommand", "defaultButton", "locationInCommandBar",
- "commandBar", "contextMenu",
+ "commandBar", "contextMenu", "commandSource",
"src", "valuesPicture", "loadTransparent",
"autofill",
"choiceMode", "initialTreeView", "enableDrag", "enableStartDrag",
@@ -3173,6 +3173,9 @@ def emit_command_bar(lines, el, name, eid, indent):
emit_title(lines, el, name, inner)
+ if el.get('commandSource'):
+ lines.append(f'{inner}{el["commandSource"]}')
+
if el.get('autofill') is True:
lines.append(f'{inner}true')
@@ -3224,6 +3227,9 @@ def emit_button_group(lines, el, name, eid, indent):
emit_title(lines, el, name, inner)
+ if el.get('commandSource'):
+ lines.append(f'{inner}{el["commandSource"]}')
+
if el.get('representation'):
lines.append(f'{inner}{el["representation"]}')
diff --git a/.claude/skills/form-decompile/scripts/form-decompile.ps1 b/.claude/skills/form-decompile/scripts/form-decompile.ps1
index 2c5255ca..5f4dae89 100644
--- a/.claude/skills/form-decompile/scripts/form-decompile.ps1
+++ b/.claude/skills/form-decompile/scripts/form-decompile.ps1
@@ -1,4 +1,4 @@
-# form-decompile v0.31 — Decompile 1C managed Form.xml to JSON DSL (draft)
+# form-decompile v0.32 — Decompile 1C managed Form.xml to JSON DSL (draft)
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
param(
@@ -1130,6 +1130,7 @@ function Decompile-Element {
'ButtonGroup' {
$obj[$key] = $name
Add-CommonProps $obj $node $name
+ $cs = Get-Child $node 'CommandSource'; if ($cs) { $obj['commandSource'] = $cs }
$rep = Get-Child $node 'Representation'; if ($rep) { $obj['representation'] = $rep }
$kids = Decompile-Children $node
if ($kids) { $obj['children'] = $kids }
@@ -1137,6 +1138,7 @@ function Decompile-Element {
'CommandBar' {
$obj[$key] = $name
Add-CommonProps $obj $node $name
+ $cs = Get-Child $node 'CommandSource'; if ($cs) { $obj['commandSource'] = $cs }
if ((Get-Child $node 'Autofill') -eq 'true') { $obj['autofill'] = $true }
$kids = Decompile-Children $node
if ($kids) { $obj['children'] = $kids }
diff --git a/docs/form-dsl-spec.md b/docs/form-dsl-spec.md
index 07cc3826..e1575940 100644
--- a/docs/form-dsl-spec.md
+++ b/docs/form-dsl-spec.md
@@ -565,6 +565,7 @@ Pages поддерживает `pagesRepresentation`: `None`, `TabsOnTop`, `Tabs
|----------|-----|----------|
| `buttonGroup` | string | Имя элемента |
| `title` | string/object | Заголовок группы |
+| `commandSource` | string | Источник команд группы (``): `Form`, `FormCommandPanelGlobalCommands`, `Item.<ИмяЭлемента>`. Также у `cmdBar`. Эмитится «как есть» |
| `representation` | string | `Auto`, `Picture`, `Text`, `PictureAndText` |
| `children` | array | Кнопки (`button`) внутри группы |
diff --git a/tests/skills/cases/form-compile/button-group.json b/tests/skills/cases/form-compile/button-group.json
index f15c09fb..80c0b00f 100644
--- a/tests/skills/cases/form-compile/button-group.json
+++ b/tests/skills/cases/form-compile/button-group.json
@@ -21,7 +21,8 @@
{ "buttonGroup": "ГруппаПереместить", "title": "Переместить", "children": [
{ "button": "Вверх", "command": "Вверх" },
{ "button": "Вниз", "command": "Вниз" }
- ]}
+ ]},
+ { "buttonGroup": "ГруппаГлобальныеКоманды", "commandSource": "FormCommandPanelGlobalCommands" }
]}
],
"attributes": [
diff --git a/tests/skills/cases/form-compile/snapshots/button-group/DataProcessors/ГруппыКнопок/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/button-group/DataProcessors/ГруппыКнопок/Forms/Форма/Ext/Form.xml
index 0a1adefd..eac7521d 100644
--- a/tests/skills/cases/form-compile/snapshots/button-group/DataProcessors/ГруппыКнопок/Forms/Форма/Ext/Form.xml
+++ b/tests/skills/cases/form-compile/snapshots/button-group/DataProcessors/ГруппыКнопок/Forms/Форма/Ext/Form.xml
@@ -41,11 +41,15 @@
+
+ FormCommandPanelGlobalCommands
+
+
-
+
cfg:DataProcessorObject.ГруппыКнопок
@@ -53,7 +57,7 @@
-
+
ru
@@ -69,7 +73,7 @@
ВыполнитьОбработка
Ctrl+Enter
-
+
ru
@@ -79,7 +83,7 @@
ВверхОбработка
DontUse
-
+
ru