@kontur.candy/generator 4.235.0 → 4.235.1
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 +77 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -271824,7 +271824,7 @@ function convertToLegacyPath(path) {
|
|
|
271824
271824
|
return isModelPath(path) ? path.toLegacyPath() : path;
|
|
271825
271825
|
}
|
|
271826
271826
|
function convertToAbsolutModelPath(path) {
|
|
271827
|
-
return isModelPath(path) ? path :
|
|
271827
|
+
return isModelPath(path) ? path : AbsoluteModelPath.createAbsoluteFromMask(path, PathTokens.each);
|
|
271828
271828
|
}
|
|
271829
271829
|
class AbsoluteModelFieldPath {
|
|
271830
271830
|
constructor(path, fieldName) {
|
|
@@ -280439,12 +280439,11 @@ class FormSchemaRng {
|
|
|
280439
280439
|
return result.toPath().toAbsolute();
|
|
280440
280440
|
}
|
|
280441
280441
|
|
|
280442
|
-
getElementByPath(
|
|
280443
|
-
const modelPath = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath.createFromMask(bindingPath, true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
280442
|
+
getElementByPath(path) {
|
|
280444
280443
|
let expectMultipleElement = false;
|
|
280445
280444
|
let currentElement;
|
|
280446
280445
|
|
|
280447
|
-
for (const part of
|
|
280446
|
+
for (const part of path.getPathParts()) {
|
|
280448
280447
|
if (currentElement == undefined) {
|
|
280449
280448
|
if (this.rootElement.name === part) {
|
|
280450
280449
|
currentElement = this.rootElement;
|
|
@@ -280482,8 +280481,7 @@ class FormSchemaRng {
|
|
|
280482
280481
|
return currentElement;
|
|
280483
280482
|
}
|
|
280484
280483
|
|
|
280485
|
-
getIsOptionalByPath(
|
|
280486
|
-
const modelPath = _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.ModelPath.createFromMask(bindingPath, true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
|
|
280484
|
+
getIsOptionalByPath(modelPath) {
|
|
280487
280485
|
let isOptionalStatus = false;
|
|
280488
280486
|
let currentElement;
|
|
280489
280487
|
|
|
@@ -280518,6 +280516,12 @@ class FormSchemaRng {
|
|
|
280518
280516
|
return isOptionalStatus;
|
|
280519
280517
|
}
|
|
280520
280518
|
|
|
280519
|
+
getIsOptionalByExactPath(bindingPath) {
|
|
280520
|
+
var _this$getElementByPat, _this$getElementByPat2;
|
|
280521
|
+
|
|
280522
|
+
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;
|
|
280523
|
+
}
|
|
280524
|
+
|
|
280521
280525
|
getTypeNodeByPath(bindingPath) {
|
|
280522
280526
|
const currentElement = this.getElementByPath(bindingPath);
|
|
280523
280527
|
|
|
@@ -286781,33 +286785,43 @@ class DataDeclarationGenerationTimeHelper {
|
|
|
286781
286785
|
}
|
|
286782
286786
|
|
|
286783
286787
|
hasMask(targetPath) {
|
|
286784
|
-
return
|
|
286788
|
+
return this.getDataDeclarationEntry(targetPath) != undefined;
|
|
286785
286789
|
}
|
|
286786
286790
|
|
|
286787
286791
|
isNodeHasChildrenEntry(targetPath) {
|
|
286788
|
-
var _this$
|
|
286792
|
+
var _this$getDataDeclarat;
|
|
286789
286793
|
|
|
286790
|
-
return ((_this$
|
|
286794
|
+
return ((_this$getDataDeclarat = this.getDataDeclarationEntry(targetPath)) === null || _this$getDataDeclarat === void 0 ? void 0 : _this$getDataDeclarat.children) != undefined;
|
|
286791
286795
|
}
|
|
286792
286796
|
|
|
286793
286797
|
isNodeHasAutoFlagEntry(targetPath) {
|
|
286794
|
-
const
|
|
286795
|
-
const declEntry = this.dataDeclaration[targetPathString];
|
|
286798
|
+
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
286796
286799
|
return declEntry !== undefined && "autoValue" in declEntry;
|
|
286797
286800
|
}
|
|
286798
286801
|
|
|
286799
286802
|
isNodeHasDisabledEntry(targetPath) {
|
|
286800
|
-
const declEntry = this.
|
|
286803
|
+
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
286801
286804
|
return Boolean(declEntry === null || declEntry === void 0 ? void 0 : declEntry.disabled);
|
|
286802
286805
|
}
|
|
286803
286806
|
|
|
286804
286807
|
getDefaultValue(targetPath) {
|
|
286805
|
-
const declEntry = this.
|
|
286808
|
+
const declEntry = this.getDataDeclarationEntry(targetPath);
|
|
286806
286809
|
const lastValue = declEntry !== undefined && "value" in declEntry && declEntry.value != undefined ? declEntry.value[declEntry.value.length - 1] : "";
|
|
286807
286810
|
const returnDefaultValue = typeof lastValue === "string" ? lastValue : "";
|
|
286808
286811
|
return returnDefaultValue;
|
|
286809
286812
|
}
|
|
286810
286813
|
|
|
286814
|
+
isNodeOptional(targetPath) {
|
|
286815
|
+
var _this$getDataDeclarat2, _optionalValue$;
|
|
286816
|
+
|
|
286817
|
+
const optionalValue = (_this$getDataDeclarat2 = this.getDataDeclarationEntry(targetPath)) === null || _this$getDataDeclarat2 === void 0 ? void 0 : _this$getDataDeclarat2.optional;
|
|
286818
|
+
return (_optionalValue$ = optionalValue === null || optionalValue === void 0 ? void 0 : optionalValue[0]) !== null && _optionalValue$ !== void 0 ? _optionalValue$ : false;
|
|
286819
|
+
}
|
|
286820
|
+
|
|
286821
|
+
getDataDeclarationEntry(targetPath) {
|
|
286822
|
+
return this.dataDeclaration[(0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.convertToLegacyPath)(targetPath)];
|
|
286823
|
+
}
|
|
286824
|
+
|
|
286811
286825
|
}
|
|
286812
286826
|
|
|
286813
286827
|
/***/ }),
|
|
@@ -288092,7 +288106,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
288092
288106
|
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);
|
|
288093
288107
|
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");
|
|
288094
288108
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
288095
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
288109
|
+
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);
|
|
288096
288110
|
markupGenerator.generate(sugarRoot, builder);
|
|
288097
288111
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_8__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings));
|
|
288098
288112
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -288631,7 +288645,7 @@ class FLangValidationBuildContext {
|
|
|
288631
288645
|
}
|
|
288632
288646
|
|
|
288633
288647
|
getSchemaTypeInfo(bindingPath) {
|
|
288634
|
-
return this.useSchemaValidations ? this.schemaRng.getTypeNodeByPath(bindingPath
|
|
288648
|
+
return this.useSchemaValidations ? this.schemaRng.getTypeNodeByPath(bindingPath) : undefined;
|
|
288635
288649
|
}
|
|
288636
288650
|
|
|
288637
288651
|
getTypeNode(node) {
|
|
@@ -301925,10 +301939,13 @@ class RemoveRowButtonConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MOD
|
|
|
301925
301939
|
}
|
|
301926
301940
|
|
|
301927
301941
|
doConvert(context) {
|
|
301942
|
+
var _node$clearLastInstan;
|
|
301943
|
+
|
|
301928
301944
|
const node = this.getCurrentNodeAs(_RemoveRowButtonNode__WEBPACK_IMPORTED_MODULE_3__.RemoveRowButtonNode);
|
|
301929
301945
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("RemoveRowButton");
|
|
301930
301946
|
markupBuilder.prop("data-tid").set(node.tid);
|
|
301931
301947
|
markupBuilder.prop(x => x.hint).set(node.hint);
|
|
301948
|
+
markupBuilder.prop(x => x.clearLastInstance).set((_node$clearLastInstan = node.clearLastInstance) !== null && _node$clearLastInstan !== void 0 ? _node$clearLastInstan : false);
|
|
301932
301949
|
return markupBuilder.buildConverterResult();
|
|
301933
301950
|
}
|
|
301934
301951
|
|
|
@@ -301948,7 +301965,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
301948
301965
|
/* harmony export */ "RemoveRowButtonNode": () => (/* binding */ RemoveRowButtonNode)
|
|
301949
301966
|
/* harmony export */ });
|
|
301950
301967
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
301951
|
-
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
301968
|
+
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
301952
301969
|
|
|
301953
301970
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
301954
301971
|
|
|
@@ -301957,13 +301974,15 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
301957
301974
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
301958
301975
|
|
|
301959
301976
|
|
|
301960
|
-
let RemoveRowButtonNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.sugarNode)("removerowbutton", `Кнопка удаления множественного элемента в виде креста`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/MultiControls/RemoveRowButton sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attrType.string, ``), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attr)("hint", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attrType.localizedString, ``), _dec(_class = (_class2 = class RemoveRowButtonNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.SugarNodeBase {
|
|
301977
|
+
let RemoveRowButtonNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.sugarNode)("removerowbutton", `Кнопка удаления множественного элемента в виде креста`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/MultiControls/RemoveRowButton sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attr)("tid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attrType.string, ``), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attr)("clearLastInstance", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attrType.boolean, `При удалении последнего элемента он будет очищаться, а не удаляться`), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attr)("hint", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.attrType.localizedString, ``), _dec(_class = (_class2 = class RemoveRowButtonNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.SugarNodeBase {
|
|
301961
301978
|
constructor(...args) {
|
|
301962
301979
|
super(...args);
|
|
301963
301980
|
|
|
301964
301981
|
_initializerDefineProperty(this, "tid", _descriptor, this);
|
|
301965
301982
|
|
|
301966
|
-
_initializerDefineProperty(this, "
|
|
301983
|
+
_initializerDefineProperty(this, "clearLastInstance", _descriptor2, this);
|
|
301984
|
+
|
|
301985
|
+
_initializerDefineProperty(this, "hint", _descriptor3, this);
|
|
301967
301986
|
}
|
|
301968
301987
|
|
|
301969
301988
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "tid", [_dec2], {
|
|
@@ -301971,7 +301990,12 @@ let RemoveRowButtonNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORT
|
|
|
301971
301990
|
enumerable: true,
|
|
301972
301991
|
writable: true,
|
|
301973
301992
|
initializer: null
|
|
301974
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
301993
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "clearLastInstance", [_dec3], {
|
|
301994
|
+
configurable: true,
|
|
301995
|
+
enumerable: true,
|
|
301996
|
+
writable: true,
|
|
301997
|
+
initializer: null
|
|
301998
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "hint", [_dec4], {
|
|
301975
301999
|
configurable: true,
|
|
301976
302000
|
enumerable: true,
|
|
301977
302001
|
writable: true,
|
|
@@ -307907,7 +307931,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Su
|
|
|
307907
307931
|
|
|
307908
307932
|
setCurrencyProps(markupBuilder, context, node) {
|
|
307909
307933
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
307910
|
-
const schemaTypeInfo = context.getSchemaTypeInfo(
|
|
307934
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
307911
307935
|
markupBuilder.prop(x => x.currency).set(node.currency);
|
|
307912
307936
|
|
|
307913
307937
|
if (node.currency) {
|
|
@@ -307958,7 +307982,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Su
|
|
|
307958
307982
|
var _typeNode$base2, _node$maskChar, _node$width;
|
|
307959
307983
|
|
|
307960
307984
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
307961
|
-
const schemaTypeInfo = context.getSchemaTypeInfo(
|
|
307985
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
307962
307986
|
const typeBase = (_typeNode$base2 = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base2 !== void 0 ? _typeNode$base2 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
307963
307987
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("Input");
|
|
307964
307988
|
|
|
@@ -308014,7 +308038,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Su
|
|
|
308014
308038
|
var _typeNode$base3, _node$width2;
|
|
308015
308039
|
|
|
308016
308040
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
308017
|
-
const schemaTypeInfo = context.getSchemaTypeInfo(
|
|
308041
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
308018
308042
|
const typeBase = (_typeNode$base3 = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base3 !== void 0 ? _typeNode$base3 : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
308019
308043
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("FxInput");
|
|
308020
308044
|
|
|
@@ -310365,7 +310389,7 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
310365
310389
|
var _ref, _ref2, _typeNode$flattenType, _typeNode$flattenType2, _typeNode$flattenType3;
|
|
310366
310390
|
|
|
310367
310391
|
const typeNode = context.getTypeNode(nodeValidationInfo);
|
|
310368
|
-
const schemaTypeInfo = context.getSchemaTypeInfo(
|
|
310392
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
310369
310393
|
return (_ref = (_ref2 = (_typeNode$flattenType = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType2 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.LengthTypeCheckNode))) === null || _typeNode$flattenType2 === void 0 ? void 0 : _typeNode$flattenType2.value) !== null && _typeNode$flattenType !== void 0 ? _typeNode$flattenType : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.length) !== null && _ref2 !== void 0 ? _ref2 : typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType3 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MaxlengthTypeCheckNode))) === null || _typeNode$flattenType3 === void 0 ? void 0 : _typeNode$flattenType3.value) !== null && _ref !== void 0 ? _ref : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.maxLength;
|
|
310370
310394
|
}
|
|
310371
310395
|
|
|
@@ -311813,17 +311837,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
311813
311837
|
|
|
311814
311838
|
|
|
311815
311839
|
class MarkupBuildingContext {
|
|
311816
|
-
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
311840
|
+
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, dataDeclarationHelper, useSchemaValidations) {
|
|
311817
311841
|
this.convertNode = void 0;
|
|
311818
311842
|
this.formSourcesPath = void 0;
|
|
311819
311843
|
this.helpers = void 0;
|
|
311820
311844
|
this.pathsContext = void 0;
|
|
311845
|
+
this.dataDeclarationHelper = void 0;
|
|
311821
311846
|
this.schemaRng = void 0;
|
|
311822
311847
|
this.useSchemaValidations = void 0;
|
|
311823
311848
|
this.typesRegistry = void 0;
|
|
311824
311849
|
this.uniqueControlIdIncrement = new Map();
|
|
311825
311850
|
this.controlCustomizationContext = void 0;
|
|
311826
311851
|
this.tourSteps = void 0;
|
|
311852
|
+
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
311827
311853
|
this.schemaRng = schemaRng;
|
|
311828
311854
|
this.useSchemaValidations = useSchemaValidations;
|
|
311829
311855
|
this.typesRegistry = typesRegistry;
|
|
@@ -311835,6 +311861,18 @@ class MarkupBuildingContext {
|
|
|
311835
311861
|
this.helpers = helpers;
|
|
311836
311862
|
}
|
|
311837
311863
|
|
|
311864
|
+
isNodeOptional(nodePath) {
|
|
311865
|
+
if (this.useSchemaValidations) {
|
|
311866
|
+
if (this.dataDeclarationHelper.isNodeOptional(nodePath) == false) {
|
|
311867
|
+
return this.schemaRng.getIsOptionalByPath(nodePath);
|
|
311868
|
+
} else {
|
|
311869
|
+
return true;
|
|
311870
|
+
}
|
|
311871
|
+
}
|
|
311872
|
+
|
|
311873
|
+
return this.dataDeclarationHelper.isNodeOptional(nodePath);
|
|
311874
|
+
}
|
|
311875
|
+
|
|
311838
311876
|
getUniqueControlId(context) {
|
|
311839
311877
|
let currentValue = this.uniqueControlIdIncrement.get(context);
|
|
311840
311878
|
|
|
@@ -311966,7 +312004,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
311966
312004
|
|
|
311967
312005
|
|
|
311968
312006
|
class MarkupGenerator {
|
|
311969
|
-
constructor(formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
312007
|
+
constructor(formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, dataDeclarationHelper, useSchemaValidations) {
|
|
311970
312008
|
this.controlCustomizationContext = void 0;
|
|
311971
312009
|
this.markupBuilderContext = void 0;
|
|
311972
312010
|
|
|
@@ -312001,7 +312039,7 @@ class MarkupGenerator {
|
|
|
312001
312039
|
};
|
|
312002
312040
|
|
|
312003
312041
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
312004
|
-
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);
|
|
312042
|
+
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, dataDeclarationHelper, useSchemaValidations);
|
|
312005
312043
|
}
|
|
312006
312044
|
|
|
312007
312045
|
generate(sugarRoot, builder) {
|
|
@@ -315743,14 +315781,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
315743
315781
|
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
315744
315782
|
/* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
315745
315783
|
/* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
|
|
315746
|
-
/* harmony import */ var
|
|
315747
|
-
/* harmony import */ var
|
|
315748
|
-
/* harmony import */ var
|
|
315749
|
-
/* harmony import */ var
|
|
315750
|
-
/* harmony import */ var
|
|
315751
|
-
/* harmony import */ var
|
|
315752
|
-
/* harmony import */ var
|
|
315753
|
-
/* harmony import */ var
|
|
315784
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
315785
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/AttachmentsValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/AttachmentsValueValidatorGenerator.ts");
|
|
315786
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/CustomValidationValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/CustomValidationValueValidatorGenerator.ts");
|
|
315787
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_NumberLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/NumberLengthConstraintValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/NumberLengthConstraintValueValidatorGenerator.ts");
|
|
315788
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_DigestCheckValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/DigestCheckValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/DigestCheckValueValidatorGenerator.ts");
|
|
315789
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_EnumerationValidatorGenerator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/EnumerationValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/EnumerationValidatorGenerator.ts");
|
|
315790
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_IntegerRangeValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/IntegerRangeValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/IntegerRangeValueValidatorGenerator.ts");
|
|
315791
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_MatchOneOfPatternValidatorGenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/MatchOneOfPatternValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/MatchOneOfPatternValidatorGenerator.ts");
|
|
315792
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_StringLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/StringLengthConstraintValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/StringLengthConstraintValueValidatorGenerator.ts");
|
|
315793
|
+
|
|
315754
315794
|
|
|
315755
315795
|
|
|
315756
315796
|
|
|
@@ -315768,7 +315808,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
315768
315808
|
|
|
315769
315809
|
class ValidationGenerator {
|
|
315770
315810
|
constructor(sugarRoot, typesRegistry, controlCustomizationContext, schemaRng, useSchemaValidations, validationsContent = []) {
|
|
315771
|
-
this.typeBasedValidatorGenerators = [
|
|
315811
|
+
this.typeBasedValidatorGenerators = [_TypeBasedValidatorGenerators_MatchOneOfPatternValidatorGenerator__WEBPACK_IMPORTED_MODULE_14__.MatchOneOfPatternValidatorGenerator, _TypeBasedValidatorGenerators_EnumerationValidatorGenerator__WEBPACK_IMPORTED_MODULE_12__.EnumerationValidatorGenerator, _TypeBasedValidatorGenerators_StringLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_15__.StringLengthConstraintValueValidatorGenerator, _TypeBasedValidatorGenerators_NumberLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__.NumberLengthConstraintValueValidatorGenerator, _TypeBasedValidatorGenerators_IntegerRangeValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_13__.IntegerRangeValueValidatorGenerator, _TypeBasedValidatorGenerators_DigestCheckValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_11__.DigestCheckValueValidatorGenerator, _TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_8__.AttachmentsValueValidatorGenerator, _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__.CustomValidationValueValidatorGenerator];
|
|
315772
315812
|
this.sugarRoot = void 0;
|
|
315773
315813
|
this.validationsContent = void 0;
|
|
315774
315814
|
this.customValidations = void 0;
|
|
@@ -315904,7 +315944,7 @@ class ValidationGenerator {
|
|
|
315904
315944
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_6__.InvalidProgramStateError();
|
|
315905
315945
|
}
|
|
315906
315946
|
|
|
315907
|
-
const bindingPath = firstItem.bindingPath;
|
|
315947
|
+
const bindingPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.convertToAbsolutModelPath)(firstItem.bindingPath);
|
|
315908
315948
|
const rngSchemaNodeType = this.getRngSchemaTypeInfo(bindingPath);
|
|
315909
315949
|
const sugarOptional = (_validationInfos$find = validationInfos.find(x => x.sugarOptional != undefined)) === null || _validationInfos$find === void 0 ? void 0 : _validationInfos$find.sugarOptional;
|
|
315910
315950
|
const isOptional = sugarOptional !== null && sugarOptional !== void 0 ? sugarOptional : this.isOptionalFromSchema(bindingPath);
|
|
@@ -315942,7 +315982,7 @@ class ValidationGenerator {
|
|
|
315942
315982
|
|
|
315943
315983
|
|
|
315944
315984
|
processValidations(bindingPath, sugarOptional, sugarNodeType, gId, highOrderDescription, fileLoaderOptions) {
|
|
315945
|
-
const rngSchemaNodeType = this.getRngSchemaTypeInfo(bindingPath);
|
|
315985
|
+
const rngSchemaNodeType = this.getRngSchemaTypeInfo((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.convertToAbsolutModelPath)(bindingPath));
|
|
315946
315986
|
|
|
315947
315987
|
if (bindingPath && (sugarNodeType != undefined || rngSchemaNodeType != undefined)) {
|
|
315948
315988
|
var _this$validations$val;
|