diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index c2940ad1..2b37509d 100644 --- a/.claude/skills/form-compile/scripts/form-compile.ps1 +++ b/.claude/skills/form-compile/scripts/form-compile.ps1 @@ -1,4 +1,4 @@ -# form-compile v1.168 — Compile 1C managed form from JSON or object metadata +# form-compile v1.169 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$JsonPath, @@ -4044,6 +4044,12 @@ function Normalize-ChoiceValue { return @{ XsiType = "xs:dateTime"; Text = $s } } + # Raw-ссылка по GUID (метаданные.значение, оба GUID): "GUID.GUID" → xr:DesignTimeRef + # (всегда ссылка, не строка; named-ссылки Enum.X.Y детектятся ниже). + if ($s -match '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\.[0-9a-fA-F]{8}-[0-9a-fA-F-]+$') { + return @{ XsiType = "xr:DesignTimeRef"; Text = $s } + } + # Try to detect typed reference path: ".[..]" $parts = $s -split '\.' if ($parts.Count -ge 2) { diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py index 288bec2d..822102e9 100644 --- a/.claude/skills/form-compile/scripts/form-compile.py +++ b/.claude/skills/form-compile/scripts/form-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# form-compile v1.168 — Compile 1C managed form from JSON or object metadata +# form-compile v1.169 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import copy @@ -2247,6 +2247,10 @@ def normalize_choice_value(value): if re.fullmatch(r'\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}', s): return {"xsi_type": "xs:dateTime", "text": s} + # Raw-ссылка по GUID (метаданные.значение) "GUID.GUID" → xr:DesignTimeRef (всегда ссылка, не строка) + if re.fullmatch(r'[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\.[0-9a-fA-F]{8}-[0-9a-fA-F-]+', s): + return {"xsi_type": "xr:DesignTimeRef", "text": s} + parts = s.split(".") if len(parts) >= 2: root = parts[0]