@redneckz/wildless-cms-uni-blocks 0.6.15 → 0.6.17

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 (500) hide show
  1. package/bin/migration-scripts/0.6.16.js +90 -0
  2. package/bin/utils.js +2 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +318 -169
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/Bonus/BonusContent.d.ts +1 -0
  7. package/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  8. package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  9. package/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  10. package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  11. package/bundle/components/OfficeMap/nearbyOffices.d.ts +2 -0
  12. package/bundle/components/OfficeMap/renderFunctions.d.ts +1 -1
  13. package/bundle/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  14. package/bundle/icons/IconName.d.ts +6 -2
  15. package/bundle/ui-kit/Button/ButtonProps.d.ts +5 -1
  16. package/bundle/ui-kit/Button/ButtonSection.d.ts +9 -1
  17. package/bundle/{components/OfficeMap → ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  18. package/bundle/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  19. package/bundle/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  20. package/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  21. package/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  22. package/bundle/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  23. package/bundle/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  24. package/bundle/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  25. package/cosmos-static/icons/FullScreenIcon.svg +1 -0
  26. package/cosmos-static/icons/UserGeoLocationIcon.svg +1 -0
  27. package/dist/components/Bonus/BonusContent.d.ts +1 -0
  28. package/dist/components/Catalog/CatalogCard.js +2 -2
  29. package/dist/components/Catalog/CatalogCard.js.map +1 -1
  30. package/dist/components/ContentPage/renderContentPageHead.js +7 -7
  31. package/dist/components/ContentPage/renderContentPageHead.js.map +1 -1
  32. package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  33. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  34. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  35. package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  36. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  37. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  38. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  39. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  40. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  41. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  42. package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  43. package/dist/components/ExchangeRateTile/renderInput.js +4 -1
  44. package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
  45. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  46. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +43 -0
  47. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  48. package/dist/components/Gallery/GalleryCardInner.js +2 -2
  49. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  50. package/dist/components/Gallery/GalleryInner.js +2 -2
  51. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  52. package/dist/components/Header/DropdownMenu.js +1 -1
  53. package/dist/components/Header/DropdownMenu.js.map +1 -1
  54. package/dist/components/Header/HeaderSubMenu.js +16 -11
  55. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  56. package/dist/components/OfficeMap/OfficeMap.js +6 -10
  57. package/dist/components/OfficeMap/OfficeMap.js.map +1 -1
  58. package/dist/components/OfficeMap/nearbyOffices.d.ts +2 -0
  59. package/dist/components/OfficeMap/nearbyOffices.js +9 -0
  60. package/dist/components/OfficeMap/nearbyOffices.js.map +1 -0
  61. package/dist/components/OfficeMap/renderFunctions.d.ts +1 -1
  62. package/dist/components/OfficeMap/renderFunctions.js +1 -1
  63. package/dist/components/OfficeMap/renderFunctions.js.map +1 -1
  64. package/dist/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  65. package/{mobile/dist/hooks → dist/components/OfficeMap}/useOfficeMap.js +1 -1
  66. package/dist/components/OfficeMap/useOfficeMap.js.map +1 -0
  67. package/dist/components/PictureText/PictureText.js +1 -1
  68. package/dist/components/PictureText/PictureText.js.map +1 -1
  69. package/dist/components/SafeDepositRental/SafeDepositRental.js +2 -2
  70. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  71. package/dist/components/TariffsTable/EmbeddableCellData.js +5 -2
  72. package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  73. package/dist/components/TariffsTable/EmbeddableCellData.mobile.js +5 -2
  74. package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
  75. package/dist/components/TariffsTable/dataFixture.js +2 -4
  76. package/dist/components/TariffsTable/dataFixture.js.map +1 -1
  77. package/dist/icons/IconName.d.ts +6 -2
  78. package/dist/icons/IconName.js +5 -1
  79. package/dist/icons/IconName.js.map +1 -1
  80. package/dist/ui-kit/Button/ButtonProps.d.ts +5 -1
  81. package/dist/ui-kit/Button/ButtonSection.d.ts +9 -1
  82. package/dist/ui-kit/Button/ButtonSection.js +18 -6
  83. package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  84. package/dist/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  85. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  86. package/dist/ui-kit/IntersectionObserverTag.js +10 -10
  87. package/dist/ui-kit/IntersectionObserverTag.js.map +1 -1
  88. package/{lib/components/OfficeMap → dist/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  89. package/dist/ui-kit/YandexMap/YandexMap.js +86 -0
  90. package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -0
  91. package/dist/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  92. package/dist/ui-kit/YandexMap/ZoomButton.js +26 -0
  93. package/dist/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  94. package/dist/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  95. package/dist/ui-kit/YandexMap/mockPoints.js +28 -0
  96. package/dist/ui-kit/YandexMap/mockPoints.js.map +1 -0
  97. package/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  98. package/dist/ui-kit/YandexMap/renderClusterer.js +35 -0
  99. package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  100. package/dist/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  101. package/dist/ui-kit/YandexMap/renderOpenMap.js +19 -0
  102. package/dist/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  103. package/dist/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  104. package/dist/ui-kit/YandexMap/renderSearchField.js +31 -0
  105. package/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  106. package/dist/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  107. package/dist/ui-kit/YandexMap/renderUserGeolocation.js +31 -0
  108. package/dist/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  109. package/dist/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  110. package/dist/ui-kit/YandexMap/useYandexMaps.js +11 -0
  111. package/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  112. package/lib/common.css +1 -1
  113. package/lib/components/Bonus/BonusContent.d.ts +1 -0
  114. package/lib/components/Catalog/CatalogCard.js +2 -2
  115. package/lib/components/Catalog/CatalogCard.js.map +1 -1
  116. package/lib/components/ContentPage/renderContentPageHead.js +7 -7
  117. package/lib/components/ContentPage/renderContentPageHead.js.map +1 -1
  118. package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  119. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  120. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  121. package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  122. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  123. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  124. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  125. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  126. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  127. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  128. package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  129. package/lib/components/ExchangeRateTile/renderInput.js +4 -1
  130. package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
  131. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  132. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +39 -0
  133. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  134. package/lib/components/Gallery/GalleryCardInner.js +2 -2
  135. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  136. package/lib/components/Gallery/GalleryInner.js +2 -2
  137. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  138. package/lib/components/Header/DropdownMenu.js +1 -1
  139. package/lib/components/Header/DropdownMenu.js.map +1 -1
  140. package/lib/components/Header/HeaderSubMenu.js +17 -12
  141. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  142. package/lib/components/OfficeMap/OfficeMap.js +6 -10
  143. package/lib/components/OfficeMap/OfficeMap.js.map +1 -1
  144. package/lib/components/OfficeMap/nearbyOffices.d.ts +2 -0
  145. package/lib/components/OfficeMap/nearbyOffices.js +7 -0
  146. package/lib/components/OfficeMap/nearbyOffices.js.map +1 -0
  147. package/lib/components/OfficeMap/renderFunctions.d.ts +1 -1
  148. package/lib/components/OfficeMap/renderFunctions.js +1 -1
  149. package/lib/components/OfficeMap/renderFunctions.js.map +1 -1
  150. package/lib/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  151. package/{mobile/lib/hooks → lib/components/OfficeMap}/useOfficeMap.js +1 -1
  152. package/lib/components/OfficeMap/useOfficeMap.js.map +1 -0
  153. package/lib/components/PictureText/PictureText.js +1 -1
  154. package/lib/components/PictureText/PictureText.js.map +1 -1
  155. package/lib/components/SafeDepositRental/SafeDepositRental.js +2 -2
  156. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  157. package/lib/components/TariffsTable/EmbeddableCellData.js +5 -2
  158. package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  159. package/lib/components/TariffsTable/EmbeddableCellData.mobile.js +5 -2
  160. package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
  161. package/lib/components/TariffsTable/dataFixture.js +2 -4
  162. package/lib/components/TariffsTable/dataFixture.js.map +1 -1
  163. package/lib/icons/IconName.d.ts +6 -2
  164. package/lib/icons/IconName.js +5 -1
  165. package/lib/icons/IconName.js.map +1 -1
  166. package/lib/ui-kit/Button/ButtonProps.d.ts +5 -1
  167. package/lib/ui-kit/Button/ButtonSection.d.ts +9 -1
  168. package/lib/ui-kit/Button/ButtonSection.js +16 -5
  169. package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  170. package/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  171. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  172. package/lib/ui-kit/IntersectionObserverTag.js +11 -11
  173. package/lib/ui-kit/IntersectionObserverTag.js.map +1 -1
  174. package/{mobile/bundle/components/OfficeMap → lib/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  175. package/lib/ui-kit/YandexMap/YandexMap.js +84 -0
  176. package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -0
  177. package/lib/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  178. package/lib/ui-kit/YandexMap/ZoomButton.js +24 -0
  179. package/lib/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  180. package/lib/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  181. package/lib/ui-kit/YandexMap/mockPoints.js +26 -0
  182. package/lib/ui-kit/YandexMap/mockPoints.js.map +1 -0
  183. package/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  184. package/lib/ui-kit/YandexMap/renderClusterer.js +32 -0
  185. package/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  186. package/lib/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  187. package/lib/ui-kit/YandexMap/renderOpenMap.js +16 -0
  188. package/lib/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  189. package/lib/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  190. package/lib/ui-kit/YandexMap/renderSearchField.js +28 -0
  191. package/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  192. package/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  193. package/lib/ui-kit/YandexMap/renderUserGeolocation.js +28 -0
  194. package/lib/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  195. package/lib/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  196. package/lib/ui-kit/YandexMap/useYandexMaps.js +8 -0
  197. package/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  198. package/mobile/bundle/bundle.umd.js +32 -19
  199. package/mobile/bundle/bundle.umd.min.js +1 -1
  200. package/mobile/bundle/components/Bonus/BonusContent.d.ts +1 -0
  201. package/mobile/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  202. package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  203. package/mobile/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  204. package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  205. package/mobile/bundle/components/OfficeMap/nearbyOffices.d.ts +2 -0
  206. package/mobile/bundle/components/OfficeMap/renderFunctions.d.ts +1 -1
  207. package/mobile/bundle/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  208. package/mobile/bundle/icons/IconName.d.ts +6 -2
  209. package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +5 -1
  210. package/mobile/bundle/ui-kit/Button/ButtonSection.d.ts +9 -1
  211. package/{dist/components/OfficeMap → mobile/bundle/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  212. package/mobile/bundle/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  213. package/mobile/bundle/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  214. package/mobile/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  215. package/mobile/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  216. package/mobile/bundle/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  217. package/mobile/bundle/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  218. package/mobile/bundle/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  219. package/mobile/dist/components/Bonus/BonusContent.d.ts +1 -0
  220. package/mobile/dist/components/Catalog/CatalogCard.js +2 -2
  221. package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -1
  222. package/mobile/dist/components/ContentPage/renderContentPageHead.js +7 -7
  223. package/mobile/dist/components/ContentPage/renderContentPageHead.js.map +1 -1
  224. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  225. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  226. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  227. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  228. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  229. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  230. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  231. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  232. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  233. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  234. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  235. package/mobile/dist/components/ExchangeRateTile/renderInput.js +4 -1
  236. package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
  237. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  238. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +43 -0
  239. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  240. package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
  241. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  242. package/mobile/dist/components/Gallery/GalleryInner.js +2 -2
  243. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  244. package/mobile/dist/components/Header/DropdownMenu.js +1 -1
  245. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  246. package/mobile/dist/components/Header/HeaderSubMenu.js +16 -11
  247. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  248. package/mobile/dist/components/OfficeMap/OfficeMap.js +6 -10
  249. package/mobile/dist/components/OfficeMap/OfficeMap.js.map +1 -1
  250. package/mobile/dist/components/OfficeMap/nearbyOffices.d.ts +2 -0
  251. package/mobile/dist/components/OfficeMap/nearbyOffices.js +9 -0
  252. package/mobile/dist/components/OfficeMap/nearbyOffices.js.map +1 -0
  253. package/mobile/dist/components/OfficeMap/renderFunctions.d.ts +1 -1
  254. package/mobile/dist/components/OfficeMap/renderFunctions.js +1 -1
  255. package/mobile/dist/components/OfficeMap/renderFunctions.js.map +1 -1
  256. package/mobile/dist/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  257. package/{dist/hooks → mobile/dist/components/OfficeMap}/useOfficeMap.js +1 -1
  258. package/mobile/dist/components/OfficeMap/useOfficeMap.js.map +1 -0
  259. package/mobile/dist/components/PictureText/PictureText.js +1 -1
  260. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  261. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +2 -2
  262. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  263. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +5 -2
  264. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  265. package/mobile/dist/components/TariffsTable/dataFixture.js +2 -4
  266. package/mobile/dist/components/TariffsTable/dataFixture.js.map +1 -1
  267. package/mobile/dist/icons/IconName.d.ts +6 -2
  268. package/mobile/dist/icons/IconName.js +5 -1
  269. package/mobile/dist/icons/IconName.js.map +1 -1
  270. package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +5 -1
  271. package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +9 -1
  272. package/mobile/dist/ui-kit/Button/ButtonSection.js +18 -6
  273. package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  274. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  275. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  276. package/mobile/dist/ui-kit/IntersectionObserverTag.js +10 -10
  277. package/mobile/dist/ui-kit/IntersectionObserverTag.js.map +1 -1
  278. package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +8 -0
  279. package/mobile/dist/ui-kit/YandexMap/YandexMap.js +86 -0
  280. package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -0
  281. package/mobile/dist/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  282. package/mobile/dist/ui-kit/YandexMap/ZoomButton.js +26 -0
  283. package/mobile/dist/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  284. package/mobile/dist/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  285. package/mobile/dist/ui-kit/YandexMap/mockPoints.js +28 -0
  286. package/mobile/dist/ui-kit/YandexMap/mockPoints.js.map +1 -0
  287. package/mobile/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  288. package/mobile/dist/ui-kit/YandexMap/renderClusterer.js +35 -0
  289. package/mobile/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  290. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  291. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js +19 -0
  292. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  293. package/mobile/dist/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  294. package/mobile/dist/ui-kit/YandexMap/renderSearchField.js +31 -0
  295. package/mobile/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  296. package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  297. package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.js +31 -0
  298. package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  299. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  300. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js +11 -0
  301. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  302. package/mobile/lib/components/Bonus/BonusContent.d.ts +1 -0
  303. package/mobile/lib/components/Catalog/CatalogCard.js +2 -2
  304. package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -1
  305. package/mobile/lib/components/ContentPage/renderContentPageHead.js +7 -7
  306. package/mobile/lib/components/ContentPage/renderContentPageHead.js.map +1 -1
  307. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  308. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  309. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  310. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  311. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  312. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  313. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  314. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  315. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  316. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  317. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  318. package/mobile/lib/components/ExchangeRateTile/renderInput.js +4 -1
  319. package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
  320. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  321. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +39 -0
  322. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  323. package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
  324. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  325. package/mobile/lib/components/Gallery/GalleryInner.js +2 -2
  326. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  327. package/mobile/lib/components/Header/DropdownMenu.js +1 -1
  328. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  329. package/mobile/lib/components/Header/HeaderSubMenu.js +17 -12
  330. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  331. package/mobile/lib/components/OfficeMap/OfficeMap.js +6 -10
  332. package/mobile/lib/components/OfficeMap/OfficeMap.js.map +1 -1
  333. package/mobile/lib/components/OfficeMap/nearbyOffices.d.ts +2 -0
  334. package/mobile/lib/components/OfficeMap/nearbyOffices.js +7 -0
  335. package/mobile/lib/components/OfficeMap/nearbyOffices.js.map +1 -0
  336. package/mobile/lib/components/OfficeMap/renderFunctions.d.ts +1 -1
  337. package/mobile/lib/components/OfficeMap/renderFunctions.js +1 -1
  338. package/mobile/lib/components/OfficeMap/renderFunctions.js.map +1 -1
  339. package/mobile/lib/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  340. package/{lib/hooks → mobile/lib/components/OfficeMap}/useOfficeMap.js +1 -1
  341. package/mobile/lib/components/OfficeMap/useOfficeMap.js.map +1 -0
  342. package/mobile/lib/components/PictureText/PictureText.js +1 -1
  343. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  344. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +2 -2
  345. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  346. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +5 -2
  347. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  348. package/mobile/lib/components/TariffsTable/dataFixture.js +2 -4
  349. package/mobile/lib/components/TariffsTable/dataFixture.js.map +1 -1
  350. package/mobile/lib/icons/IconName.d.ts +6 -2
  351. package/mobile/lib/icons/IconName.js +5 -1
  352. package/mobile/lib/icons/IconName.js.map +1 -1
  353. package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +5 -1
  354. package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +9 -1
  355. package/mobile/lib/ui-kit/Button/ButtonSection.js +16 -5
  356. package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  357. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  358. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  359. package/mobile/lib/ui-kit/IntersectionObserverTag.js +11 -11
  360. package/mobile/lib/ui-kit/IntersectionObserverTag.js.map +1 -1
  361. package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +8 -0
  362. package/mobile/lib/ui-kit/YandexMap/YandexMap.js +84 -0
  363. package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -0
  364. package/mobile/lib/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  365. package/mobile/lib/ui-kit/YandexMap/ZoomButton.js +24 -0
  366. package/mobile/lib/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  367. package/mobile/lib/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  368. package/mobile/lib/ui-kit/YandexMap/mockPoints.js +26 -0
  369. package/mobile/lib/ui-kit/YandexMap/mockPoints.js.map +1 -0
  370. package/mobile/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  371. package/mobile/lib/ui-kit/YandexMap/renderClusterer.js +32 -0
  372. package/mobile/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  373. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  374. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js +16 -0
  375. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  376. package/mobile/lib/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  377. package/mobile/lib/ui-kit/YandexMap/renderSearchField.js +28 -0
  378. package/mobile/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  379. package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  380. package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.js +28 -0
  381. package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  382. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  383. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js +8 -0
  384. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  385. package/mobile/src/common.css +9 -0
  386. package/mobile/src/components/Bonus/Bonus.example.json +1 -6
  387. package/mobile/src/components/Bonus/BonusContent.ts +1 -0
  388. package/mobile/src/components/Catalog/CatalogCard.tsx +2 -2
  389. package/mobile/src/components/ContentPage/renderContentPageHead.tsx +11 -7
  390. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +8 -6
  391. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +8 -15
  392. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +31 -19
  393. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -13
  394. package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +1 -1
  395. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +5 -2
  396. package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +71 -0
  397. package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
  398. package/mobile/src/components/Gallery/GalleryInner.tsx +2 -2
  399. package/mobile/src/components/Header/DropdownMenu.tsx +5 -5
  400. package/mobile/src/components/Header/HeaderSubMenu.tsx +36 -20
  401. package/mobile/src/components/OfficeMap/OfficeMap.tsx +10 -17
  402. package/mobile/src/components/OfficeMap/nearbyOffices.ts +8 -0
  403. package/mobile/src/components/OfficeMap/renderFunctions.tsx +5 -2
  404. package/mobile/src/{hooks → components/OfficeMap}/useOfficeMap.ts +1 -1
  405. package/mobile/src/components/PictureText/PictureText.tsx +1 -1
  406. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
  407. package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +7 -11
  408. package/mobile/src/components/TariffsTable/dataFixture.tsx +2 -3
  409. package/mobile/src/icons/FullScreenIcon.svg +8 -0
  410. package/mobile/src/icons/IconName.ts +5 -5
  411. package/mobile/src/icons/UserGeoLocationIcon.svg +3 -0
  412. package/mobile/src/ui-kit/Button/ButtonProps.ts +5 -1
  413. package/mobile/src/ui-kit/Button/ButtonSection.tsx +41 -16
  414. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +32 -23
  415. package/mobile/src/ui-kit/IntersectionObserverTag.tsx +13 -17
  416. package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +128 -0
  417. package/mobile/src/ui-kit/YandexMap/ZoomButton.tsx +38 -0
  418. package/mobile/src/ui-kit/YandexMap/mockPoints.ts +30 -0
  419. package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +51 -0
  420. package/mobile/src/ui-kit/YandexMap/renderOpenMap.tsx +26 -0
  421. package/mobile/src/ui-kit/YandexMap/renderSearchField.tsx +51 -0
  422. package/mobile/src/ui-kit/YandexMap/renderUserGeolocation.tsx +43 -0
  423. package/mobile/src/ui-kit/YandexMap/useYandexMaps.ts +11 -0
  424. package/package.json +1 -1
  425. package/src/common.css +9 -0
  426. package/src/components/Bonus/Bonus.example.json +1 -6
  427. package/src/components/Bonus/BonusContent.ts +1 -0
  428. package/src/components/Catalog/Catalog.fixture.tsx +3 -10
  429. package/src/components/Catalog/CatalogCard.tsx +2 -2
  430. package/src/components/ContentPage/renderContentPageHead.tsx +11 -7
  431. package/src/components/ExchangeRateTile/CurrencyTable.tsx +8 -6
  432. package/src/components/ExchangeRateTile/CurrentLocation.tsx +8 -15
  433. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +31 -19
  434. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -13
  435. package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +1 -1
  436. package/src/components/ExchangeRateTile/renderInput.tsx +5 -2
  437. package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +71 -0
  438. package/src/components/Gallery/Gallery.fixture.tsx +1 -2
  439. package/src/components/Gallery/GalleryCardInner.tsx +2 -2
  440. package/src/components/Gallery/GalleryInner.tsx +2 -2
  441. package/src/components/Header/DropdownMenu.tsx +5 -5
  442. package/src/components/Header/HeaderSubMenu.tsx +36 -20
  443. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -14
  444. package/src/components/OfficeMap/OfficeMap.tsx +10 -17
  445. package/src/components/OfficeMap/nearbyOffices.ts +8 -0
  446. package/src/components/OfficeMap/renderFunctions.tsx +5 -2
  447. package/src/{hooks → components/OfficeMap}/useOfficeMap.ts +1 -1
  448. package/src/components/PictureText/PictureText.tsx +1 -1
  449. package/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
  450. package/src/components/StepsBlock/StepsBlock.fixture.tsx +2 -0
  451. package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +7 -11
  452. package/src/components/TariffsTable/EmbeddableCellData.tsx +7 -9
  453. package/src/components/TariffsTable/dataFixture.tsx +2 -3
  454. package/src/icons/FullScreenIcon.svg +8 -0
  455. package/src/icons/IconName.ts +9 -1
  456. package/src/icons/UserGeoLocationIcon.svg +3 -0
  457. package/src/ui-kit/Button/ButtonProps.ts +5 -1
  458. package/src/ui-kit/Button/ButtonSection.tsx +41 -16
  459. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +32 -23
  460. package/src/ui-kit/IntersectionObserverTag.tsx +13 -17
  461. package/src/ui-kit/YandexMap/YandexMap.tsx +128 -0
  462. package/src/ui-kit/YandexMap/ZoomButton.tsx +38 -0
  463. package/src/ui-kit/YandexMap/mockPoints.ts +30 -0
  464. package/src/ui-kit/YandexMap/renderClusterer.ts +51 -0
  465. package/src/ui-kit/YandexMap/renderOpenMap.tsx +26 -0
  466. package/src/ui-kit/YandexMap/renderSearchField.tsx +51 -0
  467. package/src/ui-kit/YandexMap/renderUserGeolocation.tsx +43 -0
  468. package/src/ui-kit/YandexMap/useYandexMaps.ts +11 -0
  469. package/bundle/hooks/useExchangeRates.d.ts +0 -2
  470. package/dist/components/OfficeMap/YandexMap.js +0 -30
  471. package/dist/components/OfficeMap/YandexMap.js.map +0 -1
  472. package/dist/hooks/useExchangeRates.d.ts +0 -2
  473. package/dist/hooks/useExchangeRates.js +0 -57
  474. package/dist/hooks/useExchangeRates.js.map +0 -1
  475. package/dist/hooks/useOfficeMap.js.map +0 -1
  476. package/lib/components/OfficeMap/YandexMap.js +0 -28
  477. package/lib/components/OfficeMap/YandexMap.js.map +0 -1
  478. package/lib/hooks/useExchangeRates.d.ts +0 -2
  479. package/lib/hooks/useExchangeRates.js +0 -54
  480. package/lib/hooks/useExchangeRates.js.map +0 -1
  481. package/lib/hooks/useOfficeMap.js.map +0 -1
  482. package/mobile/bundle/hooks/useExchangeRates.d.ts +0 -2
  483. package/mobile/dist/components/OfficeMap/YandexMap.d.ts +0 -5
  484. package/mobile/dist/components/OfficeMap/YandexMap.js +0 -30
  485. package/mobile/dist/components/OfficeMap/YandexMap.js.map +0 -1
  486. package/mobile/dist/hooks/useExchangeRates.d.ts +0 -2
  487. package/mobile/dist/hooks/useExchangeRates.js +0 -57
  488. package/mobile/dist/hooks/useExchangeRates.js.map +0 -1
  489. package/mobile/dist/hooks/useOfficeMap.js.map +0 -1
  490. package/mobile/lib/components/OfficeMap/YandexMap.d.ts +0 -5
  491. package/mobile/lib/components/OfficeMap/YandexMap.js +0 -28
  492. package/mobile/lib/components/OfficeMap/YandexMap.js.map +0 -1
  493. package/mobile/lib/hooks/useExchangeRates.d.ts +0 -2
  494. package/mobile/lib/hooks/useExchangeRates.js +0 -54
  495. package/mobile/lib/hooks/useExchangeRates.js.map +0 -1
  496. package/mobile/lib/hooks/useOfficeMap.js.map +0 -1
  497. package/mobile/src/components/OfficeMap/YandexMap.tsx +0 -41
  498. package/mobile/src/hooks/useExchangeRates.ts +0 -76
  499. package/src/components/OfficeMap/YandexMap.tsx +0 -41
  500. package/src/hooks/useExchangeRates.ts +0 -76
@@ -280,19 +280,19 @@
280
280
 
281
281
  const IntersectionObserverTag = JSX((props) => {
282
282
  const { tag = 'section', observerCallback, observerOptions, className = '', anchor = null, children, } = props;
283
- const intersectionObserver = useRef(null);
284
- const ref = useCallback((element) => {
285
- if (!element) {
286
- return;
287
- }
288
- if (intersectionObserver.current) {
289
- intersectionObserver.current.disconnect();
283
+ const tagRef = useRef(null);
284
+ useEffect(() => {
285
+ if (!tagRef.current) {
286
+ return undefined;
290
287
  }
291
- intersectionObserver.current = new IntersectionObserver(observerCallback, observerOptions);
292
- intersectionObserver.current.observe(element);
288
+ const intersectionObserver = new IntersectionObserver(observerCallback, observerOptions);
289
+ intersectionObserver.observe(tagRef.current);
290
+ return () => {
291
+ intersectionObserver.disconnect();
292
+ };
293
293
  }, [observerCallback, observerOptions]);
294
294
  const Tag = tag;
295
- return (jsx(Tag, { ref: ref, className: className, id: anchor, children: children }));
295
+ return (jsx(Tag, { ref: tagRef, className: className, id: anchor, children: children }));
296
296
  });
297
297
 
298
298
  const THRESHOLD_ACCURACY = 100; // Decimals number (100 is for two decimals number, 0.**)
@@ -639,12 +639,22 @@
639
639
  const ButtonSection = JSX(({ context, className = '', buttons }) => {
640
640
  const { handlerDecorator } = context;
641
641
  const router = context.useRouter();
642
- return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => (jsx(ButtonSectionItem, { button: button, handlerDecorator: handlerDecorator, router: router }, String(index)))) })) : null;
643
- });
644
- const ButtonSectionItem = JSX(({ router, handlerDecorator, button }) => {
645
- const buttonProps = useLink({ router, handlerDecorator }, button);
646
- return jsx(Button, { ...button, ...buttonProps });
642
+ return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton({ button: useLink({ router, handlerDecorator }, button), index })) })) : null;
647
643
  });
644
+ function renderButton({ button, buttonClassName, index }) {
645
+ const { icon, iconRight, version, ...rest } = button;
646
+ const iconVersion = version === 'secondary' ? 'normal' : 'white';
647
+ const leftIcon = renderButtonIcon({ icon, iconVersion });
648
+ const rightIcon = renderButtonIcon({ icon: iconRight, iconVersion });
649
+ return (jsx(Button, { className: buttonClassName, appendLeft: leftIcon, appendRight: rightIcon, version: version, ...rest }, index ? String(index) : ''));
650
+ }
651
+ const renderButtonIcon = ({ icon, iconVersion }) => {
652
+ if (!icon?.icon && !icon?.src) {
653
+ return null;
654
+ }
655
+ const iconWidth = icon?.size?.width ? `${icon.size.width}` : '24';
656
+ return jsx(ImgInner, { image: { ...icon, iconVersion: iconVersion }, width: iconWidth, height: "24", asSVG: true });
657
+ };
648
658
 
649
659
  const Description = JSX((props) => {
650
660
  const { className = '', description } = props;
@@ -1242,7 +1252,7 @@
1242
1252
  white: 'bg-white',
1243
1253
  };
1244
1254
  const CatalogCard = JSX(({ className = '', title, description, image, price, button, colors }) => {
1245
- return (jsxs("section", { className: `border border-solid box-border border-main-stroke p-[30px] min-w-[402px] flex flex-col justify-left ${className}`, role: "listitem", children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? jsx("div", { className: "text-m-light text-left mb-4", children: description }) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-m-light text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }), colors.map(renderColorOption)] })) : null, price ? jsxs("div", { className: "text-h3 text-left", children: [price, "\u00A0\u20BD"] }) : null, button ? jsx(Button, { className: "mt-5 w-full", ...button }) : null] }));
1255
+ return (jsxs("section", { className: `border border-solid box-border border-main-stroke p-[30px] min-w-[402px] flex flex-col justify-left ${className}`, role: "listitem", children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? jsx("div", { className: "text-m-light text-left mb-4", children: description }) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-m-light text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }), colors.map(renderColorOption)] })) : null, price ? jsxs("div", { className: "text-h3 text-left", children: [price, "\u00A0\u20BD"] }) : null, button ? renderButton({ button, buttonClassName: 'mt-5 w-full' }) : null] }));
1246
1256
  });
1247
1257
  const renderColorOption = (color, i) => (jsx("span", { className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap$1[color]}` }, String(i)));
1248
1258
 
@@ -1389,62 +1399,6 @@
1389
1399
  return (jsxs("section", { className: `flex flex-col justify-center items-center mt-12 ${className}`, role: "listitem", children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? (jsx("div", { className: "font-sans text-xl-light mb-7 max-w-[613px] text-center", children: subtitle })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
1390
1400
  });
1391
1401
 
1392
- const roundTo = (value, precision = 2) => {
1393
- const factor = 10 ** precision;
1394
- return Math.round(parseFloat(String(value)) * factor) / factor;
1395
- };
1396
-
1397
- function useExchangeRates() {
1398
- const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1399
- const result = data?.hits?.hits?.map((_) => _._source) || [];
1400
- return result.length ? getCurrencyListByRate(result) : result;
1401
- }
1402
- function fetchExchangeRates() {
1403
- return fetchJSON(EXCHANGE_RATES_URL, {
1404
- method: 'POST',
1405
- body: JSON.stringify(EXCHANGE_RATES_BODY),
1406
- });
1407
- }
1408
- const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
1409
- const EXCHANGE_RATES_BODY = {
1410
- query: {
1411
- bool: {
1412
- must: [
1413
- {
1414
- term: {
1415
- // eslint-disable-next-line camelcase
1416
- russian_region_code: '77',
1417
- },
1418
- },
1419
- {
1420
- term: {
1421
- // eslint-disable-next-line camelcase
1422
- from_volume: '0',
1423
- },
1424
- },
1425
- {
1426
- terms: {
1427
- // eslint-disable-next-line camelcase
1428
- currency_pair: ['USD/RUB', 'EUR/RUB'],
1429
- },
1430
- },
1431
- ],
1432
- },
1433
- },
1434
- };
1435
- const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
1436
- const currencyInfo = _['currency_first'];
1437
- const currencyCode = currencyInfo?.code;
1438
- if (!result.some((i) => i.code === currencyCode)) {
1439
- result.push({
1440
- code: currencyCode,
1441
- buy: roundTo(Number(_.rate_buy), 3),
1442
- sell: roundTo(Number(_.rate_sell), 3),
1443
- });
1444
- }
1445
- return result;
1446
- }, []);
1447
-
1448
1402
  const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
1449
1403
  return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] }));
1450
1404
  });
@@ -1471,11 +1425,16 @@
1471
1425
  return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
1472
1426
  });
1473
1427
  const renderCurrencyRow = (exchangeCurrencyItem) => {
1474
- const code = exchangeCurrencyItem?.code;
1475
- return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(ImgInner, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.sell) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buy) })] }, code));
1428
+ const currency = exchangeCurrencyItem?.currency?.currency;
1429
+ return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [currency ? (jsx(ImgInner, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx("span", { className: "ml-2", children: currency })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) })] }, currency));
1476
1430
  };
1477
1431
 
1478
- const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(ImgInner, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0 text-m-light", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
1432
+ const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(ImgInner, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, jsx("p", { className: "text-secondary-text m-0 text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
1433
+
1434
+ const roundTo = (value, precision = 2) => {
1435
+ const factor = 10 ** precision;
1436
+ return Math.round(parseFloat(String(value)) * factor) / factor;
1437
+ };
1479
1438
 
1480
1439
  const calculateResult = (value, rate, precision) => {
1481
1440
  const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
@@ -1544,7 +1503,10 @@
1544
1503
 
1545
1504
  function renderInput(props) {
1546
1505
  const { placeholder, rates, selected, value, setValue, setSelected } = props;
1547
- const ratesOptions = rates.map((_) => ({ key: _.code ?? '', text: _.code ?? '' }));
1506
+ const ratesOptions = rates.map((_) => ({
1507
+ key: _?.currency?.currency ?? '',
1508
+ text: _?.currency?.currency ?? '',
1509
+ }));
1548
1510
  const selectedValue = { key: selected, text: selected };
1549
1511
  return (jsxs("div", { className: "relative flex", children: [jsx(Input, { className: "shrink-0 text-l w-full appearance-none mr-[-90px]", placeholder: placeholder, type: "text", value: value, onChange: setValue }), ratesOptions.length ? (jsx(Select, { isBorder: false, onChange: (_) => setSelected(_.key), options: ratesOptions, value: selectedValue })) : null] }));
1550
1512
  }
@@ -1555,8 +1517,8 @@
1555
1517
  const [calcState, setCalcState] = useState({
1556
1518
  inputSell: '',
1557
1519
  inputBuy: '',
1558
- selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
1559
- selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
1520
+ selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
1521
+ selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
1560
1522
  });
1561
1523
  const handleSetCalcState = (newState) => {
1562
1524
  setCalcState((oldState) => ({ ...oldState, ...newState }));
@@ -1582,8 +1544,8 @@
1582
1544
  callbackCurrencySelect({
1583
1545
  value,
1584
1546
  oppositeValue: calcState.selectBuy,
1585
- handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
1586
- handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
1547
+ handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
1548
+ handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, currencyFrom, currencyTo);
1587
1549
  },
1588
1550
  });
1589
1551
  };
@@ -1592,42 +1554,75 @@
1592
1554
  callbackCurrencySelect({
1593
1555
  value,
1594
1556
  oppositeValue: calcState.selectSell,
1595
- handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
1557
+ handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, currencyTo, currencyFrom),
1596
1558
  });
1597
1559
  };
1598
- const handleInputSell = (setCalcState, currencyRatesSell) => (value, codeFrom, codeTo) => {
1599
- setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
1600
- const rate = currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
1601
- currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
1560
+ const handleInputSell = (setCalcState, currencyRatesSell) => (value, currencyFrom, currencyTo) => {
1561
+ setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
1562
+ const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
1563
+ currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate;
1602
1564
  if (rate) {
1603
1565
  setCalcState({
1604
- inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
1566
+ inputBuy: String(calculateResult(value, rate, currencyFrom === Currency.RUB) || ''),
1605
1567
  });
1606
1568
  }
1607
1569
  };
1608
- const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, codeTo, codeFrom) => {
1609
- setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
1610
- const rate = currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
1611
- currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
1570
+ const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, currencyTo, currencyFrom) => {
1571
+ setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
1572
+ const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
1573
+ currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate;
1612
1574
  if (rate) {
1613
1575
  setCalcState({
1614
- inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
1576
+ inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
1615
1577
  });
1616
1578
  }
1617
1579
  };
1618
1580
 
1619
- const DEFAULT_LOCATION = {
1620
- address: 'Москва, ул.Ленина д.28',
1621
- distance: '6км',
1581
+ const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
1582
+ const REGION_URL = '/api/v1/region';
1583
+ function useFetchExchangeRateData() {
1584
+ const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
1585
+ return data || {};
1586
+ }
1587
+ const fetchData = async (urlExchangeRates) => {
1588
+ const region = await fetchRegion();
1589
+ const regionCode = region?.code || '000';
1590
+ const exchangeRates = await fetchExchangeRates(urlExchangeRates, regionCode);
1591
+ return { region, exchangeRates };
1592
+ };
1593
+ const fetchRegion = async () => {
1594
+ try {
1595
+ return await fetchJSONUnsafe(REGION_URL, { method: 'GET' });
1596
+ }
1597
+ catch (error) {
1598
+ console.log(error);
1599
+ return {};
1600
+ }
1601
+ };
1602
+ const fetchExchangeRates = async (url, regionCode) => {
1603
+ try {
1604
+ return await fetchJSONUnsafe(url + `?regionCode=${regionCode}`, {
1605
+ method: 'GET',
1606
+ });
1607
+ }
1608
+ catch (error) {
1609
+ console.log(error);
1610
+ return {};
1611
+ }
1622
1612
  };
1613
+
1623
1614
  const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
1624
- const currencyRates = useExchangeRates();
1625
- const currencyRatesBuy = currencyRates.filter((_) => _.buy);
1626
- currencyRatesBuy.unshift({ code: Currency.RUB });
1627
- const currencyRatesSell = currencyRates.filter((_) => _.sell);
1628
- currencyRatesSell.push({ code: Currency.RUB });
1629
- return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border min-h-[320px] ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4 mb-5" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
1615
+ const { exchangeRates } = useFetchExchangeRateData();
1616
+ const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
1617
+ const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
1618
+ currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
1619
+ const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
1620
+ currencyRatesSell.push({ currency: { currency: Currency.RUB } });
1621
+ return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border min-h-[320px] ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4 mb-5" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
1630
1622
  });
1623
+ const getCurrencyRates = (currencies) => {
1624
+ return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
1625
+ };
1631
1626
 
1632
1627
  const ICON_VERSION_MAP = {
1633
1628
  'bg-white': 'normal',
@@ -1850,7 +1845,7 @@
1850
1845
  });
1851
1846
 
1852
1847
  const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isDotted = true, align = 'center', }) => {
1853
- return (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$1(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text ? jsx(Button, { className: "mt-6", ...button }) : null] }));
1848
+ return (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$1(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text ? renderButton({ button, buttonClassName: 'mt-6' }) : null] }));
1854
1849
  });
1855
1850
  const renderImage$1 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image, asSVG: true })) : null] }));
1856
1851
  const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
@@ -1879,7 +1874,7 @@
1879
1874
  isShown: [showPrevButton, showNextButton],
1880
1875
  btnClass: ['left-8', 'right-8'],
1881
1876
  className: 'top-1/2',
1882
- }), isGalleryScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] })) : null, button ? jsx(Button, { className: "mt-8 mx-auto", ...button }) : null] }));
1877
+ }), isGalleryScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] })) : null, button ? renderButton({ button, buttonClassName: 'mt-8 mx-auto' }) : null] }));
1883
1878
  });
1884
1879
 
1885
1880
  const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
@@ -2005,32 +2000,37 @@
2005
2000
  });
2006
2001
  const renderDotsSubMenuItems = ({ menuItems, router, handlerDecorator, activeSubItem, }) => {
2007
2002
  const isActive = (item) => item === activeSubItem;
2008
- return menuItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), className: `text-l-light pb-4 hover:text-primary-main ${isActive(_) ? 'text-primary-main' : ''}`, children: _.text }, _.href)));
2003
+ return menuItems?.map(({ text, ...rest }) => (jsx("a", { ...useLink({ router, handlerDecorator }, rest), className: `text-l-light pb-4 hover:text-primary-main ${isActive(rest) ? 'text-primary-main' : ''}`, children: text }, rest.href)));
2009
2004
  };
2010
2005
  const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
2011
2006
 
2012
2007
  const HeaderSubMenu = JSX(({ context, subItems = [], bgColor }) => {
2013
- const [menuVisible, setMenuVisible] = useState(false);
2014
- const router = context.useRouter();
2015
2008
  const { handlerDecorator } = context;
2009
+ const router = context.useRouter();
2010
+ const subItemsListRef = useRef(null);
2011
+ const [menuVisible, setMenuVisible] = useState(false);
2016
2012
  const [visibleItemsCount, setVisibleItemsCount] = useState(subItems.length);
2017
2013
  const dropDownMenuItems = subItems.slice(visibleItemsCount);
2018
- const activeSubItem = findActiveSubItem(router)(subItems);
2019
- const toggleMenu = () => setMenuVisible(!menuVisible);
2020
- const observerCallback = (itemIndex) => (entries) => {
2014
+ const observerOptions = useMemo(() => ({ threshold: 1, root: subItemsListRef.current }), [subItemsListRef.current]);
2015
+ const observerCallbacks = useMemo(() => subItems.map((_, index) => (entries) => {
2021
2016
  if (!entries.length) {
2022
2017
  return;
2023
2018
  }
2024
- const entry = entries[0];
2025
- if (entry.intersectionRatio < 1) {
2026
- setVisibleItemsCount((prev) => Math.min(prev, itemIndex));
2019
+ // Assumption about sorting entries by time
2020
+ const entry = entries[entries.length - 1];
2021
+ if (entry.isIntersecting) {
2022
+ setVisibleItemsCount(handleIntersectionActivation(index));
2027
2023
  }
2028
2024
  else {
2029
- setVisibleItemsCount((prev) => Math.max(prev, itemIndex + 1));
2025
+ setVisibleItemsCount(handleIntersectionDeactivation(index));
2030
2026
  }
2031
- };
2032
- return (jsxs("nav", { className: "relative mt-6", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52 pb-3", children: subItems.map((_, i) => (jsx(IntersectionObserverTag, { tag: "span", observerCallback: observerCallback(i), observerOptions: { threshold: 1 }, children: jsx(HeaderItem, { className: `mr-8 ${visibleItemsCount - 1 < i ? 'invisible' : ''}`, active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }) }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { context: context, activeSubItem: activeSubItem, menuVisible: menuVisible, toggleMenu: toggleMenu, menuItems: dropDownMenuItems, bgColor: bgColor })) : null] }));
2027
+ }), [subItems]);
2028
+ const activeSubItem = findActiveSubItem(router)(subItems);
2029
+ const toggleMenu = () => setMenuVisible(!menuVisible);
2030
+ return (jsxs("nav", { className: "relative mt-6", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap mr-52 pb-3", children: subItems.map((_, i) => (jsx(IntersectionObserverTag, { tag: "span", observerCallback: observerCallbacks[i], observerOptions: observerOptions, children: jsx(HeaderItem, { className: `mr-8 ${visibleItemsCount - 1 < i ? 'invisible' : ''}`, active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }) }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { context: context, activeSubItem: activeSubItem, menuVisible: menuVisible, toggleMenu: toggleMenu, menuItems: dropDownMenuItems, bgColor: bgColor })) : null] }));
2033
2031
  });
2032
+ const handleIntersectionActivation = (index) => (prev) => Math.max(prev, index + 1);
2033
+ const handleIntersectionDeactivation = (index) => (prev) => Math.min(prev, index);
2034
2034
 
2035
2035
  const BORDER_COLORS = {
2036
2036
  'bg-white': 'bg-main-divider',
@@ -2341,7 +2341,7 @@
2341
2341
  const lunchHourText = hasTime ? `Перерыв ${lunchHour}` : lunchHour;
2342
2342
  return status ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4", children: workTime ? workTime : null }), jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-golden border-golden", children: lunchHour ? lunchHourText : null })] })) : (jsx("div", { className: "flex", children: jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }) }));
2343
2343
  };
2344
- const renderNearbyOffice = ({ icon, title, distance, time }, inx) => (jsxs("div", { className: "flex mr-4", children: [jsx(Icon, { name: icon, width: "16", height: "16", asSVG: true, className: "mr-1" }), title ? jsxs("span", { className: "text-m", children: [title, "\u00A0"] }) : null, jsxs("span", { className: "text-m-light", children: [distance ? ` (${distance})` : null, time ? `, ${time}` : null] })] }, `nearbyOffice${inx}`));
2344
+ const renderNearbyOffice = ({ icon, title, distance, time }, index) => (jsxs("div", { className: "flex mr-4", children: [jsx(Icon, { name: icon, width: "16", height: "16", asSVG: true, className: "mr-1" }), title ? jsxs("span", { className: "text-m", children: [title, "\u00A0"] }) : null, jsxs("span", { className: "text-m-light", children: [distance ? ` (${distance})` : null, time ? `, ${time}` : null] })] }, `nearbyOffice${index}`));
2345
2345
  const renderDay = ({ title, status, workTime, lunchHour, description }, inx) => (jsxs("div", { className: "flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0", children: [jsxs("div", { className: "flex justify-between items-center w-full pb-1 text-l text-primary-text", children: [jsx("div", { children: title }), status ? null : jsx("div", { className: "text-m-light text-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }), status && workTime ? jsx("div", { children: workTime }) : null] }), status && lunchHour ? renderLunchHour(lunchHour) : null, description ? (jsx("div", { className: "pb-1 text-s-light text-secondary-text", children: description })) : null] }, `day${inx}`));
2346
2346
  const renderLunchHour = (lunchHour) => {
2347
2347
  const hasTime = /\d+/gi.test(lunchHour);
@@ -2380,6 +2380,72 @@
2380
2380
  });
2381
2381
  }
2382
2382
 
2383
+ const styles$3 = {
2384
+ focus: 'focus:border-primary-focus focus:border',
2385
+ hover: 'hover:bg-primary-hover',
2386
+ active: 'active:bg-primary-active',
2387
+ border: 'border border-transparent rounded-md',
2388
+ position: 'flex items-center justify-center',
2389
+ font: 'text-center font-sans',
2390
+ };
2391
+ const renderOpenMap = (pointsCenter) => {
2392
+ const getYandexMapUrl = () => {
2393
+ return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
2394
+ };
2395
+ return (jsx("a", { className: `select-none cursor-pointer px-9 h-12 bg-white bg-primary-main text-white ${Object.values(styles$3).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
2396
+ };
2397
+
2398
+ const styles$2 = {
2399
+ border: 'border border-transparent rounded-md',
2400
+ position: 'relative flex items-center',
2401
+ font: 'text-center font-sans',
2402
+ shadow: 'shadow-[0_4px_25px_rgba(0,0,0,0.07)]',
2403
+ };
2404
+ const renderSearchField = (points, yandexMaps, updatePointsToRender) => {
2405
+ const onChange = (e) => {
2406
+ const value = e.target?.value ? e.target?.value.toLowerCase() : '';
2407
+ if (value) {
2408
+ const searchResult = points.filter((_) => {
2409
+ const textLowerCase = _.text.toLowerCase();
2410
+ if (textLowerCase.indexOf(value) > -1) {
2411
+ return _;
2412
+ }
2413
+ return null;
2414
+ });
2415
+ updatePointsToRender(searchResult);
2416
+ }
2417
+ else {
2418
+ updatePointsToRender(null);
2419
+ }
2420
+ };
2421
+ return (jsxs("div", { className: `${Object.values(styles$2).join(' ')} bg-white py-3 pl-11 pr-4 w-full`, children: [jsx(Icon, { name: "LoupeIcon", iconVersion: "black", width: "20", height: "20", asSVG: true, className: "absolute left-4" }), jsx("input", { type: "text", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0438\u043B\u0438 \u043C\u0435\u0442\u0440\u043E", onChange: onChange, className: "border-0 focus:border-0 outline-0 w-full" })] }));
2422
+ };
2423
+
2424
+ const styles$1 = {
2425
+ focus: 'focus:border-primary-focus focus:border',
2426
+ hover: 'hover:bg-primary-hover',
2427
+ active: 'active:bg-primary-active',
2428
+ border: 'border border-transparent rounded-md',
2429
+ position: 'absolute flex items-center justify-center',
2430
+ font: 'text-center font-sans',
2431
+ };
2432
+ const renderUserGeolocation = (map, yandexMaps, className) => {
2433
+ const setUserGeoLocation = () => {
2434
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2435
+ // @ts-ignore
2436
+ yandexMaps.geolocation
2437
+ .get({
2438
+ provider: 'yandex',
2439
+ autoReverseGeocode: true,
2440
+ mapStateAutoApply: true,
2441
+ })
2442
+ .then(function (result) {
2443
+ map.geoObjects.add(result.geoObjects);
2444
+ });
2445
+ };
2446
+ return (jsx("div", { className: `select-none cursor-pointer py-4 w-12 bg-white ${Object.values(styles$1).join(' ')} ${className}`, onClick: setUserGeoLocation, children: jsx(Icon, { name: "UserGeoLocationIcon", width: "20", height: "16" }) }));
2447
+ };
2448
+
2383
2449
  const getNS = (_) => globalThis[_];
2384
2450
  function useExternalNS(namespaceName, url) {
2385
2451
  const [externalNS, setExternalNS] = useState();
@@ -2417,37 +2483,137 @@
2417
2483
  const YMAPS_NAMESPACE = 'ymaps';
2418
2484
  const useYandexMaps = () => {
2419
2485
  const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY}&lang=ru_RU`;
2420
- const yandexMaps = useExternalNS(YMAPS_NAMESPACE, url);
2421
- return yandexMaps;
2422
- };
2486
+ return useExternalNS(YMAPS_NAMESPACE, url);
2487
+ };
2488
+
2489
+ const styles = {
2490
+ focus: 'focus:border-primary-focus focus:border',
2491
+ hover: 'hover:bg-primary-hover',
2492
+ active: 'active:bg-primary-active',
2493
+ border: 'border-b border-b-2 border-gray last:border-0',
2494
+ position: 'relative flex items-center justify-center',
2495
+ font: 'text-center font-sans text-l',
2496
+ };
2497
+ // TODO: Добавить метод определения центральной точки
2498
+ const ZoomButton = JSX(({ yandexMaps, direction = 'in' }) => {
2499
+ const iconName = direction === 'in' ? 'PlusIcon' : 'MinusIcon';
2500
+ const changeZoom = () => {
2501
+ const currentZoom = yandexMaps.current.getZoom();
2502
+ const newZoom = direction === 'in' ? currentZoom + 1 : currentZoom - 1;
2503
+ yandexMaps.current.setZoom(newZoom, { checkZoomRange: true });
2504
+ };
2505
+ return (jsx("div", { onClick: changeZoom, className: `${Object.values(styles).join(' ')} bg-white select-none cursor-pointer w-12 h-12`, children: jsx(Icon, { name: iconName, width: "20", height: "16" }) }));
2506
+ });
2507
+
2508
+ const mockPoints = [
2509
+ { coords: [55.77, 37.46], text: 'Трактир' },
2510
+ { coords: [55.66, 37.48], text: 'Трактор' },
2511
+ { coords: [55.65, 37.42], text: 'Ресторан' },
2512
+ { coords: [55.64, 37.54], text: 'Музей' },
2513
+ { coords: [55.54, 37.52], text: 'Библиотека' },
2514
+ { coords: [55.53, 37.56], text: 'Школа' },
2515
+ { coords: [55.61, 37.61], text: 'Аптека' },
2516
+ { coords: [55.8, 37.58], text: 'Бар' },
2517
+ { coords: [55.71, 37.35], text: 'Институт' },
2518
+ { coords: [55.74, 37.57], text: 'Университет' },
2519
+ { coords: [55.58, 37.69], text: 'Больница' },
2520
+ { coords: [55.57, 37.7], text: 'Цирк' },
2521
+ { coords: [55.55, 37.64], text: 'Магазин' },
2522
+ { coords: [55.5, 37.75], text: 'Булочная' },
2523
+ { coords: [55.81, 37.73], text: 'Полиция' },
2524
+ { coords: [55.73, 37.68], text: 'Салон красоты' },
2525
+ { coords: [55.86, 37.76], text: 'Баня' },
2526
+ { coords: [55.38, 37.69], text: 'Гараж' },
2527
+ { coords: [55.91, 37.5], text: 'Дом' },
2528
+ { coords: [55.62, 37.32], text: 'Прачечная' },
2529
+ { coords: [55.85, 37.41], text: 'Стадион' },
2530
+ { coords: [55.67, 37.24], text: 'Вокзал' },
2531
+ { coords: [55.79, 37.41], text: 'Кафе' },
2532
+ ];
2423
2533
 
2424
- const YandexMap$1 = JSX(({ point }) => {
2534
+ const FULLSCREEN_STYLES = {
2535
+ border: 'border border-transparent rounded-md ',
2536
+ position: 'absolute flex items-center justify-center',
2537
+ size: 'w-12 h-12',
2538
+ focus: 'focus:border-primary-focus focus:border',
2539
+ font: 'text-center font-sans',
2540
+ active: 'active:bg-primary-active',
2541
+ hover: 'hover:bg-primary-hover',
2542
+ other: 'select-none cursor-pointer',
2543
+ };
2544
+ // TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
2545
+ // Сейчас реализован поиск среди тестовых данных
2546
+ // TODO: Также выяснить что делать когда ничего не найдено
2547
+ // TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
2548
+ const YandexMap = JSX(({ points, className = '', zoom = 5, showSearchField = false }) => {
2425
2549
  const map = useRef(null);
2426
2550
  const yandexMaps = useYandexMaps();
2551
+ const [isFullScreen, setIsFullScreen] = useState();
2552
+ const [pointsToRender, setPointsToRender] = useState(normalizePoints(mockPoints));
2553
+ const pointsCenter = getCenterPoint(points);
2427
2554
  useEffect(() => {
2428
- yandexMaps?.ready(() => {
2429
- map.current = new yandexMaps.Map('map', {
2430
- center: point,
2431
- zoom: 10,
2555
+ if (!map?.current) {
2556
+ yandexMaps?.ready(() => {
2557
+ map.current = new yandexMaps.Map('map', {
2558
+ center: pointsCenter,
2559
+ zoom,
2560
+ controls: [],
2561
+ suppressMapOpenBlock: true,
2562
+ });
2563
+ renderClusterer(yandexMaps, map.current, pointsToRender);
2432
2564
  });
2433
- renderClusterer(yandexMaps, map.current, [point]);
2434
- });
2435
- }, [map, point, yandexMaps]);
2565
+ }
2566
+ }, [yandexMaps, map, pointsToRender]);
2436
2567
  useEffect(() => {
2437
- if (map.current && point && yandexMaps) {
2438
- renderClusterer(yandexMaps, map.current, [point]);
2568
+ if (map.current && pointsToRender && yandexMaps) {
2569
+ const newPoints = pointsToRender.length < 1 ? normalizePoints(mockPoints) : pointsToRender;
2570
+ renderClusterer(yandexMaps, map.current, newPoints);
2439
2571
  }
2440
- }, [map, point, yandexMaps]);
2572
+ }, [map, pointsToRender, yandexMaps]);
2441
2573
  if (!yandexMaps) {
2442
2574
  return null;
2443
2575
  }
2444
- return (jsx("div", { className: "bg-white", children: jsx("div", { id: "map", className: "h-[560px]" }) }));
2576
+ const toggleFullscreen = () => {
2577
+ const container = map.current.container;
2578
+ if (!isFullScreen) {
2579
+ container.enterFullscreen();
2580
+ }
2581
+ else {
2582
+ container.exitFullscreen();
2583
+ }
2584
+ setIsFullScreen(container.isFullscreen());
2585
+ };
2586
+ const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
2587
+ const updatePointsToRender = (newPoints) => {
2588
+ if (newPoints) {
2589
+ const normalizedPoints = normalizePoints(newPoints);
2590
+ setPointsToRender(normalizedPoints);
2591
+ }
2592
+ };
2593
+ return (jsxs("div", { id: "map", className: `${isFullScreen ? '' : 'relative'} w-full ${className}`, children: [jsx("div", { className: `absolute flex left-2 top-4 w-[50%] ${zIndex}`, children: showSearchField
2594
+ ? renderSearchField(mockPoints, yandexMaps, updatePointsToRender)
2595
+ : renderOpenMap(pointsCenter) }), jsx("div", { className: `${Object.values(FULLSCREEN_STYLES).join(' ')} ${zIndex} right-2 top-4 bg-white`, onClick: toggleFullscreen, children: jsx(Icon, { name: "FullScreenIcon", width: "16", height: "16" }) }), jsxs("div", { className: `absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${zIndex}`, children: [jsx(ZoomButton, { yandexMaps: map }), jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map.current, yandexMaps, `right-2 top-80 ${zIndex}`)] }));
2445
2596
  });
2597
+ const getCenterPoint = (points) => [
2598
+ getArraySumAndAverage(mapByIndex(points, 0)),
2599
+ getArraySumAndAverage(mapByIndex(points, 1)),
2600
+ ];
2601
+ const mapByIndex = (arr, index) => arr.map((a) => a[index]);
2602
+ const getArraySumAndAverage = (arr) => arr.reduce((a, b) => a + b) / arr.length;
2603
+ const normalizePoints = (points) => (points ? points.map((_) => _.coords) : null);
2604
+
2605
+ // Добавлено для проверки
2606
+ const nearbyOffices = [
2607
+ { title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
2608
+ { title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
2609
+ { title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
2610
+ ];
2446
2611
 
2447
2612
  const OfficeMap = JSX(({ className = '' }) => {
2448
2613
  const resultOfficeMap = useOfficeMap('063') || OFFICE_MAP;
2449
2614
  const { name, address, gpsLatitude, gpsLongitude, workSchedule } = resultOfficeMap;
2450
- const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday, workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
2615
+ const { workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
2616
+ const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
2451
2617
  const point = gpsLatitude && gpsLongitude ? [gpsLatitude, gpsLongitude] : null;
2452
2618
  const workScheduleWeek = [
2453
2619
  { title: 'Понедельник', status: workingMonday, workTime, lunchHour },
@@ -2469,15 +2635,9 @@
2469
2635
  },
2470
2636
  { title: 'Воскресенье', status: workingSunday },
2471
2637
  ];
2472
- // Добавлено для проверки
2473
- const nearbyOffices = [
2474
- { title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
2475
- { title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
2476
- { title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
2477
- ];
2478
2638
  const currentWeekDayInd = new Date().getDay();
2479
2639
  const currentWeekDay = currentWeekDayInd > 0 ? workScheduleWeek[currentWeekDayInd - 1] : workScheduleWeek[6];
2480
- return (jsxs("div", { className: `flex flex-col font-sans bg-white w-full ${className}`, children: [jsxs("div", { className: "flex flex-col px-12 pt-12", children: [jsxs("div", { className: "flex justify-between", children: [jsx("div", { className: "text-h2", children: name }), renderCurrentDaySchedule(currentWeekDay)] }), jsxs("div", { className: "flex text-l-light pt-4", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24", asSVG: true, className: "pr-1" }), address] }), jsx("div", { className: "flex pt-4", children: nearbyOffices.map(renderNearbyOffice) })] }), jsxs("div", { className: "flex justify-between pt-8", children: [jsx("div", { className: "flex-grow h-full bg-gray", children: point ? jsx(YandexMap$1, { point: point }) : null }), jsx("div", { className: "w-[434px] pl-9 pr-12 pb-14", children: jsx("div", { className: "flex flex-col", children: workScheduleWeek.map(renderDay) }) })] })] }));
2640
+ return (jsxs("div", { className: `flex flex-col font-sans bg-white w-full ${className}`, children: [jsxs("div", { className: "flex flex-col px-12 pt-12", children: [jsxs("div", { className: "flex justify-between", children: [jsx("div", { className: "text-h2", children: name }), renderCurrentDaySchedule(currentWeekDay)] }), jsxs("div", { className: "flex text-l-light pt-4", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24", asSVG: true, className: "pr-1" }), address] }), jsx("div", { className: "flex pt-4", children: nearbyOffices.map(renderNearbyOffice) })] }), jsxs("div", { className: "flex justify-between pt-8", children: [jsx("div", { className: "flex-grow h-full w-full overflow-hidden", children: point ? jsx(YandexMap, { points: [point], className: "h-full" }) : null }), jsx("div", { className: "w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col", children: workScheduleWeek.map(renderDay) })] })] }));
2481
2641
  });
2482
2642
 
2483
2643
  const OfficeServicesBlock = JSX(({ className = '', context, title, servicesList, anchor = '', ...rest }) => {
@@ -2498,10 +2658,19 @@
2498
2658
  return content || defaultContent;
2499
2659
  }
2500
2660
 
2501
- const DefaultFoldButton = JSX(({ className, label, icon, dataTheme = '', onClick }) => (jsxs("button", { className: `border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white flex justify-center cursor-pointer ${className || ''}`, "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
2502
- icon,
2503
- iconVersion: 'white',
2504
- }, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] })));
2661
+ const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
2662
+ const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
2663
+ const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5 mb-[1px]';
2664
+ return (jsxs("button", { className: [
2665
+ 'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
2666
+ STATE_STYLE,
2667
+ DIMENSIONS_STYLE,
2668
+ className,
2669
+ ].join(' '), "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
2670
+ icon,
2671
+ iconVersion: 'white',
2672
+ }, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
2673
+ });
2505
2674
  const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
2506
2675
  const labels = ['Развернуть', 'Скрыть'];
2507
2676
  const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
@@ -2543,7 +2712,7 @@
2543
2712
  const getIconVersion = (isIconWhite, icon) => icon?.iconVersion || isIconWhite ? 'white' : 'normal';
2544
2713
 
2545
2714
  const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
2546
- return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-24 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(ImgInner, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
2715
+ return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-24 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(ImgInner, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(Number(sum), Number(monthLimit))] })] })] }));
2547
2716
  });
2548
2717
  const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
2549
2718
  function renderInsuranceSumMonth(sum, monthLimit) {
@@ -2875,29 +3044,6 @@
2875
3044
  return data || [];
2876
3045
  }
2877
3046
 
2878
- const YandexMap = JSX(({ points }) => {
2879
- const map = useRef(null);
2880
- const yandexMaps = useYandexMaps();
2881
- useEffect(() => {
2882
- yandexMaps?.ready(() => {
2883
- map.current = new yandexMaps.Map('map', {
2884
- center: points[0],
2885
- zoom: 10,
2886
- });
2887
- renderClusterer(yandexMaps, map.current, points);
2888
- });
2889
- }, [yandexMaps]);
2890
- useEffect(() => {
2891
- if (map.current && points && yandexMaps) {
2892
- renderClusterer(yandexMaps, map.current, points);
2893
- }
2894
- }, [map, points, yandexMaps]);
2895
- if (!yandexMaps) {
2896
- return null;
2897
- }
2898
- return (jsxs("div", { className: "pt-12 mt-1 bg-white", children: [jsx(Heading, { title: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", headingType: "h3", className: "mb-8 text-center" }), jsx("div", { id: "map", className: "h-[640px]" })] }));
2899
- });
2900
-
2901
3047
  const DEFAULT_DAYS = 26;
2902
3048
  const SafeDepositRental = JSX(({ title, footnote, context, className = '', ...rest }) => {
2903
3049
  const [showMap, setShowMap] = useState(false);
@@ -2916,7 +3062,7 @@
2916
3062
  setShowMap(!showMap);
2917
3063
  };
2918
3064
  const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
2919
- return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "font-sans bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onShowMapToggle: onShowMapToggle, onChange: handleChangeSafeDepositState }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), points.length && showMap ? jsx(YandexMap, { points: points }) : null] }));
3065
+ return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "font-sans bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onShowMapToggle: onShowMapToggle, onChange: handleChangeSafeDepositState }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), points.length && showMap ? jsx(YandexMap, { points: points, className: "h-[640px]" }) : null] }));
2920
3066
  });
2921
3067
  const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
2922
3068
 
@@ -3093,7 +3239,10 @@
3093
3239
  return (jsxs(Button, { version: "primary", onClick: handleClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать ставки по вкладу' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20", asSVG: true })] }));
3094
3240
  });
3095
3241
 
3096
- const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, rounded: rounded, ...buttonProps }, String(idx)))) })) : null;
3242
+ const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ rounded, ...buttonProps }, idx) => renderButton({
3243
+ button: { rounded, ...buttonProps },
3244
+ buttonClassName: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`,
3245
+ })) })) : null;
3097
3246
  const renderLabelDescriptionCellData = ({ label, description }) => {
3098
3247
  const labelClassName = `text-h6 m-0 ${description ? 'mb-1' : ''}`;
3099
3248
  return (jsxs("div", { children: [label ? jsx("div", { className: labelClassName, children: label }) : null, description ? jsx("div", { className: "text-secondary-text text-l-light", children: description }) : null] }));
@@ -3416,7 +3565,7 @@
3416
3565
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") }));
3417
3566
  }
3418
3567
 
3419
- const packageVersion = "0.6.15";
3568
+ const packageVersion = "0.6.17";
3420
3569
 
3421
3570
  exports.Blocks = Blocks;
3422
3571
  exports.ContentPage = ContentPage;