@kontur.candy/generator 5.73.6 → 5.74.0-expl-note-preview.0

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 +4 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -69853,7 +69853,7 @@ class KCXmlGeneratorBase {
69853
69853
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaInstanceCountExpression) {
69854
69854
  const modelPath = (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_7__.adjustPathMultiplicity)(this.schema, this.extendedSchemaInfo, prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createFromMask)(this.removeAttributePrefix(this.removeMultiplicity(expression.select)), "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each)).normalize());
69855
69855
  const finalPath = modelPath.trimLastStarIfLastToken();
69856
- deps.push(new DependencyWithoutChecks(finalPath));
69856
+ deps.push(new RegularDependency(finalPath));
69857
69857
  return gcf(x => x.instanceCount, `"${finalPath.toLegacyPath()}"`);
69858
69858
  }
69859
69859
  if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaWhenExpression) {
@@ -73649,8 +73649,9 @@ class FormulaExpressionToFlangExpressionConverter {
73649
73649
  const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath).trimLastStarIfLastToken();
73650
73650
  const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
73651
73651
  if (!splitInfo.differentPath.isContainIteration()) {
73652
- const childrenExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArrayLengthExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([(0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "children")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0));
73653
- return childrenExpression;
73652
+ const childrenExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "children");
73653
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LenExpression(childrenExpression);
73654
+ // return new DecimalLiteralExpression();
73654
73655
  } else {
73655
73656
  throw new Error(`Instance count with nested multiplicity is not supported: target: ${target.path}, select path: ${selectPath}}`);
73656
73657
  }
@@ -78368,8 +78369,6 @@ function naiveConvertJsConditionToKCLangCondition(condition) {
78368
78369
  applyReplacements([[/^false$/g, "1 == 0"]]);
78369
78370
  applyReplacements([/ === /g, " == "]);
78370
78371
  applyReplacements([/ !== /g, " != "]);
78371
- applyReplacements([/\s!\(/g, " not ("]);
78372
- applyReplacements([/^!\(/g, "not ("]);
78373
78372
  // const tripleEqFalse = /===\s*false/g;
78374
78373
  // applyReplacements([tripleEqFalse, "as string == 'true'"]);
78375
78374
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.73.6",
3
+ "version": "5.74.0-expl-note-preview.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,