@redneckz/wildless-cms-uni-blocks 0.9.3 → 0.9.5

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 (607) hide show
  1. package/bin/migration-scripts/0.8.29.js +1 -0
  2. package/bin/migration-scripts/0.9.1.js +71 -0
  3. package/bundle/EventBus/defaultEventBus.d.ts +3 -2
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +240 -191
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  8. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  9. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  10. package/bundle/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  11. package/bundle/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  12. package/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  13. package/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  14. package/bundle/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  15. package/bundle/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  16. package/bundle/components/SafeDepositRental/utils.d.ts +1 -1
  17. package/bundle/components/Tabs/TabActivationEvent.d.ts +5 -0
  18. package/bundle/components/Tabs/Tabs.d.ts +1 -5
  19. package/bundle/hooks/useLocation.d.ts +1 -1
  20. package/bundle/services/search/useSearch.d.ts +7 -2
  21. package/bundle/ui-kit/Dialog/Dialog.d.ts +1 -0
  22. package/bundle/ui-kit/Dialog/DialogAction.d.ts +12 -0
  23. package/bundle/ui-kit/Dialog/useDialog.d.ts +4 -0
  24. package/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  25. package/bundle/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  26. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  27. package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  28. package/bundle/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  29. package/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  30. package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  31. package/{lib/ui-kit/SearchBar/SearchBarInput.d.ts → bundle/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
  32. package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -2
  33. package/bundle/utils/noop.d.ts +1 -0
  34. package/bundle/utils/useDebouncedEffect.d.ts +1 -0
  35. package/dist/EventBus/defaultEventBus.d.ts +3 -2
  36. package/dist/EventBus/defaultEventBus.js.map +1 -1
  37. package/dist/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  38. package/dist/components/Blocks.js +0 -2
  39. package/dist/components/Blocks.js.map +1 -1
  40. package/dist/components/Blocks.mobile.js +1 -3
  41. package/dist/components/Blocks.mobile.js.map +1 -1
  42. package/dist/components/ContentPage/ContentPage.js +8 -7
  43. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  44. package/dist/components/Footer/Footer.js +1 -1
  45. package/dist/components/Footer/Footer.js.map +1 -1
  46. package/dist/components/Footer/Footer.mobile.js +1 -1
  47. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  48. package/dist/components/Header/Header.js +5 -1
  49. package/dist/components/Header/Header.js.map +1 -1
  50. package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  51. package/dist/components/Header/HeaderSecondaryMenu.js +10 -13
  52. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  53. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  54. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  55. package/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
  56. package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  57. package/dist/components/RollupItem/RollupItem.js +1 -1
  58. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  59. package/dist/components/RollupItem/RollupItem.mobile.js +2 -4
  60. package/dist/components/RollupItem/RollupItem.mobile.js.map +1 -1
  61. package/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  62. package/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  63. package/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
  64. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  65. package/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  66. package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  67. package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  68. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  69. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  70. package/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  71. package/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  72. package/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  73. package/dist/components/SafeDepositRental/utils.d.ts +1 -1
  74. package/dist/components/StepsBlock/renderStep.js +3 -7
  75. package/dist/components/StepsBlock/renderStep.js.map +1 -1
  76. package/dist/components/Tabs/TabActivationEvent.d.ts +5 -0
  77. package/dist/components/{Accordion/AccordionContent.js → Tabs/TabActivationEvent.js} +1 -1
  78. package/dist/components/Tabs/TabActivationEvent.js.map +1 -0
  79. package/dist/components/Tabs/Tabs.d.ts +1 -5
  80. package/dist/components/Tabs/Tabs.js.map +1 -1
  81. package/dist/components/VerticalLayout/VerticalLayout.js +1 -3
  82. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  83. package/dist/hooks/useLink.js +3 -0
  84. package/dist/hooks/useLink.js.map +1 -1
  85. package/dist/hooks/useLocation.d.ts +1 -1
  86. package/dist/hooks/useLocation.js +2 -2
  87. package/dist/hooks/useLocation.js.map +1 -1
  88. package/dist/services/search/useSearch.d.ts +7 -2
  89. package/dist/services/search/useSearch.js +15 -18
  90. package/dist/services/search/useSearch.js.map +1 -1
  91. package/dist/ui-kit/Dialog/Dialog.d.ts +1 -0
  92. package/dist/ui-kit/Dialog/Dialog.js +2 -6
  93. package/dist/ui-kit/Dialog/Dialog.js.map +1 -1
  94. package/dist/ui-kit/Dialog/DialogAction.d.ts +12 -0
  95. package/dist/ui-kit/{Location/LocationProps.js → Dialog/DialogAction.js} +1 -1
  96. package/dist/ui-kit/Dialog/DialogAction.js.map +1 -0
  97. package/dist/ui-kit/Dialog/useDialog.d.ts +4 -0
  98. package/dist/ui-kit/Dialog/useDialog.js +9 -0
  99. package/dist/ui-kit/Dialog/useDialog.js.map +1 -0
  100. package/dist/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  101. package/dist/ui-kit/Dialog/useDialogHandlers.js +21 -0
  102. package/dist/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  103. package/dist/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  104. package/dist/ui-kit/Dialog/useDialogProps.js +37 -0
  105. package/dist/ui-kit/Dialog/useDialogProps.js.map +1 -0
  106. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  107. package/dist/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  108. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  109. package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  110. package/dist/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  111. package/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  112. package/dist/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  113. package/dist/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  114. package/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  115. package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  116. package/dist/ui-kit/SearchBar/SearchBarInner.js +13 -40
  117. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  118. package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  119. package/dist/ui-kit/SearchDialog/SearchDialog.js +40 -0
  120. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  121. package/dist/ui-kit/{SearchBar/SearchBarInput.d.ts → SearchDialog/SearchInput.d.ts} +2 -2
  122. package/{mobile/dist/ui-kit/SearchBar/SearchBarInput.js → dist/ui-kit/SearchDialog/SearchInput.js} +3 -3
  123. package/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  124. package/dist/ui-kit/TopItem/TopItem.d.ts +1 -2
  125. package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  126. package/dist/utils/noop.d.ts +1 -0
  127. package/dist/utils/noop.js +7 -0
  128. package/dist/utils/noop.js.map +1 -0
  129. package/dist/utils/useDebouncedEffect.d.ts +1 -0
  130. package/dist/utils/useDebouncedEffect.js +11 -0
  131. package/dist/utils/useDebouncedEffect.js.map +1 -0
  132. package/lib/EventBus/defaultEventBus.d.ts +3 -2
  133. package/lib/EventBus/defaultEventBus.js.map +1 -1
  134. package/lib/common.css +1 -1
  135. package/lib/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  136. package/lib/components/Blocks.js +0 -2
  137. package/lib/components/Blocks.js.map +1 -1
  138. package/lib/components/Blocks.mobile.js +1 -3
  139. package/lib/components/Blocks.mobile.js.map +1 -1
  140. package/lib/components/ContentPage/ContentPage.js +8 -7
  141. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  142. package/lib/components/Footer/Footer.js +1 -1
  143. package/lib/components/Footer/Footer.js.map +1 -1
  144. package/lib/components/Footer/Footer.mobile.js +1 -1
  145. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  146. package/lib/components/Header/Header.js +5 -1
  147. package/lib/components/Header/Header.js.map +1 -1
  148. package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  149. package/lib/components/Header/HeaderSecondaryMenu.js +10 -13
  150. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  151. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  152. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  153. package/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
  154. package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  155. package/lib/components/RollupItem/RollupItem.js +1 -1
  156. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  157. package/lib/components/RollupItem/RollupItem.mobile.js +2 -4
  158. package/lib/components/RollupItem/RollupItem.mobile.js.map +1 -1
  159. package/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  160. package/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  161. package/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
  162. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  163. package/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  164. package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  165. package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  166. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  167. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  168. package/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  169. package/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  170. package/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  171. package/lib/components/SafeDepositRental/utils.d.ts +1 -1
  172. package/lib/components/StepsBlock/renderStep.js +3 -7
  173. package/lib/components/StepsBlock/renderStep.js.map +1 -1
  174. package/lib/components/Tabs/TabActivationEvent.d.ts +5 -0
  175. package/lib/components/Tabs/TabActivationEvent.js +2 -0
  176. package/lib/components/Tabs/TabActivationEvent.js.map +1 -0
  177. package/lib/components/Tabs/Tabs.d.ts +1 -5
  178. package/lib/components/Tabs/Tabs.js.map +1 -1
  179. package/lib/components/VerticalLayout/VerticalLayout.js +1 -3
  180. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  181. package/lib/hooks/useLink.js +3 -0
  182. package/lib/hooks/useLink.js.map +1 -1
  183. package/lib/hooks/useLocation.d.ts +1 -1
  184. package/lib/hooks/useLocation.js +2 -2
  185. package/lib/hooks/useLocation.js.map +1 -1
  186. package/lib/services/search/useSearch.d.ts +7 -2
  187. package/lib/services/search/useSearch.js +16 -19
  188. package/lib/services/search/useSearch.js.map +1 -1
  189. package/lib/ui-kit/Dialog/Dialog.d.ts +1 -0
  190. package/lib/ui-kit/Dialog/Dialog.js +3 -7
  191. package/lib/ui-kit/Dialog/Dialog.js.map +1 -1
  192. package/lib/ui-kit/Dialog/DialogAction.d.ts +12 -0
  193. package/lib/ui-kit/Dialog/DialogAction.js +2 -0
  194. package/lib/ui-kit/Dialog/DialogAction.js.map +1 -0
  195. package/lib/ui-kit/Dialog/useDialog.d.ts +4 -0
  196. package/lib/ui-kit/Dialog/useDialog.js +6 -0
  197. package/lib/ui-kit/Dialog/useDialog.js.map +1 -0
  198. package/lib/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  199. package/lib/ui-kit/Dialog/useDialogHandlers.js +18 -0
  200. package/lib/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  201. package/lib/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  202. package/lib/ui-kit/Dialog/useDialogProps.js +34 -0
  203. package/lib/ui-kit/Dialog/useDialogProps.js.map +1 -0
  204. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  205. package/lib/ui-kit/{Location/Location.fixture.d.ts → LocationDialog/LocationDialog.fixture.d.ts} +0 -0
  206. package/lib/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  207. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  208. package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  209. package/lib/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  210. package/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  211. package/lib/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  212. package/lib/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  213. package/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  214. package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  215. package/lib/ui-kit/SearchBar/SearchBarInner.js +14 -41
  216. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  217. package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  218. package/lib/ui-kit/SearchDialog/SearchDialog.js +38 -0
  219. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  220. package/{mobile/bundle/ui-kit/SearchBar/SearchBarInput.d.ts → lib/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
  221. package/lib/ui-kit/{SearchBar/SearchBarInput.js → SearchDialog/SearchInput.js} +2 -2
  222. package/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  223. package/lib/ui-kit/TopItem/TopItem.d.ts +1 -2
  224. package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  225. package/lib/utils/noop.d.ts +1 -0
  226. package/lib/utils/noop.js +4 -0
  227. package/lib/utils/noop.js.map +1 -0
  228. package/lib/utils/useDebouncedEffect.d.ts +1 -0
  229. package/lib/utils/useDebouncedEffect.js +8 -0
  230. package/lib/utils/useDebouncedEffect.js.map +1 -0
  231. package/mobile/bundle/EventBus/defaultEventBus.d.ts +3 -2
  232. package/mobile/bundle/bundle.umd.js +257 -218
  233. package/mobile/bundle/bundle.umd.min.js +1 -1
  234. package/mobile/bundle/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  235. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  236. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  237. package/mobile/bundle/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  238. package/mobile/bundle/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  239. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  240. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  241. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  242. package/mobile/bundle/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  243. package/mobile/bundle/components/SafeDepositRental/utils.d.ts +1 -1
  244. package/mobile/bundle/components/Tabs/TabActivationEvent.d.ts +5 -0
  245. package/mobile/bundle/components/Tabs/Tabs.d.ts +1 -5
  246. package/mobile/bundle/hooks/useLocation.d.ts +1 -1
  247. package/mobile/bundle/services/search/useSearch.d.ts +7 -2
  248. package/mobile/bundle/ui-kit/Dialog/Dialog.d.ts +1 -0
  249. package/mobile/bundle/ui-kit/Dialog/DialogAction.d.ts +12 -0
  250. package/mobile/bundle/ui-kit/Dialog/useDialog.d.ts +4 -0
  251. package/mobile/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  252. package/mobile/bundle/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  253. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  254. package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  255. package/mobile/bundle/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  256. package/mobile/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  257. package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  258. package/{bundle/ui-kit/SearchBar/SearchBarInput.d.ts → mobile/bundle/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
  259. package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -2
  260. package/mobile/bundle/utils/noop.d.ts +1 -0
  261. package/mobile/bundle/utils/useDebouncedEffect.d.ts +1 -0
  262. package/mobile/dist/EventBus/defaultEventBus.d.ts +3 -2
  263. package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
  264. package/mobile/dist/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  265. package/mobile/dist/components/Blocks.js +1 -3
  266. package/mobile/dist/components/Blocks.js.map +1 -1
  267. package/mobile/dist/components/ContentPage/ContentPage.js +8 -7
  268. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  269. package/mobile/dist/components/Footer/Footer.js +1 -1
  270. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  271. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  272. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +10 -13
  273. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  274. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  275. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  276. package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
  277. package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  278. package/mobile/dist/components/RollupItem/RollupItem.js +2 -4
  279. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  280. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  281. package/mobile/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  282. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
  283. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  284. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  285. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  286. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  287. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  288. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  289. package/mobile/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  290. package/mobile/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  291. package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  292. package/mobile/dist/components/SafeDepositRental/utils.d.ts +1 -1
  293. package/mobile/dist/components/StepsBlock/renderStep.js +3 -7
  294. package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
  295. package/mobile/dist/components/Tabs/TabActivationEvent.d.ts +5 -0
  296. package/mobile/dist/components/{Accordion/AccordionContent.js → Tabs/TabActivationEvent.js} +1 -1
  297. package/mobile/dist/components/Tabs/TabActivationEvent.js.map +1 -0
  298. package/mobile/dist/components/Tabs/Tabs.d.ts +1 -5
  299. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  300. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +1 -3
  301. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  302. package/mobile/dist/hooks/useLink.js +3 -0
  303. package/mobile/dist/hooks/useLink.js.map +1 -1
  304. package/mobile/dist/hooks/useLocation.d.ts +1 -1
  305. package/mobile/dist/hooks/useLocation.js +2 -2
  306. package/mobile/dist/hooks/useLocation.js.map +1 -1
  307. package/mobile/dist/services/search/useSearch.d.ts +7 -2
  308. package/mobile/dist/services/search/useSearch.js +15 -18
  309. package/mobile/dist/services/search/useSearch.js.map +1 -1
  310. package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +1 -0
  311. package/mobile/dist/ui-kit/Dialog/Dialog.js +2 -6
  312. package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -1
  313. package/mobile/dist/ui-kit/Dialog/DialogAction.d.ts +12 -0
  314. package/mobile/dist/ui-kit/{Location/LocationProps.js → Dialog/DialogAction.js} +1 -1
  315. package/mobile/dist/ui-kit/Dialog/DialogAction.js.map +1 -0
  316. package/mobile/dist/ui-kit/Dialog/useDialog.d.ts +4 -0
  317. package/mobile/dist/ui-kit/Dialog/useDialog.js +9 -0
  318. package/mobile/dist/ui-kit/Dialog/useDialog.js.map +1 -0
  319. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  320. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js +21 -0
  321. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  322. package/mobile/dist/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  323. package/mobile/dist/ui-kit/Dialog/useDialogProps.js +37 -0
  324. package/mobile/dist/ui-kit/Dialog/useDialogProps.js.map +1 -0
  325. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  326. package/mobile/dist/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  327. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  328. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  329. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  330. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  331. package/mobile/dist/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  332. package/mobile/dist/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  333. package/mobile/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  334. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  335. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +13 -40
  336. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  337. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  338. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +40 -0
  339. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  340. package/mobile/dist/ui-kit/SearchDialog/SearchInput.d.ts +9 -0
  341. package/{dist/ui-kit/SearchBar/SearchBarInput.js → mobile/dist/ui-kit/SearchDialog/SearchInput.js} +3 -3
  342. package/mobile/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  343. package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -2
  344. package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  345. package/mobile/dist/utils/noop.d.ts +1 -0
  346. package/mobile/dist/utils/noop.js +7 -0
  347. package/mobile/dist/utils/noop.js.map +1 -0
  348. package/mobile/dist/utils/useDebouncedEffect.d.ts +1 -0
  349. package/mobile/dist/utils/useDebouncedEffect.js +11 -0
  350. package/mobile/dist/utils/useDebouncedEffect.js.map +1 -0
  351. package/mobile/lib/EventBus/defaultEventBus.d.ts +3 -2
  352. package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
  353. package/mobile/lib/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  354. package/mobile/lib/components/Blocks.js +1 -3
  355. package/mobile/lib/components/Blocks.js.map +1 -1
  356. package/mobile/lib/components/ContentPage/ContentPage.js +8 -7
  357. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  358. package/mobile/lib/components/Footer/Footer.js +1 -1
  359. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  360. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  361. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +10 -13
  362. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  363. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  364. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  365. package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
  366. package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  367. package/mobile/lib/components/RollupItem/RollupItem.js +2 -4
  368. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  369. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  370. package/mobile/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  371. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
  372. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  373. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  374. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  375. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  376. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  377. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  378. package/mobile/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  379. package/mobile/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  380. package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  381. package/mobile/lib/components/SafeDepositRental/utils.d.ts +1 -1
  382. package/mobile/lib/components/StepsBlock/renderStep.js +3 -7
  383. package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
  384. package/mobile/lib/components/Tabs/TabActivationEvent.d.ts +5 -0
  385. package/mobile/lib/components/Tabs/TabActivationEvent.js +2 -0
  386. package/mobile/lib/components/Tabs/TabActivationEvent.js.map +1 -0
  387. package/mobile/lib/components/Tabs/Tabs.d.ts +1 -5
  388. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  389. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +1 -3
  390. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  391. package/mobile/lib/hooks/useLink.js +3 -0
  392. package/mobile/lib/hooks/useLink.js.map +1 -1
  393. package/mobile/lib/hooks/useLocation.d.ts +1 -1
  394. package/mobile/lib/hooks/useLocation.js +2 -2
  395. package/mobile/lib/hooks/useLocation.js.map +1 -1
  396. package/mobile/lib/services/search/useSearch.d.ts +7 -2
  397. package/mobile/lib/services/search/useSearch.js +16 -19
  398. package/mobile/lib/services/search/useSearch.js.map +1 -1
  399. package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +1 -0
  400. package/mobile/lib/ui-kit/Dialog/Dialog.js +3 -7
  401. package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -1
  402. package/mobile/lib/ui-kit/Dialog/DialogAction.d.ts +12 -0
  403. package/mobile/lib/ui-kit/Dialog/DialogAction.js +2 -0
  404. package/mobile/lib/ui-kit/Dialog/DialogAction.js.map +1 -0
  405. package/mobile/lib/ui-kit/Dialog/useDialog.d.ts +4 -0
  406. package/mobile/lib/ui-kit/Dialog/useDialog.js +6 -0
  407. package/mobile/lib/ui-kit/Dialog/useDialog.js.map +1 -0
  408. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  409. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js +18 -0
  410. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  411. package/mobile/lib/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  412. package/mobile/lib/ui-kit/Dialog/useDialogProps.js +34 -0
  413. package/mobile/lib/ui-kit/Dialog/useDialogProps.js.map +1 -0
  414. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  415. package/mobile/lib/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  416. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  417. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  418. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  419. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  420. package/mobile/lib/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  421. package/mobile/lib/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  422. package/mobile/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  423. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  424. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +14 -41
  425. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  426. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  427. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +38 -0
  428. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  429. package/mobile/lib/ui-kit/SearchDialog/SearchInput.d.ts +9 -0
  430. package/mobile/lib/ui-kit/{SearchBar/SearchBarInput.js → SearchDialog/SearchInput.js} +2 -2
  431. package/mobile/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  432. package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -2
  433. package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  434. package/mobile/lib/utils/noop.d.ts +1 -0
  435. package/mobile/lib/utils/noop.js +4 -0
  436. package/mobile/lib/utils/noop.js.map +1 -0
  437. package/mobile/lib/utils/useDebouncedEffect.d.ts +1 -0
  438. package/mobile/lib/utils/useDebouncedEffect.js +8 -0
  439. package/mobile/lib/utils/useDebouncedEffect.js.map +1 -0
  440. package/mobile/src/EventBus/defaultEventBus.ts +3 -2
  441. package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
  442. package/mobile/src/components/Blocks.ts +1 -3
  443. package/mobile/src/components/ContentPage/ContentPage.tsx +15 -12
  444. package/mobile/src/components/Footer/Footer.tsx +1 -1
  445. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +18 -42
  446. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
  447. package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
  448. package/mobile/src/components/RollupItem/RollupItem.tsx +2 -10
  449. package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +1 -1
  450. package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
  451. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +1 -1
  452. package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +2 -2
  453. package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
  454. package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
  455. package/mobile/src/{hooks → components/SafeDepositRental}/useSafeBoxes.ts +1 -1
  456. package/mobile/src/components/SafeDepositRental/utils.ts +1 -1
  457. package/mobile/src/components/StepsBlock/renderStep.tsx +6 -5
  458. package/mobile/src/components/Tabs/TabActivationEvent.ts +6 -0
  459. package/mobile/src/components/Tabs/Tabs.tsx +0 -5
  460. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +1 -3
  461. package/mobile/src/hooks/useLink.ts +4 -0
  462. package/mobile/src/hooks/useLocation.ts +5 -8
  463. package/mobile/src/services/search/useSearch.ts +26 -23
  464. package/mobile/src/ui-kit/Dialog/Dialog.tsx +6 -14
  465. package/mobile/src/ui-kit/Dialog/DialogAction.ts +14 -0
  466. package/mobile/src/ui-kit/Dialog/useDialog.ts +6 -0
  467. package/mobile/src/ui-kit/Dialog/useDialogHandlers.ts +28 -0
  468. package/mobile/src/ui-kit/Dialog/useDialogProps.ts +45 -0
  469. package/mobile/src/ui-kit/{Location/Location.tsx → LocationDialog/LocationDialog.tsx} +38 -29
  470. package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +20 -0
  471. package/mobile/src/ui-kit/{Location → LocationDialog}/SearchBar.tsx +0 -0
  472. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +17 -85
  473. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +65 -0
  474. package/mobile/src/ui-kit/{SearchBar/SearchBarInput.tsx → SearchDialog/SearchInput.tsx} +2 -2
  475. package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -2
  476. package/mobile/src/utils/noop.ts +3 -0
  477. package/mobile/src/utils/useDebouncedEffect.ts +14 -0
  478. package/package.json +1 -1
  479. package/src/EventBus/defaultEventBus.ts +3 -2
  480. package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
  481. package/src/components/Blocks.mobile.ts +1 -3
  482. package/src/components/Blocks.ts +0 -2
  483. package/src/components/ContentPage/ContentPage.tsx +15 -12
  484. package/src/components/Footer/Footer.fixture.tsx +17 -0
  485. package/src/components/Footer/Footer.mobile.tsx +1 -1
  486. package/src/components/Footer/Footer.tsx +1 -1
  487. package/src/components/Header/Header.tsx +12 -2
  488. package/src/components/Header/HeaderSecondaryMenu.tsx +18 -42
  489. package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
  490. package/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
  491. package/src/components/RollupItem/RollupItem.mobile.tsx +2 -10
  492. package/src/components/RollupItem/RollupItem.tsx +1 -1
  493. package/src/components/SafeDepositRental/RegionsAndBranches.tsx +1 -1
  494. package/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
  495. package/src/components/SafeDepositRental/SafeDepositRental.tsx +1 -1
  496. package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +2 -2
  497. package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
  498. package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
  499. package/src/{hooks → components/SafeDepositRental}/useSafeBoxes.ts +1 -1
  500. package/src/components/SafeDepositRental/utils.ts +1 -1
  501. package/src/components/StepsBlock/StepsBlock.fixture.tsx +3 -3
  502. package/src/components/StepsBlock/renderStep.tsx +6 -5
  503. package/src/components/Tabs/TabActivationEvent.ts +6 -0
  504. package/src/components/Tabs/Tabs.tsx +0 -5
  505. package/src/components/VerticalLayout/VerticalLayout.tsx +1 -3
  506. package/src/hooks/useLink.ts +4 -0
  507. package/src/hooks/useLocation.ts +5 -8
  508. package/src/services/search/useSearch.ts +26 -23
  509. package/src/ui-kit/Dialog/Dialog.tsx +6 -14
  510. package/src/ui-kit/Dialog/DialogAction.ts +14 -0
  511. package/src/ui-kit/Dialog/useDialog.ts +6 -0
  512. package/src/ui-kit/Dialog/useDialogHandlers.ts +28 -0
  513. package/src/ui-kit/Dialog/useDialogProps.ts +45 -0
  514. package/src/ui-kit/{Location/Location.fixture.tsx → LocationDialog/LocationDialog.fixture.tsx} +3 -5
  515. package/src/ui-kit/{Location/Location.tsx → LocationDialog/LocationDialog.tsx} +38 -29
  516. package/src/ui-kit/LocationDialog/LocationDialogProps.ts +20 -0
  517. package/src/ui-kit/{Location → LocationDialog}/SearchBar.tsx +0 -0
  518. package/src/ui-kit/SearchBar/SearchBarInner.tsx +17 -85
  519. package/src/ui-kit/SearchDialog/SearchDialog.tsx +65 -0
  520. package/src/ui-kit/{SearchBar/SearchBarInput.tsx → SearchDialog/SearchInput.tsx} +2 -2
  521. package/src/ui-kit/TopItem/TopItem.tsx +1 -2
  522. package/src/utils/noop.ts +3 -0
  523. package/src/utils/useDebouncedEffect.ts +14 -0
  524. package/bundle/components/Accordion/Accordion.d.ts +0 -5
  525. package/bundle/components/Accordion/Accordion.mobile.d.ts +0 -5
  526. package/bundle/components/Accordion/AccordionContent.d.ts +0 -19
  527. package/bundle/ui-kit/Location/Location.d.ts +0 -2
  528. package/bundle/ui-kit/Location/LocationProps.d.ts +0 -16
  529. package/dist/components/Accordion/Accordion.d.ts +0 -5
  530. package/dist/components/Accordion/Accordion.js +0 -12
  531. package/dist/components/Accordion/Accordion.js.map +0 -1
  532. package/dist/components/Accordion/Accordion.mobile.d.ts +0 -5
  533. package/dist/components/Accordion/Accordion.mobile.js +0 -11
  534. package/dist/components/Accordion/Accordion.mobile.js.map +0 -1
  535. package/dist/components/Accordion/AccordionContent.d.ts +0 -19
  536. package/dist/components/Accordion/AccordionContent.js.map +0 -1
  537. package/dist/hooks/useSafeBoxes.js.map +0 -1
  538. package/dist/ui-kit/Location/Location.d.ts +0 -2
  539. package/dist/ui-kit/Location/Location.js.map +0 -1
  540. package/dist/ui-kit/Location/LocationProps.d.ts +0 -16
  541. package/dist/ui-kit/Location/LocationProps.js.map +0 -1
  542. package/dist/ui-kit/Location/SearchBar.js.map +0 -1
  543. package/dist/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  544. package/lib/components/Accordion/Accordion.d.ts +0 -5
  545. package/lib/components/Accordion/Accordion.fixture.d.ts +0 -7
  546. package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +0 -8
  547. package/lib/components/Accordion/Accordion.js +0 -10
  548. package/lib/components/Accordion/Accordion.js.map +0 -1
  549. package/lib/components/Accordion/Accordion.mobile.d.ts +0 -5
  550. package/lib/components/Accordion/Accordion.mobile.js +0 -9
  551. package/lib/components/Accordion/Accordion.mobile.js.map +0 -1
  552. package/lib/components/Accordion/AccordionContent.d.ts +0 -19
  553. package/lib/components/Accordion/AccordionContent.js +0 -2
  554. package/lib/components/Accordion/AccordionContent.js.map +0 -1
  555. package/lib/hooks/useSafeBoxes.js.map +0 -1
  556. package/lib/ui-kit/Location/Location.d.ts +0 -2
  557. package/lib/ui-kit/Location/Location.js.map +0 -1
  558. package/lib/ui-kit/Location/LocationProps.d.ts +0 -16
  559. package/lib/ui-kit/Location/LocationProps.js +0 -2
  560. package/lib/ui-kit/Location/LocationProps.js.map +0 -1
  561. package/lib/ui-kit/Location/SearchBar.js.map +0 -1
  562. package/lib/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  563. package/mobile/bundle/components/Accordion/Accordion.d.ts +0 -5
  564. package/mobile/bundle/components/Accordion/AccordionContent.d.ts +0 -19
  565. package/mobile/bundle/ui-kit/Location/Location.d.ts +0 -2
  566. package/mobile/bundle/ui-kit/Location/LocationProps.d.ts +0 -16
  567. package/mobile/dist/components/Accordion/Accordion.d.ts +0 -5
  568. package/mobile/dist/components/Accordion/Accordion.js +0 -11
  569. package/mobile/dist/components/Accordion/Accordion.js.map +0 -1
  570. package/mobile/dist/components/Accordion/AccordionContent.d.ts +0 -19
  571. package/mobile/dist/components/Accordion/AccordionContent.js.map +0 -1
  572. package/mobile/dist/hooks/useSafeBoxes.js.map +0 -1
  573. package/mobile/dist/ui-kit/Location/Location.d.ts +0 -2
  574. package/mobile/dist/ui-kit/Location/Location.js.map +0 -1
  575. package/mobile/dist/ui-kit/Location/LocationProps.d.ts +0 -16
  576. package/mobile/dist/ui-kit/Location/LocationProps.js.map +0 -1
  577. package/mobile/dist/ui-kit/Location/SearchBar.js.map +0 -1
  578. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.d.ts +0 -9
  579. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  580. package/mobile/lib/components/Accordion/Accordion.d.ts +0 -5
  581. package/mobile/lib/components/Accordion/Accordion.js +0 -9
  582. package/mobile/lib/components/Accordion/Accordion.js.map +0 -1
  583. package/mobile/lib/components/Accordion/AccordionContent.d.ts +0 -19
  584. package/mobile/lib/components/Accordion/AccordionContent.js +0 -2
  585. package/mobile/lib/components/Accordion/AccordionContent.js.map +0 -1
  586. package/mobile/lib/hooks/useSafeBoxes.js.map +0 -1
  587. package/mobile/lib/ui-kit/Location/Location.d.ts +0 -2
  588. package/mobile/lib/ui-kit/Location/Location.js.map +0 -1
  589. package/mobile/lib/ui-kit/Location/LocationProps.d.ts +0 -16
  590. package/mobile/lib/ui-kit/Location/LocationProps.js +0 -2
  591. package/mobile/lib/ui-kit/Location/LocationProps.js.map +0 -1
  592. package/mobile/lib/ui-kit/Location/SearchBar.js.map +0 -1
  593. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.d.ts +0 -9
  594. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  595. package/mobile/src/components/Accordion/Accordion.example.json +0 -54
  596. package/mobile/src/components/Accordion/Accordion.tsx +0 -27
  597. package/mobile/src/components/Accordion/Accordion.ui.json +0 -1
  598. package/mobile/src/components/Accordion/AccordionContent.ts +0 -22
  599. package/mobile/src/ui-kit/Location/LocationProps.ts +0 -25
  600. package/src/components/Accordion/Accordion.example.json +0 -54
  601. package/src/components/Accordion/Accordion.fixture.mobile.tsx +0 -64
  602. package/src/components/Accordion/Accordion.fixture.tsx +0 -113
  603. package/src/components/Accordion/Accordion.mobile.tsx +0 -27
  604. package/src/components/Accordion/Accordion.tsx +0 -33
  605. package/src/components/Accordion/Accordion.ui.json +0 -1
  606. package/src/components/Accordion/AccordionContent.ts +0 -22
  607. package/src/ui-kit/Location/LocationProps.ts +0 -25
@@ -236,61 +236,27 @@
236
236
  return JSXTmpl;
237
237
  };
238
238
 
239
- const DEFAULT_SLOT_NAME = null;
240
-
241
- const style = (...atoms) => atoms
242
- .flatMap((_) => _)
243
- .filter(Boolean)
244
- .join(' ');
245
-
246
- const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
247
-
248
- const DEFAULT_ANCESTORS = [];
249
- const defaultStyle = 'col-span-12';
250
- function renderBlock(block, options) {
251
- const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', extraProps = {}, } = options;
252
- const { type } = block;
253
- if (!(type && type in blocksRegistry)) {
254
- console.warn(`No block with "${type}" is registered`);
255
- }
256
- const BlockComponent = type && blocksRegistry[type];
257
- return blockDecorator({
258
- blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
259
- className, block.style || defaultStyle),
260
- block,
261
- ancestors,
262
- // Adjusted by decorator block and blockClassName
263
- render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
264
- const { content } = adjustedBlock;
265
- return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
266
- },
267
- }, key);
268
- }
269
-
270
- const EMPTY_ANCESTORS = [];
271
- const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
272
- ...options,
273
- key: `${key ? key : _.type}-${j}`,
274
- ancestors: options.parent
275
- ? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
276
- : ancestors,
277
- }));
278
-
279
- function renderChildren({ children, block, options, renderProps, }) {
280
- if (children) {
281
- return children;
239
+ function CorporateLeadAPI() {
240
+ async function send(body) {
241
+ try {
242
+ const response = await fetch('/api/v1/sendcorporatelead', {
243
+ method: 'POST',
244
+ headers: { 'Content-Type': 'application/json' },
245
+ mode: 'cors',
246
+ body: JSON.stringify(body),
247
+ });
248
+ const data = await response.json();
249
+ return data;
250
+ }
251
+ catch (e) {
252
+ return null;
253
+ }
282
254
  }
283
- return block && options
284
- ? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
285
- : null;
255
+ return {
256
+ send,
257
+ };
286
258
  }
287
259
 
288
- const AlignText = {
289
- left: 'text-left',
290
- center: 'text-center',
291
- right: 'text-right',
292
- };
293
-
294
260
  class EventBus {
295
261
  subscribers = {};
296
262
  subjectsStateMap = {};
@@ -358,6 +324,11 @@
358
324
  return useIntersectionObserver(observerCallback, { sensitivity: 1 });
359
325
  }
360
326
 
327
+ const style = (...atoms) => atoms
328
+ .flatMap((_) => _)
329
+ .filter(Boolean)
330
+ .join(' ');
331
+
361
332
  const blockStyles = {
362
333
  primary: 'bg-white text-primary-text',
363
334
  secondary: 'bg-primary-main text-white',
@@ -387,32 +358,6 @@
387
358
  };
388
359
  const Heading = JSX(({ className = '', headingType = 'h3', as: Tag = 'h3', title, children }) => (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children })));
389
360
 
390
- const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
391
-
392
- const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${AlignText[accordionAlignTitle]}`, title: title })) : null, description ? (jsx("div", { className: "mb-2.5", children: jsx(Paragraph, { size: "text-l", children: description }) })) : null, jsx("div", { className: "list-none m-0 p-0", children: renderChildren(rest) })] })));
393
- Accordion.childrenTypes = ['Accordion'];
394
-
395
- function CorporateLeadAPI() {
396
- async function send(body) {
397
- try {
398
- const response = await fetch('/api/v1/sendcorporatelead', {
399
- method: 'POST',
400
- headers: { 'Content-Type': 'application/json' },
401
- mode: 'cors',
402
- body: JSON.stringify(body),
403
- });
404
- const data = await response.json();
405
- return data;
406
- }
407
- catch (e) {
408
- return null;
409
- }
410
- }
411
- return {
412
- send,
413
- };
414
- }
415
-
416
361
  const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, onBlur, ...inputProps }) => {
417
362
  const handleChange = useCallback((e) => {
418
363
  const validInputValue = e.target.validity.valid ? e.target.value : value;
@@ -536,6 +481,11 @@
536
481
  },
537
482
  ];
538
483
 
484
+ const useDialog = (id = '') => ({
485
+ open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
486
+ close: () => defaultEventBus.fire('dialog', { type: 'close' }),
487
+ });
488
+
539
489
  const dirname = (path) => path?.split('/').slice(0, -1).join('/');
540
490
 
541
491
  const isURL = (href) => Boolean(href?.includes(':'));
@@ -590,6 +540,7 @@
590
540
 
591
541
  function useLink(isRemote = false) {
592
542
  const router = useRouter();
543
+ const { close } = useDialog();
593
544
  return (props) => ({
594
545
  ...props,
595
546
  href: isRemote ? props.href : adjustHref(router)(props.href),
@@ -603,6 +554,7 @@
603
554
  // Default routing
604
555
  return;
605
556
  }
557
+ close();
606
558
  // Client routing
607
559
  ev?.preventDefault();
608
560
  router.push(href);
@@ -683,6 +635,8 @@
683
635
  const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, children }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, children: children })));
684
636
  const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
685
637
 
638
+ const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
639
+
686
640
  const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
687
641
 
688
642
  const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
@@ -1216,6 +1170,12 @@
1216
1170
  const renderBonusCount = (_) => (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [_.bonusCount ? (jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount })) : null, _.bonusName ? (jsx("span", { className: "text-h2 bg-clip-text text-transparent bg-green-to-yellow", children: _.bonusName })) : null] }));
1217
1171
  const renderBonusImage = (_) => _.image ? jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full`, image: _.image }) : null;
1218
1172
 
1173
+ const AlignText = {
1174
+ left: 'text-left',
1175
+ center: 'text-center',
1176
+ right: 'text-right',
1177
+ };
1178
+
1219
1179
  const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
1220
1180
  const renderBonusBenefit = ({ icon, title, description }, i) => {
1221
1181
  return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", width: "auto", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
@@ -1836,6 +1796,50 @@
1836
1796
  return (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: handleChange, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
1837
1797
  });
1838
1798
 
1799
+ const DEFAULT_SLOT_NAME = null;
1800
+
1801
+ const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1802
+
1803
+ const DEFAULT_ANCESTORS = [];
1804
+ const defaultStyle = 'col-span-12';
1805
+ function renderBlock(block, options) {
1806
+ const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', extraProps = {}, } = options;
1807
+ const { type } = block;
1808
+ if (!(type && type in blocksRegistry)) {
1809
+ console.warn(`No block with "${type}" is registered`);
1810
+ }
1811
+ const BlockComponent = type && blocksRegistry[type];
1812
+ return blockDecorator({
1813
+ blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
1814
+ className, block.style || defaultStyle),
1815
+ block,
1816
+ ancestors,
1817
+ // Adjusted by decorator block and blockClassName
1818
+ render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
1819
+ const { content } = adjustedBlock;
1820
+ return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
1821
+ },
1822
+ }, key);
1823
+ }
1824
+
1825
+ const EMPTY_ANCESTORS = [];
1826
+ const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
1827
+ ...options,
1828
+ key: `${key ? key : _.type}-${j}`,
1829
+ ancestors: options.parent
1830
+ ? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
1831
+ : ancestors,
1832
+ }));
1833
+
1834
+ function renderChildren({ children, block, options, renderProps, }) {
1835
+ if (children) {
1836
+ return children;
1837
+ }
1838
+ return block && options
1839
+ ? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
1840
+ : null;
1841
+ }
1842
+
1839
1843
  const mapChildren = (mapper) => (children) => {
1840
1844
  if (children === null || children === undefined) {
1841
1845
  return children;
@@ -2653,14 +2657,34 @@
2653
2657
  return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
2654
2658
  });
2655
2659
 
2656
- function useBool(defaultValue = false) {
2657
- const [value, setValue] = useState(defaultValue);
2658
- const setTrue = useCallback(() => setValue(true), []);
2659
- const setFalse = useCallback(() => setValue(false), []);
2660
- const toggle = useCallback(() => setValue((_) => !_), []);
2661
- return [value, { setValue, setTrue, setFalse, toggle }];
2660
+ const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
2661
+
2662
+ function assertUnreachable(x) {
2663
+ throw new Error(x);
2664
+ }
2665
+
2666
+ function useDialogHandlers({ onOpen, onClose } = {}) {
2667
+ useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
2668
+ switch (action.type) {
2669
+ case 'open':
2670
+ onOpen && onOpen(action);
2671
+ break;
2672
+ case 'close':
2673
+ onClose && onClose();
2674
+ break;
2675
+ default:
2676
+ assertUnreachable(action);
2677
+ }
2678
+ }), [onOpen, onClose]);
2662
2679
  }
2663
2680
 
2681
+ const useDebouncedEffect = (effect, deps, delay = 300) => useEffect(() => {
2682
+ const timerId = setTimeout(effect, delay);
2683
+ return () => {
2684
+ clearTimeout(timerId);
2685
+ };
2686
+ }, deps);
2687
+
2664
2688
  const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
2665
2689
  const desc = (cmp) => (a, b) => -cmp(a, b);
2666
2690
 
@@ -2785,37 +2809,27 @@
2785
2809
  const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
2786
2810
 
2787
2811
  const SEARCH_INDEX_FILENAME = 'search.index.json';
2788
- const useSearch = (basePathList = ['/']) => {
2789
- const [query, setQuery] = useState('');
2790
- const [wasQueryFocused, setWasQueryFocused] = useState(false);
2791
- const handleFocus = useCallback(() => {
2792
- setWasQueryFocused(true);
2793
- }, []);
2794
- const key = useMemo(() => basePathList.map((_) => (wasQueryFocused ? _ : null)), // Load search index on input focus
2795
- [wasQueryFocused, ...basePathList]);
2812
+ const useSearch = ({ basePathList = ['/'], initialQuery = '', wasOpened, }) => {
2813
+ const [query, setQuery] = useState(initialQuery || '');
2814
+ useEffect(() => {
2815
+ if (initialQuery !== undefined && initialQuery !== null) {
2816
+ setQuery(initialQuery);
2817
+ }
2818
+ }, [initialQuery]);
2819
+ const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
2820
+ [wasOpened, ...basePathList]);
2796
2821
  const { data } = useAsyncData(key, fetchSearchIndex);
2797
2822
  const [result, setResult] = useState(null);
2798
- useEffect(() => {
2799
- const timerId = setTimeout(() => {
2800
- if (data) {
2801
- setResult(data.map(search(query)));
2802
- }
2803
- }, 300);
2804
- return () => {
2805
- clearTimeout(timerId);
2806
- };
2823
+ useDebouncedEffect(() => {
2824
+ if (data) {
2825
+ setResult(data.map(search(query)));
2826
+ }
2807
2827
  }, [data, query]);
2808
- return [result, { value: query, onChange: setQuery, onFocus: handleFocus }];
2828
+ return [result, { value: query, onChange: setQuery }];
2809
2829
  };
2810
2830
  const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
2811
2831
 
2812
- const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
2813
-
2814
- const Dialog = JSX(({ className, head, children, onClose }) => {
2815
- const handleClose = useCallback((ev) => {
2816
- ev.preventDefault();
2817
- onClose && onClose();
2818
- }, [onClose]);
2832
+ const Dialog = JSX(({ className, isOpened, head, children, onClose }) => {
2819
2833
  useEffect(() => {
2820
2834
  const handleEscape = ({ key }) => {
2821
2835
  if (key === 'Escape') {
@@ -2827,9 +2841,47 @@
2827
2841
  globalThis.document?.removeEventListener('keydown', handleEscape);
2828
2842
  };
2829
2843
  }, [onClose]);
2830
- return (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: handleClose }), head] }), children] }) }));
2844
+ return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: onClose }), head] }), children] }) })) : null;
2831
2845
  });
2832
2846
 
2847
+ function useBool(defaultValue = false) {
2848
+ const [value, setValue] = useState(defaultValue);
2849
+ const setTrue = useCallback(() => setValue(true), []);
2850
+ const setFalse = useCallback(() => setValue(false), []);
2851
+ const toggle = useCallback(() => setValue((_) => !_), []);
2852
+ return [value, { setValue, setTrue, setFalse, toggle }];
2853
+ }
2854
+
2855
+ function useDialogProps(id) {
2856
+ const [isOpened, { setTrue: open, setFalse: close }] = useBool();
2857
+ const [params, setParams] = useState({ id });
2858
+ const wasOpened = useRef(isOpened);
2859
+ wasOpened.current ||= isOpened;
2860
+ const handleOpen = useCallback((_) => {
2861
+ if (_.id === id) {
2862
+ setParams(_);
2863
+ open();
2864
+ }
2865
+ else {
2866
+ close();
2867
+ }
2868
+ }, [id]);
2869
+ useDialogHandlers({
2870
+ onOpen: handleOpen,
2871
+ onClose: close,
2872
+ });
2873
+ const handleCloseAsEventSource = useCallback(() => {
2874
+ close();
2875
+ defaultEventBus.fire('dialog', { type: 'close' });
2876
+ }, []);
2877
+ return {
2878
+ ...params,
2879
+ isOpened,
2880
+ wasOpened: wasOpened.current,
2881
+ onClose: handleCloseAsEventSource,
2882
+ };
2883
+ }
2884
+
2833
2885
  const Sitemap = JSX(({ className, topItems }) => {
2834
2886
  const link = useLink(true);
2835
2887
  return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
@@ -2845,43 +2897,30 @@
2845
2897
  return (jsx("a", { className: style('text-l-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
2846
2898
  });
2847
2899
 
2848
- const SearchBarInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
2900
+ const SearchInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
2849
2901
  const handleChange = useCallback((ev) => {
2850
2902
  onChange && onChange(ev.target?.value || '');
2851
2903
  }, [onChange]);
2852
2904
  return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-4 pointer-events-none", children: jsx(ImgInner, { image: { icon: 'LoupeIcon' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 pl-12 w-full text-l text-black outline-none box-border', 'border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text', isMobile ? '' : 'h-full'), value: value, type: "text", name: "search-bar-input", placeholder: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
2853
2905
  });
2854
2906
 
2855
- const MIN_QUERY_LEN = 3;
2856
- const SearchBarInner = JSX(({ className, isMobile, topItems }) => {
2907
+ const SEARCH_DIALOG_ID = 'search';
2908
+ const SearchDialog = JSX(({ topItems }) => {
2909
+ const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
2857
2910
  const basePathList = topItems?.map((_) => _.href || '/');
2858
- const [searchResult, searchInputProps] = useSearch(basePathList);
2859
- const { value, onChange, onFocus } = searchInputProps;
2911
+ const [searchResult, searchInputProps] = useSearch({
2912
+ basePathList,
2913
+ initialQuery: dialogProps.message,
2914
+ wasOpened: dialogProps.wasOpened,
2915
+ });
2860
2916
  const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
2861
2917
  useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
2862
- const [isSearchDialogOpen, { setTrue: openSearchDialog, setFalse: hideSearchDialog }] = useBool();
2863
- const handleInitialInputChange = useCallback((_) => {
2864
- onChange(_);
2865
- if (isQueryLongEnough(_)) {
2866
- openSearchDialog();
2867
- }
2868
- }, [onChange, isQueryLongEnough]);
2869
- const handleInitialInputFocus = useCallback(() => {
2870
- onFocus();
2871
- if (isQueryLongEnough(value)) {
2872
- openSearchDialog();
2873
- }
2874
- }, [value, onFocus]);
2875
- return (jsxs("div", { className: className, children: [jsx(SearchBarInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange, onFocus: handleInitialInputFocus }), isMobile ? (jsx(CloseButton, { className: "absolute top-2 right-3", onClick: (e) => {
2876
- e.preventDefault();
2877
- onChange('');
2878
- } })) : null, isSearchDialogOpen ? (jsx(Dialog, { head: jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: jsx(Sitemap, { topItems: searchItems }) })) : null] }));
2918
+ return (jsx(Dialog, { ...dialogProps, head: jsx(SearchInput, { className: "my-5", autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
2879
2919
  });
2880
- const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
2881
2920
  const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
2882
2921
  ? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
2883
2922
  ..._,
2884
- items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
2923
+ items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
2885
2924
  }))
2886
2925
  : [];
2887
2926
  // Temp
@@ -2893,6 +2932,22 @@
2893
2932
  }
2894
2933
  }
2895
2934
 
2935
+ const MIN_QUERY_LEN = 3;
2936
+ const SearchBarInner = JSX(({ className, isMobile }) => {
2937
+ const [value, setValue] = useState('');
2938
+ const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
2939
+ useDialogHandlers({ onClose: resetQueryOnDialogClose });
2940
+ const { open } = useDialog(SEARCH_DIALOG_ID);
2941
+ const handleInitialInputChange = useCallback((_) => {
2942
+ setValue(_);
2943
+ if (isQueryLongEnough(_)) {
2944
+ open(_);
2945
+ }
2946
+ }, []);
2947
+ return (jsxs("div", { className: className, children: [jsx(SearchInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange }), isMobile ? (jsx(CloseButton, { className: "absolute top-2 right-3", onClick: resetQueryOnDialogClose })) : null] }));
2948
+ });
2949
+ const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
2950
+
2896
2951
  const SearchBar$1 = JSX((props) => jsx(SearchBarInner, { ...props }));
2897
2952
 
2898
2953
  const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "https://www.rshb.ru/feedback/question/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
@@ -2935,7 +2990,7 @@
2935
2990
  const fallback = rest.options?.page?.fallback;
2936
2991
  const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
2937
2992
  const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
2938
- return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow", topItems: sitemap?.topItems })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2993
+ return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2939
2994
  });
2940
2995
 
2941
2996
  const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
@@ -2954,22 +3009,6 @@
2954
3009
  const renderMonthNames = (item, colSize) => item.month?.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
2955
3010
  const renderMonthImages = (item) => item.month?.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(ImgInner, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
2956
3011
 
2957
- const isHrefActive = (router) => ({ href }) => withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
2958
-
2959
- const isTopItemActive = (router) => isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
2960
-
2961
- const TopItem = JSX(({ className = '', active, flat, children, ...rest }) => {
2962
- const link = useLink(true);
2963
- const { href, target, text, onClick } = link(rest);
2964
- return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
2965
- });
2966
- const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
2967
- ? 'rounded-md border-primary-main group-data-transparent:border-white'
2968
- : 'border-transparent', flat ? '' : 'px-4 py-2');
2969
- const getTextStyle$1 = (active = false, flat = false) => style('font-sans text-s-light', active
2970
- ? 'text-primary-main'
2971
- : style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
2972
-
2973
3012
  const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
2974
3013
  function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
2975
3014
  const cachedFetcher = useCallback(async (...args) => {
@@ -2991,7 +3030,7 @@
2991
3030
  }
2992
3031
 
2993
3032
  const REGION_URL = '/api/v1/region';
2994
- function useLocation(defaultLocation) {
3033
+ function useLocation(defaultLocation = 'Москва') {
2995
3034
  const currentLocation = getLocalStorageLocation();
2996
3035
  const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
2997
3036
  const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
@@ -3003,7 +3042,7 @@
3003
3042
  const onChangeLocation = useCallback((region) => {
3004
3043
  globalThis.localStorage?.setItem('location', JSON.stringify({ manual: true, region }));
3005
3044
  setLocation(region);
3006
- }, [setLocation]);
3045
+ }, []);
3007
3046
  return [location, onChangeLocation];
3008
3047
  }
3009
3048
  const getLocalStorageLocation = () => {
@@ -3016,6 +3055,10 @@
3016
3055
  }
3017
3056
  };
3018
3057
 
3058
+ const isHrefActive = (router) => ({ href }) => withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
3059
+
3060
+ const isTopItemActive = (router) => isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
3061
+
3019
3062
  const REGIONS_URL = '/api/v1/regions';
3020
3063
  function useRegions() {
3021
3064
  const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
@@ -3038,13 +3081,19 @@
3038
3081
  });
3039
3082
 
3040
3083
  const SEARCH_TERM_MIN_LENGTH = 3;
3041
- const Location = JSX(({ currentLocation, onChangeLocation, onClose, foreignOffices }) => {
3084
+ const LOCATION_DIALOG_ID = 'location';
3085
+ const LocationDialog = JSX(({ currentLocation, onChangeLocation, foreignOffices }) => {
3086
+ const dialogProps = useDialogProps(LOCATION_DIALOG_ID);
3042
3087
  const [query, setQuery] = useState('');
3043
3088
  const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
3044
3089
  const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
3045
- return (jsxs(Dialog, { head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), onClose: onClose, children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
3090
+ const handleChangeLocation = useCallback((region) => {
3091
+ dialogProps.onClose && dialogProps.onClose();
3092
+ onChangeLocation && onChangeLocation(region);
3093
+ }, [dialogProps.onClose, onChangeLocation]);
3094
+ return (jsxs(Dialog, { ...dialogProps, head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
3046
3095
  .filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
3047
- .map(renderRegion({ onChangeLocation, onClose })) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, onClose })) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
3096
+ .map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
3048
3097
  });
3049
3098
  const regionFirstLetter = (region) => region.name?.charAt(0) || '';
3050
3099
  const cleanUpRegions = (regions) => regions.map((region) => ({
@@ -3052,10 +3101,9 @@
3052
3101
  name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
3053
3102
  }));
3054
3103
  const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick: close, children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
3055
- const renderRegionGroup = ({ onChangeLocation, onClose }) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, onClose }))] }, letter));
3056
- const renderRegion = ({ onChangeLocation, onClose }) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
3104
+ const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
3105
+ const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
3057
3106
  onChangeLocation && onChangeLocation(region);
3058
- onClose && onClose();
3059
3107
  }, children: region.name || '' }) }, region.id));
3060
3108
  const ForeignOffices = JSX(({ foreignOffices }) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-7 pt-7", children: [jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
3061
3109
  const ForeignOffice = JSX(({ icon, ...rest }) => {
@@ -3064,6 +3112,18 @@
3064
3112
  return (jsxs("div", { className: "flex gap-x-3", children: [icon ? jsx(ImgInner, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })) : null] }));
3065
3113
  });
3066
3114
 
3115
+ const TopItem = JSX(({ className = '', active, flat, children, ...rest }) => {
3116
+ const link = useLink(true);
3117
+ const { href, target, text, onClick } = link(rest);
3118
+ return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
3119
+ });
3120
+ const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
3121
+ ? 'rounded-md border-primary-main group-data-transparent:border-white'
3122
+ : 'border-transparent', flat ? '' : 'px-4 py-2');
3123
+ const getTextStyle$1 = (active = false, flat = false) => style('font-sans text-s-light', active
3124
+ ? 'text-primary-main'
3125
+ : style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
3126
+
3067
3127
  const HeaderSecondaryMenuButton = JSX(({ className, isRounded, disabled, ariaLabel, image, onClick }) => (jsx("button", { className: style('group/btn border-0 p-0 flex items-center bg-inherit', isRounded
3068
3128
  ? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
3069
3129
  : 'w-6 h-6 text-primary-text hover:text-primary-main', 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, children: jsx(ImgInner, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0", asSVG: true }) })));
@@ -3123,16 +3183,13 @@
3123
3183
  });
3124
3184
  const renderChatBotButton = ({ className, iconVersion, onClick }) => (jsx(HeaderSecondaryMenuButton, { className: style(CHAT_BUTTON_EXTERNAL_NAME, className), image: { icon: 'HeadphonesIcon', iconVersion }, ariaLabel: "\u0427\u0430\u0442", onClick: onClick }));
3125
3185
 
3126
- const HeaderSecondaryMenu = JSX(({ version, className, officesLink, defaultLocation = 'Москва', foreignOffices }) => {
3127
- const [isShowLocationModal, { setTrue: showLocationModal, setFalse: hideLocationModal }] = useBool();
3128
- const [location, onChangeLocation] = useLocation(defaultLocation);
3186
+ const HeaderSecondaryMenu = JSX(({ className, version, locationName: location, officesLink }) => {
3129
3187
  const iconVersion = version === 'transparent' ? 'white' : 'black';
3130
- const handleShowLocationModal = useCallback((ev) => {
3131
- ev?.preventDefault();
3132
- showLocationModal();
3133
- }, []);
3134
- defaultEventBus.fire('setPageOverflowHidden', isShowLocationModal);
3135
- return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, onClose: hideLocationModal })) : null] }));
3188
+ const { open: openLocationModal } = useDialog(LOCATION_DIALOG_ID);
3189
+ const handleOpenLocationModal = useCallback(() => openLocationModal(), []);
3190
+ const { open: openSearchModal } = useDialog(SEARCH_DIALOG_ID);
3191
+ const handleOpenSearchModal = useCallback(() => openSearchModal(), []);
3192
+ return (jsxs("div", { className: style('flex items-center gap-5', className), children: [jsx(TopItem, { flat: true, href: "#", text: location, onClick: handleOpenLocationModal }), officesLink ? jsx(TopItem, { flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" }) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A", onClick: handleOpenSearchModal }), projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null] }));
3136
3193
  });
3137
3194
 
3138
3195
  const findActiveSubItem = (router) => (items = []) => {
@@ -3201,7 +3258,8 @@
3201
3258
  const router = useRouter();
3202
3259
  const { topItems, logo, defaultLocation, foreignOffices, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
3203
3260
  const activeTopItem = topItems?.find(isTopItemActive(router));
3204
- return (jsx(BlockWrapper, { tag: "header", className: style('pt-6 px-20', showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5', className), version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", foreignOffices: foreignOffices, defaultLocation: defaultLocation, officesLink: officesLink })] }), jsx("div", { className: style('mt-6 h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items })) : null] }) }));
3261
+ const [location, onChangeLocation] = useLocation(defaultLocation);
3262
+ return (jsxs(BlockWrapper, { tag: "header", className: style('pt-6 px-20', showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5', className), version: version, ...rest, children: [jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", locationName: location.name, officesLink: officesLink })] }), jsx("div", { className: style('mt-6 h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items })) : null] }), jsx(SearchDialog, { topItems: topItems }), jsx(LocationDialog, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation })] }));
3205
3263
  });
3206
3264
 
3207
3265
  const gapStyles = {
@@ -3216,7 +3274,7 @@
3216
3274
 
3217
3275
  const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('grid grid-cols-12', isPadding ? 'p-12' : '', gapStyles[gap], className), version: version, isTheme: isTheme, ...rest, children: renderChildren(rest) })));
3218
3276
  HorizontalLayout.childrenTypes = {
3219
- exclude: ['HorizontalLayout', 'Accordion', 'OtherProducts'],
3277
+ exclude: ['HorizontalLayout'],
3220
3278
  };
3221
3279
 
3222
3280
  const ImgBlock = JSX((props) => {
@@ -3797,10 +3855,6 @@
3797
3855
  return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
3798
3856
  });
3799
3857
 
3800
- function assertUnreachable(x) {
3801
- throw new Error(x);
3802
- }
3803
-
3804
3858
  // TODO: Create universal function for this case
3805
3859
  const renderBenefit$2 =
3806
3860
  // Linter doesn't understand that switch processes all cases
@@ -4017,7 +4071,7 @@
4017
4071
 
4018
4072
  const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: `grid grid-cols-12 gap-5 [&>*]:p-0`, isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) })));
4019
4073
  RollupItem.childrenTypes = {
4020
- exclude: ['RollupItem', 'Accordion', 'OtherProducts'],
4074
+ exclude: ['RollupItem'],
4021
4075
  };
4022
4076
  const renderFoldButton = ({ version, label: defaultLabel, isUnfolded, onToggle, }) => {
4023
4077
  const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
@@ -4158,10 +4212,7 @@
4158
4212
  const checkCanRenderIcon = (icon) => Boolean(icon?.icon || icon?.src);
4159
4213
 
4160
4214
  // TODO: Create universal function for this case
4161
- const renderStep = (props) =>
4162
- // Linter doesn't understand that switch processes all cases
4163
- // eslint-disable-next-line consistent-return
4164
- (step, i, arr) => {
4215
+ const renderStep = (props) => (step, i, arr) => {
4165
4216
  const { type } = step;
4166
4217
  if (!(type === 'default' || type === 'rte')) {
4167
4218
  return null;
@@ -4170,9 +4221,9 @@
4170
4221
  case 'default':
4171
4222
  return renderDefaultStep(props)(step, i, arr);
4172
4223
  case 'rte':
4173
- return jsx(RichText, { __html: step.__html });
4224
+ return (jsx("div", { className: style('text-center', getContainerWidth(arr.length)), children: jsx(RichText, { __html: step.__html }) }, String(i)));
4174
4225
  default:
4175
- assertUnreachable(step);
4226
+ return null;
4176
4227
  }
4177
4228
  };
4178
4229
  const renderDefaultStep = ({ styleMap, isMainButton, version }) => (step, i, arr) => {
@@ -4622,9 +4673,7 @@
4622
4673
  const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
4623
4674
  return (jsx(BlockWrapper, { className: style('flex flex-col [&>*]:max-w-full', isPadding ? 'p-12' : '', gapStyles[gap], align && alignStyle[align], className), version: version, isTheme: isTheme, ...rest, children: renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } }) }));
4624
4675
  });
4625
- VerticalLayout.childrenTypes = {
4626
- exclude: ['Accordion', 'OtherProducts'],
4627
- };
4676
+ VerticalLayout.childrenTypes = [];
4628
4677
 
4629
4678
  const MIN_COL_SPAN = 10;
4630
4679
  const getPaddings = (className) => getColSpan(className) < MIN_COL_SPAN ? 'py-6 px-11' : 'py-12 px-32';
@@ -4635,7 +4684,6 @@
4635
4684
  });
4636
4685
 
4637
4686
  const Blocks = {
4638
- Accordion,
4639
4687
  ApplicationForm,
4640
4688
  BenefitsBlock,
4641
4689
  Bonus,
@@ -4792,7 +4840,6 @@
4792
4840
  const ContentPage = JSX((props) => {
4793
4841
  const { className = '', blocksRegistry, blockDecorator, data = {} } = props;
4794
4842
  const { style: pageStyle, blocks, slots, likeControl, colorPalette = 'pc' } = data;
4795
- const [overflowStyle, setOverflowStyle] = useState('');
4796
4843
  const options = {
4797
4844
  key: '',
4798
4845
  page: data,
@@ -4801,10 +4848,12 @@
4801
4848
  parent: data,
4802
4849
  };
4803
4850
  useBlockRouterProvider();
4804
- useEffect(() => defaultEventBus.subscribe('setPageOverflowHidden', (isHidden) => {
4805
- setOverflowStyle(isHidden ? 'overflow-hidden h-screen' : '');
4806
- }), []);
4807
- return (jsxs("section", { className: style('relative', pageStyle, className, overflowStyle), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, {
4851
+ const [isSomeDialogOpened, { setTrue: setSomeDialogOpened, setFalse: resetSomeDialogOpened }] = useBool();
4852
+ useDialogHandlers({
4853
+ onOpen: setSomeDialogOpened,
4854
+ onClose: resetSomeDialogOpened,
4855
+ });
4856
+ return (jsxs("section", { className: style('relative', pageStyle, className, isSomeDialogOpened ? 'overflow-hidden h-screen' : ''), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, {
4808
4857
  ...options,
4809
4858
  slotName: 'header',
4810
4859
  }) })) : null, jsxs("div", { className: "container grid grid-cols-12 gap-1", children: [renderBlocksList(blocks, options), slots?.footer
@@ -4820,7 +4869,7 @@
4820
4869
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
4821
4870
  }
4822
4871
 
4823
- const packageVersion = "0.9.3";
4872
+ const packageVersion = "0.9.5";
4824
4873
 
4825
4874
  exports.Blocks = Blocks;
4826
4875
  exports.ContentPage = ContentPage;