@kontur.candy/generator 5.14.0-rsvfunctions.7 → 5.14.0-rsvfunctions.8
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 +283 -179
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -59120,6 +59120,69 @@ KCLangRuntimeUtils.kcLangUtilsName = "kcLangUtils";
|
|
|
59120
59120
|
|
|
59121
59121
|
/***/ }),
|
|
59122
59122
|
|
|
59123
|
+
/***/ "./Common/ModelPath/AbsoluteModelFieldPath.ts":
|
|
59124
|
+
/*!****************************************************!*\
|
|
59125
|
+
!*** ./Common/ModelPath/AbsoluteModelFieldPath.ts ***!
|
|
59126
|
+
\****************************************************/
|
|
59127
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
59128
|
+
|
|
59129
|
+
"use strict";
|
|
59130
|
+
__webpack_require__.r(__webpack_exports__);
|
|
59131
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
59132
|
+
/* harmony export */ "AbsoluteModelFieldPath": () => (/* binding */ AbsoluteModelFieldPath)
|
|
59133
|
+
/* harmony export */ });
|
|
59134
|
+
/* harmony import */ var _Engine_src_Engine_Core_CoreTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Engine/src/Engine/Core/CoreTypes */ "./Engine/src/Engine/Core/CoreTypes.ts");
|
|
59135
|
+
/* harmony import */ var _hashUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hashUtils */ "./Common/hashUtils.ts");
|
|
59136
|
+
/* harmony import */ var _TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../TypingUtils */ "./Common/TypingUtils.ts");
|
|
59137
|
+
/* harmony import */ var _IterableUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IterableUtils */ "./Common/IterableUtils.ts");
|
|
59138
|
+
/* harmony import */ var _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EachCurrentCollision */ "./Common/ModelPath/EachCurrentCollision.ts");
|
|
59139
|
+
/* harmony import */ var _ModelPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
59140
|
+
|
|
59141
|
+
|
|
59142
|
+
|
|
59143
|
+
|
|
59144
|
+
|
|
59145
|
+
|
|
59146
|
+
class AbsoluteModelFieldPath {
|
|
59147
|
+
constructor(path, fieldName) {
|
|
59148
|
+
this.path = void 0;
|
|
59149
|
+
this.field = void 0;
|
|
59150
|
+
this.path = path;
|
|
59151
|
+
this.field = fieldName;
|
|
59152
|
+
}
|
|
59153
|
+
getHash() {
|
|
59154
|
+
return this.path.getHash() + (0,_hashUtils__WEBPACK_IMPORTED_MODULE_1__.getSimpleHashByString)(this.field);
|
|
59155
|
+
}
|
|
59156
|
+
isEquals(modelPath, eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_4__.EachCurrentCollision.AreSame) {
|
|
59157
|
+
return this.path.isEquals(modelPath.path, eachCurrentCollision) && this.field === modelPath.field;
|
|
59158
|
+
}
|
|
59159
|
+
static createFromString(pathWithFieldName) {
|
|
59160
|
+
return this.createFrom(pathWithFieldName, path => (0,_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsolute)(path));
|
|
59161
|
+
}
|
|
59162
|
+
static createFromMask(pathWithFieldName, multiplicitySymbol) {
|
|
59163
|
+
return this.createFrom(pathWithFieldName, path => (0,_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsoluteFromMask)(path, multiplicitySymbol));
|
|
59164
|
+
}
|
|
59165
|
+
static createFrom(pathWithFieldName, modelPathFactory) {
|
|
59166
|
+
var _match$, _ref;
|
|
59167
|
+
const match = AbsoluteModelFieldPath.fieldExtractRegex.exec(pathWithFieldName);
|
|
59168
|
+
const path = match != undefined ? (_match$ = match[1]) !== null && _match$ !== void 0 ? _match$ : (0,_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)() : pathWithFieldName;
|
|
59169
|
+
const field = match != undefined ? (_ref = match[2]) !== null && _ref !== void 0 ? _ref : (0,_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)() : "value";
|
|
59170
|
+
return new AbsoluteModelFieldPath(modelPathFactory(path), field);
|
|
59171
|
+
}
|
|
59172
|
+
toString() {
|
|
59173
|
+
return `${this.path.toLegacyPath()}.${this.field}`;
|
|
59174
|
+
}
|
|
59175
|
+
toLegacyPath() {
|
|
59176
|
+
const isLastTokenAnInstance = _ModelPath__WEBPACK_IMPORTED_MODULE_5__.PathTokens.isInstanceToken(_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.last(this.path.getPathParts()));
|
|
59177
|
+
const slashIfRequired = isLastTokenAnInstance ? "/" : "";
|
|
59178
|
+
return `${this.path.toLegacyPath()}${slashIfRequired}.${this.field}`;
|
|
59179
|
+
}
|
|
59180
|
+
}
|
|
59181
|
+
AbsoluteModelFieldPath.extraFieldNames = ["\\$errorCount", "\\$warningCount"];
|
|
59182
|
+
AbsoluteModelFieldPath.fieldExtractRegex = new RegExp(`^(.*)\\.(${AbsoluteModelFieldPath.extraFieldNames.concat((0,_Engine_src_Engine_Core_CoreTypes__WEBPACK_IMPORTED_MODULE_0__.getKnownViewModelFieldNames)()).join("|")})$`);
|
|
59183
|
+
|
|
59184
|
+
/***/ }),
|
|
59185
|
+
|
|
59123
59186
|
/***/ "./Common/ModelPath/BuildIterationSequence.ts":
|
|
59124
59187
|
/*!****************************************************!*\
|
|
59125
59188
|
!*** ./Common/ModelPath/BuildIterationSequence.ts ***!
|
|
@@ -59312,16 +59375,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
59312
59375
|
/* harmony export */ "createAbsoluteResolvedFromTokens": () => (/* binding */ createAbsoluteResolvedFromTokens),
|
|
59313
59376
|
/* harmony export */ "createRelativeFromTokens": () => (/* binding */ createRelativeFromTokens),
|
|
59314
59377
|
/* harmony export */ "joinModelPaths": () => (/* binding */ joinModelPaths),
|
|
59315
|
-
/* harmony export */ "AbsoluteModelFieldPath": () => (/* binding */ AbsoluteModelFieldPath),
|
|
59316
59378
|
/* harmony export */ "ModelPathImpl": () => (/* binding */ ModelPathImpl)
|
|
59317
59379
|
/* harmony export */ });
|
|
59318
59380
|
/* harmony import */ var _IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../IterableUtils */ "./Common/IterableUtils.ts");
|
|
59319
59381
|
/* harmony import */ var _TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../TypingUtils */ "./Common/TypingUtils.ts");
|
|
59320
|
-
/* harmony import */ var
|
|
59321
|
-
/* harmony import */ var
|
|
59322
|
-
/* harmony import */ var
|
|
59323
|
-
/* harmony import */ var _PathMatcher__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PathMatcher */ "./Common/ModelPath/PathMatcher.ts");
|
|
59324
|
-
|
|
59382
|
+
/* harmony import */ var _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./EachCurrentCollision */ "./Common/ModelPath/EachCurrentCollision.ts");
|
|
59383
|
+
/* harmony import */ var _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ModelPathBuilder */ "./Common/ModelPath/ModelPathBuilder.ts");
|
|
59384
|
+
/* harmony import */ var _PathMatcher__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PathMatcher */ "./Common/ModelPath/PathMatcher.ts");
|
|
59325
59385
|
|
|
59326
59386
|
|
|
59327
59387
|
|
|
@@ -59442,47 +59502,6 @@ function joinModelPaths(...parts) {
|
|
|
59442
59502
|
}
|
|
59443
59503
|
return new ModelPathImpl(resultParts, absolute);
|
|
59444
59504
|
}
|
|
59445
|
-
class AbsoluteModelFieldPath {
|
|
59446
|
-
constructor(path, fieldName) {
|
|
59447
|
-
this.path = void 0;
|
|
59448
|
-
this.field = void 0;
|
|
59449
|
-
this.path = path;
|
|
59450
|
-
this.field = fieldName;
|
|
59451
|
-
}
|
|
59452
|
-
getHash() {
|
|
59453
|
-
return this.path.getHash() + (0,_hashUtils__WEBPACK_IMPORTED_MODULE_2__.getSimpleHashByString)(this.field);
|
|
59454
|
-
}
|
|
59455
|
-
isEquals(modelPath, eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_3__.EachCurrentCollision.AreSame) {
|
|
59456
|
-
return this.path.isEquals(modelPath.path, eachCurrentCollision) && this.field === modelPath.field;
|
|
59457
|
-
}
|
|
59458
|
-
static createFromString(pathWithFieldName) {
|
|
59459
|
-
if (pathWithFieldName.endsWith(".$errorCount")) {
|
|
59460
|
-
return new AbsoluteModelFieldPath(createAbsolute(pathWithFieldName.replace(".$errorCount", "")), "$errorCount");
|
|
59461
|
-
}
|
|
59462
|
-
if (pathWithFieldName.endsWith(".$warningCount")) {
|
|
59463
|
-
return new AbsoluteModelFieldPath(createAbsolute(pathWithFieldName.replace(".$warningCount", "")), "$warningCount");
|
|
59464
|
-
}
|
|
59465
|
-
return new AbsoluteModelFieldPath(createAbsolute(pathWithFieldName), "value");
|
|
59466
|
-
}
|
|
59467
|
-
static createFromMask(pathWithFieldName, multiplicitySymbol) {
|
|
59468
|
-
if (pathWithFieldName.endsWith(".$errorCount")) {
|
|
59469
|
-
return new AbsoluteModelFieldPath(createAbsoluteFromMask(pathWithFieldName.replace(".$errorCount", ""), multiplicitySymbol), "$errorCount");
|
|
59470
|
-
}
|
|
59471
|
-
if (pathWithFieldName.endsWith(".$warningCount")) {
|
|
59472
|
-
return new AbsoluteModelFieldPath(createAbsoluteFromMask(pathWithFieldName.replace(".$warningCount", ""), multiplicitySymbol), "$warningCount");
|
|
59473
|
-
}
|
|
59474
|
-
if (pathWithFieldName.endsWith(".errorsCount")) {
|
|
59475
|
-
return new AbsoluteModelFieldPath(createAbsoluteFromMask(pathWithFieldName.replace(".errorsCount", ""), multiplicitySymbol), "errorsCount");
|
|
59476
|
-
}
|
|
59477
|
-
if (pathWithFieldName.endsWith(".warningsCount")) {
|
|
59478
|
-
return new AbsoluteModelFieldPath(createAbsoluteFromMask(pathWithFieldName.replace(".warningsCount", ""), multiplicitySymbol), "warningsCount");
|
|
59479
|
-
}
|
|
59480
|
-
return new AbsoluteModelFieldPath(createAbsoluteFromMask(pathWithFieldName, multiplicitySymbol), "value");
|
|
59481
|
-
}
|
|
59482
|
-
toString() {
|
|
59483
|
-
return `${this.path.toLegacyPath()}.${this.field}`;
|
|
59484
|
-
}
|
|
59485
|
-
}
|
|
59486
59505
|
function isAllTokensResolved(tokens) {
|
|
59487
59506
|
// Я что-то немогу сообразить как тут всё строго написать...
|
|
59488
59507
|
// @ts-expect-error
|
|
@@ -59577,8 +59596,8 @@ class ModelPathImpl {
|
|
|
59577
59596
|
var _this$legacyPath;
|
|
59578
59597
|
return (_this$legacyPath = this.legacyPath) !== null && _this$legacyPath !== void 0 ? _this$legacyPath : this.legacyPath = this.tokens.map(x => this.pathPartToString(x)).join("/");
|
|
59579
59598
|
}
|
|
59580
|
-
isEquals(modelPath, eachCurrentCollision =
|
|
59581
|
-
if (eachCurrentCollision ===
|
|
59599
|
+
isEquals(modelPath, eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__.EachCurrentCollision.AreSame) {
|
|
59600
|
+
if (eachCurrentCollision === _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__.EachCurrentCollision.AreSame) {
|
|
59582
59601
|
return this.toLegacyPath() === modelPath.toLegacyPath();
|
|
59583
59602
|
} else {
|
|
59584
59603
|
return this.isAbsolute() === modelPath.isAbsolute() && Iterator.from(_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.zip(this.getPathParts(), modelPath.getPathParts())).every(([t1, t2]) => t1 === t2);
|
|
@@ -59588,14 +59607,14 @@ class ModelPathImpl {
|
|
|
59588
59607
|
/**
|
|
59589
59608
|
* Всегда целое положительное беззнаковое 32-битное число
|
|
59590
59609
|
*/
|
|
59591
|
-
getHash(eachCurrentCollision =
|
|
59610
|
+
getHash(eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__.EachCurrentCollision.AreSame) {
|
|
59592
59611
|
let hash = 5381;
|
|
59593
59612
|
for (const token of (0,_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.reverseArray)(this.tokens)) {
|
|
59594
59613
|
let currentStr;
|
|
59595
59614
|
if (PathTokens.isSimpleToken(token)) {
|
|
59596
59615
|
currentStr = token;
|
|
59597
59616
|
} else {
|
|
59598
|
-
if (eachCurrentCollision ===
|
|
59617
|
+
if (eachCurrentCollision === _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__.EachCurrentCollision.AreDifferent) {
|
|
59599
59618
|
currentStr = token === PathTokens.each ? "*" : "!";
|
|
59600
59619
|
} else {
|
|
59601
59620
|
currentStr = "*";
|
|
@@ -59649,8 +59668,8 @@ class ModelPathImpl {
|
|
|
59649
59668
|
}
|
|
59650
59669
|
return true;
|
|
59651
59670
|
}
|
|
59652
|
-
getIterationRank(eachCurrentCollision =
|
|
59653
|
-
return (0,_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.count)(Iterator.from(this.tokens).filter(x => eachCurrentCollision ==
|
|
59671
|
+
getIterationRank(eachCurrentCollision = _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__.EachCurrentCollision.AreDifferent) {
|
|
59672
|
+
return (0,_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.count)(Iterator.from(this.tokens).filter(x => eachCurrentCollision == _EachCurrentCollision__WEBPACK_IMPORTED_MODULE_2__.EachCurrentCollision.AreDifferent ? x === PathTokens.each : PathTokens.isMultiToken(x)));
|
|
59654
59673
|
}
|
|
59655
59674
|
isEmpty() {
|
|
59656
59675
|
return this.tokens.length === 0;
|
|
@@ -59662,17 +59681,17 @@ class ModelPathImpl {
|
|
|
59662
59681
|
if (!modelPath.isAbsolute()) {
|
|
59663
59682
|
throw new Error(`Cannot match non absolute path '${modelPath.toString()}'`);
|
|
59664
59683
|
}
|
|
59665
|
-
return
|
|
59684
|
+
return _PathMatcher__WEBPACK_IMPORTED_MODULE_4__.PathMatcher.match(this.tokens, modelPath.getPathPartsAsArray());
|
|
59666
59685
|
}
|
|
59667
59686
|
*splitByMultiplicity() {
|
|
59668
|
-
let lastSimpleParts = new
|
|
59687
|
+
let lastSimpleParts = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.isAbsolute());
|
|
59669
59688
|
for (const token of this.tokens) {
|
|
59670
59689
|
if (PathTokens.isSimpleToken(token)) {
|
|
59671
59690
|
lastSimpleParts.append(token);
|
|
59672
59691
|
} else {
|
|
59673
59692
|
if (!lastSimpleParts.empty) {
|
|
59674
59693
|
yield lastSimpleParts.toResolvedPath();
|
|
59675
|
-
lastSimpleParts = new
|
|
59694
|
+
lastSimpleParts = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(false);
|
|
59676
59695
|
}
|
|
59677
59696
|
yield token;
|
|
59678
59697
|
}
|
|
@@ -59732,7 +59751,7 @@ class ModelPathImpl {
|
|
|
59732
59751
|
return new ModelPathImpl(this.tokens, true);
|
|
59733
59752
|
}
|
|
59734
59753
|
*getAllParentPaths() {
|
|
59735
|
-
const result = new
|
|
59754
|
+
const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.isAbsolute());
|
|
59736
59755
|
for (const token of _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.skipLast(this.getPathParts(), 1)) {
|
|
59737
59756
|
result.append(token);
|
|
59738
59757
|
yield result.toPath();
|
|
@@ -59746,7 +59765,7 @@ class ModelPathImpl {
|
|
|
59746
59765
|
return this;
|
|
59747
59766
|
}
|
|
59748
59767
|
getParentPath() {
|
|
59749
|
-
const result = new
|
|
59768
|
+
const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.absolute);
|
|
59750
59769
|
for (const token of _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.skipLast(this.getPathParts(), 1)) {
|
|
59751
59770
|
result.append(token);
|
|
59752
59771
|
}
|
|
@@ -59759,7 +59778,7 @@ class ModelPathImpl {
|
|
|
59759
59778
|
return this;
|
|
59760
59779
|
}
|
|
59761
59780
|
let instanceCounter = 0;
|
|
59762
|
-
const result = new
|
|
59781
|
+
const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(true);
|
|
59763
59782
|
for (const token of this.getPathParts()) {
|
|
59764
59783
|
if (PathTokens.isMultiToken(token) && instanceCounter < instances.length) {
|
|
59765
59784
|
var _instances$instanceCo;
|
|
@@ -60429,6 +60448,33 @@ function isMatchAbbreviation(abbreviation, value) {
|
|
|
60429
60448
|
|
|
60430
60449
|
/***/ }),
|
|
60431
60450
|
|
|
60451
|
+
/***/ "./Engine/src/Engine/Core/CoreTypes.ts":
|
|
60452
|
+
/*!*********************************************!*\
|
|
60453
|
+
!*** ./Engine/src/Engine/Core/CoreTypes.ts ***!
|
|
60454
|
+
\*********************************************/
|
|
60455
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
60456
|
+
|
|
60457
|
+
"use strict";
|
|
60458
|
+
__webpack_require__.r(__webpack_exports__);
|
|
60459
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60460
|
+
/* harmony export */ "nonRegularFieldName": () => (/* binding */ nonRegularFieldName),
|
|
60461
|
+
/* harmony export */ "getKnownViewModelFieldNames": () => (/* binding */ getKnownViewModelFieldNames)
|
|
60462
|
+
/* harmony export */ });
|
|
60463
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60464
|
+
|
|
60465
|
+
// Эту модель, которая лежит в redux-состоянии в поле viewModel, каждый узел кроме . является ViewModel
|
|
60466
|
+
|
|
60467
|
+
function nonRegularFieldName(fieldName) {
|
|
60468
|
+
// @ts-ignore
|
|
60469
|
+
return fieldName;
|
|
60470
|
+
}
|
|
60471
|
+
function getKnownViewModelFieldNames() {
|
|
60472
|
+
const names = ["children", "error", "warning", "description", "id", "disabled", "visible", "disabledSending", "value", "autoValue", "autoFlag", "resourcesHash", "errorsCount", "warningsCount", "code", "picklist", "normalized", "emptyUnitsVisible", "pencilOpened", "ignoreAutoFlag", "disableValueAutoInit", "index", "regionCode", "district", "city", "settlement", "street", "house", "building", "room", "bossValue", "agentValue", "senderInn", "nameorg", "sum", "count", "normalizationSource", "referencedId"];
|
|
60473
|
+
return names;
|
|
60474
|
+
}
|
|
60475
|
+
|
|
60476
|
+
/***/ }),
|
|
60477
|
+
|
|
60432
60478
|
/***/ "./Engine/src/Engine/Core/ModalManager/Modals/Utils/Types.ts":
|
|
60433
60479
|
/*!*******************************************************************!*\
|
|
60434
60480
|
!*** ./Engine/src/Engine/Core/ModalManager/Modals/Utils/Types.ts ***!
|
|
@@ -79669,7 +79715,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79669
79715
|
|
|
79670
79716
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
79671
79717
|
try {
|
|
79672
|
-
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$
|
|
79718
|
+
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _sugarRoot$schemaVali4, _sugarRoot$schemaVali5, _additionalContent$fo5, _additionalContent$fo6;
|
|
79673
79719
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
79674
79720
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_13__.createDefaultSugarSerializer)();
|
|
79675
79721
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_14__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_11__.FormNode);
|
|
@@ -79678,7 +79724,9 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
79678
79724
|
const kxXmlMathContainer = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_17__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
|
|
79679
79725
|
const formulasFromSugar = extractFormulasFromSugarKCLang(sugarRoot);
|
|
79680
79726
|
const formulas = ((_kxXmlMathContainer$f = kxXmlMathContainer === null || kxXmlMathContainer === void 0 ? void 0 : (_kxXmlMathContainer$f2 = kxXmlMathContainer.formulas) === null || _kxXmlMathContainer$f2 === void 0 ? void 0 : _kxXmlMathContainer$f2.items) !== null && _kxXmlMathContainer$f !== void 0 ? _kxXmlMathContainer$f : []).concat((_kcLangMathContainer$ = kcLangMathContainer === null || kcLangMathContainer === void 0 ? void 0 : (_kcLangMathContainer$2 = kcLangMathContainer.formulas) === null || _kcLangMathContainer$2 === void 0 ? void 0 : _kcLangMathContainer$2.items) !== null && _kcLangMathContainer$ !== void 0 ? _kcLangMathContainer$ : []).concat([...formulasFromSugar]);
|
|
79681
|
-
const
|
|
79727
|
+
const useServerCalculations = (_additionalContent$fo = (_additionalContent$fo2 = additionalContent.formJsonSettings) === null || _additionalContent$fo2 === void 0 ? void 0 : _additionalContent$fo2.useServerSideCalculations) !== null && _additionalContent$fo !== void 0 ? _additionalContent$fo : false;
|
|
79728
|
+
const useCalculator2 = !useServerCalculations && (((_additionalContent$fo3 = additionalContent.formJsonSettings) === null || _additionalContent$fo3 === void 0 ? void 0 : _additionalContent$fo3.autoCalculationCalculatorImpl) === "calculator2" || ((_additionalContent$fo4 = additionalContent.formJsonSettings) === null || _additionalContent$fo4 === void 0 ? void 0 : _additionalContent$fo4.useServerSideFLangNormalization));
|
|
79729
|
+
const useOldCalculator = !useCalculator2 && !useServerCalculations;
|
|
79682
79730
|
const kcXmlConditions = (_Iterator$from$map$fl = Iterator.from(getImportedKcXmlValidations(sugarRoot, additionalContent)).map(x => {
|
|
79683
79731
|
var _container$conditions, _container$conditions2;
|
|
79684
79732
|
const container = formulaReader.readFormulas(x);
|
|
@@ -79707,7 +79755,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
79707
79755
|
const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_36__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter);
|
|
79708
79756
|
const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_37__.InitializationRulesBuilder(sugarRoot, resourcesHash);
|
|
79709
79757
|
const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_38__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
|
|
79710
|
-
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);
|
|
79758
|
+
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
79711
79759
|
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);
|
|
79712
79760
|
const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_33__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
|
|
79713
79761
|
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng);
|
|
@@ -79720,18 +79768,18 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
79720
79768
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
79721
79769
|
builder.addResource("lazyLoadDeclaration.js", lazyLoadGeneratorResult.content);
|
|
79722
79770
|
const autocalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_18__.AutoCalculationsGenerator(dataDeclarationHelper, schemaRng);
|
|
79723
|
-
const formulasForCalculator =
|
|
79771
|
+
const formulasForCalculator = useOldCalculator ? formulas : [];
|
|
79724
79772
|
builder.addResource("calculationFunctions.js", autocalcGenerator.generate(sugarRoot, additionalContent.autocalcsContent, formulasForCalculator));
|
|
79725
79773
|
builder.addResource("dataDeclaration.js", dataDeclarationContent);
|
|
79726
|
-
if ((_additionalContent$
|
|
79727
|
-
var _additionalContent$
|
|
79774
|
+
if ((_additionalContent$fo5 = (_additionalContent$fo6 = additionalContent.formJsonSettings) === null || _additionalContent$fo6 === void 0 ? void 0 : _additionalContent$fo6.useServerSideFLangNormalization) !== null && _additionalContent$fo5 !== void 0 ? _additionalContent$fo5 : false) {
|
|
79775
|
+
var _additionalContent$fo7, _additionalContent$fo8;
|
|
79728
79776
|
const defaultNormalizationRules = normalizationRulesGenerator.generateRules();
|
|
79729
79777
|
const customNormalizers = [{
|
|
79730
79778
|
normalizerId: "formulas",
|
|
79731
|
-
content: (_additionalContent$
|
|
79779
|
+
content: (_additionalContent$fo7 = additionalContent.formJsonSettings) !== null && _additionalContent$fo7 !== void 0 && _additionalContent$fo7.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
|
|
79732
79780
|
}, {
|
|
79733
79781
|
normalizerId: "formulasWithInitializers",
|
|
79734
|
-
content: (_additionalContent$
|
|
79782
|
+
content: (_additionalContent$fo8 = additionalContent.formJsonSettings) !== null && _additionalContent$fo8 !== void 0 && _additionalContent$fo8.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.generateRules()
|
|
79735
79783
|
}].filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrEmpty)(x.content));
|
|
79736
79784
|
const additionalNormalizationRules = additionalContent.additionalNormalizers ? additionalContent.additionalNormalizers.map(additionalNormalizer => {
|
|
79737
79785
|
switch (additionalNormalizer.extension) {
|
|
@@ -79769,7 +79817,8 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
79769
79817
|
const kcXmlAutoCalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_Calculator2_AutoCalculationsCalculator2Generator__WEBPACK_IMPORTED_MODULE_28__.AutoCalculationsCalculator2Generator(formSchemaRng, dataDeclarationHelper);
|
|
79770
79818
|
builder.addResource("kcXmlAutoCalculationConfigurator.js", kcXmlAutoCalcGenerator.generate(formulasForCalculator2));
|
|
79771
79819
|
const kcXmlValidationGenerator = new _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_23__.KCXmlValidationGenerator(formSchemaRng);
|
|
79772
|
-
|
|
79820
|
+
const kcXmlConditionsForCalculator2 = !useServerCalculations ? kcXmlConditions : [];
|
|
79821
|
+
builder.addResource("kcXmlValidationConfigurator.js", kcXmlValidationGenerator.generate(kcXmlConditionsForCalculator2));
|
|
79773
79822
|
// const importedAutoCalculations = getImportedAutoCalculations(sugarRoot);
|
|
79774
79823
|
builder.addResource("autocalculationConfigurators.js", `export default []`);
|
|
79775
79824
|
builder.addResource("FakeStyles.less", `// empty styles to enforce style files`);
|
|
@@ -80238,8 +80287,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80238
80287
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
80239
80288
|
/* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
|
|
80240
80289
|
/* harmony import */ var _common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/KCLang/KCLangToXmlTranspiler */ "./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts");
|
|
80241
|
-
/* harmony import */ var
|
|
80242
|
-
/* harmony import */ var
|
|
80290
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
80291
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
80292
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
80293
|
+
|
|
80243
80294
|
|
|
80244
80295
|
|
|
80245
80296
|
|
|
@@ -80283,11 +80334,11 @@ class CustomKCLangToFlangRuleGenerator {
|
|
|
80283
80334
|
const defaultValue = this.dataDeclarationHelper.getDefaultValue(fullTarget.toLegacyPath());
|
|
80284
80335
|
const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
|
|
80285
80336
|
const result = [];
|
|
80286
|
-
const getFormulaExpression = field => new
|
|
80337
|
+
const getFormulaExpression = field => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression(defaultValue));
|
|
80287
80338
|
if (isTargetAutoField) {
|
|
80288
|
-
result.push(new
|
|
80339
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string)));
|
|
80289
80340
|
} else {
|
|
80290
|
-
result.push(new
|
|
80341
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
|
|
80291
80342
|
}
|
|
80292
80343
|
result.push(...precalculationRules);
|
|
80293
80344
|
return result;
|
|
@@ -80321,8 +80372,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80321
80372
|
/* harmony import */ var _common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/KCLang/KCLangToXmlTranspiler */ "./Generator/src/common/KCLang/KCLangToXmlTranspiler.ts");
|
|
80322
80373
|
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
80323
80374
|
/* harmony import */ var _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/SchemaRng/StringTypeMessageGenerator */ "./Generator/src/common/SchemaRng/StringTypeMessageGenerator.ts");
|
|
80324
|
-
/* harmony import */ var
|
|
80325
|
-
/* harmony import */ var
|
|
80375
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
80376
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
80377
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
80326
80378
|
|
|
80327
80379
|
|
|
80328
80380
|
|
|
@@ -80336,7 +80388,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80336
80388
|
|
|
80337
80389
|
|
|
80338
80390
|
|
|
80339
|
-
|
|
80391
|
+
|
|
80392
|
+
const makeArrayLiteral = text => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(`["${text}"]`);
|
|
80340
80393
|
const makeMessage = (constraints, sugarTypeDescription, schemaTypeDescription) => {
|
|
80341
80394
|
var _ref, _ref2;
|
|
80342
80395
|
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 : "Поле должно быть заполнено");
|
|
@@ -80371,7 +80424,7 @@ class FLangValidationBuildContext {
|
|
|
80371
80424
|
buildBasicValidations(targetPath, typeNode, schemaTypeNode, optional, highOrderDescription, nodeGId) {
|
|
80372
80425
|
var _typeNode$base, _typeNode$description;
|
|
80373
80426
|
const validations = [];
|
|
80374
|
-
const valueReference = new
|
|
80427
|
+
const valueReference = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(targetPath.toCurrentIteration(), "value");
|
|
80375
80428
|
const baseName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.baseType;
|
|
80376
80429
|
const baseDescription = (_typeNode$description = typeNode === null || typeNode === void 0 ? void 0 : typeNode.description) !== null && _typeNode$description !== void 0 ? _typeNode$description : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description;
|
|
80377
80430
|
if (baseName != undefined) {
|
|
@@ -80391,12 +80444,12 @@ class FLangValidationBuildContext {
|
|
|
80391
80444
|
const schemaNode = this.schemaRng.getElementByPath(targetPath);
|
|
80392
80445
|
const parentNode = schemaNode != undefined ? this.getFirstAcceptedParent(schemaNode) : undefined;
|
|
80393
80446
|
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;
|
|
80394
|
-
const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new
|
|
80447
|
+
const restChecks = allChildrenPaths === null || allChildrenPaths === void 0 ? void 0 : allChildrenPaths.map(childPath => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(childPath.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(""))).reduce(_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.combineByAndFlangExpr, undefined);
|
|
80395
80448
|
const errorValidations = validations.filter(x => !x.checkType || x.checkType === "error");
|
|
80396
80449
|
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);
|
|
80397
80450
|
const result = [];
|
|
80398
80451
|
result.push({
|
|
80399
|
-
statement: new
|
|
80452
|
+
statement: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(targetPath, "error"), errorExpression),
|
|
80400
80453
|
checkType: "error"
|
|
80401
80454
|
});
|
|
80402
80455
|
const warningValidations = validations.filter(x => x.checkType === "warning");
|
|
@@ -80405,7 +80458,7 @@ class FLangValidationBuildContext {
|
|
|
80405
80458
|
}
|
|
80406
80459
|
const warningExpression = this.createFlangExpression(warningValidations, targetPath, valueReference, "warning", highOrderDescription !== null && highOrderDescription !== void 0 ? highOrderDescription : typeNode === null || typeNode === void 0 ? void 0 : typeNode.requiredDescription, true, parentNode, restChecks);
|
|
80407
80460
|
result.push({
|
|
80408
|
-
statement: new
|
|
80461
|
+
statement: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(targetPath, "warning"), warningExpression),
|
|
80409
80462
|
checkType: "warning"
|
|
80410
80463
|
});
|
|
80411
80464
|
return result;
|
|
@@ -80414,30 +80467,30 @@ class FLangValidationBuildContext {
|
|
|
80414
80467
|
let expression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.IterUtils.reduce(validations, (result, {
|
|
80415
80468
|
condition,
|
|
80416
80469
|
message
|
|
80417
|
-
}) => new
|
|
80470
|
+
}) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(condition, message, result), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression());
|
|
80418
80471
|
if (!optional) {
|
|
80419
80472
|
if (parentNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_2__.FormSchemaRngElement) {
|
|
80420
|
-
const requiredExpression = new
|
|
80421
|
-
const targetCheck = new
|
|
80473
|
+
const requiredExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(""))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("[" + JSON.stringify(requiredDescription !== null && requiredDescription !== void 0 ? requiredDescription : "Поле должно быть заполнено") + "]"), expression);
|
|
80474
|
+
const targetCheck = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.EqExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.EqExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("")));
|
|
80422
80475
|
if (restChecks != undefined) {
|
|
80423
|
-
const finalChildrenCondition = new
|
|
80424
|
-
expression = new
|
|
80476
|
+
const finalChildrenCondition = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AndBinaryExpression(targetCheck, restChecks);
|
|
80477
|
+
expression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(finalChildrenCondition, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression(), requiredExpression);
|
|
80425
80478
|
} else {
|
|
80426
80479
|
expression = requiredExpression;
|
|
80427
80480
|
}
|
|
80428
80481
|
} else {
|
|
80429
|
-
expression = new
|
|
80482
|
+
expression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(""))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("[" + JSON.stringify(requiredDescription !== null && requiredDescription !== void 0 ? requiredDescription : "Поле должно быть заполнено") + "]"), expression);
|
|
80430
80483
|
}
|
|
80431
80484
|
} else {
|
|
80432
|
-
expression = new
|
|
80485
|
+
expression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(""))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression(), expression);
|
|
80433
80486
|
}
|
|
80434
80487
|
const visibilityFlangCondition = this.visibilityConditions.map(x => {
|
|
80435
|
-
const target = new
|
|
80488
|
+
const target = new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_11__.AbsoluteModelFieldPath(targetPath, checkType);
|
|
80436
80489
|
const prefix = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createAbsoluteFromTokens)(x.path.getPathPartsAsArray().filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isSimpleToken));
|
|
80437
80490
|
const flangExpr = this.getFlangExpressionFromKCLangCondition(prefix, target, x.condition, x.invertRequired);
|
|
80438
80491
|
return flangExpr;
|
|
80439
|
-
}).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined).reduce((acc, current) => acc != undefined ? new
|
|
80440
|
-
return visibilityFlangCondition != undefined ? new
|
|
80492
|
+
}).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AndBinaryExpression(acc, current) : current, undefined);
|
|
80493
|
+
return visibilityFlangCondition != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression(visibilityFlangCondition, expression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()) : expression;
|
|
80441
80494
|
}
|
|
80442
80495
|
getFlangExpressionFromKCLangCondition(prefix, target, condition, invertRequired) {
|
|
80443
80496
|
const fullKcLangExpr = `
|
|
@@ -80453,13 +80506,13 @@ class FLangValidationBuildContext {
|
|
|
80453
80506
|
const formulaExpr = this.formulaExprConverter.compileExpressionToFlangExpression(formulaNode.expression, prefix, target, value => {
|
|
80454
80507
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_9__.NotSupportedError("In contextual KcLang conditions should not be summation.");
|
|
80455
80508
|
});
|
|
80456
|
-
const flangExpr = formulaExpr instanceof
|
|
80509
|
+
const flangExpr = formulaExpr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ConditionalExpression ? formulaExpr.condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
|
|
80457
80510
|
const getTypeCorrectedExpression = () => {
|
|
80458
|
-
const argExpr = (0,
|
|
80459
|
-
return new
|
|
80511
|
+
const argExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.castOperandToStringIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.tryExtractValueReferenceAsStringFromDecimal)(flangExpr));
|
|
80512
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NotEqExpression(argExpr, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NotEqExpression(argExpr, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("")));
|
|
80460
80513
|
};
|
|
80461
|
-
const correctedFLangExpr = flangExpr.getType() ===
|
|
80462
|
-
return invertRequired ? new
|
|
80514
|
+
const correctedFLangExpr = flangExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.BuildInTypeExpression.bool ? flangExpr : getTypeCorrectedExpression();
|
|
80515
|
+
return invertRequired ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(correctedFLangExpr) : correctedFLangExpr;
|
|
80463
80516
|
} catch (e) {
|
|
80464
80517
|
try {
|
|
80465
80518
|
var _match$, _match$2, _match$3;
|
|
@@ -80470,26 +80523,26 @@ class FLangValidationBuildContext {
|
|
|
80470
80523
|
const value = match === null || match === void 0 ? void 0 : (_match$3 = match[0]) === null || _match$3 === void 0 ? void 0 : _match$3[3];
|
|
80471
80524
|
if (path != undefined && sign != undefined && value != undefined) {
|
|
80472
80525
|
const fullPath = this.schemaRng.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createModelPath)(path, false)).normalize()).trimLastStarIfLastToken().toCurrentIteration();
|
|
80473
|
-
const valueRef = new
|
|
80474
|
-
const len = new
|
|
80475
|
-
const argument = new
|
|
80526
|
+
const valueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.ValueReferenceExpression(fullPath, "children");
|
|
80527
|
+
const len = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(valueRef);
|
|
80528
|
+
const argument = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(value);
|
|
80476
80529
|
const getOperation = () => {
|
|
80477
80530
|
switch (sign) {
|
|
80478
80531
|
case ">":
|
|
80479
|
-
return new
|
|
80532
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.GtExpression(len, argument);
|
|
80480
80533
|
case "<":
|
|
80481
|
-
return new
|
|
80534
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LtExpression(len, argument);
|
|
80482
80535
|
case "==":
|
|
80483
80536
|
case "===":
|
|
80484
|
-
return new
|
|
80537
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.EqExpression(len, argument);
|
|
80485
80538
|
case "!=":
|
|
80486
80539
|
case "!==":
|
|
80487
|
-
return new
|
|
80540
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NotEqExpression(len, argument);
|
|
80488
80541
|
default:
|
|
80489
80542
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_9__.NotImplementedError();
|
|
80490
80543
|
}
|
|
80491
80544
|
};
|
|
80492
|
-
return invertRequired ? new
|
|
80545
|
+
return invertRequired ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(getOperation()) : getOperation();
|
|
80493
80546
|
}
|
|
80494
80547
|
} catch {
|
|
80495
80548
|
// eslint-disable-next-line no-console
|
|
@@ -80506,9 +80559,9 @@ class FLangValidationBuildContext {
|
|
|
80506
80559
|
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 : [];
|
|
80507
80560
|
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 : [];
|
|
80508
80561
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(enumerationItems)) {
|
|
80509
|
-
const enumerationRuleBody = new
|
|
80562
|
+
const enumerationRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OneOfExpression(valueReference, enumerationItems.map(item => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(item)));
|
|
80510
80563
|
yield {
|
|
80511
|
-
condition: new
|
|
80564
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(enumerationRuleBody),
|
|
80512
80565
|
message: makeMessage({
|
|
80513
80566
|
enumerationAllowedValues: enumerationItems
|
|
80514
80567
|
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description),
|
|
@@ -80519,9 +80572,9 @@ class FLangValidationBuildContext {
|
|
|
80519
80572
|
const gId = (_digest$gId = digest === null || digest === void 0 ? void 0 : digest.gId) !== null && _digest$gId !== void 0 ? _digest$gId : nodeGId;
|
|
80520
80573
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrEmpty)(gId) && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayHasLength)(enumerationItems, 0)) {
|
|
80521
80574
|
var _ref3, _digest$description, _ref4, _digest$checkType;
|
|
80522
|
-
const ruleBody = new
|
|
80575
|
+
const ruleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.IsEqualsBinaryExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(""))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.HasPicklistValueExpression(valueReference, `${gId}[code]`));
|
|
80523
80576
|
yield {
|
|
80524
|
-
condition: new
|
|
80577
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(ruleBody),
|
|
80525
80578
|
message: makeArrayLiteral((_ref3 = (_digest$description = digest === null || digest === void 0 ? void 0 : digest.description) !== null && _digest$description !== void 0 ? _digest$description : typeNode === null || typeNode === void 0 ? void 0 : typeNode.description) !== null && _ref3 !== void 0 ? _ref3 : "Поле заполнено не по справочнику"),
|
|
80526
80579
|
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"
|
|
80527
80580
|
};
|
|
@@ -80529,7 +80582,7 @@ class FLangValidationBuildContext {
|
|
|
80529
80582
|
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));
|
|
80530
80583
|
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;
|
|
80531
80584
|
if (lengthValue != undefined) {
|
|
80532
|
-
const lengthExprRuleBody = new
|
|
80585
|
+
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(lengthValue)));
|
|
80533
80586
|
yield {
|
|
80534
80587
|
condition: lengthExprRuleBody,
|
|
80535
80588
|
message: makeMessage({
|
|
@@ -80543,7 +80596,7 @@ class FLangValidationBuildContext {
|
|
|
80543
80596
|
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));
|
|
80544
80597
|
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;
|
|
80545
80598
|
if (minLengthValue != undefined && maxLengthValue != undefined) {
|
|
80546
|
-
const lengthExprRuleBody = new
|
|
80599
|
+
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.GeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(minLengthValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(maxLengthValue))));
|
|
80547
80600
|
yield {
|
|
80548
80601
|
condition: lengthExprRuleBody,
|
|
80549
80602
|
message: makeMessage({
|
|
@@ -80553,7 +80606,7 @@ class FLangValidationBuildContext {
|
|
|
80553
80606
|
checkType: checkType
|
|
80554
80607
|
};
|
|
80555
80608
|
} else if (minLengthValue != undefined) {
|
|
80556
|
-
const lengthExprRuleBody = new
|
|
80609
|
+
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.GeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(minLengthValue)));
|
|
80557
80610
|
yield {
|
|
80558
80611
|
condition: lengthExprRuleBody,
|
|
80559
80612
|
message: makeMessage({
|
|
@@ -80562,7 +80615,7 @@ class FLangValidationBuildContext {
|
|
|
80562
80615
|
checkType: checkType
|
|
80563
80616
|
};
|
|
80564
80617
|
} else if (maxLengthValue != undefined) {
|
|
80565
|
-
const lengthExprRuleBody = new
|
|
80618
|
+
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(maxLengthValue)));
|
|
80566
80619
|
yield {
|
|
80567
80620
|
condition: lengthExprRuleBody,
|
|
80568
80621
|
message: makeMessage({
|
|
@@ -80574,7 +80627,7 @@ class FLangValidationBuildContext {
|
|
|
80574
80627
|
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));
|
|
80575
80628
|
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;
|
|
80576
80629
|
if (minInclusiveValue != undefined) {
|
|
80577
|
-
const minInclusiveRuleBody = new
|
|
80630
|
+
const minInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.GeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.castOperandToDecimalIfNeed)(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(minInclusiveValue)));
|
|
80578
80631
|
yield {
|
|
80579
80632
|
condition: minInclusiveRuleBody,
|
|
80580
80633
|
message: makeMessage({
|
|
@@ -80586,7 +80639,7 @@ class FLangValidationBuildContext {
|
|
|
80586
80639
|
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));
|
|
80587
80640
|
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;
|
|
80588
80641
|
if (maxInclusiveValue != undefined) {
|
|
80589
|
-
const maxInclusiveRuleBody = new
|
|
80642
|
+
const maxInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.castOperandToDecimalIfNeed)(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(maxInclusiveValue)));
|
|
80590
80643
|
yield {
|
|
80591
80644
|
condition: maxInclusiveRuleBody,
|
|
80592
80645
|
message: makeMessage({
|
|
@@ -80598,7 +80651,7 @@ class FLangValidationBuildContext {
|
|
|
80598
80651
|
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));
|
|
80599
80652
|
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;
|
|
80600
80653
|
if (totalDigitsValue != undefined) {
|
|
80601
|
-
const totalDigitsRuleBody = new
|
|
80654
|
+
const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(totalDigitsValue)));
|
|
80602
80655
|
yield {
|
|
80603
80656
|
condition: totalDigitsRuleBody,
|
|
80604
80657
|
message: makeMessage({
|
|
@@ -80609,9 +80662,9 @@ class FLangValidationBuildContext {
|
|
|
80609
80662
|
}
|
|
80610
80663
|
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 : [];
|
|
80611
80664
|
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);
|
|
80612
|
-
const patterns = stringPatterns.map(pattern => new
|
|
80665
|
+
const patterns = stringPatterns.map(pattern => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression(pattern))).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.OrBinaryExpression(acc, current) : current, undefined);
|
|
80613
80666
|
if (patterns != undefined) {
|
|
80614
|
-
const totalDigitsRuleBody = new
|
|
80667
|
+
const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(patterns);
|
|
80615
80668
|
yield {
|
|
80616
80669
|
condition: totalDigitsRuleBody,
|
|
80617
80670
|
message: makeMessage({
|
|
@@ -80623,7 +80676,7 @@ class FLangValidationBuildContext {
|
|
|
80623
80676
|
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));
|
|
80624
80677
|
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;
|
|
80625
80678
|
if (integerDigits != undefined) {
|
|
80626
|
-
const integerDigitsRuleBody = new
|
|
80679
|
+
const integerDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.FractionalLenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.castOperandToDecimalIfNeed)(valueReference))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(integerDigits)));
|
|
80627
80680
|
yield {
|
|
80628
80681
|
condition: integerDigitsRuleBody,
|
|
80629
80682
|
message: makeMessage({
|
|
@@ -80635,7 +80688,7 @@ class FLangValidationBuildContext {
|
|
|
80635
80688
|
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));
|
|
80636
80689
|
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;
|
|
80637
80690
|
if (fractionalDigits != undefined) {
|
|
80638
|
-
const fractionalDigitsRuleBody = new
|
|
80691
|
+
const fractionalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.FractionalLenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_12__.castOperandToDecimalIfNeed)(valueReference)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.DecimalLiteralExpression(fractionalDigits)));
|
|
80639
80692
|
yield {
|
|
80640
80693
|
condition: fractionalDigitsRuleBody,
|
|
80641
80694
|
message: makeMessage({
|
|
@@ -80654,35 +80707,35 @@ class FLangValidationBuildContext {
|
|
|
80654
80707
|
case "integer":
|
|
80655
80708
|
{
|
|
80656
80709
|
return {
|
|
80657
|
-
condition: new
|
|
80710
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("^-?\\d+$"))),
|
|
80658
80711
|
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
80659
80712
|
};
|
|
80660
80713
|
}
|
|
80661
80714
|
case "decimal":
|
|
80662
80715
|
{
|
|
80663
80716
|
return {
|
|
80664
|
-
condition: new
|
|
80717
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("^-?\\d+(([.]\\d+$)|($))"))),
|
|
80665
80718
|
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
80666
80719
|
};
|
|
80667
80720
|
}
|
|
80668
80721
|
case "date":
|
|
80669
80722
|
{
|
|
80670
80723
|
return {
|
|
80671
|
-
condition: new
|
|
80724
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("^(0[1-9]|[12][0-9]|3[01])\\.(0[1-9]|1[012])\\.(19|20)[0-9]{2}$"))),
|
|
80672
80725
|
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
80673
80726
|
};
|
|
80674
80727
|
}
|
|
80675
80728
|
case "gYear":
|
|
80676
80729
|
{
|
|
80677
80730
|
return {
|
|
80678
|
-
condition: new
|
|
80731
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("^\\d{4}$"))),
|
|
80679
80732
|
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
80680
80733
|
};
|
|
80681
80734
|
}
|
|
80682
80735
|
case "gMonth":
|
|
80683
80736
|
{
|
|
80684
80737
|
return {
|
|
80685
|
-
condition: new
|
|
80738
|
+
condition: new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_13__.StringLiteralExpression("^(--(0[1-9]|1[0-2]))$"))),
|
|
80686
80739
|
message: makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_10__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))
|
|
80687
80740
|
};
|
|
80688
80741
|
}
|
|
@@ -80812,6 +80865,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80812
80865
|
/* harmony export */ "HasPicklistValueExpression": () => (/* binding */ HasPicklistValueExpression),
|
|
80813
80866
|
/* harmony export */ "TrimExpression": () => (/* binding */ TrimExpression),
|
|
80814
80867
|
/* harmony export */ "PrepareNumberExpression": () => (/* binding */ PrepareNumberExpression),
|
|
80868
|
+
/* harmony export */ "IncrementalFlagExpression": () => (/* binding */ IncrementalFlagExpression),
|
|
80869
|
+
/* harmony export */ "GetOldExpression": () => (/* binding */ GetOldExpression),
|
|
80815
80870
|
/* harmony export */ "FLangStatement": () => (/* binding */ FLangStatement),
|
|
80816
80871
|
/* harmony export */ "SetStatement": () => (/* binding */ SetStatement)
|
|
80817
80872
|
/* harmony export */ });
|
|
@@ -81996,6 +82051,33 @@ class PrepareNumberExpression extends FLangExpression {
|
|
|
81996
82051
|
return `prepareNumber(${this.expression.convertToString()})`;
|
|
81997
82052
|
}
|
|
81998
82053
|
}
|
|
82054
|
+
class IncrementalFlagExpression extends FLangExpression {
|
|
82055
|
+
getChildNodes() {
|
|
82056
|
+
return [];
|
|
82057
|
+
}
|
|
82058
|
+
getType() {
|
|
82059
|
+
return BuildInTypeExpression.bool;
|
|
82060
|
+
}
|
|
82061
|
+
convertToString() {
|
|
82062
|
+
return `incremental`;
|
|
82063
|
+
}
|
|
82064
|
+
}
|
|
82065
|
+
class GetOldExpression extends FLangExpression {
|
|
82066
|
+
constructor(expression) {
|
|
82067
|
+
super();
|
|
82068
|
+
this.expression = void 0;
|
|
82069
|
+
this.expression = expression;
|
|
82070
|
+
}
|
|
82071
|
+
getChildNodes() {
|
|
82072
|
+
return [];
|
|
82073
|
+
}
|
|
82074
|
+
getType() {
|
|
82075
|
+
return BuildInTypeExpression.bool;
|
|
82076
|
+
}
|
|
82077
|
+
convertToString() {
|
|
82078
|
+
return `old(${this.expression.convertToString()})`;
|
|
82079
|
+
}
|
|
82080
|
+
}
|
|
81999
82081
|
class FLangStatement extends FLangNode {}
|
|
82000
82082
|
class SetStatement extends FLangStatement {
|
|
82001
82083
|
constructor(left, right) {
|
|
@@ -82676,9 +82758,9 @@ class FormulaExpressionToFlangExpressionConverter {
|
|
|
82676
82758
|
const currentSumExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").toCurrentIteration().normalize(), "value");
|
|
82677
82759
|
const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").normalize(), "value");
|
|
82678
82760
|
const currenCountExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").toCurrentIteration().normalize(), "value");
|
|
82679
|
-
const sumReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression()));
|
|
82761
|
+
const sumReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(resultValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(nextResultValueExpression.modePath.toCurrentIteration(), nextResultValueExpression.valueName))), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())));
|
|
82680
82762
|
addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(sumReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression(""))));
|
|
82681
|
-
const countReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(countValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0));
|
|
82763
|
+
const countReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(countValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.GetOldExpression(countValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_7__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.ValueReferenceExpression(countResultValueExpression.modePath.toCurrentIteration(), countResultValueExpression.valueName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.DecimalLiteralExpression(0)));
|
|
82682
82764
|
addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.CastExpression(countReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_8__.StringLiteralExpression("G29"))));
|
|
82683
82765
|
resultValueExpression = currentSumExpression;
|
|
82684
82766
|
countValueExpression = currenCountExpression;
|
|
@@ -82769,8 +82851,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
82769
82851
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
82770
82852
|
/* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
|
|
82771
82853
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
82772
|
-
/* harmony import */ var
|
|
82773
|
-
/* harmony import */ var
|
|
82854
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
82855
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
82856
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
82857
|
+
|
|
82774
82858
|
|
|
82775
82859
|
|
|
82776
82860
|
|
|
@@ -82791,7 +82875,7 @@ class FormulaOnlyNormalizationRuleGenerator {
|
|
|
82791
82875
|
}
|
|
82792
82876
|
generateRules() {
|
|
82793
82877
|
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(this.buildFormulaFLangRules(), this.optionalSectionRuleBuilder.buildRules());
|
|
82794
|
-
return (0,
|
|
82878
|
+
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRuleBuilder);
|
|
82795
82879
|
}
|
|
82796
82880
|
*buildFormulaFLangRules() {
|
|
82797
82881
|
for (const formula of (_this$formulas = this.formulas) !== null && _this$formulas !== void 0 ? _this$formulas : []) {
|
|
@@ -82807,11 +82891,11 @@ class FormulaOnlyNormalizationRuleGenerator {
|
|
|
82807
82891
|
const defaultValue = this.dataDeclarationHelper.getDefaultValue(fullTarget.toLegacyPath());
|
|
82808
82892
|
const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
|
|
82809
82893
|
const result = [];
|
|
82810
|
-
const getFormulaExpression = field => new
|
|
82894
|
+
const getFormulaExpression = field => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_5__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_3__.AbsoluteModelFieldPath(fullTarget, field), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(defaultValue));
|
|
82811
82895
|
if (isTargetAutoField) {
|
|
82812
|
-
result.push(new
|
|
82896
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string)));
|
|
82813
82897
|
} else {
|
|
82814
|
-
result.push(new
|
|
82898
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
|
|
82815
82899
|
}
|
|
82816
82900
|
result.push(...precalculationRules);
|
|
82817
82901
|
return result;
|
|
@@ -82935,6 +83019,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
82935
83019
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
82936
83020
|
/* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
|
|
82937
83021
|
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
83022
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
83023
|
+
|
|
82938
83024
|
|
|
82939
83025
|
|
|
82940
83026
|
|
|
@@ -82964,12 +83050,14 @@ class FormulaRulesBuilder {
|
|
|
82964
83050
|
const precalculationRules = [];
|
|
82965
83051
|
const isTargetAutoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(fullTarget.toAbsolute());
|
|
82966
83052
|
const isDisabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(fullTarget.toAbsolute());
|
|
82967
|
-
const getFormulaExpression = targetField => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new
|
|
83053
|
+
const getFormulaExpression = targetField => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.wrapWithArgumentsCondition)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.castOperandToStringIfNeed)(this.formulaExprConverter.compileExpressionToFlangExpression(formula.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_4__.AbsoluteModelFieldPath(fullTarget, targetField), x => precalculationRules.push(x)), "G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue));
|
|
82968
83054
|
const result = [];
|
|
82969
83055
|
if (isTargetAutoField) {
|
|
82970
|
-
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string)));
|
|
83056
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoValue"), getFormulaExpression("autoValue")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("false"))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.CastExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoValue")), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.BuildInTypeExpression.string), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag")))));
|
|
82971
83057
|
if (isDisabled) {
|
|
82972
83058
|
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
|
|
83059
|
+
} else {
|
|
83060
|
+
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), getFormulaExpression("value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)))));
|
|
82973
83061
|
}
|
|
82974
83062
|
} else {
|
|
82975
83063
|
result.push(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value")));
|
|
@@ -83190,15 +83278,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
83190
83278
|
|
|
83191
83279
|
|
|
83192
83280
|
class SugarRulesBuilder {
|
|
83193
|
-
constructor(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, typeRegistry, useSchemaValidations) {
|
|
83281
|
+
constructor(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, useSchemaValidations) {
|
|
83194
83282
|
this.sugarRoot = void 0;
|
|
83195
83283
|
this.controlCustomizationContext = void 0;
|
|
83196
83284
|
this.fetchFunctions = void 0;
|
|
83197
83285
|
this.formSchemaRng = void 0;
|
|
83286
|
+
this.dataDeclarationHelper = void 0;
|
|
83198
83287
|
this.useSchemaValidations = void 0;
|
|
83199
83288
|
this.typeRegistry = void 0;
|
|
83200
83289
|
this.useSchemaValidations = useSchemaValidations;
|
|
83201
83290
|
this.typeRegistry = typeRegistry;
|
|
83291
|
+
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
83202
83292
|
this.formSchemaRng = formSchemaRng;
|
|
83203
83293
|
this.fetchFunctions = fetchFunctions;
|
|
83204
83294
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -83206,7 +83296,7 @@ class SugarRulesBuilder {
|
|
|
83206
83296
|
}
|
|
83207
83297
|
buildRules() {
|
|
83208
83298
|
const converter = new _markupGenerator_ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_0__.FormConverter(this.sugarRoot);
|
|
83209
|
-
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));
|
|
83299
|
+
const builder = new _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_1__.FLangNormalizationRulesBuilder(this.controlCustomizationContext, this.fetchFunctions, new _FetchFunctionToFlangConverter__WEBPACK_IMPORTED_MODULE_2__.FetchFunctionToFlangConverter(), this.dataDeclarationHelper, this.formSchemaRng, new _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_3__.NodeTypeInfoHelper(this.formSchemaRng, this.typeRegistry, this.useSchemaValidations));
|
|
83210
83300
|
return converter.buildNormalizeRules(builder, this.formSchemaRng);
|
|
83211
83301
|
}
|
|
83212
83302
|
}
|
|
@@ -83231,9 +83321,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
83231
83321
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
83232
83322
|
/* harmony import */ var _Common_ModelPath_Map_AbsoluteModelPathMap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../Common/ModelPath/Map/AbsoluteModelPathMap */ "./Common/ModelPath/Map/AbsoluteModelPathMap.ts");
|
|
83233
83323
|
/* harmony import */ var _Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../Common/ModelPath/EachCurrentCollision */ "./Common/ModelPath/EachCurrentCollision.ts");
|
|
83234
|
-
/* harmony import */ var
|
|
83235
|
-
/* harmony import */ var
|
|
83324
|
+
/* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
|
|
83325
|
+
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
83236
83326
|
/* harmony import */ var _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../NodeTypeInfoHelper */ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts");
|
|
83327
|
+
/* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
|
|
83328
|
+
|
|
83237
83329
|
|
|
83238
83330
|
|
|
83239
83331
|
|
|
@@ -83271,7 +83363,7 @@ class ValidationRulesBuilder {
|
|
|
83271
83363
|
const precalculationRules = [];
|
|
83272
83364
|
return {
|
|
83273
83365
|
target: fullTarget,
|
|
83274
|
-
checkExpression: this.formulaExprConverter.compileExpressionToFlangExpression(condition.expression, prefix, new
|
|
83366
|
+
checkExpression: this.formulaExprConverter.compileExpressionToFlangExpression(condition.expression, prefix, new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_10__.AbsoluteModelFieldPath(fullTarget, condition.errorLevel === "Error" ? "error" : "warning"), x => precalculationRules.push(x)),
|
|
83275
83367
|
message: condition.description,
|
|
83276
83368
|
errorLevel: condition.errorLevel,
|
|
83277
83369
|
precalculationRules: precalculationRules
|
|
@@ -83334,51 +83426,59 @@ class ValidationRulesBuilder {
|
|
|
83334
83426
|
const tokens = modelPath.getPathPartsAsArray();
|
|
83335
83427
|
for (let i = 0; i < tokens.length; i++) {
|
|
83336
83428
|
const currentModelPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromTokens)(tokens.slice(0, i));
|
|
83337
|
-
if (tokens[i] === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each || this.dataDeclarationHelper.isErrorsAndWarningsCountRequired(currentModelPath)) {
|
|
83429
|
+
if (tokens[i] === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each || this.dataDeclarationHelper.isErrorsAndWarningsCountRequired(currentModelPath) || i == 1) {
|
|
83338
83430
|
yield currentModelPath;
|
|
83339
83431
|
}
|
|
83340
83432
|
}
|
|
83341
83433
|
}
|
|
83342
|
-
|
|
83343
|
-
const
|
|
83344
|
-
const
|
|
83345
|
-
|
|
83346
|
-
|
|
83347
|
-
|
|
83348
|
-
|
|
83349
|
-
|
|
83350
|
-
|
|
83351
|
-
|
|
83352
|
-
|
|
83353
|
-
|
|
83354
|
-
|
|
83355
|
-
|
|
83356
|
-
|
|
83357
|
-
|
|
83358
|
-
|
|
83359
|
-
|
|
83360
|
-
|
|
83361
|
-
|
|
83362
|
-
|
|
83363
|
-
|
|
83364
|
-
|
|
83365
|
-
|
|
83366
|
-
|
|
83367
|
-
|
|
83368
|
-
|
|
83369
|
-
|
|
83370
|
-
|
|
83371
|
-
|
|
83372
|
-
|
|
83373
|
-
|
|
83374
|
-
const allRules = Iterator.from(totalErrorCountExpressions.values()).reduce((result, expression) => result === zeroExpression ? expression : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(result, expression), zeroExpression);
|
|
83375
|
-
yield new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsolute)((0,_markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_7__.getRootPath)(this.sugarRoot)), countFieldName), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(allRules, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
|
|
83434
|
+
buildErrorWarningCountReduceRule(iterable, countFieldName, getAllItemsSumExpression) {
|
|
83435
|
+
const nextErrorCountTarget = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(iterable, countFieldName);
|
|
83436
|
+
const aggregationReduce = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ReduceCallExpression(iterable.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.MinusBinaryExpression(getAllItemsSumExpression(false), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), getAllItemsSumExpression(true), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0))))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_8__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(iterable.toCurrentIteration(), countFieldName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0)));
|
|
83437
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(nextErrorCountTarget, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(aggregationReduce, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
|
|
83438
|
+
}
|
|
83439
|
+
buildErrorWarningCountSimpleSumRule(iterable, countFieldName, getAllItemsSumExpression) {
|
|
83440
|
+
const nextErrorCountTarget = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(iterable, countFieldName);
|
|
83441
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(nextErrorCountTarget, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(getAllItemsSumExpression(false), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("G29")));
|
|
83442
|
+
}
|
|
83443
|
+
getErrorWarningCountExpression(path, fieldName, readOldValues) {
|
|
83444
|
+
const valueGetExpression = readOldValues ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, fieldName)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, fieldName);
|
|
83445
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IsEqualsBinaryExpression(valueGetExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression(`[]`)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.IsEqualsBinaryExpression(valueGetExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(1));
|
|
83446
|
+
}
|
|
83447
|
+
getReadErrorCountValueExpression(path, countFieldName, readOldValues) {
|
|
83448
|
+
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.CastExpression(readOldValues ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.GetOldExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), countFieldName)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), countFieldName), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0));
|
|
83449
|
+
}
|
|
83450
|
+
buildChainOfErrorCountRules(path, countFieldName, fieldName) {
|
|
83451
|
+
const reduceResult = Iterator.from((0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.reverseArray)([...this.splitModelPathIfErrorCountRequired(path)])).flatMap(iterationPath => this.dataDeclarationHelper.isNodeHasChildrenEntry(iterationPath) ? [iterationPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each), iterationPath] : [iterationPath]).reduce((result, iterationPath) => {
|
|
83452
|
+
const nextResultCountExpression = oldValues => this.getReadErrorCountValueExpression(iterationPath, countFieldName, oldValues);
|
|
83453
|
+
const info = {
|
|
83454
|
+
target: iterationPath,
|
|
83455
|
+
getExpressionFunc: result.resultCountExpression
|
|
83456
|
+
};
|
|
83457
|
+
return {
|
|
83458
|
+
resultCountExpression: nextResultCountExpression,
|
|
83459
|
+
items: result.items.concat(info)
|
|
83460
|
+
};
|
|
83461
|
+
}, {
|
|
83462
|
+
resultCountExpression: oldValues => this.getErrorWarningCountExpression(path.toCurrentIteration(), fieldName, oldValues),
|
|
83463
|
+
items: []
|
|
83464
|
+
});
|
|
83465
|
+
return reduceResult.items;
|
|
83376
83466
|
}
|
|
83377
|
-
|
|
83378
|
-
|
|
83467
|
+
buildErrorWarningCountRules(allPathsWithValidations, fieldName) {
|
|
83468
|
+
const countFieldName = `${fieldName}sCount`;
|
|
83469
|
+
const errorCountByTarget = Iterator.from(allPathsWithValidations).flatMap(path => this.buildChainOfErrorCountRules(path, countFieldName, fieldName)).reduce((result, current) => {
|
|
83470
|
+
result.getOrSet(current.target, () => []).push(current.getExpressionFunc);
|
|
83471
|
+
return result;
|
|
83472
|
+
}, new _Common_ModelPath_Map_AbsoluteModelPathMap__WEBPACK_IMPORTED_MODULE_5__.AbsoluteModelPathMap(_Common_ModelPath_EachCurrentCollision__WEBPACK_IMPORTED_MODULE_6__.EachCurrentCollision.AreDifferent));
|
|
83473
|
+
const rules = Iterator.from(errorCountByTarget.entries()).map(([iterable, getExpressionFunctions]) => {
|
|
83474
|
+
const getAllItemsSumExpression = readOldValues => Iterator.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.IterUtils.distinctBy(getExpressionFunctions.map(x => x(readOldValues)), x => x.convertToString())).reduce((result, currentExpr) => result instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression ? currentExpr : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SumBinaryExpression(result, currentExpr), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression());
|
|
83475
|
+
const isTargetRequiredReduce = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_4__.IterUtils.last(iterable.getPathParts()) !== _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each && this.dataDeclarationHelper.isNodeHasChildrenEntry(iterable);
|
|
83476
|
+
return isTargetRequiredReduce ? this.buildErrorWarningCountReduceRule(iterable, countFieldName, getAllItemsSumExpression) : this.buildErrorWarningCountSimpleSumRule(iterable, countFieldName, getAllItemsSumExpression);
|
|
83477
|
+
});
|
|
83478
|
+
return rules;
|
|
83379
83479
|
}
|
|
83380
83480
|
adjustPathMultiplicity(path) {
|
|
83381
|
-
return (0,
|
|
83481
|
+
return (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_7__.adjustPathMultiplicityComplex)(path, this.formSchemaRng, this.dataDeclarationHelper);
|
|
83382
83482
|
}
|
|
83383
83483
|
}
|
|
83384
83484
|
|
|
@@ -107137,12 +107237,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
107137
107237
|
|
|
107138
107238
|
|
|
107139
107239
|
class FLangNormalizationRulesBuilder {
|
|
107140
|
-
constructor(controlCustomizationContext, fetchFunctions, fetchFuncToFlangConverter, schemaRng, nodeTypeInfoHelper) {
|
|
107240
|
+
constructor(controlCustomizationContext, fetchFunctions, fetchFuncToFlangConverter, dataDeclarationHelper, schemaRng, nodeTypeInfoHelper) {
|
|
107141
107241
|
this.controlCustomizationContext = void 0;
|
|
107142
107242
|
this.fetchFunctions = void 0;
|
|
107143
107243
|
this.schemaRng = void 0;
|
|
107144
107244
|
this.nodeTypeInfoHelper = void 0;
|
|
107145
107245
|
this.fetchFuncToFlangConverter = void 0;
|
|
107246
|
+
this.dataDeclarationHelper = void 0;
|
|
107247
|
+
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
107146
107248
|
this.nodeTypeInfoHelper = nodeTypeInfoHelper;
|
|
107147
107249
|
this.schemaRng = schemaRng;
|
|
107148
107250
|
this.fetchFuncToFlangConverter = fetchFuncToFlangConverter;
|
|
@@ -107184,7 +107286,8 @@ class FLangNormalizationRulesBuilder {
|
|
|
107184
107286
|
if (!disabled && !dataBinding.settings) {
|
|
107185
107287
|
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);
|
|
107186
107288
|
}
|
|
107187
|
-
|
|
107289
|
+
const finalExpression = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(targetPathReference) ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "autoFlag")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NoDepsExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference.toCurrentIteration(), "autoValue")), valueExpression) : valueExpression;
|
|
107290
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression);
|
|
107188
107291
|
}
|
|
107189
107292
|
*specialFieldsInitializer(node, options) {
|
|
107190
107293
|
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)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
@@ -110012,7 +110115,8 @@ function getSettings(sugarRoot, gfv, additionalSettings, formJsonSettings) {
|
|
|
110012
110115
|
isReadOnly: (_sugarRoot$isReadOnly = sugarRoot.isReadOnly) !== null && _sugarRoot$isReadOnly !== void 0 ? _sugarRoot$isReadOnly : false,
|
|
110013
110116
|
gfv: gfv,
|
|
110014
110117
|
...additionalSettings,
|
|
110015
|
-
useServerSideFLangNormalization: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.useServerSideFLangNormalization
|
|
110118
|
+
useServerSideFLangNormalization: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.useServerSideFLangNormalization,
|
|
110119
|
+
useServerSideCalculations: formJsonSettings === null || formJsonSettings === void 0 ? void 0 : formJsonSettings.useServerSideCalculations
|
|
110016
110120
|
};
|
|
110017
110121
|
return `module.exports = ${JSON.stringify(settings, undefined, 2)}`;
|
|
110018
110122
|
}
|