@kontur.candy/generator 4.248.2 → 4.249.0-imush-big.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 +43 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -113468,6 +113468,7 @@ function assertIs(value) {// noop
|
|
|
113468
113468
|
"use strict";
|
|
113469
113469
|
__webpack_require__.r(__webpack_exports__);
|
|
113470
113470
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
113471
|
+
/* harmony export */ "unitWithoutInstance": () => (/* binding */ unitWithoutInstance),
|
|
113471
113472
|
/* harmony export */ "isUnitIdEquals": () => (/* binding */ isUnitIdEquals),
|
|
113472
113473
|
/* harmony export */ "sectionNameToUnitId": () => (/* binding */ sectionNameToUnitId),
|
|
113473
113474
|
/* harmony export */ "unitIdToLegacyUnitId": () => (/* binding */ unitIdToLegacyUnitId),
|
|
@@ -113477,8 +113478,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
113477
113478
|
/* harmony import */ var fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fbjs/lib/areEqual */ "./node_modules/fbjs/lib/areEqual.js");
|
|
113478
113479
|
/* harmony import */ var fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0__);
|
|
113479
113480
|
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
113481
|
+
/* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
|
|
113480
113482
|
|
|
113481
113483
|
|
|
113484
|
+
|
|
113485
|
+
function unitWithoutInstance(unitId) {
|
|
113486
|
+
if (unitId.instance == undefined) {
|
|
113487
|
+
return unitId;
|
|
113488
|
+
}
|
|
113489
|
+
|
|
113490
|
+
return { ...unitId,
|
|
113491
|
+
instance: undefined
|
|
113492
|
+
};
|
|
113493
|
+
}
|
|
113482
113494
|
function isUnitIdEquals(left, right) {
|
|
113483
113495
|
var _left$instance, _right$instance, _left$parentInstances, _right$parentInstance;
|
|
113484
113496
|
|
|
@@ -113493,11 +113505,28 @@ function isUnitIdEquals(left, right) {
|
|
|
113493
113505
|
return left.pageId === right.pageId && ((_left$instance = left.instance) !== null && _left$instance !== void 0 ? _left$instance : undefined) === ((_right$instance = right.instance) !== null && _right$instance !== void 0 ? _right$instance : undefined) && fbjs_lib_areEqual__WEBPACK_IMPORTED_MODULE_0___default()((_left$parentInstances = left.parentInstances) !== null && _left$parentInstances !== void 0 ? _left$parentInstances : [], (_right$parentInstance = right.parentInstances) !== null && _right$parentInstance !== void 0 ? _right$parentInstance : []);
|
|
113494
113506
|
}
|
|
113495
113507
|
function sectionNameToUnitId(sectionName) {
|
|
113496
|
-
const [id,
|
|
113497
|
-
|
|
113498
|
-
|
|
113499
|
-
|
|
113500
|
-
|
|
113508
|
+
const [id, ...instances] = sectionName.split("-");
|
|
113509
|
+
|
|
113510
|
+
if (instances.length === 0) {
|
|
113511
|
+
return {
|
|
113512
|
+
pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
|
|
113513
|
+
};
|
|
113514
|
+
} else if (instances.length === 1) {
|
|
113515
|
+
var _instances$;
|
|
113516
|
+
|
|
113517
|
+
return {
|
|
113518
|
+
pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
|
|
113519
|
+
instance: (_instances$ = instances[0]) !== null && _instances$ !== void 0 ? _instances$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
|
|
113520
|
+
};
|
|
113521
|
+
} else {
|
|
113522
|
+
var _IterUtils$last;
|
|
113523
|
+
|
|
113524
|
+
return {
|
|
113525
|
+
pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
|
|
113526
|
+
parentInstances: instances.slice(0, -1),
|
|
113527
|
+
instance: (_IterUtils$last = _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.last(instances)) !== null && _IterUtils$last !== void 0 ? _IterUtils$last : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
|
|
113528
|
+
};
|
|
113529
|
+
}
|
|
113501
113530
|
}
|
|
113502
113531
|
function unitIdToLegacyUnitId(unitId) {
|
|
113503
113532
|
if (unitId == undefined) {
|
|
@@ -134044,7 +134073,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134044
134073
|
/* harmony import */ var _Content_ContentNode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Content/ContentNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Content/ContentNode.ts");
|
|
134045
134074
|
/* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
134046
134075
|
/* harmony import */ var _UserPicklist_UserPicklistConverter__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../UserPicklist/UserPicklistConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/UserPicklist/UserPicklistConverter.ts");
|
|
134047
|
-
/* harmony import */ var
|
|
134076
|
+
/* harmony import */ var _DefaultContent_DefaultContentNode__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../DefaultContent/DefaultContentNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/DefaultContent/DefaultContentNode.ts");
|
|
134077
|
+
/* harmony import */ var _FormNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./FormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormNode.ts");
|
|
134078
|
+
|
|
134048
134079
|
|
|
134049
134080
|
|
|
134050
134081
|
|
|
@@ -134065,11 +134096,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134065
134096
|
|
|
134066
134097
|
class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.SugarNodeConverterBase {
|
|
134067
134098
|
static getAcceptNodeClass() {
|
|
134068
|
-
return
|
|
134099
|
+
return _FormNode__WEBPACK_IMPORTED_MODULE_18__.FormNode;
|
|
134069
134100
|
}
|
|
134070
134101
|
|
|
134071
134102
|
doBuildDataDeclaration(context) {
|
|
134072
|
-
const node = this.getCurrentNodeAs(
|
|
134103
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_18__.FormNode);
|
|
134073
134104
|
const rootPath = (0,_getRootPath__WEBPACK_IMPORTED_MODULE_3__.getRootPath)(node);
|
|
134074
134105
|
const entrySections = ["default"];
|
|
134075
134106
|
const optionalSections = this.findOptionalSections(node);
|
|
@@ -134089,17 +134120,17 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134089
134120
|
}
|
|
134090
134121
|
|
|
134091
134122
|
buildChildrenDataDeclaration(context) {
|
|
134092
|
-
const node = this.getCurrentNodeAs(
|
|
134123
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_18__.FormNode);
|
|
134093
134124
|
return context.processChildrenDataDeclaration(node.pages);
|
|
134094
134125
|
}
|
|
134095
134126
|
|
|
134096
134127
|
*doTraverseChildren() {
|
|
134097
|
-
const node = this.getCurrentNodeAs(
|
|
134128
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_18__.FormNode);
|
|
134098
134129
|
yield* node.pages;
|
|
134099
134130
|
}
|
|
134100
134131
|
|
|
134101
134132
|
doConvert(context) {
|
|
134102
|
-
const node = this.getCurrentNodeAs(
|
|
134133
|
+
const node = this.getCurrentNodeAs(_FormNode__WEBPACK_IMPORTED_MODULE_18__.FormNode);
|
|
134103
134134
|
|
|
134104
134135
|
if (node.simple) {
|
|
134105
134136
|
return this.buildSimpleForm(context, node);
|
|
@@ -134272,6 +134303,7 @@ class FormConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_7__.Sug
|
|
|
134272
134303
|
}
|
|
134273
134304
|
|
|
134274
134305
|
const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("Unit");
|
|
134306
|
+
markupBuilder.prop(x => x.hasDefaultContent).set(pageNode.children.some(x => x instanceof _DefaultContent_DefaultContentNode__WEBPACK_IMPORTED_MODULE_17__.DefaultContentNode));
|
|
134275
134307
|
markupBuilder.prop(x => x.height).set(pageNode.height);
|
|
134276
134308
|
markupBuilder.prop(x => x.minHeight).set(pageNode.minHeight);
|
|
134277
134309
|
markupBuilder.prop("data-tid").set(pageNode.id);
|