@redneckz/wildless-cms-uni-blocks 0.14.231 → 0.14.232
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/EventBus/defaultEventBus.d.ts +2 -2
- package/bundle/bundle.umd.js +8 -8
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/bundle/hooks/useLocation.d.ts +2 -7
- package/bundle/hooks/useRegions.d.ts +1 -0
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/dist/EventBus/defaultEventBus.d.ts +2 -2
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/hooks/useLocation.d.ts +2 -7
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/hooks/useRegions.d.ts +1 -0
- package/dist/hooks/useRegions.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +2 -2
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +2 -7
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/hooks/useRegions.d.ts +1 -0
- package/lib/hooks/useRegions.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +8 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/bundle/hooks/useLocation.d.ts +2 -7
- package/mobile/bundle/hooks/useRegions.d.ts +1 -0
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/dist/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/hooks/useLocation.d.ts +2 -7
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/hooks/useRegions.d.ts +1 -0
- package/mobile/dist/hooks/useRegions.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +2 -7
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/hooks/useRegions.d.ts +1 -0
- package/mobile/lib/hooks/useRegions.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/src/EventBus/defaultEventBus.ts +2 -2
- package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -2
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/mobile/src/hooks/useLocation.ts +6 -13
- package/mobile/src/hooks/useRegions.ts +1 -0
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -2
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +9 -8
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +16 -15
- package/package.json +1 -1
- package/src/EventBus/defaultEventBus.ts +2 -2
- package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -2
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/src/hooks/useLocation.ts +6 -13
- package/src/hooks/useRegions.ts +1 -0
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -2
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +9 -8
- package/src/ui-kit/LocationDialog/renderRegion.tsx +16 -15
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type TabActivationEvent } from '../components/Tabs/TabActivationEvent';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Region } from '../hooks/useRegions';
|
|
3
3
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
4
4
|
import { type PopupAction } from '../ui-kit/PopupManager/PopupAction';
|
|
5
5
|
import { EventBus } from './EventBus';
|
|
6
6
|
interface GlobalEventMap {
|
|
7
|
-
location:
|
|
7
|
+
location: Region;
|
|
8
8
|
dialog: DialogAction;
|
|
9
9
|
popup: PopupAction;
|
|
10
10
|
tab: TabActivationEvent;
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -3069,9 +3069,9 @@
|
|
|
3069
3069
|
.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
3070
3070
|
};
|
|
3071
3071
|
|
|
3072
|
-
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
3072
|
+
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, onClick, children }) => {
|
|
3073
3073
|
const link = useLink({ isRemote });
|
|
3074
|
-
const linkProps = link({ href, target });
|
|
3074
|
+
const linkProps = link({ href, target, onClick });
|
|
3075
3075
|
const Tag = href ? 'a' : 'div';
|
|
3076
3076
|
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), role: href ? 'link' : 'none', children: children }));
|
|
3077
3077
|
});
|
|
@@ -4106,9 +4106,9 @@
|
|
|
4106
4106
|
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
4107
4107
|
});
|
|
4108
4108
|
|
|
4109
|
-
const renderRegion = (onChangeLocation) => (region) => (jsx(
|
|
4110
|
-
|
|
4111
|
-
|
|
4109
|
+
const renderRegion = (onChangeLocation) => (region) => region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
4110
|
+
onChangeLocation && onChangeLocation(region);
|
|
4111
|
+
}, children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4112
4112
|
|
|
4113
4113
|
const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
|
|
4114
4114
|
|
|
@@ -4120,7 +4120,7 @@
|
|
|
4120
4120
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4121
4121
|
const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
|
|
4122
4122
|
const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
|
|
4123
|
-
const link = useLink({ isRemote: true
|
|
4123
|
+
const link = useLink({ isRemote: true });
|
|
4124
4124
|
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
4125
4125
|
const [query, setQuery] = useState('');
|
|
4126
4126
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -4130,7 +4130,7 @@
|
|
|
4130
4130
|
selectCurrentLocation(region);
|
|
4131
4131
|
close();
|
|
4132
4132
|
}, []);
|
|
4133
|
-
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (
|
|
4133
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { isRemote: true, href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4134
4134
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4135
4135
|
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
4136
4136
|
});
|
|
@@ -6005,7 +6005,7 @@
|
|
|
6005
6005
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6006
6006
|
});
|
|
6007
6007
|
|
|
6008
|
-
const packageVersion = "0.14.
|
|
6008
|
+
const packageVersion = "0.14.231";
|
|
6009
6009
|
|
|
6010
6010
|
exports.Blocks = Blocks;
|
|
6011
6011
|
exports.ContentPage = ContentPage;
|