mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-14 18:04:58 +03:00
feat(form-decompile,form-compile): DisplayImportance + MinValue/MaxValue + verticalSpacing + rowsPicture LoadTransparent + autoMaxWidth/RowPictureDataPath fixes
Раундтрип TOTAL 25→21, match 146→153. Батч из 6 хвостовых находок:
- DisplayImportance: атрибут открывающего тега ЛЮБОГО элемента (адаптивная
важность VeryHigh/High/Usual/Low/VeryLow). Хелпер DI-Attr/di_attr внедрён в
открывающие теги; декомпилятор захватывает в диспетчере (атрибут узла).
- MinValue/MaxValue (input): типизированные (xsi:type). Тип сохраняется через
тип JSON-значения: число → xs:decimal, строка → xs:string.
- verticalSpacing: generic-скаляр группы (<VerticalSpacing>).
- rowsPicture: объектная форма {src, loadTransparent} — компилятор хардкодил
LoadTransparent=false, теперь факт. значение (792 false / 327 true в корпусе).
- autoMaxWidth: суппресс multiLineDefault-эвристики (декомпилятор фиксирует факт.
значение; multiLine-input без тега → autoMaxWidth:true).
- RowPictureDataPath: снят гейт hasMainTable у реинъекции smart-default (дин-список
без mainTable тоже несёт <RowPictureDataPath>; ""-маркер ловит реальное отсутствие).
Зеркало py (компилятор). Кейсы input-fields/groups расширены и сертифицированы
загрузкой в 1С. Регресс 39/39 в обоих рантаймах.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.91 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.92 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -2314,6 +2314,14 @@ function Emit-CompanionTitle {
|
||||
X "$indent</Title>"
|
||||
}
|
||||
|
||||
# DisplayImportance — атрибут открывающего тега элемента (адаптивная важность: VeryHigh/High/Usual/Low/VeryLow).
|
||||
# Возвращает ` DisplayImportance="X"` или "" (для companion-эмиттеров без $el → "" молча).
|
||||
function DI-Attr {
|
||||
param($el)
|
||||
if ($null -ne $el -and $el.displayImportance) { return " DisplayImportance=`"$(Esc-Xml "$($el.displayImportance)")`"" }
|
||||
return ""
|
||||
}
|
||||
|
||||
function Emit-Companion {
|
||||
param([string]$tag, [string]$name, [string]$indent, $content = $null)
|
||||
$id = New-Id
|
||||
@@ -2323,7 +2331,7 @@ function Emit-Companion {
|
||||
return
|
||||
}
|
||||
$inner = "$indent`t"
|
||||
X "$indent<$tag name=`"$name`" id=`"$id`">"
|
||||
X "$indent<$tag name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
if (Test-CompanionStructured $content) {
|
||||
# структурированная форма (own-content). Порядок как у платформы: own-content (флаги/hyperlink/
|
||||
# layout/оформление) ПЕРЕД Title (в корпусе layout-first 582 vs 10).
|
||||
@@ -2362,7 +2370,7 @@ function Emit-CompanionPanel {
|
||||
X "$indent<$tag name=`"$name`" id=`"$id`"/>"
|
||||
return
|
||||
}
|
||||
X "$indent<$tag name=`"$name`" id=`"$id`">"
|
||||
X "$indent<$tag name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
if ($halign) { X "$indent`t<HorizontalAlign>$halign</HorizontalAlign>" }
|
||||
if ($emitAfFalse) { X "$indent`t<Autofill>false</Autofill>" }
|
||||
if ($hasChildren) {
|
||||
@@ -2427,7 +2435,7 @@ function Emit-Addition {
|
||||
param($el, [string]$name, [int]$id, [string]$typeKey, [string]$indent)
|
||||
$map = $script:additionTypeMap[$typeKey]
|
||||
$source = if ($el.source) { "$($el.source)" } elseif ($script:currentTableName) { $script:currentTableName } else { '' }
|
||||
X "$indent<$($map.Tag) name=`"$name`" id=`"$id`">"
|
||||
X "$indent<$($map.Tag) name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
Emit-AdditionBody -props $el -source $source -srcType $map.Type -addName $name -indent $indent
|
||||
X "$indent</$($map.Tag)>"
|
||||
}
|
||||
@@ -2616,7 +2624,7 @@ function Emit-Element {
|
||||
# pages-specific
|
||||
"pagesRepresentation"=1
|
||||
# button-specific
|
||||
"type"=1;"command"=1;"commandName"=1;"stdCommand"=1;"defaultButton"=1;"locationInCommandBar"=1
|
||||
"type"=1;"command"=1;"commandName"=1;"stdCommand"=1;"defaultButton"=1;"locationInCommandBar"=1;"displayImportance"=1
|
||||
# picture/decoration
|
||||
"src"=1;"valuesPicture"=1;"loadTransparent"=1;"headerPicture"=1;"footerPicture"=1
|
||||
# cmdBar-specific
|
||||
@@ -2628,10 +2636,10 @@ function Emit-Element {
|
||||
# generic-скаляры (pass-through) + точечные
|
||||
"verticalAlign"=1;"throughAlign"=1;"enableContentChange"=1;"pictureSize"=1;"titleHeight"=1
|
||||
"childItemsWidth"=1;"showLeftMargin"=1;"cellHyperlink"=1;"viewMode"=1;"verticalScrollBar"=1
|
||||
"rowInputMode"=1;"mask"=1;"createButton"=1;"fixingInTable"=1
|
||||
"rowInputMode"=1;"mask"=1;"createButton"=1;"fixingInTable"=1;"verticalSpacing"=1
|
||||
# InputField choice-скаляры
|
||||
"choiceListButton"=1;"quickChoice"=1;"autoChoiceIncomplete"=1
|
||||
"choiceForm"=1;"choiceHistoryOnInput"=1;"footerDataPath"=1
|
||||
"choiceForm"=1;"choiceHistoryOnInput"=1;"footerDataPath"=1;"minValue"=1;"maxValue"=1
|
||||
# Button — пометка toggle-кнопки (ключ 'checked', не 'check' — во избежание конфликта с типом)
|
||||
"checked"=1
|
||||
}
|
||||
@@ -2840,6 +2848,7 @@ $script:genericScalars = @(
|
||||
@{ Tag='Mask'; Key='mask'; Kind='value' }
|
||||
@{ Tag='CreateButton'; Key='createButton'; Kind='bool' }
|
||||
@{ Tag='FixingInTable'; Key='fixingInTable'; Kind='value' }
|
||||
@{ Tag='VerticalSpacing'; Key='verticalSpacing'; Kind='value' }
|
||||
)
|
||||
|
||||
function Emit-GenericScalars {
|
||||
@@ -3009,7 +3018,7 @@ function Emit-TitleLocation {
|
||||
function Emit-Group {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<UsualGroup name=`"$name`" id=`"$id`">"
|
||||
X "$indent<UsualGroup name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner
|
||||
@@ -3080,7 +3089,7 @@ function Emit-Group {
|
||||
function Emit-ColumnGroup {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<ColumnGroup name=`"$name`" id=`"$id`">"
|
||||
X "$indent<ColumnGroup name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner
|
||||
@@ -3122,7 +3131,7 @@ function Emit-ColumnGroup {
|
||||
function Emit-Input {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<InputField name=`"$name`" id=`"$id`">"
|
||||
X "$indent<InputField name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -3171,6 +3180,13 @@ function Emit-Input {
|
||||
)) {
|
||||
if ($el.($p[0])) { X "$inner<$($p[1])>$(Esc-Xml "$($el.($p[0]))")</$($p[1])>" }
|
||||
}
|
||||
# MinValue/MaxValue — типизированное. JSON-число → xs:decimal, строка → xs:string (тип сохранён декомпилятором).
|
||||
foreach ($p in @(@('minValue','MinValue'), @('maxValue','MaxValue'))) {
|
||||
if ($null -ne $el.($p[0])) {
|
||||
$mvt = if ($el.($p[0]) -is [string]) { 'xs:string' } else { 'xs:decimal' }
|
||||
X "$inner<$($p[1]) xsi:type=`"$mvt`">$(Esc-Xml "$($el.($p[0]))")</$($p[1])>"
|
||||
}
|
||||
}
|
||||
if ($el.choiceButtonRepresentation) { X "$inner<ChoiceButtonRepresentation>$($el.choiceButtonRepresentation)</ChoiceButtonRepresentation>" }
|
||||
Emit-Layout -el $el -indent $inner -multiLineDefault ([bool]($el.multiLine -eq $true))
|
||||
|
||||
@@ -3204,7 +3220,7 @@ function Emit-Input {
|
||||
function Emit-Check {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<CheckBoxField name=`"$name`" id=`"$id`">"
|
||||
X "$indent<CheckBoxField name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -3595,7 +3611,7 @@ function Emit-TypeLink {
|
||||
function Emit-Radio {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<RadioButtonField name=`"$name`" id=`"$id`">"
|
||||
X "$indent<RadioButtonField name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -3656,7 +3672,7 @@ function Emit-DecorationTitle {
|
||||
function Emit-Label {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<LabelDecoration name=`"$name`" id=`"$id`">"
|
||||
X "$indent<LabelDecoration name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
# Порядок как у платформы: own-content (флаги/hyperlink/layout/оформление) ПЕРЕД Title
|
||||
@@ -3680,7 +3696,7 @@ function Emit-Label {
|
||||
function Emit-LabelField {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<LabelField name=`"$name`" id=`"$id`">"
|
||||
X "$indent<LabelField name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -3747,7 +3763,7 @@ function Emit-Table {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
$script:currentTableName = $name # дефолт source для кастомных дополнений в commandBar
|
||||
X "$indent<Table name=`"$name`" id=`"$id`">"
|
||||
X "$indent<Table name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -3796,9 +3812,12 @@ function Emit-Table {
|
||||
if ($el.enableDrag -eq $true) { X "$inner<EnableDrag>true</EnableDrag>" }
|
||||
if ($el.rowPictureDataPath) { X "$inner<RowPictureDataPath>$($el.rowPictureDataPath)</RowPictureDataPath>" }
|
||||
if ($el.rowsPicture) {
|
||||
# Строка = Ref (LoadTransparent дефолт false); объект {src, loadTransparent} → факт. значение
|
||||
$rpSrc = if ($el.rowsPicture -is [string]) { $el.rowsPicture } else { $el.rowsPicture.src }
|
||||
$rpLt = if ($el.rowsPicture -isnot [string] -and $el.rowsPicture.loadTransparent -eq $true) { 'true' } else { 'false' }
|
||||
X "$inner<RowsPicture>"
|
||||
X "$inner`t<xr:Ref>$($el.rowsPicture)</xr:Ref>"
|
||||
X "$inner`t<xr:LoadTransparent>false</xr:LoadTransparent>"
|
||||
X "$inner`t<xr:Ref>$rpSrc</xr:Ref>"
|
||||
X "$inner`t<xr:LoadTransparent>$rpLt</xr:LoadTransparent>"
|
||||
X "$inner</RowsPicture>"
|
||||
}
|
||||
# Блок свойств дин-список-таблицы (помечена эвристикой 11b.4)
|
||||
@@ -3853,7 +3872,7 @@ function Emit-Table {
|
||||
function Emit-Pages {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<Pages name=`"$name`" id=`"$id`">"
|
||||
X "$indent<Pages name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner
|
||||
@@ -3885,7 +3904,7 @@ function Emit-Pages {
|
||||
function Emit-Page {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<Page name=`"$name`" id=`"$id`">"
|
||||
X "$indent<Page name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner -auto
|
||||
@@ -3922,7 +3941,7 @@ function Emit-Page {
|
||||
function Emit-Button {
|
||||
param($el, [string]$name, [int]$id, [string]$indent, [bool]$inCmdBar = $false)
|
||||
|
||||
X "$indent<Button name=`"$name`" id=`"$id`">"
|
||||
X "$indent<Button name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
# (общие свойства — через Emit-Layout ниже; отдельный вызов был бы двойной эмиссией)
|
||||
|
||||
@@ -4020,7 +4039,7 @@ function Emit-Button {
|
||||
function Emit-PictureDecoration {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<PictureDecoration name=`"$name`" id=`"$id`">"
|
||||
X "$indent<PictureDecoration name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-DecorationTitle -el $el -name $name -indent $inner
|
||||
@@ -4056,7 +4075,7 @@ function Emit-PictureDecoration {
|
||||
function Emit-PictureField {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<PictureField name=`"$name`" id=`"$id`">"
|
||||
X "$indent<PictureField name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -4092,7 +4111,7 @@ function Emit-PictureField {
|
||||
function Emit-Calendar {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<CalendarField name=`"$name`" id=`"$id`">"
|
||||
X "$indent<CalendarField name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
if ($el.path) { X "$inner<DataPath>$($el.path)</DataPath>" }
|
||||
@@ -4137,7 +4156,7 @@ function Emit-Calendar {
|
||||
function Emit-CommandBar {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<CommandBar name=`"$name`" id=`"$id`">"
|
||||
X "$indent<CommandBar name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner
|
||||
@@ -4166,7 +4185,7 @@ function Emit-CommandBar {
|
||||
function Emit-ButtonGroup {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<ButtonGroup name=`"$name`" id=`"$id`">"
|
||||
X "$indent<ButtonGroup name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner
|
||||
@@ -4198,7 +4217,7 @@ function Emit-ButtonGroup {
|
||||
function Emit-Popup {
|
||||
param($el, [string]$name, [int]$id, [string]$indent)
|
||||
|
||||
X "$indent<Popup name=`"$name`" id=`"$id`">"
|
||||
X "$indent<Popup name=`"$name`" id=`"$id`"$(DI-Attr $el)>"
|
||||
$inner = "$indent`t"
|
||||
|
||||
Emit-Title -el $el -name $name -indent $inner -auto
|
||||
@@ -4931,9 +4950,11 @@ function ApplyDynamicListTableHeuristic {
|
||||
if ($null -eq $el.PSObject.Properties["commandBarLocation"]) {
|
||||
$el | Add-Member -NotePropertyName "commandBarLocation" -NotePropertyValue "None" -Force
|
||||
}
|
||||
# RowPictureDataPath: умный дефолт <Список>.DefaultPicture, если ключ ОТСУТСТВУЕТ
|
||||
# и есть основная таблица. Пустая строка (suppress-маркер) НЕ перезатирается.
|
||||
if ($hasMainTable -and ($null -eq $el.PSObject.Properties["rowPictureDataPath"])) {
|
||||
# RowPictureDataPath: умный дефолт <Список>.DefaultPicture, если ключ ОТСУТСТВУЕТ.
|
||||
# Декомпилятор опускает ключ при rpdp == smart-default (ждёт реинъекции); реальное отсутствие
|
||||
# фиксирует ""-маркером (НЕ перезатирается). Гейт hasMainTable снят: дин-список без mainTable
|
||||
# (напр. query-based) тоже несёт RowPictureDataPath.
|
||||
if ($null -eq $el.PSObject.Properties["rowPictureDataPath"]) {
|
||||
$el | Add-Member -NotePropertyName "rowPictureDataPath" -NotePropertyValue "$listName.DefaultPicture" -Force
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.91 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.92 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -1258,6 +1258,13 @@ def esc_xml(s):
|
||||
return s.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
|
||||
|
||||
def di_attr(el):
|
||||
# DisplayImportance — атрибут открывающего тега элемента (адаптивная важность). "" если нет.
|
||||
if isinstance(el, dict) and el.get('displayImportance'):
|
||||
return f' DisplayImportance="{esc_xml(str(el["displayImportance"]))}"'
|
||||
return ''
|
||||
|
||||
|
||||
# Базовая директория для @file-ссылок в query динсписка (устанавливается в main)
|
||||
QUERY_BASE_DIR = None
|
||||
|
||||
@@ -1796,7 +1803,7 @@ KNOWN_KEYS = {
|
||||
"commandBarLocation", "searchStringLocation", "viewStatusLocation", "searchControlLocation",
|
||||
"excludedCommands",
|
||||
"pagesRepresentation",
|
||||
"type", "command", "commandName", "stdCommand", "defaultButton", "locationInCommandBar",
|
||||
"type", "command", "commandName", "stdCommand", "defaultButton", "locationInCommandBar", "displayImportance",
|
||||
"commandBar", "contextMenu", "commandSource",
|
||||
"src", "valuesPicture", "loadTransparent", "headerPicture", "footerPicture",
|
||||
"autofill",
|
||||
@@ -1816,10 +1823,10 @@ KNOWN_KEYS = {
|
||||
# generic-скаляры (pass-through)
|
||||
"verticalAlign", "throughAlign", "enableContentChange", "pictureSize", "titleHeight",
|
||||
"childItemsWidth", "showLeftMargin", "cellHyperlink", "viewMode", "verticalScrollBar",
|
||||
"rowInputMode", "mask", "createButton", "fixingInTable",
|
||||
"rowInputMode", "mask", "createButton", "fixingInTable", "verticalSpacing",
|
||||
# InputField choice-скаляры
|
||||
"choiceListButton", "quickChoice", "autoChoiceIncomplete",
|
||||
"choiceForm", "choiceHistoryOnInput", "footerDataPath",
|
||||
"choiceForm", "choiceHistoryOnInput", "footerDataPath", "minValue", "maxValue",
|
||||
# Button — пометка toggle-кнопки
|
||||
"checked",
|
||||
}
|
||||
@@ -2436,7 +2443,7 @@ def emit_addition(lines, el, name, eid, type_key, indent):
|
||||
# Кастомное дополнение (тип-элемент в commandBar): source дефолтит в текущую таблицу.
|
||||
m = ADDITION_TYPE_MAP[type_key]
|
||||
source = el.get('source') or _current_table_name['name'] or ''
|
||||
lines.append(f'{indent}<{m["tag"]} name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<{m["tag"]} name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
emit_addition_body(lines, el, source, m['type'], name, indent)
|
||||
lines.append(f'{indent}</{m["tag"]}>')
|
||||
|
||||
@@ -2689,6 +2696,7 @@ GENERIC_SCALARS = [
|
||||
('Mask', 'mask', 'value'),
|
||||
('CreateButton', 'createButton', 'bool'),
|
||||
('FixingInTable', 'fixingInTable', 'value'),
|
||||
('VerticalSpacing', 'verticalSpacing', 'value'),
|
||||
]
|
||||
|
||||
|
||||
@@ -3071,7 +3079,7 @@ def emit_element(lines, el, indent, in_cmd_bar=False):
|
||||
|
||||
|
||||
def emit_group(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<UsualGroup name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<UsualGroup name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
@@ -3141,7 +3149,7 @@ def emit_group(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_column_group(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<ColumnGroup name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<ColumnGroup name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
@@ -3178,7 +3186,7 @@ def emit_column_group(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_input(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<InputField name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<InputField name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3227,6 +3235,11 @@ def emit_input(lines, el, name, eid, indent):
|
||||
('choiceFoldersAndItems', 'ChoiceFoldersAndItems'), ('footerDataPath', 'FooterDataPath')):
|
||||
if el.get(key):
|
||||
lines.append(f'{inner}<{tag}>{esc_xml(str(el[key]))}</{tag}>')
|
||||
# MinValue/MaxValue — типизированное. JSON-число → xs:decimal, строка → xs:string (тип сохранён декомпилятором).
|
||||
for key, tag in (('minValue', 'MinValue'), ('maxValue', 'MaxValue')):
|
||||
if el.get(key) is not None:
|
||||
mvt = 'xs:string' if isinstance(el[key], str) else 'xs:decimal'
|
||||
lines.append(f'{inner}<{tag} xsi:type="{mvt}">{esc_xml(str(el[key]))}</{tag}>')
|
||||
if el.get('choiceButtonRepresentation'):
|
||||
lines.append(f'{inner}<ChoiceButtonRepresentation>{el["choiceButtonRepresentation"]}</ChoiceButtonRepresentation>')
|
||||
emit_layout(lines, el, inner, multi_line_default=(el.get('multiLine') is True))
|
||||
@@ -3260,7 +3273,7 @@ def emit_input(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_check(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<CheckBoxField name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<CheckBoxField name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3303,7 +3316,7 @@ def emit_check(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_radio_button_field(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<RadioButtonField name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<RadioButtonField name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3354,7 +3367,7 @@ def emit_decoration_title(lines, el, name, indent, auto=False):
|
||||
|
||||
|
||||
def emit_label(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<LabelDecoration name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<LabelDecoration name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
# Порядок как у платформы: own-content (флаги/hyperlink/layout/оформление) ПЕРЕД Title
|
||||
@@ -3377,7 +3390,7 @@ def emit_label(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_label_field(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<LabelField name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<LabelField name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3446,7 +3459,7 @@ def emit_dynlist_table_block(lines, el, indent):
|
||||
|
||||
def emit_table(lines, el, name, eid, indent):
|
||||
_current_table_name['name'] = name # дефолт source для кастомных дополнений в commandBar
|
||||
lines.append(f'{indent}<Table name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<Table name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3511,9 +3524,13 @@ def emit_table(lines, el, name, eid, indent):
|
||||
if el.get('rowPictureDataPath'):
|
||||
lines.append(f'{inner}<RowPictureDataPath>{el["rowPictureDataPath"]}</RowPictureDataPath>')
|
||||
if el.get('rowsPicture'):
|
||||
# Строка = Ref (LoadTransparent дефолт false); объект {src, loadTransparent} → факт. значение
|
||||
rp = el['rowsPicture']
|
||||
rp_src = rp if isinstance(rp, str) else rp.get('src')
|
||||
rp_lt = 'true' if (not isinstance(rp, str) and rp.get('loadTransparent') is True) else 'false'
|
||||
lines.append(f'{inner}<RowsPicture>')
|
||||
lines.append(f'{inner}\t<xr:Ref>{el["rowsPicture"]}</xr:Ref>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>false</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}\t<xr:Ref>{rp_src}</xr:Ref>')
|
||||
lines.append(f'{inner}\t<xr:LoadTransparent>{rp_lt}</xr:LoadTransparent>')
|
||||
lines.append(f'{inner}</RowsPicture>')
|
||||
# Блок свойств дин-список-таблицы (помечена эвристикой)
|
||||
if el.get('_dynList'):
|
||||
@@ -3566,7 +3583,7 @@ def emit_table(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_pages(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<Pages name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<Pages name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
@@ -3593,7 +3610,7 @@ def emit_pages(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_page(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<Page name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<Page name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner, auto=True)
|
||||
@@ -3627,7 +3644,7 @@ def emit_page(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_button(lines, el, name, eid, indent, in_cmd_bar=False):
|
||||
lines.append(f'{indent}<Button name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<Button name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
# (общие свойства — через emit_layout ниже; отдельный вызов был бы двойной эмиссией)
|
||||
|
||||
@@ -3714,7 +3731,7 @@ def emit_button(lines, el, name, eid, indent, in_cmd_bar=False):
|
||||
|
||||
|
||||
def emit_picture_decoration(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<PictureDecoration name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<PictureDecoration name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_decoration_title(lines, el, name, inner)
|
||||
@@ -3750,7 +3767,7 @@ def emit_picture_decoration(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_picture_field(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<PictureField name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<PictureField name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3789,7 +3806,7 @@ def emit_picture_field(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_calendar(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<CalendarField name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<CalendarField name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
if el.get('path'):
|
||||
@@ -3830,7 +3847,7 @@ def emit_calendar(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_command_bar(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<CommandBar name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<CommandBar name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
@@ -3860,7 +3877,7 @@ def emit_command_bar(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_popup(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<Popup name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<Popup name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner, auto=True)
|
||||
@@ -3884,7 +3901,7 @@ def emit_popup(lines, el, name, eid, indent):
|
||||
|
||||
|
||||
def emit_button_group(lines, el, name, eid, indent):
|
||||
lines.append(f'{indent}<ButtonGroup name="{name}" id="{eid}">')
|
||||
lines.append(f'{indent}<ButtonGroup name="{name}" id="{eid}"{di_attr(el)}>')
|
||||
inner = f'{indent}\t'
|
||||
|
||||
emit_title(lines, el, name, inner)
|
||||
@@ -4845,9 +4862,10 @@ def main():
|
||||
el['tableAutofill'] = False
|
||||
if 'commandBarLocation' not in el:
|
||||
el['commandBarLocation'] = 'None'
|
||||
# RowPictureDataPath: умный дефолт <Список>.DefaultPicture, если ключ ОТСУТСТВУЕТ
|
||||
# и есть основная таблица. Пустая строка (suppress-маркер) НЕ перезатирается.
|
||||
if has_main_table and 'rowPictureDataPath' not in el:
|
||||
# RowPictureDataPath: умный дефолт <Список>.DefaultPicture, если ключ ОТСУТСТВУЕТ.
|
||||
# Декомпилятор опускает при rpdp == smart-default; реальное отсутствие → ""-маркер (не
|
||||
# перезатирается). Гейт has_main_table снят: дин-список без mainTable тоже несёт RowPictureDataPath.
|
||||
if 'rowPictureDataPath' not in el:
|
||||
el['rowPictureDataPath'] = f'{list_name}.DefaultPicture'
|
||||
if isinstance(el.get('children'), list):
|
||||
for child in el['children']:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# form-decompile v0.68 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# form-decompile v0.69 — Decompile 1C managed Form.xml to JSON DSL (draft)
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
# ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью.
|
||||
param(
|
||||
@@ -765,7 +765,12 @@ function Add-Layout {
|
||||
$soi = Get-Child $node 'SkipOnInput'; if ($null -ne $soi) { $obj['skipOnInput'] = ($soi -eq 'true') }
|
||||
if ((Get-Child $node 'EnableStartDrag') -eq 'true') { $obj['enableStartDrag'] = $true }
|
||||
$fdm = Get-Child $node 'FileDragMode'; if ($fdm) { $obj['fileDragMode'] = $fdm }
|
||||
if ((Get-Child $node 'AutoMaxWidth') -eq 'false') { $obj['autoMaxWidth'] = $false }
|
||||
# AutoMaxWidth: компилятор додумывает false для multiLine-input без явного ключа (multiLineDefault).
|
||||
# Захват факт. значения; multiLine-input без тега → autoMaxWidth:true (суппресс эвристики).
|
||||
$amwNode = Get-Child $node 'AutoMaxWidth'
|
||||
if ($amwNode -eq 'false') { $obj['autoMaxWidth'] = $false }
|
||||
elseif ($amwNode -eq 'true') { $obj['autoMaxWidth'] = $true }
|
||||
elseif ((Get-Child $node 'MultiLine') -eq 'true') { $obj['autoMaxWidth'] = $true }
|
||||
$mw = Get-Child $node 'MaxWidth'; if ($mw) { $obj['maxWidth'] = [int]$mw }
|
||||
if ((Get-Child $node 'AutoMaxHeight') -eq 'false') { $obj['autoMaxHeight'] = $false }
|
||||
$mh = Get-Child $node 'MaxHeight'; if ($mh) { $obj['maxHeight'] = [int]$mh }
|
||||
@@ -1136,6 +1141,7 @@ $GENERIC_SCALARS = @(
|
||||
@{ Tag='Mask'; Key='mask'; Kind='value' }
|
||||
@{ Tag='CreateButton'; Key='createButton'; Kind='bool' }
|
||||
@{ Tag='FixingInTable'; Key='fixingInTable'; Kind='value' }
|
||||
@{ Tag='VerticalSpacing'; Key='verticalSpacing'; Kind='value' }
|
||||
)
|
||||
|
||||
# Захват generic-скаляров. Специфичная обработка (если ключ уже задан) — побеждает.
|
||||
@@ -1388,6 +1394,18 @@ function Decompile-Element {
|
||||
foreach ($p in @('ChoiceForm','ChoiceHistoryOnInput','ChoiceFoldersAndItems','FooterDataPath')) {
|
||||
$v = Get-Child $node $p; if ($null -ne $v) { $obj[($p.Substring(0,1).ToLower()+$p.Substring(1))] = $v }
|
||||
}
|
||||
# MinValue/MaxValue — типизированное (<MinValue xsi:type="xs:decimal">N). Тип кодируем в JSON-тип:
|
||||
# xs:decimal/int → число (компилятор → xs:decimal), иначе → строка (компилятор → xs:string).
|
||||
foreach ($p in @('MinValue','MaxValue')) {
|
||||
$mn = $node.SelectSingleNode("lf:$p", $ns)
|
||||
if ($mn) {
|
||||
$xt = $mn.GetAttribute("type", $NS_XSI); $txt = $mn.InnerText
|
||||
$key = $p.Substring(0,1).ToLower() + $p.Substring(1)
|
||||
if ($xt -match 'decimal|int') {
|
||||
if ($txt -match '^-?\d+$') { $obj[$key] = [int]$txt } elseif ($txt -match '^-?\d+\.\d+$') { $obj[$key] = [decimal]$txt } else { $obj[$key] = $txt }
|
||||
} else { $obj[$key] = $txt }
|
||||
}
|
||||
}
|
||||
$cbr = Get-Child $node 'ChoiceButtonRepresentation'; if ($cbr) { $obj['choiceButtonRepresentation'] = $cbr }
|
||||
if ((Get-Child $node 'TextEdit') -eq 'false') { $obj['textEdit'] = $false }
|
||||
$cl = Decompile-ChoiceList $node; if ($cl) { $obj['choiceList'] = $cl }
|
||||
@@ -1507,7 +1525,13 @@ function Decompile-Element {
|
||||
$soin = Get-Child $node 'SearchOnInput'; if ($soin) { $obj['searchOnInput'] = $soin }
|
||||
if ((Get-Child $node 'AutoMarkIncomplete') -eq 'true') { $obj['markIncomplete'] = $true }
|
||||
$itv = Get-Child $node 'InitialTreeView'; if ($itv) { $obj['initialTreeView'] = $itv }
|
||||
$rpRef = $node.SelectSingleNode("lf:RowsPicture/xr:Ref", $ns); if ($rpRef) { $obj['rowsPicture'] = $rpRef.InnerText }
|
||||
# RowsPicture: src (xr:Ref) + LoadTransparent (дефолт false). При true → объектная форма.
|
||||
$rpRef = $node.SelectSingleNode("lf:RowsPicture/xr:Ref", $ns)
|
||||
if ($rpRef) {
|
||||
$rpLt = $node.SelectSingleNode("lf:RowsPicture/xr:LoadTransparent", $ns)
|
||||
if ($rpLt -and $rpLt.InnerText -eq 'true') { $obj['rowsPicture'] = [ordered]@{ src = $rpRef.InnerText; loadTransparent = $true } }
|
||||
else { $obj['rowsPicture'] = $rpRef.InnerText }
|
||||
}
|
||||
$rpdp = Get-Child $node 'RowPictureDataPath'
|
||||
# --- Блок дин-список-таблицы (признак: дочерний <UpdateOnDataChange>) ---
|
||||
if (Has-Child $node 'UpdateOnDataChange') {
|
||||
@@ -1605,6 +1629,8 @@ function Decompile-Element {
|
||||
'ViewStatusAddition' { $obj[$key] = $name; Add-AdditionCore $obj $node $name }
|
||||
'SearchControlAddition' { $obj[$key] = $name; Add-AdditionCore $obj $node $name }
|
||||
}
|
||||
# DisplayImportance — атрибут открывающего тега (адаптивная важность отображения), захват «как есть».
|
||||
$di = $node.GetAttribute("DisplayImportance"); if ($di) { $obj['displayImportance'] = $di }
|
||||
# title: "" — подавление авто-вывода: для типов, где компилятор вывел бы
|
||||
# заголовок из имени, а в оригинале <Title> отсутствует.
|
||||
if (-not $obj.Contains('title')) {
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
| `titleLocation` | string | Расположение заголовка: `none`/`left`/`right`/`top`/`bottom`/`auto`. Эмитится при наличии (input, labelField, picField, table, calendar). У `check`/`radio` — особая семантика с умным дефолтом (см. их разделы) |
|
||||
| `tooltip` | string/object | Всплывающая подсказка элемента (`<ToolTip>`). Строка → ru, объект `{ "ru": …, "en": … }` → мультиязычный (как `title`). Эмитится сразу после `title` |
|
||||
| `tooltipRepresentation` | string | Режим показа подсказки (`<ToolTipRepresentation>`): `None`, `Button`, `ShowBottom`, `ShowTop`, `ShowLeft`, `ShowRight`, `ShowAuto`, `Balloon`. Эмитится при наличии |
|
||||
| `displayImportance` | string | Важность отображения (атрибут открывающего тега `DisplayImportance`): `VeryHigh`, `High`, `Usual`, `Low`, `VeryLow`. Адаптивная раскладка (моб./узкие формы). Применимо к любому элементу |
|
||||
| `extendedTooltip` | string/object | Расширенная подсказка (companion `<ExtendedTooltip>`, по сути LabelDecoration). **Текст-форма**: строка / ML / `{text, formatted}`. **Own-content форма** (объект с layout/оформлением/флагами): `{ text?, formatted?, width?, autoMaxWidth?, maxWidth?, height?, horizontalStretch?, verticalAlign?, titleHeight?, hyperlink?, visible?, enabled?, textColor?, font?, … }` — own-content эмитится перед `Title`. (События компаньона пока не поддержаны.) Синоним: `extTooltip` |
|
||||
|
||||
#### Форма ML-текста и `formatted`
|
||||
@@ -265,6 +266,7 @@ companion-панели с собственным контентом. Оба не
|
||||
| `pictureSize` | `<PictureSize>` | `AutoSize`/`Proportionally`/`ByFontSize`/… (декорация-картинка) |
|
||||
| `titleHeight` | `<TitleHeight>` | число |
|
||||
| `childItemsWidth` | `<ChildItemsWidth>` | `Equal`/`LeftWide`/… (ширины дочерних в группе) |
|
||||
| `verticalSpacing` | `<VerticalSpacing>` | `None`/… (вертикальный интервал группы) |
|
||||
| `showLeftMargin` | `<ShowLeftMargin>` | bool (группа) |
|
||||
| `cellHyperlink` | `<CellHyperlink>` | bool |
|
||||
| `mask` | `<Mask>` | строка маски ввода (input) |
|
||||
@@ -387,6 +389,7 @@ companion-панели с собственным контентом. Оба не
|
||||
| `fixingInTable` | string | Фиксация колонки в таблице (`<FixingInTable>`): `Left`, `Right`, `None`. Так же у `labelField` и др. полей |
|
||||
| `footerDataPath` | string | DataPath подвала колонки таблицы (`<FooterDataPath>`) |
|
||||
| `choiceButtonRepresentation` | string | `ShowInInputField`, `ShowInDropList`, `ShowInDropListAndInInputField` |
|
||||
| `minValue` / `maxValue` | number/string | Мин./макс. значение (`<MinValue>`/`<MaxValue>` с обязательным `xsi:type`). **JSON-число → `xs:decimal`, строка → `xs:string`** (тип сохраняется декомпилятором через тип JSON-значения) |
|
||||
| `width` | int | Ширина |
|
||||
| `height` | int | Высота |
|
||||
| `horizontalStretch` | bool | Растягивание по горизонтали |
|
||||
@@ -533,7 +536,7 @@ companion-панели с собственным контентом. Оба не
|
||||
| `rowSelectionMode` | string | Режим выделения строки (`Row`, …) |
|
||||
| `verticalLines` / `horizontalLines` | bool | Линии сетки (эмитится явное `false`) |
|
||||
| `initialTreeView` | string | `ExpandTopLevel`, `ExpandAllLevels`, `NoExpand` |
|
||||
| `rowsPicture` | string | Картинка строк (`CommonPicture.X`) |
|
||||
| `rowsPicture` | string \| object | Картинка строк (`<RowsPicture>`). Строка = `CommonPicture.X` (LoadTransparent дефолт `false`); объект `{ src, loadTransparent }` — для явной прозрачности (`loadTransparent: true`) |
|
||||
| `height` | int | Высота элемента таблицы (`<Height>`, как у прочих элементов) |
|
||||
| `heightInTableRows` | int | Высота в строках (`<HeightInTableRows>`) — отдельное свойство от `height`; таблица может нести оба |
|
||||
| `header` | bool | Показывать шапку |
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
{ "input": "Поле2", "path": "Поле2", "title": "Поле 2" },
|
||||
{ "labelField": "Метка", "path": "Поле1", "groupVerticalAlign": "Center" }
|
||||
]},
|
||||
{ "group": "vertical", "name": "ГруппаПодвал", "behavior": "collapsible", "collapsed": true, "title": { "ru": "Подвал", "en": "Footer" }, "collapsedTitle": "Развернуть подвал", "showLeftMargin": false, "enableContentChange": false, "children": [
|
||||
{ "group": "vertical", "name": "ГруппаПодвал", "behavior": "collapsible", "collapsed": true, "title": { "ru": "Подвал", "en": "Footer" }, "collapsedTitle": "Развернуть подвал", "showLeftMargin": false, "enableContentChange": false, "verticalSpacing": "None", "displayImportance": "Low", "children": [
|
||||
{ "input": "Поле3", "path": "Поле3", "title": "Поле 3" }
|
||||
]}
|
||||
],
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
{ "labelField": "Ссылка", "path": "ОбычноеПоле", "titleLocation": "left", "hyperlink": true, "format": { "ru": "ДЛФ=D", "en": "DLF=D" } },
|
||||
{ "input": "МногострочноеПоле", "path": "МногострочноеПоле", "multiLine": true, "height": 5, "title": "Комментарий", "wrap": false, "showInHeader": false, "showInFooter": false, "autoCellHeight": true, "footerHorizontalAlign": "Right", "openButton": false, "chooseType": false },
|
||||
{ "input": "ПолеПароля", "path": "ПолеПароля", "passwordMode": true, "title": "Пароль" },
|
||||
{ "input": "ЧисловоеПоле", "path": "ЧисловоеПоле", "title": "Число", "minValue": 1, "maxValue": 100, "displayImportance": "VeryHigh" },
|
||||
{ "input": "ПолеСКнопками", "path": "ПолеСКнопками", "choiceButton": true, "clearButton": true, "dropListButton": false, "spinButton": true, "choiceListButton": true, "quickChoice": false, "autoChoiceIncomplete": true, "choiceHistoryOnInput": "DontUse", "choiceForm": "DataProcessor.ПоляВвода.Form.Форма", "title": "Выбор" },
|
||||
{ "input": "ПолеСписокВыбора", "path": "ПолеСписокВыбора", "title": "Список выбора", "choiceList": [
|
||||
{ "value": "", "presentation": "Все" },
|
||||
@@ -63,7 +64,8 @@
|
||||
{ "name": "Флаг", "type": "boolean" },
|
||||
{ "name": "ФлагПлатформенный", "type": "boolean" },
|
||||
{ "name": "ФлагЯвный", "type": "boolean" },
|
||||
{ "name": "ФлагТумблер", "type": "boolean" }
|
||||
{ "name": "ФлагТумблер", "type": "boolean" },
|
||||
{ "name": "ЧисловоеПоле", "type": "number(10,2)" }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -64,7 +64,7 @@
|
||||
</LabelField>
|
||||
</ChildItems>
|
||||
</UsualGroup>
|
||||
<UsualGroup name="ГруппаПодвал" id="14">
|
||||
<UsualGroup name="ГруппаПодвал" id="14" DisplayImportance="Low">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -86,6 +86,7 @@
|
||||
</CollapsedRepresentationTitle>
|
||||
<EnableContentChange>false</EnableContentChange>
|
||||
<ShowLeftMargin>false</ShowLeftMargin>
|
||||
<VerticalSpacing>None</VerticalSpacing>
|
||||
<ExtendedTooltip name="ГруппаПодвалРасширеннаяПодсказка" id="15"/>
|
||||
<ChildItems>
|
||||
<InputField name="Поле3" id="16">
|
||||
|
||||
+69
-40
@@ -101,7 +101,20 @@
|
||||
<ContextMenu name="ПолеПароляКонтекстноеМеню" id="11"/>
|
||||
<ExtendedTooltip name="ПолеПароляРасширеннаяПодсказка" id="12"/>
|
||||
</InputField>
|
||||
<InputField name="ПолеСКнопками" id="13">
|
||||
<InputField name="ЧисловоеПоле" id="13" DisplayImportance="VeryHigh">
|
||||
<DataPath>ЧисловоеПоле</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Число</v8:content>
|
||||
</v8:item>
|
||||
</Title>
|
||||
<MinValue xsi:type="xs:decimal">1</MinValue>
|
||||
<MaxValue xsi:type="xs:decimal">100</MaxValue>
|
||||
<ContextMenu name="ЧисловоеПолеКонтекстноеМеню" id="14"/>
|
||||
<ExtendedTooltip name="ЧисловоеПолеРасширеннаяПодсказка" id="15"/>
|
||||
</InputField>
|
||||
<InputField name="ПолеСКнопками" id="16">
|
||||
<DataPath>ПолеСКнопками</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -118,10 +131,10 @@
|
||||
<AutoChoiceIncomplete>true</AutoChoiceIncomplete>
|
||||
<ChoiceForm>DataProcessor.ПоляВвода.Form.Форма</ChoiceForm>
|
||||
<ChoiceHistoryOnInput>DontUse</ChoiceHistoryOnInput>
|
||||
<ContextMenu name="ПолеСКнопкамиКонтекстноеМеню" id="14"/>
|
||||
<ExtendedTooltip name="ПолеСКнопкамиРасширеннаяПодсказка" id="15"/>
|
||||
<ContextMenu name="ПолеСКнопкамиКонтекстноеМеню" id="17"/>
|
||||
<ExtendedTooltip name="ПолеСКнопкамиРасширеннаяПодсказка" id="18"/>
|
||||
</InputField>
|
||||
<InputField name="ПолеСписокВыбора" id="16">
|
||||
<InputField name="ПолеСписокВыбора" id="19">
|
||||
<DataPath>ПолеСписокВыбора</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -170,10 +183,10 @@
|
||||
</xr:Value>
|
||||
</xr:Item>
|
||||
</ChoiceList>
|
||||
<ContextMenu name="ПолеСписокВыбораКонтекстноеМеню" id="17"/>
|
||||
<ExtendedTooltip name="ПолеСписокВыбораРасширеннаяПодсказка" id="18"/>
|
||||
<ContextMenu name="ПолеСписокВыбораКонтекстноеМеню" id="20"/>
|
||||
<ExtendedTooltip name="ПолеСписокВыбораРасширеннаяПодсказка" id="21"/>
|
||||
</InputField>
|
||||
<InputField name="ПолеПодсказка" id="19">
|
||||
<InputField name="ПолеПодсказка" id="22">
|
||||
<DataPath>ПолеПодсказка</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -187,10 +200,10 @@
|
||||
<v8:content>Введите значение...</v8:content>
|
||||
</v8:item>
|
||||
</InputHint>
|
||||
<ContextMenu name="ПолеПодсказкаКонтекстноеМеню" id="20"/>
|
||||
<ExtendedTooltip name="ПолеПодсказкаРасширеннаяПодсказка" id="21"/>
|
||||
<ContextMenu name="ПолеПодсказкаКонтекстноеМеню" id="23"/>
|
||||
<ExtendedTooltip name="ПолеПодсказкаРасширеннаяПодсказка" id="24"/>
|
||||
</InputField>
|
||||
<InputField name="ПолеСвязи" id="22">
|
||||
<InputField name="ПолеСвязи" id="25">
|
||||
<DataPath>ПолеСвязи</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -249,10 +262,10 @@
|
||||
</app:value>
|
||||
</app:item>
|
||||
</ChoiceParameters>
|
||||
<ContextMenu name="ПолеСвязиКонтекстноеМеню" id="23"/>
|
||||
<ExtendedTooltip name="ПолеСвязиРасширеннаяПодсказка" id="24"/>
|
||||
<ContextMenu name="ПолеСвязиКонтекстноеМеню" id="26"/>
|
||||
<ExtendedTooltip name="ПолеСвязиРасширеннаяПодсказка" id="27"/>
|
||||
</InputField>
|
||||
<InputField name="ПолеСвязиКратко" id="25">
|
||||
<InputField name="ПолеСвязиКратко" id="28">
|
||||
<DataPath>ПолеСвязиКратко</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -311,10 +324,10 @@
|
||||
</app:value>
|
||||
</app:item>
|
||||
</ChoiceParameters>
|
||||
<ContextMenu name="ПолеСвязиКраткоКонтекстноеМеню" id="26"/>
|
||||
<ExtendedTooltip name="ПолеСвязиКраткоРасширеннаяПодсказка" id="27"/>
|
||||
<ContextMenu name="ПолеСвязиКраткоКонтекстноеМеню" id="29"/>
|
||||
<ExtendedTooltip name="ПолеСвязиКраткоРасширеннаяПодсказка" id="30"/>
|
||||
</InputField>
|
||||
<CheckBoxField name="Флаг" id="28">
|
||||
<CheckBoxField name="Флаг" id="31">
|
||||
<DataPath>Флаг</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -324,12 +337,12 @@
|
||||
</Title>
|
||||
<CheckBoxType>Auto</CheckBoxType>
|
||||
<TitleLocation>Right</TitleLocation>
|
||||
<ContextMenu name="ФлагКонтекстноеМеню" id="29"/>
|
||||
<ExtendedTooltip name="ФлагРасширеннаяПодсказка" id="30">
|
||||
<ContextMenu name="ФлагКонтекстноеМеню" id="32"/>
|
||||
<ExtendedTooltip name="ФлагРасширеннаяПодсказка" id="33">
|
||||
<Width>45</Width>
|
||||
</ExtendedTooltip>
|
||||
</CheckBoxField>
|
||||
<CheckBoxField name="ФлагПлатформенный" id="31">
|
||||
<CheckBoxField name="ФлагПлатформенный" id="34">
|
||||
<DataPath>ФлагПлатформенный</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -338,10 +351,10 @@
|
||||
</v8:item>
|
||||
</Title>
|
||||
<CheckBoxType>Auto</CheckBoxType>
|
||||
<ContextMenu name="ФлагПлатформенныйКонтекстноеМеню" id="32"/>
|
||||
<ExtendedTooltip name="ФлагПлатформенныйРасширеннаяПодсказка" id="33"/>
|
||||
<ContextMenu name="ФлагПлатформенныйКонтекстноеМеню" id="35"/>
|
||||
<ExtendedTooltip name="ФлагПлатформенныйРасширеннаяПодсказка" id="36"/>
|
||||
</CheckBoxField>
|
||||
<CheckBoxField name="ФлагЯвный" id="34">
|
||||
<CheckBoxField name="ФлагЯвный" id="37">
|
||||
<DataPath>ФлагЯвный</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -351,10 +364,10 @@
|
||||
</Title>
|
||||
<CheckBoxType>Auto</CheckBoxType>
|
||||
<TitleLocation>Top</TitleLocation>
|
||||
<ContextMenu name="ФлагЯвныйКонтекстноеМеню" id="35"/>
|
||||
<ExtendedTooltip name="ФлагЯвныйРасширеннаяПодсказка" id="36"/>
|
||||
<ContextMenu name="ФлагЯвныйКонтекстноеМеню" id="38"/>
|
||||
<ExtendedTooltip name="ФлагЯвныйРасширеннаяПодсказка" id="39"/>
|
||||
</CheckBoxField>
|
||||
<CheckBoxField name="ФлагТумблер" id="37">
|
||||
<CheckBoxField name="ФлагТумблер" id="40">
|
||||
<DataPath>ФлагТумблер</DataPath>
|
||||
<Title>
|
||||
<v8:item>
|
||||
@@ -370,18 +383,18 @@
|
||||
<v8:content>БЛ=Нет; БИ=Да</v8:content>
|
||||
</v8:item>
|
||||
</Format>
|
||||
<ContextMenu name="ФлагТумблерКонтекстноеМеню" id="38"/>
|
||||
<ExtendedTooltip name="ФлагТумблерРасширеннаяПодсказка" id="39"/>
|
||||
<ContextMenu name="ФлагТумблерКонтекстноеМеню" id="41"/>
|
||||
<ExtendedTooltip name="ФлагТумблерРасширеннаяПодсказка" id="42"/>
|
||||
</CheckBoxField>
|
||||
</ChildItems>
|
||||
<Attributes>
|
||||
<Attribute name="Объект" id="40">
|
||||
<Attribute name="Объект" id="43">
|
||||
<Type>
|
||||
<v8:Type>cfg:DataProcessorObject.ПоляВвода</v8:Type>
|
||||
</Type>
|
||||
<MainAttribute>true</MainAttribute>
|
||||
</Attribute>
|
||||
<Attribute name="ОбычноеПоле" id="41">
|
||||
<Attribute name="ОбычноеПоле" id="44">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -396,7 +409,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="МногострочноеПоле" id="42">
|
||||
<Attribute name="МногострочноеПоле" id="45">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -411,7 +424,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ПолеПароля" id="43">
|
||||
<Attribute name="ПолеПароля" id="46">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -426,7 +439,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ПолеСКнопками" id="44">
|
||||
<Attribute name="ПолеСКнопками" id="47">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -441,7 +454,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ПолеСписокВыбора" id="45">
|
||||
<Attribute name="ПолеСписокВыбора" id="48">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -456,7 +469,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ПолеПодсказка" id="46">
|
||||
<Attribute name="ПолеПодсказка" id="49">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -471,7 +484,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ПолеСвязи" id="47">
|
||||
<Attribute name="ПолеСвязи" id="50">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -486,7 +499,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ПолеСвязиКратко" id="48">
|
||||
<Attribute name="ПолеСвязиКратко" id="51">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -501,7 +514,7 @@
|
||||
</v8:StringQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="Флаг" id="49">
|
||||
<Attribute name="Флаг" id="52">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -512,7 +525,7 @@
|
||||
<v8:Type>xs:boolean</v8:Type>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ФлагПлатформенный" id="50">
|
||||
<Attribute name="ФлагПлатформенный" id="53">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -523,7 +536,7 @@
|
||||
<v8:Type>xs:boolean</v8:Type>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ФлагЯвный" id="51">
|
||||
<Attribute name="ФлагЯвный" id="54">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -534,7 +547,7 @@
|
||||
<v8:Type>xs:boolean</v8:Type>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ФлагТумблер" id="52">
|
||||
<Attribute name="ФлагТумблер" id="55">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
@@ -545,5 +558,21 @@
|
||||
<v8:Type>xs:boolean</v8:Type>
|
||||
</Type>
|
||||
</Attribute>
|
||||
<Attribute name="ЧисловоеПоле" id="56">
|
||||
<Title>
|
||||
<v8:item>
|
||||
<v8:lang>ru</v8:lang>
|
||||
<v8:content>Числовое поле</v8:content>
|
||||
</v8:item>
|
||||
</Title>
|
||||
<Type>
|
||||
<v8:Type>xs:decimal</v8:Type>
|
||||
<v8:NumberQualifiers>
|
||||
<v8:Digits>10</v8:Digits>
|
||||
<v8:FractionDigits>2</v8:FractionDigits>
|
||||
<v8:AllowedSign>Any</v8:AllowedSign>
|
||||
</v8:NumberQualifiers>
|
||||
</Type>
|
||||
</Attribute>
|
||||
</Attributes>
|
||||
</Form>
|
||||
|
||||
Reference in New Issue
Block a user