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

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 (595) hide show
  1. package/bin/migration-scripts/0.9.1.js +70 -0
  2. package/bundle/EventBus/defaultEventBus.d.ts +3 -2
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +237 -185
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  7. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  8. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  9. package/bundle/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  10. package/bundle/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  11. package/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  12. package/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  13. package/bundle/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  14. package/bundle/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  15. package/bundle/components/SafeDepositRental/utils.d.ts +1 -1
  16. package/bundle/components/Tabs/TabActivationEvent.d.ts +5 -0
  17. package/bundle/components/Tabs/Tabs.d.ts +1 -5
  18. package/bundle/hooks/useLocation.d.ts +1 -1
  19. package/bundle/services/search/useSearch.d.ts +7 -2
  20. package/bundle/ui-kit/Dialog/Dialog.d.ts +1 -0
  21. package/bundle/ui-kit/Dialog/DialogAction.d.ts +12 -0
  22. package/bundle/ui-kit/Dialog/useDialog.d.ts +4 -0
  23. package/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  24. package/bundle/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  25. package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  26. package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  27. package/bundle/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  28. package/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  29. package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  30. package/{lib/ui-kit/SearchBar/SearchBarInput.d.ts → bundle/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
  31. package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -2
  32. package/bundle/utils/noop.d.ts +1 -0
  33. package/bundle/utils/useDebouncedEffect.d.ts +1 -0
  34. package/dist/EventBus/defaultEventBus.d.ts +3 -2
  35. package/dist/EventBus/defaultEventBus.js.map +1 -1
  36. package/dist/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  37. package/dist/components/Blocks.js +0 -2
  38. package/dist/components/Blocks.js.map +1 -1
  39. package/dist/components/Blocks.mobile.js +1 -3
  40. package/dist/components/Blocks.mobile.js.map +1 -1
  41. package/dist/components/ContentPage/ContentPage.js +8 -7
  42. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  43. package/dist/components/Footer/Footer.js +1 -1
  44. package/dist/components/Footer/Footer.js.map +1 -1
  45. package/dist/components/Footer/Footer.mobile.js +1 -1
  46. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  47. package/dist/components/Header/Header.js +5 -1
  48. package/dist/components/Header/Header.js.map +1 -1
  49. package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  50. package/dist/components/Header/HeaderSecondaryMenu.js +10 -13
  51. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  52. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  53. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  54. package/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
  55. package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  56. package/dist/components/RollupItem/RollupItem.js +1 -1
  57. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  58. package/dist/components/RollupItem/RollupItem.mobile.js +2 -4
  59. package/dist/components/RollupItem/RollupItem.mobile.js.map +1 -1
  60. package/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  61. package/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  62. package/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
  63. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  64. package/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  65. package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  66. package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  67. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  68. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  69. package/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  70. package/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  71. package/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  72. package/dist/components/SafeDepositRental/utils.d.ts +1 -1
  73. package/dist/components/Tabs/TabActivationEvent.d.ts +5 -0
  74. package/dist/components/{Accordion/AccordionContent.js → Tabs/TabActivationEvent.js} +1 -1
  75. package/dist/components/Tabs/TabActivationEvent.js.map +1 -0
  76. package/dist/components/Tabs/Tabs.d.ts +1 -5
  77. package/dist/components/Tabs/Tabs.js.map +1 -1
  78. package/dist/components/VerticalLayout/VerticalLayout.js +1 -3
  79. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  80. package/dist/hooks/useLink.js +3 -0
  81. package/dist/hooks/useLink.js.map +1 -1
  82. package/dist/hooks/useLocation.d.ts +1 -1
  83. package/dist/hooks/useLocation.js +2 -2
  84. package/dist/hooks/useLocation.js.map +1 -1
  85. package/dist/services/search/useSearch.d.ts +7 -2
  86. package/dist/services/search/useSearch.js +15 -18
  87. package/dist/services/search/useSearch.js.map +1 -1
  88. package/dist/ui-kit/Dialog/Dialog.d.ts +1 -0
  89. package/dist/ui-kit/Dialog/Dialog.js +2 -6
  90. package/dist/ui-kit/Dialog/Dialog.js.map +1 -1
  91. package/dist/ui-kit/Dialog/DialogAction.d.ts +12 -0
  92. package/dist/ui-kit/{Location/LocationProps.js → Dialog/DialogAction.js} +1 -1
  93. package/dist/ui-kit/Dialog/DialogAction.js.map +1 -0
  94. package/dist/ui-kit/Dialog/useDialog.d.ts +4 -0
  95. package/dist/ui-kit/Dialog/useDialog.js +9 -0
  96. package/dist/ui-kit/Dialog/useDialog.js.map +1 -0
  97. package/dist/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  98. package/dist/ui-kit/Dialog/useDialogHandlers.js +21 -0
  99. package/dist/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  100. package/dist/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  101. package/dist/ui-kit/Dialog/useDialogProps.js +37 -0
  102. package/dist/ui-kit/Dialog/useDialogProps.js.map +1 -0
  103. package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  104. package/dist/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  105. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  106. package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  107. package/dist/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  108. package/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  109. package/dist/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  110. package/dist/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  111. package/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  112. package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  113. package/dist/ui-kit/SearchBar/SearchBarInner.js +13 -40
  114. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  115. package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  116. package/dist/ui-kit/SearchDialog/SearchDialog.js +40 -0
  117. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  118. package/dist/ui-kit/{SearchBar/SearchBarInput.d.ts → SearchDialog/SearchInput.d.ts} +2 -2
  119. package/{mobile/dist/ui-kit/SearchBar/SearchBarInput.js → dist/ui-kit/SearchDialog/SearchInput.js} +3 -3
  120. package/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  121. package/dist/ui-kit/TopItem/TopItem.d.ts +1 -2
  122. package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  123. package/dist/utils/noop.d.ts +1 -0
  124. package/dist/utils/noop.js +7 -0
  125. package/dist/utils/noop.js.map +1 -0
  126. package/dist/utils/useDebouncedEffect.d.ts +1 -0
  127. package/dist/utils/useDebouncedEffect.js +11 -0
  128. package/dist/utils/useDebouncedEffect.js.map +1 -0
  129. package/lib/EventBus/defaultEventBus.d.ts +3 -2
  130. package/lib/EventBus/defaultEventBus.js.map +1 -1
  131. package/lib/common.css +1 -1
  132. package/lib/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  133. package/lib/components/Blocks.js +0 -2
  134. package/lib/components/Blocks.js.map +1 -1
  135. package/lib/components/Blocks.mobile.js +1 -3
  136. package/lib/components/Blocks.mobile.js.map +1 -1
  137. package/lib/components/ContentPage/ContentPage.js +8 -7
  138. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  139. package/lib/components/Footer/Footer.js +1 -1
  140. package/lib/components/Footer/Footer.js.map +1 -1
  141. package/lib/components/Footer/Footer.mobile.js +1 -1
  142. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  143. package/lib/components/Header/Header.js +5 -1
  144. package/lib/components/Header/Header.js.map +1 -1
  145. package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  146. package/lib/components/Header/HeaderSecondaryMenu.js +10 -13
  147. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  148. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  149. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  150. package/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
  151. package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  152. package/lib/components/RollupItem/RollupItem.js +1 -1
  153. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  154. package/lib/components/RollupItem/RollupItem.mobile.js +2 -4
  155. package/lib/components/RollupItem/RollupItem.mobile.js.map +1 -1
  156. package/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  157. package/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  158. package/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
  159. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  160. package/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  161. package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  162. package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  163. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  164. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  165. package/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  166. package/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  167. package/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  168. package/lib/components/SafeDepositRental/utils.d.ts +1 -1
  169. package/lib/components/Tabs/TabActivationEvent.d.ts +5 -0
  170. package/lib/components/Tabs/TabActivationEvent.js +2 -0
  171. package/lib/components/Tabs/TabActivationEvent.js.map +1 -0
  172. package/lib/components/Tabs/Tabs.d.ts +1 -5
  173. package/lib/components/Tabs/Tabs.js.map +1 -1
  174. package/lib/components/VerticalLayout/VerticalLayout.js +1 -3
  175. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  176. package/lib/hooks/useLink.js +3 -0
  177. package/lib/hooks/useLink.js.map +1 -1
  178. package/lib/hooks/useLocation.d.ts +1 -1
  179. package/lib/hooks/useLocation.js +2 -2
  180. package/lib/hooks/useLocation.js.map +1 -1
  181. package/lib/services/search/useSearch.d.ts +7 -2
  182. package/lib/services/search/useSearch.js +16 -19
  183. package/lib/services/search/useSearch.js.map +1 -1
  184. package/lib/ui-kit/Dialog/Dialog.d.ts +1 -0
  185. package/lib/ui-kit/Dialog/Dialog.js +3 -7
  186. package/lib/ui-kit/Dialog/Dialog.js.map +1 -1
  187. package/lib/ui-kit/Dialog/DialogAction.d.ts +12 -0
  188. package/lib/ui-kit/Dialog/DialogAction.js +2 -0
  189. package/lib/ui-kit/Dialog/DialogAction.js.map +1 -0
  190. package/lib/ui-kit/Dialog/useDialog.d.ts +4 -0
  191. package/lib/ui-kit/Dialog/useDialog.js +6 -0
  192. package/lib/ui-kit/Dialog/useDialog.js.map +1 -0
  193. package/lib/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  194. package/lib/ui-kit/Dialog/useDialogHandlers.js +18 -0
  195. package/lib/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  196. package/lib/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  197. package/lib/ui-kit/Dialog/useDialogProps.js +34 -0
  198. package/lib/ui-kit/Dialog/useDialogProps.js.map +1 -0
  199. package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  200. package/lib/ui-kit/{Location/Location.fixture.d.ts → LocationDialog/LocationDialog.fixture.d.ts} +0 -0
  201. package/lib/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  202. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  203. package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  204. package/lib/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  205. package/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  206. package/lib/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  207. package/lib/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  208. package/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  209. package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  210. package/lib/ui-kit/SearchBar/SearchBarInner.js +14 -41
  211. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  212. package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  213. package/lib/ui-kit/SearchDialog/SearchDialog.js +38 -0
  214. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  215. package/{mobile/bundle/ui-kit/SearchBar/SearchBarInput.d.ts → lib/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
  216. package/lib/ui-kit/{SearchBar/SearchBarInput.js → SearchDialog/SearchInput.js} +2 -2
  217. package/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  218. package/lib/ui-kit/TopItem/TopItem.d.ts +1 -2
  219. package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  220. package/lib/utils/noop.d.ts +1 -0
  221. package/lib/utils/noop.js +4 -0
  222. package/lib/utils/noop.js.map +1 -0
  223. package/lib/utils/useDebouncedEffect.d.ts +1 -0
  224. package/lib/utils/useDebouncedEffect.js +8 -0
  225. package/lib/utils/useDebouncedEffect.js.map +1 -0
  226. package/mobile/bundle/EventBus/defaultEventBus.d.ts +3 -2
  227. package/mobile/bundle/bundle.umd.js +257 -218
  228. package/mobile/bundle/bundle.umd.min.js +1 -1
  229. package/mobile/bundle/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  230. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  231. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  232. package/mobile/bundle/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  233. package/mobile/bundle/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  234. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  235. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  236. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  237. package/mobile/bundle/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  238. package/mobile/bundle/components/SafeDepositRental/utils.d.ts +1 -1
  239. package/mobile/bundle/components/Tabs/TabActivationEvent.d.ts +5 -0
  240. package/mobile/bundle/components/Tabs/Tabs.d.ts +1 -5
  241. package/mobile/bundle/hooks/useLocation.d.ts +1 -1
  242. package/mobile/bundle/services/search/useSearch.d.ts +7 -2
  243. package/mobile/bundle/ui-kit/Dialog/Dialog.d.ts +1 -0
  244. package/mobile/bundle/ui-kit/Dialog/DialogAction.d.ts +12 -0
  245. package/mobile/bundle/ui-kit/Dialog/useDialog.d.ts +4 -0
  246. package/mobile/bundle/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  247. package/mobile/bundle/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  248. package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  249. package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  250. package/mobile/bundle/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  251. package/mobile/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  252. package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  253. package/{bundle/ui-kit/SearchBar/SearchBarInput.d.ts → mobile/bundle/ui-kit/SearchDialog/SearchInput.d.ts} +2 -2
  254. package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -2
  255. package/mobile/bundle/utils/noop.d.ts +1 -0
  256. package/mobile/bundle/utils/useDebouncedEffect.d.ts +1 -0
  257. package/mobile/dist/EventBus/defaultEventBus.d.ts +3 -2
  258. package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
  259. package/mobile/dist/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  260. package/mobile/dist/components/Blocks.js +1 -3
  261. package/mobile/dist/components/Blocks.js.map +1 -1
  262. package/mobile/dist/components/ContentPage/ContentPage.js +8 -7
  263. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  264. package/mobile/dist/components/Footer/Footer.js +1 -1
  265. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  266. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  267. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +10 -13
  268. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  269. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  270. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  271. package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
  272. package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  273. package/mobile/dist/components/RollupItem/RollupItem.js +2 -4
  274. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  275. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  276. package/mobile/dist/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  277. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
  278. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  279. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  280. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  281. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  282. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  283. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  284. package/mobile/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  285. package/mobile/dist/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  286. package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  287. package/mobile/dist/components/SafeDepositRental/utils.d.ts +1 -1
  288. package/mobile/dist/components/Tabs/TabActivationEvent.d.ts +5 -0
  289. package/mobile/dist/components/{Accordion/AccordionContent.js → Tabs/TabActivationEvent.js} +1 -1
  290. package/mobile/dist/components/Tabs/TabActivationEvent.js.map +1 -0
  291. package/mobile/dist/components/Tabs/Tabs.d.ts +1 -5
  292. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  293. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +1 -3
  294. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  295. package/mobile/dist/hooks/useLink.js +3 -0
  296. package/mobile/dist/hooks/useLink.js.map +1 -1
  297. package/mobile/dist/hooks/useLocation.d.ts +1 -1
  298. package/mobile/dist/hooks/useLocation.js +2 -2
  299. package/mobile/dist/hooks/useLocation.js.map +1 -1
  300. package/mobile/dist/services/search/useSearch.d.ts +7 -2
  301. package/mobile/dist/services/search/useSearch.js +15 -18
  302. package/mobile/dist/services/search/useSearch.js.map +1 -1
  303. package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +1 -0
  304. package/mobile/dist/ui-kit/Dialog/Dialog.js +2 -6
  305. package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -1
  306. package/mobile/dist/ui-kit/Dialog/DialogAction.d.ts +12 -0
  307. package/mobile/dist/ui-kit/{Location/LocationProps.js → Dialog/DialogAction.js} +1 -1
  308. package/mobile/dist/ui-kit/Dialog/DialogAction.js.map +1 -0
  309. package/mobile/dist/ui-kit/Dialog/useDialog.d.ts +4 -0
  310. package/mobile/dist/ui-kit/Dialog/useDialog.js +9 -0
  311. package/mobile/dist/ui-kit/Dialog/useDialog.js.map +1 -0
  312. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  313. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js +21 -0
  314. package/mobile/dist/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  315. package/mobile/dist/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  316. package/mobile/dist/ui-kit/Dialog/useDialogProps.js +37 -0
  317. package/mobile/dist/ui-kit/Dialog/useDialogProps.js.map +1 -0
  318. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  319. package/mobile/dist/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  320. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  321. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  322. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  323. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  324. package/mobile/dist/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  325. package/mobile/dist/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  326. package/mobile/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  327. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  328. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +13 -40
  329. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  330. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  331. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +40 -0
  332. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  333. package/mobile/dist/ui-kit/SearchDialog/SearchInput.d.ts +9 -0
  334. package/{dist/ui-kit/SearchBar/SearchBarInput.js → mobile/dist/ui-kit/SearchDialog/SearchInput.js} +3 -3
  335. package/mobile/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  336. package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -2
  337. package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  338. package/mobile/dist/utils/noop.d.ts +1 -0
  339. package/mobile/dist/utils/noop.js +7 -0
  340. package/mobile/dist/utils/noop.js.map +1 -0
  341. package/mobile/dist/utils/useDebouncedEffect.d.ts +1 -0
  342. package/mobile/dist/utils/useDebouncedEffect.js +11 -0
  343. package/mobile/dist/utils/useDebouncedEffect.js.map +1 -0
  344. package/mobile/lib/EventBus/defaultEventBus.d.ts +3 -2
  345. package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
  346. package/mobile/lib/components/ApplicationForm/renderBankOffices.d.ts +1 -1
  347. package/mobile/lib/components/Blocks.js +1 -3
  348. package/mobile/lib/components/Blocks.js.map +1 -1
  349. package/mobile/lib/components/ContentPage/ContentPage.js +8 -7
  350. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  351. package/mobile/lib/components/Footer/Footer.js +1 -1
  352. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  353. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -3
  354. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +10 -13
  355. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  356. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
  357. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  358. package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
  359. package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
  360. package/mobile/lib/components/RollupItem/RollupItem.js +2 -4
  361. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  362. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +1 -1
  363. package/mobile/lib/components/SafeDepositRental/SafeBoxCases.d.ts +1 -1
  364. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
  365. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  366. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +2 -2
  367. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  368. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  369. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +1 -1
  370. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  371. package/mobile/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.d.ts +0 -0
  372. package/mobile/lib/{hooks → components/SafeDepositRental}/useSafeBoxes.js +1 -1
  373. package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -0
  374. package/mobile/lib/components/SafeDepositRental/utils.d.ts +1 -1
  375. package/mobile/lib/components/Tabs/TabActivationEvent.d.ts +5 -0
  376. package/mobile/lib/components/Tabs/TabActivationEvent.js +2 -0
  377. package/mobile/lib/components/Tabs/TabActivationEvent.js.map +1 -0
  378. package/mobile/lib/components/Tabs/Tabs.d.ts +1 -5
  379. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  380. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +1 -3
  381. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  382. package/mobile/lib/hooks/useLink.js +3 -0
  383. package/mobile/lib/hooks/useLink.js.map +1 -1
  384. package/mobile/lib/hooks/useLocation.d.ts +1 -1
  385. package/mobile/lib/hooks/useLocation.js +2 -2
  386. package/mobile/lib/hooks/useLocation.js.map +1 -1
  387. package/mobile/lib/services/search/useSearch.d.ts +7 -2
  388. package/mobile/lib/services/search/useSearch.js +16 -19
  389. package/mobile/lib/services/search/useSearch.js.map +1 -1
  390. package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +1 -0
  391. package/mobile/lib/ui-kit/Dialog/Dialog.js +3 -7
  392. package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -1
  393. package/mobile/lib/ui-kit/Dialog/DialogAction.d.ts +12 -0
  394. package/mobile/lib/ui-kit/Dialog/DialogAction.js +2 -0
  395. package/mobile/lib/ui-kit/Dialog/DialogAction.js.map +1 -0
  396. package/mobile/lib/ui-kit/Dialog/useDialog.d.ts +4 -0
  397. package/mobile/lib/ui-kit/Dialog/useDialog.js +6 -0
  398. package/mobile/lib/ui-kit/Dialog/useDialog.js.map +1 -0
  399. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.d.ts +6 -0
  400. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js +18 -0
  401. package/mobile/lib/ui-kit/Dialog/useDialogHandlers.js.map +1 -0
  402. package/mobile/lib/ui-kit/Dialog/useDialogProps.d.ts +5 -0
  403. package/mobile/lib/ui-kit/Dialog/useDialogProps.js +34 -0
  404. package/mobile/lib/ui-kit/Dialog/useDialogProps.js.map +1 -0
  405. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +3 -0
  406. package/mobile/lib/ui-kit/{Location/Location.js → LocationDialog/LocationDialog.js} +15 -9
  407. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -0
  408. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +13 -0
  409. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js +2 -0
  410. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.js.map +1 -0
  411. package/mobile/lib/ui-kit/{Location → LocationDialog}/SearchBar.d.ts +0 -0
  412. package/mobile/lib/ui-kit/{Location → LocationDialog}/SearchBar.js +0 -0
  413. package/mobile/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -0
  414. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +0 -2
  415. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +14 -41
  416. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  417. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +6 -0
  418. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +38 -0
  419. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -0
  420. package/mobile/lib/ui-kit/SearchDialog/SearchInput.d.ts +9 -0
  421. package/mobile/lib/ui-kit/{SearchBar/SearchBarInput.js → SearchDialog/SearchInput.js} +2 -2
  422. package/mobile/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -0
  423. package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -2
  424. package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  425. package/mobile/lib/utils/noop.d.ts +1 -0
  426. package/mobile/lib/utils/noop.js +4 -0
  427. package/mobile/lib/utils/noop.js.map +1 -0
  428. package/mobile/lib/utils/useDebouncedEffect.d.ts +1 -0
  429. package/mobile/lib/utils/useDebouncedEffect.js +8 -0
  430. package/mobile/lib/utils/useDebouncedEffect.js.map +1 -0
  431. package/mobile/src/EventBus/defaultEventBus.ts +3 -2
  432. package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
  433. package/mobile/src/components/Blocks.ts +1 -3
  434. package/mobile/src/components/ContentPage/ContentPage.tsx +15 -12
  435. package/mobile/src/components/Footer/Footer.tsx +1 -1
  436. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +18 -42
  437. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
  438. package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
  439. package/mobile/src/components/RollupItem/RollupItem.tsx +2 -10
  440. package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +1 -1
  441. package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
  442. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +1 -1
  443. package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +2 -2
  444. package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
  445. package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
  446. package/mobile/src/{hooks → components/SafeDepositRental}/useSafeBoxes.ts +1 -1
  447. package/mobile/src/components/SafeDepositRental/utils.ts +1 -1
  448. package/mobile/src/components/Tabs/TabActivationEvent.ts +6 -0
  449. package/mobile/src/components/Tabs/Tabs.tsx +0 -5
  450. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +1 -3
  451. package/mobile/src/hooks/useLink.ts +4 -0
  452. package/mobile/src/hooks/useLocation.ts +5 -8
  453. package/mobile/src/services/search/useSearch.ts +26 -23
  454. package/mobile/src/ui-kit/Dialog/Dialog.tsx +6 -14
  455. package/mobile/src/ui-kit/Dialog/DialogAction.ts +14 -0
  456. package/mobile/src/ui-kit/Dialog/useDialog.ts +6 -0
  457. package/mobile/src/ui-kit/Dialog/useDialogHandlers.ts +28 -0
  458. package/mobile/src/ui-kit/Dialog/useDialogProps.ts +45 -0
  459. package/mobile/src/ui-kit/{Location/Location.tsx → LocationDialog/LocationDialog.tsx} +38 -29
  460. package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +20 -0
  461. package/mobile/src/ui-kit/{Location → LocationDialog}/SearchBar.tsx +0 -0
  462. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +17 -85
  463. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +65 -0
  464. package/mobile/src/ui-kit/{SearchBar/SearchBarInput.tsx → SearchDialog/SearchInput.tsx} +2 -2
  465. package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -2
  466. package/mobile/src/utils/noop.ts +3 -0
  467. package/mobile/src/utils/useDebouncedEffect.ts +14 -0
  468. package/package.json +1 -1
  469. package/src/EventBus/defaultEventBus.ts +3 -2
  470. package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
  471. package/src/components/Blocks.mobile.ts +1 -3
  472. package/src/components/Blocks.ts +0 -2
  473. package/src/components/ContentPage/ContentPage.tsx +15 -12
  474. package/src/components/Footer/Footer.fixture.tsx +17 -0
  475. package/src/components/Footer/Footer.mobile.tsx +1 -1
  476. package/src/components/Footer/Footer.tsx +1 -1
  477. package/src/components/Header/Header.tsx +12 -2
  478. package/src/components/Header/HeaderSecondaryMenu.tsx +18 -42
  479. package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
  480. package/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
  481. package/src/components/RollupItem/RollupItem.mobile.tsx +2 -10
  482. package/src/components/RollupItem/RollupItem.tsx +1 -1
  483. package/src/components/SafeDepositRental/RegionsAndBranches.tsx +1 -1
  484. package/src/components/SafeDepositRental/SafeBoxCases.tsx +1 -1
  485. package/src/components/SafeDepositRental/SafeDepositRental.tsx +1 -1
  486. package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +2 -2
  487. package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
  488. package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +1 -1
  489. package/src/{hooks → components/SafeDepositRental}/useSafeBoxes.ts +1 -1
  490. package/src/components/SafeDepositRental/utils.ts +1 -1
  491. package/src/components/Tabs/TabActivationEvent.ts +6 -0
  492. package/src/components/Tabs/Tabs.tsx +0 -5
  493. package/src/components/VerticalLayout/VerticalLayout.tsx +1 -3
  494. package/src/hooks/useLink.ts +4 -0
  495. package/src/hooks/useLocation.ts +5 -8
  496. package/src/services/search/useSearch.ts +26 -23
  497. package/src/ui-kit/Dialog/Dialog.tsx +6 -14
  498. package/src/ui-kit/Dialog/DialogAction.ts +14 -0
  499. package/src/ui-kit/Dialog/useDialog.ts +6 -0
  500. package/src/ui-kit/Dialog/useDialogHandlers.ts +28 -0
  501. package/src/ui-kit/Dialog/useDialogProps.ts +45 -0
  502. package/src/ui-kit/{Location/Location.fixture.tsx → LocationDialog/LocationDialog.fixture.tsx} +3 -5
  503. package/src/ui-kit/{Location/Location.tsx → LocationDialog/LocationDialog.tsx} +38 -29
  504. package/src/ui-kit/LocationDialog/LocationDialogProps.ts +20 -0
  505. package/src/ui-kit/{Location → LocationDialog}/SearchBar.tsx +0 -0
  506. package/src/ui-kit/SearchBar/SearchBarInner.tsx +17 -85
  507. package/src/ui-kit/SearchDialog/SearchDialog.tsx +65 -0
  508. package/src/ui-kit/{SearchBar/SearchBarInput.tsx → SearchDialog/SearchInput.tsx} +2 -2
  509. package/src/ui-kit/TopItem/TopItem.tsx +1 -2
  510. package/src/utils/noop.ts +3 -0
  511. package/src/utils/useDebouncedEffect.ts +14 -0
  512. package/bundle/components/Accordion/Accordion.d.ts +0 -5
  513. package/bundle/components/Accordion/Accordion.mobile.d.ts +0 -5
  514. package/bundle/components/Accordion/AccordionContent.d.ts +0 -19
  515. package/bundle/ui-kit/Location/Location.d.ts +0 -2
  516. package/bundle/ui-kit/Location/LocationProps.d.ts +0 -16
  517. package/dist/components/Accordion/Accordion.d.ts +0 -5
  518. package/dist/components/Accordion/Accordion.js +0 -12
  519. package/dist/components/Accordion/Accordion.js.map +0 -1
  520. package/dist/components/Accordion/Accordion.mobile.d.ts +0 -5
  521. package/dist/components/Accordion/Accordion.mobile.js +0 -11
  522. package/dist/components/Accordion/Accordion.mobile.js.map +0 -1
  523. package/dist/components/Accordion/AccordionContent.d.ts +0 -19
  524. package/dist/components/Accordion/AccordionContent.js.map +0 -1
  525. package/dist/hooks/useSafeBoxes.js.map +0 -1
  526. package/dist/ui-kit/Location/Location.d.ts +0 -2
  527. package/dist/ui-kit/Location/Location.js.map +0 -1
  528. package/dist/ui-kit/Location/LocationProps.d.ts +0 -16
  529. package/dist/ui-kit/Location/LocationProps.js.map +0 -1
  530. package/dist/ui-kit/Location/SearchBar.js.map +0 -1
  531. package/dist/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  532. package/lib/components/Accordion/Accordion.d.ts +0 -5
  533. package/lib/components/Accordion/Accordion.fixture.d.ts +0 -7
  534. package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +0 -8
  535. package/lib/components/Accordion/Accordion.js +0 -10
  536. package/lib/components/Accordion/Accordion.js.map +0 -1
  537. package/lib/components/Accordion/Accordion.mobile.d.ts +0 -5
  538. package/lib/components/Accordion/Accordion.mobile.js +0 -9
  539. package/lib/components/Accordion/Accordion.mobile.js.map +0 -1
  540. package/lib/components/Accordion/AccordionContent.d.ts +0 -19
  541. package/lib/components/Accordion/AccordionContent.js +0 -2
  542. package/lib/components/Accordion/AccordionContent.js.map +0 -1
  543. package/lib/hooks/useSafeBoxes.js.map +0 -1
  544. package/lib/ui-kit/Location/Location.d.ts +0 -2
  545. package/lib/ui-kit/Location/Location.js.map +0 -1
  546. package/lib/ui-kit/Location/LocationProps.d.ts +0 -16
  547. package/lib/ui-kit/Location/LocationProps.js +0 -2
  548. package/lib/ui-kit/Location/LocationProps.js.map +0 -1
  549. package/lib/ui-kit/Location/SearchBar.js.map +0 -1
  550. package/lib/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  551. package/mobile/bundle/components/Accordion/Accordion.d.ts +0 -5
  552. package/mobile/bundle/components/Accordion/AccordionContent.d.ts +0 -19
  553. package/mobile/bundle/ui-kit/Location/Location.d.ts +0 -2
  554. package/mobile/bundle/ui-kit/Location/LocationProps.d.ts +0 -16
  555. package/mobile/dist/components/Accordion/Accordion.d.ts +0 -5
  556. package/mobile/dist/components/Accordion/Accordion.js +0 -11
  557. package/mobile/dist/components/Accordion/Accordion.js.map +0 -1
  558. package/mobile/dist/components/Accordion/AccordionContent.d.ts +0 -19
  559. package/mobile/dist/components/Accordion/AccordionContent.js.map +0 -1
  560. package/mobile/dist/hooks/useSafeBoxes.js.map +0 -1
  561. package/mobile/dist/ui-kit/Location/Location.d.ts +0 -2
  562. package/mobile/dist/ui-kit/Location/Location.js.map +0 -1
  563. package/mobile/dist/ui-kit/Location/LocationProps.d.ts +0 -16
  564. package/mobile/dist/ui-kit/Location/LocationProps.js.map +0 -1
  565. package/mobile/dist/ui-kit/Location/SearchBar.js.map +0 -1
  566. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.d.ts +0 -9
  567. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  568. package/mobile/lib/components/Accordion/Accordion.d.ts +0 -5
  569. package/mobile/lib/components/Accordion/Accordion.js +0 -9
  570. package/mobile/lib/components/Accordion/Accordion.js.map +0 -1
  571. package/mobile/lib/components/Accordion/AccordionContent.d.ts +0 -19
  572. package/mobile/lib/components/Accordion/AccordionContent.js +0 -2
  573. package/mobile/lib/components/Accordion/AccordionContent.js.map +0 -1
  574. package/mobile/lib/hooks/useSafeBoxes.js.map +0 -1
  575. package/mobile/lib/ui-kit/Location/Location.d.ts +0 -2
  576. package/mobile/lib/ui-kit/Location/Location.js.map +0 -1
  577. package/mobile/lib/ui-kit/Location/LocationProps.d.ts +0 -16
  578. package/mobile/lib/ui-kit/Location/LocationProps.js +0 -2
  579. package/mobile/lib/ui-kit/Location/LocationProps.js.map +0 -1
  580. package/mobile/lib/ui-kit/Location/SearchBar.js.map +0 -1
  581. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.d.ts +0 -9
  582. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js.map +0 -1
  583. package/mobile/src/components/Accordion/Accordion.example.json +0 -54
  584. package/mobile/src/components/Accordion/Accordion.tsx +0 -27
  585. package/mobile/src/components/Accordion/Accordion.ui.json +0 -1
  586. package/mobile/src/components/Accordion/AccordionContent.ts +0 -22
  587. package/mobile/src/ui-kit/Location/LocationProps.ts +0 -25
  588. package/src/components/Accordion/Accordion.example.json +0 -54
  589. package/src/components/Accordion/Accordion.fixture.mobile.tsx +0 -64
  590. package/src/components/Accordion/Accordion.fixture.tsx +0 -113
  591. package/src/components/Accordion/Accordion.mobile.tsx +0 -27
  592. package/src/components/Accordion/Accordion.tsx +0 -33
  593. package/src/components/Accordion/Accordion.ui.json +0 -1
  594. package/src/components/Accordion/AccordionContent.ts +0 -22
  595. package/src/ui-kit/Location/LocationProps.ts +0 -25
@@ -236,84 +236,41 @@
236
236
  return JSXTmpl;
237
237
  };
238
238
 
239
- const DEFAULT_SLOT_NAME = null;
239
+ const HeadingClass = {
240
+ h0: 'text-m-title',
241
+ h1: 'text-m-title',
242
+ h2: 'text-m-title',
243
+ h3: 'text-h6',
244
+ h4: 'text-m-title-xs',
245
+ h5: 'text-m-title-xs',
246
+ h6: 'text-m-title-xs',
247
+ };
248
+ const Heading = JSX((props) => {
249
+ const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
250
+ return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
251
+ });
240
252
 
241
253
  const style = (...atoms) => atoms
242
254
  .flatMap((_) => _)
243
255
  .filter(Boolean)
244
256
  .join(' ');
245
257
 
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) {
258
+ const mapChildren = (mapper) => (children) => {
259
+ if (children === null || children === undefined) {
281
260
  return children;
282
261
  }
283
- return block && options
284
- ? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
285
- : null;
286
- }
287
-
288
- class EventBus {
289
- subscribers = {};
290
- subjectsStateMap = {};
291
- subscribe(type, listener) {
292
- this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
293
- const latestEvent = this.subjectsStateMap[type];
294
- if (latestEvent) {
295
- listener(latestEvent);
296
- }
297
- return () => {
298
- this.unsubscribe(type, listener);
299
- };
300
- }
301
- unsubscribe(type, listener) {
302
- this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
303
- }
304
- fire(type, event) {
305
- const isSubjectDeclared = type in this.subjectsStateMap;
306
- if (isSubjectDeclared) {
307
- this.subjectsStateMap[type] = event;
308
- }
309
- this.subscribers[type]?.forEach((s) => s(event));
310
- }
311
- subject(type, event) {
312
- this.subjectsStateMap[type] = event;
313
- }
314
- }
262
+ return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
263
+ };
315
264
 
316
- const defaultEventBus = new EventBus();
265
+ const HEADER_HEIGHT = 170;
266
+ const FOOTER_HEIGHT = 48;
267
+ const BLOCKS_GAP = 4;
268
+ const PAGE_PADDINGS_X = 20;
269
+ const DEFAULT_HEIGHT = 866;
270
+ const getContainerHeight = (minHeight) => ({
271
+ height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
272
+ minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
273
+ });
317
274
 
318
275
  const SENSITIVITY_SCALE = 10;
319
276
  function useIntersectionObserver(observerCallback, { sensitivity, rootRef } = {}) {
@@ -339,73 +296,6 @@
339
296
  .concat(1);
340
297
  }
341
298
 
342
- const blockRouterEventBus = new EventBus();
343
-
344
- function useBlockIntersectionObserver(block) {
345
- const observerCallback = useCallback((entries) => {
346
- if (!block || !entries?.length) {
347
- return;
348
- }
349
- const intersection = entries[entries.length - 1];
350
- blockRouterEventBus.fire('intersection', { block, intersection });
351
- }, [block]);
352
- return useIntersectionObserver(observerCallback, { sensitivity: 1 });
353
- }
354
-
355
- const blockStyles = {
356
- primary: 'bg-white text-primary-text',
357
- secondary: 'bg-primary-main text-white',
358
- gray: 'bg-main-divider text-primary-text',
359
- transparent: 'bg-transparent text-primary-text',
360
- '': '',
361
- };
362
- const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, extraProps = {}, children, }) => {
363
- const Tag = tag;
364
- const ref = useBlockIntersectionObserver(block);
365
- const [isHidden, setHidden] = useState(false);
366
- useEffect(() => defaultEventBus.subscribe('tab', (event) => {
367
- setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
368
- }), [block]);
369
- return (jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, ...extraProps, children: children }));
370
- });
371
- const groupStyle = (isGroup) => (isGroup ? 'group' : '');
372
-
373
- const HeadingClass = {
374
- h0: 'text-m-title',
375
- h1: 'text-m-title',
376
- h2: 'text-m-title',
377
- h3: 'text-h6',
378
- h4: 'text-m-title-xs',
379
- h5: 'text-m-title-xs',
380
- h6: 'text-m-title-xs',
381
- };
382
- const Heading = JSX((props) => {
383
- const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
384
- return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
385
- });
386
-
387
- const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
388
-
389
- const Accordion = JSX(({ title, description, className = '', ...rest }) => (jsxs(BlockWrapper, { className: `py-6 px-4 ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-2 text-center", title: title }) : null, description ? (jsx("div", { className: "mb-5", children: jsx(Paragraph, { size: "text-m", font: "font-light", align: "text-center", children: description }) })) : null, jsx("div", { className: "list-none m-0 p-0", children: renderChildren(rest) })] })));
390
- Accordion.childrenTypes = ['Accordion'];
391
-
392
- const mapChildren = (mapper) => (children) => {
393
- if (children === null || children === undefined) {
394
- return children;
395
- }
396
- return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
397
- };
398
-
399
- const HEADER_HEIGHT = 170;
400
- const FOOTER_HEIGHT = 48;
401
- const BLOCKS_GAP = 4;
402
- const PAGE_PADDINGS_X = 20;
403
- const DEFAULT_HEIGHT = 866;
404
- const getContainerHeight = (minHeight) => ({
405
- height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
406
- minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
407
- });
408
-
409
299
  const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
410
300
  const observerCallback = useCallback((entries) => {
411
301
  if (entries.length && onIntersection) {
@@ -559,6 +449,41 @@
559
449
  return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, minHeight: minHeight, children: children }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version })) : null] }));
560
450
  });
561
451
 
452
+ class EventBus {
453
+ subscribers = {};
454
+ subjectsStateMap = {};
455
+ subscribe(type, listener) {
456
+ this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
457
+ const latestEvent = this.subjectsStateMap[type];
458
+ if (latestEvent) {
459
+ listener(latestEvent);
460
+ }
461
+ return () => {
462
+ this.unsubscribe(type, listener);
463
+ };
464
+ }
465
+ unsubscribe(type, listener) {
466
+ this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
467
+ }
468
+ fire(type, event) {
469
+ const isSubjectDeclared = type in this.subjectsStateMap;
470
+ if (isSubjectDeclared) {
471
+ this.subjectsStateMap[type] = event;
472
+ }
473
+ this.subscribers[type]?.forEach((s) => s(event));
474
+ }
475
+ subject(type, event) {
476
+ this.subjectsStateMap[type] = event;
477
+ }
478
+ }
479
+
480
+ const defaultEventBus = new EventBus();
481
+
482
+ const useDialog = (id = '') => ({
483
+ open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
484
+ close: () => defaultEventBus.fire('dialog', { type: 'close' }),
485
+ });
486
+
562
487
  const dirname = (path) => path?.split('/').slice(0, -1).join('/');
563
488
 
564
489
  const isURL = (href) => Boolean(href?.includes(':'));
@@ -613,6 +538,7 @@
613
538
 
614
539
  function useLink(isRemote = false) {
615
540
  const router = useRouter();
541
+ const { close } = useDialog();
616
542
  return (props) => ({
617
543
  ...props,
618
544
  href: isRemote ? props.href : adjustHref(router)(props.href),
@@ -626,6 +552,7 @@
626
552
  // Default routing
627
553
  return;
628
554
  }
555
+ close();
629
556
  // Client routing
630
557
  ev?.preventDefault();
631
558
  router.push(href);
@@ -888,14 +815,65 @@
888
815
  return data || {};
889
816
  }
890
817
 
891
- function useBool(defaultValue = false) {
892
- const [value, setValue] = useState(defaultValue);
893
- const setTrue = useCallback(() => setValue(true), []);
894
- const setFalse = useCallback(() => setValue(false), []);
895
- const toggle = useCallback(() => setValue((_) => !_), []);
896
- return [value, { setValue, setTrue, setFalse, toggle }];
818
+ const blockRouterEventBus = new EventBus();
819
+
820
+ function useBlockIntersectionObserver(block) {
821
+ const observerCallback = useCallback((entries) => {
822
+ if (!block || !entries?.length) {
823
+ return;
824
+ }
825
+ const intersection = entries[entries.length - 1];
826
+ blockRouterEventBus.fire('intersection', { block, intersection });
827
+ }, [block]);
828
+ return useIntersectionObserver(observerCallback, { sensitivity: 1 });
829
+ }
830
+
831
+ const blockStyles = {
832
+ primary: 'bg-white text-primary-text',
833
+ secondary: 'bg-primary-main text-white',
834
+ gray: 'bg-main-divider text-primary-text',
835
+ transparent: 'bg-transparent text-primary-text',
836
+ '': '',
837
+ };
838
+ const BlockWrapper = JSX(({ className = '', version = 'primary', block, tag = 'section', role, isTheme = true, extraProps = {}, children, }) => {
839
+ const Tag = tag;
840
+ const ref = useBlockIntersectionObserver(block);
841
+ const [isHidden, setHidden] = useState(false);
842
+ useEffect(() => defaultEventBus.subscribe('tab', (event) => {
843
+ setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
844
+ }), [block]);
845
+ return (jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, ...extraProps, children: children }));
846
+ });
847
+ const groupStyle = (isGroup) => (isGroup ? 'group' : '');
848
+
849
+ 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(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
850
+
851
+ function assertUnreachable(x) {
852
+ throw new Error(x);
897
853
  }
898
854
 
855
+ function useDialogHandlers({ onOpen, onClose } = {}) {
856
+ useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
857
+ switch (action.type) {
858
+ case 'open':
859
+ onOpen && onOpen(action);
860
+ break;
861
+ case 'close':
862
+ onClose && onClose();
863
+ break;
864
+ default:
865
+ assertUnreachable(action);
866
+ }
867
+ }), [onOpen, onClose]);
868
+ }
869
+
870
+ const useDebouncedEffect = (effect, deps, delay = 300) => useEffect(() => {
871
+ const timerId = setTimeout(effect, delay);
872
+ return () => {
873
+ clearTimeout(timerId);
874
+ };
875
+ }, deps);
876
+
899
877
  const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
900
878
  const desc = (cmp) => (a, b) => -cmp(a, b);
901
879
 
@@ -1020,37 +998,27 @@
1020
998
  const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
1021
999
 
1022
1000
  const SEARCH_INDEX_FILENAME = 'search.index.json';
1023
- const useSearch = (basePathList = ['/']) => {
1024
- const [query, setQuery] = useState('');
1025
- const [wasQueryFocused, setWasQueryFocused] = useState(false);
1026
- const handleFocus = useCallback(() => {
1027
- setWasQueryFocused(true);
1028
- }, []);
1029
- const key = useMemo(() => basePathList.map((_) => (wasQueryFocused ? _ : null)), // Load search index on input focus
1030
- [wasQueryFocused, ...basePathList]);
1001
+ const useSearch = ({ basePathList = ['/'], initialQuery = '', wasOpened, }) => {
1002
+ const [query, setQuery] = useState(initialQuery || '');
1003
+ useEffect(() => {
1004
+ if (initialQuery !== undefined && initialQuery !== null) {
1005
+ setQuery(initialQuery);
1006
+ }
1007
+ }, [initialQuery]);
1008
+ const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
1009
+ [wasOpened, ...basePathList]);
1031
1010
  const { data } = useAsyncData(key, fetchSearchIndex);
1032
1011
  const [result, setResult] = useState(null);
1033
- useEffect(() => {
1034
- const timerId = setTimeout(() => {
1035
- if (data) {
1036
- setResult(data.map(search(query)));
1037
- }
1038
- }, 300);
1039
- return () => {
1040
- clearTimeout(timerId);
1041
- };
1012
+ useDebouncedEffect(() => {
1013
+ if (data) {
1014
+ setResult(data.map(search(query)));
1015
+ }
1042
1016
  }, [data, query]);
1043
- return [result, { value: query, onChange: setQuery, onFocus: handleFocus }];
1017
+ return [result, { value: query, onChange: setQuery }];
1044
1018
  };
1045
1019
  const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
1046
1020
 
1047
- 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(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
1048
-
1049
- const Dialog = JSX(({ className, head, children, onClose }) => {
1050
- const handleClose = useCallback((ev) => {
1051
- ev.preventDefault();
1052
- onClose && onClose();
1053
- }, [onClose]);
1021
+ const Dialog = JSX(({ className, isOpened, head, children, onClose }) => {
1054
1022
  useEffect(() => {
1055
1023
  const handleEscape = ({ key }) => {
1056
1024
  if (key === 'Escape') {
@@ -1062,9 +1030,47 @@
1062
1030
  globalThis.document?.removeEventListener('keydown', handleEscape);
1063
1031
  };
1064
1032
  }, [onClose]);
1065
- 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] }) }));
1033
+ 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;
1066
1034
  });
1067
1035
 
1036
+ function useBool(defaultValue = false) {
1037
+ const [value, setValue] = useState(defaultValue);
1038
+ const setTrue = useCallback(() => setValue(true), []);
1039
+ const setFalse = useCallback(() => setValue(false), []);
1040
+ const toggle = useCallback(() => setValue((_) => !_), []);
1041
+ return [value, { setValue, setTrue, setFalse, toggle }];
1042
+ }
1043
+
1044
+ function useDialogProps(id) {
1045
+ const [isOpened, { setTrue: open, setFalse: close }] = useBool();
1046
+ const [params, setParams] = useState({ id });
1047
+ const wasOpened = useRef(isOpened);
1048
+ wasOpened.current ||= isOpened;
1049
+ const handleOpen = useCallback((_) => {
1050
+ if (_.id === id) {
1051
+ setParams(_);
1052
+ open();
1053
+ }
1054
+ else {
1055
+ close();
1056
+ }
1057
+ }, [id]);
1058
+ useDialogHandlers({
1059
+ onOpen: handleOpen,
1060
+ onClose: close,
1061
+ });
1062
+ const handleCloseAsEventSource = useCallback(() => {
1063
+ close();
1064
+ defaultEventBus.fire('dialog', { type: 'close' });
1065
+ }, []);
1066
+ return {
1067
+ ...params,
1068
+ isOpened,
1069
+ wasOpened: wasOpened.current,
1070
+ onClose: handleCloseAsEventSource,
1071
+ };
1072
+ }
1073
+
1068
1074
  const Sitemap = JSX(({ className, topItems }) => {
1069
1075
  const link = useLink(true);
1070
1076
  return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
@@ -1080,43 +1086,30 @@
1080
1086
  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}` }));
1081
1087
  });
1082
1088
 
1083
- const SearchBarInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
1089
+ const SearchInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
1084
1090
  const handleChange = useCallback((ev) => {
1085
1091
  onChange && onChange(ev.target?.value || '');
1086
1092
  }, [onChange]);
1087
1093
  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(Img, { 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 })] }));
1088
1094
  });
1089
1095
 
1090
- const MIN_QUERY_LEN = 3;
1091
- const SearchBarInner = JSX(({ className, isMobile, topItems }) => {
1096
+ const SEARCH_DIALOG_ID = 'search';
1097
+ JSX(({ topItems }) => {
1098
+ const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
1092
1099
  const basePathList = topItems?.map((_) => _.href || '/');
1093
- const [searchResult, searchInputProps] = useSearch(basePathList);
1094
- const { value, onChange, onFocus } = searchInputProps;
1100
+ const [searchResult, searchInputProps] = useSearch({
1101
+ basePathList,
1102
+ initialQuery: dialogProps.message,
1103
+ wasOpened: dialogProps.wasOpened,
1104
+ });
1095
1105
  const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
1096
1106
  useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
1097
- const [isSearchDialogOpen, { setTrue: openSearchDialog, setFalse: hideSearchDialog }] = useBool();
1098
- const handleInitialInputChange = useCallback((_) => {
1099
- onChange(_);
1100
- if (isQueryLongEnough(_)) {
1101
- openSearchDialog();
1102
- }
1103
- }, [onChange, isQueryLongEnough]);
1104
- const handleInitialInputFocus = useCallback(() => {
1105
- onFocus();
1106
- if (isQueryLongEnough(value)) {
1107
- openSearchDialog();
1108
- }
1109
- }, [value, onFocus]);
1110
- 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) => {
1111
- e.preventDefault();
1112
- onChange('');
1113
- } })) : null, isSearchDialogOpen ? (jsx(Dialog, { head: jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: jsx(Sitemap, { topItems: searchItems }) })) : null] }));
1107
+ return (jsx(Dialog, { ...dialogProps, head: jsx(SearchInput, { className: "my-5", autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
1114
1108
  });
1115
- const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
1116
1109
  const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
1117
1110
  ? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
1118
1111
  ..._,
1119
- items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
1112
+ items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
1120
1113
  }))
1121
1114
  : [];
1122
1115
  // Temp
@@ -1128,6 +1121,22 @@
1128
1121
  }
1129
1122
  }
1130
1123
 
1124
+ const MIN_QUERY_LEN = 3;
1125
+ const SearchBarInner = JSX(({ className, isMobile }) => {
1126
+ const [value, setValue] = useState('');
1127
+ const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
1128
+ useDialogHandlers({ onClose: resetQueryOnDialogClose });
1129
+ const { open } = useDialog(SEARCH_DIALOG_ID);
1130
+ const handleInitialInputChange = useCallback((_) => {
1131
+ setValue(_);
1132
+ if (isQueryLongEnough(_)) {
1133
+ open(_);
1134
+ }
1135
+ }, []);
1136
+ 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] }));
1137
+ });
1138
+ const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
1139
+
1131
1140
  const SearchBar = JSX((props) => (jsx(SearchBarInner, { ...props, isMobile: true })));
1132
1141
 
1133
1142
  const getIconWithVersion = (icon, version = 'primary') => ({
@@ -1174,13 +1183,48 @@
1174
1183
  return (jsx("div", { className: `col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${className}`, children: href ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "flex justify-center align-middle rounded-md bg-primary-main w-12 h-12", children: jsx(Logo, { className: "w-8", bgColor: "transparent", showTitle: true }) }), jsxs("a", { href: href, target: "_blank", className: "flex flex-col justify-center pl-3", children: [jsx("div", { className: "text-s font-medium mb-[3px]", children: title }), jsx("div", { className: "text-s text-secondary-text", children: description })] })] })) : null }));
1175
1184
  });
1176
1185
 
1177
- function getParentBlockDef(options) {
1178
- return options?.parent || {};
1186
+ const DEFAULT_SLOT_NAME = null;
1187
+
1188
+ const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1189
+
1190
+ const DEFAULT_ANCESTORS = [];
1191
+ const defaultStyle = 'col-span-12';
1192
+ function renderBlock(block, options) {
1193
+ const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', extraProps = {}, } = options;
1194
+ const { type } = block;
1195
+ if (!(type && type in blocksRegistry)) {
1196
+ console.warn(`No block with "${type}" is registered`);
1197
+ }
1198
+ const BlockComponent = type && blocksRegistry[type];
1199
+ return blockDecorator({
1200
+ blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
1201
+ className, block.style || defaultStyle),
1202
+ block,
1203
+ ancestors,
1204
+ // Adjusted by decorator block and blockClassName
1205
+ render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
1206
+ const { content } = adjustedBlock;
1207
+ return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
1208
+ },
1209
+ }, key);
1179
1210
  }
1180
1211
 
1181
- function getParentBlockContent(options, defaultContent) {
1182
- const { content } = getParentBlockDef(options);
1183
- return content || defaultContent;
1212
+ const EMPTY_ANCESTORS = [];
1213
+ const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
1214
+ ...options,
1215
+ key: `${key ? key : _.type}-${j}`,
1216
+ ancestors: options.parent
1217
+ ? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
1218
+ : ancestors,
1219
+ }));
1220
+
1221
+ function renderChildren({ children, block, options, renderProps, }) {
1222
+ if (children) {
1223
+ return children;
1224
+ }
1225
+ return block && options
1226
+ ? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
1227
+ : null;
1184
1228
  }
1185
1229
 
1186
1230
  const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
@@ -1217,11 +1261,10 @@
1217
1261
  const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
1218
1262
 
1219
1263
  const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => {
1220
- const { bordered } = getParentBlockContent(rest.options, {});
1221
- return (jsx(BlockWrapper, { className: style('border-b border-solid border-main-divider w-full', bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0', className), tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) }));
1264
+ return (jsx(BlockWrapper, { className: style('border-b border-solid border-main-divider w-full', className), tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) }));
1222
1265
  });
1223
1266
  RollupItem.childrenTypes = {
1224
- exclude: ['RollupItem', 'Accordion', 'OtherProducts'],
1267
+ exclude: ['RollupItem'],
1225
1268
  };
1226
1269
  const renderFoldButton = ({ version, label: defaultLabel, isUnfolded, onToggle, className = '', primaryIcon, }) => {
1227
1270
  const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
@@ -1325,7 +1368,7 @@
1325
1368
  const fallback = rest.options?.page?.fallback;
1326
1369
  const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
1327
1370
  const { documents, relatedEnterprises, contacts, socialMedia, horizontalNavigationTitle } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
1328
- return (jsxs(BlockWrapper, { tag: "footer", className: `px-4 py-[26px] ${className}`, ...rest, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, hasButton: true }), jsx("div", { className: "m-0 p-0", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }), jsx("div", { children: sitemap?.dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android", ...rest }), jsx(SearchBar, { className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
1371
+ return (jsxs(BlockWrapper, { tag: "footer", className: `px-4 py-[26px] ${className}`, ...rest, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, hasButton: true }), jsx("div", { className: "m-0 p-0", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }), jsx("div", { className: "mt-4", children: sitemap?.dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android", ...rest }), jsx(SearchBar, { className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
1329
1372
  });
1330
1373
  const renderSubMenuItem = (menu, i) => {
1331
1374
  const { icon, href, text } = menu;
@@ -1371,7 +1414,7 @@
1371
1414
  }
1372
1415
 
1373
1416
  const REGION_URL = '/api/v1/region';
1374
- function useLocation(defaultLocation) {
1417
+ function useLocation(defaultLocation = 'Москва') {
1375
1418
  const currentLocation = getLocalStorageLocation();
1376
1419
  const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
1377
1420
  const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
@@ -1383,7 +1426,7 @@
1383
1426
  const onChangeLocation = useCallback((region) => {
1384
1427
  globalThis.localStorage?.setItem('location', JSON.stringify({ manual: true, region }));
1385
1428
  setLocation(region);
1386
- }, [setLocation]);
1429
+ }, []);
1387
1430
  return [location, onChangeLocation];
1388
1431
  }
1389
1432
  const getLocalStorageLocation = () => {
@@ -1423,6 +1466,8 @@
1423
1466
  return (jsxs(BlockWrapper, { tag: "header", version: version, ...rest, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: handleBurgerMenuShow, bgColor: bgColor, logo: logo }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-12", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", active: _ === activeSubItem, ..._ }, String(i)))) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { onClick: handleBurgerMenuShow, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx("div", { className: "list-none m-0 p-0", children: topItems?.map((item, i) => (jsx(RollupItem, { label: item.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }) })) : null] }));
1424
1467
  });
1425
1468
 
1469
+ const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
1470
+
1426
1471
  const headlineVersionStyles = {
1427
1472
  XXL: {
1428
1473
  wrapper: 'gap-[18px]',
@@ -1614,10 +1659,6 @@
1614
1659
  return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html } });
1615
1660
  });
1616
1661
 
1617
- function assertUnreachable(x) {
1618
- throw new Error(x);
1619
- }
1620
-
1621
1662
  const checkCanRenderIcon = (icon) => Boolean(icon?.icon || icon?.src);
1622
1663
 
1623
1664
  const STEPS_BLOCK_STYLE = {
@@ -1744,12 +1785,9 @@
1744
1785
  const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
1745
1786
  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 } }) }));
1746
1787
  });
1747
- VerticalLayout.childrenTypes = {
1748
- exclude: ['Accordion', 'OtherProducts'],
1749
- };
1788
+ VerticalLayout.childrenTypes = [];
1750
1789
 
1751
1790
  const Blocks = {
1752
- Accordion,
1753
1791
  ComparisonTable,
1754
1792
  Footer,
1755
1793
  Header,
@@ -1758,11 +1796,11 @@
1758
1796
  LinkList,
1759
1797
  MobileAppTile,
1760
1798
  ProductBlock,
1761
- RollupItem,
1762
1799
  StepsBlock,
1763
1800
  TariffsTable,
1764
1801
  TextBlock,
1765
1802
  Placeholder,
1803
+ RollupItem,
1766
1804
  VerticalLayout,
1767
1805
  };
1768
1806
 
@@ -1865,7 +1903,6 @@
1865
1903
  const ContentPage = JSX((props) => {
1866
1904
  const { className = '', blocksRegistry, blockDecorator, data = {} } = props;
1867
1905
  const { style: pageStyle, blocks, slots, likeControl, colorPalette = 'pc' } = data;
1868
- const [overflowStyle, setOverflowStyle] = useState('');
1869
1906
  const options = {
1870
1907
  key: '',
1871
1908
  page: data,
@@ -1874,10 +1911,12 @@
1874
1911
  parent: data,
1875
1912
  };
1876
1913
  useBlockRouterProvider();
1877
- useEffect(() => defaultEventBus.subscribe('setPageOverflowHidden', (isHidden) => {
1878
- setOverflowStyle(isHidden ? 'overflow-hidden h-screen' : '');
1879
- }), []);
1880
- 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, {
1914
+ const [isSomeDialogOpened, { setTrue: setSomeDialogOpened, setFalse: resetSomeDialogOpened }] = useBool();
1915
+ useDialogHandlers({
1916
+ onOpen: setSomeDialogOpened,
1917
+ onClose: resetSomeDialogOpened,
1918
+ });
1919
+ 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, {
1881
1920
  ...options,
1882
1921
  slotName: 'header',
1883
1922
  }) })) : null, jsxs("div", { className: "container grid grid-cols-12 gap-1", children: [renderBlocksList(blocks, options), slots?.footer
@@ -1897,7 +1936,7 @@
1897
1936
  return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
1898
1937
  }
1899
1938
 
1900
- const packageVersion = "0.9.3";
1939
+ const packageVersion = "0.9.4";
1901
1940
 
1902
1941
  exports.Blocks = Blocks;
1903
1942
  exports.ContentPage = ContentPage;