@redneckz/wildless-cms-uni-blocks 0.13.6 → 0.13.8

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 (378) hide show
  1. package/bin/migration-scripts/0.13.6.js +33 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +120 -93
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/UnknownRate.d.ts +1 -0
  6. package/bundle/components/Calculator/renderRate.d.ts +2 -1
  7. package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  8. package/bundle/components/Carousel/CarouselContent.d.ts +2 -2
  9. package/bundle/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
  10. package/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  11. package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  12. package/bundle/ui-kit/Badge/Badge.d.ts +6 -0
  13. package/bundle/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  14. package/bundle/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  15. package/bundle/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  16. package/bundle/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  17. package/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -2
  18. package/dist/components/Blocks.mobile.js +6 -0
  19. package/dist/components/Blocks.mobile.js.map +1 -1
  20. package/dist/components/Bonus/Bonus.js +1 -2
  21. package/dist/components/Bonus/Bonus.js.map +1 -1
  22. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  23. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  24. package/dist/components/Calculator/RefinancingCalculatorForm.js +6 -3
  25. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  26. package/dist/components/Calculator/UnknownRate.d.ts +1 -0
  27. package/dist/components/Calculator/UnknownRate.js +1 -1
  28. package/dist/components/Calculator/UnknownRate.js.map +1 -1
  29. package/dist/components/Calculator/constants.js +2 -2
  30. package/dist/components/Calculator/constants.js.map +1 -1
  31. package/dist/components/Calculator/renderRate.d.ts +2 -1
  32. package/dist/components/Calculator/renderRate.js +5 -5
  33. package/dist/components/Calculator/renderRate.js.map +1 -1
  34. package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  35. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  36. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  37. package/dist/components/Calculator/useCreditCalculatorParams.js +1 -4
  38. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  39. package/dist/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  40. package/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  41. package/dist/components/Carousel/CarouselContent.d.ts +2 -2
  42. package/dist/components/Carousel/renderCarouselCards.js +1 -0
  43. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  44. package/dist/components/CarouselEventCard/CarouselEventCard.js +2 -3
  45. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  46. package/dist/components/ErrorBlock/ErrorBlock.js +2 -3
  47. package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
  48. package/dist/components/Footer/TextInformation.js +2 -1
  49. package/dist/components/Footer/TextInformation.js.map +1 -1
  50. package/dist/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
  51. package/dist/components/HorizontalLayout/HorizontalLayout.js +8 -1
  52. package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  53. package/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  54. package/dist/components/InvestmentInfo/InvestmentInfo.js +1 -1
  55. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  56. package/dist/components/MortgageFiltration/MortgageFiltration.js +10 -15
  57. package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  58. package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  59. package/dist/ui-kit/Badge/Badge.d.ts +6 -0
  60. package/dist/ui-kit/Badge/Badge.js +18 -0
  61. package/dist/ui-kit/Badge/Badge.js.map +1 -0
  62. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  63. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  64. package/dist/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  65. package/dist/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  66. package/dist/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  67. package/dist/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  68. package/dist/ui-kit/BaseFiltration/getBadgeCount.js +6 -0
  69. package/dist/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  70. package/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  71. package/{mobile/dist/components/MortgageFiltration/HotFilterRecord.js → dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  72. package/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  73. package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  74. package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  75. package/dist/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  76. package/dist/ui-kit/BaseFiltration/useHotFilters.js +26 -0
  77. package/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  78. package/dist/ui-kit/BaseTile/BaseTile.js +1 -5
  79. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  80. package/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  81. package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  82. package/dist/ui-kit/TabsControl/TabItem.d.ts +5 -2
  83. package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  84. package/dist/ui-kit/TabsControl/TabItemInner.js +2 -2
  85. package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  86. package/lib/common.css +1 -1
  87. package/lib/components/Blocks.mobile.js +6 -0
  88. package/lib/components/Blocks.mobile.js.map +1 -1
  89. package/lib/components/Bonus/Bonus.js +1 -2
  90. package/lib/components/Bonus/Bonus.js.map +1 -1
  91. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  92. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  93. package/lib/components/Calculator/RefinancingCalculatorForm.js +6 -3
  94. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  95. package/lib/components/Calculator/UnknownRate.d.ts +1 -0
  96. package/lib/components/Calculator/UnknownRate.js +1 -1
  97. package/lib/components/Calculator/UnknownRate.js.map +1 -1
  98. package/lib/components/Calculator/constants.js +2 -2
  99. package/lib/components/Calculator/constants.js.map +1 -1
  100. package/lib/components/Calculator/renderRate.d.ts +2 -1
  101. package/lib/components/Calculator/renderRate.js +5 -5
  102. package/lib/components/Calculator/renderRate.js.map +1 -1
  103. package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  104. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  105. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  106. package/lib/components/Calculator/useCreditCalculatorParams.js +1 -4
  107. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  108. package/lib/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  109. package/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  110. package/lib/components/Carousel/CarouselContent.d.ts +2 -2
  111. package/lib/components/Carousel/renderCarouselCards.js +1 -0
  112. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  113. package/lib/components/CarouselEventCard/CarouselEventCard.js +2 -3
  114. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  115. package/lib/components/ErrorBlock/ErrorBlock.js +2 -3
  116. package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
  117. package/lib/components/Footer/TextInformation.js +2 -1
  118. package/lib/components/Footer/TextInformation.js.map +1 -1
  119. package/lib/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
  120. package/lib/components/HorizontalLayout/HorizontalLayout.fixture.d.ts +1 -0
  121. package/lib/components/HorizontalLayout/HorizontalLayout.js +8 -1
  122. package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  123. package/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  124. package/lib/components/InvestmentInfo/InvestmentInfo.js +1 -1
  125. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  126. package/lib/components/MortgageFiltration/MortgageFiltration.js +11 -16
  127. package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  128. package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  129. package/lib/ui-kit/Badge/Badge.d.ts +6 -0
  130. package/lib/ui-kit/Badge/Badge.fixture.d.ts +6 -0
  131. package/lib/ui-kit/Badge/Badge.js +16 -0
  132. package/lib/ui-kit/Badge/Badge.js.map +1 -0
  133. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  134. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  135. package/lib/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  136. package/lib/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  137. package/lib/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  138. package/lib/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  139. package/lib/ui-kit/BaseFiltration/getBadgeCount.js +3 -0
  140. package/lib/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  141. package/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  142. package/lib/{components/MortgageFiltration/HotFilterRecord.js → ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  143. package/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  144. package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  145. package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  146. package/lib/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  147. package/lib/ui-kit/BaseFiltration/useHotFilters.js +23 -0
  148. package/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  149. package/lib/ui-kit/BaseTile/BaseTile.js +1 -5
  150. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  151. package/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  152. package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  153. package/lib/ui-kit/TabsControl/TabItem.d.ts +5 -2
  154. package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  155. package/lib/ui-kit/TabsControl/TabItemInner.js +3 -3
  156. package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  157. package/mobile/bundle/bundle.umd.js +105 -73
  158. package/mobile/bundle/bundle.umd.min.js +1 -1
  159. package/mobile/bundle/components/Calculator/UnknownRate.d.ts +1 -0
  160. package/mobile/bundle/components/Calculator/renderRate.d.ts +2 -1
  161. package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  162. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -2
  163. package/mobile/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  164. package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  165. package/mobile/bundle/ui-kit/Badge/Badge.d.ts +6 -0
  166. package/mobile/bundle/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  167. package/mobile/bundle/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  168. package/mobile/bundle/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  169. package/mobile/bundle/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  170. package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -2
  171. package/mobile/dist/components/Blocks.js +6 -0
  172. package/mobile/dist/components/Blocks.js.map +1 -1
  173. package/mobile/dist/components/Bonus/Bonus.js +1 -2
  174. package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
  175. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  176. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  177. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +6 -3
  178. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  179. package/mobile/dist/components/Calculator/UnknownRate.d.ts +1 -0
  180. package/mobile/dist/components/Calculator/UnknownRate.js +1 -1
  181. package/mobile/dist/components/Calculator/UnknownRate.js.map +1 -1
  182. package/mobile/dist/components/Calculator/constants.js +2 -2
  183. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  184. package/mobile/dist/components/Calculator/renderRate.d.ts +2 -1
  185. package/mobile/dist/components/Calculator/renderRate.js +5 -5
  186. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  187. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  188. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  189. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  190. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -4
  191. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  192. package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  193. package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  194. package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -2
  195. package/mobile/dist/components/Carousel/renderCarouselCards.js +1 -0
  196. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  197. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +2 -3
  198. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  199. package/mobile/dist/components/ErrorBlock/ErrorBlock.js +2 -3
  200. package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
  201. package/mobile/dist/components/Footer/TextInformation.js +2 -1
  202. package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
  203. package/mobile/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  204. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +1 -1
  205. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  206. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +10 -15
  207. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  208. package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  209. package/mobile/dist/ui-kit/Badge/Badge.d.ts +6 -0
  210. package/mobile/dist/ui-kit/Badge/Badge.js +18 -0
  211. package/mobile/dist/ui-kit/Badge/Badge.js.map +1 -0
  212. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  213. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  214. package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  215. package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  216. package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  217. package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  218. package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.js +6 -0
  219. package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  220. package/mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  221. package/{dist/components/MortgageFiltration/HotFilterRecord.js → mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  222. package/mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  223. package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  224. package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  225. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  226. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js +26 -0
  227. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  228. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -5
  229. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  230. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  231. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  232. package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +5 -2
  233. package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  234. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +2 -2
  235. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  236. package/mobile/lib/common.css +1 -1
  237. package/mobile/lib/components/Blocks.js +6 -0
  238. package/mobile/lib/components/Blocks.js.map +1 -1
  239. package/mobile/lib/components/Bonus/Bonus.js +1 -2
  240. package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
  241. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  242. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  243. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +6 -3
  244. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  245. package/mobile/lib/components/Calculator/UnknownRate.d.ts +1 -0
  246. package/mobile/lib/components/Calculator/UnknownRate.js +1 -1
  247. package/mobile/lib/components/Calculator/UnknownRate.js.map +1 -1
  248. package/mobile/lib/components/Calculator/constants.js +2 -2
  249. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  250. package/mobile/lib/components/Calculator/renderRate.d.ts +2 -1
  251. package/mobile/lib/components/Calculator/renderRate.js +5 -5
  252. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  253. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  254. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  255. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  256. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +1 -4
  257. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  258. package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  259. package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  260. package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -2
  261. package/mobile/lib/components/Carousel/renderCarouselCards.js +1 -0
  262. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  263. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +2 -3
  264. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  265. package/mobile/lib/components/ErrorBlock/ErrorBlock.js +2 -3
  266. package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
  267. package/mobile/lib/components/Footer/TextInformation.js +2 -1
  268. package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
  269. package/mobile/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
  270. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +1 -1
  271. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  272. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +11 -16
  273. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  274. package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
  275. package/mobile/lib/ui-kit/Badge/Badge.d.ts +6 -0
  276. package/mobile/lib/ui-kit/Badge/Badge.js +16 -0
  277. package/mobile/lib/ui-kit/Badge/Badge.js.map +1 -0
  278. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
  279. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
  280. package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
  281. package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
  282. package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
  283. package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
  284. package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.js +3 -0
  285. package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
  286. package/mobile/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
  287. package/mobile/lib/{components/MortgageFiltration/HotFilterRecord.js → ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
  288. package/mobile/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
  289. package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
  290. package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
  291. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
  292. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js +23 -0
  293. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
  294. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -5
  295. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  296. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  297. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  298. package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +5 -2
  299. package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  300. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +3 -3
  301. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  302. package/mobile/src/components/Blocks.ts +6 -0
  303. package/mobile/src/components/Bonus/Bonus.tsx +7 -13
  304. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -11
  305. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +6 -9
  306. package/mobile/src/components/Calculator/UnknownRate.tsx +24 -14
  307. package/mobile/src/components/Calculator/constants.ts +2 -2
  308. package/mobile/src/components/Calculator/renderRate.tsx +13 -6
  309. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +2 -2
  310. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -5
  311. package/mobile/src/components/Calculator/useRefinancingCalculatorParams.ts +5 -23
  312. package/mobile/src/components/Carousel/CarouselContent.ts +2 -2
  313. package/mobile/src/components/Carousel/renderCarouselCards.tsx +1 -0
  314. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +10 -12
  315. package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +2 -10
  316. package/mobile/src/components/Footer/TextInformation.tsx +3 -2
  317. package/mobile/src/components/HorizontalLayout/HorizontalLayoutContent.ts +2 -0
  318. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +1 -1
  319. package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +17 -37
  320. package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -9
  321. package/mobile/src/ui-kit/Badge/Badge.tsx +34 -0
  322. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +5 -20
  323. package/mobile/src/ui-kit/BaseFiltration/HotFilterBase.ts +7 -0
  324. package/mobile/src/ui-kit/BaseFiltration/getBadgeCount.ts +6 -0
  325. package/mobile/src/ui-kit/BaseFiltration/hotFilterRecordCmp.ts +3 -0
  326. package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +1 -1
  327. package/mobile/src/ui-kit/BaseFiltration/useHotFilters.tsx +65 -0
  328. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +3 -12
  329. package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -1
  330. package/mobile/src/ui-kit/TabsControl/TabItem.tsx +5 -3
  331. package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +2 -1
  332. package/package.json +1 -1
  333. package/src/components/Blocks.mobile.ts +6 -0
  334. package/src/components/Bonus/Bonus.tsx +7 -13
  335. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -11
  336. package/src/components/Calculator/RefinancingCalculatorForm.tsx +6 -9
  337. package/src/components/Calculator/UnknownRate.tsx +24 -14
  338. package/src/components/Calculator/constants.ts +2 -2
  339. package/src/components/Calculator/renderRate.tsx +13 -6
  340. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +2 -2
  341. package/src/components/Calculator/useCreditCalculatorParams.ts +1 -5
  342. package/src/components/Calculator/useRefinancingCalculatorParams.ts +5 -23
  343. package/src/components/Carousel/CarouselContent.ts +2 -2
  344. package/src/components/Carousel/renderCarouselCards.tsx +1 -0
  345. package/src/components/CarouselEventCard/CarouselEventCard.tsx +10 -12
  346. package/src/components/ErrorBlock/ErrorBlock.tsx +2 -10
  347. package/src/components/Footer/TextInformation.tsx +3 -2
  348. package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +21 -0
  349. package/src/components/HorizontalLayout/HorizontalLayout.tsx +10 -2
  350. package/src/components/HorizontalLayout/HorizontalLayoutContent.ts +2 -0
  351. package/src/components/InvestmentInfo/InvestmentInfo.tsx +1 -1
  352. package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +5 -2
  353. package/src/components/MortgageFiltration/MortgageFiltration.tsx +17 -37
  354. package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -9
  355. package/src/ui-kit/Badge/Badge.fixture.tsx +24 -0
  356. package/src/ui-kit/Badge/Badge.tsx +34 -0
  357. package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +5 -20
  358. package/src/ui-kit/BaseFiltration/HotFilterBase.ts +7 -0
  359. package/src/ui-kit/BaseFiltration/getBadgeCount.ts +6 -0
  360. package/src/ui-kit/BaseFiltration/hotFilterRecordCmp.ts +3 -0
  361. package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +1 -1
  362. package/src/ui-kit/BaseFiltration/useHotFilters.tsx +65 -0
  363. package/src/ui-kit/BaseTile/BaseTile.tsx +3 -12
  364. package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -1
  365. package/src/ui-kit/TabsControl/TabItem.tsx +5 -3
  366. package/src/ui-kit/TabsControl/TabItemInner.tsx +2 -1
  367. package/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  368. package/dist/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  369. package/dist/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  370. package/lib/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  371. package/lib/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  372. package/mobile/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  373. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  374. package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  375. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
  376. package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
  377. package/mobile/src/components/MortgageFiltration/HotFilterRecord.ts +0 -14
  378. package/src/components/MortgageFiltration/HotFilterRecord.ts +0 -14
@@ -1031,8 +1031,9 @@
1031
1031
 
1032
1032
  function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
1033
1033
  const rangeValue = list.length ? list.indexOf(value) : value;
1034
+ const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
1034
1035
  const inputStyle = {
1035
- backgroundSize: `${(((rangeValue - min) * 100) / (max - min)).toFixed(2)}% 100%`,
1036
+ backgroundSize: `${((rangeValueShift * 100) / (max - min)).toFixed(2)}% 100%`,
1036
1037
  };
1037
1038
  return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: `w-2 h-2 rounded-full ${rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main'}` }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
1038
1039
  const rawValue = parseDecimal(e.target?.value);
@@ -1378,7 +1379,7 @@
1378
1379
  });
1379
1380
 
1380
1381
  const Bonus = JSX(({ className = '', title, description, bonusItems = [], ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M" }), jsx("div", { className: "flex flex-wrap w-full", children: bonusItems.length > 0
1381
- ? bonusItems.map((_, i) => (jsxs("div", { className: "space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m", children: [jsxs("div", { className: "grow", children: [_?.title ? (jsx("div", { className: "mb-xs last:mb-0", children: jsx(Text, { size: "text-h4", children: _.title }) })) : null, _?.description ? (jsx("div", { className: "mb-text last:mb-0", children: jsx(Paragraph, { size: "text-xl", font: "font-light", children: _.description }) })) : null] }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
1382
+ ? bonusItems.map((_, i) => (jsxs("div", { className: "space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m", children: [jsx("div", { className: "grow", children: jsx(Headline, { title: _?.title, description: _?.description, headlineVersion: "S", isEmbedded: true, align: "text-left" }) }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
1382
1383
  ? renderBonusItemContent(_.bonusItemContent)
1383
1384
  : null] })] }, String(i))))
1384
1385
  : null })] }) })));
@@ -1510,7 +1511,7 @@
1510
1511
  maxSum: DEFAULT_MAX_SUM$1,
1511
1512
  minMonths: DEFAULT_MIN_MONTHS$1,
1512
1513
  maxMonths: DEFAULT_MAX_MONTHS$1,
1513
- rate: 12.5,
1514
+ rate: 0,
1514
1515
  isSalaryClient: false,
1515
1516
  isPensionClient: false,
1516
1517
  isStateEmployee: false,
@@ -1525,7 +1526,7 @@
1525
1526
  maxSumExtra: REFINANCING_EXTRA_MAX_SUM,
1526
1527
  minMonths: DEFAULT_REFINANCING_MIN_MONTHS,
1527
1528
  maxMonths: DEFAULT_MAX_MONTHS$1,
1528
- rate: 7.5,
1529
+ rate: 0,
1529
1530
  isExtraMoney: false,
1530
1531
  isSalaryClient: false,
1531
1532
  isInsurance: true,
@@ -1637,6 +1638,37 @@
1637
1638
  })] }), monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]", fractionDigits: 0 })) : null, jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
1638
1639
  });
1639
1640
 
1641
+ const STEP_DAYS = 1;
1642
+ const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
1643
+ const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
1644
+
1645
+ const orientationStyleMap = {
1646
+ horizontal: 'gap-5xl',
1647
+ vertical: 'flex-col gap-s',
1648
+ };
1649
+ const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1650
+
1651
+ const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
1652
+
1653
+ const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
1654
+ ...props,
1655
+ items: [
1656
+ { id: 'everyMonth', text: 'Ежемесячно' },
1657
+ { id: 'atEndTerm', text: 'В конце срока' },
1658
+ ],
1659
+ });
1660
+
1661
+ const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: isUnavailableByTerm ? (jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] })) : (jsx(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u0441\u0443\u043C\u043C\u0443 \u0438\u043B\u0438 \u0441\u0440\u043E\u043A" })) })] })));
1662
+
1663
+ const renderDesktopRate = ({ rate, depositeName, fractionDigits, isShowDepositeName, }) => (jsx(Rate, { rate: rate, depositeName: depositeName, fractionDigits: fractionDigits, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1664
+ const renderMobileRate = ({ rate }) => (jsx(CalculatorValueBlock, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", value: rate, postfix: "%" }));
1665
+ const renderRate = (props) => {
1666
+ if (props.rate === 0) {
1667
+ return jsx(UnknownRate, { isUnavailableByTerm: props.isUnavailableByTerm });
1668
+ }
1669
+ return (jsxs("div", { children: [jsx("div", { className: "hidden md:block", children: renderDesktopRate(props) }), jsx("div", { className: "md:hidden", children: renderMobileRate(props) })] }));
1670
+ };
1671
+
1640
1672
  const defaultDiscriminator = (_) => _;
1641
1673
  const maxBy = (discriminator = defaultDiscriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
1642
1674
  const max = maxBy();
@@ -1687,7 +1719,7 @@
1687
1719
  ...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
1688
1720
  ...userInputParams,
1689
1721
  isDisabledOperatingDeposit,
1690
- isShowUnknownRate: true,
1722
+ isUnavailableByTerm: true,
1691
1723
  };
1692
1724
  }
1693
1725
  const businessDepositCalculatorSourceBookParams = data?.rateRows?.find((_) => {
@@ -1727,37 +1759,6 @@
1727
1759
  }
1728
1760
  };
1729
1761
 
1730
- const STEP_DAYS = 1;
1731
- const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
1732
- const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
1733
-
1734
- const orientationStyleMap = {
1735
- horizontal: 'gap-5xl',
1736
- vertical: 'flex-col gap-s',
1737
- };
1738
- const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1739
-
1740
- const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
1741
-
1742
- const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
1743
- ...props,
1744
- items: [
1745
- { id: 'everyMonth', text: 'Ежемесячно' },
1746
- { id: 'atEndTerm', text: 'В конце срока' },
1747
- ],
1748
- });
1749
-
1750
- const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
1751
-
1752
- const renderDesktopRate = ({ rate, depositeName, isShowDepositeName }) => (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1753
- const renderMobileRate = ({ rate }) => (jsx(CalculatorValueBlock, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", value: rate, postfix: "%" }));
1754
- const renderRate = (props) => {
1755
- if (props.isShowUnknownRate) {
1756
- return jsx(UnknownRate, {});
1757
- }
1758
- return (jsxs("div", { children: [jsx("div", { className: "hidden md:block", children: renderDesktopRate(props) }), jsx("div", { className: "md:hidden", children: renderMobileRate(props) })] }));
1759
- };
1760
-
1761
1762
  const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
1762
1763
  const [userInputParams, { field }] = useForm({
1763
1764
  moneyValue: BUSINESS_DEFAULT_SUM,
@@ -1768,7 +1769,7 @@
1768
1769
  isMonthlyInterestPayment: false,
1769
1770
  });
1770
1771
  const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
1771
- const { income, finalSum, rate, isShowUnknownRate, depositeName } = calculatorParams;
1772
+ const { income, finalSum, rate, isUnavailableByTerm, depositeName } = calculatorParams;
1772
1773
  return (jsxs("section", { className: style('flex flex-col justify-between sm:flex-row gap-m', className), children: [jsxs("div", { className: "flex flex-col gap-y-m sm:w-2/5 gap-2xl", children: [renderWantedSumInput({
1773
1774
  title: 'Сумма, ₽',
1774
1775
  min: calculatorParams.minSum,
@@ -1790,7 +1791,7 @@
1790
1791
  rate,
1791
1792
  depositeName,
1792
1793
  isShowDepositeName,
1793
- isShowUnknownRate,
1794
+ isUnavailableByTerm,
1794
1795
  }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [renderDepositResults(finalSum, income), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote), renderFootnote(bottomFootnote)] })] }));
1795
1796
  });
1796
1797
  const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { className: "flex flex-col gap-y-xl sm:gap-y-s", children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal }), jsx(Checkbox, { text: "\u0418\u041F / \u043C\u0430\u043B\u043E\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435", ...field('isSmallBusiness'), value: calculatorParams.isSmallBusiness })] }));
@@ -1863,7 +1864,7 @@
1863
1864
  };
1864
1865
 
1865
1866
  const useCreditCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
1866
- let { moneyValue, monthsValue } = userInputParams;
1867
+ const { moneyValue, monthsValue } = userInputParams;
1867
1868
  const data = useCalculatorParams(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
1868
1869
  const rateRows = data?.rateRows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
1869
1870
  const limitRows = data?.limitRows || [];
@@ -1874,8 +1875,6 @@
1874
1875
  });
1875
1876
  const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], creditCalculatorSourceBookLimitParams, rateRows);
1876
1877
  const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows);
1877
- moneyValue = clamp(moneyValue, minSum, maxSum);
1878
- monthsValue = clamp(monthsValue, minMonths, maxMonths);
1879
1878
  const creditCalculatorRateParams = getCreditCalculatorRateParams({
1880
1879
  rateRows,
1881
1880
  userInputParams,
@@ -2085,7 +2084,7 @@
2085
2084
  checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)) || DEFAULT_REFINANCING_CALCULATOR_PARAMS;
2086
2085
 
2087
2086
  const useRefinancingCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
2088
- let { moneyValue, monthsValue, oldMonthlyPayment, moneyExtra } = userInputParams;
2087
+ const { moneyValue, monthsValue, oldMonthlyPayment, moneyExtra } = userInputParams;
2089
2088
  const data = useCalculatorParams(sourceBookDir || REFINANCING_CALC_DEFAULT_DIR);
2090
2089
  const rateRows = data?.rateRows || [DEFAULT_REFINANCING_CALCULATOR_PARAMS];
2091
2090
  const limitRows = data?.limitRows || [];
@@ -2095,13 +2094,7 @@
2095
2094
  paramsViewSettings,
2096
2095
  });
2097
2096
  const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], sourceBookLimitParams, rateRows);
2098
- const { minSumOld, maxSumOld } = getLimitRangeByKeys(['minSumOld', 'maxSumOld'], sourceBookLimitParams, rateRows);
2099
- const { minSumExtra, maxSumExtra } = getLimitRangeByKeys(['minSumExtra', 'maxSumExtra'], sourceBookLimitParams, rateRows);
2100
2097
  const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], sourceBookLimitParams, rateRows);
2101
- moneyValue = clamp(moneyValue, minSum, maxSum);
2102
- oldMonthlyPayment = clamp(oldMonthlyPayment, minSumOld, maxSumOld);
2103
- moneyExtra = clamp(moneyExtra, minSumExtra, maxSumExtra);
2104
- monthsValue = clamp(monthsValue, minMonths, maxMonths);
2105
2098
  const refinancingCalculatorSourceBookRateParams = getRefinancingCalculatorRateParams({
2106
2099
  rateRows,
2107
2100
  userInputParams,
@@ -2172,7 +2165,10 @@
2172
2165
  ...field('moneyExtra'),
2173
2166
  value: calculatorParams.moneyExtra,
2174
2167
  })
2175
- : null] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.rate, fractionDigits: 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2168
+ : null] }), renderRate({
2169
+ rate: calculatorParams.rate,
2170
+ fractionDigits: 1,
2171
+ }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2176
2172
  });
2177
2173
  const renderCreditParamsForm = (params, field) => (jsxs("div", { className: "space-y-s", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null, params.isShowExtraMoney ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })) : null] }));
2178
2174
 
@@ -2502,6 +2498,7 @@
2502
2498
 
2503
2499
  const cardBaseStyle = 'relative h-full';
2504
2500
  const CARD_SIZE_MAP = {
2501
+ small: 'sm:min-w-64',
2505
2502
  normal: 'sm:min-w-96',
2506
2503
  big: 'sm:min-w-[515px]',
2507
2504
  };
@@ -2594,7 +2591,7 @@
2594
2591
  });
2595
2592
 
2596
2593
  const CarouselEventCard = JSX(({ className = '', icon, title, description, href, target, ...rest }) => {
2597
- return (jsx(BlockWrapper, { className: className, defaultPadding: "p-0", ...rest, children: jsxs(LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [icon?.icon ? jsx(Img, { image: icon }) : null, icon?.src ? jsx(Img, { image: icon }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mt-s ml-s mb-xs", title: title })) : null, description ? (jsx("div", { className: "ml-s mb-m", children: jsx(Text, { font: "font-light", size: "text-m", color: "text-secondary-text", children: description }) })) : null] }) }));
2594
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-0", ...rest, children: jsxs(LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [icon?.icon ? jsx(Img, { image: icon }) : null, icon?.src ? jsx(Img, { image: icon }) : null, jsx("div", { className: "p-s", children: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: "text-left" }) })] }) }));
2598
2595
  });
2599
2596
 
2600
2597
  const imageAlignmentMap = {
@@ -2603,11 +2600,7 @@
2603
2600
  end: 'self-end',
2604
2601
  };
2605
2602
  const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), backImage ? (jsx("div", { className: "mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4", children: backImage })) : null, buttons] }), renderImageContainer(rightImage, { className: '-order-1 @xl:order-1', imageAlign })] })] })));
2606
- const renderImageContainer = (image, { className, imageAlign }) => {
2607
- //TODO Спорное решение
2608
- const fullWidth = image?.props?.image?.size?.width > 400;
2609
- return image ? (jsx("div", { className: style('flex-shrink-0', fullWidth ? 'w-full @xl:w-auto' : '', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
2610
- };
2603
+ const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('md:flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
2611
2604
 
2612
2605
  const cardColumnsModeStyleMap = {
2613
2606
  1: 'grid-cols-1',
@@ -2948,12 +2941,12 @@
2948
2941
  const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
2949
2942
  ? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
2950
2943
  : [blocksToRender, []];
2951
- return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? renderNotFound(notFound) : null }), jsxs("div", { className: style(blocksToRender.length ? '' : 'hidden'), children: [jsx("div", { className: style('mb-2xs', resultsGridStyle), children: renderBlocksList(visibleBlocks, { ...rest.options, parent: block }) }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
2952
- return (jsx(FoldableSection, { className: style(resultsGridStyle, isUnfolded ? 'mb-2xs' : ''), isUnfolded: isUnfolded, children: renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }) }));
2944
+ return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? renderNotFound(notFound) : null }), jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsx("div", { className: style(resultsGridStyle), children: renderBlocksList(visibleBlocks, { ...rest.options, parent: block }) }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
2945
+ return (jsx(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }) }));
2953
2946
  }, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
2954
2947
  });
2955
2948
  function renderNotFound({ title, description }) {
2956
- return (jsxs("div", { className: "bg-white py-20", children: [title ? (jsx("div", { className: "mb-xs", children: jsx(Paragraph, { align: "text-center", children: jsx(Text, { size: "text-h4", children: title }) }) })) : null, description ? (jsx(Paragraph, { size: "text-xl", font: "font-light", align: "text-center", children: description })) : null] }));
2949
+ return (jsx("div", { className: "bg-white py-20", children: jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true }) }));
2957
2950
  }
2958
2951
 
2959
2952
  const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
@@ -2972,7 +2965,7 @@
2972
2965
  return items.map((item) => (jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
2973
2966
  });
2974
2967
 
2975
- const renderFiltrationForm = ({ field, reset, filtrationSchema, resetButton, children, }) => (jsxs("form", { className: "flex justify-between bg-white p-4xl mb-2xs", children: [jsxs("div", { className: "flex gap-5xl", children: [children, Object.entries(filtrationSchema).map(renderFormItem(field))] }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72 ml-s", onClick: reset, ...resetButton }) })) : null] }));
2968
+ const renderFiltrationForm = ({ field, reset, filtrationSchema, resetButton, children, }) => (jsxs("form", { className: "flex justify-between bg-white p-4xl", children: [jsxs("div", { className: "flex gap-5xl", children: [children, Object.entries(filtrationSchema).map(renderFormItem(field))] }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72 ml-s", onClick: reset, ...resetButton }) })) : null] }));
2976
2969
  const renderFormItem = (field) => ([key, item]) => {
2977
2970
  const type = item?.type;
2978
2971
  switch (type) {
@@ -3021,7 +3014,7 @@
3021
3014
  return null;
3022
3015
  };
3023
3016
  const getErrorBlockStyle = (text) => (text ? 'py-20' : 'mb-16 mt-24');
3024
- const ErrorBlock = JSX(({ className = '', title, subtitle, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col gap-lg justify-center items-center', className), defaultPadding: style('py-xs', getErrorBlockStyle(button?.text)), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left", title: title }) : null, subtitle ? (jsx("div", { className: "max-w-[613px] text-center", children: jsx(Text, { size: "text-xl", font: "font-light", children: subtitle }) })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...button, children: button.text })) : null] })));
3017
+ const ErrorBlock = JSX(({ className = '', title, subtitle, error, button, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col gap-lg justify-center items-center', className), defaultPadding: style('py-xs', getErrorBlockStyle(button?.text)), version: "transparent", ...rest, children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), jsx(Headline, { title: title, description: subtitle, headlineVersion: "XL", isEmbedded: true }), button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...button, children: button.text })) : null] })));
3025
3018
 
3026
3019
  var Currencies;
3027
3020
  (function (Currencies) {
@@ -3470,7 +3463,7 @@
3470
3463
  return (jsx("a", { className: `text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
3471
3464
  });
3472
3465
 
3473
- const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: className, children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
3466
+ const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: style('@container', className), children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex flex-col @lg:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
3474
3467
 
3475
3468
  const LEFT_COL_WIDTH = 'w-52';
3476
3469
  const Footer = JSX(({ className, ...rest }) => {
@@ -3776,7 +3769,14 @@
3776
3769
  '': '',
3777
3770
  };
3778
3771
 
3779
- const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', gapStyles[gap], className), defaultPadding: isPadding ? 'p-6xl' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren(rest) })));
3772
+ const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, isCardBorder, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', gapStyles[gap], className), defaultPadding: isPadding ? 'p-6xl' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren({
3773
+ ...rest,
3774
+ extraProps: {
3775
+ className: isCardBorder
3776
+ ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
3777
+ : '',
3778
+ },
3779
+ }) })));
3780
3780
  HorizontalLayout.childrenTypes = {
3781
3781
  exclude: ['HorizontalLayout'],
3782
3782
  };
@@ -3883,7 +3883,7 @@
3883
3883
  const renderInvestmentColumn = (column, i, arr) => {
3884
3884
  const isSecondColumn = i === 1;
3885
3885
  const isLastColumn = i === arr.length - 1;
3886
- return (jsx("div", { className: `${getColumnClasses(isSecondColumn, isLastColumn, column.cells)}`, children: column.cells?.length ? (jsx("div", { className: `w-full ${isLastColumn ? 'border-4 border-green-more-dark p-2xs min-w-[292px]' : ''}`, children: column.cells.reverse().map(renderInvestmentCell) })) : null }, `column_${i}`));
3886
+ return (jsx("div", { className: `${getColumnClasses(isSecondColumn, isLastColumn, column.cells)}`, children: column.cells?.length ? (jsx("div", { className: `w-full ${isLastColumn ? 'border-4 border-green-more-dark p-2xs min-w-72' : ''}`, children: column.cells.reverse().map(renderInvestmentCell) })) : null }, `column_${i}`));
3887
3887
  };
3888
3888
  const getColumnClasses = (isSecondColumn, isLastColumn, cells = []) => [
3889
3889
  cells.length ? 'flex-1' : 'flex-0',
@@ -3957,6 +3957,51 @@
3957
3957
  return (jsx(BlockWrapper, { className: style('min-h-80', className), padding: "p-0", version: version, ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, defaultPadding: "p-6xl", title: title ? (jsx(Heading, { headingType: headingType, title: title, className: style('whitespace-pre-wrap', AlignText[alignTitle]) })) : null, rightImage: image?.src ? jsx(Img, { className: "hidden lg:block", image: image }) : null, buttons: buttonsConditionStyle(buttons), children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 flex-wrap gap-m items-center", children: [qr?.src ? (jsx("div", { className: style('flex justify-center bg-white rounded-md', containerStyle), children: jsx(Img, { className: "w-fit", image: qr }) })) : null, renderList$1(items), image?.src ? jsx(Img, { className: "lg:hidden", image: image }) : null] })] }) }));
3958
3958
  });
3959
3959
 
3960
+ const badgeBgStyleMap = {
3961
+ primary: 'bg-white/30',
3962
+ secondary: 'bg-main-divider',
3963
+ };
3964
+ const badgeTextColorStyleMap = {
3965
+ primary: 'text-white',
3966
+ secondary: 'text-secondary-text',
3967
+ };
3968
+ const Badge = JSX(({ count, version = 'secondary' }) => {
3969
+ return (jsx("div", { className: style('w-6 h-6 rounded-full flex items-center justify-center', badgeBgStyleMap[version]), children: jsx(Text, { size: "text-xs", color: badgeTextColorStyleMap[version], children: count }) }));
3970
+ });
3971
+
3972
+ const getBadgeCount = (blocks = [], filter = {}) => blocks.filter(({ content = {} }) => checkShouldRenderBlock(filter, content)).length;
3973
+
3974
+ const scalarCmp = (a, b) => a === b;
3975
+ const arrCmp = (cmp = scalarCmp) => (a, b) => a === b || Boolean(a && b && a.length === b.length && a.every((_, i) => cmp(_, b[i])));
3976
+ const objCmp = (cmp) => (a, b) => a === b ||
3977
+ Boolean(a &&
3978
+ b &&
3979
+ Object.keys(a).length === Object.keys(b).length &&
3980
+ Object.entries(a).every(([key, value]) => cmp(value, b[key])));
3981
+ function combineBoolCmps(...comparators) {
3982
+ return (a, b) => comparators.some((cmp) => cmp(a, b));
3983
+ }
3984
+
3985
+ const hotFilterRecordCmp = objCmp(combineBoolCmps(scalarCmp, arrCmp()));
3986
+
3987
+ const EMPTY_ARR = [];
3988
+ const EMPTY_OBJ = {};
3989
+ const useHotFilters = ({ hotFilters = EMPTY_ARR, filtrationState = EMPTY_OBJ, blocks = EMPTY_ARR, onFiltrationStateChange, }) => {
3990
+ const activeItemIndex = useMemo(() => Math.max(0, hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState))), [hotFilters, filtrationState]);
3991
+ const items = useMemo(() => hotFilters.map((_) => ({
3992
+ text: _.text,
3993
+ appendRight: (jsx(Badge, { version: _ === hotFilters[activeItemIndex] ? 'primary' : 'secondary', count: getBadgeCount(blocks, _.filter) })),
3994
+ })), [hotFilters, blocks, activeItemIndex]);
3995
+ const handleChange = useCallback((_) => {
3996
+ onFiltrationStateChange(hotFilters[items.indexOf(_)].filter);
3997
+ }, [hotFilters, items]);
3998
+ return {
3999
+ value: items[activeItemIndex],
4000
+ items: items,
4001
+ onChange: handleChange,
4002
+ };
4003
+ };
4004
+
3960
4005
  const tabPaddingStyleMap = {
3961
4006
  default: 'px-xs',
3962
4007
  underlined: 'px-m',
@@ -3980,8 +4025,8 @@
3980
4025
  };
3981
4026
  const TabItemInner = JSX(({ tag = 'div', item = {}, isActive, type = 'default', onClick }) => {
3982
4027
  const Tag = tag;
3983
- const { text, ...link } = item;
3984
- return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tab", "aria-selected": isActive, onClick: onClick, ...link, children: jsx("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: jsx(Text, { size: "text-m", children: text }) }) }));
4028
+ const { text, appendRight, ...link } = item;
4029
+ return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tab", "aria-selected": isActive, onClick: onClick, ...link, children: jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: [jsx(Text, { size: "text-m", children: text }), appendRight ? jsx("div", { className: "ml-xs", children: appendRight }) : null] }) }));
3985
4030
  });
3986
4031
 
3987
4032
  const TabItem = JSX((props) => props?.item?.href ? jsx(LinkTabItem, { ...props }) : jsx(ButtonTabItem, { ...props }));
@@ -4005,40 +4050,22 @@
4005
4050
 
4006
4051
  const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tablist", children: items.map(renderTab(value, onChange, tabsType)) })));
4007
4052
 
4008
- const scalarCmp = (a, b) => a === b;
4009
- const arrCmp = (cmp = scalarCmp) => (a, b) => a === b || Boolean(a && b && a.length === b.length && a.every((_, i) => cmp(_, b[i])));
4010
- const objCmp = (cmp) => (a, b) => a === b ||
4011
- Boolean(a &&
4012
- b &&
4013
- Object.keys(a).length === Object.keys(b).length &&
4014
- Object.entries(a).every(([key, value]) => cmp(value, b[key])));
4015
- function combineBoolCmps(...comparators) {
4016
- return (a, b) => comparators.some((cmp) => cmp(a, b));
4017
- }
4018
-
4019
- const hotFilterRecordCmp = objCmp(combineBoolCmps(scalarCmp, arrCmp()));
4020
-
4021
4053
  const initialFiltrationState = {
4022
4054
  categories: [],
4023
4055
  extraOptions: [],
4024
4056
  propertyType: [],
4025
4057
  stage: [],
4026
4058
  };
4027
- const MortgageFiltration = JSX(({ className, hotFilters = [], filtrationSchema = {}, resetButton, ...rest }) => {
4059
+ const MortgageFiltration = JSX(({ className, hotFilters, filtrationSchema = {}, resetButton, ...rest }) => {
4028
4060
  const [filtrationState, { field, reset, update: replaceFiltrationState }] = useForm(initialFiltrationState);
4029
- const tabsControlItems = useMemo(() => hotFilters.map(({ text }) => ({
4030
- text,
4031
- })), [hotFilters]);
4032
- const [hotFilterIndex, setHotFilterIndex] = useState(0);
4033
- const handleHotFilterSelect = useCallback((_) => {
4034
- setHotFilterIndex(tabsControlItems.indexOf(_));
4035
- replaceFiltrationState(hotFilters[tabsControlItems.indexOf(_)].filter || initialFiltrationState);
4036
- }, [hotFilters, tabsControlItems]);
4037
- useEffect(() => {
4038
- const suggestedHotFilterIndex = hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState));
4039
- setHotFilterIndex(suggestedHotFilterIndex !== -1 ? suggestedHotFilterIndex : 0);
4040
- }, [hotFilters, filtrationState]);
4041
- return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { className: "mb-2xs", items: tabsControlItems, value: tabsControlItems[hotFilterIndex], onChange: handleHotFilterSelect }), renderFiltrationForm({ field, reset, filtrationSchema, resetButton }), jsx(BaseFiltrationInner, { filtrationState: filtrationState, ...rest })] }));
4061
+ const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => replaceFiltrationState(_), []);
4062
+ const tabsControlProps = useHotFilters({
4063
+ hotFilters,
4064
+ filtrationState,
4065
+ blocks: rest.block?.blocks,
4066
+ onFiltrationStateChange: handleFiltrationStateChange,
4067
+ });
4068
+ return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), renderFiltrationForm({ field, reset, filtrationSchema, resetButton }), jsx(BaseFiltrationInner, { filtrationState: filtrationState, ...rest })] }));
4042
4069
  });
4043
4070
  MortgageFiltration.childrenTypes = ['ProductTile'];
4044
4071
  MortgageFiltration.childSchema = (content) => content?.filtrationSchema || {};
@@ -5234,7 +5261,7 @@
5234
5261
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
5235
5262
  }
5236
5263
 
5237
- const packageVersion = "0.13.6";
5264
+ const packageVersion = "0.13.8";
5238
5265
 
5239
5266
  exports.Blocks = Blocks;
5240
5267
  exports.ContentPage = ContentPage;