@kontur.candy/generator 5.73.3 → 5.74.0-forminform.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 +64 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78890,9 +78890,9 @@ class AttachmentFormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
78890
78890
|
}
|
|
78891
78891
|
doConvert(context) {
|
|
78892
78892
|
const attachmentFormNode = this.getCurrentNodeAs(_AttachmentFormNode__WEBPACK_IMPORTED_MODULE_7__.AttachmentFormNode);
|
|
78893
|
-
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("
|
|
78894
|
-
markupBuilder.prop("data-tid").set("attachment
|
|
78895
|
-
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment
|
|
78893
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("AttachmentUnit");
|
|
78894
|
+
markupBuilder.prop("data-tid").set("attachment" + attachmentFormNode.gfv);
|
|
78895
|
+
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment" + attachmentFormNode.gfv));
|
|
78896
78896
|
markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
|
|
78897
78897
|
markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
|
|
78898
78898
|
markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
|
|
@@ -78921,18 +78921,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
78921
78921
|
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/initializerWarningHelper */ "./node_modules/@babel/runtime/helpers/initializerWarningHelper.js");
|
|
78922
78922
|
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__);
|
|
78923
78923
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
78924
|
+
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
78924
78925
|
|
|
78925
78926
|
|
|
78926
78927
|
|
|
78927
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
78928
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
78929
|
+
|
|
78928
78930
|
|
|
78929
|
-
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 {
|
|
78931
|
+
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, `Путь до поля с именем приложения`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("multiple", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.boolean, `Обозначение множественного раздела`), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attr)("navigationLimit", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.number, `Количество экземпляров множественного раздела после которого в левом меню будет включаться компактный режим отображения разделов. По умолчанию: 15. Используется только для множественных разделов`), _dec(_class = (_class2 = class AttachmentFormNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
78930
78932
|
constructor(...args) {
|
|
78931
78933
|
super(...args);
|
|
78932
78934
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "gfv", _descriptor, this);
|
|
78933
78935
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor2, this);
|
|
78934
78936
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor3, this);
|
|
78935
78937
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", _descriptor4, this);
|
|
78938
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor5, this);
|
|
78939
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "navigationLimit", _descriptor6, this);
|
|
78940
|
+
}
|
|
78941
|
+
getOwnPath() {
|
|
78942
|
+
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;
|
|
78936
78943
|
}
|
|
78937
78944
|
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "gfv", [_dec2], {
|
|
78938
78945
|
configurable: true,
|
|
@@ -78954,6 +78961,16 @@ let AttachmentFormNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTE
|
|
|
78954
78961
|
enumerable: true,
|
|
78955
78962
|
writable: true,
|
|
78956
78963
|
initializer: null
|
|
78964
|
+
}), _descriptor5 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multiple", [_dec6], {
|
|
78965
|
+
configurable: true,
|
|
78966
|
+
enumerable: true,
|
|
78967
|
+
writable: true,
|
|
78968
|
+
initializer: null
|
|
78969
|
+
}), _descriptor6 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "navigationLimit", [_dec7], {
|
|
78970
|
+
configurable: true,
|
|
78971
|
+
enumerable: true,
|
|
78972
|
+
writable: true,
|
|
78973
|
+
initializer: null
|
|
78957
78974
|
})), _class2)) || _class);
|
|
78958
78975
|
|
|
78959
78976
|
/***/ }),
|
|
@@ -79714,6 +79731,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79714
79731
|
const entrySections = ["default"];
|
|
79715
79732
|
const optionalSections = this.findOptionalSections(node);
|
|
79716
79733
|
const allSections = this.findAllSingleSections(node);
|
|
79734
|
+
const allAttachmentSections = this.findAllAttachmentSections(node);
|
|
79717
79735
|
if (node.requisite) {
|
|
79718
79736
|
entrySections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_12__.SectionNames.requisitesSection);
|
|
79719
79737
|
}
|
|
@@ -79727,6 +79745,11 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79727
79745
|
allSingleSections: allSections
|
|
79728
79746
|
}
|
|
79729
79747
|
};
|
|
79748
|
+
allAttachmentSections.forEach(attachmentSection => {
|
|
79749
|
+
result[`${attachmentSection.path}/attachment`] = {
|
|
79750
|
+
section: [attachmentSection.id]
|
|
79751
|
+
};
|
|
79752
|
+
});
|
|
79730
79753
|
return result;
|
|
79731
79754
|
}
|
|
79732
79755
|
buildChildrenDataDeclaration(context) {
|
|
@@ -79778,7 +79801,19 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79778
79801
|
dependsOnSection: this.findNearestOptionalSection(page.id, allSinglePagesWithParent)
|
|
79779
79802
|
};
|
|
79780
79803
|
}).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id)).toArray();
|
|
79781
|
-
|
|
79804
|
+
const attachmentForms = this.findAllAttachmentSections(node);
|
|
79805
|
+
return pages.concat(attachmentForms);
|
|
79806
|
+
}
|
|
79807
|
+
findAllAttachmentSections(node) {
|
|
79808
|
+
if (!node.attachmentForms) {
|
|
79809
|
+
return [];
|
|
79810
|
+
}
|
|
79811
|
+
return node.attachmentForms.map(attachmentForm => ({
|
|
79812
|
+
id: this.getAttachmentFormId(attachmentForm),
|
|
79813
|
+
path: attachmentForm.getFullPath().toLegacyPath(),
|
|
79814
|
+
optional: true,
|
|
79815
|
+
dependsOnSection: undefined
|
|
79816
|
+
})).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id));
|
|
79782
79817
|
}
|
|
79783
79818
|
getAllPages(pages, parentPage) {
|
|
79784
79819
|
const allPages = pages.flatMap(page => this.getAllPages(page.pages, page)).map(x => ({
|
|
@@ -79985,13 +80020,14 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79985
80020
|
return markupBuilder;
|
|
79986
80021
|
}
|
|
79987
80022
|
buildAttachmentFormUnit(node, attachmentFormNode, context) {
|
|
79988
|
-
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("
|
|
79989
|
-
markupBuilder.prop("data-tid").set(
|
|
79990
|
-
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(
|
|
80023
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("AttachmentUnit");
|
|
80024
|
+
markupBuilder.prop("data-tid").set(this.getAttachmentFormId(attachmentFormNode));
|
|
80025
|
+
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(this.getAttachmentFormId(attachmentFormNode)));
|
|
79991
80026
|
markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
|
|
79992
80027
|
markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
|
|
79993
80028
|
markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
|
|
79994
|
-
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode
|
|
80029
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode));
|
|
80030
|
+
markupBuilder.prop(x => x.multiple).set(attachmentFormNode.multiple);
|
|
79995
80031
|
return markupBuilder;
|
|
79996
80032
|
}
|
|
79997
80033
|
isPageContainsTableWithStickyElements(pageNode) {
|
|
@@ -80032,19 +80068,34 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
80032
80068
|
}
|
|
80033
80069
|
return unitListBuilder;
|
|
80034
80070
|
}
|
|
80071
|
+
getAttachmentFormId(attachmentForm) {
|
|
80072
|
+
return "attachment" + attachmentForm.gfv;
|
|
80073
|
+
}
|
|
80035
80074
|
buildUnitItemsFromAttachmentForms(formNode, attachmentFormNodes) {
|
|
80036
80075
|
const unitItemBuilders = [];
|
|
80037
80076
|
for (const attachmentForm of attachmentFormNodes) {
|
|
80077
|
+
var _attachmentForm$multi;
|
|
80038
80078
|
const unitItemBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("UnitItem");
|
|
80039
|
-
unitItemBuilder.prop("data-tid").set(
|
|
80040
|
-
unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(
|
|
80079
|
+
unitItemBuilder.prop("data-tid").set(this.getAttachmentFormId(attachmentForm));
|
|
80080
|
+
unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(this.getAttachmentFormId(attachmentForm)));
|
|
80041
80081
|
unitItemBuilder.prop(x => x.name).set(attachmentForm.name);
|
|
80042
80082
|
unitItemBuilder.prop(x => x.optional).set(true);
|
|
80043
|
-
unitItemBuilder.prop(x => x.multiple).set(false);
|
|
80083
|
+
unitItemBuilder.prop(x => x.multiple).set((_attachmentForm$multi = attachmentForm.multiple) !== null && _attachmentForm$multi !== void 0 ? _attachmentForm$multi : false);
|
|
80044
80084
|
unitItemBuilder.prop(x => x.multipleAppearance).set("flat");
|
|
80045
80085
|
unitItemBuilder.prop(x => x.pages).set([]);
|
|
80046
80086
|
unitItemBuilder.prop(x => x.clearConfirmationSettings).set({});
|
|
80087
|
+
//unitItemBuilder.prop(x => x.maxOccurs).set(attachmentForm.maxOccurs ?? context.getPathMaxOccurs(page.getFullPath()));
|
|
80088
|
+
|
|
80089
|
+
if (attachmentForm.path != undefined) {
|
|
80090
|
+
unitItemBuilder.prop(x => x.unitPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentForm));
|
|
80091
|
+
}
|
|
80047
80092
|
unitItemBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(formNode));
|
|
80093
|
+
if (attachmentForm.multiple) {
|
|
80094
|
+
const navigationLimit = attachmentForm.navigationLimit != undefined ? attachmentForm.navigationLimit : formNode.navigationLimit != undefined ? formNode.navigationLimit : undefined;
|
|
80095
|
+
if (navigationLimit != undefined) {
|
|
80096
|
+
unitItemBuilder.prop(x => x.navigationLimit).set(navigationLimit);
|
|
80097
|
+
}
|
|
80098
|
+
}
|
|
80048
80099
|
unitItemBuilders.push(unitItemBuilder);
|
|
80049
80100
|
}
|
|
80050
80101
|
return unitItemBuilders;
|