mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-15 10:24:57 +03:00
fix(skd-decompile): сохранять useRestriction=true на не-hidden/не-autoDates параметрах
Раньше параметр с useRestriction=true (без hidden/autoDates/expression/ других object-form-триггеров) сохранялся как shorthand string — useRestriction в shorthand не выражается, и compile эмитил default useRestriction=false, теряя ограничение. Render-Parameter: добавлен тригер object form для случая useRestriction=true. Объект уже корректно эмитил это поле.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# skd-decompile v0.82 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
||||
# skd-decompile v0.83 — Decompile 1C DCS Template.xml to JSON DSL (draft)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
@@ -875,7 +875,9 @@ function Render-Parameter {
|
||||
if ($p.denyIncomplete) { $needsObject = $true }
|
||||
if ($p.useAttr) { $needsObject = $true }
|
||||
}
|
||||
# useRestriction is auto-generated by compile for @hidden params; ignore as object trigger
|
||||
# useRestriction=true non-hidden non-autoDates требует object form — иначе shorthand
|
||||
# теряет этот атрибут (compile эмитит default useRestriction=false).
|
||||
if ($p.useRestriction -and -not $p.hidden -and -not $p.autoDates) { $needsObject = $true }
|
||||
if ($p.expression) { $needsObject = $true }
|
||||
if ($p.notAField) { $needsObject = $true }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user