mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-19 17:19:42 +03:00
feat(form-decompile,form-compile): FooterText/FooterDataPath на PictureField
PictureField (поле картинки в таблице) может нести <FooterText> (ML-текст подвала колонки) и <FooterDataPath> — общие cell-свойства колонки, уже поддержанные у input/labelField, но не у PictureField. Декомпилятор не захватывал, компилятор не эмитил → терялось (форма УчётныеЗаписиДокументооборота: двуязычный FooterText «Доступность ЭП»/«Digital signature availability»). Декомпилятор: захват footerDataPath/footerText в обработчике PictureField (зеркало input/labelField). Компилятор: эмиссия после Emit-Layout (как у input). Зеркало py. Ключи уже в allowlist (общие cell-props). Корпус 8.3.24: PictureField FooterText = 4 формы. Выборка 4 формы (УчётныеЗаписиДокументооборота acc+erp, ЗаказМатериаловВПроизводство, СчётФактураВыданный): match 0→4, TOTAL→0. ps1==py байт-в-байт. Регресс 43/43. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# form-compile v1.152 — Compile 1C managed form from JSON or object metadata
|
# form-compile v1.153 — Compile 1C managed form from JSON or object metadata
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[string]$JsonPath,
|
[string]$JsonPath,
|
||||||
@@ -4847,6 +4847,10 @@ function Emit-PictureField {
|
|||||||
|
|
||||||
Emit-Layout -el $el -indent $inner
|
Emit-Layout -el $el -indent $inner
|
||||||
|
|
||||||
|
# FooterDataPath / FooterText — общие cell-свойства колонки (как у input/labelField)
|
||||||
|
if ($el.footerDataPath) { X "$inner<FooterDataPath>$(Esc-Xml "$($el.footerDataPath)")</FooterDataPath>" }
|
||||||
|
if ($null -ne $el.footerText) { Emit-MLText -tag "FooterText" -text $el.footerText -indent $inner }
|
||||||
|
|
||||||
# ValuesPicture — picture (collection) used to render the field's value.
|
# ValuesPicture — picture (collection) used to render the field's value.
|
||||||
# Required for a Boolean-bound PictureField to actually show an icon.
|
# Required for a Boolean-bound PictureField to actually show an icon.
|
||||||
# Скаляр (Ref) или объект {src, loadTransparent}; LoadTransparent эмитится всегда.
|
# Скаляр (Ref) или объект {src, loadTransparent}; LoadTransparent эмитится всегда.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# form-compile v1.152 — Compile 1C managed form from JSON or object metadata
|
# form-compile v1.153 — Compile 1C managed form from JSON or object metadata
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
import argparse
|
import argparse
|
||||||
import copy
|
import copy
|
||||||
@@ -4575,6 +4575,12 @@ def emit_picture_field(lines, el, name, eid, indent):
|
|||||||
|
|
||||||
emit_layout(lines, el, inner)
|
emit_layout(lines, el, inner)
|
||||||
|
|
||||||
|
# FooterDataPath / FooterText — общие cell-свойства колонки (как у input/labelField)
|
||||||
|
if el.get('footerDataPath'):
|
||||||
|
lines.append(f'{inner}<FooterDataPath>{esc_xml(str(el["footerDataPath"]))}</FooterDataPath>')
|
||||||
|
if el.get('footerText') is not None:
|
||||||
|
emit_mltext(lines, inner, 'FooterText', el['footerText'])
|
||||||
|
|
||||||
# ValuesPicture — picture (collection) used to render the field's value.
|
# ValuesPicture — picture (collection) used to render the field's value.
|
||||||
# Required for a Boolean-bound PictureField to actually show an icon.
|
# Required for a Boolean-bound PictureField to actually show an icon.
|
||||||
# Скаляр (Ref) или объект {src, loadTransparent}; LoadTransparent эмитится всегда.
|
# Скаляр (Ref) или объект {src, loadTransparent}; LoadTransparent эмитится всегда.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# form-decompile v0.127 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
# form-decompile v0.128 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
|
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
|
||||||
param(
|
param(
|
||||||
@@ -1977,6 +1977,9 @@ function Decompile-Element {
|
|||||||
if ((Get-Child $node 'Hyperlink') -eq 'true') { $obj['hyperlink'] = $true }
|
if ((Get-Child $node 'Hyperlink') -eq 'true') { $obj['hyperlink'] = $true }
|
||||||
$vp = Get-PictureRef $node 'ValuesPicture'; if ($null -ne $vp) { $obj['valuesPicture'] = $vp }
|
$vp = Get-PictureRef $node 'ValuesPicture'; if ($null -ne $vp) { $obj['valuesPicture'] = $vp }
|
||||||
$npt = $node.SelectSingleNode("lf:NonselectedPictureText", $ns); if ($npt) { $t = Get-LangText $npt; if ($null -ne $t) { $obj['nonselectedPictureText'] = $t } }
|
$npt = $node.SelectSingleNode("lf:NonselectedPictureText", $ns); if ($npt) { $t = Get-LangText $npt; if ($null -ne $t) { $obj['nonselectedPictureText'] = $t } }
|
||||||
|
# FooterDataPath / FooterText — общие cell-свойства колонки (как у input/labelField)
|
||||||
|
$fdp = Get-Child $node 'FooterDataPath'; if ($fdp) { $obj['footerDataPath'] = $fdp }
|
||||||
|
$ftxt = $node.SelectSingleNode("lf:FooterText", $ns); if ($ftxt) { $t = Get-LangText $ftxt; if ($null -ne $t) { $obj['footerText'] = $t } }
|
||||||
}
|
}
|
||||||
'CalendarField' {
|
'CalendarField' {
|
||||||
$obj[$key] = $name
|
$obj[$key] = $name
|
||||||
|
|||||||
Reference in New Issue
Block a user