diff --git a/.claude/skills/form-compile/scripts/form-compile.ps1 b/.claude/skills/form-compile/scripts/form-compile.ps1 index ddaf8d0f..6cfcce58 100644 --- a/.claude/skills/form-compile/scripts/form-compile.ps1 +++ b/.claude/skills/form-compile/scripts/form-compile.ps1 @@ -1,4 +1,4 @@ -# form-compile v1.111 — Compile 1C managed form from JSON or object metadata +# form-compile v1.112 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [string]$JsonPath, @@ -2822,19 +2822,23 @@ function Emit-CommonElementProps { if ($el.headerHorizontalAlign) { X "$indent$($el.headerHorizontalAlign)" } } -# Картинка-ссылка с прозрачностью (HeaderPicture/FooterPicture/ValuesPicture). +# Картинка-ссылка с прозрачностью (HeaderPicture/FooterPicture/ValuesPicture/Page Picture). # Платформа ВСЕГДА эмитит → пишем всегда (false по умолчанию). -# Значение: скаляр (Ref) ИЛИ объект {src, loadTransparent}. +# Значение: скаляр (Ref) ИЛИ объект {src, loadTransparent, transparentPixel}. +# src с префиксом "abs:" → встроенная картинка ; иначе именованная/стилевая . function Emit-PictureRef { param($val, [string]$picTag, [string]$indent) if (-not $val) { return } - $src = $null; $lt = $false + $src = $null; $lt = $false; $tpx = $null if ($val -is [string]) { $src = $val } - else { $src = $val.src; if ($val.loadTransparent -eq $true) { $lt = $true } } + else { $src = $val.src; if ($val.loadTransparent -eq $true) { $lt = $true }; $tpx = $val.transparentPixel } if (-not $src) { return } + $srcStr = "$src" X "$indent<$picTag>" - X "$indent`t$src" + if ($srcStr -match '^abs:(.*)$') { X "$indent`t$(Esc-Xml $matches[1])" } + else { X "$indent`t$(Esc-Xml $srcStr)" } X "$indent`t$(if ($lt) { 'true' } else { 'false' })" + if ($tpx) { X "$indent`t" } X "$indent" } @@ -2854,14 +2858,17 @@ function Emit-ColumnPics { function Emit-CommandPicture { param($pic, $elemLt, [string]$indent) if (-not $pic) { return } - $src = $null; $lt = $null + $src = $null; $lt = $null; $tpx = $null if ($pic -is [string]) { $src = $pic } - else { $src = $pic.src; if ($null -ne $pic.loadTransparent) { $lt = [bool]$pic.loadTransparent } } + else { $src = $pic.src; if ($null -ne $pic.loadTransparent) { $lt = [bool]$pic.loadTransparent }; $tpx = $pic.transparentPixel } if (-not $src) { return } if ($null -eq $lt -and $null -ne $elemLt) { $lt = [bool]$elemLt } + $srcStr = "$src" X "$indent" - X "$indent`t$src" + if ($srcStr -match '^abs:(.*)$') { X "$indent`t$(Esc-Xml $matches[1])" } + else { X "$indent`t$(Esc-Xml $srcStr)" } X "$indent`t$(if ($lt -eq $false) { 'false' } else { 'true' })" + if ($tpx) { X "$indent`t" } X "$indent" } @@ -4228,15 +4235,8 @@ function Emit-Table { if ($el.initialTreeView) { X "$inner$($el.initialTreeView)" } if ($null -ne $el.enableDrag) { X "$inner$(if ($el.enableDrag){'true'}else{'false'})" } if ($el.rowPictureDataPath) { X "$inner$($el.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" - X "$inner`t$rpSrc" - X "$inner`t$rpLt" - X "$inner" - } + # RowsPicture — та же конвенция, что ValuesPicture (дефолт LoadTransparent=false; abs/TransparentPixel) + Emit-PictureRef -val $el.rowsPicture -picTag 'RowsPicture' -indent $inner # Блок свойств дин-список-таблицы (помечена эвристикой 11b.4) if ($el.PSObject.Properties["_dynList"] -and $el._dynList) { Emit-DynListTableBlock -el $el -indent $inner } if ($el.viewStatusLocation) { X "$inner$($el.viewStatusLocation)" } @@ -4323,6 +4323,10 @@ function Emit-Page { Emit-Title -el $el -name $name -indent $inner -auto Emit-CommonFlags -el $el -indent $inner + # Картинка страницы (иконка вкладки): после Title/флагов, перед Group (порядок XSD). + # Конвенция как у ValuesPicture (дефолт LoadTransparent=false): скаляр-Ref/'abs:X' или объект. + Emit-PictureRef -val $el.picture -picTag 'Picture' -indent $inner + if ($el.group) { # Доступные значения страницы/обычной группы: Vertical / HorizontalIfPossible / AlwaysHorizontal # (InCell — только у columnGroup). Horizontal/AlwaysVertical оставлены forgiving (legacy). diff --git a/.claude/skills/form-compile/scripts/form-compile.py b/.claude/skills/form-compile/scripts/form-compile.py index e02c9c2c..0aa317f2 100644 --- a/.claude/skills/form-compile/scripts/form-compile.py +++ b/.claude/skills/form-compile/scripts/form-compile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# form-compile v1.111 — Compile 1C managed form from JSON or object metadata +# form-compile v1.112 — Compile 1C managed form from JSON or object metadata # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills import argparse import copy @@ -2577,21 +2577,30 @@ def emit_common_element_props(lines, el, indent): def emit_picture_ref(lines, val, pic_tag, indent): - """Картинка-ссылка с прозрачностью (HeaderPicture/FooterPicture/ValuesPicture). + """Картинка-ссылка с прозрачностью (HeaderPicture/FooterPicture/ValuesPicture/Page Picture). Платформа ВСЕГДА эмитит → пишем всегда (false по умолчанию). - Значение: скаляр (Ref) ИЛИ объект {src, loadTransparent}.""" + Значение: скаляр (Ref) ИЛИ объект {src, loadTransparent, transparentPixel}. + src с префиксом "abs:" → встроенная картинка ; иначе .""" if not val: return + tpx = None if isinstance(val, str): src, lt = val, False else: src = val.get('src') lt = val.get('loadTransparent') is True + tpx = val.get('transparentPixel') if not src: return + src_str = str(src) lines.append(f"{indent}<{pic_tag}>") - lines.append(f"{indent}\t{src}") + if src_str.startswith('abs:'): + lines.append(f"{indent}\t{esc_xml(src_str[4:])}") + else: + lines.append(f"{indent}\t{esc_xml(src_str)}") lines.append(f'{indent}\t{"true" if lt else "false"}') + if tpx: + lines.append(f'{indent}\t') lines.append(f"{indent}") @@ -2611,19 +2620,27 @@ def emit_command_picture(lines, pic, elem_lt, indent): if not pic: return lt = None + tpx = None if isinstance(pic, str): src = pic else: src = pic.get('src') if pic.get('loadTransparent') is not None: lt = bool(pic.get('loadTransparent')) + tpx = pic.get('transparentPixel') if not src: return if lt is None and elem_lt is not None: lt = bool(elem_lt) + src_str = str(src) lines.append(f'{indent}') - lines.append(f'{indent}\t{src}') + if src_str.startswith('abs:'): + lines.append(f'{indent}\t{esc_xml(src_str[4:])}') + else: + lines.append(f'{indent}\t{esc_xml(src_str)}') lines.append(f'{indent}\t{"false" if lt is False else "true"}') + if tpx: + lines.append(f'{indent}\t') lines.append(f'{indent}') @@ -3954,15 +3971,8 @@ def emit_table(lines, el, name, eid, indent): lines.append(f'{inner}{"true" if el["enableDrag"] else "false"}') if el.get('rowPictureDataPath'): lines.append(f'{inner}{el["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}') - lines.append(f'{inner}\t{rp_src}') - lines.append(f'{inner}\t{rp_lt}') - lines.append(f'{inner}') + # RowsPicture — та же конвенция, что ValuesPicture (дефолт LoadTransparent=false; abs/TransparentPixel) + emit_picture_ref(lines, el.get('rowsPicture'), 'RowsPicture', inner) # Блок свойств дин-список-таблицы (помечена эвристикой) if el.get('_dynList'): emit_dynlist_table_block(lines, el, inner) @@ -4043,6 +4053,10 @@ def emit_page(lines, el, name, eid, indent): emit_title(lines, el, name, inner, auto=True) emit_common_flags(lines, el, inner) + # Картинка страницы (иконка вкладки): после Title/флагов, перед Group (порядок XSD). + # Конвенция как у ValuesPicture (дефолт LoadTransparent=false): скаляр-Ref/'abs:X' или объект. + emit_picture_ref(lines, el.get('picture'), 'Picture', inner) + if el.get('group'): orientation_map = { 'horizontal': 'Horizontal', diff --git a/.claude/skills/form-decompile/scripts/form-decompile.ps1 b/.claude/skills/form-decompile/scripts/form-decompile.ps1 index b724efd1..5c1bfbef 100644 --- a/.claude/skills/form-decompile/scripts/form-decompile.ps1 +++ b/.claude/skills/form-decompile/scripts/form-decompile.ps1 @@ -1,4 +1,4 @@ -# form-decompile v0.87 — Decompile 1C managed Form.xml to JSON DSL (draft) +# form-decompile v0.88 — Decompile 1C managed Form.xml to JSON DSL (draft) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills # ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью. param( @@ -940,18 +940,49 @@ function Decompile-AttrColumn { } # Общие свойства элемента (visible/enabled/readonly/title/events) → в hash -# Картинка-ссылка с прозрачностью (HeaderPicture/FooterPicture/ValuesPicture). +# Картинка-ссылка с прозрачностью (HeaderPicture/FooterPicture/ValuesPicture/Page Picture). # Платформа ВСЕГДА эмитит (и true, и false) → дефолт DSL = false. -# Скаляр (Ref) при loadTransparent=false; объект {src,loadTransparent:true} при true. +# Источник: (именованная/стилевая) ИЛИ (встроенная → префикс "abs:"). +# Скаляр (src) при loadTransparent=false и без TransparentPixel; иначе объект +# {src, loadTransparent?, transparentPixel?}. function Get-PictureRef { param($node, [string]$picTag) $ref = $node.SelectSingleNode("lf:$picTag/xr:Ref", $ns) - if (-not $ref) { return $null } + $abs = $node.SelectSingleNode("lf:$picTag/xr:Abs", $ns) + if (-not $ref -and -not $abs) { return $null } + $src = if ($ref) { $ref.InnerText } else { "abs:$($abs.InnerText)" } $lt = $node.SelectSingleNode("lf:$picTag/xr:LoadTransparent", $ns) - if ($lt -and $lt.InnerText -eq 'true') { - return [ordered]@{ src = $ref.InnerText; loadTransparent = $true } + $ltTrue = ($lt -and $lt.InnerText -eq 'true') + $tpx = $node.SelectSingleNode("lf:$picTag/xr:TransparentPixel", $ns) + if (-not $ltTrue -and -not $tpx) { return $src } + $o = [ordered]@{ src = $src } + if ($ltTrue) { $o['loadTransparent'] = $true } + if ($tpx) { $o['transparentPixel'] = [ordered]@{ x = [int]$tpx.GetAttribute('x'); y = [int]$tpx.GetAttribute('y') } } + return $o +} + +# кнопки/попапа/команды. Дефолт LoadTransparent=true (обратная конвенция к header/values): +# фиксируем только отклонение false. Источник или (→ "abs:"). При наличии +# → объектная форма {src, loadTransparent?, transparentPixel}, иначе скаляр picture +# + отдельный loadTransparent:false. +function Set-CommandPicture { + param($obj, $node) + $ref = $node.SelectSingleNode("lf:Picture/xr:Ref", $ns) + $abs = $node.SelectSingleNode("lf:Picture/xr:Abs", $ns) + if (-not $ref -and -not $abs) { return } + $src = if ($ref) { $ref.InnerText } else { "abs:$($abs.InnerText)" } + $lt = $node.SelectSingleNode("lf:Picture/xr:LoadTransparent", $ns) + $ltFalse = ($lt -and $lt.InnerText -eq 'false') + $tpx = $node.SelectSingleNode("lf:Picture/xr:TransparentPixel", $ns) + if ($tpx) { + $o = [ordered]@{ src = $src } + if ($ltFalse) { $o['loadTransparent'] = $false } + $o['transparentPixel'] = [ordered]@{ x = [int]$tpx.GetAttribute('x'); y = [int]$tpx.GetAttribute('y') } + $obj['picture'] = $o + } else { + $obj['picture'] = $src + if ($ltFalse) { $obj['loadTransparent'] = $false } } - return $ref.InnerText } # Шрифт → строка-ref (если только ref+kind=StyleItem) или объект-атрибуты. @@ -1688,13 +1719,8 @@ function Decompile-Element { $soin = Get-Child $node 'SearchOnInput'; if ($soin) { $obj['searchOnInput'] = $soin } $mi = Get-Child $node 'AutoMarkIncomplete'; if ($null -ne $mi) { $obj['markIncomplete'] = ($mi -eq 'true') } $itv = Get-Child $node 'InitialTreeView'; if ($itv) { $obj['initialTreeView'] = $itv } - # 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 } - } + # RowsPicture — конвенция ValuesPicture (Ref/Abs + LoadTransparent дефолт false + TransparentPixel) + $rp = Get-PictureRef $node 'RowsPicture'; if ($null -ne $rp) { $obj['rowsPicture'] = $rp } $rpdp = Get-Child $node 'RowPictureDataPath' # --- Блок дин-список-таблицы (признак: дочерний ) --- if (Has-Child $node 'UpdateOnDataChange') { @@ -1736,6 +1762,8 @@ function Decompile-Element { $g = Get-Child $node 'Group' $gmap = @{ 'Horizontal'='horizontal'; 'Vertical'='vertical'; 'AlwaysHorizontal'='alwaysHorizontal'; 'AlwaysVertical'='alwaysVertical'; 'HorizontalIfPossible'='horizontalIfPossible' } if ($g -and $gmap.ContainsKey($g)) { $obj['group'] = $gmap[$g] } + # Картинка страницы (иконка вкладки) — конвенция ValuesPicture (дефолт LoadTransparent=false) + $pp = Get-PictureRef $node 'Picture'; if ($null -ne $pp) { $obj['picture'] = $pp } if ((Get-Child $node 'ShowTitle') -eq 'false') { $obj['showTitle'] = $false } $kids = Decompile-Children $node if ($kids) { $obj['children'] = $kids } @@ -1755,9 +1783,7 @@ function Decompile-Element { if ($type) { $tmap=@{'CommandBarButton'='commandBar';'UsualButton'='usual';'Hyperlink'='hyperlink';'CommandBarHyperlink'='hyperlink'}; if ($tmap.ContainsKey($type)) { $obj['type']=$tmap[$type] } else { $obj['type']=$type } } if ((Get-Child $node 'DefaultButton') -eq 'true') { $obj['defaultButton'] = $true } if ((Get-Child $node 'Check') -eq 'true') { $obj['checked'] = $true } - $ref = $node.SelectSingleNode("lf:Picture/xr:Ref", $ns); if ($ref) { $obj['picture'] = $ref.InnerText } - # Дефолт у picture кнопки/попапа = true → фиксируем только отклонение false (true опускаем) - $lt = $node.SelectSingleNode("lf:Picture/xr:LoadTransparent", $ns); if ($lt -and $lt.InnerText -eq 'false') { $obj['loadTransparent'] = $false } + Set-CommandPicture $obj $node $rep = Get-Child $node 'Representation'; if ($rep) { $obj['representation'] = $rep } $lic = Get-Child $node 'LocationInCommandBar'; if ($lic) { $obj['locationInCommandBar'] = $lic } } @@ -1781,9 +1807,7 @@ function Decompile-Element { 'Popup' { $obj[$key] = $name Add-CommonProps $obj $node $name - $ref = $node.SelectSingleNode("lf:Picture/xr:Ref", $ns); if ($ref) { $obj['picture'] = $ref.InnerText } - # Дефолт у picture кнопки/попапа = true → фиксируем только отклонение false (true опускаем) - $lt = $node.SelectSingleNode("lf:Picture/xr:LoadTransparent", $ns); if ($lt -and $lt.InnerText -eq 'false') { $obj['loadTransparent'] = $false } + Set-CommandPicture $obj $node $rep = Get-Child $node 'Representation'; if ($rep) { $obj['representation'] = $rep } $kids = Decompile-Children $node if ($kids) { $obj['children'] = $kids } @@ -2430,9 +2454,7 @@ if ($cmdsNode) { # Используемая таблица — ссылка по имени элемента-таблицы (Имя) $ate = Get-Child $c 'AssociatedTableElementId'; if ($ate) { $co['table'] = $ate } $sc = Get-Child $c 'Shortcut'; if ($sc) { $co['shortcut'] = $sc } - $ref = $c.SelectSingleNode("lf:Picture/xr:Ref", $ns); if ($ref) { $co['picture'] = $ref.InnerText } - # Дефолт у picture команды = true → фиксируем только отклонение false (true опускаем) - $lt = $c.SelectSingleNode("lf:Picture/xr:LoadTransparent", $ns); if ($lt -and $lt.InnerText -eq 'false') { $co['loadTransparent'] = $false } + Set-CommandPicture $co $c $rep = Get-Child $c 'Representation'; if ($rep) { $co['representation'] = $rep } [void]$cmds.Add($co) } diff --git a/docs/form-dsl-spec.md b/docs/form-dsl-spec.md index 452bb365..5ee71baf 100644 --- a/docs/form-dsl-spec.md +++ b/docs/form-dsl-spec.md @@ -284,17 +284,19 @@ companion-панели с собственным контентом. Оба не > Эти простые скаляры — pass-through (captured/emitted «как есть»), применимы там, где платформа их пишет. > `defaultItem`/`enableStartDrag`/`fileDragMode`/`skipOnInput` + cell-свойства (`showInHeader`/`showInFooter`/`autoCellHeight`/`footerHorizontalAlign`/`headerHorizontalAlign`/`headerPicture`/`footerPicture`) — общие для любого поля-колонки (input, label, picField, check). -#### Картинка-ссылка (`headerPicture`/`footerPicture`/`valuesPicture`) +#### Картинка-ссылка (`headerPicture`/`footerPicture`/`valuesPicture`/`rowsPicture`/Page `picture`) Картинка с флагом прозрачности. Два формата: ```json "headerPicture": "CommonPicture.Важность" // loadTransparent = false (частый случай) "headerPicture": { "src": "StdPicture.ExecuteTask", "loadTransparent": true } // отклонение +"valuesPicture": { "src": "abs:Picture.png", "transparentPixel": { "x": 7, "y": 3 } } // встроенная + прозрачный пиксель ``` - скаляр-строка — ссылка `StdPicture.*`/`CommonPicture.*`, `loadTransparent=false` (дефолт по корпусу: ~64% картинок); -- объект `{ src, loadTransparent: true }` — только когда нужен `true` (объектная форма существует ровно ради этого отклонения; флаг привязан к конкретной картинке, т.к. на одном поле их бывает несколько). +- префикс `abs:` в `src` (напр. `"abs:Picture.png"`) → встроенная картинка `` (бинарь хранится в самой форме); +- объект `{ src, loadTransparent?, transparentPixel? }` — когда нужен `loadTransparent: true` и/или `transparentPixel: { x, y }` (координаты пикселя фона прозрачности). > Не путать с `loadTransparent` у `` кнопки/команды/попапа (§«button»/§7) — там обратная конвенция (дефолт `true`, отдельный скаляр-ключ на элементе). @@ -548,7 +550,7 @@ companion-панели с собственным контентом. Оба не | `rowSelectionMode` | string | Режим выделения строки (`Row`, …) | | `verticalLines` / `horizontalLines` | bool | Линии сетки (эмитится явное `false`) | | `initialTreeView` | string | `ExpandTopLevel`, `ExpandAllLevels`, `NoExpand` | -| `rowsPicture` | string \| object | Картинка строк (``). Строка = `CommonPicture.X` (LoadTransparent дефолт `false`); объект `{ src, loadTransparent }` — для явной прозрачности (`loadTransparent: true`) | +| `rowsPicture` | string \| object | Картинка строк (``). Формат «картинка-ссылка» из §4.1 (скаляр-Ref/`abs:X` или объект `{ src, loadTransparent?, transparentPixel? }`, дефолт `loadTransparent=false`) | | `height` | int | Высота элемента таблицы (``, как у прочих элементов) | | `heightInTableRows` | int | Высота в строках (``) — отдельное свойство от `height`; таблица может нести оба | | `header` | bool | Показывать шапку | @@ -640,6 +642,7 @@ companion-панели с собственным контентом. Оба не ``` Page поддерживает `group` для задания ориентации содержимого и `children` для вложенных элементов. +Также `picture` — картинка-иконка вкладки (формат «картинка-ссылка» из §4.1: скаляр-Ref/`abs:X` или объект `{src, loadTransparent?, transparentPixel?}`, дефолт `loadTransparent=false`). Pages поддерживает `pagesRepresentation`: `None`, `TabsOnTop`, `TabsOnBottom`, `TabsOnLeft`, `TabsOnRight`. @@ -657,7 +660,7 @@ Pages поддерживает `pagesRepresentation`: `None`, `TabsOnTop`, `Tabs | `type` | string | `usual`, `hyperlink`, `commandBar` | | `defaultButton` | bool | Кнопка по умолчанию | | `checked` | bool | Пометка (нажатое состояние toggle-кнопки командной панели) → `true`. Платформа эмитит только `true`. Ключ `checked` (не `check` — `check` — тип-ключ ПоляФлажка) | -| `picture` | string \| object | Ссылка на картинку (`StdPicture.Name`). Скаляр-строка ИЛИ объект `{src, loadTransparent}` (прощающий ввод — флаг можно задать прямо в объекте) | +| `picture` | string \| object | Ссылка на картинку (`StdPicture.Name`; префикс `abs:` → встроенная ``). Скаляр-строка ИЛИ объект `{src, loadTransparent?, transparentPixel?}` (флаг и прозрачный пиксель `{x,y}` можно задать прямо в объекте) | | `loadTransparent` | bool | Загружать картинку прозрачной (у `` кнопки/команды/попапа). **Дефолт `true`** (эмитится всегда; `false` — явно). Элемент-уровневый ключ ИЛИ поле объекта `picture`. Также у `command` (§7) и `popup`. ⚠️ Полярность обратна `headerPicture`/`valuesPicture` (там дефолт `false`, см. §4.1) | | `path` | string | DataPath кнопки общей команды (`Объект.Ref`, `Items.X.CurrentData.Поле`) — привязка к контексту | | `representation` | string | `Auto`, `Picture`, `Text`, `PictureAndText` | @@ -1016,7 +1019,7 @@ Forgiving-синонимы типа: XML-имя (`SpreadSheetDocumentField`) и | `table` | string | Используемая таблица — имя элемента-таблицы формы (`Имя`). Команда работает в контексте этой таблицы (текущая строка). Forgiving-синонимы: `associatedTableElementId` (XML-тег), `ИспользуемаяТаблица` (рус., регистро-/пробело-независимо) | | `modifiesSavedData` | bool | Команда изменяет сохраняемые данные (``); эмитится только `true` | | `shortcut` | string | Клавиатурное сочетание | -| `picture` | string | Ссылка на картинку | +| `picture` | string \| object | Ссылка на картинку (`StdPicture.Name`; `abs:X` → ``). Скаляр ИЛИ объект `{src, loadTransparent?, transparentPixel?}` (как у `button`, §«button») | | `representation` | string | `Auto`, `Picture`, `Text`, `PictureAndText` | --- diff --git a/tests/skills/cases/form-compile/commands.json b/tests/skills/cases/form-compile/commands.json index 32b49b92..b73a174a 100644 --- a/tests/skills/cases/form-compile/commands.json +++ b/tests/skills/cases/form-compile/commands.json @@ -28,7 +28,7 @@ { "name": "Результат", "type": "string" } ], "commands": [ - { "name": "Выполнить", "action": "ВыполнитьОбработка", "shortcut": "Ctrl+Enter", "use": false, "modifiesSavedData": true } + { "name": "Выполнить", "action": "ВыполнитьОбработка", "shortcut": "Ctrl+Enter", "use": false, "modifiesSavedData": true, "picture": { "src": "StdPicture.ExecuteTask", "transparentPixel": { "x": 1, "y": 1 } } } ], "commandInterface": { "commandBar": { diff --git a/tests/skills/cases/form-compile/pages.json b/tests/skills/cases/form-compile/pages.json index 78234823..9b413c4e 100644 --- a/tests/skills/cases/form-compile/pages.json +++ b/tests/skills/cases/form-compile/pages.json @@ -18,10 +18,10 @@ "properties": { "autoTitle": false }, "elements": [ { "pages": "СтраницыМастера", "pagesRepresentation": "None", "tooltip": "Страницы мастера настройки", "children": [ - { "page": "Шаг1", "title": "", "showTitle": false, "children": [ + { "page": "Шаг1", "title": "", "showTitle": false, "picture": "StdPicture.ExecuteTask", "children": [ { "input": "Параметр1", "path": "Параметр1" } ]}, - { "page": "Шаг2", "title": "Результат", "titleDataPath": "Итог", "tooltip": "Шаг \"Результат\"", "group": "horizontalIfPossible", "children": [ + { "page": "Шаг2", "title": "Результат", "titleDataPath": "Итог", "tooltip": "Шаг \"Результат\"", "group": "horizontalIfPossible", "picture": { "src": "StdPicture.FilterCriterion", "loadTransparent": true, "transparentPixel": { "x": 2, "y": 4 } }, "children": [ { "input": "Итог", "path": "Итог", "readOnly": true } ]} ]}, diff --git a/tests/skills/cases/form-compile/picture-field.json b/tests/skills/cases/form-compile/picture-field.json index 60a4ee4b..95977fb8 100644 --- a/tests/skills/cases/form-compile/picture-field.json +++ b/tests/skills/cases/form-compile/picture-field.json @@ -20,7 +20,7 @@ "on": ["Selection"], "handlers": { "Selection": "ТаблицаДанныхВыбор" }, "columns": [ { "input": "ТаблицаДанныхНоменклатура", "path": "ТаблицаДанных.Номенклатура" }, - { "picField": "ТаблицаДанныхКартинка", "path": "ТаблицаДанных.Картинка", "titleLocation": "none", "editMode": "EnterOnInput", "hyperlink": true, "shortcut": "Ctrl+S", "headerPicture": "StdPicture.ExecuteTask", "valuesPicture": { "src": "StdPicture.FilterCriterion", "loadTransparent": true } }, + { "picField": "ТаблицаДанныхКартинка", "path": "ТаблицаДанных.Картинка", "titleLocation": "none", "editMode": "EnterOnInput", "hyperlink": true, "shortcut": "Ctrl+S", "headerPicture": "StdPicture.ExecuteTask", "valuesPicture": { "src": "StdPicture.FilterCriterion", "loadTransparent": true, "transparentPixel": { "x": 7, "y": 3 } } }, { "check": "ТаблицаДанныхКартинкаФлаг", "path": "ТаблицаДанных.Картинка", "title": "Флаг", "headerPicture": { "src": "StdPicture.ClearFilter", "loadTransparent": true } } ]} ], diff --git a/tests/skills/cases/form-compile/snapshots/commands/DataProcessors/Команды/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/commands/DataProcessors/Команды/Forms/Форма/Ext/Form.xml index 8ecea3e5..1a2d59a1 100644 --- a/tests/skills/cases/form-compile/snapshots/commands/DataProcessors/Команды/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/commands/DataProcessors/Команды/Forms/Форма/Ext/Form.xml @@ -88,6 +88,11 @@ ВыполнитьОбработка true Ctrl+Enter + + StdPicture.ExecuteTask + true + + diff --git a/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml index 3dc54417..cbf9e218 100644 --- a/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/pages/DataProcessors/Мастер/Forms/Форма/Ext/Form.xml @@ -20,6 +20,10 @@ + + StdPicture.ExecuteTask + false + false @@ -43,6 +47,11 @@ Шаг "Результат" + + StdPicture.FilterCriterion + true + + HorizontalIfPossible Итог diff --git a/tests/skills/cases/form-compile/snapshots/picture-field/DataProcessors/КартинкаВСтроке/Forms/Форма/Ext/Form.xml b/tests/skills/cases/form-compile/snapshots/picture-field/DataProcessors/КартинкаВСтроке/Forms/Форма/Ext/Form.xml index fbdc88b5..dc3ebb82 100644 --- a/tests/skills/cases/form-compile/snapshots/picture-field/DataProcessors/КартинкаВСтроке/Forms/Форма/Ext/Form.xml +++ b/tests/skills/cases/form-compile/snapshots/picture-field/DataProcessors/КартинкаВСтроке/Forms/Форма/Ext/Form.xml @@ -57,6 +57,7 @@ StdPicture.FilterCriterion true +