@kontur.candy/generator 4.235.0 → 4.236.0-newfiasfns.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 +117 -47
- 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
|
|
|
@@ -310052,7 +310076,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
310052
310076
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
310053
310077
|
/* harmony import */ var _CommonNodeProperties_TooltipProperties_SetTooltipSettingsProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/TooltipProperties/SetTooltipSettingsProps.ts");
|
|
310054
310078
|
/* harmony import */ var _SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
|
|
310055
|
-
/* harmony import */ var
|
|
310079
|
+
/* harmony import */ var _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../validationGenerator/Nodes/TypeNode */ "./Generator/src/generators/validationGenerator/Nodes/TypeNode.ts");
|
|
310080
|
+
/* harmony import */ var _TextAreaNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TextAreaNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Textarea/TextAreaNode.ts");
|
|
310081
|
+
|
|
310056
310082
|
|
|
310057
310083
|
|
|
310058
310084
|
|
|
@@ -310062,16 +310088,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
310062
310088
|
|
|
310063
310089
|
class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.SugarNodeConverterBase {
|
|
310064
310090
|
static getAcceptNodeClass() {
|
|
310065
|
-
return
|
|
310091
|
+
return _TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode;
|
|
310066
310092
|
}
|
|
310067
310093
|
|
|
310068
310094
|
doBuildNodeValidations(validationGenerator) {
|
|
310069
|
-
const node = this.getCurrentNodeAs(
|
|
310095
|
+
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
310070
310096
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription);
|
|
310071
310097
|
}
|
|
310072
310098
|
|
|
310073
310099
|
doBuildDataDeclaration(context) {
|
|
310074
|
-
const node = this.getCurrentNodeAs(
|
|
310100
|
+
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
310075
310101
|
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
|
|
310076
310102
|
optional: node.dataBinding.optional,
|
|
310077
310103
|
disabled: node.disabled
|
|
@@ -310079,22 +310105,22 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
310079
310105
|
}
|
|
310080
310106
|
|
|
310081
310107
|
buildChildrenDataDeclaration(context) {
|
|
310082
|
-
const node = this.getCurrentNodeAs(
|
|
310108
|
+
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
310083
310109
|
return context.processChildrenDataDeclaration(node.helpNodes);
|
|
310084
310110
|
}
|
|
310085
310111
|
|
|
310086
310112
|
*doTraverseChildren() {
|
|
310087
|
-
const node = this.getCurrentNodeAs(
|
|
310113
|
+
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
310088
310114
|
yield* node.helpNodes;
|
|
310089
310115
|
}
|
|
310090
310116
|
|
|
310091
310117
|
get nodePaths() {
|
|
310092
|
-
const node = this.getCurrentNodeAs(
|
|
310118
|
+
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
310093
310119
|
return [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_3__.getNewBindingPathExpression)(node)];
|
|
310094
310120
|
}
|
|
310095
310121
|
|
|
310096
310122
|
doConvert(context) {
|
|
310097
|
-
const node = this.getCurrentNodeAs(
|
|
310123
|
+
const node = this.getCurrentNodeAs(_TextAreaNode__WEBPACK_IMPORTED_MODULE_7__.TextAreaNode);
|
|
310098
310124
|
this.ensurePathExists(node, node.dataBinding.path);
|
|
310099
310125
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_0__.componentMarkupBuilder)("TextArea");
|
|
310100
310126
|
|
|
@@ -310110,6 +310136,12 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
310110
310136
|
markupBuilder.prop(x => x.resize).set(node.resize);
|
|
310111
310137
|
markupBuilder.prop(x => x.autoResize).set(node.autoResize);
|
|
310112
310138
|
|
|
310139
|
+
if (node.useLengthLimit) {
|
|
310140
|
+
var _node$maxTextLength;
|
|
310141
|
+
|
|
310142
|
+
markupBuilder.prop(x => x.textMaxLength).set((_node$maxTextLength = node.maxTextLength) !== null && _node$maxTextLength !== void 0 ? _node$maxTextLength : this.getTextMaxLength(context, node, node.validationInfo));
|
|
310143
|
+
}
|
|
310144
|
+
|
|
310113
310145
|
if (node.disabled2 != undefined) {
|
|
310114
310146
|
markupBuilder.prop(x => x.disabled2).set((0,_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_5__.buildExpressionPropValue)(node.disabled2));
|
|
310115
310147
|
|
|
@@ -310122,6 +310154,14 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
310122
310154
|
return markupBuilder.buildConverterResultWithHelp(node, context);
|
|
310123
310155
|
}
|
|
310124
310156
|
|
|
310157
|
+
getTextMaxLength(context, node, nodeValidationInfo) {
|
|
310158
|
+
var _ref, _ref2, _typeNode$flattenType, _typeNode$flattenType2, _typeNode$flattenType3;
|
|
310159
|
+
|
|
310160
|
+
const typeNode = context.getTypeNode(nodeValidationInfo);
|
|
310161
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
310162
|
+
return (_ref = (_ref2 = (_typeNode$flattenType = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$flattenType2 = typeNode.flattenTypeCheckNodes().find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_6__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_6__.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_6__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_6__.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;
|
|
310163
|
+
}
|
|
310164
|
+
|
|
310125
310165
|
}
|
|
310126
310166
|
|
|
310127
310167
|
/***/ }),
|
|
@@ -310145,7 +310185,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
310145
310185
|
/* harmony import */ var _Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Helpers/Help/HelpNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Helpers/Help/HelpNode.ts");
|
|
310146
310186
|
/* harmony import */ var _CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../CommonNodeProperties/TooltipProperties/TooltipSettingsNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/TooltipProperties/TooltipSettingsNode.ts");
|
|
310147
310187
|
/* harmony import */ var _Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Commons/DocumentationLinks */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/DocumentationLinks.ts");
|
|
310148
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
|
|
310188
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
310149
310189
|
|
|
310150
310190
|
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 }); }
|
|
310151
310191
|
|
|
@@ -310161,7 +310201,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
310161
310201
|
|
|
310162
310202
|
|
|
310163
310203
|
|
|
310164
|
-
let TextAreaNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("textarea", `Расширяющееся поле`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Textarea sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_1__.ValidationInfoNode), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_6__.TooltipSettingsNode), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, `Ширина. Не может быть меньше 250`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("placeholder", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, ``), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, ``), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_7__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_7__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("autoResize", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, ``), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("rows", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.number, ``), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("row", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.Typo), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("resize", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("-moz-initial", "inherit", "initial", "revert", "unset", "block", "both", "horizontal", "inline", "none", "vertical"), ``), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.bindingPath, ``), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, ``), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_5__.HelpNode]), _dec(_class = (_class2 = class TextAreaNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_3__.SugarNodeWithLegacyVisibility {
|
|
310204
|
+
let TextAreaNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("textarea", `Расширяющееся поле`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Textarea sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_0__.DataBindingMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_1__.ValidationInfoNode), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_6__.TooltipSettingsNode), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.lengthUnit, `Ширина. Не может быть меньше 250`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("placeholder", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, ``), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("disabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, ``), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("disabled2", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_7__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_7__.javaScriptExpressionLink)} для условного задизейбливания контрола`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("autoResize", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, ``), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("rows", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.number, ``), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("row", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_2__.DeprecationReason.Typo), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("resize", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("-moz-initial", "inherit", "initial", "revert", "unset", "block", "both", "horizontal", "inline", "none", "vertical"), ``), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.bindingPath, ``), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("help", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.string, ``), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)("help", [_Helpers_Help_HelpNode__WEBPACK_IMPORTED_MODULE_5__.HelpNode]), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("useLengthLimit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Включает отображение счётчик длины текста`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("maxTextLength", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.number, `Задаёт максимальное кол-во символов для счётчика длины текста. Если не указано, значение будет братся из валидации или схемы`), _dec(_class = (_class2 = class TextAreaNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_3__.SugarNodeWithLegacyVisibility {
|
|
310165
310205
|
constructor(...args) {
|
|
310166
310206
|
super(...args);
|
|
310167
310207
|
|
|
@@ -310192,6 +310232,10 @@ let TextAreaNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODU
|
|
|
310192
310232
|
_initializerDefineProperty(this, "help", _descriptor13, this);
|
|
310193
310233
|
|
|
310194
310234
|
_initializerDefineProperty(this, "helpNodes", _descriptor14, this);
|
|
310235
|
+
|
|
310236
|
+
_initializerDefineProperty(this, "useLengthLimit", _descriptor15, this);
|
|
310237
|
+
|
|
310238
|
+
_initializerDefineProperty(this, "maxTextLength", _descriptor16, this);
|
|
310195
310239
|
}
|
|
310196
310240
|
|
|
310197
310241
|
getOwnPath() {
|
|
@@ -310268,6 +310312,16 @@ let TextAreaNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODU
|
|
|
310268
310312
|
enumerable: true,
|
|
310269
310313
|
writable: true,
|
|
310270
310314
|
initializer: null
|
|
310315
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "useLengthLimit", [_dec16], {
|
|
310316
|
+
configurable: true,
|
|
310317
|
+
enumerable: true,
|
|
310318
|
+
writable: true,
|
|
310319
|
+
initializer: null
|
|
310320
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "maxTextLength", [_dec17], {
|
|
310321
|
+
configurable: true,
|
|
310322
|
+
enumerable: true,
|
|
310323
|
+
writable: true,
|
|
310324
|
+
initializer: null
|
|
310271
310325
|
})), _class2)) || _class);
|
|
310272
310326
|
|
|
310273
310327
|
/***/ }),
|
|
@@ -310365,7 +310419,7 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
310365
310419
|
var _ref, _ref2, _typeNode$flattenType, _typeNode$flattenType2, _typeNode$flattenType3;
|
|
310366
310420
|
|
|
310367
310421
|
const typeNode = context.getTypeNode(nodeValidationInfo);
|
|
310368
|
-
const schemaTypeInfo = context.getSchemaTypeInfo(
|
|
310422
|
+
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
310369
310423
|
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
310424
|
}
|
|
310371
310425
|
|
|
@@ -311813,17 +311867,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
311813
311867
|
|
|
311814
311868
|
|
|
311815
311869
|
class MarkupBuildingContext {
|
|
311816
|
-
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
311870
|
+
constructor(convertNode, nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, dataDeclarationHelper, useSchemaValidations) {
|
|
311817
311871
|
this.convertNode = void 0;
|
|
311818
311872
|
this.formSourcesPath = void 0;
|
|
311819
311873
|
this.helpers = void 0;
|
|
311820
311874
|
this.pathsContext = void 0;
|
|
311875
|
+
this.dataDeclarationHelper = void 0;
|
|
311821
311876
|
this.schemaRng = void 0;
|
|
311822
311877
|
this.useSchemaValidations = void 0;
|
|
311823
311878
|
this.typesRegistry = void 0;
|
|
311824
311879
|
this.uniqueControlIdIncrement = new Map();
|
|
311825
311880
|
this.controlCustomizationContext = void 0;
|
|
311826
311881
|
this.tourSteps = void 0;
|
|
311882
|
+
this.dataDeclarationHelper = dataDeclarationHelper;
|
|
311827
311883
|
this.schemaRng = schemaRng;
|
|
311828
311884
|
this.useSchemaValidations = useSchemaValidations;
|
|
311829
311885
|
this.typesRegistry = typesRegistry;
|
|
@@ -311835,6 +311891,18 @@ class MarkupBuildingContext {
|
|
|
311835
311891
|
this.helpers = helpers;
|
|
311836
311892
|
}
|
|
311837
311893
|
|
|
311894
|
+
isNodeOptional(nodePath) {
|
|
311895
|
+
if (this.useSchemaValidations) {
|
|
311896
|
+
if (this.dataDeclarationHelper.isNodeOptional(nodePath) == false) {
|
|
311897
|
+
return this.schemaRng.getIsOptionalByPath(nodePath);
|
|
311898
|
+
} else {
|
|
311899
|
+
return true;
|
|
311900
|
+
}
|
|
311901
|
+
}
|
|
311902
|
+
|
|
311903
|
+
return this.dataDeclarationHelper.isNodeOptional(nodePath);
|
|
311904
|
+
}
|
|
311905
|
+
|
|
311838
311906
|
getUniqueControlId(context) {
|
|
311839
311907
|
let currentValue = this.uniqueControlIdIncrement.get(context);
|
|
311840
311908
|
|
|
@@ -311966,7 +312034,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
311966
312034
|
|
|
311967
312035
|
|
|
311968
312036
|
class MarkupGenerator {
|
|
311969
|
-
constructor(formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, useSchemaValidations) {
|
|
312037
|
+
constructor(formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, dataDeclarationHelper, useSchemaValidations) {
|
|
311970
312038
|
this.controlCustomizationContext = void 0;
|
|
311971
312039
|
this.markupBuilderContext = void 0;
|
|
311972
312040
|
|
|
@@ -312001,7 +312069,7 @@ class MarkupGenerator {
|
|
|
312001
312069
|
};
|
|
312002
312070
|
|
|
312003
312071
|
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);
|
|
312072
|
+
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
312073
|
}
|
|
312006
312074
|
|
|
312007
312075
|
generate(sugarRoot, builder) {
|
|
@@ -315743,14 +315811,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
315743
315811
|
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
315744
315812
|
/* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
315745
315813
|
/* 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
|
|
315814
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
315815
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/AttachmentsValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/AttachmentsValueValidatorGenerator.ts");
|
|
315816
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/CustomValidationValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/CustomValidationValueValidatorGenerator.ts");
|
|
315817
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_NumberLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/NumberLengthConstraintValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/NumberLengthConstraintValueValidatorGenerator.ts");
|
|
315818
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_DigestCheckValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/DigestCheckValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/DigestCheckValueValidatorGenerator.ts");
|
|
315819
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_EnumerationValidatorGenerator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/EnumerationValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/EnumerationValidatorGenerator.ts");
|
|
315820
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_IntegerRangeValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/IntegerRangeValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/IntegerRangeValueValidatorGenerator.ts");
|
|
315821
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_MatchOneOfPatternValidatorGenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/MatchOneOfPatternValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/MatchOneOfPatternValidatorGenerator.ts");
|
|
315822
|
+
/* harmony import */ var _TypeBasedValidatorGenerators_StringLengthConstraintValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./TypeBasedValidatorGenerators/StringLengthConstraintValueValidatorGenerator */ "./Generator/src/generators/validationGenerator/TypeBasedValidatorGenerators/StringLengthConstraintValueValidatorGenerator.ts");
|
|
315823
|
+
|
|
315754
315824
|
|
|
315755
315825
|
|
|
315756
315826
|
|
|
@@ -315768,7 +315838,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
315768
315838
|
|
|
315769
315839
|
class ValidationGenerator {
|
|
315770
315840
|
constructor(sugarRoot, typesRegistry, controlCustomizationContext, schemaRng, useSchemaValidations, validationsContent = []) {
|
|
315771
|
-
this.typeBasedValidatorGenerators = [
|
|
315841
|
+
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
315842
|
this.sugarRoot = void 0;
|
|
315773
315843
|
this.validationsContent = void 0;
|
|
315774
315844
|
this.customValidations = void 0;
|
|
@@ -315904,7 +315974,7 @@ class ValidationGenerator {
|
|
|
315904
315974
|
throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_6__.InvalidProgramStateError();
|
|
315905
315975
|
}
|
|
315906
315976
|
|
|
315907
|
-
const bindingPath = firstItem.bindingPath;
|
|
315977
|
+
const bindingPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.convertToAbsolutModelPath)(firstItem.bindingPath);
|
|
315908
315978
|
const rngSchemaNodeType = this.getRngSchemaTypeInfo(bindingPath);
|
|
315909
315979
|
const sugarOptional = (_validationInfos$find = validationInfos.find(x => x.sugarOptional != undefined)) === null || _validationInfos$find === void 0 ? void 0 : _validationInfos$find.sugarOptional;
|
|
315910
315980
|
const isOptional = sugarOptional !== null && sugarOptional !== void 0 ? sugarOptional : this.isOptionalFromSchema(bindingPath);
|
|
@@ -315942,7 +316012,7 @@ class ValidationGenerator {
|
|
|
315942
316012
|
|
|
315943
316013
|
|
|
315944
316014
|
processValidations(bindingPath, sugarOptional, sugarNodeType, gId, highOrderDescription, fileLoaderOptions) {
|
|
315945
|
-
const rngSchemaNodeType = this.getRngSchemaTypeInfo(bindingPath);
|
|
316015
|
+
const rngSchemaNodeType = this.getRngSchemaTypeInfo((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__.convertToAbsolutModelPath)(bindingPath));
|
|
315946
316016
|
|
|
315947
316017
|
if (bindingPath && (sugarNodeType != undefined || rngSchemaNodeType != undefined)) {
|
|
315948
316018
|
var _this$validations$val;
|