@kontur.candy/generator 5.121.0-fixes-for-flang-generator.6 → 5.121.0-fixes-for-flang-generator.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +29 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71345,7 +71345,6 @@ function buildFieldsConfiguration(path, dataDeclaration) {
|
|
|
71345
71345
|
function buildExtendedSchemaInfo(dataDeclaration) {
|
|
71346
71346
|
const nodes = new Map();
|
|
71347
71347
|
for (const path of dataDeclaration.getAllPaths()) {
|
|
71348
|
-
var _node$properties2;
|
|
71349
71348
|
if (path.isEmpty() || path.endsWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each]))) {
|
|
71350
71349
|
continue;
|
|
71351
71350
|
}
|
|
@@ -71354,7 +71353,7 @@ function buildExtendedSchemaInfo(dataDeclaration) {
|
|
|
71354
71353
|
const isPage = dataDeclaration.getPageId(path) != undefined;
|
|
71355
71354
|
const optional = isPage ? dataDeclaration.isNodeOptional(path) : dataDeclaration.isNodeOptionalBySchemaOrSugar(path);
|
|
71356
71355
|
const node = getOrCreateNode(nodes, path);
|
|
71357
|
-
|
|
71356
|
+
node.properties ??= {};
|
|
71358
71357
|
const props = node.properties;
|
|
71359
71358
|
if (isMultiple) {
|
|
71360
71359
|
props.multiple = true;
|
|
@@ -77180,7 +77179,7 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
77180
77179
|
const allOptionalSections = this.dataDeclarationHelper.getOptionalSections();
|
|
77181
77180
|
const section2PathsMap = this.dataDeclarationHelper.getAllPathsBySection();
|
|
77182
77181
|
const childrenSectionsByParent = this.getChildrenSectionsByParent();
|
|
77183
|
-
const allRules = allOptionalSections.
|
|
77182
|
+
const allRules = allOptionalSections.map(x => {
|
|
77184
77183
|
const allDependentSectionIds = this.getDependentSingleSections(x.id, childrenSectionsByParent).map(sectionInfo => sectionInfo.sectionId);
|
|
77185
77184
|
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromMask)(x.path, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each);
|
|
77186
77185
|
const pathsBySection = [x.id, ...allDependentSectionIds].flatMap(sectionId => {
|
|
@@ -81372,13 +81371,13 @@ const predefinedJsConditions = {
|
|
|
81372
81371
|
"Show5 == 'true'": "Show5 as string == 'true'",
|
|
81373
81372
|
"checked1 == 'true'": "checked1 as string == 'true'",
|
|
81374
81373
|
"checked2 == 'true'": "checked2 as string == 'true'",
|
|
81375
|
-
"path('kind') === '1'": "kind == '1'",
|
|
81376
|
-
"path('kind') === '2'": "kind == '2'",
|
|
81374
|
+
"path('kind') === '1'": "kind as string == '1'",
|
|
81375
|
+
"path('kind') === '2'": "kind as string == '2'",
|
|
81377
81376
|
"path('ПризнакПродавец') === '1'": "ПризнакПродавец == 1",
|
|
81378
81377
|
"path`('ПризнакПродавец') === '2'": "ПризнакПродавец == 2",
|
|
81379
81378
|
"(path('checked1') === 'true' && path('checked2') === 'true') or (path('checked1') === 'true')": "(checked1 and checked2) or checked1",
|
|
81380
|
-
"path('СНИЛС') != ''": "СНИЛС != ''",
|
|
81381
|
-
"path('/Файл/LazyLoadingEnabled') !== 'true'": "not (/Файл/LazyLoadingEnabled == 'true')",
|
|
81379
|
+
"path('СНИЛС') != ''": "СНИЛС as string != ''",
|
|
81380
|
+
"path('/Файл/LazyLoadingEnabled') !== 'true'": "not (/Файл/LazyLoadingEnabled as string == 'true')",
|
|
81382
81381
|
"path('НомКорр') !== '99'": "НомКорр != 99",
|
|
81383
81382
|
"tableIsEmpty != 'true'": "tableIsEmpty as string != 'true'",
|
|
81384
81383
|
"tableIsEmpty == 'true'": "tableIsEmpty as string == 'true'",
|
|
@@ -81414,27 +81413,27 @@ const predefinedJsConditions = {
|
|
|
81414
81413
|
"path('/Root/D') === 'true'": "(/Root/D as string) == 'true'",
|
|
81415
81414
|
"path('D') === 'true'": "(D as string) == 'true'",
|
|
81416
81415
|
"path('../../../../ОтчетныйПериод/Месяц') != ''": "(../../../../ОтчетныйПериод/Месяц as string) != ''",
|
|
81417
|
-
"path('ПолучДох/ФИО/Фамилия') != '' || path('ПолучДох/ФИО/Имя') != '' || path('ПолучДох/ФИО/Отчество') != ''": "ПолучДох/ФИО/Фамилия != '' or ПолучДох/ФИО/Имя != '' or ПолучДох/ФИО/Отчество != ''",
|
|
81418
|
-
"(path('../../../ПолучДох/Статус') == '1' || path('../../../ПолучДох/Статус') == '7') && (path('../Ставка') == '13' || path('../Ставка') == '15')": "(../../../ПолучДох/Статус == '1' or ../../../ПолучДох/Статус == '7') and (../Ставка == '13' or ../Ставка == '15')",
|
|
81416
|
+
"path('ПолучДох/ФИО/Фамилия') != '' || path('ПолучДох/ФИО/Имя') != '' || path('ПолучДох/ФИО/Отчество') != ''": "ПолучДох/ФИО/Фамилия as string != '' or ПолучДох/ФИО/Имя as string != '' or ПолучДох/ФИО/Отчество as string != ''",
|
|
81417
|
+
"(path('../../../ПолучДох/Статус') == '1' || path('../../../ПолучДох/Статус') == '7') && (path('../Ставка') == '13' || path('../Ставка') == '15')": "(../../../ПолучДох/Статус as string == '1' or ../../../ПолучДох/Статус as string == '7') and (../Ставкаv as string == '13' or ../Ставка as string == '15')",
|
|
81419
81418
|
"path('@formsClientInfo/sender/type') != '2'": "1 == 1",
|
|
81420
81419
|
"path('@formsClientInfo/currentAccount/fns/representativeDocument/warrantId') != ''": "1 == 1",
|
|
81421
81420
|
"path('КорНБЛиш') === 'true' || path('КорНБЛиш/КорНБЛишВс') != '' || path('КорНБЛиш/КорНБЛишГод/0/Год') != '' || path('КорНБЛишГод/0/КорНБЛишВс') != '' || path('КорНБЛиш/КорНБЛишГод/1/Год') != '' || path('КорНБЛишГод/1/КорНБЛишВс') != '' || path('КорНБЛиш/КорНБЛишГод/2/Год') != '' || path('КорНБЛишГод/2/КорНБЛишВс') != ''": "1 == 0",
|
|
81422
|
-
"path('СвСчБанк/НаимБанк')": "СвСчБанк/НаимБанк != ''",
|
|
81423
|
-
"path('../..//kpp') == ''": "../../kpp == ''",
|
|
81424
|
-
"path('БанкРекв/СведБанк/НаимБанк')": "БанкРекв/СведБанк/НаимБанк != ''",
|
|
81425
|
-
"path('БанкРекв/НаимБанк')": "БанкРекв/СведБанк/НаимБанк != ''",
|
|
81421
|
+
"path('СвСчБанк/НаимБанк')": "СвСчБанк/НаимБанк as string != ''",
|
|
81422
|
+
"path('../..//kpp') == ''": "../../kpp as string == ''",
|
|
81423
|
+
"path('БанкРекв/СведБанк/НаимБанк')": "БанкРекв/СведБанк/НаимБанк as string != ''",
|
|
81424
|
+
"path('БанкРекв/НаимБанк')": "БанкРекв/СведБанк/НаимБанк as string != ''",
|
|
81426
81425
|
"path('T7R39C1_autovalue', 'visible') == 'true' || path('T7R39C1_autovalue', 'visible') == true": "1 == 1",
|
|
81427
81426
|
'path("/Файл/Документ/РасчетСВ/ModalReplaceCategoryCode/КодКатЛиц_хешсет_строкой") == "[\\"\\"]" \n|| path("/Файл/Документ/РасчетСВ/ModalReplaceCategoryCode/КодКатЛиц_хешсет_строкой") == ""': "1 == 0",
|
|
81428
|
-
ДекретДети: "exists(ДекретДети) and ДекретДети != ''",
|
|
81429
|
-
"ТерриториальныеУсловия/ОснованиеТУ": "exists(ТерриториальныеУсловия/ОснованиеТУ) and ТерриториальныеУсловия/ОснованиеТУ != ''",
|
|
81430
|
-
"ОсобыеУсловияТруда/ОснованиеОУТ": "exists(ОсобыеУсловияТруда/ОснованиеОУТ) and ОсобыеУсловияТруда/ОснованиеОУТ != ''",
|
|
81431
|
-
"ИсчисляемыйСтаж/ОснованиеИС": "exists(ИсчисляемыйСтаж/ОснованиеИС) and ИсчисляемыйСтаж/ОснованиеИС != ''",
|
|
81432
|
-
"ВыслугаЛет/ОснованиеВЛ": "exists(ВыслугаЛет/ОснованиеВЛ) and ВыслугаЛет/ОснованиеВЛ != ''",
|
|
81433
|
-
ДопСведенияИС: "exists(ДопСведенияИС) and ДопСведенияИС != ''",
|
|
81434
|
-
"ТУ/Основание": "exists(ТУ/Основание) and ТУ/Основание != ''",
|
|
81435
|
-
"ОУТ/Код": "exists(ОУТ/Код) and ОУТ/Код != ''",
|
|
81436
|
-
"ИС/Основание": "exists(ИС/Основание) and ИС/Основание != ''",
|
|
81437
|
-
"ВЛ/Основание": "exists(ВЛ/Основание) and ВЛ/Основание != ''"
|
|
81427
|
+
ДекретДети: "exists(ДекретДети) and ДекретДети as string != ''",
|
|
81428
|
+
"ТерриториальныеУсловия/ОснованиеТУ": "exists(ТерриториальныеУсловия/ОснованиеТУ) and ТерриториальныеУсловия/ОснованиеТУ as string != ''",
|
|
81429
|
+
"ОсобыеУсловияТруда/ОснованиеОУТ": "exists(ОсобыеУсловияТруда/ОснованиеОУТ) and ОсобыеУсловияТруда/ОснованиеОУТ as string != ''",
|
|
81430
|
+
"ИсчисляемыйСтаж/ОснованиеИС": "exists(ИсчисляемыйСтаж/ОснованиеИС) and ИсчисляемыйСтаж/ОснованиеИС as string != ''",
|
|
81431
|
+
"ВыслугаЛет/ОснованиеВЛ": "exists(ВыслугаЛет/ОснованиеВЛ) and ВыслугаЛет/ОснованиеВЛ as string != ''",
|
|
81432
|
+
ДопСведенияИС: "exists(ДопСведенияИС) and ДопСведенияИС as string != ''",
|
|
81433
|
+
"ТУ/Основание": "exists(ТУ/Основание) and ТУ/Основание as string != ''",
|
|
81434
|
+
"ОУТ/Код": "exists(ОУТ/Код) and ОУТ/Код as string != ''",
|
|
81435
|
+
"ИС/Основание": "exists(ИС/Основание) and ИС/Основание as string != ''",
|
|
81436
|
+
"ВЛ/Основание": "exists(ВЛ/Основание) and ВЛ/Основание as string != ''"
|
|
81438
81437
|
};
|
|
81439
81438
|
function convertToKCLangCondition(node, condition) {
|
|
81440
81439
|
var _tryConvertToKCLangCo;
|
|
@@ -83266,6 +83265,11 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
83266
83265
|
section: [attachmentSection.id],
|
|
83267
83266
|
pageId: attachmentSection.id
|
|
83268
83267
|
};
|
|
83268
|
+
if (attachmentSection.optional) {
|
|
83269
|
+
result[attachmentSection.path] = {
|
|
83270
|
+
optional: [true]
|
|
83271
|
+
};
|
|
83272
|
+
}
|
|
83269
83273
|
});
|
|
83270
83274
|
return result;
|
|
83271
83275
|
}
|
|
@@ -95491,10 +95495,10 @@ function getColumnWidths(node, guessContentWidthCallback) {
|
|
|
95491
95495
|
let maxWidth = 0;
|
|
95492
95496
|
let firstCondition = undefined;
|
|
95493
95497
|
for (let r = 0; r < rows.length; r++) {
|
|
95494
|
-
var _resultRows$r$numberC, _resultRows$r$numberC2,
|
|
95498
|
+
var _resultRows$r$numberC, _resultRows$r$numberC2, _resultRows$r;
|
|
95495
95499
|
// @ts-ignore RowsWorker.rows - какая-то не понятная шняга, я не могу её победить
|
|
95496
95500
|
maxWidth = Math.max(maxWidth, (_resultRows$r$numberC = (_resultRows$r$numberC2 = resultRows[r][numberCol]) === null || _resultRows$r$numberC2 === void 0 ? void 0 : _resultRows$r$numberC2.width) !== null && _resultRows$r$numberC !== void 0 ? _resultRows$r$numberC : -Infinity);
|
|
95497
|
-
|
|
95501
|
+
firstCondition ??= (_resultRows$r = resultRows[r]) === null || _resultRows$r === void 0 || (_resultRows$r = _resultRows$r[numberCol]) === null || _resultRows$r === void 0 ? void 0 : _resultRows$r.visibilityConditionExpression;
|
|
95498
95502
|
}
|
|
95499
95503
|
return {
|
|
95500
95504
|
width: maxWidth,
|
package/package.json
CHANGED