@kontur.candy/generator 5.45.2-minitourlinks.0 → 5.46.0-incremental-dictionaries.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 +257 -121
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45028,15 +45028,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45028
45028
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45029
45029
|
/* harmony export */ extractGfvFromFormPath: () => (/* binding */ extractGfvFromFormPath)
|
|
45030
45030
|
/* harmony export */ });
|
|
45031
|
-
/* harmony import */ var
|
|
45032
|
-
/* harmony import */ var _WellKnownDirectories__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WellKnownDirectories */ "./Common/WellKnownDirectories.ts");
|
|
45033
|
-
|
|
45031
|
+
/* harmony import */ var _WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WellKnownDirectories */ "./Common/WellKnownDirectories.ts");
|
|
45034
45032
|
|
|
45035
45033
|
function extractGfvFromFormPath(formPath) {
|
|
45036
|
-
var
|
|
45037
|
-
const regexp = new RegExp(`([\\/\\\\](?<gfv1>\\d{6,})[\\/\\\\]${
|
|
45034
|
+
var _match$groups$gfv, _match$groups, _match$groups2;
|
|
45035
|
+
const regexp = new RegExp(`([\\/\\\\](?<gfv1>\\d{6,})[\\/\\\\]${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__.WellKnownDirectories.CandySubdirectoryName})|(((\\.farm)|(${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__.WellKnownDirectories.TestFarmDir}))[\\/\\\\]forms[\\/\\\\](?<gfv2>\\d{6,}))`);
|
|
45038
45036
|
const match = regexp.exec(formPath);
|
|
45039
|
-
|
|
45037
|
+
const gfv = (_match$groups$gfv = match === null || match === void 0 || (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups["gfv1"]) !== null && _match$groups$gfv !== void 0 ? _match$groups$gfv : match === null || match === void 0 || (_match$groups2 = match.groups) === null || _match$groups2 === void 0 ? void 0 : _match$groups2["gfv2"];
|
|
45038
|
+
if (gfv) {
|
|
45039
|
+
return gfv;
|
|
45040
|
+
}
|
|
45041
|
+
// Ошибка не долетает до консоли при работе с сервисранера. Поэтому доп. консолька
|
|
45042
|
+
// eslint-disable-next-line no-console
|
|
45043
|
+
console.trace(`[Error] Unable to determine gfv from path: ${formPath}`);
|
|
45044
|
+
throw new Error(`Unable to determine gfv from path: ${formPath}`);
|
|
45040
45045
|
}
|
|
45041
45046
|
|
|
45042
45047
|
/***/ }),
|
|
@@ -48627,6 +48632,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48627
48632
|
/* harmony export */ getDaysInMonthKCLangFunction: () => (/* binding */ getDaysInMonthKCLangFunction),
|
|
48628
48633
|
/* harmony export */ getMonthKCLangFunction: () => (/* binding */ getMonthKCLangFunction),
|
|
48629
48634
|
/* harmony export */ getPicklistValuesKCLangFunction: () => (/* binding */ getPicklistValuesKCLangFunction),
|
|
48635
|
+
/* harmony export */ getSumByKeysKCLangFunction: () => (/* binding */ getSumByKeysKCLangFunction),
|
|
48630
48636
|
/* harmony export */ getYearKCLangFunction: () => (/* binding */ getYearKCLangFunction),
|
|
48631
48637
|
/* harmony export */ groupCountKCLangFunction: () => (/* binding */ groupCountKCLangFunction),
|
|
48632
48638
|
/* harmony export */ groupSumKCLangFunction: () => (/* binding */ groupSumKCLangFunction),
|
|
@@ -48639,6 +48645,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48639
48645
|
/* harmony export */ isValidAccountNumberKCLangFunction: () => (/* binding */ isValidAccountNumberKCLangFunction),
|
|
48640
48646
|
/* harmony export */ isValidMirCardNumberKCLangFunction: () => (/* binding */ isValidMirCardNumberKCLangFunction),
|
|
48641
48647
|
/* harmony export */ lengthKCLangFunction: () => (/* binding */ lengthKCLangFunction),
|
|
48648
|
+
/* harmony export */ makeDictKCLangFunction: () => (/* binding */ makeDictKCLangFunction),
|
|
48642
48649
|
/* harmony export */ newlineKCLangFunction: () => (/* binding */ newlineKCLangFunction),
|
|
48643
48650
|
/* harmony export */ noDepsKCLangFunction: () => (/* binding */ noDepsKCLangFunction),
|
|
48644
48651
|
/* harmony export */ regexMatchKCLangFunction: () => (/* binding */ regexMatchKCLangFunction),
|
|
@@ -49326,6 +49333,46 @@ const hasAutoFlagKCLangFunction = params => {
|
|
|
49326
49333
|
expression: param
|
|
49327
49334
|
};
|
|
49328
49335
|
};
|
|
49336
|
+
const makeDictKCLangFunction = params => {
|
|
49337
|
+
var _params$48, _params$49;
|
|
49338
|
+
const errors = Array.from(validateParams(params, 2));
|
|
49339
|
+
if (errors.length > 0) {
|
|
49340
|
+
return new FunctionValidationErrorCollection(errors);
|
|
49341
|
+
}
|
|
49342
|
+
const sourceKeyPathParam = (_params$48 = params[0]) === null || _params$48 === void 0 ? void 0 : _params$48.value;
|
|
49343
|
+
const sourceValuePathParam = (_params$49 = params[1]) === null || _params$49 === void 0 ? void 0 : _params$49.value;
|
|
49344
|
+
if ((sourceKeyPathParam === null || sourceKeyPathParam === void 0 ? void 0 : sourceKeyPathParam.type) !== "argument" || sourceValuePathParam == undefined) {
|
|
49345
|
+
const argumentsValidationError = new ArgumentValidationError("Invalid argument sourceKeyPath");
|
|
49346
|
+
return new FunctionValidationErrorCollection([argumentsValidationError]);
|
|
49347
|
+
}
|
|
49348
|
+
return {
|
|
49349
|
+
type: "makeDict",
|
|
49350
|
+
sourceKeyPath: sourceKeyPathParam.select,
|
|
49351
|
+
sourceValueExpression: sourceValuePathParam
|
|
49352
|
+
};
|
|
49353
|
+
};
|
|
49354
|
+
const getSumByKeysKCLangFunction = params => {
|
|
49355
|
+
var _params$50, _params$51;
|
|
49356
|
+
const errors = Array.from(validateParams(params, 2));
|
|
49357
|
+
if (errors.length > 0) {
|
|
49358
|
+
return new FunctionValidationErrorCollection(errors);
|
|
49359
|
+
}
|
|
49360
|
+
const dictPathParam = (_params$50 = params[0]) === null || _params$50 === void 0 ? void 0 : _params$50.value;
|
|
49361
|
+
const targetKeysParam = (_params$51 = params[1]) === null || _params$51 === void 0 ? void 0 : _params$51.value;
|
|
49362
|
+
if (targetKeysParam == undefined || (dictPathParam === null || dictPathParam === void 0 ? void 0 : dictPathParam.type) !== "argument") {
|
|
49363
|
+
const argumentsValidationError = new ArgumentValidationError("Invalid arguments dictPathParam, targetKeysParam");
|
|
49364
|
+
return new FunctionValidationErrorCollection([argumentsValidationError]);
|
|
49365
|
+
}
|
|
49366
|
+
const targetKeys = targetKeysParam.type === "array" ? targetKeysParam : {
|
|
49367
|
+
type: "array",
|
|
49368
|
+
items: [targetKeysParam]
|
|
49369
|
+
};
|
|
49370
|
+
return {
|
|
49371
|
+
type: "getSumByKeys",
|
|
49372
|
+
dictPath: dictPathParam.select,
|
|
49373
|
+
targetKeys: targetKeys
|
|
49374
|
+
};
|
|
49375
|
+
};
|
|
49329
49376
|
|
|
49330
49377
|
/***/ }),
|
|
49331
49378
|
|
|
@@ -49390,7 +49437,9 @@ const getKCLangGlobalFunctionBuilders = () => ({
|
|
|
49390
49437
|
addYears: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.addYearsKCLangFunction],
|
|
49391
49438
|
dateToString: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateToStringKCLangFunction],
|
|
49392
49439
|
dateTime: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateTimeKCLangFunction],
|
|
49393
|
-
hasAutoFlag: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.hasAutoFlagKCLangFunction]
|
|
49440
|
+
hasAutoFlag: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.hasAutoFlagKCLangFunction],
|
|
49441
|
+
makeDict: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.makeDictKCLangFunction],
|
|
49442
|
+
getSumByKeys: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.getSumByKeysKCLangFunction]
|
|
49394
49443
|
});
|
|
49395
49444
|
class ErrorListener {
|
|
49396
49445
|
constructor() {
|
|
@@ -57536,6 +57585,10 @@ function generateKCXmlExpression(expression) {
|
|
|
57536
57585
|
return `<m:${expression.type} select="${expression.select}" />`;
|
|
57537
57586
|
case "isValidAccountNumber":
|
|
57538
57587
|
return `<m:${expression.type} bik="${expression.bik}" account="${expression.account}" />`;
|
|
57588
|
+
case "makeDict":
|
|
57589
|
+
return [`<m:${expression.type} sourceKeyPath="${expression.sourceKeyPath}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.sourceValueExpression), 1), `</m:${expression.type}>`].join("\n");
|
|
57590
|
+
case "getSumByKeys":
|
|
57591
|
+
return [`<m:${expression.type} dictPath="${expression.dictPath}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.targetKeys), 1), `</m:${expression.type}>`].join("\n");
|
|
57539
57592
|
case "groupSum":
|
|
57540
57593
|
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");
|
|
57541
57594
|
case "groupCount":
|
|
@@ -63645,6 +63698,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63645
63698
|
/* harmony export */ FormulaGetDaysInMonthExpression: () => (/* binding */ FormulaGetDaysInMonthExpression),
|
|
63646
63699
|
/* harmony export */ FormulaGetMonthExpression: () => (/* binding */ FormulaGetMonthExpression),
|
|
63647
63700
|
/* harmony export */ FormulaGetPicklistValuesExpression: () => (/* binding */ FormulaGetPicklistValuesExpression),
|
|
63701
|
+
/* harmony export */ FormulaGetSumByKeysExpression: () => (/* binding */ FormulaGetSumByKeysExpression),
|
|
63648
63702
|
/* harmony export */ FormulaGetYearExpression: () => (/* binding */ FormulaGetYearExpression),
|
|
63649
63703
|
/* harmony export */ FormulaGroupCountExpression: () => (/* binding */ FormulaGroupCountExpression),
|
|
63650
63704
|
/* harmony export */ FormulaGroupSumExpression: () => (/* binding */ FormulaGroupSumExpression),
|
|
@@ -63660,6 +63714,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63660
63714
|
/* harmony export */ FormulaLeExpression: () => (/* binding */ FormulaLeExpression),
|
|
63661
63715
|
/* harmony export */ FormulaLengthExpression: () => (/* binding */ FormulaLengthExpression),
|
|
63662
63716
|
/* harmony export */ FormulaLtExpression: () => (/* binding */ FormulaLtExpression),
|
|
63717
|
+
/* harmony export */ FormulaMakeDictExpression: () => (/* binding */ FormulaMakeDictExpression),
|
|
63663
63718
|
/* harmony export */ FormulaMinusExpression: () => (/* binding */ FormulaMinusExpression),
|
|
63664
63719
|
/* harmony export */ FormulaMultiplyExpression: () => (/* binding */ FormulaMultiplyExpression),
|
|
63665
63720
|
/* harmony export */ FormulaMultySumExpression: () => (/* binding */ FormulaMultySumExpression),
|
|
@@ -63691,7 +63746,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63691
63746
|
|
|
63692
63747
|
|
|
63693
63748
|
|
|
63694
|
-
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,
|
|
63749
|
+
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;
|
|
63695
63750
|
|
|
63696
63751
|
|
|
63697
63752
|
|
|
@@ -64644,47 +64699,81 @@ let MathContainer = (_dec153 = (0,_markupGenerator_Serializer_SugarSerializer__W
|
|
|
64644
64699
|
writable: true,
|
|
64645
64700
|
initializer: null
|
|
64646
64701
|
})), _class129)) || _class128);
|
|
64647
|
-
let
|
|
64702
|
+
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 {
|
|
64648
64703
|
constructor(...args) {
|
|
64649
64704
|
super(...args);
|
|
64650
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
64651
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
64652
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValuePath", _descriptor92, this);
|
|
64705
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor90, this);
|
|
64706
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValueExpression", _descriptor91, this);
|
|
64653
64707
|
}
|
|
64654
|
-
}, (_descriptor90 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "
|
|
64708
|
+
}, (_descriptor90 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceKeyPath", [_dec157], {
|
|
64655
64709
|
configurable: true,
|
|
64656
64710
|
enumerable: true,
|
|
64657
64711
|
writable: true,
|
|
64658
64712
|
initializer: null
|
|
64659
|
-
}), _descriptor91 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "
|
|
64713
|
+
}), _descriptor91 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class131.prototype, "sourceValueExpression", [_dec158], {
|
|
64660
64714
|
configurable: true,
|
|
64661
64715
|
enumerable: true,
|
|
64662
64716
|
writable: true,
|
|
64663
64717
|
initializer: null
|
|
64664
|
-
}),
|
|
64718
|
+
})), _class131)) || _class130);
|
|
64719
|
+
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 {
|
|
64720
|
+
constructor(...args) {
|
|
64721
|
+
super(...args);
|
|
64722
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dictPath", _descriptor92, this);
|
|
64723
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor93, this);
|
|
64724
|
+
}
|
|
64725
|
+
}, (_descriptor92 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "dictPath", [_dec160], {
|
|
64665
64726
|
configurable: true,
|
|
64666
64727
|
enumerable: true,
|
|
64667
64728
|
writable: true,
|
|
64668
64729
|
initializer: null
|
|
64669
|
-
})
|
|
64670
|
-
|
|
64730
|
+
}), _descriptor93 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "targetKeys", [_dec161], {
|
|
64731
|
+
configurable: true,
|
|
64732
|
+
enumerable: true,
|
|
64733
|
+
writable: true,
|
|
64734
|
+
initializer: null
|
|
64735
|
+
})), _class133)) || _class132);
|
|
64736
|
+
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 {
|
|
64671
64737
|
constructor(...args) {
|
|
64672
64738
|
super(...args);
|
|
64673
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys",
|
|
64674
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath",
|
|
64739
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor94, this);
|
|
64740
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor95, this);
|
|
64741
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceValuePath", _descriptor96, this);
|
|
64675
64742
|
}
|
|
64676
|
-
}, (
|
|
64743
|
+
}, (_descriptor94 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "targetKeys", [_dec163], {
|
|
64677
64744
|
configurable: true,
|
|
64678
64745
|
enumerable: true,
|
|
64679
64746
|
writable: true,
|
|
64680
64747
|
initializer: null
|
|
64681
|
-
}),
|
|
64748
|
+
}), _descriptor95 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "sourceKeyPath", [_dec164], {
|
|
64682
64749
|
configurable: true,
|
|
64683
64750
|
enumerable: true,
|
|
64684
64751
|
writable: true,
|
|
64685
64752
|
initializer: null
|
|
64686
|
-
})
|
|
64687
|
-
|
|
64753
|
+
}), _descriptor96 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class135.prototype, "sourceValuePath", [_dec165], {
|
|
64754
|
+
configurable: true,
|
|
64755
|
+
enumerable: true,
|
|
64756
|
+
writable: true,
|
|
64757
|
+
initializer: null
|
|
64758
|
+
})), _class135)) || _class134);
|
|
64759
|
+
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 {
|
|
64760
|
+
constructor(...args) {
|
|
64761
|
+
super(...args);
|
|
64762
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "targetKeys", _descriptor97, this);
|
|
64763
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "sourceKeyPath", _descriptor98, this);
|
|
64764
|
+
}
|
|
64765
|
+
}, (_descriptor97 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class137.prototype, "targetKeys", [_dec167], {
|
|
64766
|
+
configurable: true,
|
|
64767
|
+
enumerable: true,
|
|
64768
|
+
writable: true,
|
|
64769
|
+
initializer: null
|
|
64770
|
+
}), _descriptor98 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class137.prototype, "sourceKeyPath", [_dec168], {
|
|
64771
|
+
configurable: true,
|
|
64772
|
+
enumerable: true,
|
|
64773
|
+
writable: true,
|
|
64774
|
+
initializer: null
|
|
64775
|
+
})), _class137)) || _class136);
|
|
64776
|
+
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];
|
|
64688
64777
|
|
|
64689
64778
|
/***/ }),
|
|
64690
64779
|
|
|
@@ -69115,6 +69204,11 @@ class DecimalLiteralExpression extends FLangDecimalExpression {
|
|
|
69115
69204
|
}
|
|
69116
69205
|
}
|
|
69117
69206
|
class DictLiteralExpression extends FLangExpression {
|
|
69207
|
+
constructor(value) {
|
|
69208
|
+
super();
|
|
69209
|
+
this.value = void 0;
|
|
69210
|
+
this.value = value;
|
|
69211
|
+
}
|
|
69118
69212
|
getChildNodes() {
|
|
69119
69213
|
return [];
|
|
69120
69214
|
}
|
|
@@ -69122,7 +69216,9 @@ class DictLiteralExpression extends FLangExpression {
|
|
|
69122
69216
|
return BuildInTypeExpression.dict;
|
|
69123
69217
|
}
|
|
69124
69218
|
convertToString() {
|
|
69125
|
-
|
|
69219
|
+
var _this$value;
|
|
69220
|
+
const argument = this.value != undefined ? (_this$value = this.value) === null || _this$value === void 0 ? void 0 : _this$value.convertToString() : "";
|
|
69221
|
+
return `dict(${argument})`;
|
|
69126
69222
|
}
|
|
69127
69223
|
}
|
|
69128
69224
|
class BoolLiteralExpression extends ConstExpression {
|
|
@@ -70114,8 +70210,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70114
70210
|
/* harmony import */ var _Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/BuildIterationSequence */ "./Common/ModelPath/BuildIterationSequence.ts");
|
|
70115
70211
|
/* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
|
|
70116
70212
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
70117
|
-
/* harmony import */ var
|
|
70118
|
-
/* harmony import */ var
|
|
70213
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
70214
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
70215
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
70216
|
+
|
|
70119
70217
|
|
|
70120
70218
|
|
|
70121
70219
|
|
|
@@ -70133,7 +70231,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70133
70231
|
compileExpressionToFlangExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70134
70232
|
const resultExpr = this.compileExpressionToFlangExpressionInternal(expression, prefix, target, addPrecalculationRule);
|
|
70135
70233
|
// Если формула это только прямое обращение к значене, то трактовать его как строку
|
|
70136
|
-
if (resultExpr instanceof
|
|
70234
|
+
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) {
|
|
70137
70235
|
return resultExpr.targetExpression;
|
|
70138
70236
|
}
|
|
70139
70237
|
return resultExpr;
|
|
@@ -70150,24 +70248,24 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70150
70248
|
return this.compiledArgumentExpression(prefix, target, expression.select, "decimal", addPrecalculationRule);
|
|
70151
70249
|
}
|
|
70152
70250
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAbsExpression) {
|
|
70153
|
-
return new
|
|
70251
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AbsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70154
70252
|
}
|
|
70155
70253
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaXAbsExpression) {
|
|
70156
|
-
const expr = (0,
|
|
70157
|
-
return new
|
|
70254
|
+
const expr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
|
|
70255
|
+
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));
|
|
70158
70256
|
}
|
|
70159
70257
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaRoundExpression) {
|
|
70160
|
-
return new
|
|
70258
|
+
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));
|
|
70161
70259
|
}
|
|
70162
70260
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFloorExpression) {
|
|
70163
|
-
return new
|
|
70261
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.FloorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70164
70262
|
}
|
|
70165
70263
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaChooseExpression) {
|
|
70166
70264
|
const condExpr = this.compileExpressionToFlangExpressionInternal(expression.ifNode.condition, prefix, target, addPrecalculationRule);
|
|
70167
70265
|
const thenExpr = this.compileExpressionToFlangExpressionInternal(expression.thenNode.expression, prefix, target, addPrecalculationRule);
|
|
70168
70266
|
const elseExpr = this.compileExpressionToFlangExpressionInternal(expression.elseNode.expression, prefix, target, addPrecalculationRule);
|
|
70169
|
-
const castToStringRequired = thenExpr.getType() ===
|
|
70170
|
-
return new
|
|
70267
|
+
const castToStringRequired = thenExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string || elseExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.string;
|
|
70268
|
+
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);
|
|
70171
70269
|
}
|
|
70172
70270
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMultiplyExpression) {
|
|
70173
70271
|
return this.compileMultiplyExpression(expression, prefix, target, addPrecalculationRule);
|
|
@@ -70179,14 +70277,14 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70179
70277
|
return this.compileAndExpression(expression, prefix, target, addPrecalculationRule);
|
|
70180
70278
|
}
|
|
70181
70279
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNotExpression) {
|
|
70182
|
-
return new
|
|
70280
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NegateUnaryExpression(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
|
|
70183
70281
|
}
|
|
70184
70282
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaConstExpression) {
|
|
70185
70283
|
switch (expression.type) {
|
|
70186
70284
|
case "string":
|
|
70187
|
-
return new
|
|
70285
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(expression.value);
|
|
70188
70286
|
case "decimal":
|
|
70189
|
-
return new
|
|
70287
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(expression.value);
|
|
70190
70288
|
default:
|
|
70191
70289
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.NotSupportedError("Unknown constant type!");
|
|
70192
70290
|
}
|
|
@@ -70195,35 +70293,35 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70195
70293
|
return this.compileDivisionExpression(expression, prefix, target, addPrecalculationRule);
|
|
70196
70294
|
}
|
|
70197
70295
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMinusExpression) {
|
|
70198
|
-
return new
|
|
70296
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70199
70297
|
}
|
|
70200
70298
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGtExpression) {
|
|
70201
70299
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70202
70300
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70203
70301
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70204
70302
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70205
|
-
return new
|
|
70303
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GtExpression(left, right);
|
|
70206
70304
|
}
|
|
70207
70305
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLtExpression) {
|
|
70208
70306
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70209
70307
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70210
70308
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70211
70309
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70212
|
-
return new
|
|
70310
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LtExpression(left, right);
|
|
70213
70311
|
}
|
|
70214
70312
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGeExpression) {
|
|
70215
70313
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70216
70314
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70217
70315
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70218
70316
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70219
|
-
return new
|
|
70317
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GeExpression(left, right);
|
|
70220
70318
|
}
|
|
70221
70319
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLeExpression) {
|
|
70222
70320
|
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
70223
70321
|
const left = this.castOperandForComparisonExpression(expression.arguments[0], leftOperandExpression);
|
|
70224
70322
|
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
70225
70323
|
const right = this.castOperandForComparisonExpression(expression.arguments[1], rightOperandExpression);
|
|
70226
|
-
return new
|
|
70324
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LeExpression(left, right);
|
|
70227
70325
|
}
|
|
70228
70326
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaEqExpression) {
|
|
70229
70327
|
return this.compileEqExpression(prefix, target, expression, addPrecalculationRule);
|
|
@@ -70234,104 +70332,104 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70234
70332
|
// TODO: реализовать в рамках задачи https://yt.skbkontur.ru/issue/FS-7385
|
|
70235
70333
|
/* eslint-enable no-warning-comments */
|
|
70236
70334
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70237
|
-
return new
|
|
70335
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())));
|
|
70238
70336
|
}
|
|
70239
70337
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaWhenExpression) {
|
|
70240
70338
|
const condition = this.compileExpressionToFlangExpressionInternal(expression.expressions[0], prefix, target, addPrecalculationRule);
|
|
70241
70339
|
const thenExpression = this.compileExpressionToFlangExpressionInternal(expression.expressions[1], prefix, target, addPrecalculationRule);
|
|
70242
|
-
return new
|
|
70340
|
+
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)));
|
|
70243
70341
|
}
|
|
70244
70342
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaRegexMatchExpression) {
|
|
70245
70343
|
const arg = this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule);
|
|
70246
|
-
const correctedArg = (0,
|
|
70247
|
-
return new
|
|
70344
|
+
const correctedArg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.tryExtractValueReferenceAsStringFromDecimal)(arg);
|
|
70345
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.RegexMatchExpression(correctedArg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression(expression.pattern));
|
|
70248
70346
|
}
|
|
70249
70347
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaCountExpression) {
|
|
70250
|
-
return (0,
|
|
70348
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule, "Count"), 0);
|
|
70251
70349
|
}
|
|
70252
70350
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLengthExpression) {
|
|
70253
|
-
return new
|
|
70351
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.LenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule)));
|
|
70254
70352
|
}
|
|
70255
70353
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaConcatExpression) {
|
|
70256
70354
|
return this.compileConcatExpression(expression, prefix, target, addPrecalculationRule);
|
|
70257
70355
|
}
|
|
70258
70356
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaSubstringExpression) {
|
|
70259
70357
|
const arg = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70260
|
-
const argAsString = (0,
|
|
70261
|
-
return new
|
|
70358
|
+
const argAsString = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg, arg.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.decimal ? "G29" : undefined);
|
|
70359
|
+
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));
|
|
70262
70360
|
}
|
|
70263
70361
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNewLineExpression) {
|
|
70264
|
-
return new
|
|
70362
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("\r\n");
|
|
70265
70363
|
}
|
|
70266
70364
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaNoDepsNode) {
|
|
70267
70365
|
const noDepsExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70268
|
-
return new
|
|
70366
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(noDepsExpression);
|
|
70269
70367
|
}
|
|
70270
70368
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
|
|
70271
|
-
return new
|
|
70369
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DateNowExpression();
|
|
70272
70370
|
}
|
|
70273
70371
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDaysInMonthExpression) {
|
|
70274
|
-
return new
|
|
70372
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetDaysInMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70275
70373
|
}
|
|
70276
70374
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDayExpression) {
|
|
70277
|
-
return new
|
|
70375
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetDayExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70278
70376
|
}
|
|
70279
70377
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetMonthExpression) {
|
|
70280
|
-
return new
|
|
70378
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70281
70379
|
}
|
|
70282
70380
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetYearExpression) {
|
|
70283
|
-
return new
|
|
70381
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetYearExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70284
70382
|
}
|
|
70285
70383
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsDateExpression) {
|
|
70286
|
-
return new
|
|
70384
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsDateExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
70287
70385
|
}
|
|
70288
70386
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInMonthsExpression) {
|
|
70289
|
-
const expressions = expression.arguments.map(x => (0,
|
|
70290
|
-
return new
|
|
70387
|
+
const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
|
|
70388
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DifferenceInMonthsExpression(expressions);
|
|
70291
70389
|
}
|
|
70292
70390
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInDaysExpression) {
|
|
70293
|
-
const expressions = expression.arguments.map(x => (0,
|
|
70294
|
-
return new
|
|
70391
|
+
const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
|
|
70392
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DifferenceInDaysExpression(expressions);
|
|
70295
70393
|
}
|
|
70296
70394
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddDaysExpression) {
|
|
70297
|
-
return new
|
|
70395
|
+
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));
|
|
70298
70396
|
}
|
|
70299
70397
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddMonthsExpression) {
|
|
70300
|
-
return new
|
|
70398
|
+
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));
|
|
70301
70399
|
}
|
|
70302
70400
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaAddYearsExpression) {
|
|
70303
|
-
return new
|
|
70401
|
+
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));
|
|
70304
70402
|
}
|
|
70305
70403
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateToStringExpression) {
|
|
70306
70404
|
var _expression$format;
|
|
70307
|
-
return new
|
|
70405
|
+
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"));
|
|
70308
70406
|
}
|
|
70309
70407
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression) {
|
|
70310
|
-
return new
|
|
70408
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BuildInTypeExpression.dateTime);
|
|
70311
70409
|
}
|
|
70312
70410
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsSnilsExpression) {
|
|
70313
70411
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70314
|
-
return new
|
|
70412
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsSnilsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70315
70413
|
}
|
|
70316
70414
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsRegNumSfrExpression) {
|
|
70317
70415
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70318
|
-
return new
|
|
70416
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsRegNumSfrExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70319
70417
|
}
|
|
70320
70418
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsInnExpression) {
|
|
70321
70419
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70322
|
-
return new
|
|
70420
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsInnExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70323
70421
|
}
|
|
70324
70422
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidMirCardNumberExpression) {
|
|
70325
70423
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
70326
|
-
return new
|
|
70424
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.IsValidMirCardNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(arg));
|
|
70327
70425
|
}
|
|
70328
70426
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArrayExpression) {
|
|
70329
70427
|
const items = expression.items.map(arg => this.compileEnumerationItem(arg, prefix, target, addPrecalculationRule));
|
|
70330
|
-
return new
|
|
70428
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ArrayExpression(items);
|
|
70331
70429
|
}
|
|
70332
70430
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFirstOrDefaultExpression) {
|
|
70333
70431
|
const firstOrDefaultExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70334
|
-
return new
|
|
70432
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.FirstOrDefaultExpression(firstOrDefaultExpression);
|
|
70335
70433
|
}
|
|
70336
70434
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaHashSetExpression) {
|
|
70337
70435
|
if (expression.expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArgumentExpression) {
|
|
@@ -70347,21 +70445,21 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70347
70445
|
const lastStarIndexSecondPart = secondPartParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
70348
70446
|
const secondPartFinalParts = secondPartParts.slice(0, lastStarIndexSecondPart);
|
|
70349
70447
|
const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)([...firstPart.getPathParts(), ...secondPartFinalParts]).trimLastStarIfLastToken();
|
|
70350
|
-
return new
|
|
70448
|
+
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__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration(), "value")))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.HashSetExpression());
|
|
70351
70449
|
}
|
|
70352
70450
|
}
|
|
70353
70451
|
const hashSetExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
70354
|
-
return new
|
|
70452
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.HashSetExpression(hashSetExpression);
|
|
70355
70453
|
}
|
|
70356
70454
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression) {
|
|
70357
70455
|
const filterColumn = this.compileExpressionToFlangExpressionInternal(expression.filterColumn.filterColumn, prefix, target, addPrecalculationRule);
|
|
70358
70456
|
const filterKey = this.compileExpressionToFlangExpressionInternal(expression.filterKey.filterKey, prefix, target, addPrecalculationRule);
|
|
70359
|
-
return new
|
|
70457
|
+
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));
|
|
70360
70458
|
}
|
|
70361
70459
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidAccountNumberExpression) {
|
|
70362
70460
|
const bik = this.compiledArgumentExpression(prefix, target, expression.bik, "string", addPrecalculationRule);
|
|
70363
70461
|
const account = this.compiledArgumentExpression(prefix, target, expression.account, "string", addPrecalculationRule);
|
|
70364
|
-
return new
|
|
70462
|
+
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));
|
|
70365
70463
|
}
|
|
70366
70464
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGroupSumExpression) {
|
|
70367
70465
|
return this.compileGroupSumExpression(prefix, target, expression, addPrecalculationRule);
|
|
@@ -70369,18 +70467,24 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70369
70467
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGroupCountExpression) {
|
|
70370
70468
|
return this.compileGroupCountExpression(prefix, target, expression, addPrecalculationRule);
|
|
70371
70469
|
}
|
|
70470
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaMakeDictExpression) {
|
|
70471
|
+
return this.compileMakeDictExpression(prefix, target, expression, addPrecalculationRule);
|
|
70472
|
+
}
|
|
70473
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetSumByKeysExpression) {
|
|
70474
|
+
return this.compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule);
|
|
70475
|
+
}
|
|
70372
70476
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaOneOfExpression) {
|
|
70373
|
-
const arg = (0,
|
|
70374
|
-
const items = expression.items.expressions.map(item => (0,
|
|
70375
|
-
return new
|
|
70477
|
+
const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.argument, prefix, target, addPrecalculationRule));
|
|
70478
|
+
const items = expression.items.expressions.map(item => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(item, prefix, target, addPrecalculationRule)));
|
|
70479
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OneOfExpression(arg, items);
|
|
70376
70480
|
}
|
|
70377
70481
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaHasAutoFlagExpression) {
|
|
70378
|
-
const arg = (0,
|
|
70379
|
-
const valueRefExpression = arg instanceof
|
|
70482
|
+
const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule));
|
|
70483
|
+
const valueRefExpression = arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression ? arg : undefined;
|
|
70380
70484
|
if (valueRefExpression == undefined) {
|
|
70381
70485
|
throw new Error("hasAutoFlag supports only Argument expression (ValueReferenceExpression) as parameter.");
|
|
70382
70486
|
}
|
|
70383
|
-
const expr = new
|
|
70487
|
+
const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(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(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(valueRefExpression.modePath, "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("true")));
|
|
70384
70488
|
return expr;
|
|
70385
70489
|
}
|
|
70386
70490
|
throw new Error(`Unsupported type of node: ${expression.constructor.name}, ${expression.sourceXmlNode.name}`);
|
|
@@ -70389,7 +70493,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70389
70493
|
if (formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression || formulaExpression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
|
|
70390
70494
|
return flangExpression;
|
|
70391
70495
|
}
|
|
70392
|
-
return (0,
|
|
70496
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(flangExpression);
|
|
70393
70497
|
}
|
|
70394
70498
|
compileEqExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70395
70499
|
const left = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
@@ -70397,10 +70501,42 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70397
70501
|
|
|
70398
70502
|
// Сейчас в АР иногда проверку на decimal значение делаем через [Значение != "Какая-то строка"]
|
|
70399
70503
|
// Поэтому при такой проверке вычитываем поле "Значение" как строку
|
|
70400
|
-
if (left.getType() ===
|
|
70401
|
-
return new
|
|
70504
|
+
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) {
|
|
70505
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.EqExpression(left.targetExpression, right);
|
|
70402
70506
|
}
|
|
70403
|
-
return new
|
|
70507
|
+
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));
|
|
70508
|
+
}
|
|
70509
|
+
compileMakeDictExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70510
|
+
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70511
|
+
const sourceValueExpression = this.compileExpressionToFlangExpressionInternal(expression.sourceValueExpression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_7__.AbsoluteModelFieldPath(sourceKeyPath, "value"), addPrecalculationRule);
|
|
70512
|
+
const getOldSourceValueExpression = () => {
|
|
70513
|
+
if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70514
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(sourceValueExpression);
|
|
70515
|
+
}
|
|
70516
|
+
if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression && sourceValueExpression.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression) {
|
|
70517
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(sourceValueExpression.targetExpression), sourceValueExpression.targetType, sourceValueExpression.defaultValue);
|
|
70518
|
+
}
|
|
70519
|
+
if (sourceValueExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConstExpression) {
|
|
70520
|
+
return sourceValueExpression;
|
|
70521
|
+
}
|
|
70522
|
+
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)("SourceValueExpression for makeDict must be reference to value or constant. " + JSON.stringify(sourceValueExpression));
|
|
70523
|
+
};
|
|
70524
|
+
const oldSourceValueExpression = getOldSourceValueExpression();
|
|
70525
|
+
const matchedPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
70526
|
+
const firstPart = matchedPaths.matchedPath.toCurrentIteration();
|
|
70527
|
+
const secondPart = matchedPaths.differentPath;
|
|
70528
|
+
const finalIterPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(firstPart.joinWith(secondPart).getLastListPath());
|
|
70529
|
+
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));
|
|
70530
|
+
const oldKeys = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression([new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(sourceKeyPath.toCurrentIteration(), "value"))], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70531
|
+
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(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(target.path.toCurrentIteration(), "value"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DictLiteralExpression()));
|
|
70532
|
+
return reduceExpression;
|
|
70533
|
+
}
|
|
70534
|
+
compileGetSumByKeysExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70535
|
+
const dictPath = this.preparePathAndAdjustMultiplicity(prefix, expression.dictPath);
|
|
70536
|
+
const targetKeys = expression.targetKeys;
|
|
70537
|
+
const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression(targetKeys.items.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70538
|
+
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")), deserializedKeys !== null && deserializedKeys !== void 0 ? deserializedKeys : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)());
|
|
70539
|
+
return finalValueExpression;
|
|
70404
70540
|
}
|
|
70405
70541
|
compileGroupSumExpressionWithCustomValueExpression(prefix, target, targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule) {
|
|
70406
70542
|
const matchPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, sourceKeyPath);
|
|
@@ -70423,10 +70559,10 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70423
70559
|
if (finalIterPath.isEmpty()) {
|
|
70424
70560
|
throw new Error("Error occurred while trying parse path for reduce: " + firstPart.toLegacyPath());
|
|
70425
70561
|
}
|
|
70426
|
-
const keys = new
|
|
70427
|
-
const reduceExpression = new
|
|
70428
|
-
const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new
|
|
70429
|
-
const finalValueExpression = new
|
|
70562
|
+
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));
|
|
70563
|
+
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());
|
|
70564
|
+
const deserializedKeys = targetKeys.items[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression ? this.compileExpressionToFlangExpressionInternal(targetKeys.items[0], prefix, target, addPrecalculationRule) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DeserializeEnumerationExpression(targetKeys.items.map(i => this.compileEnumerationItem(i, prefix, target, addPrecalculationRule)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.BoolLiteralExpression(true));
|
|
70565
|
+
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)());
|
|
70430
70566
|
return finalValueExpression;
|
|
70431
70567
|
}
|
|
70432
70568
|
compileEnumerationItem(expression, prefix, target, addPrecalculationRule) {
|
|
@@ -70438,12 +70574,12 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70438
70574
|
compileGroupSumExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70439
70575
|
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70440
70576
|
const sourceValuePath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceValuePath);
|
|
70441
|
-
const sourceValueExpression = new
|
|
70577
|
+
const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(sourceValuePath.toCurrentIteration(), "value");
|
|
70442
70578
|
return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70443
70579
|
}
|
|
70444
70580
|
compileGroupCountExpression(prefix, target, expression, addPrecalculationRule) {
|
|
70445
70581
|
const sourceKeyPath = this.preparePathAndAdjustMultiplicity(prefix, expression.sourceKeyPath);
|
|
70446
|
-
const sourceValueExpression = new
|
|
70582
|
+
const sourceValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(1);
|
|
70447
70583
|
return this.compileGroupSumExpressionWithCustomValueExpression(prefix, target, expression.targetKeys, sourceKeyPath, sourceValueExpression, addPrecalculationRule);
|
|
70448
70584
|
}
|
|
70449
70585
|
compiledArgumentExpression(prefix, target, selectPath, selectType, addPrecalculationRule, aggregationFunction = "Sum") {
|
|
@@ -70451,46 +70587,46 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70451
70587
|
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
|
|
70452
70588
|
const baseSelectPath = splitInfo.matchedPath;
|
|
70453
70589
|
if (!splitInfo.differentPath.isContainIteration()) {
|
|
70454
|
-
const valueRefExpression = new
|
|
70455
|
-
const finalValue = splitInfo.differentPath.isEmpty() && target.field === "value" ? new
|
|
70456
|
-
return selectType === "decimal" ? (0,
|
|
70590
|
+
const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
|
|
70591
|
+
const finalValue = splitInfo.differentPath.isEmpty() && target.field === "value" ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(valueRefExpression) : valueRefExpression;
|
|
70592
|
+
return selectType === "decimal" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(finalValue) : finalValue;
|
|
70457
70593
|
} else {
|
|
70458
70594
|
var _countValueExpression;
|
|
70459
|
-
let resultValueExpression = new
|
|
70595
|
+
let resultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
|
|
70460
70596
|
let countValueExpression = undefined;
|
|
70461
70597
|
const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_4__.buildIterationSequence)(splitInfo.differentPath))];
|
|
70462
70598
|
for (const iterationEntry of iterationEntries) {
|
|
70463
70599
|
const iterablePath = baseSelectPath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(iterationEntry.iterable.getPathPartsAsArray()));
|
|
70464
70600
|
const suffixWithoutMultiple = iterationEntry.suffix.getPathPartsAsArray().filter(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken(x));
|
|
70465
|
-
const nextResultValueExpression = new
|
|
70466
|
-
const currentSumExpression = new
|
|
70467
|
-
const countResultValueExpression = new
|
|
70468
|
-
const currenCountExpression = new
|
|
70469
|
-
const sumReduceExpr = new
|
|
70470
|
-
addPrecalculationRule(new
|
|
70471
|
-
const countReduceExpr = new
|
|
70472
|
-
addPrecalculationRule(new
|
|
70601
|
+
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");
|
|
70602
|
+
const currentSumExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").toCurrentIteration().normalize(), "value");
|
|
70603
|
+
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");
|
|
70604
|
+
const currenCountExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").toCurrentIteration().normalize(), "value");
|
|
70605
|
+
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(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(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)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(nextResultValueExpression.modePath.toCurrentIteration(), nextResultValueExpression.valueName))), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NullLiteralExpression())));
|
|
70606
|
+
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(""))));
|
|
70607
|
+
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(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(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(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.GetOldExpression(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)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ValueReferenceExpression(countResultValueExpression.modePath.toCurrentIteration(), countResultValueExpression.valueName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.DecimalLiteralExpression(0)));
|
|
70608
|
+
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"))));
|
|
70473
70609
|
resultValueExpression = currentSumExpression;
|
|
70474
70610
|
countValueExpression = currenCountExpression;
|
|
70475
70611
|
}
|
|
70476
70612
|
const finalValue = aggregationFunction === "Sum" ? resultValueExpression : (_countValueExpression = countValueExpression) !== null && _countValueExpression !== void 0 ? _countValueExpression : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
|
|
70477
|
-
return selectType === "decimal" ? (0,
|
|
70613
|
+
return selectType === "decimal" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(finalValue) : finalValue;
|
|
70478
70614
|
}
|
|
70479
70615
|
}
|
|
70480
70616
|
compileSumExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70481
70617
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70482
|
-
const currExpr = new
|
|
70483
|
-
return acc != undefined ? new
|
|
70618
|
+
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));
|
|
70619
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.SumBinaryExpression(acc, currExpr) : currExpr;
|
|
70484
70620
|
}, undefined);
|
|
70485
70621
|
if (result == undefined) {
|
|
70486
70622
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
70487
70623
|
}
|
|
70488
|
-
return (0,
|
|
70624
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
70489
70625
|
}
|
|
70490
70626
|
compileConcatExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70491
70627
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70492
|
-
const currExpr = (0,
|
|
70493
|
-
return acc != undefined ? new
|
|
70628
|
+
const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule));
|
|
70629
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.ConcatStringsExpression(acc, currExpr) : currExpr;
|
|
70494
70630
|
}, undefined);
|
|
70495
70631
|
if (result == undefined) {
|
|
70496
70632
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
@@ -70500,7 +70636,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70500
70636
|
compileOrExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70501
70637
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70502
70638
|
const currExpr = this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule);
|
|
70503
|
-
return acc != undefined ? new
|
|
70639
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.OrBinaryExpression(acc, currExpr) : currExpr;
|
|
70504
70640
|
}, undefined);
|
|
70505
70641
|
if (result == undefined) {
|
|
70506
70642
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
@@ -70510,7 +70646,7 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70510
70646
|
compileAndExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70511
70647
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70512
70648
|
const currExpr = this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule);
|
|
70513
|
-
return acc != undefined ? new
|
|
70649
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.AndBinaryExpression(acc, currExpr) : currExpr;
|
|
70514
70650
|
}, undefined);
|
|
70515
70651
|
if (result == undefined) {
|
|
70516
70652
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
@@ -70519,24 +70655,24 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
70519
70655
|
}
|
|
70520
70656
|
compileMultiplyExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70521
70657
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70522
|
-
const expr = new
|
|
70523
|
-
return acc != undefined ? new
|
|
70658
|
+
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));
|
|
70659
|
+
return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_9__.MultiplyBinaryExpression(acc, expr) : expr;
|
|
70524
70660
|
}, undefined);
|
|
70525
70661
|
if (result == undefined) {
|
|
70526
70662
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
70527
70663
|
}
|
|
70528
|
-
return (0,
|
|
70664
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
70529
70665
|
}
|
|
70530
70666
|
compileDivisionExpression(expression, prefix, target, addPrecalculationRule) {
|
|
70531
|
-
const makeDivision = (numerator, denominator) => new
|
|
70667
|
+
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());
|
|
70532
70668
|
const result = expression.arguments.reduce((acc, curr) => {
|
|
70533
|
-
const currExpr = (0,
|
|
70669
|
+
const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(curr, prefix, target, addPrecalculationRule), 0);
|
|
70534
70670
|
return acc != undefined ? makeDivision(acc, currExpr) : currExpr;
|
|
70535
70671
|
}, undefined);
|
|
70536
70672
|
if (result == undefined) {
|
|
70537
70673
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.InvalidProgramStateError();
|
|
70538
70674
|
}
|
|
70539
|
-
return (0,
|
|
70675
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.wrapWithArgumentsCondition)(result);
|
|
70540
70676
|
}
|
|
70541
70677
|
preparePathAndAdjustMultiplicity(prefix, path) {
|
|
70542
70678
|
const resultPath = this.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path.replace(/\@/g, ""), "auto")).normalize());
|
|
@@ -97221,9 +97357,9 @@ function children(onlyTagName, nodeClasses = [], skipNodeNames = []) {
|
|
|
97221
97357
|
(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)));
|
|
97222
97358
|
};
|
|
97223
97359
|
}
|
|
97224
|
-
function singleChild(tagName, nodeClasses = []) {
|
|
97360
|
+
function singleChild(tagName, nodeClasses = [], dec) {
|
|
97225
97361
|
return (targetClass, propName) => {
|
|
97226
|
-
(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)));
|
|
97362
|
+
(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));
|
|
97227
97363
|
};
|
|
97228
97364
|
}
|
|
97229
97365
|
function attr(attrName, valueParser, dec) {
|