@kontur.candy/generator 4.247.1 → 4.247.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 +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -157752,6 +157752,7 @@ class ValidationGenerator {
|
|
|
157752
157752
|
this.controlCustomizationContext = void 0;
|
|
157753
157753
|
this.useSchemaValidations = void 0;
|
|
157754
157754
|
this.criterionOfExistenceFromSchemaRng = [];
|
|
157755
|
+
this.depsRngSchemaValidationCounter = 0;
|
|
157755
157756
|
this.visibilityConditionsStack = [];
|
|
157756
157757
|
this.sugarRoot = sugarRoot;
|
|
157757
157758
|
this.typesRegistry = typesRegistry;
|
|
@@ -157873,14 +157874,15 @@ class ValidationGenerator {
|
|
|
157873
157874
|
const targetAsString = this.modelPathInstance(bindingPath);
|
|
157874
157875
|
const dependenciesAsString = dependencies.map(x => this.modelPathInstance(x.toCurrentIteration())).join(", \n");
|
|
157875
157876
|
const message = typeof localizedString === "string" ? `"${localizedString}"` : localizedString.expression;
|
|
157877
|
+
const depsVariableName = `deps${this.depsRngSchemaValidationCounter++}`;
|
|
157876
157878
|
return `
|
|
157877
|
-
const
|
|
157879
|
+
const ${depsVariableName} = [${dependenciesAsString}]
|
|
157878
157880
|
form.calculator2.addCalculationFunction(
|
|
157879
157881
|
new ValidationFunction(
|
|
157880
157882
|
${targetAsString},
|
|
157881
|
-
|
|
157883
|
+
${depsVariableName},
|
|
157882
157884
|
context =>
|
|
157883
|
-
DependenciesRequiredAreEmpty.execute(context, ${targetAsString},
|
|
157885
|
+
DependenciesRequiredAreEmpty.execute(context, ${targetAsString}, ${depsVariableName}, ${message}, "Error", form.localization)
|
|
157884
157886
|
)
|
|
157885
157887
|
);`;
|
|
157886
157888
|
}
|