mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-30 16:36:56 +03:00
feat(form-decompile,form-compile): tooltipRepresentation элемента (кластер ToolTipRepresentation)
<ToolTipRepresentation> (режим показа подсказки: None/Button/ShowBottom/ShowTop/ ShowLeft/ShowRight/ShowAuto/Balloon) — общее свойство элемента (Button 13785, Popup 6417, ButtonGroup, InputField, CheckBoxField, LabelDecoration, группы и др.; None доминирует — 25241). Терялся: декомпилятор не читал, компилятор не эмитил. Введён общий passthrough-ключ tooltipRepresentation: - декомпилятор: захват в Add-CommonProps; - компилятор: эмиссия в Emit-Title (после ToolTip) — покрывает все эмиттеры, зовущие Emit-Title; плюс отдельно в Emit-Label (свой title-блок, не зовёт Emit-Title). Декомпилятор (ps1) + компилятор (ps1+py) + spec §4.1. Покрытие: input-fields (input, ShowBottom), events (label-декорация, Button) — сертифицировано в 1С 8.3.24. Раундтрип БанковскиеСчета/Wildberries: остаток ToolTipRepresentation = 0. Регресс ps+py 33/33. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
22e929ecb3
commit
908af27bf0
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.36 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.37 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -1356,7 +1356,7 @@ KNOWN_KEYS = {
|
||||
"button", "picture", "picField", "calendar", "cmdBar", "popup",
|
||||
"showInHeader",
|
||||
"radioButtonType", "choiceList", "columnsCount", "checkBoxType", "editMode",
|
||||
"name", "path", "title", "tooltip",
|
||||
"name", "path", "title", "tooltip", "tooltipRepresentation",
|
||||
"visible", "hidden", "enabled", "disabled", "readOnly", "userVisible",
|
||||
"events", "on", "handlers",
|
||||
"selectionMode", "showCurrentDate", "widthInMonths", "heightInMonths", "showMonthsPanel",
|
||||
@@ -1678,6 +1678,9 @@ def emit_title(lines, el, name, indent, auto=False):
|
||||
# ToolTip элемента (всплывающая подсказка) — по схеме сразу после Title.
|
||||
if el.get('tooltip'):
|
||||
emit_mltext(lines, indent, 'ToolTip', el['tooltip'])
|
||||
# ToolTipRepresentation — режим показа подсказки (None/Button/ShowBottom/…), после ToolTip.
|
||||
if el.get('tooltipRepresentation'):
|
||||
lines.append(f'{indent}<ToolTipRepresentation>{el["tooltipRepresentation"]}</ToolTipRepresentation>')
|
||||
|
||||
|
||||
_TITLE_LOC_MAP = {'none': 'None', 'left': 'Left', 'right': 'Right', 'top': 'Top', 'bottom': 'Bottom', 'auto': 'Auto'}
|
||||
@@ -2180,6 +2183,8 @@ def emit_label(lines, el, name, eid, indent):
|
||||
lines.append(f'{inner}</Title>')
|
||||
if el.get('tooltip'):
|
||||
emit_mltext(lines, inner, 'ToolTip', el['tooltip'])
|
||||
if el.get('tooltipRepresentation'):
|
||||
lines.append(f'{inner}<ToolTipRepresentation>{el["tooltipRepresentation"]}</ToolTipRepresentation>')
|
||||
|
||||
emit_common_flags(lines, el, inner)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user