@websolutespa/bom-mixer-ui 1.4.0 → 1.5.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/CHANGELOG.md +6 -0
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lazy/lazy-loader/lazy-loader.js +6 -6
- package/dist/esm/lazy/lazy-loader/lazy-loader.js.map +1 -1
- package/dist/esm/lazy/not-found/not-found.js +1 -1
- package/dist/esm/lazy/not-found/not-found.js.map +1 -1
- package/dist/types/lazy/index.d.ts +1 -0
- package/dist/types/lazy/index.d.ts.map +1 -1
- package/dist/types/lazy/lazy-loader/lazy-loader-client.d.ts.map +1 -1
- package/dist/types/lazy/lazy-loader/lazy-loader.d.ts +1 -2
- package/dist/types/lazy/lazy-loader/lazy-loader.d.ts.map +1 -1
- package/dist/types/lazy/not-found/not-found.d.ts +1 -1
- package/package.json +1 -1
- package/src/lazy/index.ts +1 -0
- package/src/lazy/lazy-loader/lazy-loader-client.tsx +1 -3
- package/src/lazy/lazy-loader/lazy-loader.tsx +9 -6
- package/src/lazy/not-found/not-found.tsx +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -19551,7 +19551,7 @@ const NotFound = _ref => {
|
|
|
19551
19551
|
});
|
|
19552
19552
|
};
|
|
19553
19553
|
const NotFoundExport = {
|
|
19554
|
-
'
|
|
19554
|
+
'not_found': dynamic__default.default(() => Promise.resolve().then(function () { return notFound; }).then(module => module.NotFound))
|
|
19555
19555
|
};
|
|
19556
19556
|
|
|
19557
19557
|
var notFound = /*#__PURE__*/Object.freeze({
|
|
@@ -19903,14 +19903,11 @@ var textText1 = /*#__PURE__*/Object.freeze({
|
|
|
19903
19903
|
const LAZY_MODULES = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Carousel1Export), Download1Export), MediaFull1Export), MediaFull2Export), MediaMedia1Export), NotFoundExport), Related1Export), SizesColors1Export), Text1Export), TextAside1Export), TextMedia1Export), TextText1Export);
|
|
19904
19904
|
|
|
19905
19905
|
const lazyLoadComponent = function (component, modules, index) {
|
|
19906
|
-
if (modules === void 0) {
|
|
19907
|
-
modules = LAZY_MODULES;
|
|
19908
|
-
}
|
|
19909
19906
|
if (index === void 0) {
|
|
19910
19907
|
index = 0;
|
|
19911
19908
|
}
|
|
19912
19909
|
const key = component.schema || component.blockType;
|
|
19913
|
-
const Component = modules[key] ||
|
|
19910
|
+
const Component = modules[key] || modules['not_found'];
|
|
19914
19911
|
return jsxRuntime.jsx(Component, {
|
|
19915
19912
|
item: component,
|
|
19916
19913
|
index: index
|
|
@@ -19919,18 +19916,20 @@ const lazyLoadComponent = function (component, modules, index) {
|
|
|
19919
19916
|
const LazyLoader = _ref => {
|
|
19920
19917
|
let {
|
|
19921
19918
|
components,
|
|
19922
|
-
modules
|
|
19919
|
+
modules,
|
|
19923
19920
|
initialIndex = 0
|
|
19924
19921
|
} = _ref;
|
|
19922
|
+
const lazyModules = bomMixerHooks.useLazyModules();
|
|
19925
19923
|
if (!components) {
|
|
19926
19924
|
return null;
|
|
19927
19925
|
}
|
|
19926
|
+
const subModules = modules || Object.assign(Object.assign({}, LAZY_MODULES), lazyModules);
|
|
19928
19927
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
19929
19928
|
children: components.map((component, index) => jsxRuntime.jsx(React__default.default.Suspense, {
|
|
19930
19929
|
fallback: jsxRuntime.jsx(Skeleton, {
|
|
19931
19930
|
minHeight: "50vh"
|
|
19932
19931
|
}),
|
|
19933
|
-
children: lazyLoadComponent(component,
|
|
19932
|
+
children: lazyLoadComponent(component, subModules, initialIndex + index)
|
|
19934
19933
|
}, index))
|
|
19935
19934
|
});
|
|
19936
19935
|
};
|
|
@@ -20057,6 +20056,7 @@ exports.Icons = Icons;
|
|
|
20057
20056
|
exports.InfiniteLoader = InfiniteLoader;
|
|
20058
20057
|
exports.Input = Input;
|
|
20059
20058
|
exports.InputGroup = InputGroup;
|
|
20059
|
+
exports.LAZY_MODULES = LAZY_MODULES;
|
|
20060
20060
|
exports.Label = Label;
|
|
20061
20061
|
exports.Layout = Layout;
|
|
20062
20062
|
exports.LayoutDefault = LayoutDefault;
|