@kontur.candy/generator 5.46.0-incremental-dictionaries.3 → 5.46.0-incremental-dictionaries.5

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 +107 -57
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -68592,6 +68592,7 @@ __webpack_require__.r(__webpack_exports__);
68592
68592
  /* harmony export */ ArgumentDeclarationExpression: () => (/* binding */ ArgumentDeclarationExpression),
68593
68593
  /* harmony export */ ArgumentReferenceExpression: () => (/* binding */ ArgumentReferenceExpression),
68594
68594
  /* harmony export */ ArrayExpression: () => (/* binding */ ArrayExpression),
68595
+ /* harmony export */ ArrayLengthExpression: () => (/* binding */ ArrayLengthExpression),
68595
68596
  /* harmony export */ BinaryBooleanExpression: () => (/* binding */ BinaryBooleanExpression),
68596
68597
  /* harmony export */ BinaryExpression: () => (/* binding */ BinaryExpression),
68597
68598
  /* harmony export */ BoolLiteralExpression: () => (/* binding */ BoolLiteralExpression),
@@ -68611,6 +68612,7 @@ __webpack_require__.r(__webpack_exports__);
68611
68612
  /* harmony export */ DifferenceInMonthsExpression: () => (/* binding */ DifferenceInMonthsExpression),
68612
68613
  /* harmony export */ DivisionBinaryExpression: () => (/* binding */ DivisionBinaryExpression),
68613
68614
  /* harmony export */ EqExpression: () => (/* binding */ EqExpression),
68615
+ /* harmony export */ ExistsExpression: () => (/* binding */ ExistsExpression),
68614
68616
  /* harmony export */ FLangBoolExpression: () => (/* binding */ FLangBoolExpression),
68615
68617
  /* harmony export */ FLangDecimalExpression: () => (/* binding */ FLangDecimalExpression),
68616
68618
  /* harmony export */ FLangDictExpression: () => (/* binding */ FLangDictExpression),
@@ -69794,7 +69796,39 @@ class ArrayExpression extends FLangExpression {
69794
69796
  }
69795
69797
  convertToString() {
69796
69798
  const items = this.items.map(x => x.convertToString()).join(", ");
69797
- return `array(${items})`;
69799
+ return `makeArray(${items})`;
69800
+ }
69801
+ }
69802
+ class ArrayLengthExpression extends FLangExpression {
69803
+ constructor(expression) {
69804
+ super();
69805
+ this.expression = void 0;
69806
+ this.expression = expression;
69807
+ }
69808
+ getType() {
69809
+ return BuildInTypeExpression.decimal;
69810
+ }
69811
+ *getChildNodes() {
69812
+ yield this.expression;
69813
+ }
69814
+ convertToString() {
69815
+ return `arrayLength(${this.expression.convertToString()})`;
69816
+ }
69817
+ }
69818
+ class ExistsExpression extends FLangExpression {
69819
+ constructor(source) {
69820
+ super();
69821
+ this.source = void 0;
69822
+ this.source = source;
69823
+ }
69824
+ getType() {
69825
+ return BuildInTypeExpression.bool;
69826
+ }
69827
+ *getChildNodes() {
69828
+ yield this.source;
69829
+ }
69830
+ convertToString() {
69831
+ return `exists(${this.source.convertToString()})`;
69798
69832
  }
69799
69833
  }
69800
69834
  class NullCoalesceExpression extends FLangExpression {
@@ -69985,9 +70019,12 @@ __webpack_require__.r(__webpack_exports__);
69985
70019
  /* harmony export */ wrapWithArgumentsCondition: () => (/* binding */ wrapWithArgumentsCondition),
69986
70020
  /* harmony export */ wrapWithDisableValueAutoInitFlagCheckIfRequired: () => (/* binding */ wrapWithDisableValueAutoInitFlagCheckIfRequired)
69987
70021
  /* harmony export */ });
69988
- /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
69989
- /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
69990
- /* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
70022
+ /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! util */ "util");
70023
+ /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_0__);
70024
+ /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
70025
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
70026
+ /* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
70027
+
69991
70028
 
69992
70029
 
69993
70030
 
@@ -70001,111 +70038,114 @@ function* getAllExpressionChildren(node, descendantsFilter) {
70001
70038
  }
70002
70039
  }
70003
70040
  function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
70004
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("true")), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
70041
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.StringLiteralExpression("true")), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NoDepsExpression(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
70005
70042
  }
70006
70043
  function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
70007
70044
  var _formSchemaRng$getEle;
70008
- return x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.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];
70045
+ return x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.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];
70009
70046
  }
70010
70047
  function wrapWithArgumentsCondition(expression) {
70011
- const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression);
70012
- const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression ? x : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isNotNullOrUndefined);
70013
- const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
70014
- const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.reduce(uniquePaths, (acc, curr) => {
70015
- const currExpr = new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NotEqExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(curr.modePath, curr.valueName), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression()), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NotEqExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(curr.modePath, curr.valueName), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("")));
70016
- return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.OrBinaryExpression(acc, currExpr) : currExpr;
70048
+ const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NoDepsExpression);
70049
+ const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression ? x : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined);
70050
+ const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
70051
+ const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.reduce(uniquePaths, (acc, curr) => {
70052
+ const currExpr = new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.AndBinaryExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NotEqExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression(curr.modePath, curr.valueName), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NullLiteralExpression()), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NotEqExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression(curr.modePath, curr.valueName), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.StringLiteralExpression("")));
70053
+ return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.OrBinaryExpression(acc, currExpr) : currExpr;
70017
70054
  }, undefined);
70018
70055
  if (conditionExpression == undefined) {
70019
70056
  return expression;
70020
70057
  }
70021
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression());
70058
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NullLiteralExpression());
70022
70059
  }
70023
70060
  function combineRulesWithOptionalSectionChecking(allRules, optionalSectionRulesBuilder) {
70024
- const allUniqueRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.distinctBy(allRules, x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement ? x.left.convertToString() : x.convertToString());
70061
+ const allUniqueRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allRules, x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.SetStatement ? x.left.convertToString() : x.convertToString());
70025
70062
  const allUniqueRulesWithOptionalChecks = Iterator.from(optionalSectionRulesBuilder.wrapRulesWithOptionalPageCheck(allUniqueRules)).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
70026
70063
  return allUniqueRulesWithOptionalChecks;
70027
70064
  }
70028
70065
  function tryExtractValueReferenceAsStringFromDecimal(expression) {
70029
- if (expression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal && expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70066
+ if (expression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.decimal && expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70030
70067
  return expression.targetExpression;
70031
70068
  }
70032
70069
  return expression;
70033
70070
  }
70034
70071
  function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
70035
- if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DateNowExpression) {
70036
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("dd.MM.yyyy"));
70072
+ if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.DateNowExpression) {
70073
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.StringLiteralExpression("dd.MM.yyyy"));
70037
70074
  }
70038
- if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.array) {
70075
+ if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.hashSet) {
70039
70076
  return operandExpression;
70040
70077
  }
70041
- return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
70078
+ return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
70042
70079
  }
70043
70080
  function castOperandIfNeed(operandExpression, type) {
70044
- if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression) {
70045
- return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, type) : operandExpression;
70081
+ if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression) {
70082
+ return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(operandExpression, type) : operandExpression;
70046
70083
  }
70047
- return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Invalid type for cast: ${type}`);
70084
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid type for cast: ${type}`);
70048
70085
  }
70049
70086
  function castOperandToBoolIfNeed(operandExpression) {
70050
- return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.bool) : operandExpression;
70087
+ return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.bool) : operandExpression;
70051
70088
  }
70052
70089
  function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
70053
- return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
70090
+ return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
70054
70091
  }
70055
70092
  const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
70056
70093
  function castOperandToDateTimeIfNeed(operandExpression) {
70057
- return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dateTime) : operandExpression;
70094
+ return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.dateTime) : operandExpression;
70058
70095
  }
70059
70096
  function nullCoalesceWithTypeCheck(argument, replacement) {
70060
- const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.null || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.null;
70097
+ const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.null || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.null;
70061
70098
  if (!isValid) {
70062
70099
  throw new Error("Couldn't build null coalesce expression: types not match");
70063
70100
  }
70064
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression(argument, replacement);
70101
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NullCoalesceExpression(argument, replacement);
70065
70102
  }
70066
70103
  function ensureOperandsOfTypeOrNull(type, ...operands) {
70067
70104
  for (const operand of operands) {
70068
70105
  const operandType = operand.getType();
70069
- if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.null && operandType !== type) {
70106
+ if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.null && operandType !== type) {
70070
70107
  throw new Error(`Invalid operand type: required [${type}] but got ${operandType}`);
70071
70108
  }
70072
70109
  }
70073
70110
  }
70074
70111
  function combineByOrFlangExpr(acc, current) {
70075
- return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.OrBinaryExpression(acc, current) : current;
70112
+ return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.OrBinaryExpression(acc, current) : current;
70076
70113
  }
70077
70114
  function combineByAndFlangExpr(acc, current) {
70078
- return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(acc, current) : current;
70115
+ return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.AndBinaryExpression(acc, current) : current;
70079
70116
  }
70080
70117
  function makeNoDeps(expression) {
70081
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70082
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(expression);
70118
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70119
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NoDepsExpression(expression);
70083
70120
  }
70084
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70085
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
70121
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70122
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
70086
70123
  }
70087
- return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
70124
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
70088
70125
  }
70089
70126
  function makeGetOld(expression) {
70090
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70091
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.GetOldExpression(expression);
70127
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70128
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.GetOldExpression(expression);
70092
70129
  }
70093
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70094
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
70130
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70131
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
70095
70132
  }
70096
- return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
70133
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
70097
70134
  }
70098
70135
  function makeStringValueReference(modePath, valueName) {
70099
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string);
70136
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.BuildInTypeExpression.string);
70100
70137
  }
70101
70138
  function extractValueReferenceFromCast(expression) {
70102
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70139
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70103
70140
  return expression;
70104
70141
  }
70105
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression) {
70142
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
70143
+ return expression.targetExpression;
70144
+ }
70145
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_3__.NoDepsExpression) {
70106
70146
  return expression.targetExpression;
70107
70147
  }
70108
- return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Cannot extract ValueReferenceExpression!`);
70148
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Cannot extract ValueReferenceExpression! ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression)}`);
70109
70149
  }
70110
70150
 
70111
70151
  /***/ }),
@@ -70405,8 +70445,8 @@ class FormulaExpressionToFlangExpressionConverter {
70405
70445
  // TODO: тут необходимо учесть, что exists может смотреть на множественность
70406
70446
  // TODO: реализовать в рамках задачи https://yt.skbkontur.ru/issue/FS-7385
70407
70447
  /* eslint-enable no-warning-comments */
70408
- const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
70409
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())));
70448
+ const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.extractValueReferenceFromCast)(this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule));
70449
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ExistsExpression(arg);
70410
70450
  }
70411
70451
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaWhenExpression) {
70412
70452
  const condition = this.compileExpressionToFlangExpressionInternal(expression.expressions[0], prefix, target, addPrecalculationRule);
@@ -70616,7 +70656,13 @@ class FormulaExpressionToFlangExpressionConverter {
70616
70656
  compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule) {
70617
70657
  const dictPath = this.preparePathAndAdjustMultiplicity(prefix, expression.dictPath);
70618
70658
  const targetKeys = expression.targetKeys;
70619
- const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression(targetKeys.items.map(i => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.extractValueReferenceFromCast)(this.compileEnumerationItem(i, prefix, target, addPrecalculationRule))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70659
+ const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression(targetKeys.items.map(i => {
70660
+ const item = this.compileEnumerationItem(i, prefix, target, addPrecalculationRule);
70661
+ if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConstExpression) {
70662
+ return item;
70663
+ }
70664
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.extractValueReferenceFromCast)(item);
70665
+ }), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70620
70666
  const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(dictPath, "value")), deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
70621
70667
  return finalValueExpression;
70622
70668
  }
@@ -70643,7 +70689,13 @@ class FormulaExpressionToFlangExpressionConverter {
70643
70689
  }
70644
70690
  const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70645
70691
  const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToDecimalIfNeed)(sourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression());
70646
- const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression(targetKeys.items.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70692
+ const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression(targetKeys.items.map(i => {
70693
+ const item = this.compileEnumerationItem(i, prefix, target, addPrecalculationRule);
70694
+ if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConstExpression) {
70695
+ return item;
70696
+ }
70697
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.extractValueReferenceFromCast)(item);
70698
+ }), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true));
70647
70699
  const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetSumByKeysExpression(reduceExpression, deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
70648
70700
  return finalValueExpression;
70649
70701
  }
@@ -71303,8 +71355,8 @@ __webpack_require__.r(__webpack_exports__);
71303
71355
  /* harmony import */ var _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../Engine/src/Engine/Core/PathUtils/PathUtils */ "./Engine/src/Engine/Core/PathUtils/PathUtils.ts");
71304
71356
  /* harmony import */ var _Common_ModelPath_ModelPathHelper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPathHelper */ "./Common/ModelPath/ModelPathHelper.ts");
71305
71357
  /* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../Common/PathConstants */ "./Common/PathConstants.ts");
71306
- /* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
71307
- /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
71358
+ /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
71359
+ /* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
71308
71360
 
71309
71361
 
71310
71362
 
@@ -71316,7 +71368,7 @@ __webpack_require__.r(__webpack_exports__);
71316
71368
 
71317
71369
 
71318
71370
 
71319
- class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_9__.BaseRuleBuilder {
71371
+ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_10__.BaseRuleBuilder {
71320
71372
  constructor(sugarRoot, dataDeclarationHelper) {
71321
71373
  super();
71322
71374
  this.sugarRoot = void 0;
@@ -71402,7 +71454,7 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
71402
71454
  const targetIsFilledPath = targetOptionalSection.path.joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__.OptionalSectionFilledFieldName);
71403
71455
  if (!targetIsFilledPath.isEquals(targetPath)) {
71404
71456
  const targetIsFilledValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(targetIsFilledPath.toCurrentIteration(), "value");
71405
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(rule.left, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.EqExpression(targetIsFilledValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1")), rule.right, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()));
71457
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(rule.left, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(targetIsFilledValueRef), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1")), rule.right, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()));
71406
71458
  }
71407
71459
  }
71408
71460
  return rule;
@@ -71424,7 +71476,7 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
71424
71476
  var _pathGroup$, _pathGroup$map$reduce;
71425
71477
  const iterationEntry = (_pathGroup$ = pathGroup[0]) === null || _pathGroup$ === void 0 ? void 0 : _pathGroup$.lastIterationEntry;
71426
71478
  const pathCheckExpr = (_pathGroup$map$reduce = pathGroup.map(pathInfo => {
71427
- const pathValueRef = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_10__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(pathInfo.path.toCurrentIteration(), "value"));
71479
+ const pathValueRef = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(pathInfo.path.toCurrentIteration(), "value"));
71428
71480
  const checkExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression(pathValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression());
71429
71481
  return checkExpression;
71430
71482
  }).reduce((acc, current) => acc == undefined ? current : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(acc, current), undefined)) !== null && _pathGroup$map$reduce !== void 0 ? _pathGroup$map$reduce : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)();
@@ -71578,11 +71630,9 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_1
71578
71630
  const validationText = next.message.reduce((acc, item) => {
71579
71631
  if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression) {
71580
71632
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(acc, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(item));
71581
- } else if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression) {
71582
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(acc, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.JoinExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DeserializeEnumerationExpression([item], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BoolLiteralExpression(true)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(", ")));
71583
- } else {
71584
- throw new Error(`Invalid WithDescription ${item.toString()}`);
71585
71633
  }
71634
+ const valueReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.extractValueReferenceFromCast)(item);
71635
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(acc, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.JoinExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DeserializeEnumerationExpression([valueReference], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BoolLiteralExpression(true)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(", ")));
71586
71636
  }, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(""));
71587
71637
  const condition = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NegateUnaryExpression(next.checkExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`["`), validationText), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`"]`)), current);
71588
71638
  return condition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.46.0-incremental-dictionaries.3",
3
+ "version": "5.46.0-incremental-dictionaries.5",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,