@kontur.candy/generator 5.46.0-incremental-dictionaries.7 → 5.46.0-incremental-dictionaries.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 +241 -107
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44894,7 +44894,8 @@ const AutoValidationMessage = "Значение не равно вычислен
|
|
|
44894
44894
|
__webpack_require__.r(__webpack_exports__);
|
|
44895
44895
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
44896
44896
|
/* harmony export */ CombinatorType: () => (/* binding */ CombinatorType),
|
|
44897
|
-
/* harmony export */ FufCombineMethod: () => (/* binding */ FufCombineMethod)
|
|
44897
|
+
/* harmony export */ FufCombineMethod: () => (/* binding */ FufCombineMethod),
|
|
44898
|
+
/* harmony export */ SumCombineMethod: () => (/* binding */ SumCombineMethod)
|
|
44898
44899
|
/* harmony export */ });
|
|
44899
44900
|
let FufCombineMethod = /*#__PURE__*/function (FufCombineMethod) {
|
|
44900
44901
|
FufCombineMethod["Merge"] = "Merge";
|
|
@@ -44902,6 +44903,12 @@ let FufCombineMethod = /*#__PURE__*/function (FufCombineMethod) {
|
|
|
44902
44903
|
FufCombineMethod["Replace"] = "Replace";
|
|
44903
44904
|
return FufCombineMethod;
|
|
44904
44905
|
}({});
|
|
44906
|
+
let SumCombineMethod = /*#__PURE__*/function (SumCombineMethod) {
|
|
44907
|
+
SumCombineMethod["replaceSum"] = "replaceSum";
|
|
44908
|
+
SumCombineMethod["addSum"] = "addSum";
|
|
44909
|
+
SumCombineMethod["ignoreSum"] = "ignoreSum";
|
|
44910
|
+
return SumCombineMethod;
|
|
44911
|
+
}({});
|
|
44905
44912
|
let CombinatorType = /*#__PURE__*/function (CombinatorType) {
|
|
44906
44913
|
CombinatorType["XmlCombinatorByPath"] = "XmlCombinatorByPath";
|
|
44907
44914
|
CombinatorType["Default"] = "Default";
|
|
@@ -47214,11 +47221,12 @@ let UploadFileStatuses = /*#__PURE__*/function (UploadFileStatuses) {
|
|
|
47214
47221
|
}({});
|
|
47215
47222
|
let PatchFufSteps = /*#__PURE__*/function (PatchFufSteps) {
|
|
47216
47223
|
PatchFufSteps[PatchFufSteps["SelectCombineFufMethod"] = 0] = "SelectCombineFufMethod";
|
|
47217
|
-
PatchFufSteps[PatchFufSteps["
|
|
47218
|
-
PatchFufSteps[PatchFufSteps["
|
|
47219
|
-
PatchFufSteps[PatchFufSteps["
|
|
47220
|
-
PatchFufSteps[PatchFufSteps["
|
|
47221
|
-
PatchFufSteps[PatchFufSteps["
|
|
47224
|
+
PatchFufSteps[PatchFufSteps["SelectCombineSumMethod"] = 1] = "SelectCombineSumMethod";
|
|
47225
|
+
PatchFufSteps[PatchFufSteps["SelectFiles"] = 2] = "SelectFiles";
|
|
47226
|
+
PatchFufSteps[PatchFufSteps["ErrorMessage"] = 3] = "ErrorMessage";
|
|
47227
|
+
PatchFufSteps[PatchFufSteps["LoadToForm"] = 4] = "LoadToForm";
|
|
47228
|
+
PatchFufSteps[PatchFufSteps["ShowCombineResult"] = 5] = "ShowCombineResult";
|
|
47229
|
+
PatchFufSteps[PatchFufSteps["ConfirmMerge"] = 6] = "ConfirmMerge";
|
|
47222
47230
|
return PatchFufSteps;
|
|
47223
47231
|
}({});
|
|
47224
47232
|
let TableType = /*#__PURE__*/function (TableType) {
|
|
@@ -56997,6 +57005,12 @@ function traverseKCLangExpression(node, visitor) {
|
|
|
56997
57005
|
case "hasAutoFlag":
|
|
56998
57006
|
visitor.visitHasAutoFlagKCLangNode(node);
|
|
56999
57007
|
break;
|
|
57008
|
+
case "makeDict":
|
|
57009
|
+
visitor.visitMakeDictKCLangNode(node);
|
|
57010
|
+
break;
|
|
57011
|
+
case "getSumByKeys":
|
|
57012
|
+
visitor.visitGetSumByKeysKCLangNode(node);
|
|
57013
|
+
break;
|
|
57000
57014
|
default:
|
|
57001
57015
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
|
|
57002
57016
|
break;
|
|
@@ -57153,6 +57167,12 @@ class DefaultKCLangExpressionVisitor {
|
|
|
57153
57167
|
visitHasAutoFlagKCLangNode(node) {
|
|
57154
57168
|
// default empty implementation
|
|
57155
57169
|
}
|
|
57170
|
+
visitGetSumByKeysKCLangNode(node) {
|
|
57171
|
+
// default empty implementation
|
|
57172
|
+
}
|
|
57173
|
+
visitMakeDictKCLangNode(node) {
|
|
57174
|
+
// default empty implementation
|
|
57175
|
+
}
|
|
57156
57176
|
}
|
|
57157
57177
|
|
|
57158
57178
|
/***/ }),
|
|
@@ -57514,6 +57534,12 @@ const getGenerateJsExpressionFunc = options => {
|
|
|
57514
57534
|
case "hasAutoFlag":
|
|
57515
57535
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
57516
57536
|
break;
|
|
57537
|
+
case "makeDict":
|
|
57538
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
57539
|
+
break;
|
|
57540
|
+
case "getSumByKeys":
|
|
57541
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
57542
|
+
break;
|
|
57517
57543
|
default:
|
|
57518
57544
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(expression);
|
|
57519
57545
|
}
|
|
@@ -67462,7 +67488,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
67462
67488
|
|
|
67463
67489
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
67464
67490
|
try {
|
|
67465
|
-
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _sugarRoot$schemaVali, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _generationOptions$re, _additionalContent$fo5, _additionalContent$fo6;
|
|
67491
|
+
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _sugarRoot$schemaVali, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _generationOptions$re, _additionalContent$fo5, _additionalContent$fo6, _additionalContent$fo7, _additionalContent$fo8, _additionalContent$fo9, _additionalContent$fo10, _additionalContent$fo11, _additionalContent$fo12;
|
|
67466
67492
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
67467
67493
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_13__.createDefaultSugarSerializer)();
|
|
67468
67494
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_14__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_11__.FormNode);
|
|
@@ -67499,15 +67525,21 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
67499
67525
|
const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
|
|
67500
67526
|
const lazyLoadGeneratorResult = lazyLoadGenerator.generate();
|
|
67501
67527
|
const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
|
|
67502
|
-
const formulaExprConverter = new _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_34__.FormulaExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_35__.adjustPathMultiplicityComplex)(path, formSchemaRng, dataDeclarationHelper)
|
|
67503
|
-
|
|
67528
|
+
const formulaExprConverter = new _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_34__.FormulaExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_35__.adjustPathMultiplicityComplex)(path, formSchemaRng, dataDeclarationHelper), {
|
|
67529
|
+
enableGroupSumAutoConversion: (_additionalContent$fo5 = (_additionalContent$fo6 = additionalContent.formJsonSettings) === null || _additionalContent$fo6 === void 0 ? void 0 : _additionalContent$fo6.enableTypedFlang) !== null && _additionalContent$fo5 !== void 0 ? _additionalContent$fo5 : false
|
|
67530
|
+
});
|
|
67531
|
+
const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_36__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter, {
|
|
67532
|
+
enableTypedFlang: (_additionalContent$fo7 = (_additionalContent$fo8 = additionalContent.formJsonSettings) === null || _additionalContent$fo8 === void 0 ? void 0 : _additionalContent$fo8.enableTypedFlang) !== null && _additionalContent$fo7 !== void 0 ? _additionalContent$fo7 : false
|
|
67533
|
+
});
|
|
67504
67534
|
const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_37__.InitializationRulesBuilder(sugarRoot, resourcesHash);
|
|
67505
67535
|
const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_38__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
|
|
67506
67536
|
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, useSchemaValidations);
|
|
67507
67537
|
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry, useSchemaValidations);
|
|
67508
67538
|
const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_33__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
|
|
67509
67539
|
const normalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng);
|
|
67510
|
-
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder
|
|
67540
|
+
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder, {
|
|
67541
|
+
enableTypedFlang: (_additionalContent$fo9 = (_additionalContent$fo10 = additionalContent.formJsonSettings) === null || _additionalContent$fo10 === void 0 ? void 0 : _additionalContent$fo10.enableTypedFlang) !== null && _additionalContent$fo9 !== void 0 ? _additionalContent$fo9 : false
|
|
67542
|
+
});
|
|
67511
67543
|
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng);
|
|
67512
67544
|
const autoValueForValueByDefaultNormalizationRuleGenerator = new _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_45__.AutoValueForValueByDefaultNormalizationRuleGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, dataDeclarationHelper);
|
|
67513
67545
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_21__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
@@ -67520,19 +67552,19 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
67520
67552
|
builder.addResource("calculationFunctions.js", autocalcGenerator.generate(sugarRoot, additionalContent.autocalcsContent, formulasForCalculator));
|
|
67521
67553
|
builder.addResource("dataDeclaration.js", dataDeclarationContent);
|
|
67522
67554
|
let finalLazyLoadDeclaration = lazyLoadGeneratorResult.declaration;
|
|
67523
|
-
if ((_additionalContent$
|
|
67524
|
-
var _additionalContent$
|
|
67555
|
+
if ((_additionalContent$fo11 = (_additionalContent$fo12 = additionalContent.formJsonSettings) === null || _additionalContent$fo12 === void 0 ? void 0 : _additionalContent$fo12.useServerSideFLangNormalization) !== null && _additionalContent$fo11 !== void 0 ? _additionalContent$fo11 : false) {
|
|
67556
|
+
var _additionalContent$fo13, _additionalContent$fo14, _additionalContent$fo15;
|
|
67525
67557
|
const defaultNormalizationRules = normalizationRulesGenerator.generateRules();
|
|
67526
67558
|
finalLazyLoadDeclaration = mixLazyLoadingDeclarationWithServerOnlyPaths(lazyLoadGeneratorResult.declaration, defaultNormalizationRules.serverOnlyPaths);
|
|
67527
67559
|
const customNormalizers = [{
|
|
67528
67560
|
normalizerId: "formulas",
|
|
67529
|
-
content: (_additionalContent$
|
|
67561
|
+
content: (_additionalContent$fo13 = additionalContent.formJsonSettings) !== null && _additionalContent$fo13 !== void 0 && _additionalContent$fo13.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
|
|
67530
67562
|
}, {
|
|
67531
67563
|
normalizerId: "formulasWithInitializers",
|
|
67532
|
-
content: (_additionalContent$
|
|
67564
|
+
content: (_additionalContent$fo14 = additionalContent.formJsonSettings) !== null && _additionalContent$fo14 !== void 0 && _additionalContent$fo14.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.generateRules()
|
|
67533
67565
|
}, {
|
|
67534
67566
|
normalizerId: "autoValueForValueByDefault",
|
|
67535
|
-
content: (_additionalContent$
|
|
67567
|
+
content: (_additionalContent$fo15 = additionalContent.formJsonSettings) !== null && _additionalContent$fo15 !== void 0 && _additionalContent$fo15.enableFlangRulesForAutoValueForValueByDefaultNormalizer ? autoValueForValueByDefaultNormalizationRuleGenerator.generateRules() : ""
|
|
67536
67568
|
}].filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrEmpty)(x.content));
|
|
67537
67569
|
const additionalNormalizationRules = additionalContent.additionalNormalizers ? additionalContent.additionalNormalizers.map(additionalNormalizer => {
|
|
67538
67570
|
switch (additionalNormalizer.extension) {
|
|
@@ -69999,6 +70031,8 @@ class SetStatement extends FLangStatement {
|
|
|
69999
70031
|
"use strict";
|
|
70000
70032
|
__webpack_require__.r(__webpack_exports__);
|
|
70001
70033
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
70034
|
+
/* harmony export */ arrayFieldNameSuffix: () => (/* binding */ arrayFieldNameSuffix),
|
|
70035
|
+
/* harmony export */ castFinalExpressionToStringIfNeed: () => (/* binding */ castFinalExpressionToStringIfNeed),
|
|
70002
70036
|
/* harmony export */ castOperandIfNeed: () => (/* binding */ castOperandIfNeed),
|
|
70003
70037
|
/* harmony export */ castOperandToBoolIfNeed: () => (/* binding */ castOperandToBoolIfNeed),
|
|
70004
70038
|
/* harmony export */ castOperandToDateTimeIfNeed: () => (/* binding */ castOperandToDateTimeIfNeed),
|
|
@@ -70008,9 +70042,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70008
70042
|
/* harmony export */ combineByOrFlangExpr: () => (/* binding */ combineByOrFlangExpr),
|
|
70009
70043
|
/* harmony export */ combineRulesWithOptionalSectionChecking: () => (/* binding */ combineRulesWithOptionalSectionChecking),
|
|
70010
70044
|
/* harmony export */ decimalWrapper: () => (/* binding */ decimalWrapper),
|
|
70045
|
+
/* harmony export */ dictFieldNameSuffix: () => (/* binding */ dictFieldNameSuffix),
|
|
70046
|
+
/* harmony export */ ensureCorrectFieldNameByExpressionType: () => (/* binding */ ensureCorrectFieldNameByExpressionType),
|
|
70011
70047
|
/* harmony export */ ensureOperandsOfTypeOrNull: () => (/* binding */ ensureOperandsOfTypeOrNull),
|
|
70012
70048
|
/* harmony export */ extractValueReferenceFromCast: () => (/* binding */ extractValueReferenceFromCast),
|
|
70013
70049
|
/* harmony export */ getAllExpressionChildren: () => (/* binding */ getAllExpressionChildren),
|
|
70050
|
+
/* harmony export */ hashSetFieldNameSuffix: () => (/* binding */ hashSetFieldNameSuffix),
|
|
70014
70051
|
/* harmony export */ makeGetOld: () => (/* binding */ makeGetOld),
|
|
70015
70052
|
/* harmony export */ makeNoDeps: () => (/* binding */ makeNoDeps),
|
|
70016
70053
|
/* harmony export */ makeStringValueReference: () => (/* binding */ makeStringValueReference),
|
|
@@ -70023,11 +70060,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70023
70060
|
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_0__);
|
|
70024
70061
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
70025
70062
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
70026
|
-
/* harmony import */ var
|
|
70063
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
70064
|
+
/* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
70065
|
+
|
|
70027
70066
|
|
|
70028
70067
|
|
|
70029
70068
|
|
|
70030
70069
|
|
|
70070
|
+
const dictFieldNameSuffix = "_dict";
|
|
70071
|
+
const arrayFieldNameSuffix = "_array";
|
|
70072
|
+
const hashSetFieldNameSuffix = "_hashSet";
|
|
70031
70073
|
function* getAllExpressionChildren(node, descendantsFilter) {
|
|
70032
70074
|
const children = node.getChildNodes();
|
|
70033
70075
|
for (const child of children) {
|
|
@@ -70038,115 +70080,139 @@ function* getAllExpressionChildren(node, descendantsFilter) {
|
|
|
70038
70080
|
}
|
|
70039
70081
|
}
|
|
70040
70082
|
function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
|
|
70041
|
-
return new
|
|
70083
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression("true")), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
|
|
70042
70084
|
}
|
|
70043
70085
|
function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
|
|
70044
70086
|
var _formSchemaRng$getEle;
|
|
70045
|
-
return x instanceof
|
|
70087
|
+
return x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement && x.left.valueName === "value" && (_formSchemaRng$getEle = formSchemaRng.getElementByPath(x.left.modePath)) !== null && _formSchemaRng$getEle !== void 0 && _formSchemaRng$getEle.isIgnoreForcedValueSet() ? [createValueRuleWithDisableValueAutoInitCheck(x.left.modePath, x.right)] : [x];
|
|
70046
70088
|
}
|
|
70047
70089
|
function wrapWithArgumentsCondition(expression) {
|
|
70048
|
-
const childFilter = node => !(node instanceof
|
|
70049
|
-
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof
|
|
70090
|
+
const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression);
|
|
70091
|
+
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression ? x : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined);
|
|
70050
70092
|
const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
|
|
70051
70093
|
const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.reduce(uniquePaths, (acc, curr) => {
|
|
70052
|
-
const currExpr = new
|
|
70053
|
-
return acc != undefined ? new
|
|
70094
|
+
const currExpr = new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ExistsExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(curr.modePath, curr.valueName));
|
|
70095
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, currExpr) : currExpr;
|
|
70054
70096
|
}, undefined);
|
|
70055
70097
|
if (conditionExpression == undefined) {
|
|
70056
70098
|
return expression;
|
|
70057
70099
|
}
|
|
70058
|
-
return new
|
|
70100
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullLiteralExpression());
|
|
70059
70101
|
}
|
|
70060
70102
|
function combineRulesWithOptionalSectionChecking(allRules, optionalSectionRulesBuilder) {
|
|
70061
|
-
const allUniqueRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allRules, x => x instanceof
|
|
70103
|
+
const allUniqueRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allRules, x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement ? x.left.convertToString() : x.convertToString());
|
|
70062
70104
|
const allUniqueRulesWithOptionalChecks = Iterator.from(optionalSectionRulesBuilder.wrapRulesWithOptionalPageCheck(allUniqueRules)).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
|
|
70063
70105
|
return allUniqueRulesWithOptionalChecks;
|
|
70064
70106
|
}
|
|
70065
70107
|
function tryExtractValueReferenceAsStringFromDecimal(expression) {
|
|
70066
|
-
if (expression.getType() ===
|
|
70108
|
+
if (expression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal && expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70067
70109
|
return expression.targetExpression;
|
|
70068
70110
|
}
|
|
70069
70111
|
return expression;
|
|
70070
70112
|
}
|
|
70113
|
+
function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, decimalFormat = "G29") {
|
|
70114
|
+
if (enableTypedExpression && (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet)) {
|
|
70115
|
+
return operandExpression;
|
|
70116
|
+
}
|
|
70117
|
+
return castOperandToStringIfNeed(operandExpression, decimalFormat);
|
|
70118
|
+
}
|
|
70071
70119
|
function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
|
|
70072
|
-
if (operandExpression instanceof
|
|
70073
|
-
return new
|
|
70120
|
+
if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateNowExpression) {
|
|
70121
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression("dd.MM.yyyy"));
|
|
70074
70122
|
}
|
|
70075
|
-
if (operandExpression.getType() ===
|
|
70076
|
-
return operandExpression;
|
|
70123
|
+
if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet) {
|
|
70124
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SerializeEnumerationExpression(operandExpression);
|
|
70077
70125
|
}
|
|
70078
|
-
return operandExpression.getType() !=
|
|
70126
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
|
|
70079
70127
|
}
|
|
70080
70128
|
function castOperandIfNeed(operandExpression, type) {
|
|
70081
|
-
if (type instanceof
|
|
70082
|
-
return operandExpression.getType() != type ? new
|
|
70129
|
+
if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression) {
|
|
70130
|
+
return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, type) : operandExpression;
|
|
70083
70131
|
}
|
|
70084
70132
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid type for cast: ${type}`);
|
|
70085
70133
|
}
|
|
70086
70134
|
function castOperandToBoolIfNeed(operandExpression) {
|
|
70087
|
-
return operandExpression.getType() !=
|
|
70135
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.bool) : operandExpression;
|
|
70088
70136
|
}
|
|
70089
70137
|
function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
|
|
70090
|
-
return operandExpression.getType() !==
|
|
70138
|
+
return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
|
|
70091
70139
|
}
|
|
70092
70140
|
const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
|
|
70093
70141
|
function castOperandToDateTimeIfNeed(operandExpression) {
|
|
70094
|
-
return operandExpression.getType() !=
|
|
70142
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dateTime) : operandExpression;
|
|
70095
70143
|
}
|
|
70096
70144
|
function nullCoalesceWithTypeCheck(argument, replacement) {
|
|
70097
|
-
const isValid = argument.getType() === replacement.getType() || argument.getType() ===
|
|
70145
|
+
const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null;
|
|
70098
70146
|
if (!isValid) {
|
|
70099
70147
|
throw new Error("Couldn't build null coalesce expression: types not match");
|
|
70100
70148
|
}
|
|
70101
|
-
return new
|
|
70149
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression(argument, replacement);
|
|
70102
70150
|
}
|
|
70103
70151
|
function ensureOperandsOfTypeOrNull(type, ...operands) {
|
|
70104
70152
|
for (const operand of operands) {
|
|
70105
70153
|
const operandType = operand.getType();
|
|
70106
|
-
if (operandType !==
|
|
70154
|
+
if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null && operandType !== type) {
|
|
70107
70155
|
throw new Error(`Invalid operand type: required [${type}] but got ${operandType}`);
|
|
70108
70156
|
}
|
|
70109
70157
|
}
|
|
70110
70158
|
}
|
|
70111
70159
|
function combineByOrFlangExpr(acc, current) {
|
|
70112
|
-
return acc != undefined ? new
|
|
70160
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, current) : current;
|
|
70113
70161
|
}
|
|
70114
70162
|
function combineByAndFlangExpr(acc, current) {
|
|
70115
|
-
return acc != undefined ? new
|
|
70163
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.AndBinaryExpression(acc, current) : current;
|
|
70116
70164
|
}
|
|
70117
70165
|
function makeNoDeps(expression) {
|
|
70118
|
-
if (expression instanceof
|
|
70119
|
-
return new
|
|
70166
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70167
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression);
|
|
70120
70168
|
}
|
|
70121
|
-
if (expression instanceof
|
|
70122
|
-
return new
|
|
70169
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70170
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
70123
70171
|
}
|
|
70124
70172
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
70125
70173
|
}
|
|
70126
70174
|
function makeGetOld(expression) {
|
|
70127
|
-
if (expression instanceof
|
|
70128
|
-
return new
|
|
70175
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70176
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression);
|
|
70129
70177
|
}
|
|
70130
|
-
if (expression instanceof
|
|
70131
|
-
return new
|
|
70178
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70179
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
70132
70180
|
}
|
|
70133
70181
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
70134
70182
|
}
|
|
70135
70183
|
function makeStringValueReference(modePath, valueName) {
|
|
70136
|
-
return new
|
|
70184
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string);
|
|
70137
70185
|
}
|
|
70138
70186
|
function extractValueReferenceFromCast(expression) {
|
|
70139
|
-
if (expression instanceof
|
|
70187
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70140
70188
|
return expression;
|
|
70141
70189
|
}
|
|
70142
|
-
if (expression instanceof
|
|
70190
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70143
70191
|
return expression.targetExpression;
|
|
70144
70192
|
}
|
|
70145
|
-
if (expression instanceof
|
|
70193
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression) {
|
|
70146
70194
|
return expression.targetExpression;
|
|
70147
70195
|
}
|
|
70148
70196
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Cannot extract ValueReferenceExpression! ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression)}`);
|
|
70149
70197
|
}
|
|
70198
|
+
function ensureCorrectFieldNameByExpressionType(statement) {
|
|
70199
|
+
if (statement instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement) {
|
|
70200
|
+
const lastPart = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.last(statement.left.modePath.getPathParts());
|
|
70201
|
+
const lastStringPart = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.isSimpleToken(lastPart) ? lastPart : "";
|
|
70202
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict && !lastStringPart.endsWith(dictFieldNameSuffix)) {
|
|
70203
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${dictFieldNameSuffix}"`);
|
|
70204
|
+
}
|
|
70205
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet && !lastStringPart.endsWith(hashSetFieldNameSuffix)) {
|
|
70206
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${hashSetFieldNameSuffix}"`);
|
|
70207
|
+
}
|
|
70208
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
|
|
70209
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${arrayFieldNameSuffix}"`);
|
|
70210
|
+
}
|
|
70211
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
|
|
70212
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
|
|
70213
|
+
}
|
|
70214
|
+
}
|
|
70215
|
+
}
|
|
70150
70216
|
|
|
70151
70217
|
/***/ }),
|
|
70152
70218
|
|
|
@@ -70335,8 +70401,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70335
70401
|
|
|
70336
70402
|
|
|
70337
70403
|
class FormulaExpressionToFlangExpressionConverter {
|
|
70338
|
-
constructor(adjustPathMultiplicityFunc) {
|
|
70404
|
+
constructor(adjustPathMultiplicityFunc, options) {
|
|
70339
70405
|
this.adjustPathMultiplicity = void 0;
|
|
70406
|
+
this.options = void 0;
|
|
70407
|
+
this.options = options;
|
|
70340
70408
|
this.adjustPathMultiplicity = adjustPathMultiplicityFunc;
|
|
70341
70409
|
}
|
|
70342
70410
|
compileExpressionToFlangExpression(expression, prefix, target, addPrecalculationRule) {
|
|
@@ -70673,7 +70741,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70673
70741
|
const deserializedKeys = this.compileArrayOfTargetKeys(prefix, target, targetKeys, addPrecalculationRule);
|
|
70674
70742
|
return this.compileGetSumByKeysExpressionImpl(prefix, target, dictPath, deserializedKeys, addPrecalculationRule);
|
|
70675
70743
|
}
|
|
70676
|
-
|
|
70744
|
+
compileGroupSumExpressionWithPersistentDictionary(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70677
70745
|
const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
70678
70746
|
const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
|
|
70679
70747
|
const firstPart = matchPaths.matchedPath;
|
|
@@ -70710,7 +70778,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70710
70778
|
const basePathForDict = finalIterPath;
|
|
70711
70779
|
const keyDiffPathText = extractNameFromPath((0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(basePathForDict, sourceKeyPath).differentPath);
|
|
70712
70780
|
const valueDiffPathText = extractNameFromExpression(basePathForDict, sourceValueExpression);
|
|
70713
|
-
const dictPath = basePathForDict.joinWith(`${keyDiffPathText}_${valueDiffPathText}
|
|
70781
|
+
const dictPath = basePathForDict.joinWith(`${keyDiffPathText}_${valueDiffPathText}_generated${_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.dictFieldNameSuffix}`);
|
|
70714
70782
|
const dictPathWithField = new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_7__.AbsoluteModelFieldPath(dictPath, "value");
|
|
70715
70783
|
const basePathForDictPrefix = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(Iterator.from(basePathForDict.getPathParts()).filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken).toArray());
|
|
70716
70784
|
const dictExpression = this.compileMakeDictExpressionImpl(basePathForDictPrefix, dictPathWithField, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
@@ -70720,12 +70788,42 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70720
70788
|
const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(dictStatement.left.modePath.toCurrentIteration(), dictStatement.left.valueName)), deserializedKeys);
|
|
70721
70789
|
return finalValueExpression;
|
|
70722
70790
|
}
|
|
70791
|
+
compileGroupSumExpressionWithoutPersistentDictionaries(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70792
|
+
const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
70793
|
+
const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
|
|
70794
|
+
const firstPart = matchPaths.matchedPath.toCurrentIteration();
|
|
70795
|
+
const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
|
|
70796
|
+
const secondParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength));
|
|
70797
|
+
const getIterationPathWithNestedMultiplicity = () => {
|
|
70798
|
+
const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
|
|
70799
|
+
const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
70800
|
+
const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
|
|
70801
|
+
return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
|
|
70802
|
+
};
|
|
70803
|
+
const getIterationPathWithoutNestedMultiplicity = () => {
|
|
70804
|
+
const firstPartParts = matchPaths.matchedPath.getPathPartsAsArray();
|
|
70805
|
+
const lastStarIndexSecondPart = firstPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
70806
|
+
return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(sourceKeyParts.slice(0, lastStarIndexSecondPart)).toCurrentIteration().trimLastStarIfLastToken();
|
|
70807
|
+
};
|
|
70808
|
+
const finalIterPath = secondParts.isContainCurrentOrEachIteration() ? getIterationPathWithNestedMultiplicity() : getIterationPathWithoutNestedMultiplicity();
|
|
70809
|
+
if (finalIterPath.isEmpty()) {
|
|
70810
|
+
throw new Error("Error occurred while trying parse path for reduce: " + firstPart.toLegacyPath());
|
|
70811
|
+
}
|
|
70812
|
+
const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70813
|
+
const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(sourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression());
|
|
70814
|
+
const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression(targetKeys.items.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70815
|
+
const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetSumByKeysExpression(reduceExpression, deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)());
|
|
70816
|
+
return finalValueExpression;
|
|
70817
|
+
}
|
|
70723
70818
|
compileEnumerationItem(expression, prefix, target, addPrecalculationRule) {
|
|
70724
70819
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArgumentExpression) {
|
|
70725
70820
|
return this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70726
70821
|
}
|
|
70727
70822
|
return this.compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule);
|
|
70728
70823
|
}
|
|
70824
|
+
compileGroupSumExpressionWithCustomValueExpression(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70825
|
+
return this.options.enableGroupSumAutoConversion ? this.compileGroupSumExpressionWithPersistentDictionary(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) : this.compileGroupSumExpressionWithoutPersistentDictionaries(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70826
|
+
}
|
|
70729
70827
|
compileGroupSumExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70730
70828
|
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70731
70829
|
const sourceValuePath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceValuePath);
|
|
@@ -70952,9 +71050,10 @@ class AutoValueForValueByDefaultNormalizationRuleGenerator {
|
|
|
70952
71050
|
const createValueRuleFromAutoValueRule = autoValueRule => {
|
|
70953
71051
|
var _formulaRulesMap$get$, _formulaRulesMap$get;
|
|
70954
71052
|
const valueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath, "value");
|
|
71053
|
+
const autoValueExpressionType = autoValueRule.right.getType();
|
|
70955
71054
|
const valueRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value");
|
|
70956
71055
|
const autoFlagRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "autoFlag");
|
|
70957
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(valueRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(autoFlagRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())), autoValueRule.right, formulaRulesMap.has(valueRef) ? (_formulaRulesMap$get$ = (_formulaRulesMap$get = formulaRulesMap.get(valueRef)) === null || _formulaRulesMap$get === void 0 ? void 0 : _formulaRulesMap$get.right) !== null && _formulaRulesMap$get$ !== void 0 ? _formulaRulesMap$get$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)("Unexpected error") : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(this.dataDeclarationHelper.getDefaultValue(autoValueRule.left.modePath)))));
|
|
71056
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(valueRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(autoFlagRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())), autoValueRule.right, formulaRulesMap.has(valueRef) ? (_formulaRulesMap$get$ = (_formulaRulesMap$get = formulaRulesMap.get(valueRef)) === null || _formulaRulesMap$get === void 0 ? void 0 : _formulaRulesMap$get.right) !== null && _formulaRulesMap$get$ !== void 0 ? _formulaRulesMap$get$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)("Unexpected error") : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value"), autoValueExpressionType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(this.dataDeclarationHelper.getDefaultValue(autoValueRule.left.modePath)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())));
|
|
70958
71057
|
};
|
|
70959
71058
|
const updatedFormulaRules = Iterator.from(formulaFLangRules).flatMap(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && x.left.valueName === "autoValue" ? [x, createValueRuleFromAutoValueRule(x)] : [x]);
|
|
70960
71059
|
|
|
@@ -71049,13 +71148,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71049
71148
|
* 2) переводит autoFlag в true
|
|
71050
71149
|
*/
|
|
71051
71150
|
class FormulaOnlyNormalizationRuleGenerator {
|
|
71052
|
-
constructor(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder) {
|
|
71151
|
+
constructor(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder, options) {
|
|
71053
71152
|
this.dataDeclarationHelper = void 0;
|
|
71054
71153
|
this.formSchemaRng = void 0;
|
|
71055
71154
|
this.formulas = void 0;
|
|
71155
|
+
this.options = void 0;
|
|
71056
71156
|
this.formulaExprConverter = void 0;
|
|
71057
71157
|
this.optionalSectionRuleBuilder = void 0;
|
|
71058
71158
|
this.validationRulesBuilder = void 0;
|
|
71159
|
+
this.options = options;
|
|
71059
71160
|
this.optionalSectionRuleBuilder = optionalSectionRuleBuilder;
|
|
71060
71161
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
71061
71162
|
this.formSchemaRng = formSchemaRng;
|
|
@@ -71083,7 +71184,7 @@ class FormulaOnlyNormalizationRuleGenerator {
|
|
|
71083
71184
|
const defaultValue = this.dataDeclarationHelper.getDefaultValue(fullTarget.toLegacyPath());
|
|
71084
71185
|
const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
|
|
71085
71186
|
const getFormulaExpression = field => {
|
|
71086
|
-
const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.
|
|
71187
|
+
const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), this.options.enableTypedFlang, "G29");
|
|
71087
71188
|
const resultType = result.getType();
|
|
71088
71189
|
return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue)) : result;
|
|
71089
71190
|
};
|
|
@@ -71154,7 +71255,10 @@ class NormalizationRulesGenerator {
|
|
|
71154
71255
|
const dataDeclarationRules = this.sugarRulesBuilder.buildRules();
|
|
71155
71256
|
|
|
71156
71257
|
// Порядок важен, т.к. потом делаем distinctBy.
|
|
71157
|
-
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(rule =>
|
|
71258
|
+
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(rule => {
|
|
71259
|
+
(0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.ensureCorrectFieldNameByExpressionType)(rule);
|
|
71260
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.wrapWithDisableValueAutoInitFlagCheckIfRequired)(this.formSchemaRng, rule);
|
|
71261
|
+
}).toArray();
|
|
71158
71262
|
const dictionaryRules = Iterator.from(allRules).filter(rule => rule instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && (rule.right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || rule.right instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && rule.right.targetExpression.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || rule.right instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression && rule.right.expression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && rule.right.expression.targetExpression.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict)).map(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement ? new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(x.left.modePath, x.left.valueName) : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.isNotNullOrUndefined).toArray();
|
|
71159
71263
|
const content = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRulesBuilder);
|
|
71160
71264
|
return {
|
|
@@ -71214,12 +71318,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71214
71318
|
|
|
71215
71319
|
|
|
71216
71320
|
class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.BaseRuleBuilder {
|
|
71217
|
-
constructor(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter) {
|
|
71321
|
+
constructor(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter, options) {
|
|
71218
71322
|
super();
|
|
71219
71323
|
this.formSchemaRng = void 0;
|
|
71220
71324
|
this.formulas = void 0;
|
|
71325
|
+
this.options = void 0;
|
|
71221
71326
|
this.formulaExprConverter = void 0;
|
|
71222
71327
|
this.dataDeclarationHelper = void 0;
|
|
71328
|
+
this.options = options;
|
|
71223
71329
|
this.formulaExprConverter = formulaExprConverter;
|
|
71224
71330
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
71225
71331
|
this.formulas = formulas;
|
|
@@ -71242,7 +71348,7 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
|
|
|
71242
71348
|
const isDisabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(fullTarget.toAbsolute());
|
|
71243
71349
|
const isDecimal = ((_this$formSchemaRng$g = this.formSchemaRng.getTypeNodeByPath(fullTarget.toAbsolute())) === null || _this$formSchemaRng$g === void 0 ? void 0 : _this$formSchemaRng$g.baseType) === "decimal";
|
|
71244
71350
|
const getFormulaExpression = targetField => {
|
|
71245
|
-
const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.
|
|
71351
|
+
const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), this.options.enableTypedFlang, "G29");
|
|
71246
71352
|
const resultType = result.getType();
|
|
71247
71353
|
return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)) : result;
|
|
71248
71354
|
};
|
|
@@ -71324,12 +71430,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71324
71430
|
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
71325
71431
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
71326
71432
|
/* harmony import */ var _markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../markupGenerator/getRootPath */ "./Generator/src/generators/markupGenerator/getRootPath.ts");
|
|
71327
|
-
/* harmony import */ var
|
|
71433
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
71434
|
+
/* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
|
|
71435
|
+
|
|
71328
71436
|
|
|
71329
71437
|
|
|
71330
71438
|
|
|
71331
71439
|
|
|
71332
|
-
class LazyLoadingRulesBuilder extends
|
|
71440
|
+
class LazyLoadingRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__.BaseRuleBuilder {
|
|
71333
71441
|
constructor(sugarRoot, lazyLoadingDeclaration) {
|
|
71334
71442
|
super();
|
|
71335
71443
|
this.sugarRoot = void 0;
|
|
@@ -71345,11 +71453,21 @@ class LazyLoadingRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_
|
|
|
71345
71453
|
const thresholdEntry = Object.entries(this.lazyLoadingDeclaration).find(x => x[1].thresholdValue != undefined);
|
|
71346
71454
|
if (thresholdEntry != undefined) {
|
|
71347
71455
|
var _thresholdEntry$1$thr, _thresholdEntry$;
|
|
71348
|
-
const thresholdEntryPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(`/${thresholdEntry[0]}`, true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
71456
|
+
const thresholdEntryPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(`/${thresholdEntry[0]}`, true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).trimLastStarIfLastToken();
|
|
71349
71457
|
const thresholdValue = (_thresholdEntry$1$thr = (_thresholdEntry$ = thresholdEntry[1]) === null || _thresholdEntry$ === void 0 ? void 0 : _thresholdEntry$.thresholdValue) !== null && _thresholdEntry$1$thr !== void 0 ? _thresholdEntry$1$thr : 0;
|
|
71350
71458
|
const lazyLoadingEnabledRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot).joinWith("LazyLoadingEnabled"), "value");
|
|
71351
|
-
const
|
|
71352
|
-
|
|
71459
|
+
const childrenPathReference = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(thresholdEntryPath.toCurrentIteration(), "children");
|
|
71460
|
+
const getLengthExpression = (useOldValue = false) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ArrayLengthExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DeserializeEnumerationExpression([useOldValue ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GetOldExpression(childrenPathReference) : childrenPathReference], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BoolLiteralExpression(true))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(0));
|
|
71461
|
+
if (thresholdEntryPath.isContainIteration()) {
|
|
71462
|
+
const lazyLoadingCounterRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot).joinWith("LazyLoadingCounter"), "value");
|
|
71463
|
+
const counterStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(lazyLoadingCounterRef, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToStringIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ReduceCallExpression(thresholdEntryPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ArgumentReferenceExpression("result"), getLengthExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IncrementalFlagExpression(), getLengthExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(lazyLoadingCounterRef)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(0)))));
|
|
71464
|
+
yield counterStatement;
|
|
71465
|
+
const lazyFlagStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(lazyLoadingEnabledRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToDecimalIfNeed)(counterStatement.left), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(thresholdValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false")));
|
|
71466
|
+
yield lazyFlagStatement;
|
|
71467
|
+
} else {
|
|
71468
|
+
const statement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(lazyLoadingEnabledRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GeExpression(getLengthExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(thresholdValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false")));
|
|
71469
|
+
yield statement;
|
|
71470
|
+
}
|
|
71353
71471
|
}
|
|
71354
71472
|
}
|
|
71355
71473
|
}
|
|
@@ -76870,7 +76988,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
76870
76988
|
return this.buildBaseFormWithContent(context, plainFormBuilder, node);
|
|
76871
76989
|
}
|
|
76872
76990
|
buildUnitInfo(context, pageNode, node) {
|
|
76873
|
-
var _node$panel, _pageNode$multiple, _pageNode$height;
|
|
76991
|
+
var _node$panel, _pageNode$multiple, _pageNode$height, _pageNode$enableUploa;
|
|
76874
76992
|
const pageContainsTableWithStickyElements = this.isPageContainsTableWithStickyElements(pageNode);
|
|
76875
76993
|
const unitList = (_node$panel = node.panel) === null || _node$panel === void 0 ? void 0 : _node$panel.unitList;
|
|
76876
76994
|
const unitName = unitList != undefined ? this.getUnitName(unitList, pageNode.id) : pageNode.navigationName;
|
|
@@ -76908,7 +77026,9 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
76908
77026
|
showOnDemand: pageNode.showOnDemand,
|
|
76909
77027
|
onNavigateFromErrorLog: context.generateHelperFunctionExpressionWithoutContext(pageNode, "onNavigateFromErrorLog", pageNode.onNavigateFromErrorLog),
|
|
76910
77028
|
onMount: context.generateHelperFunctionExpression(pageNode, "onMount", pageNode.onMount),
|
|
76911
|
-
onUnmount: context.generateHelperFunctionExpression(pageNode, "onUnmount", pageNode.onUnmount)
|
|
77029
|
+
onUnmount: context.generateHelperFunctionExpression(pageNode, "onUnmount", pageNode.onUnmount),
|
|
77030
|
+
uploadFilesInPage: context.generateHelperFunctionExpression(pageNode, "uploadFilesInPage", pageNode.uploadFilesInPage),
|
|
77031
|
+
enableUploadFilesInPage: (_pageNode$enableUploa = pageNode.enableUploadFilesInPage) !== null && _pageNode$enableUploa !== void 0 ? _pageNode$enableUploa : false
|
|
76912
77032
|
};
|
|
76913
77033
|
return result;
|
|
76914
77034
|
}
|
|
@@ -76949,7 +77069,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
76949
77069
|
return navigationBuilder;
|
|
76950
77070
|
}
|
|
76951
77071
|
buildPageUnit(node, pageNode, context) {
|
|
76952
|
-
var _node$panel2, _pageNode$clearConfir;
|
|
77072
|
+
var _node$panel2, _pageNode$enableUploa2, _pageNode$clearConfir;
|
|
76953
77073
|
const unitList = (_node$panel2 = node.panel) === null || _node$panel2 === void 0 ? void 0 : _node$panel2.unitList;
|
|
76954
77074
|
if (pageNode.navigationName == undefined && unitList == undefined) {
|
|
76955
77075
|
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_2__.SugarAttributeReadError("При отсутствии unitList необходимо указание navigationName", pageNode, "navigationName");
|
|
@@ -76995,6 +77115,8 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
76995
77115
|
markupBuilder.prop(x => x.optional).set(pageNode.optional);
|
|
76996
77116
|
markupBuilder.prop(x => x.onMount).set(context.generateHelperFunctionExpression(pageNode, "onMount", pageNode.onMount));
|
|
76997
77117
|
markupBuilder.prop(x => x.onUnmount).set(context.generateHelperFunctionExpression(pageNode, "onUnmount", pageNode.onUnmount));
|
|
77118
|
+
markupBuilder.prop(x => x.enableUploadFilesInPage).set((_pageNode$enableUploa2 = pageNode.enableUploadFilesInPage) !== null && _pageNode$enableUploa2 !== void 0 ? _pageNode$enableUploa2 : false);
|
|
77119
|
+
markupBuilder.prop(x => x.uploadFilesInPage).set(context.generateHelperFunctionExpression(pageNode, "uploadFilesInPage", pageNode.uploadFilesInPage));
|
|
76998
77120
|
if (pageNode.pageActions != undefined) {
|
|
76999
77121
|
markupBuilder.prop(x => x.pageActions).set(pageNode.pageActions);
|
|
77000
77122
|
}
|
|
@@ -77953,14 +78075,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
77953
78075
|
|
|
77954
78076
|
|
|
77955
78077
|
|
|
77956
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27;
|
|
78078
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29;
|
|
77957
78079
|
|
|
77958
78080
|
|
|
77959
78081
|
|
|
77960
78082
|
|
|
77961
78083
|
|
|
77962
78084
|
|
|
77963
|
-
let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("page", `Страница (раздел)`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("id", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Уникальный идентификатор странцы. Все страницы в форме должны иметь уникальный идентификатор.`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("template", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("default", "title", "multiple", "diadoc"), 'Для множественных разделов необходимо указать `template="multiple"`, для обычных разделов `template="default"`'), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.bindingPathLink)} данного элемента`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("headerpanel", [_UnitParts_HeaderPanel_HeaderPanelNode__WEBPACK_IMPORTED_MODULE_3__.HeaderPanelNode]), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("title", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("formName", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("showOnDemand", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Раздел не будет отображаться на странице, пока не будет вызван явно. Например, через механизм отображения раздела в разделе.`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onNavigateFromErrorLog", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед попыткой навигации в контрол внутри раздела"), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onMount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется после загрузки раздела"), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onUnmount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед выгрузкой раздела"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("orientation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("landscape"), `Ориентация страницы. При значении landscape станницы займёт всю доступную ширину экрана`),
|
|
78085
|
+
let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("page", `Страница (раздел)`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("id", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Уникальный идентификатор странцы. Все страницы в форме должны иметь уникальный идентификатор.`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("template", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("default", "title", "multiple", "diadoc"), 'Для множественных разделов необходимо указать `template="multiple"`, для обычных разделов `template="default"`'), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.bindingPathLink)} данного элемента`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("headerpanel", [_UnitParts_HeaderPanel_HeaderPanelNode__WEBPACK_IMPORTED_MODULE_3__.HeaderPanelNode]), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("title", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.deprecatedAttr)("formName", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_4__.DeprecationReason.Removed), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("showOnDemand", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Раздел не будет отображаться на странице, пока не будет вызван явно. Например, через механизм отображения раздела в разделе.`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onNavigateFromErrorLog", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед попыткой навигации в контрол внутри раздела"), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onMount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется после загрузки раздела"), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("onUnmount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется перед выгрузкой раздела"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("uploadFilesInPage", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызывается по клику на action 'Загрузить из файла' в 'Действия с разделом'"), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("enableUploadFilesInPage", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, "Включить показ действия 'Загрузить из файла', которое находится в кнопке 'Действия с разделом'"), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("orientation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("landscape"), `Ориентация страницы. При значении landscape станницы займёт всю доступную ширину экрана`), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("navigationName", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.localizedString, `Название Раздела в меню, если в сахаре есть отдельное описание навигации (unitList), то указывать не нужно`), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("height", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Начальная высота раздела`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("minHeight", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Минимальная высота раздела`), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("multiple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Обозначение множественного раздела`), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("unitsCountForPaging", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Количество инстансов множественного раздела на котором включается паджинация раздела`), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("multipleAppearance", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("nested", "flat"), "Представление множественных разделов: вложенное или плоское"), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("optional", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Опциональный раздел`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("pageActions", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.objectLiteral(), `Атрибут для кастомизации действий с разделом.
|
|
77964
78086
|
|
|
77965
78087
|
Объект с опциональным полями: caption: string, disableButton: boolean, hideButton: boolean,
|
|
77966
78088
|
showInsertButtons: boolean, lastButtonName: string, intermediateButtonName: string,
|
|
@@ -77975,10 +78097,10 @@ let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5
|
|
|
77975
78097
|
};
|
|
77976
78098
|
|
|
77977
78099
|
actionName: enableAutoValues, clear, remove, copy
|
|
77978
|
-
`),
|
|
78100
|
+
`), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("clearConfirmationSettings", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.objectLiteral(), `Атрибут для кастомизации сообщений лайтбоксов очистки и удаления раздела.
|
|
77979
78101
|
- removeChildrenText: дополнительный (красный) текст про вложенные разделы (если они есть) в лайтбоксе подтверждения удаления. По умолчанию: "Все вложенные разделы также будут удалены."
|
|
77980
78102
|
- keepChildrenCustomText: название вложенных разделов и данных в радио-баттоне _Оставить_ в лайтбоксе очистки. По умолчанию: "вложенные разделы и данные в них"
|
|
77981
|
-
- clearChildrenCustomText: название вложенных разделов в радио-баттоне _Удалить_ в лайтбоксе очистки. По умолчанию: "вложенные разделы"`),
|
|
78103
|
+
- clearChildrenCustomText: название вложенных разделов в радио-баттоне _Удалить_ в лайтбоксе очистки. По умолчанию: "вложенные разделы"`), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("hideEnableAutoValues", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `Всегда скрывать кнопку "Включить авторасчет", даже при включенной серверной нормализации`), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("navigationLimit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.number, `Количество экземпляров множественного раздела после которого в левом меню будет включаться компактный режим отображения разделов. По умолчанию: 15. Используется только для множественных разделов`), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("addingHint", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.localizedString, `Подсказка на кнопке добавления раздела в боковом меню. Используется только для множественных разделов`), _dec27 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)("page"), _dec28 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("title", [_PageTitleNode__WEBPACK_IMPORTED_MODULE_8__.PageTitleNode]), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_6__.javaScriptExpressionLink)} для условного скрытия раздела`), _dec(_class = (_class2 = class PageNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
77982
78104
|
constructor(...args) {
|
|
77983
78105
|
super(...args);
|
|
77984
78106
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "id", _descriptor, this);
|
|
@@ -77991,23 +78113,25 @@ let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5
|
|
|
77991
78113
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onNavigateFromErrorLog", _descriptor8, this);
|
|
77992
78114
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onMount", _descriptor9, this);
|
|
77993
78115
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onUnmount", _descriptor10, this);
|
|
77994
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
77995
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
77996
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
77997
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
77998
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
77999
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78000
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78001
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78002
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78003
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78004
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78005
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78006
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78007
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78008
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78009
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78010
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
78116
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "uploadFilesInPage", _descriptor11, this);
|
|
78117
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "enableUploadFilesInPage", _descriptor12, this);
|
|
78118
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "orientation", _descriptor13, this);
|
|
78119
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "navigationName", _descriptor14, this);
|
|
78120
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "height", _descriptor15, this);
|
|
78121
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "minHeight", _descriptor16, this);
|
|
78122
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor17, this);
|
|
78123
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "unitsCountForPaging", _descriptor18, this);
|
|
78124
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multipleAppearance", _descriptor19, this);
|
|
78125
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor20, this);
|
|
78126
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pageActions", _descriptor21, this);
|
|
78127
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "clearConfirmationSettings", _descriptor22, this);
|
|
78128
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "hideEnableAutoValues", _descriptor23, this);
|
|
78129
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "navigationLimit", _descriptor24, this);
|
|
78130
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "addingHint", _descriptor25, this);
|
|
78131
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pages", _descriptor26, this);
|
|
78132
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor27, this);
|
|
78133
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "title", _descriptor28, this);
|
|
78134
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "visible", _descriptor29, this);
|
|
78011
78135
|
}
|
|
78012
78136
|
getOwnPath() {
|
|
78013
78137
|
return this.path != undefined ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.createFromMask)(this.path, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.PathTokens.each) : undefined;
|
|
@@ -78066,87 +78190,97 @@ let PageNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5
|
|
|
78066
78190
|
enumerable: true,
|
|
78067
78191
|
writable: true,
|
|
78068
78192
|
initializer: null
|
|
78069
|
-
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
78193
|
+
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "uploadFilesInPage", [_dec12], {
|
|
78194
|
+
configurable: true,
|
|
78195
|
+
enumerable: true,
|
|
78196
|
+
writable: true,
|
|
78197
|
+
initializer: null
|
|
78198
|
+
}), _descriptor12 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "enableUploadFilesInPage", [_dec13], {
|
|
78199
|
+
configurable: true,
|
|
78200
|
+
enumerable: true,
|
|
78201
|
+
writable: true,
|
|
78202
|
+
initializer: null
|
|
78203
|
+
}), _descriptor13 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "orientation", [_dec14], {
|
|
78070
78204
|
configurable: true,
|
|
78071
78205
|
enumerable: true,
|
|
78072
78206
|
writable: true,
|
|
78073
78207
|
initializer: null
|
|
78074
|
-
}),
|
|
78208
|
+
}), _descriptor14 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "navigationName", [_dec15], {
|
|
78075
78209
|
configurable: true,
|
|
78076
78210
|
enumerable: true,
|
|
78077
78211
|
writable: true,
|
|
78078
78212
|
initializer: null
|
|
78079
|
-
}),
|
|
78213
|
+
}), _descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "height", [_dec16], {
|
|
78080
78214
|
configurable: true,
|
|
78081
78215
|
enumerable: true,
|
|
78082
78216
|
writable: true,
|
|
78083
78217
|
initializer: null
|
|
78084
|
-
}),
|
|
78218
|
+
}), _descriptor16 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "minHeight", [_dec17], {
|
|
78085
78219
|
configurable: true,
|
|
78086
78220
|
enumerable: true,
|
|
78087
78221
|
writable: true,
|
|
78088
78222
|
initializer: null
|
|
78089
|
-
}),
|
|
78223
|
+
}), _descriptor17 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multiple", [_dec18], {
|
|
78090
78224
|
configurable: true,
|
|
78091
78225
|
enumerable: true,
|
|
78092
78226
|
writable: true,
|
|
78093
78227
|
initializer: null
|
|
78094
|
-
}),
|
|
78228
|
+
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "unitsCountForPaging", [_dec19], {
|
|
78095
78229
|
configurable: true,
|
|
78096
78230
|
enumerable: true,
|
|
78097
78231
|
writable: true,
|
|
78098
78232
|
initializer: null
|
|
78099
|
-
}),
|
|
78233
|
+
}), _descriptor19 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multipleAppearance", [_dec20], {
|
|
78100
78234
|
configurable: true,
|
|
78101
78235
|
enumerable: true,
|
|
78102
78236
|
writable: true,
|
|
78103
78237
|
initializer: null
|
|
78104
|
-
}),
|
|
78238
|
+
}), _descriptor20 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "optional", [_dec21], {
|
|
78105
78239
|
configurable: true,
|
|
78106
78240
|
enumerable: true,
|
|
78107
78241
|
writable: true,
|
|
78108
78242
|
initializer: null
|
|
78109
|
-
}),
|
|
78243
|
+
}), _descriptor21 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "pageActions", [_dec22], {
|
|
78110
78244
|
configurable: true,
|
|
78111
78245
|
enumerable: true,
|
|
78112
78246
|
writable: true,
|
|
78113
78247
|
initializer: null
|
|
78114
|
-
}),
|
|
78248
|
+
}), _descriptor22 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "clearConfirmationSettings", [_dec23], {
|
|
78115
78249
|
configurable: true,
|
|
78116
78250
|
enumerable: true,
|
|
78117
78251
|
writable: true,
|
|
78118
78252
|
initializer: null
|
|
78119
|
-
}),
|
|
78253
|
+
}), _descriptor23 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "hideEnableAutoValues", [_dec24], {
|
|
78120
78254
|
configurable: true,
|
|
78121
78255
|
enumerable: true,
|
|
78122
78256
|
writable: true,
|
|
78123
78257
|
initializer: null
|
|
78124
|
-
}),
|
|
78258
|
+
}), _descriptor24 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "navigationLimit", [_dec25], {
|
|
78125
78259
|
configurable: true,
|
|
78126
78260
|
enumerable: true,
|
|
78127
78261
|
writable: true,
|
|
78128
78262
|
initializer: null
|
|
78129
|
-
}),
|
|
78263
|
+
}), _descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "addingHint", [_dec26], {
|
|
78130
78264
|
configurable: true,
|
|
78131
78265
|
enumerable: true,
|
|
78132
78266
|
writable: true,
|
|
78133
78267
|
initializer: null
|
|
78134
|
-
}),
|
|
78268
|
+
}), _descriptor26 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "pages", [_dec27], {
|
|
78135
78269
|
configurable: true,
|
|
78136
78270
|
enumerable: true,
|
|
78137
78271
|
writable: true,
|
|
78138
78272
|
initializer: null
|
|
78139
|
-
}),
|
|
78273
|
+
}), _descriptor27 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec28], {
|
|
78140
78274
|
configurable: true,
|
|
78141
78275
|
enumerable: true,
|
|
78142
78276
|
writable: true,
|
|
78143
78277
|
initializer: null
|
|
78144
|
-
}),
|
|
78278
|
+
}), _descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "title", [_dec29], {
|
|
78145
78279
|
configurable: true,
|
|
78146
78280
|
enumerable: true,
|
|
78147
78281
|
writable: true,
|
|
78148
78282
|
initializer: null
|
|
78149
|
-
}),
|
|
78283
|
+
}), _descriptor29 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "visible", [_dec30], {
|
|
78150
78284
|
configurable: true,
|
|
78151
78285
|
enumerable: true,
|
|
78152
78286
|
writable: true,
|