@redneckz/wildless-cms-uni-blocks 0.14.218 → 0.14.219
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 +4 -3
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/hooks/useLocation.d.ts +1 -0
- package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/dist/hooks/useLocation.d.ts +1 -0
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +1 -0
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +4 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/hooks/useLocation.d.ts +1 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/dist/hooks/useLocation.d.ts +1 -0
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +1 -0
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/src/hooks/useLocation.ts +1 -0
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
- package/package.json +1 -1
- package/src/hooks/useLocation.ts +1 -0
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
package/bundle/bundle.umd.js
CHANGED
|
@@ -4127,7 +4127,7 @@
|
|
|
4127
4127
|
});
|
|
4128
4128
|
|
|
4129
4129
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4130
|
-
const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
|
|
4130
|
+
const LocationDialog = JSX(({ foreignOffices, defaultLocation, officesLink }) => {
|
|
4131
4131
|
const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
|
|
4132
4132
|
const [query, setQuery] = useState('');
|
|
4133
4133
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -4137,7 +4137,8 @@
|
|
|
4137
4137
|
selectCurrentLocation(region);
|
|
4138
4138
|
close();
|
|
4139
4139
|
}, []);
|
|
4140
|
-
|
|
4140
|
+
const currentOfficeHref = `${officesLink}/${currentLocation.slug}`;
|
|
4141
|
+
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 ? (jsxs("div", { className: "mb-s", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx(LinkButton, { href: currentOfficeHref, onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "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
|
|
4141
4142
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4142
4143
|
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
4143
4144
|
});
|
|
@@ -6010,7 +6011,7 @@
|
|
|
6010
6011
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6011
6012
|
});
|
|
6012
6013
|
|
|
6013
|
-
const packageVersion = "0.14.
|
|
6014
|
+
const packageVersion = "0.14.218";
|
|
6014
6015
|
|
|
6015
6016
|
exports.Blocks = Blocks;
|
|
6016
6017
|
exports.ContentPage = ContentPage;
|