@kontur.candy/generator 5.86.0 → 5.88.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 +178 -140
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61684,7 +61684,11 @@ function generateKCXmlExpression(expression, prefixPath = "") {
|
|
|
61684
61684
|
case "newline":
|
|
61685
61685
|
return `<m:newline />`;
|
|
61686
61686
|
case "regexMatch":
|
|
61687
|
-
|
|
61687
|
+
{
|
|
61688
|
+
const escapedPattern = escapeHtmlCharacters(expression.pattern);
|
|
61689
|
+
const pattern = escapedPattern.match(/[\^\$]/g) != undefined ? escapedPattern : `^(${escapedPattern})$`;
|
|
61690
|
+
return [`<m:regexMatch pattern="${pattern}">`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.expression, prefixPath), 1), `</m:regexMatch>`].join("\n");
|
|
61691
|
+
}
|
|
61688
61692
|
case "choose":
|
|
61689
61693
|
return [`<m:choose>`, ` <m:if>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.if, prefixPath), 2), ` </m:if>`, ` <m:then>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.then, prefixPath), 2), ` </m:then>`, ` <m:else>`, (0,_Common_IndentString__WEBPACK_IMPORTED_MODULE_2__.indent)(generateKCXmlExpression(expression.else, prefixPath), 2), ` </m:else>`, `</m:choose>`].join("\n");
|
|
61690
61694
|
break;
|
|
@@ -66654,6 +66658,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
66654
66658
|
|
|
66655
66659
|
|
|
66656
66660
|
class AttachmentPathsGenerator {
|
|
66661
|
+
constructor(context) {
|
|
66662
|
+
this.context = void 0;
|
|
66663
|
+
this.context = context;
|
|
66664
|
+
}
|
|
66657
66665
|
generate(sugarNode) {
|
|
66658
66666
|
var _getConverterByNodeCl;
|
|
66659
66667
|
(_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_1__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.getNodeClass)(sugarNode))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)(`Converter for root node must be defined`);
|
|
@@ -66670,7 +66678,7 @@ class AttachmentPathsGenerator {
|
|
|
66670
66678
|
return;
|
|
66671
66679
|
}
|
|
66672
66680
|
const converter = new converterType(sugarNode);
|
|
66673
|
-
yield* converter.getAttachmentPaths();
|
|
66681
|
+
yield* converter.getAttachmentPaths(this.context);
|
|
66674
66682
|
for (const child of converter.traverseChildren()) {
|
|
66675
66683
|
yield* this.generateInternal(child);
|
|
66676
66684
|
}
|
|
@@ -72001,6 +72009,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
72001
72009
|
/* harmony import */ var _markupGenerator_KCLangCalculationsBuildContext__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./markupGenerator/KCLangCalculationsBuildContext */ "./Generator/src/generators/markupGenerator/KCLangCalculationsBuildContext.ts");
|
|
72002
72010
|
/* harmony import */ var _ServerSideFLangNormalization_NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./ServerSideFLangNormalization/NodeTypeInfoHelper */ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts");
|
|
72003
72011
|
/* harmony import */ var _BuildExtendedSchemaInfo__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./BuildExtendedSchemaInfo */ "./Generator/src/generators/BuildExtendedSchemaInfo.ts");
|
|
72012
|
+
/* harmony import */ var _markupGenerator_ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./markupGenerator/ElementProcessors/Commons/NodePathsContext */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/NodePathsContext.ts");
|
|
72013
|
+
/* harmony import */ var _markupGenerator_IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./markupGenerator/IMarkupBuildingContext */ "./Generator/src/generators/markupGenerator/IMarkupBuildingContext.ts");
|
|
72014
|
+
|
|
72015
|
+
|
|
72004
72016
|
|
|
72005
72017
|
|
|
72006
72018
|
|
|
@@ -72088,7 +72100,8 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
72088
72100
|
} = dataDeclarationGenerator.generate();
|
|
72089
72101
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_26__.DataDeclarationGenerationTimeHelper(dataDeclaration, formSchemaRng);
|
|
72090
72102
|
const extendedSchemaInfo = (0,_BuildExtendedSchemaInfo__WEBPACK_IMPORTED_MODULE_48__.buildExtendedSchemaInfo)(dataDeclarationHelper);
|
|
72091
|
-
const
|
|
72103
|
+
const markupBuilderContext = new _markupGenerator_IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_50__.MarkupBuildingContext(new _markupGenerator_ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_49__.NodePathsContext(), additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, useSchemaValidations);
|
|
72104
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_16__.ValidationGenerator(sugarRoot, typeRegistry, markupBuilderContext, controlCustomizationContext, formSchemaRng, useSchemaValidations, additionalContent.validationsContent, additionalContent.formJsonSettings);
|
|
72092
72105
|
const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
|
|
72093
72106
|
const lazyLoadGeneratorResult = lazyLoadGenerator.generate();
|
|
72094
72107
|
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");
|
|
@@ -72109,7 +72122,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
72109
72122
|
});
|
|
72110
72123
|
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng);
|
|
72111
72124
|
const autoValueForValueByDefaultNormalizationRuleGenerator = new _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_45__.AutoValueForValueByDefaultNormalizationRuleGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, dataDeclarationHelper);
|
|
72112
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(
|
|
72125
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(markupBuilderContext);
|
|
72113
72126
|
markupGenerator.generate(sugarRoot, builder);
|
|
72114
72127
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_9__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
|
|
72115
72128
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -72158,7 +72171,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
72158
72171
|
builder.addServerSideResource("ServerSide.normalize", resultRules);
|
|
72159
72172
|
}
|
|
72160
72173
|
builder.addResource("lazyLoadDeclaration.js", _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator.convertDeclarationToContent(finalLazyLoadDeclaration));
|
|
72161
|
-
const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_27__.AttachmentPathsGenerator();
|
|
72174
|
+
const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_27__.AttachmentPathsGenerator(markupBuilderContext);
|
|
72162
72175
|
const attachmentPaths = attachmentPathsGenerator.generate(sugarRoot);
|
|
72163
72176
|
builder.addServerSideResource(`AttachmentPaths.json`, JSON.stringify(attachmentPaths));
|
|
72164
72177
|
const attachmentPathsWithGfvs = attachmentPathsGenerator.generateWithGfvs(sugarRoot);
|
|
@@ -79601,11 +79614,11 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
|
|
|
79601
79614
|
const deps = (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getPathsFromEvaluablePropValue)(condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
|
|
79602
79615
|
return deps.filter(p => !p.toLegacyPath().startsWith("@")).map(x => evaluatorsContextPathExpression.toCurrentIteration().joinWith(x));
|
|
79603
79616
|
}
|
|
79604
|
-
buildChildrenValidations(validationGenerator) {
|
|
79617
|
+
buildChildrenValidations(validationGenerator, context) {
|
|
79605
79618
|
var _node$doNotIncludeInV2;
|
|
79606
79619
|
const node = this.getCurrentNodeAs(_IfNode__WEBPACK_IMPORTED_MODULE_13__.IfNode);
|
|
79607
79620
|
if ((_node$doNotIncludeInV2 = node.doNotIncludeInValidations) !== null && _node$doNotIncludeInV2 !== void 0 ? _node$doNotIncludeInV2 : false) {
|
|
79608
|
-
super.buildChildrenValidations(validationGenerator);
|
|
79621
|
+
super.buildChildrenValidations(validationGenerator, context);
|
|
79609
79622
|
return;
|
|
79610
79623
|
}
|
|
79611
79624
|
if (node.then != undefined) {
|
|
@@ -79615,14 +79628,14 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
|
|
|
79615
79628
|
const deps = this.getDepsWithResolvedPath(condition, evaluatorsContextPathExpression);
|
|
79616
79629
|
validationGenerator.pushVisibilityCondition([condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(), evaluatorsContextPathExpression, deps]);
|
|
79617
79630
|
try {
|
|
79618
|
-
super.buildChildrenValidations(validationGenerator, Iterator.from(node.then.children));
|
|
79631
|
+
super.buildChildrenValidations(validationGenerator, context, Iterator.from(node.then.children));
|
|
79619
79632
|
} finally {
|
|
79620
79633
|
validationGenerator.popVisibilityCondition();
|
|
79621
79634
|
}
|
|
79622
79635
|
if (node.else != undefined) {
|
|
79623
79636
|
validationGenerator.pushVisibilityCondition(["!(" + (condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)()) + ")", evaluatorsContextPathExpression, this.getDepsWithResolvedPath(condition, evaluatorsContextPathExpression)]);
|
|
79624
79637
|
try {
|
|
79625
|
-
super.buildChildrenValidations(validationGenerator, Iterator.from(node.else.children));
|
|
79638
|
+
super.buildChildrenValidations(validationGenerator, context, Iterator.from(node.else.children));
|
|
79626
79639
|
} finally {
|
|
79627
79640
|
validationGenerator.popVisibilityCondition();
|
|
79628
79641
|
}
|
|
@@ -79633,7 +79646,7 @@ class IfConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sugar
|
|
|
79633
79646
|
const condition = conditionWithDependencies.condition;
|
|
79634
79647
|
validationGenerator.pushVisibilityCondition([condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)(), evaluatorsContextPathExpression, this.getDepsWithResolvedPath(condition, evaluatorsContextPathExpression)]);
|
|
79635
79648
|
try {
|
|
79636
|
-
super.buildChildrenValidations(validationGenerator);
|
|
79649
|
+
super.buildChildrenValidations(validationGenerator, context);
|
|
79637
79650
|
} finally {
|
|
79638
79651
|
validationGenerator.popVisibilityCondition();
|
|
79639
79652
|
}
|
|
@@ -80151,7 +80164,7 @@ class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.S
|
|
|
80151
80164
|
const deps = (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_6__.getPathsFromEvaluablePropValue)(condition !== null && condition !== void 0 ? condition : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_7__.reject)());
|
|
80152
80165
|
return deps.filter(p => !p.toLegacyPath().startsWith("@")).map(x => evaluatorsContextPathExpression.toCurrentIteration().joinWith(x));
|
|
80153
80166
|
}
|
|
80154
|
-
buildChildrenValidations(validationGenerator) {
|
|
80167
|
+
buildChildrenValidations(validationGenerator, context) {
|
|
80155
80168
|
const node = this.getCurrentNodeAs(_SwitchNode__WEBPACK_IMPORTED_MODULE_14__.SwitchNode);
|
|
80156
80169
|
const evaluatorsContextPathExpression = this.getEvaluatorsContextPathExpression();
|
|
80157
80170
|
const prevConditions = [];
|
|
@@ -80163,7 +80176,7 @@ class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.S
|
|
|
80163
80176
|
const deps = this.getDepsWithResolvedPath(currentCaseCondition, evaluatorsContextPathExpression);
|
|
80164
80177
|
validationGenerator.pushVisibilityCondition([currentCaseCondition, evaluatorsContextPathExpression, deps]);
|
|
80165
80178
|
try {
|
|
80166
|
-
super.buildChildrenValidations(validationGenerator, Iterator.from(caseNode.children));
|
|
80179
|
+
super.buildChildrenValidations(validationGenerator, context, Iterator.from(caseNode.children));
|
|
80167
80180
|
} finally {
|
|
80168
80181
|
validationGenerator.popVisibilityCondition();
|
|
80169
80182
|
}
|
|
@@ -80173,7 +80186,7 @@ class SwitchConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.S
|
|
|
80173
80186
|
const deps = this.getDepsWithResolvedPath(defaultCondition, evaluatorsContextPathExpression);
|
|
80174
80187
|
validationGenerator.pushVisibilityCondition([defaultCondition, evaluatorsContextPathExpression, deps]);
|
|
80175
80188
|
try {
|
|
80176
|
-
super.buildChildrenValidations(validationGenerator, Iterator.from(node.default.children));
|
|
80189
|
+
super.buildChildrenValidations(validationGenerator, context, Iterator.from(node.default.children));
|
|
80177
80190
|
} finally {
|
|
80178
80191
|
validationGenerator.popVisibilityCondition();
|
|
80179
80192
|
}
|
|
@@ -81627,6 +81640,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
81627
81640
|
if (formNode.zeroreportoptions) {
|
|
81628
81641
|
formMarkupBuilder.prop(x => x.zeroReportOptions).set(this.getConverterResultFromAttributeWithMarkup(context, formNode.zeroreportoptions.children));
|
|
81629
81642
|
formMarkupBuilder.prop(x => x.zeroReportValidationPath).set(formNode.zeroreportoptions.dataScope.path);
|
|
81643
|
+
formMarkupBuilder.prop(x => x.zeroReportDescription).set(formNode.zeroreportoptions.description);
|
|
81630
81644
|
}
|
|
81631
81645
|
formMarkupBuilder.prop(x => x.unitInfos).set(pageNodes.map(pageNode => this.buildUnitInfo(context, pageNode, formNode)));
|
|
81632
81646
|
formMarkupBuilder.appendChild(formContent);
|
|
@@ -83797,7 +83811,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
83797
83811
|
const kcXmlValidationConfiguratorFunction = kcXmlValidationGenerator.generateConfigurationFunction((_mathContainerFromSug = (_mathContainerFromSug2 = mathContainerFromSugar.conditions) === null || _mathContainerFromSug2 === void 0 ? void 0 : _mathContainerFromSug2.items) !== null && _mathContainerFromSug !== void 0 ? _mathContainerFromSug : [], {
|
|
83798
83812
|
skipNotSupportedFunction: true
|
|
83799
83813
|
});
|
|
83800
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_6__.ValidationGenerator(sugarRoot, typeRegistry, context.controlCustomizationContext, formSchemaRng, false);
|
|
83814
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_6__.ValidationGenerator(sugarRoot, typeRegistry, context, context.controlCustomizationContext, formSchemaRng, false);
|
|
83801
83815
|
userPicklistDeclarationBuilder.prop(x => x.editorValidations).set({
|
|
83802
83816
|
type: "Expression",
|
|
83803
83817
|
expression: validationGenerator.generateValidationsFactory()
|
|
@@ -83922,14 +83936,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
83922
83936
|
|
|
83923
83937
|
|
|
83924
83938
|
|
|
83925
|
-
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
83939
|
+
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
83926
83940
|
|
|
83927
83941
|
|
|
83928
|
-
let ZeroReportOptionsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("zeroreportoptions", `Используется для описания
|
|
83942
|
+
let ZeroReportOptionsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("zeroreportoptions", `Используется для описания содержимого модальной формы создания нулевого отчёта`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/ZeroReportOptions sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_4__.DataBindingScopeMixinNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.children)(), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, `Текст в модалке создания нулевого отчёта. Поддерживает markdown`), _dec(_class = (_class2 = class ZeroReportOptionsNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
83929
83943
|
constructor(...args) {
|
|
83930
83944
|
super(...args);
|
|
83931
83945
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataScope", _descriptor, this);
|
|
83932
83946
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor2, this);
|
|
83947
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor3, this);
|
|
83933
83948
|
}
|
|
83934
83949
|
}, _descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "dataScope", [_dec2], {
|
|
83935
83950
|
configurable: true,
|
|
@@ -83941,6 +83956,11 @@ let ZeroReportOptionsNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPO
|
|
|
83941
83956
|
enumerable: true,
|
|
83942
83957
|
writable: true,
|
|
83943
83958
|
initializer: null
|
|
83959
|
+
}), _descriptor3 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "description", [_dec4], {
|
|
83960
|
+
configurable: true,
|
|
83961
|
+
enumerable: true,
|
|
83962
|
+
writable: true,
|
|
83963
|
+
initializer: null
|
|
83944
83964
|
}), _class2)) || _class);
|
|
83945
83965
|
|
|
83946
83966
|
/***/ }),
|
|
@@ -94470,7 +94490,7 @@ class CheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
|
|
|
94470
94490
|
var _node$dataBinding$def;
|
|
94471
94491
|
const defaultValue = (_node$dataBinding$def = node.dataBinding.defaultValue) !== null && _node$dataBinding$def !== void 0 ? _node$dataBinding$def : "";
|
|
94472
94492
|
if (defaultValue) {
|
|
94473
|
-
if (defaultValue === "checked") {
|
|
94493
|
+
if (defaultValue === "checked" || defaultValue === node.checkedValue) {
|
|
94474
94494
|
var _node$checkedValue;
|
|
94475
94495
|
return (_node$checkedValue = node.checkedValue) !== null && _node$checkedValue !== void 0 ? _node$checkedValue : true;
|
|
94476
94496
|
} else {
|
|
@@ -95875,11 +95895,12 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
95875
95895
|
});
|
|
95876
95896
|
}
|
|
95877
95897
|
extractFnsOptions(options) {
|
|
95878
|
-
var _options$abbreviation, _options$withFederalT, _options$extendModal;
|
|
95898
|
+
var _options$abbreviation, _options$withFederalT, _options$extendModal, _options$hiddenFields;
|
|
95879
95899
|
return {
|
|
95880
95900
|
abbreviationSize: (_options$abbreviation = options.abbreviationSize) !== null && _options$abbreviation !== void 0 ? _options$abbreviation : "short",
|
|
95881
95901
|
withFederalTerritory: (_options$withFederalT = options.withFederalTerritory) !== null && _options$withFederalT !== void 0 ? _options$withFederalT : false,
|
|
95882
|
-
extendModal: (_options$extendModal = options.extendModal) !== null && _options$extendModal !== void 0 ? _options$extendModal : true
|
|
95902
|
+
extendModal: (_options$extendModal = options.extendModal) !== null && _options$extendModal !== void 0 ? _options$extendModal : true,
|
|
95903
|
+
hiddenFields: (_options$hiddenFields = options.hiddenFields) !== null && _options$hiddenFields !== void 0 ? _options$hiddenFields : []
|
|
95883
95904
|
};
|
|
95884
95905
|
}
|
|
95885
95906
|
extractMvdOptions(options) {
|
|
@@ -95924,7 +95945,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
95924
95945
|
|
|
95925
95946
|
|
|
95926
95947
|
|
|
95927
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _dec9, _dec10, _dec11, _class3, _class4, _descriptor8, _descriptor9, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _class5, _class6, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _dec26, _dec27, _dec28, _class7, _class8, _descriptor23, _descriptor24, _dec29, _dec30, _dec31, _dec32, _class9, _class10, _descriptor25, _descriptor26, _descriptor27,
|
|
95948
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _dec9, _dec10, _dec11, _class3, _class4, _descriptor8, _descriptor9, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _class5, _class6, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _dec26, _dec27, _dec28, _class7, _class8, _descriptor23, _descriptor24, _dec29, _dec30, _dec31, _dec32, _dec33, _class9, _class10, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _dec34, _dec35, _class11, _class12, _descriptor29, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _dec51, _dec52, _class13, _class14, _descriptor30, _descriptor31, _descriptor32, _descriptor33, _descriptor34, _descriptor35, _descriptor36, _descriptor37, _descriptor38, _descriptor39, _descriptor40, _descriptor41, _descriptor42, _descriptor43, _descriptor44, _descriptor45;
|
|
95928
95949
|
|
|
95929
95950
|
|
|
95930
95951
|
|
|
@@ -96095,12 +96116,13 @@ let FiasChildren = (_dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MO
|
|
|
96095
96116
|
writable: true,
|
|
96096
96117
|
initializer: null
|
|
96097
96118
|
}), _class8)) || _class7);
|
|
96098
|
-
let FiasFnsOptions = (_dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fnsoptions", "Фишки из фнс фиаса - только для ФНС форм!"), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("extendModal", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Расширенная модалка для фиаса. Только для ФНС форм, так как там одни пути."), _dec31 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("withFederalTerritory", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Новый формат для обновленной фнс формы с новым муниципальным делением - федеральная территория. Пока как настройка - в дальнейшем если это станет обобщенным для всех фарматов, надо выпилить"), _dec32 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("abbreviationSize", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("long", "short"), "Полные или сокращенные аббревиатуры"), _dec29(_class9 = (_class10 = class FiasFnsOptions extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
|
|
96119
|
+
let FiasFnsOptions = (_dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fnsoptions", "Фишки из фнс фиаса - только для ФНС форм!"), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("extendModal", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Расширенная модалка для фиаса. Только для ФНС форм, так как там одни пути."), _dec31 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("withFederalTerritory", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Новый формат для обновленной фнс формы с новым муниципальным делением - федеральная территория. Пока как настройка - в дальнейшем если это станет обобщенным для всех фарматов, надо выпилить"), _dec32 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("abbreviationSize", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("long", "short"), "Полные или сокращенные аббревиатуры"), _dec33 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("hiddenFields", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.array(_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("Region", "District", "Settlement", "City", "Structure", "Street", "Stead", "House", "Housing", "Building", "Apartment", "Room", "Id")), "Какие поля не показывать"), _dec29(_class9 = (_class10 = class FiasFnsOptions extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
|
|
96099
96120
|
constructor(...args) {
|
|
96100
96121
|
super(...args);
|
|
96101
96122
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "extendModal", _descriptor25, this);
|
|
96102
96123
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withFederalTerritory", _descriptor26, this);
|
|
96103
96124
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "abbreviationSize", _descriptor27, this);
|
|
96125
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "hiddenFields", _descriptor28, this);
|
|
96104
96126
|
}
|
|
96105
96127
|
}, _descriptor25 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class10.prototype, "extendModal", [_dec30], {
|
|
96106
96128
|
configurable: true,
|
|
@@ -96117,120 +96139,125 @@ let FiasFnsOptions = (_dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_
|
|
|
96117
96139
|
enumerable: true,
|
|
96118
96140
|
writable: true,
|
|
96119
96141
|
initializer: null
|
|
96142
|
+
}), _descriptor28 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class10.prototype, "hiddenFields", [_dec33], {
|
|
96143
|
+
configurable: true,
|
|
96144
|
+
enumerable: true,
|
|
96145
|
+
writable: true,
|
|
96146
|
+
initializer: null
|
|
96120
96147
|
}), _class10)) || _class9);
|
|
96121
|
-
let FiasMvdOptions = (
|
|
96148
|
+
let FiasMvdOptions = (_dec34 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("mvdoptions", "Фишки из мвд фиаса - только для МВД форм!"), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("extendModal", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Расширенная модалка для фиаса. Только для МВД форм, так как там одни пути."), _dec34(_class11 = (_class12 = class FiasMvdOptions extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
|
|
96122
96149
|
constructor(...args) {
|
|
96123
96150
|
super(...args);
|
|
96124
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "extendModal",
|
|
96151
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "extendModal", _descriptor29, this);
|
|
96125
96152
|
}
|
|
96126
|
-
},
|
|
96153
|
+
}, _descriptor29 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class12.prototype, "extendModal", [_dec35], {
|
|
96127
96154
|
configurable: true,
|
|
96128
96155
|
enumerable: true,
|
|
96129
96156
|
writable: true,
|
|
96130
96157
|
initializer: null
|
|
96131
96158
|
}), _class12)) || _class11);
|
|
96132
|
-
let FiasNode = (
|
|
96159
|
+
let FiasNode = (_dec36 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fias", ``, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/Fias sync recursive .md$")), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_3__.DataBindingMixinNode), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_7__.ValidationInfoNode), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrMixin)(_CommonNodeProperties_TooltipProperties_TooltipSettingsNode__WEBPACK_IMPORTED_MODULE_8__.TooltipSettingsNode), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("withSteads", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Земельные участки для формы"), _dec41 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("title", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, "Текст в титульнике лайтбокса"), _dec42 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("pathToFullAddress", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, "Путь, по которому будет засечен полный адрес"), _dec43 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("searchToAddressLevel", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("region", "district", "city", "street", "garhouse", "room"), `До какого элемента будет осуществлятся поиск.
|
|
96133
96160
|
Пример: House - поиск до дома.
|
|
96134
96161
|
Конечный - room, поиск до квартиры.
|
|
96135
|
-
По умолчанию - room`),
|
|
96162
|
+
По умолчанию - room`), _dec44 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("division", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("municipal", "administrative"), "Территориальное деление, по умолчанию - municipal"), _dec45 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("withForeignCountry", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec46 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.children)("fiasfield", [FiasExtendedField]), _dec47 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.singleChild)("childrenoptions", [FiasChildren]), _dec48 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.singleChild)("fnsoptions", [FiasFnsOptions]), _dec49 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.singleChild)("mvdoptions", [FiasMvdOptions]), _dec50 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("onlyInput", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, "Временный костыль на то, чтобы показывать фиас в рамках багованного мультилайна"), _dec51 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("optionalIndex", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec52 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.deprecatedAttr)("postalTransfer", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec36(_class13 = (_class14 = class FiasNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
|
|
96136
96163
|
constructor(...args) {
|
|
96137
96164
|
super(...args);
|
|
96138
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataBinding",
|
|
96139
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "validationInfo",
|
|
96140
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipSettings",
|
|
96141
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withSteads",
|
|
96142
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "title",
|
|
96143
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pathToFullAddress",
|
|
96144
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "searchToAddressLevel",
|
|
96145
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "division",
|
|
96146
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withForeignCountry",
|
|
96147
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "fiasfield",
|
|
96148
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "childrenoptions",
|
|
96149
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "fnsoptions",
|
|
96150
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "mvdoptions",
|
|
96151
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onlyInput",
|
|
96152
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optionalIndex",
|
|
96153
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "postalTransfer",
|
|
96165
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "dataBinding", _descriptor30, this);
|
|
96166
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "validationInfo", _descriptor31, this);
|
|
96167
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "tooltipSettings", _descriptor32, this);
|
|
96168
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withSteads", _descriptor33, this);
|
|
96169
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "title", _descriptor34, this);
|
|
96170
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pathToFullAddress", _descriptor35, this);
|
|
96171
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "searchToAddressLevel", _descriptor36, this);
|
|
96172
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "division", _descriptor37, this);
|
|
96173
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "withForeignCountry", _descriptor38, this);
|
|
96174
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "fiasfield", _descriptor39, this);
|
|
96175
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "childrenoptions", _descriptor40, this);
|
|
96176
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "fnsoptions", _descriptor41, this);
|
|
96177
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "mvdoptions", _descriptor42, this);
|
|
96178
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onlyInput", _descriptor43, this);
|
|
96179
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "optionalIndex", _descriptor44, this);
|
|
96180
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "postalTransfer", _descriptor45, this);
|
|
96154
96181
|
}
|
|
96155
96182
|
getOwnPath() {
|
|
96156
96183
|
return this.dataBinding.getOwnPath();
|
|
96157
96184
|
}
|
|
96158
|
-
},
|
|
96185
|
+
}, _descriptor30 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "dataBinding", [_dec37], {
|
|
96159
96186
|
configurable: true,
|
|
96160
96187
|
enumerable: true,
|
|
96161
96188
|
writable: true,
|
|
96162
96189
|
initializer: null
|
|
96163
|
-
}),
|
|
96190
|
+
}), _descriptor31 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "validationInfo", [_dec38], {
|
|
96164
96191
|
configurable: true,
|
|
96165
96192
|
enumerable: true,
|
|
96166
96193
|
writable: true,
|
|
96167
96194
|
initializer: null
|
|
96168
|
-
}),
|
|
96195
|
+
}), _descriptor32 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "tooltipSettings", [_dec39], {
|
|
96169
96196
|
configurable: true,
|
|
96170
96197
|
enumerable: true,
|
|
96171
96198
|
writable: true,
|
|
96172
96199
|
initializer: null
|
|
96173
|
-
}),
|
|
96200
|
+
}), _descriptor33 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "withSteads", [_dec40], {
|
|
96174
96201
|
configurable: true,
|
|
96175
96202
|
enumerable: true,
|
|
96176
96203
|
writable: true,
|
|
96177
96204
|
initializer: null
|
|
96178
|
-
}),
|
|
96205
|
+
}), _descriptor34 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "title", [_dec41], {
|
|
96179
96206
|
configurable: true,
|
|
96180
96207
|
enumerable: true,
|
|
96181
96208
|
writable: true,
|
|
96182
96209
|
initializer: null
|
|
96183
|
-
}),
|
|
96210
|
+
}), _descriptor35 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "pathToFullAddress", [_dec42], {
|
|
96184
96211
|
configurable: true,
|
|
96185
96212
|
enumerable: true,
|
|
96186
96213
|
writable: true,
|
|
96187
96214
|
initializer: null
|
|
96188
|
-
}),
|
|
96215
|
+
}), _descriptor36 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "searchToAddressLevel", [_dec43], {
|
|
96189
96216
|
configurable: true,
|
|
96190
96217
|
enumerable: true,
|
|
96191
96218
|
writable: true,
|
|
96192
96219
|
initializer: null
|
|
96193
|
-
}),
|
|
96220
|
+
}), _descriptor37 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "division", [_dec44], {
|
|
96194
96221
|
configurable: true,
|
|
96195
96222
|
enumerable: true,
|
|
96196
96223
|
writable: true,
|
|
96197
96224
|
initializer: null
|
|
96198
|
-
}),
|
|
96225
|
+
}), _descriptor38 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "withForeignCountry", [_dec45], {
|
|
96199
96226
|
configurable: true,
|
|
96200
96227
|
enumerable: true,
|
|
96201
96228
|
writable: true,
|
|
96202
96229
|
initializer: null
|
|
96203
|
-
}),
|
|
96230
|
+
}), _descriptor39 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "fiasfield", [_dec46], {
|
|
96204
96231
|
configurable: true,
|
|
96205
96232
|
enumerable: true,
|
|
96206
96233
|
writable: true,
|
|
96207
96234
|
initializer: null
|
|
96208
|
-
}),
|
|
96235
|
+
}), _descriptor40 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "childrenoptions", [_dec47], {
|
|
96209
96236
|
configurable: true,
|
|
96210
96237
|
enumerable: true,
|
|
96211
96238
|
writable: true,
|
|
96212
96239
|
initializer: null
|
|
96213
|
-
}),
|
|
96240
|
+
}), _descriptor41 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "fnsoptions", [_dec48], {
|
|
96214
96241
|
configurable: true,
|
|
96215
96242
|
enumerable: true,
|
|
96216
96243
|
writable: true,
|
|
96217
96244
|
initializer: null
|
|
96218
|
-
}),
|
|
96245
|
+
}), _descriptor42 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "mvdoptions", [_dec49], {
|
|
96219
96246
|
configurable: true,
|
|
96220
96247
|
enumerable: true,
|
|
96221
96248
|
writable: true,
|
|
96222
96249
|
initializer: null
|
|
96223
|
-
}),
|
|
96250
|
+
}), _descriptor43 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "onlyInput", [_dec50], {
|
|
96224
96251
|
configurable: true,
|
|
96225
96252
|
enumerable: true,
|
|
96226
96253
|
writable: true,
|
|
96227
96254
|
initializer: null
|
|
96228
|
-
}),
|
|
96255
|
+
}), _descriptor44 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "optionalIndex", [_dec51], {
|
|
96229
96256
|
configurable: true,
|
|
96230
96257
|
enumerable: true,
|
|
96231
96258
|
writable: true,
|
|
96232
96259
|
initializer: null
|
|
96233
|
-
}),
|
|
96260
|
+
}), _descriptor45 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class14.prototype, "postalTransfer", [_dec52], {
|
|
96234
96261
|
configurable: true,
|
|
96235
96262
|
enumerable: true,
|
|
96236
96263
|
writable: true,
|
|
@@ -96276,44 +96303,42 @@ class FileLoaderConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4
|
|
|
96276
96303
|
static getAcceptNodeClass() {
|
|
96277
96304
|
return _FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode;
|
|
96278
96305
|
}
|
|
96279
|
-
*getAttachmentPaths() {
|
|
96306
|
+
*getAttachmentPaths(context) {
|
|
96280
96307
|
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
|
|
96281
|
-
const
|
|
96282
|
-
if (
|
|
96308
|
+
const multipleNode = !node.single;
|
|
96309
|
+
if (multipleNode) {
|
|
96283
96310
|
yield node.getFullPath().joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each).joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_7__.AttachmentInfoPath);
|
|
96284
96311
|
} else {
|
|
96285
96312
|
yield node.getFullPath().joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_7__.AttachmentInfoPath);
|
|
96286
96313
|
}
|
|
96287
96314
|
}
|
|
96288
|
-
doBuildNodeValidations(validationGenerator) {
|
|
96315
|
+
doBuildNodeValidations(validationGenerator, context) {
|
|
96289
96316
|
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
|
|
96317
|
+
const multipleNode = !node.single;
|
|
96290
96318
|
validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, {
|
|
96291
|
-
multiple:
|
|
96319
|
+
multiple: multipleNode
|
|
96292
96320
|
});
|
|
96293
96321
|
}
|
|
96294
96322
|
doBuildDataDeclaration(context) {
|
|
96295
96323
|
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
|
|
96296
96324
|
return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node), this.addAttachmentPathDeclEntry(context, node));
|
|
96297
96325
|
}
|
|
96298
|
-
buildChildrenDataDeclaration(
|
|
96326
|
+
buildChildrenDataDeclaration() {
|
|
96299
96327
|
return _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection;
|
|
96300
96328
|
}
|
|
96301
96329
|
*doTraverseChildren() {
|
|
96302
96330
|
// no children
|
|
96303
96331
|
}
|
|
96304
96332
|
doConvert(context) {
|
|
96305
|
-
var _context$getTypeNode;
|
|
96306
96333
|
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
|
|
96307
|
-
|
|
96334
|
+
const multipleNode = !node.single;
|
|
96335
|
+
if (multipleNode) {
|
|
96308
96336
|
this.ensurePathExists(node, node.path);
|
|
96309
96337
|
}
|
|
96310
|
-
const attachmentType = (
|
|
96311
|
-
if (attachmentType == undefined) {
|
|
96312
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_0__.SugarAttributeReadError(`Failed generate fileloader without 'attachments' type node`, node, "type");
|
|
96313
|
-
}
|
|
96338
|
+
const attachmentType = this.selectAttachmentTypeNode(context);
|
|
96314
96339
|
const mb = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_3__.componentMarkupBuilder)("FileLoader");
|
|
96315
96340
|
mb.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getNewBindingPathExpression)(node));
|
|
96316
|
-
mb.prop(x => x.multiple).set(
|
|
96341
|
+
mb.prop(x => x.multiple).set(multipleNode);
|
|
96317
96342
|
mb.prop(x => x.count).set(attachmentType.count);
|
|
96318
96343
|
mb.prop(x => x.countExceededDescription).set(attachmentType.countExceededDescription);
|
|
96319
96344
|
// @ts-ignore
|
|
@@ -96350,16 +96375,16 @@ class FileLoaderConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4
|
|
|
96350
96375
|
}
|
|
96351
96376
|
return mb.buildConverterResult();
|
|
96352
96377
|
}
|
|
96353
|
-
addAttachmentPathDeclEntry(context,
|
|
96354
|
-
var _context$
|
|
96355
|
-
const attachmentType = (_context$
|
|
96356
|
-
const fileLoaderPath = (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getNewBindingPathExpression)(
|
|
96357
|
-
const additionalPath =
|
|
96378
|
+
addAttachmentPathDeclEntry(context, node) {
|
|
96379
|
+
var _context$getTypeNode;
|
|
96380
|
+
const attachmentType = (_context$getTypeNode = context.getTypeNode(node)) === null || _context$getTypeNode === void 0 ? void 0 : _context$getTypeNode.children.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.AttachmentsTypeCheckNode));
|
|
96381
|
+
const fileLoaderPath = (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getNewBindingPathExpression)(node);
|
|
96382
|
+
const additionalPath = node.single ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.emptyModelPath)().joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_7__.AttachmentInfoPath) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.emptyModelPath)().joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each).joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_7__.AttachmentInfoPath);
|
|
96358
96383
|
return context.mergeDataDeclaration({
|
|
96359
96384
|
[fileLoaderPath.toLegacyPath()]: {
|
|
96360
96385
|
fnsConvertFileExtentions: attachmentType === null || attachmentType === void 0 ? void 0 : attachmentType.fnsConvertFileExtentions
|
|
96361
96386
|
}
|
|
96362
|
-
}, context.addChildPathSectionDeclarationEntry(
|
|
96387
|
+
}, context.addChildPathSectionDeclarationEntry(node, additionalPath, false));
|
|
96363
96388
|
}
|
|
96364
96389
|
convertChildren(context, nodes = []) {
|
|
96365
96390
|
return nodes.map(node => {
|
|
@@ -96376,6 +96401,26 @@ class FileLoaderConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4
|
|
|
96376
96401
|
return context.convertChildNodes([node]);
|
|
96377
96402
|
});
|
|
96378
96403
|
}
|
|
96404
|
+
|
|
96405
|
+
// @ts-expect-error NOTE: метoд оставлен т.к. понадобится при рефакторнге FileLoader
|
|
96406
|
+
isMultipleFilesLoadingAllowed(context) {
|
|
96407
|
+
const attachmentType = this.selectAttachmentTypeNode(context);
|
|
96408
|
+
const singleFileLoadingRequired = attachmentType.count === 1;
|
|
96409
|
+
return !singleFileLoadingRequired;
|
|
96410
|
+
}
|
|
96411
|
+
selectAttachmentTypeNode(context) {
|
|
96412
|
+
var _context$getTypeNode2;
|
|
96413
|
+
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
|
|
96414
|
+
const attachmentTypeNode = (_context$getTypeNode2 = context.getTypeNode(node)) === null || _context$getTypeNode2 === void 0 ? void 0 : _context$getTypeNode2.children.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_1__.AttachmentsTypeCheckNode));
|
|
96415
|
+
this.ensureAttachmentTypeDefined(attachmentTypeNode);
|
|
96416
|
+
return attachmentTypeNode;
|
|
96417
|
+
}
|
|
96418
|
+
ensureAttachmentTypeDefined(attachmentTypeNode) {
|
|
96419
|
+
const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
|
|
96420
|
+
if (attachmentTypeNode == undefined) {
|
|
96421
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_0__.SugarAttributeReadError(`Failed generate fileloader without 'attachments' type node`, node, "type");
|
|
96422
|
+
}
|
|
96423
|
+
}
|
|
96379
96424
|
}
|
|
96380
96425
|
|
|
96381
96426
|
/***/ }),
|
|
@@ -96402,8 +96447,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96402
96447
|
/* harmony import */ var _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Serializer/SugarNodeWithLegacyVisibility */ "./Generator/src/generators/markupGenerator/Serializer/SugarNodeWithLegacyVisibility.ts");
|
|
96403
96448
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
96404
96449
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
96405
|
-
/* harmony import */ var
|
|
96406
|
-
/* harmony import */ var
|
|
96450
|
+
/* harmony import */ var _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../Serializer/DeprecationReason */ "./Generator/src/generators/markupGenerator/Serializer/DeprecationReason.ts");
|
|
96451
|
+
/* harmony import */ var _FileLoader_MenuNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FileLoader/MenuNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FileLoader/FileLoader/MenuNode.ts");
|
|
96452
|
+
/* harmony import */ var _FileLoader_ViewFileNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./FileLoader/ViewFileNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FileLoader/FileLoader/ViewFileNode.ts");
|
|
96407
96453
|
|
|
96408
96454
|
|
|
96409
96455
|
|
|
@@ -96415,7 +96461,8 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class
|
|
|
96415
96461
|
|
|
96416
96462
|
|
|
96417
96463
|
|
|
96418
|
-
|
|
96464
|
+
|
|
96465
|
+
let FileLoaderNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.sugarNode)("fileloader", `Загрузка файлов в форму`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/ValueEditors/FileLoader sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrMixin)(_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_4__.ValidationInfoNode), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("type", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.typeName, "Тип для валидации значений"), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.string, `Относительный путь по которому будут храниться аттачменты. Указывается относительно каталога sugar`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.number, `Ширина контрола`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("single", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean.default(false), `Подразумевает возможность загрузить только 1 файл`), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("multiple", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_8__.DeprecationReason.Removed), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("viewfile", [_FileLoader_ViewFileNode__WEBPACK_IMPORTED_MODULE_10__.ViewFileNode]), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("menu", [_FileLoader_MenuNode__WEBPACK_IMPORTED_MODULE_9__.MenuNode]), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("type", [_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_3__.TypeNode]), _dec(_class = (_class2 = class FileLoaderNode extends _Serializer_SugarNodeWithLegacyVisibility__WEBPACK_IMPORTED_MODULE_5__.SugarNodeWithLegacyVisibility {
|
|
96419
96466
|
constructor(...args) {
|
|
96420
96467
|
super(...args);
|
|
96421
96468
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "validationInfo", _descriptor, this);
|
|
@@ -99133,7 +99180,7 @@ class SelectCheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
99133
99180
|
var _node$dataBinding$def;
|
|
99134
99181
|
const defaultValue = (_node$dataBinding$def = node.dataBinding.defaultValue) !== null && _node$dataBinding$def !== void 0 ? _node$dataBinding$def : "";
|
|
99135
99182
|
if (defaultValue) {
|
|
99136
|
-
if (defaultValue === "checked") {
|
|
99183
|
+
if (defaultValue === "checked" || defaultValue === node.checkedValue) {
|
|
99137
99184
|
var _node$checkedValue;
|
|
99138
99185
|
return (_node$checkedValue = node.checkedValue) !== null && _node$checkedValue !== void 0 ? _node$checkedValue : true;
|
|
99139
99186
|
} else {
|
|
@@ -100257,7 +100304,7 @@ class ToggleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.S
|
|
|
100257
100304
|
var _node$dataBinding$def;
|
|
100258
100305
|
const defaultValue = (_node$dataBinding$def = node.dataBinding.defaultValue) !== null && _node$dataBinding$def !== void 0 ? _node$dataBinding$def : "";
|
|
100259
100306
|
if (defaultValue) {
|
|
100260
|
-
if (defaultValue === "checked") {
|
|
100307
|
+
if (defaultValue === "checked" || defaultValue === node.checkedValue) {
|
|
100261
100308
|
var _node$checkedValue;
|
|
100262
100309
|
return (_node$checkedValue = node.checkedValue) !== null && _node$checkedValue !== void 0 ? _node$checkedValue : true;
|
|
100263
100310
|
} else {
|
|
@@ -102309,6 +102356,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102309
102356
|
/* harmony import */ var _Common_FormActionHandlers_ContextualActionNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/FormActionHandlers/ContextualActionNames */ "./Common/FormActionHandlers/ContextualActionNames.ts");
|
|
102310
102357
|
/* harmony import */ var _ConverterResults_ConverterResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ConverterResults/ConverterResult */ "./Generator/src/generators/markupGenerator/ConverterResults/ConverterResult.ts");
|
|
102311
102358
|
/* harmony import */ var _ConverterResults_ModuleDescriptor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ConverterResults/ModuleDescriptor */ "./Generator/src/generators/markupGenerator/ConverterResults/ModuleDescriptor.ts");
|
|
102359
|
+
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
102360
|
+
/* harmony import */ var _AllConverters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
102361
|
+
/* harmony import */ var _ElementProcessors_Commons_CustomControlConverter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ElementProcessors/Commons/CustomControlConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/CustomControlConverter.ts");
|
|
102362
|
+
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
102363
|
+
|
|
102364
|
+
|
|
102365
|
+
|
|
102366
|
+
|
|
102312
102367
|
|
|
102313
102368
|
|
|
102314
102369
|
|
|
@@ -102317,8 +102372,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102317
102372
|
|
|
102318
102373
|
|
|
102319
102374
|
class MarkupBuildingContext {
|
|
102320
|
-
constructor(
|
|
102321
|
-
this.convertNode = void 0;
|
|
102375
|
+
constructor(nodeContext, formSourcesPath, helpers, tourSteps, controlCustomizationContext, typesRegistry, schemaRng, dataDeclarationHelper, useSchemaValidations) {
|
|
102322
102376
|
this.formSourcesPath = void 0;
|
|
102323
102377
|
this.helpers = void 0;
|
|
102324
102378
|
this.pathsContext = void 0;
|
|
@@ -102333,7 +102387,6 @@ class MarkupBuildingContext {
|
|
|
102333
102387
|
this.schemaRng = schemaRng;
|
|
102334
102388
|
this.useSchemaValidations = useSchemaValidations;
|
|
102335
102389
|
this.typesRegistry = typesRegistry;
|
|
102336
|
-
this.convertNode = convertNode;
|
|
102337
102390
|
this.formSourcesPath = formSourcesPath;
|
|
102338
102391
|
this.pathsContext = nodeContext;
|
|
102339
102392
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -102428,6 +102481,28 @@ class MarkupBuildingContext {
|
|
|
102428
102481
|
getTypeNodeLegacy(childNode) {
|
|
102429
102482
|
return this.typesRegistry.getTypeNodeLegacy(childNode);
|
|
102430
102483
|
}
|
|
102484
|
+
convertNode(sugarNode) {
|
|
102485
|
+
if (!sugarNode) {
|
|
102486
|
+
return new _ConverterResults_ConverterResult__WEBPACK_IMPORTED_MODULE_5__.ConverterResult();
|
|
102487
|
+
}
|
|
102488
|
+
const controlConverterClass = (0,_AllConverters__WEBPACK_IMPORTED_MODULE_8__.getConverterByNodeClass)((0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_10__.getNodeClass)(sugarNode));
|
|
102489
|
+
if (controlConverterClass == undefined) {
|
|
102490
|
+
if (sugarNode instanceof _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_10__.UnknownSugarNode) {
|
|
102491
|
+
const customizationInfo = this.controlCustomizationContext.tryGetCustomRegularControl(sugarNode.name);
|
|
102492
|
+
if (customizationInfo != undefined) {
|
|
102493
|
+
const sourceXmlNode = sugarNode.sourceXmlNode;
|
|
102494
|
+
if (sourceXmlNode.hasAttribute("path")) {
|
|
102495
|
+
this.addPathsToContext([(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getNewBindingPathExpression)(sugarNode)]);
|
|
102496
|
+
}
|
|
102497
|
+
const converterResult = (0,_ElementProcessors_Commons_CustomControlConverter__WEBPACK_IMPORTED_MODULE_9__.customControlConverter)(sugarNode, customizationInfo);
|
|
102498
|
+
return converterResult;
|
|
102499
|
+
}
|
|
102500
|
+
}
|
|
102501
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_3__.SugarAttributeReadError("Cannot find converter for node " + sugarNode.sourceXmlNode.name, sugarNode.sourceXmlNode, "");
|
|
102502
|
+
}
|
|
102503
|
+
const converter = new controlConverterClass(sugarNode);
|
|
102504
|
+
return converter.convert(this);
|
|
102505
|
+
}
|
|
102431
102506
|
}
|
|
102432
102507
|
|
|
102433
102508
|
/***/ }),
|
|
@@ -102755,60 +102830,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102755
102830
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
102756
102831
|
/* harmony export */ MarkupGenerator: () => (/* binding */ MarkupGenerator)
|
|
102757
102832
|
/* harmony export */ });
|
|
102758
|
-
/* harmony import */ var
|
|
102759
|
-
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
102760
|
-
/* harmony import */ var _AllConverters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
102761
|
-
/* harmony import */ var _ConverterResults_ConverterResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ConverterResults/ConverterResult */ "./Generator/src/generators/markupGenerator/ConverterResults/ConverterResult.ts");
|
|
102762
|
-
/* harmony import */ var _ConverterResults_ConverterResultJsxGenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConverterResults/ConverterResultJsxGenerator */ "./Generator/src/generators/markupGenerator/ConverterResults/ConverterResultJsxGenerator.ts");
|
|
102763
|
-
/* harmony import */ var _IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./IMarkupBuildingContext */ "./Generator/src/generators/markupGenerator/IMarkupBuildingContext.ts");
|
|
102764
|
-
/* harmony import */ var _ElementProcessors_Commons_CustomControlConverter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ElementProcessors/Commons/CustomControlConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/CustomControlConverter.ts");
|
|
102765
|
-
/* harmony import */ var _ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ElementProcessors/Commons/NodePathsContext */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/NodePathsContext.ts");
|
|
102766
|
-
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
102767
|
-
|
|
102768
|
-
|
|
102769
|
-
|
|
102770
|
-
|
|
102771
|
-
|
|
102772
|
-
|
|
102773
|
-
|
|
102774
|
-
|
|
102833
|
+
/* harmony import */ var _ConverterResults_ConverterResultJsxGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConverterResults/ConverterResultJsxGenerator */ "./Generator/src/generators/markupGenerator/ConverterResults/ConverterResultJsxGenerator.ts");
|
|
102775
102834
|
|
|
102776
102835
|
class MarkupGenerator {
|
|
102777
|
-
constructor(
|
|
102778
|
-
this.controlCustomizationContext = void 0;
|
|
102836
|
+
constructor(markupBuilderContext) {
|
|
102779
102837
|
this.markupBuilderContext = void 0;
|
|
102780
|
-
this.
|
|
102781
|
-
if (!sugarNode) {
|
|
102782
|
-
return new _ConverterResults_ConverterResult__WEBPACK_IMPORTED_MODULE_3__.ConverterResult();
|
|
102783
|
-
}
|
|
102784
|
-
const controlConverterClass = (0,_AllConverters__WEBPACK_IMPORTED_MODULE_2__.getConverterByNodeClass)((0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_8__.getNodeClass)(sugarNode));
|
|
102785
|
-
if (controlConverterClass == undefined) {
|
|
102786
|
-
if (sugarNode instanceof _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_8__.UnknownSugarNode) {
|
|
102787
|
-
const customizationInfo = this.controlCustomizationContext.tryGetCustomRegularControl(sugarNode.name);
|
|
102788
|
-
if (customizationInfo != undefined) {
|
|
102789
|
-
const sourceXmlNode = sugarNode.sourceXmlNode;
|
|
102790
|
-
if (sourceXmlNode.hasAttribute("path")) {
|
|
102791
|
-
this.markupBuilderContext.addPathsToContext([(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(sugarNode)]);
|
|
102792
|
-
}
|
|
102793
|
-
const converterResult = (0,_ElementProcessors_Commons_CustomControlConverter__WEBPACK_IMPORTED_MODULE_6__.customControlConverter)(sugarNode, customizationInfo);
|
|
102794
|
-
return converterResult;
|
|
102795
|
-
}
|
|
102796
|
-
}
|
|
102797
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_0__.SugarAttributeReadError("Cannot find converter for node " + sugarNode.sourceXmlNode.name, sugarNode.sourceXmlNode, "");
|
|
102798
|
-
}
|
|
102799
|
-
const converter = new controlConverterClass(sugarNode);
|
|
102800
|
-
return converter.convert(this.markupBuilderContext);
|
|
102801
|
-
};
|
|
102802
|
-
this.controlCustomizationContext = controlCustomizationContext;
|
|
102803
|
-
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);
|
|
102838
|
+
this.markupBuilderContext = markupBuilderContext;
|
|
102804
102839
|
}
|
|
102805
102840
|
generate(sugarRoot, builder) {
|
|
102806
102841
|
const formNode = sugarRoot;
|
|
102807
|
-
const converterResult = this.convertNode(formNode);
|
|
102842
|
+
const converterResult = this.markupBuilderContext.convertNode(formNode);
|
|
102808
102843
|
for (const context of converterResult.getContexts()) {
|
|
102809
102844
|
const contextName = context.name;
|
|
102810
102845
|
converterResult.getDependenciesContent(contextName, builder);
|
|
102811
|
-
const converterResultJsx =
|
|
102846
|
+
const converterResultJsx = _ConverterResults_ConverterResultJsxGenerator__WEBPACK_IMPORTED_MODULE_0__.ConverterResultJsxGenerator.generateJsx(contextName, converterResult, builder);
|
|
102812
102847
|
builder.addComponent(`${context.dirName}/${contextName}.jsx`, unescape(converterResultJsx.replace(/(\\)(u[\dA-Fa-f]{4})/g, "%$2")), false);
|
|
102813
102848
|
}
|
|
102814
102849
|
}
|
|
@@ -104381,11 +104416,11 @@ class SugarNodeConverterBase {
|
|
|
104381
104416
|
var _this$node$parent;
|
|
104382
104417
|
return (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getNewBindingPathExpression)((_this$node$parent = this.node.parent) !== null && _this$node$parent !== void 0 ? _this$node$parent : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)());
|
|
104383
104418
|
}
|
|
104384
|
-
buildValidations(validationGenerator) {
|
|
104385
|
-
this.doBuildNodeValidations(validationGenerator);
|
|
104386
|
-
this.buildChildrenValidations(validationGenerator);
|
|
104419
|
+
buildValidations(validationGenerator, context) {
|
|
104420
|
+
this.doBuildNodeValidations(validationGenerator, context);
|
|
104421
|
+
this.buildChildrenValidations(validationGenerator, context);
|
|
104387
104422
|
}
|
|
104388
|
-
*getAttachmentPaths() {
|
|
104423
|
+
*getAttachmentPaths(context) {
|
|
104389
104424
|
// no paths by default
|
|
104390
104425
|
}
|
|
104391
104426
|
*getAttachmentPathsWithGfvs() {
|
|
@@ -104406,7 +104441,7 @@ class SugarNodeConverterBase {
|
|
|
104406
104441
|
}
|
|
104407
104442
|
return result;
|
|
104408
104443
|
}
|
|
104409
|
-
doBuildNodeValidations(validationGenerator) {
|
|
104444
|
+
doBuildNodeValidations(validationGenerator, context) {
|
|
104410
104445
|
// noop
|
|
104411
104446
|
}
|
|
104412
104447
|
getResolvedBindingPath(node) {
|
|
@@ -104475,7 +104510,7 @@ class SugarNodeConverterBase {
|
|
|
104475
104510
|
}
|
|
104476
104511
|
return SugarNodeConverterBase.deserializeNodeAs(nodeClass, sourceXmlNode !== null && sourceXmlNode !== void 0 ? sourceXmlNode : this.node);
|
|
104477
104512
|
}
|
|
104478
|
-
buildChildrenValidations(validationGenerator, children) {
|
|
104513
|
+
buildChildrenValidations(validationGenerator, context, children) {
|
|
104479
104514
|
for (const child of children !== null && children !== void 0 ? children : this.doTraverseChildren()) {
|
|
104480
104515
|
const controlConverterClass = (0,_AllConverters__WEBPACK_IMPORTED_MODULE_7__.getConverterByNodeClass)((0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_11__.getNodeClass)(child));
|
|
104481
104516
|
if (controlConverterClass == undefined) {
|
|
@@ -104499,7 +104534,7 @@ class SugarNodeConverterBase {
|
|
|
104499
104534
|
// );
|
|
104500
104535
|
}
|
|
104501
104536
|
const converter = new controlConverterClass(child);
|
|
104502
|
-
converter.buildValidations(validationGenerator);
|
|
104537
|
+
converter.buildValidations(validationGenerator, context);
|
|
104503
104538
|
}
|
|
104504
104539
|
}
|
|
104505
104540
|
buildChildrenKCLangValidations(buildContext, formSchemaRng, children) {
|
|
@@ -105888,7 +105923,8 @@ class AttachmentsValueValidatorGenerator extends _TypeBasedValidatorGenerator__W
|
|
|
105888
105923
|
const result = (0,_common_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_0__.instanceBuilder)("Validators.AttachmentsValueValidator");
|
|
105889
105924
|
result.set(0, {
|
|
105890
105925
|
extentions: attachmentNode.extentions || [],
|
|
105891
|
-
maxSize: attachmentNode.maxSize || 0
|
|
105926
|
+
maxSize: attachmentNode.maxSize || 0,
|
|
105927
|
+
multiple: attachmentNode.count !== 1
|
|
105892
105928
|
});
|
|
105893
105929
|
result.set(1, (_attachmentNode$check = attachmentNode.checkType) !== null && _attachmentNode$check !== void 0 ? _attachmentNode$check : "error");
|
|
105894
105930
|
result.set(2, attachmentNode.description);
|
|
@@ -106077,7 +106113,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
106077
106113
|
|
|
106078
106114
|
|
|
106079
106115
|
class ValidationGenerator {
|
|
106080
|
-
constructor(sugarRoot, typesRegistry, controlCustomizationContext, schemaRng, useSchemaValidations, validationsContent = [], settings = undefined) {
|
|
106116
|
+
constructor(sugarRoot, typesRegistry, markupBuilderContext, controlCustomizationContext, schemaRng, useSchemaValidations, validationsContent = [], settings = undefined) {
|
|
106081
106117
|
this.typeBasedValidatorGenerators = [_TypeBasedValidatorGenerators_AttachmentsValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_9__.AttachmentsValueValidatorGenerator, _TypeBasedValidatorGenerators_CustomValidationValueValidatorGenerator__WEBPACK_IMPORTED_MODULE_10__.CustomValidationValueValidatorGenerator];
|
|
106082
106118
|
this.sugarRoot = void 0;
|
|
106083
106119
|
this.validationsContent = void 0;
|
|
@@ -106085,6 +106121,7 @@ class ValidationGenerator {
|
|
|
106085
106121
|
this.typesRegistry = void 0;
|
|
106086
106122
|
this.validations = void 0;
|
|
106087
106123
|
this.schemaRng = void 0;
|
|
106124
|
+
this.markupBuilderContext = void 0;
|
|
106088
106125
|
this.controlCustomizationContext = void 0;
|
|
106089
106126
|
this.useSchemaValidations = void 0;
|
|
106090
106127
|
this.criterionOfExistenceFromSchemaRng = [];
|
|
@@ -106093,6 +106130,7 @@ class ValidationGenerator {
|
|
|
106093
106130
|
this.sugarRoot = sugarRoot;
|
|
106094
106131
|
this.typesRegistry = typesRegistry;
|
|
106095
106132
|
this.validationsContent = validationsContent;
|
|
106133
|
+
this.markupBuilderContext = markupBuilderContext;
|
|
106096
106134
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
106097
106135
|
this.useSchemaValidations = useSchemaValidations;
|
|
106098
106136
|
this.customValidations = {};
|
|
@@ -106143,7 +106181,7 @@ class ValidationGenerator {
|
|
|
106143
106181
|
const sugarNode = this.sugarRoot;
|
|
106144
106182
|
const converterType = (_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_6__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.getNodeClass)(sugarNode))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(`Converter for root node must be defined`);
|
|
106145
106183
|
const converter = new converterType(sugarNode);
|
|
106146
|
-
converter.buildValidations(this);
|
|
106184
|
+
converter.buildValidations(this, this.markupBuilderContext);
|
|
106147
106185
|
let result = `
|
|
106148
106186
|
function validationFunctions({ Engine: { ValidationHelper, Validators }, ap, PathTokens, current, each, kcLangUtils }) {
|
|
106149
106187
|
const t = str => x => x.translate(str);
|