@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.
- package/bin/migration-scripts/0.6.16.js +1 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +309 -168
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Bonus/BonusContent.d.ts +1 -0
- package/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
- package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
- package/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
- package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
- package/bundle/components/OfficeMap/nearbyOffices.d.ts +2 -0
- package/bundle/components/OfficeMap/renderFunctions.d.ts +1 -1
- package/bundle/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
- package/bundle/icons/IconName.d.ts +6 -2
- package/bundle/ui-kit/Button/ButtonProps.d.ts +5 -1
- package/bundle/ui-kit/Button/ButtonSection.d.ts +9 -1
- package/bundle/{components/OfficeMap → ui-kit/YandexMap}/YandexMap.d.ts +4 -1
- package/bundle/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
- package/bundle/ui-kit/YandexMap/mockPoints.d.ts +5 -0
- package/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
- package/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
- package/bundle/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
- package/bundle/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
- package/bundle/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
- package/cosmos-static/icons/FullScreenIcon.svg +1 -0
- package/cosmos-static/icons/UserGeoLocationIcon.svg +1 -0
- package/dist/components/Bonus/BonusContent.d.ts +1 -0
- package/dist/components/Catalog/CatalogCard.js +2 -2
- package/dist/components/Catalog/CatalogCard.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
- package/dist/components/ExchangeRateTile/renderInput.js +4 -1
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +43 -0
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/dist/components/Gallery/GalleryCardInner.js +2 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +2 -2
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Header/DropdownMenu.js +1 -1
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js +16 -11
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/OfficeMap/OfficeMap.js +6 -10
- package/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/dist/components/OfficeMap/nearbyOffices.d.ts +2 -0
- package/dist/components/OfficeMap/nearbyOffices.js +9 -0
- package/dist/components/OfficeMap/nearbyOffices.js.map +1 -0
- package/dist/components/OfficeMap/renderFunctions.d.ts +1 -1
- package/dist/components/OfficeMap/renderFunctions.js +1 -1
- package/dist/components/OfficeMap/renderFunctions.js.map +1 -1
- package/dist/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
- package/{mobile/dist/hooks → dist/components/OfficeMap}/useOfficeMap.js +1 -1
- package/dist/components/OfficeMap/useOfficeMap.js.map +1 -0
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.js +5 -2
- package/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js +5 -2
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/dist/components/TariffsTable/dataFixture.js +2 -4
- package/dist/components/TariffsTable/dataFixture.js.map +1 -1
- package/dist/icons/IconName.d.ts +6 -2
- package/dist/icons/IconName.js +5 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +4 -3
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Button/ButtonProps.d.ts +5 -1
- package/dist/ui-kit/Button/ButtonSection.d.ts +9 -1
- package/dist/ui-kit/Button/ButtonSection.js +18 -6
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/IntersectionObserverTag.js +10 -10
- package/dist/ui-kit/IntersectionObserverTag.js.map +1 -1
- package/{lib/components/OfficeMap → dist/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +86 -0
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -0
- package/dist/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
- package/dist/ui-kit/YandexMap/ZoomButton.js +26 -0
- package/dist/ui-kit/YandexMap/ZoomButton.js.map +1 -0
- package/dist/ui-kit/YandexMap/mockPoints.d.ts +5 -0
- package/dist/ui-kit/YandexMap/mockPoints.js +28 -0
- package/dist/ui-kit/YandexMap/mockPoints.js.map +1 -0
- package/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
- package/dist/ui-kit/YandexMap/renderClusterer.js +35 -0
- package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -0
- package/dist/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
- package/dist/ui-kit/YandexMap/renderOpenMap.js +19 -0
- package/dist/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
- package/dist/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
- package/dist/ui-kit/YandexMap/renderSearchField.js +31 -0
- package/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -0
- package/dist/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
- package/dist/ui-kit/YandexMap/renderUserGeolocation.js +31 -0
- package/dist/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
- package/dist/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
- package/dist/ui-kit/YandexMap/useYandexMaps.js +11 -0
- package/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Bonus/BonusContent.d.ts +1 -0
- package/lib/components/Catalog/CatalogCard.js +2 -2
- package/lib/components/Catalog/CatalogCard.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
- package/lib/components/ExchangeRateTile/renderInput.js +4 -1
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +39 -0
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/lib/components/Gallery/GalleryCardInner.js +2 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +2 -2
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Header/DropdownMenu.js +1 -1
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js +17 -12
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/OfficeMap/OfficeMap.js +6 -10
- package/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/lib/components/OfficeMap/nearbyOffices.d.ts +2 -0
- package/lib/components/OfficeMap/nearbyOffices.js +7 -0
- package/lib/components/OfficeMap/nearbyOffices.js.map +1 -0
- package/lib/components/OfficeMap/renderFunctions.d.ts +1 -1
- package/lib/components/OfficeMap/renderFunctions.js +1 -1
- package/lib/components/OfficeMap/renderFunctions.js.map +1 -1
- package/lib/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
- package/{mobile/lib/hooks → lib/components/OfficeMap}/useOfficeMap.js +1 -1
- package/lib/components/OfficeMap/useOfficeMap.js.map +1 -0
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.js +5 -2
- package/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js +5 -2
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/lib/components/TariffsTable/dataFixture.js +2 -4
- package/lib/components/TariffsTable/dataFixture.js.map +1 -1
- package/lib/icons/IconName.d.ts +6 -2
- package/lib/icons/IconName.js +5 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +4 -3
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Button/ButtonProps.d.ts +5 -1
- package/lib/ui-kit/Button/ButtonSection.d.ts +9 -1
- package/lib/ui-kit/Button/ButtonSection.js +16 -5
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/IntersectionObserverTag.js +11 -11
- package/lib/ui-kit/IntersectionObserverTag.js.map +1 -1
- package/{mobile/bundle/components/OfficeMap → lib/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +84 -0
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -0
- package/lib/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
- package/lib/ui-kit/YandexMap/ZoomButton.js +24 -0
- package/lib/ui-kit/YandexMap/ZoomButton.js.map +1 -0
- package/lib/ui-kit/YandexMap/mockPoints.d.ts +5 -0
- package/lib/ui-kit/YandexMap/mockPoints.js +26 -0
- package/lib/ui-kit/YandexMap/mockPoints.js.map +1 -0
- package/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
- package/lib/ui-kit/YandexMap/renderClusterer.js +32 -0
- package/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -0
- package/lib/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
- package/lib/ui-kit/YandexMap/renderOpenMap.js +16 -0
- package/lib/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
- package/lib/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
- package/lib/ui-kit/YandexMap/renderSearchField.js +28 -0
- package/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -0
- package/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
- package/lib/ui-kit/YandexMap/renderUserGeolocation.js +28 -0
- package/lib/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
- package/lib/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
- package/lib/ui-kit/YandexMap/useYandexMaps.js +8 -0
- package/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +36 -22
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Bonus/BonusContent.d.ts +1 -0
- package/mobile/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
- package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
- package/mobile/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
- package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
- package/mobile/bundle/components/OfficeMap/nearbyOffices.d.ts +2 -0
- package/mobile/bundle/components/OfficeMap/renderFunctions.d.ts +1 -1
- package/mobile/bundle/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
- package/mobile/bundle/icons/IconName.d.ts +6 -2
- package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +5 -1
- package/mobile/bundle/ui-kit/Button/ButtonSection.d.ts +9 -1
- package/{dist/components/OfficeMap → mobile/bundle/ui-kit/YandexMap}/YandexMap.d.ts +4 -1
- package/mobile/bundle/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
- package/mobile/bundle/ui-kit/YandexMap/mockPoints.d.ts +5 -0
- package/mobile/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
- package/mobile/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
- package/mobile/bundle/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
- package/mobile/bundle/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
- package/mobile/bundle/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
- package/mobile/dist/components/Bonus/BonusContent.d.ts +1 -0
- package/mobile/dist/components/Catalog/CatalogCard.js +2 -2
- package/mobile/dist/components/Catalog/CatalogCard.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +4 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +43 -0
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +2 -2
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +16 -11
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/OfficeMap/OfficeMap.js +6 -10
- package/mobile/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/dist/components/OfficeMap/nearbyOffices.d.ts +2 -0
- package/mobile/dist/components/OfficeMap/nearbyOffices.js +9 -0
- package/mobile/dist/components/OfficeMap/nearbyOffices.js.map +1 -0
- package/mobile/dist/components/OfficeMap/renderFunctions.d.ts +1 -1
- package/mobile/dist/components/OfficeMap/renderFunctions.js +1 -1
- package/mobile/dist/components/OfficeMap/renderFunctions.js.map +1 -1
- package/mobile/dist/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
- package/{dist/hooks → mobile/dist/components/OfficeMap}/useOfficeMap.js +1 -1
- package/mobile/dist/components/OfficeMap/useOfficeMap.js.map +1 -0
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +5 -2
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/dist/components/TariffsTable/dataFixture.js +2 -4
- package/mobile/dist/components/TariffsTable/dataFixture.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +6 -2
- package/mobile/dist/icons/IconName.js +5 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +4 -3
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +5 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +9 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +18 -6
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/IntersectionObserverTag.js +10 -10
- package/mobile/dist/ui-kit/IntersectionObserverTag.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +8 -0
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +86 -0
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
- package/mobile/dist/ui-kit/YandexMap/ZoomButton.js +26 -0
- package/mobile/dist/ui-kit/YandexMap/ZoomButton.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/mockPoints.d.ts +5 -0
- package/mobile/dist/ui-kit/YandexMap/mockPoints.js +28 -0
- package/mobile/dist/ui-kit/YandexMap/mockPoints.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.js +35 -0
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
- package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js +19 -0
- package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
- package/mobile/dist/ui-kit/YandexMap/renderSearchField.js +31 -0
- package/mobile/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
- package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.js +31 -0
- package/mobile/dist/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js +11 -0
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
- package/mobile/lib/components/Bonus/BonusContent.d.ts +1 -0
- package/mobile/lib/components/Catalog/CatalogCard.js +2 -2
- package/mobile/lib/components/Catalog/CatalogCard.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +0 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -3
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -15
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +11 -11
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +4 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +17 -0
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +39 -0
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +2 -2
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +17 -12
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/OfficeMap/OfficeMap.js +6 -10
- package/mobile/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/lib/components/OfficeMap/nearbyOffices.d.ts +2 -0
- package/mobile/lib/components/OfficeMap/nearbyOffices.js +7 -0
- package/mobile/lib/components/OfficeMap/nearbyOffices.js.map +1 -0
- package/mobile/lib/components/OfficeMap/renderFunctions.d.ts +1 -1
- package/mobile/lib/components/OfficeMap/renderFunctions.js +1 -1
- package/mobile/lib/components/OfficeMap/renderFunctions.js.map +1 -1
- package/mobile/lib/{hooks → components/OfficeMap}/useOfficeMap.d.ts +0 -0
- package/{lib/hooks → mobile/lib/components/OfficeMap}/useOfficeMap.js +1 -1
- package/mobile/lib/components/OfficeMap/useOfficeMap.js.map +1 -0
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +5 -2
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/lib/components/TariffsTable/dataFixture.js +2 -4
- package/mobile/lib/components/TariffsTable/dataFixture.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +6 -2
- package/mobile/lib/icons/IconName.js +5 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +4 -3
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +5 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +9 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +16 -5
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/IntersectionObserverTag.js +11 -11
- package/mobile/lib/ui-kit/IntersectionObserverTag.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +8 -0
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +84 -0
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/ZoomButton.d.ts +7 -0
- package/mobile/lib/ui-kit/YandexMap/ZoomButton.js +24 -0
- package/mobile/lib/ui-kit/YandexMap/ZoomButton.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/mockPoints.d.ts +5 -0
- package/mobile/lib/ui-kit/YandexMap/mockPoints.js +26 -0
- package/mobile/lib/ui-kit/YandexMap/mockPoints.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -0
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.js +32 -0
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/renderOpenMap.d.ts +2 -0
- package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js +16 -0
- package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/renderSearchField.d.ts +4 -0
- package/mobile/lib/ui-kit/YandexMap/renderSearchField.js +28 -0
- package/mobile/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +3 -0
- package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.js +28 -0
- package/mobile/lib/ui-kit/YandexMap/renderUserGeolocation.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.d.ts +2 -0
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js +8 -0
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -0
- package/mobile/src/common.css +9 -0
- package/mobile/src/components/Bonus/Bonus.example.json +1 -6
- package/mobile/src/components/Bonus/BonusContent.ts +1 -0
- package/mobile/src/components/Catalog/CatalogCard.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +8 -6
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +8 -15
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +31 -19
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -13
- package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +1 -1
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +5 -2
- package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +71 -0
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
- package/mobile/src/components/Gallery/GalleryInner.tsx +2 -2
- package/mobile/src/components/Header/DropdownMenu.tsx +5 -5
- package/mobile/src/components/Header/HeaderSubMenu.tsx +36 -20
- package/mobile/src/components/OfficeMap/OfficeMap.tsx +10 -17
- package/mobile/src/components/OfficeMap/nearbyOffices.ts +8 -0
- package/mobile/src/components/OfficeMap/renderFunctions.tsx +5 -2
- package/mobile/src/{hooks → components/OfficeMap}/useOfficeMap.ts +1 -1
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +7 -11
- package/mobile/src/components/TariffsTable/dataFixture.tsx +2 -3
- package/mobile/src/icons/FullScreenIcon.svg +8 -0
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/UserGeoLocationIcon.svg +3 -0
- package/mobile/src/ui-kit/BlockWrapper.tsx +5 -3
- package/mobile/src/ui-kit/Button/ButtonProps.ts +5 -1
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +41 -16
- package/mobile/src/ui-kit/IntersectionObserverTag.tsx +13 -17
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +128 -0
- package/mobile/src/ui-kit/YandexMap/ZoomButton.tsx +38 -0
- package/mobile/src/ui-kit/YandexMap/mockPoints.ts +30 -0
- package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +51 -0
- package/mobile/src/ui-kit/YandexMap/renderOpenMap.tsx +26 -0
- package/mobile/src/ui-kit/YandexMap/renderSearchField.tsx +51 -0
- package/mobile/src/ui-kit/YandexMap/renderUserGeolocation.tsx +43 -0
- package/mobile/src/ui-kit/YandexMap/useYandexMaps.ts +11 -0
- package/package.json +1 -1
- package/src/common.css +9 -0
- package/src/components/Bonus/Bonus.example.json +1 -6
- package/src/components/Bonus/BonusContent.ts +1 -0
- package/src/components/Catalog/Catalog.fixture.tsx +3 -10
- package/src/components/Catalog/CatalogCard.tsx +2 -2
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +8 -6
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +8 -15
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +31 -19
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -13
- package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +1 -1
- package/src/components/ExchangeRateTile/renderInput.tsx +5 -2
- package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +71 -0
- package/src/components/Gallery/Gallery.fixture.tsx +1 -2
- package/src/components/Gallery/GalleryCardInner.tsx +2 -2
- package/src/components/Gallery/GalleryInner.tsx +2 -2
- package/src/components/Header/DropdownMenu.tsx +5 -5
- package/src/components/Header/HeaderSubMenu.tsx +36 -20
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -14
- package/src/components/OfficeMap/OfficeMap.tsx +10 -17
- package/src/components/OfficeMap/nearbyOffices.ts +8 -0
- package/src/components/OfficeMap/renderFunctions.tsx +5 -2
- package/src/{hooks → components/OfficeMap}/useOfficeMap.ts +1 -1
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +2 -0
- package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +7 -11
- package/src/components/TariffsTable/EmbeddableCellData.tsx +7 -9
- package/src/components/TariffsTable/dataFixture.tsx +2 -3
- package/src/icons/FullScreenIcon.svg +8 -0
- package/src/icons/IconName.ts +9 -1
- package/src/icons/UserGeoLocationIcon.svg +3 -0
- package/src/ui-kit/BlockWrapper.tsx +5 -3
- package/src/ui-kit/Button/ButtonProps.ts +5 -1
- package/src/ui-kit/Button/ButtonSection.tsx +41 -16
- package/src/ui-kit/IntersectionObserverTag.tsx +13 -17
- package/src/ui-kit/YandexMap/YandexMap.tsx +128 -0
- package/src/ui-kit/YandexMap/ZoomButton.tsx +38 -0
- package/src/ui-kit/YandexMap/mockPoints.ts +30 -0
- package/src/ui-kit/YandexMap/renderClusterer.ts +51 -0
- package/src/ui-kit/YandexMap/renderOpenMap.tsx +26 -0
- package/src/ui-kit/YandexMap/renderSearchField.tsx +51 -0
- package/src/ui-kit/YandexMap/renderUserGeolocation.tsx +43 -0
- package/src/ui-kit/YandexMap/useYandexMaps.ts +11 -0
- package/bundle/hooks/useExchangeRates.d.ts +0 -2
- package/dist/components/OfficeMap/YandexMap.js +0 -30
- package/dist/components/OfficeMap/YandexMap.js.map +0 -1
- package/dist/hooks/useExchangeRates.d.ts +0 -2
- package/dist/hooks/useExchangeRates.js +0 -57
- package/dist/hooks/useExchangeRates.js.map +0 -1
- package/dist/hooks/useOfficeMap.js.map +0 -1
- package/lib/components/OfficeMap/YandexMap.js +0 -28
- package/lib/components/OfficeMap/YandexMap.js.map +0 -1
- package/lib/hooks/useExchangeRates.d.ts +0 -2
- package/lib/hooks/useExchangeRates.js +0 -54
- package/lib/hooks/useExchangeRates.js.map +0 -1
- package/lib/hooks/useOfficeMap.js.map +0 -1
- package/mobile/bundle/hooks/useExchangeRates.d.ts +0 -2
- package/mobile/dist/components/OfficeMap/YandexMap.d.ts +0 -5
- package/mobile/dist/components/OfficeMap/YandexMap.js +0 -30
- package/mobile/dist/components/OfficeMap/YandexMap.js.map +0 -1
- package/mobile/dist/hooks/useExchangeRates.d.ts +0 -2
- package/mobile/dist/hooks/useExchangeRates.js +0 -57
- package/mobile/dist/hooks/useExchangeRates.js.map +0 -1
- package/mobile/dist/hooks/useOfficeMap.js.map +0 -1
- package/mobile/lib/components/OfficeMap/YandexMap.d.ts +0 -5
- package/mobile/lib/components/OfficeMap/YandexMap.js +0 -28
- package/mobile/lib/components/OfficeMap/YandexMap.js.map +0 -1
- package/mobile/lib/hooks/useExchangeRates.d.ts +0 -2
- package/mobile/lib/hooks/useExchangeRates.js +0 -54
- package/mobile/lib/hooks/useExchangeRates.js.map +0 -1
- package/mobile/lib/hooks/useOfficeMap.js.map +0 -1
- package/mobile/src/components/OfficeMap/YandexMap.tsx +0 -41
- package/mobile/src/hooks/useExchangeRates.ts +0 -76
- package/src/components/OfficeMap/YandexMap.tsx +0 -41
- package/src/hooks/useExchangeRates.ts +0 -76
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
2
2
|
import type { LinkProps } from '../../model/LinkProps';
|
|
3
|
-
import type { IconProps } from '../../model/Picture';
|
|
3
|
+
import type { IconProps, Picture } from '../../model/Picture';
|
|
4
4
|
import type { VNode } from '../../model/VNode';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -29,6 +29,10 @@ export interface ButtonProps extends ButtonAdditionalProps, LinkProps {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export interface ButtonWithIconProps extends ButtonProps {
|
|
32
|
+
/** @title Иконка слева */
|
|
33
|
+
icon?: Picture;
|
|
34
|
+
/** @title Иконка справа */
|
|
35
|
+
iconRight?: Picture;
|
|
32
36
|
/** @title Верхний текст */
|
|
33
37
|
aboveText?: string;
|
|
34
38
|
/** @hidden */
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { HandlerDecorator, Router } from '../../components/ContentPage/ContentPageContext';
|
|
3
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
+
import type { IconVersion } from '../../model/IconVersion';
|
|
4
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
|
+
import type { Picture } from '../../model/Picture';
|
|
6
|
+
import { Img } from '../Img/Img';
|
|
5
7
|
import { Button } from './Button';
|
|
6
8
|
import type { ButtonContent, ButtonWithIconProps } from './ButtonProps';
|
|
7
9
|
|
|
8
10
|
export interface ButtonSectionProps extends ButtonContent, UniBlockProps {}
|
|
9
11
|
|
|
10
|
-
interface
|
|
12
|
+
interface RenderButtonProps {
|
|
11
13
|
button: ButtonWithIconProps;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
buttonClassName?: string;
|
|
15
|
+
index?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface RenderButtonIconProps {
|
|
19
|
+
icon?: Picture;
|
|
20
|
+
iconVersion?: IconVersion;
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
export const ButtonSection = JSX<ButtonSectionProps>(({ context, className = '', buttons }) => {
|
|
@@ -19,20 +26,38 @@ export const ButtonSection = JSX<ButtonSectionProps>(({ context, className = '',
|
|
|
19
26
|
|
|
20
27
|
return buttons && buttons?.length ? (
|
|
21
28
|
<div className={className}>
|
|
22
|
-
{buttons.map((button, index) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
handlerDecorator={handlerDecorator}
|
|
26
|
-
key={String(index)}
|
|
27
|
-
router={router}
|
|
28
|
-
/>
|
|
29
|
-
))}
|
|
29
|
+
{buttons.map((button, index) =>
|
|
30
|
+
renderButton({ button: useLink({ router, handlerDecorator }, button), index }),
|
|
31
|
+
)}
|
|
30
32
|
</div>
|
|
31
33
|
) : null;
|
|
32
34
|
});
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
+
export function renderButton({ button, buttonClassName, index }: RenderButtonProps) {
|
|
37
|
+
const { icon, iconRight, version, ...rest } = button;
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
const iconVersion = version === 'secondary' ? 'normal' : 'white';
|
|
40
|
+
|
|
41
|
+
const leftIcon = renderButtonIcon({ icon, iconVersion });
|
|
42
|
+
const rightIcon = renderButtonIcon({ icon: iconRight, iconVersion });
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Button
|
|
46
|
+
className={buttonClassName}
|
|
47
|
+
appendLeft={leftIcon}
|
|
48
|
+
appendRight={rightIcon}
|
|
49
|
+
version={version}
|
|
50
|
+
key={index ? String(index) : ''}
|
|
51
|
+
{...rest}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const renderButtonIcon = ({ icon, iconVersion }: RenderButtonIconProps) => {
|
|
57
|
+
if (!icon?.icon && !icon?.src) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const iconWidth = icon?.size?.width ? `${icon.size.width}` : '24';
|
|
61
|
+
|
|
62
|
+
return <Img image={{ ...icon, iconVersion: iconVersion }} width={iconWidth} height="24" asSVG />;
|
|
63
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import type { VNode } from '../model/VNode';
|
|
4
4
|
|
|
5
5
|
interface IntersectionObserverTagProps {
|
|
@@ -20,29 +20,25 @@ export const IntersectionObserverTag = JSX<IntersectionObserverTagProps>((props)
|
|
|
20
20
|
anchor = null,
|
|
21
21
|
children,
|
|
22
22
|
} = props;
|
|
23
|
+
const tagRef = useRef<HTMLElement | null>(null);
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!tagRef.current) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
(
|
|
28
|
-
if (!element) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
30
|
+
const intersectionObserver = new IntersectionObserver(observerCallback, observerOptions);
|
|
31
|
+
intersectionObserver.observe(tagRef.current);
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
intersectionObserver.current = new IntersectionObserver(observerCallback, observerOptions);
|
|
37
|
-
intersectionObserver.current.observe(element);
|
|
38
|
-
},
|
|
39
|
-
[observerCallback, observerOptions],
|
|
40
|
-
);
|
|
33
|
+
return () => {
|
|
34
|
+
intersectionObserver.disconnect();
|
|
35
|
+
};
|
|
36
|
+
}, [observerCallback, observerOptions]);
|
|
41
37
|
|
|
42
38
|
const Tag = tag as any;
|
|
43
39
|
|
|
44
40
|
return (
|
|
45
|
-
<Tag ref={
|
|
41
|
+
<Tag ref={tagRef} className={className} id={anchor}>
|
|
46
42
|
{children}
|
|
47
43
|
</Tag>
|
|
48
44
|
);
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
4
|
+
import { useEffect, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
5
|
+
import ymaps from 'yandex-maps';
|
|
6
|
+
import { renderClusterer } from './renderClusterer';
|
|
7
|
+
import { renderOpenMap } from './renderOpenMap';
|
|
8
|
+
import { renderSearchField } from './renderSearchField';
|
|
9
|
+
import { renderUserGeolocation } from './renderUserGeolocation';
|
|
10
|
+
import { useYandexMaps } from './useYandexMaps';
|
|
11
|
+
import { Icon } from '../Icon/Icon';
|
|
12
|
+
import { ZoomButton } from './ZoomButton';
|
|
13
|
+
import { MockPoints, mockPoints } from './mockPoints';
|
|
14
|
+
|
|
15
|
+
interface YandexMapProps {
|
|
16
|
+
points: number[][];
|
|
17
|
+
className?: string;
|
|
18
|
+
zoom?: number;
|
|
19
|
+
showSearchField?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const FULLSCREEN_STYLES = {
|
|
23
|
+
border: 'border border-transparent rounded-md ',
|
|
24
|
+
position: 'absolute flex items-center justify-center',
|
|
25
|
+
size: 'w-12 h-12',
|
|
26
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
27
|
+
font: 'text-center font-sans',
|
|
28
|
+
active: 'active:bg-primary-active',
|
|
29
|
+
hover: 'hover:bg-primary-hover',
|
|
30
|
+
other: 'select-none cursor-pointer',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
|
|
34
|
+
// Сейчас реализован поиск среди тестовых данных
|
|
35
|
+
// TODO: Также выяснить что делать когда ничего не найдено
|
|
36
|
+
// TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
|
|
37
|
+
export const YandexMap = JSX<YandexMapProps>(
|
|
38
|
+
({ points, className = '', zoom = 5, showSearchField = false }) => {
|
|
39
|
+
const map = useRef<ymaps.Map | null>(null);
|
|
40
|
+
|
|
41
|
+
const yandexMaps = useYandexMaps();
|
|
42
|
+
|
|
43
|
+
const [isFullScreen, setIsFullScreen] = useState();
|
|
44
|
+
const [pointsToRender, setPointsToRender] = useState<number[][]>(normalizePoints(mockPoints));
|
|
45
|
+
|
|
46
|
+
const pointsCenter = getCenterPoint(points);
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (!map?.current) {
|
|
50
|
+
yandexMaps?.ready(() => {
|
|
51
|
+
map.current = new yandexMaps.Map('map', {
|
|
52
|
+
center: pointsCenter,
|
|
53
|
+
zoom,
|
|
54
|
+
controls: [],
|
|
55
|
+
suppressMapOpenBlock: true,
|
|
56
|
+
});
|
|
57
|
+
renderClusterer(yandexMaps, map.current, pointsToRender);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}, [yandexMaps, map, pointsToRender]);
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (map.current && pointsToRender && yandexMaps) {
|
|
64
|
+
const newPoints = pointsToRender.length < 1 ? normalizePoints(mockPoints) : pointsToRender;
|
|
65
|
+
renderClusterer(yandexMaps, map.current, newPoints);
|
|
66
|
+
}
|
|
67
|
+
}, [map, pointsToRender, yandexMaps]);
|
|
68
|
+
|
|
69
|
+
if (!yandexMaps) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const toggleFullscreen = () => {
|
|
74
|
+
const container = map.current.container;
|
|
75
|
+
if (!isFullScreen) {
|
|
76
|
+
container.enterFullscreen();
|
|
77
|
+
} else {
|
|
78
|
+
container.exitFullscreen();
|
|
79
|
+
}
|
|
80
|
+
setIsFullScreen(container.isFullscreen());
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
|
|
84
|
+
|
|
85
|
+
const updatePointsToRender = (newPoints: MockPoints | null) => {
|
|
86
|
+
if (newPoints) {
|
|
87
|
+
const normalizedPoints = normalizePoints(newPoints);
|
|
88
|
+
setPointsToRender(normalizedPoints);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<div id="map" className={`${isFullScreen ? '' : 'relative'} w-full ${className}`}>
|
|
94
|
+
<div className={`absolute flex left-2 top-4 w-[50%] ${zIndex}`}>
|
|
95
|
+
{showSearchField
|
|
96
|
+
? renderSearchField(mockPoints, yandexMaps, updatePointsToRender)
|
|
97
|
+
: renderOpenMap(pointsCenter)}
|
|
98
|
+
</div>
|
|
99
|
+
<div
|
|
100
|
+
className={`${Object.values(FULLSCREEN_STYLES).join(
|
|
101
|
+
' ',
|
|
102
|
+
)} ${zIndex} right-2 top-4 bg-white`}
|
|
103
|
+
onClick={toggleFullscreen}
|
|
104
|
+
>
|
|
105
|
+
<Icon name="FullScreenIcon" width="16" height="16" />
|
|
106
|
+
</div>
|
|
107
|
+
<div
|
|
108
|
+
className={`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${zIndex}`}
|
|
109
|
+
>
|
|
110
|
+
<ZoomButton yandexMaps={map} />
|
|
111
|
+
<ZoomButton yandexMaps={map} direction="out" />
|
|
112
|
+
</div>
|
|
113
|
+
{renderUserGeolocation(map.current, yandexMaps, `right-2 top-80 ${zIndex}`)}
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const getCenterPoint = (points: number[][]) => [
|
|
120
|
+
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
121
|
+
getArraySumAndAverage(mapByIndex(points, 1)),
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
const mapByIndex = (arr: number[][], index: number) => arr.map((a) => a[index]);
|
|
125
|
+
|
|
126
|
+
const getArraySumAndAverage = (arr: number[][]) => arr.reduce((a, b) => a + b) / arr.length;
|
|
127
|
+
|
|
128
|
+
const normalizePoints = (points: number[][]) => (points ? points.map((_) => _.coords) : null);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
4
|
+
import ymaps from 'yandex-maps';
|
|
5
|
+
import { Icon } from '../Icon/Icon';
|
|
6
|
+
|
|
7
|
+
interface ZoomButtonProps {
|
|
8
|
+
yandexMaps: ymaps.Map;
|
|
9
|
+
direction?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const styles = {
|
|
13
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
14
|
+
hover: 'hover:bg-primary-hover',
|
|
15
|
+
active: 'active:bg-primary-active',
|
|
16
|
+
border: 'border-b border-b-2 border-gray last:border-0',
|
|
17
|
+
position: 'relative flex items-center justify-center',
|
|
18
|
+
font: 'text-center font-sans text-l',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// TODO: Добавить метод определения центральной точки
|
|
22
|
+
export const ZoomButton = JSX<ZoomButtonProps>(({ yandexMaps, direction = 'in' }) => {
|
|
23
|
+
const iconName = direction === 'in' ? 'PlusIcon' : 'MinusIcon';
|
|
24
|
+
const changeZoom = () => {
|
|
25
|
+
const currentZoom = yandexMaps.current.getZoom();
|
|
26
|
+
const newZoom = direction === 'in' ? currentZoom + 1 : currentZoom - 1;
|
|
27
|
+
yandexMaps.current.setZoom(newZoom, { checkZoomRange: true });
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div
|
|
32
|
+
onClick={changeZoom}
|
|
33
|
+
className={`${Object.values(styles).join(' ')} bg-white select-none cursor-pointer w-12 h-12`}
|
|
34
|
+
>
|
|
35
|
+
<Icon name={iconName} width="20" height="16" />
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type MockPoints = {
|
|
2
|
+
coords: number[];
|
|
3
|
+
text: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export const mockPoints: MockPoints[] = [
|
|
7
|
+
{ coords: [55.77, 37.46], text: 'Трактир' },
|
|
8
|
+
{ coords: [55.66, 37.48], text: 'Трактор' },
|
|
9
|
+
{ coords: [55.65, 37.42], text: 'Ресторан' },
|
|
10
|
+
{ coords: [55.64, 37.54], text: 'Музей' },
|
|
11
|
+
{ coords: [55.54, 37.52], text: 'Библиотека' },
|
|
12
|
+
{ coords: [55.53, 37.56], text: 'Школа' },
|
|
13
|
+
{ coords: [55.61, 37.61], text: 'Аптека' },
|
|
14
|
+
{ coords: [55.8, 37.58], text: 'Бар' },
|
|
15
|
+
{ coords: [55.71, 37.35], text: 'Институт' },
|
|
16
|
+
{ coords: [55.74, 37.57], text: 'Университет' },
|
|
17
|
+
{ coords: [55.58, 37.69], text: 'Больница' },
|
|
18
|
+
{ coords: [55.57, 37.7], text: 'Цирк' },
|
|
19
|
+
{ coords: [55.55, 37.64], text: 'Магазин' },
|
|
20
|
+
{ coords: [55.5, 37.75], text: 'Булочная' },
|
|
21
|
+
{ coords: [55.81, 37.73], text: 'Полиция' },
|
|
22
|
+
{ coords: [55.73, 37.68], text: 'Салон красоты' },
|
|
23
|
+
{ coords: [55.86, 37.76], text: 'Баня' },
|
|
24
|
+
{ coords: [55.38, 37.69], text: 'Гараж' },
|
|
25
|
+
{ coords: [55.91, 37.5], text: 'Дом' },
|
|
26
|
+
{ coords: [55.62, 37.32], text: 'Прачечная' },
|
|
27
|
+
{ coords: [55.85, 37.41], text: 'Стадион' },
|
|
28
|
+
{ coords: [55.67, 37.24], text: 'Вокзал' },
|
|
29
|
+
{ coords: [55.79, 37.41], text: 'Кафе' },
|
|
30
|
+
];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// TODO: Fix
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
|
+
import ymaps from 'yandex-maps';
|
|
5
|
+
|
|
6
|
+
export function renderClusterer(yandexMaps: typeof ymaps, map: ymaps.Map, points: number[][]) {
|
|
7
|
+
map.geoObjects.removeAll();
|
|
8
|
+
|
|
9
|
+
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass(
|
|
10
|
+
'<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>',
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const clusterer = new yandexMaps.Clusterer({
|
|
14
|
+
clusterIcons: [
|
|
15
|
+
{
|
|
16
|
+
href: 'icons/MapMarkerClusterIcon.svg',
|
|
17
|
+
size: [78, 84],
|
|
18
|
+
offset: [-35, -50],
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
clusterIconContentLayout,
|
|
22
|
+
clusterHideIconOnBalloonOpen: false,
|
|
23
|
+
geoObjectHideIconOnBalloonOpen: false,
|
|
24
|
+
} as ymaps.IClustererOptions);
|
|
25
|
+
|
|
26
|
+
const geoObjects = points.map(
|
|
27
|
+
(point) =>
|
|
28
|
+
new yandexMaps.Placemark(
|
|
29
|
+
point,
|
|
30
|
+
{},
|
|
31
|
+
{
|
|
32
|
+
iconLayout: 'default#image',
|
|
33
|
+
iconImageHref: 'icons/MapMarkerSingleIcon.svg',
|
|
34
|
+
iconImageSize: [78, 84],
|
|
35
|
+
iconImageOffset: [-35, -50],
|
|
36
|
+
},
|
|
37
|
+
),
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
clusterer.add(geoObjects);
|
|
41
|
+
|
|
42
|
+
map.geoObjects.add(clusterer as any);
|
|
43
|
+
|
|
44
|
+
// TODO: Fix
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
map.setBounds(yandexMaps.util.bounds.fromPoints(points)).then(() => {
|
|
47
|
+
if (map.getZoom() > 10) {
|
|
48
|
+
map.setZoom(10);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const styles = {
|
|
2
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
3
|
+
hover: 'hover:bg-primary-hover',
|
|
4
|
+
active: 'active:bg-primary-active',
|
|
5
|
+
border: 'border border-transparent rounded-md',
|
|
6
|
+
position: 'flex items-center justify-center',
|
|
7
|
+
font: 'text-center font-sans',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const renderOpenMap = (pointsCenter: number[]) => {
|
|
11
|
+
const getYandexMapUrl = () => {
|
|
12
|
+
return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<a
|
|
17
|
+
className={`select-none cursor-pointer px-9 h-12 bg-white bg-primary-main text-white ${Object.values(
|
|
18
|
+
styles,
|
|
19
|
+
).join(' ')}`}
|
|
20
|
+
href={getYandexMapUrl()}
|
|
21
|
+
target="_blank"
|
|
22
|
+
>
|
|
23
|
+
Открыть на карте
|
|
24
|
+
</a>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Icon } from '../Icon/Icon';
|
|
2
|
+
import type { MockPoints } from './mockPoints';
|
|
3
|
+
import ymaps from 'yandex-maps';
|
|
4
|
+
const styles = {
|
|
5
|
+
border: 'border border-transparent rounded-md',
|
|
6
|
+
position: 'relative flex items-center',
|
|
7
|
+
font: 'text-center font-sans',
|
|
8
|
+
shadow: 'shadow-[0_4px_25px_rgba(0,0,0,0.07)]',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const renderSearchField = (
|
|
12
|
+
points: MockPoints[],
|
|
13
|
+
yandexMaps: ymaps.Map,
|
|
14
|
+
updatePointsToRender: (any: MockPoints[] | null) => void,
|
|
15
|
+
) => {
|
|
16
|
+
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
17
|
+
const value: string = e.target?.value ? e.target?.value.toLowerCase() : '';
|
|
18
|
+
if (value) {
|
|
19
|
+
const searchResult = points.filter((_: MockPoints) => {
|
|
20
|
+
const textLowerCase = _.text.toLowerCase();
|
|
21
|
+
if (textLowerCase.indexOf(value) > -1) {
|
|
22
|
+
return _;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return null;
|
|
26
|
+
});
|
|
27
|
+
updatePointsToRender(searchResult);
|
|
28
|
+
} else {
|
|
29
|
+
updatePointsToRender(null);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div className={`${Object.values(styles).join(' ')} bg-white py-3 pl-11 pr-4 w-full`}>
|
|
35
|
+
<Icon
|
|
36
|
+
name="LoupeIcon"
|
|
37
|
+
iconVersion="black"
|
|
38
|
+
width="20"
|
|
39
|
+
height="20"
|
|
40
|
+
asSVG
|
|
41
|
+
className="absolute left-4"
|
|
42
|
+
/>
|
|
43
|
+
<input
|
|
44
|
+
type="text"
|
|
45
|
+
placeholder="Введите адрес или метро"
|
|
46
|
+
onChange={onChange}
|
|
47
|
+
className="border-0 focus:border-0 outline-0 w-full"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
2
|
+
import { Icon } from '../Icon/Icon';
|
|
3
|
+
import ymaps from 'yandex-maps';
|
|
4
|
+
|
|
5
|
+
const styles = {
|
|
6
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
7
|
+
hover: 'hover:bg-primary-hover',
|
|
8
|
+
active: 'active:bg-primary-active',
|
|
9
|
+
border: 'border border-transparent rounded-md',
|
|
10
|
+
position: 'absolute flex items-center justify-center',
|
|
11
|
+
font: 'text-center font-sans',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const renderUserGeolocation = (
|
|
15
|
+
map: ymaps.Map,
|
|
16
|
+
yandexMaps: typeof ymaps,
|
|
17
|
+
className: string,
|
|
18
|
+
) => {
|
|
19
|
+
const setUserGeoLocation = () => {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
yandexMaps.geolocation
|
|
23
|
+
.get({
|
|
24
|
+
provider: 'yandex',
|
|
25
|
+
autoReverseGeocode: true,
|
|
26
|
+
mapStateAutoApply: true,
|
|
27
|
+
})
|
|
28
|
+
.then(function (result) {
|
|
29
|
+
map.geoObjects.add(result.geoObjects);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className={`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(styles).join(
|
|
36
|
+
' ',
|
|
37
|
+
)} ${className}`}
|
|
38
|
+
onClick={setUserGeoLocation}
|
|
39
|
+
>
|
|
40
|
+
<Icon name="UserGeoLocationIcon" width="20" height="16" />
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ymaps from 'yandex-maps';
|
|
2
|
+
import { useExternalNS } from '../../hooks/useExternalNS';
|
|
3
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
4
|
+
|
|
5
|
+
const YMAPS_NAMESPACE = 'ymaps';
|
|
6
|
+
|
|
7
|
+
export const useYandexMaps = () => {
|
|
8
|
+
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY}&lang=ru_RU`;
|
|
9
|
+
|
|
10
|
+
return useExternalNS<typeof ymaps>(YMAPS_NAMESPACE, url);
|
|
11
|
+
};
|
package/package.json
CHANGED
package/src/common.css
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type { IconVersion } from '../../model/IconVersion';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
import type { ProductColorVersion } from '../../model/ProductColorVersion';
|
|
4
3
|
import { context } from '../../react/setup-fixture';
|
|
5
4
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
7
5
|
import { Catalog, CatalogProps } from './Catalog';
|
|
8
6
|
|
|
9
7
|
const payRing: Picture = {
|
|
@@ -23,14 +21,9 @@ const buttonPrimary: ButtonWithIconProps = {
|
|
|
23
21
|
text: 'Подробнее',
|
|
24
22
|
target: '_blank',
|
|
25
23
|
version: 'primary',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
width="24"
|
|
30
|
-
height="24"
|
|
31
|
-
asSVG
|
|
32
|
-
/>
|
|
33
|
-
),
|
|
24
|
+
icon: {
|
|
25
|
+
icon: 'AppleIcon',
|
|
26
|
+
},
|
|
34
27
|
};
|
|
35
28
|
|
|
36
29
|
const catalogCard = {
|
|
@@ -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 {
|
|
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} ₽</div> : null}
|
|
38
|
-
{button ?
|
|
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
|
|
34
|
+
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
|
-
<tr key={
|
|
37
|
+
<tr key={currency} className="pb-1 text-h6">
|
|
38
38
|
<td className="pt-4">
|
|
39
39
|
<div className="flex items-center">
|
|
40
|
-
{
|
|
41
|
-
|
|
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?.
|
|
45
|
-
<td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem?.
|
|
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
|
};
|