@kontur.candy/generator 5.74.0-forminform.0 → 5.74.0-rsvprintfired.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 +9 -38
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -74360,7 +74360,7 @@ class ValidationRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_9
74360
74360
  }
74361
74361
  buildKcValidationRuleCheck(condition) {
74362
74362
  const prefix = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createModelPath)(condition.match.replace(/\@/g, ""), true).normalize();
74363
- const target = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createModelPath)(condition.target.replace(/\@/g, ""), false);
74363
+ const target = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createModelPath)(condition.target.replace(/\@/g, ""), "auto");
74364
74364
  const fullTarget = this.adjustPathMultiplicity(prefix.joinWith(target).normalize());
74365
74365
  const precalculationRules = [];
74366
74366
  return {
@@ -78880,8 +78880,8 @@ class AttachmentFormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
78880
78880
  doConvert(context) {
78881
78881
  const attachmentFormNode = this.getCurrentNodeAs(_AttachmentFormNode__WEBPACK_IMPORTED_MODULE_7__.AttachmentFormNode);
78882
78882
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("AttachmentFormUnit");
78883
- markupBuilder.prop("data-tid").set("attachment" + attachmentFormNode.gfv);
78884
- markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment" + attachmentFormNode.gfv));
78883
+ markupBuilder.prop("data-tid").set("attachment-" + attachmentFormNode.gfv);
78884
+ markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment-" + attachmentFormNode.gfv));
78885
78885
  markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
78886
78886
  markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
78887
78887
  markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
@@ -78910,13 +78910,11 @@ __webpack_require__.r(__webpack_exports__);
78910
78910
  /* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/initializerWarningHelper */ "./node_modules/@babel/runtime/helpers/initializerWarningHelper.js");
78911
78911
  /* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__);
78912
78912
  /* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
78913
- /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
78914
78913
 
78915
78914
 
78916
78915
 
78917
78916
  var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
78918
78917
 
78919
-
78920
78918
  let AttachmentFormNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.sugarNode)("attachmentform", `Встроенный редактор для формализованного приложения`, __webpack_require__("./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/AttachmentForm sync recursive .md$")), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("gfv", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, `ГФВ приложения`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("name", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, `Крактое название раздела, в который поместить форму`), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("description", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, `Описание формы приложения`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.string.required, `Путь до поля с именем приложения`), _dec(_class = (_class2 = class AttachmentFormNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
78921
78919
  constructor(...args) {
78922
78920
  super(...args);
@@ -78925,9 +78923,6 @@ let AttachmentFormNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTE
78925
78923
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor3, this);
78926
78924
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", _descriptor4, this);
78927
78925
  }
78928
- getOwnPath() {
78929
- return this.path != undefined ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createFromMask)(this.path, "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.each) : undefined;
78930
- }
78931
78926
  }, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "gfv", [_dec2], {
78932
78927
  configurable: true,
78933
78928
  enumerable: true,
@@ -79708,7 +79703,6 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
79708
79703
  const entrySections = ["default"];
79709
79704
  const optionalSections = this.findOptionalSections(node);
79710
79705
  const allSections = this.findAllSingleSections(node);
79711
- const allAttachmentSections = this.findAllAttachmentSections(node);
79712
79706
  if (node.requisite) {
79713
79707
  entrySections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_12__.SectionNames.requisitesSection);
79714
79708
  }
@@ -79722,11 +79716,6 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
79722
79716
  allSingleSections: allSections
79723
79717
  }
79724
79718
  };
79725
- allAttachmentSections.forEach(attachmentSection => {
79726
- result[`${attachmentSection.path}/attachment`] = {
79727
- section: [attachmentSection.id]
79728
- };
79729
- });
79730
79719
  return result;
79731
79720
  }
79732
79721
  buildChildrenDataDeclaration(context) {
@@ -79778,19 +79767,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
79778
79767
  dependsOnSection: this.findNearestOptionalSection(page.id, allSinglePagesWithParent)
79779
79768
  };
79780
79769
  }).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id)).toArray();
79781
- const attachmentForms = this.findAllAttachmentSections(node);
79782
- return pages.concat(attachmentForms);
79783
- }
79784
- findAllAttachmentSections(node) {
79785
- if (!node.attachmentForms) {
79786
- return [];
79787
- }
79788
- return node.attachmentForms.map(attachmentForm => ({
79789
- id: this.getAttachmentFormId(attachmentForm),
79790
- path: attachmentForm.getFullPath().toLegacyPath(),
79791
- optional: true,
79792
- dependsOnSection: undefined
79793
- })).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id));
79770
+ return pages;
79794
79771
  }
79795
79772
  getAllPages(pages, parentPage) {
79796
79773
  const allPages = pages.flatMap(page => this.getAllPages(page.pages, page)).map(x => ({
@@ -79998,12 +79975,12 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
79998
79975
  }
79999
79976
  buildAttachmentFormUnit(node, attachmentFormNode, context) {
80000
79977
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("AttachmentFormUnit");
80001
- markupBuilder.prop("data-tid").set(this.getAttachmentFormId(attachmentFormNode));
80002
- markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(this.getAttachmentFormId(attachmentFormNode)));
79978
+ markupBuilder.prop("data-tid").set("attachment-" + attachmentFormNode.gfv);
79979
+ markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)("attachment-" + attachmentFormNode.gfv));
80003
79980
  markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
80004
79981
  markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
80005
79982
  markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
80006
- markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode));
79983
+ markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode, attachmentFormNode.path));
80007
79984
  return markupBuilder;
80008
79985
  }
80009
79986
  isPageContainsTableWithStickyElements(pageNode) {
@@ -80044,24 +80021,18 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
80044
80021
  }
80045
80022
  return unitListBuilder;
80046
80023
  }
80047
- getAttachmentFormId(attachmentForm) {
80048
- return "attachment" + attachmentForm.gfv;
80049
- }
80050
80024
  buildUnitItemsFromAttachmentForms(formNode, attachmentFormNodes) {
80051
80025
  const unitItemBuilders = [];
80052
80026
  for (const attachmentForm of attachmentFormNodes) {
80053
80027
  const unitItemBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("UnitItem");
80054
- unitItemBuilder.prop("data-tid").set(this.getAttachmentFormId(attachmentForm));
80055
- unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(this.getAttachmentFormId(attachmentForm)));
80028
+ unitItemBuilder.prop("data-tid").set("attachment-" + attachmentForm.gfv);
80029
+ unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)("attachment-" + attachmentForm.gfv));
80056
80030
  unitItemBuilder.prop(x => x.name).set(attachmentForm.name);
80057
80031
  unitItemBuilder.prop(x => x.optional).set(true);
80058
80032
  unitItemBuilder.prop(x => x.multiple).set(false);
80059
80033
  unitItemBuilder.prop(x => x.multipleAppearance).set("flat");
80060
80034
  unitItemBuilder.prop(x => x.pages).set([]);
80061
80035
  unitItemBuilder.prop(x => x.clearConfirmationSettings).set({});
80062
- if (attachmentForm.path != undefined) {
80063
- unitItemBuilder.prop(x => x.unitPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentForm));
80064
- }
80065
80036
  unitItemBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(formNode));
80066
80037
  unitItemBuilders.push(unitItemBuilder);
80067
80038
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.74.0-forminform.0",
3
+ "version": "5.74.0-rsvprintfired.0",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,