@redneckz/wildless-cms-uni-blocks 0.8.9 → 0.8.10

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 (213) hide show
  1. package/bin/migration-scripts/0.8.10.js +31 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +82 -48
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
  6. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  7. package/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  8. package/bundle/components/StepsBlock/{renderStepContent.d.ts → renderStep.d.ts} +5 -5
  9. package/bundle/components/Tile/TileContent.d.ts +2 -2
  10. package/dist/components/Calculator/Rate.js +1 -1
  11. package/dist/components/Calculator/Rate.js.map +1 -1
  12. package/dist/components/Calculator/constants.js +2 -2
  13. package/dist/components/Calculator/constants.js.map +1 -1
  14. package/dist/components/Calculator/rangeHelpers.d.ts +4 -0
  15. package/dist/components/Calculator/rangeHelpers.js +12 -0
  16. package/dist/components/Calculator/rangeHelpers.js.map +1 -0
  17. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  18. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  19. package/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
  20. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  21. package/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
  22. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  23. package/dist/components/Carousel/Carousel.js +6 -4
  24. package/dist/components/Carousel/Carousel.js.map +1 -1
  25. package/dist/components/PictureText/renderBenefit.js +1 -0
  26. package/dist/components/PictureText/renderBenefit.js.map +1 -1
  27. package/dist/components/ProductTile/renderBenefit.js +1 -0
  28. package/dist/components/ProductTile/renderBenefit.js.map +1 -1
  29. package/dist/components/StepsBlock/StepsBlock.js +7 -13
  30. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  31. package/dist/components/StepsBlock/StepsBlock.mobile.js +24 -4
  32. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  33. package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  34. package/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  35. package/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
  36. package/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  37. package/{lib/components/StepsBlock/renderStepContent.d.ts → dist/components/StepsBlock/renderStep.d.ts} +5 -5
  38. package/dist/components/StepsBlock/renderStep.js +34 -0
  39. package/dist/components/StepsBlock/renderStep.js.map +1 -0
  40. package/dist/components/Tile/Tile.js +3 -3
  41. package/dist/components/Tile/Tile.js.map +1 -1
  42. package/dist/components/Tile/TileContent.d.ts +2 -2
  43. package/lib/components/Calculator/Rate.js +1 -1
  44. package/lib/components/Calculator/Rate.js.map +1 -1
  45. package/lib/components/Calculator/constants.js +2 -2
  46. package/lib/components/Calculator/constants.js.map +1 -1
  47. package/lib/components/Calculator/rangeHelpers.d.ts +4 -0
  48. package/lib/components/Calculator/rangeHelpers.js +8 -0
  49. package/lib/components/Calculator/rangeHelpers.js.map +1 -0
  50. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  51. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  52. package/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
  53. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  54. package/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
  55. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  56. package/lib/components/Carousel/Carousel.js +6 -4
  57. package/lib/components/Carousel/Carousel.js.map +1 -1
  58. package/lib/components/PictureText/renderBenefit.js +1 -0
  59. package/lib/components/PictureText/renderBenefit.js.map +1 -1
  60. package/lib/components/ProductTile/renderBenefit.js +1 -0
  61. package/lib/components/ProductTile/renderBenefit.js.map +1 -1
  62. package/lib/components/StepsBlock/StepsBlock.js +7 -13
  63. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  64. package/lib/components/StepsBlock/StepsBlock.mobile.js +24 -4
  65. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  66. package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  67. package/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  68. package/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
  69. package/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  70. package/{dist/components/StepsBlock/renderStepContent.d.ts → lib/components/StepsBlock/renderStep.d.ts} +5 -5
  71. package/lib/components/StepsBlock/renderStep.js +31 -0
  72. package/lib/components/StepsBlock/renderStep.js.map +1 -0
  73. package/lib/components/Tile/Tile.js +3 -3
  74. package/lib/components/Tile/Tile.js.map +1 -1
  75. package/lib/components/Tile/TileContent.d.ts +2 -2
  76. package/mobile/bundle/bundle.umd.js +32 -5
  77. package/mobile/bundle/bundle.umd.min.js +1 -1
  78. package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
  79. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  80. package/mobile/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  81. package/mobile/bundle/components/StepsBlock/{renderStepContent.d.ts → renderStep.d.ts} +5 -5
  82. package/mobile/bundle/components/Tile/TileContent.d.ts +2 -2
  83. package/mobile/dist/components/Calculator/Rate.js +1 -1
  84. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  85. package/mobile/dist/components/Calculator/constants.js +2 -2
  86. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  87. package/mobile/dist/components/Calculator/rangeHelpers.d.ts +4 -0
  88. package/mobile/dist/components/Calculator/rangeHelpers.js +12 -0
  89. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -0
  90. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  91. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  92. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
  93. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  94. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
  95. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  96. package/mobile/dist/components/Carousel/Carousel.js +6 -4
  97. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  98. package/mobile/dist/components/PictureText/renderBenefit.js +1 -0
  99. package/mobile/dist/components/PictureText/renderBenefit.js.map +1 -1
  100. package/mobile/dist/components/ProductTile/renderBenefit.js +1 -0
  101. package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -1
  102. package/mobile/dist/components/StepsBlock/StepsBlock.js +24 -4
  103. package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  104. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  105. package/mobile/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  106. package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
  107. package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  108. package/mobile/dist/components/StepsBlock/renderStep.d.ts +11 -0
  109. package/mobile/dist/components/StepsBlock/renderStep.js +34 -0
  110. package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -0
  111. package/mobile/dist/components/Tile/Tile.js +3 -3
  112. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  113. package/mobile/dist/components/Tile/TileContent.d.ts +2 -2
  114. package/mobile/lib/components/Calculator/Rate.js +1 -1
  115. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  116. package/mobile/lib/components/Calculator/constants.js +2 -2
  117. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  118. package/mobile/lib/components/Calculator/rangeHelpers.d.ts +4 -0
  119. package/mobile/lib/components/Calculator/rangeHelpers.js +8 -0
  120. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -0
  121. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  122. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  123. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
  124. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  125. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
  126. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  127. package/mobile/lib/components/Carousel/Carousel.js +6 -4
  128. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  129. package/mobile/lib/components/PictureText/renderBenefit.js +1 -0
  130. package/mobile/lib/components/PictureText/renderBenefit.js.map +1 -1
  131. package/mobile/lib/components/ProductTile/renderBenefit.js +1 -0
  132. package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -1
  133. package/mobile/lib/components/StepsBlock/StepsBlock.js +24 -4
  134. package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  135. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  136. package/mobile/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  137. package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
  138. package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  139. package/mobile/lib/components/StepsBlock/renderStep.d.ts +11 -0
  140. package/mobile/lib/components/StepsBlock/renderStep.js +31 -0
  141. package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -0
  142. package/mobile/lib/components/Tile/Tile.js +3 -3
  143. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  144. package/mobile/lib/components/Tile/TileContent.d.ts +2 -2
  145. package/mobile/src/components/Calculator/Rate.tsx +1 -1
  146. package/mobile/src/components/Calculator/constants.ts +2 -2
  147. package/mobile/src/components/Calculator/rangeHelpers.ts +24 -0
  148. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
  149. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
  150. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
  151. package/mobile/src/components/Carousel/Carousel.tsx +6 -4
  152. package/mobile/src/components/PictureText/renderBenefit.tsx +1 -0
  153. package/mobile/src/components/ProductTile/renderBenefit.tsx +1 -0
  154. package/mobile/src/components/StepsBlock/StepsBlock.tsx +29 -5
  155. package/mobile/src/components/StepsBlock/StepsBlock.ui.json +6 -0
  156. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +13 -1
  157. package/mobile/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
  158. package/mobile/src/components/StepsBlock/renderStep.tsx +83 -0
  159. package/mobile/src/components/Tile/Tile.example.json +1 -1
  160. package/mobile/src/components/Tile/Tile.tsx +4 -4
  161. package/mobile/src/components/Tile/Tile.ui.json +7 -1
  162. package/mobile/src/components/Tile/TileContent.ts +2 -2
  163. package/package.json +1 -1
  164. package/src/components/Calculator/Rate.tsx +1 -1
  165. package/src/components/Calculator/constants.ts +2 -2
  166. package/src/components/Calculator/rangeHelpers.ts +24 -0
  167. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
  168. package/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
  169. package/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
  170. package/src/components/Carousel/Carousel.tsx +6 -4
  171. package/src/components/PictureText/renderBenefit.tsx +1 -0
  172. package/src/components/ProductTile/renderBenefit.tsx +1 -0
  173. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +19 -1
  174. package/src/components/StepsBlock/StepsBlock.fixture.tsx +10 -3
  175. package/src/components/StepsBlock/StepsBlock.mobile.tsx +29 -5
  176. package/src/components/StepsBlock/StepsBlock.tsx +28 -16
  177. package/src/components/StepsBlock/StepsBlock.ui.json +6 -0
  178. package/src/components/StepsBlock/StepsBlockContent.ts +13 -1
  179. package/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
  180. package/src/components/StepsBlock/renderStep.tsx +83 -0
  181. package/src/components/Tile/Tile.example.json +1 -1
  182. package/src/components/Tile/Tile.fixture.tsx +2 -2
  183. package/src/components/Tile/Tile.tsx +4 -4
  184. package/src/components/Tile/Tile.ui.json +7 -1
  185. package/src/components/Tile/TileContent.ts +2 -2
  186. package/bundle/utils/checkIsIconRenderable.d.ts +0 -2
  187. package/dist/components/StepsBlock/renderStepContent.js +0 -19
  188. package/dist/components/StepsBlock/renderStepContent.js.map +0 -1
  189. package/dist/utils/checkIsIconRenderable.d.ts +0 -2
  190. package/dist/utils/checkIsIconRenderable.js +0 -5
  191. package/dist/utils/checkIsIconRenderable.js.map +0 -1
  192. package/lib/components/StepsBlock/renderStepContent.js +0 -16
  193. package/lib/components/StepsBlock/renderStepContent.js.map +0 -1
  194. package/lib/utils/checkIsIconRenderable.d.ts +0 -2
  195. package/lib/utils/checkIsIconRenderable.js +0 -2
  196. package/lib/utils/checkIsIconRenderable.js.map +0 -1
  197. package/mobile/bundle/utils/checkIsIconRenderable.d.ts +0 -2
  198. package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +0 -11
  199. package/mobile/dist/components/StepsBlock/renderStepContent.js +0 -19
  200. package/mobile/dist/components/StepsBlock/renderStepContent.js.map +0 -1
  201. package/mobile/dist/utils/checkIsIconRenderable.d.ts +0 -2
  202. package/mobile/dist/utils/checkIsIconRenderable.js +0 -5
  203. package/mobile/dist/utils/checkIsIconRenderable.js.map +0 -1
  204. package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +0 -11
  205. package/mobile/lib/components/StepsBlock/renderStepContent.js +0 -16
  206. package/mobile/lib/components/StepsBlock/renderStepContent.js.map +0 -1
  207. package/mobile/lib/utils/checkIsIconRenderable.d.ts +0 -2
  208. package/mobile/lib/utils/checkIsIconRenderable.js +0 -2
  209. package/mobile/lib/utils/checkIsIconRenderable.js.map +0 -1
  210. package/mobile/src/components/StepsBlock/renderStepContent.tsx +0 -83
  211. package/mobile/src/utils/checkIsIconRenderable.tsx +0 -3
  212. package/src/components/StepsBlock/renderStepContent.tsx +0 -83
  213. package/src/utils/checkIsIconRenderable.tsx +0 -3
@@ -19,10 +19,12 @@ export const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBl
19
19
  isCyclic,
20
20
  });
21
21
  const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
22
- return (_jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), className), ...rest, children: _jsxs("div", { className: "relative max-w-full", children: [_jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
23
- ...rest,
24
- block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
25
- }) }), _jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
22
+ return (_jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), className), ...rest, children: _jsxs("div", { className: "relative max-w-full", children: [_jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: isBankHistoryCarousel
23
+ ? renderChildren({
24
+ ...rest,
25
+ block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
26
+ })
27
+ : renderChildren(rest) }), _jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
26
28
  });
27
29
  Carousel.childrenTypes =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AAC;QACJ,CAAC,CAAC,MAAM,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAkB,EAAU,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { BenefitItem } from '../../ui-kit/BenefitItem/BenefitItem.js';
3
3
  import { RichText } from '../../ui-kit/RichText/RichText.js';
4
4
  import { assertUnreachable } from '../../utils/assertUnreachable.js';
5
+ // TODO: Create universal function for this case
5
6
  export const renderBenefit =
6
7
  // Linter doesn't understand that switch processes all cases
7
8
  // eslint-disable-next-line consistent-return
@@ -1 +1 @@
1
- {"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/PictureText/renderBenefit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,CAAC,MAAM,aAAa;AACxB,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,OAAqB,EAAE,EAAE,CAAC,CAAC,OAA4B,EAAE,CAAS,EAAE,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO,CACL,KAAC,WAAW,IAEV,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,OAAO,EAAE,OAAO,IAJX,MAAM,CAAC,CAAC,CAAC,CAKd,CACH,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,KAAC,QAAQ,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,CAAC;QAC9C;YACE,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/PictureText/renderBenefit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,gDAAgD;AAChD,MAAM,CAAC,MAAM,aAAa;AACxB,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,OAAqB,EAAE,EAAE,CAAC,CAAC,OAA4B,EAAE,CAAS,EAAE,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO,CACL,KAAC,WAAW,IAEV,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,OAAO,EAAE,OAAO,IAJX,MAAM,CAAC,CAAC,CAAC,CAKd,CACH,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,KAAC,QAAQ,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,CAAC;QAC9C;YACE,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC"}
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { RichText } from '../../ui-kit/RichText/RichText.js';
3
3
  import { Text } from '../../ui-kit/Text/Text.js';
4
4
  import { assertUnreachable } from '../../utils/assertUnreachable.js';
5
+ // TODO: Create universal function for this case
5
6
  export const renderBenefit =
6
7
  // Linter doesn't understand that switch processes all cases
7
8
  // eslint-disable-next-line consistent-return
@@ -1 +1 @@
1
- {"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductTile/renderBenefit.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE,MAAM,CAAC,MAAM,aAAa;AACxB,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,OAAgB,EAAE,CAAS,EAAE,EAAE;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO;gBACL,KAAC,IAAI,IAAoB,IAAI,EAAC,SAAS,YACpC,OAAO,CAAC,KAAK,IADL,SAAS,CAAC,EAAE,CAEhB;gBACP,KAAC,IAAI,IAEH,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,wCAAwC,YAE7C,OAAO,CAAC,WAAW,IALf,QAAQ,CAAC,EAAE,CAMX;aACR,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,CACL,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,QAAQ,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,GAChC,CACP,CAAC;QACJ;YACE,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductTile/renderBenefit.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE,gDAAgD;AAChD,MAAM,CAAC,MAAM,aAAa;AACxB,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,OAAgB,EAAE,CAAS,EAAE,EAAE;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO;gBACL,KAAC,IAAI,IAAoB,IAAI,EAAC,SAAS,YACpC,OAAO,CAAC,KAAK,IADL,SAAS,CAAC,EAAE,CAEhB;gBACP,KAAC,IAAI,IAEH,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,wCAAwC,YAE7C,OAAO,CAAC,WAAW,IALf,QAAQ,CAAC,EAAE,CAMX;aACR,CAAC;QACJ,KAAK,KAAK;YACR,OAAO,CACL,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,QAAQ,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,GAChC,CACP,CAAC;QACJ;YACE,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC"}
@@ -3,8 +3,10 @@ import { JSX } from '@redneckz/uni-jsx';
3
3
  import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
4
4
  import { Heading } from '../../ui-kit/Heading/Heading.js';
5
5
  import { Img } from '../../ui-kit/Img/Img.js';
6
- import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable.js';
6
+ import { RichText } from '../../ui-kit/RichText/RichText.js';
7
+ import { assertUnreachable } from '../../utils/assertUnreachable.js';
7
8
  import { getIconWithVersion } from '../../utils/getIconWithVersion.js';
9
+ import { checkCanRenderIcon } from './checkCanRenderIcon.js';
8
10
  import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps.js';
9
11
  const STEPS_SIZE_MAP = {
10
12
  normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
@@ -16,9 +18,27 @@ const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
16
18
  };
17
19
  export const StepsBlock = JSX(({ className = '', title, description, showLines = true, steps, size = 'normal', version = 'primary', ...rest }) => {
18
20
  const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
19
- return (_jsxs(BlockWrapper, { className: `box-border px-4 py-6 flex flex-col ${className}`, version: version, ...rest, children: [title ? _jsx(Heading, { headingType: "h3", className: "text-center", title: title }) : null, description ? (_jsx("p", { className: `text-m-light text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? (_jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: _jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStepTitle(size, version, showLines)) }) })) : null] }));
21
+ return (_jsxs(BlockWrapper, { className: `box-border px-4 py-6 flex flex-col ${className}`, version: version, ...rest, children: [title ? _jsx(Heading, { headingType: "h3", className: "text-center", title: title }) : null, description ? (_jsx("p", { className: `text-m-light text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? (_jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: _jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStep(size, version, showLines)) }) })) : null] }));
20
22
  });
21
- const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
23
+ // TODO: Create universal function for this case
24
+ const renderStep = (size, version, showLines) =>
25
+ // Linter doesn't understand that switch processes all cases
26
+ // eslint-disable-next-line consistent-return
27
+ (step, i, steps) => {
28
+ const { type } = step;
29
+ if (!(type === 'default' || type === 'rte')) {
30
+ return null;
31
+ }
32
+ switch (type) {
33
+ case 'default':
34
+ return renderDefaultStep(size, version, showLines)(step, i, steps);
35
+ case 'rte':
36
+ return _jsx(RichText, { __html: step.__html });
37
+ default:
38
+ assertUnreachable(step);
39
+ }
40
+ };
41
+ const renderDefaultStep = (size, version, showLines) => (step, i, steps) => {
22
42
  const isLastStep = steps.length - 1 === i;
23
43
  const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
24
44
  const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
@@ -29,6 +49,6 @@ const renderIconArea = (size, version) => (step, i) => {
29
49
  const iconAreaSize = STEPS_SIZE_MAP[size];
30
50
  const iconSize = size === 'normal' ? '38' : '27';
31
51
  const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
32
- return (_jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: _jsx("span", { className: `font-medium flex self-center ${iconTextSize}`, children: checkIsIconRenderable(step?.icon) ? (_jsx(Img, { image: getIconWithVersion({ ...step.icon }, version), width: iconSize, height: iconSize, asSVG: true })) : (_jsx("span", { children: i + 1 })) }) }));
52
+ return (_jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: _jsx("span", { className: `font-medium flex self-center ${iconTextSize}`, children: checkCanRenderIcon(step?.icon) ? (_jsx(Img, { image: getIconWithVersion({ ...step.icon }, version), width: iconSize, height: iconSize, asSVG: true })) : (_jsx("span", { children: i + 1 })) }) }));
33
53
  };
34
54
  //# sourceMappingURL=StepsBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CA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AAC,CAAC,CAAC,iBAAiB,CAAC;IAE5E,OAAO,CACL,cACE,SAAS,EAAE,GAAG,YAAY,IAAI,QAAQ,CAAC,cAAc,4DAA4D,YAEjH,eAAM,SAAS,EAAE,gCAAgC,YAAY,EAAE,YAC5D,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAChC,KAAC,GAAG,IACF,KAAK,EAAE,kBAAkB,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,EACpD,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,QAAQ,EAChB,KAAK,SACL,CACH,CAAC,CAAC,CAAC,CACF,yBAAO,CAAC,GAAG,CAAC,GAAQ,CACrB,GACI,GACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { DefaultListItemType } from '../../model/DefaultListItemType';
2
3
  import type { DescriptionProps, HeadlineCommonProps, LabelProps } from '../../model/HeadlineType';
3
4
  import type { IconProps } from '../../model/Picture';
5
+ import type { RichTextItem } from '../../model/RichTextItem';
4
6
  import type { SizeVersion } from '../../model/SizeVersion';
5
7
  import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
6
8
  declare type StepCommonProps = IconProps & {
@@ -14,10 +16,18 @@ declare type StepCommonProps = IconProps & {
14
16
  /** @title Список */
15
17
  items?: string[];
16
18
  };
19
+ /**
20
+ * @title Стандартный
21
+ */
22
+ export declare type DefaultStep = DescriptionProps & LabelProps & StepCommonProps & DefaultListItemType;
23
+ /**
24
+ * @title Форматированный текст
25
+ */
26
+ declare type RichTextStep = RichTextItem & IconProps;
17
27
  /**
18
28
  * @title Шаг
19
29
  */
20
- export declare type Step = DescriptionProps & LabelProps & StepCommonProps;
30
+ export declare type Step = DefaultStep | RichTextStep;
21
31
  /**
22
32
  * @title Блок шаги
23
33
  */
@@ -0,0 +1,2 @@
1
+ import type { Picture } from '../../model/Picture';
2
+ export declare const checkCanRenderIcon: (icon?: Picture) => boolean;
@@ -0,0 +1,2 @@
1
+ export const checkCanRenderIcon = (icon) => Boolean(icon?.icon || icon?.src);
2
+ //# sourceMappingURL=checkCanRenderIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkCanRenderIcon.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/checkCanRenderIcon.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { VNode } from '../../model/VNode';
3
+ import type { Step } from './StepsBlockContent';
4
+ import type { StyleType } from './StepsBlockStyleMaps';
5
+ interface RenderStepProps {
6
+ styleMap: StyleType;
7
+ isMainButton: boolean;
8
+ version?: BlockVersion;
9
+ }
10
+ export declare const renderStep: (props: RenderStepProps) => (step: Step, i: number, arr: Step[]) => VNode;
11
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { Button } from '../../ui-kit/Button/Button.js';
3
+ import { List } from '../../ui-kit/List/List.js';
4
+ import { RichText } from '../../ui-kit/RichText/RichText.js';
5
+ import { Text } from '../../ui-kit/Text/Text.js';
6
+ import { assertUnreachable } from '../../utils/assertUnreachable.js';
7
+ import { style } from '../../utils/style.js';
8
+ // TODO: Create universal function for this case
9
+ export const renderStep = (props) =>
10
+ // Linter doesn't understand that switch processes all cases
11
+ // eslint-disable-next-line consistent-return
12
+ (step, i, arr) => {
13
+ const { type } = step;
14
+ if (!(type === 'default' || type === 'rte')) {
15
+ return null;
16
+ }
17
+ switch (type) {
18
+ case 'default':
19
+ return renderDefaultStep(props)(step, i, arr);
20
+ case 'rte':
21
+ return _jsx(RichText, { __html: step.__html });
22
+ default:
23
+ assertUnreachable(step);
24
+ }
25
+ };
26
+ const renderDefaultStep = ({ styleMap, isMainButton, version }) => (step, i, arr) => {
27
+ const { label, description, button, items, isDotted } = step;
28
+ return (_jsxs("div", { className: style('relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden', getContainerWidth(arr.length)), children: [_jsxs("div", { className: style(button?.text ? 'mb-8' : '', 'text-center'), children: [label ? (_jsx("div", { className: "mb-2", children: _jsx(Text, { size: "text-h6", children: label }) })) : null, _jsxs("div", { className: "flex flex-col items-center", children: [description ? _jsx("div", { className: styleMap.description, children: description }) : null, _jsx(List, { className: style(description ? `${styleMap.description} mt-0.5` : 'text-h6'), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? (_jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
29
+ };
30
+ const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
31
+ //# sourceMappingURL=renderStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAU1C,gDAAgD;AAChD,MAAM,CAAC,MAAM,UAAU,GACrB,CAAC,KAAsB,EAAE,EAAE;AAC3B,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,IAAU,EAAE,CAAS,EAAE,GAAW,EAAS,EAAE;IAC5C,MA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AS,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,WAAW,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EAC5E,KAAK,EAAE,KAAK,EACZ,YAAY,EAAC,GAAG,EAChB,QAAQ,EAAE,QAAQ,GAClB,IACE,IACF,EACL,MAAM,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAC/B,KAAC,MAAM,IACL,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAwB,KAC7B,MAAM,YAET,MAAM,EAAE,IAAI,GACN,CACV,CAAC,CAAC,CAAC,IAAI,KA9BH,MAAM,CAAC,CAAC,CAAC,CA+BV,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
@@ -5,13 +5,13 @@ import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.j
5
5
  import { Heading } from '../../ui-kit/Heading/Heading.js';
6
6
  import { Img } from '../../ui-kit/Img/Img.js';
7
7
  import { List } from '../../ui-kit/List/List.js';
8
- import { Paragraph } from '../../ui-kit/Paragraph/Paragraph.js';
8
+ import { RichText } from '../../ui-kit/RichText/RichText.js';
9
9
  import { Tags } from '../../ui-kit/Tags/Tags.js';
10
10
  import { BaseTile } from '../BaseTile/BaseTile.js';
11
11
  import { getTileMinHeight } from '../BaseTile/getTileMinHeight.js';
12
12
  import { getTileRightPadding } from '../BaseTile/getTileRightPadding.js';
13
- export const Tile = JSX(({ title, headingType = 'h3', description, items, buttons, image, isDotted = true, listItemSize = 'M', className = '', tags, children, ...rest }) => (_jsx(BlockWrapper, { className: `overflow-hidden p-9 pr-3 box-border ${getTileRightPadding(className)} ${getTileMinHeight(className)} ${className}`, ...rest, children: _jsxs(BaseTile, { title: title ? (_jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: renderButtonsSection(buttons, {
13
+ export const Tile = JSX(({ title, headingType = 'h3', __html, items, buttons, image, isDotted = true, listItemSize = 'M', className = '', tags, children, ...rest }) => (_jsx(BlockWrapper, { className: `overflow-hidden p-9 pr-3 box-border ${getTileRightPadding(className)} ${getTileMinHeight(className)} ${className}`, ...rest, children: _jsxs(BaseTile, { title: title ? (_jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: renderButtonsSection(buttons, {
14
14
  className: 'mt-8',
15
15
  buttonClassName: 'min-w-[158px]',
16
- }), image: image?.src ? _jsx(Img, { className: "mt-auto ml-7", image: image }) : null, children: [description ? (_jsx("div", { className: "max-w-[600px] mt-2.5", children: _jsx(Paragraph, { size: "text-xl-light", children: description }) })) : null, children, _jsx(List, { className: "mt-2.5", itemClassName: "mb-1.5", items: items, isDotted: isDotted, listItemSize: listItemSize }), tags?.length ? _jsx(Tags, { tags: tags, className: "mt-5" }) : null] }) })));
16
+ }), image: image?.src ? _jsx(Img, { className: "mt-auto ml-7", image: image }) : null, children: [__html ? (_jsx("div", { className: "max-w-[600px] mt-2.5", children: _jsx(RichText, { __html: __html }) })) : null, children, _jsx(List, { className: "mt-2.5", itemClassName: "mb-1.5", items: items, isDotted: isDotted, listItemSize: listItemSize }), tags?.length ? _jsx(Tags, { tags: tags, className: "mt-5" }) : null] }) })));
17
17
  //# sourceMappingURL=Tile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,8BA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
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
- import type { DescriptionProps } from '../../model/HeadlineType';
3
2
  import type { Picture } from '../../model/Picture';
4
3
  import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
5
4
  import type { HeadingCommonProps } from '../../ui-kit/Heading/HeadingProps';
6
5
  import type { ListContent } from '../../ui-kit/List/ListContent';
7
6
  import type { ListItemSize } from '../../ui-kit/List/ListProps';
7
+ import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
8
8
  import type { TagsContent } from '../../ui-kit/Tags/TagsContent';
9
9
  /**
10
10
  * @title Плитка
11
11
  */
12
- export declare type TileContent = HeadingCommonProps & DescriptionProps & ListContent & ButtonContent & TagsContent & {
12
+ export declare type TileContent = HeadingCommonProps & RichTextProps & ListContent & ButtonContent & TagsContent & {
13
13
  /**
14
14
  * @default {
15
15
  * "format": "webp",
@@ -25,7 +25,7 @@ export const Rate = JSX<RateProps>(
25
25
  rateBlockClassName,
26
26
  )}
27
27
  >
28
- {String(rate).replace('.', ',')}
28
+ {String(rate.toFixed(2)).replace('.', ',')}
29
29
  </span>
30
30
  {unit ? (
31
31
  <span className="gradient-color-text text-[65px] leading-[75px]">{unit}</span>
@@ -54,7 +54,7 @@ export const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParam
54
54
  maxSum: 5000000,
55
55
  minMonths: 2,
56
56
  maxMonths: 120,
57
- rate: 5.9,
57
+ rate: 7,
58
58
  isMonthlyInterestPayment: true,
59
59
  };
60
60
 
@@ -64,7 +64,7 @@ export const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS: BusinessDepositCalculat
64
64
  maxSum: 500000,
65
65
  minDays: BUSINESS_MIN_DAYS,
66
66
  maxDays: BUSINESS_MAX_DAYS,
67
- rate: 5.9,
67
+ rate: 6.6,
68
68
  isMonthlyInterestPayment: true,
69
69
  isReplenished: false,
70
70
  isPartialWithdrawal: false,
@@ -0,0 +1,24 @@
1
+ import { maxBy } from '../../utils/maxBy';
2
+ import { minBy } from '../../utils/minBy';
3
+
4
+ export const getRangeByKeys = <
5
+ MinKey extends string,
6
+ MaxKey extends string,
7
+ T extends Record<MinKey | MaxKey, number>,
8
+ >(
9
+ [minKey, maxKey]: [MinKey, MaxKey],
10
+ rows: T[] = [],
11
+ ) => ({
12
+ [minKey]: rows.length ? minBy()(rows.map((row) => row[minKey])) : 0,
13
+ [maxKey]: rows.length ? maxBy()(rows.map((row) => row[maxKey])) : 0,
14
+ });
15
+
16
+ export const checkRangeByKeys = <
17
+ MinKey extends string,
18
+ MaxKey extends string,
19
+ T extends Record<MinKey | MaxKey, number>,
20
+ >(
21
+ value: number,
22
+ [minKey, maxKey]: [MinKey, MaxKey],
23
+ sourceBookRow: T,
24
+ ): boolean => value >= sourceBookRow[minKey] && value < sourceBookRow[maxKey];
@@ -5,6 +5,7 @@ import {
5
5
  BUSINESS_RATE_MIN_DAYS,
6
6
  DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
7
7
  } from './constants';
8
+ import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
8
9
  import { useCalculatorParams } from './useCalculatorParams';
9
10
  import type { CommonDepositParams } from './useDepositCalculatorParams';
10
11
 
@@ -72,9 +73,9 @@ export const useBusinessDepositCalculatorParams = (
72
73
  return (
73
74
  isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
74
75
  isSmallBusiness === _.isSmallBusiness &&
75
- (isOperatingDeposit
76
- ? _.isReplenished && _.isPartialWithdrawal
77
- : !_.isReplenished && !_.isPartialWithdrawal)
76
+ checkIsOperatingDeposit(isOperatingDeposit, _) &&
77
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
78
+ checkRangeByKeys(daysValue, ['minDays', 'maxDays'], _)
78
79
  );
79
80
  }) || DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS;
80
81
 
@@ -82,9 +83,12 @@ export const useBusinessDepositCalculatorParams = (
82
83
 
83
84
  const income = getDepositIncome(rate, userInputParams);
84
85
  const finalSum = moneyValue + income;
86
+ const sourceBookRows = data?.rows || [DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS];
85
87
 
86
88
  return {
87
89
  ...businessDepositCalculatorSourceBookParams,
90
+ ...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
91
+ ...getRangeByKeys(['minDays', 'maxDays'], sourceBookRows),
88
92
  ...userInputParams,
89
93
  isDisabledOperatingDeposit,
90
94
  income,
@@ -92,6 +96,14 @@ export const useBusinessDepositCalculatorParams = (
92
96
  };
93
97
  };
94
98
 
99
+ const checkIsOperatingDeposit = (
100
+ isOperatingDeposit: boolean,
101
+ sourceBookRow: BusinessDepositCalculatorSourceBookParams,
102
+ ) =>
103
+ isOperatingDeposit
104
+ ? sourceBookRow.isReplenished && sourceBookRow.isPartialWithdrawal
105
+ : !sourceBookRow.isReplenished && !sourceBookRow.isPartialWithdrawal;
106
+
95
107
  const getDepositIncome = (
96
108
  rate: number,
97
109
  userInputParams: BusinessDepositCalculatorUserInputParams,
@@ -1,5 +1,6 @@
1
1
  import { CREDIT_CALC_DEFAULT_DIR, DEFAULT_CREDIT_CALCULATOR_PARAMS } from './constants';
2
2
  import { getMonthlyPayment } from './getMonthlyPayment';
3
+ import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
3
4
  import { useCalculatorParams } from './useCalculatorParams';
4
5
 
5
6
  export interface CommonCreditParams {
@@ -38,7 +39,7 @@ export const useCreditCalculatorParams = (
38
39
  userInputParams: CreditCalculatorUserInputParams,
39
40
  sourceBookDir?: string,
40
41
  ): CreditCalculatorParams => {
41
- const { isInsurance, isSalaryClient, isStateEmployee, moneyValue } = userInputParams;
42
+ const { isInsurance, isSalaryClient, isStateEmployee, moneyValue, monthsValue } = userInputParams;
42
43
 
43
44
  const data = useCalculatorParams<CreditCalculatorData>(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
44
45
  const creditCalculatorSourceBookParams =
@@ -46,16 +47,21 @@ export const useCreditCalculatorParams = (
46
47
  return (
47
48
  isInsurance === _.isInsurance &&
48
49
  isSalaryClient === _.isSalaryClient &&
49
- isStateEmployee === _.isStateEmployee
50
+ isStateEmployee === _.isStateEmployee &&
51
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
52
+ checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _)
50
53
  );
51
54
  }) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
52
55
 
53
56
  const { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
54
57
  const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
55
58
  const monthlyPayment = getMonthlyPayment(finalRate, userInputParams);
59
+ const sourceBookRows = data?.rows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
56
60
 
57
61
  return {
58
62
  ...creditCalculatorSourceBookParams,
63
+ ...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
64
+ ...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
59
65
  ...userInputParams,
60
66
  finalRate,
61
67
  monthlyPayment,
@@ -1,9 +1,11 @@
1
1
  import { DEFAULT_DEPOSIT_CALCULATOR_PARAMS, DEPOSIT_CALC_DEFAULT_DIR } from './constants';
2
+ import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
2
3
  import { useCalculatorParams } from './useCalculatorParams';
3
4
 
4
5
  export interface CommonDepositParams {
5
6
  isMonthlyInterestPayment: boolean;
6
7
  }
8
+
7
9
  export interface DepositCalculatorSourceBookParams extends CommonDepositParams {
8
10
  minSum: number;
9
11
  maxSum: number;
@@ -32,22 +34,34 @@ export const useDepositCalculatorParams = (
32
34
  userInputParams: DepositCalculatorUserInputParams,
33
35
  sourceBookDir?: string,
34
36
  ): DepositCalculatorParams => {
35
- const { isMonthlyInterestPayment, moneyValue } = userInputParams;
37
+ const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
36
38
 
37
39
  const data = useCalculatorParams<DepositCalculatorData>(
38
40
  sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR,
39
41
  );
40
42
 
41
43
  const depositCalculatorSourceBookParams =
42
- data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment) ||
43
- DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
44
+ data?.rows?.find(
45
+ (_) =>
46
+ isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
47
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
48
+ checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _),
49
+ ) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
44
50
 
45
51
  const { rate } = depositCalculatorSourceBookParams;
46
52
 
47
53
  const income = getDepositIncome(rate, userInputParams);
48
54
  const finalSum = moneyValue + income;
55
+ const sourceBookRows = data?.rows || [DEFAULT_DEPOSIT_CALCULATOR_PARAMS];
49
56
 
50
- return { ...depositCalculatorSourceBookParams, ...userInputParams, income, finalSum };
57
+ return {
58
+ ...depositCalculatorSourceBookParams,
59
+ ...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
60
+ ...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
61
+ ...userInputParams,
62
+ income,
63
+ finalSum,
64
+ };
51
65
  };
52
66
 
53
67
  const getDepositIncome = (rate: number, userInputParams: DepositCalculatorUserInputParams) => {
@@ -52,10 +52,12 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
52
52
  gap={ITEMS_GAP}
53
53
  onVisibleIndicesChange={scroll.handleVisibleIndicesChange}
54
54
  >
55
- {renderChildren({
56
- ...rest,
57
- block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
58
- })}
55
+ {isBankHistoryCarousel
56
+ ? renderChildren({
57
+ ...rest,
58
+ block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
59
+ })
60
+ : renderChildren(rest)}
59
61
  </SwipeListContainer>
60
62
  <CarouselScrollButtons
61
63
  scroll={scroll}
@@ -4,6 +4,7 @@ import type { ComplexBenefitProps } from '../../ui-kit/BenefitItem/BenefitItemPr
4
4
  import { RichText } from '../../ui-kit/RichText/RichText';
5
5
  import { assertUnreachable } from '../../utils/assertUnreachable';
6
6
 
7
+ // TODO: Create universal function for this case
7
8
  export const renderBenefit =
8
9
  // Linter doesn't understand that switch processes all cases
9
10
  // eslint-disable-next-line consistent-return
@@ -3,6 +3,7 @@ import { Text } from '../../ui-kit/Text/Text';
3
3
  import { assertUnreachable } from '../../utils/assertUnreachable';
4
4
  import type { Benefit } from './ProductTileContent';
5
5
 
6
+ // TODO: Create universal function for this case
6
7
  export const renderBenefit =
7
8
  // Linter doesn't understand that switch processes all cases
8
9
  // eslint-disable-next-line consistent-return
@@ -5,9 +5,11 @@ import type { SizeVersion } from '../../model/SizeVersion';
5
5
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
6
6
  import { Heading } from '../../ui-kit/Heading/Heading';
7
7
  import { Img } from '../../ui-kit/Img/Img';
8
- import { checkIsIconRenderable } from '../../utils/checkIsIconRenderable';
8
+ import { RichText } from '../../ui-kit/RichText/RichText';
9
+ import { assertUnreachable } from '../../utils/assertUnreachable';
9
10
  import { getIconWithVersion } from '../../utils/getIconWithVersion';
10
- import type { Step, StepsBlockContent } from './StepsBlockContent';
11
+ import { checkCanRenderIcon } from './checkCanRenderIcon';
12
+ import type { DefaultStep, Step, StepsBlockContent } from './StepsBlockContent';
11
13
  import { STEPS_BLOCK_STYLE_MAPS } from './StepsBlockStyleMaps';
12
14
 
13
15
  export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {}
@@ -50,7 +52,7 @@ export const StepsBlock = JSX<StepsBlockProps>(
50
52
  {steps?.length ? (
51
53
  <div className={`box-border py-0.5 mb-0.5 mt-5`}>
52
54
  <div className="flex flex-col justify-between gap-x-[101px]">
53
- {steps.map(renderStepTitle(size, version, showLines))}
55
+ {steps.map(renderStep(size, version, showLines))}
54
56
  </div>
55
57
  </div>
56
58
  ) : null}
@@ -59,9 +61,31 @@ export const StepsBlock = JSX<StepsBlockProps>(
59
61
  },
60
62
  );
61
63
 
62
- const renderStepTitle =
64
+ // TODO: Create universal function for this case
65
+ const renderStep =
63
66
  (size: SizeVersion, version: BlockVersion, showLines: boolean) =>
67
+ // Linter doesn't understand that switch processes all cases
68
+ // eslint-disable-next-line consistent-return
64
69
  (step: Step, i: number, steps: Step[]) => {
70
+ const { type } = step;
71
+
72
+ if (!(type === 'default' || type === 'rte')) {
73
+ return null;
74
+ }
75
+
76
+ switch (type) {
77
+ case 'default':
78
+ return renderDefaultStep(size, version, showLines)(step, i, steps);
79
+ case 'rte':
80
+ return <RichText __html={step.__html} />;
81
+ default:
82
+ assertUnreachable(step);
83
+ }
84
+ };
85
+
86
+ const renderDefaultStep =
87
+ (size: SizeVersion, version: BlockVersion, showLines: boolean) =>
88
+ (step: DefaultStep, i: number, steps: Step[]) => {
65
89
  const isLastStep = steps.length - 1 === i;
66
90
  const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
67
91
  const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
@@ -106,7 +130,7 @@ const renderIconArea = (size: SizeVersion, version: BlockVersion) => (step: Step
106
130
  className={`${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`}
107
131
  >
108
132
  <span className={`font-medium flex self-center ${iconTextSize}`}>
109
- {checkIsIconRenderable(step?.icon) ? (
133
+ {checkCanRenderIcon(step?.icon) ? (
110
134
  <Img
111
135
  image={getIconWithVersion({ ...step.icon }, version)}
112
136
  width={iconSize}
@@ -12,6 +12,12 @@
12
12
  "iconRight": {
13
13
  "ui:field": "icon"
14
14
  }
15
+ },
16
+ "__html": {
17
+ "ui:widget": "html"
18
+ },
19
+ "type": {
20
+ "ui:widget": "hidden"
15
21
  }
16
22
  }
17
23
  }