mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-10 08:04:56 +03:00
fix(skd-decompile): сворачивать дефолтные auto selection/order группы в shorthand
После 6781bb3 компилятор кладёт в каждую группу структуры авто-поле выбора и
авто-порядок (SelectedItemAuto/OrderItemAuto), как делает платформа. decompile
сохранял их как selection:["Auto"]/order:["Auto"], из-за чего Try-StructureShorthand
не сворачивал цепочку и выдавал громоздкую объектную модель вместо строки
"A > B > details".
Теперь selection/order, состоящие ровно из одного "Auto" (предикат Is-AutoOnly /
is_auto_only), считаются дефолтом и не мешают свёртке. Round-trip снова bit-perfect:
shorthand перекомпилируется в идентичный XML (Parse-StructureShorthand сам добавляет
эти auto-поля). Отключённый auto ({auto,use}), смешанные списки и явные поля свёртку
не проходят и остаются в объектной форме.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,5 +9,5 @@
|
||||
"СлужебныйПар: string @hidden",
|
||||
{ "name": "ПорядокОкругления", "type": "EnumRef.Округления", "value": "Перечисление.Округления.Окр1", "availableValues": [{ "value": "Перечисление.Округления.Окр1_00", "presentation": "руб. коп" }, { "value": "Перечисление.Округления.Окр1", "presentation": "руб." }] }
|
||||
],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }]
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
{ "dataSets": [{ "name": "ПродажиПоПериодам", "query": "@decompiled-ПродажиПоПериодам.sql", "fields": ["Номенклатура: CatalogRef.Номенклатура @dimension", "Количество: decimal(15,3)", "Сумма: decimal(15,2)"] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }] }
|
||||
{ "dataSets": [{ "name": "ПродажиПоПериодам", "query": "@decompiled-ПродажиПоПериодам.sql", "fields": ["Номенклатура: CatalogRef.Номенклатура @dimension", "Количество: decimal(15,3)", "Сумма: decimal(15,2)"] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }] }
|
||||
@@ -4,5 +4,5 @@
|
||||
{ "name": "Журнал", "objectName": "ЖурналОшибок", "fields": ["Сообщение: string(150)", "Уровень: string"] },
|
||||
{ "name": "Объединение", "items": [{ "name": "Часть1", "query": "ВЫБРАТЬ 1 КАК Поле", "fields": ["Поле: decimal(10,2)"] }, { "name": "Часть2", "query": "ВЫБРАТЬ 2 КАК Поле", "fields": ["Поле: decimal(10,2)"] }] }
|
||||
],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }]
|
||||
}
|
||||
@@ -10,5 +10,5 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }]
|
||||
}
|
||||
@@ -1,4 +1 @@
|
||||
{
|
||||
"dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.ВидыРасчета", "fields": [{ "field": "ВидРасчета", "type": "CatalogRef.ВидыРасчета", "orderExpression": { "expression": "ЕстьNULL(ВидРасчета.Порядок, 10000)", "orderType": "Asc", "autoOrder": false } }] }],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
}
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.ВидыРасчета", "fields": [{ "field": "ВидРасчета", "type": "CatalogRef.ВидыРасчета", "orderExpression": { "expression": "ЕстьNULL(ВидРасчета.Порядок, 10000)", "orderType": "Asc", "autoOrder": false } }] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }] }
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ РегистрНакопления.Остатки", "fields": ["Период: date @period", "Контрагент: CatalogRef.Контрагенты @dimension @required", "СуммаНач: decimal(15,2) @balance balanceGroupName=Сумма balanceType=OpeningBalance", "СуммаКон: decimal(15,2) @balance balanceGroupName=Сумма balanceType=ClosingBalance"] }],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }]
|
||||
}
|
||||
+1
-1
@@ -18,5 +18,5 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }]
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
{ "dataSets": [{ "name": "НаборДанных1", "query": "ВЫБРАТЬ Номенклатура.Наименование КАК Наименование ИЗ Справочник.Номенклатура КАК Номенклатура", "fields": ["Наименование"] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }] }
|
||||
{ "dataSets": [{ "name": "НаборДанных1", "query": "ВЫБРАТЬ Номенклатура.Наименование КАК Наименование ИЗ Справочник.Номенклатура КАК Номенклатура", "fields": ["Наименование"] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }] }
|
||||
@@ -1 +1 @@
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.Сотрудники", "fields": ["Поле: string"] }], "templates": [{ "name": "Заголовок", "style": "myHeader", "rows": [["A"]] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }] }
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.Сотрудники", "fields": ["Поле: string"] }], "templates": [{ "name": "Заголовок", "style": "myHeader", "rows": [["A"]] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }] }
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.Сотрудники", "fields": ["Поле: string"] }], "templates": [{ "name": "СмешанныйМакет", "style": "data", "rows": [["A", { "value": "B", "style": "header" }, "C"]] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }] }
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.Сотрудники", "fields": ["Поле: string"] }], "templates": [{ "name": "СмешанныйМакет", "style": "data", "rows": [["A", { "value": "B", "style": "header" }, "C"]] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }] }
|
||||
@@ -1 +1 @@
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.Сотрудники", "fields": ["Поле1: string", "Поле2: string"] }], "templates": [{ "name": "БезСтиля", "style": "none", "widths": ["7", "7"], "rows": [["A", "B"]] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }] }
|
||||
{ "dataSets": [{ "name": "Тест", "query": "ВЫБРАТЬ * ИЗ Справочник.Сотрудники", "fields": ["Поле1: string", "Поле2: string"] }], "templates": [{ "name": "БезСтиля", "style": "none", "widths": ["7", "7"], "rows": [["A", "B"]] }], "settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }] }
|
||||
+1
-1
@@ -4,5 +4,5 @@
|
||||
{ "name": "Шапка", "style": "header", "widths": ["20", "30", "25", "25"], "rows": [["Имя", "Сумма", "Поступление", ">"], ["|", "|", "из произв.", "со сч.40"], ["К1", "К2", "К3", "К4"]] },
|
||||
{ "name": "Данные", "style": "data", "widths": ["20", "30", "25", "25"], "rows": [["{Имя}", "{Сумма}", "{Поступление}", "{СчетПрочее}"]], "parameters": [{ "name": "Имя", "expression": "Имя" }, { "name": "Сумма", "expression": "Сумма" }, { "name": "Поступление", "expression": "СуммаПоступления", "drilldown": "СуммаПоступления" }, { "name": "СчетПрочее", "expression": "СчетПрочее" }] }
|
||||
],
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": [{ "selection": ["Auto"], "order": ["Auto"] }] } }]
|
||||
"settingsVariants": [{ "name": "Основной", "settings": { "selection": ["Auto"], "structure": "details" } }]
|
||||
}
|
||||
Reference in New Issue
Block a user