@redneckz/wildless-cms-uni-blocks 0.14.159 → 0.14.161

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 (123) hide show
  1. package/bundle/bundle.umd.js +17 -16
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/DepositFiltration/SourceItem.d.ts +4 -0
  4. package/bundle/components/DepositFiltration/getPeriod.d.ts +1 -6
  5. package/bundle/components/DepositFiltration/isRateRow.d.ts +5 -0
  6. package/bundle/components/DepositFiltration/numberRange.d.ts +1 -0
  7. package/bundle/components/DepositFiltration/useDepositsPeriods.d.ts +1 -1
  8. package/cosmos-static/icons/SmallClockIcon.svg +1 -1
  9. package/cosmos-static/icons/sprites.svg +1 -1
  10. package/dist/components/DepositFiltration/SourceItem.d.ts +4 -0
  11. package/dist/components/DepositFiltration/SourceItem.js +2 -0
  12. package/dist/components/DepositFiltration/SourceItem.js.map +1 -0
  13. package/dist/components/DepositFiltration/getPeriod.d.ts +1 -6
  14. package/dist/components/DepositFiltration/getPeriod.js +6 -8
  15. package/dist/components/DepositFiltration/getPeriod.js.map +1 -1
  16. package/dist/components/DepositFiltration/isRateRow.d.ts +5 -0
  17. package/dist/components/DepositFiltration/isRateRow.js +7 -0
  18. package/dist/components/DepositFiltration/isRateRow.js.map +1 -0
  19. package/dist/components/DepositFiltration/numberRange.d.ts +1 -0
  20. package/dist/components/DepositFiltration/numberRange.js +5 -0
  21. package/dist/components/DepositFiltration/numberRange.js.map +1 -0
  22. package/dist/components/DepositFiltration/useDepositsPeriods.d.ts +1 -1
  23. package/dist/components/DepositFiltration/useDepositsPeriods.js +4 -2
  24. package/dist/components/DepositFiltration/useDepositsPeriods.js.map +1 -1
  25. package/dist/components/OfficesAtmsMap/Badge.js +2 -1
  26. package/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
  27. package/dist/components/OfficesAtmsMap/CardCell.js +1 -1
  28. package/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
  29. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  30. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  31. package/lib/common.css +1 -1
  32. package/lib/components/DepositFiltration/SourceItem.d.ts +4 -0
  33. package/lib/components/DepositFiltration/SourceItem.js +2 -0
  34. package/lib/components/DepositFiltration/SourceItem.js.map +1 -0
  35. package/lib/components/DepositFiltration/getPeriod.d.ts +1 -6
  36. package/lib/components/DepositFiltration/getPeriod.js +6 -8
  37. package/lib/components/DepositFiltration/getPeriod.js.map +1 -1
  38. package/lib/components/DepositFiltration/isRateRow.d.ts +5 -0
  39. package/lib/components/DepositFiltration/isRateRow.js +4 -0
  40. package/lib/components/DepositFiltration/isRateRow.js.map +1 -0
  41. package/lib/components/DepositFiltration/numberRange.d.ts +1 -0
  42. package/lib/components/DepositFiltration/numberRange.js +2 -0
  43. package/lib/components/DepositFiltration/numberRange.js.map +1 -0
  44. package/lib/components/DepositFiltration/useDepositsPeriods.d.ts +1 -1
  45. package/lib/components/DepositFiltration/useDepositsPeriods.js +4 -2
  46. package/lib/components/DepositFiltration/useDepositsPeriods.js.map +1 -1
  47. package/lib/components/OfficesAtmsMap/Badge.js +3 -2
  48. package/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
  49. package/lib/components/OfficesAtmsMap/CardCell.js +1 -1
  50. package/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
  51. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  52. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  53. package/mobile/bundle/bundle.umd.js +17 -16
  54. package/mobile/bundle/bundle.umd.min.js +1 -1
  55. package/mobile/bundle/components/DepositFiltration/SourceItem.d.ts +4 -0
  56. package/mobile/bundle/components/DepositFiltration/getPeriod.d.ts +1 -6
  57. package/mobile/bundle/components/DepositFiltration/isRateRow.d.ts +5 -0
  58. package/mobile/bundle/components/DepositFiltration/numberRange.d.ts +1 -0
  59. package/mobile/bundle/components/DepositFiltration/useDepositsPeriods.d.ts +1 -1
  60. package/mobile/dist/components/DepositFiltration/SourceItem.d.ts +4 -0
  61. package/mobile/dist/components/DepositFiltration/SourceItem.js +2 -0
  62. package/mobile/dist/components/DepositFiltration/SourceItem.js.map +1 -0
  63. package/mobile/dist/components/DepositFiltration/getPeriod.d.ts +1 -6
  64. package/mobile/dist/components/DepositFiltration/getPeriod.js +6 -8
  65. package/mobile/dist/components/DepositFiltration/getPeriod.js.map +1 -1
  66. package/mobile/dist/components/DepositFiltration/isRateRow.d.ts +5 -0
  67. package/mobile/dist/components/DepositFiltration/isRateRow.js +7 -0
  68. package/mobile/dist/components/DepositFiltration/isRateRow.js.map +1 -0
  69. package/mobile/dist/components/DepositFiltration/numberRange.d.ts +1 -0
  70. package/mobile/dist/components/DepositFiltration/numberRange.js +5 -0
  71. package/mobile/dist/components/DepositFiltration/numberRange.js.map +1 -0
  72. package/mobile/dist/components/DepositFiltration/useDepositsPeriods.d.ts +1 -1
  73. package/mobile/dist/components/DepositFiltration/useDepositsPeriods.js +4 -2
  74. package/mobile/dist/components/DepositFiltration/useDepositsPeriods.js.map +1 -1
  75. package/mobile/dist/components/OfficesAtmsMap/Badge.js +2 -1
  76. package/mobile/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
  77. package/mobile/dist/components/OfficesAtmsMap/CardCell.js +1 -1
  78. package/mobile/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
  79. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  80. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  81. package/mobile/lib/common.css +1 -1
  82. package/mobile/lib/components/DepositFiltration/SourceItem.d.ts +4 -0
  83. package/mobile/lib/components/DepositFiltration/SourceItem.js +2 -0
  84. package/mobile/lib/components/DepositFiltration/SourceItem.js.map +1 -0
  85. package/mobile/lib/components/DepositFiltration/getPeriod.d.ts +1 -6
  86. package/mobile/lib/components/DepositFiltration/getPeriod.js +6 -8
  87. package/mobile/lib/components/DepositFiltration/getPeriod.js.map +1 -1
  88. package/mobile/lib/components/DepositFiltration/isRateRow.d.ts +5 -0
  89. package/mobile/lib/components/DepositFiltration/isRateRow.js +4 -0
  90. package/mobile/lib/components/DepositFiltration/isRateRow.js.map +1 -0
  91. package/mobile/lib/components/DepositFiltration/numberRange.d.ts +1 -0
  92. package/mobile/lib/components/DepositFiltration/numberRange.js +2 -0
  93. package/mobile/lib/components/DepositFiltration/numberRange.js.map +1 -0
  94. package/mobile/lib/components/DepositFiltration/useDepositsPeriods.d.ts +1 -1
  95. package/mobile/lib/components/DepositFiltration/useDepositsPeriods.js +4 -2
  96. package/mobile/lib/components/DepositFiltration/useDepositsPeriods.js.map +1 -1
  97. package/mobile/lib/components/OfficesAtmsMap/Badge.js +3 -2
  98. package/mobile/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
  99. package/mobile/lib/components/OfficesAtmsMap/CardCell.js +1 -1
  100. package/mobile/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
  101. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  102. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  103. package/mobile/src/components/DepositFiltration/SourceItem.ts +5 -0
  104. package/mobile/src/components/DepositFiltration/getPeriod.ts +10 -12
  105. package/mobile/src/components/DepositFiltration/isRateRow.ts +8 -0
  106. package/mobile/src/components/DepositFiltration/numberRange.ts +2 -0
  107. package/mobile/src/components/DepositFiltration/useDepositsPeriods.ts +5 -3
  108. package/mobile/src/components/OfficesAtmsMap/Badge.tsx +5 -1
  109. package/mobile/src/components/OfficesAtmsMap/CardCell.tsx +1 -1
  110. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +9 -5
  111. package/mobile/src/icons/SmallClockIcon.svg +1 -1
  112. package/mobile/tailwind.config.cjs +3 -0
  113. package/package.json +1 -1
  114. package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +1 -1
  115. package/src/components/DepositFiltration/SourceItem.ts +5 -0
  116. package/src/components/DepositFiltration/getPeriod.ts +10 -12
  117. package/src/components/DepositFiltration/isRateRow.ts +8 -0
  118. package/src/components/DepositFiltration/numberRange.ts +2 -0
  119. package/src/components/DepositFiltration/useDepositsPeriods.ts +5 -3
  120. package/src/components/OfficesAtmsMap/Badge.tsx +5 -1
  121. package/src/components/OfficesAtmsMap/CardCell.tsx +1 -1
  122. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +9 -5
  123. package/src/icons/SmallClockIcon.svg +1 -1
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
+ import { Img } from '../../ui-kit/Img/Img.js';
3
4
  import { Text } from '../../ui-kit/Text/Text.js';
4
5
  import { style } from '../../utils/style.js';
5
6
  const colorStyle = {
@@ -8,5 +9,5 @@ const colorStyle = {
8
9
  gray: { border: 'border-gray', text: 'text-secondary-text' },
9
10
  red: { border: 'border-error/30', text: 'text-error' },
10
11
  };
11
- export const Badge = JSX(({ className, children, color = 'gray' }) => (_jsx("div", { className: style('p-s sm:border sm:border-gray rounded-md flex items-center', colorStyle[color].border, className), children: _jsx(Text, { size: "text-m", color: colorStyle[color].text, children: children }) })));
12
+ export const Badge = JSX(({ className, children, color = 'gray' }) => (_jsxs("div", { className: style('pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center', colorStyle[color].border, className), children: [_jsx("div", { className: "block pr-m sm:pr-0 sm:hidden", children: _jsx(Img, { image: { icon: 'SmallClockIcon' }, width: "24", height: "24" }) }), _jsx(Text, { size: "text-m", color: colorStyle[color].text, children: children })] })));
12
13
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,UAAU,GAAwD;IACtE,MAAM,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,IAAI,EAAE,aAAa,EAAE;IAC9D,KAAK,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACrE,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC5D,GAAG,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE;CACvD,CAAC;AAOF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAChF,cACE,SAAS,EAAE,KAAK,CACd,2DAA2D,EAC3D,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,EACxB,SAAS,CACV,YAED,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,YAC9C,QAAQ,GACJ,GACH,CACP,CAAC,CAAC"}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,UAAU,GAAwD;IACtE,MAAM,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,IAAI,EAAE,aAAa,EAAE;IAC9D,KAAK,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACrE,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC5D,GAAG,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE;CACvD,CAAC;AAOF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAChF,eACE,SAAS,EAAE,KAAK,CACd,qEAAqE,EACrE,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,EACxB,SAAS,CACV,aAED,cAAK,SAAS,EAAC,8BAA8B,YAC3C,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,GAC7D,EACN,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,YAC9C,QAAQ,GACJ,IACH,CACP,CAAC,CAAC"}
@@ -9,6 +9,6 @@ export const CardCell = JSX(({ value, subText, children, ...props }) => {
9
9
  }
10
10
  return renderCardCell({ textItems, subText, children, ...props });
11
11
  });
12
- const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, }) => (_jsxs("div", { className: style('flex gap-2xs flex-col h-full max-w-[300px]', className), children: [label ? (_jsx(Text, { color: "text-secondary-text", font: "font-light", size: labelSize, children: label })) : null, children ||
12
+ const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, }) => (_jsxs("div", { className: style('flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]', className), children: [label ? (_jsx(Text, { color: "text-secondary-text", font: "font-light", size: labelSize, children: label })) : null, children ||
13
13
  textItems.filter(Boolean).map((text, i) => (_jsx(Text, { size: "text-l", children: text.trim() }, String(i)))), subText ? (_jsx(Text, { color: subColor, size: "text-m", children: subText })) : null] }));
14
14
  //# sourceMappingURL=CardCell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardCell.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/CardCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAW1C,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACpF,MAAM,SAAS,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE3F,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAC1D,OAAO,IAAI,CAAC;KACb;IAED,OAAO,cAAc,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;AACpE,CAAC,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,SAAS,GAAG,QAAQ,EACpB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,GAC+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AAC,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAC1D,OAAO,IAAI,CAAC;KACb;IAED,OAAO,cAAc,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;AACpE,CAAC,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,SAAS,GAAG,QAAQ,EACpB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,GAC+C,EAAE,EAAE,CAAC,CAC5D,eAAK,SAAS,EAAE,KAAK,CAAC,uDAAuD,EAAE,SAAS,CAAC,aACtF,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,YAAY,EAAC,IAAI,EAAE,SAAS,YAChE,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ;YACP,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACzC,KAAC,IAAI,IAAiB,IAAI,EAAC,QAAQ,YAChC,IAAI,CAAC,IAAI,EAAE,IADH,MAAM,CAAC,CAAC,CAAC,CAEb,CACR,CAAC,EACH,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAC,QAAQ,YACjC,OAAO,GACH,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC"}
@@ -21,7 +21,7 @@ export const OfficesAtmsMapLayout = JSX(({ className, data = [], renderCard = de
21
21
  .filter((_) => _ && _.length === 2);
22
22
  return [_filteredItems, _points, _filteredItems.length];
23
23
  }, [data, filtrationState]);
24
- return (_jsxs("div", { className: style('space-y-1', className), children: [_jsxs("div", { className: "bg-white", children: [_jsxs("div", { className: "pt-6xl px-6xl", children: [_jsxs("div", { className: "flex gap-xs pb-2xl", children: [_jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (_jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock(descriptionData) : null, renderFiltrationForm(Object.keys(initFilterState), { field, reset })] }), _jsx("div", { className: "h-[600px]", children: _jsx(ClientOnly, { children: _jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
24
+ return (_jsxs("div", { className: style('space-y-1', className), children: [_jsxs("div", { className: "bg-white", children: [_jsxs("div", { className: "p-6xl pb-0", children: [_jsxs("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: [_jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (_jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock(descriptionData) : null, renderFiltrationForm(Object.keys(initFilterState), { field, reset })] }), _jsx("div", { className: "h-[600px]", children: _jsx(ClientOnly, { children: _jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
25
25
  });
26
- const renderDescriptionBlock = ({ __html, list }) => __html || list?.length ? (_jsxs("div", { className: "p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? _jsx(RichText, { __html: __html }) : null, list?.length ? (_jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs", children: list.map((item, i) => (_jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? _jsx(Img, { image: item.image }) : null, item?.text ? (_jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
26
+ const renderDescriptionBlock = ({ __html, list }) => __html || list?.length ? (_jsxs("div", { className: "mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? (_jsx("div", { className: "mb-2xl", children: _jsx(RichText, { __html: __html }) })) : null, list?.length ? (_jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl", children: list.map((item, i) => (_jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? _jsx(Img, { image: item.image }) : null, item?.text ? (_jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
27
27
  //# sourceMappingURL=OfficesAtmsMapLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OfficesAtmsMapLayout.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AACrC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC;AAcpC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EACC,SAAS,EACT,IAAI,GAAG,EAAE,EACT,UAAU,GAAG,iBAAiB,EAC9B,WAAW,GAAG,kBAAkB,EACh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AM,CAAC,CAAC,CAAC,CACvB,eAAK,SAAS,EAAC,6DAA6D,aACzE,MAAM,CAAC,CAAC,CAAC,CACR,cAAK,SAAS,EAAC,QAAQ,YACrB,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,GAAI,GACxB,CACP,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,cAAK,SAAS,EAAC,gEAAgE,YAC5E,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,eAAqB,SAAS,EAAC,0BAA0B,aACtD,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/C,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CACZ,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,YAClC,IAAI,CAAC,IAAI,GACL,CACR,CAAC,CAAC,CAAC,IAAI,KANA,MAAM,CAAC,CAAC,CAAC,CAOb,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type RateRow } from './isRateRow';
2
+
3
+ export interface SourceItem {
4
+ rateRows?: Partial<RateRow>[];
5
+ }
@@ -1,15 +1,13 @@
1
- export interface SourceItem {
2
- rateRows: Array<{ minMonths?: number; maxMonths?: number }>;
3
- }
1
+ import { unique } from '../../utils/unique';
2
+ import { isRateRow } from './isRateRow';
3
+ import { numberRange } from './numberRange';
4
+ import { type SourceItem } from './SourceItem';
4
5
 
5
6
  type Source = Record<string, SourceItem | null>;
6
7
 
7
- export const getPeriod = (source: Source, content: Record<string, any>): number[] => {
8
- const sourceItem = source[content?.sourceBook];
9
-
10
- return sourceItem
11
- ? sourceItem?.rateRows
12
- .map((el) => el.minMonths)
13
- .filter((minMonths): minMonths is number => minMonths !== undefined)
14
- : [];
15
- };
8
+ export const getPeriod = (source: Source, content: Record<string, any>): number[] =>
9
+ unique(
10
+ (source[content?.sourceBook]?.rateRows || [])
11
+ .filter(isRateRow)
12
+ .flatMap((_) => numberRange(_.minMonths, _.maxMonths)),
13
+ );
@@ -0,0 +1,8 @@
1
+ export interface RateRow {
2
+ minMonths: number;
3
+ maxMonths: number;
4
+ }
5
+
6
+ export const isRateRow = (rateRow: Partial<RateRow> | undefined): rateRow is RateRow => {
7
+ return typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
8
+ };
@@ -0,0 +1,2 @@
1
+ export const numberRange = (start: number, end: number): number[] =>
2
+ Array.from({ length: end - start + 1 }, (_, i) => start + i);
@@ -5,7 +5,9 @@ import { fetchMultitudeJSON, type FetchMultitudeJSONType } from '../../utils/fet
5
5
  import { unique } from '../../utils/unique';
6
6
  import { zip } from '../../utils/zip';
7
7
  import { getChildSourceBook } from './getChildSourceBook';
8
- import { type SourceItem } from './getPeriod';
8
+ import { isRateRow } from './isRateRow';
9
+ import { numberRange } from './numberRange';
10
+ import { type SourceItem } from './SourceItem';
9
11
 
10
12
  export function useDepositsPeriods(blocks: BlockDef[] | undefined) {
11
13
  const { dirs = [], source = [] } = useMemo(() => {
@@ -25,8 +27,8 @@ export function useDepositsPeriods(blocks: BlockDef[] | undefined) {
25
27
  unique(
26
28
  data
27
29
  .flatMap((item) => item?.rateRows || [])
28
- .filter((row) => typeof row.minMonths === 'number' && row.minMonths === row.maxMonths)
29
- .map((row) => row.minMonths as number),
30
+ .filter(isRateRow)
31
+ .flatMap((_) => numberRange(_.minMonths, _.maxMonths)),
30
32
  ).sort((a, b) => a - b) || [],
31
33
  };
32
34
  }
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { Img } from '../../ui-kit/Img/Img';
2
3
  import { Text } from '../../ui-kit/Text/Text';
3
4
  import { type TextColor } from '../../ui-kit/Text/TextProps';
4
5
  import { style } from '../../utils/style';
@@ -18,11 +19,14 @@ export interface BadgeProps {
18
19
  export const Badge = JSX<BadgeProps>(({ className, children, color = 'gray' }) => (
19
20
  <div
20
21
  className={style(
21
- 'p-s sm:border sm:border-gray rounded-md flex items-center',
22
+ 'pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center',
22
23
  colorStyle[color].border,
23
24
  className,
24
25
  )}
25
26
  >
27
+ <div className="block pr-m sm:pr-0 sm:hidden">
28
+ <Img image={{ icon: 'SmallClockIcon' }} width="24" height="24" />
29
+ </div>
26
30
  <Text size="text-m" color={colorStyle[color].text}>
27
31
  {children}
28
32
  </Text>
@@ -31,7 +31,7 @@ const renderCardCell = ({
31
31
  className,
32
32
  children,
33
33
  }: CardCellProps & { textItems: string[]; children: any }) => (
34
- <div className={style('flex gap-2xs flex-col h-full max-w-[300px]', className)}>
34
+ <div className={style('flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]', className)}>
35
35
  {label ? (
36
36
  <Text color="text-secondary-text" font="font-light" size={labelSize}>
37
37
  {label}
@@ -53,8 +53,8 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
53
53
  return (
54
54
  <div className={style('space-y-1', className)}>
55
55
  <div className="bg-white">
56
- <div className="pt-6xl px-6xl">
57
- <div className="flex gap-xs pb-2xl">
56
+ <div className="p-6xl pb-0">
57
+ <div className="flex flex-col sm:flex-row gap-xs mb-2xl">
58
58
  <Heading headingType="h2">{title}</Heading>
59
59
  {lengthItems ? (
60
60
  <Text size="text-h2" color="text-secondary-text">{`(${lengthItems})`}</Text>
@@ -77,10 +77,14 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
77
77
 
78
78
  const renderDescriptionBlock = ({ __html, list }: AtmsDef) =>
79
79
  __html || list?.length ? (
80
- <div className="p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md">
81
- {__html ? <RichText __html={__html} /> : null}
80
+ <div className="mb-2xl border-b sm:border border-main-divider sm:rounded-md">
81
+ {__html ? (
82
+ <div className="mb-2xl">
83
+ <RichText __html={__html} />
84
+ </div>
85
+ ) : null}
82
86
  {list?.length ? (
83
- <div className="flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs">
87
+ <div className="flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl">
84
88
  {list.map((item, i) => (
85
89
  <div key={String(i)} className="flex gap-xs items-center">
86
90
  {item?.image ? <Img image={item.image} /> : null}
@@ -1 +1 @@
1
- <svg title="Маленькие часы" isInverse="true" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 6c-1.25 1.67-2 3.75-2 6 0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2c-1.43 0-2.8.3-4.03.85" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
1
+ <svg title="Маленькие часы" isInverse="true" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 6c-1.25 1.67-2 3.75-2 6 0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2c-1.43 0-2.8.3-4.03.85" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -1,5 +1,8 @@
1
1
  const config = require('../tailwind.config.cjs');
2
2
 
3
+ // Use this value only when you need padding on the all sides - p-6xl,
4
+ // in other cases it doesn't work - for example, in case py-6xl or pr-6xl
5
+
3
6
  const quadXL = '1.5rem 1.25rem'; // 24px 20px
4
7
 
5
8
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.159",
3
+ "version": "0.14.161",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -144,7 +144,7 @@ export default {
144
144
  sum: { min: 1000, max: 100000 },
145
145
  },
146
146
  {
147
- sourceBook: 'product-block-data',
147
+ sourceBook: 'product-block-3-data',
148
148
  },
149
149
  ),
150
150
  ],
@@ -0,0 +1,5 @@
1
+ import { type RateRow } from './isRateRow';
2
+
3
+ export interface SourceItem {
4
+ rateRows?: Partial<RateRow>[];
5
+ }
@@ -1,15 +1,13 @@
1
- export interface SourceItem {
2
- rateRows: Array<{ minMonths?: number; maxMonths?: number }>;
3
- }
1
+ import { unique } from '../../utils/unique';
2
+ import { isRateRow } from './isRateRow';
3
+ import { numberRange } from './numberRange';
4
+ import { type SourceItem } from './SourceItem';
4
5
 
5
6
  type Source = Record<string, SourceItem | null>;
6
7
 
7
- export const getPeriod = (source: Source, content: Record<string, any>): number[] => {
8
- const sourceItem = source[content?.sourceBook];
9
-
10
- return sourceItem
11
- ? sourceItem?.rateRows
12
- .map((el) => el.minMonths)
13
- .filter((minMonths): minMonths is number => minMonths !== undefined)
14
- : [];
15
- };
8
+ export const getPeriod = (source: Source, content: Record<string, any>): number[] =>
9
+ unique(
10
+ (source[content?.sourceBook]?.rateRows || [])
11
+ .filter(isRateRow)
12
+ .flatMap((_) => numberRange(_.minMonths, _.maxMonths)),
13
+ );
@@ -0,0 +1,8 @@
1
+ export interface RateRow {
2
+ minMonths: number;
3
+ maxMonths: number;
4
+ }
5
+
6
+ export const isRateRow = (rateRow: Partial<RateRow> | undefined): rateRow is RateRow => {
7
+ return typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
8
+ };
@@ -0,0 +1,2 @@
1
+ export const numberRange = (start: number, end: number): number[] =>
2
+ Array.from({ length: end - start + 1 }, (_, i) => start + i);
@@ -5,7 +5,9 @@ import { fetchMultitudeJSON, type FetchMultitudeJSONType } from '../../utils/fet
5
5
  import { unique } from '../../utils/unique';
6
6
  import { zip } from '../../utils/zip';
7
7
  import { getChildSourceBook } from './getChildSourceBook';
8
- import { type SourceItem } from './getPeriod';
8
+ import { isRateRow } from './isRateRow';
9
+ import { numberRange } from './numberRange';
10
+ import { type SourceItem } from './SourceItem';
9
11
 
10
12
  export function useDepositsPeriods(blocks: BlockDef[] | undefined) {
11
13
  const { dirs = [], source = [] } = useMemo(() => {
@@ -25,8 +27,8 @@ export function useDepositsPeriods(blocks: BlockDef[] | undefined) {
25
27
  unique(
26
28
  data
27
29
  .flatMap((item) => item?.rateRows || [])
28
- .filter((row) => typeof row.minMonths === 'number' && row.minMonths === row.maxMonths)
29
- .map((row) => row.minMonths as number),
30
+ .filter(isRateRow)
31
+ .flatMap((_) => numberRange(_.minMonths, _.maxMonths)),
30
32
  ).sort((a, b) => a - b) || [],
31
33
  };
32
34
  }
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { Img } from '../../ui-kit/Img/Img';
2
3
  import { Text } from '../../ui-kit/Text/Text';
3
4
  import { type TextColor } from '../../ui-kit/Text/TextProps';
4
5
  import { style } from '../../utils/style';
@@ -18,11 +19,14 @@ export interface BadgeProps {
18
19
  export const Badge = JSX<BadgeProps>(({ className, children, color = 'gray' }) => (
19
20
  <div
20
21
  className={style(
21
- 'p-s sm:border sm:border-gray rounded-md flex items-center',
22
+ 'pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center',
22
23
  colorStyle[color].border,
23
24
  className,
24
25
  )}
25
26
  >
27
+ <div className="block pr-m sm:pr-0 sm:hidden">
28
+ <Img image={{ icon: 'SmallClockIcon' }} width="24" height="24" />
29
+ </div>
26
30
  <Text size="text-m" color={colorStyle[color].text}>
27
31
  {children}
28
32
  </Text>
@@ -31,7 +31,7 @@ const renderCardCell = ({
31
31
  className,
32
32
  children,
33
33
  }: CardCellProps & { textItems: string[]; children: any }) => (
34
- <div className={style('flex gap-2xs flex-col h-full max-w-[300px]', className)}>
34
+ <div className={style('flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]', className)}>
35
35
  {label ? (
36
36
  <Text color="text-secondary-text" font="font-light" size={labelSize}>
37
37
  {label}
@@ -53,8 +53,8 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
53
53
  return (
54
54
  <div className={style('space-y-1', className)}>
55
55
  <div className="bg-white">
56
- <div className="pt-6xl px-6xl">
57
- <div className="flex gap-xs pb-2xl">
56
+ <div className="p-6xl pb-0">
57
+ <div className="flex flex-col sm:flex-row gap-xs mb-2xl">
58
58
  <Heading headingType="h2">{title}</Heading>
59
59
  {lengthItems ? (
60
60
  <Text size="text-h2" color="text-secondary-text">{`(${lengthItems})`}</Text>
@@ -77,10 +77,14 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
77
77
 
78
78
  const renderDescriptionBlock = ({ __html, list }: AtmsDef) =>
79
79
  __html || list?.length ? (
80
- <div className="p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md">
81
- {__html ? <RichText __html={__html} /> : null}
80
+ <div className="mb-2xl border-b sm:border border-main-divider sm:rounded-md">
81
+ {__html ? (
82
+ <div className="mb-2xl">
83
+ <RichText __html={__html} />
84
+ </div>
85
+ ) : null}
82
86
  {list?.length ? (
83
- <div className="flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs">
87
+ <div className="flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl">
84
88
  {list.map((item, i) => (
85
89
  <div key={String(i)} className="flex gap-xs items-center">
86
90
  {item?.image ? <Img image={item.image} /> : null}
@@ -1 +1 @@
1
- <svg title="Маленькие часы" isInverse="true" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 6c-1.25 1.67-2 3.75-2 6 0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2c-1.43 0-2.8.3-4.03.85" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
1
+ <svg title="Маленькие часы" isInverse="true" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 6c-1.25 1.67-2 3.75-2 6 0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2c-1.43 0-2.8.3-4.03.85" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>