@kontur.candy/generator 5.48.1-ndflcustomtext.0 → 5.49.0-psv-docs-import.1
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 +972 -329
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2757,6 +2757,24 @@ module.exports = webpackEmptyContext;
|
|
|
2757
2757
|
|
|
2758
2758
|
/***/ }),
|
|
2759
2759
|
|
|
2760
|
+
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox sync recursive .md$":
|
|
2761
|
+
/*!**************************************************************************************************************!*\
|
|
2762
|
+
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/ sync .md$ ***!
|
|
2763
|
+
\**************************************************************************************************************/
|
|
2764
|
+
/***/ ((module) => {
|
|
2765
|
+
|
|
2766
|
+
function webpackEmptyContext(req) {
|
|
2767
|
+
var e = new Error("Cannot find module '" + req + "'");
|
|
2768
|
+
e.code = 'MODULE_NOT_FOUND';
|
|
2769
|
+
throw e;
|
|
2770
|
+
}
|
|
2771
|
+
webpackEmptyContext.keys = () => ([]);
|
|
2772
|
+
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
2773
|
+
webpackEmptyContext.id = "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox sync recursive .md$";
|
|
2774
|
+
module.exports = webpackEmptyContext;
|
|
2775
|
+
|
|
2776
|
+
/***/ }),
|
|
2777
|
+
|
|
2760
2778
|
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectAllCheckbox sync recursive .md$":
|
|
2761
2779
|
/*!**************************************************************************************************************!*\
|
|
2762
2780
|
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectAllCheckbox/ sync .md$ ***!
|
|
@@ -47178,9 +47196,13 @@ function isMatchAbbreviation(abbreviation, value) {
|
|
|
47178
47196
|
"use strict";
|
|
47179
47197
|
__webpack_require__.r(__webpack_exports__);
|
|
47180
47198
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47199
|
+
/* harmony export */ ensureIsKnownViewModelFieldName: () => (/* binding */ ensureIsKnownViewModelFieldName),
|
|
47181
47200
|
/* harmony export */ getKnownViewModelFieldNames: () => (/* binding */ getKnownViewModelFieldNames),
|
|
47182
47201
|
/* harmony export */ nonRegularFieldName: () => (/* binding */ nonRegularFieldName)
|
|
47183
47202
|
/* harmony export */ });
|
|
47203
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
47204
|
+
|
|
47205
|
+
|
|
47184
47206
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47185
47207
|
|
|
47186
47208
|
// Эту модель, которая лежит в redux-состоянии в поле viewModel, каждый узел кроме . является ViewModel
|
|
@@ -47189,6 +47211,9 @@ function nonRegularFieldName(fieldName) {
|
|
|
47189
47211
|
// @ts-ignore
|
|
47190
47212
|
return fieldName;
|
|
47191
47213
|
}
|
|
47214
|
+
function ensureIsKnownViewModelFieldName(fieldName) {
|
|
47215
|
+
return getKnownViewModelFieldNames().includes(fieldName) ? fieldName : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(`[${fieldName}] is not known ViewModelFieldName`);
|
|
47216
|
+
}
|
|
47192
47217
|
function getKnownViewModelFieldNames() {
|
|
47193
47218
|
const names = ["children", "error", "warning", "description", "id", "disabled", "visible", "disabledSending", "value", "autoValue", "autoFlag", "resourcesHash", "errorsCount", "warningsCount", "code", "picklist", "normalized", "emptyUnitsVisible", "pencilOpened", "ignoreAutoFlag", "disableValueAutoInit", "index", "regionCode", "district", "city", "settlement", "street", "house", "building", "room", "bossValue", "agentValue", "senderInn", "nameorg", "sum", "count", "normalizationSource", "referencedId"];
|
|
47194
47219
|
return names;
|
|
@@ -48640,6 +48665,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48640
48665
|
/* harmony export */ getDaysInMonthKCLangFunction: () => (/* binding */ getDaysInMonthKCLangFunction),
|
|
48641
48666
|
/* harmony export */ getMonthKCLangFunction: () => (/* binding */ getMonthKCLangFunction),
|
|
48642
48667
|
/* harmony export */ getPicklistValuesKCLangFunction: () => (/* binding */ getPicklistValuesKCLangFunction),
|
|
48668
|
+
/* harmony export */ getSumByKeysKCLangFunction: () => (/* binding */ getSumByKeysKCLangFunction),
|
|
48643
48669
|
/* harmony export */ getYearKCLangFunction: () => (/* binding */ getYearKCLangFunction),
|
|
48644
48670
|
/* harmony export */ groupCountKCLangFunction: () => (/* binding */ groupCountKCLangFunction),
|
|
48645
48671
|
/* harmony export */ groupSumKCLangFunction: () => (/* binding */ groupSumKCLangFunction),
|
|
@@ -48652,6 +48678,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48652
48678
|
/* harmony export */ isValidAccountNumberKCLangFunction: () => (/* binding */ isValidAccountNumberKCLangFunction),
|
|
48653
48679
|
/* harmony export */ isValidMirCardNumberKCLangFunction: () => (/* binding */ isValidMirCardNumberKCLangFunction),
|
|
48654
48680
|
/* harmony export */ lengthKCLangFunction: () => (/* binding */ lengthKCLangFunction),
|
|
48681
|
+
/* harmony export */ makeDictKCLangFunction: () => (/* binding */ makeDictKCLangFunction),
|
|
48655
48682
|
/* harmony export */ newlineKCLangFunction: () => (/* binding */ newlineKCLangFunction),
|
|
48656
48683
|
/* harmony export */ noDepsKCLangFunction: () => (/* binding */ noDepsKCLangFunction),
|
|
48657
48684
|
/* harmony export */ regexMatchKCLangFunction: () => (/* binding */ regexMatchKCLangFunction),
|
|
@@ -49339,6 +49366,46 @@ const hasAutoFlagKCLangFunction = params => {
|
|
|
49339
49366
|
expression: param
|
|
49340
49367
|
};
|
|
49341
49368
|
};
|
|
49369
|
+
const makeDictKCLangFunction = params => {
|
|
49370
|
+
var _params$48, _params$49;
|
|
49371
|
+
const errors = Array.from(validateParams(params, 2));
|
|
49372
|
+
if (errors.length > 0) {
|
|
49373
|
+
return new FunctionValidationErrorCollection(errors);
|
|
49374
|
+
}
|
|
49375
|
+
const sourceKeyPathParam = (_params$48 = params[0]) === null || _params$48 === void 0 ? void 0 : _params$48.value;
|
|
49376
|
+
const sourceValuePathParam = (_params$49 = params[1]) === null || _params$49 === void 0 ? void 0 : _params$49.value;
|
|
49377
|
+
if ((sourceKeyPathParam === null || sourceKeyPathParam === void 0 ? void 0 : sourceKeyPathParam.type) !== "argument" || sourceValuePathParam == undefined) {
|
|
49378
|
+
const argumentsValidationError = new ArgumentValidationError("Invalid argument sourceKeyPath");
|
|
49379
|
+
return new FunctionValidationErrorCollection([argumentsValidationError]);
|
|
49380
|
+
}
|
|
49381
|
+
return {
|
|
49382
|
+
type: "makeDict",
|
|
49383
|
+
sourceKeyPath: sourceKeyPathParam.select,
|
|
49384
|
+
sourceValueExpression: sourceValuePathParam
|
|
49385
|
+
};
|
|
49386
|
+
};
|
|
49387
|
+
const getSumByKeysKCLangFunction = params => {
|
|
49388
|
+
var _params$50, _params$51;
|
|
49389
|
+
const errors = Array.from(validateParams(params, 2));
|
|
49390
|
+
if (errors.length > 0) {
|
|
49391
|
+
return new FunctionValidationErrorCollection(errors);
|
|
49392
|
+
}
|
|
49393
|
+
const dictPathParam = (_params$50 = params[0]) === null || _params$50 === void 0 ? void 0 : _params$50.value;
|
|
49394
|
+
const targetKeysParam = (_params$51 = params[1]) === null || _params$51 === void 0 ? void 0 : _params$51.value;
|
|
49395
|
+
if (targetKeysParam == undefined || (dictPathParam === null || dictPathParam === void 0 ? void 0 : dictPathParam.type) !== "argument") {
|
|
49396
|
+
const argumentsValidationError = new ArgumentValidationError("Invalid arguments dictPathParam, targetKeysParam");
|
|
49397
|
+
return new FunctionValidationErrorCollection([argumentsValidationError]);
|
|
49398
|
+
}
|
|
49399
|
+
const targetKeys = targetKeysParam.type === "array" ? targetKeysParam : {
|
|
49400
|
+
type: "array",
|
|
49401
|
+
items: [targetKeysParam]
|
|
49402
|
+
};
|
|
49403
|
+
return {
|
|
49404
|
+
type: "getSumByKeys",
|
|
49405
|
+
dictPath: dictPathParam.select,
|
|
49406
|
+
targetKeys: targetKeys
|
|
49407
|
+
};
|
|
49408
|
+
};
|
|
49342
49409
|
|
|
49343
49410
|
/***/ }),
|
|
49344
49411
|
|
|
@@ -49403,7 +49470,9 @@ const getKCLangGlobalFunctionBuilders = () => ({
|
|
|
49403
49470
|
addYears: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.addYearsKCLangFunction],
|
|
49404
49471
|
dateToString: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateToStringKCLangFunction],
|
|
49405
49472
|
dateTime: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateTimeKCLangFunction],
|
|
49406
|
-
hasAutoFlag: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.hasAutoFlagKCLangFunction]
|
|
49473
|
+
hasAutoFlag: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.hasAutoFlagKCLangFunction],
|
|
49474
|
+
makeDict: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.makeDictKCLangFunction],
|
|
49475
|
+
getSumByKeys: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.getSumByKeysKCLangFunction]
|
|
49407
49476
|
});
|
|
49408
49477
|
class ErrorListener {
|
|
49409
49478
|
constructor() {
|
|
@@ -49754,6 +49823,12 @@ class KCLangAntlrVisitor {
|
|
|
49754
49823
|
case "string":
|
|
49755
49824
|
dataType = "string";
|
|
49756
49825
|
break;
|
|
49826
|
+
case "dict":
|
|
49827
|
+
dataType = "dict";
|
|
49828
|
+
break;
|
|
49829
|
+
case "array":
|
|
49830
|
+
dataType = "array";
|
|
49831
|
+
break;
|
|
49757
49832
|
default:
|
|
49758
49833
|
throw Error("visitType syntax incorrect");
|
|
49759
49834
|
}
|
|
@@ -56955,6 +57030,12 @@ function traverseKCLangExpression(node, visitor) {
|
|
|
56955
57030
|
case "hasAutoFlag":
|
|
56956
57031
|
visitor.visitHasAutoFlagKCLangNode(node);
|
|
56957
57032
|
break;
|
|
57033
|
+
case "makeDict":
|
|
57034
|
+
visitor.visitMakeDictKCLangNode(node);
|
|
57035
|
+
break;
|
|
57036
|
+
case "getSumByKeys":
|
|
57037
|
+
visitor.visitGetSumByKeysKCLangNode(node);
|
|
57038
|
+
break;
|
|
56958
57039
|
default:
|
|
56959
57040
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
|
|
56960
57041
|
break;
|
|
@@ -57111,6 +57192,12 @@ class DefaultKCLangExpressionVisitor {
|
|
|
57111
57192
|
visitHasAutoFlagKCLangNode(node) {
|
|
57112
57193
|
// default empty implementation
|
|
57113
57194
|
}
|
|
57195
|
+
visitGetSumByKeysKCLangNode(node) {
|
|
57196
|
+
// default empty implementation
|
|
57197
|
+
}
|
|
57198
|
+
visitMakeDictKCLangNode(node) {
|
|
57199
|
+
// default empty implementation
|
|
57200
|
+
}
|
|
57114
57201
|
}
|
|
57115
57202
|
|
|
57116
57203
|
/***/ }),
|
|
@@ -57472,6 +57559,12 @@ const getGenerateJsExpressionFunc = options => {
|
|
|
57472
57559
|
case "hasAutoFlag":
|
|
57473
57560
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
57474
57561
|
break;
|
|
57562
|
+
case "makeDict":
|
|
57563
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
57564
|
+
break;
|
|
57565
|
+
case "getSumByKeys":
|
|
57566
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
57567
|
+
break;
|
|
57475
57568
|
default:
|
|
57476
57569
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(expression);
|
|
57477
57570
|
}
|
|
@@ -57549,6 +57642,10 @@ function generateKCXmlExpression(expression) {
|
|
|
57549
57642
|
return `<m:${expression.type} select="${expression.select}" />`;
|
|
57550
57643
|
case "isValidAccountNumber":
|
|
57551
57644
|
return `<m:${expression.type} bik="${expression.bik}" account="${expression.account}" />`;
|
|
57645
|
+
case "makeDict":
|
|
57646
|
+
return [`<m:${expression.type} sourceKeyPath="${expression.sourceKeyPath}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.sourceValueExpression), 1), `</m:${expression.type}>`].join("\n");
|
|
57647
|
+
case "getSumByKeys":
|
|
57648
|
+
return [`<m:${expression.type} dictPath="${expression.dictPath}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.targetKeys), 1), `</m:${expression.type}>`].join("\n");
|
|
57552
57649
|
case "groupSum":
|
|
57553
57650
|
return [`<m:${expression.type} sourceKeyPath="${expression.sourceKeyPath}" sourceValuePath="${expression.sourceValuePath}" >`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.targetKeys), 1), `</m:${expression.type}>`].join("\n");
|
|
57554
57651
|
case "groupCount":
|
|
@@ -58940,6 +59037,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58940
59037
|
|
|
58941
59038
|
|
|
58942
59039
|
|
|
59040
|
+
|
|
59041
|
+
/** Документация работы тут: https://wiki.skbkontur.ru/pages/viewpage.action?pageId=864040646 */
|
|
58943
59042
|
class TextFromSugarExtractor {
|
|
58944
59043
|
constructor(sources) {
|
|
58945
59044
|
this.resultJson = {};
|
|
@@ -63658,6 +63757,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63658
63757
|
/* harmony export */ FormulaGetDaysInMonthExpression: () => (/* binding */ FormulaGetDaysInMonthExpression),
|
|
63659
63758
|
/* harmony export */ FormulaGetMonthExpression: () => (/* binding */ FormulaGetMonthExpression),
|
|
63660
63759
|
/* harmony export */ FormulaGetPicklistValuesExpression: () => (/* binding */ FormulaGetPicklistValuesExpression),
|
|
63760
|
+
/* harmony export */ FormulaGetSumByKeysExpression: () => (/* binding */ FormulaGetSumByKeysExpression),
|
|
63661
63761
|
/* harmony export */ FormulaGetYearExpression: () => (/* binding */ FormulaGetYearExpression),
|
|
63662
63762
|
/* harmony export */ FormulaGroupCountExpression: () => (/* binding */ FormulaGroupCountExpression),
|
|
63663
63763
|
/* harmony export */ FormulaGroupSumExpression: () => (/* binding */ FormulaGroupSumExpression),
|
|
@@ -63673,6 +63773,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63673
63773
|
/* harmony export */ FormulaLeExpression: () => (/* binding */ FormulaLeExpression),
|
|
63674
63774
|
/* harmony export */ FormulaLengthExpression: () => (/* binding */ FormulaLengthExpression),
|
|
63675
63775
|
/* harmony export */ FormulaLtExpression: () => (/* binding */ FormulaLtExpression),
|
|
63776
|
+
/* harmony export */ FormulaMakeDictExpression: () => (/* binding */ FormulaMakeDictExpression),
|
|
63676
63777
|
/* harmony export */ FormulaMinusExpression: () => (/* binding */ FormulaMinusExpression),
|
|
63677
63778
|
/* harmony export */ FormulaMultiplyExpression: () => (/* binding */ FormulaMultiplyExpression),
|
|
63678
63779
|
/* harmony export */ FormulaMultySumExpression: () => (/* binding */ FormulaMultySumExpression),
|
|
@@ -63704,7 +63805,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63704
63805
|
|
|
63705
63806
|
|
|
63706
63807
|
|
|
63707
|
-
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class3, _dec4, _dec5, _class4, _class5, _descriptor2, _dec6, _dec7, _class6, _class7, _descriptor3, _dec8, _dec9, _class8, _class9, _descriptor4, _dec10, _dec11, _class10, _class11, _descriptor5, _dec12, _dec13, _class12, _class13, _descriptor6, _dec14, _dec15, _dec16, _class14, _class15, _descriptor7, _descriptor8, _dec17, _dec18, _dec19, _class16, _class17, _descriptor9, _descriptor10, _dec20, _dec21, _class18, _class19, _descriptor11, _dec22, _dec23, _class20, _class21, _descriptor12, _dec24, _dec25, _class22, _class23, _descriptor13, _dec26, _dec27, _class24, _class25, _descriptor14, _dec28, _dec29, _class26, _class27, _descriptor15, _dec30, _dec31, _class28, _class29, _descriptor16, _dec32, _dec33, _class30, _class31, _descriptor17, _dec34, _dec35, _class32, _class33, _descriptor18, _dec36, _dec37, _class34, _class35, _descriptor19, _dec38, _dec39, _dec40, _dec41, _class36, _class37, _descriptor20, _descriptor21, _descriptor22, _dec42, _dec43, _class38, _class39, _descriptor23, _dec44, _dec45, _class40, _class41, _descriptor24, _dec46, _dec47, _dec48, _class42, _class43, _descriptor25, _descriptor26, _dec49, _dec50, _class44, _class45, _descriptor27, _dec51, _dec52, _class46, _class47, _descriptor28, _dec53, _dec54, _class48, _class49, _descriptor29, _dec55, _dec56, _class50, _class51, _descriptor30, _dec57, _dec58, _dec59, _class52, _class53, _descriptor31, _descriptor32, _dec60, _dec61, _dec62, _dec63, _class54, _class55, _descriptor33, _descriptor34, _descriptor35, _dec64, _dec65, _dec66, _class56, _class57, _descriptor36, _descriptor37, _dec67, _class58, _dec68, _dec69, _class59, _class60, _descriptor38, _dec70, _dec71, _class61, _class62, _descriptor39, _dec72, _dec73, _class63, _class64, _descriptor40, _dec74, _dec75, _class65, _class66, _descriptor41, _dec76, _dec77, _class67, _class68, _descriptor42, _dec78, _dec79, _class69, _class70, _descriptor43, _dec80, _dec81, _class71, _class72, _descriptor44, _dec82, _dec83, _class73, _class74, _descriptor45, _dec84, _dec85, _dec86, _class75, _class76, _descriptor46, _descriptor47, _dec87, _dec88, _dec89, _class77, _class78, _descriptor48, _descriptor49, _dec90, _dec91, _dec92, _class79, _class80, _descriptor50, _descriptor51, _dec93, _dec94, _dec95, _class81, _class82, _descriptor52, _descriptor53, _dec96, _dec97, _class83, _class84, _descriptor54, _dec98, _dec99, _class85, _class86, _descriptor55, _dec100, _dec101, _class87, _class88, _descriptor56, _dec102, _dec103, _class89, _class90, _descriptor57, _dec104, _dec105, _class91, _class92, _descriptor58, _dec106, _dec107, _dec108, _class93, _class94, _descriptor59, _descriptor60, _dec109, _dec110, _dec111, _class95, _class96, _descriptor61, _descriptor62, _dec112, _dec113, _class97, _class98, _descriptor63, _dec114, _dec115, _class99, _class100, _descriptor64, _dec116, _dec117, _class101, _class102, _descriptor65, _dec118, _dec119, _dec120, _dec121, _dec122, _class103, _class104, _descriptor66, _descriptor67, _descriptor68, _descriptor69, _dec123, _dec124, _class105, _class106, _descriptor70, _dec125, _dec126, _class107, _class108, _descriptor71, _dec127, _dec128, _class109, _class110, _descriptor72, _dec129, _dec130, _class111, _class112, _descriptor73, _dec131, _dec132, _dec133, _class113, _class114, _descriptor74, _descriptor75, _dec134, _dec135, _class115, _class116, _descriptor76, _dec136, _class117, _dec137, _dec138, _dec139, _dec140, _class118, _class119, _descriptor77, _descriptor78, _descriptor79, _dec141, _dec142, _class120, _class121, _descriptor80, _dec143, _dec144, _class122, _class123, _descriptor81, _dec145, _dec146, _dec147, _dec148, _dec149, _dec150, _class124, _class125, _descriptor82, _descriptor83, _descriptor84, _descriptor85, _descriptor86, _dec151, _dec152, _class126, _class127, _descriptor87, _dec153, _dec154, _dec155, _class128, _class129, _descriptor88, _descriptor89, _dec156, _dec157, _dec158,
|
|
63808
|
+
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class3, _dec4, _dec5, _class4, _class5, _descriptor2, _dec6, _dec7, _class6, _class7, _descriptor3, _dec8, _dec9, _class8, _class9, _descriptor4, _dec10, _dec11, _class10, _class11, _descriptor5, _dec12, _dec13, _class12, _class13, _descriptor6, _dec14, _dec15, _dec16, _class14, _class15, _descriptor7, _descriptor8, _dec17, _dec18, _dec19, _class16, _class17, _descriptor9, _descriptor10, _dec20, _dec21, _class18, _class19, _descriptor11, _dec22, _dec23, _class20, _class21, _descriptor12, _dec24, _dec25, _class22, _class23, _descriptor13, _dec26, _dec27, _class24, _class25, _descriptor14, _dec28, _dec29, _class26, _class27, _descriptor15, _dec30, _dec31, _class28, _class29, _descriptor16, _dec32, _dec33, _class30, _class31, _descriptor17, _dec34, _dec35, _class32, _class33, _descriptor18, _dec36, _dec37, _class34, _class35, _descriptor19, _dec38, _dec39, _dec40, _dec41, _class36, _class37, _descriptor20, _descriptor21, _descriptor22, _dec42, _dec43, _class38, _class39, _descriptor23, _dec44, _dec45, _class40, _class41, _descriptor24, _dec46, _dec47, _dec48, _class42, _class43, _descriptor25, _descriptor26, _dec49, _dec50, _class44, _class45, _descriptor27, _dec51, _dec52, _class46, _class47, _descriptor28, _dec53, _dec54, _class48, _class49, _descriptor29, _dec55, _dec56, _class50, _class51, _descriptor30, _dec57, _dec58, _dec59, _class52, _class53, _descriptor31, _descriptor32, _dec60, _dec61, _dec62, _dec63, _class54, _class55, _descriptor33, _descriptor34, _descriptor35, _dec64, _dec65, _dec66, _class56, _class57, _descriptor36, _descriptor37, _dec67, _class58, _dec68, _dec69, _class59, _class60, _descriptor38, _dec70, _dec71, _class61, _class62, _descriptor39, _dec72, _dec73, _class63, _class64, _descriptor40, _dec74, _dec75, _class65, _class66, _descriptor41, _dec76, _dec77, _class67, _class68, _descriptor42, _dec78, _dec79, _class69, _class70, _descriptor43, _dec80, _dec81, _class71, _class72, _descriptor44, _dec82, _dec83, _class73, _class74, _descriptor45, _dec84, _dec85, _dec86, _class75, _class76, _descriptor46, _descriptor47, _dec87, _dec88, _dec89, _class77, _class78, _descriptor48, _descriptor49, _dec90, _dec91, _dec92, _class79, _class80, _descriptor50, _descriptor51, _dec93, _dec94, _dec95, _class81, _class82, _descriptor52, _descriptor53, _dec96, _dec97, _class83, _class84, _descriptor54, _dec98, _dec99, _class85, _class86, _descriptor55, _dec100, _dec101, _class87, _class88, _descriptor56, _dec102, _dec103, _class89, _class90, _descriptor57, _dec104, _dec105, _class91, _class92, _descriptor58, _dec106, _dec107, _dec108, _class93, _class94, _descriptor59, _descriptor60, _dec109, _dec110, _dec111, _class95, _class96, _descriptor61, _descriptor62, _dec112, _dec113, _class97, _class98, _descriptor63, _dec114, _dec115, _class99, _class100, _descriptor64, _dec116, _dec117, _class101, _class102, _descriptor65, _dec118, _dec119, _dec120, _dec121, _dec122, _class103, _class104, _descriptor66, _descriptor67, _descriptor68, _descriptor69, _dec123, _dec124, _class105, _class106, _descriptor70, _dec125, _dec126, _class107, _class108, _descriptor71, _dec127, _dec128, _class109, _class110, _descriptor72, _dec129, _dec130, _class111, _class112, _descriptor73, _dec131, _dec132, _dec133, _class113, _class114, _descriptor74, _descriptor75, _dec134, _dec135, _class115, _class116, _descriptor76, _dec136, _class117, _dec137, _dec138, _dec139, _dec140, _class118, _class119, _descriptor77, _descriptor78, _descriptor79, _dec141, _dec142, _class120, _class121, _descriptor80, _dec143, _dec144, _class122, _class123, _descriptor81, _dec145, _dec146, _dec147, _dec148, _dec149, _dec150, _class124, _class125, _descriptor82, _descriptor83, _descriptor84, _descriptor85, _descriptor86, _dec151, _dec152, _class126, _class127, _descriptor87, _dec153, _dec154, _dec155, _class128, _class129, _descriptor88, _descriptor89, _dec156, _dec157, _dec158, _class130, _class131, _descriptor90, _descriptor91, _dec159, _dec160, _dec161, _class132, _class133, _descriptor92, _descriptor93, _dec162, _dec163, _dec164, _dec165, _class134, _class135, _descriptor94, _descriptor95, _descriptor96, _dec166, _dec167, _dec168, _class136, _class137, _descriptor97, _descriptor98;
|
|
63708
63809
|
|
|
63709
63810
|
|
|
63710
63811
|
|
|
@@ -63720,7 +63821,7 @@ class FormulaExpression extends _markupGenerator_Serializer_SugarSerializer__WEB
|
|
|
63720
63821
|
throw new Error(`${this.constructor} does not decorated with sugarNode() properly`);
|
|
63721
63822
|
}
|
|
63722
63823
|
}
|
|
63723
|
-
const typeArgumentValueParser = _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("decimal", "string");
|
|
63824
|
+
const typeArgumentValueParser = _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.enum("decimal", "string", "dict", "array");
|
|
63724
63825
|
let FormulaWhenExpression = (_dec = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("when", `TODO`), _dec2 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec(_class = (_class2 = class FormulaWhenExpression extends FormulaExpression {
|
|
63725
63826
|
constructor(...args) {
|
|
63726
63827
|
super(...args);
|
|
@@ -64657,47 +64758,81 @@ let MathContainer = (_dec153 = (0,_markupGenerator_Serializer_SugarSerializer__W
|
|
|
64657
64758
|
writable: true,
|
|
64658
64759
|
initializer: null
|
|
64659
64760
|
})), _class129)) || _class128);
|
|
64660
|
-
let
|
|
64761
|
+
let FormulaMakeDictExpression = (_dec156 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("makedict", `Получение словаря по ключу-значению из иннера`), _dec157 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ`), _dec158 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(undefined, [FormulaArgumentExpression, FormulaConstExpression, FormulaCastExpression], `Путь откуда брать значение или константа`), _dec156(_class130 = (_class131 = class FormulaMakeDictExpression extends FormulaExpression {
|
|
64762
|
+
constructor(...args) {
|
|
64763
|
+
super(...args);
|
|
64764
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor90, this);
|
|
64765
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValueExpression", _descriptor91, this);
|
|
64766
|
+
}
|
|
64767
|
+
}, (_descriptor90 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceKeyPath", [_dec157], {
|
|
64768
|
+
configurable: true,
|
|
64769
|
+
enumerable: true,
|
|
64770
|
+
writable: true,
|
|
64771
|
+
initializer: null
|
|
64772
|
+
}), _descriptor91 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceValueExpression", [_dec158], {
|
|
64773
|
+
configurable: true,
|
|
64774
|
+
enumerable: true,
|
|
64775
|
+
writable: true,
|
|
64776
|
+
initializer: null
|
|
64777
|
+
})), _class131)) || _class130);
|
|
64778
|
+
let FormulaGetSumByKeysExpression = (_dec159 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("getsumbykeys", `Вычисление суммы с группировкой в разных множественностях`), _dec160 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("dictPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь к словарю`), _dec161 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec159(_class132 = (_class133 = class FormulaGetSumByKeysExpression extends FormulaExpression {
|
|
64661
64779
|
constructor(...args) {
|
|
64662
64780
|
super(...args);
|
|
64663
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
64664
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
64665
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValuePath", _descriptor92, this);
|
|
64781
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dictPath", _descriptor92, this);
|
|
64782
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor93, this);
|
|
64666
64783
|
}
|
|
64667
|
-
}, (
|
|
64784
|
+
}, (_descriptor92 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "dictPath", [_dec160], {
|
|
64668
64785
|
configurable: true,
|
|
64669
64786
|
enumerable: true,
|
|
64670
64787
|
writable: true,
|
|
64671
64788
|
initializer: null
|
|
64672
|
-
}),
|
|
64789
|
+
}), _descriptor93 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "targetKeys", [_dec161], {
|
|
64673
64790
|
configurable: true,
|
|
64674
64791
|
enumerable: true,
|
|
64675
64792
|
writable: true,
|
|
64676
64793
|
initializer: null
|
|
64677
|
-
}),
|
|
64794
|
+
})), _class133)) || _class132);
|
|
64795
|
+
let FormulaGroupSumExpression = (_dec162 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("groupsum", `Вычисление суммы с группировкой в разных множественностях`), _dec163 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec164 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ группы в суммируемой множественности`), _dec165 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceValuePath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь в суммируемой множественности откуда берем значение для свёртки`), _dec162(_class134 = (_class135 = class FormulaGroupSumExpression extends FormulaExpression {
|
|
64796
|
+
constructor(...args) {
|
|
64797
|
+
super(...args);
|
|
64798
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor94, this);
|
|
64799
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor95, this);
|
|
64800
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValuePath", _descriptor96, this);
|
|
64801
|
+
}
|
|
64802
|
+
}, (_descriptor94 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "targetKeys", [_dec163], {
|
|
64678
64803
|
configurable: true,
|
|
64679
64804
|
enumerable: true,
|
|
64680
64805
|
writable: true,
|
|
64681
64806
|
initializer: null
|
|
64682
|
-
})
|
|
64683
|
-
|
|
64807
|
+
}), _descriptor95 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "sourceKeyPath", [_dec164], {
|
|
64808
|
+
configurable: true,
|
|
64809
|
+
enumerable: true,
|
|
64810
|
+
writable: true,
|
|
64811
|
+
initializer: null
|
|
64812
|
+
}), _descriptor96 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "sourceValuePath", [_dec165], {
|
|
64813
|
+
configurable: true,
|
|
64814
|
+
enumerable: true,
|
|
64815
|
+
writable: true,
|
|
64816
|
+
initializer: null
|
|
64817
|
+
})), _class135)) || _class134);
|
|
64818
|
+
let FormulaGroupCountExpression = (_dec166 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("groupcount", `Вычисление количества элементов по группам в разных множественностях`), _dec167 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("array", [FormulaArrayExpression]), _dec168 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("sourceKeyPath", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, `Путь откуда брать ключ группы в суммируемой множественности`), _dec166(_class136 = (_class137 = class FormulaGroupCountExpression extends FormulaExpression {
|
|
64684
64819
|
constructor(...args) {
|
|
64685
64820
|
super(...args);
|
|
64686
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys",
|
|
64687
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath",
|
|
64821
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor97, this);
|
|
64822
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor98, this);
|
|
64688
64823
|
}
|
|
64689
|
-
}, (
|
|
64824
|
+
}, (_descriptor97 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class137.prototype, "targetKeys", [_dec167], {
|
|
64690
64825
|
configurable: true,
|
|
64691
64826
|
enumerable: true,
|
|
64692
64827
|
writable: true,
|
|
64693
64828
|
initializer: null
|
|
64694
|
-
}),
|
|
64829
|
+
}), _descriptor98 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class137.prototype, "sourceKeyPath", [_dec168], {
|
|
64695
64830
|
configurable: true,
|
|
64696
64831
|
enumerable: true,
|
|
64697
64832
|
writable: true,
|
|
64698
64833
|
initializer: null
|
|
64699
|
-
})),
|
|
64700
|
-
const formulaExpressions = [FormulaSumExpression, FormulaArgumentExpression, FormulaConstExpression, FormulaMultySumExpression, FormulaRoundExpression, FormulaFloorExpression, FormulaAbsExpression, FormulaDivisionExpression, FormulaMinusExpression, FormulaMultiplyExpression, FormulaChooseExpression, FormulaEqExpression, FormulaGtExpression, FormulaLtExpression, FormulaGeExpression, FormulaLeExpression, FormulaAndExpression, FormulaOrExpression, FormulaNotExpression, FormulaRegexMatchExpression, FormulaSubstringExpression, FormulaXAbsExpression, FormulaExistsExpression, FormulaLengthExpression, FormulaWhenExpression, FormulaCountExpression, FormulaDateNowExpression, FormulaGetDaysInMonthExpression, FormulaGetDayExpression, FormulaGetMonthExpression, FormulaGetYearExpression, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaAddDaysExpression, FormulaAddMonthsExpression, FormulaAddYearsExpression, FormulaDateToStringExpression, FormulaDateTimeExpression, FormulaIsSnilsExpression, FormulaIsRegNumSfrExpression, FormulaIsInnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaHashSetExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression, FormulaNoDepsNode, FormulaHasAutoFlagExpression];
|
|
64834
|
+
})), _class137)) || _class136);
|
|
64835
|
+
const formulaExpressions = [FormulaSumExpression, FormulaArgumentExpression, FormulaConstExpression, FormulaMultySumExpression, FormulaRoundExpression, FormulaFloorExpression, FormulaAbsExpression, FormulaDivisionExpression, FormulaMinusExpression, FormulaMultiplyExpression, FormulaChooseExpression, FormulaEqExpression, FormulaGtExpression, FormulaLtExpression, FormulaGeExpression, FormulaLeExpression, FormulaAndExpression, FormulaOrExpression, FormulaNotExpression, FormulaRegexMatchExpression, FormulaSubstringExpression, FormulaXAbsExpression, FormulaExistsExpression, FormulaLengthExpression, FormulaWhenExpression, FormulaCountExpression, FormulaDateNowExpression, FormulaGetDaysInMonthExpression, FormulaGetDayExpression, FormulaGetMonthExpression, FormulaGetYearExpression, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaAddDaysExpression, FormulaAddMonthsExpression, FormulaAddYearsExpression, FormulaDateToStringExpression, FormulaDateTimeExpression, FormulaIsSnilsExpression, FormulaIsRegNumSfrExpression, FormulaIsInnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaHashSetExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression, FormulaNoDepsNode, FormulaHasAutoFlagExpression, FormulaMakeDictExpression, FormulaGetSumByKeysExpression];
|
|
64701
64836
|
|
|
64702
64837
|
/***/ }),
|
|
64703
64838
|
|
|
@@ -67157,7 +67292,7 @@ class LazyLoadDeclarationGenerator {
|
|
|
67157
67292
|
thresholdValue: lazyLoadingNodeDeclaration.thresholdValue
|
|
67158
67293
|
};
|
|
67159
67294
|
}
|
|
67160
|
-
const result =
|
|
67295
|
+
const result = LazyLoadDeclarationGenerator.replaceHolder(`
|
|
67161
67296
|
export default function lazyLoadDeclaration() {
|
|
67162
67297
|
return ${serialize_javascript__WEBPACK_IMPORTED_MODULE_0___default()(declaration, {
|
|
67163
67298
|
space: " "
|
|
@@ -67169,6 +67304,16 @@ class LazyLoadDeclarationGenerator {
|
|
|
67169
67304
|
declaration: declaration
|
|
67170
67305
|
};
|
|
67171
67306
|
}
|
|
67307
|
+
static convertDeclarationToContent(declaration) {
|
|
67308
|
+
const result = LazyLoadDeclarationGenerator.replaceHolder(`
|
|
67309
|
+
export default function lazyLoadDeclaration() {
|
|
67310
|
+
return ${serialize_javascript__WEBPACK_IMPORTED_MODULE_0___default()(declaration, {
|
|
67311
|
+
space: " "
|
|
67312
|
+
})};
|
|
67313
|
+
};`);
|
|
67314
|
+
const content = unescape(result.replace(/(\\)(u[\dA-Fa-f]{4})/g, "%$2"));
|
|
67315
|
+
return content;
|
|
67316
|
+
}
|
|
67172
67317
|
*extractLazyLoadingDeclarationFromSugar(sugarRoot) {
|
|
67173
67318
|
const controlConverterClass = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_5__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.getNodeClass)(sugarRoot));
|
|
67174
67319
|
if (controlConverterClass != undefined) {
|
|
@@ -67247,7 +67392,7 @@ class LazyLoadDeclarationGenerator {
|
|
|
67247
67392
|
yield* this.processElement(nextPath, child);
|
|
67248
67393
|
}
|
|
67249
67394
|
}
|
|
67250
|
-
replaceHolder(decl) {
|
|
67395
|
+
static replaceHolder(decl) {
|
|
67251
67396
|
let replacedDecl = decl;
|
|
67252
67397
|
for (const [placeholderName, placeHoldersFunction] of (0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.iterateEntries)(_DataDeclarationGenerator_placeholders__WEBPACK_IMPORTED_MODULE_2__.placeHolders)) {
|
|
67253
67398
|
const checkName = `"#(${placeholderName})(\\('[\\w]*'\\))?#"`;
|
|
@@ -67370,7 +67515,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
67370
67515
|
|
|
67371
67516
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
67372
67517
|
try {
|
|
67373
|
-
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _sugarRoot$schemaVali, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _generationOptions$re, _additionalContent$fo5, _additionalContent$fo6;
|
|
67518
|
+
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _sugarRoot$schemaVali, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _generationOptions$re, _additionalContent$fo5, _additionalContent$fo6, _additionalContent$fo7, _additionalContent$fo8, _additionalContent$fo9, _additionalContent$fo10, _additionalContent$fo11, _additionalContent$fo12;
|
|
67374
67519
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
67375
67520
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_13__.createDefaultSugarSerializer)();
|
|
67376
67521
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_14__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_11__.FormNode);
|
|
@@ -67407,15 +67552,21 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
67407
67552
|
const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
|
|
67408
67553
|
const lazyLoadGeneratorResult = lazyLoadGenerator.generate();
|
|
67409
67554
|
const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
|
|
67410
|
-
const formulaExprConverter = new _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_34__.FormulaExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_35__.adjustPathMultiplicityComplex)(path, formSchemaRng, dataDeclarationHelper)
|
|
67411
|
-
|
|
67555
|
+
const formulaExprConverter = new _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_34__.FormulaExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_35__.adjustPathMultiplicityComplex)(path, formSchemaRng, dataDeclarationHelper), {
|
|
67556
|
+
enableGroupSumAutoConversion: (_additionalContent$fo5 = (_additionalContent$fo6 = additionalContent.formJsonSettings) === null || _additionalContent$fo6 === void 0 ? void 0 : _additionalContent$fo6.enableTypedFlang) !== null && _additionalContent$fo5 !== void 0 ? _additionalContent$fo5 : false
|
|
67557
|
+
});
|
|
67558
|
+
const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_36__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter, {
|
|
67559
|
+
enableTypedFlang: (_additionalContent$fo7 = (_additionalContent$fo8 = additionalContent.formJsonSettings) === null || _additionalContent$fo8 === void 0 ? void 0 : _additionalContent$fo8.enableTypedFlang) !== null && _additionalContent$fo7 !== void 0 ? _additionalContent$fo7 : false
|
|
67560
|
+
});
|
|
67412
67561
|
const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_37__.InitializationRulesBuilder(sugarRoot, resourcesHash);
|
|
67413
67562
|
const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_38__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
|
|
67414
67563
|
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, useSchemaValidations);
|
|
67415
67564
|
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry, useSchemaValidations);
|
|
67416
67565
|
const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_33__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
|
|
67417
67566
|
const normalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng);
|
|
67418
|
-
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder
|
|
67567
|
+
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder, {
|
|
67568
|
+
enableTypedFlang: (_additionalContent$fo9 = (_additionalContent$fo10 = additionalContent.formJsonSettings) === null || _additionalContent$fo10 === void 0 ? void 0 : _additionalContent$fo10.enableTypedFlang) !== null && _additionalContent$fo9 !== void 0 ? _additionalContent$fo9 : false
|
|
67569
|
+
});
|
|
67419
67570
|
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng);
|
|
67420
67571
|
const autoValueForValueByDefaultNormalizationRuleGenerator = new _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_45__.AutoValueForValueByDefaultNormalizationRuleGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, dataDeclarationHelper);
|
|
67421
67572
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_21__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
@@ -67423,23 +67574,24 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
67423
67574
|
markupGenerator.generate(sugarRoot, builder);
|
|
67424
67575
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_9__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
|
|
67425
67576
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
67426
|
-
builder.addResource("lazyLoadDeclaration.js", lazyLoadGeneratorResult.content);
|
|
67427
67577
|
const autocalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_18__.AutoCalculationsGenerator(dataDeclarationHelper, schemaRng);
|
|
67428
67578
|
const formulasForCalculator = useOldCalculator ? formulas : [];
|
|
67429
67579
|
builder.addResource("calculationFunctions.js", autocalcGenerator.generate(sugarRoot, additionalContent.autocalcsContent, formulasForCalculator));
|
|
67430
67580
|
builder.addResource("dataDeclaration.js", dataDeclarationContent);
|
|
67431
|
-
|
|
67432
|
-
|
|
67581
|
+
let finalLazyLoadDeclaration = lazyLoadGeneratorResult.declaration;
|
|
67582
|
+
if ((_additionalContent$fo11 = (_additionalContent$fo12 = additionalContent.formJsonSettings) === null || _additionalContent$fo12 === void 0 ? void 0 : _additionalContent$fo12.useServerSideFLangNormalization) !== null && _additionalContent$fo11 !== void 0 ? _additionalContent$fo11 : false) {
|
|
67583
|
+
var _additionalContent$fo13, _additionalContent$fo14, _additionalContent$fo15;
|
|
67433
67584
|
const defaultNormalizationRules = normalizationRulesGenerator.generateRules();
|
|
67585
|
+
finalLazyLoadDeclaration = mixLazyLoadingDeclarationWithServerOnlyPaths(lazyLoadGeneratorResult.declaration, defaultNormalizationRules.serverOnlyPaths);
|
|
67434
67586
|
const customNormalizers = [{
|
|
67435
67587
|
normalizerId: "formulas",
|
|
67436
|
-
content: (_additionalContent$
|
|
67588
|
+
content: (_additionalContent$fo13 = additionalContent.formJsonSettings) !== null && _additionalContent$fo13 !== void 0 && _additionalContent$fo13.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
|
|
67437
67589
|
}, {
|
|
67438
67590
|
normalizerId: "formulasWithInitializers",
|
|
67439
|
-
content: (_additionalContent$
|
|
67591
|
+
content: (_additionalContent$fo14 = additionalContent.formJsonSettings) !== null && _additionalContent$fo14 !== void 0 && _additionalContent$fo14.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.generateRules()
|
|
67440
67592
|
}, {
|
|
67441
67593
|
normalizerId: "autoValueForValueByDefault",
|
|
67442
|
-
content: (_additionalContent$
|
|
67594
|
+
content: (_additionalContent$fo15 = additionalContent.formJsonSettings) !== null && _additionalContent$fo15 !== void 0 && _additionalContent$fo15.enableFlangRulesForAutoValueForValueByDefaultNormalizer ? autoValueForValueByDefaultNormalizationRuleGenerator.generateRules() : ""
|
|
67443
67595
|
}].filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrEmpty)(x.content));
|
|
67444
67596
|
const additionalNormalizationRules = additionalContent.additionalNormalizers ? additionalContent.additionalNormalizers.map(additionalNormalizer => {
|
|
67445
67597
|
switch (additionalNormalizer.extension) {
|
|
@@ -67463,9 +67615,10 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
67463
67615
|
throw new Error(`Cannot transform normalization file with ${additionalNormalizer.extension} extension`);
|
|
67464
67616
|
}
|
|
67465
67617
|
}) : [];
|
|
67466
|
-
const resultRules = combineFlangRules(defaultNormalizationRules, ...additionalNormalizationRules, ...customNormalizers);
|
|
67618
|
+
const resultRules = combineFlangRules(defaultNormalizationRules.content, ...additionalNormalizationRules, ...customNormalizers);
|
|
67467
67619
|
builder.addServerSideResource("ServerSide.normalize", resultRules);
|
|
67468
67620
|
}
|
|
67621
|
+
builder.addResource("lazyLoadDeclaration.js", _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator.convertDeclarationToContent(finalLazyLoadDeclaration));
|
|
67469
67622
|
const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_27__.AttachmentPathsGenerator();
|
|
67470
67623
|
const attachmentPaths = attachmentPathsGenerator.generate(sugarRoot);
|
|
67471
67624
|
builder.addServerSideResource(`AttachmentPaths.json`, JSON.stringify(attachmentPaths));
|
|
@@ -67506,6 +67659,17 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
67506
67659
|
return (0,_common_Errors_ProcessSugarErrors__WEBPACK_IMPORTED_MODULE_1__.processSugarErrors)(e, additionalContent.gfv);
|
|
67507
67660
|
}
|
|
67508
67661
|
}
|
|
67662
|
+
function mixLazyLoadingDeclarationWithServerOnlyPaths(declaration, paths) {
|
|
67663
|
+
const updateDeclaration = {
|
|
67664
|
+
...declaration
|
|
67665
|
+
};
|
|
67666
|
+
for (const path of paths) {
|
|
67667
|
+
updateDeclaration[path.toString()] = {
|
|
67668
|
+
lazyLoadMode: "serverOnly"
|
|
67669
|
+
};
|
|
67670
|
+
}
|
|
67671
|
+
return updateDeclaration;
|
|
67672
|
+
}
|
|
67509
67673
|
function combineFlangRules(baseRules, ...rules) {
|
|
67510
67674
|
const customNormalizeRules = rules.filter(r => r.normalizerId).map(x => `--${x.normalizerId}--\n${x.content}`);
|
|
67511
67675
|
const additionalBaseRules = rules.filter(r => !r.normalizerId).map(r => r.content);
|
|
@@ -67585,14 +67749,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
67585
67749
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
67586
67750
|
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! util */ "util");
|
|
67587
67751
|
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__);
|
|
67588
|
-
/* harmony import */ var
|
|
67589
|
-
/* harmony import */ var
|
|
67752
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! crypto */ "crypto");
|
|
67753
|
+
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_3__);
|
|
67754
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! chalk */ "./node_modules/chalk/source/index.js");
|
|
67755
|
+
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_4__);
|
|
67590
67756
|
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js");
|
|
67591
67757
|
/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_10__);
|
|
67592
|
-
/* harmony import */ var
|
|
67593
|
-
/* harmony import */ var
|
|
67594
|
-
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! md5-file */ "./node_modules/md5-file/index.js");
|
|
67595
|
-
/* harmony import */ var md5_file__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(md5_file__WEBPACK_IMPORTED_MODULE_5__);
|
|
67758
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
|
67759
|
+
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(md5__WEBPACK_IMPORTED_MODULE_5__);
|
|
67596
67760
|
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! recursive-readdir */ "./node_modules/recursive-readdir/index.js");
|
|
67597
67761
|
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(recursive_readdir__WEBPACK_IMPORTED_MODULE_6__);
|
|
67598
67762
|
/* harmony import */ var _common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/ExtractSugarReferences */ "./Generator/src/common/ExtractSugarReferences.ts");
|
|
@@ -67621,8 +67785,8 @@ async function readFormSources(formSourcesPath, farmDirectory) {
|
|
|
67621
67785
|
const sugarContent = await readSugarFiles(formSugarDirectoryPath, sugarReferences);
|
|
67622
67786
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
67623
67787
|
// eslint-disable-next-line no-console
|
|
67624
|
-
console.warn(
|
|
67625
|
-
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
67788
|
+
console.warn(chalk__WEBPACK_IMPORTED_MODULE_4___default().yellow(`[WARN] Форма не содержит ссылок на fetch-функции. Будут автоматически подключены функции из каталога legacyfetchfuctions\n` + `[WARN] В будущем необходимо явно прописывать ссылки на используемые fetch-функции`));
|
|
67789
|
+
const legacyfetchfunctionsDirectory = (await (0,fs_extra__WEBPACK_IMPORTED_MODULE_10__.pathExists)(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions"))) ? path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions") : path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "candy.farm", "legacyfetchfunctions");
|
|
67626
67790
|
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
67627
67791
|
}
|
|
67628
67792
|
const result = {
|
|
@@ -67722,25 +67886,25 @@ async function getAllDependencies(formSourcesPath, farmDirectory) {
|
|
|
67722
67886
|
const formSugarDirectoryPath = path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "sugar");
|
|
67723
67887
|
const sugarReferences = await extractReferences(formSugarDirectoryPath);
|
|
67724
67888
|
if (sugarReferences.fetchFunctionFiles.length === 0) {
|
|
67725
|
-
const legacyfetchfunctionsDirectory = path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions");
|
|
67889
|
+
const legacyfetchfunctionsDirectory = (await (0,fs_extra__WEBPACK_IMPORTED_MODULE_10__.pathExists)(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions"))) ? path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "legacyfetchfunctions") : path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "candy.farm", "legacyfetchfunctions");
|
|
67726
67890
|
sugarReferences.fetchFunctionFiles = (await readdirAsync(legacyfetchfunctionsDirectory)).map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(legacyfetchfunctionsDirectory, x));
|
|
67727
67891
|
}
|
|
67728
67892
|
return [path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), ...sugarReferences.fetchFunctionFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x)), ...sugarReferences.sugarFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x + ".sugar.xml")), ...sugarReferences.resourceFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x)), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSourcesPath, "settings.json"))), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSourcesPath, "hooks.js"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "helpers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "converters"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "mergers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "jsHelpers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "xsltTemplates"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "validations"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "schemas"))), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "tour", "tour.js"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "controls"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "localization")))];
|
|
67729
67893
|
}
|
|
67730
|
-
function normalizeLineEndings(content) {
|
|
67731
|
-
return content.replace(/\r\n/gi, "\n").replace(/\n\r/gi, "\n");
|
|
67732
|
-
}
|
|
67733
67894
|
async function getAllDependenciesHash(formSourcesPath, farmDirectory) {
|
|
67734
67895
|
const allDeps = await getAllDependencies(formSourcesPath, farmDirectory);
|
|
67735
|
-
const hashes = await Promise.all(allDeps.map(async depFilePath =>
|
|
67736
|
-
|
|
67737
|
-
|
|
67738
|
-
|
|
67739
|
-
|
|
67740
|
-
|
|
67741
|
-
|
|
67742
|
-
|
|
67743
|
-
|
|
67896
|
+
const hashes = await Promise.all(allDeps.map(async depFilePath => hashFile(depFilePath)));
|
|
67897
|
+
return md5__WEBPACK_IMPORTED_MODULE_5___default()(hashes.join());
|
|
67898
|
+
}
|
|
67899
|
+
function normalizeLineEndings(content) {
|
|
67900
|
+
return content.replace(/\r/gi, "");
|
|
67901
|
+
}
|
|
67902
|
+
async function hashFile(filePath) {
|
|
67903
|
+
const fileBuffer = await readFileAsync(filePath, "utf-8");
|
|
67904
|
+
const clearedCRLF = normalizeLineEndings(fileBuffer);
|
|
67905
|
+
const hashBuffer = (0,crypto__WEBPACK_IMPORTED_MODULE_3__.createHash)("sha256");
|
|
67906
|
+
hashBuffer.update(clearedCRLF);
|
|
67907
|
+
return hashBuffer.digest("hex");
|
|
67744
67908
|
}
|
|
67745
67909
|
async function readSugarFiles(formSugarDirectoryPath, references) {
|
|
67746
67910
|
const result = {
|
|
@@ -67803,7 +67967,7 @@ async function readAdditionalNormalizersFiles(rootPath) {
|
|
|
67803
67967
|
return normalizerFiles;
|
|
67804
67968
|
} catch (error) {
|
|
67805
67969
|
// eslint-disable-next-line no-console
|
|
67806
|
-
console.warn(
|
|
67970
|
+
console.warn(chalk__WEBPACK_IMPORTED_MODULE_4___default().yellow(`Error while reading normalizers at ${rootPath}`, error));
|
|
67807
67971
|
return [];
|
|
67808
67972
|
}
|
|
67809
67973
|
}
|
|
@@ -67994,7 +68158,7 @@ class CustomKCLangToFlangRuleGenerator {
|
|
|
67994
68158
|
const result = [];
|
|
67995
68159
|
const getFormulaExpression = field => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression(defaultValue));
|
|
67996
68160
|
if (isTargetAutoField) {
|
|
67997
|
-
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.IsEqualsBinaryExpression(
|
|
68161
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.makeStringValueReference)(fullTarget.toCurrentIteration(), "value"), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string)));
|
|
67998
68162
|
} else {
|
|
67999
68163
|
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
|
|
68000
68164
|
}
|
|
@@ -68084,8 +68248,8 @@ class FLangValidationBuildContext {
|
|
|
68084
68248
|
buildBasicValidations(targetPath, typeNode, schemaTypeNode, optional, highOrderDescription, nodeGId) {
|
|
68085
68249
|
var _typeNode$base, _typeNode$description;
|
|
68086
68250
|
const validations = [];
|
|
68087
|
-
const valueReference =
|
|
68088
|
-
const autoValueReference =
|
|
68251
|
+
const valueReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(targetPath.toCurrentIteration(), "value");
|
|
68252
|
+
const autoValueReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(targetPath.toCurrentIteration(), "autoValue");
|
|
68089
68253
|
const baseName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.baseType;
|
|
68090
68254
|
const baseDescription = (_typeNode$description = typeNode === null || typeNode === void 0 ? void 0 : typeNode.description) !== null && _typeNode$description !== void 0 ? _typeNode$description : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description;
|
|
68091
68255
|
if (baseName != undefined) {
|
|
@@ -68108,7 +68272,7 @@ class FLangValidationBuildContext {
|
|
|
68108
68272
|
const schemaNode = this.schemaRng.getElementByPath(targetPath);
|
|
68109
68273
|
const parentNode = schemaNode != undefined ? this.getFirstAcceptedParent(schemaNode) : undefined;
|
|
68110
68274
|
const allChildrenPaths = parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__.FormSchemaRngElement ? this.schemaRng.getAllChildValueNodes(parentNode).map(x => this.schemaRng.getPath(x, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each)).filter(x => !(0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_4__.getMatchedAndDifferentModelPaths)(targetPath, x).differentPath.isContainIteration()) : undefined;
|
|
68111
|
-
const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.EqExpression(
|
|
68275
|
+
const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(childPath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.StringLiteralExpression(""))).reduce(_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.combineByAndFlangExpr, undefined);
|
|
68112
68276
|
const errorValidations = validations.filter(x => !x.checkType || x.checkType === "error");
|
|
68113
68277
|
const errorExpression = this.createFlangExpression((0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.reverseArray)(errorValidations), targetPath, valueReference, "error", highOrderDescription !== null && highOrderDescription !== void 0 ? highOrderDescription : typeNode === null || typeNode === void 0 ? void 0 : typeNode.requiredDescription, optional, parentNode, restChecks);
|
|
68114
68278
|
const result = [];
|
|
@@ -68203,7 +68367,7 @@ class FLangValidationBuildContext {
|
|
|
68203
68367
|
const value = match === null || match === void 0 || (_match$3 = match[0]) === null || _match$3 === void 0 ? void 0 : _match$3[3];
|
|
68204
68368
|
if (path != undefined && sign != undefined && value != undefined) {
|
|
68205
68369
|
const fullPath = this.schemaRng.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path, false)).normalize()).trimLastStarIfLastToken().toCurrentIteration();
|
|
68206
|
-
const valueRef =
|
|
68370
|
+
const valueRef = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.makeStringValueReference)(fullPath, "children");
|
|
68207
68371
|
const len = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.LenExpression(valueRef);
|
|
68208
68372
|
const argument = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.DecimalLiteralExpression(value);
|
|
68209
68373
|
const getOperation = () => {
|
|
@@ -68487,6 +68651,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68487
68651
|
/* harmony export */ ArgumentDeclarationExpression: () => (/* binding */ ArgumentDeclarationExpression),
|
|
68488
68652
|
/* harmony export */ ArgumentReferenceExpression: () => (/* binding */ ArgumentReferenceExpression),
|
|
68489
68653
|
/* harmony export */ ArrayExpression: () => (/* binding */ ArrayExpression),
|
|
68654
|
+
/* harmony export */ ArrayLengthExpression: () => (/* binding */ ArrayLengthExpression),
|
|
68490
68655
|
/* harmony export */ BinaryBooleanExpression: () => (/* binding */ BinaryBooleanExpression),
|
|
68491
68656
|
/* harmony export */ BinaryExpression: () => (/* binding */ BinaryExpression),
|
|
68492
68657
|
/* harmony export */ BoolLiteralExpression: () => (/* binding */ BoolLiteralExpression),
|
|
@@ -68506,6 +68671,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68506
68671
|
/* harmony export */ DifferenceInMonthsExpression: () => (/* binding */ DifferenceInMonthsExpression),
|
|
68507
68672
|
/* harmony export */ DivisionBinaryExpression: () => (/* binding */ DivisionBinaryExpression),
|
|
68508
68673
|
/* harmony export */ EqExpression: () => (/* binding */ EqExpression),
|
|
68674
|
+
/* harmony export */ ExistsExpression: () => (/* binding */ ExistsExpression),
|
|
68509
68675
|
/* harmony export */ FLangBoolExpression: () => (/* binding */ FLangBoolExpression),
|
|
68510
68676
|
/* harmony export */ FLangDecimalExpression: () => (/* binding */ FLangDecimalExpression),
|
|
68511
68677
|
/* harmony export */ FLangDictExpression: () => (/* binding */ FLangDictExpression),
|
|
@@ -68544,6 +68710,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68544
68710
|
/* harmony export */ LenExpression: () => (/* binding */ LenExpression),
|
|
68545
68711
|
/* harmony export */ LogicalExpression: () => (/* binding */ LogicalExpression),
|
|
68546
68712
|
/* harmony export */ LtExpression: () => (/* binding */ LtExpression),
|
|
68713
|
+
/* harmony export */ MakeHashSetFromDictExpression: () => (/* binding */ MakeHashSetFromDictExpression),
|
|
68547
68714
|
/* harmony export */ MinusBinaryExpression: () => (/* binding */ MinusBinaryExpression),
|
|
68548
68715
|
/* harmony export */ MinusUnaryExpression: () => (/* binding */ MinusUnaryExpression),
|
|
68549
68716
|
/* harmony export */ MultiplicativeBinaryExpression: () => (/* binding */ MultiplicativeBinaryExpression),
|
|
@@ -68657,7 +68824,7 @@ class ValueReferenceExpression extends FLangExpression {
|
|
|
68657
68824
|
return [];
|
|
68658
68825
|
}
|
|
68659
68826
|
getType() {
|
|
68660
|
-
return BuildInTypeExpression.
|
|
68827
|
+
return BuildInTypeExpression.object;
|
|
68661
68828
|
}
|
|
68662
68829
|
convertToString() {
|
|
68663
68830
|
return `${toFLangString(this.modePath)}.${this.valueName}`;
|
|
@@ -68855,6 +69022,7 @@ class BuildInTypeExpression extends TypeReferenceExpression {
|
|
|
68855
69022
|
}
|
|
68856
69023
|
}
|
|
68857
69024
|
_BuildInTypeExpression = BuildInTypeExpression;
|
|
69025
|
+
BuildInTypeExpression.object = new _BuildInTypeExpression("object");
|
|
68858
69026
|
BuildInTypeExpression.decimal = new _BuildInTypeExpression("decimal");
|
|
68859
69027
|
BuildInTypeExpression.string = new _BuildInTypeExpression("string");
|
|
68860
69028
|
BuildInTypeExpression.dict = new _BuildInTypeExpression("dict");
|
|
@@ -69111,7 +69279,7 @@ class StringLiteralExpression extends ConstExpression {
|
|
|
69111
69279
|
return JSON.stringify(this.stringValue);
|
|
69112
69280
|
}
|
|
69113
69281
|
}
|
|
69114
|
-
class DecimalLiteralExpression extends
|
|
69282
|
+
class DecimalLiteralExpression extends ConstExpression {
|
|
69115
69283
|
constructor(value) {
|
|
69116
69284
|
super();
|
|
69117
69285
|
this.value = void 0;
|
|
@@ -69128,6 +69296,11 @@ class DecimalLiteralExpression extends FLangDecimalExpression {
|
|
|
69128
69296
|
}
|
|
69129
69297
|
}
|
|
69130
69298
|
class DictLiteralExpression extends FLangExpression {
|
|
69299
|
+
constructor(value) {
|
|
69300
|
+
super();
|
|
69301
|
+
this.value = void 0;
|
|
69302
|
+
this.value = value;
|
|
69303
|
+
}
|
|
69131
69304
|
getChildNodes() {
|
|
69132
69305
|
return [];
|
|
69133
69306
|
}
|
|
@@ -69135,7 +69308,9 @@ class DictLiteralExpression extends FLangExpression {
|
|
|
69135
69308
|
return BuildInTypeExpression.dict;
|
|
69136
69309
|
}
|
|
69137
69310
|
convertToString() {
|
|
69138
|
-
|
|
69311
|
+
var _this$value;
|
|
69312
|
+
const argument = this.value != undefined ? (_this$value = this.value) === null || _this$value === void 0 ? void 0 : _this$value.convertToString() : "";
|
|
69313
|
+
return `dict(${argument})`;
|
|
69139
69314
|
}
|
|
69140
69315
|
}
|
|
69141
69316
|
class BoolLiteralExpression extends ConstExpression {
|
|
@@ -69609,6 +69784,26 @@ class HashSetExpression extends FLangExpression {
|
|
|
69609
69784
|
return `hashSet(${(_this$expression$conv = (_this$expression = this.expression) === null || _this$expression === void 0 ? void 0 : _this$expression.convertToString()) !== null && _this$expression$conv !== void 0 ? _this$expression$conv : ""})`;
|
|
69610
69785
|
}
|
|
69611
69786
|
}
|
|
69787
|
+
class MakeHashSetFromDictExpression extends FLangExpression {
|
|
69788
|
+
constructor(expression) {
|
|
69789
|
+
super();
|
|
69790
|
+
this.expression = void 0;
|
|
69791
|
+
this.expression = expression;
|
|
69792
|
+
}
|
|
69793
|
+
getType() {
|
|
69794
|
+
return BuildInTypeExpression.hashSet;
|
|
69795
|
+
}
|
|
69796
|
+
*getChildNodes() {
|
|
69797
|
+
if (this.expression != undefined) {
|
|
69798
|
+
yield this.expression;
|
|
69799
|
+
}
|
|
69800
|
+
return [];
|
|
69801
|
+
}
|
|
69802
|
+
convertToString() {
|
|
69803
|
+
var _this$expression$conv2, _this$expression2;
|
|
69804
|
+
return `makeHashSetFromDict(${(_this$expression$conv2 = (_this$expression2 = this.expression) === null || _this$expression2 === void 0 ? void 0 : _this$expression2.convertToString()) !== null && _this$expression$conv2 !== void 0 ? _this$expression$conv2 : ""})`;
|
|
69805
|
+
}
|
|
69806
|
+
}
|
|
69612
69807
|
class AddArrayExpression extends FLangExpression {
|
|
69613
69808
|
constructor(argumentReference, expression) {
|
|
69614
69809
|
super();
|
|
@@ -69681,7 +69876,39 @@ class ArrayExpression extends FLangExpression {
|
|
|
69681
69876
|
}
|
|
69682
69877
|
convertToString() {
|
|
69683
69878
|
const items = this.items.map(x => x.convertToString()).join(", ");
|
|
69684
|
-
return `
|
|
69879
|
+
return `makeArray(${items})`;
|
|
69880
|
+
}
|
|
69881
|
+
}
|
|
69882
|
+
class ArrayLengthExpression extends FLangExpression {
|
|
69883
|
+
constructor(expression) {
|
|
69884
|
+
super();
|
|
69885
|
+
this.expression = void 0;
|
|
69886
|
+
this.expression = expression;
|
|
69887
|
+
}
|
|
69888
|
+
getType() {
|
|
69889
|
+
return BuildInTypeExpression.decimal;
|
|
69890
|
+
}
|
|
69891
|
+
*getChildNodes() {
|
|
69892
|
+
yield this.expression;
|
|
69893
|
+
}
|
|
69894
|
+
convertToString() {
|
|
69895
|
+
return `arrayLength(${this.expression.convertToString()})`;
|
|
69896
|
+
}
|
|
69897
|
+
}
|
|
69898
|
+
class ExistsExpression extends FLangExpression {
|
|
69899
|
+
constructor(source) {
|
|
69900
|
+
super();
|
|
69901
|
+
this.source = void 0;
|
|
69902
|
+
this.source = source;
|
|
69903
|
+
}
|
|
69904
|
+
getType() {
|
|
69905
|
+
return BuildInTypeExpression.bool;
|
|
69906
|
+
}
|
|
69907
|
+
*getChildNodes() {
|
|
69908
|
+
yield this.source;
|
|
69909
|
+
}
|
|
69910
|
+
convertToString() {
|
|
69911
|
+
return `exists(${this.source.convertToString()})`;
|
|
69685
69912
|
}
|
|
69686
69913
|
}
|
|
69687
69914
|
class NullCoalesceExpression extends FLangExpression {
|
|
@@ -69817,7 +70044,7 @@ class GetOldExpression extends FLangExpression {
|
|
|
69817
70044
|
return [];
|
|
69818
70045
|
}
|
|
69819
70046
|
getType() {
|
|
69820
|
-
return
|
|
70047
|
+
return this.expression.getType();
|
|
69821
70048
|
}
|
|
69822
70049
|
convertToString() {
|
|
69823
70050
|
return `old(${this.expression.convertToString()})`;
|
|
@@ -69852,6 +70079,9 @@ class SetStatement extends FLangStatement {
|
|
|
69852
70079
|
"use strict";
|
|
69853
70080
|
__webpack_require__.r(__webpack_exports__);
|
|
69854
70081
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
70082
|
+
/* harmony export */ arrayFieldNameSuffix: () => (/* binding */ arrayFieldNameSuffix),
|
|
70083
|
+
/* harmony export */ castFinalExpressionToStringIfNeed: () => (/* binding */ castFinalExpressionToStringIfNeed),
|
|
70084
|
+
/* harmony export */ castOperandIfNeed: () => (/* binding */ castOperandIfNeed),
|
|
69855
70085
|
/* harmony export */ castOperandToBoolIfNeed: () => (/* binding */ castOperandToBoolIfNeed),
|
|
69856
70086
|
/* harmony export */ castOperandToDateTimeIfNeed: () => (/* binding */ castOperandToDateTimeIfNeed),
|
|
69857
70087
|
/* harmony export */ castOperandToDecimalIfNeed: () => (/* binding */ castOperandToDecimalIfNeed),
|
|
@@ -69860,19 +70090,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69860
70090
|
/* harmony export */ combineByOrFlangExpr: () => (/* binding */ combineByOrFlangExpr),
|
|
69861
70091
|
/* harmony export */ combineRulesWithOptionalSectionChecking: () => (/* binding */ combineRulesWithOptionalSectionChecking),
|
|
69862
70092
|
/* harmony export */ decimalWrapper: () => (/* binding */ decimalWrapper),
|
|
70093
|
+
/* harmony export */ dictFieldNameSuffix: () => (/* binding */ dictFieldNameSuffix),
|
|
70094
|
+
/* harmony export */ ensureCorrectFieldNameByExpressionType: () => (/* binding */ ensureCorrectFieldNameByExpressionType),
|
|
69863
70095
|
/* harmony export */ ensureOperandsOfTypeOrNull: () => (/* binding */ ensureOperandsOfTypeOrNull),
|
|
70096
|
+
/* harmony export */ extractValueReferenceFromCast: () => (/* binding */ extractValueReferenceFromCast),
|
|
69864
70097
|
/* harmony export */ getAllExpressionChildren: () => (/* binding */ getAllExpressionChildren),
|
|
70098
|
+
/* harmony export */ hashSetFieldNameSuffix: () => (/* binding */ hashSetFieldNameSuffix),
|
|
70099
|
+
/* harmony export */ makeGetOld: () => (/* binding */ makeGetOld),
|
|
70100
|
+
/* harmony export */ makeNoDeps: () => (/* binding */ makeNoDeps),
|
|
70101
|
+
/* harmony export */ makeStringValueReference: () => (/* binding */ makeStringValueReference),
|
|
69865
70102
|
/* harmony export */ nullCoalesceWithTypeCheck: () => (/* binding */ nullCoalesceWithTypeCheck),
|
|
69866
70103
|
/* harmony export */ tryExtractValueReferenceAsStringFromDecimal: () => (/* binding */ tryExtractValueReferenceAsStringFromDecimal),
|
|
69867
70104
|
/* harmony export */ wrapWithArgumentsCondition: () => (/* binding */ wrapWithArgumentsCondition),
|
|
69868
70105
|
/* harmony export */ wrapWithDisableValueAutoInitFlagCheckIfRequired: () => (/* binding */ wrapWithDisableValueAutoInitFlagCheckIfRequired)
|
|
69869
70106
|
/* harmony export */ });
|
|
69870
|
-
/* harmony import */ var
|
|
69871
|
-
/* harmony import */ var
|
|
69872
|
-
/* harmony import */ var
|
|
70107
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! util */ "util");
|
|
70108
|
+
/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_0__);
|
|
70109
|
+
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
70110
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
70111
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
70112
|
+
/* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
70113
|
+
|
|
69873
70114
|
|
|
69874
70115
|
|
|
69875
70116
|
|
|
70117
|
+
|
|
70118
|
+
const dictFieldNameSuffix = "_dict";
|
|
70119
|
+
const arrayFieldNameSuffix = "_array";
|
|
70120
|
+
const hashSetFieldNameSuffix = "_hashSet";
|
|
69876
70121
|
function* getAllExpressionChildren(node, descendantsFilter) {
|
|
69877
70122
|
const children = node.getChildNodes();
|
|
69878
70123
|
for (const child of children) {
|
|
@@ -69883,75 +70128,138 @@ function* getAllExpressionChildren(node, descendantsFilter) {
|
|
|
69883
70128
|
}
|
|
69884
70129
|
}
|
|
69885
70130
|
function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
|
|
69886
|
-
return new
|
|
70131
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression("true")), makeNoDeps(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
|
|
69887
70132
|
}
|
|
69888
70133
|
function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
|
|
69889
70134
|
var _formSchemaRng$getEle;
|
|
69890
|
-
return x instanceof
|
|
70135
|
+
return x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement && x.left.valueName === "value" && (_formSchemaRng$getEle = formSchemaRng.getElementByPath(x.left.modePath)) !== null && _formSchemaRng$getEle !== void 0 && _formSchemaRng$getEle.isIgnoreForcedValueSet() ? [createValueRuleWithDisableValueAutoInitCheck(x.left.modePath, x.right)] : [x];
|
|
69891
70136
|
}
|
|
69892
70137
|
function wrapWithArgumentsCondition(expression) {
|
|
69893
|
-
const childFilter = node => !(node instanceof
|
|
69894
|
-
const allValueRefNodes =
|
|
69895
|
-
const uniquePaths =
|
|
69896
|
-
const conditionExpression =
|
|
69897
|
-
const currExpr = new
|
|
69898
|
-
return acc != undefined ? new
|
|
70138
|
+
const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression);
|
|
70139
|
+
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression ? x : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined);
|
|
70140
|
+
const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
|
|
70141
|
+
const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.reduce(uniquePaths, (acc, curr) => {
|
|
70142
|
+
const currExpr = new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ExistsExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(curr.modePath, curr.valueName));
|
|
70143
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, currExpr) : currExpr;
|
|
69899
70144
|
}, undefined);
|
|
69900
70145
|
if (conditionExpression == undefined) {
|
|
69901
70146
|
return expression;
|
|
69902
70147
|
}
|
|
69903
|
-
return new
|
|
70148
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullLiteralExpression());
|
|
69904
70149
|
}
|
|
69905
70150
|
function combineRulesWithOptionalSectionChecking(allRules, optionalSectionRulesBuilder) {
|
|
69906
|
-
const allUniqueRules =
|
|
70151
|
+
const allUniqueRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allRules, x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement ? x.left.convertToString() : x.convertToString());
|
|
69907
70152
|
const allUniqueRulesWithOptionalChecks = Iterator.from(optionalSectionRulesBuilder.wrapRulesWithOptionalPageCheck(allUniqueRules)).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
|
|
69908
70153
|
return allUniqueRulesWithOptionalChecks;
|
|
69909
70154
|
}
|
|
69910
70155
|
function tryExtractValueReferenceAsStringFromDecimal(expression) {
|
|
69911
|
-
if (expression.getType() ===
|
|
70156
|
+
if (expression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal && expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
69912
70157
|
return expression.targetExpression;
|
|
69913
70158
|
}
|
|
69914
70159
|
return expression;
|
|
69915
70160
|
}
|
|
70161
|
+
function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, decimalFormat = "G29") {
|
|
70162
|
+
if (enableTypedExpression && (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet)) {
|
|
70163
|
+
return operandExpression;
|
|
70164
|
+
}
|
|
70165
|
+
return castOperandToStringIfNeed(operandExpression, decimalFormat);
|
|
70166
|
+
}
|
|
69916
70167
|
function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
|
|
69917
|
-
if (operandExpression instanceof
|
|
69918
|
-
return new
|
|
70168
|
+
if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateNowExpression) {
|
|
70169
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression("dd.MM.yyyy"));
|
|
70170
|
+
}
|
|
70171
|
+
if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet) {
|
|
70172
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SerializeEnumerationExpression(operandExpression);
|
|
69919
70173
|
}
|
|
69920
|
-
|
|
69921
|
-
|
|
70174
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
|
|
70175
|
+
}
|
|
70176
|
+
function castOperandIfNeed(operandExpression, type) {
|
|
70177
|
+
if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression) {
|
|
70178
|
+
return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, type) : operandExpression;
|
|
69922
70179
|
}
|
|
69923
|
-
return
|
|
70180
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid type for cast: ${type}`);
|
|
69924
70181
|
}
|
|
69925
70182
|
function castOperandToBoolIfNeed(operandExpression) {
|
|
69926
|
-
return operandExpression.getType() !=
|
|
70183
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.bool) : operandExpression;
|
|
69927
70184
|
}
|
|
69928
70185
|
function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
|
|
69929
|
-
return operandExpression.getType() !==
|
|
70186
|
+
return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
|
|
69930
70187
|
}
|
|
69931
|
-
const decimalWrapper = (ex, needWrapped) => needWrapped ?
|
|
70188
|
+
const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
|
|
69932
70189
|
function castOperandToDateTimeIfNeed(operandExpression) {
|
|
69933
|
-
return operandExpression.getType() !=
|
|
70190
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dateTime) : operandExpression;
|
|
69934
70191
|
}
|
|
69935
70192
|
function nullCoalesceWithTypeCheck(argument, replacement) {
|
|
69936
|
-
const isValid = argument.getType() === replacement.getType() || argument.getType() ===
|
|
70193
|
+
const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null;
|
|
69937
70194
|
if (!isValid) {
|
|
69938
70195
|
throw new Error("Couldn't build null coalesce expression: types not match");
|
|
69939
70196
|
}
|
|
69940
|
-
return new
|
|
70197
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression(argument, replacement);
|
|
69941
70198
|
}
|
|
69942
70199
|
function ensureOperandsOfTypeOrNull(type, ...operands) {
|
|
69943
70200
|
for (const operand of operands) {
|
|
69944
70201
|
const operandType = operand.getType();
|
|
69945
|
-
if (operandType !==
|
|
70202
|
+
if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null && operandType !== type) {
|
|
69946
70203
|
throw new Error(`Invalid operand type: required [${type}] but got ${operandType}`);
|
|
69947
70204
|
}
|
|
69948
70205
|
}
|
|
69949
70206
|
}
|
|
69950
70207
|
function combineByOrFlangExpr(acc, current) {
|
|
69951
|
-
return acc != undefined ? new
|
|
70208
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, current) : current;
|
|
69952
70209
|
}
|
|
69953
70210
|
function combineByAndFlangExpr(acc, current) {
|
|
69954
|
-
return acc != undefined ? new
|
|
70211
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.AndBinaryExpression(acc, current) : current;
|
|
70212
|
+
}
|
|
70213
|
+
function makeNoDeps(expression) {
|
|
70214
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70215
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression);
|
|
70216
|
+
}
|
|
70217
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70218
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
70219
|
+
}
|
|
70220
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
70221
|
+
}
|
|
70222
|
+
function makeGetOld(expression) {
|
|
70223
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70224
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression);
|
|
70225
|
+
}
|
|
70226
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70227
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
70228
|
+
}
|
|
70229
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
70230
|
+
}
|
|
70231
|
+
function makeStringValueReference(modePath, valueName) {
|
|
70232
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string);
|
|
70233
|
+
}
|
|
70234
|
+
function extractValueReferenceFromCast(expression) {
|
|
70235
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70236
|
+
return expression;
|
|
70237
|
+
}
|
|
70238
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
70239
|
+
return expression.targetExpression;
|
|
70240
|
+
}
|
|
70241
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression) {
|
|
70242
|
+
return expression.targetExpression;
|
|
70243
|
+
}
|
|
70244
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Cannot extract ValueReferenceExpression! ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression)}`);
|
|
70245
|
+
}
|
|
70246
|
+
function ensureCorrectFieldNameByExpressionType(statement) {
|
|
70247
|
+
if (statement instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement) {
|
|
70248
|
+
const lastPart = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.last(statement.left.modePath.getPathParts());
|
|
70249
|
+
const lastStringPart = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.isSimpleToken(lastPart) ? lastPart : "";
|
|
70250
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict && !lastStringPart.endsWith(dictFieldNameSuffix)) {
|
|
70251
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${dictFieldNameSuffix}"`);
|
|
70252
|
+
}
|
|
70253
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet && !lastStringPart.endsWith(hashSetFieldNameSuffix)) {
|
|
70254
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${hashSetFieldNameSuffix}"`);
|
|
70255
|
+
}
|
|
70256
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
|
|
70257
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${arrayFieldNameSuffix}"`);
|
|
70258
|
+
}
|
|
70259
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
|
|
70260
|
+
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
|
|
70261
|
+
}
|
|
70262
|
+
}
|
|
69955
70263
|
}
|
|
69956
70264
|
|
|
69957
70265
|
/***/ }),
|
|
@@ -69974,7 +70282,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69974
70282
|
/* harmony import */ var _babel_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
69975
70283
|
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
69976
70284
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
69977
|
-
/* harmony import */ var
|
|
70285
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
70286
|
+
/* harmony import */ var _Engine_src_Engine_Core_CoreTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Engine/src/Engine/Core/CoreTypes */ "./Engine/src/Engine/Core/CoreTypes.ts");
|
|
70287
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
70288
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
70289
|
+
|
|
70290
|
+
|
|
70291
|
+
|
|
69978
70292
|
|
|
69979
70293
|
|
|
69980
70294
|
|
|
@@ -70041,8 +70355,8 @@ class FetchFunctionToFlangConverter {
|
|
|
70041
70355
|
const innerCondition = this.traverse(node.test);
|
|
70042
70356
|
const then = this.traverse(node.consequent);
|
|
70043
70357
|
const elseThen = this.traverse(node.alternate);
|
|
70044
|
-
const condition = innerCondition instanceof
|
|
70045
|
-
return new
|
|
70358
|
+
const condition = innerCondition instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.LogicalExpression ? innerCondition : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NotEqExpression(innerCondition, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullLiteralExpression());
|
|
70359
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ConditionalExpression(condition, then, elseThen);
|
|
70046
70360
|
}
|
|
70047
70361
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isBinaryExpression(node)) {
|
|
70048
70362
|
const left = this.traverse(node.left);
|
|
@@ -70050,12 +70364,12 @@ class FetchFunctionToFlangConverter {
|
|
|
70050
70364
|
switch (node.operator) {
|
|
70051
70365
|
case "==":
|
|
70052
70366
|
case "===":
|
|
70053
|
-
return new
|
|
70367
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.EqExpression(left, right);
|
|
70054
70368
|
case "!=":
|
|
70055
70369
|
case "!==":
|
|
70056
|
-
return new
|
|
70370
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NotEqExpression(left, right);
|
|
70057
70371
|
case "+":
|
|
70058
|
-
return new
|
|
70372
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SumBinaryExpression(left, right);
|
|
70059
70373
|
default:
|
|
70060
70374
|
throw new JsToFlangConvertError("Not supported!");
|
|
70061
70375
|
}
|
|
@@ -70065,38 +70379,57 @@ class FetchFunctionToFlangConverter {
|
|
|
70065
70379
|
const right = this.traverse(node.right);
|
|
70066
70380
|
switch (node.operator) {
|
|
70067
70381
|
case "||":
|
|
70068
|
-
return new
|
|
70382
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.OrBinaryExpression(left, right);
|
|
70069
70383
|
case "&&":
|
|
70070
|
-
return new
|
|
70384
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.AndBinaryExpression(left, right);
|
|
70071
70385
|
case "??":
|
|
70072
|
-
return new
|
|
70386
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullCoalesceExpression(left, right);
|
|
70073
70387
|
default:
|
|
70074
70388
|
throw new JsToFlangConvertError("Not supported!");
|
|
70075
70389
|
}
|
|
70076
70390
|
}
|
|
70077
70391
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isStringLiteral(node)) {
|
|
70078
|
-
return new
|
|
70392
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression(node.value);
|
|
70079
70393
|
}
|
|
70080
70394
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isNumericLiteral(node)) {
|
|
70081
|
-
return new
|
|
70395
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.DecimalLiteralExpression(node.value);
|
|
70082
70396
|
}
|
|
70083
70397
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isNullLiteral(node)) {
|
|
70084
|
-
return new
|
|
70398
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullLiteralExpression();
|
|
70085
70399
|
}
|
|
70086
70400
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isIdentifier(node) && node.name === "undefined") {
|
|
70087
|
-
return new
|
|
70401
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullLiteralExpression();
|
|
70088
70402
|
}
|
|
70089
70403
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isMemberExpression(node)) {
|
|
70090
70404
|
return this.convertMemberExpression(node);
|
|
70091
70405
|
}
|
|
70406
|
+
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isCallExpression(node)) {
|
|
70407
|
+
return this.convertCallExpression(node);
|
|
70408
|
+
}
|
|
70092
70409
|
throw new JsToFlangConvertError("Unknown code node.\n" + JSON.stringify(node, null, 4));
|
|
70093
70410
|
}
|
|
70411
|
+
convertCallExpression(node) {
|
|
70412
|
+
const obj = node.callee;
|
|
70413
|
+
const args = node.arguments;
|
|
70414
|
+
const isModelCall = _babel_types__WEBPACK_IMPORTED_MODULE_1__.isMemberExpression(obj) && _babel_types__WEBPACK_IMPORTED_MODULE_1__.isMemberExpression(obj.object) && _babel_types__WEBPACK_IMPORTED_MODULE_1__.isThisExpression(obj.object.object) && _babel_types__WEBPACK_IMPORTED_MODULE_1__.isIdentifier(obj.object.property) && obj.object.property.name === "model" && _babel_types__WEBPACK_IMPORTED_MODULE_1__.isIdentifier(obj.property) && obj.property.name === "getCached";
|
|
70415
|
+
if (isModelCall) {
|
|
70416
|
+
var _extractedArgs$, _extractedArgs$2;
|
|
70417
|
+
const extractedArgs = args.map(x => _babel_types__WEBPACK_IMPORTED_MODULE_1__.isStringLiteral(x) ? x.value : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.reject)("Arguments of [getCached] MUST be strings"));
|
|
70418
|
+
if (extractedArgs.length != 2) {
|
|
70419
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.reject)("[getCached] MUST have 2 arguments!");
|
|
70420
|
+
}
|
|
70421
|
+
const path = (_extractedArgs$ = extractedArgs[0]) !== null && _extractedArgs$ !== void 0 ? _extractedArgs$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.reject)();
|
|
70422
|
+
const fieldName = (_extractedArgs$2 = extractedArgs[1]) !== null && _extractedArgs$2 !== void 0 ? _extractedArgs$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.reject)();
|
|
70423
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.makeStringValueReference)((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createAbsolute)(path), (0,_Engine_src_Engine_Core_CoreTypes__WEBPACK_IMPORTED_MODULE_5__.ensureIsKnownViewModelFieldName)(fieldName));
|
|
70424
|
+
}
|
|
70425
|
+
throw new JsToFlangConvertError("Unknown call to model!");
|
|
70426
|
+
}
|
|
70094
70427
|
convertMemberExpression(node) {
|
|
70095
70428
|
const obj = node.object;
|
|
70096
|
-
const
|
|
70097
|
-
if (
|
|
70429
|
+
const isRequisitesCall = _babel_types__WEBPACK_IMPORTED_MODULE_1__.isMemberExpression(obj) && _babel_types__WEBPACK_IMPORTED_MODULE_1__.isThisExpression(obj.object) && _babel_types__WEBPACK_IMPORTED_MODULE_1__.isIdentifier(obj.property) && obj.property.name === "requisites";
|
|
70430
|
+
if (isRequisitesCall) {
|
|
70098
70431
|
if (_babel_types__WEBPACK_IMPORTED_MODULE_1__.isStringLiteral(node.property)) {
|
|
70099
|
-
return new
|
|
70432
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.GetExternalInfoExpression(node.property.value.endsWith(".value") ? node.property.value : `${node.property.value}.value`);
|
|
70100
70433
|
}
|
|
70101
70434
|
throw new JsToFlangConvertError("Unsuported call to requisites!");
|
|
70102
70435
|
}
|
|
@@ -70127,8 +70460,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70127
70460
|
/* harmony import */ var _Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/BuildIterationSequence */ "./Common/ModelPath/BuildIterationSequence.ts");
|
|
70128
70461
|
/* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
|
|
70129
70462
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
70130
|
-
/* harmony import */ var
|
|
70131
|
-
/* harmony import */ var
|
|
70463
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
70464
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
70465
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
70466
|
+
|
|
70132
70467
|
|
|
70133
70468
|
|
|
70134
70469
|
|
|
@@ -70139,14 +70474,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70139
70474
|
|
|
70140
70475
|
|
|
70141
70476
|
class FormulaExpressionToFlangExpressionConverter {
|
|
70142
|
-
constructor(adjustPathMultiplicityFunc) {
|
|
70477
|
+
constructor(adjustPathMultiplicityFunc, options) {
|
|
70143
70478
|
this.adjustPathMultiplicity = void 0;
|
|
70479
|
+
this.options = void 0;
|
|
70480
|
+
this.options = options;
|
|
70144
70481
|
this.adjustPathMultiplicity = adjustPathMultiplicityFunc;
|
|
70145
70482
|
}
|
|
70146
70483
|
compileExpressionToFlangExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70147
70484
|
const resultExpr = this.compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule);
|
|
70148
70485
|
// Если формула это только прямое обращение к значене, то трактовать его как строку
|
|
70149
|
-
if (resultExpr instanceof
|
|
70486
|
+
if (resultExpr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && resultExpr.targetType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal && resultExpr.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70150
70487
|
return resultExpr.targetExpression;
|
|
70151
70488
|
}
|
|
70152
70489
|
return resultExpr;
|
|
@@ -70163,24 +70500,24 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70163
70500
|
return this.compiledArgumentExpression(prefix, target, expression.select, "decimal", addPrecalculationRule);
|
|
70164
70501
|
}
|
|
70165
70502
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAbsExpression) {
|
|
70166
|
-
return new
|
|
70503
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AbsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70167
70504
|
}
|
|
70168
70505
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaXAbsExpression) {
|
|
70169
|
-
const expr = (0,
|
|
70170
|
-
return new
|
|
70506
|
+
const expr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
|
|
70507
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LtExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(expr), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AbsExpression(expr));
|
|
70171
70508
|
}
|
|
70172
70509
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaRoundExpression) {
|
|
70173
|
-
return new
|
|
70510
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.RoundExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IntegerLiteralExpression(expression.fractionalDigits));
|
|
70174
70511
|
}
|
|
70175
70512
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFloorExpression) {
|
|
70176
|
-
return new
|
|
70513
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.FloorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70177
70514
|
}
|
|
70178
70515
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaChooseExpression) {
|
|
70179
70516
|
const condExpr = this.compileExpressionToFlangExpressionInternal(expression.ifNode.condition, prefix, target, addPrecalculationRule);
|
|
70180
70517
|
const thenExpr = this.compileExpressionToFlangExpressionInternal(expression.thenNode.expression, prefix, target, addPrecalculationRule);
|
|
70181
70518
|
const elseExpr = this.compileExpressionToFlangExpressionInternal(expression.elseNode.expression, prefix, target, addPrecalculationRule);
|
|
70182
|
-
const castToStringRequired = thenExpr.getType() ===
|
|
70183
|
-
return new
|
|
70519
|
+
const castToStringRequired = thenExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string || elseExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string;
|
|
70520
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(condExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(thenExpr) : thenExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(elseExpr) : elseExpr);
|
|
70184
70521
|
}
|
|
70185
70522
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMultiplyExpression) {
|
|
70186
70523
|
return this.compileMultiplyExpression(expression, prefix, target, addPrecalculationRule);
|
|
@@ -70192,14 +70529,14 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70192
70529
|
return this.compileAndExpression(expression, prefix, target, addPrecalculationRule);
|
|
70193
70530
|
}
|
|
70194
70531
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNotExpression) {
|
|
70195
|
-
return new
|
|
70532
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NegateUnaryExpression(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
|
|
70196
70533
|
}
|
|
70197
70534
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaConstExpression) {
|
|
70198
70535
|
switch (expression.type) {
|
|
70199
70536
|
case "string":
|
|
70200
|
-
return new
|
|
70537
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(expression.value);
|
|
70201
70538
|
case "decimal":
|
|
70202
|
-
return new
|
|
70539
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.value);
|
|
70203
70540
|
default:
|
|
70204
70541
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.NotSupportedError("Unknown constant type!");
|
|
70205
70542
|
}
|
|
@@ -70208,35 +70545,35 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70208
70545
|
return this.compileDivisionExpression(expression, prefix, target, addPrecalculationRule);
|
|
70209
70546
|
}
|
|
70210
70547
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMinusExpression) {
|
|
70211
|
-
return new
|
|
70548
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70212
70549
|
}
|
|
70213
70550
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGtExpression) {
|
|
70214
70551
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70215
70552
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70216
70553
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70217
70554
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70218
|
-
return new
|
|
70555
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GtExpression(left, right);
|
|
70219
70556
|
}
|
|
70220
70557
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLtExpression) {
|
|
70221
70558
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70222
70559
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70223
70560
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70224
70561
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70225
|
-
return new
|
|
70562
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LtExpression(left, right);
|
|
70226
70563
|
}
|
|
70227
70564
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGeExpression) {
|
|
70228
70565
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70229
70566
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70230
70567
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70231
70568
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70232
|
-
return new
|
|
70569
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GeExpression(left, right);
|
|
70233
70570
|
}
|
|
70234
70571
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLeExpression) {
|
|
70235
70572
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70236
70573
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70237
70574
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70238
70575
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70239
|
-
return new
|
|
70576
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LeExpression(left, right);
|
|
70240
70577
|
}
|
|
70241
70578
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaEqExpression) {
|
|
70242
70579
|
return this.compileEqExpression(prefix, target, expression, addPrecalculationRule);
|
|
@@ -70246,135 +70583,118 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70246
70583
|
// TODO: тут необходимо учесть, что exists может смотреть на множественность
|
|
70247
70584
|
// TODO: реализовать в рамках задачи https://yt.skbkontur.ru/issue/FS-7385
|
|
70248
70585
|
/* eslint-enable no-warning-comments */
|
|
70249
|
-
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70250
|
-
return new
|
|
70586
|
+
const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.extractValueReferenceFromCast)(this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule));
|
|
70587
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ExistsExpression(arg);
|
|
70251
70588
|
}
|
|
70252
70589
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaWhenExpression) {
|
|
70253
70590
|
const condition = this.compileExpressionToFlangExpressionInternal(expression.expressions[0], prefix, target, addPrecalculationRule);
|
|
70254
70591
|
const thenExpression = this.compileExpressionToFlangExpressionInternal(expression.expressions[1], prefix, target, addPrecalculationRule);
|
|
70255
|
-
return new
|
|
70592
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(condition, thenExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IntegerLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IntegerLiteralExpression(1)));
|
|
70256
70593
|
}
|
|
70257
70594
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaRegexMatchExpression) {
|
|
70258
70595
|
const arg = this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule);
|
|
70259
|
-
const correctedArg = (0,
|
|
70260
|
-
return new
|
|
70596
|
+
const correctedArg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.tryExtractValueReferenceAsStringFromDecimal)(arg);
|
|
70597
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.RegexMatchExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(correctedArg), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(expression.pattern));
|
|
70261
70598
|
}
|
|
70262
70599
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaCountExpression) {
|
|
70263
|
-
return (0,
|
|
70600
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule, "Count"), 0);
|
|
70264
70601
|
}
|
|
70265
70602
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLengthExpression) {
|
|
70266
|
-
return new
|
|
70603
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule)));
|
|
70267
70604
|
}
|
|
70268
70605
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaConcatExpression) {
|
|
70269
70606
|
return this.compileConcatExpression(expression, prefix, target, addPrecalculationRule);
|
|
70270
70607
|
}
|
|
70271
70608
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaSubstringExpression) {
|
|
70272
70609
|
const arg = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70273
|
-
const argAsString = (0,
|
|
70274
|
-
return new
|
|
70610
|
+
const argAsString = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg, arg.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal ? "G29" : undefined);
|
|
70611
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SubstringExpression(argAsString, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.start), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.length));
|
|
70275
70612
|
}
|
|
70276
70613
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNewLineExpression) {
|
|
70277
|
-
return new
|
|
70614
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("\r\n");
|
|
70278
70615
|
}
|
|
70279
70616
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNoDepsNode) {
|
|
70280
70617
|
const noDepsExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70281
|
-
return
|
|
70618
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)(noDepsExpression);
|
|
70282
70619
|
}
|
|
70283
70620
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
|
|
70284
|
-
return new
|
|
70621
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DateNowExpression();
|
|
70285
70622
|
}
|
|
70286
70623
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDaysInMonthExpression) {
|
|
70287
|
-
return new
|
|
70624
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetDaysInMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70288
70625
|
}
|
|
70289
70626
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDayExpression) {
|
|
70290
|
-
return new
|
|
70627
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetDayExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70291
70628
|
}
|
|
70292
70629
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetMonthExpression) {
|
|
70293
|
-
return new
|
|
70630
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70294
70631
|
}
|
|
70295
70632
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetYearExpression) {
|
|
70296
|
-
return new
|
|
70633
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetYearExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70297
70634
|
}
|
|
70298
70635
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsDateExpression) {
|
|
70299
|
-
return new
|
|
70636
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsDateExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70300
70637
|
}
|
|
70301
70638
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInMonthsExpression) {
|
|
70302
|
-
const expressions = expression.arguments.map(x => (0,
|
|
70303
|
-
return new
|
|
70639
|
+
const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
|
|
70640
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DifferenceInMonthsExpression(expressions);
|
|
70304
70641
|
}
|
|
70305
70642
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInDaysExpression) {
|
|
70306
|
-
const expressions = expression.arguments.map(x => (0,
|
|
70307
|
-
return new
|
|
70643
|
+
const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
|
|
70644
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DifferenceInDaysExpression(expressions);
|
|
70308
70645
|
}
|
|
70309
70646
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddDaysExpression) {
|
|
70310
|
-
return new
|
|
70647
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddDaysExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.amount));
|
|
70311
70648
|
}
|
|
70312
70649
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddMonthsExpression) {
|
|
70313
|
-
return new
|
|
70650
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddMonthsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.amount));
|
|
70314
70651
|
}
|
|
70315
70652
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddYearsExpression) {
|
|
70316
|
-
return new
|
|
70653
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddYearsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.amount));
|
|
70317
70654
|
}
|
|
70318
70655
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateToStringExpression) {
|
|
70319
70656
|
var _expression$format;
|
|
70320
|
-
return new
|
|
70657
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DateToStringExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression((_expression$format = expression.format) !== null && _expression$format !== void 0 ? _expression$format : "dd.MM.yyyy"));
|
|
70321
70658
|
}
|
|
70322
70659
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression) {
|
|
70323
|
-
return new
|
|
70660
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dateTime);
|
|
70324
70661
|
}
|
|
70325
70662
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsSnilsExpression) {
|
|
70326
70663
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70327
|
-
return new
|
|
70664
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsSnilsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70328
70665
|
}
|
|
70329
70666
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsRegNumSfrExpression) {
|
|
70330
70667
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70331
|
-
return new
|
|
70668
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsRegNumSfrExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70332
70669
|
}
|
|
70333
70670
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsInnExpression) {
|
|
70334
70671
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70335
|
-
return new
|
|
70672
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsInnExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70336
70673
|
}
|
|
70337
70674
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidMirCardNumberExpression) {
|
|
70338
70675
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70339
|
-
return new
|
|
70676
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsValidMirCardNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70340
70677
|
}
|
|
70341
70678
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArrayExpression) {
|
|
70342
70679
|
const items = expression.items.map(arg => this.compileEnumerationItem(arg, prefix, target, addPrecalculationRule));
|
|
70343
|
-
return new
|
|
70680
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArrayExpression(items);
|
|
70344
70681
|
}
|
|
70345
70682
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFirstOrDefaultExpression) {
|
|
70346
70683
|
const firstOrDefaultExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70347
|
-
return new
|
|
70684
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.FirstOrDefaultExpression(firstOrDefaultExpression);
|
|
70348
70685
|
}
|
|
70349
70686
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaHashSetExpression) {
|
|
70350
|
-
|
|
70351
|
-
const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, expression.expression.select);
|
|
70352
|
-
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
|
|
70353
|
-
const diffSelectPath = splitInfo.differentPath;
|
|
70354
|
-
const hasMultiplicity = diffSelectPath.getIterationRank() > 0;
|
|
70355
|
-
if (hasMultiplicity) {
|
|
70356
|
-
const sourceKeyParts = adjustedSelectPath.getPathPartsAsArray();
|
|
70357
|
-
const firstPart = splitInfo.matchedPath.toCurrentIteration();
|
|
70358
|
-
const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
|
|
70359
|
-
const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
|
|
70360
|
-
const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
70361
|
-
const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
|
|
70362
|
-
const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
|
|
70363
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.hashSet, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.hashSet)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AddArrayExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.HashSetExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration(), "value")))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.HashSetExpression());
|
|
70364
|
-
}
|
|
70365
|
-
}
|
|
70366
|
-
const hashSetExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70367
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.HashSetExpression(hashSetExpression);
|
|
70687
|
+
return this.compileHashSetExpression(prefix, target, expression, addPrecalculationRule);
|
|
70368
70688
|
}
|
|
70369
70689
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression) {
|
|
70370
70690
|
const filterColumn = this.compileExpressionToFlangExpressionInternal(expression.filterColumn.filterColumn, prefix, target, addPrecalculationRule);
|
|
70371
70691
|
const filterKey = this.compileExpressionToFlangExpressionInternal(expression.filterKey.filterKey, prefix, target, addPrecalculationRule);
|
|
70372
|
-
return new
|
|
70692
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetPicklistValuesExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(expression.gId), filterColumn, filterKey, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(expression.resultColumn));
|
|
70373
70693
|
}
|
|
70374
70694
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidAccountNumberExpression) {
|
|
70375
70695
|
const bik = this.compiledArgumentExpression(prefix, target, expression.bik, "string", addPrecalculationRule);
|
|
70376
70696
|
const account = this.compiledArgumentExpression(prefix, target, expression.account, "string", addPrecalculationRule);
|
|
70377
|
-
return new
|
|
70697
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsValidAccountNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(bik), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(account));
|
|
70378
70698
|
}
|
|
70379
70699
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGroupSumExpression) {
|
|
70380
70700
|
return this.compileGroupSumExpression(prefix, target, expression, addPrecalculationRule);
|
|
@@ -70382,18 +70702,30 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70382
70702
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGroupCountExpression) {
|
|
70383
70703
|
return this.compileGroupCountExpression(prefix, target, expression, addPrecalculationRule);
|
|
70384
70704
|
}
|
|
70705
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMakeDictExpression) {
|
|
70706
|
+
return this.compileMakeDictExpression(prefix, target, expression, addPrecalculationRule);
|
|
70707
|
+
}
|
|
70708
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetSumByKeysExpression) {
|
|
70709
|
+
return this.compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule);
|
|
70710
|
+
}
|
|
70385
70711
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaOneOfExpression) {
|
|
70386
|
-
const arg = (0,
|
|
70387
|
-
const items = expression.items.expressions.map(item => (0,
|
|
70388
|
-
return new
|
|
70712
|
+
const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
|
|
70713
|
+
const items = expression.items.expressions.map(item => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(item, prefix, target, addPrecalculationRule)));
|
|
70714
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OneOfExpression(arg, items);
|
|
70389
70715
|
}
|
|
70390
70716
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaHasAutoFlagExpression) {
|
|
70391
|
-
const arg = (0,
|
|
70392
|
-
const
|
|
70393
|
-
|
|
70394
|
-
|
|
70395
|
-
|
|
70396
|
-
|
|
70717
|
+
const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
|
|
70718
|
+
const getValueReferenceExpression = () => {
|
|
70719
|
+
if (arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70720
|
+
return arg;
|
|
70721
|
+
}
|
|
70722
|
+
if (arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && arg.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70723
|
+
return arg.targetExpression;
|
|
70724
|
+
}
|
|
70725
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)("hasAutoFlag supports only Argument expression (ValueReferenceExpression) as parameter.");
|
|
70726
|
+
};
|
|
70727
|
+
const valueRefExpression = getValueReferenceExpression();
|
|
70728
|
+
const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(valueRefExpression.modePath, "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(valueRefExpression.modePath, "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("true")));
|
|
70397
70729
|
return expr;
|
|
70398
70730
|
}
|
|
70399
70731
|
throw new Error(`Unsupported type of node: ${expression.constructor.name}, ${expression.sourceXmlNode.name}`);
|
|
@@ -70402,7 +70734,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70402
70734
|
if (formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression || formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
|
|
70403
70735
|
return flangExpression;
|
|
70404
70736
|
}
|
|
70405
|
-
return (0,
|
|
70737
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(flangExpression);
|
|
70406
70738
|
}
|
|
70407
70739
|
compileEqExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70408
70740
|
const left = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
@@ -70410,12 +70742,145 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70410
70742
|
|
|
70411
70743
|
// Сейчас в АР иногда проверку на decimal значение делаем через [Значение != "Какая-то строка"]
|
|
70412
70744
|
// Поэтому при такой проверке вычитываем поле "Значение" как строку
|
|
70413
|
-
if (left.getType() ===
|
|
70414
|
-
return new
|
|
70745
|
+
if (left.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal && right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string && left instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && left.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70746
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(left.targetExpression), right);
|
|
70747
|
+
}
|
|
70748
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(left), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(right));
|
|
70749
|
+
}
|
|
70750
|
+
compileHashSetExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70751
|
+
if (expression.expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArgumentExpression) {
|
|
70752
|
+
const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, expression.expression.select);
|
|
70753
|
+
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
|
|
70754
|
+
const diffSelectPath = splitInfo.differentPath;
|
|
70755
|
+
const hasMultiplicity = diffSelectPath.getIterationRank() > 0;
|
|
70756
|
+
if (hasMultiplicity) {
|
|
70757
|
+
if (this.options.enableGroupSumAutoConversion) {
|
|
70758
|
+
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.expression.select);
|
|
70759
|
+
const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(1);
|
|
70760
|
+
const dictPathWithField = this.makeDictNameFromKeyAndValue(splitInfo.matchedPath, sourceKeyPath, sourceValueExpression);
|
|
70761
|
+
const dictExpression = this.compileMakeDictExpressionImpl(prefix, dictPathWithField, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70762
|
+
const dictStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(dictPathWithField.path, "value"), dictExpression);
|
|
70763
|
+
addPrecalculationRule(dictStatement);
|
|
70764
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MakeHashSetFromDictExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(dictPathWithField.path.toCurrentIteration(), "value")));
|
|
70765
|
+
} else {
|
|
70766
|
+
const sourceKeyParts = adjustedSelectPath.getPathPartsAsArray();
|
|
70767
|
+
const firstPart = splitInfo.matchedPath.toCurrentIteration();
|
|
70768
|
+
const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
|
|
70769
|
+
const secondPartParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength)).getPathPartsAsArray();
|
|
70770
|
+
const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
70771
|
+
const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
|
|
70772
|
+
const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
|
|
70773
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.hashSet, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.hashSet)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddArrayExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.HashSetExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true))))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.HashSetExpression());
|
|
70774
|
+
}
|
|
70775
|
+
}
|
|
70415
70776
|
}
|
|
70416
|
-
|
|
70777
|
+
const hashSetExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70778
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.HashSetExpression(hashSetExpression);
|
|
70417
70779
|
}
|
|
70418
|
-
|
|
70780
|
+
compileMakeDictExpressionImpl(prefix, target, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70781
|
+
const getOldSourceValueExpression = () => {
|
|
70782
|
+
if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70783
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(sourceValueExpression);
|
|
70784
|
+
}
|
|
70785
|
+
if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && sourceValueExpression.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70786
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(sourceValueExpression.targetExpression), sourceValueExpression.targetType, sourceValueExpression.defaultValue);
|
|
70787
|
+
}
|
|
70788
|
+
if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConstExpression) {
|
|
70789
|
+
return sourceValueExpression;
|
|
70790
|
+
}
|
|
70791
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)(`SourceValueExpression for makeDict must be reference to value or constant.
|
|
70792
|
+
Converted Object: ${JSON.stringify(sourceValueExpression)}`);
|
|
70793
|
+
};
|
|
70794
|
+
const oldSourceValueExpression = getOldSourceValueExpression();
|
|
70795
|
+
const matchedPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
70796
|
+
const firstPart = matchedPaths.matchedPath.toCurrentIteration();
|
|
70797
|
+
const secondPart = matchedPaths.differentPath;
|
|
70798
|
+
const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(firstPart.joinWith(secondPart).getLastListPath());
|
|
70799
|
+
const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70800
|
+
const oldKeys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([(0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value"))], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70801
|
+
const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(sourceValueExpression)), oldKeys, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(oldSourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(sourceValueExpression)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(target.path.toCurrentIteration(), "value"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression()));
|
|
70802
|
+
return reduceExpression;
|
|
70803
|
+
}
|
|
70804
|
+
compileMakeDictExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70805
|
+
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70806
|
+
const sourceValueExpression = this.compileExpressionToFlangExpressionInternal(expression.sourceValueExpression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_7__.AbsoluteModelFieldPath(sourceKeyPath, "value"), addPrecalculationRule);
|
|
70807
|
+
const reduceExpression = this.compileMakeDictExpressionImpl(prefix, target, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70808
|
+
return reduceExpression;
|
|
70809
|
+
}
|
|
70810
|
+
compileArrayOfTargetKeys(prefix, target, targetKeys, addPrecalculationRule) {
|
|
70811
|
+
const deserializedKeys = targetKeys[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression(targetKeys.map(i => {
|
|
70812
|
+
const item = this.compileEnumerationItem(i, prefix, target, addPrecalculationRule);
|
|
70813
|
+
if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConstExpression) {
|
|
70814
|
+
return item;
|
|
70815
|
+
}
|
|
70816
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.extractValueReferenceFromCast)(item);
|
|
70817
|
+
}), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70818
|
+
return deserializedKeys;
|
|
70819
|
+
}
|
|
70820
|
+
compileGetSumByKeysExpressionImpl(prefix, target, dictPath, targetKeys, addPrecalculationRule) {
|
|
70821
|
+
const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(dictPath, "value")), targetKeys);
|
|
70822
|
+
return finalValueExpression;
|
|
70823
|
+
}
|
|
70824
|
+
compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70825
|
+
const dictPath = this.preparePathAndAdjustMultiplicity(prefix, expression.dictPath);
|
|
70826
|
+
const targetKeys = expression.targetKeys;
|
|
70827
|
+
const deserializedKeys = this.compileArrayOfTargetKeys(prefix, target, targetKeys.items, addPrecalculationRule);
|
|
70828
|
+
return this.compileGetSumByKeysExpressionImpl(prefix, target, dictPath, deserializedKeys, addPrecalculationRule);
|
|
70829
|
+
}
|
|
70830
|
+
compileGroupSumExpressionWithPersistentDictionary(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70831
|
+
const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
70832
|
+
const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
|
|
70833
|
+
const firstPart = matchPaths.matchedPath;
|
|
70834
|
+
const firstPartLength = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.count(firstPart.getPathParts());
|
|
70835
|
+
const secondParts = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(sourceKeyParts.slice(firstPartLength));
|
|
70836
|
+
const getIterationPathWithNestedMultiplicity = () => firstPart;
|
|
70837
|
+
const getIterationPathWithoutNestedMultiplicity = () => {
|
|
70838
|
+
const firstPartParts = matchPaths.matchedPath.getPathPartsAsArray();
|
|
70839
|
+
const lastStarIndexSecondPart = firstPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
70840
|
+
return (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(sourceKeyParts.slice(0, lastStarIndexSecondPart)).getParentPath();
|
|
70841
|
+
};
|
|
70842
|
+
const finalIterPath = secondParts.isContainCurrentOrEachIteration() ? getIterationPathWithNestedMultiplicity() : getIterationPathWithoutNestedMultiplicity();
|
|
70843
|
+
if (finalIterPath.isEmpty()) {
|
|
70844
|
+
throw new Error("Error occurred while trying parse path for reduce: " + firstPart.toLegacyPath());
|
|
70845
|
+
}
|
|
70846
|
+
const basePathForDict = finalIterPath;
|
|
70847
|
+
const dictPathWithField = this.makeDictNameFromKeyAndValue(finalIterPath, sourceKeyPath, sourceValueExpression);
|
|
70848
|
+
const basePathForDictPrefix = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(Iterator.from(basePathForDict.getPathParts()).filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken).toArray());
|
|
70849
|
+
const dictExpression = this.compileMakeDictExpressionImpl(basePathForDictPrefix, dictPathWithField, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70850
|
+
const dictStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(dictPathWithField.path, "value"), dictExpression);
|
|
70851
|
+
addPrecalculationRule(dictStatement);
|
|
70852
|
+
const deserializedKeys = this.compileArrayOfTargetKeys(prefix, target, targetKeys, addPrecalculationRule);
|
|
70853
|
+
const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(dictStatement.left.modePath.toCurrentIteration(), dictStatement.left.valueName)), deserializedKeys);
|
|
70854
|
+
return finalValueExpression;
|
|
70855
|
+
}
|
|
70856
|
+
extractNameFromPath(path) {
|
|
70857
|
+
return Iterator.from(path.getPathParts()).filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken).toArray().join("_");
|
|
70858
|
+
}
|
|
70859
|
+
extractNameFromExpression(basePath, expr) {
|
|
70860
|
+
const exprAsValueRef = expr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression ? expr : expr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && expr.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression ? expr.targetExpression : undefined;
|
|
70861
|
+
if (exprAsValueRef != undefined) {
|
|
70862
|
+
return this.extractNameFromPath((0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(basePath, exprAsValueRef.modePath).differentPath);
|
|
70863
|
+
}
|
|
70864
|
+
const exprAsConst = expr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConstExpression ? expr : expr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && expr.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConstExpression ? expr.targetExpression : undefined;
|
|
70865
|
+
if (exprAsConst != undefined) {
|
|
70866
|
+
if (exprAsConst instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression) {
|
|
70867
|
+
return `constant_${exprAsConst.value}`;
|
|
70868
|
+
}
|
|
70869
|
+
if (exprAsConst instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression) {
|
|
70870
|
+
return `constant_${exprAsConst.stringValue}`;
|
|
70871
|
+
}
|
|
70872
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)("Can't convert sourceValueExpression for generated dictionary name: unsupported type of constant!");
|
|
70873
|
+
}
|
|
70874
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)("Can't convert sourceValueExpression for generated dictionary name!");
|
|
70875
|
+
}
|
|
70876
|
+
makeDictNameFromKeyAndValue(basePathForDict, sourceKeyPath, sourceValueExpression) {
|
|
70877
|
+
const keyDiffPathText = this.extractNameFromPath((0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(basePathForDict, sourceKeyPath).differentPath);
|
|
70878
|
+
const valueDiffPathText = this.extractNameFromExpression(basePathForDict, sourceValueExpression);
|
|
70879
|
+
const dictPath = basePathForDict.joinWith(`${keyDiffPathText}_${valueDiffPathText}_generated${_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.dictFieldNameSuffix}`);
|
|
70880
|
+
const dictPathWithField = new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_7__.AbsoluteModelFieldPath(dictPath, "value");
|
|
70881
|
+
return dictPathWithField;
|
|
70882
|
+
}
|
|
70883
|
+
compileGroupSumExpressionWithoutPersistentDictionaries(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70419
70884
|
const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
70420
70885
|
const sourceKeyParts = sourceKeyPath.getPathPartsAsArray();
|
|
70421
70886
|
const firstPart = matchPaths.matchedPath.toCurrentIteration();
|
|
@@ -70436,10 +70901,10 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70436
70901
|
if (finalIterPath.isEmpty()) {
|
|
70437
70902
|
throw new Error("Error occurred while trying parse path for reduce: " + firstPart.toLegacyPath());
|
|
70438
70903
|
}
|
|
70439
|
-
const keys = new
|
|
70440
|
-
const reduceExpression = new
|
|
70441
|
-
const deserializedKeys = targetKeys
|
|
70442
|
-
const finalValueExpression = new
|
|
70904
|
+
const keys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70905
|
+
const reduceExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ReduceCallExpression(finalIterPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AddSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), keys, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(sourceValueExpression))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression());
|
|
70906
|
+
const deserializedKeys = targetKeys[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression(targetKeys.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70907
|
+
const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetSumByKeysExpression(reduceExpression, deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)());
|
|
70443
70908
|
return finalValueExpression;
|
|
70444
70909
|
}
|
|
70445
70910
|
compileEnumerationItem(expression, prefix, target, addPrecalculationRule) {
|
|
@@ -70448,62 +70913,80 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70448
70913
|
}
|
|
70449
70914
|
return this.compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule);
|
|
70450
70915
|
}
|
|
70916
|
+
compileGroupSumExpressionWithCustomValueExpression(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70917
|
+
return this.options.enableGroupSumAutoConversion ? this.compileGroupSumExpressionWithPersistentDictionary(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) : this.compileGroupSumExpressionWithoutPersistentDictionaries(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70918
|
+
}
|
|
70451
70919
|
compileGroupSumExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70452
70920
|
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70453
70921
|
const sourceValuePath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceValuePath);
|
|
70454
|
-
const sourceValueExpression =
|
|
70455
|
-
return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70922
|
+
const sourceValueExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(sourceValuePath.toCurrentIteration(), "value");
|
|
70923
|
+
return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys.items, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70456
70924
|
}
|
|
70457
70925
|
compileGroupCountExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70458
70926
|
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70459
|
-
const sourceValueExpression = new
|
|
70460
|
-
return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70927
|
+
const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(1);
|
|
70928
|
+
return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys.items, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70929
|
+
}
|
|
70930
|
+
convertExpressionTypePropertyToFLangType(type) {
|
|
70931
|
+
switch (type) {
|
|
70932
|
+
case "string":
|
|
70933
|
+
return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string;
|
|
70934
|
+
case "array":
|
|
70935
|
+
return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.array;
|
|
70936
|
+
case "decimal":
|
|
70937
|
+
return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal;
|
|
70938
|
+
case "dict":
|
|
70939
|
+
return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dict;
|
|
70940
|
+
default:
|
|
70941
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)(`Unknown ExpressionTypeProperty [${type}]`);
|
|
70942
|
+
}
|
|
70461
70943
|
}
|
|
70462
70944
|
compiledArgumentExpression(prefix, target, selectPath, selectType, addPrecalculationRule, aggregationFunction = "Sum") {
|
|
70945
|
+
const builtInType = this.convertExpressionTypePropertyToFLangType(selectType !== null && selectType !== void 0 ? selectType : "string");
|
|
70463
70946
|
const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath);
|
|
70464
70947
|
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
|
|
70465
70948
|
const baseSelectPath = splitInfo.matchedPath;
|
|
70466
70949
|
if (!splitInfo.differentPath.isContainIteration()) {
|
|
70467
|
-
const valueRefExpression = new
|
|
70468
|
-
const finalValue = splitInfo.differentPath.isEmpty() && target.field === "value" ?
|
|
70469
|
-
return
|
|
70950
|
+
const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
|
|
70951
|
+
const finalValue = splitInfo.differentPath.isEmpty() && target.field === "value" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)(valueRefExpression) : valueRefExpression;
|
|
70952
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandIfNeed)(finalValue, builtInType);
|
|
70470
70953
|
} else {
|
|
70471
70954
|
var _countValueExpression;
|
|
70472
|
-
let resultValueExpression =
|
|
70955
|
+
let resultValueExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "value");
|
|
70473
70956
|
let countValueExpression = undefined;
|
|
70474
70957
|
const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__.buildIterationSequence)(splitInfo.differentPath))];
|
|
70475
70958
|
for (const iterationEntry of iterationEntries) {
|
|
70476
70959
|
const iterablePath = baseSelectPath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(iterationEntry.iterable.getPathPartsAsArray()));
|
|
70477
70960
|
const suffixWithoutMultiple = iterationEntry.suffix.getPathPartsAsArray().filter(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken(x));
|
|
70478
|
-
const nextResultValueExpression = new
|
|
70479
|
-
const currentSumExpression =
|
|
70480
|
-
const countResultValueExpression = new
|
|
70481
|
-
const currenCountExpression =
|
|
70482
|
-
const sumReduceExpr = new
|
|
70483
|
-
addPrecalculationRule(new
|
|
70484
|
-
const countReduceExpr = new
|
|
70485
|
-
addPrecalculationRule(new
|
|
70961
|
+
const nextResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").normalize(), "value");
|
|
70962
|
+
const currentSumExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").toCurrentIteration().normalize(), "value");
|
|
70963
|
+
const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").normalize(), "value");
|
|
70964
|
+
const currenCountExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").toCurrentIteration().normalize(), "value");
|
|
70965
|
+
const sumReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(resultValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(nextResultValueExpression.modePath.toCurrentIteration(), nextResultValueExpression.valueName))), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())));
|
|
70966
|
+
addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(sumReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(""))));
|
|
70967
|
+
const countReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(countValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IncrementalFlagExpression(), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)(countValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(countResultValueExpression.modePath.toCurrentIteration(), countResultValueExpression.valueName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)));
|
|
70968
|
+
addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(countReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("G29"))));
|
|
70486
70969
|
resultValueExpression = currentSumExpression;
|
|
70487
70970
|
countValueExpression = currenCountExpression;
|
|
70488
70971
|
}
|
|
70489
70972
|
const finalValue = aggregationFunction === "Sum" ? resultValueExpression : (_countValueExpression = countValueExpression) !== null && _countValueExpression !== void 0 ? _countValueExpression : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
|
|
70490
|
-
return
|
|
70973
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandIfNeed)(finalValue, builtInType);
|
|
70491
70974
|
}
|
|
70492
70975
|
}
|
|
70493
70976
|
compileSumExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70494
70977
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70495
|
-
const currExpr = new
|
|
70496
|
-
return acc != undefined ? new
|
|
70978
|
+
const currExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0));
|
|
70979
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SumBinaryExpression(acc, currExpr) : currExpr;
|
|
70497
70980
|
}, undefined);
|
|
70498
70981
|
if (result == undefined) {
|
|
70499
70982
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
70500
70983
|
}
|
|
70501
|
-
return (0,
|
|
70984
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
70502
70985
|
}
|
|
70503
70986
|
compileConcatExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70504
70987
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70505
|
-
const currExpr = (0,
|
|
70506
|
-
return acc != undefined ? new
|
|
70988
|
+
const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule));
|
|
70989
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConcatStringsExpression(acc, currExpr) : currExpr;
|
|
70507
70990
|
}, undefined);
|
|
70508
70991
|
if (result == undefined) {
|
|
70509
70992
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
@@ -70513,7 +70996,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70513
70996
|
compileOrExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70514
70997
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70515
70998
|
const currExpr = this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule);
|
|
70516
|
-
return acc != undefined ? new
|
|
70999
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OrBinaryExpression(acc, currExpr) : currExpr;
|
|
70517
71000
|
}, undefined);
|
|
70518
71001
|
if (result == undefined) {
|
|
70519
71002
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
@@ -70523,7 +71006,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70523
71006
|
compileAndExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70524
71007
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70525
71008
|
const currExpr = this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule);
|
|
70526
|
-
return acc != undefined ? new
|
|
71009
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AndBinaryExpression(acc, currExpr) : currExpr;
|
|
70527
71010
|
}, undefined);
|
|
70528
71011
|
if (result == undefined) {
|
|
70529
71012
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
@@ -70532,24 +71015,24 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70532
71015
|
}
|
|
70533
71016
|
compileMultiplyExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70534
71017
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70535
|
-
const expr = new
|
|
70536
|
-
return acc != undefined ? new
|
|
71018
|
+
const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0));
|
|
71019
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MultiplyBinaryExpression(acc, expr) : expr;
|
|
70537
71020
|
}, undefined);
|
|
70538
71021
|
if (result == undefined) {
|
|
70539
71022
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
70540
71023
|
}
|
|
70541
|
-
return (0,
|
|
71024
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
70542
71025
|
}
|
|
70543
71026
|
compileDivisionExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70544
|
-
const makeDivision = (numerator, denominator) => new
|
|
71027
|
+
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());
|
|
70545
71028
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70546
|
-
const currExpr = (0,
|
|
71029
|
+
const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule), 0);
|
|
70547
71030
|
return acc != undefined ? makeDivision(acc, currExpr) : currExpr;
|
|
70548
71031
|
}, undefined);
|
|
70549
71032
|
if (result == undefined) {
|
|
70550
71033
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
70551
71034
|
}
|
|
70552
|
-
return (0,
|
|
71035
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
70553
71036
|
}
|
|
70554
71037
|
preparePathAndAdjustMultiplicity(prefix, path) {
|
|
70555
71038
|
const resultPath = this.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path.replace(/\@/g, ""), "auto")).normalize());
|
|
@@ -70659,9 +71142,10 @@ class AutoValueForValueByDefaultNormalizationRuleGenerator {
|
|
|
70659
71142
|
const createValueRuleFromAutoValueRule = autoValueRule => {
|
|
70660
71143
|
var _formulaRulesMap$get$, _formulaRulesMap$get;
|
|
70661
71144
|
const valueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath, "value");
|
|
71145
|
+
const autoValueExpressionType = autoValueRule.right.getType();
|
|
70662
71146
|
const valueRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value");
|
|
70663
71147
|
const autoFlagRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "autoFlag");
|
|
70664
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(
|
|
71148
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(valueRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.makeNoDeps)(autoFlagRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())), autoValueRule.right, formulaRulesMap.has(valueRef) ? (_formulaRulesMap$get$ = (_formulaRulesMap$get = formulaRulesMap.get(valueRef)) === null || _formulaRulesMap$get === void 0 ? void 0 : _formulaRulesMap$get.right) !== null && _formulaRulesMap$get$ !== void 0 ? _formulaRulesMap$get$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)("Unexpected error") : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value"), autoValueExpressionType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression(this.dataDeclarationHelper.getDefaultValue(autoValueRule.left.modePath)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullLiteralExpression())));
|
|
70665
71149
|
};
|
|
70666
71150
|
const updatedFormulaRules = Iterator.from(formulaFLangRules).flatMap(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && x.left.valueName === "autoValue" ? [x, createValueRuleFromAutoValueRule(x)] : [x]);
|
|
70667
71151
|
|
|
@@ -70708,8 +71192,8 @@ class FormulaAndInitOnlyNormalizationRuleGenerator {
|
|
|
70708
71192
|
this.optionalSectionRuleBuilder = optionalSectionRuleBuilder;
|
|
70709
71193
|
}
|
|
70710
71194
|
generateRules() {
|
|
70711
|
-
const createValueRuleFromAutoValueRule = autoValueRule => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression(
|
|
70712
|
-
const createValueRuleEmptyRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "value"),
|
|
71195
|
+
const createValueRuleFromAutoValueRule = autoValueRule => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), autoValueRule.right));
|
|
71196
|
+
const createValueRuleEmptyRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "value"), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), "value")));
|
|
70713
71197
|
const createDisableValueAutoInitRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "disableValueAutoInit"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("true"));
|
|
70714
71198
|
const ignoredValueSetRuleMapper = x => {
|
|
70715
71199
|
var _this$formSchemaRng$g;
|
|
@@ -70756,13 +71240,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70756
71240
|
* 2) переводит autoFlag в true
|
|
70757
71241
|
*/
|
|
70758
71242
|
class FormulaOnlyNormalizationRuleGenerator {
|
|
70759
|
-
constructor(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder) {
|
|
71243
|
+
constructor(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder, options) {
|
|
70760
71244
|
this.dataDeclarationHelper = void 0;
|
|
70761
71245
|
this.formSchemaRng = void 0;
|
|
70762
71246
|
this.formulas = void 0;
|
|
71247
|
+
this.options = void 0;
|
|
70763
71248
|
this.formulaExprConverter = void 0;
|
|
70764
71249
|
this.optionalSectionRuleBuilder = void 0;
|
|
70765
71250
|
this.validationRulesBuilder = void 0;
|
|
71251
|
+
this.options = options;
|
|
70766
71252
|
this.optionalSectionRuleBuilder = optionalSectionRuleBuilder;
|
|
70767
71253
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
70768
71254
|
this.formSchemaRng = formSchemaRng;
|
|
@@ -70789,10 +71275,14 @@ class FormulaOnlyNormalizationRuleGenerator {
|
|
|
70789
71275
|
const precalculationRules = [];
|
|
70790
71276
|
const defaultValue = this.dataDeclarationHelper.getDefaultValue(fullTarget.toLegacyPath());
|
|
70791
71277
|
const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
|
|
71278
|
+
const getFormulaExpression = field => {
|
|
71279
|
+
const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), this.options.enableTypedFlang, "G29");
|
|
71280
|
+
const resultType = result.getType();
|
|
71281
|
+
return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue)) : result;
|
|
71282
|
+
};
|
|
70792
71283
|
const result = [];
|
|
70793
|
-
const getFormulaExpression = field => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue));
|
|
70794
71284
|
if (isTargetAutoField) {
|
|
70795
|
-
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string)));
|
|
71285
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value")), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue"))), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string)));
|
|
70796
71286
|
} else {
|
|
70797
71287
|
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
|
|
70798
71288
|
}
|
|
@@ -70819,6 +71309,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70819
71309
|
/* harmony export */ });
|
|
70820
71310
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
70821
71311
|
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
71312
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
71313
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
71314
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
71315
|
+
|
|
71316
|
+
|
|
71317
|
+
|
|
70822
71318
|
|
|
70823
71319
|
|
|
70824
71320
|
|
|
@@ -70851,8 +71347,16 @@ class NormalizationRulesGenerator {
|
|
|
70851
71347
|
const dataDeclarationRules = this.sugarRulesBuilder.buildRules();
|
|
70852
71348
|
|
|
70853
71349
|
// Порядок важен, т.к. потом делаем distinctBy.
|
|
70854
|
-
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(rule =>
|
|
70855
|
-
|
|
71350
|
+
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(rule => {
|
|
71351
|
+
(0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.ensureCorrectFieldNameByExpressionType)(rule);
|
|
71352
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.wrapWithDisableValueAutoInitFlagCheckIfRequired)(this.formSchemaRng, rule);
|
|
71353
|
+
}).toArray();
|
|
71354
|
+
const dictionaryRules = Iterator.from(allRules).filter(rule => rule instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && (rule.right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || rule.right instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && rule.right.targetExpression.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict || rule.right instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NullCoalesceExpression && rule.right.expression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression && rule.right.expression.targetExpression.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dict)).map(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement ? new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(x.left.modePath, x.left.valueName) : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.isNotNullOrUndefined).toArray();
|
|
71355
|
+
const content = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRulesBuilder);
|
|
71356
|
+
return {
|
|
71357
|
+
content: content,
|
|
71358
|
+
serverOnlyPaths: dictionaryRules
|
|
71359
|
+
};
|
|
70856
71360
|
}
|
|
70857
71361
|
}
|
|
70858
71362
|
|
|
@@ -70906,12 +71410,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70906
71410
|
|
|
70907
71411
|
|
|
70908
71412
|
class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.BaseRuleBuilder {
|
|
70909
|
-
constructor(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter) {
|
|
71413
|
+
constructor(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter, options) {
|
|
70910
71414
|
super();
|
|
70911
71415
|
this.formSchemaRng = void 0;
|
|
70912
71416
|
this.formulas = void 0;
|
|
71417
|
+
this.options = void 0;
|
|
70913
71418
|
this.formulaExprConverter = void 0;
|
|
70914
71419
|
this.dataDeclarationHelper = void 0;
|
|
71420
|
+
this.options = options;
|
|
70915
71421
|
this.formulaExprConverter = formulaExprConverter;
|
|
70916
71422
|
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
70917
71423
|
this.formulas = formulas;
|
|
@@ -70933,7 +71439,11 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
|
|
|
70933
71439
|
const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
|
|
70934
71440
|
const isDisabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(fullTarget.toAbsolute());
|
|
70935
71441
|
const isDecimal = ((_this$formSchemaRng$g = this.formSchemaRng.getTypeNodeByPath(fullTarget.toAbsolute())) === null || _this$formSchemaRng$g === void 0 ? void 0 : _this$formSchemaRng$g.baseType) === "decimal";
|
|
70936
|
-
const getFormulaExpression = targetField =>
|
|
71442
|
+
const getFormulaExpression = targetField => {
|
|
71443
|
+
const result = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castFinalExpressionToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), this.options.enableTypedFlang, "G29");
|
|
71444
|
+
const resultType = result.getType();
|
|
71445
|
+
return resultType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)(result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)) : result;
|
|
71446
|
+
};
|
|
70937
71447
|
const valueRule = isTargetAutoField ? isDisabled ? this.createValueRuleForDisabledAutoField(fullTarget, getFormulaExpression) : this.createValueRuleForAutoField(fullTarget, defaultValue, getFormulaExpression) : this.createRegularValueRule(fullTarget, getFormulaExpression);
|
|
70938
71448
|
const autoValueRule = isTargetAutoField ? this.createAutoValueRule(fullTarget, getFormulaExpression) : undefined;
|
|
70939
71449
|
const autoFlagRule = isTargetAutoField ? this.createAutoFlagRule(fullTarget, isDecimal) : undefined;
|
|
@@ -70947,13 +71457,13 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
|
|
|
70947
71457
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value"));
|
|
70948
71458
|
}
|
|
70949
71459
|
createAutoFlagRule(fullTarget, isDecimal) {
|
|
70950
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
71460
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.decimalWrapper)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "value"), isDecimal), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.decimalWrapper)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoValue"), isDecimal)), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"))));
|
|
70951
71461
|
}
|
|
70952
71462
|
createValueRuleForDisabledAutoField(fullTarget, getFormulaExpression) {
|
|
70953
71463
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value"));
|
|
70954
71464
|
}
|
|
70955
71465
|
createValueRuleForAutoField(fullTarget, defaultValue, getFormulaExpression) {
|
|
70956
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
71466
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), getFormulaExpression("value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))));
|
|
70957
71467
|
}
|
|
70958
71468
|
adjustPathMultiplicity(path) {
|
|
70959
71469
|
return (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_2__.adjustPathMultiplicityComplex)(path, this.formSchemaRng, this.dataDeclarationHelper);
|
|
@@ -71012,12 +71522,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71012
71522
|
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
71013
71523
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
71014
71524
|
/* harmony import */ var _markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../markupGenerator/getRootPath */ "./Generator/src/generators/markupGenerator/getRootPath.ts");
|
|
71015
|
-
/* harmony import */ var
|
|
71525
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
71526
|
+
/* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
|
|
71527
|
+
|
|
71016
71528
|
|
|
71017
71529
|
|
|
71018
71530
|
|
|
71019
71531
|
|
|
71020
|
-
class LazyLoadingRulesBuilder extends
|
|
71532
|
+
class LazyLoadingRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__.BaseRuleBuilder {
|
|
71021
71533
|
constructor(sugarRoot, lazyLoadingDeclaration) {
|
|
71022
71534
|
super();
|
|
71023
71535
|
this.sugarRoot = void 0;
|
|
@@ -71033,11 +71545,22 @@ class LazyLoadingRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_
|
|
|
71033
71545
|
const thresholdEntry = Object.entries(this.lazyLoadingDeclaration).find(x => x[1].thresholdValue != undefined);
|
|
71034
71546
|
if (thresholdEntry != undefined) {
|
|
71035
71547
|
var _thresholdEntry$1$thr, _thresholdEntry$;
|
|
71036
|
-
const thresholdEntryPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(`/${thresholdEntry[0]}`, true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
71548
|
+
const thresholdEntryPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(`/${thresholdEntry[0]}`, true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).trimLastStarIfLastToken();
|
|
71037
71549
|
const thresholdValue = (_thresholdEntry$1$thr = (_thresholdEntry$ = thresholdEntry[1]) === null || _thresholdEntry$ === void 0 ? void 0 : _thresholdEntry$.thresholdValue) !== null && _thresholdEntry$1$thr !== void 0 ? _thresholdEntry$1$thr : 0;
|
|
71038
71550
|
const lazyLoadingEnabledRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot).joinWith("LazyLoadingEnabled"), "value");
|
|
71039
|
-
const
|
|
71040
|
-
|
|
71551
|
+
const childrenPathReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(thresholdEntryPath.toCurrentIteration(), "children");
|
|
71552
|
+
const getLengthExpression = (useOldValue = false) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ArrayLengthExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DeserializeEnumerationExpression([useOldValue ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeGetOld)(childrenPathReference) : childrenPathReference], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BoolLiteralExpression(true))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(0));
|
|
71553
|
+
if (thresholdEntryPath.isContainIteration()) {
|
|
71554
|
+
const lazyLoadingCounterRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsolute)(formRoot).joinWith("LazyLoadingCounter"), "value");
|
|
71555
|
+
const iterationPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(thresholdEntryPath.getLastListPath());
|
|
71556
|
+
const counterStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(lazyLoadingCounterRef, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToStringIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ReduceCallExpression(iterationPath, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ArgumentReferenceExpression("result"), getLengthExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IncrementalFlagExpression(), getLengthExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)(lazyLoadingCounterRef)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(0)))));
|
|
71557
|
+
yield counterStatement;
|
|
71558
|
+
const lazyFlagStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(lazyLoadingEnabledRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToDecimalIfNeed)(counterStatement.left), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(thresholdValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false")));
|
|
71559
|
+
yield lazyFlagStatement;
|
|
71560
|
+
} else {
|
|
71561
|
+
const statement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(lazyLoadingEnabledRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GeExpression(getLengthExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.DecimalLiteralExpression(thresholdValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false")));
|
|
71562
|
+
yield statement;
|
|
71563
|
+
}
|
|
71041
71564
|
}
|
|
71042
71565
|
}
|
|
71043
71566
|
}
|
|
@@ -71064,7 +71587,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71064
71587
|
/* harmony import */ var _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../Engine/src/Engine/Core/PathUtils/PathUtils */ "./Engine/src/Engine/Core/PathUtils/PathUtils.ts");
|
|
71065
71588
|
/* harmony import */ var _Common_ModelPath_ModelPathHelper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPathHelper */ "./Common/ModelPath/ModelPathHelper.ts");
|
|
71066
71589
|
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
71067
|
-
/* harmony import */ var
|
|
71590
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
71591
|
+
/* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
|
|
71068
71592
|
|
|
71069
71593
|
|
|
71070
71594
|
|
|
@@ -71075,7 +71599,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71075
71599
|
|
|
71076
71600
|
|
|
71077
71601
|
|
|
71078
|
-
|
|
71602
|
+
|
|
71603
|
+
class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_10__.BaseRuleBuilder {
|
|
71079
71604
|
constructor(sugarRoot, dataDeclarationHelper) {
|
|
71080
71605
|
super();
|
|
71081
71606
|
this.sugarRoot = void 0;
|
|
@@ -71161,7 +71686,7 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
71161
71686
|
const targetIsFilledPath = targetOptionalSection.path.joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__.OptionalSectionFilledFieldName);
|
|
71162
71687
|
if (!targetIsFilledPath.isEquals(targetPath)) {
|
|
71163
71688
|
const targetIsFilledValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(targetIsFilledPath.toCurrentIteration(), "value");
|
|
71164
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(rule.left, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.EqExpression(targetIsFilledValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1")), rule.right, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()));
|
|
71689
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(rule.left, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.castOperandToStringIfNeed)(targetIsFilledValueRef), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1")), rule.right, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()));
|
|
71165
71690
|
}
|
|
71166
71691
|
}
|
|
71167
71692
|
return rule;
|
|
@@ -71183,7 +71708,7 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
71183
71708
|
var _pathGroup$, _pathGroup$map$reduce;
|
|
71184
71709
|
const iterationEntry = (_pathGroup$ = pathGroup[0]) === null || _pathGroup$ === void 0 ? void 0 : _pathGroup$.lastIterationEntry;
|
|
71185
71710
|
const pathCheckExpr = (_pathGroup$map$reduce = pathGroup.map(pathInfo => {
|
|
71186
|
-
const pathValueRef =
|
|
71711
|
+
const pathValueRef = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_9__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(pathInfo.path.toCurrentIteration(), "value"));
|
|
71187
71712
|
const checkExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression(pathValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression());
|
|
71188
71713
|
return checkExpression;
|
|
71189
71714
|
}).reduce((acc, current) => acc == undefined ? current : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(acc, current), undefined)) !== null && _pathGroup$map$reduce !== void 0 ? _pathGroup$map$reduce : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.reject)();
|
|
@@ -71337,11 +71862,9 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_1
|
|
|
71337
71862
|
const validationText = next.message.reduce((acc, item) => {
|
|
71338
71863
|
if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression) {
|
|
71339
71864
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(acc, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(item));
|
|
71340
|
-
} else if (item instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression) {
|
|
71341
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(acc, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.JoinExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DeserializeEnumerationExpression([item], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BoolLiteralExpression(true)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(", ")));
|
|
71342
|
-
} else {
|
|
71343
|
-
throw new Error(`Invalid WithDescription ${item.toString()}`);
|
|
71344
71865
|
}
|
|
71866
|
+
const valueReference = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.extractValueReferenceFromCast)(item);
|
|
71867
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(acc, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.JoinExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DeserializeEnumerationExpression([valueReference], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BoolLiteralExpression(true)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(", ")));
|
|
71345
71868
|
}, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(""));
|
|
71346
71869
|
const condition = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NegateUnaryExpression(next.checkExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConcatStringsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`["`), validationText), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`"]`)), current);
|
|
71347
71870
|
return condition;
|
|
@@ -71395,7 +71918,7 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_1
|
|
|
71395
71918
|
}
|
|
71396
71919
|
buildErrorWarningCountReduceRule(iterable, countFieldName, getAllItemsSumExpression) {
|
|
71397
71920
|
const nextErrorCountTarget = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(iterable, countFieldName);
|
|
71398
|
-
const aggregationReduce = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.MinusBinaryExpression(getAllItemsSumExpression(false), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), getAllItemsSumExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0))))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(
|
|
71921
|
+
const aggregationReduce = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.MinusBinaryExpression(getAllItemsSumExpression(false), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), getAllItemsSumExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0))))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(iterable.toCurrentIteration(), countFieldName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0)));
|
|
71399
71922
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(nextErrorCountTarget, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(aggregationReduce, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
|
|
71400
71923
|
}
|
|
71401
71924
|
buildErrorWarningCountSimpleSumRule(iterable, countFieldName, getAllItemsSumExpression) {
|
|
@@ -71403,11 +71926,11 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_1
|
|
|
71403
71926
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(nextErrorCountTarget, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(getAllItemsSumExpression(false), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
|
|
71404
71927
|
}
|
|
71405
71928
|
getErrorWarningCountExpression(path, fieldName, readOldValues) {
|
|
71406
|
-
const valueGetExpression = readOldValues ?
|
|
71929
|
+
const valueGetExpression = readOldValues ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path, fieldName)) : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path, fieldName);
|
|
71407
71930
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IsEqualsBinaryExpression(valueGetExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`[]`)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IsEqualsBinaryExpression(valueGetExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(1));
|
|
71408
71931
|
}
|
|
71409
71932
|
getReadErrorCountValueExpression(path, countFieldName, readOldValues) {
|
|
71410
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(readOldValues ?
|
|
71933
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(readOldValues ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeGetOld)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path.toCurrentIteration(), countFieldName)) : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.makeStringValueReference)(path.toCurrentIteration(), countFieldName), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0));
|
|
71411
71934
|
}
|
|
71412
71935
|
buildChainOfErrorCountRules(path, countFieldName, fieldName) {
|
|
71413
71936
|
const reduceResult = Iterator.from((0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.reverseArray)([...this.splitModelPathIfErrorCountRequired(path)])).flatMap(iterationPath => this.dataDeclarationHelper.isNodeHasChildrenEntry(iterationPath) ? [iterationPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each), iterationPath] : [iterationPath]).reduce((result, iterationPath) => {
|
|
@@ -71865,6 +72388,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71865
72388
|
/* harmony import */ var _ElementProcessors_Helpers_Clue_InfoBlockConverter__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./ElementProcessors/Helpers/Clue/InfoBlockConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/Helpers/Clue/InfoBlockConverter.ts");
|
|
71866
72389
|
/* harmony import */ var _ElementProcessors_ValueEditors_SelectAllCheckbox_SelectAllCheckboxConverter__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./ElementProcessors/ValueEditors/SelectAllCheckbox/SelectAllCheckboxConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectAllCheckbox/SelectAllCheckboxConverter.ts");
|
|
71867
72390
|
/* harmony import */ var _ElementProcessors_FormParts_AttachmentForm_AttachmentFormConverter__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./ElementProcessors/FormParts/AttachmentForm/AttachmentFormConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/AttachmentForm/AttachmentFormConverter.ts");
|
|
72391
|
+
/* harmony import */ var _ElementProcessors_ValueEditors_RelativesComboBox_RelativesComboBoxConverter__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxConverter.ts");
|
|
72392
|
+
|
|
71868
72393
|
|
|
71869
72394
|
|
|
71870
72395
|
|
|
@@ -71985,7 +72510,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71985
72510
|
|
|
71986
72511
|
let convertersFromNodeClassMap;
|
|
71987
72512
|
function buildConvertersFromNodeClassMap() {
|
|
71988
|
-
const converters = [_ElementProcessors_FormParts_AddPageButton_AddPageButtonConverter__WEBPACK_IMPORTED_MODULE_8__.AddPageButtonConverter, _ElementProcessors_MultiControls_AddRowButton_AddRowButtonConverter__WEBPACK_IMPORTED_MODULE_9__.AddRowButtonConverter, _ElementProcessors_FormParts_AttachmentForm_AttachmentFormConverter__WEBPACK_IMPORTED_MODULE_117__.AttachmentFormConverter, _ElementProcessors_Layout_Block_BlockConverter__WEBPACK_IMPORTED_MODULE_10__.BlockConverter, _ElementProcessors_Layout_Minitour_MinitourConverter__WEBPACK_IMPORTED_MODULE_11__.MinitourConverter, _ElementProcessors_Typography_Bold_BoldConverter__WEBPACK_IMPORTED_MODULE_13__.BoldConverter, _ElementProcessors_Layout_Br_BrConverter__WEBPACK_IMPORTED_MODULE_14__.BrConverter, _ElementProcessors_FormParts_Caption_CaptionConverter__WEBPACK_IMPORTED_MODULE_18__.CaptionConverter, _ElementProcessors_ValueEditors_Checkbox_CheckboxConverter__WEBPACK_IMPORTED_MODULE_19__.CheckboxConverter, _ElementProcessors_ControlFlow_Choice_ChoiceConverter__WEBPACK_IMPORTED_MODULE_20__.ChoiceConverter, _ElementProcessors_MultiControls_TableCell_TableCellConverter__WEBPACK_IMPORTED_MODULE_85__.TableCellConverter, _ElementProcessors_ValueEditors_Toggle_ToggleConverter__WEBPACK_IMPORTED_MODULE_88__.ToggleConverter, _ElementProcessors_ValueEditors_Combobox_ComboBoxConverter__WEBPACK_IMPORTED_MODULE_21__.ComboBoxConverter, _ElementProcessors_FormParts_Content_ContentConverter__WEBPACK_IMPORTED_MODULE_22__.ContentConverter, _ElementProcessors_FormParts_Cross_CrossConverter__WEBPACK_IMPORTED_MODULE_23__.CrossConverter, _ElementProcessors_MultiControls_ColgroupButton_ColgroupButtonConverter__WEBPACK_IMPORTED_MODULE_97__.ColgroupButtonConverter, _ElementProcessors_ValueEditors_Date_DateConverter__WEBPACK_IMPORTED_MODULE_24__.DateConverter, _ElementProcessors_FormParts_DefaultContent_DefaultContentConverter__WEBPACK_IMPORTED_MODULE_25__.DefaultContentConverter, _ElementProcessors_ValueEditors_DiadocSuggestComboBox_DiadocSuggestComboBoxConverter__WEBPACK_IMPORTED_MODULE_26__.DiadocSuggestComboBoxConverter, _ElementProcessors_Typography_Entity_EntityConverter__WEBPACK_IMPORTED_MODULE_27__.EntityConverter, _ElementProcessors_ValueEditors_ExpertNote_ExpertNoteConverter__WEBPACK_IMPORTED_MODULE_28__.ExpertNoteConverter, _ElementProcessors_ValueEditors_FileLoader_FileLoaderConverter__WEBPACK_IMPORTED_MODULE_29__.FileLoaderConverter, _ElementProcessors_MultiControls_FilterDateRange_FilterDateRangeConverter__WEBPACK_IMPORTED_MODULE_30__.FilterDateRangeConverter, _ElementProcessors_MultiControls_FilterInput_FilterInputConverter__WEBPACK_IMPORTED_MODULE_31__.FilterInputConverter, _ElementProcessors_MultiControls_FilterList_FilterListConverter__WEBPACK_IMPORTED_MODULE_32__.FilterListConverter, _ElementProcessors_ValueViewers_FIO_FIOConverter__WEBPACK_IMPORTED_MODULE_33__.FIOConverter, _ElementProcessors_Layout_Flexbox_FlexboxConverter__WEBPACK_IMPORTED_MODULE_34__.FlexboxConverter, _ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_36__.FormConverter, _ElementProcessors_FormParts_FormInfo_FormInfoConverter__WEBPACK_IMPORTED_MODULE_37__.FormInfoConverter, _ElementProcessors_Typography_Gray_GrayConverter__WEBPACK_IMPORTED_MODULE_38__.GrayConverter, _ElementProcessors_Layout_GridCol_GridColConverter__WEBPACK_IMPORTED_MODULE_39__.GridColConverter, _ElementProcessors_Layout_GridRow_GridRowConverter__WEBPACK_IMPORTED_MODULE_40__.GridRowConverter, _ElementProcessors_FormParts_Header_HeaderConverter__WEBPACK_IMPORTED_MODULE_41__.HeaderConverter, _ElementProcessors_MultiControls_HeaderMenu_HeaderMenuConverter__WEBPACK_IMPORTED_MODULE_42__.HeaderMenuConverter, _ElementProcessors_Helpers_Help_HelpConverter__WEBPACK_IMPORTED_MODULE_43__.HelpConverter, _ElementProcessors_Helpers_Helpinfo_HelpInfoConverter__WEBPACK_IMPORTED_MODULE_44__.HelpInfoConverter, _ElementProcessors_Typography_Highlight_HighlightConverter__WEBPACK_IMPORTED_MODULE_45__.HighlightConverter, _ElementProcessors_Layout_Hr_HrConverter__WEBPACK_IMPORTED_MODULE_46__.HrConverter, _ElementProcessors_Typography_Icon_IconConverter__WEBPACK_IMPORTED_MODULE_47__.IconConverter, _ElementProcessors_ControlFlow_Captions_Short_ShortConverter__WEBPACK_IMPORTED_MODULE_110__.ShortConverter, _ElementProcessors_ControlFlow_Captions_Long_LongConverter__WEBPACK_IMPORTED_MODULE_111__.LongConverter, _ElementProcessors_ControlFlow_Captions_FillHint_FillHintConverter__WEBPACK_IMPORTED_MODULE_112__.FillHintConverter, _ElementProcessors_ControlFlow_If_IfConverter__WEBPACK_IMPORTED_MODULE_48__.IfConverter, _ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_49__.ImgConverter, _ElementProcessors_ValueEditors_INN_INNConverter__WEBPACK_IMPORTED_MODULE_50__.INNConverter, _ElementProcessors_ValueEditors_Input_InputConverter__WEBPACK_IMPORTED_MODULE_51__.InputConverter, _ElementProcessors_Typography_Italic_ItalicConverter__WEBPACK_IMPORTED_MODULE_52__.ItalicConverter, _ElementProcessors_Layout_ListItem_ListItemConverter__WEBPACK_IMPORTED_MODULE_53__.ListItemConverter, _ElementProcessors_ValueEditors_Kladr_KladrConverter__WEBPACK_IMPORTED_MODULE_54__.KladrConverter, _ElementProcessors_ValueViewers_Linetext_LinetextConverter__WEBPACK_IMPORTED_MODULE_55__.LinetextConverter, _ElementProcessors_Action_Link_LinkConverter__WEBPACK_IMPORTED_MODULE_56__.LinkConverter, _ElementProcessors_Layout_List_ListConverter__WEBPACK_IMPORTED_MODULE_57__.ListConverter, _ElementProcessors_Modal_ModalForm_ModalFormConverter__WEBPACK_IMPORTED_MODULE_58__.ModalFormConverter, _ElementProcessors_Modal_ModalFormLabel_ModalFormLabelConverter__WEBPACK_IMPORTED_MODULE_61__.ModalFormLabelConverter, _ElementProcessors_MultiControls_Multilinefield_MultilineFieldConverter__WEBPACK_IMPORTED_MODULE_62__.MultilineFieldConverter, _ElementProcessors_Helpers_Normativehelp_NormativeHelpConverter__WEBPACK_IMPORTED_MODULE_63__.NormativeHelpConverter, _ElementProcessors_FormParts_Page_PageConverter__WEBPACK_IMPORTED_MODULE_65__.PageConverter, _ElementProcessors_Layout_Pencil_PencilConverter__WEBPACK_IMPORTED_MODULE_66__.PencilConverter, _ElementProcessors_ValueEditors_Picklist_PicklistConverter__WEBPACK_IMPORTED_MODULE_67__.PicklistConverter, _ElementProcessors_ValueEditors_radio_RadioConverter__WEBPACK_IMPORTED_MODULE_68__.RadioConverter, _ElementProcessors_ValueEditors_RadioGroup_RadioGroupConverter__WEBPACK_IMPORTED_MODULE_69__.RadioGroupConverter, _ElementProcessors_MultiControls_RemoveRowButton_RemoveRowButtonConverter__WEBPACK_IMPORTED_MODULE_70__.RemoveRowButtonConverter, _ElementProcessors_ValueEditors_Select_SelectConverter__WEBPACK_IMPORTED_MODULE_71__.SelectConverter, _ElementProcessors_MultiControls_SortRadioGroup_SortRadioGroupConverter__WEBPACK_IMPORTED_MODULE_72__.SortRadioGroupConverter, _ElementProcessors_Layout_Spoiler_SpoilerConverter__WEBPACK_IMPORTED_MODULE_73__.SpoilerConverter, _ElementProcessors_Typography_Strong_StrongConverter__WEBPACK_IMPORTED_MODULE_74__.StrongConverter, _ElementProcessors_Typography_Sub_SubConverter__WEBPACK_IMPORTED_MODULE_75__.SubConverter, _ElementProcessors_Layout_Subheader_SubheaderConverter__WEBPACK_IMPORTED_MODULE_76__.SubheaderConverter, _ElementProcessors_Typography_Sup_SupConverter__WEBPACK_IMPORTED_MODULE_77__.SupConverter, _ElementProcessors_ValueViewers_Text_TextConverter__WEBPACK_IMPORTED_MODULE_86__.TextConverter, _ElementProcessors_ValueEditors_Textarea_TextAreaConverter__WEBPACK_IMPORTED_MODULE_87__.TextAreaConverter, _ElementProcessors_ValueEditors_popupTextArea_PopupTextAreaConverter__WEBPACK_IMPORTED_MODULE_96__.PopupTextAreaConverter, _ElementProcessors_ValueViewers_ValueLength_ValueLengthConverter__WEBPACK_IMPORTED_MODULE_92__.ValueLengthConverter, _ElementProcessors_ControlFlow_VisibilityBlock_VisibilityBlockConverter__WEBPACK_IMPORTED_MODULE_93__.VisibilityBlockConverter, _ElementProcessors_Layout_Warning_WarningConverter__WEBPACK_IMPORTED_MODULE_94__.WarningConverter, _ElementProcessors_Layout_InnerText_InnertextConverter__WEBPACK_IMPORTED_MODULE_7__.InnertextConverter, _ElementProcessors_ControlFlow_Otherwise_OtherwiseConverter__WEBPACK_IMPORTED_MODULE_64__.OtherwiseConverter, _ElementProcessors_ControlFlow_When_WhenConverter__WEBPACK_IMPORTED_MODULE_95__.WhenConverter, _ElementProcessors_FormParts_UnitList_UnitListConverter__WEBPACK_IMPORTED_MODULE_91__.UnitListConverter, _ElementProcessors_FormParts_UnitItem_UnitItemConverter__WEBPACK_IMPORTED_MODULE_90__.UnitItemConverter, _ElementProcessors_Modal_Body_BodyConverter__WEBPACK_IMPORTED_MODULE_12__.BodyConverter, _ElementProcessors_Modal_Footer_FooterConverter__WEBPACK_IMPORTED_MODULE_35__.FooterConverter, _ElementProcessors_Modal_ModalFormConfirm_ModalFormConfirmConverter__WEBPACK_IMPORTED_MODULE_60__.ModalFormConfirmConverter, _ElementProcessors_Modal_ModalFormCancel_ModalFormCancelConverter__WEBPACK_IMPORTED_MODULE_59__.ModalFormCancelConverter, _ElementProcessors_Action_Button_ButtonConverter__WEBPACK_IMPORTED_MODULE_15__.ButtonConverter, _ElementProcessors_Action_DownloadExcelButton_DownloadExcelButtonConverter__WEBPACK_IMPORTED_MODULE_16__.DownloadExcelButtonConverter, _ElementProcessors_Action_DropDownButtonLoadExcel_DropDownButtonLoadExcelConverter__WEBPACK_IMPORTED_MODULE_17__.DropDownButtonLoadExcelConverter, _ElementProcessors_FormParts_Tour_TourConverter__WEBPACK_IMPORTED_MODULE_89__.TourConverter, _ElementProcessors_ControlFlow_Switch_SwitchConverter__WEBPACK_IMPORTED_MODULE_78__.SwitchConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableColumnConverter__WEBPACK_IMPORTED_MODULE_83__.StickyTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableColumnConverter__WEBPACK_IMPORTED_MODULE_79__.CrossfitTableColumnConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableColumnConverter__WEBPACK_IMPORTED_MODULE_81__.SimpleTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableConverter__WEBPACK_IMPORTED_MODULE_80__.CrossfitTableConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableConverter__WEBPACK_IMPORTED_MODULE_82__.SimpleTableConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableWithMultilineConverter__WEBPACK_IMPORTED_MODULE_84__.StickyTableWithMultilineConverter, _ElementProcessors_Layout_Stack_StackConverter__WEBPACK_IMPORTED_MODULE_2__.StackConverter, _ElementProcessors_Layout_Grid_GridConverter__WEBPACK_IMPORTED_MODULE_1__.GridConverter, _ElementProcessors_UnitParts_HeaderPanel_HeaderPanelConverter__WEBPACK_IMPORTED_MODULE_6__.HeaderPanelConverter, _ElementProcessors_MultiControls_Tabs_TabsConverter__WEBPACK_IMPORTED_MODULE_5__.TabsConverter, _ElementProcessors_Action_DropdownButton_DropdownButtonConverter__WEBPACK_IMPORTED_MODULE_101__.DropdownButtonConverter, _ElementProcessors_ValueEditors_Fias_FiasConverter__WEBPACK_IMPORTED_MODULE_0__.FiasConverter, _ElementProcessors_MultiControls_FilterSelect_FilterSelectConverter__WEBPACK_IMPORTED_MODULE_3__.FilterSelectConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_4__.Table2Converter, _ElementProcessors_MultiControls_Table2_Table2RowConverter__WEBPACK_IMPORTED_MODULE_100__.Table2RowConverter, _ElementProcessors_MultiControls_Table2_Table2MultirowConverter__WEBPACK_IMPORTED_MODULE_99__.Table2MultirowConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_4__.Table2ColumnConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_4__.Table2VerticalColumnConverter, _ElementProcessors_Layout_FixedTabs_FixedTabsConverter__WEBPACK_IMPORTED_MODULE_103__.FixedTabsConverter, _ElementProcessors_Layout_FixedTabs_FixedTabConverter__WEBPACK_IMPORTED_MODULE_102__.FixedTabConverter, _ElementProcessors_MultiControls_Multiple_MultipleConverter__WEBPACK_IMPORTED_MODULE_104__.MultipleConverter, _ElementProcessors_Action_ExcelPastePanel_ExcelPastePanelConverter__WEBPACK_IMPORTED_MODULE_105__.ExcelPastePanelConverter, _ElementProcessors_ValueEditors_ReferencedFields_ReferencedFieldsConverter__WEBPACK_IMPORTED_MODULE_106__.ReferencedFieldsConverter, _ElementProcessors_FormParts_UserPicklist_UserPicklistConverter__WEBPACK_IMPORTED_MODULE_107__.UserPicklistConverter, _ElementProcessors_ValueEditors_TaxRebate_TaxRebateConverter__WEBPACK_IMPORTED_MODULE_108__.TaxRebateConverter, _ElementProcessors_FormParts_Banner_BannerConverter__WEBPACK_IMPORTED_MODULE_109__.BannerConverter, _ElementProcessors_ValueViewers_DateView_DateViewConverter__WEBPACK_IMPORTED_MODULE_113__.DateViewConverter, _ElementProcessors_Action_Kebab_KebabConverter__WEBPACK_IMPORTED_MODULE_114__.KebabConverter, _ElementProcessors_Helpers_Clue_InfoBlockConverter__WEBPACK_IMPORTED_MODULE_115__.InfoBlockConverter, _ElementProcessors_ValueEditors_SelectAllCheckbox_SelectAllCheckboxConverter__WEBPACK_IMPORTED_MODULE_116__.SelectAllCheckboxConverter];
|
|
72513
|
+
const converters = [_ElementProcessors_FormParts_AddPageButton_AddPageButtonConverter__WEBPACK_IMPORTED_MODULE_8__.AddPageButtonConverter, _ElementProcessors_MultiControls_AddRowButton_AddRowButtonConverter__WEBPACK_IMPORTED_MODULE_9__.AddRowButtonConverter, _ElementProcessors_FormParts_AttachmentForm_AttachmentFormConverter__WEBPACK_IMPORTED_MODULE_117__.AttachmentFormConverter, _ElementProcessors_Layout_Block_BlockConverter__WEBPACK_IMPORTED_MODULE_10__.BlockConverter, _ElementProcessors_Layout_Minitour_MinitourConverter__WEBPACK_IMPORTED_MODULE_11__.MinitourConverter, _ElementProcessors_Typography_Bold_BoldConverter__WEBPACK_IMPORTED_MODULE_13__.BoldConverter, _ElementProcessors_Layout_Br_BrConverter__WEBPACK_IMPORTED_MODULE_14__.BrConverter, _ElementProcessors_FormParts_Caption_CaptionConverter__WEBPACK_IMPORTED_MODULE_18__.CaptionConverter, _ElementProcessors_ValueEditors_Checkbox_CheckboxConverter__WEBPACK_IMPORTED_MODULE_19__.CheckboxConverter, _ElementProcessors_ControlFlow_Choice_ChoiceConverter__WEBPACK_IMPORTED_MODULE_20__.ChoiceConverter, _ElementProcessors_MultiControls_TableCell_TableCellConverter__WEBPACK_IMPORTED_MODULE_85__.TableCellConverter, _ElementProcessors_ValueEditors_Toggle_ToggleConverter__WEBPACK_IMPORTED_MODULE_88__.ToggleConverter, _ElementProcessors_ValueEditors_Combobox_ComboBoxConverter__WEBPACK_IMPORTED_MODULE_21__.ComboBoxConverter, _ElementProcessors_FormParts_Content_ContentConverter__WEBPACK_IMPORTED_MODULE_22__.ContentConverter, _ElementProcessors_FormParts_Cross_CrossConverter__WEBPACK_IMPORTED_MODULE_23__.CrossConverter, _ElementProcessors_MultiControls_ColgroupButton_ColgroupButtonConverter__WEBPACK_IMPORTED_MODULE_97__.ColgroupButtonConverter, _ElementProcessors_ValueEditors_Date_DateConverter__WEBPACK_IMPORTED_MODULE_24__.DateConverter, _ElementProcessors_FormParts_DefaultContent_DefaultContentConverter__WEBPACK_IMPORTED_MODULE_25__.DefaultContentConverter, _ElementProcessors_ValueEditors_DiadocSuggestComboBox_DiadocSuggestComboBoxConverter__WEBPACK_IMPORTED_MODULE_26__.DiadocSuggestComboBoxConverter, _ElementProcessors_ValueEditors_RelativesComboBox_RelativesComboBoxConverter__WEBPACK_IMPORTED_MODULE_118__.RelativesComboBoxConverter, _ElementProcessors_Typography_Entity_EntityConverter__WEBPACK_IMPORTED_MODULE_27__.EntityConverter, _ElementProcessors_ValueEditors_ExpertNote_ExpertNoteConverter__WEBPACK_IMPORTED_MODULE_28__.ExpertNoteConverter, _ElementProcessors_ValueEditors_FileLoader_FileLoaderConverter__WEBPACK_IMPORTED_MODULE_29__.FileLoaderConverter, _ElementProcessors_MultiControls_FilterDateRange_FilterDateRangeConverter__WEBPACK_IMPORTED_MODULE_30__.FilterDateRangeConverter, _ElementProcessors_MultiControls_FilterInput_FilterInputConverter__WEBPACK_IMPORTED_MODULE_31__.FilterInputConverter, _ElementProcessors_MultiControls_FilterList_FilterListConverter__WEBPACK_IMPORTED_MODULE_32__.FilterListConverter, _ElementProcessors_ValueViewers_FIO_FIOConverter__WEBPACK_IMPORTED_MODULE_33__.FIOConverter, _ElementProcessors_Layout_Flexbox_FlexboxConverter__WEBPACK_IMPORTED_MODULE_34__.FlexboxConverter, _ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_36__.FormConverter, _ElementProcessors_FormParts_FormInfo_FormInfoConverter__WEBPACK_IMPORTED_MODULE_37__.FormInfoConverter, _ElementProcessors_Typography_Gray_GrayConverter__WEBPACK_IMPORTED_MODULE_38__.GrayConverter, _ElementProcessors_Layout_GridCol_GridColConverter__WEBPACK_IMPORTED_MODULE_39__.GridColConverter, _ElementProcessors_Layout_GridRow_GridRowConverter__WEBPACK_IMPORTED_MODULE_40__.GridRowConverter, _ElementProcessors_FormParts_Header_HeaderConverter__WEBPACK_IMPORTED_MODULE_41__.HeaderConverter, _ElementProcessors_MultiControls_HeaderMenu_HeaderMenuConverter__WEBPACK_IMPORTED_MODULE_42__.HeaderMenuConverter, _ElementProcessors_Helpers_Help_HelpConverter__WEBPACK_IMPORTED_MODULE_43__.HelpConverter, _ElementProcessors_Helpers_Helpinfo_HelpInfoConverter__WEBPACK_IMPORTED_MODULE_44__.HelpInfoConverter, _ElementProcessors_Typography_Highlight_HighlightConverter__WEBPACK_IMPORTED_MODULE_45__.HighlightConverter, _ElementProcessors_Layout_Hr_HrConverter__WEBPACK_IMPORTED_MODULE_46__.HrConverter, _ElementProcessors_Typography_Icon_IconConverter__WEBPACK_IMPORTED_MODULE_47__.IconConverter, _ElementProcessors_ControlFlow_Captions_Short_ShortConverter__WEBPACK_IMPORTED_MODULE_110__.ShortConverter, _ElementProcessors_ControlFlow_Captions_Long_LongConverter__WEBPACK_IMPORTED_MODULE_111__.LongConverter, _ElementProcessors_ControlFlow_Captions_FillHint_FillHintConverter__WEBPACK_IMPORTED_MODULE_112__.FillHintConverter, _ElementProcessors_ControlFlow_If_IfConverter__WEBPACK_IMPORTED_MODULE_48__.IfConverter, _ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_49__.ImgConverter, _ElementProcessors_ValueEditors_INN_INNConverter__WEBPACK_IMPORTED_MODULE_50__.INNConverter, _ElementProcessors_ValueEditors_Input_InputConverter__WEBPACK_IMPORTED_MODULE_51__.InputConverter, _ElementProcessors_Typography_Italic_ItalicConverter__WEBPACK_IMPORTED_MODULE_52__.ItalicConverter, _ElementProcessors_Layout_ListItem_ListItemConverter__WEBPACK_IMPORTED_MODULE_53__.ListItemConverter, _ElementProcessors_ValueEditors_Kladr_KladrConverter__WEBPACK_IMPORTED_MODULE_54__.KladrConverter, _ElementProcessors_ValueViewers_Linetext_LinetextConverter__WEBPACK_IMPORTED_MODULE_55__.LinetextConverter, _ElementProcessors_Action_Link_LinkConverter__WEBPACK_IMPORTED_MODULE_56__.LinkConverter, _ElementProcessors_Layout_List_ListConverter__WEBPACK_IMPORTED_MODULE_57__.ListConverter, _ElementProcessors_Modal_ModalForm_ModalFormConverter__WEBPACK_IMPORTED_MODULE_58__.ModalFormConverter, _ElementProcessors_Modal_ModalFormLabel_ModalFormLabelConverter__WEBPACK_IMPORTED_MODULE_61__.ModalFormLabelConverter, _ElementProcessors_MultiControls_Multilinefield_MultilineFieldConverter__WEBPACK_IMPORTED_MODULE_62__.MultilineFieldConverter, _ElementProcessors_Helpers_Normativehelp_NormativeHelpConverter__WEBPACK_IMPORTED_MODULE_63__.NormativeHelpConverter, _ElementProcessors_FormParts_Page_PageConverter__WEBPACK_IMPORTED_MODULE_65__.PageConverter, _ElementProcessors_Layout_Pencil_PencilConverter__WEBPACK_IMPORTED_MODULE_66__.PencilConverter, _ElementProcessors_ValueEditors_Picklist_PicklistConverter__WEBPACK_IMPORTED_MODULE_67__.PicklistConverter, _ElementProcessors_ValueEditors_radio_RadioConverter__WEBPACK_IMPORTED_MODULE_68__.RadioConverter, _ElementProcessors_ValueEditors_RadioGroup_RadioGroupConverter__WEBPACK_IMPORTED_MODULE_69__.RadioGroupConverter, _ElementProcessors_MultiControls_RemoveRowButton_RemoveRowButtonConverter__WEBPACK_IMPORTED_MODULE_70__.RemoveRowButtonConverter, _ElementProcessors_ValueEditors_Select_SelectConverter__WEBPACK_IMPORTED_MODULE_71__.SelectConverter, _ElementProcessors_MultiControls_SortRadioGroup_SortRadioGroupConverter__WEBPACK_IMPORTED_MODULE_72__.SortRadioGroupConverter, _ElementProcessors_Layout_Spoiler_SpoilerConverter__WEBPACK_IMPORTED_MODULE_73__.SpoilerConverter, _ElementProcessors_Typography_Strong_StrongConverter__WEBPACK_IMPORTED_MODULE_74__.StrongConverter, _ElementProcessors_Typography_Sub_SubConverter__WEBPACK_IMPORTED_MODULE_75__.SubConverter, _ElementProcessors_Layout_Subheader_SubheaderConverter__WEBPACK_IMPORTED_MODULE_76__.SubheaderConverter, _ElementProcessors_Typography_Sup_SupConverter__WEBPACK_IMPORTED_MODULE_77__.SupConverter, _ElementProcessors_ValueViewers_Text_TextConverter__WEBPACK_IMPORTED_MODULE_86__.TextConverter, _ElementProcessors_ValueEditors_Textarea_TextAreaConverter__WEBPACK_IMPORTED_MODULE_87__.TextAreaConverter, _ElementProcessors_ValueEditors_popupTextArea_PopupTextAreaConverter__WEBPACK_IMPORTED_MODULE_96__.PopupTextAreaConverter, _ElementProcessors_ValueViewers_ValueLength_ValueLengthConverter__WEBPACK_IMPORTED_MODULE_92__.ValueLengthConverter, _ElementProcessors_ControlFlow_VisibilityBlock_VisibilityBlockConverter__WEBPACK_IMPORTED_MODULE_93__.VisibilityBlockConverter, _ElementProcessors_Layout_Warning_WarningConverter__WEBPACK_IMPORTED_MODULE_94__.WarningConverter, _ElementProcessors_Layout_InnerText_InnertextConverter__WEBPACK_IMPORTED_MODULE_7__.InnertextConverter, _ElementProcessors_ControlFlow_Otherwise_OtherwiseConverter__WEBPACK_IMPORTED_MODULE_64__.OtherwiseConverter, _ElementProcessors_ControlFlow_When_WhenConverter__WEBPACK_IMPORTED_MODULE_95__.WhenConverter, _ElementProcessors_FormParts_UnitList_UnitListConverter__WEBPACK_IMPORTED_MODULE_91__.UnitListConverter, _ElementProcessors_FormParts_UnitItem_UnitItemConverter__WEBPACK_IMPORTED_MODULE_90__.UnitItemConverter, _ElementProcessors_Modal_Body_BodyConverter__WEBPACK_IMPORTED_MODULE_12__.BodyConverter, _ElementProcessors_Modal_Footer_FooterConverter__WEBPACK_IMPORTED_MODULE_35__.FooterConverter, _ElementProcessors_Modal_ModalFormConfirm_ModalFormConfirmConverter__WEBPACK_IMPORTED_MODULE_60__.ModalFormConfirmConverter, _ElementProcessors_Modal_ModalFormCancel_ModalFormCancelConverter__WEBPACK_IMPORTED_MODULE_59__.ModalFormCancelConverter, _ElementProcessors_Action_Button_ButtonConverter__WEBPACK_IMPORTED_MODULE_15__.ButtonConverter, _ElementProcessors_Action_DownloadExcelButton_DownloadExcelButtonConverter__WEBPACK_IMPORTED_MODULE_16__.DownloadExcelButtonConverter, _ElementProcessors_Action_DropDownButtonLoadExcel_DropDownButtonLoadExcelConverter__WEBPACK_IMPORTED_MODULE_17__.DropDownButtonLoadExcelConverter, _ElementProcessors_FormParts_Tour_TourConverter__WEBPACK_IMPORTED_MODULE_89__.TourConverter, _ElementProcessors_ControlFlow_Switch_SwitchConverter__WEBPACK_IMPORTED_MODULE_78__.SwitchConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableColumnConverter__WEBPACK_IMPORTED_MODULE_83__.StickyTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableColumnConverter__WEBPACK_IMPORTED_MODULE_79__.CrossfitTableColumnConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableColumnConverter__WEBPACK_IMPORTED_MODULE_81__.SimpleTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableConverter__WEBPACK_IMPORTED_MODULE_80__.CrossfitTableConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableConverter__WEBPACK_IMPORTED_MODULE_82__.SimpleTableConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableWithMultilineConverter__WEBPACK_IMPORTED_MODULE_84__.StickyTableWithMultilineConverter, _ElementProcessors_Layout_Stack_StackConverter__WEBPACK_IMPORTED_MODULE_2__.StackConverter, _ElementProcessors_Layout_Grid_GridConverter__WEBPACK_IMPORTED_MODULE_1__.GridConverter, _ElementProcessors_UnitParts_HeaderPanel_HeaderPanelConverter__WEBPACK_IMPORTED_MODULE_6__.HeaderPanelConverter, _ElementProcessors_MultiControls_Tabs_TabsConverter__WEBPACK_IMPORTED_MODULE_5__.TabsConverter, _ElementProcessors_Action_DropdownButton_DropdownButtonConverter__WEBPACK_IMPORTED_MODULE_101__.DropdownButtonConverter, _ElementProcessors_ValueEditors_Fias_FiasConverter__WEBPACK_IMPORTED_MODULE_0__.FiasConverter, _ElementProcessors_MultiControls_FilterSelect_FilterSelectConverter__WEBPACK_IMPORTED_MODULE_3__.FilterSelectConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_4__.Table2Converter, _ElementProcessors_MultiControls_Table2_Table2RowConverter__WEBPACK_IMPORTED_MODULE_100__.Table2RowConverter, _ElementProcessors_MultiControls_Table2_Table2MultirowConverter__WEBPACK_IMPORTED_MODULE_99__.Table2MultirowConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_4__.Table2ColumnConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_4__.Table2VerticalColumnConverter, _ElementProcessors_Layout_FixedTabs_FixedTabsConverter__WEBPACK_IMPORTED_MODULE_103__.FixedTabsConverter, _ElementProcessors_Layout_FixedTabs_FixedTabConverter__WEBPACK_IMPORTED_MODULE_102__.FixedTabConverter, _ElementProcessors_MultiControls_Multiple_MultipleConverter__WEBPACK_IMPORTED_MODULE_104__.MultipleConverter, _ElementProcessors_Action_ExcelPastePanel_ExcelPastePanelConverter__WEBPACK_IMPORTED_MODULE_105__.ExcelPastePanelConverter, _ElementProcessors_ValueEditors_ReferencedFields_ReferencedFieldsConverter__WEBPACK_IMPORTED_MODULE_106__.ReferencedFieldsConverter, _ElementProcessors_FormParts_UserPicklist_UserPicklistConverter__WEBPACK_IMPORTED_MODULE_107__.UserPicklistConverter, _ElementProcessors_ValueEditors_TaxRebate_TaxRebateConverter__WEBPACK_IMPORTED_MODULE_108__.TaxRebateConverter, _ElementProcessors_FormParts_Banner_BannerConverter__WEBPACK_IMPORTED_MODULE_109__.BannerConverter, _ElementProcessors_ValueViewers_DateView_DateViewConverter__WEBPACK_IMPORTED_MODULE_113__.DateViewConverter, _ElementProcessors_Action_Kebab_KebabConverter__WEBPACK_IMPORTED_MODULE_114__.KebabConverter, _ElementProcessors_Helpers_Clue_InfoBlockConverter__WEBPACK_IMPORTED_MODULE_115__.InfoBlockConverter, _ElementProcessors_ValueEditors_SelectAllCheckbox_SelectAllCheckboxConverter__WEBPACK_IMPORTED_MODULE_116__.SelectAllCheckboxConverter];
|
|
71989
72514
|
return new Map(converters.map(converterClass => [converterClass.getAcceptNodeClass(), converterClass]));
|
|
71990
72515
|
}
|
|
71991
72516
|
function getConverterByNodeClass(nodeClass) {
|
|
@@ -75756,6 +76281,14 @@ class BannerConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.S
|
|
|
75756
76281
|
markupBuilder.prop(x => x.bannerTheme).set(node.bannerTheme);
|
|
75757
76282
|
markupBuilder.prop(x => x.allowClose).set(node.allowClose);
|
|
75758
76283
|
markupBuilder.prop(x => x.arrowInButton).set(node.arrowInButton);
|
|
76284
|
+
if (node.isPortrait === true) {
|
|
76285
|
+
if (node.iconSrc === undefined) {
|
|
76286
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_5__.SugarAttributeReadError("Для атрибута iconSrc не задано значение при атрибуте isPortrait равному true", node, "iconSrc");
|
|
76287
|
+
} else {
|
|
76288
|
+
var _node$isPortrait;
|
|
76289
|
+
markupBuilder.prop(x => x.isPortrait).set((_node$isPortrait = node.isPortrait) !== null && _node$isPortrait !== void 0 ? _node$isPortrait : false);
|
|
76290
|
+
}
|
|
76291
|
+
}
|
|
75759
76292
|
if (node.iconSrc != undefined && node.sourceXmlNode.source != undefined) {
|
|
75760
76293
|
if (_common_SugarPathUtils__WEBPACK_IMPORTED_MODULE_4__.SugarPathUtils.isAbsoluteIncludePath(node.iconSrc)) {
|
|
75761
76294
|
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_5__.SugarAttributeReadError("Поддерживаются только относительные пути для картинок: путь должен начинаться с ./ или ../", node, "iconSrc");
|
|
@@ -75806,10 +76339,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
75806
76339
|
|
|
75807
76340
|
|
|
75808
76341
|
|
|
75809
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
76342
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
|
|
75810
76343
|
|
|
75811
76344
|
|
|
75812
|
-
let BannerNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("banner", `Баннер, позволяющий в виде рекламы рассказать о чем либо`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Banner sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("name", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Имя баннера, обязательный параметр"), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("customSugar", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если true - пишем сахар внутри баннера, если false передаем header, text и ссылку"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("header", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это заголовок в нем"), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("text", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Если банер не кастомный, то это текст в нем. Поддерживает Markdown.`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("icon", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это icon в base64 https://www.base64-image.de/ в нем"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("clickableText", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это текст на который нажимать в нем, стрелочку рисуем →, по умолчанию Открыть статью"), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("href", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это href в нем"), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("useButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если банер не кастомный, то это можно использовать кнопку вместо ссылки в нем"), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("allowClose", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Разрешает закрывать баннер - появляется кнопка закрытия. можно использовать closeButtonColor"), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("closeButtonColor", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Цвет для расскраски кнопки закрытия в hex формате например #F2F2F2"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("background", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Путь до изображения которое будет установлено на фоне. Изображение должно находиться в папке N. Поддерживаемые расширения png,jpg"), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("useFeatureFlag", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "При использовании свойства, баннер будет показан только под указанным в свойстве фича флагом, например @featureFlags/news6ndfl"), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("bannerTheme", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("light", "dark"), "Тема баннера, по умолчанию белый фон черный текст"), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("arrowInButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если банер не кастомный, есть ли стрелка в кнопке"), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("iconSrc", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.pathToFile, "Если банер не кастомный, то иконка в формате *.png"),
|
|
76345
|
+
let BannerNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("banner", `Баннер, позволяющий в виде рекламы рассказать о чем либо`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Banner sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("name", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Имя баннера, обязательный параметр"), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("customSugar", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если true - пишем сахар внутри баннера, если false передаем header, text и ссылку"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("header", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это заголовок в нем"), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("text", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, `Если банер не кастомный, то это текст в нем. Поддерживает Markdown.`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("icon", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это icon в base64 https://www.base64-image.de/ в нем"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("clickableText", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это текст на который нажимать в нем, стрелочку рисуем →, по умолчанию Открыть статью"), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("href", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Если банер не кастомный, то это href в нем"), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("useButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если банер не кастомный, то это можно использовать кнопку вместо ссылки в нем"), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("allowClose", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Разрешает закрывать баннер - появляется кнопка закрытия. можно использовать closeButtonColor"), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("closeButtonColor", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Цвет для расскраски кнопки закрытия в hex формате например #F2F2F2"), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("background", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "Путь до изображения которое будет установлено на фоне. Изображение должно находиться в папке N. Поддерживаемые расширения png,jpg"), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("useFeatureFlag", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, "При использовании свойства, баннер будет показан только под указанным в свойстве фича флагом, например @featureFlags/news6ndfl"), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("bannerTheme", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("light", "dark"), "Тема баннера, по умолчанию белый фон черный текст"), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("arrowInButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если банер не кастомный, есть ли стрелка в кнопке"), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("isPortrait", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Если в иконке баннера портрет, то true. Портрет по прототипам вылезет за пределы баннера сверху. Картинка будет сжиматься по высоте до 100px, по ширине может быть любая, но надо быть внимательным на текстовый контент."), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("iconSrc", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.pathToFile, "Если банер не кастомный, то иконка в формате *.png"), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)(), _dec(_class = (_class2 = class BannerNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_3__.SugarNodeWithLegacyVisibility {
|
|
75813
76346
|
constructor(...args) {
|
|
75814
76347
|
super(...args);
|
|
75815
76348
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor, this);
|
|
@@ -75826,8 +76359,9 @@ let BannerNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE
|
|
|
75826
76359
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "useFeatureFlag", _descriptor12, this);
|
|
75827
76360
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "bannerTheme", _descriptor13, this);
|
|
75828
76361
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "arrowInButton", _descriptor14, this);
|
|
75829
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
75830
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
76362
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "isPortrait", _descriptor15, this);
|
|
76363
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "iconSrc", _descriptor16, this);
|
|
76364
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor17, this);
|
|
75831
76365
|
}
|
|
75832
76366
|
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "name", [_dec2], {
|
|
75833
76367
|
configurable: true,
|
|
@@ -75899,12 +76433,17 @@ let BannerNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE
|
|
|
75899
76433
|
enumerable: true,
|
|
75900
76434
|
writable: true,
|
|
75901
76435
|
initializer: null
|
|
75902
|
-
}), _descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
76436
|
+
}), _descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "isPortrait", [_dec16], {
|
|
75903
76437
|
configurable: true,
|
|
75904
76438
|
enumerable: true,
|
|
75905
76439
|
writable: true,
|
|
75906
76440
|
initializer: null
|
|
75907
|
-
}), _descriptor16 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
76441
|
+
}), _descriptor16 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "iconSrc", [_dec17], {
|
|
76442
|
+
configurable: true,
|
|
76443
|
+
enumerable: true,
|
|
76444
|
+
writable: true,
|
|
76445
|
+
initializer: null
|
|
76446
|
+
}), _descriptor17 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec18], {
|
|
75908
76447
|
configurable: true,
|
|
75909
76448
|
enumerable: true,
|
|
75910
76449
|
writable: true,
|
|
@@ -89588,6 +90127,12 @@ class DateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Sug
|
|
|
89588
90127
|
markupBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
89589
90128
|
}
|
|
89590
90129
|
}
|
|
90130
|
+
if (node.callHelperOnChange) {
|
|
90131
|
+
markupBuilder.prop(x => x.callHelperOnChange).set(context.generateHelperFunctionExpression(node, "callHelperOnChange", node.callHelperOnChange));
|
|
90132
|
+
}
|
|
90133
|
+
if (node.callHelperOnBlur) {
|
|
90134
|
+
markupBuilder.prop(x => x.callHelperOnBlur).set(context.generateHelperFunctionExpression(node, "callHelperOnBlur", node.callHelperOnBlur));
|
|
90135
|
+
}
|
|
89591
90136
|
return markupBuilder.buildConverterResultWithHelp(node, context);
|
|
89592
90137
|
}
|
|
89593
90138
|
}
|
|
@@ -89622,7 +90167,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
89622
90167
|
|
|
89623
90168
|
|
|
89624
90169
|
|
|
89625
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
90170
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
|
|
89626
90171
|
|
|
89627
90172
|
|
|
89628
90173
|
|
|
@@ -89631,7 +90176,7 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11
|
|
|
89631
90176
|
|
|
89632
90177
|
|
|
89633
90178
|
|
|
89634
|
-
let DateNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.sugarNode)("date", `Контрол ввода даты`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Date sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.deprecatedAttr)("caption", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, ``), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_10__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_10__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_9__.TooltipSettingsNode), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.deprecatedAttr)("placeholder", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.lengthUnit, `Ширина`), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("dateFormat", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.enum("fss"), `Форматы даты для сохранения в inner, в 4-ФСС указывается fss.`), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.bindingPath, ``), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_8__.HelpNode]), _dec(_class = (_class2 = class DateNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
|
|
90179
|
+
let DateNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.sugarNode)("date", `Контрол ввода даты`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Date sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.deprecatedAttr)("caption", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.boolean, ``), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_10__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_10__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_9__.TooltipSettingsNode), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.deprecatedAttr)("placeholder", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.lengthUnit, `Ширина`), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("dateFormat", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.enum("fss"), `Форматы даты для сохранения в inner, в 4-ФСС указывается fss.`), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.bindingPath, ``), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.string, ``), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_8__.HelpNode]), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("callHelperOnChange", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.helperFunctionName, "Вызов helper функции на onChange контролла"), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attr)("callHelperOnBlur", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.attrType.helperFunctionName, "Вызов helper функции на onBlur контролла"), _dec(_class = (_class2 = class DateNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_6__.SugarNodeWithLegacyVisibility {
|
|
89635
90180
|
constructor(...args) {
|
|
89636
90181
|
super(...args);
|
|
89637
90182
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataBinding", _descriptor, this);
|
|
@@ -89647,6 +90192,8 @@ let DateNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7
|
|
|
89647
90192
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", _descriptor11, this);
|
|
89648
90193
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "help", _descriptor12, this);
|
|
89649
90194
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "helpNodes", _descriptor13, this);
|
|
90195
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "callHelperOnChange", _descriptor14, this);
|
|
90196
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "callHelperOnBlur", _descriptor15, this);
|
|
89650
90197
|
}
|
|
89651
90198
|
getOwnPath() {
|
|
89652
90199
|
return this.dataBinding.getOwnPath();
|
|
@@ -89716,6 +90263,16 @@ let DateNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7
|
|
|
89716
90263
|
enumerable: true,
|
|
89717
90264
|
writable: true,
|
|
89718
90265
|
initializer: null
|
|
90266
|
+
}), _descriptor14 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "callHelperOnChange", [_dec15], {
|
|
90267
|
+
configurable: true,
|
|
90268
|
+
enumerable: true,
|
|
90269
|
+
writable: true,
|
|
90270
|
+
initializer: null
|
|
90271
|
+
}), _descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "callHelperOnBlur", [_dec16], {
|
|
90272
|
+
configurable: true,
|
|
90273
|
+
enumerable: true,
|
|
90274
|
+
writable: true,
|
|
90275
|
+
initializer: null
|
|
89719
90276
|
})), _class2)) || _class);
|
|
89720
90277
|
|
|
89721
90278
|
/***/ }),
|
|
@@ -92718,6 +93275,10 @@ class RadioGroupConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
|
|
|
92718
93275
|
static getAcceptNodeClass() {
|
|
92719
93276
|
return _RadioGroupNode__WEBPACK_IMPORTED_MODULE_6__.RadioGroupNode;
|
|
92720
93277
|
}
|
|
93278
|
+
get nodePaths() {
|
|
93279
|
+
const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_6__.RadioGroupNode);
|
|
93280
|
+
return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node)];
|
|
93281
|
+
}
|
|
92721
93282
|
doBuildNodeValidations(validationGenerator) {
|
|
92722
93283
|
const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_6__.RadioGroupNode);
|
|
92723
93284
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
@@ -93007,6 +93568,136 @@ let ReferencedFieldsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPOR
|
|
|
93007
93568
|
|
|
93008
93569
|
/***/ }),
|
|
93009
93570
|
|
|
93571
|
+
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxConverter.ts":
|
|
93572
|
+
/*!*********************************************************************************************************************************!*\
|
|
93573
|
+
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxConverter.ts ***!
|
|
93574
|
+
\*********************************************************************************************************************************/
|
|
93575
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
93576
|
+
|
|
93577
|
+
"use strict";
|
|
93578
|
+
__webpack_require__.r(__webpack_exports__);
|
|
93579
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
93580
|
+
/* harmony export */ RelativesComboBoxConverter: () => (/* binding */ RelativesComboBoxConverter)
|
|
93581
|
+
/* harmony export */ });
|
|
93582
|
+
/* harmony import */ var _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../SugarNodeConverter */ "./Generator/src/generators/markupGenerator/SugarNodeConverter.ts");
|
|
93583
|
+
/* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../DataDeclarationGenerator/DataDeclarationGenerationContext */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts");
|
|
93584
|
+
/* harmony import */ var _ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/ComponentMarkupBuilder */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/ComponentMarkupBuilder.ts");
|
|
93585
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
93586
|
+
/* harmony import */ var _RelativesComboBoxNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RelativesComboBoxNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxNode.ts");
|
|
93587
|
+
|
|
93588
|
+
|
|
93589
|
+
|
|
93590
|
+
|
|
93591
|
+
|
|
93592
|
+
class RelativesComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__.SugarNodeConverterBase {
|
|
93593
|
+
static getAcceptNodeClass() {
|
|
93594
|
+
return _RelativesComboBoxNode__WEBPACK_IMPORTED_MODULE_4__.RelativesComboBoxNode;
|
|
93595
|
+
}
|
|
93596
|
+
doConvert(context) {
|
|
93597
|
+
const node = this.getCurrentNodeAs(_RelativesComboBoxNode__WEBPACK_IMPORTED_MODULE_4__.RelativesComboBoxNode);
|
|
93598
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("RelativesComboBox");
|
|
93599
|
+
markupBuilder.prop(x => x.employeeIdPath).set(node.employeeIdPath);
|
|
93600
|
+
markupBuilder.prop(x => x.selectedLastNamePath).set(node.selectedLastNamePath);
|
|
93601
|
+
markupBuilder.prop(x => x.selectedFirstNamePath).set(node.selectedFirstNamePath);
|
|
93602
|
+
markupBuilder.prop(x => x.selectedMiddleNamePath).set(node.selectedMiddleNamePath);
|
|
93603
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(node));
|
|
93604
|
+
markupBuilder.prop(x => x.onAdd).set(context.generateHelperFunctionExpression(node, "onAdd", node.onAdd));
|
|
93605
|
+
markupBuilder.prop(x => x.onSelect).set(context.generateHelperFunctionExpression(node, "onSelect", node.onSelect));
|
|
93606
|
+
return markupBuilder.buildConverterResult();
|
|
93607
|
+
}
|
|
93608
|
+
buildChildrenDataDeclaration(context) {
|
|
93609
|
+
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_1__.emptyDataDeclarationCollection;
|
|
93610
|
+
}
|
|
93611
|
+
*doTraverseChildren() {
|
|
93612
|
+
// no children
|
|
93613
|
+
}
|
|
93614
|
+
doBuildDataDeclaration(context) {
|
|
93615
|
+
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_1__.emptyDataDeclarationCollection;
|
|
93616
|
+
}
|
|
93617
|
+
}
|
|
93618
|
+
|
|
93619
|
+
/***/ }),
|
|
93620
|
+
|
|
93621
|
+
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxNode.ts":
|
|
93622
|
+
/*!****************************************************************************************************************************!*\
|
|
93623
|
+
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxNode.ts ***!
|
|
93624
|
+
\****************************************************************************************************************************/
|
|
93625
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
93626
|
+
|
|
93627
|
+
"use strict";
|
|
93628
|
+
__webpack_require__.r(__webpack_exports__);
|
|
93629
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
93630
|
+
/* harmony export */ RelativesComboBoxNode: () => (/* binding */ RelativesComboBoxNode)
|
|
93631
|
+
/* harmony export */ });
|
|
93632
|
+
/* harmony import */ var _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/initializerDefineProperty */ "./node_modules/@babel/runtime/helpers/initializerDefineProperty.js");
|
|
93633
|
+
/* harmony import */ var _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
93634
|
+
/* harmony import */ var _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/applyDecoratedDescriptor */ "./node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js");
|
|
93635
|
+
/* harmony import */ var _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__);
|
|
93636
|
+
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/initializerWarningHelper */ "./node_modules/@babel/runtime/helpers/initializerWarningHelper.js");
|
|
93637
|
+
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__);
|
|
93638
|
+
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
93639
|
+
/* harmony import */ var _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Serializer/SugarNodeWithLegacyVisibility */ "./Generator/src/generators/markupGenerator/Serializer/SugarNodeWithLegacyVisibility.ts");
|
|
93640
|
+
/* harmony import */ var _CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CommonNodeProperties/DataBindingMixinNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/DataBindingMixinNode.ts");
|
|
93641
|
+
|
|
93642
|
+
|
|
93643
|
+
|
|
93644
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
93645
|
+
|
|
93646
|
+
|
|
93647
|
+
|
|
93648
|
+
let RelativesComboBoxNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("relativescombobox", "Комбобокс для выбора ребенка/родственника.", __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_5__.DataReferenceMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("employeeIdPath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.modelPath, `Путь до поля, в котором лежит employeeId. Нужно для запроса в сервис сотрудников.`), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("onAdd", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется при добавлении родственника"), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("onSelect", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.helperFunctionName, "Имя кастомной helpers функции, которая вызовется при выборе родственника"), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.markupAttr)("selectedLastNamePath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.modelPath, "Путь до фамилии выбранного родственника"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.markupAttr)("selectedFirstNamePath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.modelPath, "Путь до имени выбранного родственника"), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.markupAttr)("selectedMiddleNamePath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.modelPath, "Путь до отчества выбранного родственника"), _dec(_class = (_class2 = class RelativesComboBoxNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_4__.SugarNodeWithLegacyVisibility {
|
|
93649
|
+
constructor(...args) {
|
|
93650
|
+
super(...args);
|
|
93651
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataReference", _descriptor, this);
|
|
93652
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "employeeIdPath", _descriptor2, this);
|
|
93653
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onAdd", _descriptor3, this);
|
|
93654
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onSelect", _descriptor4, this);
|
|
93655
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "selectedLastNamePath", _descriptor5, this);
|
|
93656
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "selectedFirstNamePath", _descriptor6, this);
|
|
93657
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "selectedMiddleNamePath", _descriptor7, this);
|
|
93658
|
+
}
|
|
93659
|
+
getOwnPath() {
|
|
93660
|
+
return this.dataReference.getOwnPath();
|
|
93661
|
+
}
|
|
93662
|
+
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "dataReference", [_dec2], {
|
|
93663
|
+
configurable: true,
|
|
93664
|
+
enumerable: true,
|
|
93665
|
+
writable: true,
|
|
93666
|
+
initializer: null
|
|
93667
|
+
}), _descriptor2 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "employeeIdPath", [_dec3], {
|
|
93668
|
+
configurable: true,
|
|
93669
|
+
enumerable: true,
|
|
93670
|
+
writable: true,
|
|
93671
|
+
initializer: null
|
|
93672
|
+
}), _descriptor3 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "onAdd", [_dec4], {
|
|
93673
|
+
configurable: true,
|
|
93674
|
+
enumerable: true,
|
|
93675
|
+
writable: true,
|
|
93676
|
+
initializer: null
|
|
93677
|
+
}), _descriptor4 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "onSelect", [_dec5], {
|
|
93678
|
+
configurable: true,
|
|
93679
|
+
enumerable: true,
|
|
93680
|
+
writable: true,
|
|
93681
|
+
initializer: null
|
|
93682
|
+
}), _descriptor5 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "selectedLastNamePath", [_dec6], {
|
|
93683
|
+
configurable: true,
|
|
93684
|
+
enumerable: true,
|
|
93685
|
+
writable: true,
|
|
93686
|
+
initializer: null
|
|
93687
|
+
}), _descriptor6 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "selectedFirstNamePath", [_dec7], {
|
|
93688
|
+
configurable: true,
|
|
93689
|
+
enumerable: true,
|
|
93690
|
+
writable: true,
|
|
93691
|
+
initializer: null
|
|
93692
|
+
}), _descriptor7 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "selectedMiddleNamePath", [_dec8], {
|
|
93693
|
+
configurable: true,
|
|
93694
|
+
enumerable: true,
|
|
93695
|
+
writable: true,
|
|
93696
|
+
initializer: null
|
|
93697
|
+
})), _class2)) || _class);
|
|
93698
|
+
|
|
93699
|
+
/***/ }),
|
|
93700
|
+
|
|
93010
93701
|
/***/ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectAllCheckbox/SelectAllCheckboxConverter.ts":
|
|
93011
93702
|
/*!*********************************************************************************************************************************!*\
|
|
93012
93703
|
!*** ./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectAllCheckbox/SelectAllCheckboxConverter.ts ***!
|
|
@@ -95704,8 +96395,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
95704
96395
|
/* harmony import */ var _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
95705
96396
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
95706
96397
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
95707
|
-
/* harmony import */ var
|
|
95708
|
-
/* harmony import */ var
|
|
96398
|
+
/* harmony import */ var _ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
96399
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
96400
|
+
/* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
|
|
96401
|
+
|
|
95709
96402
|
|
|
95710
96403
|
|
|
95711
96404
|
|
|
@@ -95727,17 +96420,17 @@ class FLangNormalizationRulesBuilder {
|
|
|
95727
96420
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
95728
96421
|
}
|
|
95729
96422
|
*childrenInitializer(node, optional, defaultChildren) {
|
|
95730
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
95731
|
-
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
96423
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
96424
|
+
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
|
|
95732
96425
|
}
|
|
95733
96426
|
*childrenInitializerForPicklist(node, optional, defaultChildren) {
|
|
95734
96427
|
const targetPathReference = node.getFullPath().toEachIteration().trimLastStarIfLastToken();
|
|
95735
|
-
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
96428
|
+
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
|
|
95736
96429
|
}
|
|
95737
96430
|
valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
|
|
95738
96431
|
var _dataBinding$defaultV;
|
|
95739
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
95740
|
-
const originalValueReference =
|
|
96432
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
96433
|
+
const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
95741
96434
|
const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
|
|
95742
96435
|
const defaultValue = (_dataBinding$defaultV = dataBinding.defaultValue) !== null && _dataBinding$defaultV !== void 0 ? _dataBinding$defaultV : "";
|
|
95743
96436
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
|
|
@@ -95761,11 +96454,11 @@ class FLangNormalizationRulesBuilder {
|
|
|
95761
96454
|
if (!disabled && !dataBinding.settings) {
|
|
95762
96455
|
valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), valueExpression, sourceValueReference);
|
|
95763
96456
|
}
|
|
95764
|
-
const finalExpression = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(targetPathReference) ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
96457
|
+
const finalExpression = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(targetPathReference) ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "autoFlag")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "autoValue")), valueExpression) : valueExpression;
|
|
95765
96458
|
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression);
|
|
95766
96459
|
}
|
|
95767
96460
|
*specialFieldsInitializer(node, options) {
|
|
95768
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
96461
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
95769
96462
|
if (options.disabled) {
|
|
95770
96463
|
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "disabled"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"));
|
|
95771
96464
|
}
|
|
@@ -95783,9 +96476,9 @@ class FLangNormalizationRulesBuilder {
|
|
|
95783
96476
|
var _typeNode$base, _this$schemaRng$getTy;
|
|
95784
96477
|
// eslint-disable-next-line
|
|
95785
96478
|
const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
|
|
95786
|
-
const typeNode = validationInfoSource instanceof
|
|
96479
|
+
const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
|
|
95787
96480
|
const baseType = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : (_this$schemaRng$getTy = this.schemaRng.getTypeNodeByPath(targetPathReference)) === null || _this$schemaRng$getTy === void 0 ? void 0 : _this$schemaRng$getTy.baseType;
|
|
95788
|
-
const sourceValueReference =
|
|
96481
|
+
const sourceValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
95789
96482
|
return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
|
|
95790
96483
|
}
|
|
95791
96484
|
}
|
|
@@ -97250,9 +97943,9 @@ function children(onlyTagName, nodeClasses = [], skipNodeNames = []) {
|
|
|
97250
97943
|
(0,_ClassMetadataAccess__WEBPACK_IMPORTED_MODULE_4__.setPropertyDeserializer)(targetClass, propName, new _Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_7__.SinglePropertyDeserializer(propName.toString(), new _Properties_ValuesSources_ChildrenNodesValueSource__WEBPACK_IMPORTED_MODULE_19__.ChildrenNodesValueSource(onlyTagNames != undefined ? node => onlyTagNames.includes(node.name) && !skipNodeNames.includes(node.name) : node => !skipNodeNames.includes(node.name), nodeClasses)));
|
|
97251
97944
|
};
|
|
97252
97945
|
}
|
|
97253
|
-
function singleChild(tagName, nodeClasses = []) {
|
|
97946
|
+
function singleChild(tagName, nodeClasses = [], dec) {
|
|
97254
97947
|
return (targetClass, propName) => {
|
|
97255
|
-
(0,_ClassMetadataAccess__WEBPACK_IMPORTED_MODULE_4__.setPropertyDeserializer)(targetClass, propName, new _Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_7__.SinglePropertyDeserializer(propName.toString(), new _Properties_ValuesSources_SingleChildValueSource__WEBPACK_IMPORTED_MODULE_20__.SingleChildValueSource(tagName, nodeClasses)));
|
|
97948
|
+
(0,_ClassMetadataAccess__WEBPACK_IMPORTED_MODULE_4__.setPropertyDeserializer)(targetClass, propName, new _Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_7__.SinglePropertyDeserializer(propName.toString(), new _Properties_ValuesSources_SingleChildValueSource__WEBPACK_IMPORTED_MODULE_20__.SingleChildValueSource(tagName, nodeClasses), dec));
|
|
97256
97949
|
};
|
|
97257
97950
|
}
|
|
97258
97951
|
function attr(attrName, valueParser, dec) {
|
|
@@ -97864,6 +98557,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97864
98557
|
/* harmony import */ var _ElementProcessors_Helpers_Clue_InfoBlockNode__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ../ElementProcessors/Helpers/Clue/InfoBlockNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Helpers/Clue/InfoBlockNode.ts");
|
|
97865
98558
|
/* harmony import */ var _ElementProcessors_ValueEditors_SelectAllCheckbox_SelectAllCheckboxNode__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ../ElementProcessors/ValueEditors/SelectAllCheckbox/SelectAllCheckboxNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/SelectAllCheckbox/SelectAllCheckboxNode.ts");
|
|
97866
98559
|
/* harmony import */ var _common_SchemaRng_Nodes_SchemaRngRoot__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ../../../common/SchemaRng/Nodes/SchemaRngRoot */ "./Generator/src/common/SchemaRng/Nodes/SchemaRngRoot.ts");
|
|
98560
|
+
/* harmony import */ var _ElementProcessors_ValueEditors_RelativesComboBox_RelativesComboBoxNode__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ../ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/RelativesComboBox/RelativesComboBoxNode.ts");
|
|
98561
|
+
|
|
97867
98562
|
|
|
97868
98563
|
|
|
97869
98564
|
|
|
@@ -98049,6 +98744,7 @@ function registerDefaultSugarNodes(result) {
|
|
|
98049
98744
|
result.registerNode(_ElementProcessors_ValueEditors_Textarea_TextAreaNode__WEBPACK_IMPORTED_MODULE_97__.TextAreaNode);
|
|
98050
98745
|
result.registerNode(_ElementProcessors_ValueEditors_popupTextArea_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_104__.PopupTextAreaNode);
|
|
98051
98746
|
result.registerNode(_ElementProcessors_ValueEditors_DiadocSuggestComboBox_DiadocSuggestComboBoxNode__WEBPACK_IMPORTED_MODULE_29__.DiadocSuggestComboBoxNode);
|
|
98747
|
+
result.registerNode(_ElementProcessors_ValueEditors_RelativesComboBox_RelativesComboBoxNode__WEBPACK_IMPORTED_MODULE_123__.RelativesComboBoxNode);
|
|
98052
98748
|
result.registerNode(_ElementProcessors_MultiControls_SortRadioGroup_SortRadioGroupNode__WEBPACK_IMPORTED_MODULE_85__.SortRadioGroupNode);
|
|
98053
98749
|
result.registerNode(_ElementProcessors_Typography_Entity_EntityNode__WEBPACK_IMPORTED_MODULE_30__.EntityNode);
|
|
98054
98750
|
result.registerNode(_ElementProcessors_ValueEditors_radio_RadioNode__WEBPACK_IMPORTED_MODULE_81__.RadioNode);
|
|
@@ -129865,59 +130561,6 @@ const forEachStep = (self, fn, node, thisp) => {
|
|
|
129865
130561
|
module.exports = LRUCache
|
|
129866
130562
|
|
|
129867
130563
|
|
|
129868
|
-
/***/ }),
|
|
129869
|
-
|
|
129870
|
-
/***/ "./node_modules/md5-file/index.js":
|
|
129871
|
-
/*!****************************************!*\
|
|
129872
|
-
!*** ./node_modules/md5-file/index.js ***!
|
|
129873
|
-
\****************************************/
|
|
129874
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
129875
|
-
|
|
129876
|
-
const crypto = __webpack_require__(/*! crypto */ "crypto")
|
|
129877
|
-
const fs = __webpack_require__(/*! fs */ "fs")
|
|
129878
|
-
|
|
129879
|
-
const BUFFER_SIZE = 8192
|
|
129880
|
-
|
|
129881
|
-
function md5FileSync (path) {
|
|
129882
|
-
const fd = fs.openSync(path, 'r')
|
|
129883
|
-
const hash = crypto.createHash('md5')
|
|
129884
|
-
const buffer = Buffer.alloc(BUFFER_SIZE)
|
|
129885
|
-
|
|
129886
|
-
try {
|
|
129887
|
-
let bytesRead
|
|
129888
|
-
|
|
129889
|
-
do {
|
|
129890
|
-
bytesRead = fs.readSync(fd, buffer, 0, BUFFER_SIZE)
|
|
129891
|
-
hash.update(buffer.slice(0, bytesRead))
|
|
129892
|
-
} while (bytesRead === BUFFER_SIZE)
|
|
129893
|
-
} finally {
|
|
129894
|
-
fs.closeSync(fd)
|
|
129895
|
-
}
|
|
129896
|
-
|
|
129897
|
-
return hash.digest('hex')
|
|
129898
|
-
}
|
|
129899
|
-
|
|
129900
|
-
function md5File (path) {
|
|
129901
|
-
return new Promise((resolve, reject) => {
|
|
129902
|
-
const output = crypto.createHash('md5')
|
|
129903
|
-
const input = fs.createReadStream(path)
|
|
129904
|
-
|
|
129905
|
-
input.on('error', (err) => {
|
|
129906
|
-
reject(err)
|
|
129907
|
-
})
|
|
129908
|
-
|
|
129909
|
-
output.once('readable', () => {
|
|
129910
|
-
resolve(output.read().toString('hex'))
|
|
129911
|
-
})
|
|
129912
|
-
|
|
129913
|
-
input.pipe(output)
|
|
129914
|
-
})
|
|
129915
|
-
}
|
|
129916
|
-
|
|
129917
|
-
module.exports = md5File
|
|
129918
|
-
module.exports.sync = md5FileSync
|
|
129919
|
-
|
|
129920
|
-
|
|
129921
130564
|
/***/ }),
|
|
129922
130565
|
|
|
129923
130566
|
/***/ "./node_modules/md5/md5.js":
|