@kontur.candy/generator 4.259.0-readonly-candy.0 → 4.260.0-readonly-candy.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 +19 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -131287,6 +131287,7 @@ class ConverterResultJsxGenerator {
|
|
|
131287
131287
|
resultBuilder.appendStatement(`const ap = candyModules.ap`);
|
|
131288
131288
|
resultBuilder.appendStatement(`const each = candyModules.each`);
|
|
131289
131289
|
resultBuilder.appendStatement(`const current = candyModules.current`);
|
|
131290
|
+
resultBuilder.appendStatement(`const kcLangUtils = candyModules.kcLangUtils`);
|
|
131290
131291
|
resultBuilder.appendStatement(`const useLocalizeString = candyModules.useLocalizeString`);
|
|
131291
131292
|
resultBuilder.appendStatement(`const ${candyModules} = candyModules`);
|
|
131292
131293
|
resultBuilder.appendStatements(componentCreators);
|
|
@@ -134152,7 +134153,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134152
134153
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
134153
134154
|
/* harmony import */ var _UserPicklist_UserPicklistConverter__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../UserPicklist/UserPicklistConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/UserPicklist/UserPicklistConverter.ts");
|
|
134154
134155
|
/* harmony import */ var _DefaultContent_DefaultContentNode__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../DefaultContent/DefaultContentNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/DefaultContent/DefaultContentNode.ts");
|
|
134155
|
-
/* harmony import */ var
|
|
134156
|
+
/* harmony import */ var _common_ConditionUtils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../../common/ConditionUtils */ "./Generator/src/common/ConditionUtils.ts");
|
|
134157
|
+
/* harmony import */ var _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../../../../../Common/KCLangRuntimeUtils */ "./Common/KCLangRuntimeUtils.ts");
|
|
134158
|
+
/* harmony import */ var _ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../ComponentMarkupBuilder/PathHelper */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/PathHelper.ts");
|
|
134159
|
+
/* harmony import */ var _FormNode__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./FormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormNode.ts");
|
|
134160
|
+
|
|
134161
|
+
|
|
134162
|
+
|
|
134156
134163
|
|
|
134157
134164
|
|
|
134158
134165
|
|
|
@@ -134174,11 +134181,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134174
134181
|
|
|
134175
134182
|
class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.SugarNodeConverterBase {
|
|
134176
134183
|
static getAcceptNodeClass() {
|
|
134177
|
-
return
|
|
134184
|
+
return _FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode;
|
|
134178
134185
|
}
|
|
134179
134186
|
|
|
134180
134187
|
doBuildDataDeclaration(context) {
|
|
134181
|
-
const node = this.getCurrentNodeAs(
|
|
134188
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
134182
134189
|
const rootPath = (0,_getRootPath__WEBPACK_IMPORTED_MODULE_3__.getRootPath)(node);
|
|
134183
134190
|
const entrySections = ["default"];
|
|
134184
134191
|
const optionalSections = this.findOptionalSections(node);
|
|
@@ -134198,17 +134205,17 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134198
134205
|
}
|
|
134199
134206
|
|
|
134200
134207
|
buildChildrenDataDeclaration(context) {
|
|
134201
|
-
const node = this.getCurrentNodeAs(
|
|
134208
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
134202
134209
|
return context.processChildrenDataDeclaration(node.pages);
|
|
134203
134210
|
}
|
|
134204
134211
|
|
|
134205
134212
|
*doTraverseChildren() {
|
|
134206
|
-
const node = this.getCurrentNodeAs(
|
|
134213
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
134207
134214
|
yield* node.pages;
|
|
134208
134215
|
}
|
|
134209
134216
|
|
|
134210
134217
|
doConvert(context) {
|
|
134211
|
-
const node = this.getCurrentNodeAs(
|
|
134218
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_21__.FormNode);
|
|
134212
134219
|
|
|
134213
134220
|
if (node.simple) {
|
|
134214
134221
|
return this.buildSimpleForm(context, node);
|
|
@@ -134302,6 +134309,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134302
134309
|
layoutKind = "scrollable";
|
|
134303
134310
|
}
|
|
134304
134311
|
|
|
134312
|
+
const compiledCondition = pageNode.visible != undefined ? (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_18__.convertConditionToJsOrFailWithFriendlySugarError)(pageNode.visible, "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_19__.KCLangRuntimeUtils.kcLangUtilsName, pageNode, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_20__.extractPath)(x => x.visible)) : undefined;
|
|
134305
134313
|
const result = {
|
|
134306
134314
|
component: {
|
|
134307
134315
|
type: "Expression",
|
|
@@ -134317,7 +134325,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134317
134325
|
layoutKind: layoutKind,
|
|
134318
134326
|
visible: pageNode.visible != undefined ? {
|
|
134319
134327
|
type: "Expression",
|
|
134320
|
-
expression: `{ type: "ModelDependentEvaluator", expression: (path) => ${
|
|
134328
|
+
expression: `{ type: "ModelDependentEvaluator", expression: (path, count) => ${compiledCondition === null || compiledCondition === void 0 ? void 0 : compiledCondition.condition} }`
|
|
134321
134329
|
} : undefined,
|
|
134322
134330
|
bindingPath: (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(pageNode),
|
|
134323
134331
|
optional: pageNode.optional,
|
|
@@ -134406,11 +134414,12 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134406
134414
|
const unitName = unitList != undefined ? this.getUnitName(unitList, pageNode.id) : pageNode.navigationName;
|
|
134407
134415
|
markupBuilder.prop(x => x.name).set(unitName);
|
|
134408
134416
|
markupBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(node));
|
|
134417
|
+
const compiledCondition = pageNode.visible != undefined ? (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_18__.convertConditionToJsOrFailWithFriendlySugarError)(pageNode.visible, "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_19__.KCLangRuntimeUtils.kcLangUtilsName, pageNode, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_20__.extractPath)(x => x.visible)) : undefined;
|
|
134409
134418
|
|
|
134410
134419
|
if (pageNode.visible != undefined) {
|
|
134411
134420
|
markupBuilder.prop(x => x.visible).set({
|
|
134412
134421
|
type: "Expression",
|
|
134413
|
-
expression: `{ type: "ModelDependentEvaluator", expression: (path) => ${
|
|
134422
|
+
expression: `{ type: "ModelDependentEvaluator", expression: (path, count) => ${compiledCondition === null || compiledCondition === void 0 ? void 0 : compiledCondition.condition} }`
|
|
134414
134423
|
});
|
|
134415
134424
|
}
|
|
134416
134425
|
|
|
@@ -134492,11 +134501,12 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134492
134501
|
}
|
|
134493
134502
|
|
|
134494
134503
|
unitItemBuilder.prop(x => x.evaluatorsContextPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_15__.getNewBindingPathExpression)(formNode));
|
|
134504
|
+
const compiledCondition = page.visible != undefined ? (0,_common_ConditionUtils__WEBPACK_IMPORTED_MODULE_18__.convertConditionToJsOrFailWithFriendlySugarError)(page.visible, "path", _Common_KCLangRuntimeUtils__WEBPACK_IMPORTED_MODULE_19__.KCLangRuntimeUtils.kcLangUtilsName, page, (0,_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_20__.extractPath)(x => x.visible)) : undefined;
|
|
134495
134505
|
|
|
134496
134506
|
if (page.visible != undefined) {
|
|
134497
134507
|
unitItemBuilder.prop(x => x.visible).set({
|
|
134498
134508
|
type: "Expression",
|
|
134499
|
-
expression: `{ type: "ModelDependentEvaluator", expression: (path) => ${
|
|
134509
|
+
expression: `{ type: "ModelDependentEvaluator", expression: (path, count) => ${compiledCondition === null || compiledCondition === void 0 ? void 0 : compiledCondition.condition} }`
|
|
134500
134510
|
});
|
|
134501
134511
|
}
|
|
134502
134512
|
|