@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
|
@@ -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
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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]?.
|
|
39
|
-
selectBuy: currencyRatesSell?.[0]?.
|
|
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: (
|
|
100
|
-
handleInputSell(setCalcState, currencyRatesSell)(
|
|
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: (
|
|
117
|
-
handleInputBuy(setCalcState, currencyRatesBuy)(
|
|
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,
|
|
124
|
-
setCalcState({ inputSell: formatValue(value), selectBuy:
|
|
135
|
+
(value: string, currencyFrom: Currency, currencyTo: Currency) => {
|
|
136
|
+
setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
|
|
125
137
|
const rate =
|
|
126
|
-
currencyRatesSell.find((_) => _.
|
|
127
|
-
currencyRatesSell.find((_) => _.
|
|
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,
|
|
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,
|
|
138
|
-
setCalcState({ inputBuy: formatValue(value), selectSell:
|
|
149
|
+
(value: string, currencyTo: Currency, currencyFrom: Currency) => {
|
|
150
|
+
setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
|
|
139
151
|
const rate =
|
|
140
|
-
currencyRatesBuy.find((_) => _.
|
|
141
|
-
currencyRatesBuy.find((_) => _.
|
|
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,
|
|
156
|
+
inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
|
|
145
157
|
});
|
|
146
158
|
}
|
|
147
159
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useExchangeRates } from '../../hooks/useExchangeRates';
|
|
3
2
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
4
3
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
@@ -7,25 +6,23 @@ import { BaseTile } from '../BaseTile/BaseTile';
|
|
|
7
6
|
import { Currency } from './CurrencyProps';
|
|
8
7
|
import { CurrencyTable } from './CurrencyTable';
|
|
9
8
|
import { CurrentLocation } from './CurrentLocation';
|
|
10
|
-
import { ExchangeCurrencyCalculator } from './ExchangeCurrencyCalculator';
|
|
9
|
+
import { ExchangeCurrencyCalculator, ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
11
10
|
import type { ExchangeRateTileContent } from './ExchangeRateTileContent';
|
|
12
|
-
|
|
13
|
-
const DEFAULT_LOCATION = {
|
|
14
|
-
address: 'Москва, ул.Ленина д.28',
|
|
15
|
-
distance: '6км',
|
|
16
|
-
};
|
|
11
|
+
import { useFetchExchangeRateData } from './useFetchExchangeRateData';
|
|
17
12
|
|
|
18
13
|
export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {}
|
|
19
14
|
|
|
20
15
|
export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
|
|
21
16
|
({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
|
|
22
|
-
const
|
|
17
|
+
const { exchangeRates } = useFetchExchangeRateData();
|
|
18
|
+
|
|
19
|
+
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
23
20
|
|
|
24
|
-
const currencyRatesBuy = currencyRates.filter((_) => _.
|
|
25
|
-
currencyRatesBuy.unshift({
|
|
21
|
+
const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
|
|
22
|
+
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
26
23
|
|
|
27
|
-
const currencyRatesSell = currencyRates.filter((_) => _.
|
|
28
|
-
currencyRatesSell.push({
|
|
24
|
+
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
25
|
+
currencyRatesSell.push({ currency: { currency: Currency.RUB } });
|
|
29
26
|
|
|
30
27
|
return (
|
|
31
28
|
<BlockWrapper
|
|
@@ -44,7 +41,7 @@ export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
|
|
|
44
41
|
{currencyRates ? (
|
|
45
42
|
<CurrencyTable className="mb-[30px]" exchangeCurrencyItems={currencyRates} />
|
|
46
43
|
) : null}
|
|
47
|
-
<CurrentLocation {
|
|
44
|
+
<CurrentLocation address={exchangeRates?.address} />
|
|
48
45
|
</div>
|
|
49
46
|
{currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (
|
|
50
47
|
<ExchangeCurrencyCalculator
|
|
@@ -61,3 +58,7 @@ export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
|
|
|
61
58
|
);
|
|
62
59
|
},
|
|
63
60
|
);
|
|
61
|
+
|
|
62
|
+
const getCurrencyRates = (currencies?: ExchangeCurrencyItem[]) => {
|
|
63
|
+
return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
|
|
64
|
+
};
|
|
@@ -4,7 +4,7 @@ import { Currency } from './CurrencyProps';
|
|
|
4
4
|
interface TableFuncProps {
|
|
5
5
|
value: Currency;
|
|
6
6
|
oppositeValue: Currency;
|
|
7
|
-
handleConvert: (
|
|
7
|
+
handleConvert: (currencyFrom?: Currency, currencyTo?: Currency) => void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const callbackCurrencySelect = (props: TableFuncProps) =>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input } from '../../ui-kit/Input/Input';
|
|
2
|
-
import { Select } from '../../ui-kit/Select/Select';
|
|
3
2
|
import type { OptionProps } from '../../ui-kit/Select/Select';
|
|
3
|
+
import { Select } from '../../ui-kit/Select/Select';
|
|
4
4
|
import type { Currency } from './CurrencyProps';
|
|
5
5
|
import type { ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
6
6
|
|
|
@@ -15,7 +15,10 @@ interface InputProps {
|
|
|
15
15
|
|
|
16
16
|
export function renderInput(props: InputProps) {
|
|
17
17
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
18
|
-
const ratesOptions: OptionProps[] = rates.map((_) => ({
|
|
18
|
+
const ratesOptions: OptionProps[] = rates.map((_) => ({
|
|
19
|
+
key: _?.currency?.currency ?? '',
|
|
20
|
+
text: _?.currency?.currency ?? '',
|
|
21
|
+
}));
|
|
19
22
|
const selectedValue: OptionProps = { key: selected, text: selected };
|
|
20
23
|
|
|
21
24
|
return (
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
|
+
import { ExchangeCurrencyItem } from '../../components/ExchangeRateTile/ExchangeCurrencyCalculator';
|
|
3
|
+
import { fetchJSONUnsafe } from '../../utils/fetchJSON';
|
|
4
|
+
|
|
5
|
+
export interface ExchangeData {
|
|
6
|
+
exchangeRate?: {
|
|
7
|
+
currencies?: ExchangeCurrencyItem[];
|
|
8
|
+
};
|
|
9
|
+
address?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface RegionData {
|
|
13
|
+
id?: number;
|
|
14
|
+
code?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
|
|
19
|
+
const REGION_URL = '/api/v1/region';
|
|
20
|
+
|
|
21
|
+
export function useFetchExchangeRateData() {
|
|
22
|
+
const { data } = useAsyncData<{
|
|
23
|
+
region?: RegionData;
|
|
24
|
+
exchangeRates?: ExchangeData;
|
|
25
|
+
}>(EXCHANGE_RATES_URL, fetchData);
|
|
26
|
+
|
|
27
|
+
return data || {};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function useCurrentPosition() {
|
|
31
|
+
const { data } = useAsyncData<RegionData>(REGION_URL, fetchJSONUnsafe);
|
|
32
|
+
|
|
33
|
+
return data || {};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const fetchData = async (
|
|
37
|
+
urlExchangeRates: string,
|
|
38
|
+
): Promise<{
|
|
39
|
+
region: RegionData;
|
|
40
|
+
exchangeRates: ExchangeData;
|
|
41
|
+
}> => {
|
|
42
|
+
const region = await fetchRegion();
|
|
43
|
+
|
|
44
|
+
const regionCode = region?.code || '000';
|
|
45
|
+
|
|
46
|
+
const exchangeRates = await fetchExchangeRates(urlExchangeRates, regionCode);
|
|
47
|
+
|
|
48
|
+
return { region, exchangeRates };
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const fetchRegion = async (): Promise<RegionData> => {
|
|
52
|
+
try {
|
|
53
|
+
return await fetchJSONUnsafe<RegionData>(REGION_URL, { method: 'GET' });
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.log(error);
|
|
56
|
+
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const fetchExchangeRates = async (url: string, regionCode: string): Promise<ExchangeData> => {
|
|
62
|
+
try {
|
|
63
|
+
return await fetchJSONUnsafe<ExchangeData>(url + `?regionCode=${regionCode}`, {
|
|
64
|
+
method: 'GET',
|
|
65
|
+
});
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.log(error);
|
|
68
|
+
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../react/setup-fixture';
|
|
3
3
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
5
4
|
import { Gallery } from './Gallery';
|
|
6
5
|
import type { GalleryProps } from './GalleryProps';
|
|
7
6
|
const isDotted = true;
|
|
@@ -28,7 +27,7 @@ const buttonPrimaryIcon: ButtonWithIconProps = {
|
|
|
28
27
|
text: 'Подробнее',
|
|
29
28
|
target: '_blank',
|
|
30
29
|
version: 'secondary',
|
|
31
|
-
|
|
30
|
+
icon: { icon: 'BankIcon' },
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
const defaultItems = [
|
|
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { AlignText } from '../../model/AlignText';
|
|
3
3
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
import type { Picture } from '../../model/Picture';
|
|
5
|
-
import {
|
|
5
|
+
import { renderButton } from '../../ui-kit/Button/ButtonSection';
|
|
6
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
7
|
import { List } from '../../ui-kit/List/List';
|
|
8
8
|
import { HEADLINE_SMALL_VERSION } from '../Headline/constants';
|
|
@@ -30,7 +30,7 @@ export const GalleryCardInner = JSX<GalleryCardProps>(
|
|
|
30
30
|
{items?.length ? renderItems(items, isDotted, version) : null}
|
|
31
31
|
{renderAdditionalDescription(additionalDescription)}
|
|
32
32
|
</div>
|
|
33
|
-
{button?.text ?
|
|
33
|
+
{button?.text ? renderButton({ button, buttonClassName: 'mt-6' }) : null}
|
|
34
34
|
</div>
|
|
35
35
|
);
|
|
36
36
|
},
|
|
@@ -3,11 +3,11 @@ import { useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import type { GalleryVersion } from '../../model/GalleryVersion';
|
|
4
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
|
+
import { renderButton } from '../../ui-kit/Button/ButtonSection';
|
|
6
7
|
import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
7
8
|
import { galleryLengthForScrollMap } from './constants';
|
|
8
9
|
import { GalleryContainer } from './GalleryContainer';
|
|
9
10
|
import type { GalleryContent } from './GalleryContent';
|
|
10
|
-
import { Button } from '../../ui-kit/Button/Button';
|
|
11
11
|
|
|
12
12
|
export interface GalleryInnerProps extends GalleryContent, UniBlockProps {
|
|
13
13
|
version?: GalleryVersion;
|
|
@@ -54,7 +54,7 @@ export const GalleryInner = JSX<GalleryInnerProps>(
|
|
|
54
54
|
</div>
|
|
55
55
|
) : null}
|
|
56
56
|
|
|
57
|
-
{button ?
|
|
57
|
+
{button ? renderButton({ button, buttonClassName: 'mt-8 mx-auto' }) : null}
|
|
58
58
|
</BlockWrapper>
|
|
59
59
|
);
|
|
60
60
|
},
|
|
@@ -67,15 +67,15 @@ const renderDotsSubMenuItems = ({
|
|
|
67
67
|
}: DotsSubMenuItemsProps) => {
|
|
68
68
|
const isActive = (item: LinkProps) => item === activeSubItem;
|
|
69
69
|
|
|
70
|
-
return menuItems?.map((
|
|
70
|
+
return menuItems?.map(({ text, ...rest }) => (
|
|
71
71
|
<a
|
|
72
|
-
key={
|
|
73
|
-
{...useLink({ router, handlerDecorator },
|
|
72
|
+
key={rest.href}
|
|
73
|
+
{...useLink({ router, handlerDecorator }, rest)}
|
|
74
74
|
className={`text-l-light pb-4 hover:text-primary-main ${
|
|
75
|
-
isActive(
|
|
75
|
+
isActive(rest) ? 'text-primary-main' : ''
|
|
76
76
|
}`}
|
|
77
77
|
>
|
|
78
|
-
{
|
|
78
|
+
{text}
|
|
79
79
|
</a>
|
|
80
80
|
));
|
|
81
81
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useMemo, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useLink } from '../../hooks/useLink';
|
|
4
4
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
5
5
|
import type { LinkProps } from '../../model/LinkProps';
|
|
@@ -16,39 +16,52 @@ export interface HeaderSubMenuProps {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const HeaderSubMenu = JSX<HeaderSubMenuProps>(({ context, subItems = [], bgColor }) => {
|
|
19
|
-
const [menuVisible, setMenuVisible] = useState(false);
|
|
20
|
-
const router = context.useRouter();
|
|
21
19
|
const { handlerDecorator } = context;
|
|
20
|
+
const router = context.useRouter();
|
|
21
|
+
|
|
22
|
+
const subItemsListRef = useRef<HTMLDivElement | null>(null);
|
|
23
|
+
|
|
24
|
+
const [menuVisible, setMenuVisible] = useState(false);
|
|
22
25
|
|
|
23
26
|
const [visibleItemsCount, setVisibleItemsCount] = useState(subItems.length);
|
|
24
27
|
const dropDownMenuItems = subItems.slice(visibleItemsCount);
|
|
25
28
|
|
|
26
|
-
const
|
|
27
|
-
|
|
29
|
+
const observerOptions = useMemo(
|
|
30
|
+
() => ({ threshold: 1, root: subItemsListRef.current }),
|
|
31
|
+
[subItemsListRef.current],
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const observerCallbacks = useMemo(
|
|
35
|
+
() =>
|
|
36
|
+
subItems.map((_, index) => (entries: IntersectionObserverEntry[]) => {
|
|
37
|
+
if (!entries.length) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
28
40
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
41
|
+
// Assumption about sorting entries by time
|
|
42
|
+
const entry = entries[entries.length - 1];
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
if (entry.isIntersecting) {
|
|
45
|
+
setVisibleItemsCount(handleIntersectionActivation(index));
|
|
46
|
+
} else {
|
|
47
|
+
setVisibleItemsCount(handleIntersectionDeactivation(index));
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
[subItems],
|
|
51
|
+
);
|
|
35
52
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} else {
|
|
39
|
-
setVisibleItemsCount((prev) => Math.max(prev, itemIndex + 1));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
53
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
54
|
+
const toggleMenu = () => setMenuVisible(!menuVisible);
|
|
42
55
|
|
|
43
56
|
return (
|
|
44
57
|
<nav className="relative mt-6">
|
|
45
|
-
<div className="overflow-hidden whitespace-nowrap mr-52 pb-3">
|
|
58
|
+
<div ref={subItemsListRef} className="overflow-hidden whitespace-nowrap mr-52 pb-3">
|
|
46
59
|
{subItems.map((_, i) => (
|
|
47
60
|
<IntersectionObserverTag
|
|
48
|
-
tag="span"
|
|
49
|
-
observerCallback={observerCallback(i)}
|
|
50
|
-
observerOptions={{ threshold: 1 }}
|
|
51
61
|
key={String(i)}
|
|
62
|
+
tag="span"
|
|
63
|
+
observerCallback={observerCallbacks[i]}
|
|
64
|
+
observerOptions={observerOptions}
|
|
52
65
|
>
|
|
53
66
|
<HeaderItem
|
|
54
67
|
className={`mr-8 ${visibleItemsCount - 1 < i ? 'invisible' : ''}`}
|
|
@@ -72,3 +85,6 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(({ context, subItems = [],
|
|
|
72
85
|
</nav>
|
|
73
86
|
);
|
|
74
87
|
});
|
|
88
|
+
|
|
89
|
+
const handleIntersectionActivation = (index: number) => (prev: number) => Math.max(prev, index + 1);
|
|
90
|
+
const handleIntersectionDeactivation = (index: number) => (prev: number) => Math.min(prev, index);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { IconVersion } from '../../model/IconVersion';
|
|
2
1
|
import type { Picture } from '../../model/Picture';
|
|
3
2
|
import { context } from '../../react/setup-fixture';
|
|
4
3
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { Img } from '../../ui-kit/Img/Img';
|
|
6
4
|
import { MobileAppTile } from './MobileAppTile';
|
|
7
5
|
|
|
8
6
|
const image: Picture = {
|
|
@@ -34,14 +32,7 @@ const listItems = [
|
|
|
34
32
|
const button1: ButtonWithIconProps = {
|
|
35
33
|
aboveText: 'Загрузите в',
|
|
36
34
|
text: 'App Store',
|
|
37
|
-
|
|
38
|
-
<Img
|
|
39
|
-
image={{ icon: 'AppleIcon', iconVersion: 'white' as IconVersion }}
|
|
40
|
-
width="24"
|
|
41
|
-
height="24"
|
|
42
|
-
asSVG
|
|
43
|
-
/>
|
|
44
|
-
),
|
|
35
|
+
icon: { icon: 'AppleIcon', iconVersion: 'white' },
|
|
45
36
|
href: 'apps.apple.com',
|
|
46
37
|
version: 'primary',
|
|
47
38
|
};
|
|
@@ -49,13 +40,11 @@ const button1: ButtonWithIconProps = {
|
|
|
49
40
|
const button2: ButtonWithIconProps = {
|
|
50
41
|
aboveText: 'Доступно в',
|
|
51
42
|
text: 'Google Play',
|
|
52
|
-
|
|
43
|
+
icon: { icon: 'PlayMarketIcon' },
|
|
53
44
|
href: 'play.google.com',
|
|
54
45
|
version: 'secondary',
|
|
55
46
|
};
|
|
56
47
|
|
|
57
|
-
const icon = <Img image={{ icon: 'AppleIcon' }} width="24" height="24" asSVG />;
|
|
58
|
-
|
|
59
48
|
export default {
|
|
60
49
|
default: (
|
|
61
50
|
<div className="container grid grid-cols-12">
|
|
@@ -72,7 +61,7 @@ export default {
|
|
|
72
61
|
buttons={[
|
|
73
62
|
{
|
|
74
63
|
...button1,
|
|
75
|
-
|
|
64
|
+
icon: { icon: 'AppleIcon' },
|
|
76
65
|
version: 'secondary',
|
|
77
66
|
},
|
|
78
67
|
button2,
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useOfficeMap } from '
|
|
2
|
+
import { useOfficeMap } from './useOfficeMap';
|
|
3
3
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
4
4
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
5
5
|
import { OFFICE_MAP } from './mockOfficeMap';
|
|
6
|
-
import type {
|
|
6
|
+
import type { OfficeMapProps, WorkScheduleWeek } from './OfficeMapContent';
|
|
7
7
|
import { renderCurrentDaySchedule, renderDay, renderNearbyOffice } from './renderFunctions';
|
|
8
|
-
import { YandexMap } from '
|
|
8
|
+
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
9
|
+
import { nearbyOffices } from './nearbyOffices';
|
|
9
10
|
|
|
10
11
|
export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
11
12
|
const resultOfficeMap = useOfficeMap('063') || OFFICE_MAP;
|
|
12
13
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } =
|
|
13
14
|
resultOfficeMap as OfficeMapProps;
|
|
14
15
|
const {
|
|
15
|
-
workTime,
|
|
16
|
-
lunchHour,
|
|
17
|
-
workTimeSaturday,
|
|
18
|
-
lunchHourSaturday,
|
|
19
16
|
workingMonday,
|
|
20
17
|
workingTuesday,
|
|
21
18
|
workingWednesday,
|
|
@@ -24,8 +21,8 @@ export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
|
24
21
|
workingSaturday,
|
|
25
22
|
workingSunday,
|
|
26
23
|
} = workSchedule;
|
|
24
|
+
const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
|
|
27
25
|
const point = gpsLatitude && gpsLongitude ? [gpsLatitude, gpsLongitude] : null;
|
|
28
|
-
|
|
29
26
|
const workScheduleWeek: WorkScheduleWeek[] = [
|
|
30
27
|
{ title: 'Понедельник', status: workingMonday, workTime, lunchHour },
|
|
31
28
|
{ title: 'Вторник', status: workingTuesday, workTime, lunchHour },
|
|
@@ -46,12 +43,6 @@ export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
|
46
43
|
},
|
|
47
44
|
{ title: 'Воскресенье', status: workingSunday },
|
|
48
45
|
];
|
|
49
|
-
// Добавлено для проверки
|
|
50
|
-
const nearbyOffices: NearbyOffices[] = [
|
|
51
|
-
{ title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
|
|
52
|
-
{ title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
|
|
53
|
-
{ title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
|
|
54
|
-
];
|
|
55
46
|
const currentWeekDayInd = new Date().getDay();
|
|
56
47
|
const currentWeekDay =
|
|
57
48
|
currentWeekDayInd > 0 ? workScheduleWeek[currentWeekDayInd - 1] : workScheduleWeek[6];
|
|
@@ -70,9 +61,11 @@ export const OfficeMap = JSX<UniBlockProps>(({ className = '' }) => {
|
|
|
70
61
|
<div className="flex pt-4">{nearbyOffices.map(renderNearbyOffice)}</div>
|
|
71
62
|
</div>
|
|
72
63
|
<div className="flex justify-between pt-8">
|
|
73
|
-
<div className="flex-grow h-full
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
<div className="flex-grow h-full w-full overflow-hidden">
|
|
65
|
+
{point ? <YandexMap points={[point]} className="h-full" /> : null}
|
|
66
|
+
</div>
|
|
67
|
+
<div className="w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col">
|
|
68
|
+
{workScheduleWeek.map(renderDay)}
|
|
76
69
|
</div>
|
|
77
70
|
</div>
|
|
78
71
|
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NearbyOffices } from './OfficeMapContent';
|
|
2
|
+
|
|
3
|
+
// Добавлено для проверки
|
|
4
|
+
export const nearbyOffices: NearbyOffices[] = [
|
|
5
|
+
{ title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
|
|
6
|
+
{ title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
|
|
7
|
+
{ title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
|
|
8
|
+
];
|
|
@@ -23,8 +23,11 @@ export const renderCurrentDaySchedule = ({ lunchHour, status, workTime }: WorkSc
|
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export const renderNearbyOffice = (
|
|
27
|
-
|
|
26
|
+
export const renderNearbyOffice = (
|
|
27
|
+
{ icon, title, distance, time }: NearbyOffices,
|
|
28
|
+
index: number,
|
|
29
|
+
) => (
|
|
30
|
+
<div className="flex mr-4" key={`nearbyOffice${index}`}>
|
|
28
31
|
<Icon name={icon} width="16" height="16" asSVG className="mr-1" />
|
|
29
32
|
{title ? <span className="text-m">{title} </span> : null}
|
|
30
33
|
<span className="text-m-light">
|
|
@@ -47,7 +47,7 @@ export const PictureText = JSX<PictureTextProps>(
|
|
|
47
47
|
{benefits?.length ? (
|
|
48
48
|
<div className="flex flex-col gap-4">{benefits.map(renderBenefit(version))}</div>
|
|
49
49
|
) : null}
|
|
50
|
-
{renderInsuranceSumMonth(sum, monthLimit)}
|
|
50
|
+
{renderInsuranceSumMonth(Number(sum), Number(monthLimit))}
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
53
|
</BlockWrapper>
|
|
@@ -9,7 +9,7 @@ import { SafeDepositRentalForm } from './SafeDepositRentalForm';
|
|
|
9
9
|
import { HandleChangeState, SafeDepositRentalState } from './SafeDepositRentalTypes';
|
|
10
10
|
import { Region, useGetRegions } from './useGetRegions';
|
|
11
11
|
import { getBranch, getCoordinates } from './utils';
|
|
12
|
-
import { YandexMap } from '
|
|
12
|
+
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
13
13
|
|
|
14
14
|
export interface SafeDepositRentalProps extends SafeDepositRentalContent, UniBlockProps {}
|
|
15
15
|
|
|
@@ -58,7 +58,7 @@ export const SafeDepositRental = JSX<SafeDepositRentalProps>(
|
|
|
58
58
|
/>
|
|
59
59
|
{footnote ? <p className="text-s-light text-secondary-text">{footnote}</p> : null}
|
|
60
60
|
</div>
|
|
61
|
-
{points.length && showMap ? <YandexMap points={points} /> : null}
|
|
61
|
+
{points.length && showMap ? <YandexMap points={points} className="h-[640px]" /> : null}
|
|
62
62
|
</BlockWrapper>
|
|
63
63
|
);
|
|
64
64
|
},
|