@redneckz/wildless-cms-uni-blocks 0.14.292 → 0.14.294

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 (616) hide show
  1. package/bin/migration-scripts/0.14.293.js +40 -0
  2. package/bin/migration-scripts/0.14.294.js +23 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +300 -285
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  7. package/bundle/components/Calculator/CalculatorContent.d.ts +1 -8
  8. package/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  9. package/bundle/components/Calculator/constants.d.ts +0 -5
  10. package/bundle/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  11. package/bundle/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  12. package/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  13. package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  14. package/bundle/data/SitemapData.d.ts +12 -3
  15. package/bundle/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  16. package/bundle/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  17. package/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  18. package/bundle/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  19. package/bundle/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  20. package/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  21. package/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  22. package/bundle/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  23. package/{mobile/dist/components → bundle/ui-kit}/Calculator/renderRate.d.ts +1 -1
  24. package/bundle/{components → ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  25. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  26. package/bundle/ui-kit/NotFound/NotFound.d.ts +2 -2
  27. package/bundle/utils/dataAttributes.d.ts +2 -2
  28. package/dist/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  29. package/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  30. package/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  31. package/dist/components/Blocks.js +2 -0
  32. package/dist/components/Blocks.js.map +1 -1
  33. package/dist/components/Blocks.mobile.js +2 -0
  34. package/dist/components/Blocks.mobile.js.map +1 -1
  35. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  36. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  37. package/dist/components/Calculator/CalculatorContent.d.ts +1 -8
  38. package/dist/components/Calculator/CreditCalculatorForm.js +4 -4
  39. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  40. package/dist/components/Calculator/DepositCalculatorForm.js +4 -4
  41. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  42. package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  43. package/dist/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  44. package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  45. package/dist/components/Calculator/RefinancingCalculatorForm.js +4 -4
  46. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  47. package/dist/components/Calculator/constants.d.ts +0 -5
  48. package/dist/components/Calculator/constants.js +1 -16
  49. package/dist/components/Calculator/constants.js.map +1 -1
  50. package/dist/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  51. package/dist/components/CalculatorBonus/CalculatorBonus.js +46 -0
  52. package/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  53. package/dist/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  54. package/dist/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  55. package/dist/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  56. package/dist/components/CalculatorBonus/getBonus.js +25 -0
  57. package/dist/components/CalculatorBonus/getBonus.js.map +1 -0
  58. package/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.js +13 -2
  59. package/dist/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  60. package/dist/components/DepositFiltration/DepositFiltration.js +2 -2
  61. package/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  62. package/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  63. package/dist/components/Footer/Footer.mobile.js +1 -1
  64. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  65. package/dist/components/Footer/LinkList.js +5 -3
  66. package/dist/components/Footer/LinkList.js.map +1 -1
  67. package/dist/components/Header/HeaderSecondaryMenu.js +6 -3
  68. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  69. package/dist/components/MortgageFiltration/MortgageFiltration.js +4 -4
  70. package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  71. package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  72. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  73. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  74. package/dist/data/SitemapData.d.ts +12 -3
  75. package/dist/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  76. package/dist/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  77. package/dist/ui-kit/BaseFiltration/FilteredBlocks.js +19 -0
  78. package/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  79. package/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  80. package/dist/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  81. package/dist/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  82. package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  83. package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  84. package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  85. package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  86. package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js +15 -0
  87. package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  88. package/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  89. package/dist/ui-kit/BaseFiltration/renderGridBlocks.js +20 -0
  90. package/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  91. package/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  92. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  93. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  94. package/dist/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  95. package/dist/ui-kit/Calculator/CalculatorLayout.js +9 -0
  96. package/dist/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  97. package/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  98. package/dist/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  99. package/dist/{components → ui-kit}/Calculator/Rate.js +1 -1
  100. package/dist/ui-kit/Calculator/Rate.js.map +1 -0
  101. package/{mobile/dist/components → dist/ui-kit}/Calculator/renderFootnote.js +1 -1
  102. package/dist/ui-kit/Calculator/renderFootnote.js.map +1 -0
  103. package/{mobile/bundle/components → dist/ui-kit}/Calculator/renderRate.d.ts +1 -1
  104. package/{mobile/dist/components → dist/ui-kit}/Calculator/renderRate.js +1 -1
  105. package/dist/ui-kit/Calculator/renderRate.js.map +1 -0
  106. package/dist/{components → ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  107. package/{mobile/dist/components → dist/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  108. package/dist/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  109. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  110. package/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
  111. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  112. package/dist/ui-kit/NotFound/NotFound.d.ts +2 -2
  113. package/dist/ui-kit/NotFound/NotFound.js.map +1 -1
  114. package/dist/utils/dataAttributes.d.ts +2 -2
  115. package/dist/utils/dataAttributes.js +3 -0
  116. package/dist/utils/dataAttributes.js.map +1 -1
  117. package/lib/common.css +1 -1
  118. package/lib/components/BankAccountFiltration/BankAccountFiltration.fixture.d.ts +1 -0
  119. package/lib/components/BankAccountFiltration/BankAccountFiltration.fixture.mobile.d.ts +1 -0
  120. package/lib/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  121. package/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  122. package/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  123. package/lib/components/Blocks.js +2 -0
  124. package/lib/components/Blocks.js.map +1 -1
  125. package/lib/components/Blocks.mobile.js +2 -0
  126. package/lib/components/Blocks.mobile.js.map +1 -1
  127. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  128. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  129. package/lib/components/Calculator/Calculator.fixture.d.ts +0 -1
  130. package/lib/components/Calculator/Calculator.fixture.mobile.d.ts +0 -1
  131. package/lib/components/Calculator/CalculatorContent.d.ts +1 -8
  132. package/lib/components/Calculator/CreditCalculatorForm.js +4 -4
  133. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  134. package/lib/components/Calculator/DepositCalculatorForm.js +4 -4
  135. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  136. package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  137. package/lib/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  138. package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  139. package/lib/components/Calculator/RefinancingCalculatorForm.js +4 -4
  140. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  141. package/lib/components/Calculator/constants.d.ts +0 -5
  142. package/lib/components/Calculator/constants.js +0 -15
  143. package/lib/components/Calculator/constants.js.map +1 -1
  144. package/lib/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  145. package/lib/components/CalculatorBonus/CalculatorBonus.fixture.d.ts +6 -0
  146. package/lib/components/CalculatorBonus/CalculatorBonus.js +44 -0
  147. package/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  148. package/lib/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  149. package/lib/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  150. package/lib/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  151. package/lib/components/{Calculator → CalculatorBonus}/getBonus.js +13 -1
  152. package/lib/components/CalculatorBonus/getBonus.js.map +1 -0
  153. package/{mobile/lib/components/Calculator → lib/components/CalculatorBonus}/getBonusCalculatorParams.js +12 -1
  154. package/lib/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  155. package/lib/components/DepositFiltration/DepositFiltration.fixture.d.ts +1 -0
  156. package/lib/components/DepositFiltration/DepositFiltration.fixture.mobile.d.ts +1 -0
  157. package/lib/components/DepositFiltration/DepositFiltration.js +2 -2
  158. package/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  159. package/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  160. package/lib/components/Footer/Footer.mobile.js +1 -1
  161. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  162. package/lib/components/Footer/LinkList.js +5 -3
  163. package/lib/components/Footer/LinkList.js.map +1 -1
  164. package/lib/components/Header/HeaderSecondaryMenu.js +6 -3
  165. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  166. package/lib/components/MortgageFiltration/MortgageFiltration.fixture.d.ts +1 -0
  167. package/lib/components/MortgageFiltration/MortgageFiltration.fixture.mobile.d.ts +1 -0
  168. package/lib/components/MortgageFiltration/MortgageFiltration.js +4 -4
  169. package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  170. package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  171. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  172. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  173. package/lib/data/SitemapData.d.ts +12 -3
  174. package/lib/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  175. package/lib/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  176. package/lib/ui-kit/BaseFiltration/FilteredBlocks.js +17 -0
  177. package/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  178. package/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  179. package/lib/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  180. package/lib/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  181. package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  182. package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  183. package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  184. package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +5 -0
  185. package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js +12 -0
  186. package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  187. package/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +9 -0
  188. package/lib/ui-kit/BaseFiltration/renderGridBlocks.js +17 -0
  189. package/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  190. package/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  191. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  192. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  193. package/lib/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  194. package/lib/ui-kit/Calculator/CalculatorLayout.js +7 -0
  195. package/lib/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  196. package/{mobile/lib/components → lib/ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  197. package/lib/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  198. package/lib/{components → ui-kit}/Calculator/Rate.js +1 -1
  199. package/lib/ui-kit/Calculator/Rate.js.map +1 -0
  200. package/{mobile/lib/components → lib/ui-kit}/Calculator/renderFootnote.js +1 -1
  201. package/lib/ui-kit/Calculator/renderFootnote.js.map +1 -0
  202. package/lib/{components → ui-kit}/Calculator/renderRate.d.ts +1 -1
  203. package/{mobile/lib/components → lib/ui-kit}/Calculator/renderRate.js +1 -1
  204. package/lib/ui-kit/Calculator/renderRate.js.map +1 -0
  205. package/lib/{components → ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  206. package/{mobile/lib/components → lib/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  207. package/lib/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  208. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  209. package/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
  210. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  211. package/lib/ui-kit/NotFound/NotFound.d.ts +2 -2
  212. package/lib/ui-kit/NotFound/NotFound.js.map +1 -1
  213. package/lib/utils/dataAttributes.d.ts +2 -2
  214. package/lib/utils/dataAttributes.js +3 -0
  215. package/lib/utils/dataAttributes.js.map +1 -1
  216. package/mobile/bundle/bundle.umd.js +303 -288
  217. package/mobile/bundle/bundle.umd.min.js +1 -1
  218. package/mobile/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  219. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +1 -8
  220. package/mobile/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  221. package/mobile/bundle/components/Calculator/constants.d.ts +0 -5
  222. package/mobile/bundle/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  223. package/mobile/bundle/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  224. package/mobile/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  225. package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  226. package/mobile/bundle/data/SitemapData.d.ts +12 -3
  227. package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  228. package/mobile/bundle/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  229. package/mobile/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  230. package/mobile/bundle/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  231. package/mobile/bundle/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  232. package/mobile/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  233. package/mobile/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  234. package/mobile/bundle/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  235. package/{dist/components → mobile/bundle/ui-kit}/Calculator/renderRate.d.ts +1 -1
  236. package/mobile/bundle/{components → ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  237. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  238. package/mobile/bundle/ui-kit/NotFound/NotFound.d.ts +2 -2
  239. package/mobile/bundle/utils/dataAttributes.d.ts +2 -2
  240. package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  241. package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  242. package/mobile/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  243. package/mobile/dist/components/Blocks.js +2 -0
  244. package/mobile/dist/components/Blocks.js.map +1 -1
  245. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  246. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  247. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +1 -8
  248. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +4 -4
  249. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  250. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +4 -4
  251. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  252. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  253. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  254. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  255. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +4 -4
  256. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  257. package/mobile/dist/components/Calculator/constants.d.ts +0 -5
  258. package/mobile/dist/components/Calculator/constants.js +1 -16
  259. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  260. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  261. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js +46 -0
  262. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  263. package/mobile/dist/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  264. package/mobile/dist/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  265. package/mobile/dist/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  266. package/mobile/dist/components/CalculatorBonus/getBonus.js +25 -0
  267. package/mobile/dist/components/CalculatorBonus/getBonus.js.map +1 -0
  268. package/mobile/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.js +13 -2
  269. package/mobile/dist/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  270. package/mobile/dist/components/DepositFiltration/DepositFiltration.js +2 -2
  271. package/mobile/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  272. package/mobile/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  273. package/mobile/dist/components/Footer/Footer.js +1 -1
  274. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  275. package/mobile/dist/components/Footer/LinkList.js +5 -3
  276. package/mobile/dist/components/Footer/LinkList.js.map +1 -1
  277. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +6 -3
  278. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  279. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +4 -4
  280. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  281. package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  282. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  283. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  284. package/mobile/dist/data/SitemapData.d.ts +12 -3
  285. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  286. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  287. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js +19 -0
  288. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  289. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  290. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  291. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  292. package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  293. package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  294. package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  295. package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  296. package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js +15 -0
  297. package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  298. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  299. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js +20 -0
  300. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  301. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  302. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  303. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  304. package/mobile/dist/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  305. package/mobile/dist/ui-kit/Calculator/CalculatorLayout.js +9 -0
  306. package/mobile/dist/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  307. package/mobile/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  308. package/mobile/dist/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  309. package/mobile/dist/{components → ui-kit}/Calculator/Rate.js +1 -1
  310. package/mobile/dist/ui-kit/Calculator/Rate.js.map +1 -0
  311. package/{dist/components → mobile/dist/ui-kit}/Calculator/renderFootnote.js +1 -1
  312. package/mobile/dist/ui-kit/Calculator/renderFootnote.js.map +1 -0
  313. package/{bundle/components → mobile/dist/ui-kit}/Calculator/renderRate.d.ts +1 -1
  314. package/{dist/components → mobile/dist/ui-kit}/Calculator/renderRate.js +1 -1
  315. package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -0
  316. package/mobile/dist/ui-kit/Calculator/renderWantedSumInput.d.ts +7 -0
  317. package/{dist/components → mobile/dist/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  318. package/mobile/dist/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  319. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  320. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
  321. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  322. package/mobile/dist/ui-kit/NotFound/NotFound.d.ts +2 -2
  323. package/mobile/dist/ui-kit/NotFound/NotFound.js.map +1 -1
  324. package/mobile/dist/utils/dataAttributes.d.ts +2 -2
  325. package/mobile/dist/utils/dataAttributes.js +3 -0
  326. package/mobile/dist/utils/dataAttributes.js.map +1 -1
  327. package/mobile/lib/common.css +1 -1
  328. package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  329. package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  330. package/mobile/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  331. package/mobile/lib/components/Blocks.js +2 -0
  332. package/mobile/lib/components/Blocks.js.map +1 -1
  333. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  334. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  335. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +1 -8
  336. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +4 -4
  337. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  338. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +4 -4
  339. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  340. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  341. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  342. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  343. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +4 -4
  344. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  345. package/mobile/lib/components/Calculator/constants.d.ts +0 -5
  346. package/mobile/lib/components/Calculator/constants.js +0 -15
  347. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  348. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  349. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js +44 -0
  350. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  351. package/mobile/lib/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  352. package/mobile/lib/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  353. package/mobile/lib/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  354. package/mobile/lib/components/{Calculator → CalculatorBonus}/getBonus.js +13 -1
  355. package/mobile/lib/components/CalculatorBonus/getBonus.js.map +1 -0
  356. package/{lib/components/Calculator → mobile/lib/components/CalculatorBonus}/getBonusCalculatorParams.js +12 -1
  357. package/mobile/lib/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  358. package/mobile/lib/components/DepositFiltration/DepositFiltration.js +2 -2
  359. package/mobile/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  360. package/mobile/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  361. package/mobile/lib/components/Footer/Footer.js +1 -1
  362. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  363. package/mobile/lib/components/Footer/LinkList.js +5 -3
  364. package/mobile/lib/components/Footer/LinkList.js.map +1 -1
  365. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +6 -3
  366. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  367. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +4 -4
  368. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  369. package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  370. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  371. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  372. package/mobile/lib/data/SitemapData.d.ts +12 -3
  373. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  374. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  375. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js +17 -0
  376. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  377. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  378. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  379. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  380. package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  381. package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  382. package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  383. package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  384. package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js +12 -0
  385. package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  386. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  387. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js +17 -0
  388. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  389. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  390. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  391. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  392. package/mobile/lib/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  393. package/mobile/lib/ui-kit/Calculator/CalculatorLayout.js +7 -0
  394. package/mobile/lib/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  395. package/{lib/components → mobile/lib/ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  396. package/mobile/lib/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  397. package/mobile/lib/{components → ui-kit}/Calculator/Rate.js +1 -1
  398. package/mobile/lib/ui-kit/Calculator/Rate.js.map +1 -0
  399. package/{lib/components → mobile/lib/ui-kit}/Calculator/renderFootnote.js +1 -1
  400. package/mobile/lib/ui-kit/Calculator/renderFootnote.js.map +1 -0
  401. package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +8 -0
  402. package/{lib/components → mobile/lib/ui-kit}/Calculator/renderRate.js +1 -1
  403. package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -0
  404. package/mobile/lib/ui-kit/Calculator/renderWantedSumInput.d.ts +7 -0
  405. package/{lib/components → mobile/lib/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  406. package/mobile/lib/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  407. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  408. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
  409. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  410. package/mobile/lib/ui-kit/NotFound/NotFound.d.ts +2 -2
  411. package/mobile/lib/ui-kit/NotFound/NotFound.js.map +1 -1
  412. package/mobile/lib/utils/dataAttributes.d.ts +2 -2
  413. package/mobile/lib/utils/dataAttributes.js +3 -0
  414. package/mobile/lib/utils/dataAttributes.js.map +1 -1
  415. package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.example.json +13 -12
  416. package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.tsx +16 -43
  417. package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.ui.json +7 -1
  418. package/mobile/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +5 -7
  419. package/mobile/src/components/Blocks.ts +2 -0
  420. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +4 -4
  421. package/mobile/src/components/Calculator/CalculatorContent.ts +1 -11
  422. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
  423. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +4 -4
  424. package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +0 -3
  425. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +4 -4
  426. package/mobile/src/components/Calculator/constants.ts +0 -18
  427. package/mobile/src/components/CalculatorBonus/CalculatorBonus.example.json +1 -0
  428. package/mobile/src/components/CalculatorBonus/CalculatorBonus.tsx +75 -0
  429. package/mobile/src/components/CalculatorBonus/CalculatorBonus.ui.json +1 -0
  430. package/mobile/src/components/CalculatorBonus/CalculatorBonusContent.ts +16 -0
  431. package/mobile/src/components/{Calculator → CalculatorBonus}/getBonus.ts +15 -1
  432. package/mobile/src/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.ts +13 -1
  433. package/mobile/src/components/DepositFiltration/DepositFiltration.example.json +2 -1
  434. package/mobile/src/components/DepositFiltration/DepositFiltration.tsx +2 -2
  435. package/mobile/src/components/DepositFiltration/DepositFiltration.ui.json +7 -1
  436. package/mobile/src/components/DepositFiltration/DepositFiltrationContent.ts +3 -3
  437. package/mobile/src/components/Footer/Footer.tsx +1 -1
  438. package/mobile/src/components/Footer/LinkList.tsx +10 -9
  439. package/mobile/src/components/Header/Header.example.json +0 -1
  440. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +23 -19
  441. package/mobile/src/components/MortgageFiltration/MortgageFiltration.example.json +2 -1
  442. package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +9 -8
  443. package/mobile/src/components/MortgageFiltration/MortgageFiltration.ui.json +7 -1
  444. package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +3 -5
  445. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
  446. package/mobile/src/data/SitemapData.ts +13 -3
  447. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationContent.ts +31 -74
  448. package/mobile/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +37 -0
  449. package/mobile/src/ui-kit/BaseFiltration/FiltrationForm.tsx +6 -16
  450. package/mobile/src/ui-kit/BaseFiltration/FiltrationSchemaContent.ts +66 -0
  451. package/mobile/src/ui-kit/BaseFiltration/renderCarouselBlocks.tsx +31 -0
  452. package/mobile/src/ui-kit/BaseFiltration/renderGridBlocks.tsx +55 -0
  453. package/mobile/src/ui-kit/BaseFiltration/useFiltrationForm.ts +9 -16
  454. package/mobile/src/ui-kit/Calculator/CalculatorLayout.tsx +17 -0
  455. package/mobile/src/{components → ui-kit}/Calculator/CalculatorValueBlock.tsx +1 -1
  456. package/mobile/src/{components → ui-kit}/Calculator/Rate.tsx +1 -1
  457. package/mobile/src/{components → ui-kit}/Calculator/renderFootnote.tsx +1 -1
  458. package/mobile/src/{components → ui-kit}/Calculator/renderRate.tsx +1 -1
  459. package/mobile/src/{components → ui-kit}/Calculator/renderWantedSumInput.tsx +2 -2
  460. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -4
  461. package/mobile/src/ui-kit/NotFound/NotFound.tsx +2 -2
  462. package/mobile/src/utils/dataAttributes.ts +4 -0
  463. package/package.json +1 -1
  464. package/src/components/BankAccountFiltration/BankAccountFiltration.example.json +13 -12
  465. package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.mobile.tsx +53 -29
  466. package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.tsx +53 -29
  467. package/src/components/BankAccountFiltration/BankAccountFiltration.tsx +16 -43
  468. package/src/components/BankAccountFiltration/BankAccountFiltration.ui.json +7 -1
  469. package/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +5 -7
  470. package/src/components/Blocks.mobile.ts +2 -0
  471. package/src/components/Blocks.ts +2 -0
  472. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +4 -4
  473. package/src/components/Calculator/Calculator.fixture.mobile.tsx +0 -24
  474. package/src/components/Calculator/Calculator.fixture.tsx +0 -33
  475. package/src/components/Calculator/CalculatorContent.ts +1 -11
  476. package/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
  477. package/src/components/Calculator/DepositCalculatorForm.tsx +4 -4
  478. package/src/components/Calculator/EmbeddableCalcBlocks.tsx +0 -3
  479. package/src/components/Calculator/RefinancingCalculatorForm.tsx +4 -4
  480. package/src/components/Calculator/constants.ts +0 -18
  481. package/src/components/CalculatorBonus/CalculatorBonus.example.json +1 -0
  482. package/src/components/CalculatorBonus/CalculatorBonus.fixture.tsx +34 -0
  483. package/src/components/CalculatorBonus/CalculatorBonus.tsx +75 -0
  484. package/src/components/CalculatorBonus/CalculatorBonus.ui.json +1 -0
  485. package/src/components/CalculatorBonus/CalculatorBonusContent.ts +16 -0
  486. package/src/components/{Calculator → CalculatorBonus}/getBonus.ts +15 -1
  487. package/src/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.ts +13 -1
  488. package/src/components/DepositFiltration/DepositFiltration.example.json +2 -1
  489. package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +103 -64
  490. package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +91 -53
  491. package/src/components/DepositFiltration/DepositFiltration.tsx +2 -2
  492. package/src/components/DepositFiltration/DepositFiltration.ui.json +7 -1
  493. package/src/components/DepositFiltration/DepositFiltrationContent.ts +3 -3
  494. package/src/components/Footer/Footer.mobile.tsx +1 -1
  495. package/src/components/Footer/LinkList.tsx +10 -9
  496. package/src/components/Header/Header.example.json +0 -1
  497. package/src/components/Header/HeaderSecondaryMenu.tsx +23 -19
  498. package/src/components/MortgageFiltration/MortgageFiltration.example.json +2 -1
  499. package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +67 -46
  500. package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +67 -46
  501. package/src/components/MortgageFiltration/MortgageFiltration.tsx +9 -8
  502. package/src/components/MortgageFiltration/MortgageFiltration.ui.json +7 -1
  503. package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +3 -5
  504. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
  505. package/src/data/SitemapData.ts +13 -3
  506. package/src/ui-kit/BaseFiltration/BaseFiltrationContent.ts +31 -74
  507. package/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +37 -0
  508. package/src/ui-kit/BaseFiltration/FiltrationForm.tsx +6 -16
  509. package/src/ui-kit/BaseFiltration/FiltrationSchemaContent.ts +66 -0
  510. package/src/ui-kit/BaseFiltration/renderCarouselBlocks.tsx +31 -0
  511. package/src/ui-kit/BaseFiltration/renderGridBlocks.tsx +55 -0
  512. package/src/ui-kit/BaseFiltration/useFiltrationForm.ts +9 -16
  513. package/src/ui-kit/Calculator/CalculatorLayout.tsx +17 -0
  514. package/src/{components → ui-kit}/Calculator/CalculatorValueBlock.tsx +1 -1
  515. package/src/{components → ui-kit}/Calculator/Rate.tsx +1 -1
  516. package/src/{components → ui-kit}/Calculator/renderFootnote.tsx +1 -1
  517. package/src/{components → ui-kit}/Calculator/renderRate.tsx +1 -1
  518. package/src/{components → ui-kit}/Calculator/renderWantedSumInput.tsx +2 -2
  519. package/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -4
  520. package/src/ui-kit/NotFound/NotFound.tsx +2 -2
  521. package/src/utils/dataAttributes.ts +4 -0
  522. package/bundle/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  523. package/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  524. package/dist/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  525. package/dist/components/Calculator/BonusCalculatorForm.js +0 -44
  526. package/dist/components/Calculator/BonusCalculatorForm.js.map +0 -1
  527. package/dist/components/Calculator/CalculatorValueBlock.js.map +0 -1
  528. package/dist/components/Calculator/Rate.js.map +0 -1
  529. package/dist/components/Calculator/getBonus.js +0 -13
  530. package/dist/components/Calculator/getBonus.js.map +0 -1
  531. package/dist/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  532. package/dist/components/Calculator/renderFootnote.js.map +0 -1
  533. package/dist/components/Calculator/renderRate.js.map +0 -1
  534. package/dist/components/Calculator/renderWantedSumInput.js.map +0 -1
  535. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  536. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -23
  537. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  538. package/lib/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  539. package/lib/components/Calculator/BonusCalculatorForm.js +0 -42
  540. package/lib/components/Calculator/BonusCalculatorForm.js.map +0 -1
  541. package/lib/components/Calculator/CalculatorValueBlock.js.map +0 -1
  542. package/lib/components/Calculator/Rate.js.map +0 -1
  543. package/lib/components/Calculator/getBonus.js.map +0 -1
  544. package/lib/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  545. package/lib/components/Calculator/renderFootnote.js.map +0 -1
  546. package/lib/components/Calculator/renderRate.js.map +0 -1
  547. package/lib/components/Calculator/renderWantedSumInput.js.map +0 -1
  548. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  549. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -21
  550. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  551. package/mobile/bundle/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  552. package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  553. package/mobile/dist/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  554. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +0 -44
  555. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +0 -1
  556. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +0 -1
  557. package/mobile/dist/components/Calculator/Rate.js.map +0 -1
  558. package/mobile/dist/components/Calculator/getBonus.js +0 -13
  559. package/mobile/dist/components/Calculator/getBonus.js.map +0 -1
  560. package/mobile/dist/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  561. package/mobile/dist/components/Calculator/renderFootnote.js.map +0 -1
  562. package/mobile/dist/components/Calculator/renderRate.js.map +0 -1
  563. package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +0 -7
  564. package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +0 -1
  565. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  566. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -23
  567. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  568. package/mobile/lib/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  569. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +0 -42
  570. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +0 -1
  571. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +0 -1
  572. package/mobile/lib/components/Calculator/Rate.js.map +0 -1
  573. package/mobile/lib/components/Calculator/getBonus.js.map +0 -1
  574. package/mobile/lib/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  575. package/mobile/lib/components/Calculator/renderFootnote.js.map +0 -1
  576. package/mobile/lib/components/Calculator/renderRate.d.ts +0 -8
  577. package/mobile/lib/components/Calculator/renderRate.js.map +0 -1
  578. package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +0 -7
  579. package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +0 -1
  580. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  581. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -21
  582. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  583. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +0 -68
  584. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +0 -64
  585. package/src/components/Calculator/BonusCalculatorForm.tsx +0 -68
  586. package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +0 -64
  587. /package/bundle/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  588. /package/bundle/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  589. /package/bundle/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  590. /package/bundle/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  591. /package/bundle/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  592. /package/dist/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  593. /package/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  594. /package/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  595. /package/dist/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  596. /package/dist/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  597. /package/lib/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  598. /package/lib/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  599. /package/lib/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  600. /package/lib/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  601. /package/lib/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  602. /package/mobile/bundle/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  603. /package/mobile/bundle/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  604. /package/mobile/bundle/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  605. /package/mobile/bundle/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  606. /package/mobile/bundle/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  607. /package/mobile/dist/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  608. /package/mobile/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  609. /package/mobile/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  610. /package/mobile/dist/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  611. /package/mobile/dist/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  612. /package/mobile/lib/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  613. /package/mobile/lib/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  614. /package/mobile/lib/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  615. /package/mobile/lib/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  616. /package/mobile/lib/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
@@ -468,6 +468,9 @@
468
468
  }
469
469
 
470
470
  const getAspectsAttributes = (data) => {
471
+ if (!Array.isArray(data) || !data.length) {
472
+ return {};
473
+ }
471
474
  try {
472
475
  return {
473
476
  'data-aspects': JSON.stringify(data),
@@ -1904,110 +1907,11 @@
1904
1907
  return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: data, children: buttonText }) })) : null] }) }));
1905
1908
  });
1906
1909
 
1907
- const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
1908
-
1909
- const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
1910
- const handleChange = (newValue) => {
1911
- if (!onChange) {
1912
- return;
1913
- }
1914
- const hasAlready = value?.includes(newValue);
1915
- if (multiple) {
1916
- onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
1917
- }
1918
- else {
1919
- onChange(hasAlready ? [] : [newValue]);
1920
- }
1921
- };
1922
- 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)));
1923
- });
1924
-
1925
- const FiltrationForm = JSX(({ children, filtrationSchema, resetButton, field, reset }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-xl", children: [children, joinList(jsx("div", { className: "h-full w-px bg-gray" }))(
1926
- // TS can't correctly refine array's type after filter
1927
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
1928
- Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean))] }), resetButton ? (jsx("div", { children: jsx(Button, { type: "reset", className: "w-full @4xl:w-56 @4xl:ml-s", onClick: reset, children: resetButton?.text }) })) : null] })));
1929
- const renderFormItem = (field) => ([key, item]) => {
1930
- const type = item?.type;
1931
- switch (type) {
1932
- case 'array':
1933
- return renderArrayFormItem(key, field)(item);
1934
- default:
1935
- return null;
1936
- }
1937
- };
1938
- const renderArrayFormItem = (key, field) => (item) => item?.ui !== 'dropdown' ? renderCheckboxes(key, field)(item) : null;
1939
- const renderCheckboxes = (key, field) => (item) => {
1940
- const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
1941
- [];
1942
- return (jsxs("div", { className: "flex-1", children: [item?.title ? (jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-medium", color: "text-primary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: !item?.single, ...field(key) })] }, key));
1943
- };
1944
-
1945
- function zip(firstCol, ...restCols) {
1946
- return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
1947
- }
1948
-
1949
- const isEmpty = (v) => v === null ||
1950
- v === undefined ||
1951
- v === '' ||
1952
- (Array.isArray(v) && v.length === 0) ||
1953
- (typeof v === 'object' && Object.keys(v).length === 0);
1954
-
1955
- const isSingularFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || pattern[key] === target[key];
1956
- const isMultipleFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
1957
- isEmpty(target[key]) ||
1958
- pattern[key]?.every((_) => target[key]?.includes(_));
1959
- const isNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
1960
- isEmpty(target[key]) ||
1961
- naturalNumber(pattern[key]) <= naturalNumber(target[key]);
1962
- const isMultipleNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || target[key]?.includes(pattern[key]);
1963
- const isValueInRange = (key, pattern) => (target) => isEmpty(pattern[key]) ||
1964
- isEmpty(target[key]) ||
1965
- (naturalNumber(pattern[key]?.min) >= naturalNumber(target[key]?.min) &&
1966
- naturalNumber(pattern[key]?.min) <= naturalNumber(target[key]?.max));
1967
- const targetMatchPattern = (pattern, target) => Object.entries(pattern)
1968
- .map(([key, subPattern]) => {
1969
- if (typeof subPattern === 'number') {
1970
- return Array.isArray(target[key])
1971
- ? isMultipleNumberFieldMatch(key, pattern)
1972
- : isNumberFieldMatch(key, pattern);
1973
- }
1974
- if (typeof subPattern === 'object' && 'min' in subPattern && 'max' in subPattern) {
1975
- return isValueInRange(key, pattern);
1976
- }
1977
- return Array.isArray(subPattern)
1978
- ? isMultipleFieldMatch(key, pattern)
1979
- : isSingularFieldMatch(key, pattern);
1980
- })
1981
- .every((predicate) => predicate(target));
1982
- const naturalNumber = (n) => Number(n || 0);
1983
-
1984
- const filterBlocks = (blocksWithProps, filtrationState) => (normalize = identity) => blocksWithProps
1985
- ?.filter(([, content]) => targetMatchPattern(filtrationState, normalize(content) || {}))
1986
- .map(([block]) => block);
1987
-
1988
- const useFiltrationForm = (initialFormState, { block, page, normalize = identity, }) => {
1989
- const blocks = block?.blocks || [];
1990
- const [filtrationState, { field, reset, update: replaceFiltrationState }] = useForm(initialFormState);
1991
- const blocksWithProps = useMemo(() => zip(blocks, blocks.map((b) => resolveBlockProps(b.content, page?.fallback))), [blocks, page?.fallback]);
1992
- const blocksToRender = filtrationState === initialFormState
1993
- ? blocks
1994
- : filterBlocks(blocksWithProps, filtrationState)(normalize);
1995
- return [
1996
- filtrationState,
1997
- { blocksToRender, blocksWithProps },
1998
- { field, reset, update: replaceFiltrationState },
1999
- ];
2000
- };
2001
-
2002
1910
  /** @deprecated */
2003
1911
  const AlignStyles = 'text-center';
2004
1912
 
2005
1913
  const NotFound = JSX(({ title, description }) => (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: AlignStyles })] })));
2006
1914
 
2007
- const getBorderStyle = (showBorder = false) => showBorder
2008
- ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
2009
- : '';
2010
-
2011
1915
  const useCarouselControls = (props, initialIndex = 0) => {
2012
1916
  const { itemCount, visibleItemCount } = props;
2013
1917
  const [activeIndex, setActiveIndex] = useState(initialIndex);
@@ -2259,6 +2163,10 @@
2259
2163
 
2260
2164
  const ITEMS_GAP = 16;
2261
2165
 
2166
+ const getBorderStyle = (showBorder = false) => showBorder
2167
+ ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
2168
+ : '';
2169
+
2262
2170
  const renderCardHighlight = ({ className, text = 'ХИТ' } = {}) => (jsxs("div", { className: style('w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black', className), children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "24", height: "24" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: text })] }));
2263
2171
 
2264
2172
  const cardBaseStyle = 'relative h-full';
@@ -2322,31 +2230,191 @@
2322
2230
  }),
2323
2231
  });
2324
2232
 
2233
+ const renderCarouselBlocks = ({ blocksToRender, ...rest }) => (jsx(Carousel, { padding: "p-0", isEmbedded: true, itemCount: blocksToRender?.length, visibleItemCount: 0, isAlignCenter: true, isGap: false, children: renderBlocksList(blocksToRender, {
2234
+ ...rest.options,
2235
+ parent: rest.block,
2236
+ renderProps: (block, options, i) => (jsx("div", { className: style('relative min-w-80', getBorderStyle(true)), children: renderBlock$1(block, options) }, String(i))),
2237
+ }) }));
2238
+
2239
+ const isOdd = (n) => n % 2 !== 0;
2240
+
2241
+ const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
2242
+ const Tag = tag;
2243
+ return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
2244
+ });
2245
+
2246
+ const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
2247
+ ? 'bg-main-divider text-main-disabled hover:bg-main-divider'
2248
+ : 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
2249
+ icon,
2250
+ iconVersion: 'white',
2251
+ }, className: "my-auto", width: "20", height: "20" })) : null })));
2252
+ const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
2253
+ const labels = ['Развернуть', 'Скрыть'];
2254
+ const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
2255
+ return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
2256
+ };
2257
+
2258
+ const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
2259
+ const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
2260
+ const onToggle = useCallback(() => {
2261
+ setIsUnfolded((_) => !_);
2262
+ }, []);
2263
+ const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
2264
+ const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
2265
+ return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
2266
+ });
2267
+
2268
+ function useResizeObserver(callback, deps) {
2269
+ const ref = useRef(null);
2270
+ useEffect(() => {
2271
+ const element = ref?.current;
2272
+ if (!element) {
2273
+ return undefined;
2274
+ }
2275
+ const observer = new ResizeObserver((entries) => {
2276
+ callback(element, entries[0]);
2277
+ });
2278
+ observer.observe(element);
2279
+ return () => {
2280
+ observer.disconnect();
2281
+ };
2282
+ }, [callback, ...deps]);
2283
+ return ref;
2284
+ }
2285
+
2286
+ const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
2287
+ const containerRef = useRef(null);
2288
+ const childrenWrapperRef = useResizeObserver((childrenWrapperEl) => {
2289
+ if (containerRef.current) {
2290
+ containerRef.current.style.maxHeight = isUnfolded
2291
+ ? `${childrenWrapperEl.scrollHeight}px`
2292
+ : '';
2293
+ }
2294
+ }, [isUnfolded]);
2295
+ return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} `, children: jsx("div", { className: className, ref: childrenWrapperRef, children: children }) }));
2296
+ });
2297
+
2298
+ const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
2299
+ const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs';
2300
+ const renderGridBlocks = ({ topItemsCount = 0, label = '', block, blocksToRender = [], ...rest }) => {
2301
+ const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
2302
+ ? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
2303
+ : [blocksToRender, []];
2304
+ return (jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS$1[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] }));
2305
+ };
2306
+
2307
+ const FilteredBlocks = JSX(({ blocksSection, blocksToRender = [], notFound, ...rest }) => {
2308
+ switch (blocksSection?.view) {
2309
+ case 'grid':
2310
+ return (jsxs("div", { children: [renderNotFound(notFound, blocksToRender), renderGridBlocks({ ...blocksSection, ...rest, blocksToRender })] }));
2311
+ case 'carousel':
2312
+ return (jsxs("div", { children: [renderNotFound(notFound, blocksToRender), renderCarouselBlocks({ ...rest, blocksToRender })] }));
2313
+ default:
2314
+ return null;
2315
+ }
2316
+ });
2317
+ const renderNotFound = (notFound, blocksToRender) => notFound && !blocksToRender.length ? jsx(NotFound, { ...notFound }) : null;
2318
+
2319
+ const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
2320
+
2321
+ const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
2322
+ const handleChange = (newValue) => {
2323
+ if (!onChange) {
2324
+ return;
2325
+ }
2326
+ const hasAlready = value?.includes(newValue);
2327
+ if (multiple) {
2328
+ onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
2329
+ }
2330
+ else {
2331
+ onChange(hasAlready ? [] : [newValue]);
2332
+ }
2333
+ };
2334
+ 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)));
2335
+ });
2336
+
2337
+ const FiltrationForm = JSX(({ children, filtrationSchema, resetButton, field, reset }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-xl", children: [children, joinList((jsx("div", { className: "h-full w-px bg-gray" })))(Object.entries(filtrationSchema).map(renderFormItem(field)).filter(Boolean))] }), resetButton ? (jsx("div", { children: jsx(Button, { type: "reset", className: "w-full @4xl:w-56 @4xl:ml-s", onClick: reset, children: resetButton?.text }) })) : null] })));
2338
+ const renderFormItem = (field) => ([key, item]) => {
2339
+ const type = item?.type;
2340
+ switch (type) {
2341
+ case 'array':
2342
+ return renderCheckboxes(key, field)(item);
2343
+ default:
2344
+ return null;
2345
+ }
2346
+ };
2347
+ const renderCheckboxes = (key, field) => (item) => {
2348
+ const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
2349
+ [];
2350
+ return (jsxs("div", { className: "flex-1", children: [item?.title ? (jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-medium", color: "text-primary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: !item?.single, ...field(key) })] }, key));
2351
+ };
2352
+
2353
+ function zip(firstCol, ...restCols) {
2354
+ return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
2355
+ }
2356
+
2357
+ const isEmpty = (v) => v === null ||
2358
+ v === undefined ||
2359
+ v === '' ||
2360
+ (Array.isArray(v) && v.length === 0) ||
2361
+ (typeof v === 'object' && Object.keys(v).length === 0);
2362
+
2363
+ const isSingularFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || pattern[key] === target[key];
2364
+ const isMultipleFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
2365
+ isEmpty(target[key]) ||
2366
+ pattern[key]?.every((_) => target[key]?.includes(_));
2367
+ const isNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
2368
+ isEmpty(target[key]) ||
2369
+ naturalNumber(pattern[key]) <= naturalNumber(target[key]);
2370
+ const isMultipleNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || target[key]?.includes(pattern[key]);
2371
+ const isValueInRange = (key, pattern) => (target) => isEmpty(pattern[key]) ||
2372
+ isEmpty(target[key]) ||
2373
+ (naturalNumber(pattern[key]?.min) >= naturalNumber(target[key]?.min) &&
2374
+ naturalNumber(pattern[key]?.min) <= naturalNumber(target[key]?.max));
2375
+ const targetMatchPattern = (pattern, target) => Object.entries(pattern)
2376
+ .map(([key, subPattern]) => {
2377
+ if (typeof subPattern === 'number') {
2378
+ return Array.isArray(target[key])
2379
+ ? isMultipleNumberFieldMatch(key, pattern)
2380
+ : isNumberFieldMatch(key, pattern);
2381
+ }
2382
+ if (typeof subPattern === 'object' && 'min' in subPattern && 'max' in subPattern) {
2383
+ return isValueInRange(key, pattern);
2384
+ }
2385
+ return Array.isArray(subPattern)
2386
+ ? isMultipleFieldMatch(key, pattern)
2387
+ : isSingularFieldMatch(key, pattern);
2388
+ })
2389
+ .every((predicate) => predicate(target));
2390
+ const naturalNumber = (n) => Number(n || 0);
2391
+
2392
+ const filterBlocks = (blocksWithProps, filtrationState) => (normalize = identity) => blocksWithProps
2393
+ ?.filter(([, content]) => targetMatchPattern(filtrationState, normalize(content) || {}))
2394
+ .map(([block]) => block);
2395
+
2396
+ const useFiltrationForm = (initialFormState, { block, page, normalize = identity }) => {
2397
+ const blocks = block?.blocks || [];
2398
+ const [filtrationState, { field, reset, update }] = useForm(initialFormState);
2399
+ const blocksWithProps = useMemo(() => zip(blocks, blocks.map((b) => resolveBlockProps(b.content, page?.fallback))), [blocks, page?.fallback]);
2400
+ const blocksToRender = filtrationState === initialFormState
2401
+ ? blocks
2402
+ : filterBlocks(blocksWithProps, filtrationState)(normalize);
2403
+ return [filtrationState, { blocksToRender, blocksWithProps }, { field, reset, update }];
2404
+ };
2405
+
2325
2406
  const EMPTY_SCHEMA = {};
2326
2407
  const initialFiltrationState$3 = {};
2327
- const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA, resetButton, notFound, ...rest }) => {
2408
+ const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA, consumerField = {}, resetButton, ...rest }) => {
2328
2409
  const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$3, {
2329
2410
  block: rest.block,
2330
2411
  page: rest.options?.page,
2331
2412
  });
2332
- const selectArrProps = Object.entries(filtrationSchema)
2333
- // Only StringArray
2334
- .filter(([, schema]) => schema.type === 'array' && schema.ui === 'dropdown')
2335
- .map(([name, schema]) => ({
2336
- className: 'w-64',
2337
- label: schema.title,
2338
- options: stringArrayToOptions(schema),
2339
- ...field(name, {
2413
+ const ConsumerSelect = (jsx(Select, { className: "w-64", label: consumerField?.title, options: stringArrayToOptions(consumerField), ...field('consumer', {
2340
2414
  parse: ({ key }) => [key],
2341
- format: ([value] = []) => stringArrayToOptions(schema).find((_) => _.key === value) || { key: '' },
2342
- }),
2343
- }));
2344
- const Selects = selectArrProps.map((props, i) => jsx(Select, { ...props }, String(i)));
2345
- return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [Selects, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx("div", { className: style(blocksToRender?.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsx(Carousel, { padding: "p-0", isEmbedded: true, itemCount: blocksToRender?.length, visibleItemCount: 0, isAlignCenter: true, isGap: false, children: renderBlocksList(blocksToRender, {
2346
- ...rest.options,
2347
- parent: rest.block,
2348
- renderProps: (block, options, i) => (jsx("div", { className: style('relative min-w-80', getBorderStyle(true)), children: renderBlock$1(block, options) }, String(i))),
2349
- }) })] }));
2415
+ format: ([value] = []) => stringArrayToOptions(consumerField).find((_) => _.key === value) || { key: '' },
2416
+ }) }));
2417
+ return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [ConsumerSelect, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
2350
2418
  }, {
2351
2419
  childrenTypes: ['CarouselTariffsCard'],
2352
2420
  childSchema: (content) => content?.filtrationSchema || {},
@@ -2422,6 +2490,25 @@
2422
2490
  .filter(Boolean)
2423
2491
  .join(' ') }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
2424
2492
 
2493
+ const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: text })) : null;
2494
+
2495
+ const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { className: "space-y-s", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-10 @5xl:h-auto @5xl:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", 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" })) })] })));
2496
+
2497
+ const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: "font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
2498
+
2499
+ const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, ...rest }) })] }));
2500
+
2501
+ const DEFAULT_MONEY_STEP = 1000;
2502
+ function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
2503
+ const items = [
2504
+ `От ${toLocalNumberFormat(2)(rest.min || 0)} ₽`,
2505
+ `До ${toLocalNumberFormat(2)(rest.max || 0)} ₽`,
2506
+ ];
2507
+ return jsx(InputRange, { items: isShowItems ? items : [], step: step, ...rest });
2508
+ }
2509
+
2510
+ const CalculatorFormLayout = JSX(({ className, inputChildren, rateChildren, resultChildren }) => (jsxs("section", { className: style('flex flex-col justify-between @5xl:flex-row gap-m', className), children: [jsx("div", { className: "flex flex-col gap-y-m sm:max-w-md gap-2xl", children: inputChildren }), jsx("div", { className: "border-b border-main-divider md:hidden" }), rateChildren, jsx("div", { className: "flex flex-col gap-2xl sm:w-96 max-w-full", children: resultChildren })] })));
2511
+
2425
2512
  const DEFAULT_MIN_SUM$1 = 10000;
2426
2513
  const DEFAULT_MAX_SUM$1 = 5000000;
2427
2514
  const CREDIT_DEFAULT_SUM = 200000;
@@ -2445,8 +2532,8 @@
2445
2532
  const BUSINESS_OPERATING_MIN_DAYS = 90;
2446
2533
  const BUSINESS_OPERATING_MAX_DAYS = 730;
2447
2534
  const BUSINESS_DEFAULT_DAYS = 60;
2448
- const MONTHS_IN_YEAR = 12;
2449
- const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR * 100;
2535
+ const MONTHS_IN_YEAR$1 = 12;
2536
+ const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR$1 * 100;
2450
2537
  const DEFAULT_CREDIT_CALCULATOR_PARAMS = {
2451
2538
  minSum: DEFAULT_MIN_SUM$1,
2452
2539
  maxSum: DEFAULT_MAX_SUM$1,
@@ -2472,20 +2559,6 @@
2472
2559
  isSalaryClient: false,
2473
2560
  isInsurance: true,
2474
2561
  };
2475
- const DEFAULT_TRAVEL_MIN_SUM = 6000;
2476
- const DEFAULT_REST_MIN_SUM = 6000;
2477
- const DEFAULT_BONUS_CALCULATOR_PARAMS = {
2478
- minSumTravel: 6000,
2479
- maxSumTravel: 200000,
2480
- minSumOther: 6000,
2481
- maxSumOther: 200000,
2482
- maxBonus: 5000,
2483
- prefMonthsNum: 2,
2484
- prefTravelBonusRate: 0.015,
2485
- prefRestBonusRate: 0.01,
2486
- travelBonusRate: 0.015,
2487
- restBonusRate: 0.01,
2488
- };
2489
2562
  const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
2490
2563
  minSum: 50000,
2491
2564
  maxSum: 100000001,
@@ -2507,76 +2580,6 @@
2507
2580
  depositeName: "Депозит 'Стабильный'",
2508
2581
  };
2509
2582
 
2510
- const getBonus = (params, bonusTravelValue, bonusOtherValue) => {
2511
- const { maxBonus = 5000, prefMonthsNum = DEFAULT_BONUS_CALCULATOR_PARAMS.prefMonthsNum, prefTravelBonusRate = DEFAULT_BONUS_CALCULATOR_PARAMS.prefTravelBonusRate, prefRestBonusRate = 0.01, travelBonusRate = 0.015, restBonusRate = 0.01, } = params;
2512
- const prefBonus = Math.min(Math.round(prefTravelBonusRate * bonusTravelValue) +
2513
- Math.round(prefRestBonusRate * bonusOtherValue), maxBonus);
2514
- const bonus = Math.min(Math.round(travelBonusRate * bonusTravelValue) + Math.round(restBonusRate * bonusOtherValue), maxBonus);
2515
- const yearBonus = prefBonus * prefMonthsNum + bonus * (MONTHS_IN_YEAR - prefMonthsNum);
2516
- return [prefBonus, yearBonus];
2517
- };
2518
-
2519
- const getBonusCalculatorParams = (userInputParams, calcSource) => {
2520
- const { travelExpenseValue, restExpenseValue } = userInputParams;
2521
- const [monthBonus, yearBonus] = getBonus(calcSource || DEFAULT_BONUS_CALCULATOR_PARAMS, travelExpenseValue, restExpenseValue);
2522
- return {
2523
- ...calcSource,
2524
- ...userInputParams,
2525
- monthBonus,
2526
- yearBonus,
2527
- };
2528
- };
2529
-
2530
- const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: text })) : null;
2531
-
2532
- const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: "font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
2533
-
2534
- const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { className: "space-y-s", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-10 @5xl:h-auto @5xl:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", 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" })) })] })));
2535
-
2536
- const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, ...rest }) })] }));
2537
-
2538
- const DEFAULT_MONEY_STEP = 1000;
2539
- function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
2540
- const items = [
2541
- `От ${toLocalNumberFormat(2)(rest.min || 0)} ₽`,
2542
- `До ${toLocalNumberFormat(2)(rest.max || 0)} ₽`,
2543
- ];
2544
- return jsx(InputRange, { items: isShowItems ? items : [], step: step, ...rest });
2545
- }
2546
-
2547
- const BonusCalculatorForm = JSX(({ className = '', calcSource, buttons, footnote }) => {
2548
- const [userInputParams, { field }] = useForm({
2549
- travelExpenseValue: DEFAULT_TRAVEL_MIN_SUM,
2550
- restExpenseValue: DEFAULT_REST_MIN_SUM,
2551
- });
2552
- const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } = getBonusCalculatorParams(userInputParams, calcSource);
2553
- return (jsxs("section", { className: style('flex flex-col justify-between @5xl:flex-row gap-y-4xl', className), children: [jsxs("div", { className: "flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0", children: [renderWantedSumInput({
2554
- title: 'Сумма покупок в категории путешествия, ₽',
2555
- min: minSumTravel,
2556
- max: maxSumTravel,
2557
- step: 500,
2558
- isShowItems: false,
2559
- ...field('travelExpenseValue'),
2560
- }), renderWantedSumInput({
2561
- title: 'Сумма покупок в остальных категориях, ₽',
2562
- min: minSumOther,
2563
- max: maxSumOther,
2564
- step: 500,
2565
- isShowItems: false,
2566
- ...field('restExpenseValue'),
2567
- })] }), monthBonus >= 0
2568
- ? renderRate({
2569
- title: 'Баллов за месяц',
2570
- rate: monthBonus,
2571
- fractionDigits: 0,
2572
- isUnknownRateShown: false,
2573
- unit: '',
2574
- })
2575
- : null, jsxs("div", { className: "flex flex-col gap-y-xl @xl: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)] })] }));
2576
- });
2577
-
2578
- const CalculatorFormLayout = JSX(({ className, inputChildren, rateChildren, resultChildren }) => (jsxs("section", { className: style('flex flex-col justify-between @5xl:flex-row gap-m', className), children: [jsx("div", { className: "flex flex-col gap-y-m sm:max-w-md gap-2xl", children: inputChildren }), jsx("div", { className: "border-b border-main-divider md:hidden" }), rateChildren, jsx("div", { className: "flex flex-col gap-2xl sm:w-96 max-w-full", children: resultChildren })] })));
2579
-
2580
2583
  const getMoneyDefaultValue = (defaultParams, defaultMoney = 0) => defaultParams?.sum ? defaultParams.sum : defaultMoney;
2581
2584
  const getMonthsDefaultValue = (defaultParams, defaultMonth = 0) => defaultParams?.period &&
2582
2585
  defaultParams.period >= DEFAULT_MIN_MONTHS &&
@@ -2774,7 +2777,7 @@
2774
2777
  }
2775
2778
  }
2776
2779
  else {
2777
- return Math.round(moneyValue / monthsValue) + moneyValue * (rate / (MONTHS_IN_YEAR * 100)); // Используется значение ставки (rate) в процентах, делённое на сто.
2780
+ return Math.round(moneyValue / monthsValue) + moneyValue * (rate / (MONTHS_IN_YEAR$1 * 100)); // Используется значение ставки (rate) в процентах, делённое на сто.
2778
2781
  }
2779
2782
  };
2780
2783
 
@@ -3126,7 +3129,6 @@
3126
3129
  CreditCalculatorForm,
3127
3130
  DepositCalculatorForm,
3128
3131
  BusinessDepositCalculatorForm,
3129
- BonusCalculatorForm,
3130
3132
  RefinancingCalculatorForm,
3131
3133
  };
3132
3134
 
@@ -3190,6 +3192,86 @@
3190
3192
  })) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
3191
3193
  }
3192
3194
 
3195
+ const CalculatorLayout = JSX(({ className, title, children, ...rest }) => (jsxs(BlockWrapper, { className: style('space-y-xl', className), defaultPadding: "p-4xl", ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title }) : null, children] })));
3196
+
3197
+ const DEFAULT_BONUS_CALCULATOR_PARAMS$1 = {
3198
+ minSumTravel: 6000,
3199
+ maxSumTravel: 200000,
3200
+ minSumOther: 6000,
3201
+ maxSumOther: 200000,
3202
+ maxBonus: 5000,
3203
+ prefMonthsNum: 2,
3204
+ prefTravelBonusRate: 0.015,
3205
+ prefRestBonusRate: 0.01,
3206
+ travelBonusRate: 0.015,
3207
+ restBonusRate: 0.01,
3208
+ };
3209
+ const MONTHS_IN_YEAR = 12;
3210
+ const getBonus = (params, bonusTravelValue, bonusOtherValue) => {
3211
+ const { maxBonus = 5000, prefMonthsNum = DEFAULT_BONUS_CALCULATOR_PARAMS$1.prefMonthsNum, prefTravelBonusRate = DEFAULT_BONUS_CALCULATOR_PARAMS$1.prefTravelBonusRate, prefRestBonusRate = 0.01, travelBonusRate = 0.015, restBonusRate = 0.01, } = params;
3212
+ const prefBonus = Math.min(Math.round(prefTravelBonusRate * bonusTravelValue) +
3213
+ Math.round(prefRestBonusRate * bonusOtherValue), maxBonus);
3214
+ const bonus = Math.min(Math.round(travelBonusRate * bonusTravelValue) + Math.round(restBonusRate * bonusOtherValue), maxBonus);
3215
+ const yearBonus = prefBonus * prefMonthsNum + bonus * (MONTHS_IN_YEAR - prefMonthsNum);
3216
+ return [prefBonus, yearBonus];
3217
+ };
3218
+
3219
+ const DEFAULT_BONUS_CALCULATOR_PARAMS = {
3220
+ minSumTravel: 6000,
3221
+ maxSumTravel: 200000,
3222
+ minSumOther: 6000,
3223
+ maxSumOther: 200000,
3224
+ maxBonus: 5000,
3225
+ prefMonthsNum: 2,
3226
+ prefTravelBonusRate: 0.015,
3227
+ prefRestBonusRate: 0.01,
3228
+ travelBonusRate: 0.015,
3229
+ restBonusRate: 0.01,
3230
+ };
3231
+ const getBonusCalculatorParams = (userInputParams, calcSource) => {
3232
+ const { travelExpenseValue, restExpenseValue } = userInputParams;
3233
+ const [monthBonus, yearBonus] = getBonus(calcSource || DEFAULT_BONUS_CALCULATOR_PARAMS, travelExpenseValue, restExpenseValue);
3234
+ return {
3235
+ ...calcSource,
3236
+ ...userInputParams,
3237
+ monthBonus,
3238
+ yearBonus,
3239
+ };
3240
+ };
3241
+
3242
+ const DEFAULT_TRAVEL_MIN_SUM = 6000;
3243
+ const DEFAULT_REST_MIN_SUM = 6000;
3244
+ const CalculatorBonus = UniBlock(({ className = '', title, calcSource, buttons, footnote, ...rest }) => {
3245
+ const [userInputParams, { field }] = useForm({
3246
+ travelExpenseValue: DEFAULT_TRAVEL_MIN_SUM,
3247
+ restExpenseValue: DEFAULT_REST_MIN_SUM,
3248
+ });
3249
+ const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } = getBonusCalculatorParams(userInputParams, calcSource);
3250
+ return (jsx(CalculatorLayout, { className: className, title: title, ...rest, children: jsxs("section", { className: style('flex flex-col justify-between @4xl:flex-row gap-y-4xl', className), children: [jsxs("div", { className: "flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0", children: [renderWantedSumInput({
3251
+ title: 'Сумма покупок в категории путешествия, ₽',
3252
+ min: minSumTravel,
3253
+ max: maxSumTravel,
3254
+ step: 500,
3255
+ isShowItems: false,
3256
+ ...field('travelExpenseValue'),
3257
+ }), renderWantedSumInput({
3258
+ title: 'Сумма покупок в остальных категориях, ₽',
3259
+ min: minSumOther,
3260
+ max: maxSumOther,
3261
+ step: 500,
3262
+ isShowItems: false,
3263
+ ...field('restExpenseValue'),
3264
+ })] }), monthBonus >= 0
3265
+ ? renderRate({
3266
+ title: 'Баллов за месяц',
3267
+ rate: monthBonus,
3268
+ fractionDigits: 0,
3269
+ isUnknownRateShown: false,
3270
+ unit: '',
3271
+ })
3272
+ : null, jsxs("div", { className: "flex flex-col gap-y-xl @xl: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)] })] }) }));
3273
+ });
3274
+
3193
3275
  const NumberInput = JSX((props) => {
3194
3276
  const { onChange, min, max, defaultValue = '0', fractionDigits = 0, ...inputProps } = props;
3195
3277
  const normalizedProps = useNormalizedInput(props, {
@@ -3352,46 +3434,6 @@
3352
3434
  const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, items = [], isDotted, socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, isDotted: isDotted, listItemSize: "S" }), renderAdditionalDescription(additionalDescription, align)] }) }) })));
3353
3435
  const renderAdditionalDescription = (additionalDescription, align) => additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", align: align, children: additionalDescription })) : null;
3354
3436
 
3355
- const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
3356
- const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
3357
- const onToggle = useCallback(() => {
3358
- setIsUnfolded((_) => !_);
3359
- }, []);
3360
- const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
3361
- const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
3362
- return isFoldButtonOnTop ? (jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
3363
- });
3364
-
3365
- function useResizeObserver(callback, deps) {
3366
- const ref = useRef(null);
3367
- useEffect(() => {
3368
- const element = ref?.current;
3369
- if (!element) {
3370
- return undefined;
3371
- }
3372
- const observer = new ResizeObserver((entries) => {
3373
- callback(element, entries[0]);
3374
- });
3375
- observer.observe(element);
3376
- return () => {
3377
- observer.disconnect();
3378
- };
3379
- }, [callback, ...deps]);
3380
- return ref;
3381
- }
3382
-
3383
- const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
3384
- const containerRef = useRef(null);
3385
- const childrenWrapperRef = useResizeObserver((childrenWrapperEl) => {
3386
- if (containerRef.current) {
3387
- containerRef.current.style.maxHeight = isUnfolded
3388
- ? `${childrenWrapperEl.scrollHeight}px`
3389
- : '';
3390
- }
3391
- }, [isUnfolded]);
3392
- return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} `, children: jsx("div", { className: className, ref: childrenWrapperRef, children: children }) }));
3393
- });
3394
-
3395
3437
  const renderCardInfo = (cell, i) => {
3396
3438
  const { title, description, buttons } = cell;
3397
3439
  return (jsxs("div", { className: "py-lg border-b border-main-divider", children: [title ? (jsx("div", { className: "opacity-80", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: title }) })) : null, description ? (jsx("div", { className: "mt-2xs", children: jsx(Text, { size: "text-xl", color: "text-primary-text", children: description }) })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
@@ -3489,36 +3531,6 @@
3489
3531
  const renderBlocks = (info) => (jsx("div", { className: "flex gap-5xl grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index })) }));
3490
3532
  const renderBlocksColumn = ({ column, index }) => column ? (jsx("div", { className: "flex flex-col gap-xl grow basis-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { children: [jsx(Headline, { title: title, description: description, headlineVersion: "XS", align: "text-left", isEmbedded: true }), additionalDescription ? (jsx("div", { className: "mt-xs opacity-80", children: jsx(Paragraph, { size: "text-m", font: "font-light", children: additionalDescription }) })) : null, button?.href ? jsx(LinkButton, { className: "mt-xl", ...button }) : null] }, String(key)))) }, `col-${String(index)}`)) : null;
3491
3533
 
3492
- const isOdd = (n) => n % 2 !== 0;
3493
-
3494
- const TextWithIcon = JSX(({ textNode, iconNode, tag, onClick, justifyContent = 'between', className, role, ...rest }) => {
3495
- const Tag = tag;
3496
- return (jsxs(Tag, { tag: tag, className: style('flex items-center w-full gap-1', justifyContent === 'between' ? 'justify-between' : 'justify-center', className), onClick: onClick, role: role, ...rest, children: [textNode ? jsx("div", { children: textNode }) : null, iconNode ? jsx("div", { children: iconNode }) : null] }));
3497
- });
3498
-
3499
- const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => (jsx(TextWithIcon, { tag: "button", onClick: onClick, disabled: disabled, "data-theme": dataTheme, justifyContent: "center", role: "button", className: style('py-4 border border-transparent outline-none focus:border-primary-text space-x-s', disabled
3500
- ? 'bg-main-divider text-main-disabled hover:bg-main-divider'
3501
- : 'bg-primary-main text-white hover:bg-primary-hove', className), textNode: jsx(Text, { size: "text-h4", children: label }), iconNode: icon ? (jsx(Img, { image: {
3502
- icon,
3503
- iconVersion: 'white',
3504
- }, className: "my-auto", width: "20", height: "20" })) : null })));
3505
- const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
3506
- const labels = ['Развернуть', 'Скрыть'];
3507
- const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
3508
- return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
3509
- };
3510
-
3511
- const ICONS$1 = ['ArrowDownIcon', 'ArrowUpIcon'];
3512
- const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
3513
- const BaseFiltrationInner = JSX(({ label = '', blocksToRender = [], topItemsCount = 0, block, notFound, ...rest }) => {
3514
- const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
3515
- ? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
3516
- : [blocksToRender, []];
3517
- return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
3518
- return (jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? jsx(AdTile, { className: "col-span-6", ...rest }) : null] }));
3519
- }, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS$1[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
3520
- });
3521
-
3522
3534
  const isRateRow = (rateRow) => {
3523
3535
  return typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
3524
3536
  };
@@ -3545,7 +3557,7 @@
3545
3557
  return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset, children: jsxs("div", { className: "@4xl:max-w-xs", children: [jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', {
3546
3558
  parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
3547
3559
  format: ({ min }) => String(min),
3548
- }) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(BaseFiltrationInner, { blocksToRender: blocksToRender, ...rest })] }));
3560
+ }) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
3549
3561
  }, {
3550
3562
  childrenTypes: ['ProductBlock'],
3551
3563
  childSchema: (content) => ({
@@ -4254,8 +4266,8 @@
4254
4266
  });
4255
4267
 
4256
4268
  const SEARCH_TERM_MIN_LENGTH = 3;
4257
- const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
4258
- const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
4269
+ const LocationDialog = JSX(({ foreignOffices, branches }) => {
4270
+ const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
4259
4271
  const link = useLink({ isRemote: true });
4260
4272
  const { href } = link({ href: `/branches/${currentLocation.slug}` });
4261
4273
  const [query, setQuery] = useState('');
@@ -4298,10 +4310,12 @@
4298
4310
  const MINDBOX_EVENT_SEARCH_CLICK = 'headerSearchClick';
4299
4311
  const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
4300
4312
  const iconVersion = version === 'transparent' ? 'white' : 'black';
4301
- const [currentLocation] = useLocation(rest.defaultLocation);
4313
+ const [currentLocation] = useLocation(rest?.branches?.default);
4302
4314
  const searchDialog = useSearchDialog(rest);
4303
4315
  const locationDialog = useLocationDialog(rest);
4304
- return (jsxs("div", { className: style('flex items-center gap-lg', className), role: "navigation", children: [jsx(TopItem, { flat: true, href: "#", text: currentLocation?.name, data: [
4316
+ const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
4317
+ const openLocationDialog = useCallback(() => locationDialog.open(), [locationDialog]);
4318
+ return (jsxs("div", { className: style('flex items-center gap-lg', className), role: "navigation", children: [rest?.branches?.visible ? (jsx(TopItem, { flat: true, href: "#", text: currentLocation?.name, data: [
4305
4319
  {
4306
4320
  aspectName: MINDBOX_ASPECT,
4307
4321
  params: {
@@ -4310,7 +4324,7 @@
4310
4324
  eventValueText: currentLocation?.name ?? '',
4311
4325
  },
4312
4326
  },
4313
- ], onClick: () => locationDialog.open() }), rest.officesAtms?.href ? (jsx(TopItem, { flat: true, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ...rest.officesAtms })) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A", onClick: () => searchDialog.open(), data: [
4327
+ ], onClick: openLocationDialog })) : null, rest?.officesAtms?.href ? jsx(TopItem, { flat: true, ...rest.officesAtms }) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A", onClick: openSearchDialog, data: [
4314
4328
  {
4315
4329
  aspectName: MINDBOX_ASPECT,
4316
4330
  params: {
@@ -4790,18 +4804,18 @@
4790
4804
  stage: [],
4791
4805
  };
4792
4806
  const MortgageFiltration = UniBlock(({ className, hotFilters, filtrationSchema = {}, resetButton, ...rest }) => {
4793
- const [filtrationState, { blocksToRender }, { field, reset, update }] = useFiltrationForm(initialFiltrationState, {
4807
+ const [filtrationState, { blocksToRender }, { field, reset, update: replaceFiltrationState }] = useFiltrationForm(initialFiltrationState, {
4794
4808
  block: rest.block,
4795
4809
  page: rest.options?.page,
4796
4810
  });
4797
- const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => update(_), []);
4811
+ const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => replaceFiltrationState(_), []);
4798
4812
  const tabsControlProps = useHotFilters({
4799
4813
  hotFilters,
4800
4814
  filtrationState,
4801
4815
  blocks: rest.block?.blocks,
4802
4816
  onFiltrationStateChange: handleFiltrationStateChange,
4803
4817
  });
4804
- return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset }), jsx(BaseFiltrationInner, { blocksToRender: blocksToRender, ...rest })] }));
4818
+ return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), jsx(FiltrationForm, { filtrationSchema: filtrationSchema, resetButton: resetButton, field: field, reset: reset }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
4805
4819
  }, {
4806
4820
  childrenTypes: ['ProductBlock'],
4807
4821
  childSchema: (content) => content?.filtrationSchema || {},
@@ -5939,6 +5953,7 @@
5939
5953
  BonusBenefitsBlock,
5940
5954
  ButtonsBlock,
5941
5955
  Calculator,
5956
+ CalculatorBonus,
5942
5957
  CardTransfer,
5943
5958
  Carousel,
5944
5959
  CarouselBankHistoryCard,
@@ -6155,7 +6170,7 @@
6155
6170
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6156
6171
  });
6157
6172
 
6158
- const packageVersion = "0.14.291";
6173
+ const packageVersion = "0.14.293";
6159
6174
 
6160
6175
  exports.Blocks = Blocks;
6161
6176
  exports.ContentPage = ContentPage;