@kontur.candy/generator 5.7.1 → 5.8.0
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 +977 -201
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60678,9 +60678,6 @@ class ValidationHelper {
|
|
|
60678
60678
|
const m = parseInt((_v$2 = v[1]) !== null && _v$2 !== void 0 ? _v$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(), 10);
|
|
60679
60679
|
const y = parseInt((_v$3 = v[2]) !== null && _v$3 !== void 0 ? _v$3 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(), 10);
|
|
60680
60680
|
const o = new Date(Date.UTC(y, m - 1, d));
|
|
60681
|
-
|
|
60682
|
-
// o.setUTCHours(o.setUTCHours() + 2);//Orthodox Christmas magic in IE8 on new Date(2015,0,7)
|
|
60683
|
-
|
|
60684
60681
|
return o.getUTCDate() === d && o.getUTCMonth() + 1 === m && o.getUTCFullYear() === y;
|
|
60685
60682
|
}
|
|
60686
60683
|
return false;
|
|
@@ -60693,9 +60690,6 @@ class ValidationHelper {
|
|
|
60693
60690
|
const m = parseInt((_v$5 = v[1]) !== null && _v$5 !== void 0 ? _v$5 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(), 10);
|
|
60694
60691
|
const y = parseInt((_v$6 = v[0]) !== null && _v$6 !== void 0 ? _v$6 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)(), 10);
|
|
60695
60692
|
const o = new Date(Date.UTC(y, m - 1, d));
|
|
60696
|
-
|
|
60697
|
-
// o.setUTCHours(o.setUTCHours() + 2);//Orthodox Christmas magic in IE8 on new Date(2015,0,7)
|
|
60698
|
-
|
|
60699
60693
|
return o.getUTCDate() === d && o.getUTCMonth() + 1 === m && o.getUTCFullYear() === y;
|
|
60700
60694
|
}
|
|
60701
60695
|
return false;
|
|
@@ -60977,8 +60971,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
60977
60971
|
/* harmony export */ "comparator": () => (/* binding */ comparator),
|
|
60978
60972
|
/* harmony export */ "isValidStringDate": () => (/* binding */ isValidStringDate),
|
|
60979
60973
|
/* harmony export */ "isLessOrEqualStringDates": () => (/* binding */ isLessOrEqualStringDates),
|
|
60974
|
+
/* harmony export */ "getLastDateOfMonth": () => (/* binding */ getLastDateOfMonth),
|
|
60975
|
+
/* harmony export */ "differenceInMonths": () => (/* binding */ differenceInMonths),
|
|
60976
|
+
/* harmony export */ "differenceInDays": () => (/* binding */ differenceInDays),
|
|
60977
|
+
/* harmony export */ "convertDate": () => (/* binding */ convertDate),
|
|
60980
60978
|
/* harmony export */ "HelperFunctionsDateHelpers": () => (/* binding */ HelperFunctionsDateHelpers)
|
|
60981
60979
|
/* harmony export */ });
|
|
60980
|
+
/* harmony import */ var _Engine_ValidationHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Engine/ValidationHelper */ "./Engine/src/Engine/ValidationHelper.ts");
|
|
60981
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
60982
|
+
|
|
60983
|
+
|
|
60982
60984
|
function parseDateString(value) {
|
|
60983
60985
|
const [date, month, year] = (value || "").split(".").map(x => x ? Number(x) : undefined);
|
|
60984
60986
|
return {
|
|
@@ -61043,6 +61045,50 @@ function isLessOrEqualStringDates(a, b) {
|
|
|
61043
61045
|
}
|
|
61044
61046
|
return false;
|
|
61045
61047
|
}
|
|
61048
|
+
function getLastDateOfMonth(date) {
|
|
61049
|
+
const lastDateOfMonth = new Date(date.getUTCFullYear(), date.getUTCMonth() + 1, 0);
|
|
61050
|
+
return lastDateOfMonth.getDate();
|
|
61051
|
+
}
|
|
61052
|
+
function differenceInMonths(leftDate, rightDate) {
|
|
61053
|
+
const sign = rightDate > leftDate ? 1 : -1;
|
|
61054
|
+
const leastDate = rightDate >= leftDate ? leftDate : rightDate;
|
|
61055
|
+
const mostDate = rightDate >= leftDate ? rightDate : leftDate;
|
|
61056
|
+
const isFirstDay = leastDate.getDate() === 1;
|
|
61057
|
+
const isLastDay = mostDate.getDate() === getLastDateOfMonth(mostDate);
|
|
61058
|
+
let difference = (mostDate.getFullYear() - leastDate.getFullYear()) * 12;
|
|
61059
|
+
difference -= leastDate.getMonth();
|
|
61060
|
+
difference += mostDate.getMonth();
|
|
61061
|
+
const sameMonth = difference === 0;
|
|
61062
|
+
if (sameMonth) {
|
|
61063
|
+
if (isFirstDay && isLastDay) {
|
|
61064
|
+
return sign;
|
|
61065
|
+
}
|
|
61066
|
+
return 0;
|
|
61067
|
+
}
|
|
61068
|
+
difference--;
|
|
61069
|
+
if (isFirstDay) {
|
|
61070
|
+
difference++;
|
|
61071
|
+
}
|
|
61072
|
+
if (isLastDay) {
|
|
61073
|
+
difference++;
|
|
61074
|
+
}
|
|
61075
|
+
return difference * sign;
|
|
61076
|
+
}
|
|
61077
|
+
function differenceInDays(leftDate, rightDate) {
|
|
61078
|
+
const difference = (rightDate.getTime() - leftDate.getTime()) / (1000 * 3600 * 24);
|
|
61079
|
+
return Math.floor(difference);
|
|
61080
|
+
}
|
|
61081
|
+
function convertDate(dateValue) {
|
|
61082
|
+
var _v$, _v$2, _v$3;
|
|
61083
|
+
if (!_Engine_ValidationHelper__WEBPACK_IMPORTED_MODULE_0__.ValidationHelper.isDateFormat(dateValue)) {
|
|
61084
|
+
return null;
|
|
61085
|
+
}
|
|
61086
|
+
const v = dateValue.split(".");
|
|
61087
|
+
const d = parseInt((_v$ = v[0]) !== null && _v$ !== void 0 ? _v$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(), 10);
|
|
61088
|
+
const m = parseInt((_v$2 = v[1]) !== null && _v$2 !== void 0 ? _v$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(), 10);
|
|
61089
|
+
const y = parseInt((_v$3 = v[2]) !== null && _v$3 !== void 0 ? _v$3 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(), 10);
|
|
61090
|
+
return new Date(Date.UTC(y, m - 1, d));
|
|
61091
|
+
}
|
|
61046
61092
|
const HelperFunctionsDateHelpers = {
|
|
61047
61093
|
isValidDate: isValidDate,
|
|
61048
61094
|
parseDateString: parseDateString
|
|
@@ -61719,6 +61765,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61719
61765
|
/* harmony export */ "existsKCLangFunction": () => (/* binding */ existsKCLangFunction),
|
|
61720
61766
|
/* harmony export */ "isSnilsKCLangFunction": () => (/* binding */ isSnilsKCLangFunction),
|
|
61721
61767
|
/* harmony export */ "isInnKCLangFunction": () => (/* binding */ isInnKCLangFunction),
|
|
61768
|
+
/* harmony export */ "arrayKCLangFunction": () => (/* binding */ arrayKCLangFunction),
|
|
61769
|
+
/* harmony export */ "firstOrDefaultKCLangFunction": () => (/* binding */ firstOrDefaultKCLangFunction),
|
|
61770
|
+
/* harmony export */ "getPicklistValuesKCLangFunction": () => (/* binding */ getPicklistValuesKCLangFunction),
|
|
61722
61771
|
/* harmony export */ "isValidMirCardNumberKCLangFunction": () => (/* binding */ isValidMirCardNumberKCLangFunction),
|
|
61723
61772
|
/* harmony export */ "isValidAccountNumberKCLangFunction": () => (/* binding */ isValidAccountNumberKCLangFunction),
|
|
61724
61773
|
/* harmony export */ "countKCLangFunction": () => (/* binding */ countKCLangFunction),
|
|
@@ -61728,7 +61777,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61728
61777
|
/* harmony export */ "groupCountKCLangFunction": () => (/* binding */ groupCountKCLangFunction),
|
|
61729
61778
|
/* harmony export */ "concatKCLangFunction": () => (/* binding */ concatKCLangFunction),
|
|
61730
61779
|
/* harmony export */ "newlineKCLangFunction": () => (/* binding */ newlineKCLangFunction),
|
|
61731
|
-
/* harmony export */ "dateNowKCLangFunction": () => (/* binding */ dateNowKCLangFunction)
|
|
61780
|
+
/* harmony export */ "dateNowKCLangFunction": () => (/* binding */ dateNowKCLangFunction),
|
|
61781
|
+
/* harmony export */ "getDaysInMonthKCLangFunction": () => (/* binding */ getDaysInMonthKCLangFunction),
|
|
61782
|
+
/* harmony export */ "getDayKCLangFunction": () => (/* binding */ getDayKCLangFunction),
|
|
61783
|
+
/* harmony export */ "isDateInMonthKCLangFunction": () => (/* binding */ isDateInMonthKCLangFunction),
|
|
61784
|
+
/* harmony export */ "differenceInMonthsKCLangFunction": () => (/* binding */ differenceInMonthsKCLangFunction),
|
|
61785
|
+
/* harmony export */ "differenceInDaysKCLangFunction": () => (/* binding */ differenceInDaysKCLangFunction),
|
|
61786
|
+
/* harmony export */ "dateTimeKCLangFunction": () => (/* binding */ dateTimeKCLangFunction)
|
|
61732
61787
|
/* harmony export */ });
|
|
61733
61788
|
class ArgumentValidationError {
|
|
61734
61789
|
constructor(validationMessage) {
|
|
@@ -61905,13 +61960,68 @@ const isInnKCLangFunction = params => {
|
|
|
61905
61960
|
}
|
|
61906
61961
|
throw new Error("Invalid parameters!");
|
|
61907
61962
|
};
|
|
61908
|
-
const
|
|
61963
|
+
const arrayKCLangFunction = params => {
|
|
61964
|
+
const errors = Array.from(validateParams(params, 1));
|
|
61965
|
+
if (errors.length > 0) {
|
|
61966
|
+
return new FunctionValidationErrorCollection(errors);
|
|
61967
|
+
}
|
|
61968
|
+
return {
|
|
61969
|
+
type: "array",
|
|
61970
|
+
items: params.map(x => x.value)
|
|
61971
|
+
};
|
|
61972
|
+
};
|
|
61973
|
+
const firstOrDefaultKCLangFunction = params => {
|
|
61909
61974
|
var _params$12;
|
|
61910
61975
|
const errors = Array.from(validateParams(params, 1));
|
|
61911
61976
|
if (errors.length > 0) {
|
|
61912
61977
|
return new FunctionValidationErrorCollection(errors);
|
|
61913
61978
|
}
|
|
61914
|
-
const
|
|
61979
|
+
const expr = (_params$12 = params[0]) === null || _params$12 === void 0 ? void 0 : _params$12.value;
|
|
61980
|
+
if (expr === undefined) {
|
|
61981
|
+
throw new Error("first param in firstOrDefault must be defined");
|
|
61982
|
+
}
|
|
61983
|
+
return {
|
|
61984
|
+
type: "firstOrDefault",
|
|
61985
|
+
expression: expr
|
|
61986
|
+
};
|
|
61987
|
+
};
|
|
61988
|
+
const getPicklistValuesKCLangFunction = params => {
|
|
61989
|
+
var _params$13, _params$14, _params$15, _params$16;
|
|
61990
|
+
const errors = Array.from(validateParams(params, 4));
|
|
61991
|
+
if (errors.length > 0) {
|
|
61992
|
+
return new FunctionValidationErrorCollection(errors);
|
|
61993
|
+
}
|
|
61994
|
+
const gId = (_params$13 = params[0]) === null || _params$13 === void 0 ? void 0 : _params$13.value;
|
|
61995
|
+
const filterColumnParam = (_params$14 = params[1]) === null || _params$14 === void 0 ? void 0 : _params$14.value;
|
|
61996
|
+
const filterKeyParam = (_params$15 = params[2]) === null || _params$15 === void 0 ? void 0 : _params$15.value;
|
|
61997
|
+
const resultColumn = (_params$16 = params[3]) === null || _params$16 === void 0 ? void 0 : _params$16.value;
|
|
61998
|
+
if ((filterColumnParam === null || filterColumnParam === void 0 ? void 0 : filterColumnParam.type) !== "array") {
|
|
61999
|
+
throw new Error("second param in getPicklistValues must be wrapped in array( ... )");
|
|
62000
|
+
}
|
|
62001
|
+
if ((filterKeyParam === null || filterKeyParam === void 0 ? void 0 : filterKeyParam.type) !== "array") {
|
|
62002
|
+
throw new Error("third param in getPicklistValues must be wrapped in array( ... )");
|
|
62003
|
+
}
|
|
62004
|
+
if ((gId === null || gId === void 0 ? void 0 : gId.type) !== "const") {
|
|
62005
|
+
throw new Error("gid in getPicklistValue must be string");
|
|
62006
|
+
}
|
|
62007
|
+
if ((resultColumn === null || resultColumn === void 0 ? void 0 : resultColumn.type) !== "const") {
|
|
62008
|
+
throw new Error("columns in getPicklistValue must be string");
|
|
62009
|
+
}
|
|
62010
|
+
return {
|
|
62011
|
+
type: "getPicklistValues",
|
|
62012
|
+
gId: gId.value.value,
|
|
62013
|
+
filterColumn: filterColumnParam,
|
|
62014
|
+
filterKey: filterKeyParam,
|
|
62015
|
+
resultColumn: resultColumn.value.value
|
|
62016
|
+
};
|
|
62017
|
+
};
|
|
62018
|
+
const isValidMirCardNumberKCLangFunction = params => {
|
|
62019
|
+
var _params$17;
|
|
62020
|
+
const errors = Array.from(validateParams(params, 1));
|
|
62021
|
+
if (errors.length > 0) {
|
|
62022
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62023
|
+
}
|
|
62024
|
+
const argumentExpr = (_params$17 = params[0]) === null || _params$17 === void 0 ? void 0 : _params$17.value;
|
|
61915
62025
|
if ((argumentExpr === null || argumentExpr === void 0 ? void 0 : argumentExpr.type) === "argument") {
|
|
61916
62026
|
const param = argumentExpr.select;
|
|
61917
62027
|
if (param == undefined) {
|
|
@@ -61925,13 +62035,13 @@ const isValidMirCardNumberKCLangFunction = params => {
|
|
|
61925
62035
|
throw new Error("Invalid parameters!");
|
|
61926
62036
|
};
|
|
61927
62037
|
const isValidAccountNumberKCLangFunction = params => {
|
|
61928
|
-
var _params$
|
|
62038
|
+
var _params$18, _params$19;
|
|
61929
62039
|
const errors = Array.from(validateParams(params, 2));
|
|
61930
62040
|
if (errors.length > 0) {
|
|
61931
62041
|
return new FunctionValidationErrorCollection(errors);
|
|
61932
62042
|
}
|
|
61933
|
-
const bik = (_params$
|
|
61934
|
-
const account = (_params$
|
|
62043
|
+
const bik = (_params$18 = params[0]) === null || _params$18 === void 0 ? void 0 : _params$18.value;
|
|
62044
|
+
const account = (_params$19 = params[1]) === null || _params$19 === void 0 ? void 0 : _params$19.value;
|
|
61935
62045
|
if ((bik === null || bik === void 0 ? void 0 : bik.type) === "argument" && (account === null || account === void 0 ? void 0 : account.type) === "argument") {
|
|
61936
62046
|
const bikValue = bik.select;
|
|
61937
62047
|
const accountValue = account.select;
|
|
@@ -61947,12 +62057,12 @@ const isValidAccountNumberKCLangFunction = params => {
|
|
|
61947
62057
|
throw new Error("Invalid parameters!");
|
|
61948
62058
|
};
|
|
61949
62059
|
const countKCLangFunction = params => {
|
|
61950
|
-
var _params$
|
|
62060
|
+
var _params$20;
|
|
61951
62061
|
const errors = Array.from(validateParams(params, 1));
|
|
61952
62062
|
if (errors.length > 0) {
|
|
61953
62063
|
return new FunctionValidationErrorCollection(errors);
|
|
61954
62064
|
}
|
|
61955
|
-
const expr = (_params$
|
|
62065
|
+
const expr = (_params$20 = params[0]) === null || _params$20 === void 0 ? void 0 : _params$20.value;
|
|
61956
62066
|
if ((expr === null || expr === void 0 ? void 0 : expr.type) === "argument") {
|
|
61957
62067
|
const param = expr.select;
|
|
61958
62068
|
if (param == undefined) {
|
|
@@ -61966,12 +62076,12 @@ const countKCLangFunction = params => {
|
|
|
61966
62076
|
throw new Error("Invalid parameters!");
|
|
61967
62077
|
};
|
|
61968
62078
|
const sumKCLangFunction = params => {
|
|
61969
|
-
var _params$
|
|
62079
|
+
var _params$21;
|
|
61970
62080
|
const errors = Array.from(validateParams(params, 1));
|
|
61971
62081
|
if (errors.length > 0) {
|
|
61972
62082
|
return new FunctionValidationErrorCollection(errors);
|
|
61973
62083
|
}
|
|
61974
|
-
const argumentExpr = (_params$
|
|
62084
|
+
const argumentExpr = (_params$21 = params[0]) === null || _params$21 === void 0 ? void 0 : _params$21.value;
|
|
61975
62085
|
if ((argumentExpr === null || argumentExpr === void 0 ? void 0 : argumentExpr.type) === "argument") {
|
|
61976
62086
|
const param = argumentExpr.select;
|
|
61977
62087
|
if (param == undefined) {
|
|
@@ -61995,14 +62105,14 @@ const sumKCLangFunction = params => {
|
|
|
61995
62105
|
throw new Error("Invalid parameters!");
|
|
61996
62106
|
};
|
|
61997
62107
|
const substringKCLangFunction = params => {
|
|
61998
|
-
var _params$
|
|
62108
|
+
var _params$22, _params$23, _params$24;
|
|
61999
62109
|
const errors = Array.from(validateParams(params, 2, 1));
|
|
62000
62110
|
if (errors.length > 0) {
|
|
62001
62111
|
return new FunctionValidationErrorCollection(errors);
|
|
62002
62112
|
}
|
|
62003
|
-
const exprParam = (_params$
|
|
62004
|
-
const startParam = (_params$
|
|
62005
|
-
const lengthParam = (_params$
|
|
62113
|
+
const exprParam = (_params$22 = params[0]) === null || _params$22 === void 0 ? void 0 : _params$22.value;
|
|
62114
|
+
const startParam = (_params$23 = params[1]) === null || _params$23 === void 0 ? void 0 : _params$23.value;
|
|
62115
|
+
const lengthParam = (_params$24 = params[2]) === null || _params$24 === void 0 ? void 0 : _params$24.value;
|
|
62006
62116
|
if (exprParam == undefined) {
|
|
62007
62117
|
throw new Error("Unexpected error!");
|
|
62008
62118
|
}
|
|
@@ -62020,14 +62130,14 @@ const substringKCLangFunction = params => {
|
|
|
62020
62130
|
};
|
|
62021
62131
|
};
|
|
62022
62132
|
const groupSumKCLangFunction = params => {
|
|
62023
|
-
var _params$
|
|
62133
|
+
var _params$25, _params$26, _params$27;
|
|
62024
62134
|
const errors = Array.from(validateParams(params, 3));
|
|
62025
62135
|
if (errors.length > 0) {
|
|
62026
62136
|
return new FunctionValidationErrorCollection(errors);
|
|
62027
62137
|
}
|
|
62028
|
-
const targetKeyPathParam = (_params$
|
|
62029
|
-
const sourceKeyPathParam = (_params$
|
|
62030
|
-
const sourceValuePathParam = (_params$
|
|
62138
|
+
const targetKeyPathParam = (_params$25 = params[0]) === null || _params$25 === void 0 ? void 0 : _params$25.value;
|
|
62139
|
+
const sourceKeyPathParam = (_params$26 = params[1]) === null || _params$26 === void 0 ? void 0 : _params$26.value;
|
|
62140
|
+
const sourceValuePathParam = (_params$27 = params[2]) === null || _params$27 === void 0 ? void 0 : _params$27.value;
|
|
62031
62141
|
if ((targetKeyPathParam === null || targetKeyPathParam === void 0 ? void 0 : targetKeyPathParam.type) !== "argument" || (sourceKeyPathParam === null || sourceKeyPathParam === void 0 ? void 0 : sourceKeyPathParam.type) !== "argument" || (sourceValuePathParam === null || sourceValuePathParam === void 0 ? void 0 : sourceValuePathParam.type) !== "argument") {
|
|
62032
62142
|
const argumentsValidationError = new ArgumentValidationError("Expected 3 paths as arguments: targetKeyPath, sourceKeyPath, sourceValuePath");
|
|
62033
62143
|
return new FunctionValidationErrorCollection([argumentsValidationError]);
|
|
@@ -62040,13 +62150,13 @@ const groupSumKCLangFunction = params => {
|
|
|
62040
62150
|
};
|
|
62041
62151
|
};
|
|
62042
62152
|
const groupCountKCLangFunction = params => {
|
|
62043
|
-
var _params$
|
|
62153
|
+
var _params$28, _params$29;
|
|
62044
62154
|
const errors = Array.from(validateParams(params, 2));
|
|
62045
62155
|
if (errors.length > 0) {
|
|
62046
62156
|
return new FunctionValidationErrorCollection(errors);
|
|
62047
62157
|
}
|
|
62048
|
-
const targetKeyPathParam = (_params$
|
|
62049
|
-
const sourceKeyPathParam = (_params$
|
|
62158
|
+
const targetKeyPathParam = (_params$28 = params[0]) === null || _params$28 === void 0 ? void 0 : _params$28.value;
|
|
62159
|
+
const sourceKeyPathParam = (_params$29 = params[1]) === null || _params$29 === void 0 ? void 0 : _params$29.value;
|
|
62050
62160
|
if ((targetKeyPathParam === null || targetKeyPathParam === void 0 ? void 0 : targetKeyPathParam.type) !== "argument" || (sourceKeyPathParam === null || sourceKeyPathParam === void 0 ? void 0 : sourceKeyPathParam.type) !== "argument") {
|
|
62051
62161
|
const argumentsValidationError = new ArgumentValidationError("Expected 2 paths as arguments: targetKeyPath, sourceKeyPath");
|
|
62052
62162
|
return new FunctionValidationErrorCollection([argumentsValidationError]);
|
|
@@ -62085,6 +62195,86 @@ const dateNowKCLangFunction = params => {
|
|
|
62085
62195
|
type: "dateNow"
|
|
62086
62196
|
};
|
|
62087
62197
|
};
|
|
62198
|
+
const getDaysInMonthKCLangFunction = params => {
|
|
62199
|
+
var _params$30;
|
|
62200
|
+
const errors = Array.from(validateParams(params, 1));
|
|
62201
|
+
if (errors.length > 0) {
|
|
62202
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62203
|
+
}
|
|
62204
|
+
const param = (_params$30 = params[0]) === null || _params$30 === void 0 ? void 0 : _params$30.value;
|
|
62205
|
+
if (param == undefined) {
|
|
62206
|
+
throw new Error("Unexpected error!");
|
|
62207
|
+
}
|
|
62208
|
+
return {
|
|
62209
|
+
type: "getDaysInMonth",
|
|
62210
|
+
expression: param
|
|
62211
|
+
};
|
|
62212
|
+
};
|
|
62213
|
+
const getDayKCLangFunction = params => {
|
|
62214
|
+
var _params$31;
|
|
62215
|
+
const errors = Array.from(validateParams(params, 1));
|
|
62216
|
+
if (errors.length > 0) {
|
|
62217
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62218
|
+
}
|
|
62219
|
+
const param = (_params$31 = params[0]) === null || _params$31 === void 0 ? void 0 : _params$31.value;
|
|
62220
|
+
if (param == undefined) {
|
|
62221
|
+
throw new Error("Unexpected error!");
|
|
62222
|
+
}
|
|
62223
|
+
return {
|
|
62224
|
+
type: "getDay",
|
|
62225
|
+
expression: param
|
|
62226
|
+
};
|
|
62227
|
+
};
|
|
62228
|
+
const isDateInMonthKCLangFunction = params => {
|
|
62229
|
+
var _params$32;
|
|
62230
|
+
const errors = Array.from(validateParams(params, 1));
|
|
62231
|
+
if (errors.length > 0) {
|
|
62232
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62233
|
+
}
|
|
62234
|
+
const param = (_params$32 = params[0]) === null || _params$32 === void 0 ? void 0 : _params$32.value;
|
|
62235
|
+
if (param == undefined) {
|
|
62236
|
+
throw new Error("Unexpected error!");
|
|
62237
|
+
}
|
|
62238
|
+
return {
|
|
62239
|
+
type: "isDate",
|
|
62240
|
+
expression: param
|
|
62241
|
+
};
|
|
62242
|
+
};
|
|
62243
|
+
const differenceInMonthsKCLangFunction = params => {
|
|
62244
|
+
const errors = Array.from(validateParams(params, 2));
|
|
62245
|
+
if (errors.length > 0) {
|
|
62246
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62247
|
+
}
|
|
62248
|
+
return {
|
|
62249
|
+
type: "differenceInMonths",
|
|
62250
|
+
expressions: params.map(x => x.value)
|
|
62251
|
+
};
|
|
62252
|
+
};
|
|
62253
|
+
const differenceInDaysKCLangFunction = params => {
|
|
62254
|
+
const errors = Array.from(validateParams(params, 2));
|
|
62255
|
+
if (errors.length > 0) {
|
|
62256
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62257
|
+
}
|
|
62258
|
+
return {
|
|
62259
|
+
type: "differenceInDays",
|
|
62260
|
+
expressions: params.map(x => x.value)
|
|
62261
|
+
};
|
|
62262
|
+
};
|
|
62263
|
+
const dateTimeKCLangFunction = params => {
|
|
62264
|
+
var _params$33;
|
|
62265
|
+
const errors = Array.from(validateParams(params, 1));
|
|
62266
|
+
if (errors.length > 0) {
|
|
62267
|
+
return new FunctionValidationErrorCollection(errors);
|
|
62268
|
+
}
|
|
62269
|
+
const param = (_params$33 = params[0]) === null || _params$33 === void 0 ? void 0 : _params$33.value;
|
|
62270
|
+
if (param == undefined) {
|
|
62271
|
+
throw new Error("Unexpected error!");
|
|
62272
|
+
}
|
|
62273
|
+
return {
|
|
62274
|
+
type: "dateTime",
|
|
62275
|
+
expression: param
|
|
62276
|
+
};
|
|
62277
|
+
};
|
|
62088
62278
|
|
|
62089
62279
|
/***/ }),
|
|
62090
62280
|
|
|
@@ -62121,8 +62311,11 @@ const getKCLangGlobalFunctionBuilders = () => ({
|
|
|
62121
62311
|
exists: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.existsKCLangFunction],
|
|
62122
62312
|
isSnils: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.isSnilsKCLangFunction],
|
|
62123
62313
|
isInn: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.isInnKCLangFunction],
|
|
62314
|
+
firstOrDefault: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.firstOrDefaultKCLangFunction],
|
|
62124
62315
|
isValidAccountNumber: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.isValidAccountNumberKCLangFunction],
|
|
62125
62316
|
isValidMirCardNumber: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.isValidMirCardNumberKCLangFunction],
|
|
62317
|
+
getPicklistValues: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.getPicklistValuesKCLangFunction],
|
|
62318
|
+
array: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.arrayKCLangFunction],
|
|
62126
62319
|
sum: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.sumKCLangFunction],
|
|
62127
62320
|
substring: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.substringKCLangFunction],
|
|
62128
62321
|
count: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.countKCLangFunction],
|
|
@@ -62130,7 +62323,13 @@ const getKCLangGlobalFunctionBuilders = () => ({
|
|
|
62130
62323
|
groupCount: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.groupCountKCLangFunction],
|
|
62131
62324
|
concat: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.concatKCLangFunction],
|
|
62132
62325
|
newline: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.newlineKCLangFunction],
|
|
62133
|
-
dateNow: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateNowKCLangFunction]
|
|
62326
|
+
dateNow: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateNowKCLangFunction],
|
|
62327
|
+
getDaysInMonth: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.getDaysInMonthKCLangFunction],
|
|
62328
|
+
getDay: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.getDayKCLangFunction],
|
|
62329
|
+
isDate: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.isDateInMonthKCLangFunction],
|
|
62330
|
+
differenceInMonths: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.differenceInMonthsKCLangFunction],
|
|
62331
|
+
differenceInDays: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.differenceInDaysKCLangFunction],
|
|
62332
|
+
dateTime: [_KCLangAntlrFunctions__WEBPACK_IMPORTED_MODULE_2__.dateTimeKCLangFunction]
|
|
62134
62333
|
});
|
|
62135
62334
|
class ErrorListener {
|
|
62136
62335
|
constructor() {
|
|
@@ -62526,6 +62725,36 @@ class KCLangAntlrVisitor {
|
|
|
62526
62725
|
type: "argument"
|
|
62527
62726
|
};
|
|
62528
62727
|
}
|
|
62728
|
+
visitInterpolate(ctx) {
|
|
62729
|
+
return ctx.interpolationExpression().accept(this);
|
|
62730
|
+
}
|
|
62731
|
+
visitInterpolationExpression(ctx) {
|
|
62732
|
+
return {
|
|
62733
|
+
type: "interpolationExpression",
|
|
62734
|
+
context: ctx.descriptionToken().map(token => token.accept(this))
|
|
62735
|
+
};
|
|
62736
|
+
}
|
|
62737
|
+
visitDescriptionToken(ctx) {
|
|
62738
|
+
const interpolationResult = ctx.interpolation();
|
|
62739
|
+
if (interpolationResult) {
|
|
62740
|
+
// значение внутри - { }
|
|
62741
|
+
return interpolationResult.interpolationContent().accept(this);
|
|
62742
|
+
}
|
|
62743
|
+
|
|
62744
|
+
// текст вокруг
|
|
62745
|
+
return {
|
|
62746
|
+
type: "interpolationDescriptionToken",
|
|
62747
|
+
tokenType: "text",
|
|
62748
|
+
text: ctx.text
|
|
62749
|
+
};
|
|
62750
|
+
}
|
|
62751
|
+
visitInterpolationContent(ctx) {
|
|
62752
|
+
return {
|
|
62753
|
+
type: "interpolationDescriptionToken",
|
|
62754
|
+
tokenType: "path",
|
|
62755
|
+
text: ctx.text
|
|
62756
|
+
};
|
|
62757
|
+
}
|
|
62529
62758
|
visitIncompletePath(ctx) {
|
|
62530
62759
|
const path = ctx.relativePath();
|
|
62531
62760
|
if (path == undefined) {
|
|
@@ -69591,6 +69820,33 @@ function traverseKCLangExpression(node, visitor) {
|
|
|
69591
69820
|
case "dateNow":
|
|
69592
69821
|
visitor.visitDateNowKCLangNode(node);
|
|
69593
69822
|
break;
|
|
69823
|
+
case "getDaysInMonth":
|
|
69824
|
+
visitor.visitGetDaysInMonthKCLangNode(node);
|
|
69825
|
+
break;
|
|
69826
|
+
case "getDay":
|
|
69827
|
+
visitor.visitGetDayKCLangNode(node);
|
|
69828
|
+
break;
|
|
69829
|
+
case "isDate":
|
|
69830
|
+
visitor.visitIsDateKCLangNode(node);
|
|
69831
|
+
break;
|
|
69832
|
+
case "differenceInMonths":
|
|
69833
|
+
visitor.visitDifferenceInMonthsKCLangNode(node);
|
|
69834
|
+
break;
|
|
69835
|
+
case "differenceInDays":
|
|
69836
|
+
visitor.visitDifferenceInDaysKCLangNode(node);
|
|
69837
|
+
break;
|
|
69838
|
+
case "dateTime":
|
|
69839
|
+
visitor.visitDateTimeKCLangNode(node);
|
|
69840
|
+
break;
|
|
69841
|
+
case "getPicklistValues":
|
|
69842
|
+
visitor.visitGetPicklistValuesKCLangNode(node);
|
|
69843
|
+
break;
|
|
69844
|
+
case "array":
|
|
69845
|
+
visitor.visitArrayKCLangNode(node);
|
|
69846
|
+
break;
|
|
69847
|
+
case "firstOrDefault":
|
|
69848
|
+
visitor.visitFirstOrDefaultKCLangNode(node);
|
|
69849
|
+
break;
|
|
69594
69850
|
default:
|
|
69595
69851
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.ensureNever)(node);
|
|
69596
69852
|
break;
|
|
@@ -69600,6 +69856,15 @@ class DefaultKCLangExpressionVisitor {
|
|
|
69600
69856
|
visitAbsKCLangNode(node) {
|
|
69601
69857
|
// default empty implementation
|
|
69602
69858
|
}
|
|
69859
|
+
visitArrayKCLangNode(node) {
|
|
69860
|
+
// default empty implementation
|
|
69861
|
+
}
|
|
69862
|
+
visitFirstOrDefaultKCLangNode(node) {
|
|
69863
|
+
// default empty implementation
|
|
69864
|
+
}
|
|
69865
|
+
visitGetPicklistValuesKCLangNode(node) {
|
|
69866
|
+
// default empty implementation
|
|
69867
|
+
}
|
|
69603
69868
|
visitAndKCLangNode(node) {
|
|
69604
69869
|
// default empty implementation
|
|
69605
69870
|
}
|
|
@@ -69690,6 +69955,24 @@ class DefaultKCLangExpressionVisitor {
|
|
|
69690
69955
|
visitDateNowKCLangNode(node) {
|
|
69691
69956
|
// default empty implementation
|
|
69692
69957
|
}
|
|
69958
|
+
visitGetDaysInMonthKCLangNode(node) {
|
|
69959
|
+
// default empty implementation
|
|
69960
|
+
}
|
|
69961
|
+
visitGetDayKCLangNode(node) {
|
|
69962
|
+
// default empty implementation
|
|
69963
|
+
}
|
|
69964
|
+
visitIsDateKCLangNode(node) {
|
|
69965
|
+
// default empty implementation
|
|
69966
|
+
}
|
|
69967
|
+
visitDifferenceInMonthsKCLangNode(node) {
|
|
69968
|
+
// default empty implementation
|
|
69969
|
+
}
|
|
69970
|
+
visitDifferenceInDaysKCLangNode(node) {
|
|
69971
|
+
// default empty implementation
|
|
69972
|
+
}
|
|
69973
|
+
visitDateTimeKCLangNode(node) {
|
|
69974
|
+
// default empty implementation
|
|
69975
|
+
}
|
|
69693
69976
|
}
|
|
69694
69977
|
|
|
69695
69978
|
/***/ }),
|
|
@@ -70024,6 +70307,15 @@ const getGenerateJsExpressionFunc = options => {
|
|
|
70024
70307
|
case "count":
|
|
70025
70308
|
case "groupCount":
|
|
70026
70309
|
case "groupSum":
|
|
70310
|
+
case "getDaysInMonth":
|
|
70311
|
+
case "getDay":
|
|
70312
|
+
case "isDate":
|
|
70313
|
+
case "differenceInMonths":
|
|
70314
|
+
case "differenceInDays":
|
|
70315
|
+
case "dateTime":
|
|
70316
|
+
case "getPicklistValues":
|
|
70317
|
+
case "array":
|
|
70318
|
+
case "firstOrDefault":
|
|
70027
70319
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
70028
70320
|
case "concat":
|
|
70029
70321
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotImplementedError();
|
|
@@ -70094,6 +70386,7 @@ function generateKCXmlExpression(expression) {
|
|
|
70094
70386
|
switch (expression.type) {
|
|
70095
70387
|
case "abs":
|
|
70096
70388
|
case "xabs":
|
|
70389
|
+
case "firstOrDefault":
|
|
70097
70390
|
case "length":
|
|
70098
70391
|
return [`<m:${expression.type}>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
70099
70392
|
case "exists":
|
|
@@ -70117,6 +70410,10 @@ function generateKCXmlExpression(expression) {
|
|
|
70117
70410
|
case "or":
|
|
70118
70411
|
case "concat":
|
|
70119
70412
|
return [`<m:${expression.type}>`, ...expression.expressions.map(generateKCXmlExpression).map(x => (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(x, 1)), `</m:${expression.type}>`].join("\n");
|
|
70413
|
+
case "array":
|
|
70414
|
+
return [`<m:${expression.type}>`, ...expression.items.map(generateKCXmlExpression).map(x => (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(x, 1)), `</m:${expression.type}>`].join("\n");
|
|
70415
|
+
case "getPicklistValues":
|
|
70416
|
+
return [`<m:${expression.type} gId="${expression.gId}" resultColumn="${expression.resultColumn}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(`<m:filtercolumn>`, 1), (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.filterColumn), 2), (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(`</m:filtercolumn>`, 1), (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(`<m:filterkey>`, 1), (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.filterKey), 2), (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(`</m:filterkey>`, 1), `</m:${expression.type}>`].join("\n");
|
|
70120
70417
|
case "sum":
|
|
70121
70418
|
return [`<m:sum>`, ...expression.operands.map(operand => {
|
|
70122
70419
|
if (operand.operator === "+") {
|
|
@@ -70147,6 +70444,14 @@ function generateKCXmlExpression(expression) {
|
|
|
70147
70444
|
return [expression.length != undefined ? `<m:substring start="${expression.start}" length="${expression.length}">` : `<m:substring start="${expression.start}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:substring>`].join("\n");
|
|
70148
70445
|
case "dateNow":
|
|
70149
70446
|
return `<m:dateNow />`;
|
|
70447
|
+
case "getDaysInMonth":
|
|
70448
|
+
case "getDay":
|
|
70449
|
+
case "isDate":
|
|
70450
|
+
case "dateTime":
|
|
70451
|
+
return [`<m:${expression.type}>`, expression.expression.type === "argument" ? (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(`<m:argument select="${expression.expression.select}" type="string" />`, 1) : (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression), 1), `</m:${expression.type}>`].join("\n");
|
|
70452
|
+
case "differenceInMonths":
|
|
70453
|
+
case "differenceInDays":
|
|
70454
|
+
return [`<m:${expression.type}>`, ...expression.expressions.map(x => x.type === "argument" ? `<m:argument select="${x.select}" type="string" />` : generateKCXmlExpression(x)).map(x => (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(x, 1)), `</m:${expression.type}>`].join("\n");
|
|
70150
70455
|
case "newline":
|
|
70151
70456
|
return `<m:newline />`;
|
|
70152
70457
|
case "regexMatch":
|
|
@@ -75496,11 +75801,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
75496
75801
|
/* harmony export */ "FormulaSubstringExpression": () => (/* binding */ FormulaSubstringExpression),
|
|
75497
75802
|
/* harmony export */ "FormulaCastExpression": () => (/* binding */ FormulaCastExpression),
|
|
75498
75803
|
/* harmony export */ "FormulaDateNowExpression": () => (/* binding */ FormulaDateNowExpression),
|
|
75804
|
+
/* harmony export */ "FormulaGetDaysInMonthExpression": () => (/* binding */ FormulaGetDaysInMonthExpression),
|
|
75805
|
+
/* harmony export */ "FormulaGetDayExpression": () => (/* binding */ FormulaGetDayExpression),
|
|
75806
|
+
/* harmony export */ "FormulaIsDateExpression": () => (/* binding */ FormulaIsDateExpression),
|
|
75807
|
+
/* harmony export */ "FormulaDifferenceInMonthsExpression": () => (/* binding */ FormulaDifferenceInMonthsExpression),
|
|
75808
|
+
/* harmony export */ "FormulaDifferenceInDaysExpression": () => (/* binding */ FormulaDifferenceInDaysExpression),
|
|
75809
|
+
/* harmony export */ "FormulaDateTimeExpression": () => (/* binding */ FormulaDateTimeExpression),
|
|
75499
75810
|
/* harmony export */ "FormulaIsSnilsExpression": () => (/* binding */ FormulaIsSnilsExpression),
|
|
75500
75811
|
/* harmony export */ "FormulaIsInnExpression": () => (/* binding */ FormulaIsInnExpression),
|
|
75501
75812
|
/* harmony export */ "FormulaIsValidMirCardNumberExpression": () => (/* binding */ FormulaIsValidMirCardNumberExpression),
|
|
75502
75813
|
/* harmony export */ "FormulaIsValidAccountNumberExpression": () => (/* binding */ FormulaIsValidAccountNumberExpression),
|
|
75503
75814
|
/* harmony export */ "FormulaArgumentExpression": () => (/* binding */ FormulaArgumentExpression),
|
|
75815
|
+
/* harmony export */ "FormulaArrayExpression": () => (/* binding */ FormulaArrayExpression),
|
|
75816
|
+
/* harmony export */ "FormulaFilterColumnExpression": () => (/* binding */ FormulaFilterColumnExpression),
|
|
75817
|
+
/* harmony export */ "FormulaFilterKeyExpression": () => (/* binding */ FormulaFilterKeyExpression),
|
|
75818
|
+
/* harmony export */ "FormulaGetPicklistValuesExpression": () => (/* binding */ FormulaGetPicklistValuesExpression),
|
|
75819
|
+
/* harmony export */ "FormulaFirstOrDefaultExpression": () => (/* binding */ FormulaFirstOrDefaultExpression),
|
|
75504
75820
|
/* harmony export */ "FormulaExistsExpression": () => (/* binding */ FormulaExistsExpression),
|
|
75505
75821
|
/* harmony export */ "FormulaMultySumExpression": () => (/* binding */ FormulaMultySumExpression),
|
|
75506
75822
|
/* harmony export */ "FormulaCountExpression": () => (/* binding */ FormulaCountExpression),
|
|
@@ -75525,7 +75841,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
75525
75841
|
|
|
75526
75842
|
|
|
75527
75843
|
|
|
75528
|
-
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class4, _dec4, _dec5, _class5, _class6, _descriptor2, _dec6, _dec7, _dec8, _dec9, _class8, _class9, _descriptor3, _descriptor4, _descriptor5, _dec10, _dec11, _dec12, _class11, _class12, _descriptor6, _descriptor7, _dec13, _dec14, _class14, _class15, _descriptor8, _dec15, _dec16, _class17, _class18, _descriptor9, _dec17, _dec18, _class20, _class21, _descriptor10, _dec19, _dec20, _class23, _class24, _descriptor11, _dec21, _dec22, _dec23, _class26, _class27, _descriptor12, _descriptor13, _dec24, _dec25, _dec26, _class29, _class30, _descriptor14, _descriptor15, _dec27, _dec28, _class32, _class33, _descriptor16, _dec29, _dec30, _class35, _class36, _descriptor17, _dec31, _dec32, _class38, _class39, _descriptor18, _dec33, _dec34, _class41, _class42, _descriptor19, _dec35, _dec36, _class44, _class45, _descriptor20, _dec37, _dec38, _class47, _class48, _descriptor21, _dec39, _dec40, _class50, _class51, _descriptor22, _dec41, _dec42, _class53, _class54, _descriptor23, _dec43, _dec44, _class56, _class57, _descriptor24, _dec45, _dec46, _dec47, _dec48, _class59, _class60, _descriptor25, _descriptor26, _descriptor27, _dec49, _dec50, _class62, _class63, _descriptor28, _dec51, _dec52, _class65, _class66, _descriptor29, _dec53, _dec54, _dec55, _class68, _class69, _descriptor30, _descriptor31, _dec56, _dec57, _class71, _class72, _descriptor32, _dec58, _dec59, _class74, _class75, _descriptor33, _dec60, _dec61, _class77, _class78, _descriptor34, _dec62, _dec63, _class80, _class81, _descriptor35, _dec64, _dec65, _dec66, _class83, _class84, _descriptor36, _descriptor37, _dec67, _dec68, _dec69, _dec70, _class86, _class87, _descriptor38, _descriptor39, _descriptor40, _dec71, _dec72, _dec73, _class89, _class90, _descriptor41, _descriptor42, _dec74, _class92, _dec75, _dec76, _class93, _class94, _descriptor43, _dec77, _dec78, _class96, _class97, _descriptor44, _dec79, _dec80, _class99, _class100, _descriptor45, _dec81, _dec82,
|
|
75844
|
+
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _class4, _dec4, _dec5, _class5, _class6, _descriptor2, _dec6, _dec7, _dec8, _dec9, _class8, _class9, _descriptor3, _descriptor4, _descriptor5, _dec10, _dec11, _dec12, _class11, _class12, _descriptor6, _descriptor7, _dec13, _dec14, _class14, _class15, _descriptor8, _dec15, _dec16, _class17, _class18, _descriptor9, _dec17, _dec18, _class20, _class21, _descriptor10, _dec19, _dec20, _class23, _class24, _descriptor11, _dec21, _dec22, _dec23, _class26, _class27, _descriptor12, _descriptor13, _dec24, _dec25, _dec26, _class29, _class30, _descriptor14, _descriptor15, _dec27, _dec28, _class32, _class33, _descriptor16, _dec29, _dec30, _class35, _class36, _descriptor17, _dec31, _dec32, _class38, _class39, _descriptor18, _dec33, _dec34, _class41, _class42, _descriptor19, _dec35, _dec36, _class44, _class45, _descriptor20, _dec37, _dec38, _class47, _class48, _descriptor21, _dec39, _dec40, _class50, _class51, _descriptor22, _dec41, _dec42, _class53, _class54, _descriptor23, _dec43, _dec44, _class56, _class57, _descriptor24, _dec45, _dec46, _dec47, _dec48, _class59, _class60, _descriptor25, _descriptor26, _descriptor27, _dec49, _dec50, _class62, _class63, _descriptor28, _dec51, _dec52, _class65, _class66, _descriptor29, _dec53, _dec54, _dec55, _class68, _class69, _descriptor30, _descriptor31, _dec56, _dec57, _class71, _class72, _descriptor32, _dec58, _dec59, _class74, _class75, _descriptor33, _dec60, _dec61, _class77, _class78, _descriptor34, _dec62, _dec63, _class80, _class81, _descriptor35, _dec64, _dec65, _dec66, _class83, _class84, _descriptor36, _descriptor37, _dec67, _dec68, _dec69, _dec70, _class86, _class87, _descriptor38, _descriptor39, _descriptor40, _dec71, _dec72, _dec73, _class89, _class90, _descriptor41, _descriptor42, _dec74, _class92, _dec75, _dec76, _class93, _class94, _descriptor43, _dec77, _dec78, _class96, _class97, _descriptor44, _dec79, _dec80, _class99, _class100, _descriptor45, _dec81, _dec82, _class102, _class103, _descriptor46, _dec83, _dec84, _class105, _class106, _descriptor47, _dec85, _dec86, _class108, _class109, _descriptor48, _dec87, _dec88, _class111, _class112, _descriptor49, _dec89, _dec90, _class114, _class115, _descriptor50, _dec91, _dec92, _class117, _class118, _descriptor51, _dec93, _dec94, _dec95, _class120, _class121, _descriptor52, _descriptor53, _dec96, _dec97, _dec98, _class123, _class124, _descriptor54, _descriptor55, _dec99, _dec100, _class126, _class127, _descriptor56, _dec101, _dec102, _class129, _class130, _descriptor57, _dec103, _dec104, _class132, _class133, _descriptor58, _dec105, _dec106, _dec107, _dec108, _dec109, _class135, _class136, _descriptor59, _descriptor60, _descriptor61, _descriptor62, _dec110, _dec111, _class138, _class139, _descriptor63, _dec112, _dec113, _class141, _class142, _descriptor64, _dec114, _dec115, _class144, _class145, _descriptor65, _dec116, _dec117, _dec118, _class147, _class148, _descriptor66, _descriptor67, _dec119, _dec120, _class150, _class151, _descriptor68, _dec121, _class153, _dec122, _dec123, _dec124, _dec125, _class154, _class155, _descriptor69, _descriptor70, _descriptor71, _dec126, _dec127, _class157, _class158, _descriptor72, _dec128, _dec129, _dec130, _dec131, _dec132, _dec133, _class160, _class161, _descriptor73, _descriptor74, _descriptor75, _descriptor76, _descriptor77, _dec134, _dec135, _class163, _class164, _descriptor78, _dec136, _dec137, _dec138, _class166, _class167, _descriptor79, _descriptor80;
|
|
75529
75845
|
|
|
75530
75846
|
|
|
75531
75847
|
|
|
@@ -76002,239 +76318,381 @@ let FormulaCastExpression = (_dec71 = (0,_markupGenerator_Serializer_SugarSerial
|
|
|
76002
76318
|
initializer: null
|
|
76003
76319
|
})), _class90)) || _class89);
|
|
76004
76320
|
let FormulaDateNowExpression = (_dec74 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("datenow", `Дата в формате: {dd/mm/yyyy}`), _dec74(_class92 = class FormulaDateNowExpression extends FormulaExpression {}) || _class92);
|
|
76005
|
-
let
|
|
76321
|
+
let FormulaGetDaysInMonthExpression = (_dec75 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("getdaysinmonth", `Количество дней в месяце указанной даты`), _dec76 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec75(_class93 = (_class94 = class FormulaGetDaysInMonthExpression extends FormulaExpression {
|
|
76322
|
+
constructor(...args) {
|
|
76323
|
+
super(...args);
|
|
76324
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor43, this);
|
|
76325
|
+
}
|
|
76326
|
+
}, (_descriptor43 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class94.prototype, "expression", [_dec76], {
|
|
76327
|
+
configurable: true,
|
|
76328
|
+
enumerable: true,
|
|
76329
|
+
writable: true,
|
|
76330
|
+
initializer: null
|
|
76331
|
+
})), _class94)) || _class93);
|
|
76332
|
+
let FormulaGetDayExpression = (_dec77 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("getday", `День из указанной даты`), _dec78 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec77(_class96 = (_class97 = class FormulaGetDayExpression extends FormulaExpression {
|
|
76006
76333
|
constructor(...args) {
|
|
76007
76334
|
super(...args);
|
|
76008
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
76335
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor44, this);
|
|
76336
|
+
}
|
|
76337
|
+
}, (_descriptor44 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class97.prototype, "expression", [_dec78], {
|
|
76338
|
+
configurable: true,
|
|
76339
|
+
enumerable: true,
|
|
76340
|
+
writable: true,
|
|
76341
|
+
initializer: null
|
|
76342
|
+
})), _class97)) || _class96);
|
|
76343
|
+
let FormulaIsDateExpression = (_dec79 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("isdate", `Проверка, является ли дата валидной`), _dec80 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec79(_class99 = (_class100 = class FormulaIsDateExpression extends FormulaExpression {
|
|
76344
|
+
constructor(...args) {
|
|
76345
|
+
super(...args);
|
|
76346
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor45, this);
|
|
76347
|
+
}
|
|
76348
|
+
}, (_descriptor45 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class100.prototype, "expression", [_dec80], {
|
|
76349
|
+
configurable: true,
|
|
76350
|
+
enumerable: true,
|
|
76351
|
+
writable: true,
|
|
76352
|
+
initializer: null
|
|
76353
|
+
})), _class100)) || _class99);
|
|
76354
|
+
let FormulaDifferenceInMonthsExpression = (_dec81 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("differenceinmonths", `Количество полных месяцев между двумя датами`), _dec82 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec81(_class102 = (_class103 = class FormulaDifferenceInMonthsExpression extends FormulaExpression {
|
|
76355
|
+
constructor(...args) {
|
|
76356
|
+
super(...args);
|
|
76357
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "arguments", _descriptor46, this);
|
|
76358
|
+
}
|
|
76359
|
+
}, (_descriptor46 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class103.prototype, "arguments", [_dec82], {
|
|
76360
|
+
configurable: true,
|
|
76361
|
+
enumerable: true,
|
|
76362
|
+
writable: true,
|
|
76363
|
+
initializer: null
|
|
76364
|
+
})), _class103)) || _class102);
|
|
76365
|
+
let FormulaDifferenceInDaysExpression = (_dec83 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("differenceindays", `Разница в днях между двумя датами`), _dec84 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec83(_class105 = (_class106 = class FormulaDifferenceInDaysExpression extends FormulaExpression {
|
|
76366
|
+
constructor(...args) {
|
|
76367
|
+
super(...args);
|
|
76368
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "arguments", _descriptor47, this);
|
|
76369
|
+
}
|
|
76370
|
+
}, (_descriptor47 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class106.prototype, "arguments", [_dec84], {
|
|
76371
|
+
configurable: true,
|
|
76372
|
+
enumerable: true,
|
|
76373
|
+
writable: true,
|
|
76374
|
+
initializer: null
|
|
76375
|
+
})), _class106)) || _class105);
|
|
76376
|
+
let FormulaDateTimeExpression = (_dec85 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("datetime", `Преобразование строки в дату`), _dec86 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec85(_class108 = (_class109 = class FormulaDateTimeExpression extends FormulaExpression {
|
|
76377
|
+
constructor(...args) {
|
|
76378
|
+
super(...args);
|
|
76379
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor48, this);
|
|
76380
|
+
}
|
|
76381
|
+
}, (_descriptor48 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class109.prototype, "expression", [_dec86], {
|
|
76382
|
+
configurable: true,
|
|
76383
|
+
enumerable: true,
|
|
76384
|
+
writable: true,
|
|
76385
|
+
initializer: null
|
|
76386
|
+
})), _class109)) || _class108);
|
|
76387
|
+
let FormulaIsSnilsExpression = (_dec87 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("issnils", `Проверка на валидность снилса`), _dec88 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec87(_class111 = (_class112 = class FormulaIsSnilsExpression extends FormulaExpression {
|
|
76388
|
+
constructor(...args) {
|
|
76389
|
+
super(...args);
|
|
76390
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor49, this);
|
|
76009
76391
|
}
|
|
76010
76392
|
getLegacyExpressionTypeForFunctionName() {
|
|
76011
76393
|
return "isSnils";
|
|
76012
76394
|
}
|
|
76013
|
-
}, (
|
|
76395
|
+
}, (_descriptor49 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class112.prototype, "select", [_dec88], {
|
|
76014
76396
|
configurable: true,
|
|
76015
76397
|
enumerable: true,
|
|
76016
76398
|
writable: true,
|
|
76017
76399
|
initializer: null
|
|
76018
|
-
})),
|
|
76019
|
-
let FormulaIsInnExpression = (
|
|
76400
|
+
})), _class112)) || _class111);
|
|
76401
|
+
let FormulaIsInnExpression = (_dec89 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("isinn", `Проверка на валидность ИИН`), _dec90 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec89(_class114 = (_class115 = class FormulaIsInnExpression extends FormulaExpression {
|
|
76020
76402
|
constructor(...args) {
|
|
76021
76403
|
super(...args);
|
|
76022
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select",
|
|
76404
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor50, this);
|
|
76023
76405
|
}
|
|
76024
76406
|
getLegacyExpressionTypeForFunctionName() {
|
|
76025
76407
|
return "isInn";
|
|
76026
76408
|
}
|
|
76027
|
-
}, (
|
|
76409
|
+
}, (_descriptor50 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class115.prototype, "select", [_dec90], {
|
|
76028
76410
|
configurable: true,
|
|
76029
76411
|
enumerable: true,
|
|
76030
76412
|
writable: true,
|
|
76031
76413
|
initializer: null
|
|
76032
|
-
})),
|
|
76033
|
-
let FormulaIsValidMirCardNumberExpression = (
|
|
76414
|
+
})), _class115)) || _class114);
|
|
76415
|
+
let FormulaIsValidMirCardNumberExpression = (_dec91 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("isvalidmircardnumber", `Проверка на валидность карты МИР`), _dec92 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec91(_class117 = (_class118 = class FormulaIsValidMirCardNumberExpression extends FormulaExpression {
|
|
76034
76416
|
constructor(...args) {
|
|
76035
76417
|
super(...args);
|
|
76036
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select",
|
|
76418
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor51, this);
|
|
76037
76419
|
}
|
|
76038
76420
|
getLegacyExpressionTypeForFunctionName() {
|
|
76039
76421
|
return "isValidMirCardNumber";
|
|
76040
76422
|
}
|
|
76041
|
-
}, (
|
|
76423
|
+
}, (_descriptor51 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class118.prototype, "select", [_dec92], {
|
|
76042
76424
|
configurable: true,
|
|
76043
76425
|
enumerable: true,
|
|
76044
76426
|
writable: true,
|
|
76045
76427
|
initializer: null
|
|
76046
|
-
})),
|
|
76047
|
-
let FormulaIsValidAccountNumberExpression = (
|
|
76428
|
+
})), _class118)) || _class117);
|
|
76429
|
+
let FormulaIsValidAccountNumberExpression = (_dec93 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("isvalidaccountnumber", `Проверка на валидность карты МИР`), _dec94 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("bik", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec95 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("account", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec93(_class120 = (_class121 = class FormulaIsValidAccountNumberExpression extends FormulaExpression {
|
|
76048
76430
|
constructor(...args) {
|
|
76049
76431
|
super(...args);
|
|
76050
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "bik",
|
|
76051
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "account",
|
|
76432
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "bik", _descriptor52, this);
|
|
76433
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "account", _descriptor53, this);
|
|
76052
76434
|
}
|
|
76053
76435
|
getLegacyExpressionTypeForFunctionName() {
|
|
76054
76436
|
return "isValidAccountNumber";
|
|
76055
76437
|
}
|
|
76056
|
-
}, (
|
|
76438
|
+
}, (_descriptor52 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class121.prototype, "bik", [_dec94], {
|
|
76057
76439
|
configurable: true,
|
|
76058
76440
|
enumerable: true,
|
|
76059
76441
|
writable: true,
|
|
76060
76442
|
initializer: null
|
|
76061
|
-
}),
|
|
76443
|
+
}), _descriptor53 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class121.prototype, "account", [_dec95], {
|
|
76062
76444
|
configurable: true,
|
|
76063
76445
|
enumerable: true,
|
|
76064
76446
|
writable: true,
|
|
76065
76447
|
initializer: null
|
|
76066
|
-
})),
|
|
76067
|
-
let FormulaArgumentExpression = (
|
|
76448
|
+
})), _class121)) || _class120);
|
|
76449
|
+
let FormulaArgumentExpression = (_dec96 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("argument", `TODO`), _dec97 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec98 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("type", typeArgumentValueParser, `Тип атрибута: string или decimal (по умолчанию)`), _dec96(_class123 = (_class124 = class FormulaArgumentExpression extends FormulaExpression {
|
|
76068
76450
|
constructor(...args) {
|
|
76069
76451
|
super(...args);
|
|
76070
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select",
|
|
76071
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type",
|
|
76452
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor54, this);
|
|
76453
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type", _descriptor55, this);
|
|
76072
76454
|
}
|
|
76073
|
-
}, (
|
|
76455
|
+
}, (_descriptor54 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class124.prototype, "select", [_dec97], {
|
|
76074
76456
|
configurable: true,
|
|
76075
76457
|
enumerable: true,
|
|
76076
76458
|
writable: true,
|
|
76077
76459
|
initializer: null
|
|
76078
|
-
}),
|
|
76460
|
+
}), _descriptor55 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class124.prototype, "type", [_dec98], {
|
|
76079
76461
|
configurable: true,
|
|
76080
76462
|
enumerable: true,
|
|
76081
76463
|
writable: true,
|
|
76082
76464
|
initializer: function () {
|
|
76083
76465
|
return "decimal";
|
|
76084
76466
|
}
|
|
76085
|
-
})),
|
|
76086
|
-
let
|
|
76467
|
+
})), _class124)) || _class123);
|
|
76468
|
+
let FormulaArrayExpression = (_dec99 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("array", `TODO`), _dec100 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec99(_class126 = (_class127 = class FormulaArrayExpression extends FormulaExpression {
|
|
76087
76469
|
constructor(...args) {
|
|
76088
76470
|
super(...args);
|
|
76089
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
76471
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "items", _descriptor56, this);
|
|
76472
|
+
}
|
|
76473
|
+
}, (_descriptor56 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class127.prototype, "items", [_dec100], {
|
|
76474
|
+
configurable: true,
|
|
76475
|
+
enumerable: true,
|
|
76476
|
+
writable: true,
|
|
76477
|
+
initializer: null
|
|
76478
|
+
})), _class127)) || _class126);
|
|
76479
|
+
let FormulaFilterColumnExpression = (_dec101 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("filtercolumn", `Получить значения пиклиста по фильру`), _dec102 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec101(_class129 = (_class130 = class FormulaFilterColumnExpression extends FormulaExpression {
|
|
76480
|
+
constructor(...args) {
|
|
76481
|
+
super(...args);
|
|
76482
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "filterColumn", _descriptor57, this);
|
|
76483
|
+
}
|
|
76484
|
+
}, (_descriptor57 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class130.prototype, "filterColumn", [_dec102], {
|
|
76485
|
+
configurable: true,
|
|
76486
|
+
enumerable: true,
|
|
76487
|
+
writable: true,
|
|
76488
|
+
initializer: null
|
|
76489
|
+
})), _class130)) || _class129);
|
|
76490
|
+
let FormulaFilterKeyExpression = (_dec103 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("filterkey", `Получить значения пиклиста по фильру`), _dec104 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec103(_class132 = (_class133 = class FormulaFilterKeyExpression extends FormulaExpression {
|
|
76491
|
+
constructor(...args) {
|
|
76492
|
+
super(...args);
|
|
76493
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "filterKey", _descriptor58, this);
|
|
76494
|
+
}
|
|
76495
|
+
}, (_descriptor58 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class133.prototype, "filterKey", [_dec104], {
|
|
76496
|
+
configurable: true,
|
|
76497
|
+
enumerable: true,
|
|
76498
|
+
writable: true,
|
|
76499
|
+
initializer: null
|
|
76500
|
+
})), _class133)) || _class132);
|
|
76501
|
+
let FormulaGetPicklistValuesExpression = (_dec105 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("getpicklistvalues", `Получить значения пиклиста по фильру. Используется только для генерации FLANG. В калькуляторе не работает`), _dec106 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("gId", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec107 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("filtercolumn", [FormulaFilterColumnExpression]), _dec108 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("filterkey", [FormulaFilterKeyExpression]), _dec109 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("resultColumn", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec105(_class135 = (_class136 = class FormulaGetPicklistValuesExpression extends FormulaExpression {
|
|
76502
|
+
constructor(...args) {
|
|
76503
|
+
super(...args);
|
|
76504
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "gId", _descriptor59, this);
|
|
76505
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "filterColumn", _descriptor60, this);
|
|
76506
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "filterKey", _descriptor61, this);
|
|
76507
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "resultColumn", _descriptor62, this);
|
|
76508
|
+
}
|
|
76509
|
+
getLegacyExpressionTypeForFunctionName() {
|
|
76510
|
+
return "getPicklistValues";
|
|
76511
|
+
}
|
|
76512
|
+
}, (_descriptor59 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class136.prototype, "gId", [_dec106], {
|
|
76513
|
+
configurable: true,
|
|
76514
|
+
enumerable: true,
|
|
76515
|
+
writable: true,
|
|
76516
|
+
initializer: null
|
|
76517
|
+
}), _descriptor60 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class136.prototype, "filterColumn", [_dec107], {
|
|
76518
|
+
configurable: true,
|
|
76519
|
+
enumerable: true,
|
|
76520
|
+
writable: true,
|
|
76521
|
+
initializer: null
|
|
76522
|
+
}), _descriptor61 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class136.prototype, "filterKey", [_dec108], {
|
|
76523
|
+
configurable: true,
|
|
76524
|
+
enumerable: true,
|
|
76525
|
+
writable: true,
|
|
76526
|
+
initializer: null
|
|
76527
|
+
}), _descriptor62 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class136.prototype, "resultColumn", [_dec109], {
|
|
76528
|
+
configurable: true,
|
|
76529
|
+
enumerable: true,
|
|
76530
|
+
writable: true,
|
|
76531
|
+
initializer: null
|
|
76532
|
+
})), _class136)) || _class135);
|
|
76533
|
+
let FormulaFirstOrDefaultExpression = (_dec110 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("firstordefault", `Взять первый элемент массива. Используется только для генерации FLANG. В калькуляторе не работает`), _dec111 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec110(_class138 = (_class139 = class FormulaFirstOrDefaultExpression extends FormulaExpression {
|
|
76534
|
+
constructor(...args) {
|
|
76535
|
+
super(...args);
|
|
76536
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor63, this);
|
|
76537
|
+
}
|
|
76538
|
+
}, (_descriptor63 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class139.prototype, "expression", [_dec111], {
|
|
76539
|
+
configurable: true,
|
|
76540
|
+
enumerable: true,
|
|
76541
|
+
writable: true,
|
|
76542
|
+
initializer: null
|
|
76543
|
+
})), _class139)) || _class138);
|
|
76544
|
+
let FormulaExistsExpression = (_dec112 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("exists", `TODO`), _dec113 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec112(_class141 = (_class142 = class FormulaExistsExpression extends FormulaExpression {
|
|
76545
|
+
constructor(...args) {
|
|
76546
|
+
super(...args);
|
|
76547
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor64, this);
|
|
76090
76548
|
}
|
|
76091
76549
|
getLegacyExpressionTypeForFunctionName() {
|
|
76092
76550
|
return "exists";
|
|
76093
76551
|
}
|
|
76094
|
-
}, (
|
|
76552
|
+
}, (_descriptor64 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class142.prototype, "select", [_dec113], {
|
|
76095
76553
|
configurable: true,
|
|
76096
76554
|
enumerable: true,
|
|
76097
76555
|
writable: true,
|
|
76098
76556
|
initializer: null
|
|
76099
|
-
})),
|
|
76100
|
-
let FormulaMultySumExpression = (
|
|
76557
|
+
})), _class142)) || _class141);
|
|
76558
|
+
let FormulaMultySumExpression = (_dec114 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("multysum", `TODO`), _dec115 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec114(_class144 = (_class145 = class FormulaMultySumExpression extends FormulaExpression {
|
|
76101
76559
|
constructor(...args) {
|
|
76102
76560
|
super(...args);
|
|
76103
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select",
|
|
76561
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor65, this);
|
|
76104
76562
|
}
|
|
76105
|
-
}, (
|
|
76563
|
+
}, (_descriptor65 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class145.prototype, "select", [_dec115], {
|
|
76106
76564
|
configurable: true,
|
|
76107
76565
|
enumerable: true,
|
|
76108
76566
|
writable: true,
|
|
76109
76567
|
initializer: null
|
|
76110
|
-
})),
|
|
76111
|
-
let FormulaCountExpression = (
|
|
76568
|
+
})), _class145)) || _class144);
|
|
76569
|
+
let FormulaCountExpression = (_dec116 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("count", `TODO`), _dec117 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("select", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec118 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("withNullOrEmptyValues", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.boolean, `брать в расчет незаполненные экземпляры`), _dec116(_class147 = (_class148 = class FormulaCountExpression extends FormulaExpression {
|
|
76112
76570
|
constructor(...args) {
|
|
76113
76571
|
super(...args);
|
|
76114
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select",
|
|
76115
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withNullOrEmptyValues",
|
|
76572
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "select", _descriptor66, this);
|
|
76573
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withNullOrEmptyValues", _descriptor67, this);
|
|
76116
76574
|
}
|
|
76117
|
-
}, (
|
|
76575
|
+
}, (_descriptor66 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class148.prototype, "select", [_dec117], {
|
|
76118
76576
|
configurable: true,
|
|
76119
76577
|
enumerable: true,
|
|
76120
76578
|
writable: true,
|
|
76121
76579
|
initializer: null
|
|
76122
|
-
}),
|
|
76580
|
+
}), _descriptor67 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class148.prototype, "withNullOrEmptyValues", [_dec118], {
|
|
76123
76581
|
configurable: true,
|
|
76124
76582
|
enumerable: true,
|
|
76125
76583
|
writable: true,
|
|
76126
76584
|
initializer: null
|
|
76127
|
-
})),
|
|
76128
|
-
let FormulaConcatExpression = (
|
|
76585
|
+
})), _class148)) || _class147);
|
|
76586
|
+
let FormulaConcatExpression = (_dec119 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("concat", `Конкатенация строк`), _dec120 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)(), _dec119(_class150 = (_class151 = class FormulaConcatExpression extends FormulaExpression {
|
|
76129
76587
|
constructor(...args) {
|
|
76130
76588
|
super(...args);
|
|
76131
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "arguments",
|
|
76589
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "arguments", _descriptor68, this);
|
|
76132
76590
|
}
|
|
76133
|
-
}, (
|
|
76591
|
+
}, (_descriptor68 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class151.prototype, "arguments", [_dec120], {
|
|
76134
76592
|
configurable: true,
|
|
76135
76593
|
enumerable: true,
|
|
76136
76594
|
writable: true,
|
|
76137
76595
|
initializer: null
|
|
76138
|
-
})),
|
|
76139
|
-
let FormulaNewLineExpression = (
|
|
76140
|
-
let Formula = (
|
|
76596
|
+
})), _class151)) || _class150);
|
|
76597
|
+
let FormulaNewLineExpression = (_dec121 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("newline", `Перевод на новую строку`), _dec121(_class153 = class FormulaNewLineExpression extends FormulaExpression {}) || _class153);
|
|
76598
|
+
let Formula = (_dec122 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("formula", `TODO`), _dec123 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("match", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec124 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("target", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec125 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec122(_class154 = (_class155 = class Formula extends _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
76141
76599
|
constructor(...args) {
|
|
76142
76600
|
super(...args);
|
|
76143
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "match",
|
|
76144
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "target",
|
|
76145
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression",
|
|
76601
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "match", _descriptor69, this);
|
|
76602
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "target", _descriptor70, this);
|
|
76603
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor71, this);
|
|
76146
76604
|
}
|
|
76147
|
-
}, (
|
|
76605
|
+
}, (_descriptor69 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class155.prototype, "match", [_dec123], {
|
|
76148
76606
|
configurable: true,
|
|
76149
76607
|
enumerable: true,
|
|
76150
76608
|
writable: true,
|
|
76151
76609
|
initializer: null
|
|
76152
|
-
}),
|
|
76610
|
+
}), _descriptor70 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class155.prototype, "target", [_dec124], {
|
|
76153
76611
|
configurable: true,
|
|
76154
76612
|
enumerable: true,
|
|
76155
76613
|
writable: true,
|
|
76156
76614
|
initializer: null
|
|
76157
|
-
}),
|
|
76615
|
+
}), _descriptor71 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class155.prototype, "expression", [_dec125], {
|
|
76158
76616
|
configurable: true,
|
|
76159
76617
|
enumerable: true,
|
|
76160
76618
|
writable: true,
|
|
76161
76619
|
initializer: null
|
|
76162
|
-
})),
|
|
76163
|
-
let Formulas = (
|
|
76620
|
+
})), _class155)) || _class154);
|
|
76621
|
+
let Formulas = (_dec126 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("formulas", `TODO`), _dec127 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)("formula", [Formula]), _dec126(_class157 = (_class158 = class Formulas extends _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
76164
76622
|
constructor(...args) {
|
|
76165
76623
|
super(...args);
|
|
76166
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "items",
|
|
76624
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "items", _descriptor72, this);
|
|
76167
76625
|
}
|
|
76168
|
-
}, (
|
|
76626
|
+
}, (_descriptor72 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class158.prototype, "items", [_dec127], {
|
|
76169
76627
|
configurable: true,
|
|
76170
76628
|
enumerable: true,
|
|
76171
76629
|
writable: true,
|
|
76172
76630
|
initializer: null
|
|
76173
|
-
})),
|
|
76174
|
-
let ConditionNode = (
|
|
76631
|
+
})), _class158)) || _class157);
|
|
76632
|
+
let ConditionNode = (_dec128 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("condition", `TODO`), _dec129 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("match", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec130 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("target", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec131 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("description", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType.string.required, ``), _dec132 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attr)("errorLevel", _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.attrType["enum"]("Error", "Warning"), `Уровень ошибки может быть Error или Warning - параметр влияет на подсветку. Красную или Оранжевую соотвественно`), _dec133 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)(), _dec128(_class160 = (_class161 = class ConditionNode extends _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
76175
76633
|
constructor(...args) {
|
|
76176
76634
|
super(...args);
|
|
76177
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "match",
|
|
76178
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "target",
|
|
76179
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description",
|
|
76180
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "errorLevel",
|
|
76181
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression",
|
|
76635
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "match", _descriptor73, this);
|
|
76636
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "target", _descriptor74, this);
|
|
76637
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor75, this);
|
|
76638
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "errorLevel", _descriptor76, this);
|
|
76639
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "expression", _descriptor77, this);
|
|
76182
76640
|
}
|
|
76183
|
-
}, (
|
|
76641
|
+
}, (_descriptor73 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class161.prototype, "match", [_dec129], {
|
|
76184
76642
|
configurable: true,
|
|
76185
76643
|
enumerable: true,
|
|
76186
76644
|
writable: true,
|
|
76187
76645
|
initializer: null
|
|
76188
|
-
}),
|
|
76646
|
+
}), _descriptor74 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class161.prototype, "target", [_dec130], {
|
|
76189
76647
|
configurable: true,
|
|
76190
76648
|
enumerable: true,
|
|
76191
76649
|
writable: true,
|
|
76192
76650
|
initializer: null
|
|
76193
|
-
}),
|
|
76651
|
+
}), _descriptor75 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class161.prototype, "description", [_dec131], {
|
|
76194
76652
|
configurable: true,
|
|
76195
76653
|
enumerable: true,
|
|
76196
76654
|
writable: true,
|
|
76197
76655
|
initializer: null
|
|
76198
|
-
}),
|
|
76656
|
+
}), _descriptor76 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class161.prototype, "errorLevel", [_dec132], {
|
|
76199
76657
|
configurable: true,
|
|
76200
76658
|
enumerable: true,
|
|
76201
76659
|
writable: true,
|
|
76202
76660
|
initializer: null
|
|
76203
|
-
}),
|
|
76661
|
+
}), _descriptor77 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class161.prototype, "expression", [_dec133], {
|
|
76204
76662
|
configurable: true,
|
|
76205
76663
|
enumerable: true,
|
|
76206
76664
|
writable: true,
|
|
76207
76665
|
initializer: null
|
|
76208
|
-
})),
|
|
76209
|
-
let ConditionsNode = (
|
|
76666
|
+
})), _class161)) || _class160);
|
|
76667
|
+
let ConditionsNode = (_dec134 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("conditions", `TODO`), _dec135 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.children)("condition", [ConditionNode]), _dec134(_class163 = (_class164 = class ConditionsNode extends _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
76210
76668
|
constructor(...args) {
|
|
76211
76669
|
super(...args);
|
|
76212
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "items",
|
|
76670
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "items", _descriptor78, this);
|
|
76213
76671
|
}
|
|
76214
|
-
}, (
|
|
76672
|
+
}, (_descriptor78 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class164.prototype, "items", [_dec135], {
|
|
76215
76673
|
configurable: true,
|
|
76216
76674
|
enumerable: true,
|
|
76217
76675
|
writable: true,
|
|
76218
76676
|
initializer: null
|
|
76219
|
-
})),
|
|
76220
|
-
let MathContainer = (
|
|
76677
|
+
})), _class164)) || _class163);
|
|
76678
|
+
let MathContainer = (_dec136 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.sugarNode)("math", `TODO`), _dec137 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("formulas", [Formulas]), _dec138 = (0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.singleChild)("conditions", [ConditionsNode]), _dec136(_class166 = (_class167 = class MathContainer extends _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_5__.SugarNodeBase {
|
|
76221
76679
|
constructor(...args) {
|
|
76222
76680
|
super(...args);
|
|
76223
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "formulas",
|
|
76224
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "conditions",
|
|
76681
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "formulas", _descriptor79, this);
|
|
76682
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "conditions", _descriptor80, this);
|
|
76225
76683
|
}
|
|
76226
|
-
}, (
|
|
76684
|
+
}, (_descriptor79 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class167.prototype, "formulas", [_dec137], {
|
|
76227
76685
|
configurable: true,
|
|
76228
76686
|
enumerable: true,
|
|
76229
76687
|
writable: true,
|
|
76230
76688
|
initializer: null
|
|
76231
|
-
}),
|
|
76689
|
+
}), _descriptor80 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class167.prototype, "conditions", [_dec138], {
|
|
76232
76690
|
configurable: true,
|
|
76233
76691
|
enumerable: true,
|
|
76234
76692
|
writable: true,
|
|
76235
76693
|
initializer: null
|
|
76236
|
-
})),
|
|
76237
|
-
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, FormulaIsSnilsExpression, FormulaIsInnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression];
|
|
76694
|
+
})), _class167)) || _class166);
|
|
76695
|
+
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, FormulaIsDateExpression, FormulaDifferenceInMonthsExpression, FormulaDifferenceInDaysExpression, FormulaDateTimeExpression, FormulaIsSnilsExpression, FormulaIsInnExpression, FormulaIsValidAccountNumberExpression, FormulaIsValidMirCardNumberExpression, FormulaCastExpression, FormulaConcatExpression, FormulaGroupSumExpression, FormulaGroupCountExpression, FormulaNewLineExpression, FormulaOneOfExpression, FormulaGetPicklistValuesExpression, FormulaArrayExpression, FormulaFirstOrDefaultExpression, FormulaFilterColumnExpression, FormulaFilterKeyExpression];
|
|
76238
76696
|
|
|
76239
76697
|
/***/ }),
|
|
76240
76698
|
|
|
@@ -78310,6 +78768,32 @@ class KCXmlGeneratorBase {
|
|
|
78310
78768
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateNowExpression) {
|
|
78311
78769
|
return gcf(x => x.dateNow);
|
|
78312
78770
|
}
|
|
78771
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetDaysInMonthExpression) {
|
|
78772
|
+
const compiledArgument = this.compileExpression(prefix, targetFullPath, expression.expression, deps);
|
|
78773
|
+
return gcf(x => x.getDaysInMonth, compiledArgument);
|
|
78774
|
+
}
|
|
78775
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetDayExpression) {
|
|
78776
|
+
const compiledArgument = this.compileExpression(prefix, targetFullPath, expression.expression, deps);
|
|
78777
|
+
return gcf(x => x.getDay, compiledArgument);
|
|
78778
|
+
}
|
|
78779
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaIsDateExpression) {
|
|
78780
|
+
const compiledArgument = this.compileExpression(prefix, targetFullPath, expression.expression, deps);
|
|
78781
|
+
return gcf(x => x.isDate, compiledArgument);
|
|
78782
|
+
}
|
|
78783
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDifferenceInMonthsExpression) {
|
|
78784
|
+
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.ensureArrayHasLength)(expression.arguments, 2);
|
|
78785
|
+
const compiledExpressions = expression.arguments.map(arg => this.compileExpression(prefix, targetFullPath, arg, deps)).join(",");
|
|
78786
|
+
return gcf(x => x.differenceInMonths, `[${compiledExpressions}]`);
|
|
78787
|
+
}
|
|
78788
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDifferenceInDaysExpression) {
|
|
78789
|
+
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.ensureArrayHasLength)(expression.arguments, 2);
|
|
78790
|
+
const compiledExpressions = expression.arguments.map(arg => this.compileExpression(prefix, targetFullPath, arg, deps)).join(",");
|
|
78791
|
+
return gcf(x => x.differenceInDays, `[${compiledExpressions}]`);
|
|
78792
|
+
}
|
|
78793
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaDateTimeExpression) {
|
|
78794
|
+
const compiledArgument = this.compileExpression(prefix, targetFullPath, expression.expression, deps);
|
|
78795
|
+
return gcf(x => x.dateTime, compiledArgument);
|
|
78796
|
+
}
|
|
78313
78797
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaSubstringExpression) {
|
|
78314
78798
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined)(expression.expression);
|
|
78315
78799
|
return `expression.substring(${this.compileExpression(prefix, targetFullPath, expression.expression, deps)}, "${expression.start}", "${expression.length}")`;
|
|
@@ -78351,6 +78835,19 @@ class KCXmlGeneratorBase {
|
|
|
78351
78835
|
const compiledItems = expression.items.expressions.map(item => this.compileExpression(prefix, targetFullPath, item, deps)).join(",");
|
|
78352
78836
|
return gcf(x => x.oneOf, compiledArgument, `[${compiledItems}]`);
|
|
78353
78837
|
}
|
|
78838
|
+
|
|
78839
|
+
// -- не работает в рантайм калькуляторе
|
|
78840
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaGetPicklistValuesExpression) {
|
|
78841
|
+
return "null";
|
|
78842
|
+
}
|
|
78843
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaFirstOrDefaultExpression) {
|
|
78844
|
+
return "null";
|
|
78845
|
+
}
|
|
78846
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__.FormulaArrayExpression) {
|
|
78847
|
+
return "null";
|
|
78848
|
+
}
|
|
78849
|
+
// -----
|
|
78850
|
+
|
|
78354
78851
|
throw new Error(`Unsupported node type: ${expression.constructor.name}`);
|
|
78355
78852
|
}
|
|
78356
78853
|
/* eslint-enable @typescript-eslint/unbound-method */
|
|
@@ -78708,7 +79205,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
78708
79205
|
|
|
78709
79206
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
78710
79207
|
try {
|
|
78711
|
-
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _sugarRoot$schemaVali4, _additionalContent$fo3, _additionalContent$fo4;
|
|
79208
|
+
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _sugarRoot$schemaVali4, _sugarRoot$schemaVali5, _additionalContent$fo3, _additionalContent$fo4;
|
|
78712
79209
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
78713
79210
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_13__.createDefaultSugarSerializer)();
|
|
78714
79211
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_14__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_11__.FormNode);
|
|
@@ -78746,14 +79243,14 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
78746
79243
|
const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_36__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter);
|
|
78747
79244
|
const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_37__.InitializationRulesBuilder(sugarRoot, resourcesHash);
|
|
78748
79245
|
const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_38__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
|
|
78749
|
-
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions);
|
|
78750
|
-
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry, (_sugarRoot$
|
|
79246
|
+
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, typeRegistry, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
79247
|
+
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry, (_sugarRoot$schemaVali4 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali4 !== void 0 ? _sugarRoot$schemaVali4 : false);
|
|
78751
79248
|
const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_33__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
|
|
78752
79249
|
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng);
|
|
78753
79250
|
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter);
|
|
78754
79251
|
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng);
|
|
78755
79252
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_21__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
78756
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$
|
|
79253
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali5 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali5 !== void 0 ? _sugarRoot$schemaVali5 : false);
|
|
78757
79254
|
markupGenerator.generate(sugarRoot, builder);
|
|
78758
79255
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_9__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
|
|
78759
79256
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -79349,21 +79846,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79349
79846
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
79350
79847
|
/* harmony export */ "FLangValidationBuildContext": () => (/* binding */ FLangValidationBuildContext)
|
|
79351
79848
|
/* harmony export */ });
|
|
79352
|
-
/* harmony import */ var
|
|
79849
|
+
/* harmony import */ var _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../validationGenerator/Nodes/TypeNode */ "./Generator/src/generators/validationGenerator/Nodes/TypeNode.ts");
|
|
79353
79850
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
79354
|
-
/* harmony import */ var
|
|
79355
|
-
/* harmony import */ var
|
|
79356
|
-
/* harmony import */ var
|
|
79357
|
-
/* harmony import */ var
|
|
79851
|
+
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
79852
|
+
/* harmony import */ var _Common_ModelPath_Set_AbsoluteModelPathSet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/ModelPath/Set/AbsoluteModelPathSet */ "./Common/ModelPath/Set/AbsoluteModelPathSet.ts");
|
|
79853
|
+
/* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
|
|
79854
|
+
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
79358
79855
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
79359
|
-
/* harmony import */ var
|
|
79856
|
+
/* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader.ts");
|
|
79360
79857
|
/* harmony import */ var _common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/KCLang/KCLangToXmlTranspiler */ "./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts");
|
|
79361
|
-
/* harmony import */ var
|
|
79362
|
-
/* harmony import */ var
|
|
79363
|
-
/* harmony import */ var
|
|
79858
|
+
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
79859
|
+
/* harmony import */ var _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/SchemaRng/StringTypeMessageGenerator */ "./Generator/src/common/SchemaRng/StringTypeMessageGenerator.ts");
|
|
79860
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
79364
79861
|
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
79365
|
-
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
79366
|
-
|
|
79367
79862
|
|
|
79368
79863
|
|
|
79369
79864
|
|
|
@@ -79380,20 +79875,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79380
79875
|
const makeArrayLiteral = text => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(`["${text}"]`);
|
|
79381
79876
|
const makeMessage = (constraints, sugarTypeDescription, schemaTypeDescription) => {
|
|
79382
79877
|
var _ref, _ref2;
|
|
79383
|
-
return makeArrayLiteral((_ref = (_ref2 = sugarTypeDescription !== null && sugarTypeDescription !== void 0 ? sugarTypeDescription : schemaTypeDescription) !== null && _ref2 !== void 0 ? _ref2 :
|
|
79878
|
+
return makeArrayLiteral((_ref = (_ref2 = sugarTypeDescription !== null && sugarTypeDescription !== void 0 ? sugarTypeDescription : schemaTypeDescription) !== null && _ref2 !== void 0 ? _ref2 : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.generate(constraints !== null && constraints !== void 0 ? constraints : {})) !== null && _ref !== void 0 ? _ref : "Поле должно быть заполнено");
|
|
79384
79879
|
};
|
|
79385
79880
|
class FLangValidationBuildContext {
|
|
79386
|
-
constructor(
|
|
79387
|
-
this.
|
|
79388
|
-
this.
|
|
79881
|
+
constructor(schemaRng, formulaExprConverter, nodeTypeInfoHelper) {
|
|
79882
|
+
this.pathsWithValidations = new _Common_ModelPath_Set_AbsoluteModelPathSet__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelPathSet();
|
|
79883
|
+
this.nodeTypeInfoHelper = void 0;
|
|
79389
79884
|
this.formulaExprConverter = void 0;
|
|
79390
79885
|
this.schemaRng = void 0;
|
|
79391
|
-
this.useSchemaValidations = void 0;
|
|
79392
79886
|
this.visibilityConditions = [];
|
|
79887
|
+
this.nodeTypeInfoHelper = nodeTypeInfoHelper;
|
|
79393
79888
|
this.formulaExprConverter = formulaExprConverter;
|
|
79394
|
-
this.useSchemaValidations = useSchemaValidations;
|
|
79395
79889
|
this.schemaRng = schemaRng;
|
|
79396
|
-
this.typesRegistry = typesRegistry;
|
|
79397
79890
|
}
|
|
79398
79891
|
pushVisibilityCondition(condition, path, invertRequired) {
|
|
79399
79892
|
this.visibilityConditions.push({
|
|
@@ -79405,6 +79898,12 @@ class FLangValidationBuildContext {
|
|
|
79405
79898
|
popVisibilityCondition() {
|
|
79406
79899
|
this.visibilityConditions.pop();
|
|
79407
79900
|
}
|
|
79901
|
+
getTypeNode(node) {
|
|
79902
|
+
return this.nodeTypeInfoHelper.getTypeNode(node);
|
|
79903
|
+
}
|
|
79904
|
+
getSchemaTypeInfo(targetPath) {
|
|
79905
|
+
return this.nodeTypeInfoHelper.getSchemaTypeInfo(targetPath);
|
|
79906
|
+
}
|
|
79408
79907
|
buildBasicValidations(targetPath, typeNode, schemaTypeNode, optional, highOrderDescription, nodeGId) {
|
|
79409
79908
|
var _typeNode$base, _typeNode$description;
|
|
79410
79909
|
const validations = [];
|
|
@@ -79427,10 +79926,10 @@ class FLangValidationBuildContext {
|
|
|
79427
79926
|
this.pathsWithValidations.add(targetPath);
|
|
79428
79927
|
const schemaNode = this.schemaRng.getElementByPath(targetPath);
|
|
79429
79928
|
const parentNode = schemaNode != undefined ? this.getFirstAcceptedParent(schemaNode) : undefined;
|
|
79430
|
-
const allChildrenPaths = parentNode instanceof
|
|
79431
|
-
const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(childPath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(""))).reduce(
|
|
79929
|
+
const allChildrenPaths = parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__.FormSchemaRngElement ? this.schemaRng.getAllChildren(parentNode).map(x => this.schemaRng.getPath(x, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each)).filter(x => !(0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_4__.getMatchedAndDifferentModelPaths)(targetPath, x).differentPath.isContainIteration()) : undefined;
|
|
79930
|
+
const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(childPath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(""))).reduce(_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.combineByAndFlangExpr, undefined);
|
|
79432
79931
|
const errorValidations = validations.filter(x => !x.checkType || x.checkType === "error");
|
|
79433
|
-
const errorExpression = this.createFlangExpression((0,
|
|
79932
|
+
const errorExpression = this.createFlangExpression((0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.reverseArray)(errorValidations), targetPath, valueReference, "error", highOrderDescription !== null && highOrderDescription !== void 0 ? highOrderDescription : typeNode === null || typeNode === void 0 ? void 0 : typeNode.requiredDescription, optional, parentNode, restChecks);
|
|
79434
79933
|
const result = [];
|
|
79435
79934
|
result.push({
|
|
79436
79935
|
statement: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(targetPath, "error"), errorExpression),
|
|
@@ -79448,12 +79947,12 @@ class FLangValidationBuildContext {
|
|
|
79448
79947
|
return result;
|
|
79449
79948
|
}
|
|
79450
79949
|
createFlangExpression(validations, targetPath, valueReference, checkType, requiredDescription, optional, parentNode, restChecks) {
|
|
79451
|
-
let expression =
|
|
79950
|
+
let expression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.IterUtils.reduce(validations, (result, {
|
|
79452
79951
|
condition,
|
|
79453
79952
|
message
|
|
79454
79953
|
}) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ConditionalExpression(condition, message, result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NullLiteralExpression());
|
|
79455
79954
|
if (!optional) {
|
|
79456
|
-
if (parentNode instanceof
|
|
79955
|
+
if (parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__.FormSchemaRngElement) {
|
|
79457
79956
|
const requiredExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(""))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("[" + JSON.stringify(requiredDescription !== null && requiredDescription !== void 0 ? requiredDescription : "Поле должно быть заполнено") + "]"), expression);
|
|
79458
79957
|
const targetCheck = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.EqExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.EqExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("")));
|
|
79459
79958
|
if (restChecks != undefined) {
|
|
@@ -79484,15 +79983,15 @@ class FLangValidationBuildContext {
|
|
|
79484
79983
|
`;
|
|
79485
79984
|
try {
|
|
79486
79985
|
var _kcLangMathContainer$, _kcLangMathContainer$2, _kcLangMathContainer$3;
|
|
79487
|
-
const formulaReader = new
|
|
79986
|
+
const formulaReader = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_7__.FormulaReader();
|
|
79488
79987
|
const kcLangMathContainer = formulaReader.readFormulas(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_8__.KCLangToXmlTranspiler.transpile(fullKcLangExpr));
|
|
79489
79988
|
const formulaNode = (_kcLangMathContainer$ = kcLangMathContainer === null || kcLangMathContainer === void 0 ? void 0 : (_kcLangMathContainer$2 = kcLangMathContainer.formulas) === null || _kcLangMathContainer$2 === void 0 ? void 0 : (_kcLangMathContainer$3 = _kcLangMathContainer$2.items) === null || _kcLangMathContainer$3 === void 0 ? void 0 : _kcLangMathContainer$3[0]) !== null && _kcLangMathContainer$ !== void 0 ? _kcLangMathContainer$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
|
|
79490
79989
|
const formulaExpr = this.formulaExprConverter.compileExpressionToFlangExpression(formulaNode.expression, prefix, target, value => {
|
|
79491
|
-
throw new
|
|
79990
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_9__.NotSupportedError("In contextual KcLang conditions should not be summation.");
|
|
79492
79991
|
});
|
|
79493
79992
|
const flangExpr = formulaExpr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ConditionalExpression ? formulaExpr.condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
|
|
79494
79993
|
const getTypeCorrectedExpression = () => {
|
|
79495
|
-
const argExpr = (0,
|
|
79994
|
+
const argExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.tryExtractValueReferenceAsStringFromDecimal)(flangExpr));
|
|
79496
79995
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NotEqExpression(argExpr, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NotEqExpression(argExpr, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("")));
|
|
79497
79996
|
};
|
|
79498
79997
|
const correctedFLangExpr = flangExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.BuildInTypeExpression.bool ? flangExpr : getTypeCorrectedExpression();
|
|
@@ -79523,7 +80022,7 @@ class FLangValidationBuildContext {
|
|
|
79523
80022
|
case "!==":
|
|
79524
80023
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NotEqExpression(len, argument);
|
|
79525
80024
|
default:
|
|
79526
|
-
throw new
|
|
80025
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_9__.NotImplementedError();
|
|
79527
80026
|
}
|
|
79528
80027
|
};
|
|
79529
80028
|
return invertRequired ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(getOperation()) : getOperation();
|
|
@@ -79540,7 +80039,7 @@ class FLangValidationBuildContext {
|
|
|
79540
80039
|
*createTypeValidations(valueReference, typeNode, schemaTypeNode, nodeGId) {
|
|
79541
80040
|
var _typeNode$checkType, _typeNode$children$fi, _typeNode$children, _typeNode$children$fi2, _schemaTypeNode$enume, _digest$gId, _typeNode$children2, _typeNodeLength$value, _typeNode$children3, _typeNodeMinLength$va, _typeNode$children4, _typeNodeMaxLength$va, _typeNode$children5, _typeNodeMinInclusive, _typeNode$children6, _typeNodeMaxInclusive, _typeNode$children7, _typeNodeTotalDigits$, _typeNode$children$fi3, _typeNode$children8, _schemaTypeNode$patte, _typeNode$children9, _typeNodeInteger$valu, _typeNode$children10, _typeNodeFractional$v;
|
|
79542
80041
|
const checkType = (_typeNode$checkType = typeNode === null || typeNode === void 0 ? void 0 : typeNode.checkType) !== null && _typeNode$checkType !== void 0 ? _typeNode$checkType : "error";
|
|
79543
|
-
const typeNodeEnumerations = (_typeNode$children$fi = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children = typeNode.children) === null || _typeNode$children === void 0 ? void 0 : (_typeNode$children$fi2 = _typeNode$children.filter(x => x instanceof
|
|
80042
|
+
const typeNodeEnumerations = (_typeNode$children$fi = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children = typeNode.children) === null || _typeNode$children === void 0 ? void 0 : (_typeNode$children$fi2 = _typeNode$children.filter(x => x instanceof _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.EnumerationTypeCheckNode)) === null || _typeNode$children$fi2 === void 0 ? void 0 : _typeNode$children$fi2.map(x => x.value)) !== null && _typeNode$children$fi !== void 0 ? _typeNode$children$fi : [];
|
|
79544
80043
|
const enumerationItems = (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(typeNodeEnumerations) ? typeNodeEnumerations : (_schemaTypeNode$enume = schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.enumeration) !== null && _schemaTypeNode$enume !== void 0 ? _schemaTypeNode$enume : [];
|
|
79545
80044
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(enumerationItems)) {
|
|
79546
80045
|
const enumerationRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OneOfExpression(valueReference, enumerationItems.map(item => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(item)));
|
|
@@ -79552,7 +80051,7 @@ class FLangValidationBuildContext {
|
|
|
79552
80051
|
checkType: checkType
|
|
79553
80052
|
};
|
|
79554
80053
|
}
|
|
79555
|
-
const digest = typeNode === null || typeNode === void 0 ? void 0 : typeNode.getValidations(
|
|
80054
|
+
const digest = typeNode === null || typeNode === void 0 ? void 0 : typeNode.getValidations(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.DigestcheckTypeCheckNode).find(x => x);
|
|
79556
80055
|
const gId = (_digest$gId = digest === null || digest === void 0 ? void 0 : digest.gId) !== null && _digest$gId !== void 0 ? _digest$gId : nodeGId;
|
|
79557
80056
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrEmpty)(gId) && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayHasLength)(enumerationItems, 0)) {
|
|
79558
80057
|
var _ref3, _digest$description, _ref4, _digest$checkType;
|
|
@@ -79563,7 +80062,7 @@ class FLangValidationBuildContext {
|
|
|
79563
80062
|
checkType: (_ref4 = (_digest$checkType = digest === null || digest === void 0 ? void 0 : digest.checkType) !== null && _digest$checkType !== void 0 ? _digest$checkType : typeNode === null || typeNode === void 0 ? void 0 : typeNode.checkType) !== null && _ref4 !== void 0 ? _ref4 : "error"
|
|
79564
80063
|
};
|
|
79565
80064
|
}
|
|
79566
|
-
const typeNodeLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children2 = typeNode.children) === null || _typeNode$children2 === void 0 ? void 0 : _typeNode$children2.find((0,
|
|
80065
|
+
const typeNodeLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children2 = typeNode.children) === null || _typeNode$children2 === void 0 ? void 0 : _typeNode$children2.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.LengthTypeCheckNode));
|
|
79567
80066
|
const lengthValue = (_typeNodeLength$value = typeNodeLength === null || typeNodeLength === void 0 ? void 0 : typeNodeLength.value) !== null && _typeNodeLength$value !== void 0 ? _typeNodeLength$value : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.length;
|
|
79568
80067
|
if (lengthValue != undefined) {
|
|
79569
80068
|
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(lengthValue)));
|
|
@@ -79575,9 +80074,9 @@ class FLangValidationBuildContext {
|
|
|
79575
80074
|
checkType: checkType
|
|
79576
80075
|
};
|
|
79577
80076
|
}
|
|
79578
|
-
const typeNodeMinLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children3 = typeNode.children) === null || _typeNode$children3 === void 0 ? void 0 : _typeNode$children3.find((0,
|
|
80077
|
+
const typeNodeMinLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children3 = typeNode.children) === null || _typeNode$children3 === void 0 ? void 0 : _typeNode$children3.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.MinlengthTypeCheckNode));
|
|
79579
80078
|
const minLengthValue = (_typeNodeMinLength$va = typeNodeMinLength === null || typeNodeMinLength === void 0 ? void 0 : typeNodeMinLength.value) !== null && _typeNodeMinLength$va !== void 0 ? _typeNodeMinLength$va : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.minLength;
|
|
79580
|
-
const typeNodeMaxLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children4 = typeNode.children) === null || _typeNode$children4 === void 0 ? void 0 : _typeNode$children4.find((0,
|
|
80079
|
+
const typeNodeMaxLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children4 = typeNode.children) === null || _typeNode$children4 === void 0 ? void 0 : _typeNode$children4.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.MaxlengthTypeCheckNode));
|
|
79581
80080
|
const maxLengthValue = (_typeNodeMaxLength$va = typeNodeMaxLength === null || typeNodeMaxLength === void 0 ? void 0 : typeNodeMaxLength.value) !== null && _typeNodeMaxLength$va !== void 0 ? _typeNodeMaxLength$va : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.maxLength;
|
|
79582
80081
|
if (minLengthValue != undefined && maxLengthValue != undefined) {
|
|
79583
80082
|
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.GeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(minLengthValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(maxLengthValue))));
|
|
@@ -79608,10 +80107,10 @@ class FLangValidationBuildContext {
|
|
|
79608
80107
|
checkType: checkType
|
|
79609
80108
|
};
|
|
79610
80109
|
}
|
|
79611
|
-
const typeNodeMinInclusive = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children5 = typeNode.children) === null || _typeNode$children5 === void 0 ? void 0 : _typeNode$children5.find((0,
|
|
80110
|
+
const typeNodeMinInclusive = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children5 = typeNode.children) === null || _typeNode$children5 === void 0 ? void 0 : _typeNode$children5.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.MininclusiveTypeCheckNode));
|
|
79612
80111
|
const minInclusiveValue = (_typeNodeMinInclusive = typeNodeMinInclusive === null || typeNodeMinInclusive === void 0 ? void 0 : typeNodeMinInclusive.value) !== null && _typeNodeMinInclusive !== void 0 ? _typeNodeMinInclusive : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.minInclusive;
|
|
79613
80112
|
if (minInclusiveValue != undefined) {
|
|
79614
|
-
const minInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.GeExpression((0,
|
|
80113
|
+
const minInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.GeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(minInclusiveValue)));
|
|
79615
80114
|
yield {
|
|
79616
80115
|
condition: minInclusiveRuleBody,
|
|
79617
80116
|
message: makeMessage({
|
|
@@ -79620,10 +80119,10 @@ class FLangValidationBuildContext {
|
|
|
79620
80119
|
checkType: checkType
|
|
79621
80120
|
};
|
|
79622
80121
|
}
|
|
79623
|
-
const typeNodeMaxInclusive = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children6 = typeNode.children) === null || _typeNode$children6 === void 0 ? void 0 : _typeNode$children6.find((0,
|
|
80122
|
+
const typeNodeMaxInclusive = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children6 = typeNode.children) === null || _typeNode$children6 === void 0 ? void 0 : _typeNode$children6.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.MaxinclusiveTypeCheckNode));
|
|
79624
80123
|
const maxInclusiveValue = (_typeNodeMaxInclusive = typeNodeMaxInclusive === null || typeNodeMaxInclusive === void 0 ? void 0 : typeNodeMaxInclusive.value) !== null && _typeNodeMaxInclusive !== void 0 ? _typeNodeMaxInclusive : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.maxInclusive;
|
|
79625
80124
|
if (maxInclusiveValue != undefined) {
|
|
79626
|
-
const maxInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression((0,
|
|
80125
|
+
const maxInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(maxInclusiveValue)));
|
|
79627
80126
|
yield {
|
|
79628
80127
|
condition: maxInclusiveRuleBody,
|
|
79629
80128
|
message: makeMessage({
|
|
@@ -79632,7 +80131,7 @@ class FLangValidationBuildContext {
|
|
|
79632
80131
|
checkType: checkType
|
|
79633
80132
|
};
|
|
79634
80133
|
}
|
|
79635
|
-
const typeNodeTotalDigits = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children7 = typeNode.children) === null || _typeNode$children7 === void 0 ? void 0 : _typeNode$children7.find((0,
|
|
80134
|
+
const typeNodeTotalDigits = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children7 = typeNode.children) === null || _typeNode$children7 === void 0 ? void 0 : _typeNode$children7.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.TotaldigitsTypeCheckNode));
|
|
79636
80135
|
const totalDigitsValue = (_typeNodeTotalDigits$ = typeNodeTotalDigits === null || typeNodeTotalDigits === void 0 ? void 0 : typeNodeTotalDigits.value) !== null && _typeNodeTotalDigits$ !== void 0 ? _typeNodeTotalDigits$ : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.totalDigits;
|
|
79637
80136
|
if (totalDigitsValue != undefined) {
|
|
79638
80137
|
const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(totalDigitsValue)));
|
|
@@ -79644,7 +80143,7 @@ class FLangValidationBuildContext {
|
|
|
79644
80143
|
checkType: checkType
|
|
79645
80144
|
};
|
|
79646
80145
|
}
|
|
79647
|
-
const typeNodePatterns = (_typeNode$children$fi3 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children8 = typeNode.children) === null || _typeNode$children8 === void 0 ? void 0 : _typeNode$children8.filter((0,
|
|
80146
|
+
const typeNodePatterns = (_typeNode$children$fi3 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children8 = typeNode.children) === null || _typeNode$children8 === void 0 ? void 0 : _typeNode$children8.filter((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.PatternTypeCheckNode)).map(x => x.value).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined)) !== null && _typeNode$children$fi3 !== void 0 ? _typeNode$children$fi3 : [];
|
|
79648
80147
|
const stringPatterns = ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(typeNodePatterns) ? typeNodePatterns : (_schemaTypeNode$patte = schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.patterns) !== null && _schemaTypeNode$patte !== void 0 ? _schemaTypeNode$patte : []).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined);
|
|
79649
80148
|
const patterns = stringPatterns.map(pattern => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(pattern))).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OrBinaryExpression(acc, current) : current, undefined);
|
|
79650
80149
|
if (patterns != undefined) {
|
|
@@ -79657,10 +80156,10 @@ class FLangValidationBuildContext {
|
|
|
79657
80156
|
checkType: checkType
|
|
79658
80157
|
};
|
|
79659
80158
|
}
|
|
79660
|
-
const typeNodeInteger = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children9 = typeNode.children) === null || _typeNode$children9 === void 0 ? void 0 : _typeNode$children9.find((0,
|
|
80159
|
+
const typeNodeInteger = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children9 = typeNode.children) === null || _typeNode$children9 === void 0 ? void 0 : _typeNode$children9.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.IntegerdigitsTypeCheckNode));
|
|
79661
80160
|
const integerDigits = (_typeNodeInteger$valu = typeNodeInteger === null || typeNodeInteger === void 0 ? void 0 : typeNodeInteger.value) !== null && _typeNodeInteger$valu !== void 0 ? _typeNodeInteger$valu : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.integerDigits;
|
|
79662
80161
|
if (integerDigits != undefined) {
|
|
79663
|
-
const integerDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.FractionalLenExpression((0,
|
|
80162
|
+
const integerDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.FractionalLenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(valueReference))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(integerDigits)));
|
|
79664
80163
|
yield {
|
|
79665
80164
|
condition: integerDigitsRuleBody,
|
|
79666
80165
|
message: makeMessage({
|
|
@@ -79669,10 +80168,10 @@ class FLangValidationBuildContext {
|
|
|
79669
80168
|
checkType: checkType
|
|
79670
80169
|
};
|
|
79671
80170
|
}
|
|
79672
|
-
const typeNodeFractional = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children10 = typeNode.children) === null || _typeNode$children10 === void 0 ? void 0 : _typeNode$children10.find((0,
|
|
80171
|
+
const typeNodeFractional = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children10 = typeNode.children) === null || _typeNode$children10 === void 0 ? void 0 : _typeNode$children10.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.FractiondigitsTypeCheckNode));
|
|
79673
80172
|
const fractionalDigits = (_typeNodeFractional$v = typeNodeFractional === null || typeNodeFractional === void 0 ? void 0 : typeNodeFractional.value) !== null && _typeNodeFractional$v !== void 0 ? _typeNodeFractional$v : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.fractionDigits;
|
|
79674
80173
|
if (fractionalDigits != undefined) {
|
|
79675
|
-
const fractionalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.FractionalLenExpression((0,
|
|
80174
|
+
const fractionalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.FractionalLenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(valueReference)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(fractionalDigits)));
|
|
79676
80175
|
yield {
|
|
79677
80176
|
condition: fractionalDigitsRuleBody,
|
|
79678
80177
|
message: makeMessage({
|
|
@@ -79692,35 +80191,35 @@ class FLangValidationBuildContext {
|
|
|
79692
80191
|
{
|
|
79693
80192
|
return {
|
|
79694
80193
|
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^-?\\d+$"))),
|
|
79695
|
-
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription :
|
|
80194
|
+
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
79696
80195
|
};
|
|
79697
80196
|
}
|
|
79698
80197
|
case "decimal":
|
|
79699
80198
|
{
|
|
79700
80199
|
return {
|
|
79701
80200
|
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^-?\\d+(([.]\\d+$)|($))"))),
|
|
79702
|
-
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription :
|
|
80201
|
+
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
79703
80202
|
};
|
|
79704
80203
|
}
|
|
79705
80204
|
case "date":
|
|
79706
80205
|
{
|
|
79707
80206
|
return {
|
|
79708
80207
|
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^(0[1-9]|[12][0-9]|3[01])\\.(0[1-9]|1[012])\\.(19|20)[0-9]{2}$"))),
|
|
79709
|
-
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription :
|
|
80208
|
+
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
79710
80209
|
};
|
|
79711
80210
|
}
|
|
79712
80211
|
case "gYear":
|
|
79713
80212
|
{
|
|
79714
80213
|
return {
|
|
79715
80214
|
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^\\d{4}$"))),
|
|
79716
|
-
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription :
|
|
80215
|
+
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
79717
80216
|
};
|
|
79718
80217
|
}
|
|
79719
80218
|
case "gMonth":
|
|
79720
80219
|
{
|
|
79721
80220
|
return {
|
|
79722
80221
|
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^(--(0[1-9]|1[0-2]))$"))),
|
|
79723
|
-
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription :
|
|
80222
|
+
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
79724
80223
|
};
|
|
79725
80224
|
}
|
|
79726
80225
|
default:
|
|
@@ -79730,7 +80229,7 @@ class FLangValidationBuildContext {
|
|
|
79730
80229
|
getFirstAcceptedParent(schemaNode) {
|
|
79731
80230
|
let parentNode = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.parent;
|
|
79732
80231
|
while (parentNode != undefined) {
|
|
79733
|
-
if (parentNode instanceof
|
|
80232
|
+
if (parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__.FormSchemaRngElement) {
|
|
79734
80233
|
var _parentNode$multiple;
|
|
79735
80234
|
if ((_parentNode$multiple = parentNode.multiple) !== null && _parentNode$multiple !== void 0 ? _parentNode$multiple : false) {
|
|
79736
80235
|
return undefined;
|
|
@@ -79748,26 +80247,6 @@ class FLangValidationBuildContext {
|
|
|
79748
80247
|
getAllPathsWithValidations() {
|
|
79749
80248
|
return this.pathsWithValidations.values();
|
|
79750
80249
|
}
|
|
79751
|
-
addErrorCondition(targetPath, errorCondition) {
|
|
79752
|
-
const errorReference = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(targetPath, "error");
|
|
79753
|
-
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.SetStatement(errorReference, errorCondition);
|
|
79754
|
-
}
|
|
79755
|
-
getSchemaTypeInfo(bindingPath) {
|
|
79756
|
-
return this.useSchemaValidations ? this.schemaRng.getTypeNodeByPath(bindingPath) : undefined;
|
|
79757
|
-
}
|
|
79758
|
-
getTypeNode(node) {
|
|
79759
|
-
if (node.anonymousType != undefined) {
|
|
79760
|
-
return node.anonymousType;
|
|
79761
|
-
}
|
|
79762
|
-
if (node.type != undefined) {
|
|
79763
|
-
const result = this.typesRegistry.getByName(node.type);
|
|
79764
|
-
if (result == undefined) {
|
|
79765
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_4__.SugarAttributeReadError(`Type with name '${node.type}' not found`, node, "type");
|
|
79766
|
-
}
|
|
79767
|
-
return result;
|
|
79768
|
-
}
|
|
79769
|
-
return undefined;
|
|
79770
|
-
}
|
|
79771
80250
|
}
|
|
79772
80251
|
|
|
79773
80252
|
/***/ }),
|
|
@@ -79786,6 +80265,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79786
80265
|
/* harmony export */ "FLangDecimalExpression": () => (/* binding */ FLangDecimalExpression),
|
|
79787
80266
|
/* harmony export */ "FLangStringExpression": () => (/* binding */ FLangStringExpression),
|
|
79788
80267
|
/* harmony export */ "FLangBoolExpression": () => (/* binding */ FLangBoolExpression),
|
|
80268
|
+
/* harmony export */ "DateTimeExpression": () => (/* binding */ DateTimeExpression),
|
|
79789
80269
|
/* harmony export */ "FLangDictExpression": () => (/* binding */ FLangDictExpression),
|
|
79790
80270
|
/* harmony export */ "FlangExpressionWithAggregationDeps": () => (/* binding */ FlangExpressionWithAggregationDeps),
|
|
79791
80271
|
/* harmony export */ "ValueReferenceExpression": () => (/* binding */ ValueReferenceExpression),
|
|
@@ -79834,6 +80314,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79834
80314
|
/* harmony export */ "FractionalLenExpression": () => (/* binding */ FractionalLenExpression),
|
|
79835
80315
|
/* harmony export */ "RoundExpression": () => (/* binding */ RoundExpression),
|
|
79836
80316
|
/* harmony export */ "FloorExpression": () => (/* binding */ FloorExpression),
|
|
80317
|
+
/* harmony export */ "GetDaysInMonthExpression": () => (/* binding */ GetDaysInMonthExpression),
|
|
80318
|
+
/* harmony export */ "GetDayExpression": () => (/* binding */ GetDayExpression),
|
|
80319
|
+
/* harmony export */ "IsDateExpression": () => (/* binding */ IsDateExpression),
|
|
80320
|
+
/* harmony export */ "DifferenceInMonthsExpression": () => (/* binding */ DifferenceInMonthsExpression),
|
|
80321
|
+
/* harmony export */ "DifferenceInDaysExpression": () => (/* binding */ DifferenceInDaysExpression),
|
|
79837
80322
|
/* harmony export */ "IsSnilsExpression": () => (/* binding */ IsSnilsExpression),
|
|
79838
80323
|
/* harmony export */ "IsInnExpression": () => (/* binding */ IsInnExpression),
|
|
79839
80324
|
/* harmony export */ "IsValidMirCardNumberExpression": () => (/* binding */ IsValidMirCardNumberExpression),
|
|
@@ -79844,10 +80329,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79844
80329
|
/* harmony export */ "NullLiteralExpression": () => (/* binding */ NullLiteralExpression),
|
|
79845
80330
|
/* harmony export */ "ConditionalExpression": () => (/* binding */ ConditionalExpression),
|
|
79846
80331
|
/* harmony export */ "DateNowExpression": () => (/* binding */ DateNowExpression),
|
|
80332
|
+
/* harmony export */ "GetPicklistValuesExpression": () => (/* binding */ GetPicklistValuesExpression),
|
|
80333
|
+
/* harmony export */ "FirstOrDefaultExpression": () => (/* binding */ FirstOrDefaultExpression),
|
|
80334
|
+
/* harmony export */ "ArrayExpression": () => (/* binding */ ArrayExpression),
|
|
79847
80335
|
/* harmony export */ "NullCoalesceExpression": () => (/* binding */ NullCoalesceExpression),
|
|
79848
80336
|
/* harmony export */ "OneOfExpression": () => (/* binding */ OneOfExpression),
|
|
79849
80337
|
/* harmony export */ "NoDepsExpression": () => (/* binding */ NoDepsExpression),
|
|
79850
80338
|
/* harmony export */ "HasPicklistValueExpression": () => (/* binding */ HasPicklistValueExpression),
|
|
80339
|
+
/* harmony export */ "TrimExpression": () => (/* binding */ TrimExpression),
|
|
80340
|
+
/* harmony export */ "PrepareNumberExpression": () => (/* binding */ PrepareNumberExpression),
|
|
79851
80341
|
/* harmony export */ "FLangStatement": () => (/* binding */ FLangStatement),
|
|
79852
80342
|
/* harmony export */ "SetStatement": () => (/* binding */ SetStatement)
|
|
79853
80343
|
/* harmony export */ });
|
|
@@ -79874,6 +80364,11 @@ class FLangBoolExpression extends FLangExpression {
|
|
|
79874
80364
|
return BuildInTypeExpression.bool;
|
|
79875
80365
|
}
|
|
79876
80366
|
}
|
|
80367
|
+
class DateTimeExpression extends FLangExpression {
|
|
80368
|
+
getType() {
|
|
80369
|
+
return BuildInTypeExpression.dateTime;
|
|
80370
|
+
}
|
|
80371
|
+
}
|
|
79877
80372
|
class FLangDictExpression extends FLangExpression {
|
|
79878
80373
|
getType() {
|
|
79879
80374
|
return BuildInTypeExpression.dict;
|
|
@@ -80125,8 +80620,9 @@ BuildInTypeExpression.string = new BuildInTypeExpression("string");
|
|
|
80125
80620
|
BuildInTypeExpression.dict = new BuildInTypeExpression("dict");
|
|
80126
80621
|
BuildInTypeExpression.bool = new BuildInTypeExpression("bool");
|
|
80127
80622
|
BuildInTypeExpression.null = new BuildInTypeExpression("null");
|
|
80128
|
-
BuildInTypeExpression.
|
|
80623
|
+
BuildInTypeExpression.dateTime = new BuildInTypeExpression("dateTime");
|
|
80129
80624
|
BuildInTypeExpression.int = new BuildInTypeExpression("int");
|
|
80625
|
+
BuildInTypeExpression.array = new BuildInTypeExpression("array");
|
|
80130
80626
|
class ArgumentDeclarationExpression extends FLangExpression {
|
|
80131
80627
|
constructor(argumentName, typeExpression) {
|
|
80132
80628
|
super();
|
|
@@ -80460,6 +80956,77 @@ class FloorExpression extends FLangDecimalExpression {
|
|
|
80460
80956
|
return `floor(${this.expression.convertToString()})`;
|
|
80461
80957
|
}
|
|
80462
80958
|
}
|
|
80959
|
+
class GetDaysInMonthExpression extends FLangDecimalExpression {
|
|
80960
|
+
constructor(expression) {
|
|
80961
|
+
super();
|
|
80962
|
+
this.expression = void 0;
|
|
80963
|
+
this.expression = expression;
|
|
80964
|
+
}
|
|
80965
|
+
*getChildNodes() {
|
|
80966
|
+
yield this.expression;
|
|
80967
|
+
}
|
|
80968
|
+
convertToString() {
|
|
80969
|
+
return `getDaysInMonth(${this.expression.convertToString()})`;
|
|
80970
|
+
}
|
|
80971
|
+
}
|
|
80972
|
+
class GetDayExpression extends FLangDecimalExpression {
|
|
80973
|
+
constructor(expression) {
|
|
80974
|
+
super();
|
|
80975
|
+
this.expression = void 0;
|
|
80976
|
+
this.expression = expression;
|
|
80977
|
+
}
|
|
80978
|
+
*getChildNodes() {
|
|
80979
|
+
yield this.expression;
|
|
80980
|
+
}
|
|
80981
|
+
convertToString() {
|
|
80982
|
+
return `getDay(${this.expression.convertToString()})`;
|
|
80983
|
+
}
|
|
80984
|
+
}
|
|
80985
|
+
class IsDateExpression extends FLangDecimalExpression {
|
|
80986
|
+
constructor(expression) {
|
|
80987
|
+
super();
|
|
80988
|
+
this.expression = void 0;
|
|
80989
|
+
this.expression = expression;
|
|
80990
|
+
}
|
|
80991
|
+
*getChildNodes() {
|
|
80992
|
+
yield this.expression;
|
|
80993
|
+
}
|
|
80994
|
+
convertToString() {
|
|
80995
|
+
return `isDate(${this.expression.convertToString()})`;
|
|
80996
|
+
}
|
|
80997
|
+
}
|
|
80998
|
+
class DifferenceInMonthsExpression extends FLangDecimalExpression {
|
|
80999
|
+
constructor(expressions) {
|
|
81000
|
+
super();
|
|
81001
|
+
this.expressions = void 0;
|
|
81002
|
+
this.expressions = expressions;
|
|
81003
|
+
}
|
|
81004
|
+
*getChildNodes() {
|
|
81005
|
+
for (const expression of this.expressions) {
|
|
81006
|
+
yield expression;
|
|
81007
|
+
}
|
|
81008
|
+
}
|
|
81009
|
+
convertToString() {
|
|
81010
|
+
const expressions = this.expressions.map(x => x.convertToString()).join(", ");
|
|
81011
|
+
return `differenceInMonths(${expressions})`;
|
|
81012
|
+
}
|
|
81013
|
+
}
|
|
81014
|
+
class DifferenceInDaysExpression extends FLangDecimalExpression {
|
|
81015
|
+
constructor(expressions) {
|
|
81016
|
+
super();
|
|
81017
|
+
this.expressions = void 0;
|
|
81018
|
+
this.expressions = expressions;
|
|
81019
|
+
}
|
|
81020
|
+
*getChildNodes() {
|
|
81021
|
+
for (const expression of this.expressions) {
|
|
81022
|
+
yield expression;
|
|
81023
|
+
}
|
|
81024
|
+
}
|
|
81025
|
+
convertToString() {
|
|
81026
|
+
const expressions = this.expressions.map(x => x.convertToString()).join(", ");
|
|
81027
|
+
return `differenceInDays(${expressions})`;
|
|
81028
|
+
}
|
|
81029
|
+
}
|
|
80463
81030
|
class IsSnilsExpression extends FLangBoolExpression {
|
|
80464
81031
|
constructor(expression) {
|
|
80465
81032
|
super();
|
|
@@ -80602,10 +81169,7 @@ class ConditionalExpression extends FLangExpression {
|
|
|
80602
81169
|
return `${condition} ? ${this.trueResult.convertToString()} : ${this.falseResult.convertToString()}`;
|
|
80603
81170
|
}
|
|
80604
81171
|
}
|
|
80605
|
-
class DateNowExpression extends
|
|
80606
|
-
getType() {
|
|
80607
|
-
return BuildInTypeExpression.datetime;
|
|
80608
|
-
}
|
|
81172
|
+
class DateNowExpression extends DateTimeExpression {
|
|
80609
81173
|
getChildNodes() {
|
|
80610
81174
|
return [];
|
|
80611
81175
|
}
|
|
@@ -80613,6 +81177,66 @@ class DateNowExpression extends FLangExpression {
|
|
|
80613
81177
|
return `dateNow()`;
|
|
80614
81178
|
}
|
|
80615
81179
|
}
|
|
81180
|
+
class GetPicklistValuesExpression extends FLangExpression {
|
|
81181
|
+
constructor(gid, filterColumn, filterKey, columns) {
|
|
81182
|
+
super();
|
|
81183
|
+
this.gId = void 0;
|
|
81184
|
+
this.filterColumn = void 0;
|
|
81185
|
+
this.filterKey = void 0;
|
|
81186
|
+
this.resultColumn = void 0;
|
|
81187
|
+
this.gId = gid;
|
|
81188
|
+
this.filterColumn = filterColumn;
|
|
81189
|
+
this.filterKey = filterKey;
|
|
81190
|
+
this.resultColumn = columns;
|
|
81191
|
+
}
|
|
81192
|
+
getType() {
|
|
81193
|
+
return BuildInTypeExpression.array;
|
|
81194
|
+
}
|
|
81195
|
+
*getChildNodes() {
|
|
81196
|
+
yield this.gId;
|
|
81197
|
+
yield this.filterColumn;
|
|
81198
|
+
yield this.filterKey;
|
|
81199
|
+
yield this.resultColumn;
|
|
81200
|
+
}
|
|
81201
|
+
convertToString() {
|
|
81202
|
+
return `getPicklistValues(${this.gId.convertToString()}, ${this.filterColumn.convertToString()}, ${this.filterKey.convertToString()}, ${this.resultColumn.convertToString()})`;
|
|
81203
|
+
}
|
|
81204
|
+
}
|
|
81205
|
+
class FirstOrDefaultExpression extends FLangExpression {
|
|
81206
|
+
constructor(expression) {
|
|
81207
|
+
super();
|
|
81208
|
+
this.expression = void 0;
|
|
81209
|
+
this.expression = expression;
|
|
81210
|
+
}
|
|
81211
|
+
getType() {
|
|
81212
|
+
return BuildInTypeExpression.string;
|
|
81213
|
+
}
|
|
81214
|
+
*getChildNodes() {
|
|
81215
|
+
yield this.expression;
|
|
81216
|
+
}
|
|
81217
|
+
convertToString() {
|
|
81218
|
+
return `firstOrDefault(${this.expression.convertToString()})`;
|
|
81219
|
+
}
|
|
81220
|
+
}
|
|
81221
|
+
class ArrayExpression extends FLangExpression {
|
|
81222
|
+
constructor(items) {
|
|
81223
|
+
super();
|
|
81224
|
+
this.items = void 0;
|
|
81225
|
+
this.items = items;
|
|
81226
|
+
}
|
|
81227
|
+
getType() {
|
|
81228
|
+
return BuildInTypeExpression.array;
|
|
81229
|
+
}
|
|
81230
|
+
*getChildNodes() {
|
|
81231
|
+
for (const item of this.items) {
|
|
81232
|
+
yield item;
|
|
81233
|
+
}
|
|
81234
|
+
}
|
|
81235
|
+
convertToString() {
|
|
81236
|
+
const items = this.items.map(x => x.convertToString()).join(", ");
|
|
81237
|
+
return `array(${items})`;
|
|
81238
|
+
}
|
|
81239
|
+
}
|
|
80616
81240
|
class NullCoalesceExpression extends FLangExpression {
|
|
80617
81241
|
constructor(expression, elseExpression) {
|
|
80618
81242
|
super();
|
|
@@ -80691,6 +81315,38 @@ class HasPicklistValueExpression extends FLangExpression {
|
|
|
80691
81315
|
return `hasPicklistValue(${expression}, ${this.gidExpression})`;
|
|
80692
81316
|
}
|
|
80693
81317
|
}
|
|
81318
|
+
class TrimExpression extends FLangExpression {
|
|
81319
|
+
constructor(expression) {
|
|
81320
|
+
super();
|
|
81321
|
+
this.expression = void 0;
|
|
81322
|
+
this.expression = expression;
|
|
81323
|
+
}
|
|
81324
|
+
*getChildNodes() {
|
|
81325
|
+
yield this.expression;
|
|
81326
|
+
}
|
|
81327
|
+
getType() {
|
|
81328
|
+
return BuildInTypeExpression.string;
|
|
81329
|
+
}
|
|
81330
|
+
convertToString() {
|
|
81331
|
+
return `trim(${this.expression.convertToString()})`;
|
|
81332
|
+
}
|
|
81333
|
+
}
|
|
81334
|
+
class PrepareNumberExpression extends FLangExpression {
|
|
81335
|
+
constructor(expression) {
|
|
81336
|
+
super();
|
|
81337
|
+
this.expression = void 0;
|
|
81338
|
+
this.expression = expression;
|
|
81339
|
+
}
|
|
81340
|
+
*getChildNodes() {
|
|
81341
|
+
yield this.expression;
|
|
81342
|
+
}
|
|
81343
|
+
getType() {
|
|
81344
|
+
return BuildInTypeExpression.string;
|
|
81345
|
+
}
|
|
81346
|
+
convertToString() {
|
|
81347
|
+
return `prepareNumber(${this.expression.convertToString()})`;
|
|
81348
|
+
}
|
|
81349
|
+
}
|
|
80694
81350
|
class FLangStatement extends FLangNode {}
|
|
80695
81351
|
class SetStatement extends FLangStatement {
|
|
80696
81352
|
constructor(left, right) {
|
|
@@ -80727,6 +81383,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80727
81383
|
/* harmony export */ "castOperandToStringIfNeed": () => (/* binding */ castOperandToStringIfNeed),
|
|
80728
81384
|
/* harmony export */ "castOperandToBoolIfNeed": () => (/* binding */ castOperandToBoolIfNeed),
|
|
80729
81385
|
/* harmony export */ "castOperandToDecimalIfNeed": () => (/* binding */ castOperandToDecimalIfNeed),
|
|
81386
|
+
/* harmony export */ "castOperandToDateTimeIfNeed": () => (/* binding */ castOperandToDateTimeIfNeed),
|
|
80730
81387
|
/* harmony export */ "nullCoalesceWithTypeCheck": () => (/* binding */ nullCoalesceWithTypeCheck),
|
|
80731
81388
|
/* harmony export */ "ensureOperandsOfTypeOrNull": () => (/* binding */ ensureOperandsOfTypeOrNull),
|
|
80732
81389
|
/* harmony export */ "combineByOrFlangExpr": () => (/* binding */ combineByOrFlangExpr),
|
|
@@ -80780,6 +81437,9 @@ function castOperandToBoolIfNeed(operandExpression) {
|
|
|
80780
81437
|
function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
|
|
80781
81438
|
return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
|
|
80782
81439
|
}
|
|
81440
|
+
function castOperandToDateTimeIfNeed(operandExpression) {
|
|
81441
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression.dateTime) : operandExpression;
|
|
81442
|
+
}
|
|
80783
81443
|
function nullCoalesceWithTypeCheck(argument, replacement) {
|
|
80784
81444
|
const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression["null"] || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.BuildInTypeExpression["null"];
|
|
80785
81445
|
if (!isValid) {
|
|
@@ -81106,23 +81766,31 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
81106
81766
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
81107
81767
|
}
|
|
81108
81768
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGtExpression) {
|
|
81109
|
-
const
|
|
81110
|
-
const
|
|
81769
|
+
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
81770
|
+
const left = expression.arguments[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? leftOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(leftOperandExpression);
|
|
81771
|
+
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
81772
|
+
const right = expression.arguments[1] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? rightOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(rightOperandExpression);
|
|
81111
81773
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GtExpression(left, right);
|
|
81112
81774
|
}
|
|
81113
81775
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLtExpression) {
|
|
81114
|
-
const
|
|
81115
|
-
const
|
|
81776
|
+
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
81777
|
+
const left = expression.arguments[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? leftOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(leftOperandExpression);
|
|
81778
|
+
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
81779
|
+
const right = expression.arguments[1] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? rightOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(rightOperandExpression);
|
|
81116
81780
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.LtExpression(left, right);
|
|
81117
81781
|
}
|
|
81118
81782
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGeExpression) {
|
|
81119
|
-
const
|
|
81120
|
-
const
|
|
81783
|
+
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
81784
|
+
const left = expression.arguments[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? leftOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(leftOperandExpression);
|
|
81785
|
+
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
81786
|
+
const right = expression.arguments[1] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? rightOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(rightOperandExpression);
|
|
81121
81787
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GeExpression(left, right);
|
|
81122
81788
|
}
|
|
81123
81789
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaLeExpression) {
|
|
81124
|
-
const
|
|
81125
|
-
const
|
|
81790
|
+
const leftOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[0], prefix, target, addPrecalculationRule);
|
|
81791
|
+
const left = expression.arguments[0] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? leftOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(leftOperandExpression);
|
|
81792
|
+
const rightOperandExpression = this.compileExpressionToFlangExpressionInternal(expression.arguments[1], prefix, target, addPrecalculationRule);
|
|
81793
|
+
const right = expression.arguments[1] instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression ? rightOperandExpression : (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(rightOperandExpression);
|
|
81126
81794
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.LeExpression(left, right);
|
|
81127
81795
|
}
|
|
81128
81796
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaEqExpression) {
|
|
@@ -81166,6 +81834,26 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
81166
81834
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateNowExpression) {
|
|
81167
81835
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DateNowExpression();
|
|
81168
81836
|
}
|
|
81837
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDaysInMonthExpression) {
|
|
81838
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetDaysInMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
81839
|
+
}
|
|
81840
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetDayExpression) {
|
|
81841
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetDayExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
81842
|
+
}
|
|
81843
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsDateExpression) {
|
|
81844
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsDateExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule)));
|
|
81845
|
+
}
|
|
81846
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInMonthsExpression) {
|
|
81847
|
+
const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
|
|
81848
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DifferenceInMonthsExpression(expressions);
|
|
81849
|
+
}
|
|
81850
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDifferenceInDaysExpression) {
|
|
81851
|
+
const expressions = expression.arguments.map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDateTimeIfNeed)(this.compileExpressionToFlangExpressionInternal(x, prefix, target, addPrecalculationRule)));
|
|
81852
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DifferenceInDaysExpression(expressions);
|
|
81853
|
+
}
|
|
81854
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaDateTimeExpression) {
|
|
81855
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.dateTime);
|
|
81856
|
+
}
|
|
81169
81857
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsSnilsExpression) {
|
|
81170
81858
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
81171
81859
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsSnilsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg));
|
|
@@ -81178,6 +81866,19 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
81178
81866
|
const arg = this.compiledArgumentExpression(prefix, target, expression.select, "string", addPrecalculationRule);
|
|
81179
81867
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IsValidMirCardNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToStringIfNeed)(arg));
|
|
81180
81868
|
}
|
|
81869
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaArrayExpression) {
|
|
81870
|
+
const items = expression.items.map(arg => this.compileExpressionToFlangExpressionInternal(arg, prefix, target, addPrecalculationRule));
|
|
81871
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArrayExpression(items);
|
|
81872
|
+
}
|
|
81873
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaFirstOrDefaultExpression) {
|
|
81874
|
+
const firstOrDefaultExpression = this.compileExpressionToFlangExpressionInternal(expression.expression, prefix, target, addPrecalculationRule);
|
|
81875
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.FirstOrDefaultExpression(firstOrDefaultExpression);
|
|
81876
|
+
}
|
|
81877
|
+
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaGetPicklistValuesExpression) {
|
|
81878
|
+
const filterColumn = this.compileExpressionToFlangExpressionInternal(expression.filterColumn.filterColumn, prefix, target, addPrecalculationRule);
|
|
81879
|
+
const filterKey = this.compileExpressionToFlangExpressionInternal(expression.filterKey.filterKey, prefix, target, addPrecalculationRule);
|
|
81880
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetPicklistValuesExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(expression.gId), filterColumn, filterKey, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(expression.resultColumn));
|
|
81881
|
+
}
|
|
81181
81882
|
if (expression instanceof _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_0__.FormulaIsValidAccountNumberExpression) {
|
|
81182
81883
|
const bik = this.compiledArgumentExpression(prefix, target, expression.bik, "string", addPrecalculationRule);
|
|
81183
81884
|
const account = this.compiledArgumentExpression(prefix, target, expression.account, "string", addPrecalculationRule);
|
|
@@ -81400,6 +82101,48 @@ class FormulaOnlyNormalizationRuleGenerator {
|
|
|
81400
82101
|
|
|
81401
82102
|
/***/ }),
|
|
81402
82103
|
|
|
82104
|
+
/***/ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts":
|
|
82105
|
+
/*!*************************************************************************************!*\
|
|
82106
|
+
!*** ./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts ***!
|
|
82107
|
+
\*************************************************************************************/
|
|
82108
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
82109
|
+
|
|
82110
|
+
"use strict";
|
|
82111
|
+
__webpack_require__.r(__webpack_exports__);
|
|
82112
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
82113
|
+
/* harmony export */ "NodeTypeInfoHelper": () => (/* binding */ NodeTypeInfoHelper)
|
|
82114
|
+
/* harmony export */ });
|
|
82115
|
+
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
82116
|
+
|
|
82117
|
+
class NodeTypeInfoHelper {
|
|
82118
|
+
constructor(schemaRng, typesRegistry, useSchemaValidations) {
|
|
82119
|
+
this.schemaRng = void 0;
|
|
82120
|
+
this.useSchemaValidations = void 0;
|
|
82121
|
+
this.typesRegistry = void 0;
|
|
82122
|
+
this.useSchemaValidations = useSchemaValidations;
|
|
82123
|
+
this.schemaRng = schemaRng;
|
|
82124
|
+
this.typesRegistry = typesRegistry;
|
|
82125
|
+
}
|
|
82126
|
+
getSchemaTypeInfo(bindingPath) {
|
|
82127
|
+
return this.useSchemaValidations ? this.schemaRng.getTypeNodeByPath(bindingPath) : undefined;
|
|
82128
|
+
}
|
|
82129
|
+
getTypeNode(node) {
|
|
82130
|
+
if (node.anonymousType != undefined) {
|
|
82131
|
+
return node.anonymousType;
|
|
82132
|
+
}
|
|
82133
|
+
if (node.type != undefined) {
|
|
82134
|
+
const result = this.typesRegistry.getByName(node.type);
|
|
82135
|
+
if (result == undefined) {
|
|
82136
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_0__.SugarAttributeReadError(`Type with name '${node.type}' not found`, node, "type");
|
|
82137
|
+
}
|
|
82138
|
+
return result;
|
|
82139
|
+
}
|
|
82140
|
+
return undefined;
|
|
82141
|
+
}
|
|
82142
|
+
}
|
|
82143
|
+
|
|
82144
|
+
/***/ }),
|
|
82145
|
+
|
|
81403
82146
|
/***/ "./Generator/src/generators/ServerSideFLangNormalization/NormalizationRulesGenerator.ts":
|
|
81404
82147
|
/*!**********************************************************************************************!*\
|
|
81405
82148
|
!*** ./Generator/src/generators/ServerSideFLangNormalization/NormalizationRulesGenerator.ts ***!
|
|
@@ -81719,15 +82462,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
81719
82462
|
/* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../markupGenerator/ElementProcessors/FormParts/Form/FormConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormConverter.ts");
|
|
81720
82463
|
/* harmony import */ var _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../markupGenerator/FLangNormalizationRulesBuilder */ "./Generator/src/generators/markupGenerator/FLangNormalizationRulesBuilder.ts");
|
|
81721
82464
|
/* harmony import */ var _FetchFunctionToFlangConverter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../FetchFunctionToFlangConverter */ "./Generator/src/generators/ServerSideFLangNormalization/FetchFunctionToFlangConverter.ts");
|
|
82465
|
+
/* harmony import */ var _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../NodeTypeInfoHelper */ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts");
|
|
82466
|
+
|
|
81722
82467
|
|
|
81723
82468
|
|
|
81724
82469
|
|
|
81725
82470
|
class SugarRulesBuilder {
|
|
81726
|
-
constructor(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions) {
|
|
82471
|
+
constructor(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, typeRegistry, useSchemaValidations) {
|
|
81727
82472
|
this.sugarRoot = void 0;
|
|
81728
82473
|
this.controlCustomizationContext = void 0;
|
|
81729
82474
|
this.fetchFunctions = void 0;
|
|
81730
82475
|
this.formSchemaRng = void 0;
|
|
82476
|
+
this.useSchemaValidations = void 0;
|
|
82477
|
+
this.typeRegistry = void 0;
|
|
82478
|
+
this.useSchemaValidations = useSchemaValidations;
|
|
82479
|
+
this.typeRegistry = typeRegistry;
|
|
81731
82480
|
this.formSchemaRng = formSchemaRng;
|
|
81732
82481
|
this.fetchFunctions = fetchFunctions;
|
|
81733
82482
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -81735,7 +82484,7 @@ class SugarRulesBuilder {
|
|
|
81735
82484
|
}
|
|
81736
82485
|
buildRules() {
|
|
81737
82486
|
const converter = new _markupGenerator_ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_0__.FormConverter(this.sugarRoot);
|
|
81738
|
-
const builder = new _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_1__.FLangNormalizationRulesBuilder(this.controlCustomizationContext, this.fetchFunctions, new _FetchFunctionToFlangConverter__WEBPACK_IMPORTED_MODULE_2__.FetchFunctionToFlangConverter());
|
|
82487
|
+
const builder = new _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_1__.FLangNormalizationRulesBuilder(this.controlCustomizationContext, this.fetchFunctions, new _FetchFunctionToFlangConverter__WEBPACK_IMPORTED_MODULE_2__.FetchFunctionToFlangConverter(), this.formSchemaRng, new _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_3__.NodeTypeInfoHelper(this.formSchemaRng, this.typeRegistry, this.useSchemaValidations));
|
|
81739
82488
|
return converter.buildNormalizeRules(builder, this.formSchemaRng);
|
|
81740
82489
|
}
|
|
81741
82490
|
}
|
|
@@ -81762,6 +82511,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
81762
82511
|
/* harmony import */ var _Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../Common/ModelPath/EachCurrentCollision */ "./Common/ModelPath/EachCurrentCollision.ts");
|
|
81763
82512
|
/* harmony import */ var _markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../markupGenerator/getRootPath */ "./Generator/src/generators/markupGenerator/getRootPath.ts");
|
|
81764
82513
|
/* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
|
|
82514
|
+
/* harmony import */ var _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../NodeTypeInfoHelper */ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts");
|
|
82515
|
+
|
|
81765
82516
|
|
|
81766
82517
|
|
|
81767
82518
|
|
|
@@ -81821,7 +82572,7 @@ class ValidationRulesBuilder {
|
|
|
81821
82572
|
}
|
|
81822
82573
|
*buildSugarValidationRules() {
|
|
81823
82574
|
const converter = new _markupGenerator_ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_2__.FormConverter(this.sugarRoot);
|
|
81824
|
-
const context = new _FLangValidationBuildContext__WEBPACK_IMPORTED_MODULE_3__.FLangValidationBuildContext(this.
|
|
82575
|
+
const context = new _FLangValidationBuildContext__WEBPACK_IMPORTED_MODULE_3__.FLangValidationBuildContext(this.formSchemaRng, this.formulaExprConverter, new _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_9__.NodeTypeInfoHelper(this.formSchemaRng, this.typesRegistry, this.useSchemaValidations));
|
|
81825
82576
|
const sugarRules = Iterator.from(converter.buildFLangValidations(context, this.formSchemaRng)).reduce((ctx, current) => {
|
|
81826
82577
|
const statement = current.statement;
|
|
81827
82578
|
if (!(statement instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement)) {
|
|
@@ -105641,15 +106392,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
105641
106392
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
105642
106393
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
105643
106394
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
106395
|
+
/* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
|
|
106396
|
+
|
|
105644
106397
|
|
|
105645
106398
|
|
|
105646
106399
|
|
|
105647
106400
|
|
|
105648
106401
|
class FLangNormalizationRulesBuilder {
|
|
105649
|
-
constructor(controlCustomizationContext, fetchFunctions, fetchFuncToFlangConverter) {
|
|
106402
|
+
constructor(controlCustomizationContext, fetchFunctions, fetchFuncToFlangConverter, schemaRng, nodeTypeInfoHelper) {
|
|
105650
106403
|
this.controlCustomizationContext = void 0;
|
|
105651
106404
|
this.fetchFunctions = void 0;
|
|
106405
|
+
this.schemaRng = void 0;
|
|
106406
|
+
this.nodeTypeInfoHelper = void 0;
|
|
105652
106407
|
this.fetchFuncToFlangConverter = void 0;
|
|
106408
|
+
this.nodeTypeInfoHelper = nodeTypeInfoHelper;
|
|
106409
|
+
this.schemaRng = schemaRng;
|
|
105653
106410
|
this.fetchFuncToFlangConverter = fetchFuncToFlangConverter;
|
|
105654
106411
|
this.fetchFunctions = fetchFunctions;
|
|
105655
106412
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -105665,28 +106422,29 @@ class FLangNormalizationRulesBuilder {
|
|
|
105665
106422
|
valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
|
|
105666
106423
|
var _dataBinding$defaultV;
|
|
105667
106424
|
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
105668
|
-
const
|
|
106425
|
+
const originalValueReference = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "value"));
|
|
106426
|
+
const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
|
|
105669
106427
|
const defaultValue = (_dataBinding$defaultV = dataBinding.defaultValue) !== null && _dataBinding$defaultV !== void 0 ? _dataBinding$defaultV : "";
|
|
105670
106428
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
|
|
105671
106429
|
try {
|
|
105672
106430
|
var _this$fetchFunctions$, _this$fetchFunctions$2;
|
|
105673
106431
|
const fetchFnText = (_this$fetchFunctions$ = (_this$fetchFunctions$2 = this.fetchFunctions.getFetchFunction(dataBinding.fetchfn + (fetchFunctionSuffix !== null && fetchFunctionSuffix !== void 0 ? fetchFunctionSuffix : ""))) === null || _this$fetchFunctions$2 === void 0 ? void 0 : _this$fetchFunctions$2.toString()) !== null && _this$fetchFunctions$ !== void 0 ? _this$fetchFunctions$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)();
|
|
105674
106432
|
const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
|
|
105675
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(
|
|
106433
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), sourceValueReference, flangExpression), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)));
|
|
105676
106434
|
} catch (e) {
|
|
105677
106435
|
// eslint-disable-next-line no-console
|
|
105678
106436
|
console.error(`fetchfn = "${dataBinding.fetchfn}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
|
|
105679
106437
|
// eslint-disable-next-line no-console
|
|
105680
106438
|
console.error(e instanceof Error ? e.message : e);
|
|
105681
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"),
|
|
106439
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference);
|
|
105682
106440
|
}
|
|
105683
106441
|
}
|
|
105684
106442
|
let valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue);
|
|
105685
106443
|
if (dataBinding.settings) {
|
|
105686
|
-
valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
106444
|
+
valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), valueExpression, sourceValueReference);
|
|
105687
106445
|
}
|
|
105688
106446
|
if (!disabled && !dataBinding.settings) {
|
|
105689
|
-
valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(
|
|
106447
|
+
valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), valueExpression, sourceValueReference);
|
|
105690
106448
|
}
|
|
105691
106449
|
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), valueExpression);
|
|
105692
106450
|
}
|
|
@@ -105696,6 +106454,24 @@ class FLangNormalizationRulesBuilder {
|
|
|
105696
106454
|
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "disabled"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"));
|
|
105697
106455
|
}
|
|
105698
106456
|
}
|
|
106457
|
+
wrapExpressionWithCorrectionExpression(baseType, expr) {
|
|
106458
|
+
switch (baseType) {
|
|
106459
|
+
case "decimal":
|
|
106460
|
+
case "integer":
|
|
106461
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.PrepareNumberExpression(expr);
|
|
106462
|
+
default:
|
|
106463
|
+
return expr;
|
|
106464
|
+
}
|
|
106465
|
+
}
|
|
106466
|
+
getSourceValueReferenceWithCorrection(node, targetPathReference) {
|
|
106467
|
+
var _typeNode$base, _this$schemaRng$getTy;
|
|
106468
|
+
// eslint-disable-next-line
|
|
106469
|
+
const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
|
|
106470
|
+
const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
|
|
106471
|
+
const baseType = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : (_this$schemaRng$getTy = this.schemaRng.getTypeNodeByPath(targetPathReference)) === null || _this$schemaRng$getTy === void 0 ? void 0 : _this$schemaRng$getTy.baseType;
|
|
106472
|
+
const sourceValueReference = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "value"));
|
|
106473
|
+
return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
|
|
106474
|
+
}
|
|
105699
106475
|
}
|
|
105700
106476
|
|
|
105701
106477
|
/***/ }),
|