@kontur.candy/generator 4.257.0-lazy-loading.45 → 4.257.0-lazy-loading.48
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 +12 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -130382,7 +130382,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
130382
130382
|
|
|
130383
130383
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
130384
130384
|
try {
|
|
130385
|
-
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _sugarRoot$schemaVali3, _sugarRoot$schemaVali4, _generationOptions$re, _sugarRoot$schemaVali5, _additionalContent$
|
|
130385
|
+
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _sugarRoot$schemaVali3, _sugarRoot$schemaVali4, _generationOptions$re, _sugarRoot$schemaVali5, _additionalContent$fo3, _additionalContent$fo4;
|
|
130386
130386
|
|
|
130387
130387
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
130388
130388
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_13__.createDefaultSugarSerializer)();
|
|
@@ -130391,6 +130391,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
130391
130391
|
const kcLangMathContainer = formulaReader.readFormulas(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_6__.KCLangToXmlTranspiler.transpile(additionalContent.kcLangContent));
|
|
130392
130392
|
const kxXmlMathContainer = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_17__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
|
|
130393
130393
|
const formulas = ((_kxXmlMathContainer$f = kxXmlMathContainer === null || kxXmlMathContainer === void 0 ? void 0 : (_kxXmlMathContainer$f2 = kxXmlMathContainer.formulas) === null || _kxXmlMathContainer$f2 === void 0 ? void 0 : _kxXmlMathContainer$f2.items) !== null && _kxXmlMathContainer$f !== void 0 ? _kxXmlMathContainer$f : []).concat((_kcLangMathContainer$ = kcLangMathContainer === null || kcLangMathContainer === void 0 ? void 0 : (_kcLangMathContainer$2 = kcLangMathContainer.formulas) === null || _kcLangMathContainer$2 === void 0 ? void 0 : _kcLangMathContainer$2.items) !== null && _kcLangMathContainer$ !== void 0 ? _kcLangMathContainer$ : []);
|
|
130394
|
+
const useCalculator2 = ((_additionalContent$fo = additionalContent.formJsonSettings) === null || _additionalContent$fo === void 0 ? void 0 : _additionalContent$fo.autoCalculationCalculatorImpl) === "calculator2" || ((_additionalContent$fo2 = additionalContent.formJsonSettings) === null || _additionalContent$fo2 === void 0 ? void 0 : _additionalContent$fo2.useServerSideFLangNormalization);
|
|
130394
130395
|
const kcXmlConditions = (_Iterator$from$map$fl = Iterator.from(getImportedKcXmlValidations(sugarRoot, additionalContent)).map(x => {
|
|
130395
130396
|
var _container$conditions, _container$conditions2;
|
|
130396
130397
|
|
|
@@ -130425,13 +130426,15 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
130425
130426
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
130426
130427
|
builder.addResource("lazyLoadDeclaration.js", lazyLoadGeneratorResult.content);
|
|
130427
130428
|
const autocalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_18__.AutoCalculationsGenerator(dataDeclarationHelper, schemaRng);
|
|
130428
|
-
const formulasForCalculator =
|
|
130429
|
+
const formulasForCalculator = !useCalculator2 ? formulas : [];
|
|
130429
130430
|
builder.addResource("calculationFunctions.js", autocalcGenerator.generate(sugarRoot, additionalContent.autocalcsContent, formulasForCalculator));
|
|
130430
130431
|
builder.addResource("dataDeclaration.js", dataDeclarationContent);
|
|
130431
130432
|
|
|
130432
|
-
if ((_additionalContent$
|
|
130433
|
+
if ((_additionalContent$fo3 = (_additionalContent$fo4 = additionalContent.formJsonSettings) === null || _additionalContent$fo4 === void 0 ? void 0 : _additionalContent$fo4.useServerSideFLangNormalization) !== null && _additionalContent$fo3 !== void 0 ? _additionalContent$fo3 : false) {
|
|
130434
|
+
var _additionalContent$fo5;
|
|
130435
|
+
|
|
130433
130436
|
const normalizationRules = normalizationRulesGenerator.generateRules(resourcesHash);
|
|
130434
|
-
const formulaNormalizationRules = formlulaOnlyNormalizationRulesGenerator.generateRules(resourcesHash);
|
|
130437
|
+
const formulaNormalizationRules = (_additionalContent$fo5 = additionalContent.formJsonSettings) !== null && _additionalContent$fo5 !== void 0 && _additionalContent$fo5.disableFlangRulesForEnableAutoFieldFeature ? "" : formlulaOnlyNormalizationRulesGenerator.generateRules(resourcesHash);
|
|
130435
130438
|
const customNormalizationRules = formulaNormalizationRules != "" ? [{
|
|
130436
130439
|
content: formulaNormalizationRules,
|
|
130437
130440
|
normalizerId: "formulas"
|
|
@@ -130447,7 +130450,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
130447
130450
|
builder.addResource("validationFunctions.js", validationFunctionsContent);
|
|
130448
130451
|
const rngSchemaValidationConfigurator = validationGenerator.generateRngSchemaValidationConfigurator();
|
|
130449
130452
|
builder.addResource("rngSchemaValidationConfigurator.js", rngSchemaValidationConfigurator);
|
|
130450
|
-
const formulasForCalculator2 =
|
|
130453
|
+
const formulasForCalculator2 = useCalculator2 ? formulas : [];
|
|
130451
130454
|
const kcXmlAutoCalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_Calculator2_AutoCalculationsCalculator2Generator__WEBPACK_IMPORTED_MODULE_28__.AutoCalculationsCalculator2Generator(formSchemaRng, dataDeclarationHelper);
|
|
130452
130455
|
builder.addResource("kcXmlAutoCalculationConfigurator.js", kcXmlAutoCalcGenerator.generate(formulasForCalculator2));
|
|
130453
130456
|
const kcXmlValidationGenerator = new _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_23__.KCXmlValidationGenerator(formSchemaRng);
|
|
@@ -131955,6 +131958,10 @@ class NormalizationRulesGenerator {
|
|
|
131955
131958
|
return this.compiledArgumentExpression(prefix, target, expression, addPrecalculationRule, "Count");
|
|
131956
131959
|
}
|
|
131957
131960
|
|
|
131961
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_3__.FormulaLengthExpression) {
|
|
131962
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(this.castOperandToStringIfNeed(this.compileExpressionToFlashExpression(expression.argument, prefix, target, addPrecalculationRule)));
|
|
131963
|
+
}
|
|
131964
|
+
|
|
131958
131965
|
throw new Error(`Unsupported type of node: ${expression.constructor.name}`);
|
|
131959
131966
|
}
|
|
131960
131967
|
|