@kontur.candy/generator 4.247.0-nightly.73h41 → 4.247.2
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 +359 -319
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111822,6 +111822,23 @@ class IterUtils {
|
|
|
111822
111822
|
return true;
|
|
111823
111823
|
}
|
|
111824
111824
|
|
|
111825
|
+
static groupBy(iterable, selectKey) {
|
|
111826
|
+
const result = new Map();
|
|
111827
|
+
|
|
111828
|
+
for (const item of iterable) {
|
|
111829
|
+
const key = selectKey(item);
|
|
111830
|
+
const keyList = result.get(key);
|
|
111831
|
+
|
|
111832
|
+
if (keyList == undefined) {
|
|
111833
|
+
result.set(key, [item]);
|
|
111834
|
+
} else {
|
|
111835
|
+
keyList.push(item);
|
|
111836
|
+
}
|
|
111837
|
+
}
|
|
111838
|
+
|
|
111839
|
+
return result;
|
|
111840
|
+
}
|
|
111841
|
+
|
|
111825
111842
|
static sortBy(items, selector) {
|
|
111826
111843
|
const result = [...items];
|
|
111827
111844
|
result.sort((aItem, bItem) => {
|
|
@@ -120848,34 +120865,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
120848
120865
|
|
|
120849
120866
|
|
|
120850
120867
|
class FormSchemaRngAttribute {
|
|
120851
|
-
constructor(name, description, type, optional, parent) {
|
|
120868
|
+
constructor(name, description, type, optional, nillable, parent) {
|
|
120852
120869
|
this.name = void 0;
|
|
120853
|
-
this.optional = void 0;
|
|
120854
120870
|
this.type = void 0;
|
|
120855
120871
|
this.description = void 0;
|
|
120856
120872
|
this.parent = void 0;
|
|
120873
|
+
this.optional = void 0;
|
|
120874
|
+
this.nillable = void 0;
|
|
120857
120875
|
this.description = description;
|
|
120858
120876
|
this.optional = optional;
|
|
120877
|
+
this.nillable = nillable;
|
|
120859
120878
|
this.type = type;
|
|
120860
120879
|
this.name = name;
|
|
120861
120880
|
this.parent = parent;
|
|
120862
120881
|
}
|
|
120863
120882
|
|
|
120883
|
+
isOptionalOrNillable() {
|
|
120884
|
+
return this.optional || this.nillable || false;
|
|
120885
|
+
}
|
|
120886
|
+
|
|
120864
120887
|
}
|
|
120865
120888
|
const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
|
|
120866
120889
|
class FormSchemaRngElement {
|
|
120867
|
-
constructor(name, parent, optional, multiple) {
|
|
120890
|
+
constructor(name, parent, optional, multiple, nillable) {
|
|
120868
120891
|
this.name = void 0;
|
|
120869
|
-
this.optional = void 0;
|
|
120870
120892
|
this.multiple = void 0;
|
|
120871
120893
|
this.innerTextType = void 0;
|
|
120872
120894
|
this.children = new Map();
|
|
120873
120895
|
this.attributes = new Map();
|
|
120874
120896
|
this.parent = void 0;
|
|
120897
|
+
this.optional = void 0;
|
|
120898
|
+
this.nillable = void 0;
|
|
120875
120899
|
this.name = name;
|
|
120876
120900
|
this.parent = parent;
|
|
120877
120901
|
this.multiple = multiple;
|
|
120878
120902
|
this.optional = optional;
|
|
120903
|
+
this.nillable = nillable;
|
|
120879
120904
|
}
|
|
120880
120905
|
|
|
120881
120906
|
addElement(element) {
|
|
@@ -120896,6 +120921,10 @@ class FormSchemaRngElement {
|
|
|
120896
120921
|
return (_this$children$get = this.children.get(name)) !== null && _this$children$get !== void 0 ? _this$children$get : this.attributes.get(name);
|
|
120897
120922
|
}
|
|
120898
120923
|
|
|
120924
|
+
isOptionalOrNillable() {
|
|
120925
|
+
return this.optional || this.nillable || false;
|
|
120926
|
+
}
|
|
120927
|
+
|
|
120899
120928
|
}
|
|
120900
120929
|
class FormSchemaRng {
|
|
120901
120930
|
constructor(rootElement) {
|
|
@@ -120914,7 +120943,7 @@ class FormSchemaRng {
|
|
|
120914
120943
|
}
|
|
120915
120944
|
|
|
120916
120945
|
static convertSchemaRngElement(schemaRngElement, parent) {
|
|
120917
|
-
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple);
|
|
120946
|
+
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple, schemaRngElement.nillable);
|
|
120918
120947
|
|
|
120919
120948
|
if (schemaRngElement.innerText != undefined) {
|
|
120920
120949
|
if (schemaRngElement.innerText.type != undefined) {
|
|
@@ -120993,7 +121022,7 @@ class FormSchemaRng {
|
|
|
120993
121022
|
}
|
|
120994
121023
|
|
|
120995
121024
|
static convertSchemaRngAttribute(attribute, parent) {
|
|
120996
|
-
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, parent);
|
|
121025
|
+
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, attribute.nillable, parent);
|
|
120997
121026
|
}
|
|
120998
121027
|
|
|
120999
121028
|
adjustPathMultiplicity(path) {
|
|
@@ -121067,41 +121096,6 @@ class FormSchemaRng {
|
|
|
121067
121096
|
return currentElement;
|
|
121068
121097
|
}
|
|
121069
121098
|
|
|
121070
|
-
getIsOptionalByPath(modelPath) {
|
|
121071
|
-
let isOptionalStatus = false;
|
|
121072
|
-
let currentElement;
|
|
121073
|
-
|
|
121074
|
-
for (const part of modelPath.getPathParts()) {
|
|
121075
|
-
if (currentElement == undefined) {
|
|
121076
|
-
if (this.rootElement.name === part) {
|
|
121077
|
-
var _this$rootElement$opt, _this$rootElement;
|
|
121078
|
-
|
|
121079
|
-
currentElement = this.rootElement;
|
|
121080
|
-
isOptionalStatus = (_this$rootElement$opt = (_this$rootElement = this.rootElement) === null || _this$rootElement === void 0 ? void 0 : _this$rootElement.optional) !== null && _this$rootElement$opt !== void 0 ? _this$rootElement$opt : false;
|
|
121081
|
-
continue;
|
|
121082
|
-
} else {
|
|
121083
|
-
return false;
|
|
121084
|
-
}
|
|
121085
|
-
}
|
|
121086
|
-
|
|
121087
|
-
if (currentElement instanceof FormSchemaRngElement && !_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isMultiToken(part)) {
|
|
121088
|
-
var _currentElement$multi, _currentElement2, _currentElement3;
|
|
121089
|
-
|
|
121090
|
-
currentElement = currentElement.getElementByName(part);
|
|
121091
|
-
|
|
121092
|
-
if (currentElement instanceof FormSchemaRngElement && ((_currentElement$multi = (_currentElement2 = currentElement) === null || _currentElement2 === void 0 ? void 0 : _currentElement2.multiple) !== null && _currentElement$multi !== void 0 ? _currentElement$multi : false)) {
|
|
121093
|
-
isOptionalStatus = false;
|
|
121094
|
-
} else if (((_currentElement3 = currentElement) === null || _currentElement3 === void 0 ? void 0 : _currentElement3.optional) === undefined) {
|
|
121095
|
-
continue;
|
|
121096
|
-
} else {
|
|
121097
|
-
isOptionalStatus = currentElement.optional;
|
|
121098
|
-
}
|
|
121099
|
-
}
|
|
121100
|
-
}
|
|
121101
|
-
|
|
121102
|
-
return isOptionalStatus;
|
|
121103
|
-
}
|
|
121104
|
-
|
|
121105
121099
|
getDependenciesFromSchema(bindingPath) {
|
|
121106
121100
|
var _endOptionalElement;
|
|
121107
121101
|
|
|
@@ -121113,7 +121107,7 @@ class FormSchemaRng {
|
|
|
121113
121107
|
if (this.rootElement.name === part) {
|
|
121114
121108
|
currentElement = this.rootElement;
|
|
121115
121109
|
|
|
121116
|
-
if (currentElement.
|
|
121110
|
+
if (currentElement.isOptionalOrNillable()) {
|
|
121117
121111
|
endOptionalElement = currentElement;
|
|
121118
121112
|
}
|
|
121119
121113
|
|
|
@@ -121128,15 +121122,13 @@ class FormSchemaRng {
|
|
|
121128
121122
|
}
|
|
121129
121123
|
|
|
121130
121124
|
if (currentElement instanceof FormSchemaRngElement && !_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isMultiToken(part)) {
|
|
121131
|
-
var _currentElement4;
|
|
121132
|
-
|
|
121133
121125
|
currentElement = currentElement.getElementByName(part);
|
|
121134
121126
|
|
|
121135
|
-
if (currentElement instanceof FormSchemaRngElement && currentElement.
|
|
121127
|
+
if (currentElement instanceof FormSchemaRngElement && currentElement.isOptionalOrNillable() === true) {
|
|
121136
121128
|
endOptionalElement = currentElement;
|
|
121137
121129
|
}
|
|
121138
121130
|
|
|
121139
|
-
if (currentElement instanceof FormSchemaRngAttribute &&
|
|
121131
|
+
if (currentElement instanceof FormSchemaRngAttribute && currentElement.isOptionalOrNillable() === true) {
|
|
121140
121132
|
endOptionalElement = currentElement;
|
|
121141
121133
|
}
|
|
121142
121134
|
}
|
|
@@ -121165,7 +121157,6 @@ class FormSchemaRng {
|
|
|
121165
121157
|
return {
|
|
121166
121158
|
dependencies: deps,
|
|
121167
121159
|
hasOptionalParent: endOptionalElement != undefined,
|
|
121168
|
-
// true
|
|
121169
121160
|
optional: false
|
|
121170
121161
|
};
|
|
121171
121162
|
}
|
|
@@ -121205,12 +121196,6 @@ class FormSchemaRng {
|
|
|
121205
121196
|
return new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath(result, true);
|
|
121206
121197
|
}
|
|
121207
121198
|
|
|
121208
|
-
getIsOptionalByExactPath(bindingPath) {
|
|
121209
|
-
var _this$getElementByPat, _this$getElementByPat2;
|
|
121210
|
-
|
|
121211
|
-
return (_this$getElementByPat = (_this$getElementByPat2 = this.getElementByPath(bindingPath)) === null || _this$getElementByPat2 === void 0 ? void 0 : _this$getElementByPat2.optional) !== null && _this$getElementByPat !== void 0 ? _this$getElementByPat : false;
|
|
121212
|
-
}
|
|
121213
|
-
|
|
121214
121199
|
getTypeNodeByPath(bindingPath) {
|
|
121215
121200
|
const currentElement = this.getElementByPath(bindingPath);
|
|
121216
121201
|
|
|
@@ -121360,7 +121345,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
121360
121345
|
|
|
121361
121346
|
|
|
121362
121347
|
|
|
121363
|
-
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, _class34, _class35, _descriptor15, _descriptor16, _descriptor17, _descriptor18,
|
|
121348
|
+
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, _class34, _class35, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _dec32, _dec33, _class37, _class38, _descriptor20, _dec34, _dec35, _class40, _class41, _descriptor21, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _class43, _class44, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30;
|
|
121364
121349
|
|
|
121365
121350
|
|
|
121366
121351
|
class SchemaRngTypeCheck extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {}
|
|
@@ -121528,7 +121513,7 @@ let SchemaRngType = (_dec21 = (0,_generators_markupGenerator_Serializer_SugarSer
|
|
|
121528
121513
|
writable: true,
|
|
121529
121514
|
initializer: null
|
|
121530
121515
|
})), _class32)) || _class31);
|
|
121531
|
-
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)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec26(_class34 = (_class35 = class SchemaRngAttribute extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
121516
|
+
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, ``), _dec26(_class34 = (_class35 = class SchemaRngAttribute extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
121532
121517
|
constructor(...args) {
|
|
121533
121518
|
super(...args);
|
|
121534
121519
|
|
|
@@ -121538,7 +121523,9 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
121538
121523
|
|
|
121539
121524
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor17, this);
|
|
121540
121525
|
|
|
121541
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121526
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor18, this);
|
|
121527
|
+
|
|
121528
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor19, this);
|
|
121542
121529
|
}
|
|
121543
121530
|
|
|
121544
121531
|
}, (_descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "name", [_dec27], {
|
|
@@ -121556,95 +121543,107 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
121556
121543
|
enumerable: true,
|
|
121557
121544
|
writable: true,
|
|
121558
121545
|
initializer: null
|
|
121559
|
-
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "
|
|
121546
|
+
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "nillable", [_dec30], {
|
|
121547
|
+
configurable: true,
|
|
121548
|
+
enumerable: true,
|
|
121549
|
+
writable: true,
|
|
121550
|
+
initializer: null
|
|
121551
|
+
}), _descriptor19 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "description", [_dec31], {
|
|
121560
121552
|
configurable: true,
|
|
121561
121553
|
enumerable: true,
|
|
121562
121554
|
writable: true,
|
|
121563
121555
|
initializer: null
|
|
121564
121556
|
})), _class35)) || _class34);
|
|
121565
|
-
let SchemaRngInnerText = (
|
|
121557
|
+
let SchemaRngInnerText = (_dec32 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("innertext", ``), _dec33 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("type", [SchemaRngType]), _dec32(_class37 = (_class38 = class SchemaRngInnerText extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
121566
121558
|
constructor(...args) {
|
|
121567
121559
|
super(...args);
|
|
121568
121560
|
|
|
121569
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type",
|
|
121561
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type", _descriptor20, this);
|
|
121570
121562
|
}
|
|
121571
121563
|
|
|
121572
|
-
}, (
|
|
121564
|
+
}, (_descriptor20 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class38.prototype, "type", [_dec33], {
|
|
121573
121565
|
configurable: true,
|
|
121574
121566
|
enumerable: true,
|
|
121575
121567
|
writable: true,
|
|
121576
121568
|
initializer: null
|
|
121577
121569
|
})), _class38)) || _class37);
|
|
121578
|
-
let SchemaRngElementChoiceElement = (
|
|
121570
|
+
let SchemaRngElementChoiceElement = (_dec34 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("choice", ``), _dec35 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("element"), _dec34(_class40 = (_class41 = class SchemaRngElementChoiceElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
121579
121571
|
constructor(...args) {
|
|
121580
121572
|
super(...args);
|
|
121581
121573
|
|
|
121582
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children",
|
|
121574
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor21, this);
|
|
121583
121575
|
}
|
|
121584
121576
|
|
|
121585
|
-
}, (
|
|
121577
|
+
}, (_descriptor21 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class41.prototype, "children", [_dec35], {
|
|
121586
121578
|
configurable: true,
|
|
121587
121579
|
enumerable: true,
|
|
121588
121580
|
writable: true,
|
|
121589
121581
|
initializer: null
|
|
121590
121582
|
})), _class41)) || _class40);
|
|
121591
|
-
let SchemaRngElement = (
|
|
121583
|
+
let SchemaRngElement = (_dec36 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("element", ``), _dec37 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, ``), _dec38 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, ``), _dec39 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("optional", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec40 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("nillable", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec41 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("multiple", _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, ``), _dec42 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("attribute", [SchemaRngAttribute]), _dec43 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("element"), _dec44 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)("choice"), _dec45 = (0,_generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.singleChild)("innertext", [SchemaRngInnerText]), _dec36(_class43 = (_class44 = class SchemaRngElement extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
121592
121584
|
constructor(...args) {
|
|
121593
121585
|
super(...args);
|
|
121594
121586
|
|
|
121595
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name",
|
|
121587
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor22, this);
|
|
121596
121588
|
|
|
121597
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description",
|
|
121589
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor23, this);
|
|
121598
121590
|
|
|
121599
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional",
|
|
121591
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor24, this);
|
|
121600
121592
|
|
|
121601
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121593
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor25, this);
|
|
121602
121594
|
|
|
121603
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121595
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor26, this);
|
|
121604
121596
|
|
|
121605
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121597
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "attributes", _descriptor27, this);
|
|
121606
121598
|
|
|
121607
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121599
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor28, this);
|
|
121608
121600
|
|
|
121609
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121601
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "choices", _descriptor29, this);
|
|
121602
|
+
|
|
121603
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "innerText", _descriptor30, this);
|
|
121610
121604
|
}
|
|
121611
121605
|
|
|
121612
|
-
}, (
|
|
121606
|
+
}, (_descriptor22 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "name", [_dec37], {
|
|
121613
121607
|
configurable: true,
|
|
121614
121608
|
enumerable: true,
|
|
121615
121609
|
writable: true,
|
|
121616
121610
|
initializer: null
|
|
121617
|
-
}),
|
|
121611
|
+
}), _descriptor23 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "description", [_dec38], {
|
|
121618
121612
|
configurable: true,
|
|
121619
121613
|
enumerable: true,
|
|
121620
121614
|
writable: true,
|
|
121621
121615
|
initializer: null
|
|
121622
|
-
}),
|
|
121616
|
+
}), _descriptor24 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "optional", [_dec39], {
|
|
121623
121617
|
configurable: true,
|
|
121624
121618
|
enumerable: true,
|
|
121625
121619
|
writable: true,
|
|
121626
121620
|
initializer: null
|
|
121627
|
-
}),
|
|
121621
|
+
}), _descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "nillable", [_dec40], {
|
|
121628
121622
|
configurable: true,
|
|
121629
121623
|
enumerable: true,
|
|
121630
121624
|
writable: true,
|
|
121631
121625
|
initializer: null
|
|
121632
|
-
}),
|
|
121626
|
+
}), _descriptor26 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "multiple", [_dec41], {
|
|
121633
121627
|
configurable: true,
|
|
121634
121628
|
enumerable: true,
|
|
121635
121629
|
writable: true,
|
|
121636
121630
|
initializer: null
|
|
121637
|
-
}),
|
|
121631
|
+
}), _descriptor27 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "attributes", [_dec42], {
|
|
121638
121632
|
configurable: true,
|
|
121639
121633
|
enumerable: true,
|
|
121640
121634
|
writable: true,
|
|
121641
121635
|
initializer: null
|
|
121642
|
-
}),
|
|
121636
|
+
}), _descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "children", [_dec43], {
|
|
121643
121637
|
configurable: true,
|
|
121644
121638
|
enumerable: true,
|
|
121645
121639
|
writable: true,
|
|
121646
121640
|
initializer: null
|
|
121647
|
-
}),
|
|
121641
|
+
}), _descriptor29 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "choices", [_dec44], {
|
|
121642
|
+
configurable: true,
|
|
121643
|
+
enumerable: true,
|
|
121644
|
+
writable: true,
|
|
121645
|
+
initializer: null
|
|
121646
|
+
}), _descriptor30 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "innerText", [_dec45], {
|
|
121648
121647
|
configurable: true,
|
|
121649
121648
|
enumerable: true,
|
|
121650
121649
|
writable: true,
|
|
@@ -127256,8 +127255,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127256
127255
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
127257
127256
|
/* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
127258
127257
|
/* 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");
|
|
127259
|
-
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
127260
|
-
|
|
127261
127258
|
|
|
127262
127259
|
|
|
127263
127260
|
|
|
@@ -127277,10 +127274,8 @@ var RequisiteSectionMode;
|
|
|
127277
127274
|
|
|
127278
127275
|
const emptyDataDeclarationCollection = {};
|
|
127279
127276
|
class DataDeclarationGenerationContext {
|
|
127280
|
-
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry
|
|
127277
|
+
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
127281
127278
|
this.initSequenceFactory = void 0;
|
|
127282
|
-
this.formSchemaRng = void 0;
|
|
127283
|
-
this.schemeValidations = void 0;
|
|
127284
127279
|
this.controlCustomizationContext = void 0;
|
|
127285
127280
|
this.typesRegistry = void 0;
|
|
127286
127281
|
|
|
@@ -127310,29 +127305,11 @@ class DataDeclarationGenerationContext {
|
|
|
127310
127305
|
return undefined;
|
|
127311
127306
|
};
|
|
127312
127307
|
|
|
127313
|
-
this.formSchemaRng = formSchemaRng;
|
|
127314
|
-
this.schemeValidations = schemeValidations;
|
|
127315
127308
|
this.initSequenceFactory = initSequenceFactory;
|
|
127316
127309
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
127317
127310
|
this.typesRegistry = typesRegistry;
|
|
127318
127311
|
}
|
|
127319
127312
|
|
|
127320
|
-
isMultipleNodeOptionalFromScheme(path) {
|
|
127321
|
-
if (!this.schemeValidations) {
|
|
127322
|
-
return undefined;
|
|
127323
|
-
}
|
|
127324
|
-
|
|
127325
|
-
const schemaNode = this.formSchemaRng.getElementByPath(path);
|
|
127326
|
-
|
|
127327
|
-
if (schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__.FormSchemaRngElement) {
|
|
127328
|
-
var _schemaNode$optional;
|
|
127329
|
-
|
|
127330
|
-
return (_schemaNode$optional = schemaNode.optional) !== null && _schemaNode$optional !== void 0 ? _schemaNode$optional : false;
|
|
127331
|
-
}
|
|
127332
|
-
|
|
127333
|
-
return undefined;
|
|
127334
|
-
}
|
|
127335
|
-
|
|
127336
127313
|
getTypeNode(node) {
|
|
127337
127314
|
if (node.anonymousType != undefined) {
|
|
127338
127315
|
return node.anonymousType;
|
|
@@ -127641,15 +127618,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127641
127618
|
|
|
127642
127619
|
|
|
127643
127620
|
class DataDeclarationGenerator {
|
|
127644
|
-
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry
|
|
127621
|
+
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
127645
127622
|
this.sugarRoot = void 0;
|
|
127646
127623
|
this.initSequenceFactory = void 0;
|
|
127647
|
-
this.formSchemaRng = void 0;
|
|
127648
|
-
this.schemeValidations = void 0;
|
|
127649
127624
|
this.controlCustomizationContext = void 0;
|
|
127650
127625
|
this.typesRegistry = void 0;
|
|
127651
|
-
this.formSchemaRng = formSchemaRng;
|
|
127652
|
-
this.schemeValidations = schemeValidations;
|
|
127653
127626
|
this.sugarRoot = sugarRoot;
|
|
127654
127627
|
this.initSequenceFactory = initSequenceFactory;
|
|
127655
127628
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -127661,7 +127634,7 @@ class DataDeclarationGenerator {
|
|
|
127661
127634
|
|
|
127662
127635
|
const converterClass = (_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
127663
127636
|
const converter = new converterClass(this.sugarRoot);
|
|
127664
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry
|
|
127637
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
127665
127638
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
127666
127639
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
127667
127640
|
const result = this.replaceHolder(`
|
|
@@ -127695,7 +127668,7 @@ class DataDeclarationGenerator {
|
|
|
127695
127668
|
|
|
127696
127669
|
const converterClass = (_getConverterByNodeCl2 = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl2 !== void 0 ? _getConverterByNodeCl2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
127697
127670
|
const converter = new converterClass(this.sugarRoot);
|
|
127698
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry
|
|
127671
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
127699
127672
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
127700
127673
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
127701
127674
|
return `
|
|
@@ -128817,7 +128790,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
128817
128790
|
|
|
128818
128791
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
128819
128792
|
try {
|
|
128820
|
-
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2,
|
|
128793
|
+
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _additionalContent$fo, _additionalContent$fo2;
|
|
128821
128794
|
|
|
128822
128795
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
128823
128796
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
|
|
@@ -128831,18 +128804,18 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
128831
128804
|
const referencedFetchFunctions = additionalContent.fetchFunctionSources != undefined ? getReferencedFetchFunctions(additionalContent.fetchFunctionSources) : {};
|
|
128832
128805
|
const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions); // tslint:disable-next-line no-unsafe-any
|
|
128833
128806
|
|
|
128834
|
-
const additionalSettings = JSON.parse(additionalContent.additionalSettings || "{}");
|
|
128835
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry
|
|
128807
|
+
const additionalSettings = typeof additionalContent.additionalSettings === "string" ? JSON.parse(additionalContent.additionalSettings || "{}") : additionalContent.additionalSettings;
|
|
128808
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry);
|
|
128836
128809
|
const {
|
|
128837
128810
|
dataDeclarationContent,
|
|
128838
128811
|
dataDeclaration
|
|
128839
128812
|
} = dataDeclarationGenerator.generate();
|
|
128840
128813
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__.DataDeclarationGenerationTimeHelper(dataDeclaration);
|
|
128841
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$
|
|
128842
|
-
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$
|
|
128814
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false, additionalContent.validationsContent);
|
|
128815
|
+
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, controlCustomizationContext);
|
|
128843
128816
|
const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
|
|
128844
128817
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
128845
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$
|
|
128818
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
128846
128819
|
markupGenerator.generate(sugarRoot, builder);
|
|
128847
128820
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_8__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings));
|
|
128848
128821
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -129245,10 +129218,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129245
129218
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
129246
129219
|
/* harmony export */ "getRequisiteList": () => (/* binding */ getRequisiteList),
|
|
129247
129220
|
/* harmony export */ "getRequisitesFromEvaluablePropValue": () => (/* binding */ getRequisitesFromEvaluablePropValue),
|
|
129221
|
+
/* harmony export */ "getPathsFromEvaluablePropValue": () => (/* binding */ getPathsFromEvaluablePropValue),
|
|
129248
129222
|
/* harmony export */ "getRequisitesFromEvaluableProps": () => (/* binding */ getRequisitesFromEvaluableProps)
|
|
129249
129223
|
/* harmony export */ });
|
|
129250
129224
|
/* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
129251
129225
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
129226
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
129227
|
+
|
|
129252
129228
|
|
|
129253
129229
|
|
|
129254
129230
|
function getRequisiteList(sugarAst, fetchFunctions) {
|
|
@@ -129277,6 +129253,21 @@ function getRequisitesFromEvaluablePropValue(filter) {
|
|
|
129277
129253
|
|
|
129278
129254
|
return (_filter$match$map$fil = (_filter$match = filter.match(/path([^)]+)/g)) === null || _filter$match === void 0 ? void 0 : _filter$match.map(path => path.slice(6, -1)).filter(path => path.startsWith("@clientInfo") || path.startsWith("@formsClientInfo")).map(path => `${path}.value`)) !== null && _filter$match$map$fil !== void 0 ? _filter$match$map$fil : [];
|
|
129279
129255
|
}
|
|
129256
|
+
function getPathsFromEvaluablePropValue(evaluableProp) {
|
|
129257
|
+
const result = [];
|
|
129258
|
+
const pathRegex = /(?<=path\((?:'|")).*?(?=(?:'|"))/g;
|
|
129259
|
+
const pathList = [...evaluableProp.matchAll(pathRegex)];
|
|
129260
|
+
|
|
129261
|
+
if (pathList.length > 0) {
|
|
129262
|
+
result.push(...pathList.map(x => {
|
|
129263
|
+
var _x$;
|
|
129264
|
+
|
|
129265
|
+
return _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_2__.ModelPath.createFromString((_x$ = x[0]) !== null && _x$ !== void 0 ? _x$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)("Path regexp parse error - unexpected undefined"), "auto");
|
|
129266
|
+
}));
|
|
129267
|
+
}
|
|
129268
|
+
|
|
129269
|
+
return result;
|
|
129270
|
+
}
|
|
129280
129271
|
function getRequisitesFromEvaluableProps(...evaluablePropValues) {
|
|
129281
129272
|
return evaluablePropValues.filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isNotNullOrUndefined).flatMap(getRequisitesFromEvaluablePropValue);
|
|
129282
129273
|
}
|
|
@@ -130511,7 +130502,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
130511
130502
|
let convertersFromNodeClassMap;
|
|
130512
130503
|
|
|
130513
130504
|
function buildConvertersFromNodeClassMap() {
|
|
130514
|
-
const converters = [_ElementProcessors_FormParts_AddPageButton_AddPageButtonConverter__WEBPACK_IMPORTED_MODULE_11__.AddPageButtonConverter, _ElementProcessors_MultiControls_AddRowButton_AddRowButtonConverter__WEBPACK_IMPORTED_MODULE_12__.AddRowButtonConverter, _ElementProcessors_Layout_Block_BlockConverter__WEBPACK_IMPORTED_MODULE_13__.BlockConverter, _ElementProcessors_Typography_Bold_BoldConverter__WEBPACK_IMPORTED_MODULE_15__.BoldConverter, _ElementProcessors_Layout_Br_BrConverter__WEBPACK_IMPORTED_MODULE_16__.BrConverter, _ElementProcessors_FormParts_Caption_CaptionConverter__WEBPACK_IMPORTED_MODULE_18__.CaptionConverter, _ElementProcessors_ValueEditors_Checkbox_CheckboxConverter__WEBPACK_IMPORTED_MODULE_19__.CheckboxConverter, _ElementProcessors_ControlFlow_Choice_ChoiceConverter__WEBPACK_IMPORTED_MODULE_20__.ChoiceConverter, _ElementProcessors_MultiControls_TableCell_TableCellConverter__WEBPACK_IMPORTED_MODULE_85__.TableCellConverter, _ElementProcessors_ValueEditors_Combobox_ComboBoxConverter__WEBPACK_IMPORTED_MODULE_21__.ComboBoxConverter, _ElementProcessors_FormParts_Content_ContentConverter__WEBPACK_IMPORTED_MODULE_22__.ContentConverter, _ElementProcessors_FormParts_Cross_CrossConverter__WEBPACK_IMPORTED_MODULE_23__.CrossConverter, _ElementProcessors_MultiControls_ColgroupButton_ColgroupButtonConverter__WEBPACK_IMPORTED_MODULE_96__.ColgroupButtonConverter, _ElementProcessors_ValueEditors_Date_DateConverter__WEBPACK_IMPORTED_MODULE_24__.DateConverter, _ElementProcessors_FormParts_DefaultContent_DefaultContentConverter__WEBPACK_IMPORTED_MODULE_25__.DefaultContentConverter, _ElementProcessors_ValueEditors_DiadocSuggestComboBox_DiadocSuggestComboBoxConverter__WEBPACK_IMPORTED_MODULE_26__.DiadocSuggestComboBoxConverter, _ElementProcessors_Typography_Entity_EntityConverter__WEBPACK_IMPORTED_MODULE_27__.EntityConverter, _ElementProcessors_ValueEditors_ExpertNote_ExpertNoteConverter__WEBPACK_IMPORTED_MODULE_28__.ExpertNoteConverter, _ElementProcessors_ValueEditors_FileLoader_FileLoaderConverter__WEBPACK_IMPORTED_MODULE_29__.FileLoaderConverter, _ElementProcessors_MultiControls_FilterDateRange_FilterDateRangeConverter__WEBPACK_IMPORTED_MODULE_30__.FilterDateRangeConverter, _ElementProcessors_MultiControls_FilterInput_FilterInputConverter__WEBPACK_IMPORTED_MODULE_31__.FilterInputConverter, _ElementProcessors_MultiControls_FilterList_FilterListConverter__WEBPACK_IMPORTED_MODULE_32__.FilterListConverter, _ElementProcessors_ValueViewers_FIO_FIOConverter__WEBPACK_IMPORTED_MODULE_33__.FIOConverter, _ElementProcessors_Layout_Flexbox_FlexboxConverter__WEBPACK_IMPORTED_MODULE_34__.FlexboxConverter, _ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_36__.FormConverter, _ElementProcessors_FormParts_FormInfo_FormInfoConverter__WEBPACK_IMPORTED_MODULE_37__.FormInfoConverter, _ElementProcessors_Typography_Gray_GrayConverter__WEBPACK_IMPORTED_MODULE_38__.GrayConverter, _ElementProcessors_Layout_GridCol_GridColConverter__WEBPACK_IMPORTED_MODULE_39__.GridColConverter, _ElementProcessors_Layout_GridRow_GridRowConverter__WEBPACK_IMPORTED_MODULE_40__.GridRowConverter, _ElementProcessors_FormParts_Header_HeaderConverter__WEBPACK_IMPORTED_MODULE_41__.HeaderConverter, _ElementProcessors_MultiControls_HeaderMenu_HeaderMenuConverter__WEBPACK_IMPORTED_MODULE_42__.HeaderMenuConverter, _ElementProcessors_Helpers_Help_HelpConverter__WEBPACK_IMPORTED_MODULE_43__.HelpConverter, _ElementProcessors_Helpers_Helpinfo_HelpInfoConverter__WEBPACK_IMPORTED_MODULE_44__.HelpInfoConverter, _ElementProcessors_Typography_Highlight_HighlightConverter__WEBPACK_IMPORTED_MODULE_45__.HighlightConverter, _ElementProcessors_Layout_Hr_HrConverter__WEBPACK_IMPORTED_MODULE_46__.HrConverter, _ElementProcessors_Typography_Icon_IconConverter__WEBPACK_IMPORTED_MODULE_47__.IconConverter, _ElementProcessors_ControlFlow_If_IfConverter__WEBPACK_IMPORTED_MODULE_48__.IfConverter, _ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_49__.ImgConverter, _ElementProcessors_ValueEditors_INN_INNConverter__WEBPACK_IMPORTED_MODULE_50__.INNConverter, _ElementProcessors_ValueEditors_Input_InputConverter__WEBPACK_IMPORTED_MODULE_51__.InputConverter, _ElementProcessors_Typography_Italic_ItalicConverter__WEBPACK_IMPORTED_MODULE_52__.ItalicConverter, _ElementProcessors_Layout_ListItem_ListItemConverter__WEBPACK_IMPORTED_MODULE_53__.ListItemConverter, _ElementProcessors_ValueEditors_Kladr_KladrConverter__WEBPACK_IMPORTED_MODULE_54__.KladrConverter, _ElementProcessors_ValueViewers_Linetext_LinetextConverter__WEBPACK_IMPORTED_MODULE_55__.LinetextConverter, _ElementProcessors_Action_Link_LinkConverter__WEBPACK_IMPORTED_MODULE_56__.LinkConverter, _ElementProcessors_Layout_List_ListConverter__WEBPACK_IMPORTED_MODULE_57__.ListConverter, _ElementProcessors_Modal_ModalForm_ModalFormConverter__WEBPACK_IMPORTED_MODULE_58__.ModalFormConverter, _ElementProcessors_Modal_ModalFormLabel_ModalFormLabelConverter__WEBPACK_IMPORTED_MODULE_61__.ModalFormLabelConverter, _ElementProcessors_MultiControls_Multilinefield_MultilineFieldConverter__WEBPACK_IMPORTED_MODULE_62__.MultilineFieldConverter, _ElementProcessors_Helpers_Normativehelp_NormativeHelpConverter__WEBPACK_IMPORTED_MODULE_63__.NormativeHelpConverter, _ElementProcessors_FormParts_Page_PageConverter__WEBPACK_IMPORTED_MODULE_65__.PageConverter, _ElementProcessors_Layout_Pencil_PencilConverter__WEBPACK_IMPORTED_MODULE_66__.PencilConverter, _ElementProcessors_ValueEditors_Picklist_PicklistConverter__WEBPACK_IMPORTED_MODULE_67__.PicklistConverter, _ElementProcessors_ValueEditors_radio_RadioConverter__WEBPACK_IMPORTED_MODULE_68__.RadioConverter, _ElementProcessors_ValueEditors_RadioGroup_RadioGroupConverter__WEBPACK_IMPORTED_MODULE_69__.RadioGroupConverter, _ElementProcessors_MultiControls_RemoveRowButton_RemoveRowButtonConverter__WEBPACK_IMPORTED_MODULE_70__.RemoveRowButtonConverter, _ElementProcessors_ValueEditors_Select_SelectConverter__WEBPACK_IMPORTED_MODULE_71__.SelectConverter, _ElementProcessors_MultiControls_SortRadioGroup_SortRadioGroupConverter__WEBPACK_IMPORTED_MODULE_72__.SortRadioGroupConverter, _ElementProcessors_Layout_Spoiler_SpoilerConverter__WEBPACK_IMPORTED_MODULE_73__.SpoilerConverter, _ElementProcessors_Typography_Strong_StrongConverter__WEBPACK_IMPORTED_MODULE_74__.StrongConverter, _ElementProcessors_Typography_Sub_SubConverter__WEBPACK_IMPORTED_MODULE_75__.SubConverter, _ElementProcessors_Layout_Subheader_SubheaderConverter__WEBPACK_IMPORTED_MODULE_76__.SubheaderConverter, _ElementProcessors_Typography_Sup_SupConverter__WEBPACK_IMPORTED_MODULE_77__.SupConverter, _ElementProcessors_ValueViewers_Text_TextConverter__WEBPACK_IMPORTED_MODULE_86__.TextConverter, _ElementProcessors_ValueEditors_Textarea_TextAreaConverter__WEBPACK_IMPORTED_MODULE_87__.TextAreaConverter, _ElementProcessors_ValueEditors_popupTextArea_PopupTextAreaConverter__WEBPACK_IMPORTED_MODULE_95__.PopupTextAreaConverter, _ElementProcessors_ValueViewers_ValueLength_ValueLengthConverter__WEBPACK_IMPORTED_MODULE_91__.ValueLengthConverter, _ElementProcessors_ControlFlow_VisibilityBlock_VisibilityBlockConverter__WEBPACK_IMPORTED_MODULE_92__.VisibilityBlockConverter, _ElementProcessors_Layout_Warning_WarningConverter__WEBPACK_IMPORTED_MODULE_93__.WarningConverter, _ElementProcessors_Layout_InnerText_InnertextConverter__WEBPACK_IMPORTED_MODULE_10__.InnertextConverter, _ElementProcessors_ControlFlow_Otherwise_OtherwiseConverter__WEBPACK_IMPORTED_MODULE_64__.OtherwiseConverter, _ElementProcessors_ControlFlow_When_WhenConverter__WEBPACK_IMPORTED_MODULE_94__.WhenConverter, _ElementProcessors_FormParts_UnitList_UnitListConverter__WEBPACK_IMPORTED_MODULE_90__.UnitListConverter, _ElementProcessors_FormParts_UnitItem_UnitItemConverter__WEBPACK_IMPORTED_MODULE_89__.UnitItemConverter, _ElementProcessors_Modal_Body_BodyConverter__WEBPACK_IMPORTED_MODULE_14__.BodyConverter, _ElementProcessors_Modal_Footer_FooterConverter__WEBPACK_IMPORTED_MODULE_35__.FooterConverter, _ElementProcessors_Modal_ModalFormConfirm_ModalFormConfirmConverter__WEBPACK_IMPORTED_MODULE_60__.ModalFormConfirmConverter, _ElementProcessors_Modal_ModalFormCancel_ModalFormCancelConverter__WEBPACK_IMPORTED_MODULE_59__.ModalFormCancelConverter, _ElementProcessors_Action_Button_ButtonConverter__WEBPACK_IMPORTED_MODULE_17__.ButtonConverter, _ElementProcessors_FormParts_Tour_TourConverter__WEBPACK_IMPORTED_MODULE_88__.TourConverter, _ElementProcessors_ControlFlow_Switch_SwitchConverter__WEBPACK_IMPORTED_MODULE_78__.SwitchConverter, _ElementProcessors_ControlFlow_Switch_SwitchConverter__WEBPACK_IMPORTED_MODULE_78__.SwitchCaseConverter, _ElementProcessors_ControlFlow_Switch_SwitchConverter__WEBPACK_IMPORTED_MODULE_78__.SwitchDefaultConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableColumnConverter__WEBPACK_IMPORTED_MODULE_83__.StickyTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableColumnConverter__WEBPACK_IMPORTED_MODULE_79__.CrossfitTableColumnConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableColumnConverter__WEBPACK_IMPORTED_MODULE_81__.SimpleTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableConverter__WEBPACK_IMPORTED_MODULE_80__.CrossfitTableConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableConverter__WEBPACK_IMPORTED_MODULE_82__.SimpleTableConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableWithMultilineConverter__WEBPACK_IMPORTED_MODULE_84__.StickyTableWithMultilineConverter, _ElementProcessors_Layout_Stack_StackConverter__WEBPACK_IMPORTED_MODULE_5__.StackConverter, _ElementProcessors_Layout_Grid_GridConverter__WEBPACK_IMPORTED_MODULE_4__.GridConverter, _ElementProcessors_UnitParts_HeaderPanel_HeaderPanelConverter__WEBPACK_IMPORTED_MODULE_9__.HeaderPanelConverter, _ElementProcessors_MultiControls_Tabs_TabsConverter__WEBPACK_IMPORTED_MODULE_8__.TabsConverter, _ElementProcessors_Action_DropdownButton_DropdownButtonConverter__WEBPACK_IMPORTED_MODULE_100__.DropdownButtonConverter, _ElementProcessors_ValueEditors_FiasMvd_FiasMvdConverter__WEBPACK_IMPORTED_MODULE_3__.FiasMvdConverter, _ElementProcessors_ValueEditors_FiasFns_FiasFnsConverter__WEBPACK_IMPORTED_MODULE_0__.FiasFnsConverter, _ElementProcessors_ValueEditors_FiasPfr_FiasPfrConverter__WEBPACK_IMPORTED_MODULE_2__.FiasPfrConverter, _ElementProcessors_ValueEditors_FiasFss_FiasFssConverter__WEBPACK_IMPORTED_MODULE_1__.FiasFssConverter, _ElementProcessors_MultiControls_FilterSelect_FilterSelectConverter__WEBPACK_IMPORTED_MODULE_6__.FilterSelectConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_7__.Table2Converter, _ElementProcessors_MultiControls_Table2_Table2RowConverter__WEBPACK_IMPORTED_MODULE_99__.Table2RowConverter, _ElementProcessors_MultiControls_Table2_Table2MultirowConverter__WEBPACK_IMPORTED_MODULE_98__.Table2MultirowConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_7__.Table2ColumnConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_7__.Table2VerticalColumnConverter, _ElementProcessors_Layout_FixedTabs_FixedTabsConverter__WEBPACK_IMPORTED_MODULE_102__.FixedTabsConverter, _ElementProcessors_Layout_FixedTabs_FixedTabConverter__WEBPACK_IMPORTED_MODULE_101__.FixedTabConverter, _ElementProcessors_MultiControls_Multiple_MultipleConverter__WEBPACK_IMPORTED_MODULE_103__.MultipleConverter, _ElementProcessors_Action_ExcelPastePanel_ExcelPastePanelConverter__WEBPACK_IMPORTED_MODULE_104__.ExcelPastePanelConverter, _ElementProcessors_ValueEditors_ReferencedFields_ReferencedFieldsConverter__WEBPACK_IMPORTED_MODULE_105__.ReferencedFieldsConverter, _ElementProcessors_FormParts_UserPicklist_UserPicklistConverter__WEBPACK_IMPORTED_MODULE_106__.UserPicklistConverter, _ElementProcessors_ValueEditors_TaxRebate_TaxRebateConverter__WEBPACK_IMPORTED_MODULE_107__.TaxRebateConverter];
|
|
130505
|
+
const converters = [_ElementProcessors_FormParts_AddPageButton_AddPageButtonConverter__WEBPACK_IMPORTED_MODULE_11__.AddPageButtonConverter, _ElementProcessors_MultiControls_AddRowButton_AddRowButtonConverter__WEBPACK_IMPORTED_MODULE_12__.AddRowButtonConverter, _ElementProcessors_Layout_Block_BlockConverter__WEBPACK_IMPORTED_MODULE_13__.BlockConverter, _ElementProcessors_Typography_Bold_BoldConverter__WEBPACK_IMPORTED_MODULE_15__.BoldConverter, _ElementProcessors_Layout_Br_BrConverter__WEBPACK_IMPORTED_MODULE_16__.BrConverter, _ElementProcessors_FormParts_Caption_CaptionConverter__WEBPACK_IMPORTED_MODULE_18__.CaptionConverter, _ElementProcessors_ValueEditors_Checkbox_CheckboxConverter__WEBPACK_IMPORTED_MODULE_19__.CheckboxConverter, _ElementProcessors_ControlFlow_Choice_ChoiceConverter__WEBPACK_IMPORTED_MODULE_20__.ChoiceConverter, _ElementProcessors_MultiControls_TableCell_TableCellConverter__WEBPACK_IMPORTED_MODULE_85__.TableCellConverter, _ElementProcessors_ValueEditors_Combobox_ComboBoxConverter__WEBPACK_IMPORTED_MODULE_21__.ComboBoxConverter, _ElementProcessors_FormParts_Content_ContentConverter__WEBPACK_IMPORTED_MODULE_22__.ContentConverter, _ElementProcessors_FormParts_Cross_CrossConverter__WEBPACK_IMPORTED_MODULE_23__.CrossConverter, _ElementProcessors_MultiControls_ColgroupButton_ColgroupButtonConverter__WEBPACK_IMPORTED_MODULE_96__.ColgroupButtonConverter, _ElementProcessors_ValueEditors_Date_DateConverter__WEBPACK_IMPORTED_MODULE_24__.DateConverter, _ElementProcessors_FormParts_DefaultContent_DefaultContentConverter__WEBPACK_IMPORTED_MODULE_25__.DefaultContentConverter, _ElementProcessors_ValueEditors_DiadocSuggestComboBox_DiadocSuggestComboBoxConverter__WEBPACK_IMPORTED_MODULE_26__.DiadocSuggestComboBoxConverter, _ElementProcessors_Typography_Entity_EntityConverter__WEBPACK_IMPORTED_MODULE_27__.EntityConverter, _ElementProcessors_ValueEditors_ExpertNote_ExpertNoteConverter__WEBPACK_IMPORTED_MODULE_28__.ExpertNoteConverter, _ElementProcessors_ValueEditors_FileLoader_FileLoaderConverter__WEBPACK_IMPORTED_MODULE_29__.FileLoaderConverter, _ElementProcessors_MultiControls_FilterDateRange_FilterDateRangeConverter__WEBPACK_IMPORTED_MODULE_30__.FilterDateRangeConverter, _ElementProcessors_MultiControls_FilterInput_FilterInputConverter__WEBPACK_IMPORTED_MODULE_31__.FilterInputConverter, _ElementProcessors_MultiControls_FilterList_FilterListConverter__WEBPACK_IMPORTED_MODULE_32__.FilterListConverter, _ElementProcessors_ValueViewers_FIO_FIOConverter__WEBPACK_IMPORTED_MODULE_33__.FIOConverter, _ElementProcessors_Layout_Flexbox_FlexboxConverter__WEBPACK_IMPORTED_MODULE_34__.FlexboxConverter, _ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_36__.FormConverter, _ElementProcessors_FormParts_FormInfo_FormInfoConverter__WEBPACK_IMPORTED_MODULE_37__.FormInfoConverter, _ElementProcessors_Typography_Gray_GrayConverter__WEBPACK_IMPORTED_MODULE_38__.GrayConverter, _ElementProcessors_Layout_GridCol_GridColConverter__WEBPACK_IMPORTED_MODULE_39__.GridColConverter, _ElementProcessors_Layout_GridRow_GridRowConverter__WEBPACK_IMPORTED_MODULE_40__.GridRowConverter, _ElementProcessors_FormParts_Header_HeaderConverter__WEBPACK_IMPORTED_MODULE_41__.HeaderConverter, _ElementProcessors_MultiControls_HeaderMenu_HeaderMenuConverter__WEBPACK_IMPORTED_MODULE_42__.HeaderMenuConverter, _ElementProcessors_Helpers_Help_HelpConverter__WEBPACK_IMPORTED_MODULE_43__.HelpConverter, _ElementProcessors_Helpers_Helpinfo_HelpInfoConverter__WEBPACK_IMPORTED_MODULE_44__.HelpInfoConverter, _ElementProcessors_Typography_Highlight_HighlightConverter__WEBPACK_IMPORTED_MODULE_45__.HighlightConverter, _ElementProcessors_Layout_Hr_HrConverter__WEBPACK_IMPORTED_MODULE_46__.HrConverter, _ElementProcessors_Typography_Icon_IconConverter__WEBPACK_IMPORTED_MODULE_47__.IconConverter, _ElementProcessors_ControlFlow_If_IfConverter__WEBPACK_IMPORTED_MODULE_48__.IfConverter, _ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_49__.ImgConverter, _ElementProcessors_ValueEditors_INN_INNConverter__WEBPACK_IMPORTED_MODULE_50__.INNConverter, _ElementProcessors_ValueEditors_Input_InputConverter__WEBPACK_IMPORTED_MODULE_51__.InputConverter, _ElementProcessors_Typography_Italic_ItalicConverter__WEBPACK_IMPORTED_MODULE_52__.ItalicConverter, _ElementProcessors_Layout_ListItem_ListItemConverter__WEBPACK_IMPORTED_MODULE_53__.ListItemConverter, _ElementProcessors_ValueEditors_Kladr_KladrConverter__WEBPACK_IMPORTED_MODULE_54__.KladrConverter, _ElementProcessors_ValueViewers_Linetext_LinetextConverter__WEBPACK_IMPORTED_MODULE_55__.LinetextConverter, _ElementProcessors_Action_Link_LinkConverter__WEBPACK_IMPORTED_MODULE_56__.LinkConverter, _ElementProcessors_Layout_List_ListConverter__WEBPACK_IMPORTED_MODULE_57__.ListConverter, _ElementProcessors_Modal_ModalForm_ModalFormConverter__WEBPACK_IMPORTED_MODULE_58__.ModalFormConverter, _ElementProcessors_Modal_ModalFormLabel_ModalFormLabelConverter__WEBPACK_IMPORTED_MODULE_61__.ModalFormLabelConverter, _ElementProcessors_MultiControls_Multilinefield_MultilineFieldConverter__WEBPACK_IMPORTED_MODULE_62__.MultilineFieldConverter, _ElementProcessors_Helpers_Normativehelp_NormativeHelpConverter__WEBPACK_IMPORTED_MODULE_63__.NormativeHelpConverter, _ElementProcessors_FormParts_Page_PageConverter__WEBPACK_IMPORTED_MODULE_65__.PageConverter, _ElementProcessors_Layout_Pencil_PencilConverter__WEBPACK_IMPORTED_MODULE_66__.PencilConverter, _ElementProcessors_ValueEditors_Picklist_PicklistConverter__WEBPACK_IMPORTED_MODULE_67__.PicklistConverter, _ElementProcessors_ValueEditors_radio_RadioConverter__WEBPACK_IMPORTED_MODULE_68__.RadioConverter, _ElementProcessors_ValueEditors_RadioGroup_RadioGroupConverter__WEBPACK_IMPORTED_MODULE_69__.RadioGroupConverter, _ElementProcessors_MultiControls_RemoveRowButton_RemoveRowButtonConverter__WEBPACK_IMPORTED_MODULE_70__.RemoveRowButtonConverter, _ElementProcessors_ValueEditors_Select_SelectConverter__WEBPACK_IMPORTED_MODULE_71__.SelectConverter, _ElementProcessors_MultiControls_SortRadioGroup_SortRadioGroupConverter__WEBPACK_IMPORTED_MODULE_72__.SortRadioGroupConverter, _ElementProcessors_Layout_Spoiler_SpoilerConverter__WEBPACK_IMPORTED_MODULE_73__.SpoilerConverter, _ElementProcessors_Typography_Strong_StrongConverter__WEBPACK_IMPORTED_MODULE_74__.StrongConverter, _ElementProcessors_Typography_Sub_SubConverter__WEBPACK_IMPORTED_MODULE_75__.SubConverter, _ElementProcessors_Layout_Subheader_SubheaderConverter__WEBPACK_IMPORTED_MODULE_76__.SubheaderConverter, _ElementProcessors_Typography_Sup_SupConverter__WEBPACK_IMPORTED_MODULE_77__.SupConverter, _ElementProcessors_ValueViewers_Text_TextConverter__WEBPACK_IMPORTED_MODULE_86__.TextConverter, _ElementProcessors_ValueEditors_Textarea_TextAreaConverter__WEBPACK_IMPORTED_MODULE_87__.TextAreaConverter, _ElementProcessors_ValueEditors_popupTextArea_PopupTextAreaConverter__WEBPACK_IMPORTED_MODULE_95__.PopupTextAreaConverter, _ElementProcessors_ValueViewers_ValueLength_ValueLengthConverter__WEBPACK_IMPORTED_MODULE_91__.ValueLengthConverter, _ElementProcessors_ControlFlow_VisibilityBlock_VisibilityBlockConverter__WEBPACK_IMPORTED_MODULE_92__.VisibilityBlockConverter, _ElementProcessors_Layout_Warning_WarningConverter__WEBPACK_IMPORTED_MODULE_93__.WarningConverter, _ElementProcessors_Layout_InnerText_InnertextConverter__WEBPACK_IMPORTED_MODULE_10__.InnertextConverter, _ElementProcessors_ControlFlow_Otherwise_OtherwiseConverter__WEBPACK_IMPORTED_MODULE_64__.OtherwiseConverter, _ElementProcessors_ControlFlow_When_WhenConverter__WEBPACK_IMPORTED_MODULE_94__.WhenConverter, _ElementProcessors_FormParts_UnitList_UnitListConverter__WEBPACK_IMPORTED_MODULE_90__.UnitListConverter, _ElementProcessors_FormParts_UnitItem_UnitItemConverter__WEBPACK_IMPORTED_MODULE_89__.UnitItemConverter, _ElementProcessors_Modal_Body_BodyConverter__WEBPACK_IMPORTED_MODULE_14__.BodyConverter, _ElementProcessors_Modal_Footer_FooterConverter__WEBPACK_IMPORTED_MODULE_35__.FooterConverter, _ElementProcessors_Modal_ModalFormConfirm_ModalFormConfirmConverter__WEBPACK_IMPORTED_MODULE_60__.ModalFormConfirmConverter, _ElementProcessors_Modal_ModalFormCancel_ModalFormCancelConverter__WEBPACK_IMPORTED_MODULE_59__.ModalFormCancelConverter, _ElementProcessors_Action_Button_ButtonConverter__WEBPACK_IMPORTED_MODULE_17__.ButtonConverter, _ElementProcessors_FormParts_Tour_TourConverter__WEBPACK_IMPORTED_MODULE_88__.TourConverter, _ElementProcessors_ControlFlow_Switch_SwitchConverter__WEBPACK_IMPORTED_MODULE_78__.SwitchConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableColumnConverter__WEBPACK_IMPORTED_MODULE_83__.StickyTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableColumnConverter__WEBPACK_IMPORTED_MODULE_79__.CrossfitTableColumnConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableColumnConverter__WEBPACK_IMPORTED_MODULE_81__.SimpleTableColumnConverter, _ElementProcessors_MultiControls_CrossfitTable_CrossfitTableConverter__WEBPACK_IMPORTED_MODULE_80__.CrossfitTableConverter, _ElementProcessors_Layout_SimpleTable_SimpleTableConverter__WEBPACK_IMPORTED_MODULE_82__.SimpleTableConverter, _ElementProcessors_MultiControls_StickyTable_StickyTableWithMultilineConverter__WEBPACK_IMPORTED_MODULE_84__.StickyTableWithMultilineConverter, _ElementProcessors_Layout_Stack_StackConverter__WEBPACK_IMPORTED_MODULE_5__.StackConverter, _ElementProcessors_Layout_Grid_GridConverter__WEBPACK_IMPORTED_MODULE_4__.GridConverter, _ElementProcessors_UnitParts_HeaderPanel_HeaderPanelConverter__WEBPACK_IMPORTED_MODULE_9__.HeaderPanelConverter, _ElementProcessors_MultiControls_Tabs_TabsConverter__WEBPACK_IMPORTED_MODULE_8__.TabsConverter, _ElementProcessors_Action_DropdownButton_DropdownButtonConverter__WEBPACK_IMPORTED_MODULE_100__.DropdownButtonConverter, _ElementProcessors_ValueEditors_FiasMvd_FiasMvdConverter__WEBPACK_IMPORTED_MODULE_3__.FiasMvdConverter, _ElementProcessors_ValueEditors_FiasFns_FiasFnsConverter__WEBPACK_IMPORTED_MODULE_0__.FiasFnsConverter, _ElementProcessors_ValueEditors_FiasPfr_FiasPfrConverter__WEBPACK_IMPORTED_MODULE_2__.FiasPfrConverter, _ElementProcessors_ValueEditors_FiasFss_FiasFssConverter__WEBPACK_IMPORTED_MODULE_1__.FiasFssConverter, _ElementProcessors_MultiControls_FilterSelect_FilterSelectConverter__WEBPACK_IMPORTED_MODULE_6__.FilterSelectConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_7__.Table2Converter, _ElementProcessors_MultiControls_Table2_Table2RowConverter__WEBPACK_IMPORTED_MODULE_99__.Table2RowConverter, _ElementProcessors_MultiControls_Table2_Table2MultirowConverter__WEBPACK_IMPORTED_MODULE_98__.Table2MultirowConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_7__.Table2ColumnConverter, _ElementProcessors_MultiControls_Table2_Table2Converter__WEBPACK_IMPORTED_MODULE_7__.Table2VerticalColumnConverter, _ElementProcessors_Layout_FixedTabs_FixedTabsConverter__WEBPACK_IMPORTED_MODULE_102__.FixedTabsConverter, _ElementProcessors_Layout_FixedTabs_FixedTabConverter__WEBPACK_IMPORTED_MODULE_101__.FixedTabConverter, _ElementProcessors_MultiControls_Multiple_MultipleConverter__WEBPACK_IMPORTED_MODULE_103__.MultipleConverter, _ElementProcessors_Action_ExcelPastePanel_ExcelPastePanelConverter__WEBPACK_IMPORTED_MODULE_104__.ExcelPastePanelConverter, _ElementProcessors_ValueEditors_ReferencedFields_ReferencedFieldsConverter__WEBPACK_IMPORTED_MODULE_105__.ReferencedFieldsConverter, _ElementProcessors_FormParts_UserPicklist_UserPicklistConverter__WEBPACK_IMPORTED_MODULE_106__.UserPicklistConverter, _ElementProcessors_ValueEditors_TaxRebate_TaxRebateConverter__WEBPACK_IMPORTED_MODULE_107__.TaxRebateConverter];
|
|
130515
130506
|
return new Map(converters.map(converterClass => [converterClass.getAcceptNodeClass(), converterClass]));
|
|
130516
130507
|
}
|
|
130517
130508
|
|
|
@@ -132602,9 +132593,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132602
132593
|
/* harmony import */ var _common_ConditionUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../common/ConditionUtils */ "./Generator/src/common/ConditionUtils.ts");
|
|
132603
132594
|
/* harmony import */ var _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../../Common/KCLangRuntimeUtils */ "./Common/KCLangRuntimeUtils.ts");
|
|
132604
132595
|
/* harmony import */ var _RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../RequisiteLIst/requisiteList */ "./Generator/src/generators/RequisiteLIst/requisiteList.ts");
|
|
132605
|
-
/* harmony import */ var
|
|
132606
|
-
/* harmony import */ var
|
|
132607
|
-
/* harmony import */ var
|
|
132596
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
132597
|
+
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
132598
|
+
/* harmony import */ var _ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/PathHelper */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/PathHelper.ts");
|
|
132599
|
+
/* harmony import */ var _IfNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./IfNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ControlFlow/If/IfNode.ts");
|
|
132600
|
+
|
|
132608
132601
|
|
|
132609
132602
|
|
|
132610
132603
|
|
|
@@ -132617,26 +132610,76 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132617
132610
|
|
|
132618
132611
|
class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
|
|
132619
132612
|
static getAcceptNodeClass() {
|
|
132620
|
-
return
|
|
132613
|
+
return _IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode;
|
|
132621
132614
|
}
|
|
132622
132615
|
|
|
132623
132616
|
doGetRequisites() {
|
|
132624
|
-
const node = this.getCurrentNodeAs(
|
|
132617
|
+
const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
|
|
132625
132618
|
return (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getRequisitesFromEvaluableProps)(node.condition);
|
|
132626
132619
|
}
|
|
132627
132620
|
|
|
132621
|
+
getDepsWithResolvedPath(condition, evaluatorsContextPathExpression) {
|
|
132622
|
+
const deps = (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getPathsFromEvaluablePropValue)(condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
|
|
132623
|
+
return deps.filter(p => !p.toLegacyPath().startsWith("@")).map(x => evaluatorsContextPathExpression.toCurrentIteration().joinWith(x));
|
|
132624
|
+
}
|
|
132625
|
+
|
|
132626
|
+
buildChildrenValidations(validationGenerator) {
|
|
132627
|
+
const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
|
|
132628
|
+
|
|
132629
|
+
if (node.then != undefined) {
|
|
132630
|
+
const evaluatorsContextPathExpression = this.getEvaluatorsContextPathExpression();
|
|
132631
|
+
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_4__.convertConditionToJsOrFailWithFriendlySugarError)(this.getCondition(node), "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_5__.KCLangRuntimeUtils.kcLangUtilsName, node, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_9__.extractPath)(x => x.condition));
|
|
132632
|
+
const condition = conditionWithDependencies.condition;
|
|
132633
|
+
const deps = this.getDepsWithResolvedPath(condition, evaluatorsContextPathExpression);
|
|
132634
|
+
validationGenerator.pushVisibilityCondition([condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(), evaluatorsContextPathExpression, deps]);
|
|
132635
|
+
|
|
132636
|
+
try {
|
|
132637
|
+
super.buildChildrenValidations(validationGenerator, Iterator.from(node.then.children));
|
|
132638
|
+
} finally {
|
|
132639
|
+
validationGenerator.popVisibilityCondition();
|
|
132640
|
+
}
|
|
132641
|
+
|
|
132642
|
+
if (node.else != undefined) {
|
|
132643
|
+
validationGenerator.pushVisibilityCondition(["!(" + (condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)()) + ")", evaluatorsContextPathExpression, this.getDepsWithResolvedPath(condition, evaluatorsContextPathExpression)]);
|
|
132644
|
+
|
|
132645
|
+
try {
|
|
132646
|
+
super.buildChildrenValidations(validationGenerator, Iterator.from(node.else.children));
|
|
132647
|
+
} finally {
|
|
132648
|
+
validationGenerator.popVisibilityCondition();
|
|
132649
|
+
}
|
|
132650
|
+
}
|
|
132651
|
+
} else {
|
|
132652
|
+
const evaluatorsContextPathExpression = this.getEvaluatorsContextPathExpression();
|
|
132653
|
+
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_4__.convertConditionToJsOrFailWithFriendlySugarError)(this.getCondition(node), "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_5__.KCLangRuntimeUtils.kcLangUtilsName, node, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_9__.extractPath)(x => x.condition));
|
|
132654
|
+
const condition = conditionWithDependencies.condition;
|
|
132655
|
+
validationGenerator.pushVisibilityCondition([condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(), evaluatorsContextPathExpression, this.getDepsWithResolvedPath(condition, evaluatorsContextPathExpression)]);
|
|
132656
|
+
|
|
132657
|
+
try {
|
|
132658
|
+
super.buildChildrenValidations(validationGenerator);
|
|
132659
|
+
} finally {
|
|
132660
|
+
validationGenerator.popVisibilityCondition();
|
|
132661
|
+
}
|
|
132662
|
+
}
|
|
132663
|
+
}
|
|
132664
|
+
|
|
132665
|
+
getCondition(node) {
|
|
132666
|
+
var _node$condition;
|
|
132667
|
+
|
|
132668
|
+
return node.isIndividual === undefined ? (_node$condition = node.condition) !== null && _node$condition !== void 0 ? _node$condition : "" : `path("@settings/isIndividual") === ${node.isIndividual}`;
|
|
132669
|
+
}
|
|
132670
|
+
|
|
132628
132671
|
doBuildDataDeclaration(context) {
|
|
132629
132672
|
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
|
|
132630
132673
|
}
|
|
132631
132674
|
|
|
132632
132675
|
buildChildrenDataDeclaration(context) {
|
|
132633
|
-
const node = this.getCurrentNodeAs(
|
|
132676
|
+
const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
|
|
132634
132677
|
return context.processChildrenDataDeclaration(node.children, x => {
|
|
132635
|
-
if (x instanceof
|
|
132678
|
+
if (x instanceof _IfNode__WEBPACK_IMPORTED_MODULE_10__.ThenNode) {
|
|
132636
132679
|
return context.processChildrenDataDeclaration(x.children);
|
|
132637
132680
|
}
|
|
132638
132681
|
|
|
132639
|
-
if (x instanceof
|
|
132682
|
+
if (x instanceof _IfNode__WEBPACK_IMPORTED_MODULE_10__.ElseNode) {
|
|
132640
132683
|
return context.processChildrenDataDeclaration(x.children);
|
|
132641
132684
|
}
|
|
132642
132685
|
|
|
@@ -132645,12 +132688,12 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
|
|
|
132645
132688
|
}
|
|
132646
132689
|
|
|
132647
132690
|
*doTraverseChildren() {
|
|
132648
|
-
const node = this.getCurrentNodeAs(
|
|
132691
|
+
const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
|
|
132649
132692
|
|
|
132650
132693
|
for (const child of node.children) {
|
|
132651
|
-
if (child instanceof
|
|
132694
|
+
if (child instanceof _IfNode__WEBPACK_IMPORTED_MODULE_10__.ThenNode) {
|
|
132652
132695
|
yield* child.children;
|
|
132653
|
-
} else if (child instanceof
|
|
132696
|
+
} else if (child instanceof _IfNode__WEBPACK_IMPORTED_MODULE_10__.ElseNode) {
|
|
132654
132697
|
yield* child.children;
|
|
132655
132698
|
} else {
|
|
132656
132699
|
yield child;
|
|
@@ -132661,10 +132704,10 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
|
|
|
132661
132704
|
doConvert(context) {
|
|
132662
132705
|
var _node$then, _node$else;
|
|
132663
132706
|
|
|
132664
|
-
const node = this.getCurrentNodeAs(
|
|
132707
|
+
const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_10__.IfNode);
|
|
132665
132708
|
const builder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("If");
|
|
132666
132709
|
|
|
132667
|
-
if (node.isIndividual == undefined && (0,
|
|
132710
|
+
if (node.isIndividual == undefined && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.isNullOrWhiteSpace)(node.condition)) {
|
|
132668
132711
|
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError(`ifnode должна иметь свойство condition или isIndividual`, node, "condition");
|
|
132669
132712
|
}
|
|
132670
132713
|
|
|
@@ -132672,19 +132715,19 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
|
|
|
132672
132715
|
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError(`Выберите или condition или isIndividual`, node, "condition");
|
|
132673
132716
|
}
|
|
132674
132717
|
|
|
132675
|
-
const condition = node.isIndividual
|
|
132676
|
-
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_4__.convertConditionToJsOrFailWithFriendlySugarError)(condition !== null && condition !== void 0 ? condition : (0,
|
|
132718
|
+
const condition = node.isIndividual === undefined ? node.condition : `path("@settings/isIndividual") === '${node.isIndividual}'`;
|
|
132719
|
+
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_4__.convertConditionToJsOrFailWithFriendlySugarError)(condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(), "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_5__.KCLangRuntimeUtils.kcLangUtilsName, node, "condition");
|
|
132677
132720
|
const thenBuilder = builder.createChild("Then");
|
|
132678
132721
|
thenBuilder.appendChild(context.convertChildNodes(((_node$then = node.then) !== null && _node$then !== void 0 ? _node$then : node).children));
|
|
132679
132722
|
thenBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
132680
|
-
thenBuilder.prop(x => x.positiveCondition).set((0,
|
|
132723
|
+
thenBuilder.prop(x => x.positiveCondition).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_8__.buildExpressionPropValue)(conditionWithDependencies.condition, conditionWithDependencies.dependencies));
|
|
132681
132724
|
|
|
132682
132725
|
if (((_node$else = node.else) === null || _node$else === void 0 ? void 0 : _node$else.children) !== undefined) {
|
|
132683
132726
|
var _node$else2;
|
|
132684
132727
|
|
|
132685
132728
|
const elseBuilder = builder.createChild("Else");
|
|
132686
132729
|
elseBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
132687
|
-
elseBuilder.prop(x => x.positiveCondition).set((0,
|
|
132730
|
+
elseBuilder.prop(x => x.positiveCondition).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_8__.buildExpressionPropValue)(conditionWithDependencies.condition, conditionWithDependencies.dependencies));
|
|
132688
132731
|
elseBuilder.appendChild(context.convertChildNodes((_node$else2 = node.else) === null || _node$else2 === void 0 ? void 0 : _node$else2.children));
|
|
132689
132732
|
}
|
|
132690
132733
|
|
|
@@ -132891,8 +132934,6 @@ let OtherwiseNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MOD
|
|
|
132891
132934
|
"use strict";
|
|
132892
132935
|
__webpack_require__.r(__webpack_exports__);
|
|
132893
132936
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
132894
|
-
/* harmony export */ "SwitchDefaultConverter": () => (/* binding */ SwitchDefaultConverter),
|
|
132895
|
-
/* harmony export */ "SwitchCaseConverter": () => (/* binding */ SwitchCaseConverter),
|
|
132896
132937
|
/* harmony export */ "SwitchConverter": () => (/* binding */ SwitchConverter)
|
|
132897
132938
|
/* harmony export */ });
|
|
132898
132939
|
/* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../DataDeclarationGenerator/DataDeclarationGenerationContext */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationContext.ts");
|
|
@@ -132902,86 +132943,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132902
132943
|
/* harmony import */ var _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../Common/KCLangRuntimeUtils */ "./Common/KCLangRuntimeUtils.ts");
|
|
132903
132944
|
/* harmony import */ var _ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/PathHelper */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/PathHelper.ts");
|
|
132904
132945
|
/* harmony import */ var _RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../RequisiteLIst/requisiteList */ "./Generator/src/generators/RequisiteLIst/requisiteList.ts");
|
|
132905
|
-
/* harmony import */ var
|
|
132906
|
-
/* harmony import */ var
|
|
132907
|
-
|
|
132908
|
-
|
|
132909
|
-
|
|
132910
|
-
|
|
132911
|
-
|
|
132912
|
-
|
|
132913
|
-
|
|
132914
|
-
|
|
132915
|
-
|
|
132916
|
-
class SwitchDefaultConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
|
|
132917
|
-
static getAcceptNodeClass() {
|
|
132918
|
-
return _SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchDefaultNode;
|
|
132919
|
-
}
|
|
132946
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
132947
|
+
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
132948
|
+
/* harmony import */ var _SwitchNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./SwitchNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ControlFlow/Switch/SwitchNode.ts");
|
|
132920
132949
|
|
|
132921
|
-
doBuildDataDeclaration(context) {
|
|
132922
|
-
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
|
|
132923
|
-
}
|
|
132924
132950
|
|
|
132925
|
-
buildChildrenDataDeclaration(context) {
|
|
132926
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchDefaultNode);
|
|
132927
|
-
return context.processChildrenDataDeclaration(node.children);
|
|
132928
|
-
}
|
|
132929
|
-
|
|
132930
|
-
*doTraverseChildren() {
|
|
132931
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchDefaultNode);
|
|
132932
|
-
yield* node.children;
|
|
132933
|
-
}
|
|
132934
132951
|
|
|
132935
|
-
doConvert(context) {
|
|
132936
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchDefaultNode);
|
|
132937
|
-
const builder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("SwitchDefault");
|
|
132938
|
-
builder.appendChild(context.convertChildNodes(node.children));
|
|
132939
|
-
return builder.buildConverterResult();
|
|
132940
|
-
}
|
|
132941
132952
|
|
|
132942
|
-
}
|
|
132943
|
-
class SwitchCaseConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
|
|
132944
|
-
static getAcceptNodeClass() {
|
|
132945
|
-
return _SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchCaseNode;
|
|
132946
|
-
}
|
|
132947
132953
|
|
|
132948
|
-
doBuildDataDeclaration(context) {
|
|
132949
|
-
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_0__.emptyDataDeclarationCollection;
|
|
132950
|
-
}
|
|
132951
132954
|
|
|
132952
|
-
buildChildrenDataDeclaration(context) {
|
|
132953
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchCaseNode);
|
|
132954
|
-
return context.processChildrenDataDeclaration(node.children);
|
|
132955
|
-
}
|
|
132956
132955
|
|
|
132957
|
-
doGetRequisites() {
|
|
132958
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchCaseNode);
|
|
132959
|
-
return (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getRequisitesFromEvaluableProps)(node.condition);
|
|
132960
|
-
}
|
|
132961
132956
|
|
|
132962
|
-
*doTraverseChildren() {
|
|
132963
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchCaseNode);
|
|
132964
|
-
yield* node.children;
|
|
132965
|
-
}
|
|
132966
132957
|
|
|
132967
|
-
doConvert(context) {
|
|
132968
|
-
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_8__.SwitchCaseNode);
|
|
132969
|
-
const builder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("SwitchCase");
|
|
132970
|
-
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_3__.convertConditionToJsOrFailWithFriendlySugarError)(node.condition, "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_4__.KCLangRuntimeUtils.kcLangUtilsName, node, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_5__.extractPath)(x => x.condition));
|
|
132971
|
-
builder.prop(x => x.condition).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_7__.buildExpressionPropValue)(conditionWithDependencies.condition, conditionWithDependencies.dependencies));
|
|
132972
|
-
builder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
132973
|
-
builder.appendChild(context.convertChildNodes(node.children));
|
|
132974
|
-
return builder.buildConverterResult();
|
|
132975
|
-
}
|
|
132976
132958
|
|
|
132977
|
-
}
|
|
132978
132959
|
class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
|
|
132979
132960
|
static getAcceptNodeClass() {
|
|
132980
|
-
return
|
|
132961
|
+
return _SwitchNode__WEBPACK_IMPORTED_MODULE_9__.SwitchNode;
|
|
132981
132962
|
}
|
|
132982
132963
|
|
|
132983
132964
|
doGetRequisites() {
|
|
132984
|
-
const node = this.getCurrentNodeAs(
|
|
132965
|
+
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_9__.SwitchNode);
|
|
132985
132966
|
return node.cases.flatMap(x => (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getRequisitesFromEvaluableProps)(x.condition));
|
|
132986
132967
|
}
|
|
132987
132968
|
|
|
@@ -132992,12 +132973,12 @@ class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.S
|
|
|
132992
132973
|
buildChildrenDataDeclaration(context) {
|
|
132993
132974
|
var _node$default, _node$default2;
|
|
132994
132975
|
|
|
132995
|
-
const node = this.getCurrentNodeAs(
|
|
132976
|
+
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_9__.SwitchNode);
|
|
132996
132977
|
return context.mergeDataDeclaration(...node.cases.map(x => context.processChildrenDataDeclaration(x.children)).flat(), ((_node$default = node.default) === null || _node$default === void 0 ? void 0 : _node$default.children) && context.processChildrenDataDeclaration((_node$default2 = node.default) === null || _node$default2 === void 0 ? void 0 : _node$default2.children));
|
|
132997
132978
|
}
|
|
132998
132979
|
|
|
132999
132980
|
*doTraverseChildren() {
|
|
133000
|
-
const node = this.getCurrentNodeAs(
|
|
132981
|
+
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_9__.SwitchNode);
|
|
133001
132982
|
yield* node.cases;
|
|
133002
132983
|
|
|
133003
132984
|
if (node.default != undefined) {
|
|
@@ -133005,8 +132986,46 @@ class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.S
|
|
|
133005
132986
|
}
|
|
133006
132987
|
}
|
|
133007
132988
|
|
|
132989
|
+
getDepsWithResolvedPath(condition, evaluatorsContextPathExpression) {
|
|
132990
|
+
const deps = (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getPathsFromEvaluablePropValue)(condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
|
|
132991
|
+
return deps.filter(p => !p.toLegacyPath().startsWith("@")).map(x => evaluatorsContextPathExpression.toCurrentIteration().joinWith(x));
|
|
132992
|
+
}
|
|
132993
|
+
|
|
132994
|
+
buildChildrenValidations(validationGenerator) {
|
|
132995
|
+
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_9__.SwitchNode);
|
|
132996
|
+
const evaluatorsContextPathExpression = this.getEvaluatorsContextPathExpression();
|
|
132997
|
+
const prevConditions = [];
|
|
132998
|
+
|
|
132999
|
+
for (const caseNode of node.cases) {
|
|
133000
|
+
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_3__.convertConditionToJsOrFailWithFriendlySugarError)(caseNode.condition, "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_4__.KCLangRuntimeUtils.kcLangUtilsName, node, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_5__.extractPath)(x => x.condition));
|
|
133001
|
+
const condition = conditionWithDependencies.condition;
|
|
133002
|
+
const currentCaseCondition = prevConditions.length ? prevConditions.map(x => `!(${x})`).join(" && ") + " && " + condition : condition;
|
|
133003
|
+
const deps = this.getDepsWithResolvedPath(currentCaseCondition, evaluatorsContextPathExpression);
|
|
133004
|
+
prevConditions.push(currentCaseCondition);
|
|
133005
|
+
validationGenerator.pushVisibilityCondition([currentCaseCondition, evaluatorsContextPathExpression, deps]);
|
|
133006
|
+
|
|
133007
|
+
try {
|
|
133008
|
+
super.buildChildrenValidations(validationGenerator, Iterator.from(caseNode.children));
|
|
133009
|
+
} finally {
|
|
133010
|
+
validationGenerator.popVisibilityCondition();
|
|
133011
|
+
}
|
|
133012
|
+
}
|
|
133013
|
+
|
|
133014
|
+
if (node.default != undefined) {
|
|
133015
|
+
const defaultCondition = prevConditions.map(x => `!(${x})`).join(" && ");
|
|
133016
|
+
const deps = this.getDepsWithResolvedPath(defaultCondition, evaluatorsContextPathExpression);
|
|
133017
|
+
validationGenerator.pushVisibilityCondition([defaultCondition, evaluatorsContextPathExpression, deps]);
|
|
133018
|
+
|
|
133019
|
+
try {
|
|
133020
|
+
super.buildChildrenValidations(validationGenerator, Iterator.from(node.default.children));
|
|
133021
|
+
} finally {
|
|
133022
|
+
validationGenerator.popVisibilityCondition();
|
|
133023
|
+
}
|
|
133024
|
+
}
|
|
133025
|
+
}
|
|
133026
|
+
|
|
133008
133027
|
doConvert(context) {
|
|
133009
|
-
const node = this.getCurrentNodeAs(
|
|
133028
|
+
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_9__.SwitchNode);
|
|
133010
133029
|
const builder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("Switch");
|
|
133011
133030
|
const prevConditions = [];
|
|
133012
133031
|
|
|
@@ -133014,7 +133033,7 @@ class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.S
|
|
|
133014
133033
|
const caseBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("SwitchCase");
|
|
133015
133034
|
caseBuilder.prop(x => x.prevCaseConditions).set([...prevConditions]);
|
|
133016
133035
|
const conditionWithDependencies = (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_3__.convertConditionToJsOrFailWithFriendlySugarError)(caseNode.condition, "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_4__.KCLangRuntimeUtils.kcLangUtilsName, node, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_5__.extractPath)(x => x.condition));
|
|
133017
|
-
const currentCaseCondition = (0,
|
|
133036
|
+
const currentCaseCondition = (0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_8__.buildExpressionPropValue)(conditionWithDependencies.condition, conditionWithDependencies.dependencies);
|
|
133018
133037
|
caseBuilder.prop(x => x.condition).set(currentCaseCondition);
|
|
133019
133038
|
prevConditions.push(currentCaseCondition);
|
|
133020
133039
|
caseBuilder.prop(x => x.evaluatorsContextPath).set(this.getEvaluatorsContextPathExpression());
|
|
@@ -135921,7 +135940,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
135921
135940
|
type: "Expression",
|
|
135922
135941
|
expression: validationGenerator.generateValidationsFactory()
|
|
135923
135942
|
});
|
|
135924
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry
|
|
135943
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry);
|
|
135925
135944
|
userPicklistDeclarationBuilder.prop(x => x.editorDataDeclaration).set({
|
|
135926
135945
|
type: "Expression",
|
|
135927
135946
|
expression: dataDeclarationGenerator.generateDataDeclarationFactory()
|
|
@@ -140749,10 +140768,10 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
140749
140768
|
}
|
|
140750
140769
|
|
|
140751
140770
|
if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.MultilineNode) {
|
|
140752
|
-
var
|
|
140771
|
+
var _rowNode$optional2;
|
|
140753
140772
|
|
|
140754
140773
|
this.ensurePathExists(rowNode, rowNode.dataScope.path);
|
|
140755
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((
|
|
140774
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
140756
140775
|
optional: rowNode.optional
|
|
140757
140776
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => {
|
|
140758
140777
|
if (rowNode2 instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.CrossfitTableRowNode) {
|
|
@@ -142674,10 +142693,10 @@ class MultilineFieldConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
142674
142693
|
}
|
|
142675
142694
|
|
|
142676
142695
|
doBuildDataDeclaration(context) {
|
|
142677
|
-
var
|
|
142696
|
+
var _node$optional;
|
|
142678
142697
|
|
|
142679
142698
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
142680
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
142699
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
|
|
142681
142700
|
optional: node.optional
|
|
142682
142701
|
}), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
142683
142702
|
}
|
|
@@ -142843,10 +142862,10 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
142843
142862
|
}
|
|
142844
142863
|
|
|
142845
142864
|
doBuildDataDeclaration(context) {
|
|
142846
|
-
var
|
|
142865
|
+
var _node$optional;
|
|
142847
142866
|
|
|
142848
142867
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
142849
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
142868
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
|
|
142850
142869
|
optional: node.optional
|
|
142851
142870
|
}), context.addPathSectionDeclarationEntry(node));
|
|
142852
142871
|
}
|
|
@@ -144026,9 +144045,9 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
144026
144045
|
|
|
144027
144046
|
processMultilineNode(context, rowNode) {
|
|
144028
144047
|
if (rowNode instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.StickyTableMultilineNode) {
|
|
144029
|
-
var
|
|
144048
|
+
var _rowNode$optional;
|
|
144030
144049
|
|
|
144031
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((
|
|
144050
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
144032
144051
|
optional: rowNode.optional
|
|
144033
144052
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => this.processMultilineRowNode(context, rowNode2)));
|
|
144034
144053
|
}
|
|
@@ -144101,11 +144120,11 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
144101
144120
|
const sideSize = (_node$side2 = node.side) !== null && _node$side2 !== void 0 ? _node$side2 : 0;
|
|
144102
144121
|
|
|
144103
144122
|
if (this.isSimpleForm()) {
|
|
144104
|
-
var
|
|
144123
|
+
var _ref, _node$deprecatedDiado;
|
|
144105
144124
|
|
|
144106
144125
|
mb.prop(x => x.maxWidth).set(orientation === "landscape" ? maxWidth : undefined);
|
|
144107
144126
|
mb.prop(x => x.sideSize).set(this.hasActionButton(node) && sideSize !== 0 ? sideSize + 1 : sideSize);
|
|
144108
|
-
const width = (
|
|
144127
|
+
const width = (_ref = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref !== void 0 ? _ref : maxWidthSimpleForm;
|
|
144109
144128
|
mb.prop(x => x.width).set(width);
|
|
144110
144129
|
mb.prop(x => x.footerHeight).set(160);
|
|
144111
144130
|
} else {
|
|
@@ -144388,10 +144407,10 @@ BindingPath: ${errorPath}`));
|
|
|
144388
144407
|
if (this.isSimpleForm()) {
|
|
144389
144408
|
mb.prop(x => x.buttonType).set(undefined);
|
|
144390
144409
|
} else {
|
|
144391
|
-
var _multiline$rowmenu,
|
|
144410
|
+
var _multiline$rowmenu, _ref2, _tableNode$removeButt;
|
|
144392
144411
|
|
|
144393
144412
|
const rowMenu = (_multiline$rowmenu = multiline.rowmenu) !== null && _multiline$rowmenu !== void 0 ? _multiline$rowmenu : false;
|
|
144394
|
-
const removebutton = (
|
|
144413
|
+
const removebutton = (_ref2 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref2 !== void 0 ? _ref2 : true;
|
|
144395
144414
|
mb.prop(x => x.buttonType).set(rowMenu ? "RowMenu" : removebutton ? "RemoveRowButton" : undefined);
|
|
144396
144415
|
}
|
|
144397
144416
|
|
|
@@ -144404,7 +144423,7 @@ BindingPath: ${errorPath}`));
|
|
|
144404
144423
|
}
|
|
144405
144424
|
|
|
144406
144425
|
getMultiline(context, node, multiline, start, end = Infinity) {
|
|
144407
|
-
var
|
|
144426
|
+
var _ref3, _node$removeButton, _multiline$rowmenu2, _ref4, _node$removeButton2, _context$popPathsCont2;
|
|
144408
144427
|
|
|
144409
144428
|
const overrideInfo = multiline.override ? context.controlCustomizationContext.getControlCustomizationInfo("multiline", multiline.override) : undefined;
|
|
144410
144429
|
const mb = overrideInfo == undefined ? (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("MultiLine") : (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)(overrideInfo.dependencies, overrideInfo.controlName);
|
|
@@ -144417,7 +144436,7 @@ BindingPath: ${errorPath}`));
|
|
|
144417
144436
|
mb.prop(x => x.isList).set(multiline.usepager === false ? true : undefined);
|
|
144418
144437
|
mb.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_13__.getNewBindingPathExpression)(multiline));
|
|
144419
144438
|
mb.prop(x => x.showRowBorder).set(multiline.showRowBorder);
|
|
144420
|
-
const hasRemoveButton = ((
|
|
144439
|
+
const hasRemoveButton = ((_ref3 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
|
|
144421
144440
|
const needAddButton = multiline.addbutton !== "false";
|
|
144422
144441
|
|
|
144423
144442
|
if (this.isSimpleForm()) {
|
|
@@ -144430,7 +144449,7 @@ BindingPath: ${errorPath}`));
|
|
|
144430
144449
|
mb.prop(x => x.removeButtonPosition).set(undefined);
|
|
144431
144450
|
}
|
|
144432
144451
|
|
|
144433
|
-
mb.prop(x => x.disableScroll).set(needAddButton || ((
|
|
144452
|
+
mb.prop(x => x.disableScroll).set(needAddButton || ((_ref4 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) ? undefined : true);
|
|
144434
144453
|
context.pushPathsContext();
|
|
144435
144454
|
|
|
144436
144455
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.arrayHasLength)(multiline.rows, 1)) {
|
|
@@ -144456,9 +144475,9 @@ BindingPath: ${errorPath}`));
|
|
|
144456
144475
|
hasActionButton(node) {
|
|
144457
144476
|
const multilines = node.rows.map(child => (0,_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)(child) ? child : child.columns.find(_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined);
|
|
144458
144477
|
return multilines.some(multiline => {
|
|
144459
|
-
var
|
|
144478
|
+
var _ref5, _node$removeButton3;
|
|
144460
144479
|
|
|
144461
|
-
return ((
|
|
144480
|
+
return ((_ref5 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) || multiline.rowmenu;
|
|
144462
144481
|
});
|
|
144463
144482
|
}
|
|
144464
144483
|
|
|
@@ -144684,10 +144703,10 @@ class Table2MultirowConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
144684
144703
|
}
|
|
144685
144704
|
|
|
144686
144705
|
doBuildDataDeclaration(context) {
|
|
144687
|
-
var
|
|
144706
|
+
var _node$optional;
|
|
144688
144707
|
|
|
144689
144708
|
const node = this.getCurrentNodeAs(_Table2Node__WEBPACK_IMPORTED_MODULE_3__.Table2MultirowNode);
|
|
144690
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
144709
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
144691
144710
|
}
|
|
144692
144711
|
|
|
144693
144712
|
buildChildrenDataDeclaration(context) {
|
|
@@ -145506,10 +145525,10 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
145506
145525
|
}
|
|
145507
145526
|
|
|
145508
145527
|
doBuildDataDeclaration(context) {
|
|
145509
|
-
var
|
|
145528
|
+
var _node$optional;
|
|
145510
145529
|
|
|
145511
145530
|
const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
|
|
145512
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
145531
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
145513
145532
|
}
|
|
145514
145533
|
|
|
145515
145534
|
buildChildrenDataDeclaration(context) {
|
|
@@ -146815,7 +146834,7 @@ class CheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
146815
146834
|
|
|
146816
146835
|
doBuildNodeValidations(validationGenerator) {
|
|
146817
146836
|
const node = this.getCurrentNodeAs(_CheckboxNode__WEBPACK_IMPORTED_MODULE_5__.CheckboxNode);
|
|
146818
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
146837
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
146819
146838
|
}
|
|
146820
146839
|
|
|
146821
146840
|
doBuildDataDeclaration(context) {
|
|
@@ -147026,7 +147045,7 @@ class ComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__
|
|
|
147026
147045
|
|
|
147027
147046
|
doBuildNodeValidations(validationGenerator) {
|
|
147028
147047
|
const node = this.getCurrentNodeAs(_ComboBoxNode__WEBPACK_IMPORTED_MODULE_6__.ComboBoxNode);
|
|
147029
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription);
|
|
147048
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription, undefined);
|
|
147030
147049
|
}
|
|
147031
147050
|
|
|
147032
147051
|
doGetRequisites() {
|
|
@@ -147530,7 +147549,7 @@ class DateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Sug
|
|
|
147530
147549
|
|
|
147531
147550
|
doBuildNodeValidations(validationGenerator) {
|
|
147532
147551
|
const node = this.getCurrentNodeAs(_DateNode__WEBPACK_IMPORTED_MODULE_6__.DateNode);
|
|
147533
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
147552
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
147534
147553
|
}
|
|
147535
147554
|
|
|
147536
147555
|
get nodePaths() {
|
|
@@ -147754,7 +147773,7 @@ class DiadocSuggestComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORT
|
|
|
147754
147773
|
|
|
147755
147774
|
doBuildNodeValidations(validationGenerator) {
|
|
147756
147775
|
const node = this.getCurrentNodeAs(_DiadocSuggestComboBoxNode__WEBPACK_IMPORTED_MODULE_5__.DiadocSuggestComboBoxNode);
|
|
147757
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
147776
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
147758
147777
|
}
|
|
147759
147778
|
|
|
147760
147779
|
get nodePaths() {
|
|
@@ -147937,7 +147956,7 @@ class ExpertNoteConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
|
|
|
147937
147956
|
|
|
147938
147957
|
doBuildNodeValidations(validationGenerator) {
|
|
147939
147958
|
const node = this.getCurrentNodeAs(_ExpertNoteNode__WEBPACK_IMPORTED_MODULE_3__.ExpertNoteNode);
|
|
147940
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
147959
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
147941
147960
|
}
|
|
147942
147961
|
|
|
147943
147962
|
doBuildDataDeclaration(context) {
|
|
@@ -149170,7 +149189,7 @@ class INNConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Suga
|
|
|
149170
149189
|
|
|
149171
149190
|
doBuildNodeValidations(validationGenerator) {
|
|
149172
149191
|
const node = this.getCurrentNodeAs(_INNNode__WEBPACK_IMPORTED_MODULE_3__.INNNode);
|
|
149173
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
149192
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
149174
149193
|
}
|
|
149175
149194
|
|
|
149176
149195
|
doBuildDataDeclaration(context) {
|
|
@@ -149328,7 +149347,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Su
|
|
|
149328
149347
|
|
|
149329
149348
|
doBuildNodeValidations(validationGenerator) {
|
|
149330
149349
|
const node = this.getCurrentNodeAs(_InputNode__WEBPACK_IMPORTED_MODULE_7__.InputNode);
|
|
149331
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
149350
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
149332
149351
|
}
|
|
149333
149352
|
|
|
149334
149353
|
doBuildDataDeclaration(context) {
|
|
@@ -149944,15 +149963,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
149944
149963
|
|
|
149945
149964
|
|
|
149946
149965
|
function setCurrencyProps(markupBuilder, context, node) {
|
|
149947
|
-
var _typeNode$base, _node$currency;
|
|
149948
|
-
|
|
149949
149966
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
149950
149967
|
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
149951
|
-
|
|
149952
|
-
|
|
149953
|
-
|
|
149968
|
+
markupBuilder.prop(x => x.currency).set(node.currency);
|
|
149969
|
+
|
|
149970
|
+
if (node.currency) {
|
|
149971
|
+
var _typeNode$base;
|
|
149972
|
+
|
|
149973
|
+
const baseTypeName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
149954
149974
|
|
|
149955
|
-
if (currency) {
|
|
149956
149975
|
if (baseTypeName === "decimal") {
|
|
149957
149976
|
var _typeNode$flattenType, _typeNode$flattenType2, _ref, _ref2, _ref3, _ref4, _typeNode$flattenType3, _typeNode$flattenType4, _typeNode$flattenType5, _typeNode$flattenType6, _typeNode$flattenType7, _typeNode$flattenType8, _typeNode$flattenType9, _typeNode$flattenType10;
|
|
149958
149977
|
|
|
@@ -149978,14 +149997,11 @@ function setCurrencyProps(markupBuilder, context, node) {
|
|
|
149978
149997
|
} else if (maxLength == undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
149979
149998
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
149980
149999
|
markupBuilder.prop(x => x.currencyFractionDigits).set(2);
|
|
149981
|
-
} else if (maxLength != undefined && fractionDigits != undefined && integerDigits != undefined) {
|
|
149982
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
149983
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
149984
150000
|
} else if (totalDigits != undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
149985
150001
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(totalDigits);
|
|
149986
150002
|
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
149987
150003
|
} else {
|
|
149988
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError(
|
|
150004
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor with decimal type with length, maxLength or totaldigits constraints", node, "currency");
|
|
149989
150005
|
}
|
|
149990
150006
|
} else if (baseTypeName === "integer") {
|
|
149991
150007
|
var _ref5, _typeNode$flattenType11, _typeNode$flattenType12, _ref6, _typeNode$flattenType13, _typeNode$flattenType14, _ref7, _typeNode$flattenType15, _typeNode$flattenType16;
|
|
@@ -150044,7 +150060,7 @@ class KladrConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_5__.Su
|
|
|
150044
150060
|
|
|
150045
150061
|
doBuildNodeValidations(validationGenerator) {
|
|
150046
150062
|
const node = this.getCurrentNodeAs(_KladrNode__WEBPACK_IMPORTED_MODULE_7__.KladrNode);
|
|
150047
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
150063
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
150048
150064
|
}
|
|
150049
150065
|
|
|
150050
150066
|
buildSugarAutoCalculations() {
|
|
@@ -150372,7 +150388,7 @@ class PicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__
|
|
|
150372
150388
|
|
|
150373
150389
|
doBuildNodeValidations(validationGenerator) {
|
|
150374
150390
|
const node = this.getCurrentNodeAs(_PicklistNode__WEBPACK_IMPORTED_MODULE_6__.PicklistNode);
|
|
150375
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription);
|
|
150391
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription, undefined);
|
|
150376
150392
|
}
|
|
150377
150393
|
|
|
150378
150394
|
*doBuildNormalizeRules(builder) {
|
|
@@ -150828,7 +150844,7 @@ class RadioGroupConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
|
|
|
150828
150844
|
|
|
150829
150845
|
doBuildNodeValidations(validationGenerator) {
|
|
150830
150846
|
const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_4__.RadioGroupNode);
|
|
150831
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
150847
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
150832
150848
|
}
|
|
150833
150849
|
|
|
150834
150850
|
doBuildNormalizeRules(builder) {
|
|
@@ -151195,7 +151211,7 @@ class SelectConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.S
|
|
|
151195
151211
|
|
|
151196
151212
|
doBuildNodeValidations(validationGenerator) {
|
|
151197
151213
|
const node = this.getCurrentNodeAs(_SelectNode__WEBPACK_IMPORTED_MODULE_6__.SelectNode);
|
|
151198
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription);
|
|
151214
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), node.gId, node.validationInfo.emptydescription, undefined);
|
|
151199
151215
|
}
|
|
151200
151216
|
|
|
151201
151217
|
doBuildDataDeclaration(context) {
|
|
@@ -151591,7 +151607,7 @@ class TaxRebateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3_
|
|
|
151591
151607
|
|
|
151592
151608
|
doBuildNodeValidations(validationGenerator) {
|
|
151593
151609
|
const node = this.getCurrentNodeAs(_TaxRebateNode__WEBPACK_IMPORTED_MODULE_7__.TaxRebateNode);
|
|
151594
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
151610
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
151595
151611
|
}
|
|
151596
151612
|
|
|
151597
151613
|
doBuildDataDeclaration(context) {
|
|
@@ -151793,7 +151809,7 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
151793
151809
|
|
|
151794
151810
|
doBuildNodeValidations(validationGenerator) {
|
|
151795
151811
|
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
151796
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
151812
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
151797
151813
|
}
|
|
151798
151814
|
|
|
151799
151815
|
doBuildDataDeclaration(context) {
|
|
@@ -152062,7 +152078,7 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
152062
152078
|
|
|
152063
152079
|
doBuildNodeValidations(validationGenerator) {
|
|
152064
152080
|
const node = this.getCurrentNodeAs(_PopupTextAreaNode__WEBPACK_IMPORTED_MODULE_6__.PopupTextAreaNode);
|
|
152065
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
152081
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
152066
152082
|
}
|
|
152067
152083
|
|
|
152068
152084
|
doBuildDataDeclaration(context) {
|
|
@@ -152492,9 +152508,9 @@ class FIOConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Suga
|
|
|
152492
152508
|
const node1 = new _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.TypeNode();
|
|
152493
152509
|
node1.children = [m1, m2];
|
|
152494
152510
|
node1.base = "string";
|
|
152495
|
-
validationGenerator.processValidations((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Фамилия"), false, node1, undefined, node.emptydescription);
|
|
152496
|
-
validationGenerator.processValidations((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Имя"), false, node1, undefined, node.emptydescription);
|
|
152497
|
-
validationGenerator.processValidations((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Отчество"), true, node1, undefined, node.emptydescription);
|
|
152511
|
+
validationGenerator.processValidations((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Фамилия"), false, node1, undefined, node.emptydescription, undefined);
|
|
152512
|
+
validationGenerator.processValidations((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Имя"), false, node1, undefined, node.emptydescription, undefined);
|
|
152513
|
+
validationGenerator.processValidations((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Отчество"), true, node1, undefined, node.emptydescription, undefined);
|
|
152498
152514
|
}
|
|
152499
152515
|
|
|
152500
152516
|
doBuildDataDeclaration(context) {
|
|
@@ -152900,7 +152916,7 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
|
|
|
152900
152916
|
|
|
152901
152917
|
doBuildNodeValidations(validationGenerator) {
|
|
152902
152918
|
const node = this.getCurrentNodeAs(_TextNode__WEBPACK_IMPORTED_MODULE_9__.TextNode);
|
|
152903
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
152919
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, undefined);
|
|
152904
152920
|
}
|
|
152905
152921
|
|
|
152906
152922
|
doBuildNormalizeRules() {
|
|
@@ -153617,19 +153633,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153617
153633
|
|
|
153618
153634
|
|
|
153619
153635
|
class MarkupBuildingContext {
|
|
153620
|
-
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng,
|
|
153636
|
+
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
153621
153637
|
this.convertNode = void 0;
|
|
153622
153638
|
this.formSourcesPath = void 0;
|
|
153623
153639
|
this.helpers = void 0;
|
|
153624
153640
|
this.pathsContext = void 0;
|
|
153625
|
-
this.dataDeclarationHelper = void 0;
|
|
153626
153641
|
this.schemaRng = void 0;
|
|
153627
153642
|
this.useSchemaValidations = void 0;
|
|
153628
153643
|
this.typesRegistry = void 0;
|
|
153629
153644
|
this.uniqueControlIdIncrement = new Map();
|
|
153630
153645
|
this.controlCustomizationContext = void 0;
|
|
153631
153646
|
this.tourSteps = void 0;
|
|
153632
|
-
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
153633
153647
|
this.schemaRng = schemaRng;
|
|
153634
153648
|
this.useSchemaValidations = useSchemaValidations;
|
|
153635
153649
|
this.typesRegistry = typesRegistry;
|
|
@@ -153641,18 +153655,6 @@ class MarkupBuildingContext {
|
|
|
153641
153655
|
this.helpers = helpers;
|
|
153642
153656
|
}
|
|
153643
153657
|
|
|
153644
|
-
isNodeOptional(nodePath) {
|
|
153645
|
-
if (this.useSchemaValidations) {
|
|
153646
|
-
if (this.dataDeclarationHelper.isNodeOptional(nodePath) == false) {
|
|
153647
|
-
return this.schemaRng.getIsOptionalByPath(nodePath);
|
|
153648
|
-
} else {
|
|
153649
|
-
return true;
|
|
153650
|
-
}
|
|
153651
|
-
}
|
|
153652
|
-
|
|
153653
|
-
return this.dataDeclarationHelper.isNodeOptional(nodePath);
|
|
153654
|
-
}
|
|
153655
|
-
|
|
153656
153658
|
getUniqueControlId(context) {
|
|
153657
153659
|
let currentValue = this.uniqueControlIdIncrement.get(context);
|
|
153658
153660
|
|
|
@@ -153819,7 +153821,7 @@ class MarkupGenerator {
|
|
|
153819
153821
|
};
|
|
153820
153822
|
|
|
153821
153823
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
153822
|
-
this.markupBuilderContext = new _IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_5__.MarkupBuildingContext(this.convertNode, new _ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_7__.NodePathsContext(), formSourcesPath, helpers, tourSteps, this.controlCustomizationContext, typesRegistry, schemaRng,
|
|
153824
|
+
this.markupBuilderContext = new _IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_5__.MarkupBuildingContext(this.convertNode, new _ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_7__.NodePathsContext(), formSourcesPath, helpers, tourSteps, this.controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations);
|
|
153823
153825
|
}
|
|
153824
153826
|
|
|
153825
153827
|
generate(sugarRoot, builder) {
|
|
@@ -155678,8 +155680,8 @@ class SugarNodeConverterBase {
|
|
|
155678
155680
|
return SugarNodeConverterBase.deserializeNodeAs(nodeClass, sourceXmlNode !== null && sourceXmlNode !== void 0 ? sourceXmlNode : this.node);
|
|
155679
155681
|
}
|
|
155680
155682
|
|
|
155681
|
-
buildChildrenValidations(validationGenerator) {
|
|
155682
|
-
for (const child of this.doTraverseChildren()) {
|
|
155683
|
+
buildChildrenValidations(validationGenerator, children) {
|
|
155684
|
+
for (const child of children !== null && children !== void 0 ? children : this.doTraverseChildren()) {
|
|
155683
155685
|
const controlConverterClass = (0,_AllConverters__WEBPACK_IMPORTED_MODULE_3__.getConverterByNodeClass)((0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_7__.getNodeClass)(child));
|
|
155684
155686
|
|
|
155685
155687
|
if (controlConverterClass == undefined) {
|
|
@@ -155692,7 +155694,7 @@ class SugarNodeConverterBase {
|
|
|
155692
155694
|
|
|
155693
155695
|
if (customControl != undefined) {
|
|
155694
155696
|
const childNode = child.sourceXmlNode;
|
|
155695
|
-
validationGenerator.processValidations(this.getResolvedBindingPath(child), childNode.boolAttr("optional"), validationGenerator.getTypeNodeLegacy(childNode), undefined, undefined);
|
|
155697
|
+
validationGenerator.processValidations(this.getResolvedBindingPath(child), childNode.boolAttr("optional"), validationGenerator.getTypeNodeLegacy(childNode), undefined, undefined, undefined);
|
|
155696
155698
|
}
|
|
155697
155699
|
}
|
|
155698
155700
|
|
|
@@ -157702,23 +157704,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
157702
157704
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
157703
157705
|
/* harmony export */ "ValidationGenerator": () => (/* binding */ ValidationGenerator)
|
|
157704
157706
|
/* harmony export */ });
|
|
157705
|
-
/* harmony import */ var
|
|
157706
|
-
/* harmony import */ var
|
|
157707
|
-
/* harmony import */ var
|
|
157708
|
-
/* harmony import */ var
|
|
157709
|
-
/* harmony import */ var
|
|
157710
|
-
/* harmony import */ var
|
|
157711
|
-
/* harmony import */ var
|
|
157712
|
-
/* harmony import */ var
|
|
157713
|
-
/* harmony import */ var
|
|
157714
|
-
/* harmony import */ var
|
|
157715
|
-
/* harmony import */ var
|
|
157716
|
-
/* harmony import */ var
|
|
157717
|
-
/* harmony import */ var
|
|
157718
|
-
/* harmony import */ var
|
|
157719
|
-
/* harmony import */ var
|
|
157720
|
-
/* harmony import */ var
|
|
157721
|
-
/* harmony import */ var
|
|
157707
|
+
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
157708
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
157709
|
+
/* harmony import */ var _common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/CodeGeneration/ClassInstanceBuilder */ "./Generator/src/common/CodeGeneration/ClassInstanceBuilder.ts");
|
|
157710
|
+
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
157711
|
+
/* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
157712
|
+
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
157713
|
+
/* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
157714
|
+
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
157715
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
157716
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/AttachmentsValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/AttachmentsValueValidatorGenerator.ts");
|
|
157717
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/CustomValidationValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/CustomValidationValueValidatorGenerator.ts");
|
|
157718
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_NumberLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/NumberLengthConstraintValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/NumberLengthConstraintValueValidatorGenerator.ts");
|
|
157719
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_DigestCheckValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/DigestCheckValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/DigestCheckValueValidatorGenerator.ts");
|
|
157720
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_EnumerationValidatorGenerator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/EnumerationValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/EnumerationValidatorGenerator.ts");
|
|
157721
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_IntegerRangeValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/IntegerRangeValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/IntegerRangeValueValidatorGenerator.ts");
|
|
157722
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_MatchOneOfPatternValidatorGenerator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/MatchOneOfPatternValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/MatchOneOfPatternValidatorGenerator.ts");
|
|
157723
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_StringLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/StringLengthConstraintValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/StringLengthConstraintValueValidatorGenerator.ts");
|
|
157724
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_DigestConditionValidatorGenerator__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/DigestConditionValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/DigestConditionValidatorGenerator.ts");
|
|
157725
|
+
|
|
157722
157726
|
|
|
157723
157727
|
|
|
157724
157728
|
|
|
@@ -157738,7 +157742,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
157738
157742
|
|
|
157739
157743
|
class ValidationGenerator {
|
|
157740
157744
|
constructor(sugarRoot, typesRegistry, controlCustomizationContext, schemaRng, useSchemaValidations, validationsContent = []) {
|
|
157741
|
-
this.typeBasedValidatorGenerators = [
|
|
157745
|
+
this.typeBasedValidatorGenerators = [_TypeBasedValidatorGenerators_MatchOneOfPatternValidatorGenerator__WEBPACK_IMPORTED_MODULE_15__.MatchOneOfPatternValidatorGenerator, _TypeBasedValidatorGenerators_EnumerationValidatorGenerator__WEBPACK_IMPORTED_MODULE_13__.EnumerationValidatorGenerator, _TypeBasedValidatorGenerators_StringLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_16__.StringLengthConstraintValueValidatorGenerator, _TypeBasedValidatorGenerators_NumberLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_11__.NumberLengthConstraintValueValidatorGenerator, _TypeBasedValidatorGenerators_IntegerRangeValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_14__.IntegerRangeValueValidatorGenerator, _TypeBasedValidatorGenerators_DigestCheckValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_12__.DigestCheckValueValidatorGenerator, _TypeBasedValidatorGenerators_DigestConditionValidatorGenerator__WEBPACK_IMPORTED_MODULE_17__.DigestConditionValidatorGenerator, _TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__.AttachmentsValueValidatorGenerator, _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__.CustomValidationValueValidatorGenerator];
|
|
157742
157746
|
this.sugarRoot = void 0;
|
|
157743
157747
|
this.validationsContent = void 0;
|
|
157744
157748
|
this.customValidations = void 0;
|
|
@@ -157748,6 +157752,8 @@ class ValidationGenerator {
|
|
|
157748
157752
|
this.controlCustomizationContext = void 0;
|
|
157749
157753
|
this.useSchemaValidations = void 0;
|
|
157750
157754
|
this.criterionOfExistenceFromSchemaRng = [];
|
|
157755
|
+
this.depsRngSchemaValidationCounter = 0;
|
|
157756
|
+
this.visibilityConditionsStack = [];
|
|
157751
157757
|
this.sugarRoot = sugarRoot;
|
|
157752
157758
|
this.typesRegistry = typesRegistry;
|
|
157753
157759
|
this.validationsContent = validationsContent;
|
|
@@ -157774,6 +157780,14 @@ class ValidationGenerator {
|
|
|
157774
157780
|
this.validations = {};
|
|
157775
157781
|
}
|
|
157776
157782
|
|
|
157783
|
+
pushVisibilityCondition(data) {
|
|
157784
|
+
this.visibilityConditionsStack.push(data);
|
|
157785
|
+
}
|
|
157786
|
+
|
|
157787
|
+
popVisibilityCondition() {
|
|
157788
|
+
this.visibilityConditionsStack.pop();
|
|
157789
|
+
}
|
|
157790
|
+
|
|
157777
157791
|
getTypeNodeLegacy(childNode) {
|
|
157778
157792
|
return this.typesRegistry.getTypeNodeLegacy(childNode);
|
|
157779
157793
|
}
|
|
@@ -157787,7 +157801,7 @@ class ValidationGenerator {
|
|
|
157787
157801
|
const result = this.typesRegistry.getByName(node.type);
|
|
157788
157802
|
|
|
157789
157803
|
if (result == undefined) {
|
|
157790
|
-
throw new
|
|
157804
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError(`Type with name '${node.type}' not found`, node, "type");
|
|
157791
157805
|
}
|
|
157792
157806
|
|
|
157793
157807
|
return result;
|
|
@@ -157805,13 +157819,14 @@ class ValidationGenerator {
|
|
|
157805
157819
|
var _getConverterByNodeCl;
|
|
157806
157820
|
|
|
157807
157821
|
const sugarNode = this.sugarRoot;
|
|
157808
|
-
const converterType = (_getConverterByNodeCl = (0,
|
|
157822
|
+
const converterType = (_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_6__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.getNodeClass)(sugarNode))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Converter for root node must be defined`);
|
|
157809
157823
|
const converter = new converterType(sugarNode);
|
|
157810
157824
|
converter.buildValidations(this);
|
|
157811
|
-
let result = `
|
|
157825
|
+
let result = `
|
|
157826
|
+
function validationFunctions({ Engine: { ValidationHelper, Validators }, ap, current, each, kcLangUtils }) {
|
|
157812
157827
|
const t = str => x => x.translate(str);
|
|
157813
157828
|
return {
|
|
157814
|
-
|
|
157829
|
+
${Object.keys(this.validations).map(x => `["${x}"]: ${this.generateValidation(this.validations[x])}`).join(",")}
|
|
157815
157830
|
};
|
|
157816
157831
|
}`; // '\u0424' -> 'Ф'
|
|
157817
157832
|
|
|
@@ -157822,11 +157837,11 @@ class ValidationGenerator {
|
|
|
157822
157837
|
|
|
157823
157838
|
modelPathInstance(target) {
|
|
157824
157839
|
return `new AbsoluteModelPath([${[...target.getPathParts()].map(x => {
|
|
157825
|
-
if (x ===
|
|
157840
|
+
if (x === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__.PathTokens.each) {
|
|
157826
157841
|
return "PathTokens.each";
|
|
157827
157842
|
}
|
|
157828
157843
|
|
|
157829
|
-
if (x ===
|
|
157844
|
+
if (x === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__.PathTokens.current) {
|
|
157830
157845
|
return "PathTokens.current";
|
|
157831
157846
|
}
|
|
157832
157847
|
|
|
@@ -157859,14 +157874,15 @@ class ValidationGenerator {
|
|
|
157859
157874
|
const targetAsString = this.modelPathInstance(bindingPath);
|
|
157860
157875
|
const dependenciesAsString = dependencies.map(x => this.modelPathInstance(x.toCurrentIteration())).join(", \n");
|
|
157861
157876
|
const message = typeof localizedString === "string" ? `"${localizedString}"` : localizedString.expression;
|
|
157877
|
+
const depsVariableName = `deps${this.depsRngSchemaValidationCounter++}`;
|
|
157862
157878
|
return `
|
|
157863
|
-
const
|
|
157879
|
+
const ${depsVariableName} = [${dependenciesAsString}]
|
|
157864
157880
|
form.calculator2.addCalculationFunction(
|
|
157865
157881
|
new ValidationFunction(
|
|
157866
157882
|
${targetAsString},
|
|
157867
|
-
|
|
157883
|
+
${depsVariableName},
|
|
157868
157884
|
context =>
|
|
157869
|
-
DependenciesRequiredAreEmpty.execute(context, ${targetAsString},
|
|
157885
|
+
DependenciesRequiredAreEmpty.execute(context, ${targetAsString}, ${depsVariableName}, ${message}, "Error", form.localization)
|
|
157870
157886
|
)
|
|
157871
157887
|
);`;
|
|
157872
157888
|
}
|
|
@@ -157880,7 +157896,7 @@ class ValidationGenerator {
|
|
|
157880
157896
|
const checkNodes = sugarTypeNode.flattenTypeCheckNodes().filter(x => !processedNodeTypes.has(x.name));
|
|
157881
157897
|
let typeCheckNodes = [...checkNodes];
|
|
157882
157898
|
|
|
157883
|
-
while ((0,
|
|
157899
|
+
while ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.isLengthGreaterThenOrEqual)(typeCheckNodes, 1)) {
|
|
157884
157900
|
const currentNode = typeCheckNodes[0];
|
|
157885
157901
|
const generator = this.getGeneratorByNode(currentNode);
|
|
157886
157902
|
const acceptNodes = typeCheckNodes.filter(x => generator.acceptNodeForGroup(x));
|
|
@@ -157914,20 +157930,40 @@ class ValidationGenerator {
|
|
|
157914
157930
|
}
|
|
157915
157931
|
|
|
157916
157932
|
generateValidation(validationInfos) {
|
|
157933
|
+
const groupedValidationInfos = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_0__.IterUtils.groupBy(validationInfos !== null && validationInfos !== void 0 ? validationInfos : [], x => x.conditions.map(z => z[0]).join(""));
|
|
157934
|
+
return "[" + [...groupedValidationInfos.values()].map(validationInfoGroup => {
|
|
157935
|
+
var _validationInfoGroup$, _validationInfoGroup$2;
|
|
157936
|
+
|
|
157937
|
+
const conditions = (_validationInfoGroup$ = (_validationInfoGroup$2 = validationInfoGroup[0]) === null || _validationInfoGroup$2 === void 0 ? void 0 : _validationInfoGroup$2.conditions) !== null && _validationInfoGroup$ !== void 0 ? _validationInfoGroup$ : [];
|
|
157938
|
+
const validator = this.generateCompositeValidation(validationInfoGroup);
|
|
157939
|
+
const generatedConditions = "[" + conditions.map(x => {
|
|
157940
|
+
const condition = x[0];
|
|
157941
|
+
const context = x[1];
|
|
157942
|
+
const deps = x[2];
|
|
157943
|
+
return `[path => ${condition}, ${absoluteModelPathGenerator(context)}, [${deps.map(absoluteModelPathGenerator).join(", ")}]]`;
|
|
157944
|
+
}).join(",") + "]";
|
|
157945
|
+
return `[
|
|
157946
|
+
${generatedConditions},
|
|
157947
|
+
${validator}
|
|
157948
|
+
]`;
|
|
157949
|
+
}).join(", ") + "]";
|
|
157950
|
+
}
|
|
157951
|
+
|
|
157952
|
+
generateCompositeValidation(validationInfos) {
|
|
157917
157953
|
var _validationInfos$find, _validationInfos$find2, _ref, _ref2, _ref3, _ref4, _sugarNodeWithBase$ba;
|
|
157918
157954
|
|
|
157919
157955
|
if (validationInfos == undefined) {
|
|
157920
|
-
throw new
|
|
157956
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarReadingError("Couldn't generate from empty validation!");
|
|
157921
157957
|
}
|
|
157922
157958
|
|
|
157923
|
-
const rootValidator = (0,
|
|
157959
|
+
const rootValidator = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.CompositeValueValidatorWithForcedValidators");
|
|
157924
157960
|
const firstItem = validationInfos[0];
|
|
157925
157961
|
|
|
157926
157962
|
if (firstItem == undefined) {
|
|
157927
|
-
throw new
|
|
157963
|
+
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.InvalidProgramStateError();
|
|
157928
157964
|
}
|
|
157929
157965
|
|
|
157930
|
-
const bindingPath = (0,
|
|
157966
|
+
const bindingPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__.convertToAbsolutModelPath)(firstItem.bindingPath);
|
|
157931
157967
|
const rngSchemaNodeType = this.getRngSchemaTypeInfo(bindingPath);
|
|
157932
157968
|
const sugarOptional = (_validationInfos$find = validationInfos.find(x => x.sugarOptional != undefined)) === null || _validationInfos$find === void 0 ? void 0 : _validationInfos$find.sugarOptional;
|
|
157933
157969
|
const [isOptional, requiredDependencies] = this.getOptionalWithDependencies(bindingPath, sugarOptional);
|
|
@@ -157963,11 +157999,10 @@ class ValidationGenerator {
|
|
|
157963
157999
|
rootValidator.set(1, validators);
|
|
157964
158000
|
rootValidator.set(2, sugarNodeTypeAllValidators.forcedValidators);
|
|
157965
158001
|
return rootValidator.build();
|
|
157966
|
-
}
|
|
157967
|
-
|
|
158002
|
+
}
|
|
157968
158003
|
|
|
157969
158004
|
processValidations(bindingPath, sugarOptional, sugarNodeType, gId, highOrderDescription, fileLoaderOptions) {
|
|
157970
|
-
const rngSchemaNodeType = this.getRngSchemaTypeInfo((0,
|
|
158005
|
+
const rngSchemaNodeType = this.getRngSchemaTypeInfo((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__.convertToAbsolutModelPath)(bindingPath));
|
|
157971
158006
|
|
|
157972
158007
|
if (bindingPath && (sugarNodeType != undefined || rngSchemaNodeType != undefined)) {
|
|
157973
158008
|
var _this$validations$val;
|
|
@@ -157975,7 +158010,7 @@ class ValidationGenerator {
|
|
|
157975
158010
|
let validationBindingPath = bindingPath;
|
|
157976
158011
|
|
|
157977
158012
|
if (fileLoaderOptions !== undefined) {
|
|
157978
|
-
validationBindingPath = fileLoaderOptions.multiple ? `${bindingPath}/*/${
|
|
158013
|
+
validationBindingPath = fileLoaderOptions.multiple ? `${bindingPath}/*/${_Common_PathConstants__WEBPACK_IMPORTED_MODULE_5__.AttachmentInfoPath.toLegacyPath()}` : `${bindingPath}/${_Common_PathConstants__WEBPACK_IMPORTED_MODULE_5__.AttachmentInfoPath.toLegacyPath()}`;
|
|
157979
158014
|
}
|
|
157980
158015
|
|
|
157981
158016
|
const currentItem = {
|
|
@@ -157983,7 +158018,8 @@ class ValidationGenerator {
|
|
|
157983
158018
|
sugarOptional: sugarOptional,
|
|
157984
158019
|
sugarNodeType: sugarNodeType,
|
|
157985
158020
|
gId: gId,
|
|
157986
|
-
highOrderDescription: highOrderDescription
|
|
158021
|
+
highOrderDescription: highOrderDescription,
|
|
158022
|
+
conditions: [...this.visibilityConditionsStack]
|
|
157987
158023
|
};
|
|
157988
158024
|
const validations = (_this$validations$val = this.validations[validationBindingPath]) !== null && _this$validations$val !== void 0 ? _this$validations$val : [];
|
|
157989
158025
|
this.validations[validationBindingPath] = [currentItem, ...validations];
|
|
@@ -158027,14 +158063,14 @@ class ValidationGenerator {
|
|
|
158027
158063
|
const generatorClass = this.typeBasedValidatorGenerators.find(x => x.acceptNode(node));
|
|
158028
158064
|
|
|
158029
158065
|
if (generatorClass == undefined) {
|
|
158030
|
-
throw new
|
|
158066
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError("Cannot find validation generator for node", node, "");
|
|
158031
158067
|
}
|
|
158032
158068
|
|
|
158033
158069
|
return generatorClass.createFromNode(node);
|
|
158034
158070
|
}
|
|
158035
158071
|
|
|
158036
158072
|
buildRequiredValidator(description) {
|
|
158037
|
-
const requiredValidator = (0,
|
|
158073
|
+
const requiredValidator = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.RequiredValueValidator");
|
|
158038
158074
|
requiredValidator.set(0, "error");
|
|
158039
158075
|
requiredValidator.set(1, description);
|
|
158040
158076
|
return requiredValidator;
|
|
@@ -158048,42 +158084,42 @@ class ValidationGenerator {
|
|
|
158048
158084
|
|
|
158049
158085
|
case "integer":
|
|
158050
158086
|
{
|
|
158051
|
-
const result = (0,
|
|
158087
|
+
const result = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.IsIntegerValueValidator");
|
|
158052
158088
|
result.set(0, description);
|
|
158053
158089
|
return result;
|
|
158054
158090
|
}
|
|
158055
158091
|
|
|
158056
158092
|
case "decimal":
|
|
158057
158093
|
{
|
|
158058
|
-
const result = (0,
|
|
158094
|
+
const result = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.IsDecimalValueValidator");
|
|
158059
158095
|
result.set(0, description);
|
|
158060
158096
|
return result;
|
|
158061
158097
|
}
|
|
158062
158098
|
|
|
158063
158099
|
case "date":
|
|
158064
158100
|
{
|
|
158065
|
-
const result = (0,
|
|
158101
|
+
const result = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.IsDateValueValidator");
|
|
158066
158102
|
result.set(0, description);
|
|
158067
158103
|
return result;
|
|
158068
158104
|
}
|
|
158069
158105
|
|
|
158070
158106
|
case "gYear":
|
|
158071
158107
|
{
|
|
158072
|
-
const result = (0,
|
|
158108
|
+
const result = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.IsYearValueValidator");
|
|
158073
158109
|
result.set(0, description);
|
|
158074
158110
|
return result;
|
|
158075
158111
|
}
|
|
158076
158112
|
|
|
158077
158113
|
case "gMonth":
|
|
158078
158114
|
{
|
|
158079
|
-
const result = (0,
|
|
158115
|
+
const result = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_2__.instanceBuilder)("Validators.IsMonthValueValidator");
|
|
158080
158116
|
result.set(0, description);
|
|
158081
158117
|
return result;
|
|
158082
158118
|
}
|
|
158083
158119
|
|
|
158084
158120
|
default:
|
|
158085
158121
|
if (typeNode != undefined) {
|
|
158086
|
-
throw new
|
|
158122
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError("Unknown base type name", typeNode, "base");
|
|
158087
158123
|
} else {
|
|
158088
158124
|
throw new Error(`Unknown base type name: '${baseName}'`);
|
|
158089
158125
|
}
|
|
@@ -158093,6 +158129,10 @@ class ValidationGenerator {
|
|
|
158093
158129
|
|
|
158094
158130
|
}
|
|
158095
158131
|
|
|
158132
|
+
function absoluteModelPathGenerator(path) {
|
|
158133
|
+
return `ap([${path.getPathPartsAsArray().map(x => x === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__.PathTokens.each ? "each" : x === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_8__.PathTokens.current ? "current" : JSON.stringify(x)).join(", ")}])`;
|
|
158134
|
+
}
|
|
158135
|
+
|
|
158096
158136
|
/***/ }),
|
|
158097
158137
|
|
|
158098
158138
|
/***/ "./node_modules/babel-plugin-dynamic-import-node/lib/utils.js":
|