mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-27 21:49:41 +03:00
feat(form-compile): xs:dateTime в значениях параметров выбора / choiceList
Авто-детект ISO-datetime (^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$) в
Normalize-ChoiceValue → xs:dateTime вместо xs:string. Без изменения DSL:
декомпилятор уже отдаёт строку, компилятор распознаёт формат. Заодно
исправляет choiceList со значениями-датами (та же FormChoiceListDesTimeValue).
Round-trip бит-в-бит на 3 формах с датами в параметрах выбора. Кейс
input-fields: Отбор.Дата в объектной и короткой формах; снэпшот
сертифицирован загрузкой в 1С. Закрывает микро-хвост кластера ChoiceParameters.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
65f63fbc48
commit
339c70b457
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.69 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.70 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -3049,6 +3049,11 @@ function Normalize-ChoiceValue {
|
||||
return @{ XsiType = "xs:string"; Text = "" }
|
||||
}
|
||||
|
||||
# ISO datetime ("2020-01-01T00:00:00") → xs:dateTime
|
||||
if ($s -match '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$') {
|
||||
return @{ XsiType = "xs:dateTime"; Text = $s }
|
||||
}
|
||||
|
||||
# Try to detect typed reference path: "<Root>.<Type>[.<Member>.<Value>]"
|
||||
$parts = $s -split '\.'
|
||||
if ($parts.Count -ge 2) {
|
||||
|
||||
Reference in New Issue
Block a user