@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.
- package/bundle/bundle.umd.js +9 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/Header.fallback.d.ts +2 -1
- package/bundle/hooks/fallbackWCMSResource.d.ts +1 -1
- package/bundle/hooks/useSWRResource.d.ts +1 -2
- package/bundle/model/ContentPageDef.d.ts +2 -2
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Header/Header.fallback.d.ts +2 -1
- package/dist/components/Header/Header.fallback.js +4 -1
- package/dist/components/Header/Header.fallback.js.map +1 -1
- package/dist/components/Header/Header.js +5 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +5 -1
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +6 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/hooks/fallbackWCMSResource.d.ts +1 -1
- package/dist/hooks/fallbackWCMSResource.js +3 -2
- package/dist/hooks/fallbackWCMSResource.js.map +1 -1
- package/dist/hooks/useSWRResource.d.ts +1 -2
- package/dist/hooks/useSWRResource.js +3 -6
- package/dist/hooks/useSWRResource.js.map +1 -1
- package/dist/model/ContentPageDef.d.ts +2 -2
- package/lib/common.css +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Header/Header.fallback.d.ts +2 -1
- package/lib/components/Header/Header.fallback.js +4 -1
- package/lib/components/Header/Header.fallback.js.map +1 -1
- package/lib/components/Header/Header.js +5 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +5 -1
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +6 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/hooks/fallbackWCMSResource.d.ts +1 -1
- package/lib/hooks/fallbackWCMSResource.js +3 -2
- package/lib/hooks/fallbackWCMSResource.js.map +1 -1
- package/lib/hooks/useSWRResource.d.ts +1 -2
- package/lib/hooks/useSWRResource.js +3 -6
- package/lib/hooks/useSWRResource.js.map +1 -1
- package/lib/model/ContentPageDef.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +14 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/Header.fallback.d.ts +2 -1
- package/mobile/bundle/hooks/fallbackWCMSResource.d.ts +1 -1
- package/mobile/bundle/hooks/useSWRResource.d.ts +1 -2
- package/mobile/bundle/model/ContentPageDef.d.ts +2 -2
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Header/Header.fallback.d.ts +2 -1
- package/mobile/dist/components/Header/Header.fallback.js +4 -1
- package/mobile/dist/components/Header/Header.fallback.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +5 -1
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +6 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/hooks/fallbackWCMSResource.d.ts +1 -1
- package/mobile/dist/hooks/fallbackWCMSResource.js +3 -2
- package/mobile/dist/hooks/fallbackWCMSResource.js.map +1 -1
- package/mobile/dist/hooks/useSWRResource.d.ts +1 -2
- package/mobile/dist/hooks/useSWRResource.js +3 -6
- package/mobile/dist/hooks/useSWRResource.js.map +1 -1
- package/mobile/dist/model/ContentPageDef.d.ts +2 -2
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Header/Header.fallback.d.ts +2 -1
- package/mobile/lib/components/Header/Header.fallback.js +4 -1
- package/mobile/lib/components/Header/Header.fallback.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +5 -1
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +6 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/hooks/fallbackWCMSResource.d.ts +1 -1
- package/mobile/lib/hooks/fallbackWCMSResource.js +3 -2
- package/mobile/lib/hooks/fallbackWCMSResource.js.map +1 -1
- package/mobile/lib/hooks/useSWRResource.d.ts +1 -2
- package/mobile/lib/hooks/useSWRResource.js +3 -6
- package/mobile/lib/hooks/useSWRResource.js.map +1 -1
- package/mobile/lib/model/ContentPageDef.d.ts +2 -2
- package/mobile/src/common.css +22 -8
- package/mobile/src/components/ContentPage/ContentPage.tsx +1 -1
- package/mobile/src/components/Header/Header.fallback.ts +10 -1
- package/mobile/src/components/Header/Header.tsx +5 -1
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.fallback.ts +1 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +7 -4
- package/mobile/src/hooks/fallbackWCMSResource.ts +3 -1
- package/mobile/src/hooks/useSWRResource.ts +4 -14
- package/mobile/src/model/ContentPageDef.ts +2 -2
- package/package.json +1 -1
- package/src/common.css +22 -8
- package/src/components/ContentPage/ContentPage.tsx +1 -1
- package/src/components/Header/Header.fallback.ts +10 -1
- package/src/components/Header/Header.mobile.tsx +5 -1
- package/src/components/Header/Header.tsx +5 -1
- package/src/components/StickyBottomMenu/StickyBottomMenu.fallback.ts +1 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +7 -4
- package/src/hooks/fallbackWCMSResource.ts +3 -1
- package/src/hooks/useSWRResource.ts +4 -14
- package/src/model/ContentPageDef.ts +2 -2
- package/tailwind.config.cjs +2 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -855,11 +855,10 @@
|
|
|
855
855
|
};
|
|
856
856
|
|
|
857
857
|
const EMPTY_VALUE$5 = {};
|
|
858
|
-
const
|
|
858
|
+
const DEFAULT_PATH_DIR = '/wcms-resources';
|
|
859
859
|
function useSWRResource(filename, options = {}) {
|
|
860
|
-
const { fallback = EMPTY_VALUE$5,
|
|
861
|
-
const
|
|
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', {
|
|
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.
|
|
5803
|
+
const packageVersion = "0.14.124";
|
|
5802
5804
|
|
|
5803
5805
|
exports.Blocks = Blocks;
|
|
5804
5806
|
exports.ContentPage = ContentPage;
|