feat(form-decompile,form-compile): CommandSet/excludedCommands таблиц (кластер F)

CommandSet встречается на Table (23) и Form (8). Форменный excludedCommands
уже поддержан, табличный — нет.

- compiler PS1+PY: Emit-Table — excludedCommands → <CommandSet>; заодно
  viewStatusLocation/searchControlLocation (из того же блока свойств таблицы).
- decompiler: Table — CommandSet→excludedCommands, searchStringLocation
  (раньше не ловился), viewStatusLocation/searchControlLocation.
- docs/form-dsl-spec: excludedCommands + view/searchControl у таблицы.
- tests: table расширен, сертифицирован в 1С.

ExcludedCommand ушёл из топа LOST. Регресс 32/32 PS1+PY, churn нулевой.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-04 19:18:17 +03:00
co-authored by Claude Opus 4.8
parent 0941fc717d
commit 9c1ea1662a
6 changed files with 48 additions and 6 deletions
@@ -1,4 +1,4 @@
# form-compile v1.27 — Compile 1C managed form from JSON or object metadata
# form-compile v1.28 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$JsonPath,
@@ -1922,7 +1922,8 @@ function Emit-Element {
"children"=1;"columns"=1
# table-specific
"changeRowSet"=1;"changeRowOrder"=1;"header"=1;"footer"=1
"commandBarLocation"=1;"searchStringLocation"=1
"commandBarLocation"=1;"searchStringLocation"=1;"viewStatusLocation"=1;"searchControlLocation"=1
"excludedCommands"=1
"choiceMode"=1;"initialTreeView"=1;"enableDrag"=1;"enableStartDrag"=1
"rowPictureDataPath"=1;"tableAutofill"=1
# pages-specific
@@ -2528,8 +2529,16 @@ function Emit-Table {
if ($el.enableStartDrag -eq $true) { X "$inner<EnableStartDrag>true</EnableStartDrag>" }
if ($el.enableDrag -eq $true) { X "$inner<EnableDrag>true</EnableDrag>" }
if ($el.rowPictureDataPath) { X "$inner<RowPictureDataPath>$($el.rowPictureDataPath)</RowPictureDataPath>" }
if ($el.viewStatusLocation) { X "$inner<ViewStatusLocation>$($el.viewStatusLocation)</ViewStatusLocation>" }
if ($el.searchControlLocation) { X "$inner<SearchControlLocation>$($el.searchControlLocation)</SearchControlLocation>" }
Emit-Layout -el $el -indent $inner -skipHeight
if ($el.excludedCommands -and $el.excludedCommands.Count -gt 0) {
X "$inner<CommandSet>"
foreach ($cmd in $el.excludedCommands) { X "$inner`t<ExcludedCommand>$cmd</ExcludedCommand>" }
X "$inner</CommandSet>"
}
# Companions
Emit-Companion -tag "ContextMenu" -name "${name}КонтекстноеМеню" -indent $inner
# AutoCommandBar — with optional Autofill control
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# form-compile v1.27 — Compile 1C managed form from JSON or object metadata
# form-compile v1.28 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -1356,7 +1356,8 @@ KNOWN_KEYS = {
"showTitle", "united", "collapsed",
"children", "columns",
"changeRowSet", "changeRowOrder", "header", "footer",
"commandBarLocation", "searchStringLocation",
"commandBarLocation", "searchStringLocation", "viewStatusLocation", "searchControlLocation",
"excludedCommands",
"pagesRepresentation",
"type", "command", "stdCommand", "defaultButton", "locationInCommandBar",
"src", "valuesPicture", "loadTransparent",
@@ -2186,8 +2187,18 @@ def emit_table(lines, el, name, eid, indent):
lines.append(f'{inner}<EnableDrag>true</EnableDrag>')
if el.get('rowPictureDataPath'):
lines.append(f'{inner}<RowPictureDataPath>{el["rowPictureDataPath"]}</RowPictureDataPath>')
if el.get('viewStatusLocation'):
lines.append(f'{inner}<ViewStatusLocation>{el["viewStatusLocation"]}</ViewStatusLocation>')
if el.get('searchControlLocation'):
lines.append(f'{inner}<SearchControlLocation>{el["searchControlLocation"]}</SearchControlLocation>')
emit_layout(lines, el, inner, skip_height=True)
if el.get('excludedCommands'):
lines.append(f'{inner}<CommandSet>')
for cmd in el['excludedCommands']:
lines.append(f'{inner}\t<ExcludedCommand>{cmd}</ExcludedCommand>')
lines.append(f'{inner}</CommandSet>')
# Companions
emit_companion(lines, 'ContextMenu', f'{name}\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435\u041c\u0435\u043d\u044e', inner)
# AutoCommandBar — with optional Autofill control