@redneckz/wildless-cms-uni-blocks 0.6.16 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +305 -165
- 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/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/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 +32 -19
- 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/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/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/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/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
package/bundle/bundle.umd.js
CHANGED
|
@@ -280,19 +280,19 @@
|
|
|
280
280
|
|
|
281
281
|
const IntersectionObserverTag = JSX((props) => {
|
|
282
282
|
const { tag = 'section', observerCallback, observerOptions, className = '', anchor = null, children, } = props;
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
if (!
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
if (intersectionObserver.current) {
|
|
289
|
-
intersectionObserver.current.disconnect();
|
|
283
|
+
const tagRef = useRef(null);
|
|
284
|
+
useEffect(() => {
|
|
285
|
+
if (!tagRef.current) {
|
|
286
|
+
return undefined;
|
|
290
287
|
}
|
|
291
|
-
intersectionObserver
|
|
292
|
-
intersectionObserver.
|
|
288
|
+
const intersectionObserver = new IntersectionObserver(observerCallback, observerOptions);
|
|
289
|
+
intersectionObserver.observe(tagRef.current);
|
|
290
|
+
return () => {
|
|
291
|
+
intersectionObserver.disconnect();
|
|
292
|
+
};
|
|
293
293
|
}, [observerCallback, observerOptions]);
|
|
294
294
|
const Tag = tag;
|
|
295
|
-
return (jsx(Tag, { ref:
|
|
295
|
+
return (jsx(Tag, { ref: tagRef, className: className, id: anchor, children: children }));
|
|
296
296
|
});
|
|
297
297
|
|
|
298
298
|
const THRESHOLD_ACCURACY = 100; // Decimals number (100 is for two decimals number, 0.**)
|
|
@@ -639,12 +639,22 @@
|
|
|
639
639
|
const ButtonSection = JSX(({ context, className = '', buttons }) => {
|
|
640
640
|
const { handlerDecorator } = context;
|
|
641
641
|
const router = context.useRouter();
|
|
642
|
-
return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => (
|
|
643
|
-
});
|
|
644
|
-
const ButtonSectionItem = JSX(({ router, handlerDecorator, button }) => {
|
|
645
|
-
const buttonProps = useLink({ router, handlerDecorator }, button);
|
|
646
|
-
return jsx(Button, { ...button, ...buttonProps });
|
|
642
|
+
return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton({ button: useLink({ router, handlerDecorator }, button), index })) })) : null;
|
|
647
643
|
});
|
|
644
|
+
function renderButton({ button, buttonClassName, index }) {
|
|
645
|
+
const { icon, iconRight, version, ...rest } = button;
|
|
646
|
+
const iconVersion = version === 'secondary' ? 'normal' : 'white';
|
|
647
|
+
const leftIcon = renderButtonIcon({ icon, iconVersion });
|
|
648
|
+
const rightIcon = renderButtonIcon({ icon: iconRight, iconVersion });
|
|
649
|
+
return (jsx(Button, { className: buttonClassName, appendLeft: leftIcon, appendRight: rightIcon, version: version, ...rest }, index ? String(index) : ''));
|
|
650
|
+
}
|
|
651
|
+
const renderButtonIcon = ({ icon, iconVersion }) => {
|
|
652
|
+
if (!icon?.icon && !icon?.src) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
const iconWidth = icon?.size?.width ? `${icon.size.width}` : '24';
|
|
656
|
+
return jsx(ImgInner, { image: { ...icon, iconVersion: iconVersion }, width: iconWidth, height: "24", asSVG: true });
|
|
657
|
+
};
|
|
648
658
|
|
|
649
659
|
const Description = JSX((props) => {
|
|
650
660
|
const { className = '', description } = props;
|
|
@@ -1242,7 +1252,7 @@
|
|
|
1242
1252
|
white: 'bg-white',
|
|
1243
1253
|
};
|
|
1244
1254
|
const CatalogCard = JSX(({ className = '', title, description, image, price, button, colors }) => {
|
|
1245
|
-
return (jsxs("section", { className: `border border-solid box-border border-main-stroke p-[30px] min-w-[402px] flex flex-col justify-left ${className}`, role: "listitem", children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? jsx("div", { className: "text-m-light text-left mb-4", children: description }) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-m-light text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }), colors.map(renderColorOption)] })) : null, price ? jsxs("div", { className: "text-h3 text-left", children: [price, "\u00A0\u20BD"] }) : null, button ?
|
|
1255
|
+
return (jsxs("section", { className: `border border-solid box-border border-main-stroke p-[30px] min-w-[402px] flex flex-col justify-left ${className}`, role: "listitem", children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? jsx("div", { className: "text-m-light text-left mb-4", children: description }) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-m-light text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }), colors.map(renderColorOption)] })) : null, price ? jsxs("div", { className: "text-h3 text-left", children: [price, "\u00A0\u20BD"] }) : null, button ? renderButton({ button, buttonClassName: 'mt-5 w-full' }) : null] }));
|
|
1246
1256
|
});
|
|
1247
1257
|
const renderColorOption = (color, i) => (jsx("span", { className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap$1[color]}` }, String(i)));
|
|
1248
1258
|
|
|
@@ -1389,62 +1399,6 @@
|
|
|
1389
1399
|
return (jsxs("section", { className: `flex flex-col justify-center items-center mt-12 ${className}`, role: "listitem", children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? (jsx("div", { className: "font-sans text-xl-light mb-7 max-w-[613px] text-center", children: subtitle })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
|
|
1390
1400
|
});
|
|
1391
1401
|
|
|
1392
|
-
const roundTo = (value, precision = 2) => {
|
|
1393
|
-
const factor = 10 ** precision;
|
|
1394
|
-
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
1395
|
-
};
|
|
1396
|
-
|
|
1397
|
-
function useExchangeRates() {
|
|
1398
|
-
const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
|
|
1399
|
-
const result = data?.hits?.hits?.map((_) => _._source) || [];
|
|
1400
|
-
return result.length ? getCurrencyListByRate(result) : result;
|
|
1401
|
-
}
|
|
1402
|
-
function fetchExchangeRates() {
|
|
1403
|
-
return fetchJSON(EXCHANGE_RATES_URL, {
|
|
1404
|
-
method: 'POST',
|
|
1405
|
-
body: JSON.stringify(EXCHANGE_RATES_BODY),
|
|
1406
|
-
});
|
|
1407
|
-
}
|
|
1408
|
-
const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
|
|
1409
|
-
const EXCHANGE_RATES_BODY = {
|
|
1410
|
-
query: {
|
|
1411
|
-
bool: {
|
|
1412
|
-
must: [
|
|
1413
|
-
{
|
|
1414
|
-
term: {
|
|
1415
|
-
// eslint-disable-next-line camelcase
|
|
1416
|
-
russian_region_code: '77',
|
|
1417
|
-
},
|
|
1418
|
-
},
|
|
1419
|
-
{
|
|
1420
|
-
term: {
|
|
1421
|
-
// eslint-disable-next-line camelcase
|
|
1422
|
-
from_volume: '0',
|
|
1423
|
-
},
|
|
1424
|
-
},
|
|
1425
|
-
{
|
|
1426
|
-
terms: {
|
|
1427
|
-
// eslint-disable-next-line camelcase
|
|
1428
|
-
currency_pair: ['USD/RUB', 'EUR/RUB'],
|
|
1429
|
-
},
|
|
1430
|
-
},
|
|
1431
|
-
],
|
|
1432
|
-
},
|
|
1433
|
-
},
|
|
1434
|
-
};
|
|
1435
|
-
const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
|
|
1436
|
-
const currencyInfo = _['currency_first'];
|
|
1437
|
-
const currencyCode = currencyInfo?.code;
|
|
1438
|
-
if (!result.some((i) => i.code === currencyCode)) {
|
|
1439
|
-
result.push({
|
|
1440
|
-
code: currencyCode,
|
|
1441
|
-
buy: roundTo(Number(_.rate_buy), 3),
|
|
1442
|
-
sell: roundTo(Number(_.rate_sell), 3),
|
|
1443
|
-
});
|
|
1444
|
-
}
|
|
1445
|
-
return result;
|
|
1446
|
-
}, []);
|
|
1447
|
-
|
|
1448
1402
|
const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
|
|
1449
1403
|
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] }));
|
|
1450
1404
|
});
|
|
@@ -1471,11 +1425,16 @@
|
|
|
1471
1425
|
return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
|
|
1472
1426
|
});
|
|
1473
1427
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1474
|
-
const
|
|
1475
|
-
return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [
|
|
1428
|
+
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
1429
|
+
return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [currency ? (jsx(ImgInner, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx("span", { className: "ml-2", children: currency })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) })] }, currency));
|
|
1476
1430
|
};
|
|
1477
1431
|
|
|
1478
|
-
const CurrentLocation = JSX(({ className = '', address
|
|
1432
|
+
const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(ImgInner, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, jsx("p", { className: "text-secondary-text m-0 text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
1433
|
+
|
|
1434
|
+
const roundTo = (value, precision = 2) => {
|
|
1435
|
+
const factor = 10 ** precision;
|
|
1436
|
+
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
1437
|
+
};
|
|
1479
1438
|
|
|
1480
1439
|
const calculateResult = (value, rate, precision) => {
|
|
1481
1440
|
const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
|
|
@@ -1544,7 +1503,10 @@
|
|
|
1544
1503
|
|
|
1545
1504
|
function renderInput(props) {
|
|
1546
1505
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
1547
|
-
const ratesOptions = rates.map((_) => ({
|
|
1506
|
+
const ratesOptions = rates.map((_) => ({
|
|
1507
|
+
key: _?.currency?.currency ?? '',
|
|
1508
|
+
text: _?.currency?.currency ?? '',
|
|
1509
|
+
}));
|
|
1548
1510
|
const selectedValue = { key: selected, text: selected };
|
|
1549
1511
|
return (jsxs("div", { className: "relative flex", children: [jsx(Input, { className: "shrink-0 text-l w-full appearance-none mr-[-90px]", placeholder: placeholder, type: "text", value: value, onChange: setValue }), ratesOptions.length ? (jsx(Select, { isBorder: false, onChange: (_) => setSelected(_.key), options: ratesOptions, value: selectedValue })) : null] }));
|
|
1550
1512
|
}
|
|
@@ -1555,8 +1517,8 @@
|
|
|
1555
1517
|
const [calcState, setCalcState] = useState({
|
|
1556
1518
|
inputSell: '',
|
|
1557
1519
|
inputBuy: '',
|
|
1558
|
-
selectSell: currencyRatesBuy?.[0]?.
|
|
1559
|
-
selectBuy: currencyRatesSell?.[0]?.
|
|
1520
|
+
selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
|
|
1521
|
+
selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
|
|
1560
1522
|
});
|
|
1561
1523
|
const handleSetCalcState = (newState) => {
|
|
1562
1524
|
setCalcState((oldState) => ({ ...oldState, ...newState }));
|
|
@@ -1582,8 +1544,8 @@
|
|
|
1582
1544
|
callbackCurrencySelect({
|
|
1583
1545
|
value,
|
|
1584
1546
|
oppositeValue: calcState.selectBuy,
|
|
1585
|
-
handleConvert: (
|
|
1586
|
-
handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell,
|
|
1547
|
+
handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
|
|
1548
|
+
handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, currencyFrom, currencyTo);
|
|
1587
1549
|
},
|
|
1588
1550
|
});
|
|
1589
1551
|
};
|
|
@@ -1592,42 +1554,75 @@
|
|
|
1592
1554
|
callbackCurrencySelect({
|
|
1593
1555
|
value,
|
|
1594
1556
|
oppositeValue: calcState.selectSell,
|
|
1595
|
-
handleConvert: (
|
|
1557
|
+
handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, currencyTo, currencyFrom),
|
|
1596
1558
|
});
|
|
1597
1559
|
};
|
|
1598
|
-
const handleInputSell = (setCalcState, currencyRatesSell) => (value,
|
|
1599
|
-
setCalcState({ inputSell: formatValue(value), selectBuy:
|
|
1600
|
-
const rate = currencyRatesSell.find((_) => _.
|
|
1601
|
-
currencyRatesSell.find((_) => _.
|
|
1560
|
+
const handleInputSell = (setCalcState, currencyRatesSell) => (value, currencyFrom, currencyTo) => {
|
|
1561
|
+
setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
|
|
1562
|
+
const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
|
|
1563
|
+
currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate;
|
|
1602
1564
|
if (rate) {
|
|
1603
1565
|
setCalcState({
|
|
1604
|
-
inputBuy: String(calculateResult(value, rate,
|
|
1566
|
+
inputBuy: String(calculateResult(value, rate, currencyFrom === Currency.RUB) || ''),
|
|
1605
1567
|
});
|
|
1606
1568
|
}
|
|
1607
1569
|
};
|
|
1608
|
-
const handleInputBuy = (setCalcState, currencyRatesBuy) => (value,
|
|
1609
|
-
setCalcState({ inputBuy: formatValue(value), selectSell:
|
|
1610
|
-
const rate = currencyRatesBuy.find((_) => _.
|
|
1611
|
-
currencyRatesBuy.find((_) => _.
|
|
1570
|
+
const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, currencyTo, currencyFrom) => {
|
|
1571
|
+
setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
|
|
1572
|
+
const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
|
|
1573
|
+
currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate;
|
|
1612
1574
|
if (rate) {
|
|
1613
1575
|
setCalcState({
|
|
1614
|
-
inputSell: String(calculateResult(value, rate,
|
|
1576
|
+
inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
|
|
1615
1577
|
});
|
|
1616
1578
|
}
|
|
1617
1579
|
};
|
|
1618
1580
|
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1621
|
-
|
|
1581
|
+
const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
|
|
1582
|
+
const REGION_URL = '/api/v1/region';
|
|
1583
|
+
function useFetchExchangeRateData() {
|
|
1584
|
+
const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
|
|
1585
|
+
return data || {};
|
|
1586
|
+
}
|
|
1587
|
+
const fetchData = async (urlExchangeRates) => {
|
|
1588
|
+
const region = await fetchRegion();
|
|
1589
|
+
const regionCode = region?.code || '000';
|
|
1590
|
+
const exchangeRates = await fetchExchangeRates(urlExchangeRates, regionCode);
|
|
1591
|
+
return { region, exchangeRates };
|
|
1622
1592
|
};
|
|
1593
|
+
const fetchRegion = async () => {
|
|
1594
|
+
try {
|
|
1595
|
+
return await fetchJSONUnsafe(REGION_URL, { method: 'GET' });
|
|
1596
|
+
}
|
|
1597
|
+
catch (error) {
|
|
1598
|
+
console.log(error);
|
|
1599
|
+
return {};
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
const fetchExchangeRates = async (url, regionCode) => {
|
|
1603
|
+
try {
|
|
1604
|
+
return await fetchJSONUnsafe(url + `?regionCode=${regionCode}`, {
|
|
1605
|
+
method: 'GET',
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1608
|
+
catch (error) {
|
|
1609
|
+
console.log(error);
|
|
1610
|
+
return {};
|
|
1611
|
+
}
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1623
1614
|
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
|
|
1624
|
-
const
|
|
1625
|
-
const
|
|
1626
|
-
currencyRatesBuy.
|
|
1627
|
-
|
|
1628
|
-
currencyRatesSell.
|
|
1629
|
-
|
|
1615
|
+
const { exchangeRates } = useFetchExchangeRateData();
|
|
1616
|
+
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
1617
|
+
const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
|
|
1618
|
+
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
1619
|
+
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
1620
|
+
currencyRatesSell.push({ currency: { currency: Currency.RUB } });
|
|
1621
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border min-h-[320px] ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4 mb-5" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
1630
1622
|
});
|
|
1623
|
+
const getCurrencyRates = (currencies) => {
|
|
1624
|
+
return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
|
|
1625
|
+
};
|
|
1631
1626
|
|
|
1632
1627
|
const ICON_VERSION_MAP = {
|
|
1633
1628
|
'bg-white': 'normal',
|
|
@@ -1850,7 +1845,7 @@
|
|
|
1850
1845
|
});
|
|
1851
1846
|
|
|
1852
1847
|
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isDotted = true, align = 'center', }) => {
|
|
1853
|
-
return (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$1(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text ?
|
|
1848
|
+
return (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$1(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text ? renderButton({ button, buttonClassName: 'mt-6' }) : null] }));
|
|
1854
1849
|
});
|
|
1855
1850
|
const renderImage$1 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image, asSVG: true })) : null] }));
|
|
1856
1851
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
@@ -1879,7 +1874,7 @@
|
|
|
1879
1874
|
isShown: [showPrevButton, showNextButton],
|
|
1880
1875
|
btnClass: ['left-8', 'right-8'],
|
|
1881
1876
|
className: 'top-1/2',
|
|
1882
|
-
}), isGalleryScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] })) : null, button ?
|
|
1877
|
+
}), isGalleryScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] })) : null, button ? renderButton({ button, buttonClassName: 'mt-8 mx-auto' }) : null] }));
|
|
1883
1878
|
});
|
|
1884
1879
|
|
|
1885
1880
|
const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
|
|
@@ -2005,32 +2000,37 @@
|
|
|
2005
2000
|
});
|
|
2006
2001
|
const renderDotsSubMenuItems = ({ menuItems, router, handlerDecorator, activeSubItem, }) => {
|
|
2007
2002
|
const isActive = (item) => item === activeSubItem;
|
|
2008
|
-
return menuItems?.map((
|
|
2003
|
+
return menuItems?.map(({ text, ...rest }) => (jsx("a", { ...useLink({ router, handlerDecorator }, rest), className: `text-l-light pb-4 hover:text-primary-main ${isActive(rest) ? 'text-primary-main' : ''}`, children: text }, rest.href)));
|
|
2009
2004
|
};
|
|
2010
2005
|
const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
|
|
2011
2006
|
|
|
2012
2007
|
const HeaderSubMenu = JSX(({ context, subItems = [], bgColor }) => {
|
|
2013
|
-
const [menuVisible, setMenuVisible] = useState(false);
|
|
2014
|
-
const router = context.useRouter();
|
|
2015
2008
|
const { handlerDecorator } = context;
|
|
2009
|
+
const router = context.useRouter();
|
|
2010
|
+
const subItemsListRef = useRef(null);
|
|
2011
|
+
const [menuVisible, setMenuVisible] = useState(false);
|
|
2016
2012
|
const [visibleItemsCount, setVisibleItemsCount] = useState(subItems.length);
|
|
2017
2013
|
const dropDownMenuItems = subItems.slice(visibleItemsCount);
|
|
2018
|
-
const
|
|
2019
|
-
const
|
|
2020
|
-
const observerCallback = (itemIndex) => (entries) => {
|
|
2014
|
+
const observerOptions = useMemo(() => ({ threshold: 1, root: subItemsListRef.current }), [subItemsListRef.current]);
|
|
2015
|
+
const observerCallbacks = useMemo(() => subItems.map((_, index) => (entries) => {
|
|
2021
2016
|
if (!entries.length) {
|
|
2022
2017
|
return;
|
|
2023
2018
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2019
|
+
// Assumption about sorting entries by time
|
|
2020
|
+
const entry = entries[entries.length - 1];
|
|
2021
|
+
if (entry.isIntersecting) {
|
|
2022
|
+
setVisibleItemsCount(handleIntersectionActivation(index));
|
|
2027
2023
|
}
|
|
2028
2024
|
else {
|
|
2029
|
-
setVisibleItemsCount((
|
|
2025
|
+
setVisibleItemsCount(handleIntersectionDeactivation(index));
|
|
2030
2026
|
}
|
|
2031
|
-
};
|
|
2032
|
-
|
|
2027
|
+
}), [subItems]);
|
|
2028
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
2029
|
+
const toggleMenu = () => setMenuVisible(!menuVisible);
|
|
2030
|
+
return (jsxs("nav", { className: "relative mt-6", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap mr-52 pb-3", children: subItems.map((_, i) => (jsx(IntersectionObserverTag, { tag: "span", observerCallback: observerCallbacks[i], observerOptions: observerOptions, children: jsx(HeaderItem, { className: `mr-8 ${visibleItemsCount - 1 < i ? 'invisible' : ''}`, active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }) }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { context: context, activeSubItem: activeSubItem, menuVisible: menuVisible, toggleMenu: toggleMenu, menuItems: dropDownMenuItems, bgColor: bgColor })) : null] }));
|
|
2033
2031
|
});
|
|
2032
|
+
const handleIntersectionActivation = (index) => (prev) => Math.max(prev, index + 1);
|
|
2033
|
+
const handleIntersectionDeactivation = (index) => (prev) => Math.min(prev, index);
|
|
2034
2034
|
|
|
2035
2035
|
const BORDER_COLORS = {
|
|
2036
2036
|
'bg-white': 'bg-main-divider',
|
|
@@ -2341,7 +2341,7 @@
|
|
|
2341
2341
|
const lunchHourText = hasTime ? `Перерыв ${lunchHour}` : lunchHour;
|
|
2342
2342
|
return status ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4", children: workTime ? workTime : null }), jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-golden border-golden", children: lunchHour ? lunchHourText : null })] })) : (jsx("div", { className: "flex", children: jsx("div", { className: "p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }) }));
|
|
2343
2343
|
};
|
|
2344
|
-
const renderNearbyOffice = ({ icon, title, distance, time },
|
|
2344
|
+
const renderNearbyOffice = ({ icon, title, distance, time }, index) => (jsxs("div", { className: "flex mr-4", children: [jsx(Icon, { name: icon, width: "16", height: "16", asSVG: true, className: "mr-1" }), title ? jsxs("span", { className: "text-m", children: [title, "\u00A0"] }) : null, jsxs("span", { className: "text-m-light", children: [distance ? ` (${distance})` : null, time ? `, ${time}` : null] })] }, `nearbyOffice${index}`));
|
|
2345
2345
|
const renderDay = ({ title, status, workTime, lunchHour, description }, inx) => (jsxs("div", { className: "flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0", children: [jsxs("div", { className: "flex justify-between items-center w-full pb-1 text-l text-primary-text", children: [jsx("div", { children: title }), status ? null : jsx("div", { className: "text-m-light text-error", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }), status && workTime ? jsx("div", { children: workTime }) : null] }), status && lunchHour ? renderLunchHour(lunchHour) : null, description ? (jsx("div", { className: "pb-1 text-s-light text-secondary-text", children: description })) : null] }, `day${inx}`));
|
|
2346
2346
|
const renderLunchHour = (lunchHour) => {
|
|
2347
2347
|
const hasTime = /\d+/gi.test(lunchHour);
|
|
@@ -2380,6 +2380,72 @@
|
|
|
2380
2380
|
});
|
|
2381
2381
|
}
|
|
2382
2382
|
|
|
2383
|
+
const styles$3 = {
|
|
2384
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
2385
|
+
hover: 'hover:bg-primary-hover',
|
|
2386
|
+
active: 'active:bg-primary-active',
|
|
2387
|
+
border: 'border border-transparent rounded-md',
|
|
2388
|
+
position: 'flex items-center justify-center',
|
|
2389
|
+
font: 'text-center font-sans',
|
|
2390
|
+
};
|
|
2391
|
+
const renderOpenMap = (pointsCenter) => {
|
|
2392
|
+
const getYandexMapUrl = () => {
|
|
2393
|
+
return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
|
|
2394
|
+
};
|
|
2395
|
+
return (jsx("a", { className: `select-none cursor-pointer px-9 h-12 bg-white bg-primary-main text-white ${Object.values(styles$3).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
|
|
2396
|
+
};
|
|
2397
|
+
|
|
2398
|
+
const styles$2 = {
|
|
2399
|
+
border: 'border border-transparent rounded-md',
|
|
2400
|
+
position: 'relative flex items-center',
|
|
2401
|
+
font: 'text-center font-sans',
|
|
2402
|
+
shadow: 'shadow-[0_4px_25px_rgba(0,0,0,0.07)]',
|
|
2403
|
+
};
|
|
2404
|
+
const renderSearchField = (points, yandexMaps, updatePointsToRender) => {
|
|
2405
|
+
const onChange = (e) => {
|
|
2406
|
+
const value = e.target?.value ? e.target?.value.toLowerCase() : '';
|
|
2407
|
+
if (value) {
|
|
2408
|
+
const searchResult = points.filter((_) => {
|
|
2409
|
+
const textLowerCase = _.text.toLowerCase();
|
|
2410
|
+
if (textLowerCase.indexOf(value) > -1) {
|
|
2411
|
+
return _;
|
|
2412
|
+
}
|
|
2413
|
+
return null;
|
|
2414
|
+
});
|
|
2415
|
+
updatePointsToRender(searchResult);
|
|
2416
|
+
}
|
|
2417
|
+
else {
|
|
2418
|
+
updatePointsToRender(null);
|
|
2419
|
+
}
|
|
2420
|
+
};
|
|
2421
|
+
return (jsxs("div", { className: `${Object.values(styles$2).join(' ')} bg-white py-3 pl-11 pr-4 w-full`, children: [jsx(Icon, { name: "LoupeIcon", iconVersion: "black", width: "20", height: "20", asSVG: true, className: "absolute left-4" }), jsx("input", { type: "text", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0438\u043B\u0438 \u043C\u0435\u0442\u0440\u043E", onChange: onChange, className: "border-0 focus:border-0 outline-0 w-full" })] }));
|
|
2422
|
+
};
|
|
2423
|
+
|
|
2424
|
+
const styles$1 = {
|
|
2425
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
2426
|
+
hover: 'hover:bg-primary-hover',
|
|
2427
|
+
active: 'active:bg-primary-active',
|
|
2428
|
+
border: 'border border-transparent rounded-md',
|
|
2429
|
+
position: 'absolute flex items-center justify-center',
|
|
2430
|
+
font: 'text-center font-sans',
|
|
2431
|
+
};
|
|
2432
|
+
const renderUserGeolocation = (map, yandexMaps, className) => {
|
|
2433
|
+
const setUserGeoLocation = () => {
|
|
2434
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2435
|
+
// @ts-ignore
|
|
2436
|
+
yandexMaps.geolocation
|
|
2437
|
+
.get({
|
|
2438
|
+
provider: 'yandex',
|
|
2439
|
+
autoReverseGeocode: true,
|
|
2440
|
+
mapStateAutoApply: true,
|
|
2441
|
+
})
|
|
2442
|
+
.then(function (result) {
|
|
2443
|
+
map.geoObjects.add(result.geoObjects);
|
|
2444
|
+
});
|
|
2445
|
+
};
|
|
2446
|
+
return (jsx("div", { className: `select-none cursor-pointer py-4 w-12 bg-white ${Object.values(styles$1).join(' ')} ${className}`, onClick: setUserGeoLocation, children: jsx(Icon, { name: "UserGeoLocationIcon", width: "20", height: "16" }) }));
|
|
2447
|
+
};
|
|
2448
|
+
|
|
2383
2449
|
const getNS = (_) => globalThis[_];
|
|
2384
2450
|
function useExternalNS(namespaceName, url) {
|
|
2385
2451
|
const [externalNS, setExternalNS] = useState();
|
|
@@ -2417,37 +2483,137 @@
|
|
|
2417
2483
|
const YMAPS_NAMESPACE = 'ymaps';
|
|
2418
2484
|
const useYandexMaps = () => {
|
|
2419
2485
|
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY}&lang=ru_RU`;
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2486
|
+
return useExternalNS(YMAPS_NAMESPACE, url);
|
|
2487
|
+
};
|
|
2488
|
+
|
|
2489
|
+
const styles = {
|
|
2490
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
2491
|
+
hover: 'hover:bg-primary-hover',
|
|
2492
|
+
active: 'active:bg-primary-active',
|
|
2493
|
+
border: 'border-b border-b-2 border-gray last:border-0',
|
|
2494
|
+
position: 'relative flex items-center justify-center',
|
|
2495
|
+
font: 'text-center font-sans text-l',
|
|
2496
|
+
};
|
|
2497
|
+
// TODO: Добавить метод определения центральной точки
|
|
2498
|
+
const ZoomButton = JSX(({ yandexMaps, direction = 'in' }) => {
|
|
2499
|
+
const iconName = direction === 'in' ? 'PlusIcon' : 'MinusIcon';
|
|
2500
|
+
const changeZoom = () => {
|
|
2501
|
+
const currentZoom = yandexMaps.current.getZoom();
|
|
2502
|
+
const newZoom = direction === 'in' ? currentZoom + 1 : currentZoom - 1;
|
|
2503
|
+
yandexMaps.current.setZoom(newZoom, { checkZoomRange: true });
|
|
2504
|
+
};
|
|
2505
|
+
return (jsx("div", { onClick: changeZoom, className: `${Object.values(styles).join(' ')} bg-white select-none cursor-pointer w-12 h-12`, children: jsx(Icon, { name: iconName, width: "20", height: "16" }) }));
|
|
2506
|
+
});
|
|
2507
|
+
|
|
2508
|
+
const mockPoints = [
|
|
2509
|
+
{ coords: [55.77, 37.46], text: 'Трактир' },
|
|
2510
|
+
{ coords: [55.66, 37.48], text: 'Трактор' },
|
|
2511
|
+
{ coords: [55.65, 37.42], text: 'Ресторан' },
|
|
2512
|
+
{ coords: [55.64, 37.54], text: 'Музей' },
|
|
2513
|
+
{ coords: [55.54, 37.52], text: 'Библиотека' },
|
|
2514
|
+
{ coords: [55.53, 37.56], text: 'Школа' },
|
|
2515
|
+
{ coords: [55.61, 37.61], text: 'Аптека' },
|
|
2516
|
+
{ coords: [55.8, 37.58], text: 'Бар' },
|
|
2517
|
+
{ coords: [55.71, 37.35], text: 'Институт' },
|
|
2518
|
+
{ coords: [55.74, 37.57], text: 'Университет' },
|
|
2519
|
+
{ coords: [55.58, 37.69], text: 'Больница' },
|
|
2520
|
+
{ coords: [55.57, 37.7], text: 'Цирк' },
|
|
2521
|
+
{ coords: [55.55, 37.64], text: 'Магазин' },
|
|
2522
|
+
{ coords: [55.5, 37.75], text: 'Булочная' },
|
|
2523
|
+
{ coords: [55.81, 37.73], text: 'Полиция' },
|
|
2524
|
+
{ coords: [55.73, 37.68], text: 'Салон красоты' },
|
|
2525
|
+
{ coords: [55.86, 37.76], text: 'Баня' },
|
|
2526
|
+
{ coords: [55.38, 37.69], text: 'Гараж' },
|
|
2527
|
+
{ coords: [55.91, 37.5], text: 'Дом' },
|
|
2528
|
+
{ coords: [55.62, 37.32], text: 'Прачечная' },
|
|
2529
|
+
{ coords: [55.85, 37.41], text: 'Стадион' },
|
|
2530
|
+
{ coords: [55.67, 37.24], text: 'Вокзал' },
|
|
2531
|
+
{ coords: [55.79, 37.41], text: 'Кафе' },
|
|
2532
|
+
];
|
|
2423
2533
|
|
|
2424
|
-
const
|
|
2534
|
+
const FULLSCREEN_STYLES = {
|
|
2535
|
+
border: 'border border-transparent rounded-md ',
|
|
2536
|
+
position: 'absolute flex items-center justify-center',
|
|
2537
|
+
size: 'w-12 h-12',
|
|
2538
|
+
focus: 'focus:border-primary-focus focus:border',
|
|
2539
|
+
font: 'text-center font-sans',
|
|
2540
|
+
active: 'active:bg-primary-active',
|
|
2541
|
+
hover: 'hover:bg-primary-hover',
|
|
2542
|
+
other: 'select-none cursor-pointer',
|
|
2543
|
+
};
|
|
2544
|
+
// TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
|
|
2545
|
+
// Сейчас реализован поиск среди тестовых данных
|
|
2546
|
+
// TODO: Также выяснить что делать когда ничего не найдено
|
|
2547
|
+
// TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
|
|
2548
|
+
const YandexMap = JSX(({ points, className = '', zoom = 5, showSearchField = false }) => {
|
|
2425
2549
|
const map = useRef(null);
|
|
2426
2550
|
const yandexMaps = useYandexMaps();
|
|
2551
|
+
const [isFullScreen, setIsFullScreen] = useState();
|
|
2552
|
+
const [pointsToRender, setPointsToRender] = useState(normalizePoints(mockPoints));
|
|
2553
|
+
const pointsCenter = getCenterPoint(points);
|
|
2427
2554
|
useEffect(() => {
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2555
|
+
if (!map?.current) {
|
|
2556
|
+
yandexMaps?.ready(() => {
|
|
2557
|
+
map.current = new yandexMaps.Map('map', {
|
|
2558
|
+
center: pointsCenter,
|
|
2559
|
+
zoom,
|
|
2560
|
+
controls: [],
|
|
2561
|
+
suppressMapOpenBlock: true,
|
|
2562
|
+
});
|
|
2563
|
+
renderClusterer(yandexMaps, map.current, pointsToRender);
|
|
2432
2564
|
});
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
}, [map, point, yandexMaps]);
|
|
2565
|
+
}
|
|
2566
|
+
}, [yandexMaps, map, pointsToRender]);
|
|
2436
2567
|
useEffect(() => {
|
|
2437
|
-
if (map.current &&
|
|
2438
|
-
|
|
2568
|
+
if (map.current && pointsToRender && yandexMaps) {
|
|
2569
|
+
const newPoints = pointsToRender.length < 1 ? normalizePoints(mockPoints) : pointsToRender;
|
|
2570
|
+
renderClusterer(yandexMaps, map.current, newPoints);
|
|
2439
2571
|
}
|
|
2440
|
-
}, [map,
|
|
2572
|
+
}, [map, pointsToRender, yandexMaps]);
|
|
2441
2573
|
if (!yandexMaps) {
|
|
2442
2574
|
return null;
|
|
2443
2575
|
}
|
|
2444
|
-
|
|
2576
|
+
const toggleFullscreen = () => {
|
|
2577
|
+
const container = map.current.container;
|
|
2578
|
+
if (!isFullScreen) {
|
|
2579
|
+
container.enterFullscreen();
|
|
2580
|
+
}
|
|
2581
|
+
else {
|
|
2582
|
+
container.exitFullscreen();
|
|
2583
|
+
}
|
|
2584
|
+
setIsFullScreen(container.isFullscreen());
|
|
2585
|
+
};
|
|
2586
|
+
const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
|
|
2587
|
+
const updatePointsToRender = (newPoints) => {
|
|
2588
|
+
if (newPoints) {
|
|
2589
|
+
const normalizedPoints = normalizePoints(newPoints);
|
|
2590
|
+
setPointsToRender(normalizedPoints);
|
|
2591
|
+
}
|
|
2592
|
+
};
|
|
2593
|
+
return (jsxs("div", { id: "map", className: `${isFullScreen ? '' : 'relative'} w-full ${className}`, children: [jsx("div", { className: `absolute flex left-2 top-4 w-[50%] ${zIndex}`, children: showSearchField
|
|
2594
|
+
? renderSearchField(mockPoints, yandexMaps, updatePointsToRender)
|
|
2595
|
+
: renderOpenMap(pointsCenter) }), jsx("div", { className: `${Object.values(FULLSCREEN_STYLES).join(' ')} ${zIndex} right-2 top-4 bg-white`, onClick: toggleFullscreen, children: jsx(Icon, { name: "FullScreenIcon", width: "16", height: "16" }) }), jsxs("div", { className: `absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${zIndex}`, children: [jsx(ZoomButton, { yandexMaps: map }), jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map.current, yandexMaps, `right-2 top-80 ${zIndex}`)] }));
|
|
2445
2596
|
});
|
|
2597
|
+
const getCenterPoint = (points) => [
|
|
2598
|
+
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
2599
|
+
getArraySumAndAverage(mapByIndex(points, 1)),
|
|
2600
|
+
];
|
|
2601
|
+
const mapByIndex = (arr, index) => arr.map((a) => a[index]);
|
|
2602
|
+
const getArraySumAndAverage = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
|
2603
|
+
const normalizePoints = (points) => (points ? points.map((_) => _.coords) : null);
|
|
2604
|
+
|
|
2605
|
+
// Добавлено для проверки
|
|
2606
|
+
const nearbyOffices = [
|
|
2607
|
+
{ title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
|
|
2608
|
+
{ title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
|
|
2609
|
+
{ title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
|
|
2610
|
+
];
|
|
2446
2611
|
|
|
2447
2612
|
const OfficeMap = JSX(({ className = '' }) => {
|
|
2448
2613
|
const resultOfficeMap = useOfficeMap('063') || OFFICE_MAP;
|
|
2449
2614
|
const { name, address, gpsLatitude, gpsLongitude, workSchedule } = resultOfficeMap;
|
|
2450
|
-
const {
|
|
2615
|
+
const { workingMonday, workingTuesday, workingWednesday, workingThursday, workingFriday, workingSaturday, workingSunday, } = workSchedule;
|
|
2616
|
+
const { workTime, lunchHour, workTimeSaturday, lunchHourSaturday } = workSchedule;
|
|
2451
2617
|
const point = gpsLatitude && gpsLongitude ? [gpsLatitude, gpsLongitude] : null;
|
|
2452
2618
|
const workScheduleWeek = [
|
|
2453
2619
|
{ title: 'Понедельник', status: workingMonday, workTime, lunchHour },
|
|
@@ -2469,15 +2635,9 @@
|
|
|
2469
2635
|
},
|
|
2470
2636
|
{ title: 'Воскресенье', status: workingSunday },
|
|
2471
2637
|
];
|
|
2472
|
-
// Добавлено для проверки
|
|
2473
|
-
const nearbyOffices = [
|
|
2474
|
-
{ title: 'Деловой центр', time: '1 мин', distance: '~30 м.', icon: 'MetroIcon' },
|
|
2475
|
-
{ title: 'Выставочная', time: '5 мин', distance: '~120 м.', icon: 'MetroIcon' },
|
|
2476
|
-
{ title: 'Деловой центр', time: '8 мин', distance: '~350 м.', icon: 'MetroIcon' },
|
|
2477
|
-
];
|
|
2478
2638
|
const currentWeekDayInd = new Date().getDay();
|
|
2479
2639
|
const currentWeekDay = currentWeekDayInd > 0 ? workScheduleWeek[currentWeekDayInd - 1] : workScheduleWeek[6];
|
|
2480
|
-
return (jsxs("div", { className: `flex flex-col font-sans bg-white w-full ${className}`, children: [jsxs("div", { className: "flex flex-col px-12 pt-12", children: [jsxs("div", { className: "flex justify-between", children: [jsx("div", { className: "text-h2", children: name }), renderCurrentDaySchedule(currentWeekDay)] }), jsxs("div", { className: "flex text-l-light pt-4", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24", asSVG: true, className: "pr-1" }), address] }), jsx("div", { className: "flex pt-4", children: nearbyOffices.map(renderNearbyOffice) })] }), jsxs("div", { className: "flex justify-between pt-8", children: [jsx("div", { className: "flex-grow h-full
|
|
2640
|
+
return (jsxs("div", { className: `flex flex-col font-sans bg-white w-full ${className}`, children: [jsxs("div", { className: "flex flex-col px-12 pt-12", children: [jsxs("div", { className: "flex justify-between", children: [jsx("div", { className: "text-h2", children: name }), renderCurrentDaySchedule(currentWeekDay)] }), jsxs("div", { className: "flex text-l-light pt-4", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24", asSVG: true, className: "pr-1" }), address] }), jsx("div", { className: "flex pt-4", children: nearbyOffices.map(renderNearbyOffice) })] }), jsxs("div", { className: "flex justify-between pt-8", children: [jsx("div", { className: "flex-grow h-full w-full overflow-hidden", children: point ? jsx(YandexMap, { points: [point], className: "h-full" }) : null }), jsx("div", { className: "w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col", children: workScheduleWeek.map(renderDay) })] })] }));
|
|
2481
2641
|
});
|
|
2482
2642
|
|
|
2483
2643
|
const OfficeServicesBlock = JSX(({ className = '', context, title, servicesList, anchor = '', ...rest }) => {
|
|
@@ -2552,7 +2712,7 @@
|
|
|
2552
2712
|
const getIconVersion = (isIconWhite, icon) => icon?.iconVersion || isIconWhite ? 'white' : 'normal';
|
|
2553
2713
|
|
|
2554
2714
|
const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
|
|
2555
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-24 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(ImgInner, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
|
|
2715
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-24 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(ImgInner, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(Number(sum), Number(monthLimit))] })] })] }));
|
|
2556
2716
|
});
|
|
2557
2717
|
const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
|
|
2558
2718
|
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
@@ -2884,29 +3044,6 @@
|
|
|
2884
3044
|
return data || [];
|
|
2885
3045
|
}
|
|
2886
3046
|
|
|
2887
|
-
const YandexMap = JSX(({ points }) => {
|
|
2888
|
-
const map = useRef(null);
|
|
2889
|
-
const yandexMaps = useYandexMaps();
|
|
2890
|
-
useEffect(() => {
|
|
2891
|
-
yandexMaps?.ready(() => {
|
|
2892
|
-
map.current = new yandexMaps.Map('map', {
|
|
2893
|
-
center: points[0],
|
|
2894
|
-
zoom: 10,
|
|
2895
|
-
});
|
|
2896
|
-
renderClusterer(yandexMaps, map.current, points);
|
|
2897
|
-
});
|
|
2898
|
-
}, [yandexMaps]);
|
|
2899
|
-
useEffect(() => {
|
|
2900
|
-
if (map.current && points && yandexMaps) {
|
|
2901
|
-
renderClusterer(yandexMaps, map.current, points);
|
|
2902
|
-
}
|
|
2903
|
-
}, [map, points, yandexMaps]);
|
|
2904
|
-
if (!yandexMaps) {
|
|
2905
|
-
return null;
|
|
2906
|
-
}
|
|
2907
|
-
return (jsxs("div", { className: "pt-12 mt-1 bg-white", children: [jsx(Heading, { title: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", headingType: "h3", className: "mb-8 text-center" }), jsx("div", { id: "map", className: "h-[640px]" })] }));
|
|
2908
|
-
});
|
|
2909
|
-
|
|
2910
3047
|
const DEFAULT_DAYS = 26;
|
|
2911
3048
|
const SafeDepositRental = JSX(({ title, footnote, context, className = '', ...rest }) => {
|
|
2912
3049
|
const [showMap, setShowMap] = useState(false);
|
|
@@ -2925,7 +3062,7 @@
|
|
|
2925
3062
|
setShowMap(!showMap);
|
|
2926
3063
|
};
|
|
2927
3064
|
const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
|
|
2928
|
-
return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "font-sans bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onShowMapToggle: onShowMapToggle, onChange: handleChangeSafeDepositState }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), points.length && showMap ? jsx(YandexMap, { points: points }) : null] }));
|
|
3065
|
+
return (jsxs(BlockWrapper, { context: context, className: className, ...rest, children: [jsxs("div", { className: "font-sans bg-white px-8 py-12", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onShowMapToggle: onShowMapToggle, onChange: handleChangeSafeDepositState }), footnote ? jsx("p", { className: "text-s-light text-secondary-text", children: footnote }) : null] }), points.length && showMap ? jsx(YandexMap, { points: points, className: "h-[640px]" }) : null] }));
|
|
2929
3066
|
});
|
|
2930
3067
|
const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
2931
3068
|
|
|
@@ -3102,7 +3239,10 @@
|
|
|
3102
3239
|
return (jsxs(Button, { version: "primary", onClick: handleClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать ставки по вкладу' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20", asSVG: true })] }));
|
|
3103
3240
|
});
|
|
3104
3241
|
|
|
3105
|
-
const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ rounded, ...buttonProps }, idx) => (
|
|
3242
|
+
const renderButtonsCellData = ({ buttons }) => buttons && buttons?.length ? (jsx("div", { children: buttons.map(({ rounded, ...buttonProps }, idx) => renderButton({
|
|
3243
|
+
button: { rounded, ...buttonProps },
|
|
3244
|
+
buttonClassName: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`,
|
|
3245
|
+
})) })) : null;
|
|
3106
3246
|
const renderLabelDescriptionCellData = ({ label, description }) => {
|
|
3107
3247
|
const labelClassName = `text-h6 m-0 ${description ? 'mb-1' : ''}`;
|
|
3108
3248
|
return (jsxs("div", { children: [label ? jsx("div", { className: labelClassName, children: label }) : null, description ? jsx("div", { className: "text-secondary-text text-l-light", children: description }) : null] }));
|
|
@@ -3425,7 +3565,7 @@
|
|
|
3425
3565
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") }));
|
|
3426
3566
|
}
|
|
3427
3567
|
|
|
3428
|
-
const packageVersion = "0.6.
|
|
3568
|
+
const packageVersion = "0.6.17";
|
|
3429
3569
|
|
|
3430
3570
|
exports.Blocks = Blocks;
|
|
3431
3571
|
exports.ContentPage = ContentPage;
|