@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.
Files changed (33) hide show
  1. package/bundle/bundle.umd.js +4 -3
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/hooks/useLocation.d.ts +1 -0
  4. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  5. package/dist/hooks/useLocation.d.ts +1 -0
  6. package/dist/hooks/useLocation.js.map +1 -1
  7. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  8. package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
  9. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  10. package/lib/hooks/useLocation.d.ts +1 -0
  11. package/lib/hooks/useLocation.js.map +1 -1
  12. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  13. package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
  14. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  15. package/mobile/bundle/bundle.umd.js +4 -3
  16. package/mobile/bundle/bundle.umd.min.js +1 -1
  17. package/mobile/bundle/hooks/useLocation.d.ts +1 -0
  18. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  19. package/mobile/dist/hooks/useLocation.d.ts +1 -0
  20. package/mobile/dist/hooks/useLocation.js.map +1 -1
  21. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  22. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
  23. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  24. package/mobile/lib/hooks/useLocation.d.ts +1 -0
  25. package/mobile/lib/hooks/useLocation.js.map +1 -1
  26. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
  27. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
  28. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  29. package/mobile/src/hooks/useLocation.ts +1 -0
  30. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
  31. package/package.json +1 -1
  32. package/src/hooks/useLocation.ts +1 -0
  33. package/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
@@ -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
- 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("button", { type: "button", 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
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.217";
6014
+ const packageVersion = "0.14.218";
6014
6015
 
6015
6016
  exports.Blocks = Blocks;
6016
6017
  exports.ContentPage = ContentPage;