mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-07 12:10:21 +03:00
feat(form-compile): ValuesPicture для PictureField
PictureField, привязанный к булеву/числу, без ValuesPicture не рисует иконку. Добавлены ключи DSL: - valuesPicture: ref картинки значения (StdPicture.*, CommonPicture.*) → <ValuesPicture><xr:Ref>…</xr:Ref></ValuesPicture> - loadTransparent: true → <xr:LoadTransparent>true</xr:LoadTransparent> (выводится только при true) Реализовано в обоих портах (ps1 + py, v1.22), добавлены в whitelist свойств. Регресс: новый кейс picture-field (picField + ValuesPicture + CheckBoxField + событие Selection), эталон зелёный на ps1 и py, плюс платформенная form-validate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f2b8ad741e
commit
96926d65ef
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.21 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.22 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -1358,7 +1358,7 @@ KNOWN_KEYS = {
|
||||
"commandBarLocation", "searchStringLocation",
|
||||
"pagesRepresentation",
|
||||
"type", "command", "stdCommand", "defaultButton", "locationInCommandBar",
|
||||
"src",
|
||||
"src", "valuesPicture", "loadTransparent",
|
||||
"autofill",
|
||||
"choiceMode", "initialTreeView", "enableDrag", "enableStartDrag",
|
||||
"rowPictureDataPath", "tableAutofill",
|
||||
@@ -2362,6 +2362,16 @@ def emit_picture_field(lines, el, name, eid, indent):
|
||||
emit_title(lines, el, name, inner)
|
||||
emit_common_flags(lines, el, inner)
|
||||
|
||||
# ValuesPicture \u2014 picture (collection) used to render the field's value.
|
||||
# Required for a Boolean-bound PictureField to actually show an icon.
|
||||
# loadTransparent emitted only when true (1\u0421 default is false).
|
||||
if el.get('valuesPicture'):
|
||||
lines.append(f'{inner}<ValuesPicture>')
|
||||
lines.append(f'{inner}\t<xr:Ref>{el["valuesPicture"]}</xr:Ref>')
|
||||
if el.get('loadTransparent'):
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>true</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}</ValuesPicture>')
|
||||
|
||||
if el.get('width'):
|
||||
lines.append(f'{inner}<Width>{el["width"]}</Width>')
|
||||
if el.get('height'):
|
||||
|
||||
Reference in New Issue
Block a user