@kontur.candy/generator 5.68.0-fix-default-value.0 → 5.68.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 +85 -187
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66235,28 +66235,6 @@ function getObjectPropertyName(property) {
|
|
|
66235
66235
|
|
|
66236
66236
|
/***/ }),
|
|
66237
66237
|
|
|
66238
|
-
/***/ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts":
|
|
66239
|
-
/*!******************************************************************************!*\
|
|
66240
|
-
!*** ./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts ***!
|
|
66241
|
-
\******************************************************************************/
|
|
66242
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
66243
|
-
|
|
66244
|
-
"use strict";
|
|
66245
|
-
__webpack_require__.r(__webpack_exports__);
|
|
66246
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66247
|
-
/* harmony export */ DataDeclarationInitSourceValueSequence: () => (/* binding */ DataDeclarationInitSourceValueSequence)
|
|
66248
|
-
/* harmony export */ });
|
|
66249
|
-
// tslint:disable-next-line:ban-types
|
|
66250
|
-
|
|
66251
|
-
let DataDeclarationInitSourceValueSequence = /*#__PURE__*/function (DataDeclarationInitSourceValueSequence) {
|
|
66252
|
-
DataDeclarationInitSourceValueSequence["SETTINGS"] = "settings";
|
|
66253
|
-
DataDeclarationInitSourceValueSequence["DISABLED"] = "disabled";
|
|
66254
|
-
DataDeclarationInitSourceValueSequence["DEFAULT"] = "default";
|
|
66255
|
-
return DataDeclarationInitSourceValueSequence;
|
|
66256
|
-
}({});
|
|
66257
|
-
|
|
66258
|
-
/***/ }),
|
|
66259
|
-
|
|
66260
66238
|
/***/ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts":
|
|
66261
66239
|
/*!***********************************************************************************************!*\
|
|
66262
66240
|
!*** ./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts ***!
|
|
@@ -66281,10 +66259,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66281
66259
|
/* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
66282
66260
|
/* 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
66261
|
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
66284
|
-
/* harmony import */ var _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
66285
|
-
/* harmony import */ var _DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./DataDeclarationInitSourceSequenceFactory */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory.ts");
|
|
66286
|
-
|
|
66287
|
-
|
|
66288
66262
|
|
|
66289
66263
|
|
|
66290
66264
|
|
|
@@ -66328,37 +66302,6 @@ class DataDeclarationGenerationContext {
|
|
|
66328
66302
|
}
|
|
66329
66303
|
return [result];
|
|
66330
66304
|
}
|
|
66331
|
-
const srcDataValue = srcValue === null || srcValue === void 0 ? void 0 : srcValue.value;
|
|
66332
|
-
const objDataValue = objValue === null || objValue === void 0 ? void 0 : objValue.value;
|
|
66333
|
-
if (!srcDataValue || !objDataValue) {
|
|
66334
|
-
// eslint-disable-next-line consistent-return
|
|
66335
|
-
return;
|
|
66336
|
-
}
|
|
66337
|
-
const objVal = objDataValue[objDataValue.length - 1];
|
|
66338
|
-
const srcVal = srcDataValue[srcDataValue.length - 1];
|
|
66339
|
-
if (objDataValue.sequenceType === srcDataValue.sequenceType && objVal !== srcVal && objVal && srcVal) {
|
|
66340
|
-
throw new Error(`Duplicated attributes "defaultValue" have different values. Path: "${key}"`);
|
|
66341
|
-
}
|
|
66342
|
-
const nodeWithSettings = _DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory.getTypedValue([srcValue, srcDataValue.sequenceType], [objValue, objDataValue.sequenceType], _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.SETTINGS);
|
|
66343
|
-
if (nodeWithSettings) {
|
|
66344
|
-
return nodeWithSettings;
|
|
66345
|
-
}
|
|
66346
|
-
if (objDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT && srcDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
66347
|
-
if (objVal) {
|
|
66348
|
-
const res = lodash_mergewith__WEBPACK_IMPORTED_MODULE_0___default()(objValue, srcValue);
|
|
66349
|
-
res.value[res.value.length - 1] = objVal;
|
|
66350
|
-
return res;
|
|
66351
|
-
}
|
|
66352
|
-
} else if (srcDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
66353
|
-
return srcValue;
|
|
66354
|
-
} else if (objDataValue.sequenceType === _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
66355
|
-
return objValue;
|
|
66356
|
-
}
|
|
66357
|
-
const nodeDisabled = _DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory.getTypedValue([srcValue, srcDataValue.sequenceType], [objValue, objDataValue.sequenceType], _DataDeclaration__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationInitSourceValueSequence.DISABLED);
|
|
66358
|
-
if (nodeDisabled) {
|
|
66359
|
-
return nodeDisabled;
|
|
66360
|
-
}
|
|
66361
|
-
|
|
66362
66305
|
/* eslint-enable @typescript-eslint/no-unsafe-argument */
|
|
66363
66306
|
return undefined;
|
|
66364
66307
|
};
|
|
@@ -66843,8 +66786,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66843
66786
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
66844
66787
|
/* harmony export */ DataDeclarationInitSourceSequenceFactory: () => (/* binding */ DataDeclarationInitSourceSequenceFactory)
|
|
66845
66788
|
/* harmony export */ });
|
|
66846
|
-
/* harmony import */ var _DataDeclaration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
66847
|
-
|
|
66848
66789
|
class DataDeclarationInitSourceSequenceFactory {
|
|
66849
66790
|
constructor(fetchFunctions) {
|
|
66850
66791
|
this.fetchFunctions = void 0;
|
|
@@ -66854,13 +66795,13 @@ class DataDeclarationInitSourceSequenceFactory {
|
|
|
66854
66795
|
var _ref3;
|
|
66855
66796
|
if (node.settings) {
|
|
66856
66797
|
var _ref;
|
|
66857
|
-
return
|
|
66798
|
+
return [...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.takeFromModel(), ...this.setValueUnconditionally((_ref = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref !== void 0 ? _ref : "")];
|
|
66858
66799
|
}
|
|
66859
66800
|
if (disabled) {
|
|
66860
66801
|
var _ref2;
|
|
66861
|
-
return
|
|
66802
|
+
return [...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref2 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : "")];
|
|
66862
66803
|
}
|
|
66863
|
-
return
|
|
66804
|
+
return [...this.takeFromModel(), ...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref3 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref3 !== void 0 ? _ref3 : "")];
|
|
66864
66805
|
}
|
|
66865
66806
|
takeFromFetchFunctionOrDefault(fetchFnName, fieldName, defaultValue) {
|
|
66866
66807
|
return [...this.takeFromFetchFunction(fetchFnName, fieldName), ...this.setValueUnconditionally(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "")];
|
|
@@ -66903,13 +66844,6 @@ class DataDeclarationInitSourceSequenceFactory {
|
|
|
66903
66844
|
}
|
|
66904
66845
|
return [];
|
|
66905
66846
|
}
|
|
66906
|
-
setSequenceType(arr, sequenceType) {
|
|
66907
|
-
arr["sequenceType"] = sequenceType;
|
|
66908
|
-
return arr;
|
|
66909
|
-
}
|
|
66910
|
-
static getTypedValue([prevVal, prevType], [nextVal, nextType], type) {
|
|
66911
|
-
return prevType === type ? prevVal : nextType === type ? nextVal : null;
|
|
66912
|
-
}
|
|
66913
66847
|
}
|
|
66914
66848
|
|
|
66915
66849
|
/***/ }),
|
|
@@ -67087,6 +67021,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
67087
67021
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
67088
67022
|
/* harmony export */ AttributeTypes: () => (/* binding */ AttributeTypes),
|
|
67089
67023
|
/* harmony export */ AvailableChildrenType: () => (/* binding */ AvailableChildrenType),
|
|
67024
|
+
/* harmony export */ isAttributeDeprecated: () => (/* binding */ isAttributeDeprecated),
|
|
67090
67025
|
/* harmony export */ isRequiredValueParser: () => (/* binding */ isRequiredValueParser),
|
|
67091
67026
|
/* harmony export */ valueParserToAttributeType: () => (/* binding */ valueParserToAttributeType)
|
|
67092
67027
|
/* harmony export */ });
|
|
@@ -67125,6 +67060,9 @@ let AvailableChildrenType = /*#__PURE__*/function (AvailableChildrenType) {
|
|
|
67125
67060
|
AvailableChildrenType["List"] = "List";
|
|
67126
67061
|
return AvailableChildrenType;
|
|
67127
67062
|
}({});
|
|
67063
|
+
function isAttributeDeprecated(attr) {
|
|
67064
|
+
return Boolean(attr.deprecated);
|
|
67065
|
+
}
|
|
67128
67066
|
class AttributeTypes {}
|
|
67129
67067
|
AttributeTypes.Path = {
|
|
67130
67068
|
type: _AttributeTypeKind__WEBPACK_IMPORTED_MODULE_13__.AttributeTypeKind.Path
|
|
@@ -67428,9 +67366,8 @@ function buildAttributeDocs(propertyDeserializer, documentationFilesContext) {
|
|
|
67428
67366
|
valueTypes: [],
|
|
67429
67367
|
shortMarkdownDescription: "DEPRECATED",
|
|
67430
67368
|
markdownDescription: "DEPRECATED",
|
|
67431
|
-
|
|
67432
|
-
|
|
67433
|
-
deprecated: true
|
|
67369
|
+
deprecated: true,
|
|
67370
|
+
deprecationReason: propertyDeserializer.valueSource.reason
|
|
67434
67371
|
}];
|
|
67435
67372
|
}
|
|
67436
67373
|
return [];
|
|
@@ -69521,7 +69458,7 @@ class FLangValidationBuildContext {
|
|
|
69521
69458
|
console.warn(`Try to process as children condition failed.`);
|
|
69522
69459
|
}
|
|
69523
69460
|
// eslint-disable-next-line no-console
|
|
69524
|
-
console.warn(`Could not process kclang to flang: [${condition}]`);
|
|
69461
|
+
console.warn(`Could not process kclang to flang: [${condition.length > 100 ? condition.slice(0, 100) + "…" : condition}]`);
|
|
69525
69462
|
return undefined;
|
|
69526
69463
|
}
|
|
69527
69464
|
}
|
|
@@ -71181,14 +71118,12 @@ class GetOldExpression extends FLangExpression {
|
|
|
71181
71118
|
}
|
|
71182
71119
|
class FLangStatement extends FLangNode {}
|
|
71183
71120
|
class SetStatement extends FLangStatement {
|
|
71184
|
-
constructor(left, right
|
|
71121
|
+
constructor(left, right) {
|
|
71185
71122
|
super();
|
|
71186
71123
|
this.left = void 0;
|
|
71187
71124
|
this.right = void 0;
|
|
71188
|
-
this.sequenceType = void 0;
|
|
71189
71125
|
this.right = right;
|
|
71190
71126
|
this.left = left;
|
|
71191
|
-
this.sequenceType = sequenceType;
|
|
71192
71127
|
}
|
|
71193
71128
|
*getChildNodes() {
|
|
71194
71129
|
yield this.left;
|
|
@@ -71226,7 +71161,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71226
71161
|
/* harmony export */ ensureOperandsOfTypeOrNull: () => (/* binding */ ensureOperandsOfTypeOrNull),
|
|
71227
71162
|
/* harmony export */ extractValueReferenceFromCast: () => (/* binding */ extractValueReferenceFromCast),
|
|
71228
71163
|
/* harmony export */ getAllExpressionChildren: () => (/* binding */ getAllExpressionChildren),
|
|
71229
|
-
/* harmony export */ getSelectorIdFromRule: () => (/* binding */ getSelectorIdFromRule),
|
|
71230
71164
|
/* harmony export */ hashSetFieldNameSuffix: () => (/* binding */ hashSetFieldNameSuffix),
|
|
71231
71165
|
/* harmony export */ makeGetOld: () => (/* binding */ makeGetOld),
|
|
71232
71166
|
/* harmony export */ makeNoDeps: () => (/* binding */ makeNoDeps),
|
|
@@ -71241,11 +71175,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71241
71175
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
71242
71176
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
71243
71177
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
71244
|
-
/* harmony import */ var
|
|
71245
|
-
/* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
|
|
71246
|
-
/* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
71247
|
-
|
|
71248
|
-
|
|
71178
|
+
/* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
71249
71179
|
|
|
71250
71180
|
|
|
71251
71181
|
|
|
@@ -71264,183 +71194,135 @@ function* getAllExpressionChildren(node, descendantsFilter) {
|
|
|
71264
71194
|
}
|
|
71265
71195
|
}
|
|
71266
71196
|
function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
|
|
71267
|
-
return new
|
|
71197
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(path, "value"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.EqExpression(makeStringValueReference(path.toCurrentIteration(), "disableValueAutoInit"), new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression("true")), makeNoDeps(castOperandIfNeed(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(path.toCurrentIteration(), "value"), originalExpression.getType())), originalExpression));
|
|
71268
71198
|
}
|
|
71269
71199
|
function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
|
|
71270
71200
|
var _formSchemaRng$getEle;
|
|
71271
|
-
return x instanceof
|
|
71201
|
+
return x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement && x.left.valueName === "value" && (_formSchemaRng$getEle = formSchemaRng.getElementByPath(x.left.modePath)) !== null && _formSchemaRng$getEle !== void 0 && _formSchemaRng$getEle.isIgnoreForcedValueSet() ? [createValueRuleWithDisableValueAutoInitCheck(x.left.modePath, x.right)] : [x];
|
|
71272
71202
|
}
|
|
71273
71203
|
function wrapWithArgumentsCondition(expression) {
|
|
71274
|
-
const childFilter = node => !(node instanceof
|
|
71275
|
-
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof
|
|
71204
|
+
const childFilter = node => !(node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ReduceCallExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetSumByKeysExpression || node instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression);
|
|
71205
|
+
const allValueRefNodes = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.concat([expression], getAllExpressionChildren(expression, childFilter)).map(x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression ? x : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrUndefined);
|
|
71276
71206
|
const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
|
|
71277
71207
|
const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.reduce(uniquePaths, (acc, curr) => {
|
|
71278
|
-
const currExpr = new
|
|
71279
|
-
return acc != undefined ? new
|
|
71208
|
+
const currExpr = new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ExistsExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(curr.modePath, curr.valueName));
|
|
71209
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, currExpr) : currExpr;
|
|
71280
71210
|
}, undefined);
|
|
71281
71211
|
if (conditionExpression == undefined) {
|
|
71282
71212
|
return expression;
|
|
71283
71213
|
}
|
|
71284
|
-
return new
|
|
71214
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullLiteralExpression());
|
|
71285
71215
|
}
|
|
71286
|
-
const getSelectorIdFromRule = x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement ? x.left.convertToString() : x.convertToString();
|
|
71287
|
-
const mergeRules = function (items) {
|
|
71288
|
-
const rulesDictionary = new Map();
|
|
71289
|
-
for (const item of items) {
|
|
71290
|
-
const id = getSelectorIdFromRule(item);
|
|
71291
|
-
const prevVal = rulesDictionary.get(id);
|
|
71292
|
-
if (!prevVal) {
|
|
71293
|
-
rulesDictionary.set(id, item);
|
|
71294
|
-
} else if (item instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement && prevVal instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement) {
|
|
71295
|
-
if (!prevVal.sequenceType) {
|
|
71296
|
-
continue;
|
|
71297
|
-
} else if (!item.sequenceType) {
|
|
71298
|
-
rulesDictionary.set(id, item);
|
|
71299
|
-
continue;
|
|
71300
|
-
}
|
|
71301
|
-
const itemWithSettings = _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceSequenceFactory.getTypedValue([prevVal, prevVal.sequenceType], [item, item.sequenceType], _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.SETTINGS);
|
|
71302
|
-
if (itemWithSettings) {
|
|
71303
|
-
rulesDictionary.set(id, itemWithSettings);
|
|
71304
|
-
continue;
|
|
71305
|
-
}
|
|
71306
|
-
if (prevVal.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT && item.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
71307
|
-
var _prevVal$right, _item$right;
|
|
71308
|
-
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();
|
|
71309
|
-
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();
|
|
71310
|
-
const hasPrevDefaultVal = prevDefaultVal && prevDefaultVal !== '""';
|
|
71311
|
-
const hasItemDefaultVal = itemDefaultVal && itemDefaultVal !== '""';
|
|
71312
|
-
if (hasPrevDefaultVal && hasItemDefaultVal && prevDefaultVal === itemDefaultVal) {
|
|
71313
|
-
continue;
|
|
71314
|
-
}
|
|
71315
|
-
if (hasItemDefaultVal) {
|
|
71316
|
-
rulesDictionary.set(id, item);
|
|
71317
|
-
continue;
|
|
71318
|
-
}
|
|
71319
|
-
} else if (prevVal.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
71320
|
-
continue;
|
|
71321
|
-
} else if (item.sequenceType === _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DEFAULT) {
|
|
71322
|
-
rulesDictionary.set(id, item);
|
|
71323
|
-
continue;
|
|
71324
|
-
}
|
|
71325
|
-
const itemDisabled = _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceSequenceFactory.getTypedValue([prevVal, prevVal.sequenceType], [item, item.sequenceType], _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_5__.DataDeclarationInitSourceValueSequence.DISABLED);
|
|
71326
|
-
if (itemDisabled) {
|
|
71327
|
-
rulesDictionary.set(id, itemDisabled);
|
|
71328
|
-
continue;
|
|
71329
|
-
}
|
|
71330
|
-
}
|
|
71331
|
-
}
|
|
71332
|
-
return rulesDictionary.values();
|
|
71333
|
-
};
|
|
71334
71216
|
function combineRulesWithOptionalSectionChecking(allRules, optionalSectionRulesBuilder) {
|
|
71335
|
-
const allUniqueRules =
|
|
71217
|
+
const allUniqueRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allRules, x => x instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement ? x.left.convertToString() : x.convertToString());
|
|
71336
71218
|
const allUniqueRulesWithOptionalChecks = Iterator.from(optionalSectionRulesBuilder.wrapRulesWithOptionalPageCheck(allUniqueRules)).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
|
|
71337
71219
|
return allUniqueRulesWithOptionalChecks;
|
|
71338
71220
|
}
|
|
71339
71221
|
function tryExtractValueReferenceAsStringFromDecimal(expression) {
|
|
71340
|
-
if (expression.getType() ===
|
|
71222
|
+
if (expression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal && expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71341
71223
|
return expression.targetExpression;
|
|
71342
71224
|
}
|
|
71343
71225
|
return expression;
|
|
71344
71226
|
}
|
|
71345
71227
|
function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, decimalFormat = "G29") {
|
|
71346
|
-
if (enableTypedExpression && (operandExpression.getType() ===
|
|
71228
|
+
if (enableTypedExpression && (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet)) {
|
|
71347
71229
|
return operandExpression;
|
|
71348
71230
|
}
|
|
71349
71231
|
return castOperandToStringIfNeed(operandExpression, decimalFormat);
|
|
71350
71232
|
}
|
|
71351
71233
|
function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
|
|
71352
|
-
if (operandExpression instanceof
|
|
71353
|
-
return new
|
|
71234
|
+
if (operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateTimeExpression || operandExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateNowExpression) {
|
|
71235
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DateToStringExpression(operandExpression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression("dd.MM.yyyy"));
|
|
71354
71236
|
}
|
|
71355
|
-
if (operandExpression.getType() ===
|
|
71356
|
-
return new
|
|
71237
|
+
if (operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array || operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet) {
|
|
71238
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SerializeEnumerationExpression(operandExpression);
|
|
71357
71239
|
}
|
|
71358
|
-
return operandExpression.getType() !=
|
|
71240
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string, decimalFormat != undefined && operandExpression.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.StringLiteralExpression(decimalFormat) : undefined) : operandExpression;
|
|
71359
71241
|
}
|
|
71360
71242
|
function castOperandIfNeed(operandExpression, type) {
|
|
71361
|
-
if (type instanceof
|
|
71362
|
-
return operandExpression.getType() != type ? new
|
|
71243
|
+
if (type instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression) {
|
|
71244
|
+
return operandExpression.getType() != type ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, type) : operandExpression;
|
|
71363
71245
|
}
|
|
71364
71246
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid type for cast: ${type}`);
|
|
71365
71247
|
}
|
|
71366
71248
|
function castOperandToBoolIfNeed(operandExpression) {
|
|
71367
|
-
return operandExpression.getType() !=
|
|
71249
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.bool ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.bool) : operandExpression;
|
|
71368
71250
|
}
|
|
71369
71251
|
function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
|
|
71370
|
-
return operandExpression.getType() !==
|
|
71252
|
+
return operandExpression.getType() !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.decimal, defaultValue != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.DecimalLiteralExpression(defaultValue) : undefined) : operandExpression;
|
|
71371
71253
|
}
|
|
71372
71254
|
const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
|
|
71373
71255
|
function castOperandToDateTimeIfNeed(operandExpression) {
|
|
71374
|
-
return operandExpression.getType() !=
|
|
71256
|
+
return operandExpression.getType() != _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dateTime ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(operandExpression, _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dateTime) : operandExpression;
|
|
71375
71257
|
}
|
|
71376
71258
|
function nullCoalesceWithTypeCheck(argument, replacement) {
|
|
71377
|
-
const isValid = argument.getType() === replacement.getType() || argument.getType() ===
|
|
71259
|
+
const isValid = argument.getType() === replacement.getType() || argument.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null || replacement.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null;
|
|
71378
71260
|
if (!isValid) {
|
|
71379
71261
|
throw new Error("Couldn't build null coalesce expression: types not match");
|
|
71380
71262
|
}
|
|
71381
|
-
return new
|
|
71263
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression(argument, replacement);
|
|
71382
71264
|
}
|
|
71383
71265
|
function ensureOperandsOfTypeOrNull(type, ...operands) {
|
|
71384
71266
|
for (const operand of operands) {
|
|
71385
71267
|
const operandType = operand.getType();
|
|
71386
|
-
if (operandType !==
|
|
71268
|
+
if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null && operandType !== type) {
|
|
71387
71269
|
throw new Error(`Invalid operand type: required [${type}] but got ${operandType}`);
|
|
71388
71270
|
}
|
|
71389
71271
|
}
|
|
71390
71272
|
}
|
|
71391
71273
|
function combineByOrFlangExpr(acc, current) {
|
|
71392
|
-
return acc != undefined ? new
|
|
71274
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, current) : current;
|
|
71393
71275
|
}
|
|
71394
71276
|
function combineByAndFlangExpr(acc, current) {
|
|
71395
|
-
return acc != undefined ? new
|
|
71277
|
+
return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.AndBinaryExpression(acc, current) : current;
|
|
71396
71278
|
}
|
|
71397
71279
|
function makeNoDeps(expression) {
|
|
71398
|
-
if (expression instanceof
|
|
71399
|
-
return new
|
|
71280
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71281
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression);
|
|
71400
71282
|
}
|
|
71401
|
-
if (expression instanceof
|
|
71402
|
-
return new
|
|
71283
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71284
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
71403
71285
|
}
|
|
71404
71286
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
71405
71287
|
}
|
|
71406
71288
|
function makeGetOld(expression) {
|
|
71407
|
-
if (expression instanceof
|
|
71408
|
-
return new
|
|
71289
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71290
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression);
|
|
71409
71291
|
}
|
|
71410
|
-
if (expression instanceof
|
|
71411
|
-
return new
|
|
71292
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71293
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression.targetExpression), expression.targetType, expression.defaultValue);
|
|
71412
71294
|
}
|
|
71413
71295
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
|
|
71414
71296
|
}
|
|
71415
71297
|
function makeStringValueReference(modePath, valueName) {
|
|
71416
|
-
return new
|
|
71298
|
+
return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression(new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression(modePath, valueName), _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string);
|
|
71417
71299
|
}
|
|
71418
71300
|
function extractValueReferenceFromCast(expression) {
|
|
71419
|
-
if (expression instanceof
|
|
71301
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71420
71302
|
return expression;
|
|
71421
71303
|
}
|
|
71422
|
-
if (expression instanceof
|
|
71304
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
|
|
71423
71305
|
return expression.targetExpression;
|
|
71424
71306
|
}
|
|
71425
|
-
if (expression instanceof
|
|
71307
|
+
if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression) {
|
|
71426
71308
|
return expression.targetExpression;
|
|
71427
71309
|
}
|
|
71428
71310
|
return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Cannot extract ValueReferenceExpression! ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression)}`);
|
|
71429
71311
|
}
|
|
71430
71312
|
function ensureCorrectFieldNameByExpressionType(statement) {
|
|
71431
|
-
if (statement instanceof
|
|
71313
|
+
if (statement instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement) {
|
|
71432
71314
|
const lastPart = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.last(statement.left.modePath.getPathParts());
|
|
71433
71315
|
const lastStringPart = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.isSimpleToken(lastPart) ? lastPart : "";
|
|
71434
|
-
if (statement.right.getType() ===
|
|
71316
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict && !lastStringPart.endsWith(dictFieldNameSuffix)) {
|
|
71435
71317
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${dictFieldNameSuffix}"`);
|
|
71436
71318
|
}
|
|
71437
|
-
if (statement.right.getType() ===
|
|
71319
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet && !lastStringPart.endsWith(hashSetFieldNameSuffix)) {
|
|
71438
71320
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${hashSetFieldNameSuffix}"`);
|
|
71439
71321
|
}
|
|
71440
|
-
if (statement.right.getType() ===
|
|
71322
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
|
|
71441
71323
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${arrayFieldNameSuffix}"`);
|
|
71442
71324
|
}
|
|
71443
|
-
if (statement.right.getType() ===
|
|
71325
|
+
if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
|
|
71444
71326
|
throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
|
|
71445
71327
|
}
|
|
71446
71328
|
}
|
|
@@ -75143,6 +75025,12 @@ class DropdownButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
75143
75025
|
itemBuilder.prop(x => x.onActionClick).set(context.generateHelperFunctionExpression(node, "onClick", item.onClick));
|
|
75144
75026
|
itemBuilder.appendChild(context.convertChildNodes(item.children));
|
|
75145
75027
|
}
|
|
75028
|
+
if (node.disabled2 != undefined) {
|
|
75029
|
+
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_4__.buildExpressionPropValue)(node.disabled2));
|
|
75030
|
+
if (this.getLegacyNode().getParent() != undefined) {
|
|
75031
|
+
markupBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
75032
|
+
}
|
|
75033
|
+
}
|
|
75146
75034
|
return markupBuilder.buildConverterResult();
|
|
75147
75035
|
}
|
|
75148
75036
|
}
|
|
@@ -75168,13 +75056,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
75168
75056
|
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__);
|
|
75169
75057
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
75170
75058
|
/* harmony import */ var _Common_ActionNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Common/ActionNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Action/Common/ActionNode.ts");
|
|
75059
|
+
/* harmony import */ var _Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Commons/DocumentationLinks */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/DocumentationLinks.ts");
|
|
75171
75060
|
|
|
75172
75061
|
|
|
75173
75062
|
|
|
75174
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
75063
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
75175
75064
|
|
|
75176
75065
|
|
|
75177
|
-
|
|
75066
|
+
|
|
75067
|
+
let DropdownButtonNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("dropdownbutton", `Кнопка с выпадющим меню. Позволяет визуально объединить несколько действий в одну кнопку`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/Action/DropdownButton sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, "Возможность установки произвольных data-tid атрибутов, может пригодиться другим командам, или для идентификации элемента в тестах"), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("size", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.enum("small", "medium", "large"), "Размер кнопки. По умолчанинию small"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("icon", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, "Иконка, отображаемая рядом с текстом кнопки"), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.lengthUnit, "Ширина"), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("caption", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, "Текст, отображаемый на кнопке"), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("action", [_Common_ActionNode__WEBPACK_IMPORTED_MODULE_4__.ActionNode]), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec(_class = (_class2 = class DropdownButtonNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
75178
75068
|
constructor(...args) {
|
|
75179
75069
|
super(...args);
|
|
75180
75070
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tid", _descriptor, this);
|
|
@@ -75183,6 +75073,7 @@ let DropdownButtonNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTE
|
|
|
75183
75073
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "width", _descriptor4, this);
|
|
75184
75074
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "caption", _descriptor5, this);
|
|
75185
75075
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "items", _descriptor6, this);
|
|
75076
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disabled2", _descriptor7, this);
|
|
75186
75077
|
}
|
|
75187
75078
|
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "tid", [_dec2], {
|
|
75188
75079
|
configurable: true,
|
|
@@ -75214,6 +75105,11 @@ let DropdownButtonNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTE
|
|
|
75214
75105
|
enumerable: true,
|
|
75215
75106
|
writable: true,
|
|
75216
75107
|
initializer: null
|
|
75108
|
+
}), _descriptor7 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "disabled2", [_dec8], {
|
|
75109
|
+
configurable: true,
|
|
75110
|
+
enumerable: true,
|
|
75111
|
+
writable: true,
|
|
75112
|
+
initializer: null
|
|
75217
75113
|
})), _class2)) || _class);
|
|
75218
75114
|
|
|
75219
75115
|
/***/ }),
|
|
@@ -78527,6 +78423,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
78527
78423
|
unitItemBuilder.prop(x => x.clearConfirmationSettings).set((_page$clearConfirmati = page.clearConfirmationSettings) !== null && _page$clearConfirmati !== void 0 ? _page$clearConfirmati : {});
|
|
78528
78424
|
unitItemBuilder.prop(x => x.maxOccurs).set((_page$maxOccurs = page.maxOccurs) !== null && _page$maxOccurs !== void 0 ? _page$maxOccurs : context.getPathMaxOccurs(page.getFullPath()));
|
|
78529
78425
|
const pageActions = page.pageActions;
|
|
78426
|
+
unitItemBuilder.prop(x => x.pageActions).set(pageActions);
|
|
78530
78427
|
if (pageActions && pageActions.hideButton === true) {
|
|
78531
78428
|
unitItemBuilder.prop(x => x.hideActions).set(true);
|
|
78532
78429
|
}
|
|
@@ -79918,6 +79815,7 @@ class UnitItemConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__
|
|
|
79918
79815
|
var _context$getPathMaxOc;
|
|
79919
79816
|
markupBuilder.prop(x => x.maxOccurs).set((_context$getPathMaxOc = context.getPathMaxOccurs(node.getFullPath())) !== null && _context$getPathMaxOc !== void 0 ? _context$getPathMaxOc : node.maxOccurs);
|
|
79920
79817
|
}
|
|
79818
|
+
markupBuilder.prop(x => x.pageActions).set(page.pageActions);
|
|
79921
79819
|
if ((_page$pageActions = page.pageActions) !== null && _page$pageActions !== void 0 && _page$pageActions.hideButton) {
|
|
79922
79820
|
markupBuilder.prop(x => x.hideActions).set(true);
|
|
79923
79821
|
}
|
|
@@ -98182,10 +98080,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
98182
98080
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
98183
98081
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
98184
98082
|
/* harmony import */ var _ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
98185
|
-
/* harmony import */ var
|
|
98186
|
-
/* harmony import */ var
|
|
98187
|
-
/* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
|
|
98188
|
-
|
|
98083
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
98084
|
+
/* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
|
|
98189
98085
|
|
|
98190
98086
|
|
|
98191
98087
|
|
|
@@ -98208,7 +98104,7 @@ class FLangNormalizationRulesBuilder {
|
|
|
98208
98104
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
98209
98105
|
}
|
|
98210
98106
|
*childrenInitializer(node, optional, defaultChildren) {
|
|
98211
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
98107
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
98212
98108
|
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"))));
|
|
98213
98109
|
}
|
|
98214
98110
|
*childrenInitializerForPicklist(node, optional, defaultChildren) {
|
|
@@ -98217,34 +98113,36 @@ class FLangNormalizationRulesBuilder {
|
|
|
98217
98113
|
}
|
|
98218
98114
|
valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
|
|
98219
98115
|
var _dataBinding$defaultV;
|
|
98220
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
98116
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
98221
98117
|
const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
98222
98118
|
const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
|
|
98223
98119
|
const defaultValue = (_dataBinding$defaultV = dataBinding.defaultValue) !== null && _dataBinding$defaultV !== void 0 ? _dataBinding$defaultV : "";
|
|
98224
|
-
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;
|
|
98225
98120
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
|
|
98226
98121
|
try {
|
|
98227
98122
|
var _this$fetchFunctions$, _this$fetchFunctions$2;
|
|
98228
98123
|
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)();
|
|
98229
98124
|
const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
|
|
98230
|
-
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)))
|
|
98125
|
+
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))));
|
|
98231
98126
|
} catch (e) {
|
|
98232
98127
|
// eslint-disable-next-line no-console
|
|
98233
98128
|
console.error(`fetchfn = "${dataBinding.fetchfn}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
|
|
98234
98129
|
// eslint-disable-next-line no-console
|
|
98235
98130
|
console.error(e instanceof Error ? e.message : e);
|
|
98236
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference
|
|
98131
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference);
|
|
98237
98132
|
}
|
|
98238
98133
|
}
|
|
98239
98134
|
let valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue);
|
|
98240
|
-
if (dataBinding.settings
|
|
98135
|
+
if (dataBinding.settings) {
|
|
98136
|
+
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);
|
|
98137
|
+
}
|
|
98138
|
+
if (!disabled && !dataBinding.settings) {
|
|
98241
98139
|
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);
|
|
98242
98140
|
}
|
|
98243
98141
|
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;
|
|
98244
|
-
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression
|
|
98142
|
+
return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression);
|
|
98245
98143
|
}
|
|
98246
98144
|
*specialFieldsInitializer(node, options) {
|
|
98247
|
-
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,
|
|
98145
|
+
const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
|
|
98248
98146
|
if (options.disabled) {
|
|
98249
98147
|
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"));
|
|
98250
98148
|
}
|
|
@@ -98262,7 +98160,7 @@ class FLangNormalizationRulesBuilder {
|
|
|
98262
98160
|
var _typeNode$base, _this$schemaRng$getTy;
|
|
98263
98161
|
// eslint-disable-next-line
|
|
98264
98162
|
const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
|
|
98265
|
-
const typeNode = validationInfoSource instanceof
|
|
98163
|
+
const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
|
|
98266
98164
|
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;
|
|
98267
98165
|
const sourceValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
|
|
98268
98166
|
return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
|