diff --git a/.claude/skills/meta-compile/scripts/meta-compile.ps1 b/.claude/skills/meta-compile/scripts/meta-compile.ps1
index 19145e8c..1fff40a8 100644
--- a/.claude/skills/meta-compile/scripts/meta-compile.ps1
+++ b/.claude/skills/meta-compile/scripts/meta-compile.ps1
@@ -1,4 +1,4 @@
-# meta-compile v1.40 — Compile 1C metadata object from JSON
+# meta-compile v1.41 — Compile 1C metadata object from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[Parameter(Mandatory)]
@@ -1022,7 +1022,7 @@ $script:standardAttributesByType = @{
"CalculationRegister" = @("Active","Recorder","LineNumber","RegistrationPeriod","CalculationType","ReversingEntry")
"ChartOfAccounts" = @("PredefinedDataName","Order","OffBalance","Type","Description","Code","Parent","Predefined","DeletionMark","Ref")
"ChartOfCharacteristicTypes" = @("PredefinedDataName","Predefined","Ref","DeletionMark","Description","Code","Parent","ValueType")
- "ChartOfCalculationTypes" = @("PredefinedDataName","Predefined","Ref","DeletionMark","Description","Code","ActionPeriodIsBasic")
+ "ChartOfCalculationTypes" = @("PredefinedDataName","Predefined","Ref","DeletionMark","ActionPeriodIsBasic","Description","Code")
"BusinessProcess" = @("Ref","DeletionMark","Date","Number","Started","Completed","HeadTask")
"Task" = @("Ref","DeletionMark","Date","Number","Executed","Description","RoutePoint","BusinessProcess")
"ExchangePlan" = @("Ref","DeletionMark","Code","Description","ThisNode","SentNo","ReceivedNo")
@@ -1056,6 +1056,10 @@ $script:stdAttrProfile = @{
"Code" = @{ FillChecking = "ShowError" }
"Parent" = @{ FillFromFillingValue = "true" }
}
+ # ChartOfCalculationTypes: Наименование → FillChecking=ShowError (Код здесь DontCheck).
+ "ChartOfCalculationTypes" = @{
+ "Description" = @{ FillChecking = "ShowError" }
+ }
}
# $ov — hashtable переопределений (профиль + DSL) для полей: FillChecking, FillFromFillingValue,
@@ -1116,7 +1120,7 @@ function Emit-StandardAttribute {
# Прочие типы (не в множестве) → блок эмитится всегда (текущее поведение, пока их правило не выведено).
# - stdAttrProfile[тип]: профиль материализованного блока (пусто = schema-дефолт), поверх — DSL-override.
# Миграция типа = добавить его в stdAttrConditionalTypes + stdAttrProfile и переснять снэпшоты; КОД НЕ ТРОГАЕМ.
-$script:stdAttrConditionalTypes = @('Catalog', 'ExchangePlan', 'ChartOfCharacteristicTypes', 'ChartOfAccounts')
+$script:stdAttrConditionalTypes = @('Catalog', 'ExchangePlan', 'ChartOfCharacteristicTypes', 'ChartOfAccounts', 'ChartOfCalculationTypes')
function Emit-StandardAttributes {
param([string]$indent, [string]$objectType)
$attrs = $script:standardAttributesByType[$objectType]
@@ -2888,82 +2892,115 @@ function Emit-AccountingRegisterProperties {
X "$i"
}
+# Стандартные ТЧ Плана видов расчёта: Ведущие/Вытесняющие/Базовые виды расчёта. Обёртка платформенно-константна
+# (Synonym с пустым lang, Comment/ToolTip/FillChecking); вложены Predefined/CalculationType(ShowError)/LineNumber.
+$script:calcTypesStdTabular = @(
+ @{ name = "LeadingCalculationTypes"; synonym = "Ведущие виды расчета" }
+ @{ name = "DisplacingCalculationTypes"; synonym = "Вытесняющие виды расчета" }
+ @{ name = "BaseCalculationTypes"; synonym = "Базовые виды расчета" }
+)
+function Emit-CalcTypesStdTabular {
+ param([string]$i)
+ X "$i"
+ foreach ($sts in $script:calcTypesStdTabular) {
+ X "$i`t"
+ X "$i`t`t"
+ X "$i`t`t`t"
+ X "$i`t`t`t`t"
+ X "$i`t`t`t`t$(Esc-XmlText $sts.synonym)"
+ X "$i`t`t`t"
+ X "$i`t`t"
+ X "$i`t`t"
+ X "$i`t`t"
+ X "$i`t`tDontCheck"
+ X "$i`t`t"
+ foreach ($stAttr in @("Predefined","CalculationType","LineNumber")) {
+ $stOv = if ($stAttr -eq "CalculationType") { @{ FillChecking = "ShowError" } } else { $null }
+ Emit-StandardAttribute "$i`t`t`t" $stAttr $stOv
+ }
+ X "$i`t`t"
+ X "$i`t"
+ }
+ X "$i"
+}
+
function Emit-ChartOfCalculationTypesProperties {
param([string]$indent)
$i = $indent
X "$i$(Esc-Xml $objName)"
Emit-MLText $i "Synonym" $synonym
- X "$i"
- X "$itrue"
-
- $codeLength = if ($null -ne $def.codeLength) { "$($def.codeLength)" } else { "9" }
- $descriptionLength = if ($null -ne $def.descriptionLength) { "$($def.descriptionLength)" } else { "25" }
- $codeType = Get-EnumProp "CodeType" "codeType" "String"
- $codeAllowedLength = Get-EnumProp "CodeAllowedLength" "codeAllowedLength" "Variable"
+ if ($def.comment) { X "$i$(Esc-XmlText "$($def.comment)")" } else { X "$i" }
+ $useStdCmd = if (Get-BoolProp "useStandardCommands" $true) { "true" } else { "false" }
+ X "$i$useStdCmd"
+ $codeLength = if ($null -ne $def.codeLength) { "$($def.codeLength)" } else { "5" }
+ $descriptionLength = if ($null -ne $def.descriptionLength) { "$($def.descriptionLength)" } else { "100" }
X "$i$codeLength"
- X "$i$codeType"
- X "$i$codeAllowedLength"
X "$i$descriptionLength"
- X "$iAsDescription"
+ X "$i$(Get-EnumProp 'CodeType' 'codeType' 'String')"
+ X "$i$(Get-EnumProp 'CodeAllowedLength' 'codeAllowedLength' 'Variable')"
+ X "$i$(Get-EnumProp 'DefaultPresentation' 'defaultPresentation' 'AsDescription')"
+ X "$i$(Get-EnumProp 'EditType' 'editType' 'InDialog')"
+ $quickChoice = if ($def.quickChoice -eq $true) { "true" } else { "false" }
+ X "$i$quickChoice"
+ X "$i$(Get-EnumProp 'ChoiceMode' 'choiceMode' 'BothWays')"
- $dependence = Get-EnumProp "DependenceOnCalculationTypes" "dependenceOnCalculationTypes" "DontUse"
- X "$i$dependence"
+ # InputByString: override ЛИБО дефолт [Descr при D>0]+[Code при C>0].
+ if (Test-DefKey 'inputByString') {
+ $ibFields = @($def.inputByString | ForEach-Object { Expand-DataPath "$_" })
+ } else {
+ $ibFields = @()
+ if ([int]$descriptionLength -gt 0) { $ibFields += "ChartOfCalculationTypes.$objName.StandardAttribute.Description" }
+ if ([int]$codeLength -gt 0) { $ibFields += "ChartOfCalculationTypes.$objName.StandardAttribute.Code" }
+ }
+ Emit-FieldBlock $i "InputByString" $ibFields
+ X "$i$(Get-EnumProp 'SearchStringModeOnInputByString' 'searchStringModeOnInputByString' 'Begin')"
+ X "$iDontUse"
+ X "$iDirectly"
+ X "$i$(Get-EnumProp 'CreateOnInput' 'createOnInput' 'DontUse')"
+ X "$i$(Get-EnumProp 'ChoiceHistoryOnInput' 'choiceHistoryOnInput' 'Auto')"
+ Emit-FormRef $i "DefaultObjectForm" $def.defaultObjectForm
+ Emit-FormRef $i "DefaultListForm" $def.defaultListForm
+ Emit-FormRef $i "DefaultChoiceForm" $def.defaultChoiceForm
+ Emit-FormRef $i "AuxiliaryObjectForm" $def.auxiliaryObjectForm
+ Emit-FormRef $i "AuxiliaryListForm" $def.auxiliaryListForm
+ Emit-FormRef $i "AuxiliaryChoiceForm" $def.auxiliaryChoiceForm
+ Emit-BasedOn $i $def.basedOn
- # BaseCalculationTypes
- $baseTypes = @()
- if ($def.baseCalculationTypes) { $baseTypes = @($def.baseCalculationTypes) }
+ X "$i$(Get-EnumProp 'DependenceOnCalculationTypes' 'dependenceOnCalculationTypes' 'DontUse')"
+ # BaseCalculationTypes — список ссылок на ПВР (прощающий ввод ПланВидовРасчета.X → ChartOfCalculationTypes.X).
+ $baseTypes = @(); if ($def.baseCalculationTypes) { $baseTypes = @($def.baseCalculationTypes | ForEach-Object { Resolve-TypePrefixSyn "$_" }) }
if ($baseTypes.Count -gt 0) {
X "$i"
- foreach ($bt in $baseTypes) {
- X "$i`t$bt"
- }
+ foreach ($bt in $baseTypes) { X "$i`t$(Esc-Xml $bt)" }
X "$i"
- } else {
- X "$i"
- }
-
+ } else { X "$i" }
$actionPeriodUse = if ($def.actionPeriodUse -eq $true) { "true" } else { "false" }
X "$i$actionPeriodUse"
Emit-StandardAttributes $i "ChartOfCalculationTypes"
- X "$i"
- X "$iAuto"
- X "$iInDialog"
- $quickChoice = if ($def.quickChoice -eq $true) { "true" } else { "false" }
- X "$i$quickChoice"
- X "$iBothWays"
- X "$i"
- X "$i`tChartOfCalculationTypes.$objName.StandardAttribute.Description"
- X "$i`tChartOfCalculationTypes.$objName.StandardAttribute.Code"
- X "$i"
- X "$iBegin"
- X "$iDontUse"
- X "$iDirectly"
- X "$i"
- X "$i"
- X "$i"
- X "$i"
- X "$i"
- X "$i"
- X "$ifalse"
- X "$i"
- X "$i"
+ Emit-Characteristics $i $def.characteristics
+ Emit-CalcTypesStdTabular $i
- $dataLockControlMode = Get-EnumProp "DataLockControlMode" "dataLockControlMode" "Automatic"
- X "$i$dataLockControlMode"
-
- $fullTextSearch = Get-EnumProp "FullTextSearch" "fullTextSearch" "Use"
- X "$i$fullTextSearch"
+ X "$i$(Get-EnumProp 'PredefinedDataUpdate' 'predefinedDataUpdate' 'Auto')"
+ $inclHelp = if (Get-BoolProp "includeHelpInContents" $false) { "true" } else { "false" }
+ X "$i$inclHelp"
+ $dlFields = if (Test-DefKey 'dataLockFields') { @($def.dataLockFields | ForEach-Object { Expand-DataPath "$_" }) } else { @() }
+ Emit-FieldBlock $i "DataLockFields" $dlFields
+ X "$i$(Get-EnumProp 'DataLockControlMode' 'dataLockControlMode' 'Automatic')"
+ X "$i$(Get-EnumProp 'FullTextSearch' 'fullTextSearch' 'Use')"
Emit-MLText $i "ObjectPresentation" $def.objectPresentation
Emit-MLText $i "ExtendedObjectPresentation" $def.extendedObjectPresentation
Emit-MLText $i "ListPresentation" $def.listPresentation
Emit-MLText $i "ExtendedListPresentation" $def.extendedListPresentation
Emit-MLText $i "Explanation" $def.explanation
- X "$iDontUse"
- X "$iAuto"
+ X "$i$(Get-EnumProp 'DataHistory' 'dataHistory' 'DontUse')"
+ $updDH = if (Get-BoolProp "updateDataHistoryImmediatelyAfterWrite" $false) { "true" } else { "false" }
+ X "$i$updDH"
+ $execDH = if (Get-BoolProp "executeAfterWriteDataHistoryVersionProcessing" $false) { "true" } else { "false" }
+ X "$i$execDH"
}
function Emit-CalculationRegisterProperties {
@@ -3539,8 +3576,7 @@ if ($objType -in $typesWithAttrTS) {
"Document" { "document" }
{ $_ -in @("DataProcessor","Report") } { "processor" }
"ChartOfCharacteristicTypes" { "catalog" } # реквизиты ПВХ структурно как у справочника (Use/FillFromFillingValue/DataHistory)
- "ChartOfAccounts" { "account" } # как catalog, но БЕЗ