From 5690c82ab8da05a4bdd8c477d2075c4db7416c50 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sun, 3 May 2026 18:45:00 +0300 Subject: [PATCH] =?UTF-8?q?docs(form-dsl-spec):=20radio=20(RadioButtonFiel?= =?UTF-8?q?d)=20=D0=B2=20=D1=81=D0=BF=D0=B5=D1=86=D0=B8=D1=84=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8=20DSL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/form-dsl-spec.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/form-dsl-spec.md b/docs/form-dsl-spec.md index e847354d..32e11c3b 100644 --- a/docs/form-dsl-spec.md +++ b/docs/form-dsl-spec.md @@ -199,6 +199,35 @@ | `path` | string | DataPath | | `titleLocation` | string | Расположение заголовка | +#### radio — RadioButtonField + +```json +{ + "radio": "СпособКурса", + "path": "Объект.СпособУстановкиКурса", + "radioButtonType": "Auto", + "choiceList": [ + { "value": "Enum.СпособыКурса.EnumValue.Авто", "presentation": "автоматически" }, + { "value": "Enum.СпособыКурса.EnumValue.Ручной", "presentation": { "ru": "вручную", "en": "manual" } } + ] +} +``` + +| Свойство | Тип | Описание | +|----------|-----|----------| +| `path` | string | DataPath | +| `radioButtonType` | string | `Auto` (по умолчанию), `RadioButtons`, `Tumbler` | +| `columnsCount` | int | Число колонок раскладки | +| `titleLocation` | string | Расположение заголовка (компилятор подставляет `None`, если не задан) | +| `choiceList` | array | Варианты выбора: массив `{ value, presentation }` | + +`choiceList[*]`: + +| Свойство | Тип | Описание | +|----------|-----|----------| +| `value` | string/number/bool | Значение варианта. Для перечисления — `"Enum.ИмяТипа.EnumValue.ИмяЗначения"` (xsi:type автоматически: `xr:DesignTimeRef` / `xs:string` / `xs:decimal` / `xs:boolean`) | +| `presentation` | string или object | Текст рядом с переключателем. Строка → ru; объект `{ru, en, ...}` → мультиязык. Если не задано — выводится из имени значения | + #### label — LabelDecoration ```json @@ -437,6 +466,7 @@ Pages поддерживает `pagesRepresentation`: `None`, `TabsOnTop`, `Tabs | UsualGroup | ExtendedTooltip | | InputField | ContextMenu, ExtendedTooltip | | CheckBoxField | ContextMenu, ExtendedTooltip | +| RadioButtonField | ContextMenu, ExtendedTooltip | | LabelDecoration | ContextMenu, ExtendedTooltip | | LabelField | ContextMenu, ExtendedTooltip | | PictureDecoration | ContextMenu, ExtendedTooltip |