feat(mxl-compile,mxl-decompile,mxl-validate): ячейки-поля ввода

Тип значения ячейки и элемент управления переживают цикл компиляции и
декомпиляции. Макет стенда с полями ввода собирается из своего же JSON
байт в байт.

DSL: два ключа ячейки — valueType (грамматика типа семьи: примитивы с
квалификаторами, ссылочные типы, категории целиком, составной через " + ")
и control (input/checkbox, синонимы, GUID для неизвестных элементов, none
для формата вовсе без тега). containsValue отдельным ключом не выражается:
он выводится из наличия типа. Текст и шаблон в такой ячейке запрещены,
параметр и расшифровка допустимы.

Умолчания голых типов взяты платформенные (строка без длины безлимитна,
число без параметров без ограничения разрядности), поэтому эмиттер типа
свой, а не копия meta-compile; resolve_type_str скопирован из эталона
семьи и объявлен в реестре дрейфа. Канон типа в ключе дедупликации
палитры развёрнут: иначе разные написания одного типа дали бы две
одинаковые записи формата и сдвинули бы все ссылки ячеек.

mxl-validate: проверка согласованности таких форматов — тип без признака
значения, ячейка с текстом и значением одновременно, посторонний тег
внутри типа, формат значения у строки или колонки, неизвестный GUID
элемента управления.

Попутно сведены два расхождения портов mxl-validate: py молчал там, где
ps1 писал строку об отсутствии шрифтов, и шапка подробного вывода
печаталась в разной форме.

Версии сведены: mxl-compile 1.41 в обоих портах (было 1.40/1.39).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-08-14 22:21:59 +03:00
co-authored by Claude Opus 5
parent 83bb5b6fd3
commit 7f743b18a9
37 changed files with 2471 additions and 26 deletions
@@ -0,0 +1,14 @@
{
"name": "Ошибка: неизвестный элемент управления",
"input": {
"columns": 1,
"areas": [
{
"name": "Ввод",
"rows": [{ "cells": [{ "col": 1, "valueType": "Boolean", "control": "кнопка" }] }]
}
]
},
"params": { "outputPath": "Template.xml" },
"expectError": "Unknown 'control' value \"кнопка\" (area \"Ввод\"). Allowed: input, checkbox, none or a GUID"
}
@@ -0,0 +1,14 @@
{
"name": "Ошибка: неизвестный тип значения (голое имя не становится множеством типов)",
"input": {
"columns": 1,
"areas": [
{
"name": "Ввод",
"rows": [{ "cells": [{ "col": 1, "valueType": "Boolen" }] }]
}
]
},
"params": { "outputPath": "Template.xml" },
"expectError": "Unknown value type \"Boolen\" (area \"Ввод\")"
}
@@ -0,0 +1,14 @@
{
"name": "Ошибка: control без valueType",
"input": {
"columns": 1,
"areas": [
{
"name": "Ввод",
"rows": [{ "cells": [{ "col": 1, "control": "checkbox" }] }]
}
]
},
"params": { "outputPath": "Template.xml" },
"expectError": "Cell 'control' requires 'valueType' (area \"Ввод\")"
}
@@ -0,0 +1,14 @@
{
"name": "Ошибка: составной тип с двумя строками (блок квалификаторов один)",
"input": {
"columns": 1,
"areas": [
{
"name": "Ввод",
"rows": [{ "cells": [{ "col": 1, "valueType": "String(10) + String(20)" }] }]
}
]
},
"params": { "outputPath": "Template.xml" },
"expectError": "Duplicate type \"String(20,variable)\" in composite value type (area \"Ввод\")"
}
@@ -0,0 +1,14 @@
{
"name": "Ошибка: ячейка со значением несёт текст",
"input": {
"columns": 1,
"areas": [
{
"name": "Ввод",
"rows": [{ "cells": [{ "col": 1, "valueType": "Boolean", "text": "Да" }] }]
}
]
},
"params": { "outputPath": "Template.xml" },
"expectError": "Cell with 'valueType' cannot have 'text' or 'template' (area \"Ввод\")"
}
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
<languageInfo>
<id>en</id>
<code>Английский</code>
<description>Английский</description>
</languageInfo>
</languageSettings>
<columns>
<size>3</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>3</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>1</index>
<row>
<c>
<c>
<f>4</f>
</c>
</c>
<c>
<c>
<f>5</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>2</index>
<row>
<c>
<c>
<f>3</f>
</c>
</c>
<c>
<c>
<f>6</f>
</c>
</c>
<c>
<c>
<f>7</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>3</index>
<row>
<c>
<c>
<f>8</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>4</index>
<row>
<c>
<c>
<f>9</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>5</index>
<row>
<c>
<c>
<f>10</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>6</index>
<row>
<c>
<c>
<f>11</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>12</defaultFormatIndex>
<height>7</height>
<vgRows>7</vgRows>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>15</v8:Digits>
<v8:FractionDigits>3</v8:FractionDigits>
<v8:AllowedSign>Nonnegative</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>0</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>35af3d93-d7c7-4a2e-a8eb-bac87a1a3f26</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>10</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>10</v8:Length>
<v8:AllowedLength>Fixed</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef.Валюты</v8:Type>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
<v8:Type xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef.ГорячиеКлавиши</v8:Type>
<v8:Type>xs:string</v8:Type>
<v8:Type>xs:dateTime</v8:Type>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>0</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
<v8:DateQualifiers>
<v8:DateFractions>DateTime</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:DocumentRef</v8:TypeSet>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef</v8:TypeSet>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:AnyRef</v8:TypeSet>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<width>72</width>
</format>
</document>
@@ -0,0 +1,25 @@
{
"name": "Раундтрип макета ПЛАТФОРМЫ байт в байт: СЗначениями (ячейки-поля ввода)",
"setup": "fixture:platform-roundtrip",
"preRun": [
{
"script": "mxl-decompile/scripts/mxl-decompile",
"args": {
"-TemplatePath": "СЗначениями.xml",
"-OutputPath": "back.json"
},
"cwd": "{workDir}"
}
],
"params": {
"outputPath": "out.xml"
},
"noSnapshot": "эталон — файл платформы, сверяется expect.filesEqual",
"expect": {
"filesEqual": {
"actual": "out.xml",
"expected": "СЗначениями.xml"
}
},
"inputFrom": "back.json"
}
@@ -0,0 +1,230 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>3</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>3</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>1</index>
<row>
<c>
<c>
<f>4</f>
</c>
</c>
<c>
<c>
<f>5</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>2</index>
<row>
<c>
<c>
<f>6</f>
</c>
</c>
<c>
<c>
<f>7</f>
</c>
</c>
<c>
<c>
<f>8</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>3</index>
<row>
<c>
<c>
<f>9</f>
</c>
</c>
<c>
<c>
<f>10</f>
</c>
</c>
<c>
<c>
<f>11</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>12</defaultFormatIndex>
<height>4</height>
<vgRows>4</vgRows>
<namedItem xsi:type="NamedItemCells">
<name>Ввод</name>
<area>
<type>Rows</type>
<beginRow>0</beginRow>
<endRow>3</endRow>
<beginColumn>-1</beginColumn>
<endColumn>-1</endColumn>
</area>
</namedItem>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>15</v8:Digits>
<v8:FractionDigits>3</v8:FractionDigits>
<v8:AllowedSign>Nonnegative</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>0</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>35af3d93-d7c7-4a2e-a8eb-bac87a1a3f26</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>10</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>10</v8:Length>
<v8:AllowedLength>Fixed</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:dateTime</v8:Type>
<v8:DateQualifiers>
<v8:DateFractions>DateTime</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:dateTime</v8:Type>
<v8:DateQualifiers>
<v8:DateFractions>Date</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:dateTime</v8:Type>
<v8:DateQualifiers>
<v8:DateFractions>Time</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
<v8:Type>xs:string</v8:Type>
<v8:Type>xs:dateTime</v8:Type>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>0</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
<v8:DateQualifiers>
<v8:DateFractions>DateTime</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<width>10</width>
</format>
</document>
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>6</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>3</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>4</defaultFormatIndex>
<height>1</height>
<vgRows>1</vgRows>
<namedItem xsi:type="NamedItemCells">
<name>Дедупликация</name>
<area>
<type>Rows</type>
<beginRow>0</beginRow>
<endRow>0</endRow>
<beginColumn>-1</beginColumn>
<endColumn>-1</endColumn>
</area>
</namedItem>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>15</v8:Digits>
<v8:FractionDigits>3</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>10</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>35af3d93-d7c7-4a2e-a8eb-bac87a1a3f26</controlType>
</format>
<format>
<width>10</width>
</format>
</document>
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>3</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>3</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>1</index>
<row>
<c>
<c>
<f>4</f>
</c>
</c>
<c>
<c>
<f>5</f>
</c>
</c>
<c>
<c>
<f>6</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>7</defaultFormatIndex>
<height>2</height>
<vgRows>2</vgRows>
<namedItem xsi:type="NamedItemCells">
<name>Ввод</name>
<area>
<type>Rows</type>
<beginRow>0</beginRow>
<endRow>1</endRow>
<beginColumn>-1</beginColumn>
<endColumn>-1</endColumn>
</area>
</namedItem>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef.Валюты</v8:Type>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:DocumentRef.Реализация</v8:Type>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:DefinedType.СуммаДокумента</v8:TypeSet>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:DocumentRef</v8:TypeSet>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef</v8:TypeSet>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:AnyRef</v8:TypeSet>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
<v8:Type xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef.ГорячиеКлавиши</v8:Type>
<v8:Type>xs:string</v8:Type>
<v8:Type>xs:dateTime</v8:Type>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>0</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
<v8:DateQualifiers>
<v8:DateFractions>DateTime</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<width>10</width>
</format>
</document>
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>4</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>3</f>
</c>
</c>
<c>
<c>
<f>4</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>1</index>
<row>
<formatIndex>5</formatIndex>
<c>
<c>
<f>5</f>
</c>
</c>
<c>
<c>
<f>6</f>
<parameter>Сумма</parameter>
<detailParameter>Расшифровка</detailParameter>
</c>
</c>
<c>
<c>
<f>5</f>
</c>
</c>
<c>
<c>
<f>5</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>7</defaultFormatIndex>
<height>2</height>
<vgRows>2</vgRows>
<namedItem xsi:type="NamedItemCells">
<name>Состояния</name>
<area>
<type>Rows</type>
<beginRow>0</beginRow>
<endRow>1</endRow>
<beginColumn>-1</beginColumn>
<endColumn>-1</endColumn>
</area>
</namedItem>
<line width="1" gap="false">
<v8ui:style xsi:type="v8ui:SpreadsheetDocumentCellLineType">Solid</v8ui:style>
</line>
<format>
<containsValue>true</containsValue>
<valueType/>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>15</v8:Digits>
<v8:FractionDigits>3</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee</controlType>
</format>
<format>
<border>0</border>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>50</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<border>0</border>
</format>
<format>
<border>0</border>
<fillType>Parameter</fillType>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>10</v8:Digits>
<v8:FractionDigits>2</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<width>10</width>
</format>
</document>
@@ -0,0 +1,35 @@
{
"name": "Ячейки-поля ввода: примитивные типы значения",
"input": {
"columns": 3,
"areas": [
{
"name": "Ввод",
"rows": [
{ "cells": [
{ "col": 1, "valueType": "Number(15,3,nonneg)" },
{ "col": 2, "valueType": "Number" },
{ "col": 3, "valueType": "String" }
]},
{ "cells": [
{ "col": 1, "valueType": "Boolean" },
{ "col": 2, "valueType": "Boolean", "control": "checkbox" }
]},
{ "cells": [
{ "col": 1, "valueType": "String(10)" },
{ "col": 2, "valueType": "String(10,fixed)" },
{ "col": 3, "valueType": "DateTime" }
]},
{ "cells": [
{ "col": 1, "valueType": "Date" },
{ "col": 2, "valueType": "Time" },
{ "col": 3, "valueType": "Boolean + String + DateTime + Number" }
]}
]
}
]
},
"params": {
"outputPath": "Template.xml"
}
}
@@ -0,0 +1,24 @@
{
"name": "Ячейки-поля ввода: разные написания одного типа дают ОДИН формат",
"input": {
"columns": 6,
"areas": [
{
"name": "Дедупликация",
"rows": [
[
{ "valueType": "Число(15,3)" },
{ "valueType": "Number(15,3)" },
{ "valueType": "Number(15,3,any)" },
{ "valueType": "Строка(10)" },
{ "valueType": "String(10,variable)" },
{ "valueType": "Булево", "control": "Поле Флажка" }
]
]
}
]
},
"params": {
"outputPath": "Template.xml"
}
}
@@ -0,0 +1,27 @@
{
"name": "Ячейки-поля ввода: ссылочные типы и категории целиком",
"input": {
"columns": 3,
"areas": [
{
"name": "Ввод",
"rows": [
{ "cells": [
{ "col": 1, "valueType": "CatalogRef.Валюты" },
{ "col": 2, "valueType": "DocumentRef.Реализация" },
{ "col": 3, "valueType": "DefinedType.СуммаДокумента" }
]},
{ "cells": [
{ "col": 1, "valueType": "DocumentRef + CatalogRef" },
{ "col": 2, "valueType": "AnyRef" },
{ "col": 3, "valueType": "Boolean + CatalogRef.ГорячиеКлавиши + String + DateTime + Number" }
]}
]
}
]
},
"params": {
"outputPath": "Template.xml"
},
"skipPlatformVerify": "ссылочные типы разрешаются только в базе с матч-конфигурацией: временная база-заглушка таких объектов не содержит"
}
@@ -0,0 +1,26 @@
{
"name": "Ячейки-поля ввода: три состояния типа и элемент управления",
"input": {
"columns": 4,
"styles": { "bordered": { "border": "Solid" } },
"areas": [
{
"name": "Состояния",
"rows": [
{ "cells": [
{ "col": 1, "valueType": "" },
{ "col": 2, "valueType": "Number(15,3)", "control": "none" },
{ "col": 3, "valueType": "Boolean", "control": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" },
{ "col": 4, "valueType": "String(50)", "style": "bordered" }
]},
{ "rowStyle": "bordered", "cells": [
{ "col": 2, "valueType": "Number(10,2)", "param": "Сумма", "detail": "Расшифровка" }
]}
]
}
]
},
"params": {
"outputPath": "Template.xml"
}
}
@@ -0,0 +1,40 @@
{
"name": "Roundtrip — ячейки-поля ввода (тип значения и элемент управления)",
"preRun": [
{
"script": "mxl-compile/scripts/mxl-compile",
"input": {
"columns": 3,
"areas": [
{
"name": "Ввод",
"rows": [
{ "cells": [
{ "col": 1, "valueType": "Number(15,3,nonneg)" },
{ "col": 2, "valueType": "String(10,fixed)" },
{ "col": 3, "valueType": "Boolean", "control": "checkbox" }
]},
{ "cells": [
{ "col": 1, "valueType": "" },
{ "col": 2, "valueType": "Number(10,2)", "control": "none" },
{ "col": 3, "valueType": "Boolean + CatalogRef.Валюты + String + DateTime" }
]},
{ "cells": [
{ "col": 1, "valueType": "AnyRef" },
{ "col": 2, "valueType": "Number(10,2)", "param": "Сумма", "detail": "Расшифровка" }
]}
]
}
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputPath": "Template.xml" },
"cwd": "{workDir}"
}
],
"params": { "templatePath": "Template.xml" },
"args_extra": ["-OutputPath", "{workDir}/back.json"],
"expect": {
"files": ["back.json"],
"stdoutContains": "[OK] Decompiled:"
}
}
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>3</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
</c>
</c>
<c>
<c>
<f>2</f>
</c>
</c>
<c>
<c>
<f>3</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>1</index>
<row>
<c>
<c>
<f>4</f>
</c>
</c>
<c>
<c>
<f>5</f>
</c>
</c>
<c>
<c>
<f>6</f>
</c>
</c>
</row>
</rowsItem>
<rowsItem>
<index>2</index>
<row>
<c>
<c>
<f>7</f>
</c>
</c>
<c>
<c>
<f>8</f>
<parameter>Сумма</parameter>
<detailParameter>Расшифровка</detailParameter>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>9</defaultFormatIndex>
<height>3</height>
<vgRows>3</vgRows>
<namedItem xsi:type="NamedItemCells">
<name>Ввод</name>
<area>
<type>Rows</type>
<beginRow>0</beginRow>
<endRow>2</endRow>
<beginColumn>-1</beginColumn>
<endColumn>-1</endColumn>
</area>
</namedItem>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>15</v8:Digits>
<v8:FractionDigits>3</v8:FractionDigits>
<v8:AllowedSign>Nonnegative</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:string</v8:Type>
<v8:StringQualifiers>
<v8:Length>10</v8:Length>
<v8:AllowedLength>Fixed</v8:AllowedLength>
</v8:StringQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>35af3d93-d7c7-4a2e-a8eb-bac87a1a3f26</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType/>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>10</v8:Digits>
<v8:FractionDigits>2</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
<v8:Type xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:CatalogRef.Валюты</v8:Type>
<v8:Type>xs:string</v8:Type>
<v8:Type>xs:dateTime</v8:Type>
<v8:StringQualifiers>
<v8:Length>0</v8:Length>
<v8:AllowedLength>Variable</v8:AllowedLength>
</v8:StringQualifiers>
<v8:DateQualifiers>
<v8:DateFractions>DateTime</v8:DateFractions>
</v8:DateQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:TypeSet xmlns:d4p1="http://v8.1c.ru/8.1/data/enterprise/current-config">d4p1:AnyRef</v8:TypeSet>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<fillType>Parameter</fillType>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>10</v8:Digits>
<v8:FractionDigits>2</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<width>10</width>
</format>
</document>
@@ -0,0 +1,12 @@
{
"columns": 3,
"defaultWidth": 10,
"fonts": {},
"styles": {},
"areas": [
{
"name": "Ввод",
"rows": [[{ "valueType": "Number(15,3,nonneg)" }, { "valueType": "String(10,fixed)" }, { "valueType": "Boolean", "control": "checkbox" }], [{ "valueType": "" }, { "valueType": "Number(10,2)", "control": "none" }, { "valueType": "Boolean + CatalogRef.Валюты + String + DateTime" }], [{ "valueType": "AnyRef" }, { "valueType": "Number(10,2)", "param": "Сумма", "detail": "Расшифровка" }]]
}
]
}
@@ -0,0 +1,7 @@
{
"name": "Ошибка: ячейка одновременно содержит значение и текст",
"setup": "fixture:value-cell-with-text",
"params": { "templatePath": "Template.xml" },
"expectError": true,
"expect": { "stdoutContains": "cell contains a value and text at the same time" }
}
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>1</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<c>
<c>
<f>1</f>
<tl>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Текст в ячейке со значением</v8:content>
</v8:item>
</tl>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>2</defaultFormatIndex>
<height>1</height>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>381ed624-9217-4e63-85db-c4c3cb87daae</controlType>
</format>
<format>
<width>72</width>
</format>
</document>
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>1</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<formatIndex>1</formatIndex>
<c>
<c>
<f>1</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>2</defaultFormatIndex>
<height>1</height>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>11111111-2222-3333-4444-555555555555</controlType>
</format>
<format>
<width>72</width>
</format>
</document>
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<languageSettings>
<currentLanguage>ru</currentLanguage>
<defaultLanguage>ru</defaultLanguage>
<languageInfo>
<id>ru</id>
<code>Русский</code>
<description>Русский</description>
</languageInfo>
</languageSettings>
<columns>
<size>1</size>
</columns>
<rowsItem>
<index>0</index>
<row>
<formatIndex>1</formatIndex>
<c>
<c>
<f>1</f>
</c>
</c>
</row>
</rowsItem>
<templateMode>true</templateMode>
<defaultFormatIndex>2</defaultFormatIndex>
<height>1</height>
<format>
<containsValue>true</containsValue>
<valueType>
<v8:Type>xs:boolean</v8:Type>
</valueType>
<controlType>11111111-2222-3333-4444-555555555555</controlType>
</format>
<format>
<width>72</width>
</format>
</document>
@@ -0,0 +1,7 @@
{
"name": "Предупреждения: формат со значением у строки и неизвестный элемент управления",
"setup": "fixture:value-format-misplaced",
"params": { "templatePath": "Template.xml" },
"args_extra": ["-Detailed"],
"expect": { "stdoutContains": "unknown controlType" }
}
+1 -1
View File
@@ -170,7 +170,7 @@ const FAMILIES = [
// TYPE_SYNONYMS / $script:typeSynonyms на свой локальный словарь.
variants: [
{ id: 'base', authority: 'meta-compile',
consumers: ['form-compile', 'form-edit', 'meta-edit', 'skd-compile', 'skd-edit'] },
consumers: ['form-compile', 'form-edit', 'meta-edit', 'mxl-compile', 'skd-compile', 'skd-edit'] },
],
},