@redneckz/wildless-cms-uni-blocks 0.6.16 → 0.6.18

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 (489) hide show
  1. package/bin/migration-scripts/0.6.16.js +1 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +309 -168
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Bonus/BonusContent.d.ts +1 -0
  6. package/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  7. package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  8. package/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  9. package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  10. package/bundle/components/OfficeMap/nearbyOffices.d.ts +2 -0
  11. package/bundle/components/OfficeMap/renderFunctions.d.ts +1 -1
  12. package/bundle/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  13. package/bundle/icons/IconName.d.ts +6 -2
  14. package/bundle/ui-kit/Button/ButtonProps.d.ts +5 -1
  15. package/bundle/ui-kit/Button/ButtonSection.d.ts +9 -1
  16. package/bundle/{components/OfficeMap → ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  17. package/bundle/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  18. package/bundle/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  19. package/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  20. package/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  21. package/bundle/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  22. package/bundle/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  23. package/bundle/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  24. package/cosmos-static/icons/FullScreenIcon.svg +1 -0
  25. package/cosmos-static/icons/UserGeoLocationIcon.svg +1 -0
  26. package/dist/components/Bonus/BonusContent.d.ts +1 -0
  27. package/dist/components/Catalog/CatalogCard.js +2 -2
  28. package/dist/components/Catalog/CatalogCard.js.map +1 -1
  29. package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  30. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  31. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  32. package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  33. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  34. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  35. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  36. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  37. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  38. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  39. package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  40. package/dist/components/ExchangeRateTile/renderInput.js +4 -1
  41. package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
  42. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  43. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +43 -0
  44. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  45. package/dist/components/Gallery/GalleryCardInner.js +2 -2
  46. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  47. package/dist/components/Gallery/GalleryInner.js +2 -2
  48. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  49. package/dist/components/Header/DropdownMenu.js +1 -1
  50. package/dist/components/Header/DropdownMenu.js.map +1 -1
  51. package/dist/components/Header/HeaderSubMenu.js +16 -11
  52. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  53. package/dist/components/OfficeMap/OfficeMap.js +6 -10
  54. package/dist/components/OfficeMap/OfficeMap.js.map +1 -1
  55. package/dist/components/OfficeMap/nearbyOffices.d.ts +2 -0
  56. package/dist/components/OfficeMap/nearbyOffices.js +9 -0
  57. package/dist/components/OfficeMap/nearbyOffices.js.map +1 -0
  58. package/dist/components/OfficeMap/renderFunctions.d.ts +1 -1
  59. package/dist/components/OfficeMap/renderFunctions.js +1 -1
  60. package/dist/components/OfficeMap/renderFunctions.js.map +1 -1
  61. package/dist/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  62. package/{mobile/dist/hooks → dist/components/OfficeMap}/useOfficeMap.js +1 -1
  63. package/dist/components/OfficeMap/useOfficeMap.js.map +1 -0
  64. package/dist/components/PictureText/PictureText.js +1 -1
  65. package/dist/components/PictureText/PictureText.js.map +1 -1
  66. package/dist/components/SafeDepositRental/SafeDepositRental.js +2 -2
  67. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  68. package/dist/components/TariffsTable/EmbeddableCellData.js +5 -2
  69. package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  70. package/dist/components/TariffsTable/EmbeddableCellData.mobile.js +5 -2
  71. package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
  72. package/dist/components/TariffsTable/dataFixture.js +2 -4
  73. package/dist/components/TariffsTable/dataFixture.js.map +1 -1
  74. package/dist/icons/IconName.d.ts +6 -2
  75. package/dist/icons/IconName.js +5 -1
  76. package/dist/icons/IconName.js.map +1 -1
  77. package/dist/ui-kit/BlockWrapper.js +4 -3
  78. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  79. package/dist/ui-kit/Button/ButtonProps.d.ts +5 -1
  80. package/dist/ui-kit/Button/ButtonSection.d.ts +9 -1
  81. package/dist/ui-kit/Button/ButtonSection.js +18 -6
  82. package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  83. package/dist/ui-kit/IntersectionObserverTag.js +10 -10
  84. package/dist/ui-kit/IntersectionObserverTag.js.map +1 -1
  85. package/{lib/components/OfficeMap → dist/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  86. package/dist/ui-kit/YandexMap/YandexMap.js +86 -0
  87. package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -0
  88. package/dist/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  89. package/dist/ui-kit/YandexMap/ZoomButton.js +26 -0
  90. package/dist/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  91. package/dist/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  92. package/dist/ui-kit/YandexMap/mockPoints.js +28 -0
  93. package/dist/ui-kit/YandexMap/mockPoints.js.map +1 -0
  94. package/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  95. package/dist/ui-kit/YandexMap/renderClusterer.js +35 -0
  96. package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  97. package/dist/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  98. package/dist/ui-kit/YandexMap/renderOpenMap.js +19 -0
  99. package/dist/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  100. package/dist/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  101. package/dist/ui-kit/YandexMap/renderSearchField.js +31 -0
  102. package/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  103. package/dist/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  104. package/dist/ui-kit/YandexMap/renderUserGeolocation.js +31 -0
  105. package/dist/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  106. package/dist/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  107. package/dist/ui-kit/YandexMap/useYandexMaps.js +11 -0
  108. package/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  109. package/lib/common.css +1 -1
  110. package/lib/components/Bonus/BonusContent.d.ts +1 -0
  111. package/lib/components/Catalog/CatalogCard.js +2 -2
  112. package/lib/components/Catalog/CatalogCard.js.map +1 -1
  113. package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  114. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  115. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  116. package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  117. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  118. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  119. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  120. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  121. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  122. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  123. package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  124. package/lib/components/ExchangeRateTile/renderInput.js +4 -1
  125. package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
  126. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  127. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +39 -0
  128. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  129. package/lib/components/Gallery/GalleryCardInner.js +2 -2
  130. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  131. package/lib/components/Gallery/GalleryInner.js +2 -2
  132. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  133. package/lib/components/Header/DropdownMenu.js +1 -1
  134. package/lib/components/Header/DropdownMenu.js.map +1 -1
  135. package/lib/components/Header/HeaderSubMenu.js +17 -12
  136. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  137. package/lib/components/OfficeMap/OfficeMap.js +6 -10
  138. package/lib/components/OfficeMap/OfficeMap.js.map +1 -1
  139. package/lib/components/OfficeMap/nearbyOffices.d.ts +2 -0
  140. package/lib/components/OfficeMap/nearbyOffices.js +7 -0
  141. package/lib/components/OfficeMap/nearbyOffices.js.map +1 -0
  142. package/lib/components/OfficeMap/renderFunctions.d.ts +1 -1
  143. package/lib/components/OfficeMap/renderFunctions.js +1 -1
  144. package/lib/components/OfficeMap/renderFunctions.js.map +1 -1
  145. package/lib/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  146. package/{mobile/lib/hooks → lib/components/OfficeMap}/useOfficeMap.js +1 -1
  147. package/lib/components/OfficeMap/useOfficeMap.js.map +1 -0
  148. package/lib/components/PictureText/PictureText.js +1 -1
  149. package/lib/components/PictureText/PictureText.js.map +1 -1
  150. package/lib/components/SafeDepositRental/SafeDepositRental.js +2 -2
  151. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  152. package/lib/components/TariffsTable/EmbeddableCellData.js +5 -2
  153. package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  154. package/lib/components/TariffsTable/EmbeddableCellData.mobile.js +5 -2
  155. package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
  156. package/lib/components/TariffsTable/dataFixture.js +2 -4
  157. package/lib/components/TariffsTable/dataFixture.js.map +1 -1
  158. package/lib/icons/IconName.d.ts +6 -2
  159. package/lib/icons/IconName.js +5 -1
  160. package/lib/icons/IconName.js.map +1 -1
  161. package/lib/ui-kit/BlockWrapper.js +4 -3
  162. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  163. package/lib/ui-kit/Button/ButtonProps.d.ts +5 -1
  164. package/lib/ui-kit/Button/ButtonSection.d.ts +9 -1
  165. package/lib/ui-kit/Button/ButtonSection.js +16 -5
  166. package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  167. package/lib/ui-kit/IntersectionObserverTag.js +11 -11
  168. package/lib/ui-kit/IntersectionObserverTag.js.map +1 -1
  169. package/{mobile/bundle/components/OfficeMap → lib/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  170. package/lib/ui-kit/YandexMap/YandexMap.js +84 -0
  171. package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -0
  172. package/lib/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  173. package/lib/ui-kit/YandexMap/ZoomButton.js +24 -0
  174. package/lib/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  175. package/lib/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  176. package/lib/ui-kit/YandexMap/mockPoints.js +26 -0
  177. package/lib/ui-kit/YandexMap/mockPoints.js.map +1 -0
  178. package/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  179. package/lib/ui-kit/YandexMap/renderClusterer.js +32 -0
  180. package/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  181. package/lib/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  182. package/lib/ui-kit/YandexMap/renderOpenMap.js +16 -0
  183. package/lib/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  184. package/lib/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  185. package/lib/ui-kit/YandexMap/renderSearchField.js +28 -0
  186. package/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  187. package/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  188. package/lib/ui-kit/YandexMap/renderUserGeolocation.js +28 -0
  189. package/lib/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  190. package/lib/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  191. package/lib/ui-kit/YandexMap/useYandexMaps.js +8 -0
  192. package/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  193. package/mobile/bundle/bundle.umd.js +36 -22
  194. package/mobile/bundle/bundle.umd.min.js +1 -1
  195. package/mobile/bundle/components/Bonus/BonusContent.d.ts +1 -0
  196. package/mobile/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  197. package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  198. package/mobile/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  199. package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  200. package/mobile/bundle/components/OfficeMap/nearbyOffices.d.ts +2 -0
  201. package/mobile/bundle/components/OfficeMap/renderFunctions.d.ts +1 -1
  202. package/mobile/bundle/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  203. package/mobile/bundle/icons/IconName.d.ts +6 -2
  204. package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +5 -1
  205. package/mobile/bundle/ui-kit/Button/ButtonSection.d.ts +9 -1
  206. package/{dist/components/OfficeMap → mobile/bundle/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
  207. package/mobile/bundle/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  208. package/mobile/bundle/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  209. package/mobile/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  210. package/mobile/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  211. package/mobile/bundle/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  212. package/mobile/bundle/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  213. package/mobile/bundle/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  214. package/mobile/dist/components/Bonus/BonusContent.d.ts +1 -0
  215. package/mobile/dist/components/Catalog/CatalogCard.js +2 -2
  216. package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -1
  217. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  218. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  219. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  220. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  221. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  222. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  223. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  224. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  225. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  226. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  227. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  228. package/mobile/dist/components/ExchangeRateTile/renderInput.js +4 -1
  229. package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
  230. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  231. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +43 -0
  232. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  233. package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
  234. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  235. package/mobile/dist/components/Gallery/GalleryInner.js +2 -2
  236. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  237. package/mobile/dist/components/Header/DropdownMenu.js +1 -1
  238. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  239. package/mobile/dist/components/Header/HeaderSubMenu.js +16 -11
  240. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  241. package/mobile/dist/components/OfficeMap/OfficeMap.js +6 -10
  242. package/mobile/dist/components/OfficeMap/OfficeMap.js.map +1 -1
  243. package/mobile/dist/components/OfficeMap/nearbyOffices.d.ts +2 -0
  244. package/mobile/dist/components/OfficeMap/nearbyOffices.js +9 -0
  245. package/mobile/dist/components/OfficeMap/nearbyOffices.js.map +1 -0
  246. package/mobile/dist/components/OfficeMap/renderFunctions.d.ts +1 -1
  247. package/mobile/dist/components/OfficeMap/renderFunctions.js +1 -1
  248. package/mobile/dist/components/OfficeMap/renderFunctions.js.map +1 -1
  249. package/mobile/dist/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  250. package/{dist/hooks → mobile/dist/components/OfficeMap}/useOfficeMap.js +1 -1
  251. package/mobile/dist/components/OfficeMap/useOfficeMap.js.map +1 -0
  252. package/mobile/dist/components/PictureText/PictureText.js +1 -1
  253. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  254. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +2 -2
  255. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  256. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +5 -2
  257. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  258. package/mobile/dist/components/TariffsTable/dataFixture.js +2 -4
  259. package/mobile/dist/components/TariffsTable/dataFixture.js.map +1 -1
  260. package/mobile/dist/icons/IconName.d.ts +6 -2
  261. package/mobile/dist/icons/IconName.js +5 -1
  262. package/mobile/dist/icons/IconName.js.map +1 -1
  263. package/mobile/dist/ui-kit/BlockWrapper.js +4 -3
  264. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  265. package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +5 -1
  266. package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +9 -1
  267. package/mobile/dist/ui-kit/Button/ButtonSection.js +18 -6
  268. package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  269. package/mobile/dist/ui-kit/IntersectionObserverTag.js +10 -10
  270. package/mobile/dist/ui-kit/IntersectionObserverTag.js.map +1 -1
  271. package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +8 -0
  272. package/mobile/dist/ui-kit/YandexMap/YandexMap.js +86 -0
  273. package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -0
  274. package/mobile/dist/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  275. package/mobile/dist/ui-kit/YandexMap/ZoomButton.js +26 -0
  276. package/mobile/dist/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  277. package/mobile/dist/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  278. package/mobile/dist/ui-kit/YandexMap/mockPoints.js +28 -0
  279. package/mobile/dist/ui-kit/YandexMap/mockPoints.js.map +1 -0
  280. package/mobile/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  281. package/mobile/dist/ui-kit/YandexMap/renderClusterer.js +35 -0
  282. package/mobile/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  283. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  284. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js +19 -0
  285. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  286. package/mobile/dist/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  287. package/mobile/dist/ui-kit/YandexMap/renderSearchField.js +31 -0
  288. package/mobile/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  289. package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  290. package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.js +31 -0
  291. package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  292. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  293. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js +11 -0
  294. package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  295. package/mobile/lib/components/Bonus/BonusContent.d.ts +1 -0
  296. package/mobile/lib/components/Catalog/CatalogCard.js +2 -2
  297. package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -1
  298. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  299. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  300. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
  301. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  302. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  303. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
  304. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
  305. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  306. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
  307. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  308. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
  309. package/mobile/lib/components/ExchangeRateTile/renderInput.js +4 -1
  310. package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
  311. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
  312. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +39 -0
  313. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
  314. package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
  315. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  316. package/mobile/lib/components/Gallery/GalleryInner.js +2 -2
  317. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  318. package/mobile/lib/components/Header/DropdownMenu.js +1 -1
  319. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  320. package/mobile/lib/components/Header/HeaderSubMenu.js +17 -12
  321. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  322. package/mobile/lib/components/OfficeMap/OfficeMap.js +6 -10
  323. package/mobile/lib/components/OfficeMap/OfficeMap.js.map +1 -1
  324. package/mobile/lib/components/OfficeMap/nearbyOffices.d.ts +2 -0
  325. package/mobile/lib/components/OfficeMap/nearbyOffices.js +7 -0
  326. package/mobile/lib/components/OfficeMap/nearbyOffices.js.map +1 -0
  327. package/mobile/lib/components/OfficeMap/renderFunctions.d.ts +1 -1
  328. package/mobile/lib/components/OfficeMap/renderFunctions.js +1 -1
  329. package/mobile/lib/components/OfficeMap/renderFunctions.js.map +1 -1
  330. package/mobile/lib/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
  331. package/{lib/hooks → mobile/lib/components/OfficeMap}/useOfficeMap.js +1 -1
  332. package/mobile/lib/components/OfficeMap/useOfficeMap.js.map +1 -0
  333. package/mobile/lib/components/PictureText/PictureText.js +1 -1
  334. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  335. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +2 -2
  336. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  337. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +5 -2
  338. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
  339. package/mobile/lib/components/TariffsTable/dataFixture.js +2 -4
  340. package/mobile/lib/components/TariffsTable/dataFixture.js.map +1 -1
  341. package/mobile/lib/icons/IconName.d.ts +6 -2
  342. package/mobile/lib/icons/IconName.js +5 -1
  343. package/mobile/lib/icons/IconName.js.map +1 -1
  344. package/mobile/lib/ui-kit/BlockWrapper.js +4 -3
  345. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  346. package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +5 -1
  347. package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +9 -1
  348. package/mobile/lib/ui-kit/Button/ButtonSection.js +16 -5
  349. package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  350. package/mobile/lib/ui-kit/IntersectionObserverTag.js +11 -11
  351. package/mobile/lib/ui-kit/IntersectionObserverTag.js.map +1 -1
  352. package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +8 -0
  353. package/mobile/lib/ui-kit/YandexMap/YandexMap.js +84 -0
  354. package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -0
  355. package/mobile/lib/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
  356. package/mobile/lib/ui-kit/YandexMap/ZoomButton.js +24 -0
  357. package/mobile/lib/ui-kit/YandexMap/ZoomButton.js.map +1 -0
  358. package/mobile/lib/ui-kit/YandexMap/mockPoints.d.ts +5 -0
  359. package/mobile/lib/ui-kit/YandexMap/mockPoints.js +26 -0
  360. package/mobile/lib/ui-kit/YandexMap/mockPoints.js.map +1 -0
  361. package/mobile/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
  362. package/mobile/lib/ui-kit/YandexMap/renderClusterer.js +32 -0
  363. package/mobile/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -0
  364. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
  365. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js +16 -0
  366. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
  367. package/mobile/lib/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
  368. package/mobile/lib/ui-kit/YandexMap/renderSearchField.js +28 -0
  369. package/mobile/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -0
  370. package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
  371. package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.js +28 -0
  372. package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
  373. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
  374. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js +8 -0
  375. package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
  376. package/mobile/src/common.css +9 -0
  377. package/mobile/src/components/Bonus/Bonus.example.json +1 -6
  378. package/mobile/src/components/Bonus/BonusContent.ts +1 -0
  379. package/mobile/src/components/Catalog/CatalogCard.tsx +2 -2
  380. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +8 -6
  381. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +8 -15
  382. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +31 -19
  383. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -13
  384. package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +1 -1
  385. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +5 -2
  386. package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +71 -0
  387. package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
  388. package/mobile/src/components/Gallery/GalleryInner.tsx +2 -2
  389. package/mobile/src/components/Header/DropdownMenu.tsx +5 -5
  390. package/mobile/src/components/Header/HeaderSubMenu.tsx +36 -20
  391. package/mobile/src/components/OfficeMap/OfficeMap.tsx +10 -17
  392. package/mobile/src/components/OfficeMap/nearbyOffices.ts +8 -0
  393. package/mobile/src/components/OfficeMap/renderFunctions.tsx +5 -2
  394. package/mobile/src/{hooks → components/OfficeMap}/useOfficeMap.ts +1 -1
  395. package/mobile/src/components/PictureText/PictureText.tsx +1 -1
  396. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
  397. package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +7 -11
  398. package/mobile/src/components/TariffsTable/dataFixture.tsx +2 -3
  399. package/mobile/src/icons/FullScreenIcon.svg +8 -0
  400. package/mobile/src/icons/IconName.ts +5 -5
  401. package/mobile/src/icons/UserGeoLocationIcon.svg +3 -0
  402. package/mobile/src/ui-kit/BlockWrapper.tsx +5 -3
  403. package/mobile/src/ui-kit/Button/ButtonProps.ts +5 -1
  404. package/mobile/src/ui-kit/Button/ButtonSection.tsx +41 -16
  405. package/mobile/src/ui-kit/IntersectionObserverTag.tsx +13 -17
  406. package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +128 -0
  407. package/mobile/src/ui-kit/YandexMap/ZoomButton.tsx +38 -0
  408. package/mobile/src/ui-kit/YandexMap/mockPoints.ts +30 -0
  409. package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +51 -0
  410. package/mobile/src/ui-kit/YandexMap/renderOpenMap.tsx +26 -0
  411. package/mobile/src/ui-kit/YandexMap/renderSearchField.tsx +51 -0
  412. package/mobile/src/ui-kit/YandexMap/renderUserGeolocation.tsx +43 -0
  413. package/mobile/src/ui-kit/YandexMap/useYandexMaps.ts +11 -0
  414. package/package.json +1 -1
  415. package/src/common.css +9 -0
  416. package/src/components/Bonus/Bonus.example.json +1 -6
  417. package/src/components/Bonus/BonusContent.ts +1 -0
  418. package/src/components/Catalog/Catalog.fixture.tsx +3 -10
  419. package/src/components/Catalog/CatalogCard.tsx +2 -2
  420. package/src/components/ExchangeRateTile/CurrencyTable.tsx +8 -6
  421. package/src/components/ExchangeRateTile/CurrentLocation.tsx +8 -15
  422. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +31 -19
  423. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -13
  424. package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +1 -1
  425. package/src/components/ExchangeRateTile/renderInput.tsx +5 -2
  426. package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +71 -0
  427. package/src/components/Gallery/Gallery.fixture.tsx +1 -2
  428. package/src/components/Gallery/GalleryCardInner.tsx +2 -2
  429. package/src/components/Gallery/GalleryInner.tsx +2 -2
  430. package/src/components/Header/DropdownMenu.tsx +5 -5
  431. package/src/components/Header/HeaderSubMenu.tsx +36 -20
  432. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -14
  433. package/src/components/OfficeMap/OfficeMap.tsx +10 -17
  434. package/src/components/OfficeMap/nearbyOffices.ts +8 -0
  435. package/src/components/OfficeMap/renderFunctions.tsx +5 -2
  436. package/src/{hooks → components/OfficeMap}/useOfficeMap.ts +1 -1
  437. package/src/components/PictureText/PictureText.tsx +1 -1
  438. package/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
  439. package/src/components/StepsBlock/StepsBlock.fixture.tsx +2 -0
  440. package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +7 -11
  441. package/src/components/TariffsTable/EmbeddableCellData.tsx +7 -9
  442. package/src/components/TariffsTable/dataFixture.tsx +2 -3
  443. package/src/icons/FullScreenIcon.svg +8 -0
  444. package/src/icons/IconName.ts +9 -1
  445. package/src/icons/UserGeoLocationIcon.svg +3 -0
  446. package/src/ui-kit/BlockWrapper.tsx +5 -3
  447. package/src/ui-kit/Button/ButtonProps.ts +5 -1
  448. package/src/ui-kit/Button/ButtonSection.tsx +41 -16
  449. package/src/ui-kit/IntersectionObserverTag.tsx +13 -17
  450. package/src/ui-kit/YandexMap/YandexMap.tsx +128 -0
  451. package/src/ui-kit/YandexMap/ZoomButton.tsx +38 -0
  452. package/src/ui-kit/YandexMap/mockPoints.ts +30 -0
  453. package/src/ui-kit/YandexMap/renderClusterer.ts +51 -0
  454. package/src/ui-kit/YandexMap/renderOpenMap.tsx +26 -0
  455. package/src/ui-kit/YandexMap/renderSearchField.tsx +51 -0
  456. package/src/ui-kit/YandexMap/renderUserGeolocation.tsx +43 -0
  457. package/src/ui-kit/YandexMap/useYandexMaps.ts +11 -0
  458. package/bundle/hooks/useExchangeRates.d.ts +0 -2
  459. package/dist/components/OfficeMap/YandexMap.js +0 -30
  460. package/dist/components/OfficeMap/YandexMap.js.map +0 -1
  461. package/dist/hooks/useExchangeRates.d.ts +0 -2
  462. package/dist/hooks/useExchangeRates.js +0 -57
  463. package/dist/hooks/useExchangeRates.js.map +0 -1
  464. package/dist/hooks/useOfficeMap.js.map +0 -1
  465. package/lib/components/OfficeMap/YandexMap.js +0 -28
  466. package/lib/components/OfficeMap/YandexMap.js.map +0 -1
  467. package/lib/hooks/useExchangeRates.d.ts +0 -2
  468. package/lib/hooks/useExchangeRates.js +0 -54
  469. package/lib/hooks/useExchangeRates.js.map +0 -1
  470. package/lib/hooks/useOfficeMap.js.map +0 -1
  471. package/mobile/bundle/hooks/useExchangeRates.d.ts +0 -2
  472. package/mobile/dist/components/OfficeMap/YandexMap.d.ts +0 -5
  473. package/mobile/dist/components/OfficeMap/YandexMap.js +0 -30
  474. package/mobile/dist/components/OfficeMap/YandexMap.js.map +0 -1
  475. package/mobile/dist/hooks/useExchangeRates.d.ts +0 -2
  476. package/mobile/dist/hooks/useExchangeRates.js +0 -57
  477. package/mobile/dist/hooks/useExchangeRates.js.map +0 -1
  478. package/mobile/dist/hooks/useOfficeMap.js.map +0 -1
  479. package/mobile/lib/components/OfficeMap/YandexMap.d.ts +0 -5
  480. package/mobile/lib/components/OfficeMap/YandexMap.js +0 -28
  481. package/mobile/lib/components/OfficeMap/YandexMap.js.map +0 -1
  482. package/mobile/lib/hooks/useExchangeRates.d.ts +0 -2
  483. package/mobile/lib/hooks/useExchangeRates.js +0 -54
  484. package/mobile/lib/hooks/useExchangeRates.js.map +0 -1
  485. package/mobile/lib/hooks/useOfficeMap.js.map +0 -1
  486. package/mobile/src/components/OfficeMap/YandexMap.tsx +0 -41
  487. package/mobile/src/hooks/useExchangeRates.ts +0 -76
  488. package/src/components/OfficeMap/YandexMap.tsx +0 -41
  489. package/src/hooks/useExchangeRates.ts +0 -76
@@ -280,24 +280,27 @@
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.**)
299
299
  const THRESHOLD_ARRAY_LENGTH = 18;
300
300
  const THRESHOLD_ARRAY_START_VALUE = (THRESHOLD_ACCURACY - THRESHOLD_ARRAY_LENGTH) / THRESHOLD_ACCURACY;
301
+ const OBSERVER_OPTIONS = {
302
+ threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
303
+ };
301
304
  const BlockWrapper = JSX(({ anchor, className, children, tag = 'section', labels }) => {
302
305
  const Tag = tag;
303
306
  const [shouldRenderBlock, setShouldRenderBlock] = useState(true);
@@ -326,9 +329,7 @@
326
329
  if (!shouldRenderBlock) {
327
330
  return null;
328
331
  }
329
- return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: observerCallback, observerOptions: {
330
- threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
331
- }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
332
+ return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: observerCallback, observerOptions: OBSERVER_OPTIONS, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
332
333
  });
333
334
  function getIntersectionThreshold(_, i) {
334
335
  const value = (i + 1) / THRESHOLD_ACCURACY + THRESHOLD_ARRAY_START_VALUE;
@@ -639,12 +640,22 @@
639
640
  const ButtonSection = JSX(({ context, className = '', buttons }) => {
640
641
  const { handlerDecorator } = context;
641
642
  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 });
643
+ return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton({ button: useLink({ router, handlerDecorator }, button), index })) })) : null;
647
644
  });
645
+ function renderButton({ button, buttonClassName, index }) {
646
+ const { icon, iconRight, version, ...rest } = button;
647
+ const iconVersion = version === 'secondary' ? 'normal' : 'white';
648
+ const leftIcon = renderButtonIcon({ icon, iconVersion });
649
+ const rightIcon = renderButtonIcon({ icon: iconRight, iconVersion });
650
+ return (jsx(Button, { className: buttonClassName, appendLeft: leftIcon, appendRight: rightIcon, version: version, ...rest }, index ? String(index) : ''));
651
+ }
652
+ const renderButtonIcon = ({ icon, iconVersion }) => {
653
+ if (!icon?.icon && !icon?.src) {
654
+ return null;
655
+ }
656
+ const iconWidth = icon?.size?.width ? `${icon.size.width}` : '24';
657
+ return jsx(ImgInner, { image: { ...icon, iconVersion: iconVersion }, width: iconWidth, height: "24", asSVG: true });
658
+ };
648
659
 
649
660
  const Description = JSX((props) => {
650
661
  const { className = '', description } = props;
@@ -1242,7 +1253,7 @@
1242
1253
  white: 'bg-white',
1243
1254
  };
1244
1255
  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] }));
1256
+ 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
1257
  });
1247
1258
  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
1259
 
@@ -1389,62 +1400,6 @@
1389
1400
  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
1401
  });
1391
1402
 
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
1403
  const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
1449
1404
  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
1405
  });
@@ -1471,11 +1426,16 @@
1471
1426
  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
1427
  });
1473
1428
  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));
1429
+ const currency = exchangeCurrencyItem?.currency?.currency;
1430
+ 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
1431
  };
1477
1432
 
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] })] })));
1433
+ 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" })] })] })));
1434
+
1435
+ const roundTo = (value, precision = 2) => {
1436
+ const factor = 10 ** precision;
1437
+ return Math.round(parseFloat(String(value)) * factor) / factor;
1438
+ };
1479
1439
 
1480
1440
  const calculateResult = (value, rate, precision) => {
1481
1441
  const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
@@ -1544,7 +1504,10 @@
1544
1504
 
1545
1505
  function renderInput(props) {
1546
1506
  const { placeholder, rates, selected, value, setValue, setSelected } = props;
1547
- const ratesOptions = rates.map((_) => ({ key: _.code ?? '', text: _.code ?? '' }));
1507
+ const ratesOptions = rates.map((_) => ({
1508
+ key: _?.currency?.currency ?? '',
1509
+ text: _?.currency?.currency ?? '',
1510
+ }));
1548
1511
  const selectedValue = { key: selected, text: selected };
1549
1512
  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
1513
  }
@@ -1555,8 +1518,8 @@
1555
1518
  const [calcState, setCalcState] = useState({
1556
1519
  inputSell: '',
1557
1520
  inputBuy: '',
1558
- selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
1559
- selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
1521
+ selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
1522
+ selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
1560
1523
  });
1561
1524
  const handleSetCalcState = (newState) => {
1562
1525
  setCalcState((oldState) => ({ ...oldState, ...newState }));
@@ -1582,8 +1545,8 @@
1582
1545
  callbackCurrencySelect({
1583
1546
  value,
1584
1547
  oppositeValue: calcState.selectBuy,
1585
- handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
1586
- handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
1548
+ handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
1549
+ handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, currencyFrom, currencyTo);
1587
1550
  },
1588
1551
  });
1589
1552
  };
@@ -1592,42 +1555,75 @@
1592
1555
  callbackCurrencySelect({
1593
1556
  value,
1594
1557
  oppositeValue: calcState.selectSell,
1595
- handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
1558
+ handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, currencyTo, currencyFrom),
1596
1559
  });
1597
1560
  };
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;
1561
+ const handleInputSell = (setCalcState, currencyRatesSell) => (value, currencyFrom, currencyTo) => {
1562
+ setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
1563
+ const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
1564
+ currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate;
1602
1565
  if (rate) {
1603
1566
  setCalcState({
1604
- inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
1567
+ inputBuy: String(calculateResult(value, rate, currencyFrom === Currency.RUB) || ''),
1605
1568
  });
1606
1569
  }
1607
1570
  };
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;
1571
+ const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, currencyTo, currencyFrom) => {
1572
+ setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
1573
+ const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
1574
+ currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate;
1612
1575
  if (rate) {
1613
1576
  setCalcState({
1614
- inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
1577
+ inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
1615
1578
  });
1616
1579
  }
1617
1580
  };
1618
1581
 
1619
- const DEFAULT_LOCATION = {
1620
- address: 'Москва, ул.Ленина д.28',
1621
- distance: '6км',
1582
+ const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
1583
+ const REGION_URL = '/api/v1/region';
1584
+ function useFetchExchangeRateData() {
1585
+ const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
1586
+ return data || {};
1587
+ }
1588
+ const fetchData = async (urlExchangeRates) => {
1589
+ const region = await fetchRegion();
1590
+ const regionCode = region?.code || '000';
1591
+ const exchangeRates = await fetchExchangeRates(urlExchangeRates, regionCode);
1592
+ return { region, exchangeRates };
1622
1593
  };
1594
+ const fetchRegion = async () => {
1595
+ try {
1596
+ return await fetchJSONUnsafe(REGION_URL, { method: 'GET' });
1597
+ }
1598
+ catch (error) {
1599
+ console.log(error);
1600
+ return {};
1601
+ }
1602
+ };
1603
+ const fetchExchangeRates = async (url, regionCode) => {
1604
+ try {
1605
+ return await fetchJSONUnsafe(url + `?regionCode=${regionCode}`, {
1606
+ method: 'GET',
1607
+ });
1608
+ }
1609
+ catch (error) {
1610
+ console.log(error);
1611
+ return {};
1612
+ }
1613
+ };
1614
+
1623
1615
  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] }) }) }));
1616
+ const { exchangeRates } = useFetchExchangeRateData();
1617
+ const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
1618
+ const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
1619
+ currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
1620
+ const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
1621
+ currencyRatesSell.push({ currency: { currency: Currency.RUB } });
1622
+ 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
1623
  });
1624
+ const getCurrencyRates = (currencies) => {
1625
+ return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
1626
+ };
1631
1627
 
1632
1628
  const ICON_VERSION_MAP = {
1633
1629
  'bg-white': 'normal',
@@ -1850,7 +1846,7 @@
1850
1846
  });
1851
1847
 
1852
1848
  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] }));
1849
+ 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
1850
  });
1855
1851
  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
1852
  const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
@@ -1879,7 +1875,7 @@
1879
1875
  isShown: [showPrevButton, showNextButton],
1880
1876
  btnClass: ['left-8', 'right-8'],
1881
1877
  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] }));
1878
+ }), 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
1879
  });
1884
1880
 
1885
1881
  const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
@@ -2005,32 +2001,37 @@
2005
2001
  });
2006
2002
  const renderDotsSubMenuItems = ({ menuItems, router, handlerDecorator, activeSubItem, }) => {
2007
2003
  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)));
2004
+ 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
2005
  };
2010
2006
  const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
2011
2007
 
2012
2008
  const HeaderSubMenu = JSX(({ context, subItems = [], bgColor }) => {
2013
- const [menuVisible, setMenuVisible] = useState(false);
2014
- const router = context.useRouter();
2015
2009
  const { handlerDecorator } = context;
2010
+ const router = context.useRouter();
2011
+ const subItemsListRef = useRef(null);
2012
+ const [menuVisible, setMenuVisible] = useState(false);
2016
2013
  const [visibleItemsCount, setVisibleItemsCount] = useState(subItems.length);
2017
2014
  const dropDownMenuItems = subItems.slice(visibleItemsCount);
2018
- const activeSubItem = findActiveSubItem(router)(subItems);
2019
- const toggleMenu = () => setMenuVisible(!menuVisible);
2020
- const observerCallback = (itemIndex) => (entries) => {
2015
+ const observerOptions = useMemo(() => ({ threshold: 1, root: subItemsListRef.current }), [subItemsListRef.current]);
2016
+ const observerCallbacks = useMemo(() => subItems.map((_, index) => (entries) => {
2021
2017
  if (!entries.length) {
2022
2018
  return;
2023
2019
  }
2024
- const entry = entries[0];
2025
- if (entry.intersectionRatio < 1) {
2026
- setVisibleItemsCount((prev) => Math.min(prev, itemIndex));
2020
+ // Assumption about sorting entries by time
2021
+ const entry = entries[entries.length - 1];
2022
+ if (entry.isIntersecting) {
2023
+ setVisibleItemsCount(handleIntersectionActivation(index));
2027
2024
  }
2028
2025
  else {
2029
- setVisibleItemsCount((prev) => Math.max(prev, itemIndex + 1));
2026
+ setVisibleItemsCount(handleIntersectionDeactivation(index));
2030
2027
  }
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] }));
2028
+ }), [subItems]);
2029
+ const activeSubItem = findActiveSubItem(router)(subItems);
2030
+ const toggleMenu = () => setMenuVisible(!menuVisible);
2031
+ 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
2032
  });
2033
+ const handleIntersectionActivation = (index) => (prev) => Math.max(prev, index + 1);
2034
+ const handleIntersectionDeactivation = (index) => (prev) => Math.min(prev, index);
2034
2035
 
2035
2036
  const BORDER_COLORS = {
2036
2037
  'bg-white': 'bg-main-divider',
@@ -2341,7 +2342,7 @@
2341
2342
  const lunchHourText = hasTime ? `Перерыв ${lunchHour}` : lunchHour;
2342
2343
  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
2344
  };
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}`));
2345
+ 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
2346
  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
2347
  const renderLunchHour = (lunchHour) => {
2347
2348
  const hasTime = /\d+/gi.test(lunchHour);
@@ -2380,6 +2381,72 @@
2380
2381
  });
2381
2382
  }
2382
2383
 
2384
+ const styles$3 = {
2385
+ focus: 'focus:border-primary-focus focus:border',
2386
+ hover: 'hover:bg-primary-hover',
2387
+ active: 'active:bg-primary-active',
2388
+ border: 'border border-transparent rounded-md',
2389
+ position: 'flex items-center justify-center',
2390
+ font: 'text-center font-sans',
2391
+ };
2392
+ const renderOpenMap = (pointsCenter) => {
2393
+ const getYandexMapUrl = () => {
2394
+ return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
2395
+ };
2396
+ 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" }));
2397
+ };
2398
+
2399
+ const styles$2 = {
2400
+ border: 'border border-transparent rounded-md',
2401
+ position: 'relative flex items-center',
2402
+ font: 'text-center font-sans',
2403
+ shadow: 'shadow-[0_4px_25px_rgba(0,0,0,0.07)]',
2404
+ };
2405
+ const renderSearchField = (points, yandexMaps, updatePointsToRender) => {
2406
+ const onChange = (e) => {
2407
+ const value = e.target?.value ? e.target?.value.toLowerCase() : '';
2408
+ if (value) {
2409
+ const searchResult = points.filter((_) => {
2410
+ const textLowerCase = _.text.toLowerCase();
2411
+ if (textLowerCase.indexOf(value) > -1) {
2412
+ return _;
2413
+ }
2414
+ return null;
2415
+ });
2416
+ updatePointsToRender(searchResult);
2417
+ }
2418
+ else {
2419
+ updatePointsToRender(null);
2420
+ }
2421
+ };
2422
+ 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" })] }));
2423
+ };
2424
+
2425
+ const styles$1 = {
2426
+ focus: 'focus:border-primary-focus focus:border',
2427
+ hover: 'hover:bg-primary-hover',
2428
+ active: 'active:bg-primary-active',
2429
+ border: 'border border-transparent rounded-md',
2430
+ position: 'absolute flex items-center justify-center',
2431
+ font: 'text-center font-sans',
2432
+ };
2433
+ const renderUserGeolocation = (map, yandexMaps, className) => {
2434
+ const setUserGeoLocation = () => {
2435
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2436
+ // @ts-ignore
2437
+ yandexMaps.geolocation
2438
+ .get({
2439
+ provider: 'yandex',
2440
+ autoReverseGeocode: true,
2441
+ mapStateAutoApply: true,
2442
+ })
2443
+ .then(function (result) {
2444
+ map.geoObjects.add(result.geoObjects);
2445
+ });
2446
+ };
2447
+ 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" }) }));
2448
+ };
2449
+
2383
2450
  const getNS = (_) => globalThis[_];
2384
2451
  function useExternalNS(namespaceName, url) {
2385
2452
  const [externalNS, setExternalNS] = useState();
@@ -2417,37 +2484,137 @@
2417
2484
  const YMAPS_NAMESPACE = 'ymaps';
2418
2485
  const useYandexMaps = () => {
2419
2486
  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
- };
2487
+ return useExternalNS(YMAPS_NAMESPACE, url);
2488
+ };
2489
+
2490
+ const styles = {
2491
+ focus: 'focus:border-primary-focus focus:border',
2492
+ hover: 'hover:bg-primary-hover',
2493
+ active: 'active:bg-primary-active',
2494
+ border: 'border-b border-b-2 border-gray last:border-0',
2495
+ position: 'relative flex items-center justify-center',
2496
+ font: 'text-center font-sans text-l',
2497
+ };
2498
+ // TODO: Добавить метод определения центральной точки
2499
+ const ZoomButton = JSX(({ yandexMaps, direction = 'in' }) => {
2500
+ const iconName = direction === 'in' ? 'PlusIcon' : 'MinusIcon';
2501
+ const changeZoom = () => {
2502
+ const currentZoom = yandexMaps.current.getZoom();
2503
+ const newZoom = direction === 'in' ? currentZoom + 1 : currentZoom - 1;
2504
+ yandexMaps.current.setZoom(newZoom, { checkZoomRange: true });
2505
+ };
2506
+ 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" }) }));
2507
+ });
2508
+
2509
+ const mockPoints = [
2510
+ { coords: [55.77, 37.46], text: 'Трактир' },
2511
+ { coords: [55.66, 37.48], text: 'Трактор' },
2512
+ { coords: [55.65, 37.42], text: 'Ресторан' },
2513
+ { coords: [55.64, 37.54], text: 'Музей' },
2514
+ { coords: [55.54, 37.52], text: 'Библиотека' },
2515
+ { coords: [55.53, 37.56], text: 'Школа' },
2516
+ { coords: [55.61, 37.61], text: 'Аптека' },
2517
+ { coords: [55.8, 37.58], text: 'Бар' },
2518
+ { coords: [55.71, 37.35], text: 'Институт' },
2519
+ { coords: [55.74, 37.57], text: 'Университет' },
2520
+ { coords: [55.58, 37.69], text: 'Больница' },
2521
+ { coords: [55.57, 37.7], text: 'Цирк' },
2522
+ { coords: [55.55, 37.64], text: 'Магазин' },
2523
+ { coords: [55.5, 37.75], text: 'Булочная' },
2524
+ { coords: [55.81, 37.73], text: 'Полиция' },
2525
+ { coords: [55.73, 37.68], text: 'Салон красоты' },
2526
+ { coords: [55.86, 37.76], text: 'Баня' },
2527
+ { coords: [55.38, 37.69], text: 'Гараж' },
2528
+ { coords: [55.91, 37.5], text: 'Дом' },
2529
+ { coords: [55.62, 37.32], text: 'Прачечная' },
2530
+ { coords: [55.85, 37.41], text: 'Стадион' },
2531
+ { coords: [55.67, 37.24], text: 'Вокзал' },
2532
+ { coords: [55.79, 37.41], text: 'Кафе' },
2533
+ ];
2423
2534
 
2424
- const YandexMap$1 = JSX(({ point }) => {
2535
+ const FULLSCREEN_STYLES = {
2536
+ border: 'border border-transparent rounded-md ',
2537
+ position: 'absolute flex items-center justify-center',
2538
+ size: 'w-12 h-12',
2539
+ focus: 'focus:border-primary-focus focus:border',
2540
+ font: 'text-center font-sans',
2541
+ active: 'active:bg-primary-active',
2542
+ hover: 'hover:bg-primary-hover',
2543
+ other: 'select-none cursor-pointer',
2544
+ };
2545
+ // TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
2546
+ // Сейчас реализован поиск среди тестовых данных
2547
+ // TODO: Также выяснить что делать когда ничего не найдено
2548
+ // TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
2549
+ const YandexMap = JSX(({ points, className = '', zoom = 5, showSearchField = false }) => {
2425
2550
  const map = useRef(null);
2426
2551
  const yandexMaps = useYandexMaps();
2552
+ const [isFullScreen, setIsFullScreen] = useState();
2553
+ const [pointsToRender, setPointsToRender] = useState(normalizePoints(mockPoints));
2554
+ const pointsCenter = getCenterPoint(points);
2427
2555
  useEffect(() => {
2428
- yandexMaps?.ready(() => {
2429
- map.current = new yandexMaps.Map('map', {
2430
- center: point,
2431
- zoom: 10,
2556
+ if (!map?.current) {
2557
+ yandexMaps?.ready(() => {
2558
+ map.current = new yandexMaps.Map('map', {
2559
+ center: pointsCenter,
2560
+ zoom,
2561
+ controls: [],
2562
+ suppressMapOpenBlock: true,
2563
+ });
2564
+ renderClusterer(yandexMaps, map.current, pointsToRender);
2432
2565
  });
2433
- renderClusterer(yandexMaps, map.current, [point]);
2434
- });
2435
- }, [map, point, yandexMaps]);
2566
+ }
2567
+ }, [yandexMaps, map, pointsToRender]);
2436
2568
  useEffect(() => {
2437
- if (map.current && point && yandexMaps) {
2438
- renderClusterer(yandexMaps, map.current, [point]);
2569
+ if (map.current && pointsToRender && yandexMaps) {
2570
+ const newPoints = pointsToRender.length < 1 ? normalizePoints(mockPoints) : pointsToRender;
2571
+ renderClusterer(yandexMaps, map.current, newPoints);
2439
2572
  }
2440
- }, [map, point, yandexMaps]);
2573
+ }, [map, pointsToRender, yandexMaps]);
2441
2574
  if (!yandexMaps) {
2442
2575
  return null;
2443
2576
  }
2444
- return (jsx("div", { className: "bg-white", children: jsx("div", { id: "map", className: "h-[560px]" }) }));
2577
+ const toggleFullscreen = () => {
2578
+ const container = map.current.container;
2579
+ if (!isFullScreen) {
2580
+ container.enterFullscreen();
2581
+ }
2582
+ else {
2583
+ container.exitFullscreen();
2584
+ }
2585
+ setIsFullScreen(container.isFullscreen());
2586
+ };
2587
+ const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
2588
+ const updatePointsToRender = (newPoints) => {
2589
+ if (newPoints) {
2590
+ const normalizedPoints = normalizePoints(newPoints);
2591
+ setPointsToRender(normalizedPoints);
2592
+ }
2593
+ };
2594
+ 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
2595
+ ? renderSearchField(mockPoints, yandexMaps, updatePointsToRender)
2596
+ : 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
2597
  });
2598
+ const getCenterPoint = (points) => [
2599
+ getArraySumAndAverage(mapByIndex(points, 0)),
2600
+ getArraySumAndAverage(mapByIndex(points, 1)),
2601
+ ];
2602
+ const mapByIndex = (arr, index) => arr.map((a) => a[index]);
2603
+ const getArraySumAndAverage = (arr) => arr.reduce((a, b) => a + b) / arr.length;
2604
+ const normalizePoints = (points) => (points ? points.map((_) => _.coords) : null);
2605
+
2606
+ // Добавлено для проверки
2607
+ const nearbyOffices = [
2608
+ { title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
2609
+ { title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
2610
+ { title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
2611
+ ];
2446
2612
 
2447
2613
  const OfficeMap = JSX(({ className = '' }) => {
2448
2614
  const resultOfficeMap = useOfficeMap('063') || OFFICE_MAP;
2449
2615
  const { name, address, gpsLatitude, gpsLongitude, workSchedule } = resultOfficeMap;
2450
- const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday, workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
2616
+ const { workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
2617
+ const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
2451
2618
  const point = gpsLatitude && gpsLongitude ? [gpsLatitude, gpsLongitude] : null;
2452
2619
  const workScheduleWeek = [
2453
2620
  { title: 'Понедельник', status: workingMonday, workTime, lunchHour },
@@ -2469,15 +2636,9 @@
2469
2636
  },
2470
2637
  { title: 'Воскресенье', status: workingSunday },
2471
2638
  ];
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
2639
  const currentWeekDayInd = new Date().getDay();
2479
2640
  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) }) })] })] }));
2641
+ 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
2642
  });
2482
2643
 
2483
2644
  const OfficeServicesBlock = JSX(({ className = '', context, title, servicesList, anchor = '', ...rest }) => {
@@ -2552,7 +2713,7 @@
2552
2713
  const getIconVersion = (isIconWhite, icon) => icon?.iconVersion || isIconWhite ? 'white' : 'normal';
2553
2714
 
2554
2715
  const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
2555
- 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)] })] })] }));
2716
+ 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))] })] })] }));
2556
2717
  });
2557
2718
  const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
2558
2719
  function renderInsuranceSumMonth(sum, monthLimit) {
@@ -2884,29 +3045,6 @@
2884
3045
  return data || [];
2885
3046
  }
2886
3047
 
2887
- const YandexMap = JSX(({ points }) => {
2888
- const map = useRef(null);
2889
- const yandexMaps = useYandexMaps();
2890
- useEffect(() => {
2891
- yandexMaps?.ready(() => {
2892
- map.current = new yandexMaps.Map('map', {
2893
- center: points[0],
2894
- zoom: 10,
2895
- });
2896
- renderClusterer(yandexMaps, map.current, points);
2897
- });
2898
- }, [yandexMaps]);
2899
- useEffect(() => {
2900
- if (map.current && points && yandexMaps) {
2901
- renderClusterer(yandexMaps, map.current, points);
2902
- }
2903
- }, [map, points, yandexMaps]);
2904
- if (!yandexMaps) {
2905
- return null;
2906
- }
2907
- 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]" })] }));
2908
- });
2909
-
2910
3048
  const DEFAULT_DAYS = 26;
2911
3049
  const SafeDepositRental = JSX(({ title, footnote, context, className = '', ...rest }) => {
2912
3050
  const [showMap, setShowMap] = useState(false);
@@ -2925,7 +3063,7 @@
2925
3063
  setShowMap(!showMap);
2926
3064
  };
2927
3065
  const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
2928
- 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] }));
3066
+ 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] }));
2929
3067
  });
2930
3068
  const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
2931
3069
 
@@ -3102,7 +3240,10 @@
3102
3240
  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 })] }));
3103
3241
  });
3104
3242
 
3105
- 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;
3243
+ const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ rounded, ...buttonProps }, idx) => renderButton({
3244
+ button: { rounded, ...buttonProps },
3245
+ buttonClassName: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`,
3246
+ })) })) : null;
3106
3247
  const renderLabelDescriptionCellData = ({ label, description }) => {
3107
3248
  const labelClassName = `text-h6 m-0 ${description ? 'mb-1' : ''}`;
3108
3249
  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] }));
@@ -3425,7 +3566,7 @@
3425
3566
  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") }));
3426
3567
  }
3427
3568
 
3428
- const packageVersion = "0.6.16";
3569
+ const packageVersion = "0.6.18";
3429
3570
 
3430
3571
  exports.Blocks = Blocks;
3431
3572
  exports.ContentPage = ContentPage;