@kontur.candy/generator 5.7.0-fix-lazy-loading.2 → 5.7.0-fix-lazy-loading.3
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 +13 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78478,6 +78478,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
78478
78478
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
78479
78479
|
/* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
|
|
78480
78480
|
/* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
|
|
78481
|
+
/* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
|
|
78482
|
+
|
|
78481
78483
|
|
|
78482
78484
|
|
|
78483
78485
|
|
|
@@ -78525,15 +78527,19 @@ class LazyLoadDeclarationGenerator {
|
|
|
78525
78527
|
}
|
|
78526
78528
|
*processElement(path, element) {
|
|
78527
78529
|
if (element.lazyLoadMode != undefined) {
|
|
78528
|
-
const
|
|
78529
|
-
const
|
|
78530
|
-
|
|
78531
|
-
|
|
78532
|
-
|
|
78533
|
-
|
|
78530
|
+
const adjustedPath = this.formSchemaRng.adjustPathMultiplicity(path.joinWith(element.name));
|
|
78531
|
+
const currentPaths = element.multiple ? [element.lazyLoadMode === "deferred" ? adjustedPath : adjustedPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each)] : [adjustedPath.joinWith(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_3__.PathTokens.each)];
|
|
78532
|
+
const items = currentPaths.map(currentPath => {
|
|
78533
|
+
var _element$lazyLoadMode;
|
|
78534
|
+
return {
|
|
78535
|
+
path: currentPath,
|
|
78536
|
+
lazyLoadMode: (_element$lazyLoadMode = element.lazyLoadMode) !== null && _element$lazyLoadMode !== void 0 ? _element$lazyLoadMode : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)()
|
|
78537
|
+
};
|
|
78538
|
+
}).map(item => element.lazyLoadingThreshold != undefined ? {
|
|
78534
78539
|
...item,
|
|
78535
78540
|
thresholdValue: element.lazyLoadingThreshold
|
|
78536
|
-
} : item;
|
|
78541
|
+
} : item);
|
|
78542
|
+
yield* items;
|
|
78537
78543
|
if (element.multiple) {
|
|
78538
78544
|
const additionalFields = ["children", "errorsCount", "warningsCount"];
|
|
78539
78545
|
const additionalItems = additionalFields.map(field => ({
|