@kontur.candy/generator 4.237.0-taxrebate.2 → 4.237.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.
Files changed (2) hide show
  1. package/dist/index.js +205 -175
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -284401,6 +284401,50 @@ function convertHtmlCommentsToJsxComments(xmlString) {
284401
284401
 
284402
284402
  /***/ }),
284403
284403
 
284404
+ /***/ "./Generator/src/generators/AttachmentPaths/AttachmentPathsGenerator.ts":
284405
+ /*!******************************************************************************!*\
284406
+ !*** ./Generator/src/generators/AttachmentPaths/AttachmentPathsGenerator.ts ***!
284407
+ \******************************************************************************/
284408
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
284409
+
284410
+ "use strict";
284411
+ __webpack_require__.r(__webpack_exports__);
284412
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
284413
+ /* harmony export */ "AttachmentPathsGenerator": () => (/* binding */ AttachmentPathsGenerator)
284414
+ /* harmony export */ });
284415
+ /* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
284416
+ /* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
284417
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
284418
+
284419
+
284420
+
284421
+ class AttachmentPathsGenerator {
284422
+ generate(sugarNode) {
284423
+ var _getConverterByNodeCl;
284424
+
284425
+ (_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`);
284426
+ return Iterator.from(this.generateInternal(sugarNode)).map(x => x.toLegacyPath()).toArray();
284427
+ }
284428
+
284429
+ *generateInternal(sugarNode) {
284430
+ const converterType = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_1__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_0__.getNodeClass)(sugarNode));
284431
+
284432
+ if (converterType == undefined) {
284433
+ return;
284434
+ }
284435
+
284436
+ const converter = new converterType(sugarNode);
284437
+ yield* converter.getAttachmentPaths();
284438
+
284439
+ for (const child of converter.traverseChildren()) {
284440
+ yield* this.generateInternal(child);
284441
+ }
284442
+ }
284443
+
284444
+ }
284445
+
284446
+ /***/ }),
284447
+
284404
284448
  /***/ "./Generator/src/generators/AutoCalculationsGenerator/AdditionalAutoCalculationParser.ts":
284405
284449
  /*!***********************************************************************************************!*\
284406
284450
  !*** ./Generator/src/generators/AutoCalculationsGenerator/AdditionalAutoCalculationParser.ts ***!
@@ -286504,6 +286548,8 @@ __webpack_require__.r(__webpack_exports__);
286504
286548
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
286505
286549
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
286506
286550
  /* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
286551
+ /* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/ElementProcessors/FormParts/Page/PageNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page/PageNode.ts");
286552
+
286507
286553
 
286508
286554
 
286509
286555
 
@@ -286578,7 +286624,7 @@ class DataDeclarationGenerationContext {
286578
286624
  return this.mergeDataDeclaration(...childrenDataDeclaration);
286579
286625
  }
286580
286626
 
286581
- addVisibilityPathDeclEntryNew(node) {
286627
+ addVisibilityPathDeclEntryNew(node, requisite) {
286582
286628
  var _node$parent;
286583
286629
 
286584
286630
  if (node.visibilityPath == undefined || node.visibilityPath === "") {
@@ -286586,10 +286632,10 @@ class DataDeclarationGenerationContext {
286586
286632
  }
286587
286633
 
286588
286634
  const declEntry = {};
286589
- const nodePath = ((_node$parent = node.parent) !== null && _node$parent !== void 0 ? _node$parent : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)()).getFullPathForChildren().joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.ModelPath.createFromMask(node.visibilityPath, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each)).normalize().toLegacyPath();
286590
- declEntry.section = this.getSections(node.sourceXmlNode);
286635
+ const nodePath = ((_node$parent = node.parent) !== null && _node$parent !== void 0 ? _node$parent : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)()).getFullPathForChildren().joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.ModelPath.createFromMask(node.visibilityPath, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each));
286636
+ declEntry.section = this.getSections(node, requisite);
286591
286637
  return {
286592
- [nodePath]: declEntry
286638
+ [nodePath.normalize().toLegacyPath()]: declEntry
286593
286639
  };
286594
286640
  }
286595
286641
 
@@ -286629,20 +286675,18 @@ class DataDeclarationGenerationContext {
286629
286675
  };
286630
286676
  }
286631
286677
 
286632
- addPathSectionDeclarationEntry(sugarNode, skipRequisitesSection = false) {
286678
+ addPathSectionDeclarationEntry(sugarNode, requisite, skipRequisitesSection = false) {
286633
286679
  const declEntry = {};
286634
286680
  const requisitesMode = skipRequisitesSection ? RequisiteSectionMode.ForceSkip : RequisiteSectionMode.AsRequisiteAttribute;
286635
- declEntry.section = this.getSections(sugarNode.sourceXmlNode, requisitesMode);
286681
+ declEntry.section = this.getSections(sugarNode, requisite, requisitesMode);
286636
286682
  return {
286637
286683
  [(0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(sugarNode)]: declEntry
286638
286684
  };
286639
- return {};
286640
286685
  }
286641
286686
 
286642
- addChildPathSectionDeclarationEntry(sugarNode, childPath, forceRequisitesSection) {
286687
+ addChildPathSectionDeclarationEntry(sugarNode, childPath, requisite) {
286643
286688
  const declEntry = {};
286644
- const requisitesMode = forceRequisitesSection ? RequisiteSectionMode.ForceAdd : RequisiteSectionMode.AsRequisiteAttribute;
286645
- declEntry.section = this.getSections(sugarNode.sourceXmlNode, requisitesMode);
286689
+ declEntry.section = this.getSections(sugarNode, requisite);
286646
286690
 
286647
286691
  if ((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.isModelPath)(childPath)) {
286648
286692
  return {
@@ -286660,13 +286704,13 @@ class DataDeclarationGenerationContext {
286660
286704
  return lodash_mergewith__WEBPACK_IMPORTED_MODULE_0___default()({}, ...items.filter(x => Boolean(x)), this.declarationCustomizer);
286661
286705
  }
286662
286706
 
286663
- addChildrenPathDeclEntry(node, pathAttr, optional) {
286707
+ addChildrenPathDeclEntry(node, pathAttr, optional, requisite) {
286664
286708
  if (pathAttr && pathAttr.includes("*")) {
286665
286709
  const declEntry = {};
286666
286710
  const childrenIndex = (0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(node).lastIndexOf("*");
286667
286711
  const childrenPath = (0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(node).slice(0, childrenIndex - 1);
286668
286712
  declEntry.children = this.initSequenceFactory.children(optional);
286669
- declEntry.section = this.getSections(node.sourceXmlNode);
286713
+ declEntry.section = this.getSections(node, requisite);
286670
286714
  return {
286671
286715
  [childrenPath]: declEntry
286672
286716
  };
@@ -286675,7 +286719,7 @@ class DataDeclarationGenerationContext {
286675
286719
  return {};
286676
286720
  }
286677
286721
 
286678
- addChildrenPathDeclEntryForChild(node, optional, pathAttrValue, childPath) {
286722
+ addChildrenPathDeclEntryForChild(node, optional, pathAttrValue, childPath, requisite) {
286679
286723
  const pathAttr = (pathAttrValue !== null && pathAttrValue !== void 0 ? pathAttrValue : "") + "/" + childPath;
286680
286724
 
286681
286725
  if (pathAttr && pathAttr.includes("*")) {
@@ -286684,7 +286728,7 @@ class DataDeclarationGenerationContext {
286684
286728
  const childrenIndex = resolvedBindingPath.lastIndexOf("*");
286685
286729
  const childrenPath = resolvedBindingPath.slice(0, childrenIndex - 1);
286686
286730
  declEntry.children = this.initSequenceFactory.children(optional);
286687
- declEntry.section = this.getSections(node.sourceXmlNode);
286731
+ declEntry.section = this.getSections(node, requisite);
286688
286732
  return {
286689
286733
  [childrenPath]: declEntry
286690
286734
  };
@@ -286693,33 +286737,27 @@ class DataDeclarationGenerationContext {
286693
286737
  return {};
286694
286738
  }
286695
286739
 
286696
- getSections(node, requisite = RequisiteSectionMode.AsRequisiteAttribute) {
286697
- const page = node.getParentPageOrUndefined();
286698
- let pageName;
286699
-
286700
- if (node.name !== "page") {
286701
- if (page != undefined) {
286702
- pageName = page.attrAsString("id");
286740
+ getSections(node, requisite, requisiteMode = RequisiteSectionMode.AsRequisiteAttribute) {
286741
+ const page = node instanceof _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__.PageNode ? node : node.findParentOfType(_markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__.PageNode);
286742
+ const pageName = page === null || page === void 0 ? void 0 : page.id;
286703
286743
 
286704
- if (page.attributes.multiple) {
286705
- return [{
286706
- fn: `#getSectionFunction('${pageName}')#`
286707
- }];
286708
- }
286744
+ if (!(node instanceof _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__.PageNode)) {
286745
+ if (page != undefined && page.multiple) {
286746
+ return [{
286747
+ fn: `#getSectionFunction('${pageName}')#`
286748
+ }];
286709
286749
  }
286710
- } else {
286711
- pageName = node.attrAsString("id");
286712
286750
  }
286713
286751
 
286714
286752
  const sections = pageName != undefined ? [pageName] : [];
286715
286753
 
286716
- if (requisite === RequisiteSectionMode.AsRequisiteAttribute) {
286717
- if (node.boolAttr("requisite")) {
286754
+ if (requisiteMode === RequisiteSectionMode.AsRequisiteAttribute) {
286755
+ if (requisite) {
286718
286756
  sections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_4__.SectionNames.requisitesSection);
286719
286757
  }
286720
286758
  }
286721
286759
 
286722
- if (requisite === RequisiteSectionMode.ForceAdd) {
286760
+ if (requisiteMode === RequisiteSectionMode.ForceAdd) {
286723
286761
  sections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_4__.SectionNames.requisitesSection);
286724
286762
  }
286725
286763
 
@@ -286760,19 +286798,18 @@ class DataDeclarationGenerationContext {
286760
286798
  }
286761
286799
 
286762
286800
  addCustomControlPathDeclEntry(sugarNode, customControl) {
286763
- const node = sugarNode.sourceXmlNode;
286764
286801
  const declEntry = {};
286765
- declEntry["value"] = this.initSequenceFactory.valueLegacy(node);
286802
+ declEntry["value"] = this.initSequenceFactory.dataValue(sugarNode, sugarNode.disabled);
286766
286803
 
286767
- if (node.boolAttr("optional")) {
286804
+ if (sugarNode.optional) {
286768
286805
  declEntry.optional = [true];
286769
286806
  }
286770
286807
 
286771
- if (node.boolAttr("disabled")) {
286808
+ if (sugarNode.disabled) {
286772
286809
  declEntry.disabled = [true];
286773
286810
  }
286774
286811
 
286775
- declEntry.section = this.getSections(sugarNode.sourceXmlNode);
286812
+ declEntry.section = this.getSections(sugarNode, sugarNode.requisite);
286776
286813
  return {
286777
286814
  [(0,_markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__.getResolvedBindingPath)(sugarNode)]: declEntry
286778
286815
  };
@@ -286997,151 +287034,56 @@ class DataDeclarationInitSourceSequenceFactory {
286997
287034
  this.fetchFunctions = fetchFunctions;
286998
287035
  }
286999
287036
 
287000
- valueLegacy(node) {
287001
- var _node$attrAsString;
287002
-
287003
- const fetchFn = this.fetchFunctions.getFetchFunction(node.attr("fetchfn"), "value");
287004
- const result = [];
287005
-
287006
- if (!node.boolAttr("disabled") && !node.boolAttr("settings")) {
287007
- result.push({
287008
- model: true
287009
- });
287010
- }
287011
-
287012
- if (fetchFn) {
287013
- result.push({
287014
- fn: fetchFn
287015
- });
287016
- }
287017
-
287018
- if (node.boolAttr("settings")) {
287019
- result.push({
287020
- model: true
287021
- });
287022
- }
287023
-
287024
- result.push((_node$attrAsString = node.attrAsString("defaultValue")) !== null && _node$attrAsString !== void 0 ? _node$attrAsString : "");
287025
- return result;
287026
- }
287027
-
287028
- checkboxValue(node) {
287029
- var _node$dataBinding$def;
287030
-
287031
- let defaultValue = (_node$dataBinding$def = node.dataBinding.defaultValue) !== null && _node$dataBinding$def !== void 0 ? _node$dataBinding$def : "";
287032
-
287033
- if (defaultValue) {
287034
- if (defaultValue === "checked") {
287035
- var _node$checkedValue;
287036
-
287037
- defaultValue = (_node$checkedValue = node.checkedValue) !== null && _node$checkedValue !== void 0 ? _node$checkedValue : true;
287038
- } else {
287039
- var _node$uncheckedValue;
287040
-
287041
- defaultValue = (_node$uncheckedValue = node.uncheckedValue) !== null && _node$uncheckedValue !== void 0 ? _node$uncheckedValue : false;
287042
- }
287043
- }
287044
-
287045
- const fetchFn = this.fetchFunctions.getFetchFunction(node.dataBinding.fetchfn, "value");
287046
- const result = [];
287047
-
287048
- if (!node.dataBinding.settings) {
287049
- result.push({
287050
- model: true
287051
- });
287052
- }
287053
-
287054
- if (fetchFn) {
287055
- result.push({
287056
- fn: fetchFn
287057
- });
287058
- }
287059
-
287060
- if (node.dataBinding.settings) {
287061
- result.push({
287062
- model: true
287063
- });
287064
- }
287065
-
287066
- result.push(defaultValue);
287067
- return result;
287068
- }
287069
-
287070
- dataValue(node, disabled) {
287071
- var _node$defaultValue;
287037
+ dataValue(node, disabled, defaultValue) {
287038
+ var _ref3;
287072
287039
 
287073
- const defaultValue = (_node$defaultValue = node.defaultValue) !== null && _node$defaultValue !== void 0 ? _node$defaultValue : "";
287074
- const fetchFn = this.fetchFunctions.getFetchFunction(node.fetchfn, "value");
287075
- const result = [];
287040
+ if (node.settings) {
287041
+ var _ref;
287076
287042
 
287077
- if (!disabled && !node.settings) {
287078
- result.push({
287079
- model: true
287080
- });
287043
+ return [...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.takeFromModel(), ...this.setValueUnconditionally((_ref = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref !== void 0 ? _ref : "")];
287081
287044
  }
287082
287045
 
287083
- if (fetchFn) {
287084
- result.push({
287085
- fn: fetchFn
287086
- });
287087
- }
287046
+ if (disabled) {
287047
+ var _ref2;
287088
287048
 
287089
- if (node.settings) {
287090
- result.push({
287091
- model: true
287092
- });
287049
+ return [...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref2 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : "")];
287093
287050
  }
287094
287051
 
287095
- result.push(defaultValue);
287096
- return result;
287097
- }
287098
-
287099
- takeFromModel() {
287100
- return [{
287101
- model: true
287102
- }];
287052
+ return [...this.takeFromModel(), ...this.takeFromFetchFunctionIfExists(node.fetchfn, "value"), ...this.setValueUnconditionally((_ref3 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : node.defaultValue) !== null && _ref3 !== void 0 ? _ref3 : "")];
287103
287053
  }
287104
287054
 
287105
287055
  takeFromFetchFunctionOrDefault(fetchFnName, fieldName, defaultValue) {
287106
- const fetchFn = this.fetchFunctions.getFetchFunction(fetchFnName, fieldName);
287107
- return [{
287108
- fn: fetchFn
287109
- }, defaultValue !== null && defaultValue !== void 0 ? defaultValue : ""];
287056
+ return [...this.takeFromFetchFunction(fetchFnName, fieldName), ...this.setValueUnconditionally(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "")];
287110
287057
  }
287111
287058
 
287112
287059
  takeFromModelOrDefaultValue(defaultValue) {
287113
- return [{
287114
- model: true
287115
- }, defaultValue !== null && defaultValue !== void 0 ? defaultValue : ""];
287060
+ return [...this.takeFromModel(), ...this.setValueUnconditionally(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "")];
287116
287061
  }
287117
287062
 
287118
287063
  children(optional, defaultChildren) {
287119
- return [{
287120
- model: true
287121
- }, defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"]];
287064
+ return [...this.takeFromModel(), ...this.setValueUnconditionally(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])];
287122
287065
  }
287123
287066
 
287124
287067
  takeFromModelOrFetchFn(fieldName, fetchFnName) {
287125
- const fetchFn = this.fetchFunctions.getFetchFunction(fetchFnName, fieldName);
287126
- return fetchFn ? [{
287127
- model: true
287128
- }, {
287129
- fn: fetchFn
287130
- }] : [{
287131
- model: true
287132
- }];
287068
+ return [...this.takeFromModel(), ...this.takeFromFetchFunctionIfExists(fetchFnName, fieldName)];
287133
287069
  }
287134
287070
 
287135
287071
  disabled() {
287136
- return [{
287137
- model: true
287138
- }, false];
287072
+ return [...this.takeFromModel(), ...this.setValueUnconditionally(false)];
287139
287073
  }
287140
287074
 
287141
287075
  visible() {
287076
+ return [...this.takeFromModel(), ...this.setValueUnconditionally(true)];
287077
+ }
287078
+
287079
+ setValueUnconditionally(value) {
287080
+ return [value];
287081
+ }
287082
+
287083
+ takeFromModel() {
287142
287084
  return [{
287143
287085
  model: true
287144
- }, true];
287086
+ }];
287145
287087
  }
287146
287088
 
287147
287089
  takeFromFetchFunction(fetchFnName, fieldName) {
@@ -287151,6 +287093,18 @@ class DataDeclarationInitSourceSequenceFactory {
287151
287093
  }];
287152
287094
  }
287153
287095
 
287096
+ takeFromFetchFunctionIfExists(fetchFnName, fieldName) {
287097
+ const fetchFn = this.fetchFunctions.getFetchFunction(fetchFnName, fieldName);
287098
+
287099
+ if (fetchFn) {
287100
+ return [{
287101
+ fn: fetchFn
287102
+ }];
287103
+ }
287104
+
287105
+ return [];
287106
+ }
287107
+
287154
287108
  }
287155
287109
 
287156
287110
  /***/ }),
@@ -288071,6 +288025,8 @@ __webpack_require__.r(__webpack_exports__);
288071
288025
  /* harmony import */ var _RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./RequisiteLIst/requisiteList */ "./Generator/src/generators/RequisiteLIst/requisiteList.ts");
288072
288026
  /* harmony import */ var _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./ServerSideFLangNormalization/NormalizationRulesGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/NormalizationRulesGenerator.ts");
288073
288027
  /* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationGenerationTimeHelper */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationTimeHelper.ts");
288028
+ /* harmony import */ var _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./AttachmentPaths/AttachmentPathsGenerator */ "./Generator/src/generators/AttachmentPaths/AttachmentPathsGenerator.ts");
288029
+
288074
288030
 
288075
288031
 
288076
288032
 
@@ -288137,6 +288093,9 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
288137
288093
  builder.addServerSideResource("ServerSide.normalize", normalizationRules);
288138
288094
  }
288139
288095
 
288096
+ const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_26__.AttachmentPathsGenerator();
288097
+ const attachmentPaths = attachmentPathsGenerator.generate(sugarRoot);
288098
+ builder.addServerSideResource(`AttachmentPaths.json`, JSON.stringify(attachmentPaths));
288140
288099
  const validationFunctionsContent = validationGenerator.generate();
288141
288100
  builder.addResource("validationFunctions.js", validationFunctionsContent);
288142
288101
  const importedKcXmlValidations = getImportedKcXmlValidations(sugarRoot, additionalContent);
@@ -291730,7 +291689,7 @@ class ChoiceConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.S
291730
291689
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
291731
291690
  optional: node.dataBinding.optional,
291732
291691
  disabled: node.disabled
291733
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
291692
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
291734
291693
  }
291735
291694
 
291736
291695
  buildChildrenDataDeclaration(context) {
@@ -305729,9 +305688,29 @@ class CheckboxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
305729
305688
 
305730
305689
  doBuildDataDeclaration(context) {
305731
305690
  const node = this.getCurrentNodeAs(_CheckboxNode__WEBPACK_IMPORTED_MODULE_5__.CheckboxNode);
305732
- return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.checkboxValue(node)]]), context.addSpecialFieldsEntry(node, {
305691
+ return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false, this.getDefaultValue(node))]]), context.addSpecialFieldsEntry(node, {
305733
305692
  optional: node.dataBinding.optional
305734
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
305693
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
305694
+ }
305695
+
305696
+ getDefaultValue(node) {
305697
+ var _node$dataBinding$def;
305698
+
305699
+ const defaultValue = (_node$dataBinding$def = node.dataBinding.defaultValue) !== null && _node$dataBinding$def !== void 0 ? _node$dataBinding$def : "";
305700
+
305701
+ if (defaultValue) {
305702
+ if (defaultValue === "checked") {
305703
+ var _node$checkedValue;
305704
+
305705
+ return (_node$checkedValue = node.checkedValue) !== null && _node$checkedValue !== void 0 ? _node$checkedValue : true;
305706
+ } else {
305707
+ var _node$uncheckedValue;
305708
+
305709
+ return (_node$uncheckedValue = node.uncheckedValue) !== null && _node$uncheckedValue !== void 0 ? _node$uncheckedValue : false;
305710
+ }
305711
+ }
305712
+
305713
+ return defaultValue;
305735
305714
  }
305736
305715
 
305737
305716
  buildChildrenDataDeclaration(context) {
@@ -305930,7 +305909,7 @@ class ComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__
305930
305909
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.disabled ? undefined : ["disabled", context.initSequenceFactory.disabled()]]), context.addSpecialFieldsEntry(node, {
305931
305910
  optional: node.dataBinding.optional,
305932
305911
  disabled: node.disabled
305933
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
305912
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
305934
305913
  }
305935
305914
 
305936
305915
  buildChildrenDataDeclaration(context) {
@@ -306433,7 +306412,7 @@ class DateConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Sug
306433
306412
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
306434
306413
  optional: node.dataBinding.optional,
306435
306414
  disabled: node.disabled
306436
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
306415
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
306437
306416
  }
306438
306417
 
306439
306418
  buildChildrenDataDeclaration(context) {
@@ -306644,7 +306623,7 @@ class DiadocSuggestComboBoxConverter extends _SugarNodeConverter__WEBPACK_IMPORT
306644
306623
  const node = this.getCurrentNodeAs(_DiadocSuggestComboBoxNode__WEBPACK_IMPORTED_MODULE_5__.DiadocSuggestComboBoxNode);
306645
306624
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)], ["disabled", context.initSequenceFactory.disabled()]]), context.addSpecialFieldsEntry(node, {
306646
306625
  optional: node.dataBinding.optional
306647
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
306626
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
306648
306627
  }
306649
306628
 
306650
306629
  buildChildrenDataDeclaration(context) {
@@ -307013,7 +306992,7 @@ class FiasFnsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.
307013
306992
 
307014
306993
  doBuildDataDeclaration(context) {
307015
306994
  const node = this.getCurrentNodeAs(_FiasFnsNode__WEBPACK_IMPORTED_MODULE_4__.FiasFnsNode);
307016
- return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addChildPathSectionDeclarationEntry(node, "InternalFiasId"), context.addChildPathSectionDeclarationEntry(node, "ИдНом"), context.addChildPathSectionDeclarationEntry(node, "Регион"), context.addChildPathSectionDeclarationEntry(node, "МуниципРайон/ВидКод"), context.addChildPathSectionDeclarationEntry(node, "МуниципРайон/Наим"), context.addChildPathSectionDeclarationEntry(node, "ГородСелПоселен/ВидКод"), context.addChildPathSectionDeclarationEntry(node, "ГородСелПоселен/Наим"), context.addChildPathSectionDeclarationEntry(node, "НаселенПункт/Вид"), context.addChildPathSectionDeclarationEntry(node, "НаселенПункт/Наим"), context.addChildPathSectionDeclarationEntry(node, "ЭлПланСтруктур/Тип"), context.addChildPathSectionDeclarationEntry(node, "ЭлПланСтруктур/Наим"), context.addChildPathSectionDeclarationEntry(node, "ЭлУлДорСети/Тип"), context.addChildPathSectionDeclarationEntry(node, "ЭлУлДорСети/Наим"), context.addChildPathSectionDeclarationEntry(node, "ЗемелУчасток"), context.addChildrenPathDeclEntryForChild(node, true, node.dataBinding.path, "Здание/*"), context.addChildPathSectionDeclarationEntry(node, "Здание/*/Тип"), context.addChildPathSectionDeclarationEntry(node, "Здание/*/Номер"), context.addChildPathSectionDeclarationEntry(node, "ПомещЗдания/Тип"), context.addChildPathSectionDeclarationEntry(node, "ПомещЗдания/Номер"), context.addChildPathSectionDeclarationEntry(node, "ПомещКвартиры/Тип"), context.addChildPathSectionDeclarationEntry(node, "ПомещКвартиры/Номер"));
306995
+ return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "InternalFiasId", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ИдНом", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "Регион", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "МуниципРайон/ВидКод", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "МуниципРайон/Наим", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ГородСелПоселен/ВидКод", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ГородСелПоселен/Наим", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "НаселенПункт/Вид", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "НаселенПункт/Наим", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ЭлПланСтруктур/Тип", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ЭлПланСтруктур/Наим", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ЭлУлДорСети/Тип", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ЭлУлДорСети/Наим", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ЗемелУчасток", node.dataBinding.requisite), context.addChildrenPathDeclEntryForChild(node, true, node.dataBinding.path, "Здание/*", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "Здание/*/Тип", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "Здание/*/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ПомещЗдания/Тип", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ПомещЗдания/Номер", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ПомещКвартиры/Тип", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "ПомещКвартиры/Номер", node.dataBinding.requisite));
307017
306996
  }
307018
306997
 
307019
306998
  buildChildrenDataDeclaration(context) {
@@ -307113,7 +307092,7 @@ class FiasMvdConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.
307113
307092
 
307114
307093
  doBuildDataDeclaration(context) {
307115
307094
  const node = this.getCurrentNodeAs(_FiasMvdNode__WEBPACK_IMPORTED_MODULE_4__.FiasMvdNode);
307116
- return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addChildPathSectionDeclarationEntry(node, "InternalFiasId"), context.addChildPathSectionDeclarationEntry(node, "addressObjectString"), context.addChildrenPathDeclEntryForChild(node, true, node.dataBinding.path, "housing/*"), context.addChildPathSectionDeclarationEntry(node, "housing/*/type"), context.addChildPathSectionDeclarationEntry(node, "housing/*/type/type"), context.addChildPathSectionDeclarationEntry(node, "housing/*/type/element"), context.addChildPathSectionDeclarationEntry(node, "housing/*/type/value"), context.addChildPathSectionDeclarationEntry(node, "housing/*/value"));
307095
+ return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "InternalFiasId", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "addressObjectString", node.dataBinding.requisite), context.addChildrenPathDeclEntryForChild(node, true, node.dataBinding.path, "housing/*", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "housing/*/type", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "housing/*/type/type", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "housing/*/type/element", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "housing/*/type/value", node.dataBinding.requisite), context.addChildPathSectionDeclarationEntry(node, "housing/*/value", node.dataBinding.requisite));
307117
307096
  }
307118
307097
 
307119
307098
  buildChildrenDataDeclaration(context) {
@@ -307215,6 +307194,17 @@ class FileLoaderConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4
307215
307194
  return _FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode;
307216
307195
  }
307217
307196
 
307197
+ *getAttachmentPaths() {
307198
+ const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
307199
+ const multiple = !node.single;
307200
+
307201
+ if (multiple) {
307202
+ yield node.getFullPath().joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__.PathTokens.each).joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_7__.AttachmentInfoPath);
307203
+ } else {
307204
+ yield node.getFullPath().joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_7__.AttachmentInfoPath);
307205
+ }
307206
+ }
307207
+
307218
307208
  doBuildNodeValidations(validationGenerator) {
307219
307209
  const node = this.getCurrentNodeAs(_FileLoaderNode__WEBPACK_IMPORTED_MODULE_10__.FileLoaderNode);
307220
307210
  validationGenerator.processValidations(this.getResolvedBindingPath(node), node.validationInfo.optional, validationGenerator.getTypeNode(node.validationInfo), undefined, node.validationInfo.emptydescription, {
@@ -307308,7 +307298,7 @@ class FileLoaderConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4
307308
307298
  [fileLoaderPath.toLegacyPath()]: {
307309
307299
  fnsConvertFileExtentions: attachmentType === null || attachmentType === void 0 ? void 0 : attachmentType.fnsConvertFileExtentions
307310
307300
  }
307311
- }, context.addChildPathSectionDeclarationEntry(fileLoader, additionalPath));
307301
+ }, context.addChildPathSectionDeclarationEntry(fileLoader, additionalPath, false));
307312
307302
  }
307313
307303
 
307314
307304
  convertChildren(context, nodes = []) {
@@ -307758,7 +307748,7 @@ class INNConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__.Suga
307758
307748
 
307759
307749
  doBuildDataDeclaration(context) {
307760
307750
  const node = this.getCurrentNodeAs(_INNNode__WEBPACK_IMPORTED_MODULE_3__.INNNode);
307761
- return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
307751
+ return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
307762
307752
  }
307763
307753
 
307764
307754
  buildChildrenDataDeclaration(context) {
@@ -307917,7 +307907,7 @@ class InputConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_4__.Su
307917
307907
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.auto ? ["autoFlag", context.initSequenceFactory.takeFromModel()] : undefined, node.auto ? ["autoValue", context.initSequenceFactory.takeFromModelOrDefaultValue(node.dataBinding.defaultValue)] : undefined]), context.addSpecialFieldsEntry(node, {
307918
307908
  optional: node.dataBinding.optional,
307919
307909
  disabled: node.disabled
307920
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
307910
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
307921
307911
  }
307922
307912
 
307923
307913
  doBuildNormalizeRules(builder) {
@@ -308644,7 +308634,7 @@ class KladrConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_5__.Su
308644
308634
  const node = this.getCurrentNodeAs(_KladrNode__WEBPACK_IMPORTED_MODULE_7__.KladrNode);
308645
308635
  return context.mergeDataDeclaration(node.kind === "stat" ? context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)], ["index", context.initSequenceFactory.takeFromModelOrFetchFn("index", node.dataBinding.fetchfn)], ["regionCode", context.initSequenceFactory.takeFromModelOrFetchFn("regionCode", node.dataBinding.fetchfn)], ["district", context.initSequenceFactory.takeFromModelOrFetchFn("district", node.dataBinding.fetchfn)], ["city", context.initSequenceFactory.takeFromModelOrFetchFn("city", node.dataBinding.fetchfn)], ["settlement", context.initSequenceFactory.takeFromModelOrFetchFn("settlement", node.dataBinding.fetchfn)], ["street", context.initSequenceFactory.takeFromModelOrFetchFn("street", node.dataBinding.fetchfn)], ["house", context.initSequenceFactory.takeFromModelOrFetchFn("house", node.dataBinding.fetchfn)], ["building", context.initSequenceFactory.takeFromModelOrFetchFn("building", node.dataBinding.fetchfn)], ["room", context.initSequenceFactory.takeFromModelOrFetchFn("room", node.dataBinding.fetchfn)]]) : _DataDeclarationGenerator_DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_2__.emptyDataDeclarationCollection, context.addSpecialFieldsEntry(node, {
308646
308636
  optional: node.dataBinding.optional
308647
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
308637
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
308648
308638
  }
308649
308639
 
308650
308640
  buildChildrenDataDeclaration(context) {
@@ -308951,7 +308941,7 @@ class PicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__
308951
308941
  const node = this.getCurrentNodeAs(_PicklistNode__WEBPACK_IMPORTED_MODULE_6__.PicklistNode);
308952
308942
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)]]), context.addSpecialFieldsEntry(node, {
308953
308943
  optional: node.dataBinding.optional
308954
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node), context.addChildrenPathDeclEntry(node, node.dataBinding.path, (_node$dataBinding$opt2 = node.dataBinding.optional) !== null && _node$dataBinding$opt2 !== void 0 ? _node$dataBinding$opt2 : false));
308944
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite), context.addChildrenPathDeclEntry(node, node.dataBinding.path, (_node$dataBinding$opt2 = node.dataBinding.optional) !== null && _node$dataBinding$opt2 !== void 0 ? _node$dataBinding$opt2 : false, node.dataBinding.requisite));
308955
308945
  }
308956
308946
 
308957
308947
  get nodePaths() {
@@ -309394,7 +309384,7 @@ class RadioGroupConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1
309394
309384
  const node = this.getCurrentNodeAs(_RadioGroupNode__WEBPACK_IMPORTED_MODULE_4__.RadioGroupNode);
309395
309385
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, false)]]), context.addSpecialFieldsEntry(node, {
309396
309386
  optional: node.dataBinding.optional
309397
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
309387
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
309398
309388
  }
309399
309389
 
309400
309390
  buildChildrenDataDeclaration(context) {
@@ -309747,7 +309737,7 @@ class SelectConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.S
309747
309737
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], node.disabled ? undefined : ["disabled", context.initSequenceFactory.disabled()]]), context.addSpecialFieldsEntry(node, {
309748
309738
  optional: node.dataBinding.optional,
309749
309739
  disabled: node.disabled
309750
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
309740
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
309751
309741
  }
309752
309742
 
309753
309743
  buildChildrenDataDeclaration(context) {
@@ -310337,7 +310327,7 @@ class TextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_1__
310337
310327
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
310338
310328
  optional: node.dataBinding.optional,
310339
310329
  disabled: node.disabled
310340
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
310330
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
310341
310331
  }
310342
310332
 
310343
310333
  buildChildrenDataDeclaration(context) {
@@ -310602,7 +310592,7 @@ class PopupTextAreaConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
310602
310592
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)]]), context.addSpecialFieldsEntry(node, {
310603
310593
  optional: node.dataBinding.optional,
310604
310594
  disabled: node.disabled
310605
- }), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
310595
+ }), context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
310606
310596
  }
310607
310597
 
310608
310598
  buildChildrenDataDeclaration(context) {
@@ -311026,7 +311016,7 @@ class FIOConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Suga
311026
311016
 
311027
311017
  const node = this.getCurrentNodeAs(_FIONode__WEBPACK_IMPORTED_MODULE_5__.FIONode);
311028
311018
  const hasBossAndAgent = (_node$fetchfn$include = (_node$fetchfn = node.fetchfn) === null || _node$fetchfn === void 0 ? void 0 : _node$fetchfn.includes("sign")) !== null && _node$fetchfn$include !== void 0 ? _node$fetchfn$include : false;
311029
- return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, true), context.addVisibilityPathDeclEntryNew(node), {
311019
+ return context.mergeDataDeclaration(context.addPathSectionDeclarationEntry(node, false), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite), {
311030
311020
  [(0,_getBindingPath__WEBPACK_IMPORTED_MODULE_4__.getBindingPathWithSuffix)(node, "Фамилия")]: {
311031
311021
  value: context.initSequenceFactory.takeFromFetchFunctionOrDefault(node.fetchfn + "surname", "value", ""),
311032
311022
  ...(hasBossAndAgent ? {
@@ -311446,7 +311436,7 @@ class TextConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_3__.Sug
311446
311436
  return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["value", context.initSequenceFactory.dataValue(node.dataBinding, node.disabled)], fetchfn !== null && fetchfn !== void 0 && fetchfn.includes("sign") ? ["bossValue", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "bossValue")] : undefined, fetchfn !== null && fetchfn !== void 0 && fetchfn.includes("sign") ? ["agentValue", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "agentValue")] : undefined, fetchfn === "sendername" ? ["senderInn", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "senderInn")] : undefined, fetchfn === "editablenameorg" || fetchfn === "formsclientinfo_editablenameorg" ? ["nameorg", context.initSequenceFactory.takeFromFetchFunction(fetchfn, "nameorg")] : undefined]), context.addSpecialFieldsEntry(node, {
311447
311437
  optional: node.dataBinding.optional,
311448
311438
  disabled: node.disabled
311449
- }), node.dataBinding.path && context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
311439
+ }), node.dataBinding.path && context.addPathSectionDeclarationEntry(node, node.dataBinding.requisite), context.addVisibilityPathDeclEntryNew(node, node.dataBinding.requisite));
311450
311440
  }
311451
311441
 
311452
311442
  buildChildrenDataDeclaration(context) {
@@ -313747,6 +313737,16 @@ class SugarNodeBase {
313747
313737
  return this.parent.findParentOfTypeStrict(nodeClass);
313748
313738
  }
313749
313739
 
313740
+ findParentOfType(nodeClass) {
313741
+ var _this$parent;
313742
+
313743
+ if (this.parent instanceof nodeClass) {
313744
+ return this.parent;
313745
+ }
313746
+
313747
+ return (_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.findParentOfType(nodeClass);
313748
+ }
313749
+
313750
313750
  getFullPath() {
313751
313751
  if (this.parent == undefined) {
313752
313752
  const ownPath = this.getOwnPath();
@@ -313791,9 +313791,36 @@ class UnknownSugarNode extends SugarNodeBase {
313791
313791
  this.name = name;
313792
313792
  }
313793
313793
 
313794
+ get path() {
313795
+ return this.sourceXmlNode.attrAsString("path");
313796
+ }
313797
+
313798
+ get optional() {
313799
+ return this.sourceXmlNode.attrAsBoolean("optional");
313800
+ }
313801
+
313802
+ get fetchfn() {
313803
+ return this.sourceXmlNode.attrAsString("fetchfn");
313804
+ }
313805
+
313806
+ get defaultValue() {
313807
+ return this.sourceXmlNode.attrAsString("defaultValue");
313808
+ }
313809
+
313810
+ get requisite() {
313811
+ return this.sourceXmlNode.attrAsBoolean("requisite");
313812
+ }
313813
+
313814
+ get settings() {
313815
+ return this.sourceXmlNode.attrAsBoolean("settings");
313816
+ }
313817
+
313818
+ get disabled() {
313819
+ return this.sourceXmlNode.attrAsBoolean("disabled");
313820
+ }
313821
+
313794
313822
  getOwnPath() {
313795
- const pathAttributeValue = this.sourceXmlNode.attrAsString("path");
313796
- return pathAttributeValue != undefined ? _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.ModelPath.createFromMask(pathAttributeValue, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each) : undefined;
313823
+ return this.path != undefined ? _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.ModelPath.createFromMask(this.path, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each) : undefined;
313797
313824
  }
313798
313825
 
313799
313826
  }
@@ -314023,6 +314050,9 @@ class SugarNodeConverterBase {
314023
314050
  this.buildChildrenValidations(validationGenerator);
314024
314051
  }
314025
314052
 
314053
+ *getAttachmentPaths() {// no paths by default
314054
+ }
314055
+
314026
314056
  *buildFLangValidations(buildContext) {
314027
314057
  yield* this.doBuildFLangValidations(buildContext);
314028
314058
  yield* this.buildChildrenFLangValidations(buildContext);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "4.237.0-taxrebate.2",
3
+ "version": "4.237.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,