@redneckz/wildless-cms-uni-blocks 0.14.123 → 0.14.125

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.
Files changed (111) hide show
  1. package/bundle/bundle.umd.js +9 -7
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Header/Header.fallback.d.ts +2 -1
  4. package/bundle/hooks/fallbackWCMSResource.d.ts +1 -1
  5. package/bundle/hooks/useSWRResource.d.ts +1 -2
  6. package/bundle/model/ContentPageDef.d.ts +2 -2
  7. package/dist/components/ContentPage/ContentPage.js +1 -1
  8. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  9. package/dist/components/Header/Header.fallback.d.ts +2 -1
  10. package/dist/components/Header/Header.fallback.js +4 -1
  11. package/dist/components/Header/Header.fallback.js.map +1 -1
  12. package/dist/components/Header/Header.js +5 -1
  13. package/dist/components/Header/Header.js.map +1 -1
  14. package/dist/components/Header/Header.mobile.js +5 -1
  15. package/dist/components/Header/Header.mobile.js.map +1 -1
  16. package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
  17. package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
  18. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +6 -1
  19. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  20. package/dist/hooks/fallbackWCMSResource.d.ts +1 -1
  21. package/dist/hooks/fallbackWCMSResource.js +3 -2
  22. package/dist/hooks/fallbackWCMSResource.js.map +1 -1
  23. package/dist/hooks/useSWRResource.d.ts +1 -2
  24. package/dist/hooks/useSWRResource.js +3 -6
  25. package/dist/hooks/useSWRResource.js.map +1 -1
  26. package/dist/model/ContentPageDef.d.ts +2 -2
  27. package/lib/common.css +1 -1
  28. package/lib/components/ContentPage/ContentPage.js +1 -1
  29. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  30. package/lib/components/Header/Header.fallback.d.ts +2 -1
  31. package/lib/components/Header/Header.fallback.js +4 -1
  32. package/lib/components/Header/Header.fallback.js.map +1 -1
  33. package/lib/components/Header/Header.js +5 -1
  34. package/lib/components/Header/Header.js.map +1 -1
  35. package/lib/components/Header/Header.mobile.js +5 -1
  36. package/lib/components/Header/Header.mobile.js.map +1 -1
  37. package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
  38. package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
  39. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +6 -1
  40. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  41. package/lib/hooks/fallbackWCMSResource.d.ts +1 -1
  42. package/lib/hooks/fallbackWCMSResource.js +3 -2
  43. package/lib/hooks/fallbackWCMSResource.js.map +1 -1
  44. package/lib/hooks/useSWRResource.d.ts +1 -2
  45. package/lib/hooks/useSWRResource.js +3 -6
  46. package/lib/hooks/useSWRResource.js.map +1 -1
  47. package/lib/model/ContentPageDef.d.ts +2 -2
  48. package/mobile/bundle/bundle.umd.js +14 -8
  49. package/mobile/bundle/bundle.umd.min.js +1 -1
  50. package/mobile/bundle/components/Header/Header.fallback.d.ts +2 -1
  51. package/mobile/bundle/hooks/fallbackWCMSResource.d.ts +1 -1
  52. package/mobile/bundle/hooks/useSWRResource.d.ts +1 -2
  53. package/mobile/bundle/model/ContentPageDef.d.ts +2 -2
  54. package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
  55. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  56. package/mobile/dist/components/Header/Header.fallback.d.ts +2 -1
  57. package/mobile/dist/components/Header/Header.fallback.js +4 -1
  58. package/mobile/dist/components/Header/Header.fallback.js.map +1 -1
  59. package/mobile/dist/components/Header/Header.js +5 -1
  60. package/mobile/dist/components/Header/Header.js.map +1 -1
  61. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
  62. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
  63. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +6 -1
  64. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  65. package/mobile/dist/hooks/fallbackWCMSResource.d.ts +1 -1
  66. package/mobile/dist/hooks/fallbackWCMSResource.js +3 -2
  67. package/mobile/dist/hooks/fallbackWCMSResource.js.map +1 -1
  68. package/mobile/dist/hooks/useSWRResource.d.ts +1 -2
  69. package/mobile/dist/hooks/useSWRResource.js +3 -6
  70. package/mobile/dist/hooks/useSWRResource.js.map +1 -1
  71. package/mobile/dist/model/ContentPageDef.d.ts +2 -2
  72. package/mobile/lib/common.css +1 -1
  73. package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
  74. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  75. package/mobile/lib/components/Header/Header.fallback.d.ts +2 -1
  76. package/mobile/lib/components/Header/Header.fallback.js +4 -1
  77. package/mobile/lib/components/Header/Header.fallback.js.map +1 -1
  78. package/mobile/lib/components/Header/Header.js +5 -1
  79. package/mobile/lib/components/Header/Header.js.map +1 -1
  80. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
  81. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
  82. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +6 -1
  83. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  84. package/mobile/lib/hooks/fallbackWCMSResource.d.ts +1 -1
  85. package/mobile/lib/hooks/fallbackWCMSResource.js +3 -2
  86. package/mobile/lib/hooks/fallbackWCMSResource.js.map +1 -1
  87. package/mobile/lib/hooks/useSWRResource.d.ts +1 -2
  88. package/mobile/lib/hooks/useSWRResource.js +3 -6
  89. package/mobile/lib/hooks/useSWRResource.js.map +1 -1
  90. package/mobile/lib/model/ContentPageDef.d.ts +2 -2
  91. package/mobile/src/common.css +22 -8
  92. package/mobile/src/components/ContentPage/ContentPage.tsx +1 -1
  93. package/mobile/src/components/Header/Header.fallback.ts +10 -1
  94. package/mobile/src/components/Header/Header.tsx +5 -1
  95. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.fallback.ts +1 -0
  96. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +7 -4
  97. package/mobile/src/hooks/fallbackWCMSResource.ts +3 -1
  98. package/mobile/src/hooks/useSWRResource.ts +4 -14
  99. package/mobile/src/model/ContentPageDef.ts +2 -2
  100. package/package.json +1 -1
  101. package/src/common.css +22 -8
  102. package/src/components/ContentPage/ContentPage.tsx +1 -1
  103. package/src/components/Header/Header.fallback.ts +10 -1
  104. package/src/components/Header/Header.mobile.tsx +5 -1
  105. package/src/components/Header/Header.tsx +5 -1
  106. package/src/components/StickyBottomMenu/StickyBottomMenu.fallback.ts +1 -0
  107. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +7 -4
  108. package/src/hooks/fallbackWCMSResource.ts +3 -1
  109. package/src/hooks/useSWRResource.ts +4 -14
  110. package/src/model/ContentPageDef.ts +2 -2
  111. package/tailwind.config.cjs +2 -2
@@ -855,11 +855,10 @@
855
855
  };
856
856
 
857
857
  const EMPTY_VALUE$5 = {};
858
- const DEFAULT_FOLDER_NAME = 'wcms-resources';
858
+ const DEFAULT_PATH_DIR = '/wcms-resources';
859
859
  function useSWRResource(filename, options = {}) {
860
- const { fallback = EMPTY_VALUE$5, folderName = DEFAULT_FOLDER_NAME, setBasePath = false } = options;
861
- const path = joinPath('/', setBasePath ? projectSettings.BASE_PATH : '', folderName, `${filename}.json`);
862
- const { data } = useAsyncData(filename ? path : null, fetchJSONUnsafe, {
860
+ const { fallback = EMPTY_VALUE$5, pathDir = DEFAULT_PATH_DIR } = options;
861
+ const { data } = useAsyncData(filename ? `${pathDir}/${filename}.json` : null, fetchJSONUnsafe, {
863
862
  fallback,
864
863
  });
865
864
  return data || EMPTY_VALUE$5;
@@ -4279,7 +4278,10 @@
4279
4278
  const Header = JSX(({ className, bgColor = 'bg-white', version = BG_COLOR_TO_BLOCK_VERSION[bgColor], ...rest }) => {
4280
4279
  const { topItems, logo, officesLink, defaultLocation } = useSitemap(rest.options?.page?.fallback);
4281
4280
  const [, activeTopItem] = useActiveRoute(topItems);
4282
- const { internetBankUrl } = useSWRResource(projectSettings.PORTAL_DATA || 'portal-data', { folderName: 'portal-resources', setBasePath: true });
4281
+ const { internetBankUrl } = useSWRResource(projectSettings.PORTAL_DATA || 'portal-data', {
4282
+ fallback: rest.options?.page?.fallback,
4283
+ pathDir: joinPath(projectSettings.BASE_PATH, 'portal-resources'),
4284
+ });
4283
4285
  return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: logo }), topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", officesLink: officesLink, defaultLocation: defaultLocation })] }), jsx("div", { className: style('mt-xl h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, version: version, internetBankUrl: internetBankUrl })) : null] }) }));
4284
4286
  });
4285
4287
 
@@ -5790,7 +5792,7 @@
5790
5792
  blockDecorator,
5791
5793
  parent: data,
5792
5794
  };
5793
- return (jsxs("div", { "data-theme": colorPalette, children: [jsxs("section", { className: style('@container relative', pageStyle, className), children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(StickyBottomMenu, {}), jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
5795
+ return (jsxs("div", { "data-theme": colorPalette, children: [jsxs("section", { className: style('@container relative', pageStyle, className), children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(StickyBottomMenu, { options: options }), jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
5794
5796
  });
5795
5797
  ContentPage.childrenTypes = [];
5796
5798
  ContentPage.slots = () => ['header', 'footer', 'StickyBottomMenu'];
@@ -5798,7 +5800,7 @@
5798
5800
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
5799
5801
  }
5800
5802
 
5801
- const packageVersion = "0.14.122";
5803
+ const packageVersion = "0.14.124";
5802
5804
 
5803
5805
  exports.Blocks = Blocks;
5804
5806
  exports.ContentPage = ContentPage;