@kontur.candy/generator 5.74.0-forminform.5 → 5.74.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 +28 -93
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79036,11 +79036,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79036
79036
|
/* harmony import */ var _Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../../Common/PathConstants */ "./Common/PathConstants.ts");
|
|
79037
79037
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
79038
79038
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
79039
|
-
/* harmony import */ var
|
|
79040
|
-
/* harmony import */ var _DefaultContent_DefaultContentNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../DefaultContent/DefaultContentNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/DefaultContent/DefaultContentNode.ts");
|
|
79041
|
-
/* harmony import */ var _AttachmentFormNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AttachmentFormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/AttachmentForm/AttachmentFormNode.ts");
|
|
79042
|
-
|
|
79043
|
-
|
|
79039
|
+
/* harmony import */ var _AttachmentFormNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AttachmentFormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/AttachmentForm/AttachmentFormNode.ts");
|
|
79044
79040
|
|
|
79045
79041
|
|
|
79046
79042
|
|
|
@@ -79051,10 +79047,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79051
79047
|
|
|
79052
79048
|
class AttachmentFormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.SugarNodeConverterBase {
|
|
79053
79049
|
static getAcceptNodeClass() {
|
|
79054
|
-
return
|
|
79050
|
+
return _AttachmentFormNode__WEBPACK_IMPORTED_MODULE_7__.AttachmentFormNode;
|
|
79055
79051
|
}
|
|
79056
79052
|
*getAttachmentPaths() {
|
|
79057
|
-
const node = this.getCurrentNodeAs(
|
|
79053
|
+
const node = this.getCurrentNodeAs(_AttachmentFormNode__WEBPACK_IMPORTED_MODULE_7__.AttachmentFormNode);
|
|
79058
79054
|
yield (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_5__.createAbsolute)(node.path).joinWith(_Common_PathConstants__WEBPACK_IMPORTED_MODULE_4__.AttachmentInfoPath);
|
|
79059
79055
|
}
|
|
79060
79056
|
doBuildDataDeclaration(context) {
|
|
@@ -79067,21 +79063,14 @@ class AttachmentFormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
79067
79063
|
// no children
|
|
79068
79064
|
}
|
|
79069
79065
|
doConvert(context) {
|
|
79070
|
-
const attachmentFormNode = this.getCurrentNodeAs(
|
|
79071
|
-
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("
|
|
79072
|
-
markupBuilder.prop("data-tid").set("attachment" + attachmentFormNode.gfv);
|
|
79073
|
-
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment" + attachmentFormNode.gfv));
|
|
79066
|
+
const attachmentFormNode = this.getCurrentNodeAs(_AttachmentFormNode__WEBPACK_IMPORTED_MODULE_7__.AttachmentFormNode);
|
|
79067
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("AttachmentFormUnit");
|
|
79068
|
+
markupBuilder.prop("data-tid").set("attachment-" + attachmentFormNode.gfv);
|
|
79069
|
+
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_3__.createUnitId)("attachment-" + attachmentFormNode.gfv));
|
|
79074
79070
|
markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
|
|
79075
79071
|
markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
|
|
79076
79072
|
markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
|
|
79077
79073
|
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getNewBindingPathExpression)(attachmentFormNode, attachmentFormNode.path));
|
|
79078
|
-
const defaultContentNode = attachmentFormNode.children.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_7__.ofType)(_DefaultContent_DefaultContentNode__WEBPACK_IMPORTED_MODULE_8__.DefaultContentNode));
|
|
79079
|
-
if (defaultContentNode != undefined) {
|
|
79080
|
-
const markupBuilderDefault = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("PageFilledConditional");
|
|
79081
|
-
markupBuilderDefault.prop(x => x.visibleIfFilled).set(false);
|
|
79082
|
-
markupBuilderDefault.appendChild(context.convertChildNodes([defaultContentNode]));
|
|
79083
|
-
markupBuilder.appendChild(markupBuilder);
|
|
79084
|
-
}
|
|
79085
79074
|
return markupBuilder.buildConverterResult();
|
|
79086
79075
|
}
|
|
79087
79076
|
}
|
|
@@ -79106,29 +79095,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79106
79095
|
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/initializerWarningHelper */ "./node_modules/@babel/runtime/helpers/initializerWarningHelper.js");
|
|
79107
79096
|
/* harmony import */ var _babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__);
|
|
79108
79097
|
/* harmony import */ var _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
79109
|
-
/* harmony import */ var
|
|
79110
|
-
/* harmony import */ var _Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Commons/DocumentationLinks */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/DocumentationLinks.ts");
|
|
79111
|
-
|
|
79098
|
+
/* harmony import */ var _Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Commons/DocumentationLinks */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/DocumentationLinks.ts");
|
|
79112
79099
|
|
|
79113
79100
|
|
|
79114
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
79115
79101
|
|
|
79102
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
|
|
79116
79103
|
|
|
79117
79104
|
|
|
79118
|
-
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)("
|
|
79105
|
+
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)("visible", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.attrType.javascriptExpression, `${(0,_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_4__.docLink)(_Commons_DocumentationLinks__WEBPACK_IMPORTED_MODULE_4__.javaScriptExpressionLink)} для условного скрытия раздела`), _dec(_class = (_class2 = class AttachmentFormNode extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.SugarNodeBase {
|
|
79119
79106
|
constructor(...args) {
|
|
79120
79107
|
super(...args);
|
|
79121
79108
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "gfv", _descriptor, this);
|
|
79122
79109
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "name", _descriptor2, this);
|
|
79123
79110
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "description", _descriptor3, this);
|
|
79124
79111
|
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", _descriptor4, this);
|
|
79125
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
79126
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "
|
|
79127
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "visible", _descriptor7, this);
|
|
79128
|
-
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "children", _descriptor8, this);
|
|
79129
|
-
}
|
|
79130
|
-
getOwnPath() {
|
|
79131
|
-
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;
|
|
79112
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "multiple", _descriptor5, this);
|
|
79113
|
+
_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "visible", _descriptor6, this);
|
|
79132
79114
|
}
|
|
79133
79115
|
}, (_descriptor = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "gfv", [_dec2], {
|
|
79134
79116
|
configurable: true,
|
|
@@ -79150,22 +79132,12 @@ let AttachmentFormNode = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTE
|
|
|
79150
79132
|
enumerable: true,
|
|
79151
79133
|
writable: true,
|
|
79152
79134
|
initializer: null
|
|
79153
|
-
}), _descriptor5 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "
|
|
79154
|
-
configurable: true,
|
|
79155
|
-
enumerable: true,
|
|
79156
|
-
writable: true,
|
|
79157
|
-
initializer: null
|
|
79158
|
-
}), _descriptor6 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multiple", [_dec7], {
|
|
79135
|
+
}), _descriptor5 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "multiple", [_dec6], {
|
|
79159
79136
|
configurable: true,
|
|
79160
79137
|
enumerable: true,
|
|
79161
79138
|
writable: true,
|
|
79162
79139
|
initializer: null
|
|
79163
|
-
}),
|
|
79164
|
-
configurable: true,
|
|
79165
|
-
enumerable: true,
|
|
79166
|
-
writable: true,
|
|
79167
|
-
initializer: null
|
|
79168
|
-
}), _descriptor8 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "children", [_dec9], {
|
|
79140
|
+
}), _descriptor6 = _babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class2.prototype, "visible", [_dec7], {
|
|
79169
79141
|
configurable: true,
|
|
79170
79142
|
enumerable: true,
|
|
79171
79143
|
writable: true,
|
|
@@ -79897,9 +79869,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79897
79869
|
/* harmony import */ var _common_ConditionUtils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../../common/ConditionUtils */ "./Generator/src/common/ConditionUtils.ts");
|
|
79898
79870
|
/* harmony import */ var _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../../../../../Common/KCLangRuntimeUtils */ "./Common/KCLangRuntimeUtils.ts");
|
|
79899
79871
|
/* harmony import */ var _ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/PathHelper */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/PathHelper.ts");
|
|
79900
|
-
/* harmony import */ var
|
|
79901
|
-
/* harmony import */ var _FormNode__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./FormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormNode.ts");
|
|
79902
|
-
|
|
79872
|
+
/* harmony import */ var _FormNode__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./FormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormNode.ts");
|
|
79903
79873
|
|
|
79904
79874
|
|
|
79905
79875
|
|
|
@@ -79924,15 +79894,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79924
79894
|
|
|
79925
79895
|
class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.SugarNodeConverterBase {
|
|
79926
79896
|
static getAcceptNodeClass() {
|
|
79927
|
-
return
|
|
79897
|
+
return _FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode;
|
|
79928
79898
|
}
|
|
79929
79899
|
doBuildDataDeclaration(context) {
|
|
79930
|
-
const node = this.getCurrentNodeAs(
|
|
79900
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
79931
79901
|
const rootPath = (0,_getRootPath__WEBPACK_IMPORTED_MODULE_3__.getRootPath)(node);
|
|
79932
79902
|
const entrySections = ["default"];
|
|
79933
79903
|
const optionalSections = this.findOptionalSections(node);
|
|
79934
79904
|
const allSections = this.findAllSingleSections(node);
|
|
79935
|
-
const allAttachmentSections = this.findAllAttachmentSections(node);
|
|
79936
79905
|
if (node.requisite) {
|
|
79937
79906
|
entrySections.push(_Common_CommonConstants_SectionNames__WEBPACK_IMPORTED_MODULE_12__.SectionNames.requisitesSection);
|
|
79938
79907
|
}
|
|
@@ -79946,19 +79915,14 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79946
79915
|
allSingleSections: allSections
|
|
79947
79916
|
}
|
|
79948
79917
|
};
|
|
79949
|
-
allAttachmentSections.forEach(attachmentSection => {
|
|
79950
|
-
result[`${attachmentSection.path}/${_Common_PathConstants__WEBPACK_IMPORTED_MODULE_21__.AttachmentInfoPath.toLegacyPath()}`] = {
|
|
79951
|
-
section: [attachmentSection.id]
|
|
79952
|
-
};
|
|
79953
|
-
});
|
|
79954
79918
|
return result;
|
|
79955
79919
|
}
|
|
79956
79920
|
buildChildrenDataDeclaration(context) {
|
|
79957
|
-
const node = this.getCurrentNodeAs(
|
|
79921
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
79958
79922
|
return context.processChildrenDataDeclaration(node.pages);
|
|
79959
79923
|
}
|
|
79960
79924
|
*doTraverseChildren() {
|
|
79961
|
-
const node = this.getCurrentNodeAs(
|
|
79925
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
79962
79926
|
yield* node.pages;
|
|
79963
79927
|
if (node.attachmentForms) {
|
|
79964
79928
|
yield* node.attachmentForms;
|
|
@@ -79968,7 +79932,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
79968
79932
|
}
|
|
79969
79933
|
}
|
|
79970
79934
|
doConvert(context) {
|
|
79971
|
-
const node = this.getCurrentNodeAs(
|
|
79935
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
79972
79936
|
if (node.simple) {
|
|
79973
79937
|
return this.buildSimpleForm(context, node);
|
|
79974
79938
|
} else if (node.plain) {
|
|
@@ -80002,19 +79966,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
80002
79966
|
dependsOnSection: this.findNearestOptionalSection(page.id, allSinglePagesWithParent)
|
|
80003
79967
|
};
|
|
80004
79968
|
}).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id)).toArray();
|
|
80005
|
-
|
|
80006
|
-
return pages.concat(attachmentForms);
|
|
80007
|
-
}
|
|
80008
|
-
findAllAttachmentSections(node) {
|
|
80009
|
-
if (!node.attachmentForms) {
|
|
80010
|
-
return [];
|
|
80011
|
-
}
|
|
80012
|
-
return node.attachmentForms.map(attachmentForm => ({
|
|
80013
|
-
id: this.getAttachmentFormId(attachmentForm),
|
|
80014
|
-
path: attachmentForm.getFullPath().toLegacyPath(),
|
|
80015
|
-
optional: true,
|
|
80016
|
-
dependsOnSection: undefined
|
|
80017
|
-
})).filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)(x.id));
|
|
79969
|
+
return pages;
|
|
80018
79970
|
}
|
|
80019
79971
|
getAllPages(pages, parentPage) {
|
|
80020
79972
|
const allPages = pages.flatMap(page => this.getAllPages(page.pages, page)).map(x => ({
|
|
@@ -80221,14 +80173,13 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
80221
80173
|
return markupBuilder;
|
|
80222
80174
|
}
|
|
80223
80175
|
buildAttachmentFormUnit(node, attachmentFormNode, context) {
|
|
80224
|
-
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("
|
|
80225
|
-
markupBuilder.prop("data-tid").set(
|
|
80226
|
-
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(
|
|
80176
|
+
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("AttachmentFormUnit");
|
|
80177
|
+
markupBuilder.prop("data-tid").set("attachment-" + attachmentFormNode.gfv);
|
|
80178
|
+
markupBuilder.prop(x => x.unitId).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)("attachment-" + attachmentFormNode.gfv));
|
|
80227
80179
|
markupBuilder.prop(x => x.gfv).set(attachmentFormNode.gfv);
|
|
80228
80180
|
markupBuilder.prop(x => x.caption).set(attachmentFormNode.name);
|
|
80229
80181
|
markupBuilder.prop(x => x.description).set(attachmentFormNode.description);
|
|
80230
|
-
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode));
|
|
80231
|
-
markupBuilder.prop(x => x.multiple).set(attachmentFormNode.multiple);
|
|
80182
|
+
markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode, attachmentFormNode.path));
|
|
80232
80183
|
markupBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentFormNode));
|
|
80233
80184
|
const compiledCondition = generateKcLangOrJsCondition(attachmentFormNode);
|
|
80234
80185
|
if (attachmentFormNode.visible != undefined) {
|
|
@@ -80278,35 +80229,19 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
80278
80229
|
}
|
|
80279
80230
|
return unitListBuilder;
|
|
80280
80231
|
}
|
|
80281
|
-
getAttachmentFormId(attachmentForm) {
|
|
80282
|
-
return "attachment" + attachmentForm.gfv;
|
|
80283
|
-
}
|
|
80284
80232
|
buildUnitItemsFromAttachmentForms(formNode, attachmentFormNodes) {
|
|
80285
80233
|
const unitItemBuilders = [];
|
|
80286
80234
|
for (const attachmentForm of attachmentFormNodes) {
|
|
80287
|
-
var _attachmentForm$multi;
|
|
80288
80235
|
const unitItemBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("UnitItem");
|
|
80289
|
-
unitItemBuilder.prop("data-tid").set(
|
|
80290
|
-
unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)(
|
|
80236
|
+
unitItemBuilder.prop("data-tid").set("attachment-" + attachmentForm.gfv);
|
|
80237
|
+
unitItemBuilder.prop(x => x.id).set((0,_Engine_src_Controls_FormParts_Unit_UnitId_UnitId__WEBPACK_IMPORTED_MODULE_13__.createUnitId)("attachment-" + attachmentForm.gfv));
|
|
80291
80238
|
unitItemBuilder.prop(x => x.name).set(attachmentForm.name);
|
|
80292
80239
|
unitItemBuilder.prop(x => x.optional).set(true);
|
|
80293
|
-
unitItemBuilder.prop(x => x.multiple).set(
|
|
80240
|
+
unitItemBuilder.prop(x => x.multiple).set(false);
|
|
80294
80241
|
unitItemBuilder.prop(x => x.multipleAppearance).set("flat");
|
|
80295
80242
|
unitItemBuilder.prop(x => x.pages).set([]);
|
|
80296
80243
|
unitItemBuilder.prop(x => x.clearConfirmationSettings).set({});
|
|
80297
|
-
unitItemBuilder.prop(x => x.hasAttachment).set(true);
|
|
80298
|
-
//unitItemBuilder.prop(x => x.maxOccurs).set(attachmentForm.maxOccurs ?? context.getPathMaxOccurs(page.getFullPath()));
|
|
80299
|
-
|
|
80300
|
-
if (attachmentForm.path != undefined) {
|
|
80301
|
-
unitItemBuilder.prop(x => x.unitPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(attachmentForm));
|
|
80302
|
-
}
|
|
80303
80244
|
unitItemBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(formNode));
|
|
80304
|
-
if (attachmentForm.multiple) {
|
|
80305
|
-
const navigationLimit = attachmentForm.navigationLimit != undefined ? attachmentForm.navigationLimit : formNode.navigationLimit != undefined ? formNode.navigationLimit : undefined;
|
|
80306
|
-
if (navigationLimit != undefined) {
|
|
80307
|
-
unitItemBuilder.prop(x => x.navigationLimit).set(navigationLimit);
|
|
80308
|
-
}
|
|
80309
|
-
}
|
|
80310
80245
|
const compiledCondition = generateKcLangOrJsCondition(attachmentForm);
|
|
80311
80246
|
if (attachmentForm.visible != undefined) {
|
|
80312
80247
|
unitItemBuilder.prop(x => x.visible).set({
|