@redneckz/wildless-cms-uni-blocks 0.14.291 → 0.14.293

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 (320) hide show
  1. package/bin/migration-scripts/0.14.293.js +40 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +210 -210
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  6. package/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  7. package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  8. package/bundle/data/SitemapData.d.ts +12 -3
  9. package/bundle/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  10. package/bundle/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  11. package/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  12. package/bundle/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  13. package/bundle/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  14. package/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  15. package/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  16. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  17. package/bundle/ui-kit/NotFound/NotFound.d.ts +2 -2
  18. package/bundle/utils/dataAttributes.d.ts +2 -2
  19. package/dist/api/LeadServiceAPI.js +2 -1
  20. package/dist/api/LeadServiceAPI.js.map +1 -1
  21. package/dist/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  22. package/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  23. package/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  24. package/dist/components/DepositFiltration/DepositFiltration.js +2 -2
  25. package/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  26. package/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  27. package/dist/components/Footer/Footer.mobile.js +1 -1
  28. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  29. package/dist/components/Footer/LinkList.js +5 -3
  30. package/dist/components/Footer/LinkList.js.map +1 -1
  31. package/dist/components/Header/HeaderSecondaryMenu.js +6 -3
  32. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  33. package/dist/components/MortgageFiltration/MortgageFiltration.js +4 -4
  34. package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  35. package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  36. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  37. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  38. package/dist/data/SitemapData.d.ts +12 -3
  39. package/dist/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  40. package/dist/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  41. package/dist/ui-kit/BaseFiltration/FilteredBlocks.js +19 -0
  42. package/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  43. package/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  44. package/dist/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  45. package/dist/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  46. package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  47. package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  48. package/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  49. package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  50. package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js +15 -0
  51. package/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  52. package/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  53. package/dist/ui-kit/BaseFiltration/renderGridBlocks.js +20 -0
  54. package/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  55. package/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  56. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  57. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  58. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  59. package/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
  60. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  61. package/dist/ui-kit/NotFound/NotFound.d.ts +2 -2
  62. package/dist/ui-kit/NotFound/NotFound.js.map +1 -1
  63. package/dist/utils/dataAttributes.d.ts +2 -2
  64. package/dist/utils/dataAttributes.js +3 -0
  65. package/dist/utils/dataAttributes.js.map +1 -1
  66. package/dist/utils/formatDate.js +1 -1
  67. package/dist/utils/formatDate.js.map +1 -1
  68. package/lib/api/LeadServiceAPI.js +2 -1
  69. package/lib/api/LeadServiceAPI.js.map +1 -1
  70. package/lib/common.css +1 -1
  71. package/lib/components/BankAccountFiltration/BankAccountFiltration.fixture.d.ts +1 -0
  72. package/lib/components/BankAccountFiltration/BankAccountFiltration.fixture.mobile.d.ts +1 -0
  73. package/lib/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  74. package/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  75. package/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  76. package/lib/components/DepositFiltration/DepositFiltration.fixture.d.ts +1 -0
  77. package/lib/components/DepositFiltration/DepositFiltration.fixture.mobile.d.ts +1 -0
  78. package/lib/components/DepositFiltration/DepositFiltration.js +2 -2
  79. package/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  80. package/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  81. package/lib/components/Footer/Footer.mobile.js +1 -1
  82. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  83. package/lib/components/Footer/LinkList.js +5 -3
  84. package/lib/components/Footer/LinkList.js.map +1 -1
  85. package/lib/components/Header/HeaderSecondaryMenu.js +6 -3
  86. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  87. package/lib/components/MortgageFiltration/MortgageFiltration.fixture.d.ts +1 -0
  88. package/lib/components/MortgageFiltration/MortgageFiltration.fixture.mobile.d.ts +1 -0
  89. package/lib/components/MortgageFiltration/MortgageFiltration.js +4 -4
  90. package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  91. package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  92. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  93. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  94. package/lib/data/SitemapData.d.ts +12 -3
  95. package/lib/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  96. package/lib/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  97. package/lib/ui-kit/BaseFiltration/FilteredBlocks.js +17 -0
  98. package/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  99. package/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  100. package/lib/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  101. package/lib/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  102. package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  103. package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  104. package/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  105. package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +5 -0
  106. package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js +12 -0
  107. package/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  108. package/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +9 -0
  109. package/lib/ui-kit/BaseFiltration/renderGridBlocks.js +17 -0
  110. package/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  111. package/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  112. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  113. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  114. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  115. package/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
  116. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  117. package/lib/ui-kit/NotFound/NotFound.d.ts +2 -2
  118. package/lib/ui-kit/NotFound/NotFound.js.map +1 -1
  119. package/lib/utils/dataAttributes.d.ts +2 -2
  120. package/lib/utils/dataAttributes.js +3 -0
  121. package/lib/utils/dataAttributes.js.map +1 -1
  122. package/lib/utils/formatDate.js +1 -1
  123. package/lib/utils/formatDate.js.map +1 -1
  124. package/mobile/bundle/bundle.umd.js +213 -213
  125. package/mobile/bundle/bundle.umd.min.js +1 -1
  126. package/mobile/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  127. package/mobile/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  128. package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  129. package/mobile/bundle/data/SitemapData.d.ts +12 -3
  130. package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  131. package/mobile/bundle/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  132. package/mobile/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  133. package/mobile/bundle/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  134. package/mobile/bundle/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  135. package/mobile/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  136. package/mobile/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  137. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  138. package/mobile/bundle/ui-kit/NotFound/NotFound.d.ts +2 -2
  139. package/mobile/bundle/utils/dataAttributes.d.ts +2 -2
  140. package/mobile/dist/api/LeadServiceAPI.js +2 -1
  141. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  142. package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  143. package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  144. package/mobile/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  145. package/mobile/dist/components/DepositFiltration/DepositFiltration.js +2 -2
  146. package/mobile/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  147. package/mobile/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  148. package/mobile/dist/components/Footer/Footer.js +1 -1
  149. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  150. package/mobile/dist/components/Footer/LinkList.js +5 -3
  151. package/mobile/dist/components/Footer/LinkList.js.map +1 -1
  152. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +6 -3
  153. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  154. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +4 -4
  155. package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  156. package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  157. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  158. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  159. package/mobile/dist/data/SitemapData.d.ts +12 -3
  160. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  161. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  162. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js +19 -0
  163. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  164. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  165. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  166. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  167. package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  168. package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  169. package/mobile/dist/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  170. package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  171. package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js +15 -0
  172. package/mobile/dist/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  173. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  174. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js +20 -0
  175. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  176. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  177. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  178. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  179. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  180. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
  181. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  182. package/mobile/dist/ui-kit/NotFound/NotFound.d.ts +2 -2
  183. package/mobile/dist/ui-kit/NotFound/NotFound.js.map +1 -1
  184. package/mobile/dist/utils/dataAttributes.d.ts +2 -2
  185. package/mobile/dist/utils/dataAttributes.js +3 -0
  186. package/mobile/dist/utils/dataAttributes.js.map +1 -1
  187. package/mobile/dist/utils/formatDate.js +1 -1
  188. package/mobile/dist/utils/formatDate.js.map +1 -1
  189. package/mobile/lib/api/LeadServiceAPI.js +2 -1
  190. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  191. package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js +6 -23
  192. package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
  193. package/mobile/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +5 -4
  194. package/mobile/lib/components/DepositFiltration/DepositFiltration.js +2 -2
  195. package/mobile/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  196. package/mobile/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +3 -2
  197. package/mobile/lib/components/Footer/Footer.js +1 -1
  198. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  199. package/mobile/lib/components/Footer/LinkList.js +5 -3
  200. package/mobile/lib/components/Footer/LinkList.js.map +1 -1
  201. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +6 -3
  202. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  203. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +4 -4
  204. package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
  205. package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +3 -2
  206. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
  207. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  208. package/mobile/lib/data/SitemapData.d.ts +12 -3
  209. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationContent.d.ts +28 -68
  210. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.d.ts +8 -0
  211. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js +17 -0
  212. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -0
  213. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +4 -3
  214. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.js +2 -6
  215. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.js.map +1 -1
  216. package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.d.ts +62 -0
  217. package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js +2 -0
  218. package/mobile/lib/ui-kit/BaseFiltration/FiltrationSchemaContent.js.map +1 -0
  219. package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.d.ts +6 -0
  220. package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js +12 -0
  221. package/mobile/lib/ui-kit/BaseFiltration/renderCarouselBlocks.js.map +1 -0
  222. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +10 -0
  223. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js +17 -0
  224. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +1 -0
  225. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +7 -5
  226. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -7
  227. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  228. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +2 -2
  229. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
  230. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  231. package/mobile/lib/ui-kit/NotFound/NotFound.d.ts +2 -2
  232. package/mobile/lib/ui-kit/NotFound/NotFound.js.map +1 -1
  233. package/mobile/lib/utils/dataAttributes.d.ts +2 -2
  234. package/mobile/lib/utils/dataAttributes.js +3 -0
  235. package/mobile/lib/utils/dataAttributes.js.map +1 -1
  236. package/mobile/lib/utils/formatDate.js +1 -1
  237. package/mobile/lib/utils/formatDate.js.map +1 -1
  238. package/mobile/src/api/LeadServiceAPI.ts +2 -1
  239. package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.example.json +13 -12
  240. package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.tsx +16 -43
  241. package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.ui.json +7 -1
  242. package/mobile/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +5 -7
  243. package/mobile/src/components/DepositFiltration/DepositFiltration.example.json +2 -1
  244. package/mobile/src/components/DepositFiltration/DepositFiltration.tsx +2 -2
  245. package/mobile/src/components/DepositFiltration/DepositFiltration.ui.json +7 -1
  246. package/mobile/src/components/DepositFiltration/DepositFiltrationContent.ts +3 -3
  247. package/mobile/src/components/Footer/Footer.tsx +1 -1
  248. package/mobile/src/components/Footer/LinkList.tsx +10 -9
  249. package/mobile/src/components/Header/Header.example.json +0 -1
  250. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +23 -19
  251. package/mobile/src/components/MortgageFiltration/MortgageFiltration.example.json +2 -1
  252. package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +9 -8
  253. package/mobile/src/components/MortgageFiltration/MortgageFiltration.ui.json +7 -1
  254. package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +3 -5
  255. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
  256. package/mobile/src/data/SitemapData.ts +13 -3
  257. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationContent.ts +31 -74
  258. package/mobile/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +37 -0
  259. package/mobile/src/ui-kit/BaseFiltration/FiltrationForm.tsx +6 -16
  260. package/mobile/src/ui-kit/BaseFiltration/FiltrationSchemaContent.ts +66 -0
  261. package/mobile/src/ui-kit/BaseFiltration/renderCarouselBlocks.tsx +31 -0
  262. package/mobile/src/ui-kit/BaseFiltration/renderGridBlocks.tsx +55 -0
  263. package/mobile/src/ui-kit/BaseFiltration/useFiltrationForm.ts +9 -16
  264. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -4
  265. package/mobile/src/ui-kit/NotFound/NotFound.tsx +2 -2
  266. package/mobile/src/utils/dataAttributes.ts +4 -0
  267. package/mobile/src/utils/formatDate.ts +1 -1
  268. package/package.json +1 -1
  269. package/src/api/LeadServiceAPI.ts +2 -1
  270. package/src/components/BankAccountFiltration/BankAccountFiltration.example.json +13 -12
  271. package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.mobile.tsx +53 -29
  272. package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.tsx +53 -29
  273. package/src/components/BankAccountFiltration/BankAccountFiltration.tsx +16 -43
  274. package/src/components/BankAccountFiltration/BankAccountFiltration.ui.json +7 -1
  275. package/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +5 -7
  276. package/src/components/DepositFiltration/DepositFiltration.example.json +2 -1
  277. package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +103 -64
  278. package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +91 -53
  279. package/src/components/DepositFiltration/DepositFiltration.tsx +2 -2
  280. package/src/components/DepositFiltration/DepositFiltration.ui.json +7 -1
  281. package/src/components/DepositFiltration/DepositFiltrationContent.ts +3 -3
  282. package/src/components/Footer/Footer.mobile.tsx +1 -1
  283. package/src/components/Footer/LinkList.tsx +10 -9
  284. package/src/components/Header/Header.example.json +0 -1
  285. package/src/components/Header/HeaderSecondaryMenu.tsx +23 -19
  286. package/src/components/MortgageFiltration/MortgageFiltration.example.json +2 -1
  287. package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +67 -46
  288. package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +67 -46
  289. package/src/components/MortgageFiltration/MortgageFiltration.tsx +9 -8
  290. package/src/components/MortgageFiltration/MortgageFiltration.ui.json +7 -1
  291. package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +3 -5
  292. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +2 -2
  293. package/src/data/SitemapData.ts +13 -3
  294. package/src/ui-kit/BaseFiltration/BaseFiltrationContent.ts +31 -74
  295. package/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +37 -0
  296. package/src/ui-kit/BaseFiltration/FiltrationForm.tsx +6 -16
  297. package/src/ui-kit/BaseFiltration/FiltrationSchemaContent.ts +66 -0
  298. package/src/ui-kit/BaseFiltration/renderCarouselBlocks.tsx +31 -0
  299. package/src/ui-kit/BaseFiltration/renderGridBlocks.tsx +55 -0
  300. package/src/ui-kit/BaseFiltration/useFiltrationForm.ts +9 -16
  301. package/src/ui-kit/LocationDialog/LocationDialog.tsx +4 -4
  302. package/src/ui-kit/NotFound/NotFound.tsx +2 -2
  303. package/src/utils/dataAttributes.ts +4 -0
  304. package/src/utils/formatDate.ts +1 -1
  305. package/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  306. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  307. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -23
  308. package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  309. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  310. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -21
  311. package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  312. package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  313. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  314. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -23
  315. package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  316. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +0 -8
  317. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +0 -21
  318. package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +0 -1
  319. package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +0 -64
  320. package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +0 -64
@@ -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),
@@ -824,6 +827,18 @@
824
827
  });
825
828
  const randomNumber = (min = 0, max = 0) => Math.floor(Math.random() * (max - min) + min);
826
829
 
830
+ const formatDate = (date, toTimeStamp = false) => {
831
+ if (typeof date === 'string') {
832
+ return date.split('-').reverse().join('.');
833
+ }
834
+ else {
835
+ const day = String(date.getDate()).padStart(2, '0');
836
+ const month = String(date.getMonth() + 1).padStart(2, '0');
837
+ const year = String(date.getFullYear());
838
+ return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
839
+ }
840
+ };
841
+
827
842
  const formatPhone = (phone) => phone?.replace(/[^+\d]/g, '');
828
843
 
829
844
  function LeadServiceAPI() {
@@ -836,7 +851,7 @@
836
851
  ...getRegion$1(region, isNaturalPerson),
837
852
  ...getEmail(email, isNaturalPerson),
838
853
  ...getPhone(phone),
839
- ...(isNaturalPerson ? { birthday: birthday?.toLocaleString() } : { inn, fullName }),
854
+ ...(isNaturalPerson ? { birthday: formatDate(birthday) } : { inn, fullName }),
840
855
  ...(typeForm === 'FEEDBACK'
841
856
  ? {}
842
857
  : {
@@ -1056,18 +1071,6 @@
1056
1071
  return [value, { setValue, setTrue, setFalse, toggle }];
1057
1072
  }
1058
1073
 
1059
- const formatDate = (date, toTimeStamp = false) => {
1060
- if (typeof date === 'string') {
1061
- return date.split('-').reverse().join('.');
1062
- }
1063
- else {
1064
- const day = String(date.getDate()).padStart(2, '0');
1065
- const month = String(date.getMonth() + 1).padStart(2, '0');
1066
- const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
1067
- return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
1068
- }
1069
- };
1070
-
1071
1074
  const renderLabel = (label) => label ? (jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label })) : null;
1072
1075
 
1073
1076
  const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
@@ -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 || {},
@@ -3352,46 +3420,6 @@
3352
3420
  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
3421
  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
3422
 
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
3423
  const renderCardInfo = (cell, i) => {
3396
3424
  const { title, description, buttons } = cell;
3397
3425
  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 +3517,6 @@
3489
3517
  const renderBlocks = (info) => (jsx("div", { className: "flex gap-5xl grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index })) }));
3490
3518
  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
3519
 
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
3520
  const isRateRow = (rateRow) => {
3523
3521
  return typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
3524
3522
  };
@@ -3545,7 +3543,7 @@
3545
3543
  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
3544
  parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
3547
3545
  format: ({ min }) => String(min),
3548
- }) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(BaseFiltrationInner, { blocksToRender: blocksToRender, ...rest })] }));
3546
+ }) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], list: months, ...field('period') })] }) }), jsx(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
3549
3547
  }, {
3550
3548
  childrenTypes: ['ProductBlock'],
3551
3549
  childSchema: (content) => ({
@@ -4254,8 +4252,8 @@
4254
4252
  });
4255
4253
 
4256
4254
  const SEARCH_TERM_MIN_LENGTH = 3;
4257
- const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
4258
- const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
4255
+ const LocationDialog = JSX(({ foreignOffices, branches }) => {
4256
+ const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
4259
4257
  const link = useLink({ isRemote: true });
4260
4258
  const { href } = link({ href: `/branches/${currentLocation.slug}` });
4261
4259
  const [query, setQuery] = useState('');
@@ -4298,10 +4296,12 @@
4298
4296
  const MINDBOX_EVENT_SEARCH_CLICK = 'headerSearchClick';
4299
4297
  const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
4300
4298
  const iconVersion = version === 'transparent' ? 'white' : 'black';
4301
- const [currentLocation] = useLocation(rest.defaultLocation);
4299
+ const [currentLocation] = useLocation(rest?.branches?.default);
4302
4300
  const searchDialog = useSearchDialog(rest);
4303
4301
  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: [
4302
+ const openSearchDialog = useCallback(() => searchDialog.open(), [searchDialog]);
4303
+ const openLocationDialog = useCallback(() => locationDialog.open(), [locationDialog]);
4304
+ 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
4305
  {
4306
4306
  aspectName: MINDBOX_ASPECT,
4307
4307
  params: {
@@ -4310,7 +4310,7 @@
4310
4310
  eventValueText: currentLocation?.name ?? '',
4311
4311
  },
4312
4312
  },
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: [
4313
+ ], 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
4314
  {
4315
4315
  aspectName: MINDBOX_ASPECT,
4316
4316
  params: {
@@ -4790,18 +4790,18 @@
4790
4790
  stage: [],
4791
4791
  };
4792
4792
  const MortgageFiltration = UniBlock(({ className, hotFilters, filtrationSchema = {}, resetButton, ...rest }) => {
4793
- const [filtrationState, { blocksToRender }, { field, reset, update }] = useFiltrationForm(initialFiltrationState, {
4793
+ const [filtrationState, { blocksToRender }, { field, reset, update: replaceFiltrationState }] = useFiltrationForm(initialFiltrationState, {
4794
4794
  block: rest.block,
4795
4795
  page: rest.options?.page,
4796
4796
  });
4797
- const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => update(_), []);
4797
+ const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => replaceFiltrationState(_), []);
4798
4798
  const tabsControlProps = useHotFilters({
4799
4799
  hotFilters,
4800
4800
  filtrationState,
4801
4801
  blocks: rest.block?.blocks,
4802
4802
  onFiltrationStateChange: handleFiltrationStateChange,
4803
4803
  });
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 })] }));
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(FilteredBlocks, { blocksToRender: blocksToRender, ...rest })] }));
4805
4805
  }, {
4806
4806
  childrenTypes: ['ProductBlock'],
4807
4807
  childSchema: (content) => content?.filtrationSchema || {},
@@ -6155,7 +6155,7 @@
6155
6155
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6156
6156
  });
6157
6157
 
6158
- const packageVersion = "0.14.290";
6158
+ const packageVersion = "0.14.292";
6159
6159
 
6160
6160
  exports.Blocks = Blocks;
6161
6161
  exports.ContentPage = ContentPage;