mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-30 16:36:56 +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
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[string]$JsonPath,
|
[string]$JsonPath,
|
||||||
@@ -2051,7 +2051,12 @@ function Emit-Input {
|
|||||||
if ($el.dropListButton -eq $true) { X "$inner<DropListButton>true</DropListButton>" }
|
if ($el.dropListButton -eq $true) { X "$inner<DropListButton>true</DropListButton>" }
|
||||||
if ($el.markIncomplete -eq $true) { X "$inner<AutoMarkIncomplete>true</AutoMarkIncomplete>" }
|
if ($el.markIncomplete -eq $true) { X "$inner<AutoMarkIncomplete>true</AutoMarkIncomplete>" }
|
||||||
if ($el.skipOnInput -eq $true) { X "$inner<SkipOnInput>true</SkipOnInput>" }
|
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.autoMaxHeight -eq $false) { X "$inner<AutoMaxHeight>false</AutoMaxHeight>" }
|
||||||
if ($el.width) { X "$inner<Width>$($el.width)</Width>" }
|
if ($el.width) { X "$inner<Width>$($el.width)</Width>" }
|
||||||
if ($el.height) { X "$inner<Height>$($el.height)</Height>" }
|
if ($el.height) { X "$inner<Height>$($el.height)</Height>" }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/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
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
import argparse
|
import argparse
|
||||||
import copy
|
import copy
|
||||||
@@ -1757,7 +1757,10 @@ def emit_input(lines, el, name, eid, indent):
|
|||||||
lines.append(f'{inner}<AutoMarkIncomplete>true</AutoMarkIncomplete>')
|
lines.append(f'{inner}<AutoMarkIncomplete>true</AutoMarkIncomplete>')
|
||||||
if el.get('skipOnInput') is True:
|
if el.get('skipOnInput') is True:
|
||||||
lines.append(f'{inner}<SkipOnInput>true</SkipOnInput>')
|
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>')
|
lines.append(f'{inner}<AutoMaxWidth>false</AutoMaxWidth>')
|
||||||
if el.get('autoMaxHeight') is False:
|
if el.get('autoMaxHeight') is False:
|
||||||
lines.append(f'{inner}<AutoMaxHeight>false</AutoMaxHeight>')
|
lines.append(f'{inner}<AutoMaxHeight>false</AutoMaxHeight>')
|
||||||
|
|||||||
+1
@@ -28,6 +28,7 @@
|
|||||||
<DataPath>Результат</DataPath>
|
<DataPath>Результат</DataPath>
|
||||||
<ReadOnly>true</ReadOnly>
|
<ReadOnly>true</ReadOnly>
|
||||||
<MultiLine>true</MultiLine>
|
<MultiLine>true</MultiLine>
|
||||||
|
<AutoMaxWidth>false</AutoMaxWidth>
|
||||||
<Height>8</Height>
|
<Height>8</Height>
|
||||||
<ContextMenu name="РезультатКонтекстноеМеню" id="7"/>
|
<ContextMenu name="РезультатКонтекстноеМеню" id="7"/>
|
||||||
<ExtendedTooltip name="РезультатРасширеннаяПодсказка" id="8"/>
|
<ExtendedTooltip name="РезультатРасширеннаяПодсказка" id="8"/>
|
||||||
|
|||||||
+1
@@ -54,6 +54,7 @@
|
|||||||
</Title>
|
</Title>
|
||||||
<ReadOnly>true</ReadOnly>
|
<ReadOnly>true</ReadOnly>
|
||||||
<MultiLine>true</MultiLine>
|
<MultiLine>true</MultiLine>
|
||||||
|
<AutoMaxWidth>false</AutoMaxWidth>
|
||||||
<Height>8</Height>
|
<Height>8</Height>
|
||||||
<ContextMenu name="РезультатКонтекстноеМеню" id="10"/>
|
<ContextMenu name="РезультатКонтекстноеМеню" id="10"/>
|
||||||
<ExtendedTooltip name="РезультатРасширеннаяПодсказка" id="11"/>
|
<ExtendedTooltip name="РезультатРасширеннаяПодсказка" id="11"/>
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@
|
|||||||
</v8:item>
|
</v8:item>
|
||||||
</Title>
|
</Title>
|
||||||
<MultiLine>true</MultiLine>
|
<MultiLine>true</MultiLine>
|
||||||
|
<AutoMaxWidth>false</AutoMaxWidth>
|
||||||
<Height>5</Height>
|
<Height>5</Height>
|
||||||
<ContextMenu name="МногострочноеПолеКонтекстноеМеню" id="5"/>
|
<ContextMenu name="МногострочноеПолеКонтекстноеМеню" id="5"/>
|
||||||
<ExtendedTooltip name="МногострочноеПолеРасширеннаяПодсказка" id="6"/>
|
<ExtendedTooltip name="МногострочноеПолеРасширеннаяПодсказка" id="6"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user