mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-13 17:34:57 +03:00
6c60398406
Кнопки внутри cmdBar/autoCmdBar/popup автоматически получают CommandBarButton (или CommandBarHyperlink при type="hyperlink") — указывать вид вручную не нужно. Резолвер прощающий: принимает и короткие DSL-формы, и XML-имена в любом контексте. Пример «Диалог загрузки файла» в SKILL.md и тест-кейс file-dialog переведены на нативный паттерн с autoCmdBar вместо отдельной горизонтальной группы кнопок внизу формы. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
2.1 KiB
JSON
42 lines
2.1 KiB
JSON
{
|
|
"name": "Диалог загрузки файла (паттерн из SKILL.md)",
|
|
"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": "Загрузка из файла",
|
|
"properties": { "autoTitle": false },
|
|
"events": { "OnCreateAtServer": "ПриСозданииНаСервере" },
|
|
"elements": [
|
|
{ "group": "horizontal", "name": "ГруппаФайл", "children": [
|
|
{ "input": "ИмяФайла", "path": "ИмяФайла", "title": "Файл", "inputHint": "Выберите файл...", "choiceButton": true, "on": ["StartChoice"] },
|
|
{ "check": "ПерваяСтрокаЗаголовок", "path": "ПерваяСтрокаЗаголовок" }
|
|
]},
|
|
{ "input": "Результат", "path": "Результат", "multiLine": true, "height": 8, "readOnly": true, "title": "Лог" },
|
|
{ "autoCmdBar": "ФормаКоманднаяПанель", "children": [
|
|
{ "button": "Загрузить", "command": "Загрузить", "defaultButton": true },
|
|
{ "button": "Закрыть", "stdCommand": "Close" }
|
|
]}
|
|
],
|
|
"attributes": [
|
|
{ "name": "Объект", "type": "DataProcessorObject.ЗагрузкаИзФайла", "main": true },
|
|
{ "name": "ИмяФайла", "type": "string" },
|
|
{ "name": "ПерваяСтрокаЗаголовок", "type": "boolean" },
|
|
{ "name": "Результат", "type": "string" }
|
|
],
|
|
"commands": [
|
|
{ "name": "Загрузить", "action": "ЗагрузитьОбработка", "shortcut": "Ctrl+Enter" }
|
|
]
|
|
}
|
|
}
|