@kontur.candy/generator 4.290.1 → 4.291.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 +122 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -122314,10 +122314,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
122314
122314
|
|
|
122315
122315
|
|
|
122316
122316
|
class FormSchemaRngAttribute {
|
|
122317
|
-
constructor(name, description, type, optional, nillable, parent, lazyLoadMode, lazyLoadAggregations) {
|
|
122317
|
+
constructor(name, description, type, optional, nillable, parent, lazyLoadMode, lazyLoadAggregations, disableValueAutoInit) {
|
|
122318
122318
|
this.name = void 0;
|
|
122319
122319
|
this.lazyLoadMode = void 0;
|
|
122320
122320
|
this.lazyLoadAggregations = void 0;
|
|
122321
|
+
this.disableValueAutoInit = void 0;
|
|
122321
122322
|
this.type = void 0;
|
|
122322
122323
|
this.description = void 0;
|
|
122323
122324
|
this.parent = void 0;
|
|
@@ -122331,6 +122332,7 @@ class FormSchemaRngAttribute {
|
|
|
122331
122332
|
this.parent = parent;
|
|
122332
122333
|
this.lazyLoadMode = lazyLoadMode;
|
|
122333
122334
|
this.lazyLoadAggregations = lazyLoadAggregations;
|
|
122335
|
+
this.disableValueAutoInit = disableValueAutoInit;
|
|
122334
122336
|
}
|
|
122335
122337
|
|
|
122336
122338
|
isOptionalOrNillable() {
|
|
@@ -122341,16 +122343,23 @@ class FormSchemaRngAttribute {
|
|
|
122341
122343
|
return this.isOptionalOrNillable();
|
|
122342
122344
|
}
|
|
122343
122345
|
|
|
122346
|
+
isIgnoreForcedValueSet() {
|
|
122347
|
+
var _this$disableValueAut;
|
|
122348
|
+
|
|
122349
|
+
return (_this$disableValueAut = this.disableValueAutoInit) !== null && _this$disableValueAut !== void 0 ? _this$disableValueAut : this.parent.isIgnoreForcedValueSet();
|
|
122350
|
+
}
|
|
122351
|
+
|
|
122344
122352
|
}
|
|
122345
122353
|
const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
|
|
122346
122354
|
class FormSchemaRngElement {
|
|
122347
|
-
constructor(name, parent, optional, multiple, nillable, maxOccurs, lazyLoadMode, lazyLoadAggregations, errorAndWarningCountRequired, lazyLoadingThreshold) {
|
|
122355
|
+
constructor(name, parent, optional, multiple, nillable, maxOccurs, lazyLoadMode, lazyLoadAggregations, errorAndWarningCountRequired, lazyLoadingThreshold, disableValueAutoInit) {
|
|
122348
122356
|
this.name = void 0;
|
|
122349
122357
|
this.multiple = void 0;
|
|
122350
122358
|
this.lazyLoadMode = void 0;
|
|
122351
122359
|
this.lazyLoadAggregations = void 0;
|
|
122352
122360
|
this.errorAndWarningCountRequired = void 0;
|
|
122353
122361
|
this.lazyLoadingThreshold = void 0;
|
|
122362
|
+
this.disableValueAutoInit = void 0;
|
|
122354
122363
|
this.innerTextType = void 0;
|
|
122355
122364
|
this.children = new Map();
|
|
122356
122365
|
this.maxOccurs = void 0;
|
|
@@ -122368,6 +122377,7 @@ class FormSchemaRngElement {
|
|
|
122368
122377
|
this.lazyLoadAggregations = lazyLoadAggregations;
|
|
122369
122378
|
this.errorAndWarningCountRequired = errorAndWarningCountRequired;
|
|
122370
122379
|
this.lazyLoadingThreshold = lazyLoadingThreshold;
|
|
122380
|
+
this.disableValueAutoInit = disableValueAutoInit;
|
|
122371
122381
|
}
|
|
122372
122382
|
|
|
122373
122383
|
addElement(element) {
|
|
@@ -122404,6 +122414,12 @@ class FormSchemaRngElement {
|
|
|
122404
122414
|
return this.attributes;
|
|
122405
122415
|
}
|
|
122406
122416
|
|
|
122417
|
+
isIgnoreForcedValueSet() {
|
|
122418
|
+
var _this$disableValueAut2;
|
|
122419
|
+
|
|
122420
|
+
return (_this$disableValueAut2 = this.disableValueAutoInit) !== null && _this$disableValueAut2 !== void 0 ? _this$disableValueAut2 : this.parent instanceof FormSchemaRngElement ? this.parent.isIgnoreForcedValueSet() : false;
|
|
122421
|
+
}
|
|
122422
|
+
|
|
122407
122423
|
}
|
|
122408
122424
|
class FormSchemaRng {
|
|
122409
122425
|
constructor(rootElement) {
|
|
@@ -122422,7 +122438,7 @@ class FormSchemaRng {
|
|
|
122422
122438
|
}
|
|
122423
122439
|
|
|
122424
122440
|
static convertSchemaRngElement(schemaRngElement, parent) {
|
|
122425
|
-
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple, schemaRngElement.nillable, schemaRngElement.maxOccurs, schemaRngElement.lazyLoadMode, schemaRngElement.lazyLoadAggregations, schemaRngElement.errorAndWarningCountRequired, schemaRngElement.lazyLoadingThreshold);
|
|
122441
|
+
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);
|
|
122426
122442
|
|
|
122427
122443
|
if (schemaRngElement.innerText != undefined) {
|
|
122428
122444
|
if (schemaRngElement.innerText.type != undefined) {
|
|
@@ -122497,7 +122513,7 @@ class FormSchemaRng {
|
|
|
122497
122513
|
}
|
|
122498
122514
|
|
|
122499
122515
|
static convertSchemaRngAttribute(attribute, parent) {
|
|
122500
|
-
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, attribute.nillable, parent, attribute.lazyLoadMode, attribute.lazyLoadAggregations);
|
|
122516
|
+
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, attribute.nillable, parent, attribute.lazyLoadMode, attribute.lazyLoadAggregations, attribute.disableValueAutoInit);
|
|
122501
122517
|
}
|
|
122502
122518
|
|
|
122503
122519
|
adjustPathMultiplicity(path) {
|
|
@@ -122813,7 +122829,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
122813
122829
|
|
|
122814
122830
|
|
|
122815
122831
|
|
|
122816
|
-
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class4, _class5, _descriptor2, _dec5, _dec6, _class7, _class8, _descriptor3, _dec7, _dec8, _class10, _class11, _descriptor4, _dec9, _dec10, _class13, _class14, _descriptor5, _dec11, _dec12, _class16, _class17, _descriptor6, _dec13, _dec14, _class19, _class20, _descriptor7, _dec15, _dec16, _class22, _class23, _descriptor8, _dec17, _dec18, _class25, _class26, _descriptor9, _dec19, _dec20, _class28, _class29, _descriptor10, _dec21, _dec22, _dec23, _dec24, _dec25, _class31, _class32, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _class34, _class35, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21,
|
|
122832
|
+
var _dec, _dec2, _class, _class2, _descriptor, _dec3, _dec4, _class4, _class5, _descriptor2, _dec5, _dec6, _class7, _class8, _descriptor3, _dec7, _dec8, _class10, _class11, _descriptor4, _dec9, _dec10, _class13, _class14, _descriptor5, _dec11, _dec12, _class16, _class17, _descriptor6, _dec13, _dec14, _class19, _class20, _descriptor7, _dec15, _dec16, _class22, _class23, _descriptor8, _dec17, _dec18, _class25, _class26, _descriptor9, _dec19, _dec20, _class28, _class29, _descriptor10, _dec21, _dec22, _dec23, _dec24, _dec25, _class31, _class32, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _class34, _class35, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _dec35, _dec36, _class37, _class38, _descriptor23, _dec37, _dec38, _class40, _class41, _descriptor24, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _dec52, _dec53, _dec54, _class43, _class44, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39;
|
|
122817
122833
|
|
|
122818
122834
|
|
|
122819
122835
|
class SchemaRngTypeCheck extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {}
|
|
@@ -122981,7 +122997,8 @@ let SchemaRngType = (_dec21 = (0,_generators_markupGenerator_Serializer_SugarSer
|
|
|
122981
122997
|
writable: true,
|
|
122982
122998
|
initializer: null
|
|
122983
122999
|
})), _class32)) || _class31);
|
|
122984
|
-
let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("attribute", ``), _dec27 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec28 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec29 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec30 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("nillable", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec31 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec32 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadAggregations", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec33 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadMode", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType["enum"]("deferred", "initial", "request"), ``),
|
|
123000
|
+
let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("attribute", ``), _dec27 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec28 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec29 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec30 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("nillable", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec31 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec32 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadAggregations", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec33 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadMode", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType["enum"]("deferred", "initial", "request"), ``), _dec34 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disableValueAutoInit", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `В значениии true запрещает при кастомной нормализации перезаписывать значение value,
|
|
123001
|
+
полученное из ФНФа, даже если оно пустое`), _dec26(_class34 = (_class35 = class SchemaRngAttribute extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
122985
123002
|
constructor(...args) {
|
|
122986
123003
|
super(...args);
|
|
122987
123004
|
|
|
@@ -122998,6 +123015,8 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
122998
123015
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadAggregations", _descriptor20, this);
|
|
122999
123016
|
|
|
123000
123017
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadMode", _descriptor21, this);
|
|
123018
|
+
|
|
123019
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disableValueAutoInit", _descriptor22, this);
|
|
123001
123020
|
}
|
|
123002
123021
|
|
|
123003
123022
|
}, (_descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "name", [_dec27], {
|
|
@@ -123035,137 +123054,150 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
123035
123054
|
enumerable: true,
|
|
123036
123055
|
writable: true,
|
|
123037
123056
|
initializer: null
|
|
123057
|
+
}), _descriptor22 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "disableValueAutoInit", [_dec34], {
|
|
123058
|
+
configurable: true,
|
|
123059
|
+
enumerable: true,
|
|
123060
|
+
writable: true,
|
|
123061
|
+
initializer: null
|
|
123038
123062
|
})), _class35)) || _class34);
|
|
123039
|
-
let SchemaRngInnerText = (
|
|
123063
|
+
let SchemaRngInnerText = (_dec35 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("innertext", ``), _dec36 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec35(_class37 = (_class38 = class SchemaRngInnerText extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
123040
123064
|
constructor(...args) {
|
|
123041
123065
|
super(...args);
|
|
123042
123066
|
|
|
123043
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type",
|
|
123067
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type", _descriptor23, this);
|
|
123044
123068
|
}
|
|
123045
123069
|
|
|
123046
|
-
}, (
|
|
123070
|
+
}, (_descriptor23 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class38.prototype, "type", [_dec36], {
|
|
123047
123071
|
configurable: true,
|
|
123048
123072
|
enumerable: true,
|
|
123049
123073
|
writable: true,
|
|
123050
123074
|
initializer: null
|
|
123051
123075
|
})), _class38)) || _class37);
|
|
123052
|
-
let SchemaRngElementChoiceElement = (
|
|
123076
|
+
let SchemaRngElementChoiceElement = (_dec37 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("choice", ``), _dec38 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("element"), _dec37(_class40 = (_class41 = class SchemaRngElementChoiceElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
123053
123077
|
constructor(...args) {
|
|
123054
123078
|
super(...args);
|
|
123055
123079
|
|
|
123056
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children",
|
|
123080
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor24, this);
|
|
123057
123081
|
}
|
|
123058
123082
|
|
|
123059
|
-
}, (
|
|
123083
|
+
}, (_descriptor24 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class41.prototype, "children", [_dec38], {
|
|
123060
123084
|
configurable: true,
|
|
123061
123085
|
enumerable: true,
|
|
123062
123086
|
writable: true,
|
|
123063
123087
|
initializer: null
|
|
123064
123088
|
})), _class41)) || _class40);
|
|
123065
|
-
let SchemaRngElement = (
|
|
123089
|
+
let SchemaRngElement = (_dec39 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("element", ``), _dec40 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, ``), _dec41 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec42 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec43 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("nillable", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec44 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("multiple", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec45 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("maxOccurs", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, ``), _dec46 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("attribute", [SchemaRngAttribute]), _dec47 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("element"), _dec48 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("choice"), _dec49 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("innertext", [SchemaRngInnerText]), _dec50 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadAggregations", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `При частичной загрузке подгружать Sum, Count`), _dec51 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadMode", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType["enum"]("deferred", "initial", "request"), `
|
|
123066
123090
|
Режим частичной загрузки.
|
|
123067
123091
|
- deferred: ставится на коллекцию, которую хотим получать частями; например, в 6-НДФЛ при открытии одной справки, загрузятся все данные по ней
|
|
123068
123092
|
- initial: данные загружаются всегда; например, данные для фильтров
|
|
123069
123093
|
- request: загрузка по запросу с фронта; используется для постраничного отображения списков; например, видимые пользователю поля в таблице
|
|
123070
|
-
`),
|
|
123094
|
+
`), _dec52 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("errorAndWarningCountRequired", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Подсчет количества ошибок и предупреждений по элементу в множественности`), _dec53 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("lazyLoadingThreshold", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, `Количество элементов в множественности, начиная с которого включается частичная загрузка. Не поддерживается для вложенных множественностей, только для корневой с lazyLoadMode=deferred`), _dec54 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("disableValueAutoInit", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `В значениии true запрещает при кастомной нормализации перезаписывать значение value,
|
|
123095
|
+
полученное из ФУФа, даже если оно пустое`), _dec39(_class43 = (_class44 = class SchemaRngElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
123071
123096
|
constructor(...args) {
|
|
123072
123097
|
super(...args);
|
|
123073
123098
|
|
|
123074
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name",
|
|
123099
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor25, this);
|
|
123075
123100
|
|
|
123076
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description",
|
|
123101
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor26, this);
|
|
123077
123102
|
|
|
123078
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional",
|
|
123103
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor27, this);
|
|
123104
|
+
|
|
123105
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor28, this);
|
|
123079
123106
|
|
|
123080
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123107
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor29, this);
|
|
123081
123108
|
|
|
123082
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123109
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxOccurs", _descriptor30, this);
|
|
123083
123110
|
|
|
123084
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123111
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "attributes", _descriptor31, this);
|
|
123085
123112
|
|
|
123086
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123113
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor32, this);
|
|
123087
123114
|
|
|
123088
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123115
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "choices", _descriptor33, this);
|
|
123089
123116
|
|
|
123090
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123117
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "innerText", _descriptor34, this);
|
|
123091
123118
|
|
|
123092
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123119
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadAggregations", _descriptor35, this);
|
|
123093
123120
|
|
|
123094
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123121
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadMode", _descriptor36, this);
|
|
123095
123122
|
|
|
123096
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123123
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "errorAndWarningCountRequired", _descriptor37, this);
|
|
123097
123124
|
|
|
123098
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123125
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "lazyLoadingThreshold", _descriptor38, this);
|
|
123099
123126
|
|
|
123100
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
123127
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "disableValueAutoInit", _descriptor39, this);
|
|
123101
123128
|
}
|
|
123102
123129
|
|
|
123103
|
-
}, (
|
|
123130
|
+
}, (_descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "name", [_dec40], {
|
|
123104
123131
|
configurable: true,
|
|
123105
123132
|
enumerable: true,
|
|
123106
123133
|
writable: true,
|
|
123107
123134
|
initializer: null
|
|
123108
|
-
}),
|
|
123135
|
+
}), _descriptor26 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "description", [_dec41], {
|
|
123109
123136
|
configurable: true,
|
|
123110
123137
|
enumerable: true,
|
|
123111
123138
|
writable: true,
|
|
123112
123139
|
initializer: null
|
|
123113
|
-
}),
|
|
123140
|
+
}), _descriptor27 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "optional", [_dec42], {
|
|
123114
123141
|
configurable: true,
|
|
123115
123142
|
enumerable: true,
|
|
123116
123143
|
writable: true,
|
|
123117
123144
|
initializer: null
|
|
123118
|
-
}),
|
|
123145
|
+
}), _descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "nillable", [_dec43], {
|
|
123119
123146
|
configurable: true,
|
|
123120
123147
|
enumerable: true,
|
|
123121
123148
|
writable: true,
|
|
123122
123149
|
initializer: null
|
|
123123
|
-
}),
|
|
123150
|
+
}), _descriptor29 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "multiple", [_dec44], {
|
|
123124
123151
|
configurable: true,
|
|
123125
123152
|
enumerable: true,
|
|
123126
123153
|
writable: true,
|
|
123127
123154
|
initializer: null
|
|
123128
|
-
}),
|
|
123155
|
+
}), _descriptor30 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "maxOccurs", [_dec45], {
|
|
123129
123156
|
configurable: true,
|
|
123130
123157
|
enumerable: true,
|
|
123131
123158
|
writable: true,
|
|
123132
123159
|
initializer: null
|
|
123133
|
-
}),
|
|
123160
|
+
}), _descriptor31 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "attributes", [_dec46], {
|
|
123134
123161
|
configurable: true,
|
|
123135
123162
|
enumerable: true,
|
|
123136
123163
|
writable: true,
|
|
123137
123164
|
initializer: null
|
|
123138
|
-
}),
|
|
123165
|
+
}), _descriptor32 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "children", [_dec47], {
|
|
123139
123166
|
configurable: true,
|
|
123140
123167
|
enumerable: true,
|
|
123141
123168
|
writable: true,
|
|
123142
123169
|
initializer: null
|
|
123143
|
-
}),
|
|
123170
|
+
}), _descriptor33 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "choices", [_dec48], {
|
|
123144
123171
|
configurable: true,
|
|
123145
123172
|
enumerable: true,
|
|
123146
123173
|
writable: true,
|
|
123147
123174
|
initializer: null
|
|
123148
|
-
}),
|
|
123175
|
+
}), _descriptor34 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "innerText", [_dec49], {
|
|
123149
123176
|
configurable: true,
|
|
123150
123177
|
enumerable: true,
|
|
123151
123178
|
writable: true,
|
|
123152
123179
|
initializer: null
|
|
123153
|
-
}),
|
|
123180
|
+
}), _descriptor35 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "lazyLoadAggregations", [_dec50], {
|
|
123154
123181
|
configurable: true,
|
|
123155
123182
|
enumerable: true,
|
|
123156
123183
|
writable: true,
|
|
123157
123184
|
initializer: null
|
|
123158
|
-
}),
|
|
123185
|
+
}), _descriptor36 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "lazyLoadMode", [_dec51], {
|
|
123159
123186
|
configurable: true,
|
|
123160
123187
|
enumerable: true,
|
|
123161
123188
|
writable: true,
|
|
123162
123189
|
initializer: null
|
|
123163
|
-
}),
|
|
123190
|
+
}), _descriptor37 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "errorAndWarningCountRequired", [_dec52], {
|
|
123164
123191
|
configurable: true,
|
|
123165
123192
|
enumerable: true,
|
|
123166
123193
|
writable: true,
|
|
123167
123194
|
initializer: null
|
|
123168
|
-
}),
|
|
123195
|
+
}), _descriptor38 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "lazyLoadingThreshold", [_dec53], {
|
|
123196
|
+
configurable: true,
|
|
123197
|
+
enumerable: true,
|
|
123198
|
+
writable: true,
|
|
123199
|
+
initializer: null
|
|
123200
|
+
}), _descriptor39 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "disableValueAutoInit", [_dec54], {
|
|
123169
123201
|
configurable: true,
|
|
123170
123202
|
enumerable: true,
|
|
123171
123203
|
writable: true,
|
|
@@ -129752,17 +129784,24 @@ class DataDeclarationGenerator {
|
|
|
129752
129784
|
}
|
|
129753
129785
|
|
|
129754
129786
|
enrichWithSchemaRng(dataDeclaration) {
|
|
129755
|
-
const elementEntries = this.formSchemaRng.getAllChildren(this.formSchemaRng.getRootElement())
|
|
129787
|
+
const elementEntries = Iterator.from(this.formSchemaRng.getAllChildren(this.formSchemaRng.getRootElement())).map(x => ({
|
|
129756
129788
|
element: x,
|
|
129757
|
-
|
|
129789
|
+
legacyPath: this.formSchemaRng.getPath(x).trimLastStarIfLastToken().toLegacyPath()
|
|
129758
129790
|
}));
|
|
129759
129791
|
|
|
129760
|
-
for (const
|
|
129761
|
-
var _dataDeclaration$
|
|
129792
|
+
for (const item of elementEntries) {
|
|
129793
|
+
var _dataDeclaration$item;
|
|
129762
129794
|
|
|
129763
|
-
const
|
|
129764
|
-
const declarationEntry = (_dataDeclaration$
|
|
129765
|
-
|
|
129795
|
+
const entry = item.element;
|
|
129796
|
+
const declarationEntry = (_dataDeclaration$item = dataDeclaration[item.legacyPath]) !== null && _dataDeclaration$item !== void 0 ? _dataDeclaration$item : {};
|
|
129797
|
+
|
|
129798
|
+
if (entry instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_6__.FormSchemaRngElement && entry.errorAndWarningCountRequired != undefined) {
|
|
129799
|
+
declarationEntry.errorAndWarningCountRequired = [entry.errorAndWarningCountRequired];
|
|
129800
|
+
}
|
|
129801
|
+
|
|
129802
|
+
if (entry.disableValueAutoInit != undefined) {
|
|
129803
|
+
declarationEntry.disableValueAutoInit = entry.disableValueAutoInit;
|
|
129804
|
+
}
|
|
129766
129805
|
}
|
|
129767
129806
|
}
|
|
129768
129807
|
|
|
@@ -131573,9 +131612,9 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
131573
131612
|
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions);
|
|
131574
131613
|
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
131575
131614
|
const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_33__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
|
|
131576
|
-
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder);
|
|
131615
|
+
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng);
|
|
131577
131616
|
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter);
|
|
131578
|
-
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder);
|
|
131617
|
+
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng);
|
|
131579
131618
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_21__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
131580
131619
|
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali4 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali4 !== void 0 ? _sugarRoot$schemaVali4 : false);
|
|
131581
131620
|
markupGenerator.generate(sugarRoot, builder);
|
|
@@ -131596,7 +131635,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
131596
131635
|
content: (_additionalContent$fo5 = additionalContent.formJsonSettings) !== null && _additionalContent$fo5 !== void 0 && _additionalContent$fo5.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
|
|
131597
131636
|
}, {
|
|
131598
131637
|
normalizerId: "formulasWithInitializers",
|
|
131599
|
-
content: (_additionalContent$fo6 = additionalContent.formJsonSettings) !== null && _additionalContent$fo6 !== void 0 && _additionalContent$fo6.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.
|
|
131638
|
+
content: (_additionalContent$fo6 = additionalContent.formJsonSettings) !== null && _additionalContent$fo6 !== void 0 && _additionalContent$fo6.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.generateRules()
|
|
131600
131639
|
}].filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrEmpty)(x.content));
|
|
131601
131640
|
const additionalNormalizationRules = additionalContent.additionalNormalizers ? additionalContent.additionalNormalizers.map(additionalNormalizer => {
|
|
131602
131641
|
switch (additionalNormalizer.extension) {
|
|
@@ -133988,23 +134027,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133988
134027
|
|
|
133989
134028
|
|
|
133990
134029
|
class FormulaAndInitOnlyNormalizationRuleGenerator {
|
|
133991
|
-
constructor(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder) {
|
|
134030
|
+
constructor(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng) {
|
|
133992
134031
|
this.optionalSectionRuleBuilder = void 0;
|
|
133993
134032
|
this.formulaRulesBuilder = void 0;
|
|
134033
|
+
this.formSchemaRng = void 0;
|
|
133994
134034
|
this.sugarRulesBuilder = void 0;
|
|
134035
|
+
this.formSchemaRng = formSchemaRng;
|
|
133995
134036
|
this.sugarRulesBuilder = sugarRulesBuilder;
|
|
133996
134037
|
this.formulaRulesBuilder = formulaRulesBuilder;
|
|
133997
134038
|
this.optionalSectionRuleBuilder = optionalSectionRuleBuilder;
|
|
133998
134039
|
}
|
|
133999
134040
|
|
|
134000
|
-
|
|
134041
|
+
generateRules() {
|
|
134001
134042
|
const createValueRuleFromAutoValueRule = autoValueRule => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(autoValueRule.left.modePath.toCurrentIteration(), "value")), autoValueRule.right));
|
|
134002
134043
|
|
|
134044
|
+
const createValueRuleEmptyRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path.toCurrentIteration(), "value")));
|
|
134045
|
+
|
|
134046
|
+
const createDisableValueAutoInitRule = path => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(path, "disableValueAutoInit"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("true"));
|
|
134047
|
+
|
|
134048
|
+
const ignoredValueSetRuleMapper = x => {
|
|
134049
|
+
var _this$formSchemaRng$g;
|
|
134050
|
+
|
|
134051
|
+
return x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && x.left.valueName === "value" && (_this$formSchemaRng$g = this.formSchemaRng.getElementByPath(x.left.modePath)) !== null && _this$formSchemaRng$g !== void 0 && _this$formSchemaRng$g.isIgnoreForcedValueSet() ? [createValueRuleEmptyRule(x.left.modePath), createDisableValueAutoInitRule(x.left.modePath)] : [x];
|
|
134052
|
+
};
|
|
134053
|
+
|
|
134003
134054
|
const allFormulaRules = this.formulaRulesBuilder.buildRules();
|
|
134004
134055
|
const updatedFormulaRules = Iterator.from(allFormulaRules).flatMap(x => x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && x.left.valueName === "autoValue" ? [x, createValueRuleFromAutoValueRule(x)] : [x]);
|
|
134005
134056
|
const sugarRules = this.sugarRulesBuilder.buildRules();
|
|
134006
134057
|
const optionalSectionRules = this.optionalSectionRuleBuilder.buildRules();
|
|
134007
|
-
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(updatedFormulaRules, sugarRules, optionalSectionRules);
|
|
134058
|
+
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(updatedFormulaRules, sugarRules, optionalSectionRules).flatMap(ignoredValueSetRuleMapper);
|
|
134008
134059
|
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_2__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRuleBuilder);
|
|
134009
134060
|
}
|
|
134010
134061
|
|
|
@@ -134477,22 +134528,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134477
134528
|
/* harmony export */ });
|
|
134478
134529
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
134479
134530
|
/* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
|
|
134531
|
+
/* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
|
|
134532
|
+
|
|
134480
134533
|
|
|
134481
134534
|
|
|
134482
134535
|
class NormalizationRulesGenerator {
|
|
134483
|
-
constructor(optionalSectionRulesBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder) {
|
|
134536
|
+
constructor(optionalSectionRulesBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng) {
|
|
134484
134537
|
this.formulaRulesBuilder = void 0;
|
|
134485
134538
|
this.initializationRulesBuilder = void 0;
|
|
134486
134539
|
this.sugarRulesBuilder = void 0;
|
|
134487
134540
|
this.lazyLoadingRulesBuilder = void 0;
|
|
134488
134541
|
this.validationRulesBuilder = void 0;
|
|
134489
134542
|
this.optionalSectionRulesBuilder = void 0;
|
|
134543
|
+
this.formSchemaRng = void 0;
|
|
134490
134544
|
this.formulaRulesBuilder = formulaRulesBuilder;
|
|
134491
134545
|
this.initializationRulesBuilder = initializationRulesBuilder;
|
|
134492
134546
|
this.sugarRulesBuilder = sugarRulesBuilder;
|
|
134493
134547
|
this.lazyLoadingRulesBuilder = lazyLoadingRulesBuilder;
|
|
134494
134548
|
this.validationRulesBuilder = validationRulesBuilder;
|
|
134495
134549
|
this.optionalSectionRulesBuilder = optionalSectionRulesBuilder;
|
|
134550
|
+
this.formSchemaRng = formSchemaRng;
|
|
134496
134551
|
}
|
|
134497
134552
|
|
|
134498
134553
|
generateRules() {
|
|
@@ -134501,9 +134556,18 @@ class NormalizationRulesGenerator {
|
|
|
134501
134556
|
const formulaFLangRules = this.formulaRulesBuilder.buildRules();
|
|
134502
134557
|
const optionalSectionRules = this.optionalSectionRulesBuilder.buildRules();
|
|
134503
134558
|
const sugarValidationRules = this.validationRulesBuilder.buildRules();
|
|
134504
|
-
const dataDeclarationRules = this.sugarRulesBuilder.buildRules();
|
|
134559
|
+
const dataDeclarationRules = this.sugarRulesBuilder.buildRules();
|
|
134560
|
+
|
|
134561
|
+
const createValueRuleWithDisableValueAutoInitCheck = (path, originalExpression) => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path, "value"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path.toCurrentIteration(), "disableValueAutoInit"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.StringLiteralExpression("true")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.NoDepsExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.ValueReferenceExpression(path.toCurrentIteration(), "value")), originalExpression));
|
|
134562
|
+
|
|
134563
|
+
const ignoredValueSetRuleMapper = x => {
|
|
134564
|
+
var _this$formSchemaRng$g;
|
|
134565
|
+
|
|
134566
|
+
return x instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_2__.SetStatement && x.left.valueName === "value" && (_this$formSchemaRng$g = this.formSchemaRng.getElementByPath(x.left.modePath)) !== null && _this$formSchemaRng$g !== void 0 && _this$formSchemaRng$g.isIgnoreForcedValueSet() ? [createValueRuleWithDisableValueAutoInitCheck(x.left.modePath, x.right)] : [x];
|
|
134567
|
+
}; // Порядок важен, т.к. потом делаем distinctBy.
|
|
134568
|
+
|
|
134505
134569
|
|
|
134506
|
-
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules);
|
|
134570
|
+
const allRules = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.concat(initializeRules, lazyLoadingRules, formulaFLangRules, optionalSectionRules, dataDeclarationRules, sugarValidationRules).flatMap(ignoredValueSetRuleMapper);
|
|
134507
134571
|
return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_1__.combineRulesWithOptionalSectionChecking)(allRules, this.optionalSectionRulesBuilder);
|
|
134508
134572
|
}
|
|
134509
134573
|
|