@kontur.candy/generator 5.69.0-markup-in-modalheader.0 → 5.70.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.
Files changed (2) hide show
  1. package/dist/index.js +282 -112
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46492,6 +46492,16 @@ class ModelPathImpl {
46492
46492
  }
46493
46493
  return this;
46494
46494
  }
46495
+ trimFirstStarIfLastToken() {
46496
+ const firstItem = _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.first(this.tokens);
46497
+ if (firstItem != undefined && PathTokens.isMultiToken(firstItem)) {
46498
+ return new ModelPathImpl(this.tokens.slice(1), this.absolute);
46499
+ }
46500
+ return this;
46501
+ }
46502
+ getSuffixPathFrom(modelFieldPath) {
46503
+ return createRelativeFromTokens(modelFieldPath.matchFor(this).map(x => x.kind === _PathMatcher__WEBPACK_IMPORTED_MODULE_4__.MatchKind.DifferentSuffix ? x.source : undefined).filter(_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isNotNullOrUndefined).flatMap(x => x.getPathPartsAsArray()));
46504
+ }
46495
46505
  getParentPath() {
46496
46506
  const result = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.absolute);
46497
46507
  for (const token of _IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.skipLast(this.getPathParts(), 1)) {
@@ -59089,7 +59099,7 @@ class FormSchemaRngAttribute {
59089
59099
  }
59090
59100
  const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
59091
59101
  class FormSchemaRngElement {
59092
- constructor(name, parent, optional, multiple, nillable, maxOccurs, lazyLoadMode, lazyLoadAggregations, errorAndWarningCountRequired, lazyLoadingThreshold, disableValueAutoInit, editorOnly) {
59102
+ constructor(name, parent, optional, multiple, nillable, maxOccurs, lazyLoadMode, lazyLoadAggregations, errorAndWarningCountRequired, lazyLoadingThreshold, disableValueAutoInit, editorOnly, useServerFilters) {
59093
59103
  this.name = void 0;
59094
59104
  this.multiple = void 0;
59095
59105
  this.lazyLoadMode = void 0;
@@ -59100,6 +59110,7 @@ class FormSchemaRngElement {
59100
59110
  this.innerTextType = void 0;
59101
59111
  this.children = new Map();
59102
59112
  this.maxOccurs = void 0;
59113
+ this.useServerFilters = void 0;
59103
59114
  this.attributes = new Map();
59104
59115
  this.parent = void 0;
59105
59116
  this.optional = void 0;
@@ -59117,6 +59128,7 @@ class FormSchemaRngElement {
59117
59128
  this.lazyLoadingThreshold = lazyLoadingThreshold;
59118
59129
  this.disableValueAutoInit = disableValueAutoInit;
59119
59130
  this.editorOnly = editorOnly;
59131
+ this.useServerFilters = useServerFilters;
59120
59132
  }
59121
59133
  addElement(element) {
59122
59134
  this.children.set(element.name, element);
@@ -59150,6 +59162,9 @@ class FormSchemaRngElement {
59150
59162
  var _this$disableValueAut2;
59151
59163
  return (_this$disableValueAut2 = this.disableValueAutoInit) !== null && _this$disableValueAut2 !== void 0 ? _this$disableValueAut2 : this.parent instanceof FormSchemaRngElement ? this.parent.isIgnoreForcedValueSet() : false;
59152
59164
  }
59165
+ getUseServerFilters() {
59166
+ return this.useServerFilters;
59167
+ }
59153
59168
  }
59154
59169
  class FormSchemaRng {
59155
59170
  constructor(rootElement) {
@@ -59165,7 +59180,7 @@ class FormSchemaRng {
59165
59180
  return new FormSchemaRng(this.convertSchemaRngElement(schemaRngElement, RootParent));
59166
59181
  }
59167
59182
  static convertSchemaRngElement(schemaRngElement, parent) {
59168
- const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple, schemaRngElement.nillable, schemaRngElement.maxOccurs, schemaRngElement.lazyLoadMode, schemaRngElement.lazyLoadAggregations, schemaRngElement.errorAndWarningCountRequired, schemaRngElement.lazyLoadingThreshold, schemaRngElement.disableValueAutoInit, schemaRngElement.editorOnly);
59183
+ const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple, schemaRngElement.nillable, schemaRngElement.maxOccurs, schemaRngElement.lazyLoadMode, schemaRngElement.lazyLoadAggregations, schemaRngElement.errorAndWarningCountRequired, schemaRngElement.lazyLoadingThreshold, schemaRngElement.disableValueAutoInit, schemaRngElement.editorOnly, schemaRngElement.useServerFilters);
59169
59184
  if (schemaRngElement.innerText != undefined) {
59170
59185
  if (schemaRngElement.innerText.type != undefined) {
59171
59186
  result.setInnerTextType(this.buildTypeInfo(schemaRngElement.innerText.type));
@@ -59516,7 +59531,7 @@ __webpack_require__.r(__webpack_exports__);
59516
59531
 
59517
59532
 
59518
59533
 
59519
- var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class3, _class4, _descriptor2, _dec5, _dec6, _class5, _class6, _descriptor3, _dec7, _dec8, _class7, _class8, _descriptor4, _dec9, _dec10, _class9, _class10, _descriptor5, _dec11, _dec12, _class11, _class12, _descriptor6, _dec13, _dec14, _class13, _class14, _descriptor7, _dec15, _dec16, _class15, _class16, _descriptor8, _dec17, _dec18, _class17, _class18, _descriptor9, _dec19, _dec20, _class19, _class20, _descriptor10, _dec21, _dec22, _dec23, _class21, _class22, _descriptor11, _descriptor12, _dec24, _dec25, _dec26, _dec27, _dec28, _class23, _class24, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _class25, _class26, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _dec39, _dec40, _class27, _class28, _descriptor26, _dec41, _dec42, _class29, _class30, _descriptor27, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _dec52, _dec53, _dec54, _dec55, _dec56, _dec57, _dec58, _dec59, _class31, _class32, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43;
59534
+ var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class3, _class4, _descriptor2, _dec5, _dec6, _class5, _class6, _descriptor3, _dec7, _dec8, _class7, _class8, _descriptor4, _dec9, _dec10, _class9, _class10, _descriptor5, _dec11, _dec12, _class11, _class12, _descriptor6, _dec13, _dec14, _class13, _class14, _descriptor7, _dec15, _dec16, _class15, _class16, _descriptor8, _dec17, _dec18, _class17, _class18, _descriptor9, _dec19, _dec20, _class19, _class20, _descriptor10, _dec21, _dec22, _dec23, _class21, _class22, _descriptor11, _descriptor12, _dec24, _dec25, _dec26, _dec27, _dec28, _class23, _class24, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _class25, _class26, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _dec39, _dec40, _class27, _class28, _descriptor26, _dec41, _dec42, _class29, _class30, _descriptor27, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _dec52, _dec53, _dec54, _dec55, _dec56, _dec57, _dec58, _dec59, _dec60, _class31, _class32, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44;
59520
59535
 
59521
59536
  class SchemaRngTypeCheck extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {}
59522
59537
  let PatternTypeCheck = (_dec = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("pattern", ``), _dec2 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("value", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, ``), _dec(_class = (_class2 = class PatternTypeCheck extends SchemaRngTypeCheck {
@@ -59763,7 +59778,7 @@ let SchemaRngElement = (_dec43 = (0,_generators_markupGenerator_Serializer_Sugar
59763
59778
  - deferred: ставится на коллекцию, которую хотим получать частями; например, в 6-НДФЛ при открытии одной справки, загрузятся все данные по ней
59764
59779
  - initial: данные загружаются всегда; например, данные для фильтров
59765
59780
  - request: загрузка по запросу с фронта; используется для постраничного отображения списков; например, видимые пользователю поля в таблице
59766
- `), _dec57 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("errorAndWarningCountRequired", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Подсчет количества ошибок и предупреждений по элементу в множественности`), _dec58 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadingThreshold", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, `Количество элементов в множественности, начиная с которого включается частичная загрузка. Не поддерживается для вложенных множественностей, только для корневой с lazyLoadMode=deferred`), _dec59 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disableValueAutoInit", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `В значениии true запрещает при кастомной нормализации перезаписывать значение value,
59781
+ `), _dec57 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("errorAndWarningCountRequired", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Подсчет количества ошибок и предупреждений по элементу в множественности`), _dec58 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("useServerFilters", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, "Включает режим серверной фильтрации для коллекции"), _dec59 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadingThreshold", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, `Количество элементов в множественности, начиная с которого включается частичная загрузка. Не поддерживается для вложенных множественностей, только для корневой с lazyLoadMode=deferred`), _dec60 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disableValueAutoInit", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `В значениии true запрещает при кастомной нормализации перезаписывать значение value,
59767
59782
  полученное из ФУФа, даже если оно пустое`), _dec43(_class31 = (_class32 = class SchemaRngElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
59768
59783
  constructor(...args) {
59769
59784
  super(...args);
@@ -59781,8 +59796,9 @@ let SchemaRngElement = (_dec43 = (0,_generators_markupGenerator_Serializer_Sugar
59781
59796
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadAggregations", _descriptor39, this);
59782
59797
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadMode", _descriptor40, this);
59783
59798
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "errorAndWarningCountRequired", _descriptor41, this);
59784
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadingThreshold", _descriptor42, this);
59785
- _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disableValueAutoInit", _descriptor43, this);
59799
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "useServerFilters", _descriptor42, this);
59800
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadingThreshold", _descriptor43, this);
59801
+ _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disableValueAutoInit", _descriptor44, this);
59786
59802
  }
59787
59803
  }, (_descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class32.prototype, "name", [_dec44], {
59788
59804
  configurable: true,
@@ -59854,12 +59870,17 @@ let SchemaRngElement = (_dec43 = (0,_generators_markupGenerator_Serializer_Sugar
59854
59870
  enumerable: true,
59855
59871
  writable: true,
59856
59872
  initializer: null
59857
- }), _descriptor42 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class32.prototype, "lazyLoadingThreshold", [_dec58], {
59873
+ }), _descriptor42 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class32.prototype, "useServerFilters", [_dec58], {
59858
59874
  configurable: true,
59859
59875
  enumerable: true,
59860
59876
  writable: true,
59861
59877
  initializer: null
59862
- }), _descriptor43 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class32.prototype, "disableValueAutoInit", [_dec59], {
59878
+ }), _descriptor43 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class32.prototype, "lazyLoadingThreshold", [_dec59], {
59879
+ configurable: true,
59880
+ enumerable: true,
59881
+ writable: true,
59882
+ initializer: null
59883
+ }), _descriptor44 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class32.prototype, "disableValueAutoInit", [_dec60], {
59863
59884
  configurable: true,
59864
59885
  enumerable: true,
59865
59886
  writable: true,
@@ -63913,6 +63934,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
63913
63934
  const defaultValue = this.dataDeclarationHelper.getDefaultValue(target.toLegacyPath());
63914
63935
  const autoField = this.dataDeclarationHelper.isNodeHasAutoFlagEntry(target.toLegacyPath());
63915
63936
  const disabled = this.dataDeclarationHelper.isNodeHasDisabledEntry(target.toLegacyPath());
63937
+ const optional = this.dataDeclarationHelper.isNodeOptionalBySchemaOrSugar(target);
63916
63938
  const compiledTarget = this.modelPathInstance(target);
63917
63939
  const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.distinctBy(dependencies.map(x => ({
63918
63940
  path: x.asDependencyModelPath(),
@@ -63923,7 +63945,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
63923
63945
  const compiledExpressionWithCheck = this.compileAllItemsIsEmptyCheckBlock(compiledExpression, dependencyModelPaths.filter(x => !x.isIgnoreForChecks).map(x => x.path));
63924
63946
  const compiledDelegate = `context => KCCalculation.execute(context, expression => ${compiledExpressionWithCheck}, "${defaultValue}")`;
63925
63947
  return {
63926
- compiledFunction: `new CalculationFunction(${compiledTarget}, [${compiledDeps}], ${compiledDelegate}, ${autoField}, ${disabled})`,
63948
+ compiledFunction: `new CalculationFunction(${compiledTarget}, [${compiledDeps}], ${compiledDelegate}, ${autoField}, ${disabled}, ${optional})`,
63927
63949
  dependencies: dependencies
63928
63950
  };
63929
63951
  }
@@ -66235,6 +66257,28 @@ function getObjectPropertyName(property) {
66235
66257
 
66236
66258
  /***/ }),
66237
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
+
66238
66282
  /***/ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts":
66239
66283
  /*!***********************************************************************************************!*\
66240
66284
  !*** ./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts ***!
@@ -66259,6 +66303,10 @@ __webpack_require__.r(__webpack_exports__);
66259
66303
  /* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
66260
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");
66261
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
+
66262
66310
 
66263
66311
 
66264
66312
 
@@ -66302,6 +66350,33 @@ class DataDeclarationGenerationContext {
66302
66350
  }
66303
66351
  return [result];
66304
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
+
66305
66380
  /* eslint-enable @typescript-eslint/no-unsafe-argument */
66306
66381
  return undefined;
66307
66382
  };
@@ -66385,8 +66460,8 @@ class DataDeclarationGenerationContext {
66385
66460
  disabled
66386
66461
  }) {
66387
66462
  const declEntry = {};
66388
- if (optional) {
66389
- declEntry.optional = [true];
66463
+ if (optional != undefined) {
66464
+ declEntry.optional = [optional];
66390
66465
  }
66391
66466
  if (disabled) {
66392
66467
  declEntry.disabled = [true];
@@ -66549,8 +66624,10 @@ __webpack_require__.r(__webpack_exports__);
66549
66624
 
66550
66625
 
66551
66626
  class DataDeclarationGenerationTimeHelper {
66552
- constructor(dataDeclaration) {
66627
+ constructor(dataDeclaration, formSchemaRng) {
66553
66628
  this.dataDeclaration = void 0;
66629
+ this.formSchemaRng = void 0;
66630
+ this.formSchemaRng = formSchemaRng;
66554
66631
  this.dataDeclaration = dataDeclaration;
66555
66632
  }
66556
66633
  isErrorsAndWarningsCountRequired(targetPath) {
@@ -66587,6 +66664,13 @@ class DataDeclarationGenerationTimeHelper {
66587
66664
  const optionalValue = (_this$getDataDeclarat5 = this.getDataDeclarationEntry(targetPath)) === null || _this$getDataDeclarat5 === void 0 ? void 0 : _this$getDataDeclarat5.optional;
66588
66665
  return (_optionalValue$ = optionalValue === null || optionalValue === void 0 ? void 0 : optionalValue[0]) !== null && _optionalValue$ !== void 0 ? _optionalValue$ : false;
66589
66666
  }
66667
+ isNodeOptionalBySchemaOrSugar(targetPath) {
66668
+ var _this$getDataDeclarat6, _this$formSchemaRng$g, _this$formSchemaRng;
66669
+ const optionalValue = (_this$getDataDeclarat6 = this.getDataDeclarationEntry(targetPath)) === null || _this$getDataDeclarat6 === void 0 ? void 0 : _this$getDataDeclarat6.optional;
66670
+ const optionalBySugar = optionalValue === null || optionalValue === void 0 ? void 0 : optionalValue[0];
66671
+ const optionalBySchema = (_this$formSchemaRng$g = (_this$formSchemaRng = this.formSchemaRng) === null || _this$formSchemaRng === void 0 || (_this$formSchemaRng = _this$formSchemaRng.getElementByPath(targetPath)) === null || _this$formSchemaRng === void 0 ? void 0 : _this$formSchemaRng.isOptional()) !== null && _this$formSchemaRng$g !== void 0 ? _this$formSchemaRng$g : false;
66672
+ return optionalBySugar == undefined ? optionalBySchema : optionalBySugar;
66673
+ }
66590
66674
  getDataDeclarationEntry(targetPath) {
66591
66675
  return this.dataDeclaration[(0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.convertToLegacyPath)(targetPath)];
66592
66676
  }
@@ -66717,6 +66801,9 @@ class DataDeclarationGenerator {
66717
66801
  if (entry instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_6__.FormSchemaRngElement && entry.errorAndWarningCountRequired != undefined) {
66718
66802
  declarationEntry.errorAndWarningCountRequired = [entry.errorAndWarningCountRequired];
66719
66803
  }
66804
+ if (entry instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_6__.FormSchemaRngElement && entry.useServerFilters != undefined) {
66805
+ declarationEntry.useServerFilters = entry.useServerFilters;
66806
+ }
66720
66807
  if (entry.disableValueAutoInit != undefined) {
66721
66808
  declarationEntry.disableValueAutoInit = entry.disableValueAutoInit;
66722
66809
  }
@@ -66786,6 +66873,8 @@ __webpack_require__.r(__webpack_exports__);
66786
66873
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
66787
66874
  /* harmony export */ DataDeclarationInitSourceSequenceFactory: () => (/* binding */ DataDeclarationInitSourceSequenceFactory)
66788
66875
  /* harmony export */ });
66876
+ /* harmony import */ var _DataDeclaration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
66877
+
66789
66878
  class DataDeclarationInitSourceSequenceFactory {
66790
66879
  constructor(fetchFunctions) {
66791
66880
  this.fetchFunctions = void 0;
@@ -66795,13 +66884,13 @@ class DataDeclarationInitSourceSequenceFactory {
66795
66884
  var _ref3;
66796
66885
  if (node.settings) {
66797
66886
  var _ref;
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 : "")];
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);
66799
66888
  }
66800
66889
  if (disabled) {
66801
66890
  var _ref2;
66802
- 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);
66803
66892
  }
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 : "")];
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);
66805
66894
  }
66806
66895
  takeFromFetchFunctionOrDefault(fetchFnName, fieldName, defaultValue) {
66807
66896
  return [...this.takeFromFetchFunction(fetchFnName, fieldName), ...this.setValueUnconditionally(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "")];
@@ -66844,6 +66933,13 @@ class DataDeclarationInitSourceSequenceFactory {
66844
66933
  }
66845
66934
  return [];
66846
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
+ }
66847
66943
  }
66848
66944
 
66849
66945
  /***/ }),
@@ -68390,7 +68486,9 @@ class LazyLoadDeclarationGenerator {
68390
68486
  }
68391
68487
  }
68392
68488
  *processElement(path, element) {
68393
- if (element.lazyLoadMode != undefined) {
68489
+ var _element$useServerFil;
68490
+ const useServerFilters = (_element$useServerFil = element.useServerFilters) !== null && _element$useServerFil !== void 0 ? _element$useServerFil : false;
68491
+ if (element.lazyLoadMode != undefined && (!useServerFilters || element.lazyLoadMode === "deferred")) {
68394
68492
  const adjustedPath = this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name));
68395
68493
  const currentPaths = element.multiple ? [element.lazyLoadMode === "deferred" ? adjustedPath : adjustedPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each)] : [adjustedPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each), this.formSchemaRng.adjustPathMultiplicity(path).joinWith(element.name + ".value")];
68396
68494
  const items = currentPaths.map(currentPath => {
@@ -68411,45 +68509,51 @@ class LazyLoadDeclarationGenerator {
68411
68509
  lazyLoadMode: "initial"
68412
68510
  }));
68413
68511
  yield* additionalItems;
68414
- yield {
68415
- path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name).joinWith(".errorsCount")),
68416
- lazyLoadMode: "initial"
68417
- };
68418
- yield {
68419
- path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name).joinWith(".warningsCount")),
68420
- lazyLoadMode: "initial"
68421
- };
68512
+ if (!useServerFilters) {
68513
+ yield {
68514
+ path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name).joinWith(".errorsCount")),
68515
+ lazyLoadMode: "initial"
68516
+ };
68517
+ yield {
68518
+ path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name).joinWith(".warningsCount")),
68519
+ lazyLoadMode: "initial"
68520
+ };
68521
+ }
68422
68522
  } else {
68423
- yield {
68424
- path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name + ".errorsCount")),
68425
- lazyLoadMode: "request"
68426
- };
68427
- yield {
68428
- path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name + ".warningsCount")),
68429
- lazyLoadMode: "request"
68430
- };
68523
+ if (!useServerFilters) {
68524
+ yield {
68525
+ path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name + ".errorsCount")),
68526
+ lazyLoadMode: "request"
68527
+ };
68528
+ yield {
68529
+ path: this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name + ".warningsCount")),
68530
+ lazyLoadMode: "request"
68531
+ };
68532
+ }
68431
68533
  }
68432
68534
  }
68433
- for (const attr of element.attributes.values()) {
68434
- if (attr.lazyLoadMode != undefined) {
68435
- const currentPath = path.joinWith(element.name, attr.name + ".value");
68436
- yield {
68437
- path: this.formSchemaRng.adjustPathMultiplicity(currentPath),
68438
- lazyLoadMode: attr.lazyLoadMode
68439
- };
68440
- }
68441
- if (attr.lazyLoadMode != undefined && attr.lazyLoadAggregations) {
68442
- const baseAggregationPath = this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name)).trimLastStarIfLastToken().joinWith(attr.name);
68443
- const sumPath = baseAggregationPath.joinWith("Sum.value");
68444
- yield {
68445
- path: sumPath,
68446
- lazyLoadMode: "initial"
68447
- };
68448
- const countPath = baseAggregationPath.joinWith("Count.value");
68449
- yield {
68450
- path: countPath,
68451
- lazyLoadMode: "initial"
68452
- };
68535
+ if (!useServerFilters) {
68536
+ for (const attr of element.attributes.values()) {
68537
+ if (attr.lazyLoadMode != undefined) {
68538
+ const currentPath = path.joinWith(element.name, attr.name + ".value");
68539
+ yield {
68540
+ path: this.formSchemaRng.adjustPathMultiplicity(currentPath),
68541
+ lazyLoadMode: attr.lazyLoadMode
68542
+ };
68543
+ }
68544
+ if (attr.lazyLoadMode != undefined && attr.lazyLoadAggregations) {
68545
+ const baseAggregationPath = this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name)).trimLastStarIfLastToken().joinWith(attr.name);
68546
+ const sumPath = baseAggregationPath.joinWith("Sum.value");
68547
+ yield {
68548
+ path: sumPath,
68549
+ lazyLoadMode: "initial"
68550
+ };
68551
+ const countPath = baseAggregationPath.joinWith("Count.value");
68552
+ yield {
68553
+ path: countPath,
68554
+ lazyLoadMode: "initial"
68555
+ };
68556
+ }
68453
68557
  }
68454
68558
  }
68455
68559
  const nextPath = path.joinWith(element.name);
@@ -68612,7 +68716,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
68612
68716
  dataDeclarationContent,
68613
68717
  dataDeclaration
68614
68718
  } = dataDeclarationGenerator.generate();
68615
- const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_26__.DataDeclarationGenerationTimeHelper(dataDeclaration);
68719
+ const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_26__.DataDeclarationGenerationTimeHelper(dataDeclaration, formSchemaRng);
68616
68720
  const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_16__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, useSchemaValidations, additionalContent.validationsContent, additionalContent.formJsonSettings);
68617
68721
  const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
68618
68722
  const lazyLoadGeneratorResult = lazyLoadGenerator.generate();
@@ -69577,7 +69681,12 @@ class FLangValidationBuildContext {
69577
69681
  }
69578
69682
  const typeNodePatterns = (_typeNode$children$fi2 = typeNode === null || typeNode === void 0 || (_typeNode$children8 = typeNode.children) === null || _typeNode$children8 === void 0 ? void 0 : _typeNode$children8.filter((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_0__.PatternTypeCheckNode)).map(x => x.value).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined)) !== null && _typeNode$children$fi2 !== void 0 ? _typeNode$children$fi2 : [];
69579
69683
  const stringPatterns = ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(typeNodePatterns) ? typeNodePatterns : (_schemaTypeNode$patte = schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.patterns) !== null && _schemaTypeNode$patte !== void 0 ? _schemaTypeNode$patte : []).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined);
69580
- const patterns = stringPatterns.map(pattern => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.StringLiteralExpression(pattern))).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.OrBinaryExpression(acc, current) : current, undefined);
69684
+ const patterns = stringPatterns.map(pattern => {
69685
+ if (pattern.startsWith("^") || pattern.endsWith("$")) {
69686
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.StringLiteralExpression(pattern));
69687
+ }
69688
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.StringLiteralExpression(`^${pattern}$`));
69689
+ }).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.OrBinaryExpression(acc, current) : current, undefined);
69581
69690
  if (patterns != undefined) {
69582
69691
  const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_14__.NegateUnaryExpression(patterns);
69583
69692
  yield {
@@ -71118,12 +71227,14 @@ class GetOldExpression extends FLangExpression {
71118
71227
  }
71119
71228
  class FLangStatement extends FLangNode {}
71120
71229
  class SetStatement extends FLangStatement {
71121
- constructor(left, right) {
71230
+ constructor(left, right, sequenceType) {
71122
71231
  super();
71123
71232
  this.left = void 0;
71124
71233
  this.right = void 0;
71234
+ this.sequenceType = void 0;
71125
71235
  this.right = right;
71126
71236
  this.left = left;
71237
+ this.sequenceType = sequenceType;
71127
71238
  }
71128
71239
  *getChildNodes() {
71129
71240
  yield this.left;
@@ -71161,6 +71272,7 @@ __webpack_require__.r(__webpack_exports__);
71161
71272
  /* harmony export */ ensureOperandsOfTypeOrNull: () => (/* binding */ ensureOperandsOfTypeOrNull),
71162
71273
  /* harmony export */ extractValueReferenceFromCast: () => (/* binding */ extractValueReferenceFromCast),
71163
71274
  /* harmony export */ getAllExpressionChildren: () => (/* binding */ getAllExpressionChildren),
71275
+ /* harmony export */ getSelectorIdFromRule: () => (/* binding */ getSelectorIdFromRule),
71164
71276
  /* harmony export */ hashSetFieldNameSuffix: () => (/* binding */ hashSetFieldNameSuffix),
71165
71277
  /* harmony export */ makeGetOld: () => (/* binding */ makeGetOld),
71166
71278
  /* harmony export */ makeNoDeps: () => (/* binding */ makeNoDeps),
@@ -71175,7 +71287,11 @@ __webpack_require__.r(__webpack_exports__);
71175
71287
  /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
71176
71288
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
71177
71289
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
71178
- /* harmony import */ var _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
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
+
71179
71295
 
71180
71296
 
71181
71297
 
@@ -71194,135 +71310,183 @@ function* getAllExpressionChildren(node, descendantsFilter) {
71194
71310
  }
71195
71311
  }
71196
71312
  function createValueRuleWithDisableValueAutoInitCheck(path, originalExpression) {
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));
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));
71198
71314
  }
71199
71315
  function wrapWithDisableValueAutoInitFlagCheckIfRequired(formSchemaRng, x) {
71200
71316
  var _formSchemaRng$getEle;
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];
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];
71202
71318
  }
71203
71319
  function wrapWithArgumentsCondition(expression) {
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);
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);
71206
71322
  const uniquePaths = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.distinctBy(allValueRefNodes, x => x.convertToString());
71207
71323
  const conditionExpression = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.reduce(uniquePaths, (acc, curr) => {
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;
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;
71210
71326
  }, undefined);
71211
71327
  if (conditionExpression == undefined) {
71212
71328
  return expression;
71213
71329
  }
71214
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullLiteralExpression());
71330
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ConditionalExpression(conditionExpression, expression, new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullLiteralExpression());
71215
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
+ };
71216
71380
  function combineRulesWithOptionalSectionChecking(allRules, optionalSectionRulesBuilder) {
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());
71381
+ const allUniqueRules = mergeRules(allRules);
71218
71382
  const allUniqueRulesWithOptionalChecks = Iterator.from(optionalSectionRulesBuilder.wrapRulesWithOptionalPageCheck(allUniqueRules)).map(x => x.convertToString()).reduce((x, y) => x + (x ? "\n" : "") + y, "");
71219
71383
  return allUniqueRulesWithOptionalChecks;
71220
71384
  }
71221
71385
  function tryExtractValueReferenceAsStringFromDecimal(expression) {
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) {
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) {
71223
71387
  return expression.targetExpression;
71224
71388
  }
71225
71389
  return expression;
71226
71390
  }
71227
71391
  function castFinalExpressionToStringIfNeed(operandExpression, enableTypedExpression, decimalFormat = "G29") {
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)) {
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)) {
71229
71393
  return operandExpression;
71230
71394
  }
71231
71395
  return castOperandToStringIfNeed(operandExpression, decimalFormat);
71232
71396
  }
71233
71397
  function castOperandToStringIfNeed(operandExpression, decimalFormat = "G29") {
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"));
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"));
71236
71400
  }
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);
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);
71239
71403
  }
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;
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;
71241
71405
  }
71242
71406
  function castOperandIfNeed(operandExpression, type) {
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;
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;
71245
71409
  }
71246
71410
  return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid type for cast: ${type}`);
71247
71411
  }
71248
71412
  function castOperandToBoolIfNeed(operandExpression) {
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;
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;
71250
71414
  }
71251
71415
  function castOperandToDecimalIfNeed(operandExpression, defaultValue) {
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;
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;
71253
71417
  }
71254
71418
  const decimalWrapper = (ex, needWrapped) => needWrapped ? castOperandToDecimalIfNeed(ex) : ex;
71255
71419
  function castOperandToDateTimeIfNeed(operandExpression) {
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;
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;
71257
71421
  }
71258
71422
  function nullCoalesceWithTypeCheck(argument, replacement) {
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;
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;
71260
71424
  if (!isValid) {
71261
71425
  throw new Error("Couldn't build null coalesce expression: types not match");
71262
71426
  }
71263
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NullCoalesceExpression(argument, replacement);
71427
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NullCoalesceExpression(argument, replacement);
71264
71428
  }
71265
71429
  function ensureOperandsOfTypeOrNull(type, ...operands) {
71266
71430
  for (const operand of operands) {
71267
71431
  const operandType = operand.getType();
71268
- if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.null && operandType !== type) {
71432
+ if (operandType !== _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.null && operandType !== type) {
71269
71433
  throw new Error(`Invalid operand type: required [${type}] but got ${operandType}`);
71270
71434
  }
71271
71435
  }
71272
71436
  }
71273
71437
  function combineByOrFlangExpr(acc, current) {
71274
- return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.OrBinaryExpression(acc, current) : current;
71438
+ return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.OrBinaryExpression(acc, current) : current;
71275
71439
  }
71276
71440
  function combineByAndFlangExpr(acc, current) {
71277
- return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.AndBinaryExpression(acc, current) : current;
71441
+ return acc != undefined ? new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.AndBinaryExpression(acc, current) : current;
71278
71442
  }
71279
71443
  function makeNoDeps(expression) {
71280
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
71281
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression(expression);
71444
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
71445
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression(expression);
71282
71446
  }
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);
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);
71285
71449
  }
71286
71450
  return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid NoDeps usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
71287
71451
  }
71288
71452
  function makeGetOld(expression) {
71289
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
71290
- return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.GetOldExpression(expression);
71453
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
71454
+ return new _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.GetOldExpression(expression);
71291
71455
  }
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);
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);
71294
71458
  }
71295
71459
  return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Invalid GetOld usage: argument must be native ValueReferenceExpression or wrapped to CastExpression!`);
71296
71460
  }
71297
71461
  function makeStringValueReference(modePath, valueName) {
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);
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);
71299
71463
  }
71300
71464
  function extractValueReferenceFromCast(expression) {
71301
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
71465
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
71302
71466
  return expression;
71303
71467
  }
71304
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.ValueReferenceExpression) {
71468
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.ValueReferenceExpression) {
71305
71469
  return expression.targetExpression;
71306
71470
  }
71307
- if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.NoDepsExpression) {
71471
+ if (expression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.CastExpression && expression.targetExpression instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.NoDepsExpression) {
71308
71472
  return expression.targetExpression;
71309
71473
  }
71310
71474
  return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Cannot extract ValueReferenceExpression! ${(0,util__WEBPACK_IMPORTED_MODULE_0__.inspect)(expression)}`);
71311
71475
  }
71312
71476
  function ensureCorrectFieldNameByExpressionType(statement) {
71313
- if (statement instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.SetStatement) {
71477
+ if (statement instanceof _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.SetStatement) {
71314
71478
  const lastPart = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.last(statement.left.modePath.getPathParts());
71315
71479
  const lastStringPart = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.isSimpleToken(lastPart) ? lastPart : "";
71316
- if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.dict && !lastStringPart.endsWith(dictFieldNameSuffix)) {
71480
+ if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.dict && !lastStringPart.endsWith(dictFieldNameSuffix)) {
71317
71481
  throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${dictFieldNameSuffix}"`);
71318
71482
  }
71319
- if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.hashSet && !lastStringPart.endsWith(hashSetFieldNameSuffix)) {
71483
+ if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.hashSet && !lastStringPart.endsWith(hashSetFieldNameSuffix)) {
71320
71484
  throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${hashSetFieldNameSuffix}"`);
71321
71485
  }
71322
- if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
71486
+ if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.array && !lastStringPart.endsWith(arrayFieldNameSuffix)) {
71323
71487
  throw new Error(`Suffix of path ${statement.left.modePath.toString()} must be "${arrayFieldNameSuffix}"`);
71324
71488
  }
71325
- if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_4__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
71489
+ if (statement.right.getType() === _FLangCodeDom__WEBPACK_IMPORTED_MODULE_6__.BuildInTypeExpression.string && (lastStringPart.endsWith(arrayFieldNameSuffix) || lastStringPart.endsWith(hashSetFieldNameSuffix) || lastStringPart.endsWith(dictFieldNameSuffix))) {
71326
71490
  throw new Error(`Suffix of path ${statement.left.modePath.toString()} must NOT be "${arrayFieldNameSuffix}", "${hashSetFieldNameSuffix}" or "${dictFieldNameSuffix}"`);
71327
71491
  }
71328
71492
  }
@@ -72531,7 +72695,13 @@ class FormulaRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_6__.
72531
72695
  return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), getFormulaExpression("value"));
72532
72696
  }
72533
72697
  createValueRuleForAutoField(fullTarget, defaultValue, getFormulaExpression) {
72534
- return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), getFormulaExpression("value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))));
72698
+ const valueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget, "value");
72699
+ const valueRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value");
72700
+ const autoFlagRefCurrentIteration = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "autoFlag");
72701
+ const isRequiredField = !this.dataDeclarationHelper.isNodeOptionalBySchemaOrSugar(fullTarget);
72702
+ const autoFlagIsTrueCondition = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(fullTarget.toCurrentIteration(), "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"));
72703
+ const combinedCondition = isRequiredField ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.OrBinaryExpression(autoFlagIsTrueCondition, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)(valueRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)(autoFlagRefCurrentIteration), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()))) : autoFlagIsTrueCondition;
72704
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(valueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(combinedCondition, getFormulaExpression("value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(fullTarget.toCurrentIteration(), "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))));
72535
72705
  }
72536
72706
  adjustPathMultiplicity(path) {
72537
72707
  return (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_2__.adjustPathMultiplicityComplex)(path, this.formSchemaRng, this.dataDeclarationHelper);
@@ -98173,8 +98343,10 @@ __webpack_require__.r(__webpack_exports__);
98173
98343
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
98174
98344
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
98175
98345
  /* harmony import */ var _ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
98176
- /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
98177
- /* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
98346
+ /* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
98347
+ /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
98348
+ /* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
98349
+
98178
98350
 
98179
98351
 
98180
98352
 
@@ -98197,7 +98369,7 @@ class FLangNormalizationRulesBuilder {
98197
98369
  this.controlCustomizationContext = controlCustomizationContext;
98198
98370
  }
98199
98371
  *childrenInitializer(node, optional, defaultChildren) {
98200
- 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);
98372
+ 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);
98201
98373
  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"))));
98202
98374
  }
98203
98375
  *childrenInitializerForPicklist(node, optional, defaultChildren) {
@@ -98206,36 +98378,34 @@ class FLangNormalizationRulesBuilder {
98206
98378
  }
98207
98379
  valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix) {
98208
98380
  var _dataBinding$defaultV;
98209
- 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)());
98381
+ 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)());
98210
98382
  const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
98211
98383
  const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
98212
98384
  const defaultValue = (_dataBinding$defaultV = dataBinding.defaultValue) !== null && _dataBinding$defaultV !== void 0 ? _dataBinding$defaultV : "";
98385
+ 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;
98213
98386
  if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
98214
98387
  try {
98215
98388
  var _this$fetchFunctions$, _this$fetchFunctions$2;
98216
98389
  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)();
98217
98390
  const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
98218
- 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))));
98391
+ 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);
98219
98392
  } catch (e) {
98220
98393
  // eslint-disable-next-line no-console
98221
98394
  console.error(`fetchfn = "${dataBinding.fetchfn}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
98222
98395
  // eslint-disable-next-line no-console
98223
98396
  console.error(e instanceof Error ? e.message : e);
98224
- return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference);
98397
+ return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference, sourceSequenceType);
98225
98398
  }
98226
98399
  }
98227
98400
  let valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue);
98228
- if (dataBinding.settings) {
98229
- 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);
98230
- }
98231
- if (!disabled && !dataBinding.settings) {
98401
+ if (dataBinding.settings || !disabled && !dataBinding.settings) {
98232
98402
  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);
98233
98403
  }
98234
98404
  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;
98235
- return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression);
98405
+ return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression, sourceSequenceType);
98236
98406
  }
98237
98407
  *specialFieldsInitializer(node, options) {
98238
- 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)());
98408
+ 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)());
98239
98409
  if (options.disabled) {
98240
98410
  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"));
98241
98411
  }
@@ -98253,7 +98423,7 @@ class FLangNormalizationRulesBuilder {
98253
98423
  var _typeNode$base, _this$schemaRng$getTy;
98254
98424
  // eslint-disable-next-line
98255
98425
  const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
98256
- const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_5__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
98426
+ const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
98257
98427
  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;
98258
98428
  const sourceValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
98259
98429
  return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.69.0-markup-in-modalheader.0",
3
+ "version": "5.70.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,