@kontur.candy/generator 5.112.0 → 5.112.2
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 +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -73520,7 +73520,7 @@ class MinusBinaryExpression extends BinaryExpression {
|
|
|
73520
73520
|
}
|
|
73521
73521
|
class MultiplicativeBinaryExpression extends BinaryExpression {
|
|
73522
73522
|
needAddBraces(child) {
|
|
73523
|
-
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
73523
|
+
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof SumBinaryExpression || child instanceof MinusBinaryExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
73524
73524
|
}
|
|
73525
73525
|
getType() {
|
|
73526
73526
|
return BuildInTypeExpression.decimal;
|
|
@@ -75783,7 +75783,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
75783
75783
|
if (result == undefined) {
|
|
75784
75784
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
75785
75785
|
}
|
|
75786
|
-
return result;
|
|
75786
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
75787
75787
|
}
|
|
75788
75788
|
compileConcatExpression(expression, prefix, target, addPrecalculationRule) {
|
|
75789
75789
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
@@ -75823,7 +75823,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
75823
75823
|
if (result == undefined) {
|
|
75824
75824
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
75825
75825
|
}
|
|
75826
|
-
return result;
|
|
75826
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
75827
75827
|
}
|
|
75828
75828
|
compileDivisionExpression(expression, prefix, target, addPrecalculationRule) {
|
|
75829
75829
|
const makeDivision = (numerator, denominator) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression(denominator, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DivisionBinaryExpression(numerator, denominator), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression());
|
|
@@ -75834,7 +75834,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
75834
75834
|
if (result == undefined) {
|
|
75835
75835
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
75836
75836
|
}
|
|
75837
|
-
return result;
|
|
75837
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
75838
75838
|
}
|
|
75839
75839
|
preparePathAndAdjustMultiplicity(prefix, path) {
|
|
75840
75840
|
const resultPath = this.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path.replace(/\@/g, ""), "auto")).normalize());
|
|
@@ -76586,8 +76586,8 @@ class OptionalElementsRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MO
|
|
|
76586
76586
|
return this.rules;
|
|
76587
76587
|
}
|
|
76588
76588
|
selectPrimaryElements() {
|
|
76589
|
-
const optionalBlocksPaths =
|
|
76590
|
-
const primaryElements = optionalBlocksPaths.map(path => this.formSchemaRng.getElementByPath(path)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined).filter(_common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_3__.isFormSchemaRngElement)
|
|
76589
|
+
const optionalBlocksPaths = this.dataDeclarationHelper.getOptionalBlocksPaths();
|
|
76590
|
+
const primaryElements = optionalBlocksPaths.map(path => this.formSchemaRng.getElementByPath(path)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined).filter(_common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_3__.isFormSchemaRngElement);
|
|
76591
76591
|
return primaryElements;
|
|
76592
76592
|
}
|
|
76593
76593
|
buildRulesForElement(element) {
|
|
@@ -76749,8 +76749,8 @@ class OptionalElementsRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MO
|
|
|
76749
76749
|
}
|
|
76750
76750
|
createIsMultipleChildExistsExpression(element) {
|
|
76751
76751
|
const childrenPath = this.formSchemaRng.getPath(element).trimLastStarIfLastToken();
|
|
76752
|
-
const childrenFieldRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(childrenPath, "children"), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.
|
|
76753
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.
|
|
76752
|
+
const childrenFieldRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(childrenPath, "children"), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array);
|
|
76753
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GtExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ArrayLengthExpression(childrenFieldRef), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DecimalLiteralExpression(0));
|
|
76754
76754
|
}
|
|
76755
76755
|
createElementExistenceValueRefForLeftPart(element) {
|
|
76756
76756
|
const elementPath = this.formSchemaRng.getPath(element).toEachIteration();
|