From 13174b63b1bd73419d790b5d925ea836ff9d9c7a Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Fri, 1 May 2026 20:46:23 +0300 Subject: [PATCH] =?UTF-8?q?feat(form-compile):=20=D0=BD=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D0=B2=D0=BD=D0=B0=D1=8F=20AutoCommandBar=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D1=8B=20+=20autoCmdBar=20DSL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Эвристика главной АКП: без cmdBar/autoCmdBar остаётся Autofill=true (как в Конфигураторе), с cmdBar — Autofill=false (обратная совместимость). - Новый элемент autoCmdBar для наполнения главной АКП кастомными кнопками. - Тихие синонимы commandBar↔cmdBar, autoCommandBar↔autoCmdBar. - Инференс main-реквизита по типу (*Object.*, *RecordSet.*, DynamicList, ConstantsSet) — единственный кандидат проставляется молча с [INFO]. - Эвристика DynamicList → таблица: tableAutofill=false + commandBarLocation=None для привязанной таблицы (соответствие ERP). - Косметика: true не эмитится явно. Snapshot'ы form-* также обновлены до актуального состояния cf-init (Ext/ClientApplicationInterface.xml). Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/skills/form-compile/SKILL.md | 30 +- .../form-compile/scripts/form-compile.ps1 | 205 +++++++++- .../form-compile/scripts/form-compile.py | 159 +++++++- .../Forms/ФормаСписка/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Валюты/Forms/ФормаЭлемента/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Валюты/Forms/ФормаСписка/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаЭлемента/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаСчета/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаСписка/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаДокумента/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаСписка/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаЭлемента/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаСписка/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Forms/ФормаЗаписи/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml | 1 - .../cases/form-compile/auto-cmd-bar.json | 33 ++ .../cases/form-compile/dynamic-list-form.json | 28 ++ .../Типы/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../auto-cmd-bar/Catalogs/Бригады.xml | 329 +++++++++++++++ .../Catalogs/Бригады/Ext/ObjectModule.bsl | 0 .../Catalogs/Бригады/Forms/ФормаСписка.xml | 21 + .../Бригады/Forms/ФормаСписка/Ext/Form.xml | 57 +++ .../Forms/ФормаСписка/Ext/Form/Module.bsl | 19 + .../snapshots/auto-cmd-bar/Configuration.xml | 252 ++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../auto-cmd-bar/Languages/Русский.xml | 16 + .../Товары/Forms/ФормаЭлемента/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Ext/ClientApplicationInterface.xml | 18 + .../dynamic-list-form/Catalogs/Товары.xml | 373 ++++++++++++++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 0 .../Catalogs/Товары/Forms/ФормаСписка.xml | 21 + .../Товары/Forms/ФормаСписка/Ext/Form.xml | 50 +++ .../Forms/ФормаСписка/Ext/Form/Module.bsl | 19 + .../dynamic-list-form/Configuration.xml | 252 ++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 + .../dynamic-list-form/Languages/Русский.xml | 16 + .../События/Forms/Форма/Ext/Form.xml | 1 - .../events/Ext/ClientApplicationInterface.xml | 18 + .../ЗагрузкаИзФайла/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../groups/Ext/ClientApplicationInterface.xml | 18 + .../ПоляВвода/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Минимальная/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Мастер/Forms/Форма/Ext/Form.xml | 1 - .../pages/Ext/ClientApplicationInterface.xml | 18 + .../snapshots/synonyms/Configuration.xml | 252 ++++++++++++ .../synonyms/DataProcessors/Тест.xml | 34 ++ .../DataProcessors/Тест/Ext/ManagerModule.bsl | 0 .../DataProcessors/Тест/Ext/ObjectModule.bsl | 0 .../DataProcessors/Тест/Forms/Форма.xml | 22 ++ .../Тест/Forms/Форма/Ext/Form.xml | 58 +++ .../Тест/Forms/Форма/Ext/Form/Module.bsl | 19 + .../Ext/ClientApplicationInterface.xml | 18 + .../snapshots/synonyms/Languages/Русский.xml | 16 + .../Таблица/Forms/Форма/Ext/Form.xml | 1 - .../table/Ext/ClientApplicationInterface.xml | 18 + tests/skills/cases/form-compile/synonyms.json | 36 ++ .../Реквизиты/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../КомандыТест/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Тест/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Группа/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Catalogs/Товары/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Инфо/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Простая/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Валидация/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../ВалТабл/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + .../Catalogs/Товары/Forms/Форма/Ext/Form.xml | 1 - .../Ext/ClientApplicationInterface.xml | 18 + 93 files changed, 2936 insertions(+), 41 deletions(-) create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/auto-cmd-bar.json create mode 100644 tests/skills/cases/form-compile/dynamic-list-form.json create mode 100644 tests/skills/cases/form-compile/snapshots/attributes-types/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады.xml create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка.xml create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form.xml create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form/Module.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Configuration.xml create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Languages/Русский.xml create mode 100644 tests/skills/cases/form-compile/snapshots/catalog-form/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/commands/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары.xml create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка.xml create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form/Module.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Configuration.xml create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/dynamic-list-form/Languages/Русский.xml create mode 100644 tests/skills/cases/form-compile/snapshots/events/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/file-dialog/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/groups/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/input-fields/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/minimal/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/pages/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/Configuration.xml create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест.xml create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Ext/ManagerModule.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма.xml create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form.xml create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form/Module.bsl create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/snapshots/synonyms/Languages/Русский.xml create mode 100644 tests/skills/cases/form-compile/snapshots/table/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-compile/synonyms.json create mode 100644 tests/skills/cases/form-edit/snapshots/add-attribute/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-edit/snapshots/add-command/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-edit/snapshots/add-element/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-edit/snapshots/add-group-with-fields/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-info/snapshots/overview/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-info/snapshots/rich-form/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-info/snapshots/simple-form/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-validate/snapshots/compiled-form/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-validate/snapshots/table-form/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/form-validate/snapshots/valid-form/Ext/ClientApplicationInterface.xml diff --git a/.claude/skills/form-compile/SKILL.md b/.claude/skills/form-compile/SKILL.md index 2015a947..16833ea9 100644 --- a/.claude/skills/form-compile/SKILL.md +++ b/.claude/skills/form-compile/SKILL.md @@ -73,7 +73,8 @@ powershell.exe -NoProfile -File .claude/skills/form-compile/scripts/form-compile | `"picture"` | PictureDecoration | имя | | `"picField"` | PictureField | имя | | `"calendar"` | CalendarField | имя | -| `"cmdBar"` | CommandBar | имя | +| `"cmdBar"` | CommandBar | имя (синоним: `"commandBar"`) | +| `"autoCmdBar"` | AutoCommandBar формы | имя (синоним: `"autoCommandBar"`) — наполняет главную АКП формы (id=-1), не попадает в `` | | `"popup"` | Popup | имя | ### Общие свойства (все типы элементов) @@ -202,11 +203,37 @@ powershell.exe -NoProfile -File .claude/skills/form-compile/scripts/form-compile ### Командная панель (cmdBar) +Дополнительная пользовательская панель команд, размещается как обычный элемент в layout формы. + | Ключ | Описание | |------|----------| | `autofill: true` | Автозаполнение стандартными командами | | `children: [...]` | Кнопки панели | +### Главная автокомандная панель формы (autoCmdBar) + +Наполняет встроенную AutoCommandBar формы (id=-1) — ту самую верхнюю панель, на которой платформа автоматически размещает «Создать», «Записать», «Провести», «Заполнить» и т.п. По умолчанию `autoCmdBar` НЕ нужно указывать — компилятор сам решит, нужно ли отключать автозаполнение (см. «Эвристики» ниже). Используйте `autoCmdBar`, когда хотите добавить кастомные кнопки в эту главную панель или явно управлять автозаполнением. + +| Ключ | Описание | +|------|----------| +| `autofill: true/false` | Явно включить/выключить автозаполнение стандартными командами | +| `horizontalAlign` | `"Left"` / `"Right"` (по умолчанию `"Right"`) | +| `children: [...]` | Кастомные кнопки/popup, добавляемые в главную панель | + +```json +{ "autoCmdBar": "ФормаКоманднаяПанель", "autofill": true, "children": [ + { "button": "ИзменитьВыделенные", "command": "ИзменитьВыделенные", + "locationInCommandBar": "InAdditionalSubmenu" } +]} +``` + +### Эвристики компилятора (что делается автоматически) + +1. **Автозаполнение главной АКП.** Если в DSL нет ни одного `cmdBar` и нет `autoCmdBar` — главная АКП формы оставляется с автозаполнением `true` (нативное поведение платформы; платформа сама насыпает стандартные команды). Если есть хотя бы один `cmdBar` — автозаполнение выключается, чтобы команды не дублировались. Перекрывается явным `autoCmdBar`. +2. **Главный реквизит выводится по типу.** Если ни у одного реквизита не указан `main: true`, компилятор пробует определить главный по типу: `*Object.*`, `*RecordSet.*`, `DynamicList`, `ConstantsSet`. Ровно один кандидат → проставляется `main: true` молча (с `[INFO]`-логом). Несколько → предупреждение, угадывания нет — нужно указать явно. Чтобы запретить инференс — поставьте `"main": false`. +3. **Динамический список → командная панель таблицы.** Если главный реквизит формы — `DynamicList`, то для `table` с `path`, равным имени этого реквизита, автоматически: `tableAutofill: false` и `commandBarLocation: "None"` (если не заданы явно). Это убирает дублирование команд между главной АКП и панелью таблицы — типовой паттерн форм списков. +4. **Косметика.** `true` не эмитится явно — соответствует поведению Конфигуратора и эталонным формам типовых. + ### Выпадающее меню (popup) | Ключ | Описание | @@ -239,6 +266,7 @@ powershell.exe -NoProfile -File .claude/skills/form-compile/scripts/form-compile ``` - `savedData: true` — сохраняемые данные +- `main: true` — главный реквизит формы. Если не указан ни у одного реквизита, компилятор сам выводит главный по типу: `*Object.*`, `*RecordSet.*`, `DynamicList`, `ConstantsSet`. Ровно один кандидат → проставляется молча. Несколько → нужно указать явно. Чтобы запретить инференс — поставьте `"main": false`. ### Команды (commands) diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index 7b009c08..8b4434de 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.7 — Compile 1C managed form from JSON or object metadata +# form-compile v1.8 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$JsonPath, @@ -1823,6 +1823,17 @@ function Emit-Companion { function Emit-Element { param($el, [string]$indent) + # Silent synonyms: commandBar -> cmdBar, autoCommandBar -> autoCmdBar + # (autoCmdBar inside def.elements is normally extracted in pre-pass; this is a safety net for nested cases) + $synonyms = @{ "commandBar" = "cmdBar"; "autoCommandBar" = "autoCmdBar" } + foreach ($pair in $synonyms.GetEnumerator()) { + if ($null -ne $el.PSObject.Properties[$pair.Key] -and $null -eq $el.PSObject.Properties[$pair.Value]) { + $val = $el.($pair.Key) + $el.PSObject.Properties.Remove($pair.Key) | Out-Null + $el | Add-Member -NotePropertyName $pair.Value -NotePropertyValue $val -Force + } + } + # Determine element type from key $typeKey = $null $xmlTag = $null @@ -2603,6 +2614,163 @@ function Emit-Properties { } } +# --- 11b. Pre-pass: synonyms, main attribute inference, heuristics, autoCmdBar extraction --- + +function Normalize-ElementSynonyms { + param($el) + if ($null -eq $el) { return } + $synonyms = @{ "commandBar" = "cmdBar"; "autoCommandBar" = "autoCmdBar" } + foreach ($pair in $synonyms.GetEnumerator()) { + if ($null -ne $el.PSObject.Properties[$pair.Key] -and $null -eq $el.PSObject.Properties[$pair.Value]) { + $val = $el.($pair.Key) + $el.PSObject.Properties.Remove($pair.Key) | Out-Null + $el | Add-Member -NotePropertyName $pair.Value -NotePropertyValue $val -Force + } + } + if ($el.PSObject.Properties["children"] -and $el.children) { + foreach ($child in $el.children) { Normalize-ElementSynonyms $child } + } + if ($el.PSObject.Properties["columns"] -and $el.columns) { + foreach ($child in $el.columns) { Normalize-ElementSynonyms $child } + } +} + +function HasCmdBarRecursive { + param($el) + if ($null -eq $el) { return $false } + if ($el.PSObject.Properties["cmdBar"] -and $null -ne $el.cmdBar) { return $true } + if ($el.PSObject.Properties["children"] -and $el.children) { + foreach ($child in $el.children) { if (HasCmdBarRecursive $child) { return $true } } + } + if ($el.PSObject.Properties["columns"] -and $el.columns) { + foreach ($child in $el.columns) { if (HasCmdBarRecursive $child) { return $true } } + } + return $false +} + +function ApplyDynamicListTableHeuristic { + param($el, [string]$listName) + if ($null -eq $el) { return } + if ($el.PSObject.Properties["table"] -and $null -ne $el.table -and "$($el.path)" -eq $listName) { + if ($null -eq $el.PSObject.Properties["tableAutofill"]) { + $el | Add-Member -NotePropertyName "tableAutofill" -NotePropertyValue $false -Force + } + if ($null -eq $el.PSObject.Properties["commandBarLocation"]) { + $el | Add-Member -NotePropertyName "commandBarLocation" -NotePropertyValue "None" -Force + } + } + if ($el.PSObject.Properties["children"] -and $el.children) { + foreach ($child in $el.children) { ApplyDynamicListTableHeuristic $child $listName } + } +} + +function Test-IsObjectLikeType { + param([string]$type) + if ([string]::IsNullOrEmpty($type)) { return $false } + if ($type -eq "DynamicList" -or $type -eq "ConstantsSet") { return $true } + $objectSuffixes = @( + "CatalogObject", "DocumentObject", "DataProcessorObject", "ReportObject", + "ExternalDataProcessorObject", "ExternalReportObject", "BusinessProcessObject", + "TaskObject", "ChartOfAccountsObject", "ChartOfCharacteristicTypesObject", + "ChartOfCalculationTypesObject", "ExchangePlanObject" + ) + $recordSetPrefixes = @( + "InformationRegisterRecordSet", "AccumulationRegisterRecordSet", + "AccountingRegisterRecordSet", "CalculationRegisterRecordSet", + "InformationRegisterRecordManager" + ) + foreach ($suffix in $objectSuffixes) { + if ($type -like "$suffix.*") { return $true } + } + foreach ($prefix in $recordSetPrefixes) { + if ($type -like "$prefix.*") { return $true } + } + return $false +} + +# 11b.1: Normalize synonyms recursively +if ($def.elements) { + foreach ($el in $def.elements) { Normalize-ElementSynonyms $el } +} + +# 11b.2: Extract autoCmdBar element from def.elements +$script:mainAcbDef = $null +if ($def.elements) { + $autoBars = @() + $rest = @() + foreach ($el in $def.elements) { + if ($null -ne $el.PSObject.Properties["autoCmdBar"] -and $null -ne $el.autoCmdBar) { + $autoBars += $el + } else { + $rest += $el + } + } + if ($autoBars.Count -gt 1) { + Write-Error "form-compile: more than one autoCmdBar in def.elements (found $($autoBars.Count)); only one allowed." + exit 1 + } + if ($autoBars.Count -eq 1) { + $script:mainAcbDef = $autoBars[0] + # Replace def.elements with the filtered list + $def.PSObject.Properties.Remove("elements") | Out-Null + $def | Add-Member -NotePropertyName "elements" -NotePropertyValue $rest -Force + } +} + +# 11b.3: Infer main attribute (only if no attribute has main:true) +if ($def.attributes) { + $hasExplicitMain = $false + foreach ($attr in $def.attributes) { + if ($attr.main -eq $true) { $hasExplicitMain = $true; break } + } + if (-not $hasExplicitMain) { + $candidates = @() + foreach ($attr in $def.attributes) { + # Skip if user explicitly opted out via main:false + if ($null -ne $attr.PSObject.Properties["main"] -and $attr.main -eq $false) { continue } + if (Test-IsObjectLikeType "$($attr.type)") { + $candidates += $attr + } + } + if ($candidates.Count -eq 1) { + $candidates[0] | Add-Member -NotePropertyName "main" -NotePropertyValue $true -Force + Write-Host "[INFO] Inferred main attribute: $($candidates[0].name) ($($candidates[0].type))" + } elseif ($candidates.Count -gt 1) { + $names = ($candidates | ForEach-Object { $_.name }) -join ", " + Write-Host "[WARN] Multiple main-attribute candidates: $names; specify ""main"": true explicitly" + } + } +} + +# 11b.4: DynamicList → table heuristic +if ($def.attributes -and $def.elements) { + $mainAttr = $null + foreach ($attr in $def.attributes) { + if ($attr.main -eq $true) { $mainAttr = $attr; break } + } + if ($mainAttr -and "$($mainAttr.type)" -eq "DynamicList") { + foreach ($el in $def.elements) { + ApplyDynamicListTableHeuristic $el $mainAttr.name + } + } +} + +# 11b.5: Compute main AutoCommandBar Autofill via heuristic B3 +function Compute-MainAcbAutofill { + if ($script:mainAcbDef) { + if ($null -ne $script:mainAcbDef.PSObject.Properties["autofill"]) { + return [bool]$script:mainAcbDef.autofill + } + return $true + } + if ($def.elements) { + foreach ($el in $def.elements) { + if (HasCmdBarRecursive $el) { return $false } + } + } + return $true +} + # --- 12. Main compilation --- # Title @@ -2656,10 +2824,37 @@ if ($def.excludedCommands -and $def.excludedCommands.Count -gt 0) { } # 12d. AutoCommandBar (always present, id=-1) -X "`t" -X "`t`tRight" -X "`t`tfalse" -X "`t" +$acbAutofill = Compute-MainAcbAutofill +$acbName = "ФормаКоманднаяПанель" +$acbHAlign = "Right" +if ($script:mainAcbDef) { + if ($null -ne $script:mainAcbDef.PSObject.Properties["autoCmdBar"] -and "$($script:mainAcbDef.autoCmdBar)" -ne "") { + $acbName = "$($script:mainAcbDef.autoCmdBar)" + } + if ($null -ne $script:mainAcbDef.PSObject.Properties["name"] -and "$($script:mainAcbDef.name)" -ne "") { + $acbName = "$($script:mainAcbDef.name)" + } + if ($null -ne $script:mainAcbDef.PSObject.Properties["horizontalAlign"] -and "$($script:mainAcbDef.horizontalAlign)" -ne "") { + $acbHAlign = "$($script:mainAcbDef.horizontalAlign)" + } +} +$hasAcbChildren = ($script:mainAcbDef -and $script:mainAcbDef.children -and $script:mainAcbDef.children.Count -gt 0) +$acbHasInner = ($acbHAlign -or (-not $acbAutofill) -or $hasAcbChildren) +if ($acbHasInner) { + X "`t" + if ($acbHAlign) { X "`t`t$acbHAlign" } + if (-not $acbAutofill) { X "`t`tfalse" } + if ($hasAcbChildren) { + X "`t`t" + foreach ($child in $script:mainAcbDef.children) { + Emit-Element -el $child -indent "`t`t`t" + } + X "`t`t" + } + X "`t" +} else { + X "`t" +} # 12e. Events if ($def.events) { diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py index 8ff4085f..09aff403 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.7 — Compile 1C managed form from JSON or object metadata +# form-compile v1.8 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import copy @@ -1602,6 +1602,12 @@ def emit_type(lines, type_str, indent): # --- Element emitters --- def emit_element(lines, el, indent): + # Silent synonyms (safety net; top-level autoCmdBar is normally extracted in pre-pass) + _synonyms = {'commandBar': 'cmdBar', 'autoCommandBar': 'autoCmdBar'} + for src, dst in _synonyms.items(): + if src in el and dst not in el: + el[dst] = el.pop(src) + type_key = None for key in TYPE_KEYS: if el.get(key) is not None: @@ -2536,6 +2542,126 @@ def main(): with open(json_path, 'r', encoding='utf-8-sig') as f: defn = json.load(f) + # --- 1b. Pre-pass: synonyms, main attribute inference, heuristics, autoCmdBar extraction --- + def _normalize_synonyms(el): + if not isinstance(el, dict): + return + synonyms = {'commandBar': 'cmdBar', 'autoCommandBar': 'autoCmdBar'} + for src, dst in synonyms.items(): + if src in el and dst not in el: + el[dst] = el.pop(src) + if isinstance(el.get('children'), list): + for child in el['children']: + _normalize_synonyms(child) + if isinstance(el.get('columns'), list): + for child in el['columns']: + _normalize_synonyms(child) + + def _has_cmd_bar_recursive(el): + if not isinstance(el, dict): + return False + if el.get('cmdBar') is not None: + return True + if isinstance(el.get('children'), list): + for child in el['children']: + if _has_cmd_bar_recursive(child): + return True + if isinstance(el.get('columns'), list): + for child in el['columns']: + if _has_cmd_bar_recursive(child): + return True + return False + + def _apply_dlist_table_heuristic(el, list_name): + if not isinstance(el, dict): + return + if el.get('table') is not None and str(el.get('path', '')) == list_name: + if 'tableAutofill' not in el: + el['tableAutofill'] = False + if 'commandBarLocation' not in el: + el['commandBarLocation'] = 'None' + if isinstance(el.get('children'), list): + for child in el['children']: + _apply_dlist_table_heuristic(child, list_name) + + def _is_object_like_type(t): + if not t: + return False + if t == 'DynamicList' or t == 'ConstantsSet': + return True + object_suffixes = ( + 'CatalogObject', 'DocumentObject', 'DataProcessorObject', 'ReportObject', + 'ExternalDataProcessorObject', 'ExternalReportObject', 'BusinessProcessObject', + 'TaskObject', 'ChartOfAccountsObject', 'ChartOfCharacteristicTypesObject', + 'ChartOfCalculationTypesObject', 'ExchangePlanObject', + ) + record_set_prefixes = ( + 'InformationRegisterRecordSet', 'AccumulationRegisterRecordSet', + 'AccountingRegisterRecordSet', 'CalculationRegisterRecordSet', + 'InformationRegisterRecordManager', + ) + for s in object_suffixes: + if t.startswith(s + '.'): + return True + for s in record_set_prefixes: + if t.startswith(s + '.'): + return True + return False + + # 1b.1: Normalize synonyms recursively + if isinstance(defn.get('elements'), list): + for el in defn['elements']: + _normalize_synonyms(el) + + # 1b.2: Extract autoCmdBar element from defn['elements'] + main_acb_def = None + if isinstance(defn.get('elements'), list): + auto_bars = [el for el in defn['elements'] if isinstance(el, dict) and el.get('autoCmdBar') is not None] + if len(auto_bars) > 1: + print(f"form-compile: more than one autoCmdBar in def.elements (found {len(auto_bars)}); only one allowed.", file=sys.stderr) + sys.exit(1) + if len(auto_bars) == 1: + main_acb_def = auto_bars[0] + defn['elements'] = [el for el in defn['elements'] if el is not main_acb_def] + + # 1b.3: Infer main attribute + if isinstance(defn.get('attributes'), list): + has_explicit_main = any(a.get('main') is True for a in defn['attributes'] if isinstance(a, dict)) + if not has_explicit_main: + candidates = [] + for a in defn['attributes']: + if not isinstance(a, dict): + continue + if 'main' in a and a.get('main') is False: + continue + if _is_object_like_type(str(a.get('type', ''))): + candidates.append(a) + if len(candidates) == 1: + candidates[0]['main'] = True + print(f"[INFO] Inferred main attribute: {candidates[0].get('name')} ({candidates[0].get('type')})") + elif len(candidates) > 1: + names = ', '.join(c.get('name', '') for c in candidates) + print(f"[WARN] Multiple main-attribute candidates: {names}; specify \"main\": true explicitly") + + # 1b.4: DynamicList → table heuristic + if isinstance(defn.get('attributes'), list) and isinstance(defn.get('elements'), list): + main_attr = next((a for a in defn['attributes'] if isinstance(a, dict) and a.get('main') is True), None) + if main_attr and str(main_attr.get('type', '')) == 'DynamicList': + for el in defn['elements']: + _apply_dlist_table_heuristic(el, main_attr.get('name', '')) + + # 1b.5: Compute main AutoCommandBar Autofill (B3) + def _compute_main_acb_autofill(): + if main_acb_def is not None: + if 'autofill' in main_acb_def: + return bool(main_acb_def.get('autofill')) + return True + if isinstance(defn.get('elements'), list): + for el in defn['elements']: + if _has_cmd_bar_recursive(el): + return False + return True + # --- 2. Main compilation --- _next_id = 0 lines = [] @@ -2563,10 +2689,33 @@ def main(): lines.append('\t') # AutoCommandBar (always present, id=-1) - lines.append('\t') - lines.append('\t\tRight') - lines.append('\t\tfalse') - lines.append('\t') + 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' + acb_halign = 'Right' + if main_acb_def is not None: + v = main_acb_def.get('autoCmdBar') + if v: + acb_name = str(v) + if main_acb_def.get('name'): + acb_name = str(main_acb_def['name']) + if main_acb_def.get('horizontalAlign'): + acb_halign = str(main_acb_def['horizontalAlign']) + has_acb_children = bool(main_acb_def and isinstance(main_acb_def.get('children'), list) and len(main_acb_def['children']) > 0) + has_inner = bool(acb_halign) or (not acb_autofill) or has_acb_children + if has_inner: + lines.append(f'\t') + if acb_halign: + lines.append(f'\t\t{acb_halign}') + if not acb_autofill: + lines.append('\t\tfalse') + if has_acb_children: + lines.append('\t\t') + for child in main_acb_def['children']: + emit_element(lines, child, '\t\t\t') + lines.append('\t\t') + lines.append('\t') + else: + lines.append(f'\t') # Events if defn.get('events'): diff --git a/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/AccumulationRegisters/ДенежныеСредства/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/AccumulationRegisters/ДенежныеСредства/Forms/ФормаСписка/Ext/Form.xml index ad3d6db2..89c8e8c4 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/AccumulationRegisters/ДенежныеСредства/Forms/ФормаСписка/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/AccumulationRegisters/ДенежныеСредства/Forms/ФормаСписка/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/accumreg-list-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Catalogs/Валюты/Forms/ФормаЭлемента/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Catalogs/Валюты/Forms/ФормаЭлемента/Ext/Form.xml index 93aa7a06..db4dce28 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Catalogs/Валюты/Forms/ФормаЭлемента/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Catalogs/Валюты/Forms/ФормаЭлемента/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/catalog-item-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Catalogs/Валюты/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Catalogs/Валюты/Forms/ФормаСписка/Ext/Form.xml index a346c3e7..b8fc422e 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Catalogs/Валюты/Forms/ФормаСписка/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Catalogs/Валюты/Forms/ФормаСписка/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false
diff --git a/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/catalog-list-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/ChartsOfCharacteristicTypes/ВидыНоменклатуры/Forms/ФормаЭлемента/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/ChartsOfCharacteristicTypes/ВидыНоменклатуры/Forms/ФормаЭлемента/Ext/Form.xml index 789563e1..a3b9f4c4 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/ChartsOfCharacteristicTypes/ВидыНоменклатуры/Forms/ФормаЭлемента/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/ChartsOfCharacteristicTypes/ВидыНоменклатуры/Forms/ФормаЭлемента/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/ccoct-item-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСчета/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСчета/Ext/Form.xml index 52edbca4..8b40bcdd 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСчета/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСчета/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-item-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСписка/Ext/Form.xml index a09a1031..eddfd5f4 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСписка/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/ChartsOfAccounts/Хозрасчетный/Forms/ФормаСписка/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false
diff --git a/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/chartofaccounts-list-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаДокумента/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаДокумента/Ext/Form.xml index 6a3e6f7c..45d99211 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаДокумента/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаДокумента/Ext/Form.xml @@ -9,7 +9,6 @@ false Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/document-item-medium/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаСписка/Ext/Form.xml index aebd8f55..0c0c0551 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаСписка/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Documents/АктВыполненныхВнутреннихРабот/Forms/ФормаСписка/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false
diff --git a/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/document-list-medium/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/ExchangePlans/ОбменДанными/Forms/ФормаЭлемента/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/ExchangePlans/ОбменДанными/Forms/ФормаЭлемента/Ext/Form.xml index 13e34c1e..1c811e2d 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/ExchangePlans/ОбменДанными/Forms/ФормаЭлемента/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/ExchangePlans/ОбменДанными/Forms/ФормаЭлемента/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/exchangeplan-item-simple/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/InformationRegisters/ЦеныНоменклатуры/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/InformationRegisters/ЦеныНоменклатуры/Forms/ФормаСписка/Ext/Form.xml index 66e02865..1f054bac 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/InformationRegisters/ЦеныНоменклатуры/Forms/ФормаСписка/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-list-periodic/InformationRegisters/ЦеныНоменклатуры/Forms/ФормаСписка/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false
diff --git a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/InformationRegisters/АдресаМагазинов/Forms/ФормаЗаписи/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/InformationRegisters/АдресаМагазинов/Forms/ФормаЗаписи/Ext/Form.xml index 7b0a78d0..2b65de6e 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/InformationRegisters/АдресаМагазинов/Forms/ФормаЗаписи/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-nonperiodic/InformationRegisters/АдресаМагазинов/Forms/ФормаЗаписи/Ext/Form.xml @@ -9,7 +9,6 @@ LockOwnerWindow Right - false diff --git a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/InformationRegisters/КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/InformationRegisters/КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml index cd0e19f2..fa019e68 100644 --- a/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/InformationRegisters/КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml +++ b/tests/skills/cases/form-compile-from-object/snapshots/inforeg-record-periodic/InformationRegisters/КурсыВалют/Forms/ФормаЗаписи/Ext/Form.xml @@ -9,7 +9,6 @@ LockOwnerWindow Right - false diff --git a/tests/skills/cases/form-compile/auto-cmd-bar.json b/tests/skills/cases/form-compile/auto-cmd-bar.json new file mode 100644 index 00000000..f9ec5e3b --- /dev/null +++ b/tests/skills/cases/form-compile/auto-cmd-bar.json @@ -0,0 +1,33 @@ +{ + "name": "autoCmdBar — кастомные кнопки в главной АКП формы с включённым autofill", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Бригады" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "form-add/scripts/form-add", + "args": { "-ObjectPath": "{workDir}/Catalogs/Бригады.xml", "-FormName": "ФормаСписка", "-Purpose": "List" } + } + ], + "params": { "outputPath": "Catalogs/Бригады/Forms/ФормаСписка/Ext/Form.xml" }, + "validatePath": "Catalogs/Бригады/Forms/ФормаСписка/Ext/Form.xml", + "input": { + "title": "Бригады", + "attributes": [ + { "name": "Список", "type": "DynamicList", "main": true, "settings": { "mainTable": "Catalog.Бригады", "dynamicDataRead": true } } + ], + "elements": [ + { "autoCmdBar": "ФормаКоманднаяПанель", "children": [ + { "button": "ИзменитьВыделенные", "command": "ИзменитьВыделенные", "locationInCommandBar": "InAdditionalSubmenu" } + ]}, + { "table": "Список", "path": "Список", "columns": [ + { "input": "Наименование", "path": "Список.Description" } + ]} + ], + "commands": [ + { "name": "ИзменитьВыделенные", "action": "ИзменитьВыделенные" } + ] + } +} diff --git a/tests/skills/cases/form-compile/dynamic-list-form.json b/tests/skills/cases/form-compile/dynamic-list-form.json new file mode 100644 index 00000000..7ada47e1 --- /dev/null +++ b/tests/skills/cases/form-compile/dynamic-list-form.json @@ -0,0 +1,28 @@ +{ + "name": "Форма списка с DynamicList — main выводится, главная АКП без Autofill, таблица с Autofill=false", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Товары", "attributes": [{ "name": "Артикул", "type": "String", "length": 25 }] }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "form-add/scripts/form-add", + "args": { "-ObjectPath": "{workDir}/Catalogs/Товары.xml", "-FormName": "ФормаСписка", "-Purpose": "List" } + } + ], + "params": { "outputPath": "Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml" }, + "validatePath": "Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml", + "input": { + "title": "Товары", + "attributes": [ + { "name": "Список", "type": "DynamicList", "settings": { "mainTable": "Catalog.Товары", "dynamicDataRead": true } } + ], + "elements": [ + { "table": "Список", "path": "Список", "columns": [ + { "input": "Код", "path": "Список.Code" }, + { "input": "Наименование", "path": "Список.Description" } + ]} + ] + } +} diff --git a/tests/skills/cases/form-compile/snapshots/attributes-types/DataProcessors/Типы/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/attributes-types/DataProcessors/Типы/Forms/Форма/Ext/Form.xml index 772b90d8..7b4a14e5 100644 --- a/tests/skills/cases/form-compile/snapshots/attributes-types/DataProcessors/Типы/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/attributes-types/DataProcessors/Типы/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile/snapshots/attributes-types/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/attributes-types/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/attributes-types/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады.xml b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады.xml new file mode 100644 index 00000000..71395fdd --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады.xml @@ -0,0 +1,329 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Бригады + + + ru + Бригады + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + Auto + InDialog + true + BothWays + + Catalog.Бригады.StandardAttribute.Description + Catalog.Бригады.StandardAttribute.Code + + Begin + DontUse + Directly + + + Catalog.Бригады.Form.ФормаСписка + + + + + + + + false + + + Automatic + Use + + + + + + DontUse + Auto + DontUse + false + false + + +
ФормаСписка +
+
+
diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Ext/ObjectModule.bsl b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка.xml b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка.xml new file mode 100644 index 00000000..79ff6a75 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка.xml @@ -0,0 +1,21 @@ + + +
+ + ФормаСписка + + + ru + ФормаСписка + + + + Managed + false + + PlatformApplication + MobilePlatformApplication + + + +
\ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form.xml new file mode 100644 index 00000000..f718911e --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form.xml @@ -0,0 +1,57 @@ + +
+ + <v8:item> + <v8:lang>ru</v8:lang> + <v8:content>Бригады</v8:content> + </v8:item> + + + Right + + + + + +
+ Список + None + + + false + + + + + + + Список.Description + + + + +
+
+ + + + cfg:DynamicList + + true + + Catalog.Бригады + false + true + + + + + + ИзменитьВыделенные + + + diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form/Module.bsl b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form/Module.bsl new file mode 100644 index 00000000..8ead4cec --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Catalogs/Бригады/Forms/ФормаСписка/Ext/Form/Module.bsl @@ -0,0 +1,19 @@ +#Область ОбработчикиСобытийФормы + +#КонецОбласти + +#Область ОбработчикиСобытийЭлементовФормы + +#КонецОбласти + +#Область ОбработчикиКомандФормы + +#КонецОбласти + +#Область ОбработчикиОповещений + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +#КонецОбласти \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Configuration.xml b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Configuration.xml new file mode 100644 index 00000000..381e840a --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + Бригады + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Languages/Русский.xml b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/auto-cmd-bar/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/catalog-form/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/catalog-form/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml index c170746a..81f88937 100644 --- a/tests/skills/cases/form-compile/snapshots/catalog-form/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/catalog-form/Catalogs/Товары/Forms/ФормаЭлемента/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile/snapshots/catalog-form/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/catalog-form/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/catalog-form/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/commands/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/commands/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/commands/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары.xml new file mode 100644 index 00000000..f51c2bff --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары.xml @@ -0,0 +1,373 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + Auto + InDialog + true + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + Catalog.Товары.Form.ФормаСписка + + + + + + + + false + + + Automatic + Use + + + + + + DontUse + Auto + DontUse + false + false + + + + + Артикул + + + ru + Артикул + + + + + xs:string + + 25 + Variable + + + false + + + + false + + false + false + + + false + + DontCheck + Items + + + Auto + Auto + + + Auto + ForItem + DontIndex + Use + Use + + +
ФормаСписка
+
+
+
diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка.xml new file mode 100644 index 00000000..79ff6a75 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка.xml @@ -0,0 +1,21 @@ + + +
+ + ФормаСписка + + + ru + ФормаСписка + + + + Managed + false + + PlatformApplication + MobilePlatformApplication + + +
+
\ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml new file mode 100644 index 00000000..365b7fd5 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form.xml @@ -0,0 +1,50 @@ + +
+ + <v8:item> + <v8:lang>ru</v8:lang> + <v8:content>Товары</v8:content> + </v8:item> + + + Right + + + + Список + None + + + false + + + + + + + Список.Code + + + + + Список.Description + + + + +
+
+ + + + cfg:DynamicList + + true + + Catalog.Товары + false + true + + + +
diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form/Module.bsl b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form/Module.bsl new file mode 100644 index 00000000..8ead4cec --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Catalogs/Товары/Forms/ФормаСписка/Ext/Form/Module.bsl @@ -0,0 +1,19 @@ +#Область ОбработчикиСобытийФормы + +#КонецОбласти + +#Область ОбработчикиСобытийЭлементовФормы + +#КонецОбласти + +#Область ОбработчикиКомандФормы + +#КонецОбласти + +#Область ОбработчикиОповещений + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +#КонецОбласти \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Configuration.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Configuration.xml new file mode 100644 index 00000000..5405b1b5 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Languages/Русский.xml b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/dynamic-list-form/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/events/DataProcessors/События/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/events/DataProcessors/События/Forms/Форма/Ext/Form.xml index e9d2fd6e..bd9e42d7 100644 --- a/tests/skills/cases/form-compile/snapshots/events/DataProcessors/События/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/events/DataProcessors/События/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false ПриСозданииНаСервере diff --git a/tests/skills/cases/form-compile/snapshots/events/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/events/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/events/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/file-dialog/DataProcessors/ЗагрузкаИзФайла/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/file-dialog/DataProcessors/ЗагрузкаИзФайла/Forms/Форма/Ext/Form.xml index a1f7070d..d9aa8c4c 100644 --- a/tests/skills/cases/form-compile/snapshots/file-dialog/DataProcessors/ЗагрузкаИзФайла/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/file-dialog/DataProcessors/ЗагрузкаИзФайла/Forms/Форма/Ext/Form.xml @@ -9,7 +9,6 @@ false Right - false ПриСозданииНаСервере diff --git a/tests/skills/cases/form-compile/snapshots/file-dialog/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/file-dialog/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/file-dialog/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/groups/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/groups/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/groups/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml index d0cc3653..1b939b04 100644 --- a/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/input-fields/DataProcessors/ПоляВвода/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile/snapshots/input-fields/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/input-fields/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/input-fields/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/minimal/DataProcessors/Минимальная/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/minimal/DataProcessors/Минимальная/Forms/Форма/Ext/Form.xml index d37dcb0d..d69b6a67 100644 --- a/tests/skills/cases/form-compile/snapshots/minimal/DataProcessors/Минимальная/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/minimal/DataProcessors/Минимальная/Forms/Форма/Ext/Form.xml @@ -8,6 +8,5 @@ Right - false diff --git a/tests/skills/cases/form-compile/snapshots/minimal/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/minimal/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/minimal/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml index b826493d..87a37948 100644 --- a/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml @@ -9,7 +9,6 @@ false Right - false diff --git a/tests/skills/cases/form-compile/snapshots/pages/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/pages/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/pages/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/Configuration.xml b/tests/skills/cases/form-compile/snapshots/synonyms/Configuration.xml new file mode 100644 index 00000000..f8405b07 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + Тест + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест.xml b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест.xml new file mode 100644 index 00000000..0a165f6a --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест.xml @@ -0,0 +1,34 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + + Тест + + + ru + Тест + + + + false + DataProcessor.Тест.Form.Форма + + false + + + + +
Форма
+
+
+
diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Ext/ManagerModule.bsl b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Ext/ManagerModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Ext/ObjectModule.bsl b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма.xml b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма.xml new file mode 100644 index 00000000..dffeea01 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма.xml @@ -0,0 +1,22 @@ + + +
+ + Форма + + + ru + Форма + + + + Managed + false + + PlatformApplication + MobilePlatformApplication + + + +
+
\ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form.xml new file mode 100644 index 00000000..4867cb13 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form.xml @@ -0,0 +1,58 @@ + +
+ + <v8:item> + <v8:lang>ru</v8:lang> + <v8:content>Тест синонимов</v8:content> + </v8:item> + + + Right + + + + + + + Поле + + + + + + + + + + + + + cfg:DataProcessorObject.Тест + + true + + + + xs:string + + 50 + Variable + + + + + + + Кн1 + + + Кн2 + + +
diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form/Module.bsl b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form/Module.bsl new file mode 100644 index 00000000..8ead4cec --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/DataProcessors/Тест/Forms/Форма/Ext/Form/Module.bsl @@ -0,0 +1,19 @@ +#Область ОбработчикиСобытийФормы + +#КонецОбласти + +#Область ОбработчикиСобытийЭлементовФормы + +#КонецОбласти + +#Область ОбработчикиКомандФормы + +#КонецОбласти + +#Область ОбработчикиОповещений + +#КонецОбласти + +#Область СлужебныеПроцедурыИФункции + +#КонецОбласти \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/synonyms/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/synonyms/Languages/Русский.xml b/tests/skills/cases/form-compile/snapshots/synonyms/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/synonyms/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/snapshots/table/DataProcessors/Таблица/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/table/DataProcessors/Таблица/Forms/Форма/Ext/Form.xml index 8cffd9b3..c82c5a3c 100644 --- a/tests/skills/cases/form-compile/snapshots/table/DataProcessors/Таблица/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/table/DataProcessors/Таблица/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-compile/snapshots/table/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-compile/snapshots/table/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-compile/snapshots/table/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-compile/synonyms.json b/tests/skills/cases/form-compile/synonyms.json new file mode 100644 index 00000000..9cc7c469 --- /dev/null +++ b/tests/skills/cases/form-compile/synonyms.json @@ -0,0 +1,36 @@ +{ + "name": "Синонимы commandBar/autoCommandBar нормализуются молча", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "DataProcessor", "name": "Тест" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "form-add/scripts/form-add", + "args": { "-ObjectPath": "{workDir}/DataProcessors/Тест.xml", "-FormName": "Форма" } + } + ], + "params": { "outputPath": "DataProcessors/Тест/Forms/Форма/Ext/Form.xml" }, + "validatePath": "DataProcessors/Тест/Forms/Форма/Ext/Form.xml", + "input": { + "title": "Тест синонимов", + "attributes": [ + { "name": "Объект", "type": "DataProcessorObject.Тест", "main": true }, + { "name": "Поле", "type": "string(50)" } + ], + "elements": [ + { "autoCommandBar": "ФормаКоманднаяПанель", "children": [ + { "button": "Кн1", "command": "Кн1" } + ]}, + { "input": "Поле", "path": "Поле" }, + { "commandBar": "ДопПанель", "children": [ + { "button": "Кн2", "command": "Кн2" } + ]} + ], + "commands": [ + { "name": "Кн1", "action": "Кн1" }, + { "name": "Кн2", "action": "Кн2" } + ] + } +} diff --git a/tests/skills/cases/form-edit/snapshots/add-attribute/DataProcessors/Реквизиты/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-edit/snapshots/add-attribute/DataProcessors/Реквизиты/Forms/Форма/Ext/Form.xml index 27422818..f83643fb 100644 --- a/tests/skills/cases/form-edit/snapshots/add-attribute/DataProcessors/Реквизиты/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-edit/snapshots/add-attribute/DataProcessors/Реквизиты/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-edit/snapshots/add-attribute/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-edit/snapshots/add-attribute/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-edit/snapshots/add-attribute/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-edit/snapshots/add-command/DataProcessors/КомандыТест/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-edit/snapshots/add-command/DataProcessors/КомандыТест/Forms/Форма/Ext/Form.xml index 211cf302..fa5a4883 100644 --- a/tests/skills/cases/form-edit/snapshots/add-command/DataProcessors/КомандыТест/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-edit/snapshots/add-command/DataProcessors/КомандыТест/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false
diff --git a/tests/skills/cases/form-validate/snapshots/table-form/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-validate/snapshots/table-form/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-validate/snapshots/table-form/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/form-validate/snapshots/valid-form/Catalogs/Товары/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-validate/snapshots/valid-form/Catalogs/Товары/Forms/Форма/Ext/Form.xml index 2472f091..81ed6fa9 100644 --- a/tests/skills/cases/form-validate/snapshots/valid-form/Catalogs/Товары/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-validate/snapshots/valid-form/Catalogs/Товары/Forms/Форма/Ext/Form.xml @@ -8,7 +8,6 @@ Right - false diff --git a/tests/skills/cases/form-validate/snapshots/valid-form/Ext/ClientApplicationInterface.xml b/tests/skills/cases/form-validate/snapshots/valid-form/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/form-validate/snapshots/valid-form/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file