@kontur.candy/generator 5.69.0 → 5.71.0-mini-modal-confirm.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +178 -60
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66257,6 +66257,28 @@ function getObjectPropertyName(property) {
|
|
|
66257
66257
|
|
|
66258
66258
|
/***/ }),
|
|
66259
66259
|
|
|
66260
|
+
/***/ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts":
|
|
66261
|
+
/*!******************************************************************************!*\
|
|
66262
|
+
!*** ./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts ***!
|
|
66263
|
+
\******************************************************************************/
|
|
66264
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
66265
|
+
|
|
66266
|
+
"use strict";
|
|
66267
|
+
__webpack_require__.r(__webpack_exports__);
|
|
66268
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66269
|
+
/* harmony export */ DataDeclarationInitSourceValueSequence: () => (/* binding */ DataDeclarationInitSourceValueSequence)
|
|
66270
|
+
/* harmony export */ });
|
|
66271
|
+
// tslint:disable-next-line:ban-types
|
|
66272
|
+
|
|
66273
|
+
let DataDeclarationInitSourceValueSequence = /*#__PURE__*/function (DataDeclarationInitSourceValueSequence) {
|
|
66274
|
+
DataDeclarationInitSourceValueSequence["SETTINGS"] = "settings";
|
|
66275
|
+
DataDeclarationInitSourceValueSequence["DISABLED"] = "disabled";
|
|
66276
|
+
DataDeclarationInitSourceValueSequence["DEFAULT"] = "default";
|
|
66277
|
+
return DataDeclarationInitSourceValueSequence;
|
|
66278
|
+
}({});
|
|
66279
|
+
|
|
66280
|
+
/***/ }),
|
|
66281
|
+
|
|
66260
66282
|
/***/ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts":
|
|
66261
66283
|
/*!***********************************************************************************************!*\
|
|
66262
66284
|
!*** ./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts ***!
|
|
@@ -66281,6 +66303,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66281
66303
|
/* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
66282
66304
|
/* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/ElementProcessors/FormParts/Page/PageNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page/PageNode.ts");
|
|
66283
66305
|
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
66306
|
+
/* harmony import */ var _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
66307
|
+
/* harmony import */ var _DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./DataDeclarationInitSourceSequenceFactory */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory.ts");
|
|
66308
|
+
|
|
66309
|
+
|
|
66284
66310
|
|
|
66285
66311
|
|
|
66286
66312
|
|
|
@@ -66324,6 +66350,33 @@ class DataDeclarationGenerationContext {
|
|
|
66324
66350
|
}
|
|
66325
66351
|
return [result];
|
|
66326
66352
|
}
|
|
66353
|
+
const srcDataValue = srcValue === null || srcValue === void 0 ? void 0 : srcValue.value;
|
|
66354
|
+
const objDataValue = objValue === null || objValue === void 0 ? void 0 : objValue.value;
|
|
66355
|
+
if (!srcDataValue || !objDataValue) {
|
|
66356
|
+
// eslint-disable-next-line consistent-return
|
|
66357
|
+
return;
|
|
66358
|
+
}
|
|
66359
|
+
const objVal = objDataValue[objDataValue.length - 1];
|
|
66360
|
+
const nodeWithSettings = _DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory.getTypedValue([srcValue, srcDataValue.sequenceType], [objValue, objDataValue.sequenceType], _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.SETTINGS);
|
|
66361
|
+
if (nodeWithSettings) {
|
|
66362
|
+
return nodeWithSettings;
|
|
66363
|
+
}
|
|
66364
|
+
if (objDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT && srcDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
66365
|
+
if (objVal) {
|
|
66366
|
+
const res = lodash_mergewith__WEBPACK_IMPORTED_MODULE_0___default()(objValue, srcValue);
|
|
66367
|
+
res.value[res.value.length - 1] = objVal;
|
|
66368
|
+
return res;
|
|
66369
|
+
}
|
|
66370
|
+
} else if (srcDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
66371
|
+
return srcValue;
|
|
66372
|
+
} else if (objDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
66373
|
+
return objValue;
|
|
66374
|
+
}
|
|
66375
|
+
const nodeDisabled = _DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory.getTypedValue([srcValue, srcDataValue.sequenceType], [objValue, objDataValue.sequenceType], _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DISABLED);
|
|
66376
|
+
if (nodeDisabled) {
|
|
66377
|
+
return nodeDisabled;
|
|
66378
|
+
}
|
|
66379
|
+
|
|
66327
66380
|
/* eslint-enable @typescript-eslint/no-unsafe-argument */
|
|
66328
66381
|
return undefined;
|
|
66329
66382
|
};
|
|
@@ -66820,6 +66873,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66820
66873
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66821
66874
|
/* harmony export */ DataDeclarationInitSourceSequenceFactory: () => (/* binding */ DataDeclarationInitSourceSequenceFactory)
|
|
66822
66875
|
/* harmony export */ });
|
|
66876
|
+
/* harmony import */ var _DataDeclaration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
66877
|
+
|
|
66823
66878
|
class DataDeclarationInitSourceSequenceFactory {
|
|
66824
66879
|
constructor(fetchFunctions) {
|
|
66825
66880
|
this.fetchFunctions = void 0;
|
|
@@ -66829,13 +66884,13 @@ class DataDeclarationInitSourceSequenceFactory {
|
|
|
66829
66884
|
var _ref3;
|
|
66830
66885
|
if (node.settings) {
|
|
66831
66886
|
var _ref;
|
|
66832
|
-
return [...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.takeFromModel(), ...this.setValueUnconditionally((_ref = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref !== void 0 ? _ref : "")];
|
|
66887
|
+
return this.setSequenceType([...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.takeFromModel(), ...this.setValueUnconditionally((_ref = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref !== void 0 ? _ref : "")], _DataDeclaration__WEBPACK_IMPORTED_MODULE_0__.DataDeclarationInitSourceValueSequence.SETTINGS);
|
|
66833
66888
|
}
|
|
66834
66889
|
if (disabled) {
|
|
66835
66890
|
var _ref2;
|
|
66836
|
-
return [...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref2 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : "")];
|
|
66891
|
+
return this.setSequenceType([...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref2 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : "")], _DataDeclaration__WEBPACK_IMPORTED_MODULE_0__.DataDeclarationInitSourceValueSequence.DISABLED);
|
|
66837
66892
|
}
|
|
66838
|
-
return [...this.takeFromModel(), ...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref3 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref3 !== void 0 ? _ref3 : "")];
|
|
66893
|
+
return this.setSequenceType([...this.takeFromModel(), ...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref3 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref3 !== void 0 ? _ref3 : "")], _DataDeclaration__WEBPACK_IMPORTED_MODULE_0__.DataDeclarationInitSourceValueSequence.DEFAULT);
|
|
66839
66894
|
}
|
|
66840
66895
|
takeFromFetchFunctionOrDefault(fetchFnName, fieldName, defaultValue) {
|
|
66841
66896
|
return [...this.takeFromFetchFunction(fetchFnName, fieldName), ...this.setValueUnconditionally(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "")];
|
|
@@ -66878,6 +66933,13 @@ class DataDeclarationInitSourceSequenceFactory {
|
|
|
66878
66933
|
}
|
|
66879
66934
|
return [];
|
|
66880
66935
|
}
|
|
66936
|
+
setSequenceType(arr, sequenceType) {
|
|
66937
|
+
arr["sequenceType"] = sequenceType;
|
|
66938
|
+
return arr;
|
|
66939
|
+
}
|
|
66940
|
+
static getTypedValue([prevVal, prevType], [nextVal, nextType], type) {
|
|
66941
|
+
return prevType === type ? prevVal : nextType === type ? nextVal : null;
|
|
66942
|
+
}
|
|
66881
66943
|
}
|
|
66882
66944
|
|
|
66883
66945
|
/***/ }),
|
|
@@ -71165,12 +71227,14 @@ class GetOldExpression extends FLangExpression {
|
|
|
71165
71227
|
}
|
|
71166
71228
|
class FLangStatement extends FLangNode {}
|
|
71167
71229
|
class SetStatement extends FLangStatement {
|
|
71168
|
-
constructor(left, right) {
|
|
71230
|
+
constructor(left, right, sequenceType) {
|
|
71169
71231
|
super();
|
|
71170
71232
|
this.left = void 0;
|
|
71171
71233
|
this.right = void 0;
|
|
71234
|
+
this.sequenceType = void 0;
|
|
71172
71235
|
this.right = right;
|
|
71173
71236
|
this.left = left;
|
|
71237
|
+
this.sequenceType = sequenceType;
|
|
71174
71238
|
}
|
|
71175
71239
|
*getChildNodes() {
|
|
71176
71240
|
yield this.left;
|
|
@@ -71208,6 +71272,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71208
71272
|
/* harmony export */ ensureOperandsOfTypeOrNull: () => (/* binding */ ensureOperandsOfTypeOrNull),
|
|
71209
71273
|
/* harmony export */ extractValueReferenceFromCast: () => (/* binding */ extractValueReferenceFromCast),
|
|
71210
71274
|
/* harmony export */ getAllExpressionChildren: () => (/* binding */ getAllExpressionChildren),
|
|
71275
|
+
/* harmony export */ getSelectorIdFromRule: () => (/* binding */ getSelectorIdFromRule),
|
|
71211
71276
|
/* harmony export */ hashSetFieldNameSuffix: () => (/* binding */ hashSetFieldNameSuffix),
|
|
71212
71277
|
/* harmony export */ makeGetOld: () => (/* binding */ makeGetOld),
|
|
71213
71278
|
/* harmony export */ makeNoDeps: () => (/* binding */ makeNoDeps),
|
|
@@ -71222,7 +71287,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71222
71287
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
71223
71288
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
71224
71289
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
71225
|
-
/* harmony import */ var
|
|
71290
|
+
/* harmony import */ var _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory.ts");
|
|
71291
|
+
/* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
71292
|
+
/* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
71293
|
+
|
|
71294
|
+
|
|
71226
71295
|
|
|
71227
71296
|
|
|
71228
71297
|
|
|
@@ -71241,135 +71310,183 @@ function* getAllExpressionChildren(node, descendantsFilter) {
|
|
|
71241
71310
|
}
|
|
71242
71311
|
}
|
|
71243
71312
|
function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
|
|
71244
|
-
return new
|
|
71313
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression("true")), makeNoDeps(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
|
|
71245
71314
|
}
|
|
71246
71315
|
function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
|
|
71247
71316
|
var _formSchemaRng$getEle;
|
|
71248
|
-
return x instanceof
|
|
71317
|
+
return x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement && x.left.valueName === "value" && (_formSchemaRng$getEle = formSchemaRng.getElementByPath(x.left.modePath)) !== null && _formSchemaRng$getEle !== void 0 && _formSchemaRng$getEle.isIgnoreForcedValueSet() ? [createValueRuleWithDisableValueAutoInitCheck(x.left.modePath, x.right)] : [x];
|
|
71249
71318
|
}
|
|
71250
71319
|
function wrapWithArgumentsCondition(expression) {
|
|
71251
|
-
const childFilter = node => !(node instanceof
|
|
71252
|
-
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof
|
|
71320
|
+
const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression);
|
|
71321
|
+
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression ? x : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined);
|
|
71253
71322
|
const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
|
|
71254
71323
|
const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.reduce(uniquePaths, (acc, curr) => {
|
|
71255
|
-
const currExpr = new
|
|
71256
|
-
return acc != undefined ? new
|
|
71324
|
+
const currExpr = new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ExistsExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(curr.modePath, curr.valueName));
|
|
71325
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.OrBinaryExpression(acc, currExpr) : currExpr;
|
|
71257
71326
|
}, undefined);
|
|
71258
71327
|
if (conditionExpression == undefined) {
|
|
71259
71328
|
return expression;
|
|
71260
71329
|
}
|
|
71261
|
-
return new
|
|
71330
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullLiteralExpression());
|
|
71262
71331
|
}
|
|
71332
|
+
const getSelectorIdFromRule = x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement ? x.left.convertToString() : x.convertToString();
|
|
71333
|
+
const mergeRules = function (items) {
|
|
71334
|
+
const rulesDictionary = new Map();
|
|
71335
|
+
for (const item of items) {
|
|
71336
|
+
const id = getSelectorIdFromRule(item);
|
|
71337
|
+
const prevVal = rulesDictionary.get(id);
|
|
71338
|
+
if (!prevVal) {
|
|
71339
|
+
rulesDictionary.set(id, item);
|
|
71340
|
+
} else if (item instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement && prevVal instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement) {
|
|
71341
|
+
if (!prevVal.sequenceType) {
|
|
71342
|
+
continue;
|
|
71343
|
+
} else if (!item.sequenceType) {
|
|
71344
|
+
rulesDictionary.set(id, item);
|
|
71345
|
+
continue;
|
|
71346
|
+
}
|
|
71347
|
+
const itemWithSettings = _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceSequenceFactory.getTypedValue([prevVal, prevVal.sequenceType], [item, item.sequenceType], _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.SETTINGS);
|
|
71348
|
+
if (itemWithSettings) {
|
|
71349
|
+
rulesDictionary.set(id, itemWithSettings);
|
|
71350
|
+
continue;
|
|
71351
|
+
}
|
|
71352
|
+
if (prevVal.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT && item.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
71353
|
+
var _prevVal$right, _item$right;
|
|
71354
|
+
const prevDefaultVal = (_prevVal$right = prevVal.right) === null || _prevVal$right === void 0 || (_prevVal$right = _prevVal$right["trueResult"]) === null || _prevVal$right === void 0 ? void 0 : _prevVal$right.convertToString();
|
|
71355
|
+
const itemDefaultVal = (_item$right = item.right) === null || _item$right === void 0 || (_item$right = _item$right["trueResult"]) === null || _item$right === void 0 ? void 0 : _item$right.convertToString();
|
|
71356
|
+
const hasPrevDefaultVal = prevDefaultVal && prevDefaultVal !== '""';
|
|
71357
|
+
const hasItemDefaultVal = itemDefaultVal && itemDefaultVal !== '""';
|
|
71358
|
+
if (hasPrevDefaultVal && hasItemDefaultVal && prevDefaultVal === itemDefaultVal) {
|
|
71359
|
+
continue;
|
|
71360
|
+
}
|
|
71361
|
+
if (hasItemDefaultVal) {
|
|
71362
|
+
rulesDictionary.set(id, item);
|
|
71363
|
+
continue;
|
|
71364
|
+
}
|
|
71365
|
+
} else if (prevVal.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
71366
|
+
continue;
|
|
71367
|
+
} else if (item.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
71368
|
+
rulesDictionary.set(id, item);
|
|
71369
|
+
continue;
|
|
71370
|
+
}
|
|
71371
|
+
const itemDisabled = _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceSequenceFactory.getTypedValue([prevVal, prevVal.sequenceType], [item, item.sequenceType], _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DISABLED);
|
|
71372
|
+
if (itemDisabled) {
|
|
71373
|
+
rulesDictionary.set(id, itemDisabled);
|
|
71374
|
+
continue;
|
|
71375
|
+
}
|
|
71376
|
+
}
|
|
71377
|
+
}
|
|
71378
|
+
return rulesDictionary.values();
|
|
71379
|
+
};
|
|
71263
71380
|
function combineRulesWithOptionalSectionChecking(allRules, optionalSectionRulesBuilder) {
|
|
71264
|
-
const allUniqueRules =
|
|
71381
|
+
const allUniqueRules = mergeRules(allRules);
|
|
71265
71382
|
const allUniqueRulesWithOptionalChecks = Iterator.from(optionalSectionRulesBuilder.wrapRulesWithOptionalPageCheck(allUniqueRules)).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
|
|
71266
71383
|
return allUniqueRulesWithOptionalChecks;
|
|
71267
71384
|
}
|
|
71268
71385
|
function tryExtractValueReferenceAsStringFromDecimal(expression) {
|
|
71269
|
-
if (expression.getType() ===
|
|
71386
|
+
if (expression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.decimal && expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71270
71387
|
return expression.targetExpression;
|
|
71271
71388
|
}
|
|
71272
71389
|
return expression;
|
|
71273
71390
|
}
|
|
71274
71391
|
function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, decimalFormat = "G29") {
|
|
71275
|
-
if (enableTypedExpression && (operandExpression.getType() ===
|
|
71392
|
+
if (enableTypedExpression && (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.hashSet)) {
|
|
71276
71393
|
return operandExpression;
|
|
71277
71394
|
}
|
|
71278
71395
|
return castOperandToStringIfNeed(operandExpression, decimalFormat);
|
|
71279
71396
|
}
|
|
71280
71397
|
function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
|
|
71281
|
-
if (operandExpression instanceof
|
|
71282
|
-
return new
|
|
71398
|
+
if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.DateNowExpression) {
|
|
71399
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression("dd.MM.yyyy"));
|
|
71283
71400
|
}
|
|
71284
|
-
if (operandExpression.getType() ===
|
|
71285
|
-
return new
|
|
71401
|
+
if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.hashSet) {
|
|
71402
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SerializeEnumerationExpression(operandExpression);
|
|
71286
71403
|
}
|
|
71287
|
-
return operandExpression.getType() !=
|
|
71404
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
|
|
71288
71405
|
}
|
|
71289
71406
|
function castOperandIfNeed(operandExpression, type) {
|
|
71290
|
-
if (type instanceof
|
|
71291
|
-
return operandExpression.getType() != type ? new
|
|
71407
|
+
if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression) {
|
|
71408
|
+
return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(operandExpression, type) : operandExpression;
|
|
71292
71409
|
}
|
|
71293
71410
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid type for cast: ${type}`);
|
|
71294
71411
|
}
|
|
71295
71412
|
function castOperandToBoolIfNeed(operandExpression) {
|
|
71296
|
-
return operandExpression.getType() !=
|
|
71413
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.bool) : operandExpression;
|
|
71297
71414
|
}
|
|
71298
71415
|
function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
|
|
71299
|
-
return operandExpression.getType() !==
|
|
71416
|
+
return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
|
|
71300
71417
|
}
|
|
71301
71418
|
const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
|
|
71302
71419
|
function castOperandToDateTimeIfNeed(operandExpression) {
|
|
71303
|
-
return operandExpression.getType() !=
|
|
71420
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dateTime) : operandExpression;
|
|
71304
71421
|
}
|
|
71305
71422
|
function nullCoalesceWithTypeCheck(argument, replacement) {
|
|
71306
|
-
const isValid = argument.getType() === replacement.getType() || argument.getType() ===
|
|
71423
|
+
const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.null || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.null;
|
|
71307
71424
|
if (!isValid) {
|
|
71308
71425
|
throw new Error("Couldn't build null coalesce expression: types not match");
|
|
71309
71426
|
}
|
|
71310
|
-
return new
|
|
71427
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullCoalesceExpression(argument, replacement);
|
|
71311
71428
|
}
|
|
71312
71429
|
function ensureOperandsOfTypeOrNull(type, ...operands) {
|
|
71313
71430
|
for (const operand of operands) {
|
|
71314
71431
|
const operandType = operand.getType();
|
|
71315
|
-
if (operandType !==
|
|
71432
|
+
if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.null && operandType !== type) {
|
|
71316
71433
|
throw new Error(`Invalid operand type: required [${type}] but got ${operandType}`);
|
|
71317
71434
|
}
|
|
71318
71435
|
}
|
|
71319
71436
|
}
|
|
71320
71437
|
function combineByOrFlangExpr(acc, current) {
|
|
71321
|
-
return acc != undefined ? new
|
|
71438
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.OrBinaryExpression(acc, current) : current;
|
|
71322
71439
|
}
|
|
71323
71440
|
function combineByAndFlangExpr(acc, current) {
|
|
71324
|
-
return acc != undefined ? new
|
|
71441
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.AndBinaryExpression(acc, current) : current;
|
|
71325
71442
|
}
|
|
71326
71443
|
function makeNoDeps(expression) {
|
|
71327
|
-
if (expression instanceof
|
|
71328
|
-
return new
|
|
71444
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71445
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression(expression);
|
|
71329
71446
|
}
|
|
71330
|
-
if (expression instanceof
|
|
71331
|
-
return new
|
|
71447
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71448
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
71332
71449
|
}
|
|
71333
71450
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
71334
71451
|
}
|
|
71335
71452
|
function makeGetOld(expression) {
|
|
71336
|
-
if (expression instanceof
|
|
71337
|
-
return new
|
|
71453
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71454
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.GetOldExpression(expression);
|
|
71338
71455
|
}
|
|
71339
|
-
if (expression instanceof
|
|
71340
|
-
return new
|
|
71456
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71457
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
71341
71458
|
}
|
|
71342
71459
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
71343
71460
|
}
|
|
71344
71461
|
function makeStringValueReference(modePath, valueName) {
|
|
71345
|
-
return new
|
|
71462
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string);
|
|
71346
71463
|
}
|
|
71347
71464
|
function extractValueReferenceFromCast(expression) {
|
|
71348
|
-
if (expression instanceof
|
|
71465
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71349
71466
|
return expression;
|
|
71350
71467
|
}
|
|
71351
|
-
if (expression instanceof
|
|
71468
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
|
|
71352
71469
|
return expression.targetExpression;
|
|
71353
71470
|
}
|
|
71354
|
-
if (expression instanceof
|
|
71471
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression) {
|
|
71355
71472
|
return expression.targetExpression;
|
|
71356
71473
|
}
|
|
71357
71474
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Cannot extract ValueReferenceExpression! ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression)}`);
|
|
71358
71475
|
}
|
|
71359
71476
|
function ensureCorrectFieldNameByExpressionType(statement) {
|
|
71360
|
-
if (statement instanceof
|
|
71477
|
+
if (statement instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement) {
|
|
71361
71478
|
const lastPart = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.last(statement.left.modePath.getPathParts());
|
|
71362
71479
|
const lastStringPart = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.isSimpleToken(lastPart) ? lastPart : "";
|
|
71363
|
-
if (statement.right.getType() ===
|
|
71480
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dict && !lastStringPart.endsWith(dictFieldNameSuffix)) {
|
|
71364
71481
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${dictFieldNameSuffix}"`);
|
|
71365
71482
|
}
|
|
71366
|
-
if (statement.right.getType() ===
|
|
71483
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.hashSet && !lastStringPart.endsWith(hashSetFieldNameSuffix)) {
|
|
71367
71484
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${hashSetFieldNameSuffix}"`);
|
|
71368
71485
|
}
|
|
71369
|
-
if (statement.right.getType() ===
|
|
71486
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
|
|
71370
71487
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${arrayFieldNameSuffix}"`);
|
|
71371
71488
|
}
|
|
71372
|
-
if (statement.right.getType() ===
|
|
71489
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
|
|
71373
71490
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
|
|
71374
71491
|
}
|
|
71375
71492
|
}
|
|
@@ -84337,6 +84454,7 @@ class ModalFormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1_
|
|
|
84337
84454
|
markupBuilder.prop(x => x.enabledBackgroundClick).set(node.enabledBackgroundClick);
|
|
84338
84455
|
markupBuilder.prop(x => x.doNotValidateFormOnStart).set(node.doNotValidateFormOnStart);
|
|
84339
84456
|
markupBuilder.prop(x => x.onAfterOpen).set(context.generateHelperFunctionExpression(node, "onAfterOpen", node.onAfterOpen));
|
|
84457
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_2__.getNewBindingPathExpression)(node));
|
|
84340
84458
|
context.pushPathsContext();
|
|
84341
84459
|
markupBuilder.appendChild(context.convertChildNodes(node.children));
|
|
84342
84460
|
const pathsContext = context.popPathsContext();
|
|
@@ -98226,8 +98344,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
98226
98344
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
98227
98345
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
98228
98346
|
/* harmony import */ var _ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
98229
|
-
/* harmony import */ var
|
|
98230
|
-
/* harmony import */ var
|
|
98347
|
+
/* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
98348
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
98349
|
+
/* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
|
|
98350
|
+
|
|
98231
98351
|
|
|
98232
98352
|
|
|
98233
98353
|
|
|
@@ -98250,7 +98370,7 @@ class FLangNormalizationRulesBuilder {
|
|
|
98250
98370
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
98251
98371
|
}
|
|
98252
98372
|
*childrenInitializer(node, optional, defaultChildren) {
|
|
98253
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
98373
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
98254
98374
|
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
|
|
98255
98375
|
}
|
|
98256
98376
|
*childrenInitializerForPicklist(node, optional, defaultChildren) {
|
|
@@ -98259,36 +98379,34 @@ class FLangNormalizationRulesBuilder {
|
|
|
98259
98379
|
}
|
|
98260
98380
|
valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
|
|
98261
98381
|
var _dataBinding$defaultV;
|
|
98262
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
98382
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
98263
98383
|
const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
98264
98384
|
const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
|
|
98265
98385
|
const defaultValue = (_dataBinding$defaultV = dataBinding.defaultValue) !== null && _dataBinding$defaultV !== void 0 ? _dataBinding$defaultV : "";
|
|
98386
|
+
const sourceSequenceType = node.sourceXmlNode.attributes.settings ? _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.SETTINGS : disabled ? _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.DISABLED : _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.DEFAULT;
|
|
98266
98387
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
|
|
98267
98388
|
try {
|
|
98268
98389
|
var _this$fetchFunctions$, _this$fetchFunctions$2;
|
|
98269
98390
|
const fetchFnText = (_this$fetchFunctions$ = (_this$fetchFunctions$2 = this.fetchFunctions.getFetchFunction(dataBinding.fetchfn + (fetchFunctionSuffix !== null && fetchFunctionSuffix !== void 0 ? fetchFunctionSuffix : ""))) === null || _this$fetchFunctions$2 === void 0 ? void 0 : _this$fetchFunctions$2.toString()) !== null && _this$fetchFunctions$ !== void 0 ? _this$fetchFunctions$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)();
|
|
98270
98391
|
const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
|
|
98271
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GetExternalInfoExpression("@settings/isReadOnly"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), sourceValueReference, flangExpression), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))));
|
|
98392
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GetExternalInfoExpression("@settings/isReadOnly"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), sourceValueReference, flangExpression), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))), sourceSequenceType);
|
|
98272
98393
|
} catch (e) {
|
|
98273
98394
|
// eslint-disable-next-line no-console
|
|
98274
98395
|
console.error(`fetchfn = "${dataBinding.fetchfn}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
|
|
98275
98396
|
// eslint-disable-next-line no-console
|
|
98276
98397
|
console.error(e instanceof Error ? e.message : e);
|
|
98277
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference);
|
|
98398
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference, sourceSequenceType);
|
|
98278
98399
|
}
|
|
98279
98400
|
}
|
|
98280
98401
|
let valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue);
|
|
98281
|
-
if (dataBinding.settings) {
|
|
98282
|
-
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);
|
|
98283
|
-
}
|
|
98284
|
-
if (!disabled && !dataBinding.settings) {
|
|
98402
|
+
if (dataBinding.settings || !disabled && !dataBinding.settings) {
|
|
98285
98403
|
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);
|
|
98286
98404
|
}
|
|
98287
98405
|
const finalExpression = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(targetPathReference) ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "autoFlag")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "autoValue")), valueExpression) : valueExpression;
|
|
98288
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression);
|
|
98406
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression, sourceSequenceType);
|
|
98289
98407
|
}
|
|
98290
98408
|
*specialFieldsInitializer(node, options) {
|
|
98291
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
98409
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.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)());
|
|
98292
98410
|
if (options.disabled) {
|
|
98293
98411
|
yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "disabled"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"));
|
|
98294
98412
|
}
|
|
@@ -98306,7 +98424,7 @@ class FLangNormalizationRulesBuilder {
|
|
|
98306
98424
|
var _typeNode$base, _this$schemaRng$getTy;
|
|
98307
98425
|
// eslint-disable-next-line
|
|
98308
98426
|
const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
|
|
98309
|
-
const typeNode = validationInfoSource instanceof
|
|
98427
|
+
const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
|
|
98310
98428
|
const baseType = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : (_this$schemaRng$getTy = this.schemaRng.getTypeNodeByPath(targetPathReference)) === null || _this$schemaRng$getTy === void 0 ? void 0 : _this$schemaRng$getTy.baseType;
|
|
98311
98429
|
const sourceValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
98312
98430
|
return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
|