feat(form-decompile,form-compile): choiceList у InputField (переиспользование радио)

ChoiceList (<ChoiceList>) встречается на RadioButtonField (уже было) и InputField
(2142 в корпусе) — не захватывался у InputField. Логику вынесли в общие хелперы
Emit-ChoiceList / Decompile-ChoiceList (PS1) и emit_choice_list (PY), подключили к
обоим полям. Грамматика та же: [ { value, presentation?/title? } ] (+ рус. синонимы),
авто-вывод presentation. Порядок в InputField: после input-свойств/InputHint, до companions.

TOTAL diff lines выборки 2.17: 5149 → 4443 (-706). InputField>ChoiceList закрыт
(остаток ~5 — другое: app:value в app-неймспейсе = списки выбора параметров/настроек;
ChoiceListButton = отдельное input-свойство). Снапшот input-fields сертифицирован в 1С
(8.3.24). Регресс form-compile 33/33 зелёный на ps + python. decompile v0.33, compile v1.51.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-06 22:33:32 +03:00
parent 7eb825b3a7
commit daf7f1526a
6 changed files with 209 additions and 128 deletions
@@ -21,6 +21,10 @@
{ "input": "МногострочноеПоле", "path": "МногострочноеПоле", "multiLine": true, "height": 5, "title": "Комментарий" },
{ "input": "ПолеПароля", "path": "ПолеПароля", "passwordMode": true, "title": "Пароль" },
{ "input": "ПолеСКнопками", "path": "ПолеСКнопками", "choiceButton": true, "clearButton": true, "title": "Выбор" },
{ "input": "ПолеСписокВыбора", "path": "ПолеСписокВыбора", "title": "Список выбора", "choiceList": [
{ "value": "Первый" },
{ "value": "Второй", "presentation": "Второй вариант" }
]},
{ "input": "ПолеПодсказка", "path": "ПолеПодсказка", "inputHint": "Введите значение...", "title": "Подсказка" },
{ "check": "Флаг", "path": "Флаг", "title": "Включено" },
{ "check": "ФлагПлатформенный", "path": "ФлагПлатформенный", "title": "Слева", "titleLocation": "" },
@@ -33,6 +37,7 @@
{ "name": "МногострочноеПоле", "type": "string" },
{ "name": "ПолеПароля", "type": "string(50)" },
{ "name": "ПолеСКнопками", "type": "string" },
{ "name": "ПолеСписокВыбора", "type": "string" },
{ "name": "ПолеПодсказка", "type": "string" },
{ "name": "Флаг", "type": "boolean" },
{ "name": "ФлагПлатформенный", "type": "boolean" },
@@ -73,7 +73,46 @@
<ContextMenu name="ПолеСКнопкамиКонтекстноеМеню" id="14"/>
<ExtendedTooltip name="ПолеСКнопкамиРасширеннаяПодсказка" id="15"/>
</InputField>
<InputField name="ПолеПодсказка" id="16">
<InputField name="ПолеСписокВыбора" id="16">
<DataPath>ПолеСписокВыбора</DataPath>
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Список выбора</v8:content>
</v8:item>
</Title>
<ChoiceList>
<xr:Item>
<xr:Presentation/>
<xr:CheckState>0</xr:CheckState>
<xr:Value xsi:type="FormChoiceListDesTimeValue">
<Presentation>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Первый</v8:content>
</v8:item>
</Presentation>
<Value xsi:type="xs:string">Первый</Value>
</xr:Value>
</xr:Item>
<xr:Item>
<xr:Presentation/>
<xr:CheckState>0</xr:CheckState>
<xr:Value xsi:type="FormChoiceListDesTimeValue">
<Presentation>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Второй вариант</v8:content>
</v8:item>
</Presentation>
<Value xsi:type="xs:string">Второй</Value>
</xr:Value>
</xr:Item>
</ChoiceList>
<ContextMenu name="ПолеСписокВыбораКонтекстноеМеню" id="17"/>
<ExtendedTooltip name="ПолеСписокВыбораРасширеннаяПодсказка" id="18"/>
</InputField>
<InputField name="ПолеПодсказка" id="19">
<DataPath>ПолеПодсказка</DataPath>
<Title>
<v8:item>
@@ -87,10 +126,10 @@
<v8:content>Введите значение...</v8:content>
</v8:item>
</InputHint>
<ContextMenu name="ПолеПодсказкаКонтекстноеМеню" id="17"/>
<ExtendedTooltip name="ПолеПодсказкаРасширеннаяПодсказка" id="18"/>
<ContextMenu name="ПолеПодсказкаКонтекстноеМеню" id="20"/>
<ExtendedTooltip name="ПолеПодсказкаРасширеннаяПодсказка" id="21"/>
</InputField>
<CheckBoxField name="Флаг" id="19">
<CheckBoxField name="Флаг" id="22">
<DataPath>Флаг</DataPath>
<Title>
<v8:item>
@@ -100,10 +139,10 @@
</Title>
<CheckBoxType>Auto</CheckBoxType>
<TitleLocation>Right</TitleLocation>
<ContextMenu name="ФлагКонтекстноеМеню" id="20"/>
<ExtendedTooltip name="ФлагРасширеннаяПодсказка" id="21"/>
<ContextMenu name="ФлагКонтекстноеМеню" id="23"/>
<ExtendedTooltip name="ФлагРасширеннаяПодсказка" id="24"/>
</CheckBoxField>
<CheckBoxField name="ФлагПлатформенный" id="22">
<CheckBoxField name="ФлагПлатформенный" id="25">
<DataPath>ФлагПлатформенный</DataPath>
<Title>
<v8:item>
@@ -112,10 +151,10 @@
</v8:item>
</Title>
<CheckBoxType>Auto</CheckBoxType>
<ContextMenu name="ФлагПлатформенныйКонтекстноеМеню" id="23"/>
<ExtendedTooltip name="ФлагПлатформенныйРасширеннаяПодсказка" id="24"/>
<ContextMenu name="ФлагПлатформенныйКонтекстноеМеню" id="26"/>
<ExtendedTooltip name="ФлагПлатформенныйРасширеннаяПодсказка" id="27"/>
</CheckBoxField>
<CheckBoxField name="ФлагЯвный" id="25">
<CheckBoxField name="ФлагЯвный" id="28">
<DataPath>ФлагЯвный</DataPath>
<Title>
<v8:item>
@@ -125,10 +164,10 @@
</Title>
<CheckBoxType>Auto</CheckBoxType>
<TitleLocation>Top</TitleLocation>
<ContextMenu name="ФлагЯвныйКонтекстноеМеню" id="26"/>
<ExtendedTooltip name="ФлагЯвныйРасширеннаяПодсказка" id="27"/>
<ContextMenu name="ФлагЯвныйКонтекстноеМеню" id="29"/>
<ExtendedTooltip name="ФлагЯвныйРасширеннаяПодсказка" id="30"/>
</CheckBoxField>
<CheckBoxField name="ФлагТумблер" id="28">
<CheckBoxField name="ФлагТумблер" id="31">
<DataPath>ФлагТумблер</DataPath>
<Title>
<v8:item>
@@ -138,18 +177,18 @@
</Title>
<CheckBoxType>Switcher</CheckBoxType>
<TitleLocation>Right</TitleLocation>
<ContextMenu name="ФлагТумблерКонтекстноеМеню" id="29"/>
<ExtendedTooltip name="ФлагТумблерРасширеннаяПодсказка" id="30"/>
<ContextMenu name="ФлагТумблерКонтекстноеМеню" id="32"/>
<ExtendedTooltip name="ФлагТумблерРасширеннаяПодсказка" id="33"/>
</CheckBoxField>
</ChildItems>
<Attributes>
<Attribute name="Объект" id="31">
<Attribute name="Объект" id="34">
<Type>
<v8:Type>cfg:DataProcessorObject.ПоляВвода</v8:Type>
</Type>
<MainAttribute>true</MainAttribute>
</Attribute>
<Attribute name="ОбычноеПоле" id="32">
<Attribute name="ОбычноеПоле" id="35">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -164,7 +203,7 @@
</v8:StringQualifiers>
</Type>
</Attribute>
<Attribute name="МногострочноеПоле" id="33">
<Attribute name="МногострочноеПоле" id="36">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -179,7 +218,7 @@
</v8:StringQualifiers>
</Type>
</Attribute>
<Attribute name="ПолеПароля" id="34">
<Attribute name="ПолеПароля" id="37">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -194,7 +233,7 @@
</v8:StringQualifiers>
</Type>
</Attribute>
<Attribute name="ПолеСКнопками" id="35">
<Attribute name="ПолеСКнопками" id="38">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -209,7 +248,22 @@
</v8:StringQualifiers>
</Type>
</Attribute>
<Attribute name="ПолеПодсказка" id="36">
<Attribute name="ПолеСписокВыбора" id="39">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Поле список выбора</v8:content>
</v8:item>
</Title>
<Type>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</Type>
</Attribute>
<Attribute name="ПолеПодсказка" id="40">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -224,7 +278,7 @@
</v8:StringQualifiers>
</Type>
</Attribute>
<Attribute name="Флаг" id="37">
<Attribute name="Флаг" id="41">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -235,7 +289,7 @@
<v8:Type>xs:boolean</v8:Type>
</Type>
</Attribute>
<Attribute name="ФлагПлатформенный" id="38">
<Attribute name="ФлагПлатформенный" id="42">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -246,7 +300,7 @@
<v8:Type>xs:boolean</v8:Type>
</Type>
</Attribute>
<Attribute name="ФлагЯвный" id="39">
<Attribute name="ФлагЯвный" id="43">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
@@ -257,7 +311,7 @@
<v8:Type>xs:boolean</v8:Type>
</Type>
</Attribute>
<Attribute name="ФлагТумблер" id="40">
<Attribute name="ФлагТумблер" id="44">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>