@kontur.candy/generator 5.73.1 → 5.74.0-forminform.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +38 -9
- 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, ""),
|
|
74363
|
+
const target = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createModelPath)(condition.target.replace(/\@/g, ""), false);
|
|
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
|
|
78884
|
-
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment
|
|
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,11 +78910,13 @@ __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");
|
|
78913
78914
|
|
|
78914
78915
|
|
|
78915
78916
|
|
|
78916
78917
|
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
78917
78918
|
|
|
78919
|
+
|
|
78918
78920
|
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 {
|
|
78919
78921
|
constructor(...args) {
|
|
78920
78922
|
super(...args);
|
|
@@ -78923,6 +78925,9 @@ let AttachmentFormNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTE
|
|
|
78923
78925
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor3, this);
|
|
78924
78926
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", _descriptor4, this);
|
|
78925
78927
|
}
|
|
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
|
+
}
|
|
78926
78931
|
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "gfv", [_dec2], {
|
|
78927
78932
|
configurable: true,
|
|
78928
78933
|
enumerable: true,
|
|
@@ -79703,6 +79708,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79703
79708
|
const entrySections = ["default"];
|
|
79704
79709
|
const optionalSections = this.findOptionalSections(node);
|
|
79705
79710
|
const allSections = this.findAllSingleSections(node);
|
|
79711
|
+
const allAttachmentSections = this.findAllAttachmentSections(node);
|
|
79706
79712
|
if (node.requisite) {
|
|
79707
79713
|
entrySections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_12__.SectionNames.requisitesSection);
|
|
79708
79714
|
}
|
|
@@ -79716,6 +79722,11 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79716
79722
|
allSingleSections: allSections
|
|
79717
79723
|
}
|
|
79718
79724
|
};
|
|
79725
|
+
allAttachmentSections.forEach(attachmentSection => {
|
|
79726
|
+
result[`${attachmentSection.path}/attachment`] = {
|
|
79727
|
+
section: [attachmentSection.id]
|
|
79728
|
+
};
|
|
79729
|
+
});
|
|
79719
79730
|
return result;
|
|
79720
79731
|
}
|
|
79721
79732
|
buildChildrenDataDeclaration(context) {
|
|
@@ -79767,7 +79778,19 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79767
79778
|
dependsOnSection: this.findNearestOptionalSection(page.id, allSinglePagesWithParent)
|
|
79768
79779
|
};
|
|
79769
79780
|
}).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id)).toArray();
|
|
79770
|
-
|
|
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));
|
|
79771
79794
|
}
|
|
79772
79795
|
getAllPages(pages, parentPage) {
|
|
79773
79796
|
const allPages = pages.flatMap(page => this.getAllPages(page.pages, page)).map(x => ({
|
|
@@ -79975,12 +79998,12 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79975
79998
|
}
|
|
79976
79999
|
buildAttachmentFormUnit(node, attachmentFormNode, context) {
|
|
79977
80000
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("AttachmentFormUnit");
|
|
79978
|
-
markupBuilder.prop("data-tid").set(
|
|
79979
|
-
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(
|
|
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)));
|
|
79980
80003
|
markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
|
|
79981
80004
|
markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
|
|
79982
80005
|
markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
|
|
79983
|
-
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode
|
|
80006
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode));
|
|
79984
80007
|
return markupBuilder;
|
|
79985
80008
|
}
|
|
79986
80009
|
isPageContainsTableWithStickyElements(pageNode) {
|
|
@@ -80021,18 +80044,24 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
80021
80044
|
}
|
|
80022
80045
|
return unitListBuilder;
|
|
80023
80046
|
}
|
|
80047
|
+
getAttachmentFormId(attachmentForm) {
|
|
80048
|
+
return "attachment" + attachmentForm.gfv;
|
|
80049
|
+
}
|
|
80024
80050
|
buildUnitItemsFromAttachmentForms(formNode, attachmentFormNodes) {
|
|
80025
80051
|
const unitItemBuilders = [];
|
|
80026
80052
|
for (const attachmentForm of attachmentFormNodes) {
|
|
80027
80053
|
const unitItemBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("UnitItem");
|
|
80028
|
-
unitItemBuilder.prop("data-tid").set(
|
|
80029
|
-
unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(
|
|
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)));
|
|
80030
80056
|
unitItemBuilder.prop(x => x.name).set(attachmentForm.name);
|
|
80031
80057
|
unitItemBuilder.prop(x => x.optional).set(true);
|
|
80032
80058
|
unitItemBuilder.prop(x => x.multiple).set(false);
|
|
80033
80059
|
unitItemBuilder.prop(x => x.multipleAppearance).set("flat");
|
|
80034
80060
|
unitItemBuilder.prop(x => x.pages).set([]);
|
|
80035
80061
|
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
|
+
}
|
|
80036
80065
|
unitItemBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(formNode));
|
|
80037
80066
|
unitItemBuilders.push(unitItemBuilder);
|
|
80038
80067
|
}
|