@redneckz/wildless-cms-uni-blocks 0.13.9 → 0.13.10

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 (459) hide show
  1. package/bundle/ProjectSettings.d.ts +4 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +68 -38
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Header/HeaderSubMenu.d.ts +5 -1
  6. package/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  7. package/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  8. package/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  9. package/bundle/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  10. package/bundle/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
  11. package/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  12. package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  13. package/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  14. package/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  15. package/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  16. package/bundle/hooks/useActiveRoute.d.ts +2 -0
  17. package/bundle/hooks/useSWRResource.d.ts +1 -1
  18. package/bundle/icons/IconName.d.ts +10 -6
  19. package/bundle/services/sitemap/SitemapData.d.ts +5 -1
  20. package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  21. package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  22. package/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  23. package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  24. package/cosmos-static/icons/BurgerIcon.svg +1 -1
  25. package/cosmos-static/icons/ChartIcon.svg +1 -0
  26. package/cosmos-static/icons/MapOpenedIcon.svg +1 -0
  27. package/dist/ProjectSettings.d.ts +4 -0
  28. package/dist/ProjectSettings.js +6 -0
  29. package/dist/ProjectSettings.js.map +1 -1
  30. package/dist/components/ApplicationForm/ResponseNotification.js +1 -1
  31. package/dist/components/Blocks.js +2 -0
  32. package/dist/components/Blocks.js.map +1 -1
  33. package/dist/components/Blocks.mobile.js +2 -0
  34. package/dist/components/Blocks.mobile.js.map +1 -1
  35. package/dist/components/ContentPage/ContentPage.js +3 -2
  36. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  37. package/dist/components/ContentPage/ContentPage.page.json +37 -0
  38. package/dist/components/ContentPage/useContentPageData.js +1 -1
  39. package/dist/components/ContentPage/useContentPageData.js.map +1 -1
  40. package/dist/components/Header/Header.js +6 -5
  41. package/dist/components/Header/Header.js.map +1 -1
  42. package/dist/components/Header/HeaderSubMenu.d.ts +5 -1
  43. package/dist/components/Header/HeaderSubMenu.js +8 -7
  44. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  45. package/dist/components/PictureText/PictureText.js +1 -1
  46. package/dist/components/PictureText/PictureText.js.map +1 -1
  47. package/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  48. package/dist/components/StickyBottomMenu/ActiveSubMenu.js +9 -0
  49. package/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  50. package/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  51. package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +12 -0
  52. package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  53. package/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  54. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +38 -0
  55. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  56. package/dist/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  57. package/dist/components/StickyBottomMenu/StickyBottomMenu.js +6 -0
  58. package/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  59. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
  60. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +30 -0
  61. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -0
  62. package/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  63. package/dist/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  64. package/dist/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  65. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  66. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  67. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  68. package/dist/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  69. package/dist/components/StickyBottomMenu/TopItemMobile.js +12 -0
  70. package/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  71. package/dist/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  72. package/dist/components/StickyBottomMenu/renderMenuItems.js +13 -0
  73. package/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  74. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  75. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +26 -0
  76. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  77. package/dist/hooks/useActiveRoute.d.ts +2 -0
  78. package/dist/hooks/useActiveRoute.js +11 -0
  79. package/dist/hooks/useActiveRoute.js.map +1 -0
  80. package/dist/hooks/useSWRResource.d.ts +1 -1
  81. package/dist/hooks/useSWRResource.js +3 -2
  82. package/dist/hooks/useSWRResource.js.map +1 -1
  83. package/dist/icons/IconName.d.ts +10 -6
  84. package/dist/icons/IconName.js +9 -5
  85. package/dist/icons/IconName.js.map +1 -1
  86. package/dist/services/sitemap/SitemapData.d.ts +5 -1
  87. package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  88. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  89. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  90. package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  91. package/dist/ui-kit/BaseTile/BaseTile.js +8 -5
  92. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  93. package/dist/ui-kit/DialogManager/Dialog.js +1 -1
  94. package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  95. package/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  96. package/dist/ui-kit/DialogManager/isDialogOpen.js +5 -0
  97. package/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  98. package/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
  99. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  100. package/dist/ui-kit/SearchBar/SearchBar.js +2 -1
  101. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  102. package/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
  103. package/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  104. package/dist/ui-kit/Sitemap/Sitemap.js +3 -1
  105. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  106. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  107. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  108. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  109. package/dist/wlc.json +1 -0
  110. package/lib/ProjectSettings.d.ts +4 -0
  111. package/lib/ProjectSettings.js +6 -0
  112. package/lib/ProjectSettings.js.map +1 -1
  113. package/lib/common.css +1 -1
  114. package/lib/components/ApplicationForm/ResponseNotification.js +1 -1
  115. package/lib/components/Blocks.js +2 -0
  116. package/lib/components/Blocks.js.map +1 -1
  117. package/lib/components/Blocks.mobile.js +2 -0
  118. package/lib/components/Blocks.mobile.js.map +1 -1
  119. package/lib/components/ContentPage/ContentPage.js +3 -2
  120. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  121. package/lib/components/ContentPage/ContentPage.page.json +37 -0
  122. package/lib/components/ContentPage/useContentPageData.js +1 -1
  123. package/lib/components/ContentPage/useContentPageData.js.map +1 -1
  124. package/lib/components/Header/Header.js +6 -5
  125. package/lib/components/Header/Header.js.map +1 -1
  126. package/lib/components/Header/HeaderSubMenu.d.ts +5 -1
  127. package/lib/components/Header/HeaderSubMenu.js +8 -7
  128. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  129. package/lib/components/PictureText/PictureText.js +1 -1
  130. package/lib/components/PictureText/PictureText.js.map +1 -1
  131. package/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  132. package/lib/components/StickyBottomMenu/ActiveSubMenu.js +7 -0
  133. package/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  134. package/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  135. package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +10 -0
  136. package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  137. package/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  138. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +36 -0
  139. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  140. package/lib/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  141. package/lib/components/StickyBottomMenu/StickyBottomMenu.fixture.d.ts +8 -0
  142. package/lib/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.d.ts +6 -0
  143. package/lib/components/StickyBottomMenu/StickyBottomMenu.js +4 -0
  144. package/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  145. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
  146. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +28 -0
  147. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -0
  148. package/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  149. package/lib/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  150. package/lib/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  151. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  152. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  153. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  154. package/lib/components/StickyBottomMenu/TopItemMobile.d.ts +8 -0
  155. package/lib/components/StickyBottomMenu/TopItemMobile.js +9 -0
  156. package/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  157. package/lib/components/StickyBottomMenu/renderMenuItems.d.ts +2 -0
  158. package/lib/components/StickyBottomMenu/renderMenuItems.js +10 -0
  159. package/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  160. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  161. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +23 -0
  162. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  163. package/lib/hooks/useActiveRoute.d.ts +2 -0
  164. package/lib/hooks/useActiveRoute.js +8 -0
  165. package/lib/hooks/useActiveRoute.js.map +1 -0
  166. package/lib/hooks/useSWRResource.d.ts +1 -1
  167. package/lib/hooks/useSWRResource.js +3 -2
  168. package/lib/hooks/useSWRResource.js.map +1 -1
  169. package/lib/icons/IconName.d.ts +10 -6
  170. package/lib/icons/IconName.js +9 -5
  171. package/lib/icons/IconName.js.map +1 -1
  172. package/lib/services/sitemap/SitemapData.d.ts +5 -1
  173. package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  174. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  175. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  176. package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  177. package/lib/ui-kit/BaseTile/BaseTile.js +8 -5
  178. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  179. package/lib/ui-kit/DialogManager/Dialog.js +1 -1
  180. package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  181. package/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  182. package/lib/ui-kit/DialogManager/isDialogOpen.js +2 -0
  183. package/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  184. package/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
  185. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  186. package/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +0 -1
  187. package/lib/ui-kit/LocationDialog/renderRegion.d.ts +0 -1
  188. package/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +0 -1
  189. package/lib/ui-kit/SearchBar/SearchBar.js +2 -1
  190. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  191. package/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
  192. package/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  193. package/lib/ui-kit/Sitemap/Sitemap.js +3 -1
  194. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  195. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  196. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  197. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  198. package/lib/wlc.json +1 -0
  199. package/mobile/bundle/ProjectSettings.d.ts +4 -0
  200. package/mobile/bundle/bundle.umd.js +446 -68
  201. package/mobile/bundle/bundle.umd.min.js +1 -1
  202. package/mobile/bundle/components/Header/HeaderSubMenu.d.ts +5 -1
  203. package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  204. package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  205. package/mobile/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  206. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  207. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  208. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  209. package/mobile/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  210. package/mobile/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  211. package/mobile/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  212. package/mobile/bundle/hooks/useActiveRoute.d.ts +2 -0
  213. package/mobile/bundle/hooks/useSWRResource.d.ts +1 -1
  214. package/mobile/bundle/icons/IconName.d.ts +10 -6
  215. package/mobile/bundle/services/sitemap/SitemapData.d.ts +5 -1
  216. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  217. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  218. package/mobile/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  219. package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  220. package/mobile/dist/ProjectSettings.d.ts +4 -0
  221. package/mobile/dist/ProjectSettings.js +6 -0
  222. package/mobile/dist/ProjectSettings.js.map +1 -1
  223. package/mobile/dist/components/ApplicationForm/ResponseNotification.js +1 -1
  224. package/mobile/dist/components/Blocks.js +2 -0
  225. package/mobile/dist/components/Blocks.js.map +1 -1
  226. package/mobile/dist/components/ContentPage/ContentPage.js +3 -2
  227. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  228. package/mobile/dist/components/ContentPage/ContentPage.page.json +37 -0
  229. package/mobile/dist/components/ContentPage/useContentPageData.js +1 -1
  230. package/mobile/dist/components/ContentPage/useContentPageData.js.map +1 -1
  231. package/mobile/dist/components/Header/HeaderSubMenu.d.ts +5 -1
  232. package/mobile/dist/components/Header/HeaderSubMenu.js +8 -7
  233. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  234. package/mobile/dist/components/PictureText/PictureText.js +1 -1
  235. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  236. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  237. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js +9 -0
  238. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  239. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  240. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +12 -0
  241. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  242. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  243. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +38 -0
  244. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  245. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  246. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +30 -0
  247. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  248. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  249. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  250. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  251. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  252. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  253. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  254. package/mobile/dist/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  255. package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js +12 -0
  256. package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  257. package/mobile/dist/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  258. package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js +13 -0
  259. package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  260. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  261. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +26 -0
  262. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  263. package/mobile/dist/hooks/useActiveRoute.d.ts +2 -0
  264. package/mobile/dist/hooks/useActiveRoute.js +11 -0
  265. package/mobile/dist/hooks/useActiveRoute.js.map +1 -0
  266. package/mobile/dist/hooks/useSWRResource.d.ts +1 -1
  267. package/mobile/dist/hooks/useSWRResource.js +3 -2
  268. package/mobile/dist/hooks/useSWRResource.js.map +1 -1
  269. package/mobile/dist/icons/IconName.d.ts +10 -6
  270. package/mobile/dist/icons/IconName.js +9 -5
  271. package/mobile/dist/icons/IconName.js.map +1 -1
  272. package/mobile/dist/services/sitemap/SitemapData.d.ts +5 -1
  273. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  274. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  275. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  276. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  277. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +8 -5
  278. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  279. package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -1
  280. package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  281. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  282. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js +5 -0
  283. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  284. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
  285. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  286. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -1
  287. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  288. package/mobile/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
  289. package/mobile/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  290. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +3 -1
  291. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  292. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  293. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  294. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  295. package/mobile/dist/wlc.json +1 -0
  296. package/mobile/lib/ProjectSettings.d.ts +4 -0
  297. package/mobile/lib/ProjectSettings.js +6 -0
  298. package/mobile/lib/ProjectSettings.js.map +1 -1
  299. package/mobile/lib/common.css +1 -1
  300. package/mobile/lib/components/ApplicationForm/ResponseNotification.js +1 -1
  301. package/mobile/lib/components/Blocks.js +2 -0
  302. package/mobile/lib/components/Blocks.js.map +1 -1
  303. package/mobile/lib/components/ContentPage/ContentPage.js +3 -2
  304. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  305. package/mobile/lib/components/ContentPage/ContentPage.page.json +37 -0
  306. package/mobile/lib/components/ContentPage/useContentPageData.js +1 -1
  307. package/mobile/lib/components/ContentPage/useContentPageData.js.map +1 -1
  308. package/mobile/lib/components/Header/HeaderSubMenu.d.ts +5 -1
  309. package/mobile/lib/components/Header/HeaderSubMenu.js +8 -7
  310. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  311. package/mobile/lib/components/PictureText/PictureText.js +1 -1
  312. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  313. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  314. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js +7 -0
  315. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  316. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  317. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +10 -0
  318. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  319. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  320. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +36 -0
  321. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  322. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  323. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +28 -0
  324. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  325. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  326. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  327. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  328. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  329. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  330. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  331. package/mobile/lib/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  332. package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js +9 -0
  333. package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  334. package/mobile/lib/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  335. package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js +10 -0
  336. package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  337. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  338. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +23 -0
  339. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  340. package/mobile/lib/hooks/useActiveRoute.d.ts +2 -0
  341. package/mobile/lib/hooks/useActiveRoute.js +8 -0
  342. package/mobile/lib/hooks/useActiveRoute.js.map +1 -0
  343. package/mobile/lib/hooks/useSWRResource.d.ts +1 -1
  344. package/mobile/lib/hooks/useSWRResource.js +3 -2
  345. package/mobile/lib/hooks/useSWRResource.js.map +1 -1
  346. package/mobile/lib/icons/IconName.d.ts +10 -6
  347. package/mobile/lib/icons/IconName.js +9 -5
  348. package/mobile/lib/icons/IconName.js.map +1 -1
  349. package/mobile/lib/services/sitemap/SitemapData.d.ts +5 -1
  350. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  351. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  352. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  353. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  354. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +8 -5
  355. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  356. package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -1
  357. package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  358. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  359. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js +2 -0
  360. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  361. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
  362. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  363. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -1
  364. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  365. package/mobile/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
  366. package/mobile/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  367. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +3 -1
  368. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  369. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  370. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  371. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  372. package/mobile/lib/wlc.json +1 -0
  373. package/mobile/src/ProjectSettings.ts +8 -0
  374. package/mobile/src/components/ApplicationForm/ResponseNotification.tsx +2 -2
  375. package/mobile/src/components/Blocks.ts +2 -0
  376. package/mobile/src/components/ContentPage/ContentPage.page.json +37 -0
  377. package/mobile/src/components/ContentPage/ContentPage.tsx +3 -1
  378. package/mobile/src/components/ContentPage/useContentPageData.ts +1 -1
  379. package/mobile/src/components/Header/HeaderSubMenu.tsx +16 -8
  380. package/mobile/src/components/PictureText/PictureText.tsx +1 -1
  381. package/mobile/src/components/StickyBottomMenu/ActiveSubMenu.tsx +16 -0
  382. package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +32 -0
  383. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +102 -0
  384. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.example.json +35 -0
  385. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +43 -0
  386. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.ui.json +11 -0
  387. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +24 -0
  388. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +10 -0
  389. package/mobile/src/components/StickyBottomMenu/TopItemMobile.tsx +32 -0
  390. package/mobile/src/components/StickyBottomMenu/renderMenuItems.tsx +32 -0
  391. package/mobile/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +34 -0
  392. package/mobile/src/hooks/useActiveRoute.ts +12 -0
  393. package/mobile/src/hooks/useSWRResource.ts +3 -1
  394. package/mobile/src/icons/BurgerIcon.svg +4 -4
  395. package/mobile/src/icons/ChartIcon.svg +7 -0
  396. package/mobile/src/icons/IconName.ts +5 -5
  397. package/mobile/src/icons/MapOpenedIcon.svg +5 -0
  398. package/mobile/src/services/sitemap/SitemapData.ts +5 -1
  399. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +17 -12
  400. package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
  401. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +16 -7
  402. package/mobile/src/ui-kit/DialogManager/Dialog.tsx +2 -2
  403. package/mobile/src/ui-kit/DialogManager/isDialogOpen.ts +4 -0
  404. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +1 -1
  405. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +3 -2
  406. package/mobile/src/ui-kit/SearchDialog/SearchInput.tsx +2 -2
  407. package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +5 -3
  408. package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +11 -0
  409. package/mobile/src/wlc.json +1 -0
  410. package/package.json +1 -1
  411. package/src/ProjectSettings.ts +8 -0
  412. package/src/components/ApplicationForm/ResponseNotification.tsx +2 -2
  413. package/src/components/Blocks.mobile.ts +2 -0
  414. package/src/components/Blocks.ts +2 -0
  415. package/src/components/ContentPage/ContentPage.page.json +37 -0
  416. package/src/components/ContentPage/ContentPage.tsx +3 -1
  417. package/src/components/ContentPage/useContentPageData.ts +1 -1
  418. package/src/components/Header/Header.tsx +12 -6
  419. package/src/components/Header/HeaderSubMenu.tsx +16 -8
  420. package/src/components/PictureText/PictureText.tsx +1 -1
  421. package/src/components/StickyBottomMenu/ActiveSubMenu.tsx +16 -0
  422. package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +32 -0
  423. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +102 -0
  424. package/src/components/StickyBottomMenu/StickyBottomMenu.example.json +35 -0
  425. package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.tsx +36 -0
  426. package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.tsx +36 -0
  427. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +43 -0
  428. package/src/components/StickyBottomMenu/StickyBottomMenu.tsx +4 -0
  429. package/src/components/StickyBottomMenu/StickyBottomMenu.ui.json +11 -0
  430. package/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +24 -0
  431. package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +10 -0
  432. package/src/components/StickyBottomMenu/TopItemMobile.tsx +32 -0
  433. package/src/components/StickyBottomMenu/renderMenuItems.tsx +32 -0
  434. package/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +34 -0
  435. package/src/hooks/useActiveRoute.ts +12 -0
  436. package/src/hooks/useSWRResource.ts +3 -1
  437. package/src/icons/BurgerIcon.svg +4 -4
  438. package/src/icons/ChartIcon.svg +7 -0
  439. package/src/icons/IconName.ts +6 -389
  440. package/src/icons/MapOpenedIcon.svg +5 -0
  441. package/src/services/sitemap/SitemapData.ts +5 -1
  442. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +17 -12
  443. package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
  444. package/src/ui-kit/BaseTile/BaseTile.tsx +16 -7
  445. package/src/ui-kit/DialogManager/Dialog.tsx +2 -2
  446. package/src/ui-kit/DialogManager/isDialogOpen.ts +4 -0
  447. package/src/ui-kit/LocationDialog/LocationDialog.tsx +1 -1
  448. package/src/ui-kit/SearchBar/SearchBar.tsx +3 -2
  449. package/src/ui-kit/SearchDialog/SearchInput.tsx +2 -2
  450. package/src/ui-kit/Sitemap/Sitemap.tsx +5 -3
  451. package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +11 -0
  452. package/src/wlc.json +1 -0
  453. package/bin/migration-scripts/0.13.9.js +0 -59
  454. /package/cosmos-static/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
  455. /package/cosmos-static/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
  456. /package/mobile/src/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
  457. /package/mobile/src/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
  458. /package/src/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
  459. /package/src/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
@@ -79,9 +79,15 @@
79
79
  get SITEMAP() {
80
80
  return this._.SITEMAP;
81
81
  }
82
+ get STICKY_MOBILE_MENU() {
83
+ return this._.STICKY_MOBILE_MENU;
84
+ }
82
85
  get FOOTER() {
83
86
  return this._.FOOTER;
84
87
  }
88
+ get PORTAL_DATA() {
89
+ return this._.PORTAL_DATA;
90
+ }
85
91
  get CHAT_BOT() {
86
92
  return this._.CHAT_BOT;
87
93
  }
@@ -510,10 +516,10 @@
510
516
  return await response.json();
511
517
  }
512
518
 
513
- const REGIONS_URL = '/api/v1/regions';
519
+ const REGIONS_URL$1 = '/api/v1/regions';
514
520
  const EMPTY_VALUE$3 = [];
515
521
  function useGetRegions() {
516
- const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
522
+ const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
517
523
  return data || EMPTY_VALUE$3;
518
524
  }
519
525
 
@@ -951,7 +957,7 @@
951
957
 
952
958
  const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "sm:flex sm:justify-between sm:gap-lg", children: [jsxs("div", { className: "sm:w-1/2 space-y-s", children: [jsx(InputControl, { className: "shrink-0 w-full", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "sm:w-1/2 space-y-s", children: [jsx(PhoneInputControl, { className: "shrink-0 w-full", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
953
959
 
954
- const renderRegion = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }));
960
+ const renderRegion$1 = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }));
955
961
 
956
962
  const initialFormState$3 = {
957
963
  name: '',
@@ -982,7 +988,7 @@
982
988
  }, [onSubmit]);
983
989
  const [, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
984
990
  const regions = useGetRegions();
985
- return (jsxs("form", { className: "container space-y-s", onSubmit: formProps.onSubmit, children: [renderRegion({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
991
+ return (jsxs("form", { className: "container space-y-s", onSubmit: formProps.onSubmit, children: [renderRegion$1({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
986
992
  });
987
993
 
988
994
  const BRANCHES_URL = '/api/v1/branches';
@@ -1139,8 +1145,9 @@
1139
1145
  });
1140
1146
 
1141
1147
  const EMPTY_VALUE$1 = {};
1142
- function useSWRResource(filename, fallback = EMPTY_VALUE$1) {
1143
- const { data } = useAsyncData(filename ? `/wcms-resources/${filename}.json` : null, fetchJSONUnsafe, { fallback });
1148
+ const DEFAULT_FOLDER_NAME = 'wcms-resources';
1149
+ function useSWRResource(filename, fallback = EMPTY_VALUE$1, folderName = DEFAULT_FOLDER_NAME) {
1150
+ const { data } = useAsyncData(filename ? `/${folderName}/${filename}.json` : null, fetchJSONUnsafe, { fallback });
1144
1151
  return data || EMPTY_VALUE$1;
1145
1152
  }
1146
1153
 
@@ -1262,7 +1269,7 @@
1262
1269
  const ResponseNotification = JSX(({ responseType }) => {
1263
1270
  const responseOK = responseType === 'OK';
1264
1271
  const backgroundColor = responseOK ? 'bg-ok' : 'bg-fail';
1265
- return (jsxs("div", { className: `flex items-center p-lg rounded-md space-x-m ${backgroundColor}`, children: [responseOK ? (jsx(Img, { image: { icon: 'ResponceOKIcon' }, width: "42", height: "42" })) : (jsx(Img, { image: { icon: 'ResponceFailIcon' }, width: "37", height: "34" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
1272
+ return (jsxs("div", { className: `flex items-center p-lg rounded-md space-x-m ${backgroundColor}`, children: [responseOK ? (jsx(Img, { image: { icon: 'ResponseOKIcon' }, width: "42", height: "42" })) : (jsx(Img, { image: { icon: 'ResponseFailIcon' }, width: "37", height: "34" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
1266
1273
  });
1267
1274
 
1268
1275
  const API = CorporateLeadAPI();
@@ -1540,11 +1547,17 @@
1540
1547
  scrollToStart(containerRef.current);
1541
1548
  }
1542
1549
  }, [itemCount, canScrollRight]);
1550
+ const scrollTo = useCallback((idx) => {
1551
+ if (containerRef?.current) {
1552
+ containerRef.current.children[idx]?.scrollIntoView();
1553
+ }
1554
+ }, [containerRef]);
1543
1555
  return [
1544
1556
  containerRef,
1545
1557
  {
1546
1558
  scrollLeft,
1547
1559
  scrollRight,
1560
+ scrollTo,
1548
1561
  canScrollLeft,
1549
1562
  canScrollRight,
1550
1563
  visibleIndicesRange: [minIndex, maxIndex],
@@ -2619,12 +2632,15 @@
2619
2632
  const renderItems = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: style('text-s', version === 'primary' ? '!text-secondary-text' : ''), items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, listItemSize: "S" })) : null;
2620
2633
 
2621
2634
  const imageAlignmentMap = {
2622
- start: 'self-start',
2623
- center: 'self-center',
2624
- end: 'self-end',
2635
+ start: '@xl:self-start',
2636
+ center: '@xl:self-center',
2637
+ end: '@xl:self-end',
2625
2638
  };
2626
- const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), backImage ? (jsx("div", { className: "mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4", children: backImage })) : null, buttons] }), renderImageContainer(rightImage, { className: '-order-1 @xl:order-1', imageAlign })] })] })));
2627
- const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('md:flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
2639
+ const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-col @xl:flex-row justify-around @xl:justify-between items-stretch gap-3xl", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), backImage ? (jsx("div", { className: "justify-center mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4", children: backImage })) : null, buttons] }), renderImageContainer(rightImage, {
2640
+ className: '-order-1 @xl:order-1',
2641
+ imageAlign,
2642
+ })] })] })));
2643
+ const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('md:flex-shrink-0 self-center', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
2628
2644
 
2629
2645
  const sum = (list = []) => list.reduce((a, b) => a + b, 0);
2630
2646
 
@@ -2668,12 +2684,14 @@
2668
2684
  const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
2669
2685
  const renderTag = (tag, key) => (jsx("div", { className: "p-xs border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
2670
2686
 
2671
- const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', isInsetTitle = true, benefitsVersion, isTabularBenefits, benefits, __html, items, isDotted = true, listItemSize, tags, buttons, image, imageOptions: { imageAlign = 'end', directionRight = true, isBackground } = {}, children, }) => {
2687
+ const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle = true, items, isDotted = true, listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = 'end', directionRight = true, isBackground } = {}, children, }) => {
2672
2688
  const img = image?.src ? jsx(Img, { image: image }) : null;
2673
2689
  const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true }));
2674
- return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isInsetTitle ? { insetTitle: headline } : { title: headline }), ...(isBackground ? { backImage: img } : leftOrRightImage(img, directionRight)), imageAlign: imageAlign, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col gap-xl", children: [jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: benefits }), __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, tags?.length ? jsx(Tags, { tags: tags }) : null] }) }));
2690
+ const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
2691
+ return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { insetTitle: headline } : { title: headline }), ...(isBackground ? { backImage: img } : leftOrRightImage(img, directionRight)), imageAlign: imageAlign, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col gap-xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, renderTags(tags)] }) }));
2675
2692
  });
2676
2693
  const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
2694
+ const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
2677
2695
 
2678
2696
  const CarouselProgramsCard = JSX(({ className, title, icon, list, href, target, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-3xl", ...rest, children: jsx(LinkWrapper, { className: "flex items-center h-full", href: href, target: target, children: jsx(BaseProductTile, { title: title, headlineVersion: "XS", image: icon, imageOptions: { directionRight: false, imageAlign: 'center' }, benefits: list?.map((_) => ({
2679
2697
  type: 'default',
@@ -2925,7 +2943,7 @@
2925
2943
  };
2926
2944
 
2927
2945
  const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
2928
- const REGION_URL = '/api/v1/region';
2946
+ const REGION_URL$1 = '/api/v1/region';
2929
2947
  function useFetchExchangeRateData() {
2930
2948
  const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
2931
2949
  return data || {};
@@ -2938,7 +2956,7 @@
2938
2956
  };
2939
2957
  const fetchRegion = async () => {
2940
2958
  try {
2941
- return await fetchJSONUnsafe(REGION_URL, { method: 'GET' });
2959
+ return await fetchJSONUnsafe(REGION_URL$1, { method: 'GET' });
2942
2960
  }
2943
2961
  catch (error) {
2944
2962
  console.log(error);
@@ -3227,7 +3245,7 @@
3227
3245
  const renderInsuranceSumMonth = (sum, monthLimit) => sum || monthLimit ? (jsxs("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl", children: [Number(sum) > 0 ? renderValueBlock('Страховая сумма:', sum) : null, Number(monthLimit) > 0 ? renderValueBlock('Ежемесячный лимит:', monthLimit) : null] })) : null;
3228
3246
  const renderValueBlock = (title, value = 0) => (jsxs("div", { className: "basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre", children: [jsx(Text, { font: "font-light", size: "text-l", children: title }), jsxs(Text, { size: "text-h6", color: "text-primary-text", children: [toLocalNumberFormat(2)(value), " \u20BD"] })] }));
3229
3247
 
3230
- const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-6xl", padding: padding, headlineVersion: headlineVersion, align: align, isInsetTitle: false, imageOptions: { directionRight: false, imageAlign: 'center', ...imageOptions }, ...rest, children: renderInsuranceSumMonth(Number(sum), Number(monthLimit)) }) })));
3248
+ const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-6xl", padding: padding, headlineVersion: headlineVersion, align: align, isFullWidthTitle: false, imageOptions: { directionRight: false, imageAlign: 'center', ...imageOptions }, ...rest, children: renderInsuranceSumMonth(Number(sum), Number(monthLimit)) }) })));
3231
3249
 
3232
3250
  const GOLDEN_RATIO = 1.618;
3233
3251
  const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx("figure", { className: "m-0 mt-xl min-w-[80%]", children: renderShimmer() })] })));
@@ -3700,6 +3718,413 @@
3700
3718
  return (jsx("div", { className: style(iconAreaSize, containerStyle, 'z-10 mr-s flex justify-center content-center'), children: jsx("span", { className: "flex self-center text-h4 text-secondary-text group-data-secondary:text-white", children: checkCanRenderIcon(step?.icon) ? (jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, width: iconSize, height: iconSize })) : (jsx("span", { children: i + 1 })) }) }));
3701
3719
  };
3702
3720
 
3721
+ const useLatestEvent = (eventBus, type, initialEvent) => {
3722
+ const [latestEvent, setLatestEvent] = useState(initialEvent || null);
3723
+ useEffect(() => eventBus.subscribe(type, (_) => setLatestEvent(_)), [eventBus, type]);
3724
+ const fireEvent = useCallback((_) => eventBus.fire(type, _), [eventBus, type]);
3725
+ return [latestEvent, fireEvent];
3726
+ };
3727
+
3728
+ const REGION_URL = '/api/v1/region';
3729
+ const LOCATION_STORAGE_KEY = 'location';
3730
+ function useLocation(defaultLocation = 'Москва') {
3731
+ const [currentLocation, fireCurrentLocation] = useLatestEvent(defaultEventBus, 'location', restoreLocation() ?? { name: defaultLocation });
3732
+ const selectCurrentLocation = useCallback((_) => {
3733
+ storeLocation(_);
3734
+ fireCurrentLocation(_);
3735
+ }, []);
3736
+ const { data } = useAsyncData(REGION_URL, fetchJSONUnsafe);
3737
+ useEffect(() => {
3738
+ if (data && !hasStoredLocation()) {
3739
+ fireCurrentLocation(data);
3740
+ }
3741
+ }, [data]);
3742
+ return [currentLocation ?? { name: defaultLocation }, selectCurrentLocation];
3743
+ }
3744
+ const hasStoredLocation = () => Boolean(globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY));
3745
+ const restoreLocation = () => {
3746
+ try {
3747
+ const data = globalThis.localStorage?.getItem(LOCATION_STORAGE_KEY);
3748
+ return data && JSON.parse(data);
3749
+ }
3750
+ catch (ex) {
3751
+ return null;
3752
+ }
3753
+ };
3754
+ const storeLocation = (_) => {
3755
+ try {
3756
+ globalThis.localStorage?.setItem(LOCATION_STORAGE_KEY, JSON.stringify(_));
3757
+ }
3758
+ catch (ex) {
3759
+ // Do nothing
3760
+ }
3761
+ };
3762
+
3763
+ const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
3764
+
3765
+ const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus }) => {
3766
+ const handleChange = useCallback((ev) => {
3767
+ onChange && onChange(ev.target?.value || '');
3768
+ }, [onChange]);
3769
+ return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: 'black' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 w-full px-10 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'), 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 })] }));
3770
+ });
3771
+
3772
+ const useDebouncedEffect = (effect, deps, delay = 300) => useEffect(() => {
3773
+ const timerId = setTimeout(effect, delay);
3774
+ return () => {
3775
+ clearTimeout(timerId);
3776
+ };
3777
+ }, deps);
3778
+
3779
+ const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
3780
+ const desc = (cmp) => (a, b) => -cmp(a, b);
3781
+
3782
+ function zip(firstCol, ...restCols) {
3783
+ return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
3784
+ }
3785
+
3786
+ const joinMaps = (aggregate, emptyVal) => (acc, map) => {
3787
+ for (const [key, b] of map) {
3788
+ acc.set(key, aggregate(acc.get(key) || emptyVal, b));
3789
+ }
3790
+ return acc;
3791
+ };
3792
+
3793
+ const MIN_TERM_LEN = 3;
3794
+ const tokenize = (text) => text
3795
+ .toLowerCase()
3796
+ .split(/[^0-9a-zа-я-]+/)
3797
+ .filter((token) => token.length >= MIN_TERM_LEN && !/[0-9a-z]/.test(token));
3798
+
3799
+ const textRank = (queryTokens) => (text) => {
3800
+ const textTokens = tokenize(text || '');
3801
+ return textTokens.length
3802
+ ? sum(queryTokens.map((qToken) => max(textTokens.map(jaroWinklerDistance(qToken)))))
3803
+ : 0;
3804
+ };
3805
+
3806
+ const JW_THRESHOLD = 0.8;
3807
+ const RANK_EPS = 0.001;
3808
+ const search = (query) => (searchIndex) => {
3809
+ const { corpus, dictionary } = searchIndex || {};
3810
+ if (!query || !corpus?.length || !dictionary || !Object.keys(dictionary).length) {
3811
+ return [];
3812
+ }
3813
+ const queryTokens = tokenize(query);
3814
+ if (!queryTokens.length) {
3815
+ return [];
3816
+ }
3817
+ const dictEntries = Object.entries(dictionary);
3818
+ const pagesRanking = queryTokens
3819
+ .map(computePagesRankingPerToken(dictEntries))
3820
+ .reduce(joinMaps((a, b) => a + b, 0), new Map());
3821
+ const relevantPages = [...pagesRanking.entries()]
3822
+ .filter(([, pageRank]) => pageRank >= (JW_THRESHOLD - RANK_EPS) * queryTokens.length) // Multiplication of query tokens
3823
+ .map(([pageIndex]) => corpus[pageIndex]);
3824
+ return sortResultsByRank(queryTokens)(relevantPages);
3825
+ };
3826
+ const computePagesRankingPerToken = (dictEntries) => (qToken) => dictEntries
3827
+ .map(([stem, pageIndices]) => [jaroWinklerDistance(qToken)(stem), pageIndices])
3828
+ .filter(([stemRank]) => stemRank >= JW_THRESHOLD)
3829
+ .map(([stemRank, pageIndices]) => fillMapWith(pageIndices, stemRank))
3830
+ .reduce(joinMaps(Math.max, 0), new Map());
3831
+ const sortResultsByRank = (queryTokens) => (results) => zip(results, results.map(({ title }) => title).map(textRank(queryTokens)))
3832
+ .sort(desc(compareBy(([, pageTitleRank]) => pageTitleRank)))
3833
+ .map(([corpusItem]) => corpusItem);
3834
+ const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
3835
+
3836
+ const SEARCH_INDEX_FILENAME = 'search.index.json';
3837
+ const DEFAULT_BASE_PATH = ['/'];
3838
+ const useSearch = ({ basePathList = DEFAULT_BASE_PATH, initialQuery = '', wasOpened, }) => {
3839
+ const [query, setQuery] = useState(initialQuery || '');
3840
+ useEffect(() => {
3841
+ if (initialQuery !== undefined && initialQuery !== null) {
3842
+ setQuery(initialQuery);
3843
+ }
3844
+ }, [initialQuery]);
3845
+ const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
3846
+ [wasOpened, basePathList]);
3847
+ const { data } = useAsyncData(key, fetchSearchIndex);
3848
+ const [result, setResult] = useState(null);
3849
+ useDebouncedEffect(() => {
3850
+ if (data) {
3851
+ setResult(data.map(search(query)));
3852
+ }
3853
+ }, [data, query]);
3854
+ return [result, { value: query, onChange: setQuery }];
3855
+ };
3856
+ const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
3857
+
3858
+ const Dialog = JSX(({ className, head, children, onClose }) => {
3859
+ const { close } = useDialogManager();
3860
+ const handleClose = useCallback(() => {
3861
+ close();
3862
+ onClose && onClose();
3863
+ }, [onClose]);
3864
+ return (jsxs("div", { className: style('relative min-h-full bg-white p-5', className), children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
3865
+ });
3866
+
3867
+ const Sitemap = JSX(({ className, topItems }) => {
3868
+ const link = useLink({ isRemote: true });
3869
+ return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
3870
+ });
3871
+ const renderColumn = (menuItem, index) => {
3872
+ const { text, items, href, target, onClick } = menuItem;
3873
+ return (jsxs("div", { className: "flex flex-col gap-s w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items
3874
+ ?.filter((_) => !_.displayArea || _.displayArea === 'Footer')
3875
+ .map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
3876
+ };
3877
+ const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
3878
+ const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
3879
+ const link = useLink({ isRemote: isAnotherPortal, basePath });
3880
+ const { href, target, onClick } = link(rest);
3881
+ return (jsx("a", { className: style('text-l font-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
3882
+ });
3883
+
3884
+ const SearchDialog = JSX(({ initialQuery }) => {
3885
+ const { topItems } = useSitemap();
3886
+ const basePathList = useMemo(() => topItems?.map((_) => _.href || '/'), [topItems]);
3887
+ const [searchResult, searchInputProps] = useSearch({
3888
+ basePathList,
3889
+ initialQuery,
3890
+ wasOpened: false,
3891
+ });
3892
+ const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
3893
+ useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
3894
+ return (jsx(Dialog, { head: jsx(SearchInput, { autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
3895
+ });
3896
+ const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
3897
+ ? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
3898
+ ..._,
3899
+ items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
3900
+ }))
3901
+ : [];
3902
+ // Temp
3903
+ function printSearchItems(topItems) {
3904
+ for (const _ of topItems.filter(({ items }) => items?.length)) {
3905
+ console.group(_.text);
3906
+ console.table(_.items, ['text', 'href']);
3907
+ console.groupEnd();
3908
+ }
3909
+ }
3910
+
3911
+ const useSearchDialog = () => {
3912
+ const { open, close } = useDialogManager();
3913
+ return {
3914
+ open: (props = {}, options = {}) => open(jsx(SearchDialog, { ...props }), options),
3915
+ close,
3916
+ };
3917
+ };
3918
+
3919
+ const MIN_QUERY_LEN = 3;
3920
+ const SearchBar$1 = JSX(({ className }) => {
3921
+ const [value, setValue] = useState('');
3922
+ const resetQueryOnDialogClose = useCallback(() => setValue(''), []);
3923
+ const { open } = useSearchDialog();
3924
+ const handleInitialInputChange = useCallback((_) => {
3925
+ setValue(_);
3926
+ if (isQueryLongEnough(_)) {
3927
+ open({ initialQuery: _ }, { onClose: resetQueryOnDialogClose });
3928
+ }
3929
+ }, [resetQueryOnDialogClose]);
3930
+ return (jsxs("div", { className: style('relative', className), children: [jsx(SearchInput, { value: value, onChange: handleInitialInputChange }), jsx(CloseButton, { className: "absolute top-0 right-0 sm:hidden", onClose: resetQueryOnDialogClose })] }));
3931
+ });
3932
+ const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
3933
+
3934
+ const REGIONS_URL = '/api/v1/regions';
3935
+ function useRegions() {
3936
+ const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
3937
+ return data || [];
3938
+ }
3939
+
3940
+ const groupBy = (list, keyGetter) => {
3941
+ const result = new Map();
3942
+ for (const item of list) {
3943
+ const key = keyGetter(item);
3944
+ const group = result.get(key) || [];
3945
+ result.set(key, [...group, item]);
3946
+ }
3947
+ return result;
3948
+ };
3949
+
3950
+ const renderForeignOffices = (foreignOffices) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-2xs pt-2xs", children: [jsx("div", { className: "mb-m", 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-5xl", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null;
3951
+ const ForeignOffice = JSX(({ icon, ...rest }) => {
3952
+ const link = useLink();
3953
+ const { text, target, href, onClick } = link(rest);
3954
+ return (jsxs("div", { className: "flex gap-s", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })) : null] }));
3955
+ });
3956
+
3957
+ const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-2xs", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
3958
+ onChangeLocation && onChangeLocation(region);
3959
+ }, children: region.name || '' }) }, region.id));
3960
+
3961
+ const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
3962
+
3963
+ const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
3964
+ return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: `h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border
3965
+ outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
3966
+ });
3967
+
3968
+ const SEARCH_TERM_MIN_LENGTH = 3;
3969
+ const LocationDialog = JSX(() => {
3970
+ const { defaultLocation, foreignOffices } = useSitemap();
3971
+ const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
3972
+ const [query, setQuery] = useState('');
3973
+ const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
3974
+ const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
3975
+ const { close } = useDialogManager();
3976
+ const handleChangeLocation = useCallback((region) => {
3977
+ selectCurrentLocation(region);
3978
+ close();
3979
+ }, []);
3980
+ return (jsxs(Dialog, { head: jsxs("div", { children: [currentLocation ? (jsxs("div", { className: "mb-s", 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", { onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
3981
+ .filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
3982
+ .map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-2 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
3983
+ });
3984
+ const regionFirstLetter = (region) => region.name?.charAt(0) || '';
3985
+ const cleanUpRegions = (regions) => regions.map((region) => ({
3986
+ ...region,
3987
+ name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
3988
+ }));
3989
+
3990
+ const useLocationDialog = () => {
3991
+ const { open, close } = useDialogManager();
3992
+ return {
3993
+ open: (options = {}) => open(jsx(LocationDialog, {}), options),
3994
+ close,
3995
+ };
3996
+ };
3997
+
3998
+ const TopItemMobile = ({ item, i, isActive }) => {
3999
+ const link = useLink();
4000
+ const { href, target, onClick } = link(item);
4001
+ return (jsxs("a", { href: href, target: target, onClick: onClick, className: "relative", "aria-label": item.text, children: [jsx("span", { className: style('whitespace-nowrap', isActive ? 'text-primary-main' : ''), children: item.text }), isActive ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }, String(i)));
4002
+ };
4003
+
4004
+ const ActiveSubMenuItem = JSX(({ item, i }) => {
4005
+ const link = useLink();
4006
+ const { href, target, onClick } = link(item);
4007
+ return (jsxs("a", { className: "py-3 text-h5 font-light flex justify-between cursor-pointer", href: href, target: target, onClick: onClick, children: [item.text, jsx(Img, { image: { icon: 'ChevronLeftIcon', iconVersion: 'black' }, width: "24", height: "24", className: "text-secondary-text rotate-180 opacity-30" })] }, `subItems-${String(i)}`));
4008
+ });
4009
+
4010
+ const ActiveSubMenu = JSX(({ activeMenuSubItems }) => {
4011
+ return activeMenuSubItems ? (jsx("div", { className: "mb-5", children: activeMenuSubItems.map((_, i) => (jsx(ActiveSubMenuItem, { item: _, i: i }))) })) : null;
4012
+ });
4013
+
4014
+ const isHrefActive = (router) => ({ href }) => withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
4015
+
4016
+ const isTopItemActive = (router) => isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
4017
+
4018
+ function useActiveRoute(items = []) {
4019
+ const router = useRouter();
4020
+ const activeIndex = items.findIndex(isTopItemActive(router));
4021
+ return [activeIndex, items[activeIndex]];
4022
+ }
4023
+
4024
+ const BurgerMenuDialog = JSX((props) => {
4025
+ const { topItems, officesLink, defaultLocation } = useSitemap(props.options?.page?.fallback);
4026
+ const [location] = useLocation(defaultLocation);
4027
+ const locationDialog = useLocationDialog();
4028
+ const openLocationDialog = useCallback(() => locationDialog.open(), []);
4029
+ const itemCount = Array.isArray(topItems) ? topItems.length : 0;
4030
+ const [containerRef, scroll] = useSwipeListScroll({
4031
+ itemCount,
4032
+ });
4033
+ const [activeTopItemIndex, activeRoute] = useActiveRoute(topItems);
4034
+ const activeMenuSubItems = activeRoute?.items || [];
4035
+ useEffect(() => {
4036
+ if (activeTopItemIndex > 0) {
4037
+ scroll.scrollTo(activeTopItemIndex);
4038
+ }
4039
+ }, [activeTopItemIndex, scroll]);
4040
+ return (jsx(Dialog, { head: jsx("div", { className: "flex items-center", children: jsx(Heading, { as: "h4", title: "\u041C\u0435\u043D\u044E" }) }), children: jsxs("div", { className: "flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md", children: [jsx("div", { className: "w-full mb-3", children: jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: 0, gap: 20, className: "pb-3", children: topItems?.map((item, i) => (jsx(TopItemMobile, { item: item, i: i, isActive: activeTopItemIndex === i }))) }) }), jsxs("div", { className: "relative grow overflow-auto", children: [jsx(ActiveSubMenu, { activeMenuSubItems: activeMenuSubItems }), jsx(SearchBar$1, { className: "grow mb-5" }), renderOfficeLink(officesLink), jsxs("div", { className: "flex items-center text-s cursor-pointer", onClick: openLocationDialog, children: [jsx(Img, { image: { icon: 'GeolocationIcon', iconVersion: 'black' }, width: "24", height: "24", className: "text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md" }), jsxs("div", { className: "flex flex-col items-start", children: [jsx(Text, { size: "text-h5", children: location.name }), jsx(Text, { color: "text-secondary-text", size: "text-s", children: "\u0412\u0430\u0448\u0430 \u043B\u043E\u043A\u0430\u0446\u0438\u044F" })] })] })] })] }) }));
4041
+ });
4042
+ const renderOfficeLink = (officesLink) => officesLink ? (jsxs("a", { className: "flex items-center mb-3", href: officesLink, rel: "noopener noreferrer", "aria-label": "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", children: [jsx(Img, { image: { icon: 'MapOpenedIcon', iconVersion: 'black' }, width: "24", height: "24", className: "text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md" }), jsx("span", { children: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" })] })) : null;
4043
+
4044
+ function useList(initialList = []) {
4045
+ const [list, setList] = useState(initialList);
4046
+ const push = useCallback((item) => setList((_) => [..._, item]), []);
4047
+ const pop = useCallback(() => setList((_) => _.slice(0, -1)), []);
4048
+ const remove = useCallback((item) => setList((_) => _.filter((currentItem) => currentItem !== item)), []);
4049
+ const clear = useCallback(() => setList([]), []);
4050
+ return [list, { setList, push, pop, remove, clear }];
4051
+ }
4052
+
4053
+ const useDialogsList = ({ onCloseAll, onClose, } = {}) => {
4054
+ const [dialogs, { push, pop, clear }] = useList();
4055
+ const closeAll = useCallback(() => {
4056
+ onCloseAll && onCloseAll(dialogs);
4057
+ clear();
4058
+ }, [dialogs, onCloseAll]);
4059
+ const close = useCallback(() => {
4060
+ onClose && onClose(dialogs[dialogs.length - 1]);
4061
+ pop();
4062
+ }, [dialogs, onClose]);
4063
+ useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
4064
+ switch (action.type) {
4065
+ case 'open':
4066
+ push(action);
4067
+ break;
4068
+ case 'close':
4069
+ if (action.all) {
4070
+ closeAll();
4071
+ }
4072
+ else {
4073
+ close();
4074
+ }
4075
+ break;
4076
+ default:
4077
+ assertUnreachable(action);
4078
+ }
4079
+ }), [closeAll, close]);
4080
+ return dialogs;
4081
+ };
4082
+
4083
+ const isDialogOpen = (id, dialogs) => dialogs.find((item) => item.id === id, id);
4084
+
4085
+ const BURGER_MENU_DIALOG_ID = 'burgerMenuDialog';
4086
+ const useBurgerMenuDialog = () => {
4087
+ const { open: openDialog, closeAll, close } = useDialogManager();
4088
+ const dialogs = useDialogsList();
4089
+ const isBurgerMenuOpen = isDialogOpen(BURGER_MENU_DIALOG_ID, dialogs);
4090
+ const open = useCallback(() => openDialog(jsx(BurgerMenuDialog, {}), { id: BURGER_MENU_DIALOG_ID }), []);
4091
+ const toggle = useCallback(() => {
4092
+ if (isBurgerMenuOpen) {
4093
+ closeAll();
4094
+ }
4095
+ else {
4096
+ open();
4097
+ }
4098
+ }, [isBurgerMenuOpen]);
4099
+ return [Boolean(isBurgerMenuOpen), { open, close, toggle }];
4100
+ };
4101
+
4102
+ const renderMenuItems = (menuItems, onClick) => (jsx(BlockWrapper, { className: "sticky bottom-0 left-0 right-0 bg-transparent z-[100]", padding: "p-0", children: jsx("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => renderItem(_, i, onClick)) }) }));
4103
+ const renderItem = (_, idx, onClick) => (jsxs("div", { className: style(_.isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-[10px] cursor-pointer`), onClick: () => (_?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : undefined), children: [jsx(Img, { className: "w-6 h-6", image: {
4104
+ icon: _.icon?.icon,
4105
+ iconVersion: _.icon?.iconVersion || 'black',
4106
+ } }), _.title] }, `menuItems-${String(idx)}`));
4107
+
4108
+ const StickyBottomMenu = JSX(({ ...rest }) => {
4109
+ const { menuItems = [] } = useSWRResource(projectSettings.STICKY_MOBILE_MENU || 'stickyBottomMenu', rest.options?.page?.fallback);
4110
+ const [isBurgerMenuDialogOpen, { toggle }] = useBurgerMenuDialog();
4111
+ const burgerMenu = {
4112
+ title: 'Меню',
4113
+ icon: {
4114
+ icon: 'BurgerIcon',
4115
+ iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
4116
+ },
4117
+ isActive: isBurgerMenuDialogOpen,
4118
+ };
4119
+ const middleIdx = Math.floor(menuItems.length / 2);
4120
+ const menuItemsWithButton = useMemo(() => [
4121
+ ...menuItems.slice(0, middleIdx),
4122
+ burgerMenu,
4123
+ ...menuItems.slice(middleIdx),
4124
+ ], [menuItems, middleIdx, burgerMenu]);
4125
+ return (jsxs("div", { className: "contents", children: [renderMenuItems(menuItemsWithButton, toggle), isBurgerMenuDialogOpen ? jsx(BurgerMenuDialog, {}) : null] }));
4126
+ });
4127
+
3703
4128
  const tabPaddingStyleMap = {
3704
4129
  default: 'px-xs',
3705
4130
  underlined: 'px-m',
@@ -3895,6 +4320,7 @@
3895
4320
  RollupItem,
3896
4321
  SafeDepositRental,
3897
4322
  StepsBlock,
4323
+ StickyBottomMenu,
3898
4324
  Tabs,
3899
4325
  TariffsTable,
3900
4326
  TextBlock,
@@ -3957,15 +4383,6 @@
3957
4383
  }, [scrollTarget]);
3958
4384
  }
3959
4385
 
3960
- const useDebouncedEffect = (effect, deps, delay = 300) => useEffect(() => {
3961
- const timerId = setTimeout(effect, delay);
3962
- return () => {
3963
- clearTimeout(timerId);
3964
- };
3965
- }, deps);
3966
-
3967
- const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
3968
-
3969
4386
  const COOKIE_DIALOG_ID = 'cookie';
3970
4387
  const DIALOG_INITIAL_DELAY = 3 * 1000;
3971
4388
  const CookiePopup = JSX(({ termLink, personalDataPolicyLink }) => {
@@ -3983,45 +4400,6 @@
3983
4400
  });
3984
4401
  const linkWrapperStyle = (href) => style('inline mx-2xs', href ? 'text-green-dark' : '');
3985
4402
 
3986
- function useList(initialList = []) {
3987
- const [list, setList] = useState(initialList);
3988
- const push = useCallback((item) => setList((_) => [..._, item]), []);
3989
- const pop = useCallback(() => setList((_) => _.slice(0, -1)), []);
3990
- const remove = useCallback((item) => setList((_) => _.filter((currentItem) => currentItem !== item)), []);
3991
- const clear = useCallback(() => setList([]), []);
3992
- return [list, { setList, push, pop, remove, clear }];
3993
- }
3994
-
3995
- const useDialogsList = ({ onCloseAll, onClose, } = {}) => {
3996
- const [dialogs, { push, pop, clear }] = useList();
3997
- const closeAll = useCallback(() => {
3998
- onCloseAll && onCloseAll(dialogs);
3999
- clear();
4000
- }, [dialogs, onCloseAll]);
4001
- const close = useCallback(() => {
4002
- onClose && onClose(dialogs[dialogs.length - 1]);
4003
- pop();
4004
- }, [dialogs, onClose]);
4005
- useEffect(() => defaultEventBus.subscribe('dialog', (action) => {
4006
- switch (action.type) {
4007
- case 'open':
4008
- push(action);
4009
- break;
4010
- case 'close':
4011
- if (action.all) {
4012
- closeAll();
4013
- }
4014
- else {
4015
- close();
4016
- }
4017
- break;
4018
- default:
4019
- assertUnreachable(action);
4020
- }
4021
- }), [closeAll, close]);
4022
- return dialogs;
4023
- };
4024
-
4025
4403
  const DialogManager = JSX(() => {
4026
4404
  const handleCloseAll = useCallback((dialogs) => {
4027
4405
  for (const _ of dialogs) {
@@ -4106,17 +4484,17 @@
4106
4484
  parent: data,
4107
4485
  };
4108
4486
  useBlockRouterProvider();
4109
- return (jsxs("div", { children: [jsxs("section", { className: style('relative @container', pageStyle, className), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container @lg:grid @lg:grid-cols-12 @lg:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(DialogManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
4487
+ return (jsxs("div", { children: [jsxs("section", { className: style('relative @container', pageStyle, className), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container @lg:grid @lg:grid-cols-12 @lg:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(StickyBottomMenu, {}), jsx(DialogManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
4110
4488
  });
4111
4489
  ContentPage.childrenTypes = [];
4112
- ContentPage.slots = () => ['header', 'footer'];
4490
+ ContentPage.slots = () => ['header', 'footer', 'StickyBottomMenu'];
4113
4491
  function renderLikeControl() {
4114
4492
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
4115
4493
  }
4116
4494
 
4117
4495
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
4118
4496
 
4119
- const packageVersion = "0.13.9";
4497
+ const packageVersion = "0.13.10";
4120
4498
 
4121
4499
  exports.Blocks = Blocks;
4122
4500
  exports.ContentPage = ContentPage;