@kontur.candy/generator 4.245.0-lazy-loading.13 → 4.245.0-lazy-loading.17

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 +16 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -135134,12 +135134,12 @@ class NormalizationRulesGenerator {
135134
135134
 
135135
135135
  buildKcValidationRules() {
135136
135136
  const allRulesCheck = this.conditions.map(x => this.buildKcValidationRuleCheck(x)).reduce((ctx, current) => {
135137
- var _ctx$path;
135137
+ var _targetCtx$path;
135138
135138
 
135139
135139
  const path = current.target.toLegacyPath();
135140
- const currentExpression = (_ctx$path = ctx[path]) !== null && _ctx$path !== void 0 ? _ctx$path : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression();
135141
- const condition = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(current.checkExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("[" + JSON.stringify(current.message) + "]"), currentExpression);
135142
135140
  const targetCtx = current.errorLevel === "Warning" ? ctx.warnings : ctx.errors;
135141
+ const currentExpression = (_targetCtx$path = targetCtx[path]) !== null && _targetCtx$path !== void 0 ? _targetCtx$path : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression();
135142
+ const condition = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(current.checkExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("[" + JSON.stringify(current.message) + "]"), currentExpression);
135143
135143
  targetCtx[path] = condition;
135144
135144
  return ctx;
135145
135145
  }, {
@@ -135334,7 +135334,7 @@ class NormalizationRulesGenerator {
135334
135334
  const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(iterablePath.joinWith(new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath(suffixWithoutMultiple, false)).joinWith("Count").normalize(), "value");
135335
135335
  const currenCountExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(iterablePath.joinWith(new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath(suffixWithoutMultiple, false)).joinWith("Count").toCurrentIteration().normalize(), "value");
135336
135336
  addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.CastExpression(resultValueExpression, "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("G29"))));
135337
- addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ArgumentReferenceExpression("result"), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(1) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.CastExpression(countValueExpression, "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("G29"))));
135337
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ArgumentReferenceExpression("result"), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.CastExpression(countValueExpression, "decimal", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(0)), "string", new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("G29"))));
135338
135338
  resultValueExpression = currentSumExpression;
135339
135339
  countValueExpression = currenCountExpression;
135340
135340
  }
@@ -135444,7 +135444,7 @@ class NormalizationRulesGenerator {
135444
135444
  yield rule;
135445
135445
  }
135446
135446
 
135447
- const targetPaths = [..._Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.distinctBy(context.getAllPathsWithValidations(), x => x.toLegacyPath())];
135447
+ const targetPaths = [..._Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.distinctBy(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(context.getAllPathsWithValidations(), Object.keys(kcRules.errors).concat(Object.keys(kcRules.warnings)).map(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath.createFromMask(x, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each))), x => x.toLegacyPath())];
135448
135448
  yield* this.buildErrorWarningCountRules(targetPaths, "error");
135449
135449
  yield* this.buildErrorWarningCountRules(targetPaths, "warning");
135450
135450
  }
@@ -156885,6 +156885,17 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
156885
156885
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
156886
156886
  }
156887
156887
 
156888
+ *doBuildNormalizeRules(builder) {
156889
+ var _node$optional2;
156890
+
156891
+ const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
156892
+ yield* builder.childrenInitializer(node, (_node$optional2 = node.optional) !== null && _node$optional2 !== void 0 ? _node$optional2 : false);
156893
+ yield* builder.specialFieldsInitializer(node, {
156894
+ optional: node.optional,
156895
+ disabled: undefined
156896
+ });
156897
+ }
156898
+
156888
156899
  buildChildrenDataDeclaration(context) {
156889
156900
  var _node$title$children, _node$title, _node$content$childre, _node$content;
156890
156901
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "4.245.0-lazy-loading.13",
3
+ "version": "4.245.0-lazy-loading.17",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,