@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @websolutespa/bom-mixer-ui
2
2
 
3
+ ## 1.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Modified LazyLoader.
8
+
3
9
  ## 1.4.0
4
10
 
5
11
  ### Minor Changes
package/dist/cjs/index.js CHANGED
@@ -19551,7 +19551,7 @@ const NotFound = _ref => {
19551
19551
  });
19552
19552
  };
19553
19553
  const NotFoundExport = {
19554
- 'not-found': dynamic__default.default(() => Promise.resolve().then(function () { return notFound; }).then(module => module.NotFound))
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] || LAZY_MODULES['not-found'];
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 = LAZY_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, modules, initialIndex + index)
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;