mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-10 13:33:21 +03:00
Replace hidden/disabled with visible/enabled in form DSL
Rename DSL keys to match 1C property names (Visible, Enabled): - form-compile/form-add: accept "visible": false and "enabled": false as primary keys, keep hidden/disabled as synonyms - form-info: output [visible:false] and [enabled:false] flags - Update SKILL.md docs and form-guide.md Improves round-trip consistency: form-info output now directly maps to form-compile/form-add input keys. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a9e59265dd
commit
d05199d048
@@ -254,8 +254,8 @@ function Emit-Companion {
|
||||
|
||||
function Emit-CommonFlags {
|
||||
param($el, [string]$indent)
|
||||
if ($el.hidden -eq $true) { X "$indent<Visible>false</Visible>" }
|
||||
if ($el.disabled -eq $true) { X "$indent<Enabled>false</Enabled>" }
|
||||
if ($el.visible -eq $false -or $el.hidden -eq $true) { X "$indent<Visible>false</Visible>" }
|
||||
if ($el.enabled -eq $false -or $el.disabled -eq $true) { X "$indent<Enabled>false</Enabled>" }
|
||||
if ($el.readOnly -eq $true) { X "$indent<ReadOnly>true</ReadOnly>" }
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ powershell.exe -NoProfile -File .claude\skills\form-compile\scripts\form-compile
|
||||
- `"name"` — переопределить имя (по умолчанию из значения ключа типа)
|
||||
- `"path"` — DataPath (привязка к данным)
|
||||
- `"title"` — заголовок
|
||||
- `"hidden": true` — Visible=false
|
||||
- `"disabled": true` — Enabled=false
|
||||
- `"visible": false` — Visible=false (скрыть элемент)
|
||||
- `"enabled": false` — Enabled=false (сделать недоступным)
|
||||
- `"readOnly": true` — ReadOnly=true
|
||||
- `"on": ["OnChange", "StartChoice"]` — события с автоименованием обработчиков
|
||||
|
||||
|
||||
@@ -295,8 +295,8 @@ function Emit-Element {
|
||||
|
||||
function Emit-CommonFlags {
|
||||
param($el, [string]$indent)
|
||||
if ($el.hidden -eq $true) { X "$indent<Visible>false</Visible>" }
|
||||
if ($el.disabled -eq $true) { X "$indent<Enabled>false</Enabled>" }
|
||||
if ($el.visible -eq $false -or $el.hidden -eq $true) { X "$indent<Visible>false</Visible>" }
|
||||
if ($el.enabled -eq $false -or $el.disabled -eq $true) { X "$indent<Enabled>false</Enabled>" }
|
||||
if ($el.readOnly -eq $true) { X "$indent<ReadOnly>true</ReadOnly>" }
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ Events:
|
||||
Elements:
|
||||
├─ [Group:AH] ГруппаШапка
|
||||
│ ├─ [Input] Организация -> Объект.Организация {OnChange}
|
||||
│ └─ [Input] Договор -> Объект.Договор [hidden] {StartChoice}
|
||||
│ └─ [Input] Договор -> Объект.Договор [visible:false] {StartChoice}
|
||||
├─ [Table] Товары -> Объект.Товары
|
||||
│ ├─ [Input] Номенклатура -> Объект.Товары.Номенклатура {OnChange}
|
||||
│ └─ [Input] Сумма -> Объект.Товары.Сумма [ro]
|
||||
@@ -105,8 +105,8 @@ Elements:
|
||||
| `[BtnGroup]` | ButtonGroup |
|
||||
|
||||
**Флаги** (только при отклонении от умолчания):
|
||||
- `[hidden]` — Visible=false
|
||||
- `[disabled]` — Enabled=false
|
||||
- `[visible:false]` — элемент скрыт (Visible=false)
|
||||
- `[enabled:false]` — элемент недоступен (Enabled=false)
|
||||
- `[ro]` — ReadOnly=true
|
||||
- `,collapse` — Behavior=Collapsible (для групп)
|
||||
|
||||
|
||||
@@ -149,9 +149,9 @@ function Get-EventsStr($node) {
|
||||
function Get-Flags($node) {
|
||||
$flags = @()
|
||||
$vis = $node.SelectSingleNode("d:Visible", $ns)
|
||||
if ($vis -and $vis.InnerText -eq "false") { $flags += "hidden" }
|
||||
if ($vis -and $vis.InnerText -eq "false") { $flags += "visible:false" }
|
||||
$en = $node.SelectSingleNode("d:Enabled", $ns)
|
||||
if ($en -and $en.InnerText -eq "false") { $flags += "disabled" }
|
||||
if ($en -and $en.InnerText -eq "false") { $flags += "enabled:false" }
|
||||
$ro = $node.SelectSingleNode("d:ReadOnly", $ns)
|
||||
if ($ro -and $ro.InnerText -eq "true") { $flags += "ro" }
|
||||
if ($flags.Count -eq 0) { return "" }
|
||||
|
||||
+2
-2
@@ -122,8 +122,8 @@ Claude сделает grep по Form.xml и найдёт полный XML-бло
|
||||
### Флаги
|
||||
|
||||
Показываются только при отклонении от умолчания:
|
||||
- `[hidden]` — элемент скрыт (Visible=false)
|
||||
- `[disabled]` — элемент недоступен (Enabled=false)
|
||||
- `[visible:false]` — элемент скрыт (Visible=false)
|
||||
- `[enabled:false]` — элемент недоступен (Enabled=false)
|
||||
- `[ro]` — только чтение (ReadOnly=true)
|
||||
- `,collapse` — сворачиваемая группа (Behavior=Collapsible)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user