mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-21 01:51:06 +03:00
feat(form-decompile,form-compile): MobileDeviceCommandBarContent (состав моб-панели)
Форменное свойство <MobileDeviceCommandBarContent> = список имён командных панелей/кнопок для командной панели мобильного устройства. DSL: mobileCommandBarContent: ["Имя1", "Имя2", …] (массив строк). Константы подтверждены по корпусу (161 файл): Presentation пустой, CheckState=0, Value xsi:type=xs:string всегда — варьируется только имя-Value. Компилятор ставит константы, эмитит перед AutoCommandBar; декомпилятор собирает список имён. Зеркало py (байт-в-байт). Форма BusinessProcesses/Задание/ФормаСписка → round-trip match. Кейс commands сертифицирован в 1С. Регресс 39/39 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
ea43522b5a
commit
8915e99ac8
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.81 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.82 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -5029,6 +5029,20 @@ if ($def.excludedCommands -and $def.excludedCommands.Count -gt 0) {
|
||||
X "`t</CommandSet>"
|
||||
}
|
||||
|
||||
# 12c2. MobileDeviceCommandBarContent — форменный список имён командных панелей/кнопок
|
||||
# (Presentation пустой, CheckState=0, тип xs:string — константы; варьируется только имя-Value).
|
||||
if ($def.mobileCommandBarContent -and @($def.mobileCommandBarContent).Count -gt 0) {
|
||||
X "`t<MobileDeviceCommandBarContent>"
|
||||
foreach ($nm in @($def.mobileCommandBarContent)) {
|
||||
X "`t`t<xr:Item>"
|
||||
X "`t`t`t<xr:Presentation/>"
|
||||
X "`t`t`t<xr:CheckState>0</xr:CheckState>"
|
||||
X "`t`t`t<xr:Value xsi:type=`"xs:string`">$(Esc-Xml "$nm")</xr:Value>"
|
||||
X "`t`t</xr:Item>"
|
||||
}
|
||||
X "`t</MobileDeviceCommandBarContent>"
|
||||
}
|
||||
|
||||
# 12d. AutoCommandBar (always present, id=-1)
|
||||
$acbAutofill = Compute-MainAcbAutofill
|
||||
$acbName = "ФормаКоманднаяПанель"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.81 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.82 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -4877,6 +4877,18 @@ def main():
|
||||
lines.append(f'\t\t<ExcludedCommand>{cmd}</ExcludedCommand>')
|
||||
lines.append('\t</CommandSet>')
|
||||
|
||||
# MobileDeviceCommandBarContent — форменный список имён командных панелей/кнопок
|
||||
# (Presentation пустой, CheckState=0, тип xs:string — константы; варьируется только имя-Value).
|
||||
if defn.get('mobileCommandBarContent') and len(defn['mobileCommandBarContent']) > 0:
|
||||
lines.append('\t<MobileDeviceCommandBarContent>')
|
||||
for nm in defn['mobileCommandBarContent']:
|
||||
lines.append('\t\t<xr:Item>')
|
||||
lines.append('\t\t\t<xr:Presentation/>')
|
||||
lines.append('\t\t\t<xr:CheckState>0</xr:CheckState>')
|
||||
lines.append(f'\t\t\t<xr:Value xsi:type="xs:string">{esc_xml(str(nm))}</xr:Value>')
|
||||
lines.append('\t\t</xr:Item>')
|
||||
lines.append('\t</MobileDeviceCommandBarContent>')
|
||||
|
||||
# AutoCommandBar (always present, id=-1)
|
||||
acb_autofill = _compute_main_acb_autofill()
|
||||
acb_name = '\u0424\u043e\u0440\u043c\u0430\u041a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f\u041f\u0430\u043d\u0435\u043b\u044c'
|
||||
|
||||
Reference in New Issue
Block a user