@kontur.candy/generator 5.40.0 → 5.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +193 -66
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -59847,6 +59847,11 @@ class ModelPathImpl {
|
|
|
59847
59847
|
}
|
|
59848
59848
|
return _PathMatcher__WEBPACK_IMPORTED_MODULE_4__.PathMatcher.match(this.tokens, modelPath.getPathPartsAsArray());
|
|
59849
59849
|
}
|
|
59850
|
+
startsWith(modelPath) {
|
|
59851
|
+
const thisParts = this.getPathPartsAsArray();
|
|
59852
|
+
const otherParts = modelPath.getPathPartsAsArray();
|
|
59853
|
+
return otherParts.every((value, index) => value === thisParts[index]);
|
|
59854
|
+
}
|
|
59850
59855
|
*splitByMultiplicity() {
|
|
59851
59856
|
let lastSimpleParts = new _ModelPathBuilder__WEBPACK_IMPORTED_MODULE_3__.ModelPathBuilder(this.isAbsolute());
|
|
59852
59857
|
for (const token of this.tokens) {
|
|
@@ -60022,6 +60027,48 @@ class ModelPathBuilder {
|
|
|
60022
60027
|
|
|
60023
60028
|
/***/ }),
|
|
60024
60029
|
|
|
60030
|
+
/***/ "./Common/ModelPath/ModelPathHelper.ts":
|
|
60031
|
+
/*!*********************************************!*\
|
|
60032
|
+
!*** ./Common/ModelPath/ModelPathHelper.ts ***!
|
|
60033
|
+
\*********************************************/
|
|
60034
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
60035
|
+
|
|
60036
|
+
"use strict";
|
|
60037
|
+
__webpack_require__.r(__webpack_exports__);
|
|
60038
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60039
|
+
/* harmony export */ getMask: () => (/* binding */ getMask),
|
|
60040
|
+
/* harmony export */ getMaskWithInstances: () => (/* binding */ getMaskWithInstances),
|
|
60041
|
+
/* harmony export */ isAggregationPath: () => (/* binding */ isAggregationPath)
|
|
60042
|
+
/* harmony export */ });
|
|
60043
|
+
/* harmony import */ var _ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
60044
|
+
|
|
60045
|
+
function isAggregationPath(modelPath) {
|
|
60046
|
+
const tokens = modelPath.getPathPartsAsArray();
|
|
60047
|
+
const lastToken = tokens[tokens.length - 1];
|
|
60048
|
+
return lastToken === "Sum" || lastToken === "Count";
|
|
60049
|
+
}
|
|
60050
|
+
function getMask(exactPath) {
|
|
60051
|
+
return (0,_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromTokens)(Iterator.from(exactPath.getPathParts()).map(x => _ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isInstanceToken(x) ? _ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each : x).toArray());
|
|
60052
|
+
}
|
|
60053
|
+
function getMaskWithInstances(exactPath) {
|
|
60054
|
+
const reduceResult = Iterator.from(exactPath.getPathParts()).reduce((result, token) => {
|
|
60055
|
+
if (_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isInstanceToken(token) || _ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isMultiToken(token)) {
|
|
60056
|
+
result.instances.push(token);
|
|
60057
|
+
}
|
|
60058
|
+
result.tokens.push(_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isInstanceToken(token) ? _ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each : token);
|
|
60059
|
+
return result;
|
|
60060
|
+
}, {
|
|
60061
|
+
tokens: [],
|
|
60062
|
+
instances: []
|
|
60063
|
+
});
|
|
60064
|
+
return {
|
|
60065
|
+
mask: (0,_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromTokens)(reduceResult.tokens),
|
|
60066
|
+
instances: reduceResult.instances
|
|
60067
|
+
};
|
|
60068
|
+
}
|
|
60069
|
+
|
|
60070
|
+
/***/ }),
|
|
60071
|
+
|
|
60025
60072
|
/***/ "./Common/ModelPath/PathMatcher.ts":
|
|
60026
60073
|
/*!*****************************************!*\
|
|
60027
60074
|
!*** ./Common/ModelPath/PathMatcher.ts ***!
|
|
@@ -60271,12 +60318,14 @@ class Set2 {
|
|
|
60271
60318
|
__webpack_require__.r(__webpack_exports__);
|
|
60272
60319
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60273
60320
|
/* harmony export */ AttachmentInfoPath: () => (/* binding */ AttachmentInfoPath),
|
|
60321
|
+
/* harmony export */ OptionalSectionFilledFieldName: () => (/* binding */ OptionalSectionFilledFieldName),
|
|
60274
60322
|
/* harmony export */ UnitLabelPath: () => (/* binding */ UnitLabelPath)
|
|
60275
60323
|
/* harmony export */ });
|
|
60276
60324
|
/* harmony import */ var _ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
60277
60325
|
|
|
60278
60326
|
const UnitLabelPath = (0,_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeResolvedModelPath)("label");
|
|
60279
60327
|
const AttachmentInfoPath = (0,_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeResolvedModelPath)("attachment");
|
|
60328
|
+
const OptionalSectionFilledFieldName = "isFilledOptional";
|
|
60280
60329
|
|
|
60281
60330
|
/***/ }),
|
|
60282
60331
|
|
|
@@ -78661,12 +78710,12 @@ class DataDeclarationGenerationContext {
|
|
|
78661
78710
|
[(0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(node)]: declEntry
|
|
78662
78711
|
};
|
|
78663
78712
|
}
|
|
78664
|
-
addPathSectionDeclarationEntry(sugarNode, requisite, skipRequisitesSection = false) {
|
|
78713
|
+
addPathSectionDeclarationEntry(sugarNode, requisite, skipRequisitesSection = false, suffix) {
|
|
78665
78714
|
const declEntry = {};
|
|
78666
78715
|
const requisitesMode = skipRequisitesSection ? RequisiteSectionMode.ForceSkip : RequisiteSectionMode.AsRequisiteAttribute;
|
|
78667
78716
|
declEntry.section = this.getSections(sugarNode, requisite, requisitesMode);
|
|
78668
78717
|
return {
|
|
78669
|
-
[(0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(sugarNode)]: declEntry
|
|
78718
|
+
[(0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(sugarNode, suffix)]: declEntry
|
|
78670
78719
|
};
|
|
78671
78720
|
}
|
|
78672
78721
|
addChildPathSectionDeclarationEntry(sugarNode, childPath, requisite) {
|
|
@@ -80830,7 +80879,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80830
80879
|
|
|
80831
80880
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
80832
80881
|
try {
|
|
80833
|
-
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2,
|
|
80882
|
+
var _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _sugarRoot$schemaVali, _Iterator$from$map$fl, _generationOptions$in, _generationOptions$in2, _generationOptions$re, _additionalContent$fo5, _additionalContent$fo6;
|
|
80834
80883
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
80835
80884
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_13__.createDefaultSugarSerializer)();
|
|
80836
80885
|
const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_14__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_11__.FormNode);
|
|
@@ -80842,6 +80891,7 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
80842
80891
|
const useServerCalculations = (_additionalContent$fo = (_additionalContent$fo2 = additionalContent.formJsonSettings) === null || _additionalContent$fo2 === void 0 ? void 0 : _additionalContent$fo2.useServerSideCalculations) !== null && _additionalContent$fo !== void 0 ? _additionalContent$fo : false;
|
|
80843
80892
|
const useCalculator2 = ((_additionalContent$fo3 = additionalContent.formJsonSettings) === null || _additionalContent$fo3 === void 0 ? void 0 : _additionalContent$fo3.autoCalculationCalculatorImpl) === "calculator2" || ((_additionalContent$fo4 = additionalContent.formJsonSettings) === null || _additionalContent$fo4 === void 0 ? void 0 : _additionalContent$fo4.useServerSideFLangNormalization);
|
|
80844
80893
|
const useOldCalculator = !useCalculator2 && !useServerCalculations;
|
|
80894
|
+
const useSchemaValidations = (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : true;
|
|
80845
80895
|
const kcXmlConditions = (_Iterator$from$map$fl = Iterator.from(getImportedKcXmlValidations(sugarRoot, additionalContent)).map(x => {
|
|
80846
80896
|
var _container$conditions, _container$conditions2;
|
|
80847
80897
|
const container = formulaReader.readFormulas(x);
|
|
@@ -80856,13 +80906,13 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
80856
80906
|
const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions);
|
|
80857
80907
|
// tslint:disable-next-line no-unsafe-any
|
|
80858
80908
|
const additionalSettings = typeof additionalContent.additionalSettings === "string" ? JSON.parse(additionalContent.additionalSettings || "{}") : additionalContent.additionalSettings;
|
|
80859
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_20__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry, formSchemaRng,
|
|
80909
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_20__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry, formSchemaRng, useSchemaValidations);
|
|
80860
80910
|
const {
|
|
80861
80911
|
dataDeclarationContent,
|
|
80862
80912
|
dataDeclaration
|
|
80863
80913
|
} = dataDeclarationGenerator.generate();
|
|
80864
80914
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_26__.DataDeclarationGenerationTimeHelper(dataDeclaration);
|
|
80865
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_16__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng,
|
|
80915
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_16__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, useSchemaValidations, additionalContent.validationsContent, additionalContent.formJsonSettings);
|
|
80866
80916
|
const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_29__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
|
|
80867
80917
|
const lazyLoadGeneratorResult = lazyLoadGenerator.generate();
|
|
80868
80918
|
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");
|
|
@@ -80870,15 +80920,15 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
80870
80920
|
const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_36__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter);
|
|
80871
80921
|
const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_37__.InitializationRulesBuilder(sugarRoot, resourcesHash);
|
|
80872
80922
|
const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_38__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
|
|
80873
|
-
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry,
|
|
80874
|
-
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry,
|
|
80923
|
+
const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_39__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, useSchemaValidations);
|
|
80924
|
+
const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_40__.ValidationRulesBuilder(sugarRoot, dataDeclarationHelper, formSchemaRng, formulaExprConverter, kcXmlConditions, typeRegistry, useSchemaValidations);
|
|
80875
80925
|
const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_33__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
|
|
80876
80926
|
const normalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_25__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng);
|
|
80877
80927
|
const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_30__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder);
|
|
80878
80928
|
const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_41__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, optionalSectionRuleBuilder, formSchemaRng);
|
|
80879
80929
|
const autoValueForValueByDefaultNormalizationRuleGenerator = new _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_45__.AutoValueForValueByDefaultNormalizationRuleGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, dataDeclarationHelper);
|
|
80880
80930
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_21__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
80881
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper,
|
|
80931
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_12__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, useSchemaValidations);
|
|
80882
80932
|
markupGenerator.generate(sugarRoot, builder);
|
|
80883
80933
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_9__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
|
|
80884
80934
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_24__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -84519,7 +84569,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
84519
84569
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
84520
84570
|
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
84521
84571
|
/* harmony import */ var _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../Engine/src/Engine/Core/PathUtils/PathUtils */ "./Engine/src/Engine/Core/PathUtils/PathUtils.ts");
|
|
84522
|
-
/* harmony import */ var
|
|
84572
|
+
/* harmony import */ var _Common_ModelPath_ModelPathHelper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../Common/ModelPath/ModelPathHelper */ "./Common/ModelPath/ModelPathHelper.ts");
|
|
84573
|
+
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
84574
|
+
/* harmony import */ var _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./BaseRuleBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/BaseRuleBuilder.ts");
|
|
84575
|
+
|
|
84523
84576
|
|
|
84524
84577
|
|
|
84525
84578
|
|
|
@@ -84528,7 +84581,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
84528
84581
|
|
|
84529
84582
|
|
|
84530
84583
|
|
|
84531
|
-
|
|
84584
|
+
|
|
84585
|
+
class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_9__.BaseRuleBuilder {
|
|
84532
84586
|
constructor(sugarRoot, dataDeclarationHelper) {
|
|
84533
84587
|
super();
|
|
84534
84588
|
this.sugarRoot = void 0;
|
|
@@ -84539,28 +84593,56 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
84539
84593
|
buildRulesInternal() {
|
|
84540
84594
|
const allOptionalSections = this.dataDeclarationHelper.getOptionalSections();
|
|
84541
84595
|
const section2PathsMap = this.dataDeclarationHelper.getAllPathsBySection();
|
|
84596
|
+
const childrenSectionsByParent = this.getChildrenSectionsByParent();
|
|
84542
84597
|
const allRules = allOptionalSections.map(x => {
|
|
84543
|
-
|
|
84544
|
-
const sectionId = x.id;
|
|
84598
|
+
const allDependentSectionIds = this.getDependentSingleSections(x.id, childrenSectionsByParent).map(sectionInfo => sectionInfo.sectionId);
|
|
84545
84599
|
const targetPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromMask)(x.path, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each);
|
|
84546
|
-
const pathsBySection =
|
|
84600
|
+
const pathsBySection = [x.id, ...allDependentSectionIds].flatMap(sectionId => {
|
|
84601
|
+
var _section2PathsMap$get, _section2PathsMap$get2;
|
|
84602
|
+
return [...((_section2PathsMap$get = (_section2PathsMap$get2 = section2PathsMap.get(sectionId)) === null || _section2PathsMap$get2 === void 0 ? void 0 : _section2PathsMap$get2.values()) !== null && _section2PathsMap$get !== void 0 ? _section2PathsMap$get : [])];
|
|
84603
|
+
});
|
|
84547
84604
|
return this.buildOptionalSectionIsFilledCheckRule(targetPath, pathsBySection);
|
|
84548
84605
|
}).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.isNotNullOrUndefined);
|
|
84549
84606
|
return allRules;
|
|
84550
84607
|
}
|
|
84608
|
+
getDependentSingleSections(sourceSection, childrenSectionsByParent) {
|
|
84609
|
+
var _childrenSectionsByPa;
|
|
84610
|
+
const childrenSections = ((_childrenSectionsByPa = childrenSectionsByParent.get(sourceSection)) !== null && _childrenSectionsByPa !== void 0 ? _childrenSectionsByPa : []).filter(x => !x.optional && !x.multiple);
|
|
84611
|
+
const nestedSections = childrenSections.flatMap(x => this.getDependentSingleSections(x.sectionId, childrenSectionsByParent));
|
|
84612
|
+
return childrenSections.concat(...nestedSections);
|
|
84613
|
+
}
|
|
84614
|
+
getChildrenSectionsByParent() {
|
|
84615
|
+
return Iterator.from(this.getAllSections()).reduce((result, current) => {
|
|
84616
|
+
var _result$get;
|
|
84617
|
+
const data = (_result$get = result.get(current.parentSectionId)) !== null && _result$get !== void 0 ? _result$get : [];
|
|
84618
|
+
result.set(current.parentSectionId, data.concat(current));
|
|
84619
|
+
return result;
|
|
84620
|
+
}, new Map());
|
|
84621
|
+
}
|
|
84551
84622
|
*getAllSections() {
|
|
84552
|
-
const pagesToProcess =
|
|
84623
|
+
const pagesToProcess = this.sugarRoot.pages.map(x => ({
|
|
84624
|
+
page: x,
|
|
84625
|
+
parentId: undefined
|
|
84626
|
+
}));
|
|
84553
84627
|
while ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.arrayIsNotEmpty)(pagesToProcess)) {
|
|
84554
|
-
const
|
|
84555
|
-
if (
|
|
84628
|
+
const info = pagesToProcess.pop();
|
|
84629
|
+
if (info != null && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_4__.isNotNullOrUndefined)(info.page.path)) {
|
|
84556
84630
|
var _page$optional, _page$multiple;
|
|
84631
|
+
const {
|
|
84632
|
+
page,
|
|
84633
|
+
parentId
|
|
84634
|
+
} = info;
|
|
84557
84635
|
yield {
|
|
84558
84636
|
sectionId: page.id,
|
|
84559
84637
|
path: page.getFullPath(),
|
|
84560
84638
|
optional: (_page$optional = page.optional) !== null && _page$optional !== void 0 ? _page$optional : false,
|
|
84561
|
-
multiple: (_page$multiple = page.multiple) !== null && _page$multiple !== void 0 ? _page$multiple : false
|
|
84639
|
+
multiple: (_page$multiple = page.multiple) !== null && _page$multiple !== void 0 ? _page$multiple : false,
|
|
84640
|
+
parentSectionId: parentId
|
|
84562
84641
|
};
|
|
84563
|
-
pagesToProcess.push(...page.pages
|
|
84642
|
+
pagesToProcess.push(...page.pages.map(x => ({
|
|
84643
|
+
page: x,
|
|
84644
|
+
parentId: page.id
|
|
84645
|
+
})));
|
|
84564
84646
|
}
|
|
84565
84647
|
}
|
|
84566
84648
|
}
|
|
@@ -84569,11 +84651,21 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
84569
84651
|
const wrappedRules = Iterator.from(rules).map(rule => rule instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement && rule.left.valueName != "children" ? this.wrapSetStatementWithOptionalPageCheckIfNeeded(rule, allOrderedSections) : rule);
|
|
84570
84652
|
return wrappedRules;
|
|
84571
84653
|
}
|
|
84654
|
+
findParentOptionalForAggregationPath(targetPath, orderedSections) {
|
|
84655
|
+
const multipleSectionOfAggregationPath = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.IterUtils.first(Iterator.from(orderedSections).filter(x => _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.isPrefix(x.path.toLegacyPath(), targetPath.toLegacyPath())));
|
|
84656
|
+
const firstParentOptionalOrMultiple = multipleSectionOfAggregationPath != undefined ? _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_5__.IterUtils.first(Iterator.from(orderedSections).filter(x => x.sectionId !== multipleSectionOfAggregationPath.sectionId && _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.isPrefix(x.path.toLegacyPath(), multipleSectionOfAggregationPath.path.toLegacyPath()) && (x.optional || x.multiple))) : undefined;
|
|
84657
|
+
return firstParentOptionalOrMultiple;
|
|
84658
|
+
}
|
|
84659
|
+
findParentOptionalForNonAggregationPath(targetPath, valueName, orderedSections) {
|
|
84660
|
+
const isTargetPathMultiple = this.dataDeclarationHelper.isNodeHasChildrenEntry(targetPath);
|
|
84661
|
+
const checkingPath = isTargetPathMultiple && (valueName === "errorsCount" || valueName === "warningsCount") ? targetPath.getParentPath() : targetPath;
|
|
84662
|
+
return orderedSections.find(x => _Engine_src_Engine_Core_PathUtils_PathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.isPrefix(x.path.toLegacyPath(), checkingPath.toLegacyPath()) && (x.optional || x.multiple));
|
|
84663
|
+
}
|
|
84572
84664
|
wrapSetStatementWithOptionalPageCheckIfNeeded(rule, orderedSections) {
|
|
84573
84665
|
const targetPath = rule.left.modePath;
|
|
84574
|
-
const targetOptionalSection =
|
|
84666
|
+
const targetOptionalSection = !(0,_Common_ModelPath_ModelPathHelper__WEBPACK_IMPORTED_MODULE_7__.isAggregationPath)(targetPath) ? this.findParentOptionalForNonAggregationPath(targetPath, rule.left.valueName, orderedSections) : this.findParentOptionalForAggregationPath(targetPath, orderedSections);
|
|
84575
84667
|
if (targetOptionalSection != undefined && !targetOptionalSection.multiple) {
|
|
84576
|
-
const targetIsFilledPath = targetOptionalSection.path.joinWith(
|
|
84668
|
+
const targetIsFilledPath = targetOptionalSection.path.joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__.OptionalSectionFilledFieldName);
|
|
84577
84669
|
if (!targetIsFilledPath.isEquals(targetPath)) {
|
|
84578
84670
|
const targetIsFilledValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(targetIsFilledPath.toCurrentIteration(), "value");
|
|
84579
84671
|
return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(rule.left, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.EqExpression(targetIsFilledValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1")), rule.right, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression()));
|
|
@@ -84583,8 +84675,9 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
84583
84675
|
}
|
|
84584
84676
|
buildOptionalSectionIsFilledCheckRule(targetPath, pathsBySection) {
|
|
84585
84677
|
const createDecimalCondExpr = checkExpt => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(checkExpt, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.DecimalLiteralExpression(0));
|
|
84586
|
-
const
|
|
84587
|
-
const
|
|
84678
|
+
const targetValueRefBase = targetPath.joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_8__.OptionalSectionFilledFieldName);
|
|
84679
|
+
const targetValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ValueReferenceExpression(targetValueRefBase, "value");
|
|
84680
|
+
const pathInfos = Iterator.from(pathsBySection).filter(path => !path.isEquals(targetValueRefBase)).map(path => {
|
|
84588
84681
|
const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_2__.getMatchedAndDifferentModelPaths)(targetPath, path);
|
|
84589
84682
|
const iterationEntries = (0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_3__.buildIterationSequence)(splitInfo.differentPath);
|
|
84590
84683
|
return {
|
|
@@ -84607,10 +84700,9 @@ class OptionalSectionRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MOD
|
|
|
84607
84700
|
return pathCheckWithReduceIfRequiredExpr;
|
|
84608
84701
|
});
|
|
84609
84702
|
const allChecksExpressions = pathTestRules.reduce((acc, current) => acc == undefined ? current : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.OrBinaryExpression(acc, current), undefined);
|
|
84610
|
-
return allChecksExpressions != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(targetValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(allChecksExpressions, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.
|
|
84703
|
+
return allChecksExpressions != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.SetStatement(targetValueRef, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.ConditionalExpression(allChecksExpressions, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.StringLiteralExpression("1"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_1__.NullLiteralExpression())) : undefined;
|
|
84611
84704
|
}
|
|
84612
84705
|
}
|
|
84613
|
-
OptionalSectionRulesBuilder.optionalSectionFilledFieldName = "isFilledOptional";
|
|
84614
84706
|
|
|
84615
84707
|
/***/ }),
|
|
84616
84708
|
|
|
@@ -86622,7 +86714,7 @@ class DropDownButtonLoadExcelConverter extends _SugarNodeConverter__WEBPACK_IMPO
|
|
|
86622
86714
|
// no children
|
|
86623
86715
|
}
|
|
86624
86716
|
doConvert(context) {
|
|
86625
|
-
var _node$text, _node$textInLoading, _node$combinatorType, _node$combineType, _node$acceptGFVs
|
|
86717
|
+
var _node$text, _node$textInLoading, _node$combinatorType, _node$combineType, _node$acceptGFVs;
|
|
86626
86718
|
const node = this.getCurrentNodeAs(_DropDownButtonLoadExcelNode__WEBPACK_IMPORTED_MODULE_6__.DropDownButtonLoadExcelNode);
|
|
86627
86719
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("DropDownButtonLoadExcel");
|
|
86628
86720
|
markupBuilder.prop(x => x.pathToTable).set(node.pathToTable);
|
|
@@ -86634,9 +86726,7 @@ class DropDownButtonLoadExcelConverter extends _SugarNodeConverter__WEBPACK_IMPO
|
|
|
86634
86726
|
markupBuilder.prop(x => x.combinatorType).set((_node$combinatorType = node.combinatorType) !== null && _node$combinatorType !== void 0 ? _node$combinatorType : _Common_CandyApiClient_Types_DraftActions_CombineFufResult__WEBPACK_IMPORTED_MODULE_4__.CombinatorType.Default);
|
|
86635
86727
|
markupBuilder.prop(x => x.combineType).set((_node$combineType = node.combineType) !== null && _node$combineType !== void 0 ? _node$combineType : _Common_CandyApiClient_Types_DraftActions_CombineFufResult__WEBPACK_IMPORTED_MODULE_4__.FufCombineMethod.AddToEnd);
|
|
86636
86728
|
markupBuilder.prop(x => x.acceptGFVs).set((_node$acceptGFVs = node.acceptGFVs) !== null && _node$acceptGFVs !== void 0 ? _node$acceptGFVs : []);
|
|
86637
|
-
markupBuilder.prop(x => x.needTypeId).set((_node$needTypeId = node.needTypeId) !== null && _node$needTypeId !== void 0 ? _node$needTypeId : false);
|
|
86638
86729
|
markupBuilder.prop(x => x.navigationPath).set(node.navigationPath);
|
|
86639
|
-
markupBuilder.prop(x => x.lastPathTokenPageExist).set(node.lastPathTokenPageExist);
|
|
86640
86730
|
if (node.isOnlyAddToEnd && node.isOnlyReplace) {
|
|
86641
86731
|
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_5__.SugarAttributeReadError("В контроле должен быть только один атрибут: или isOnlyAddToEnd, или isOnlyReplace.", node, "isOnlyAddToEnd");
|
|
86642
86732
|
} else {
|
|
@@ -86644,6 +86734,7 @@ class DropDownButtonLoadExcelConverter extends _SugarNodeConverter__WEBPACK_IMPO
|
|
|
86644
86734
|
markupBuilder.prop(x => x.isOnlyAddToEnd).set((_node$isOnlyAddToEnd = node.isOnlyAddToEnd) !== null && _node$isOnlyAddToEnd !== void 0 ? _node$isOnlyAddToEnd : false);
|
|
86645
86735
|
markupBuilder.prop(x => x.isOnlyReplace).set((_node$isOnlyReplace = node.isOnlyReplace) !== null && _node$isOnlyReplace !== void 0 ? _node$isOnlyReplace : false);
|
|
86646
86736
|
}
|
|
86737
|
+
markupBuilder.prop(x => x.getTypeId).set(context.generateHelperFunctionExpression(node, "getTypeId", node.getTypeId));
|
|
86647
86738
|
return markupBuilder.buildConverterResult();
|
|
86648
86739
|
}
|
|
86649
86740
|
}
|
|
@@ -86673,7 +86764,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
86673
86764
|
|
|
86674
86765
|
|
|
86675
86766
|
|
|
86676
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14,
|
|
86767
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
86677
86768
|
|
|
86678
86769
|
|
|
86679
86770
|
|
|
@@ -86688,7 +86779,7 @@ let DropDownButtonLoadExcelNode = (_dec = (0,_Serializer_SugarSerializer__WEBPAC
|
|
|
86688
86779
|
`), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("combinatorType", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.enum(_Common_CandyApiClient_Types_DraftActions_CombineFufResult__WEBPACK_IMPORTED_MODULE_4__.CombinatorType.Default, _Common_CandyApiClient_Types_DraftActions_CombineFufResult__WEBPACK_IMPORTED_MODULE_4__.CombinatorType.XmlCombinatorByPath), `Default: использует умный комбинатор, который пишется флешами.
|
|
86689
86780
|
XmlCombinatorByPath: новый вид комбинатора по пути. Перекладывает из фуфа в черновик 1 к 1.
|
|
86690
86781
|
В связке с XmlCombinatorByPath - в combineType писать AddToEnd.
|
|
86691
|
-
`), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("acceptGFVs", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.array(_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string), `Разрешенные гфв, например старых форматов.`), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("
|
|
86782
|
+
`), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("acceptGFVs", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.array(_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string), `Разрешенные гфв, например старых форматов.`), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("navigationPath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string, `Путь для навигации, если он отличается от пути до таблицы (pathToTable). Если этот путь задан, то навигируется в него, иначе в pathToTable.`), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("isOnlyAddToEnd", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Если для формы реализована функция только добавления в конец, без замены. Например в ЕФС-1 в первых разделах. По умолчанию false.`), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("getTypeId", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.helperFunctionName, "Хелпер для определения typeId для метода transfer/combine-multiple. Например в ЕФС-1."), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("isOnlyReplace", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Если для формы реализована функция только замены данных. Например в ЕФС-1 ДСВ-3. По умолчанию false.`), _dec(_class = (_class2 = class DropDownButtonLoadExcelNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
86692
86783
|
constructor(...args) {
|
|
86693
86784
|
super(...args);
|
|
86694
86785
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "pathToTable", _descriptor, this);
|
|
@@ -86700,11 +86791,10 @@ let DropDownButtonLoadExcelNode = (_dec = (0,_Serializer_SugarSerializer__WEBPAC
|
|
|
86700
86791
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "combineType", _descriptor7, this);
|
|
86701
86792
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "combinatorType", _descriptor8, this);
|
|
86702
86793
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "acceptGFVs", _descriptor9, this);
|
|
86703
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
86704
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
86705
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
86706
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
86707
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "isOnlyReplace", _descriptor14, this);
|
|
86794
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "navigationPath", _descriptor10, this);
|
|
86795
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "isOnlyAddToEnd", _descriptor11, this);
|
|
86796
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTypeId", _descriptor12, this);
|
|
86797
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "isOnlyReplace", _descriptor13, this);
|
|
86708
86798
|
}
|
|
86709
86799
|
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "pathToTable", [_dec2], {
|
|
86710
86800
|
configurable: true,
|
|
@@ -86751,27 +86841,22 @@ let DropDownButtonLoadExcelNode = (_dec = (0,_Serializer_SugarSerializer__WEBPAC
|
|
|
86751
86841
|
enumerable: true,
|
|
86752
86842
|
writable: true,
|
|
86753
86843
|
initializer: null
|
|
86754
|
-
}), _descriptor10 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
86844
|
+
}), _descriptor10 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "navigationPath", [_dec11], {
|
|
86755
86845
|
configurable: true,
|
|
86756
86846
|
enumerable: true,
|
|
86757
86847
|
writable: true,
|
|
86758
86848
|
initializer: null
|
|
86759
|
-
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
86849
|
+
}), _descriptor11 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "isOnlyAddToEnd", [_dec12], {
|
|
86760
86850
|
configurable: true,
|
|
86761
86851
|
enumerable: true,
|
|
86762
86852
|
writable: true,
|
|
86763
86853
|
initializer: null
|
|
86764
|
-
}), _descriptor12 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
86854
|
+
}), _descriptor12 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "getTypeId", [_dec13], {
|
|
86765
86855
|
configurable: true,
|
|
86766
86856
|
enumerable: true,
|
|
86767
86857
|
writable: true,
|
|
86768
86858
|
initializer: null
|
|
86769
|
-
}), _descriptor13 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
86770
|
-
configurable: true,
|
|
86771
|
-
enumerable: true,
|
|
86772
|
-
writable: true,
|
|
86773
|
-
initializer: null
|
|
86774
|
-
}), _descriptor14 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "isOnlyReplace", [_dec15], {
|
|
86859
|
+
}), _descriptor13 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "isOnlyReplace", [_dec14], {
|
|
86775
86860
|
configurable: true,
|
|
86776
86861
|
enumerable: true,
|
|
86777
86862
|
writable: true,
|
|
@@ -89861,17 +89946,21 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
89861
89946
|
const rootPath = (0,_getRootPath__WEBPACK_IMPORTED_MODULE_3__.getRootPath)(node);
|
|
89862
89947
|
const entrySections = ["default"];
|
|
89863
89948
|
const optionalSections = this.findOptionalSections(node);
|
|
89949
|
+
const allSections = this.findAllSingleSections(node);
|
|
89864
89950
|
if (node.requisite) {
|
|
89865
89951
|
entrySections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_12__.SectionNames.requisitesSection);
|
|
89866
89952
|
}
|
|
89867
|
-
|
|
89953
|
+
const result = {
|
|
89868
89954
|
[rootPath]: optionalSections.length > 0 ? {
|
|
89869
89955
|
section: entrySections,
|
|
89956
|
+
allSingleSections: allSections,
|
|
89870
89957
|
optionalSections: optionalSections
|
|
89871
89958
|
} : {
|
|
89872
|
-
section: entrySections
|
|
89959
|
+
section: entrySections,
|
|
89960
|
+
allSingleSections: allSections
|
|
89873
89961
|
}
|
|
89874
89962
|
};
|
|
89963
|
+
return result;
|
|
89875
89964
|
}
|
|
89876
89965
|
buildChildrenDataDeclaration(context) {
|
|
89877
89966
|
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
@@ -89895,18 +89984,41 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
89895
89984
|
}
|
|
89896
89985
|
}
|
|
89897
89986
|
findOptionalSections(node) {
|
|
89898
|
-
const
|
|
89987
|
+
const pages = this.findAllSingleSections(node).filter(page => page.optional);
|
|
89988
|
+
return pages;
|
|
89989
|
+
}
|
|
89990
|
+
findNearestOptionalSection(sectionId, allSinglePagesWithParent) {
|
|
89991
|
+
const pageInfo = allSinglePagesWithParent.get(sectionId);
|
|
89992
|
+
if (pageInfo == undefined || pageInfo.page.optional || pageInfo.parentPage == undefined || pageInfo.parentPage.multiple) {
|
|
89993
|
+
return undefined;
|
|
89994
|
+
}
|
|
89995
|
+
if (pageInfo.parentPage.optional) {
|
|
89996
|
+
return pageInfo.parentPage.id;
|
|
89997
|
+
}
|
|
89998
|
+
return this.findNearestOptionalSection(pageInfo.parentPage.id, allSinglePagesWithParent);
|
|
89999
|
+
}
|
|
90000
|
+
findAllSingleSections(node) {
|
|
90001
|
+
const allSinglePagesWithParent = new Map(this.getAllPages(node.pages).filter(x => !x.page.multiple).map(x => [x.page.id, x]));
|
|
90002
|
+
const pages = Iterator.from(allSinglePagesWithParent.values()).map(x => x.page).map(page => {
|
|
89899
90003
|
var _page$optional;
|
|
89900
|
-
return
|
|
89901
|
-
|
|
89902
|
-
|
|
89903
|
-
|
|
89904
|
-
|
|
89905
|
-
|
|
90004
|
+
return {
|
|
90005
|
+
id: page.id,
|
|
90006
|
+
path: page.getFullPath().toLegacyPath(),
|
|
90007
|
+
optional: (_page$optional = page.optional) !== null && _page$optional !== void 0 ? _page$optional : false,
|
|
90008
|
+
dependsOnSection: this.findNearestOptionalSection(page.id, allSinglePagesWithParent)
|
|
90009
|
+
};
|
|
90010
|
+
}).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id)).toArray();
|
|
90011
|
+
return pages;
|
|
89906
90012
|
}
|
|
89907
|
-
getAllPages(pages) {
|
|
89908
|
-
const allPages = pages.flatMap(page => this.getAllPages(page.pages))
|
|
89909
|
-
|
|
90013
|
+
getAllPages(pages, parentPage) {
|
|
90014
|
+
const allPages = pages.flatMap(page => this.getAllPages(page.pages, page)).map(x => ({
|
|
90015
|
+
page: x.page,
|
|
90016
|
+
parentPage: x.parentPage
|
|
90017
|
+
}));
|
|
90018
|
+
return pages.map(page => ({
|
|
90019
|
+
page: page,
|
|
90020
|
+
parentPage: parentPage
|
|
90021
|
+
})).concat(...allPages);
|
|
89910
90022
|
}
|
|
89911
90023
|
buildBaseFormWithContent(context, formContent, formNode) {
|
|
89912
90024
|
const pageNodes = this.getFormPages(formNode);
|
|
@@ -90299,7 +90411,7 @@ let ModalTitleNode = (_dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_M
|
|
|
90299
90411
|
writable: true,
|
|
90300
90412
|
initializer: null
|
|
90301
90413
|
})), _class5)) || _class4);
|
|
90302
|
-
let FormNode = (_dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.sugarNode)("form", `Корневой элемент формы.`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form sync recursive .md$")), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_4__.DataBindingScopeMixinNode), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("userpicklist", [_UserPicklist_UserPicklistNode__WEBPACK_IMPORTED_MODULE_11__.UserPicklistNode]), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("tour", [_Tour_TourNode__WEBPACK_IMPORTED_MODULE_10__.TourNode]), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("fetchfunctions", [FetchFunctionsReferenceNode]), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("modalIE8", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("m", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("uf", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("forceNavigate", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("hideUnitsAdder", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("hasRegionalForms", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.UntypedUsage), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("controls"), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("modalheader", [ModalTitleNode]), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("import", [_SugarNodes_Nodes_ImportNode__WEBPACK_IMPORTED_MODULE_7__.ImportNode]), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("panel", [_Nodes_PanelNode__WEBPACK_IMPORTED_MODULE_14__.PanelNode]), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("zeroreportoptions", [_ZeroReportOptions_ZeroReportOptionsNode__WEBPACK_IMPORTED_MODULE_13__.ZeroReportOptionsNode]), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("page", [_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__.PageNode]), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("attachmentform", [_AttachmentForm_AttachmentFormNode__WEBPACK_IMPORTED_MODULE_9__.AttachmentFormNode]), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("simple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, ``), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("schemaValidations", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean,
|
|
90414
|
+
let FormNode = (_dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.sugarNode)("form", `Корневой элемент формы.`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form sync recursive .md$")), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrMixin)(_CommonNodeProperties_DataBindingMixinNode__WEBPACK_IMPORTED_MODULE_4__.DataBindingScopeMixinNode), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("userpicklist", [_UserPicklist_UserPicklistNode__WEBPACK_IMPORTED_MODULE_11__.UserPicklistNode]), _dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("tour", [_Tour_TourNode__WEBPACK_IMPORTED_MODULE_10__.TourNode]), _dec10 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("fetchfunctions", [FetchFunctionsReferenceNode]), _dec11 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("modalIE8", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("m", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("uf", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("forceNavigate", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("hideUnitsAdder", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.InvalidUsage), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("hasRegionalForms", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.UntypedUsage), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("controls"), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("modalheader", [ModalTitleNode]), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("import", [_SugarNodes_Nodes_ImportNode__WEBPACK_IMPORTED_MODULE_7__.ImportNode]), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("panel", [_Nodes_PanelNode__WEBPACK_IMPORTED_MODULE_14__.PanelNode]), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.singleChild)("zeroreportoptions", [_ZeroReportOptions_ZeroReportOptionsNode__WEBPACK_IMPORTED_MODULE_13__.ZeroReportOptionsNode]), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("page", [_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__.PageNode]), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("attachmentform", [_AttachmentForm_AttachmentFormNode__WEBPACK_IMPORTED_MODULE_9__.AttachmentFormNode]), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("simple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, ``), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("schemaValidations", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Валидации из схемы. По умолчанию true. Отключены старым формам `), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("isReadOnly", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, "Отобразить форму в режиме чтения - все редактирование будет отключено (включая интерактивные элементы - валидации, фокус, подсветки тултипы и тд)"), _dec27 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("ieDeprecationWarningEnabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, "Отображать окно с предупреждением, что некоторые функции в ie не работают, с предложением скачать другие браузеры. Не блокирует взаимодействие"), _dec28 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.deprecatedAttr)("compactActionPanel", _Serializer_DeprecationReason__WEBPACK_IMPORTED_MODULE_5__.DeprecationReason.Removed), _dec29 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("enableCustomizationButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, "Включить кнопку настройки оформления"), _dec30 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("ieSizeLimitation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Это флаг включает отображение заглушки для IE, если фуф больше определенного размера`), _dec31 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("templates", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Управляет влючение возможность создавать и применять шаблоны keweb-а (кнопка в меню)`), _dec32 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("__deleteMe__enableIndentToSingleUnit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Включить несогласованные с дизайнером отступы, которые использовались для ЕФС`), _dec33 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("plain", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Форма без боковой панели, которая будет содержать один раздел`), _dec34 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("requisite", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Есть подозрение что это свойство не используется`), _dec35 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("width", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.number, ``), _dec36 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("cssWidth", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.string, `Более преоритетный чем обычный width, задается как css`), _dec37 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("buttonSettingsType", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.enum(_Common_Enums_ButtonSettingsTypeEnum__WEBPACK_IMPORTED_MODULE_12__.ButtonSettingsTypeEnum.Revise, _Common_Enums_ButtonSettingsTypeEnum__WEBPACK_IMPORTED_MODULE_12__.ButtonSettingsTypeEnum.DigitalWarrant), `Разные настройки кнопок отправить и действий с формой. Сейчас есть только ${_Common_Enums_ButtonSettingsTypeEnum__WEBPACK_IMPORTED_MODULE_12__.ButtonSettingsTypeEnum.Revise} / ${_Common_Enums_ButtonSettingsTypeEnum__WEBPACK_IMPORTED_MODULE_12__.ButtonSettingsTypeEnum.DigitalWarrant} который будет делать кнопки в плашке для simple form как у ИОН или Сверке ФСС`), _dec38 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("validationBeforeSend", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Локальная проверка, которая не даст отправить форму, если есть невалидные поля.\n
|
|
90303
90415
|
После проверки фокус падает на невалидное поле, если это возможно. Например на input`), _dec39 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("padding", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.lengthUnit, ``), _dec40 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("maxunitscount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.number, `По дефолту 15. Если количество разделов превышает \`maxunitscount\`, начинает работать частичный рендеринг. Отрисовывается столько разделов вниз от текущего, сколько задано в настройке, а при скроллинге вниз рендерятся следующие. Используется для больших форм с множественными разделами (напр, ЕНВД, Прибыль), помогает облегчить загрузку редактора`), _dec41 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("onExternalInitSection", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.helperFunctionName, `Выполнение хелпер функции при вызове keweb-ого лайтбокса от внешних ребят. Когда редактор открывается из Контур Бухагалтерии или ТО. Чтобы вызвать - надо в query params передать initSectionLightbox="Path" где Path - путь до раздела`), _dec42 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("unitscount", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.number, ``), _dec43 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("transferText", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.localizedString, `Текст в лайтбоксе, который появляется по кнопке "Перенести данные"`), _dec44 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("navigationLimit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.number, `Количество множественных разделов при котором навигация сворачивается (в левой колонке отображаются не все экземпляры), как выглядит можешь посмотреть в ЕНВД при количестве разделов 2 больше 15`), _dec45 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("uploadFufButtonEnabled", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Включает кнопку загрузить отчет в "Другие действия" в панели слева.`), _dec46 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.markupAttr)("fufSizeTooLargeErrorText", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.string, `Описание ошибки для большого размера файла`), _dec47 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("uploadFufLightboxHideDemandNameButton", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.boolean, `Отключает кнопку "Показать имя требования" внутри лайтбокса Загрузки файла.`), _dec48 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attr)("defaultUnitsCountForPaging", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.attrType.number, `Количество инстансов множественного раздела на котором включается паджинация раздела`), _dec49 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("type", [_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_3__.TypeNode]), _dec50 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.children)("types", [_TypeListNode__WEBPACK_IMPORTED_MODULE_15__.TypeListNode]), _dec6(_class7 = (_class8 = class FormNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_6__.SugarNodeBase {
|
|
90304
90416
|
constructor(...args) {
|
|
90305
90417
|
super(...args);
|
|
@@ -90857,7 +90969,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90857
90969
|
/* harmony import */ var _Helpers_Normativehelp_NormativeHelpNode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Helpers/Normativehelp/NormativeHelpNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/Helpers/Normativehelp/NormativeHelpNode.ts");
|
|
90858
90970
|
/* harmony import */ var _Banner_BannerNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Banner/BannerNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Banner/BannerNode.ts");
|
|
90859
90971
|
/* harmony import */ var _ControlFlow_If_IfNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ControlFlow/If/IfNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/ControlFlow/If/IfNode.ts");
|
|
90860
|
-
/* harmony import */ var
|
|
90972
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
90973
|
+
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
90974
|
+
/* harmony import */ var _PageNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./PageNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page/PageNode.ts");
|
|
90975
|
+
|
|
90976
|
+
|
|
90861
90977
|
|
|
90862
90978
|
|
|
90863
90979
|
|
|
@@ -90875,13 +90991,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90875
90991
|
|
|
90876
90992
|
class PageConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.SugarNodeConverterBase {
|
|
90877
90993
|
static getAcceptNodeClass() {
|
|
90878
|
-
return
|
|
90994
|
+
return _PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode;
|
|
90879
90995
|
}
|
|
90880
90996
|
applyVisibilityPathProcessing() {
|
|
90881
90997
|
return false;
|
|
90882
90998
|
}
|
|
90883
90999
|
*doBuildNormalizeRules(builder, formSchemaRng) {
|
|
90884
|
-
const node = this.getCurrentNodeAs(
|
|
91000
|
+
const node = this.getCurrentNodeAs(_PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode);
|
|
90885
91001
|
const element = formSchemaRng.getElementByPath(node.getFullPath());
|
|
90886
91002
|
if (node.path == undefined) {
|
|
90887
91003
|
return;
|
|
@@ -90895,7 +91011,8 @@ class PageConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Sug
|
|
|
90895
91011
|
}
|
|
90896
91012
|
}
|
|
90897
91013
|
doBuildDataDeclaration(context) {
|
|
90898
|
-
|
|
91014
|
+
var _node$optional, _node$multiple;
|
|
91015
|
+
const node = this.getCurrentNodeAs(_PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode);
|
|
90899
91016
|
if (node.path == undefined) {
|
|
90900
91017
|
return {};
|
|
90901
91018
|
}
|
|
@@ -90908,20 +91025,30 @@ class PageConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Sug
|
|
|
90908
91025
|
result.optional = [true];
|
|
90909
91026
|
}
|
|
90910
91027
|
}
|
|
91028
|
+
const optionalFieldPath = node.getFullPath().joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_15__.OptionalSectionFilledFieldName).toLegacyPath();
|
|
91029
|
+
const optionalFieldRequired = ((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false) && !((_node$multiple = node.multiple) !== null && _node$multiple !== void 0 ? _node$multiple : false);
|
|
90911
91030
|
return context.mergeDataDeclaration({
|
|
90912
91031
|
[this.getResolvedBindingPath(node)]: result
|
|
90913
|
-
}, context.addPathSectionDeclarationEntry(node)
|
|
91032
|
+
}, context.addPathSectionDeclarationEntry(node), optionalFieldRequired ? {
|
|
91033
|
+
[optionalFieldPath]: {
|
|
91034
|
+
value: context.initSequenceFactory.dataValue({
|
|
91035
|
+
defaultValue: "1",
|
|
91036
|
+
fetchfn: undefined,
|
|
91037
|
+
settings: undefined
|
|
91038
|
+
}, false, "1")
|
|
91039
|
+
}
|
|
91040
|
+
} : undefined, optionalFieldRequired ? context.addPathSectionDeclarationEntry(node, false, false, (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_14__.createRelativeFromTokens)([_Common_PathConstants__WEBPACK_IMPORTED_MODULE_15__.OptionalSectionFilledFieldName])) : undefined);
|
|
90914
91041
|
}
|
|
90915
91042
|
buildChildrenDataDeclaration(context) {
|
|
90916
|
-
const node = this.getCurrentNodeAs(
|
|
91043
|
+
const node = this.getCurrentNodeAs(_PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode);
|
|
90917
91044
|
return context.processChildrenDataDeclaration(node.children);
|
|
90918
91045
|
}
|
|
90919
91046
|
*doTraverseChildren() {
|
|
90920
|
-
const node = this.getCurrentNodeAs(
|
|
91047
|
+
const node = this.getCurrentNodeAs(_PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode);
|
|
90921
91048
|
yield* node.children;
|
|
90922
91049
|
}
|
|
90923
91050
|
doConvert(context) {
|
|
90924
|
-
const node = this.getCurrentNodeAs(
|
|
91051
|
+
const node = this.getCurrentNodeAs(_PageNode__WEBPACK_IMPORTED_MODULE_16__.PageNode);
|
|
90925
91052
|
if (node.multiple) {
|
|
90926
91053
|
this.ensurePathExists(node, node.path);
|
|
90927
91054
|
}
|
|
@@ -111800,8 +111927,8 @@ function getBindingPathExpression(node, customPath) {
|
|
|
111800
111927
|
}
|
|
111801
111928
|
return node.getFullPath().toLegacyPath();
|
|
111802
111929
|
}
|
|
111803
|
-
function getResolvedBindingPath(node) {
|
|
111804
|
-
return node.getFullPath().toLegacyPath();
|
|
111930
|
+
function getResolvedBindingPath(node, suffix) {
|
|
111931
|
+
return node.getFullPath().joinWith(suffix != undefined ? suffix : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)()).toLegacyPath();
|
|
111805
111932
|
}
|
|
111806
111933
|
function getBindingPathWithSuffix(node, customPath) {
|
|
111807
111934
|
return node.getFullPath().joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(customPath, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each)).normalize().toLegacyPath();
|