@redneckz/wildless-cms-uni-blocks 0.14.215 → 0.14.217

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 (81) hide show
  1. package/bundle/bundle.umd.js +10 -11
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/hooks/handlerDecorator.d.ts +1 -1
  4. package/dist/components/ApplicationFormCustom/AddressBranchField.js +3 -4
  5. package/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  6. package/dist/components/ApplicationFormCustom/RegionPremiumField.js +1 -1
  7. package/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  8. package/dist/components/Footer/Footer.mobile.js +3 -1
  9. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  10. package/dist/hooks/handlerDecorator.d.ts +1 -1
  11. package/dist/hooks/handlerDecorator.js +2 -2
  12. package/dist/hooks/handlerDecorator.js.map +1 -1
  13. package/dist/hooks/useLink.js +1 -1
  14. package/dist/hooks/useLink.js.map +1 -1
  15. package/dist/hooks/usePremiumBranchesByRegions.js +1 -1
  16. package/dist/hooks/usePremiumBranchesByRegions.js.map +1 -1
  17. package/dist/hooks/useRegions.js +1 -1
  18. package/dist/hooks/useRegions.js.map +1 -1
  19. package/lib/components/ApplicationFormCustom/AddressBranchField.js +3 -4
  20. package/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  21. package/lib/components/ApplicationFormCustom/RegionPremiumField.js +1 -1
  22. package/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  23. package/lib/components/Footer/Footer.mobile.js +3 -1
  24. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  25. package/lib/hooks/handlerDecorator.d.ts +1 -1
  26. package/lib/hooks/handlerDecorator.js +2 -2
  27. package/lib/hooks/handlerDecorator.js.map +1 -1
  28. package/lib/hooks/useLink.js +1 -1
  29. package/lib/hooks/useLink.js.map +1 -1
  30. package/lib/hooks/usePremiumBranchesByRegions.js +1 -1
  31. package/lib/hooks/usePremiumBranchesByRegions.js.map +1 -1
  32. package/lib/hooks/useRegions.js +1 -1
  33. package/lib/hooks/useRegions.js.map +1 -1
  34. package/mobile/bundle/bundle.umd.js +13 -12
  35. package/mobile/bundle/bundle.umd.min.js +1 -1
  36. package/mobile/bundle/hooks/handlerDecorator.d.ts +1 -1
  37. package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js +3 -4
  38. package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  39. package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js +1 -1
  40. package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  41. package/mobile/dist/components/Footer/Footer.js +3 -1
  42. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  43. package/mobile/dist/hooks/handlerDecorator.d.ts +1 -1
  44. package/mobile/dist/hooks/handlerDecorator.js +2 -2
  45. package/mobile/dist/hooks/handlerDecorator.js.map +1 -1
  46. package/mobile/dist/hooks/useLink.js +1 -1
  47. package/mobile/dist/hooks/useLink.js.map +1 -1
  48. package/mobile/dist/hooks/usePremiumBranchesByRegions.js +1 -1
  49. package/mobile/dist/hooks/usePremiumBranchesByRegions.js.map +1 -1
  50. package/mobile/dist/hooks/useRegions.js +1 -1
  51. package/mobile/dist/hooks/useRegions.js.map +1 -1
  52. package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js +3 -4
  53. package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  54. package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js +1 -1
  55. package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  56. package/mobile/lib/components/Footer/Footer.js +3 -1
  57. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  58. package/mobile/lib/hooks/handlerDecorator.d.ts +1 -1
  59. package/mobile/lib/hooks/handlerDecorator.js +2 -2
  60. package/mobile/lib/hooks/handlerDecorator.js.map +1 -1
  61. package/mobile/lib/hooks/useLink.js +1 -1
  62. package/mobile/lib/hooks/useLink.js.map +1 -1
  63. package/mobile/lib/hooks/usePremiumBranchesByRegions.js +1 -1
  64. package/mobile/lib/hooks/usePremiumBranchesByRegions.js.map +1 -1
  65. package/mobile/lib/hooks/useRegions.js +1 -1
  66. package/mobile/lib/hooks/useRegions.js.map +1 -1
  67. package/mobile/src/components/ApplicationFormCustom/AddressBranchField.tsx +3 -4
  68. package/mobile/src/components/ApplicationFormCustom/RegionPremiumField.tsx +1 -1
  69. package/mobile/src/components/Footer/Footer.tsx +13 -11
  70. package/mobile/src/hooks/handlerDecorator.ts +3 -3
  71. package/mobile/src/hooks/useLink.ts +1 -1
  72. package/mobile/src/hooks/usePremiumBranchesByRegions.ts +1 -1
  73. package/mobile/src/hooks/useRegions.ts +1 -1
  74. package/package.json +1 -1
  75. package/src/components/ApplicationFormCustom/AddressBranchField.tsx +3 -4
  76. package/src/components/ApplicationFormCustom/RegionPremiumField.tsx +1 -1
  77. package/src/components/Footer/Footer.mobile.tsx +13 -11
  78. package/src/hooks/handlerDecorator.ts +3 -3
  79. package/src/hooks/useLink.ts +1 -1
  80. package/src/hooks/usePremiumBranchesByRegions.ts +1 -1
  81. package/src/hooks/useRegions.ts +1 -1
@@ -434,8 +434,8 @@
434
434
  });
435
435
 
436
436
  /* eslint-disable @typescript-eslint/ban-types */
437
- const handlerDecorator = (handler, targetContent) => {
438
- return handlerDecorator._impl(handler, targetContent);
437
+ const handlerDecorator = (handler) => {
438
+ return handlerDecorator._impl(handler);
439
439
  };
440
440
  handlerDecorator._impl = (handler) => handler;
441
441
  handlerDecorator.setup = (impl) => {
@@ -450,7 +450,7 @@
450
450
  ...props,
451
451
  href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
452
452
  'aria-label': props.text,
453
- onClick: handlerDecorator(handleHref(props), props),
453
+ onClick: handlerDecorator(handleHref(props)),
454
454
  });
455
455
  function handleHref({ href, target, onClick }) {
456
456
  return (ev) => {
@@ -1323,7 +1323,7 @@
1323
1323
  const REGIONS_URL$1 = '/api/v1/premiumBranchesByRegions';
1324
1324
  function usePremiumBranchesByRegions() {
1325
1325
  const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
1326
- return data || [];
1326
+ return Array.isArray(data) ? data : [];
1327
1327
  }
1328
1328
 
1329
1329
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
@@ -1489,7 +1489,7 @@
1489
1489
  const REGIONS_URL = '/api/v1/regions';
1490
1490
  function useRegions() {
1491
1491
  const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
1492
- return data || [];
1492
+ return Array.isArray(data) ? data : [];
1493
1493
  }
1494
1494
 
1495
1495
  const RegionField = JSX(({ field, input }) => {
@@ -1502,7 +1502,7 @@
1502
1502
  const regions = useMemo(() => branchByRegions?.map(({ region }) => ({
1503
1503
  key: region,
1504
1504
  text: region,
1505
- })), []);
1505
+ })), [branchByRegions]);
1506
1506
  return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions, ...getValidation(field('region'), validatorObj.region, input?.required) }));
1507
1507
  });
1508
1508
 
@@ -1553,12 +1553,11 @@
1553
1553
  const addressBranch = isPremium
1554
1554
  ? usePremiumBranchesByRegions()?.find((_) => _?.region === regionKey)?.branches
1555
1555
  : useBranches(regionKey)?.filter((branch) => branch?.address);
1556
- const { value, onChange } = field?.('addressBranch') || {};
1557
1556
  useEffect(() => {
1558
- if (value?.key !== '') {
1559
- onChange?.('');
1557
+ if (field('region')?.value?.key !== '') {
1558
+ field?.('addressBranch')?.onChange?.('');
1560
1559
  }
1561
- }, [value]);
1560
+ }, [field('region')?.value]);
1562
1561
  return (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: (addressBranch || []).map(({ address = '' }) => ({
1563
1562
  key: address,
1564
1563
  text: address,
@@ -5962,7 +5961,7 @@
5962
5961
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5963
5962
  });
5964
5963
 
5965
- const packageVersion = "0.14.214";
5964
+ const packageVersion = "0.14.216";
5966
5965
 
5967
5966
  exports.Blocks = Blocks;
5968
5967
  exports.ContentPage = ContentPage;