@kontur.candy/generator 4.246.1 → 4.247.0-nillable.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +80 -97
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -120848,34 +120848,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
120848
120848
|
|
|
120849
120849
|
|
|
120850
120850
|
class FormSchemaRngAttribute {
|
|
120851
|
-
constructor(name, description, type, optional, parent) {
|
|
120851
|
+
constructor(name, description, type, optional, nillable, parent) {
|
|
120852
120852
|
this.name = void 0;
|
|
120853
|
-
this.optional = void 0;
|
|
120854
120853
|
this.type = void 0;
|
|
120855
120854
|
this.description = void 0;
|
|
120856
120855
|
this.parent = void 0;
|
|
120856
|
+
this.optional = void 0;
|
|
120857
|
+
this.nillable = void 0;
|
|
120857
120858
|
this.description = description;
|
|
120858
120859
|
this.optional = optional;
|
|
120860
|
+
this.nillable = nillable;
|
|
120859
120861
|
this.type = type;
|
|
120860
120862
|
this.name = name;
|
|
120861
120863
|
this.parent = parent;
|
|
120862
120864
|
}
|
|
120863
120865
|
|
|
120866
|
+
isOptionalOrNillable() {
|
|
120867
|
+
return this.optional || this.nillable || false;
|
|
120868
|
+
}
|
|
120869
|
+
|
|
120864
120870
|
}
|
|
120865
120871
|
const RootParent = Symbol.for("__ROOT_ELEMENT_PARENT__");
|
|
120866
120872
|
class FormSchemaRngElement {
|
|
120867
|
-
constructor(name, parent, optional, multiple) {
|
|
120873
|
+
constructor(name, parent, optional, multiple, nillable) {
|
|
120868
120874
|
this.name = void 0;
|
|
120869
|
-
this.optional = void 0;
|
|
120870
120875
|
this.multiple = void 0;
|
|
120871
120876
|
this.innerTextType = void 0;
|
|
120872
120877
|
this.children = new Map();
|
|
120873
120878
|
this.attributes = new Map();
|
|
120874
120879
|
this.parent = void 0;
|
|
120880
|
+
this.optional = void 0;
|
|
120881
|
+
this.nillable = void 0;
|
|
120875
120882
|
this.name = name;
|
|
120876
120883
|
this.parent = parent;
|
|
120877
120884
|
this.multiple = multiple;
|
|
120878
120885
|
this.optional = optional;
|
|
120886
|
+
this.nillable = nillable;
|
|
120879
120887
|
}
|
|
120880
120888
|
|
|
120881
120889
|
addElement(element) {
|
|
@@ -120896,6 +120904,10 @@ class FormSchemaRngElement {
|
|
|
120896
120904
|
return (_this$children$get = this.children.get(name)) !== null && _this$children$get !== void 0 ? _this$children$get : this.attributes.get(name);
|
|
120897
120905
|
}
|
|
120898
120906
|
|
|
120907
|
+
isOptionalOrNillable() {
|
|
120908
|
+
return this.optional || this.nillable || false;
|
|
120909
|
+
}
|
|
120910
|
+
|
|
120899
120911
|
}
|
|
120900
120912
|
class FormSchemaRng {
|
|
120901
120913
|
constructor(rootElement) {
|
|
@@ -120914,7 +120926,7 @@ class FormSchemaRng {
|
|
|
120914
120926
|
}
|
|
120915
120927
|
|
|
120916
120928
|
static convertSchemaRngElement(schemaRngElement, parent) {
|
|
120917
|
-
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple);
|
|
120929
|
+
const result = new FormSchemaRngElement(schemaRngElement.name, parent, schemaRngElement.optional, schemaRngElement.multiple, schemaRngElement.nillable);
|
|
120918
120930
|
|
|
120919
120931
|
if (schemaRngElement.innerText != undefined) {
|
|
120920
120932
|
if (schemaRngElement.innerText.type != undefined) {
|
|
@@ -120993,7 +121005,7 @@ class FormSchemaRng {
|
|
|
120993
121005
|
}
|
|
120994
121006
|
|
|
120995
121007
|
static convertSchemaRngAttribute(attribute, parent) {
|
|
120996
|
-
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, parent);
|
|
121008
|
+
return new FormSchemaRngAttribute(attribute.name, attribute.description, this.buildTypeInfo(attribute.type), attribute.optional, attribute.nillable, parent);
|
|
120997
121009
|
}
|
|
120998
121010
|
|
|
120999
121011
|
adjustPathMultiplicity(path) {
|
|
@@ -121067,41 +121079,6 @@ class FormSchemaRng {
|
|
|
121067
121079
|
return currentElement;
|
|
121068
121080
|
}
|
|
121069
121081
|
|
|
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
121082
|
getDependenciesFromSchema(bindingPath) {
|
|
121106
121083
|
var _endOptionalElement;
|
|
121107
121084
|
|
|
@@ -121113,7 +121090,7 @@ class FormSchemaRng {
|
|
|
121113
121090
|
if (this.rootElement.name === part) {
|
|
121114
121091
|
currentElement = this.rootElement;
|
|
121115
121092
|
|
|
121116
|
-
if (currentElement.
|
|
121093
|
+
if (currentElement.isOptionalOrNillable()) {
|
|
121117
121094
|
endOptionalElement = currentElement;
|
|
121118
121095
|
}
|
|
121119
121096
|
|
|
@@ -121128,15 +121105,13 @@ class FormSchemaRng {
|
|
|
121128
121105
|
}
|
|
121129
121106
|
|
|
121130
121107
|
if (currentElement instanceof FormSchemaRngElement && !_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.isMultiToken(part)) {
|
|
121131
|
-
var _currentElement4;
|
|
121132
|
-
|
|
121133
121108
|
currentElement = currentElement.getElementByName(part);
|
|
121134
121109
|
|
|
121135
|
-
if (currentElement instanceof FormSchemaRngElement && currentElement.
|
|
121110
|
+
if (currentElement instanceof FormSchemaRngElement && currentElement.isOptionalOrNillable() === true) {
|
|
121136
121111
|
endOptionalElement = currentElement;
|
|
121137
121112
|
}
|
|
121138
121113
|
|
|
121139
|
-
if (currentElement instanceof FormSchemaRngAttribute &&
|
|
121114
|
+
if (currentElement instanceof FormSchemaRngAttribute && currentElement.isOptionalOrNillable() === true) {
|
|
121140
121115
|
endOptionalElement = currentElement;
|
|
121141
121116
|
}
|
|
121142
121117
|
}
|
|
@@ -121165,7 +121140,6 @@ class FormSchemaRng {
|
|
|
121165
121140
|
return {
|
|
121166
121141
|
dependencies: deps,
|
|
121167
121142
|
hasOptionalParent: endOptionalElement != undefined,
|
|
121168
|
-
// true
|
|
121169
121143
|
optional: false
|
|
121170
121144
|
};
|
|
121171
121145
|
}
|
|
@@ -121205,12 +121179,6 @@ class FormSchemaRng {
|
|
|
121205
121179
|
return new _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath(result, true);
|
|
121206
121180
|
}
|
|
121207
121181
|
|
|
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
121182
|
getTypeNodeByPath(bindingPath) {
|
|
121215
121183
|
const currentElement = this.getElementByPath(bindingPath);
|
|
121216
121184
|
|
|
@@ -121360,7 +121328,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
121360
121328
|
|
|
121361
121329
|
|
|
121362
121330
|
|
|
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,
|
|
121331
|
+
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
121332
|
|
|
121365
121333
|
|
|
121366
121334
|
class SchemaRngTypeCheck extends _generators_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {}
|
|
@@ -121528,7 +121496,7 @@ let SchemaRngType = (_dec21 = (0,_generators_markupGenerator_Serializer_SugarSer
|
|
|
121528
121496
|
writable: true,
|
|
121529
121497
|
initializer: null
|
|
121530
121498
|
})), _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 {
|
|
121499
|
+
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
121500
|
constructor(...args) {
|
|
121533
121501
|
super(...args);
|
|
121534
121502
|
|
|
@@ -121538,7 +121506,9 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
121538
121506
|
|
|
121539
121507
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor17, this);
|
|
121540
121508
|
|
|
121541
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121509
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor18, this);
|
|
121510
|
+
|
|
121511
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor19, this);
|
|
121542
121512
|
}
|
|
121543
121513
|
|
|
121544
121514
|
}, (_descriptor15 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "name", [_dec27], {
|
|
@@ -121556,95 +121526,107 @@ let SchemaRngAttribute = (_dec26 = (0,_generators_markupGenerator_Serializer_Sug
|
|
|
121556
121526
|
enumerable: true,
|
|
121557
121527
|
writable: true,
|
|
121558
121528
|
initializer: null
|
|
121559
|
-
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "
|
|
121529
|
+
}), _descriptor18 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "nillable", [_dec30], {
|
|
121530
|
+
configurable: true,
|
|
121531
|
+
enumerable: true,
|
|
121532
|
+
writable: true,
|
|
121533
|
+
initializer: null
|
|
121534
|
+
}), _descriptor19 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class35.prototype, "description", [_dec31], {
|
|
121560
121535
|
configurable: true,
|
|
121561
121536
|
enumerable: true,
|
|
121562
121537
|
writable: true,
|
|
121563
121538
|
initializer: null
|
|
121564
121539
|
})), _class35)) || _class34);
|
|
121565
|
-
let SchemaRngInnerText = (
|
|
121540
|
+
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
121541
|
constructor(...args) {
|
|
121567
121542
|
super(...args);
|
|
121568
121543
|
|
|
121569
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type",
|
|
121544
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "type", _descriptor20, this);
|
|
121570
121545
|
}
|
|
121571
121546
|
|
|
121572
|
-
}, (
|
|
121547
|
+
}, (_descriptor20 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class38.prototype, "type", [_dec33], {
|
|
121573
121548
|
configurable: true,
|
|
121574
121549
|
enumerable: true,
|
|
121575
121550
|
writable: true,
|
|
121576
121551
|
initializer: null
|
|
121577
121552
|
})), _class38)) || _class37);
|
|
121578
|
-
let SchemaRngElementChoiceElement = (
|
|
121553
|
+
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
121554
|
constructor(...args) {
|
|
121580
121555
|
super(...args);
|
|
121581
121556
|
|
|
121582
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children",
|
|
121557
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor21, this);
|
|
121583
121558
|
}
|
|
121584
121559
|
|
|
121585
|
-
}, (
|
|
121560
|
+
}, (_descriptor21 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class41.prototype, "children", [_dec35], {
|
|
121586
121561
|
configurable: true,
|
|
121587
121562
|
enumerable: true,
|
|
121588
121563
|
writable: true,
|
|
121589
121564
|
initializer: null
|
|
121590
121565
|
})), _class41)) || _class40);
|
|
121591
|
-
let SchemaRngElement = (
|
|
121566
|
+
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
121567
|
constructor(...args) {
|
|
121593
121568
|
super(...args);
|
|
121594
121569
|
|
|
121595
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name",
|
|
121570
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor22, this);
|
|
121596
121571
|
|
|
121597
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description",
|
|
121572
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor23, this);
|
|
121598
121573
|
|
|
121599
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional",
|
|
121574
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optional", _descriptor24, this);
|
|
121600
121575
|
|
|
121601
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121576
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "nillable", _descriptor25, this);
|
|
121602
121577
|
|
|
121603
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121578
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor26, this);
|
|
121604
121579
|
|
|
121605
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
121580
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "attributes", _descriptor27, this);
|
|
121581
|
+
|
|
121582
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor28, this);
|
|
121606
121583
|
|
|
121607
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "choices",
|
|
121584
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "choices", _descriptor29, this);
|
|
121608
121585
|
|
|
121609
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "innerText",
|
|
121586
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "innerText", _descriptor30, this);
|
|
121610
121587
|
}
|
|
121611
121588
|
|
|
121612
|
-
}, (
|
|
121589
|
+
}, (_descriptor22 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "name", [_dec37], {
|
|
121590
|
+
configurable: true,
|
|
121591
|
+
enumerable: true,
|
|
121592
|
+
writable: true,
|
|
121593
|
+
initializer: null
|
|
121594
|
+
}), _descriptor23 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "description", [_dec38], {
|
|
121613
121595
|
configurable: true,
|
|
121614
121596
|
enumerable: true,
|
|
121615
121597
|
writable: true,
|
|
121616
121598
|
initializer: null
|
|
121617
|
-
}),
|
|
121599
|
+
}), _descriptor24 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "optional", [_dec39], {
|
|
121618
121600
|
configurable: true,
|
|
121619
121601
|
enumerable: true,
|
|
121620
121602
|
writable: true,
|
|
121621
121603
|
initializer: null
|
|
121622
|
-
}),
|
|
121604
|
+
}), _descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "nillable", [_dec40], {
|
|
121623
121605
|
configurable: true,
|
|
121624
121606
|
enumerable: true,
|
|
121625
121607
|
writable: true,
|
|
121626
121608
|
initializer: null
|
|
121627
|
-
}),
|
|
121609
|
+
}), _descriptor26 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "multiple", [_dec41], {
|
|
121628
121610
|
configurable: true,
|
|
121629
121611
|
enumerable: true,
|
|
121630
121612
|
writable: true,
|
|
121631
121613
|
initializer: null
|
|
121632
|
-
}),
|
|
121614
|
+
}), _descriptor27 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "attributes", [_dec42], {
|
|
121633
121615
|
configurable: true,
|
|
121634
121616
|
enumerable: true,
|
|
121635
121617
|
writable: true,
|
|
121636
121618
|
initializer: null
|
|
121637
|
-
}),
|
|
121619
|
+
}), _descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "children", [_dec43], {
|
|
121638
121620
|
configurable: true,
|
|
121639
121621
|
enumerable: true,
|
|
121640
121622
|
writable: true,
|
|
121641
121623
|
initializer: null
|
|
121642
|
-
}),
|
|
121624
|
+
}), _descriptor29 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "choices", [_dec44], {
|
|
121643
121625
|
configurable: true,
|
|
121644
121626
|
enumerable: true,
|
|
121645
121627
|
writable: true,
|
|
121646
121628
|
initializer: null
|
|
121647
|
-
}),
|
|
121629
|
+
}), _descriptor30 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class44.prototype, "innerText", [_dec45], {
|
|
121648
121630
|
configurable: true,
|
|
121649
121631
|
enumerable: true,
|
|
121650
121632
|
writable: true,
|
|
@@ -124327,6 +124309,7 @@ function normalizeToArray(value) {
|
|
|
124327
124309
|
"use strict";
|
|
124328
124310
|
__webpack_require__.r(__webpack_exports__);
|
|
124329
124311
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
124312
|
+
/* harmony export */ "getNodeSource": () => (/* binding */ getNodeSource),
|
|
124330
124313
|
/* harmony export */ "XmlNode": () => (/* binding */ XmlNode),
|
|
124331
124314
|
/* harmony export */ "ASTNode": () => (/* binding */ ASTNode),
|
|
124332
124315
|
/* harmony export */ "SugarReadingError": () => (/* binding */ SugarReadingError),
|
|
@@ -124339,6 +124322,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
124339
124322
|
|
|
124340
124323
|
|
|
124341
124324
|
|
|
124325
|
+
function getNodeSource(node) {
|
|
124326
|
+
if (node.source == undefined) {
|
|
124327
|
+
return "N/A";
|
|
124328
|
+
}
|
|
124329
|
+
|
|
124330
|
+
try {
|
|
124331
|
+
const sourceLines = node.source.sourceText.split("\n");
|
|
124332
|
+
return sourceLines.slice(node.source.location.start.line - 1, node.source.location.end.line).join("\n");
|
|
124333
|
+
} catch {
|
|
124334
|
+
return "N/A";
|
|
124335
|
+
}
|
|
124336
|
+
}
|
|
124342
124337
|
class XmlNode {
|
|
124343
124338
|
constructor(createParams) {
|
|
124344
124339
|
var _createParams$parent, _createParams$attribu, _createParams$childre;
|
|
@@ -128574,6 +128569,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
128574
128569
|
/* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
|
|
128575
128570
|
/* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader.ts");
|
|
128576
128571
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
128572
|
+
/* harmony import */ var _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/XmlParser/XmlNode */ "./Generator/src/common/XmlParser/XmlNode.ts");
|
|
128573
|
+
|
|
128577
128574
|
|
|
128578
128575
|
|
|
128579
128576
|
|
|
@@ -128620,7 +128617,7 @@ class KCXmlValidationGenerator {
|
|
|
128620
128617
|
const target = prefix.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.ModelPath.createFromMask(condition.target, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each));
|
|
128621
128618
|
const deps = [];
|
|
128622
128619
|
const compiledExpression = this.compileExpression(prefix, condition.expression, deps);
|
|
128623
|
-
return `new ValidationFunction` + `(` + this.modelPathInstance(target) + `,` + `[${deps.map(x => x.toCurrentIteration()).map(x => this.modelPathInstance(x)).join(", ")}]` + `, ` + `context => KCCondition.execute(context, expression => ${compiledExpression}` + `, ` + `() => "${(_condition$descriptio = condition.description) !== null && _condition$descriptio !== void 0 ? _condition$descriptio : "Error Message"}"` + `, ` + `"${(_condition$errorLevel = condition.errorLevel) !== null && _condition$errorLevel !== void 0 ? _condition$errorLevel : "Error"}" )` + `)`;
|
|
128620
|
+
return `new ValidationFunction` + `(` + this.modelPathInstance(target) + `,` + `[${deps.map(x => x.toCurrentIteration()).map(x => this.modelPathInstance(x)).join(", ")}]` + `, ` + `context => KCCondition.execute(context, expression => ${compiledExpression}` + `, ` + `() => "${(_condition$descriptio = condition.description) !== null && _condition$descriptio !== void 0 ? _condition$descriptio : "Error Message"}"` + `, ` + `"${(_condition$errorLevel = condition.errorLevel) !== null && _condition$errorLevel !== void 0 ? _condition$errorLevel : "Error"}" )` + `, ` + JSON.stringify((0,_common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_4__.getNodeSource)(condition.sourceXmlNode)) + `)`;
|
|
128624
128621
|
}
|
|
128625
128622
|
|
|
128626
128623
|
compileExpression(prefix, expression, deps) {
|
|
@@ -153573,19 +153570,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153573
153570
|
|
|
153574
153571
|
|
|
153575
153572
|
class MarkupBuildingContext {
|
|
153576
|
-
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng,
|
|
153573
|
+
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
153577
153574
|
this.convertNode = void 0;
|
|
153578
153575
|
this.formSourcesPath = void 0;
|
|
153579
153576
|
this.helpers = void 0;
|
|
153580
153577
|
this.pathsContext = void 0;
|
|
153581
|
-
this.dataDeclarationHelper = void 0;
|
|
153582
153578
|
this.schemaRng = void 0;
|
|
153583
153579
|
this.useSchemaValidations = void 0;
|
|
153584
153580
|
this.typesRegistry = void 0;
|
|
153585
153581
|
this.uniqueControlIdIncrement = new Map();
|
|
153586
153582
|
this.controlCustomizationContext = void 0;
|
|
153587
153583
|
this.tourSteps = void 0;
|
|
153588
|
-
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
153589
153584
|
this.schemaRng = schemaRng;
|
|
153590
153585
|
this.useSchemaValidations = useSchemaValidations;
|
|
153591
153586
|
this.typesRegistry = typesRegistry;
|
|
@@ -153597,18 +153592,6 @@ class MarkupBuildingContext {
|
|
|
153597
153592
|
this.helpers = helpers;
|
|
153598
153593
|
}
|
|
153599
153594
|
|
|
153600
|
-
isNodeOptional(nodePath) {
|
|
153601
|
-
if (this.useSchemaValidations) {
|
|
153602
|
-
if (this.dataDeclarationHelper.isNodeOptional(nodePath) == false) {
|
|
153603
|
-
return this.schemaRng.getIsOptionalByPath(nodePath);
|
|
153604
|
-
} else {
|
|
153605
|
-
return true;
|
|
153606
|
-
}
|
|
153607
|
-
}
|
|
153608
|
-
|
|
153609
|
-
return this.dataDeclarationHelper.isNodeOptional(nodePath);
|
|
153610
|
-
}
|
|
153611
|
-
|
|
153612
153595
|
getUniqueControlId(context) {
|
|
153613
153596
|
let currentValue = this.uniqueControlIdIncrement.get(context);
|
|
153614
153597
|
|
|
@@ -153775,7 +153758,7 @@ class MarkupGenerator {
|
|
|
153775
153758
|
};
|
|
153776
153759
|
|
|
153777
153760
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
153778
|
-
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,
|
|
153761
|
+
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);
|
|
153779
153762
|
}
|
|
153780
153763
|
|
|
153781
153764
|
generate(sugarRoot, builder) {
|