@redneckz/wildless-cms-uni-blocks 0.14.210 → 0.14.212

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 (41) hide show
  1. package/bundle/bundle.umd.js +9 -9
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  4. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  5. package/dist/components/SafeDepositRental/utils.js +1 -1
  6. package/dist/components/SafeDepositRental/utils.js.map +1 -1
  7. package/dist/ui-kit/Pagination/PaginationContainer.js +2 -2
  8. package/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  9. package/dist/ui-kit/Pagination/shouldRenderPage.js +4 -4
  10. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  11. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  12. package/lib/components/SafeDepositRental/utils.js +1 -1
  13. package/lib/components/SafeDepositRental/utils.js.map +1 -1
  14. package/lib/ui-kit/Pagination/PaginationContainer.js +2 -2
  15. package/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  16. package/lib/ui-kit/Pagination/shouldRenderPage.js +4 -4
  17. package/mobile/bundle/bundle.umd.js +3 -3
  18. package/mobile/bundle/bundle.umd.min.js +1 -1
  19. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  20. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  21. package/mobile/dist/components/SafeDepositRental/utils.js +1 -1
  22. package/mobile/dist/components/SafeDepositRental/utils.js.map +1 -1
  23. package/mobile/dist/ui-kit/Pagination/PaginationContainer.js +2 -2
  24. package/mobile/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  25. package/mobile/dist/ui-kit/Pagination/shouldRenderPage.js +4 -4
  26. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  27. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  28. package/mobile/lib/components/SafeDepositRental/utils.js +1 -1
  29. package/mobile/lib/components/SafeDepositRental/utils.js.map +1 -1
  30. package/mobile/lib/ui-kit/Pagination/PaginationContainer.js +2 -2
  31. package/mobile/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -1
  32. package/mobile/lib/ui-kit/Pagination/shouldRenderPage.js +4 -4
  33. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  34. package/mobile/src/components/SafeDepositRental/utils.ts +1 -1
  35. package/mobile/src/ui-kit/Pagination/PaginationContainer.tsx +4 -4
  36. package/mobile/src/ui-kit/Pagination/shouldRenderPage.ts +4 -4
  37. package/package.json +1 -1
  38. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  39. package/src/components/SafeDepositRental/utils.ts +1 -1
  40. package/src/ui-kit/Pagination/PaginationContainer.tsx +4 -4
  41. package/src/ui-kit/Pagination/shouldRenderPage.ts +4 -4
@@ -3554,10 +3554,10 @@
3554
3554
 
3555
3555
  const paginationBlockStyle = 'py-m px-lg rounded-md cursor-pointer hover:bg-primary-hover hover:text-white';
3556
3556
 
3557
- const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 3 && page <= currentPage + 3) ||
3558
- (currentPage >= totalPages - 1 && page >= totalPages - 4);
3559
- const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 2) ||
3560
- (page <= currentPage + 2 && page > currentPage) ||
3557
+ const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 2 && page <= currentPage + 2) ||
3558
+ (currentPage >= totalPages - 1 && page >= totalPages - 3);
3559
+ const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 1) ||
3560
+ (page <= currentPage + 1 && page > currentPage) ||
3561
3561
  checkPageRange(page, currentPage, totalPages);
3562
3562
 
3563
3563
  const renderPages = (pagesParams, index) => {
@@ -3585,13 +3585,13 @@
3585
3585
  }
3586
3586
  }, [currentPage]);
3587
3587
  const handleNextPage = useCallback(() => {
3588
- if (currentPage < totalPages - 1) {
3588
+ if (currentPage < totalPages) {
3589
3589
  onPageChange(currentPage + 1);
3590
3590
  }
3591
3591
  }, [currentPage, totalPages]);
3592
3592
  const handleFirstPage = useCallback(() => onPageChange(1), []);
3593
3593
  const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
3594
- return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE$1 }) }), jsxs("div", { className: "flex gap-xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 4 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 3 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE$1 }) })] }));
3594
+ return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE$1 }) }), jsxs("div", { className: "flex gap-2xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 3 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 2 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE$1 }) })] }));
3595
3595
  };
3596
3596
  const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
3597
3597
 
@@ -4882,7 +4882,7 @@
4882
4882
  const _filteredItems = filterItems(data, filtrationState);
4883
4883
  const _points = _filteredItems
4884
4884
  .map((_) => ({
4885
- coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)].filter(Boolean),
4885
+ coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]?.filter(Boolean),
4886
4886
  content: getBalloon(_),
4887
4887
  }))
4888
4888
  .filter((_) => _.coords && _.coords.length === 2);
@@ -5326,7 +5326,7 @@
5326
5326
  if (Array.isArray(data)) {
5327
5327
  return data
5328
5328
  .map((_) => ({
5329
- coords: [_.gpsLatitude, _.gpsLongitude].filter(Boolean),
5329
+ coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]?.filter(Boolean),
5330
5330
  }))
5331
5331
  .filter((_) => _.coords && _.coords.length === 2);
5332
5332
  }
@@ -6054,7 +6054,7 @@
6054
6054
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6055
6055
  });
6056
6056
 
6057
- const packageVersion = "0.14.209";
6057
+ const packageVersion = "0.14.211";
6058
6058
 
6059
6059
  exports.Blocks = Blocks;
6060
6060
  exports.ContentPage = ContentPage;