@kontur.candy/generator 4.252.0-diadoc.2 → 4.252.0-diadoc.3

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -63
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -112357,40 +112357,6 @@ let EachCurrentCollision;
112357
112357
 
112358
112358
  /***/ }),
112359
112359
 
112360
- /***/ "./Common/ModelPath/Map/AbsoluteModelPathMap.ts":
112361
- /*!******************************************************!*\
112362
- !*** ./Common/ModelPath/Map/AbsoluteModelPathMap.ts ***!
112363
- \******************************************************/
112364
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
112365
-
112366
- "use strict";
112367
- __webpack_require__.r(__webpack_exports__);
112368
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
112369
- /* harmony export */ "AbsoluteModelPathMap": () => (/* binding */ AbsoluteModelPathMap)
112370
- /* harmony export */ });
112371
- /* harmony import */ var _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../EachCurrentCollision */ "./Common/ModelPath/EachCurrentCollision.ts");
112372
- /* harmony import */ var _Map2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Map2 */ "./Common/ModelPath/Map/Map2.ts");
112373
-
112374
-
112375
- class AbsoluteModelPathMap extends _Map2__WEBPACK_IMPORTED_MODULE_1__.Map2 {
112376
- constructor(eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_0__.EachCurrentCollision.AreSame) {
112377
- super();
112378
- this.eachCurrentCollision = void 0;
112379
- this.eachCurrentCollision = eachCurrentCollision;
112380
- }
112381
-
112382
- areKeyEqual(left, right) {
112383
- return left.isEquals(right, this.eachCurrentCollision);
112384
- }
112385
-
112386
- getKeyHash(key) {
112387
- return key.getHash(this.eachCurrentCollision);
112388
- }
112389
-
112390
- }
112391
-
112392
- /***/ }),
112393
-
112394
112360
  /***/ "./Common/ModelPath/Map/Map2.ts":
112395
112361
  /*!**************************************!*\
112396
112362
  !*** ./Common/ModelPath/Map/Map2.ts ***!
@@ -129968,9 +129934,9 @@ __webpack_require__.r(__webpack_exports__);
129968
129934
  /* harmony import */ var _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/FLangNormalizationRulesBuilder */ "./Generator/src/generators/markupGenerator/FLangNormalizationRulesBuilder.ts");
129969
129935
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
129970
129936
  /* harmony import */ var _Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../Common/ModelPath/BuildIterationSequence */ "./Common/ModelPath/BuildIterationSequence.ts");
129971
- /* harmony import */ var _Common_ModelPath_Map_AbsoluteModelPathMap__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../Common/ModelPath/Map/AbsoluteModelPathMap */ "./Common/ModelPath/Map/AbsoluteModelPathMap.ts");
129972
- /* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
129973
- /* harmony import */ var _FLangValidationBuildContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./FLangValidationBuildContext */ "./Generator/src/generators/ServerSideFLangNormalization/FLangValidationBuildContext.ts");
129937
+ /* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
129938
+ /* harmony import */ var _FLangValidationBuildContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./FLangValidationBuildContext */ "./Generator/src/generators/ServerSideFLangNormalization/FLangValidationBuildContext.ts");
129939
+ /* harmony import */ var _Common_ModelPath_Map_Map2__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../Common/ModelPath/Map/Map2 */ "./Common/ModelPath/Map/Map2.ts");
129974
129940
 
129975
129941
 
129976
129942
 
@@ -130008,16 +129974,16 @@ class NormalizationRulesGenerator {
130008
129974
  const initializeRules = this.buildInitializeRules(formRoot, resourcesHash);
130009
129975
  let dataDeclarationRules = [...this.buildSugarFLangRules()];
130010
129976
  const formulaFLangRules = [...this.buildFormulaFLangRules()];
130011
- const autocalculatedValuePaths = formulaFLangRules.map(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement ? new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.AbsoluteModelFieldPath(x.left.modePath, x.left.valueName) : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_9__.isNotNullOrUndefined);
129977
+ const autocalculatedValuePaths = formulaFLangRules.map(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement ? new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.AbsoluteModelFieldPath(x.left.modePath, x.left.valueName) : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_9__.isNotNullOrUndefined);
130012
129978
  dataDeclarationRules = dataDeclarationRules.filter(ddp => {
130013
- const ddpTarget = ddp instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement ? new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.AbsoluteModelFieldPath(ddp.left.modePath, ddp.left.valueName) : undefined;
129979
+ const ddpTarget = ddp instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement ? new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.AbsoluteModelFieldPath(ddp.left.modePath, ddp.left.valueName) : undefined;
130014
129980
  return ddpTarget == undefined || !autocalculatedValuePaths.some(x => x.isEquals(ddpTarget));
130015
129981
  });
130016
129982
  return _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, dataDeclarationRules, formulaFLangRules, this.buildSugarValidationRules()).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
130017
129983
  }
130018
129984
 
130019
129985
  buildInitializeRules(formRoot, resourcesHash) {
130020
- return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot), "resourcesHash"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(resourcesHash)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot), "normalizationSource"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("server"))];
129986
+ return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot), "resourcesHash"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression(resourcesHash)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot), "normalizationSource"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression("server"))];
130021
129987
  }
130022
129988
 
130023
129989
  buildSugarFLangRules() {
@@ -130042,10 +130008,10 @@ class NormalizationRulesGenerator {
130042
130008
  const result = [];
130043
130009
 
130044
130010
  if (isTargetAutoField) {
130045
- result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(prefix.joinWith(target), "autoValue"), this.compileExpressionToFlashExpression(formula.expression, prefix, x => precalculationRules.push(x))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(prefix.joinWith(target), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(prefix.joinWith(target), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(prefix.joinWith(target), "autoValue")), "string")));
130011
+ result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(prefix.joinWith(target), "autoValue"), this.compileExpressionToFlashExpression(formula.expression, prefix, x => precalculationRules.push(x))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(prefix.joinWith(target), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(prefix.joinWith(target), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(prefix.joinWith(target), "autoValue")), "string")));
130046
130012
  result.push(...precalculationRules);
130047
130013
  } else {
130048
- result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(prefix.joinWith(target), "value"), this.compileExpressionToFlashExpression(formula.expression, prefix, x => precalculationRules.push(x))));
130014
+ result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(prefix.joinWith(target), "value"), this.compileExpressionToFlashExpression(formula.expression, prefix, x => precalculationRules.push(x))));
130049
130015
  result.push(...precalculationRules);
130050
130016
  }
130051
130017
 
@@ -130073,9 +130039,9 @@ class NormalizationRulesGenerator {
130073
130039
  const adjustedTargetPath = (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_6__.adjustPathMultiplicityComplex)(targetPath.toAbsolute(), this.formSchemaRng, this.dataDeclarationHelper);
130074
130040
 
130075
130041
  if (adjustedTargetPath.isEquals(targetPath, _Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_5__.EachCurrentCollision.AreDifferent)) {
130076
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(expression.select, false)), "value");
130042
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(expression.select, false)), "value");
130077
130043
  } else {
130078
- let resultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(adjustedTargetPath.toCurrentIteration(), "value");
130044
+ let resultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(adjustedTargetPath.toCurrentIteration(), "value");
130079
130045
  const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_10__.buildIterationSequence)(adjustedTargetPath))];
130080
130046
 
130081
130047
  if (iterationEntries.length > 1) {
@@ -130084,10 +130050,10 @@ class NormalizationRulesGenerator {
130084
130050
  }
130085
130051
 
130086
130052
  for (const iterationEntry of iterationEntries) {
130087
- const nextResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(iterationEntry.iterable.joinWith(iterationEntry.suffix), "sum");
130088
- const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(iterationEntry.iterable.joinWith(iterationEntry.suffix), "count");
130089
- addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ReduceCallExpression(iterationEntry.iterable, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(resultValueExpression, "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("G29"))));
130090
- addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ReduceCallExpression(iterationEntry.iterable, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(1))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("G29"))));
130053
+ const nextResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(iterationEntry.iterable.joinWith(iterationEntry.suffix), "sum");
130054
+ const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(iterationEntry.iterable.joinWith(iterationEntry.suffix), "count");
130055
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ReduceCallExpression(iterationEntry.iterable, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(resultValueExpression, "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression("G29"))));
130056
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ReduceCallExpression(iterationEntry.iterable, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(1))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression("G29"))));
130091
130057
  resultValueExpression = nextResultValueExpression;
130092
130058
  }
130093
130059
 
@@ -130097,7 +130063,7 @@ class NormalizationRulesGenerator {
130097
130063
 
130098
130064
  compileConstExpression(expression) {
130099
130065
  if (expression.type === "decimal") {
130100
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(parseFloat(expression.value));
130066
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(parseFloat(expression.value));
130101
130067
  }
130102
130068
 
130103
130069
  throw new Error(`Unsupported type of node: ${expression.constructor.name}`);
@@ -130114,24 +130080,24 @@ class NormalizationRulesGenerator {
130114
130080
  }
130115
130081
 
130116
130082
  buildSum(prefix, left, right, addPrecalculationRule) {
130117
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SumBinaryExpression(this.castOperandToDecimalIfNeed(this.compileExpressionToFlashExpression(left, prefix, addPrecalculationRule)), this.castOperandToDecimalIfNeed(this.compileExpressionToFlashExpression(right, prefix, addPrecalculationRule))), "string");
130083
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SumBinaryExpression(this.castOperandToDecimalIfNeed(this.compileExpressionToFlashExpression(left, prefix, addPrecalculationRule)), this.castOperandToDecimalIfNeed(this.compileExpressionToFlashExpression(right, prefix, addPrecalculationRule))), "string");
130118
130084
  }
130119
130085
 
130120
130086
  castOperandToDecimalIfNeed(operandExpression) {
130121
- return operandExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression ? operandExpression : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(operandExpression, "decimal");
130087
+ return operandExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression ? operandExpression : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(operandExpression, "decimal");
130122
130088
  }
130123
130089
 
130124
130090
  *buildSugarValidationRules() {
130125
130091
  const converter = new _markupGenerator_ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_2__.FormConverter(this.sugarRoot);
130126
- const context = new _FLangValidationBuildContext__WEBPACK_IMPORTED_MODULE_13__.FLangValidationBuildContext(this.typesRegistry, this.formSchemaRng, this.useSchemaValidations);
130092
+ const context = new _FLangValidationBuildContext__WEBPACK_IMPORTED_MODULE_12__.FLangValidationBuildContext(this.typesRegistry, this.formSchemaRng, this.useSchemaValidations);
130127
130093
  yield* converter.buildFLangValidations(context);
130128
130094
  yield* this.buildErrorCountRule(context.getAllPathsWithValidations());
130129
130095
  }
130130
130096
 
130131
130097
  *buildErrorCountRule(allPathsWithValidations) {
130132
- const zeroExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0);
130133
- const totalErrorCountExpressions = new _Common_ModelPath_Map_AbsoluteModelPathMap__WEBPACK_IMPORTED_MODULE_11__.AbsoluteModelPathMap(_Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_5__.EachCurrentCollision.AreDifferent);
130134
- const errorCountByTarget = new _Common_ModelPath_Map_AbsoluteModelPathMap__WEBPACK_IMPORTED_MODULE_11__.AbsoluteModelPathMap(_Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_5__.EachCurrentCollision.AreDifferent);
130098
+ const zeroExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0);
130099
+ const totalErrorCountExpressions = new _Common_ModelPath_Map_Map2__WEBPACK_IMPORTED_MODULE_13__.AbsoluteModelPathMap(_Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_5__.EachCurrentCollision.AreDifferent);
130100
+ const errorCountByTarget = new _Common_ModelPath_Map_Map2__WEBPACK_IMPORTED_MODULE_13__.AbsoluteModelPathMap(_Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_5__.EachCurrentCollision.AreDifferent);
130135
130101
 
130136
130102
  for (const path of allPathsWithValidations) {
130137
130103
  var _IterUtils$last$itera, _IterUtils$last;
@@ -130141,7 +130107,7 @@ class NormalizationRulesGenerator {
130141
130107
 
130142
130108
  for (const iterationEntry of iterationSequence) {
130143
130109
  errorCountByTarget.getOrSet(iterationEntry.iterable, []).push(resultCountExpression);
130144
- resultCountExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(iterationEntry.iterable.toCurrentIteration(), "errorsCount"), "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0));
130110
+ resultCountExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(iterationEntry.iterable.toCurrentIteration(), "errorsCount"), "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0));
130145
130111
  }
130146
130112
 
130147
130113
  totalErrorCountExpressions.set((_IterUtils$last$itera = (_IterUtils$last = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.last(iterationSequence)) === null || _IterUtils$last === void 0 ? void 0 : _IterUtils$last.iterable) !== null && _IterUtils$last$itera !== void 0 ? _IterUtils$last$itera : path, resultCountExpression);
@@ -130150,18 +130116,18 @@ class NormalizationRulesGenerator {
130150
130116
  for (const entry of errorCountByTarget.entries()) {
130151
130117
  const iterable = entry[0];
130152
130118
  const items = entry[1];
130153
- const firstEmptyExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NullLiteralExpression();
130154
- const allItemsSumExpression = items.reduce((x, y) => x == firstEmptyExpression ? y : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SumBinaryExpression(x, y), firstEmptyExpression);
130155
- const nextErrorCountPrecalculation = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(iterable, "errorsCount");
130156
- yield new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(nextErrorCountPrecalculation, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ArgumentReferenceExpression("result"), allItemsSumExpression)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("G29")));
130119
+ const firstEmptyExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.NullLiteralExpression();
130120
+ const allItemsSumExpression = items.reduce((x, y) => x == firstEmptyExpression ? y : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SumBinaryExpression(x, y), firstEmptyExpression);
130121
+ const nextErrorCountPrecalculation = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(iterable, "errorsCount");
130122
+ yield new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(nextErrorCountPrecalculation, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ArgumentReferenceExpression("result"), allItemsSumExpression)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression("G29")));
130157
130123
  }
130158
130124
 
130159
- const allRules = Iterator.from(totalErrorCountExpressions.values()).reduce((result, expression) => result === zeroExpression ? expression : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SumBinaryExpression(result, expression), zeroExpression);
130160
- yield new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)((0,_markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_4__.getRootPath)(this.sugarRoot)), "errorsCount"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.CastExpression(allRules, "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("G29")));
130125
+ const allRules = Iterator.from(totalErrorCountExpressions.values()).reduce((result, expression) => result === zeroExpression ? expression : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SumBinaryExpression(result, expression), zeroExpression);
130126
+ yield new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)((0,_markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_4__.getRootPath)(this.sugarRoot)), "errorsCount"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.CastExpression(allRules, "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression("G29")));
130161
130127
  }
130162
130128
 
130163
130129
  getErrorCountExpression(path) {
130164
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(path, "error"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(`[]`)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(path, "error"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(1));
130130
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(path, "error"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.StringLiteralExpression(`[]`)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression(path, "error"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_11__.DecimalLiteralExpression(1));
130165
130131
  }
130166
130132
 
130167
130133
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "4.252.0-diadoc.2",
3
+ "version": "4.252.0-diadoc.3",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,