@websolutespa/bom-mixer-ui 1.4.0 → 1.5.1
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 +12 -0
- package/dist/cjs/index.js +10 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/link/link.js +3 -1
- package/dist/esm/components/link/link.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/components/link/link.tsx +2 -2
- 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
|
@@ -1440,14 +1440,16 @@ Button.displayName = 'Button';
|
|
|
1440
1440
|
const Link = /*#__PURE__*/React__default.default.forwardRef((_a, forwardedRef) => {
|
|
1441
1441
|
var {
|
|
1442
1442
|
children,
|
|
1443
|
+
href = '',
|
|
1443
1444
|
passHref,
|
|
1444
1445
|
legacyBehavior
|
|
1445
1446
|
} = _a,
|
|
1446
|
-
props = __rest(_a, ["children", "passHref", "legacyBehavior"]);
|
|
1447
|
+
props = __rest(_a, ["children", "href", "passHref", "legacyBehavior"]);
|
|
1447
1448
|
passHref = passHref === false ? false : true;
|
|
1448
1449
|
legacyBehavior = legacyBehavior === false ? false : true;
|
|
1449
1450
|
return jsxRuntime.jsx(NextLink__default.default, Object.assign({
|
|
1450
1451
|
ref: forwardedRef,
|
|
1452
|
+
href: href,
|
|
1451
1453
|
passHref: passHref,
|
|
1452
1454
|
legacyBehavior: legacyBehavior
|
|
1453
1455
|
}, props, {
|
|
@@ -19551,7 +19553,7 @@ const NotFound = _ref => {
|
|
|
19551
19553
|
});
|
|
19552
19554
|
};
|
|
19553
19555
|
const NotFoundExport = {
|
|
19554
|
-
'
|
|
19556
|
+
'not_found': dynamic__default.default(() => Promise.resolve().then(function () { return notFound; }).then(module => module.NotFound))
|
|
19555
19557
|
};
|
|
19556
19558
|
|
|
19557
19559
|
var notFound = /*#__PURE__*/Object.freeze({
|
|
@@ -19903,14 +19905,11 @@ var textText1 = /*#__PURE__*/Object.freeze({
|
|
|
19903
19905
|
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
19906
|
|
|
19905
19907
|
const lazyLoadComponent = function (component, modules, index) {
|
|
19906
|
-
if (modules === void 0) {
|
|
19907
|
-
modules = LAZY_MODULES;
|
|
19908
|
-
}
|
|
19909
19908
|
if (index === void 0) {
|
|
19910
19909
|
index = 0;
|
|
19911
19910
|
}
|
|
19912
19911
|
const key = component.schema || component.blockType;
|
|
19913
|
-
const Component = modules[key] ||
|
|
19912
|
+
const Component = modules[key] || modules['not_found'];
|
|
19914
19913
|
return jsxRuntime.jsx(Component, {
|
|
19915
19914
|
item: component,
|
|
19916
19915
|
index: index
|
|
@@ -19919,18 +19918,20 @@ const lazyLoadComponent = function (component, modules, index) {
|
|
|
19919
19918
|
const LazyLoader = _ref => {
|
|
19920
19919
|
let {
|
|
19921
19920
|
components,
|
|
19922
|
-
modules
|
|
19921
|
+
modules,
|
|
19923
19922
|
initialIndex = 0
|
|
19924
19923
|
} = _ref;
|
|
19924
|
+
const lazyModules = bomMixerHooks.useLazyModules();
|
|
19925
19925
|
if (!components) {
|
|
19926
19926
|
return null;
|
|
19927
19927
|
}
|
|
19928
|
+
const subModules = modules || Object.assign(Object.assign({}, LAZY_MODULES), lazyModules);
|
|
19928
19929
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
19929
19930
|
children: components.map((component, index) => jsxRuntime.jsx(React__default.default.Suspense, {
|
|
19930
19931
|
fallback: jsxRuntime.jsx(Skeleton, {
|
|
19931
19932
|
minHeight: "50vh"
|
|
19932
19933
|
}),
|
|
19933
|
-
children: lazyLoadComponent(component,
|
|
19934
|
+
children: lazyLoadComponent(component, subModules, initialIndex + index)
|
|
19934
19935
|
}, index))
|
|
19935
19936
|
});
|
|
19936
19937
|
};
|
|
@@ -20057,6 +20058,7 @@ exports.Icons = Icons;
|
|
|
20057
20058
|
exports.InfiniteLoader = InfiniteLoader;
|
|
20058
20059
|
exports.Input = Input;
|
|
20059
20060
|
exports.InputGroup = InputGroup;
|
|
20061
|
+
exports.LAZY_MODULES = LAZY_MODULES;
|
|
20060
20062
|
exports.Label = Label;
|
|
20061
20063
|
exports.Layout = Layout;
|
|
20062
20064
|
exports.LayoutDefault = LayoutDefault;
|