mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-29 16:11:01 +03:00
feat(form-compile): AutoMaxWidth=false по умолчанию для multiLine InputField
В реальных формах ERP/БП у ~60% многострочных полей ввода явно стоит АвтоМаксимальнаяШирина=Ложь. Теперь form-compile проставляет это автоматически при multiLine: true, если пользователь не задал autoMaxWidth явно. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
8ad5d80f7f
commit
b4514dc350
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.14 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.15 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -2051,7 +2051,12 @@ function Emit-Input {
|
||||
if ($el.dropListButton -eq $true) { X "$inner<DropListButton>true</DropListButton>" }
|
||||
if ($el.markIncomplete -eq $true) { X "$inner<AutoMarkIncomplete>true</AutoMarkIncomplete>" }
|
||||
if ($el.skipOnInput -eq $true) { X "$inner<SkipOnInput>true</SkipOnInput>" }
|
||||
if ($el.autoMaxWidth -eq $false) { X "$inner<AutoMaxWidth>false</AutoMaxWidth>" }
|
||||
$hasAmw = $el.PSObject.Properties.Name -contains 'autoMaxWidth'
|
||||
if ($hasAmw) {
|
||||
if ($el.autoMaxWidth -eq $false) { X "$inner<AutoMaxWidth>false</AutoMaxWidth>" }
|
||||
} elseif ($el.multiLine -eq $true) {
|
||||
X "$inner<AutoMaxWidth>false</AutoMaxWidth>"
|
||||
}
|
||||
if ($el.autoMaxHeight -eq $false) { X "$inner<AutoMaxHeight>false</AutoMaxHeight>" }
|
||||
if ($el.width) { X "$inner<Width>$($el.width)</Width>" }
|
||||
if ($el.height) { X "$inner<Height>$($el.height)</Height>" }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# form-compile v1.14 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.15 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
import argparse
|
||||
import copy
|
||||
@@ -1757,7 +1757,10 @@ def emit_input(lines, el, name, eid, indent):
|
||||
lines.append(f'{inner}<AutoMarkIncomplete>true</AutoMarkIncomplete>')
|
||||
if el.get('skipOnInput') is True:
|
||||
lines.append(f'{inner}<SkipOnInput>true</SkipOnInput>')
|
||||
if el.get('autoMaxWidth') is False:
|
||||
if 'autoMaxWidth' in el:
|
||||
if el['autoMaxWidth'] is False:
|
||||
lines.append(f'{inner}<AutoMaxWidth>false</AutoMaxWidth>')
|
||||
elif el.get('multiLine') is True:
|
||||
lines.append(f'{inner}<AutoMaxWidth>false</AutoMaxWidth>')
|
||||
if el.get('autoMaxHeight') is False:
|
||||
lines.append(f'{inner}<AutoMaxHeight>false</AutoMaxHeight>')
|
||||
|
||||
Reference in New Issue
Block a user