mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-14 06:45:17 +03:00
feat(meta-compile,meta-decompile): поддержка типа ChartOfCharacteristicTypes (ПВХ) (v1.35/v0.24)
Третий тип после Catalog/ExchangePlan. Декомпилятор расширен на ПВХ. Компилятор
Emit-ChartOfCharacteristicTypesProperties переписан на общие хелперы в каноническом
порядке; новое — блок Type (тип значения характеристики, составной) и
CharacteristicExtValues; иерархия папки+элементы. StandardAttributes-профиль ПВХ
(Наименование=ShowError, Родитель=FFV=true), блок условный.
Крупная новая фича — предопределённые виды несут ТИП НА ЭЛЕМЕНТ: ключ `type` в
объектной форме predefined (строка/массив; '' → пустой <Type/>). Root-элемент
PlanOfCharacteristicKindPredefinedItems.
Общие фиксы (не только ПВХ):
• Get-TypeShorthand ищет квалификаторы String/Number/Date по всему typeNode —
составной тип значения группирует квалификаторы в конце, не сразу за типом.
• Expand-DataPath гард [:/]: спец-путь 0:GUID/0:GUID (зависимости ПВХ) не разворачивается.
• Контекст реквизита ПВХ = catalog (у него полные Use/FillFromFillingValue/DataHistory).
• TabularSection Use, GeneratedType Characteristic-префикс, CodeSeries +WholeCharacteristicKind.
Роундтрип 24 ПВХ: match 0→16, TOTAL 4929→52 (−99%). Остаток (8) — принятые хвосты
(FillValue-пробелы, TS-LineNumber-опущение). Catalog/EP не регрессировали
(108/120, 39/42). Регресс 47/47 ps1+py, ps1↔py identical (6/6 ПВХ). spec §7.2b,
кейс chart-of-characteristic-types (+valueType/predefined-with-type/standardAttributes).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,15 @@
|
||||
"type": "ChartOfCharacteristicTypes",
|
||||
"name": "ДополнительныеРеквизитыИСведения",
|
||||
"descriptionLength": 100,
|
||||
"hierarchical": true,
|
||||
"valueTypes": ["String(200)", "Number(15,2)", "Boolean", "Date"],
|
||||
"attributes": ["НаборСвойств: String(100)"]
|
||||
"standardAttributes": { "Description": { "synonym": "Свойство" } },
|
||||
"attributes": ["НаборСвойств: String(100)"],
|
||||
"predefined": [
|
||||
{ "name": "Цвет", "code": "000001", "type": "CatalogRef.ЗначенияСвойств" },
|
||||
{ "name": "Размер", "code": "000002", "type": "String(50) + Number(3,0)" },
|
||||
{ "name": "Группа", "code": "000003", "isFolder": true, "type": "" }
|
||||
]
|
||||
},
|
||||
"validatePath": "ChartsOfCharacteristicTypes/ДополнительныеРеквизитыИСведения",
|
||||
"expect": {
|
||||
|
||||
+26
-16
@@ -18,7 +18,7 @@
|
||||
<xr:TypeId>UUID-008</xr:TypeId>
|
||||
<xr:ValueId>UUID-009</xr:ValueId>
|
||||
</xr:GeneratedType>
|
||||
<xr:GeneratedType name="ChartOfCharacteristicTypesCharacteristic.ДополнительныеРеквизитыИСведения" category="Characteristic">
|
||||
<xr:GeneratedType name="Characteristic.ДополнительныеРеквизитыИСведения" category="Characteristic">
|
||||
<xr:TypeId>UUID-010</xr:TypeId>
|
||||
<xr:ValueId>UUID-011</xr:ValueId>
|
||||
</xr:GeneratedType>
|
||||
@@ -37,12 +37,7 @@
|
||||
</Synonym>
|
||||
<Comment/>
|
||||
<UseStandardCommands>true</UseStandardCommands>
|
||||
<CodeLength>9</CodeLength>
|
||||
<CodeAllowedLength>Variable</CodeAllowedLength>
|
||||
<DescriptionLength>100</DescriptionLength>
|
||||
<CheckUnique>false</CheckUnique>
|
||||
<Autonumbering>true</Autonumbering>
|
||||
<DefaultPresentation>AsDescription</DefaultPresentation>
|
||||
<IncludeHelpInContents>false</IncludeHelpInContents>
|
||||
<CharacteristicExtValues/>
|
||||
<Type>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
@@ -62,8 +57,15 @@
|
||||
<v8:DateFractions>Date</v8:DateFractions>
|
||||
</v8:DateQualifiers>
|
||||
</Type>
|
||||
<Hierarchical>false</Hierarchical>
|
||||
<Hierarchical>true</Hierarchical>
|
||||
<FoldersOnTop>true</FoldersOnTop>
|
||||
<CodeLength>9</CodeLength>
|
||||
<CodeAllowedLength>Variable</CodeAllowedLength>
|
||||
<DescriptionLength>100</DescriptionLength>
|
||||
<CodeSeries>WholeCharacteristicKind</CodeSeries>
|
||||
<CheckUnique>true</CheckUnique>
|
||||
<Autonumbering>true</Autonumbering>
|
||||
<DefaultPresentation>AsDescription</DefaultPresentation>
|
||||
<StandardAttributes>
|
||||
<xr:StandardAttribute name="PredefinedDataName">
|
||||
<xr:LinkByType/>
|
||||
@@ -171,7 +173,7 @@
|
||||
</xr:StandardAttribute>
|
||||
<xr:StandardAttribute name="Description">
|
||||
<xr:LinkByType/>
|
||||
<xr:FillChecking>DontCheck</xr:FillChecking>
|
||||
<xr:FillChecking>ShowError</xr:FillChecking>
|
||||
<xr:MultiLine>false</xr:MultiLine>
|
||||
<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
|
||||
<xr:CreateOnInput>Auto</xr:CreateOnInput>
|
||||
@@ -187,7 +189,12 @@
|
||||
<xr:DataHistory>Use</xr:DataHistory>
|
||||
<xr:MarkNegatives>false</xr:MarkNegatives>
|
||||
<xr:MinValue xsi:nil="true"/>
|
||||
<xr:Synonym/>
|
||||
<xr:Synonym>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Свойство</v8:content>
|
||||
</v8:item>
|
||||
</xr:Synonym>
|
||||
<xr:Comment/>
|
||||
<xr:FullTextSearch>Use</xr:FullTextSearch>
|
||||
<xr:ChoiceParameterLinks/>
|
||||
@@ -225,7 +232,7 @@
|
||||
<xr:LinkByType/>
|
||||
<xr:FillChecking>DontCheck</xr:FillChecking>
|
||||
<xr:MultiLine>false</xr:MultiLine>
|
||||
<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
|
||||
<xr:FillFromFillingValue>true</xr:FillFromFillingValue>
|
||||
<xr:CreateOnInput>Auto</xr:CreateOnInput>
|
||||
<xr:MaxValue xsi:nil="true"/>
|
||||
<xr:ToolTip/>
|
||||
@@ -283,9 +290,11 @@
|
||||
<xr:Field>ChartOfCharacteristicTypes.ДополнительныеРеквизитыИСведения.StandardAttribute.Description</xr:Field>
|
||||
<xr:Field>ChartOfCharacteristicTypes.ДополнительныеРеквизитыИСведения.StandardAttribute.Code</xr:Field>
|
||||
</InputByString>
|
||||
<CreateOnInput>DontUse</CreateOnInput>
|
||||
<SearchStringModeOnInputByString>Begin</SearchStringModeOnInputByString>
|
||||
<FullTextSearchOnInputByString>DontUse</FullTextSearchOnInputByString>
|
||||
<ChoiceDataGetModeOnInputByString>Directly</ChoiceDataGetModeOnInputByString>
|
||||
<FullTextSearchOnInputByString>DontUse</FullTextSearchOnInputByString>
|
||||
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
|
||||
<DefaultObjectForm/>
|
||||
<DefaultFolderForm/>
|
||||
<DefaultListForm/>
|
||||
@@ -296,18 +305,15 @@
|
||||
<AuxiliaryListForm/>
|
||||
<AuxiliaryChoiceForm/>
|
||||
<AuxiliaryFolderChoiceForm/>
|
||||
<IncludeHelpInContents>false</IncludeHelpInContents>
|
||||
<BasedOn/>
|
||||
<DataLockFields/>
|
||||
<DataLockControlMode>Automatic</DataLockControlMode>
|
||||
<DataLockControlMode>Managed</DataLockControlMode>
|
||||
<FullTextSearch>Use</FullTextSearch>
|
||||
<ObjectPresentation/>
|
||||
<ExtendedObjectPresentation/>
|
||||
<ListPresentation/>
|
||||
<ExtendedListPresentation/>
|
||||
<Explanation/>
|
||||
<CreateOnInput>DontUse</CreateOnInput>
|
||||
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
|
||||
<DataHistory>DontUse</DataHistory>
|
||||
<UpdateDataHistoryImmediatelyAfterWrite>false</UpdateDataHistoryImmediatelyAfterWrite>
|
||||
<ExecuteAfterWriteDataHistoryVersionProcessing>false</ExecuteAfterWriteDataHistoryVersionProcessing>
|
||||
@@ -340,6 +346,8 @@
|
||||
<ExtendedEdit>false</ExtendedEdit>
|
||||
<MinValue xsi:nil="true"/>
|
||||
<MaxValue xsi:nil="true"/>
|
||||
<FillFromFillingValue>false</FillFromFillingValue>
|
||||
<FillValue xsi:type="xs:string"/>
|
||||
<FillChecking>DontCheck</FillChecking>
|
||||
<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
|
||||
<ChoiceParameterLinks/>
|
||||
@@ -349,8 +357,10 @@
|
||||
<ChoiceForm/>
|
||||
<LinkByType/>
|
||||
<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
|
||||
<Use>ForItem</Use>
|
||||
<Indexing>DontIndex</Indexing>
|
||||
<FullTextSearch>Use</FullTextSearch>
|
||||
<DataHistory>Use</DataHistory>
|
||||
</Properties>
|
||||
</Attribute>
|
||||
</ChildObjects>
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PredefinedData xmlns="http://v8.1c.ru/8.3/xcf/predef" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PlanOfCharacteristicKindPredefinedItems" version="2.17">
|
||||
<Item id="UUID-001">
|
||||
<Name>Цвет</Name>
|
||||
<Code>000001</Code>
|
||||
<Description>Цвет</Description>
|
||||
<Type>
|
||||
<v8:Type xmlns:d5p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d5p1:CatalogRef.ЗначенияСвойств</v8:Type>
|
||||
</Type>
|
||||
<IsFolder>false</IsFolder>
|
||||
</Item>
|
||||
<Item id="UUID-002">
|
||||
<Name>Размер</Name>
|
||||
<Code>000002</Code>
|
||||
<Description>Размер</Description>
|
||||
<Type>
|
||||
<v8:Type>xs:string</v8:Type>
|
||||
<v8:StringQualifiers>
|
||||
<v8:Length>50</v8:Length>
|
||||
<v8:AllowedLength>Variable</v8:AllowedLength>
|
||||
</v8:StringQualifiers>
|
||||
<v8:Type>xs:decimal</v8:Type>
|
||||
<v8:NumberQualifiers>
|
||||
<v8:Digits>3</v8:Digits>
|
||||
<v8:FractionDigits>0</v8:FractionDigits>
|
||||
<v8:AllowedSign>Any</v8:AllowedSign>
|
||||
</v8:NumberQualifiers>
|
||||
</Type>
|
||||
<IsFolder>false</IsFolder>
|
||||
</Item>
|
||||
<Item id="UUID-003">
|
||||
<Name>Группа</Name>
|
||||
<Code>000003</Code>
|
||||
<Description>Группа</Description>
|
||||
<Type/>
|
||||
<IsFolder>true</IsFolder>
|
||||
</Item>
|
||||
</PredefinedData>
|
||||
Reference in New Issue
Block a user