@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
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSection.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/ButtonSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAWlC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAqB,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAC5F,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAEnC,OAAO,OAAO,IAAI,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAClC,cAAK,SAAS,EAAE,SAAS,YACtB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,KAAC,iBAAiB,IAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAElC,MAAM,EAAE,MAAM,IADT,MAAM,CAAC,KAAK,CAAC,CAElB,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC;AAEH,MAAM,iB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';
3
+ import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
4
4
  export const IntersectionObserverTag = JSX((props) => {
5
5
  const { tag = 'section', observerCallback, observerOptions, className = '', anchor = null, children, } = props;
6
- const intersectionObserver = useRef(null);
7
- const ref = useCallback((element) => {
8
- if (!element) {
9
- return;
6
+ const tagRef = useRef(null);
7
+ useEffect(() => {
8
+ if (!tagRef.current) {
9
+ return undefined;
10
10
  }
11
- if (intersectionObserver.current) {
12
- intersectionObserver.current.disconnect();
13
- }
14
- intersectionObserver.current = new IntersectionObserver(observerCallback, observerOptions);
15
- intersectionObserver.current.observe(element);
11
+ const intersectionObserver = new IntersectionObserver(observerCallback, observerOptions);
12
+ intersectionObserver.observe(tagRef.current);
13
+ return () => {
14
+ intersectionObserver.disconnect();
15
+ };
16
16
  }, [observerCallback, observerOptions]);
17
17
  const Tag = tag;
18
- return (_jsx(Tag, { ref: ref, className: className, id: anchor, children: children }));
18
+ return (_jsx(Tag, { ref: tagRef, className: className, id: anchor, children: children }));
19
19
  });
20
20
  //# sourceMappingURL=IntersectionObserverTag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntersectionObserverTag.js","sourceRoot":"","sources":["../../src/ui-kit/IntersectionObserverTag.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAYlE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAA+B,CAAC,KAAK,EAAE,EAAE;IACjF,MAAM,EACJ,GAAG,GAAG,SAAS,EACf,gBAAgB,EAChB,eAAe,EACf,SAAS,GAAG,EAAE,EACd,MAAM,GAAG,IAAI,EACb,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,MAAM,oBAAoB,GAAG,MAAM,CAA8B,IAAI,CAAC,CAAC;IAEvE,MAAM,GAAG,GAAG,WAAW,CACrB,CAAC,OAA2B,EAAE,E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OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE7C,OAAO,GAAG,EAAE;YACV,oBAAoB,CAAC,UAAU,EAAE,CAAC;QACpC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC;IAExC,MAAM,GAAG,GAAG,GAAU,CAAC;IAEvB,OAAO,CACL,KAAC,GAAG,IAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,YAC/C,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ interface YandexMapProps {
2
+ points: number[][];
3
+ className?: string;
4
+ zoom?: number;
5
+ showSearchField?: boolean;
6
+ }
7
+ export declare const YandexMap: import("@redneckz/uni-jsx").UNIComponent<YandexMapProps, any, any>;
8
+ export {};
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3
+ // @ts-nocheck
4
+ import { JSX } from '@redneckz/uni-jsx';
5
+ import { useEffect, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
6
+ import { renderClusterer } from './renderClusterer.js';
7
+ import { renderOpenMap } from './renderOpenMap.js';
8
+ import { renderSearchField } from './renderSearchField.js';
9
+ import { renderUserGeolocation } from './renderUserGeolocation.js';
10
+ import { useYandexMaps } from './useYandexMaps.js';
11
+ import { Icon } from '../Icon/Icon.js';
12
+ import { ZoomButton } from './ZoomButton.js';
13
+ import { mockPoints } from './mockPoints.js';
14
+ const FULLSCREEN_STYLES = {
15
+ border: 'border border-transparent rounded-md ',
16
+ position: 'absolute flex items-center justify-center',
17
+ size: 'w-12 h-12',
18
+ focus: 'focus:border-primary-focus focus:border',
19
+ font: 'text-center font-sans',
20
+ active: 'active:bg-primary-active',
21
+ hover: 'hover:bg-primary-hover',
22
+ other: 'select-none cursor-pointer',
23
+ };
24
+ // TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
25
+ // Сейчас реализован поиск среди тестовых данных
26
+ // TODO: Также выяснить что делать когда ничего не найдено
27
+ // TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
28
+ export const YandexMap = JSX(({ points, className = '', zoom = 5, showSearchField = false }) => {
29
+ const map = useRef(null);
30
+ const yandexMaps = useYandexMaps();
31
+ const [isFullScreen, setIsFullScreen] = useState();
32
+ const [pointsToRender, setPointsToRender] = useState(normalizePoints(mockPoints));
33
+ const pointsCenter = getCenterPoint(points);
34
+ useEffect(() => {
35
+ if (!map?.current) {
36
+ yandexMaps?.ready(() => {
37
+ map.current = new yandexMaps.Map('map', {
38
+ center: pointsCenter,
39
+ zoom,
40
+ controls: [],
41
+ suppressMapOpenBlock: true,
42
+ });
43
+ renderClusterer(yandexMaps, map.current, pointsToRender);
44
+ });
45
+ }
46
+ }, [yandexMaps, map, pointsToRender]);
47
+ useEffect(() => {
48
+ if (map.current && pointsToRender && yandexMaps) {
49
+ const newPoints = pointsToRender.length < 1 ? normalizePoints(mockPoints) : pointsToRender;
50
+ renderClusterer(yandexMaps, map.current, newPoints);
51
+ }
52
+ }, [map, pointsToRender, yandexMaps]);
53
+ if (!yandexMaps) {
54
+ return null;
55
+ }
56
+ const toggleFullscreen = () => {
57
+ const container = map.current.container;
58
+ if (!isFullScreen) {
59
+ container.enterFullscreen();
60
+ }
61
+ else {
62
+ container.exitFullscreen();
63
+ }
64
+ setIsFullScreen(container.isFullscreen());
65
+ };
66
+ const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
67
+ const updatePointsToRender = (newPoints) => {
68
+ if (newPoints) {
69
+ const normalizedPoints = normalizePoints(newPoints);
70
+ setPointsToRender(normalizedPoints);
71
+ }
72
+ };
73
+ 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
74
+ ? renderSearchField(mockPoints, yandexMaps, updatePointsToRender)
75
+ : 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}`)] }));
76
+ });
77
+ const getCenterPoint = (points) => [
78
+ getArraySumAndAverage(mapByIndex(points, 0)),
79
+ getArraySumAndAverage(mapByIndex(points, 1)),
80
+ ];
81
+ const mapByIndex = (arr, index) => arr.map((a) => a[index]);
82
+ const getArraySumAndAverage = (arr) => arr.reduce((a, b) => a + b) / arr.length;
83
+ const normalizePoints = (points) => (points ? points.map((_) => _.coords) : null);
84
+ //# sourceMappingURL=YandexMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YandexMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/YandexMap.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,cAAc;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EA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AAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;AAE5F,MAAM,eAAe,GAAG,CAAC,MAAkB,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import ymaps from 'yandex-maps';
2
+ interface ZoomButtonProps {
3
+ yandexMaps: ymaps.Map;
4
+ direction?: string;
5
+ }
6
+ export declare const ZoomButton: import("@redneckz/uni-jsx").UNIComponent<ZoomButtonProps, any, any>;
7
+ export {};
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3
+ // @ts-nocheck
4
+ import { JSX } from '@redneckz/uni-jsx';
5
+ import { Icon } from '../Icon/Icon.js';
6
+ const styles = {
7
+ focus: 'focus:border-primary-focus focus:border',
8
+ hover: 'hover:bg-primary-hover',
9
+ active: 'active:bg-primary-active',
10
+ border: 'border-b border-b-2 border-gray last:border-0',
11
+ position: 'relative flex items-center justify-center',
12
+ font: 'text-center font-sans text-l',
13
+ };
14
+ // TODO: Добавить метод определения центральной точки
15
+ export const ZoomButton = JSX(({ yandexMaps, direction = 'in' }) => {
16
+ const iconName = direction === 'in' ? 'PlusIcon' : 'MinusIcon';
17
+ const changeZoom = () => {
18
+ const currentZoom = yandexMaps.current.getZoom();
19
+ const newZoom = direction === 'in' ? currentZoom + 1 : currentZoom - 1;
20
+ yandexMaps.current.setZoom(newZoom, { checkZoomRange: true });
21
+ };
22
+ 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" }) }));
23
+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AAC,MAAM,EAAC,IAAI,GAAG,GAC3C,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare type MockPoints = {
2
+ coords: number[];
3
+ text: string;
4
+ };
5
+ export declare const mockPoints: MockPoints[];
@@ -0,0 +1,26 @@
1
+ export const mockPoints = [
2
+ { coords: [55.77, 37.46], text: 'Трактир' },
3
+ { coords: [55.66, 37.48], text: 'Трактор' },
4
+ { coords: [55.65, 37.42], text: 'Ресторан' },
5
+ { coords: [55.64, 37.54], text: 'Музей' },
6
+ { coords: [55.54, 37.52], text: 'Библиотека' },
7
+ { coords: [55.53, 37.56], text: 'Школа' },
8
+ { coords: [55.61, 37.61], text: 'Аптека' },
9
+ { coords: [55.8, 37.58], text: 'Бар' },
10
+ { coords: [55.71, 37.35], text: 'Институт' },
11
+ { coords: [55.74, 37.57], text: 'Университет' },
12
+ { coords: [55.58, 37.69], text: 'Больница' },
13
+ { coords: [55.57, 37.7], text: 'Цирк' },
14
+ { coords: [55.55, 37.64], text: 'Магазин' },
15
+ { coords: [55.5, 37.75], text: 'Булочная' },
16
+ { coords: [55.81, 37.73], text: 'Полиция' },
17
+ { coords: [55.73, 37.68], text: 'Салон красоты' },
18
+ { coords: [55.86, 37.76], text: 'Баня' },
19
+ { coords: [55.38, 37.69], text: 'Гараж' },
20
+ { coords: [55.91, 37.5], text: 'Дом' },
21
+ { coords: [55.62, 37.32], text: 'Прачечная' },
22
+ { coords: [55.85, 37.41], text: 'Стадион' },
23
+ { coords: [55.67, 37.24], text: 'Вокзал' },
24
+ { coords: [55.79, 37.41], text: 'Кафе' },
25
+ ];
26
+ //# sourceMappingURL=mockPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockPoints.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/mockPoints.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAA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AC3C,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE;IACjD,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;IACxC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;IACzC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;IACtC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE;IAC7C,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1C,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;CACzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import ymaps from 'yandex-maps';
2
+ export declare function renderClusterer(yandexMaps: typeof ymaps, map: ymaps.Map, points: number[][]): void;
@@ -0,0 +1,32 @@
1
+ export function renderClusterer(yandexMaps, map, points) {
2
+ map.geoObjects.removeAll();
3
+ const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
4
+ const clusterer = new yandexMaps.Clusterer({
5
+ clusterIcons: [
6
+ {
7
+ href: 'icons/MapMarkerClusterIcon.svg',
8
+ size: [78, 84],
9
+ offset: [-35, -50],
10
+ },
11
+ ],
12
+ clusterIconContentLayout,
13
+ clusterHideIconOnBalloonOpen: false,
14
+ geoObjectHideIconOnBalloonOpen: false,
15
+ });
16
+ const geoObjects = points.map((point) => new yandexMaps.Placemark(point, {}, {
17
+ iconLayout: 'default#image',
18
+ iconImageHref: 'icons/MapMarkerSingleIcon.svg',
19
+ iconImageSize: [78, 84],
20
+ iconImageOffset: [-35, -50],
21
+ }));
22
+ clusterer.add(geoObjects);
23
+ map.geoObjects.add(clusterer);
24
+ // TODO: Fix
25
+ // @ts-ignore
26
+ map.setBounds(yandexMaps.util.bounds.fromPoints(points)).then(() => {
27
+ if (map.getZoom() > 10) {
28
+ map.setZoom(10);
29
+ }
30
+ });
31
+ }
32
+ //# sourceMappingURL=renderClusterer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderClusterer.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderClusterer.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,eAAe,CAAC,UAAwB,EAAE,GAAc,EAAE,MAAkB;IAC1F,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;IAE3B,MAAM,wBAAwB,GAAG,UAAU,CAAC,qBAAqB,CAAC,WAAW,CAC3E,uEAAuE,CACxE,CAAC;IAEF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC;QACzC,YAAY,EAAE;YACZ;gBACE,IAAI,EAAE,gCAAgC;gBACtC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;gBACd,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;aACnB;SACF;QACD,wBAAwB;QACxB,4BAA4B,EAAE,KAAK;QACnC,8BAA8B,EAAE,KAAK;KACX,CAAC,CAAC;IAE9B,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAC3B,CAAC,KAAK,EAAE,EAAE,CACR,IAAI,UAAU,CAAC,SAAS,CACtB,KAAK,EACL,EAAE,EACF;QACE,UAAU,EAAE,eAAe;QAC3B,aAAa,EAAE,+BAA+B;QAC9C,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;KAC5B,CACF,CACJ,CAAC;IAEF,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAE1B,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,SAAgB,CAAC,CAAC;IAErC,YAAY;IACZ,aAAa;IACb,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACjE,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;YACtB,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SACjB;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const renderOpenMap: (pointsCenter: number[]) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ const styles = {
3
+ focus: 'focus:border-primary-focus focus:border',
4
+ hover: 'hover:bg-primary-hover',
5
+ active: 'active:bg-primary-active',
6
+ border: 'border border-transparent rounded-md',
7
+ position: 'flex items-center justify-center',
8
+ font: 'text-center font-sans',
9
+ };
10
+ export const renderOpenMap = (pointsCenter) => {
11
+ const getYandexMapUrl = () => {
12
+ return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
13
+ };
14
+ return (_jsx("a", { className: `select-none cursor-pointer px-9 h-12 bg-white bg-primary-main text-white ${Object.values(styles).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
15
+ };
16
+ //# sourceMappingURL=renderOpenMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderOpenMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderOpenMap.tsx"],"names":[],"mappings":";AAAA,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,yCAAyC;IAChD,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,0BAA0B;IAClC,MAAM,EAAE,sCAAsC;IAC9C,QAAQ,EAAE,kCAAkC;IAC5C,IAAI,EAAE,uBAAuB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,YAAsB,EAAE,EAAE;IACtD,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,OAAO,8BAA8B,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;IACvF,CAAC,CAAC;IAEF,OAAO,CACL,YACE,SAAS,EAAE,4EAA4E,MAAM,CAAC,MAAM,CAClG,MAAM,CACP,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACb,IAAI,EAAE,eAAe,EAAE,EACvB,MAAM,EAAC,QAAQ,uGAGb,CACL,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { MockPoints } from './mockPoints';
3
+ import ymaps from 'yandex-maps';
4
+ export declare const renderSearchField: (points: MockPoints[], yandexMaps: ymaps.Map, updatePointsToRender: (any: MockPoints[] | null) => void) => JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { Icon } from '../Icon/Icon.js';
3
+ const styles = {
4
+ border: 'border border-transparent rounded-md',
5
+ position: 'relative flex items-center',
6
+ font: 'text-center font-sans',
7
+ shadow: 'shadow-[0_4px_25px_rgba(0,0,0,0.07)]',
8
+ };
9
+ export const renderSearchField = (points, yandexMaps, updatePointsToRender) => {
10
+ const onChange = (e) => {
11
+ const value = e.target?.value ? e.target?.value.toLowerCase() : '';
12
+ if (value) {
13
+ const searchResult = points.filter((_) => {
14
+ const textLowerCase = _.text.toLowerCase();
15
+ if (textLowerCase.indexOf(value) > -1) {
16
+ return _;
17
+ }
18
+ return null;
19
+ });
20
+ updatePointsToRender(searchResult);
21
+ }
22
+ else {
23
+ updatePointsToRender(null);
24
+ }
25
+ };
26
+ return (_jsxs("div", { className: `${Object.values(styles).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" })] }));
27
+ };
28
+ //# sourceMappingURL=renderSearchField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderSearchField.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderSearchField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,MAAM,GAAG;IACb,MAAM,EAAE,sCAAsC;IAC9C,QAAQ,EAAE,4BAA4B;IACtC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,sCAAsC;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,MAAoB,EACpB,UAAqB,EACrB,oBAAwD,EACxD,EAAE;IACF,MAAM,QAAQ,GAAG,CAAC,CAAsC,EAAE,EAAE;QAC1D,MAAM,KAAK,GAAW,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3E,IAAI,KAAK,EAAE;YACT,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAa,EAAE,EAAE;gBACnD,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC3C,IAAI,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;oBACrC,OAAO,CAAC,CAAC;iBACV;gBAED,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;YACH,oBAAoB,CAAC,YAAY,CAAC,CAAC;SACpC;aAAM;YACL,oBAAoB,CAAC,IAAI,CAAC,CAAC;SAC5B;IACH,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,kCAAkC,aAClF,KAAC,IAAI,IACH,IAAI,EAAC,WAAW,EAChB,WAAW,EAAC,OAAO,EACnB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,QACL,SAAS,EAAC,iBAAiB,GAC3B,EACF,gBACE,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,6HAAyB,EACrC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,0CAA0C,GACpD,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import ymaps from 'yandex-maps';
3
+ export declare const renderUserGeolocation: (map: ymaps.Map, yandexMaps: typeof ymaps, className: string) => JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
3
+ import { Icon } from '../Icon/Icon.js';
4
+ const styles = {
5
+ focus: 'focus:border-primary-focus focus:border',
6
+ hover: 'hover:bg-primary-hover',
7
+ active: 'active:bg-primary-active',
8
+ border: 'border border-transparent rounded-md',
9
+ position: 'absolute flex items-center justify-center',
10
+ font: 'text-center font-sans',
11
+ };
12
+ export const renderUserGeolocation = (map, yandexMaps, className) => {
13
+ const setUserGeoLocation = () => {
14
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
+ // @ts-ignore
16
+ yandexMaps.geolocation
17
+ .get({
18
+ provider: 'yandex',
19
+ autoReverseGeocode: true,
20
+ mapStateAutoApply: true,
21
+ })
22
+ .then(function (result) {
23
+ map.geoObjects.add(result.geoObjects);
24
+ });
25
+ };
26
+ return (_jsx("div", { className: `select-none cursor-pointer py-4 w-12 bg-white ${Object.values(styles).join(' ')} ${className}`, onClick: setUserGeoLocation, children: _jsx(Icon, { name: "UserGeoLocationIcon", width: "20", height: "16" }) }));
27
+ };
28
+ //# sourceMappingURL=renderUserGeolocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderUserGeolocation.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderUserGeolocation.tsx"],"names":[],"mappings":";AAAA,0DAA0D;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,yCAAyC;IAChD,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,0BAA0B;IAClC,MAAM,EAAE,sCAAsC;IAC9C,QAAQ,EAAE,2CAA2C;IACrD,IAAI,EAAE,uBAAuB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,GAAc,EACd,UAAwB,EACxB,SAAiB,EACjB,EAAE;IACF,MAAM,kBAAkB,GAAG,GAAG,EAAE;QAC9B,6DAA6D;QAC7D,aAAa;QACb,UAAU,CAAC,WAAW;aACnB,GAAG,CAAC;YACH,QAAQ,EAAE,QAAQ;YAClB,kBAAkB,EAAE,IAAI;YACxB,iBAAiB,EAAE,IAAI;SACxB,CAAC;aACD,IAAI,CAAC,UAAU,MAAM;YACpB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO,CACL,cACE,SAAS,EAAE,iDAAiD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACpF,GAAG,CACJ,IAAI,SAAS,EAAE,EAChB,OAAO,EAAE,kBAAkB,YAE3B,KAAC,IAAI,IAAC,IAAI,EAAC,qBAAqB,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,GACtD,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import ymaps from 'yandex-maps';
2
+ export declare const useYandexMaps: () => typeof ymaps | undefined;
@@ -0,0 +1,8 @@
1
+ import { useExternalNS } from '../../hooks/useExternalNS.js';
2
+ import { projectSettings } from '../../ProjectSettings.js';
3
+ const YMAPS_NAMESPACE = 'ymaps';
4
+ export const useYandexMaps = () => {
5
+ const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY}&lang=ru_RU`;
6
+ return useExternalNS(YMAPS_NAMESPACE, url);
7
+ };
8
+ //# sourceMappingURL=useYandexMaps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useYandexMaps.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/useYandexMaps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,GAAG,GAAG,0CAA0C,eAAe,CAAC,kBAAkB,aAAa,CAAC;IAEtG,OAAO,aAAa,CAAe,eAAe,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC,CAAC"}
@@ -157,3 +157,12 @@ html {
157
157
  -moz-appearance: textfield;
158
158
  }
159
159
  }
160
+
161
+ /*
162
+ Styling Yandex Map element
163
+ */
164
+ /* Hide yandex elements in yandex map */
165
+ [class$='-map-copyrights-promo'],
166
+ [class$='-copyrights-pane'] {
167
+ display: none;
168
+ }
@@ -4,12 +4,7 @@
4
4
  "bonusItems": [
5
5
  {
6
6
  "title": "Плитка 1",
7
- "description": "Описание плитки 1",
8
- "bonusItemContent": {
9
- "bonusType": "count",
10
- "bonusCount": "1",
11
- "bonusName": "балл"
12
- }
7
+ "description": "Описание плитки 1"
13
8
  }
14
9
  ]
15
10
  }
@@ -37,6 +37,7 @@ export type BonusItem = HeadlineCommonProps & {
37
37
  /**
38
38
  * @title Кнопка
39
39
  * @maxItems 1
40
+ * @default [{"version" : "secondary", "target": "_self"}]
40
41
  */
41
42
  buttons?: ButtonWithIconProps[];
42
43
  };
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { BlockVersion } from '../../model/BlockVersion';
3
3
  import type { UniBlockProps } from '../../model/JSXBlock';
4
4
  import type { ProductColorVersion } from '../../model/ProductColorVersion';
5
- import { Button } from '../../ui-kit/Button/Button';
5
+ import { renderButton } from '../../ui-kit/Button/ButtonSection';
6
6
  import { Heading } from '../../ui-kit/Heading/Heading';
7
7
  import { Img } from '../../ui-kit/Img/Img';
8
8
  import type { CatalogCardType } from './CatalogContent';
@@ -35,7 +35,7 @@ export const CatalogCard = JSX<CatalogCardProps>(
35
35
  </div>
36
36
  ) : null}
37
37
  {price ? <div className="text-h3 text-left">{price}&nbsp;₽</div> : null}
38
- {button ? <Button className="mt-5 w-full" {...button} /> : null}
38
+ {button ? renderButton({ button, buttonClassName: 'mt-5 w-full' }) : null}
39
39
  </section>
40
40
  );
41
41
  },
@@ -31,18 +31,20 @@ export const CurrencyTable = JSX<CurrencyTableProps>(({ className, exchangeCurre
31
31
  });
32
32
 
33
33
  const renderCurrencyRow = (exchangeCurrencyItem: ExchangeCurrencyItem) => {
34
- const code = exchangeCurrencyItem?.code;
34
+ const currency = exchangeCurrencyItem?.currency?.currency;
35
35
 
36
36
  return (
37
- <tr key={code} className="pb-1 text-h6">
37
+ <tr key={currency} className="pb-1 text-h6">
38
38
  <td className="pt-4">
39
39
  <div className="flex items-center">
40
- {code ? <Img image={{ icon: CURRENCY_ICONS_MAP[code] }} width="24" height="24" /> : null}
41
- <span className="ml-2">{code}</span>
40
+ {currency ? (
41
+ <Img image={{ icon: CURRENCY_ICONS_MAP[currency] }} width="24" height="24" />
42
+ ) : null}
43
+ <span className="ml-2">{currency}</span>
42
44
  </div>
43
45
  </td>
44
- <td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem?.sell)}</td>
45
- <td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem?.buy)}</td>
46
+ <td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem?.saleExchangeRate)}</td>
47
+ <td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem?.buyExchangeRate)}</td>
46
48
  </tr>
47
49
  );
48
50
  };
@@ -4,21 +4,14 @@ import { Img } from '../../ui-kit/Img/Img';
4
4
  interface CurrentLocationProps {
5
5
  className?: string;
6
6
  address?: string;
7
- distance?: string;
8
7
  }
9
8
 
10
- export const CurrentLocation = JSX<CurrentLocationProps>(
11
- ({ className = '', address, distance }) => (
12
- <div className={`flex ${className}`}>
13
- <Img image={{ icon: 'GpsIcon' }} width="24" height="24" asSVG />
14
- <div className="ml-3">
15
- {address ? <p className="text-primary-main m-0 mb-1 text-l">{address}</p> : null}
16
- {distance ? (
17
- <p className="text-secondary-text m-0 text-m-light">
18
- Курс указан для ближайшего офиса - {distance}
19
- </p>
20
- ) : null}
21
- </div>
9
+ export const CurrentLocation = JSX<CurrentLocationProps>(({ className = '', address }) => (
10
+ <div className={`flex ${className}`}>
11
+ <Img image={{ icon: 'GpsIcon' }} width="24" height="24" asSVG />
12
+ <div className="ml-3">
13
+ {address ? <p className="text-primary-main m-0 mb-1 text-l">{address}</p> : null}
14
+ <p className="text-secondary-text m-0 text-m">Курс указан для ближайшего офиса</p>
22
15
  </div>
23
- ),
24
- );
16
+ </div>
17
+ ));
@@ -10,9 +10,13 @@ import { Currency } from './CurrencyProps';
10
10
  import { renderInput } from './renderInput';
11
11
 
12
12
  export interface ExchangeCurrencyItem {
13
- code?: Currency;
14
- buy?: number;
15
- sell?: number;
13
+ currency?: {
14
+ id?: number;
15
+ code?: string;
16
+ currency?: Currency;
17
+ };
18
+ buyExchangeRate?: number;
19
+ saleExchangeRate?: number;
16
20
  }
17
21
  export interface ExchangeCurrencyCalculatorProps extends UniBlockProps {
18
22
  className?: string;
@@ -35,8 +39,8 @@ export const ExchangeCurrencyCalculator = JSX<ExchangeCurrencyCalculatorProps>(
35
39
  const [calcState, setCalcState] = useState<CalcState>({
36
40
  inputSell: '',
37
41
  inputBuy: '',
38
- selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
39
- selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
42
+ selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
43
+ selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
40
44
  });
41
45
 
42
46
  const handleSetCalcState = (newState: Partial<CalcState>) => {
@@ -96,8 +100,12 @@ const handleSelectSell =
96
100
  callbackCurrencySelect({
97
101
  value,
98
102
  oppositeValue: calcState.selectBuy,
99
- handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
100
- handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
103
+ handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
104
+ handleInputSell(setCalcState, currencyRatesSell)(
105
+ calcState.inputSell,
106
+ currencyFrom,
107
+ currencyTo,
108
+ );
101
109
  },
102
110
  });
103
111
  };
@@ -113,35 +121,39 @@ const handleSelectBuy =
113
121
  callbackCurrencySelect({
114
122
  value,
115
123
  oppositeValue: calcState.selectSell,
116
- handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) =>
117
- handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
124
+ handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) =>
125
+ handleInputBuy(setCalcState, currencyRatesBuy)(
126
+ calcState.inputBuy,
127
+ currencyTo,
128
+ currencyFrom,
129
+ ),
118
130
  });
119
131
  };
120
132
 
121
133
  const handleInputSell =
122
134
  (setCalcState: (state: Partial<CalcState>) => void, currencyRatesSell: ExchangeCurrencyItem[]) =>
123
- (value: string, codeFrom: Currency, codeTo: Currency) => {
124
- setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
135
+ (value: string, currencyFrom: Currency, currencyTo: Currency) => {
136
+ setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
125
137
  const rate =
126
- currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
127
- currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
138
+ currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
139
+ currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate;
128
140
  if (rate) {
129
141
  setCalcState({
130
- inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
142
+ inputBuy: String(calculateResult(value, rate, currencyFrom === Currency.RUB) || ''),
131
143
  });
132
144
  }
133
145
  };
134
146
 
135
147
  const handleInputBuy =
136
148
  (setCalcState: (state: Partial<CalcState>) => void, currencyRatesBuy: ExchangeCurrencyItem[]) =>
137
- (value: string, codeTo: Currency, codeFrom: Currency) => {
138
- setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
149
+ (value: string, currencyTo: Currency, currencyFrom: Currency) => {
150
+ setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
139
151
  const rate =
140
- currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
141
- currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
152
+ currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
153
+ currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate;
142
154
  if (rate) {
143
155
  setCalcState({
144
- inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
156
+ inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
145
157
  });
146
158
  }
147
159
  };