@redneckz/wildless-cms-uni-blocks 0.9.4 → 0.9.6

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 (225) hide show
  1. package/bin/migration-scripts/0.8.29.js +1 -0
  2. package/bin/migration-scripts/0.9.1.js +5 -4
  3. package/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  4. package/bundle/BlockRenderer/renderBlock.d.ts +5 -1
  5. package/bundle/blocks.schema.json +1 -1
  6. package/bundle/bundle.umd.js +92 -58
  7. package/bundle/bundle.umd.min.js +1 -1
  8. package/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
  9. package/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  10. package/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  11. package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  12. package/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  13. package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  14. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  15. package/bundle/ui-kit/BlockWrapper.d.ts +0 -1
  16. package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  17. package/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  18. package/dist/BlockRenderer/renderBlock.d.ts +5 -1
  19. package/dist/BlockRenderer/renderBlock.js +2 -2
  20. package/dist/BlockRenderer/renderBlock.js.map +1 -1
  21. package/dist/components/Calculator/CalculatorContent.d.ts +15 -1
  22. package/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  23. package/dist/components/Calculator/CreditCalculatorForm.js +19 -4
  24. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  25. package/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  26. package/dist/components/Calculator/constants.js +1 -0
  27. package/dist/components/Calculator/constants.js.map +1 -1
  28. package/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  29. package/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
  30. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  31. package/dist/components/Carousel/Carousel.js +11 -13
  32. package/dist/components/Carousel/Carousel.js.map +1 -1
  33. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  34. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  35. package/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  36. package/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
  37. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  38. package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  39. package/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
  40. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  41. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  42. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  43. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  44. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  45. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  46. package/dist/components/StepsBlock/renderStep.js +3 -7
  47. package/dist/components/StepsBlock/renderStep.js.map +1 -1
  48. package/dist/components/VerticalLayout/VerticalLayout.js +6 -2
  49. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  50. package/dist/ui-kit/BlockWrapper.d.ts +0 -1
  51. package/dist/ui-kit/BlockWrapper.js +2 -2
  52. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  53. package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  54. package/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
  55. package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  56. package/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  57. package/lib/BlockRenderer/renderBlock.d.ts +5 -1
  58. package/lib/BlockRenderer/renderBlock.js +2 -2
  59. package/lib/BlockRenderer/renderBlock.js.map +1 -1
  60. package/lib/common.css +1 -1
  61. package/lib/components/Calculator/CalculatorContent.d.ts +15 -1
  62. package/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  63. package/lib/components/Calculator/CreditCalculatorForm.js +19 -4
  64. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  65. package/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  66. package/lib/components/Calculator/constants.js +1 -0
  67. package/lib/components/Calculator/constants.js.map +1 -1
  68. package/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  69. package/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
  70. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  71. package/lib/components/Carousel/Carousel.js +11 -13
  72. package/lib/components/Carousel/Carousel.js.map +1 -1
  73. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  74. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  75. package/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  76. package/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
  77. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  78. package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  79. package/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
  80. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  81. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  82. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  83. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  84. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  85. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  86. package/lib/components/StepsBlock/renderStep.js +3 -7
  87. package/lib/components/StepsBlock/renderStep.js.map +1 -1
  88. package/lib/components/VerticalLayout/VerticalLayout.js +6 -2
  89. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  90. package/lib/ui-kit/BlockWrapper.d.ts +0 -1
  91. package/lib/ui-kit/BlockWrapper.js +2 -2
  92. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  93. package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  94. package/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
  95. package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  96. package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  97. package/mobile/bundle/BlockRenderer/renderBlock.d.ts +5 -1
  98. package/mobile/bundle/bundle.umd.js +10 -7
  99. package/mobile/bundle/bundle.umd.min.js +1 -1
  100. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
  101. package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  102. package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  103. package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  104. package/mobile/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  105. package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  106. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  107. package/mobile/bundle/ui-kit/BlockWrapper.d.ts +0 -1
  108. package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  109. package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  110. package/mobile/dist/BlockRenderer/renderBlock.d.ts +5 -1
  111. package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
  112. package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
  113. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +15 -1
  114. package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  115. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +19 -4
  116. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  117. package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  118. package/mobile/dist/components/Calculator/constants.js +1 -0
  119. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  120. package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  121. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
  122. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  123. package/mobile/dist/components/Carousel/Carousel.js +11 -13
  124. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  125. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  126. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  127. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  128. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
  129. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  130. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  131. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
  132. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  133. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  134. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  135. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  136. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  137. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  138. package/mobile/dist/components/StepsBlock/renderStep.js +3 -7
  139. package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
  140. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +6 -2
  141. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  142. package/mobile/dist/ui-kit/BlockWrapper.d.ts +0 -1
  143. package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
  144. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  145. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  146. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
  147. package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  148. package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
  149. package/mobile/lib/BlockRenderer/renderBlock.d.ts +5 -1
  150. package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
  151. package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
  152. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +15 -1
  153. package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
  154. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +19 -4
  155. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  156. package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
  157. package/mobile/lib/components/Calculator/constants.js +1 -0
  158. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  159. package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
  160. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
  161. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  162. package/mobile/lib/components/Carousel/Carousel.js +11 -13
  163. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  164. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  165. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  166. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
  167. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
  168. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  169. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
  170. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
  171. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  172. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
  173. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  174. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  175. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
  176. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  177. package/mobile/lib/components/StepsBlock/renderStep.js +3 -7
  178. package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
  179. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +6 -2
  180. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  181. package/mobile/lib/ui-kit/BlockWrapper.d.ts +0 -1
  182. package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
  183. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  184. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
  185. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
  186. package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
  187. package/mobile/src/BlockRenderer/BlockRendererOptions.ts +0 -2
  188. package/mobile/src/BlockRenderer/renderBlock.tsx +7 -3
  189. package/mobile/src/components/Calculator/Calculator.example.json +6 -0
  190. package/mobile/src/components/Calculator/CalculatorContent.ts +16 -1
  191. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
  192. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
  193. package/mobile/src/components/Calculator/constants.ts +1 -0
  194. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
  195. package/mobile/src/components/Carousel/Carousel.tsx +9 -11
  196. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
  197. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
  198. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
  199. package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
  200. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
  201. package/mobile/src/components/StepsBlock/renderStep.tsx +6 -5
  202. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
  203. package/mobile/src/ui-kit/BlockWrapper.tsx +3 -6
  204. package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
  205. package/package.json +1 -1
  206. package/src/BlockRenderer/BlockRendererOptions.ts +0 -2
  207. package/src/BlockRenderer/renderBlock.tsx +7 -3
  208. package/src/components/Calculator/Calculator.example.json +6 -0
  209. package/src/components/Calculator/Calculator.fixture.tsx +6 -0
  210. package/src/components/Calculator/CalculatorContent.ts +16 -1
  211. package/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
  212. package/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
  213. package/src/components/Calculator/constants.ts +1 -0
  214. package/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
  215. package/src/components/Carousel/Carousel.tsx +9 -11
  216. package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
  217. package/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
  218. package/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
  219. package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
  220. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
  221. package/src/components/StepsBlock/StepsBlock.fixture.tsx +3 -3
  222. package/src/components/StepsBlock/renderStep.tsx +6 -5
  223. package/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
  224. package/src/ui-kit/BlockWrapper.tsx +3 -6
  225. package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAK9C,MAAM,YAAY,GAChB,0GAA0G,CAAC;AAE7G,MAAM,uBAAuB,GAAG,CAAC,KAAe,EAAE,EAAE,CAClD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,oBAAoB,CAAC;AAItE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C,CAAC,EACC,SAAS,GAAG,EAAE,EACd,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,KAAK,GAAG,EAAE,EACV,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,aAAa,GA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ACtE,eAAK,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,CAAC,aAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,EAClE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IACpC,CACP,CAAC"}
1
+ {"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,YAAY,GAChB,0GAA0G,CAAC;AAE7G,MAAM,uBAAuB,GAAG,CAAC,KAAe,EAAE,EAAE,CAClD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,oBAAoB,CAAC;AAItE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C,CAAC,EACC,SAAS,GAAG,EAAE,EACd,WAA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Ae,GAAG,CAAC,IAAyB,EAAE,KAAe,EAAE,EAAE,CAAC,CACtE,eAAK,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,CAAC,aAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,EAClE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IACpC,CACP,CAAC"}
@@ -3,13 +3,9 @@ import { Button } from '../../ui-kit/Button/Button.js';
3
3
  import { List } from '../../ui-kit/List/List.js';
4
4
  import { RichText } from '../../ui-kit/RichText/RichText.js';
5
5
  import { Text } from '../../ui-kit/Text/Text.js';
6
- import { assertUnreachable } from '../../utils/assertUnreachable.js';
7
6
  import { style } from '../../utils/style.js';
8
7
  // 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) => {
8
+ export const renderStep = (props) => (step, i, arr) => {
13
9
  const { type } = step;
14
10
  if (!(type === 'default' || type === 'rte')) {
15
11
  return null;
@@ -18,9 +14,9 @@ export const renderStep = (props) =>
18
14
  case 'default':
19
15
  return renderDefaultStep(props)(step, i, arr);
20
16
  case 'rte':
21
- return _jsx(RichText, { __html: step.__html });
17
+ return (_jsx("div", { className: style('text-center', getContainerWidth(arr.length)), children: _jsx(RichText, { __html: step.__html }) }, String(i)));
22
18
  default:
23
- assertUnreachable(step);
19
+ return null;
24
20
  }
25
21
  };
26
22
  const renderDefaultStep = ({ styleMap, isMainButton, version }) => (step, i, arr) => {
@@ -1 +1 @@
1
- {"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";AAGA,OAAO,E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,CAC9B,aAED,eAAK,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,aAAa,CAAC,aAC7D,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,YAAE,KAAK,GAAQ,GAC/B,CACP,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAC,4BAA4B,aACxC,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,QAAQ,CAAC,WAAW,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EAC/E,KAAC,IAAI,IACH,SAAS,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"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
+ import { renderBlock } from '../../BlockRenderer/renderBlock.js';
3
4
  import { renderChildren } from '../../BlockRenderer/renderChildren.js';
4
5
  import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
5
6
  import { style } from '../../utils/style.js';
@@ -10,9 +11,12 @@ const alignStyle = {
10
11
  center: 'items-center',
11
12
  right: 'items-end',
12
13
  };
13
- export const VerticalLayout = JSX(({ className = '', gap = '', align = 'stretch', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, options, ...rest }) => {
14
+ export const VerticalLayout = JSX(({ className = '', gap = '', align = 'stretch', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => {
14
15
  const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
15
- return (_jsx(BlockWrapper, { className: style('flex flex-col [&>*]:max-w-full', isPadding ? 'p-12' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } }) }));
16
+ return (_jsx(BlockWrapper, { className: style('flex flex-col [&>*]:max-w-full', isPadding ? 'p-12' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({
17
+ ...rest,
18
+ renderProps: (block, options) => renderBlock(block, options, { className: innerPaddingStyle }),
19
+ }) }));
16
20
  });
17
21
  VerticalLayout.childrenTypes = [];
18
22
  //# sourceMappingURL=VerticalLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalLayout.js","sourceRoot":"","sources":["../../../src/components/VerticalLayout/VerticalLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAK1D,MAAM,UAAU,GAAyC;IACvD,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAkC,GAAG,CAC9D,CAAC,EACC,SAAS,GAAG,EAAE,EACd,GAAG,GAAG,EAAE,EACR,KAAK,GAAG,SAAS,EACjB,SAAS,GAAG,KAAK,EACjB,cAAc,GAAG,IAAI,EACrB,OAAO,GAAG,aAAa,EACvB,OAAO,GAAG,KAAK,EACf,OAAO,EACP,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,iBAAiB,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvD,OAAO,CACL,KAAC,YAAY,IACX,SAAS,EAAE,KAAK,CACd,gCAAgC,EAChC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EACvB,SAAS,CAAC,GAAG,CAAC,EACd,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,EAC1B,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,KACZ,IAAI,YAEP,cAAc,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,CAAC,GACtE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,aAAa,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"VerticalLayout.js","sourceRoot":"","sources":["../../../src/components/VerticalLayout/VerticalLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAK1D,MAAM,UAAU,GAAyC;IACvD,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAkC,GAAG,CAC9D,CAAC,EACC,SAAS,GAAG,EAAE,EACd,GAAG,GAAG,EAAE,EACR,KAAK,GAAG,SAAS,EACjB,SAAS,GAAG,KAAK,EACjB,cAAc,GAAG,IAAI,EACrB,OAAO,GAAG,aAAa,EACvB,OAAO,GAAG,KAAK,EACf,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,iBAAiB,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvD,OAAO,CACL,KAAC,YAAY,IACX,SAAS,EAAE,KAAK,CACd,gCAAgC,EAChC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EACvB,SAAS,CAAC,GAAG,CAAC,EACd,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,EAC1B,SAAS,CACV,EACD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,KACZ,IAAI,YAEP,cAAc,CAAC;YACd,GAAG,IAAI;YACP,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAC9B,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;SAChE,CAAC,GACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,aAAa,GAAG,EAAE,CAAC"}
@@ -3,7 +3,6 @@ import type { UniBlockProps } from '../model/JSXBlock';
3
3
  interface BlockWrapperProps extends UniBlockProps {
4
4
  tag?: keyof HTMLElementTagNameMap;
5
5
  role?: string;
6
- extraProps?: Record<string, any>;
7
6
  }
8
7
  export declare const blockStyles: Record<BlockVersion, string>;
9
8
  export declare const BlockWrapper: import("@redneckz/uni-jsx").UNIComponent<BlockWrapperProps, any, any>;
@@ -11,14 +11,14 @@ export const blockStyles = {
11
11
  transparent: 'bg-transparent text-primary-text',
12
12
  '': '',
13
13
  };
14
- export const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, extraProps = {}, children, }) => {
14
+ export const BlockWrapper = JSX(({ className = '', version = 'primary', isTheme = true, block, tag = 'section', role, children, }) => {
15
15
  const Tag = tag;
16
16
  const ref = useBlockIntersectionObserver(block);
17
17
  const [isHidden, setHidden] = useState(false);
18
18
  useEffect(() => defaultEventBus.subscribe('tab', (event) => {
19
19
  setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
20
20
  }), [block]);
21
- return (_jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, ...extraProps, children: children }));
21
+ return (_jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, children: children }));
22
22
  });
23
23
  const groupStyle = (isGroup) => (isGroup ? 'group' : '');
24
24
  //# sourceMappingURL=BlockWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockWrapper.js","sourceRoot":"","sources":["../../src/ui-kit/BlockWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG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AAC,QAAQ,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,SAAS,CACP,GAAG,EAAE,CACH,eAAe,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;QACzC,SAAS,CACP,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CACrF,CAAC;IACJ,CAAC,CAAC,EACJ,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,KAAK,CACd,UAAU,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,EACvC,WAAW,CAAC,OAAO,CAAC,EACpB,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACxB,SAAS,CACV,KACG,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACnD,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACpD,IAAI,EAAE,IAAI,YAET,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Target } from '../../model/LinkProps';
2
+ interface LinkWrapperProps {
3
+ className?: string;
4
+ href?: string;
5
+ target?: Target;
6
+ }
7
+ export declare const LinkWrapper: import("@redneckz/uni-jsx").UNIComponent<LinkWrapperProps, any, any>;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { useLink } from '../../hooks/useLink.js';
4
+ export const LinkWrapper = JSX(({ className = '', href, target, children }) => {
5
+ const link = useLink();
6
+ const linkProps = link({ href, target });
7
+ const Tag = href ? 'a' : 'div';
8
+ return (_jsx(Tag, { className: className, ...(href ? linkProps : {}), children: children }));
9
+ });
10
+ //# sourceMappingURL=LinkWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkWrapper.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkWrapper/LinkWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAS9C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9F,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAE/B,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,SAAS,KAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,YACnD,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -9,6 +9,4 @@ export interface BlockRendererOptions {
9
9
  blocksRegistry?: BlocksRegistry;
10
10
  parent?: Slot;
11
11
  ancestors?: BlockAncestors;
12
- className?: string;
13
- extraProps?: Record<string, any>;
14
12
  }
@@ -8,14 +8,18 @@ const DEFAULT_ANCESTORS: BlockAncestors = [];
8
8
 
9
9
  const defaultStyle = 'col-span-12';
10
10
 
11
- export function renderBlock(block: BlockDef, options: BlockRendererOptions) {
11
+ type ExtraProps = Partial<Record<string, any> & { className: string }>;
12
+
13
+ export function renderBlock(
14
+ block: BlockDef,
15
+ options: BlockRendererOptions,
16
+ { className, ...extraProps }: ExtraProps = {},
17
+ ) {
12
18
  const {
13
19
  key,
14
20
  blockDecorator = defaultBlockDecorator,
15
21
  blocksRegistry = {},
16
22
  ancestors = DEFAULT_ANCESTORS,
17
- className = '',
18
- extraProps = {},
19
23
  } = options;
20
24
  const { type } = block;
21
25
 
@@ -16,6 +16,12 @@
16
16
  "version": "primary"
17
17
  }
18
18
  ],
19
+ "paramsViewSettings": {
20
+ "isShowSalaryClient": true,
21
+ "isShowStateEmployee": true,
22
+ "isShowPensionClient": true,
23
+ "isShowInsurance": true
24
+ },
19
25
  "footnote": "Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка. "
20
26
  }
21
27
  }
@@ -10,6 +10,21 @@ export type CommonCalculatorProps = Footnote &
10
10
  sourceBookDir?: string;
11
11
  };
12
12
 
13
+ export interface CreditCalculatorParamsViewSettings {
14
+ /** @title Получаю зарплату на счёт в Россельхозбанке */
15
+ isShowSalaryClient?: boolean;
16
+ /** @title Работаю в бюджетной организации */
17
+ isShowStateEmployee?: boolean;
18
+ /** @title Получаю пенсию на карту Россельхозбанка */
19
+ isShowPensionClient?: boolean;
20
+ /** @title Комплексная страховая защита */
21
+ isShowInsurance?: boolean;
22
+ }
23
+ export interface CreditCalculatorProps extends CommonCalculatorProps {
24
+ /** @title Настройка отображения чекбоксов */
25
+ paramsViewSettings?: CreditCalculatorParamsViewSettings;
26
+ }
27
+
13
28
  export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
14
29
  /** @title Сноска снизу блока */
15
30
  bottomFootnote?: string;
@@ -53,7 +68,7 @@ export interface CalculatorParams {
53
68
  * @default {"calcType": "CreditCalculatorForm"}
54
69
  */
55
70
  export type CreditCalculatorParamsDef = TitleProps &
56
- CommonCalculatorProps & {
71
+ CreditCalculatorProps & {
57
72
  calcType: 'CreditCalculatorForm';
58
73
  };
59
74
 
@@ -3,7 +3,10 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
4
4
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
5
5
  import { style } from '../../utils/style';
6
- import type { CommonCalculatorProps } from './CalculatorContent';
6
+ import type {
7
+ CreditCalculatorParamsViewSettings,
8
+ CreditCalculatorProps,
9
+ } from './CalculatorContent';
7
10
  import { CalculatorValueBlock } from './CalculatorValueBlock';
8
11
  import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants';
9
12
  import { Rate } from './Rate';
@@ -11,18 +14,23 @@ import { renderFootnote } from './renderFootnote';
11
14
  import { renderMonthsInput } from './renderMonthsInput';
12
15
  import { renderPaymentType } from './renderPaymentType';
13
16
  import { renderWantedSumInput } from './renderWantedSumInput';
14
- import { useCreditCalculatorParams } from './useCreditCalculatorParams';
17
+ import { CreditCalculatorParams, useCreditCalculatorParams } from './useCreditCalculatorParams';
15
18
 
16
- export interface CreditCalculatorProp extends CommonCalculatorProps {
19
+ export interface CreditCalculatorProp extends CreditCalculatorProps {
17
20
  className?: string;
18
21
  }
19
22
 
20
23
  export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
21
- ({ className = '', sourceBookDir, buttons, footnote }) => {
24
+ ({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
22
25
  const [isAnnuity, toggleIsAnnuity] = useState(false);
23
- const [isInsurance, toggleIsInsurance] = useState(true);
24
26
  const [isSalaryClient, toggleIsSalaryClient] = useState(false);
27
+ const handleIsSalaryClient = useCallback((_: boolean) => toggleIsSalaryClient(_), []);
25
28
  const [isStateEmployee, toggleIsStateEmployee] = useState(false);
29
+ const handleIsStateEmployee = useCallback((_: boolean) => toggleIsStateEmployee(_), []);
30
+ const [isPensionClient, toggleIsPensionClient] = useState(false);
31
+ const handleIsPensionClient = useCallback((_: boolean) => toggleIsPensionClient(_), []);
32
+ const [isInsurance, toggleIsInsurance] = useState(true);
33
+ const handleIsInsurance = useCallback((_: boolean) => toggleIsInsurance(_), []);
26
34
  const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
27
35
  const handleMoneyValue = useCallback((_: number) => setMoneyValue(_), []);
28
36
  const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
@@ -31,11 +39,16 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
31
39
  isAnnuity,
32
40
  isInsurance,
33
41
  isSalaryClient,
42
+ isPensionClient,
34
43
  isStateEmployee,
35
44
  moneyValue,
36
45
  monthsValue,
37
46
  };
38
- const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
47
+ const calculatorParams = useCreditCalculatorParams(
48
+ userInputParams,
49
+ sourceBookDir,
50
+ paramsViewSettings,
51
+ );
39
52
 
40
53
  return (
41
54
  <section className={style('flex justify-between', className)}>
@@ -47,31 +60,17 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
47
60
  )}
48
61
  {renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue)}
49
62
  <div className="mt-7">
50
- <Checkbox
51
- text="Получаю зарплату на счёт в Россельхозбанке"
52
- checked={isSalaryClient}
53
- onChange={toggleIsSalaryClient}
54
- />
55
- <Checkbox
56
- className="mt-3"
57
- text="Работаю в бюджетной организации"
58
- checked={isStateEmployee}
59
- onChange={toggleIsStateEmployee}
60
- />
61
- <Checkbox
62
- className="mt-3"
63
- text="Комплексная страховая защита"
64
- checked={isInsurance}
65
- onChange={toggleIsInsurance}
66
- />
63
+ {renderCreditParamsForm({
64
+ ...calculatorParams,
65
+ ...paramsViewSettings,
66
+ handleIsSalaryClient,
67
+ handleIsStateEmployee,
68
+ handleIsPensionClient,
69
+ handleIsInsurance,
70
+ })}
67
71
  </div>
68
72
  </div>
69
- <Rate
70
- title="Ставка"
71
- rate={calculatorParams.rate}
72
- rateBlockClassName="tracking-[-25px]"
73
- unit="%"
74
- />
73
+ {renderRate(calculatorParams.rate)}
75
74
  <div className="w-full max-w-[350px]">
76
75
  <CalculatorValueBlock
77
76
  title={'Ежемесячный платеж'}
@@ -90,3 +89,64 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
90
89
  );
91
90
  },
92
91
  );
92
+
93
+ const renderRate = (rate: number) => (
94
+ <Rate title="Ставка" rate={rate} rateBlockClassName="tracking-[-25px]" unit="%" />
95
+ );
96
+
97
+ type CreditParamsFormProps = CreditCalculatorParams &
98
+ CreditCalculatorParamsViewSettings & {
99
+ handleIsSalaryClient?: (value: boolean) => void;
100
+ handleIsStateEmployee?: (value: boolean) => void;
101
+ handleIsPensionClient?: (value: boolean) => void;
102
+ handleIsInsurance?: (value: boolean) => void;
103
+ };
104
+
105
+ const renderCreditParamsForm = ({
106
+ isSalaryClient,
107
+ isStateEmployee,
108
+ isPensionClient,
109
+ isInsurance,
110
+ isShowSalaryClient,
111
+ isShowStateEmployee,
112
+ isShowPensionClient,
113
+ isShowInsurance,
114
+ handleIsSalaryClient,
115
+ handleIsStateEmployee,
116
+ handleIsPensionClient,
117
+ handleIsInsurance,
118
+ }: CreditParamsFormProps) => (
119
+ <div>
120
+ {isShowSalaryClient ? (
121
+ <Checkbox
122
+ text="Получаю зарплату на счёт в Россельхозбанке"
123
+ checked={isSalaryClient}
124
+ onChange={handleIsSalaryClient}
125
+ />
126
+ ) : null}
127
+ {isShowStateEmployee ? (
128
+ <Checkbox
129
+ className="mt-3"
130
+ text="Работаю в бюджетной организации"
131
+ checked={isStateEmployee}
132
+ onChange={handleIsStateEmployee}
133
+ />
134
+ ) : null}
135
+ {isShowPensionClient ? (
136
+ <Checkbox
137
+ className="mt-3"
138
+ text="Получаю пенсию на карту Россельхозбанка"
139
+ checked={isPensionClient}
140
+ onChange={handleIsPensionClient}
141
+ />
142
+ ) : null}
143
+ {isShowInsurance ? (
144
+ <Checkbox
145
+ className="mt-3"
146
+ text="Комплексная страховая защита"
147
+ checked={isInsurance}
148
+ onChange={handleIsInsurance}
149
+ />
150
+ ) : null}
151
+ </div>
152
+ );
@@ -4,7 +4,7 @@ import { JSX } from '@redneckz/uni-jsx';
4
4
  import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
5
5
  import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
6
6
  import { style } from '../../utils/style';
7
- import { CommonCalculatorProps, DepositCalculatorParams } from './CalculatorContent';
7
+ import { CommonCalculatorProps } from './CalculatorContent';
8
8
  import { CalculatorValueBlock } from './CalculatorValueBlock';
9
9
  import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants';
10
10
  import { Rate } from './Rate';
@@ -15,7 +15,7 @@ import { renderRegistrationType } from './renderRegistrationType';
15
15
  import { renderWantedSumInput } from './renderWantedSumInput';
16
16
  import { useDepositCalculatorParams } from './useDepositCalculatorParams';
17
17
 
18
- export interface DepositCalculatorProp extends DepositCalculatorParams, CommonCalculatorProps {
18
+ export interface DepositCalculatorProp extends CommonCalculatorProps {
19
19
  className?: string;
20
20
  }
21
21
 
@@ -27,6 +27,7 @@ export const DEFAULT_CREDIT_CALCULATOR_PARAMS: CreditCalculatorSourceBookParams
27
27
  maxMonths: DEFAULT_MAX_MONTHS,
28
28
  rate: 0,
29
29
  isSalaryClient: true,
30
+ isPensionClient: false,
30
31
  isStateEmployee: true,
31
32
  isInsurance: true,
32
33
  };
@@ -1,3 +1,4 @@
1
+ import type { CreditCalculatorParamsViewSettings } from './CalculatorContent';
1
2
  import { CREDIT_CALC_DEFAULT_DIR, DEFAULT_CREDIT_CALCULATOR_PARAMS } from './constants';
2
3
  import { getMonthlyPayment } from './getMonthlyPayment';
3
4
  import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
@@ -6,6 +7,7 @@ import { useCalculatorParams } from './useCalculatorParams';
6
7
  export interface CommonCreditParams {
7
8
  isInsurance: boolean;
8
9
  isSalaryClient: boolean;
10
+ isPensionClient: boolean;
9
11
  isStateEmployee: boolean;
10
12
  }
11
13
  export interface CreditCalculatorSourceBookParams extends CommonCreditParams {
@@ -35,18 +37,44 @@ export type CreditCalculatorData = {
35
37
  export const useCreditCalculatorParams = (
36
38
  userInputParams: CreditCalculatorUserInputParams,
37
39
  sourceBookDir?: string,
40
+ paramsViewSettings?: CreditCalculatorParamsViewSettings,
38
41
  ): CreditCalculatorParams => {
39
- const { isInsurance, isSalaryClient, isStateEmployee, moneyValue, monthsValue } = userInputParams;
40
-
42
+ const { moneyValue, monthsValue } = userInputParams;
41
43
  const data = useCalculatorParams<CreditCalculatorData>(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
42
44
  const creditCalculatorSourceBookParams =
43
- data?.rows?.find((_) => {
45
+ data?.rows?.find((row) => {
46
+ const isExcludeSalaryClient = !paramsViewSettings?.isShowSalaryClient;
47
+ const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
48
+ const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
49
+ const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
50
+
44
51
  return (
45
- isInsurance === _.isInsurance &&
46
- isSalaryClient === _.isSalaryClient &&
47
- isStateEmployee === _.isStateEmployee &&
48
- checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
49
- checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _)
52
+ checkRowByParam({
53
+ row,
54
+ userInputParams,
55
+ paramKey: 'isSalaryClient',
56
+ isExclude: isExcludeSalaryClient,
57
+ }) &&
58
+ checkRowByParam({
59
+ row,
60
+ userInputParams,
61
+ paramKey: 'isStateEmployee',
62
+ isExclude: isExcludeStateEmployee,
63
+ }) &&
64
+ checkRowByParam({
65
+ row,
66
+ userInputParams,
67
+ paramKey: 'isPensionClient',
68
+ isExclude: isExcludePensionClient,
69
+ }) &&
70
+ checkRowByParam({
71
+ row,
72
+ userInputParams,
73
+ paramKey: 'isInsurance',
74
+ isExclude: isExcludeInsurance,
75
+ }) &&
76
+ checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
77
+ checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)
50
78
  );
51
79
  }) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
52
80
 
@@ -62,3 +90,13 @@ export const useCreditCalculatorParams = (
62
90
  monthlyPayment,
63
91
  };
64
92
  };
93
+
94
+ interface CheckRowByParamProps {
95
+ row: CreditCalculatorSourceBookParams;
96
+ userInputParams: CreditCalculatorUserInputParams;
97
+ paramKey: string;
98
+ isExclude: boolean;
99
+ }
100
+
101
+ const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }: CheckRowByParamProps) =>
102
+ isExclude || userInputParams[paramKey] === row[paramKey];
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { renderBlock } from '../../BlockRenderer/renderBlock';
3
4
  import { renderChildren } from '../../BlockRenderer/renderChildren';
4
5
  import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
5
6
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
@@ -24,7 +25,6 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
24
25
  isCyclic = false,
25
26
  arrowsPadded = true,
26
27
  isPadding = true,
27
- options,
28
28
  ...rest
29
29
  }) => {
30
30
  const { blocks: childBlocks } = rest.block || {};
@@ -59,18 +59,16 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
59
59
  gap={ITEMS_GAP}
60
60
  onVisibleIndicesChange={scroll.handleVisibleIndicesChange}
61
61
  >
62
- {isBankHistoryCarousel
63
- ? renderChildren({
64
- ...rest,
65
- options: {
66
- ...options,
67
- extraProps: {
62
+ {renderChildren({
63
+ ...rest,
64
+ renderProps: isBankHistoryCarousel
65
+ ? (block, options) =>
66
+ renderBlock(block, options, {
68
67
  blocksLength: childBlocks?.length,
69
68
  activeIndex: activeIndex,
70
- },
71
- },
72
- })
73
- : renderChildren({ ...rest, options })}
69
+ })
70
+ : renderBlock,
71
+ })}
74
72
  </SwipeListContainer>
75
73
  <CarouselScrollButtons
76
74
  scroll={scroll}
@@ -52,7 +52,8 @@ export const CarouselCatalogCard = JSX<CarouselCatalogCardProps>(
52
52
  );
53
53
 
54
54
  const renderColorOption = (color: ProductColorVersion, i: number) => (
55
- <span
55
+ <div
56
+ role="figure"
56
57
  key={String(i)}
57
58
  className={`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}`}
58
59
  />
@@ -1,41 +1,34 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
2
3
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
3
- import { getIconWithVersion } from '../../utils/getIconWithVersion';
4
4
  import { Heading } from '../../ui-kit/Heading/Heading';
5
5
  import { Img } from '../../ui-kit/Img/Img';
6
- import { style } from '../../utils/style';
6
+ import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
7
7
  import { Text } from '../../ui-kit/Text/Text';
8
- import { useLink } from '../../hooks/useLink';
8
+ import { getIconWithVersion } from '../../utils/getIconWithVersion';
9
+ import { style } from '../../utils/style';
9
10
  import type { CarouselEventCardContent } from './CarouselEventCardContent';
10
- import type { UniBlockProps } from '../../model/JSXBlock';
11
11
 
12
12
  export interface CarouselEventCardProps extends CarouselEventCardContent, UniBlockProps {}
13
13
 
14
14
  export const CarouselEventCard = JSX<CarouselEventCardProps>(
15
15
  ({ className = '', icon, title, description, href, target, ...rest }) => {
16
- const link = useLink();
17
- const adjustedProps = link({ href, target });
18
- const tagName = href ? 'a' : 'section';
19
-
20
16
  return (
21
- <BlockWrapper
22
- className={style('flex flex-col w-[365px]', className)}
23
- extraProps={adjustedProps}
24
- tag={tagName}
25
- {...rest}
26
- >
27
- {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
28
- {icon?.src ? <Img image={icon} /> : null}
29
- {title ? (
30
- <Heading headingType="h6" as="h4" className="text-left mb-2" title={title} />
31
- ) : null}
32
- {description ? (
33
- <div className="mb-4">
34
- <Text font="font-light" size="text-s" color="text-secondary-text">
35
- {description}
36
- </Text>
37
- </div>
38
- ) : null}
17
+ <BlockWrapper className={style('w-[365px]', className)} {...rest}>
18
+ <LinkWrapper className="flex flex-col" href={href} target={target}>
19
+ {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
20
+ {icon?.src ? <Img image={icon} /> : null}
21
+ {title ? (
22
+ <Heading headingType="h6" as="h4" className="text-left mb-2" title={title} />
23
+ ) : null}
24
+ {description ? (
25
+ <div className="mb-4">
26
+ <Text font="font-light" size="text-s" color="text-secondary-text">
27
+ {description}
28
+ </Text>
29
+ </div>
30
+ ) : null}
31
+ </LinkWrapper>
39
32
  </BlockWrapper>
40
33
  );
41
34
  },