@redneckz/wildless-cms-uni-blocks 0.6.36 → 0.6.38
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.32.js +6 -0
- package/bundle/EventBus/EventBus.d.ts +6 -5
- package/bundle/EventBus/EventMap.d.ts +1 -4
- package/bundle/ProjectSettings.d.ts +2 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +299 -207
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
- package/{lib/components/InvestmentGallery/InvestmentGalleryContent.d.ts → bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
- package/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
- package/bundle/components/Footer/FooterDataProps.d.ts +8 -3
- package/bundle/components/Gallery/GalleryContent.d.ts +5 -0
- package/bundle/components/ImgBlock/ImgBlock.d.ts +6 -0
- package/bundle/components/ImgBlock/ImgBlockContent.d.ts +7 -0
- package/bundle/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
- package/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
- package/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
- package/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/bundle/components/Tabs/LinkTab.d.ts +0 -1
- package/bundle/components/Tabs/Tabs.d.ts +0 -4
- package/bundle/components/Video/VideoContent.d.ts +1 -0
- package/bundle/services/BlockRouter/BlockIntersection.d.ts +2 -0
- package/bundle/services/BlockRouter/BlockRouter.d.ts +23 -0
- package/bundle/services/BlockRouter/findActiveBlock.d.ts +3 -0
- package/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +5 -0
- package/bundle/services/BlockRouter/useBlockRouter.d.ts +2 -0
- package/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +2 -0
- package/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +3 -2
- package/bundle/ui-kit/InnerTable/InnerTableProps.d.ts +0 -3
- package/bundle/ui-kit/Paragraph/Paragraph.d.ts +1 -8
- package/bundle/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
- package/bundle/ui-kit/Radio/RadioProps.d.ts +1 -2
- package/bundle/ui-kit/Text/Text.d.ts +1 -26
- package/bundle/ui-kit/Text/TextProps.d.ts +26 -0
- package/bundle/utils/debounce.d.ts +5 -0
- package/dist/EventBus/EventBus.d.ts +6 -5
- package/dist/EventBus/EventBus.js +5 -3
- package/dist/EventBus/EventBus.js.map +1 -1
- package/dist/EventBus/EventMap.d.ts +1 -4
- package/dist/ProjectSettings.d.ts +2 -0
- package/dist/ProjectSettings.js +3 -0
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.js +1 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.js +7 -3
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +2 -2
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BusinessBlock/BusinessBlock.js +1 -1
- package/dist/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.js +4 -2
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +3 -1
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +4 -2
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/renderProposal.js +2 -2
- package/dist/components/Calculator/renderProposal.js.map +1 -1
- package/dist/components/CardTransfer/CardTransfer.js +1 -1
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +2 -1
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCard.js +2 -2
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +28 -0
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
- package/dist/components/{InvestmentGallery/InvestmentGalleryContent.d.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/Catalog/Catalog.js +1 -1
- package/dist/components/Catalog/Catalog.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +4 -4
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.js +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +2 -0
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/useContentPageData.js +4 -8
- package/dist/components/ContentPage/useContentPageData.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/FooterDataProps.d.ts +8 -3
- package/dist/components/Footer/MediaButton.js +1 -1
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +1 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +7 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +5 -0
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriod.js +2 -2
- package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +2 -2
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +1 -1
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Headline/Headline.js +1 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/ImgBlock/ImgBlock.d.ts +6 -0
- package/dist/components/ImgBlock/ImgBlock.js +11 -0
- package/dist/components/ImgBlock/ImgBlock.js.map +1 -0
- package/dist/components/ImgBlock/ImgBlockContent.d.ts +7 -0
- package/dist/components/{InvestmentGallery/InvestmentGalleryContent.js → ImgBlock/ImgBlockContent.js} +1 -1
- package/dist/components/ImgBlock/ImgBlockContent.js.map +1 -0
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -8
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -4
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkList/LinkList.js +1 -1
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/dist/components/OfficeMap/useOfficeMap.js +3 -4
- package/dist/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/dist/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
- package/dist/components/ParagraphBlock/ParagraphBlock.js +11 -0
- package/dist/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
- package/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
- package/{mobile/dist/components/InvestmentGallery/InvestmentGalleryContent.js → dist/components/ParagraphBlock/ParagraphBlockContent.js} +1 -1
- package/dist/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +9 -9
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/SafeDepositRental/RegionsAndBranches.js +1 -3
- package/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/dist/components/SafeDepositRental/RenderRadioButtons.js +1 -1
- package/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +2 -4
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -5
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/Tabs/LinkTab.d.ts +0 -1
- package/dist/components/Tabs/LinkTab.js +2 -8
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -4
- package/dist/components/Tabs/Tabs.js +6 -12
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/TariffsTable/TableTileHeader.js +1 -3
- package/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +6 -6
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +3 -1
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/Video/VideoContent.d.ts +1 -0
- package/dist/hooks/useLink.js +11 -2
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/services/BlockRouter/BlockIntersection.d.ts +2 -0
- package/dist/services/BlockRouter/BlockIntersection.js +2 -0
- package/dist/services/BlockRouter/BlockIntersection.js.map +1 -0
- package/dist/services/BlockRouter/BlockRouter.d.ts +23 -0
- package/dist/services/BlockRouter/BlockRouter.js +32 -0
- package/dist/services/BlockRouter/BlockRouter.js.map +1 -0
- package/dist/services/BlockRouter/findActiveBlock.d.ts +3 -0
- package/dist/services/BlockRouter/findActiveBlock.js +15 -0
- package/dist/services/BlockRouter/findActiveBlock.js.map +1 -0
- package/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +5 -0
- package/dist/services/BlockRouter/useBlockIntersectionObserver.js +28 -0
- package/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -0
- package/dist/services/BlockRouter/useBlockRouter.d.ts +2 -0
- package/dist/services/BlockRouter/useBlockRouter.js +8 -0
- package/dist/services/BlockRouter/useBlockRouter.js.map +1 -0
- package/dist/services/BlockRouter/useBlockRouterProvider.d.ts +2 -0
- package/dist/services/BlockRouter/useBlockRouterProvider.js +37 -0
- package/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.js +6 -20
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.mobile.js +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.mobile.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTable.js +3 -2
- package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableBody.js +2 -4
- package/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.d.ts +3 -2
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableProps.d.ts +0 -3
- package/dist/ui-kit/Paragraph/Paragraph.d.ts +1 -8
- package/dist/ui-kit/Paragraph/Paragraph.js.map +1 -1
- package/dist/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
- package/dist/ui-kit/Paragraph/ParagraphProps.js +2 -0
- package/dist/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
- package/dist/ui-kit/Radio/Radio.js +1 -1
- package/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/dist/ui-kit/Radio/RadioProps.d.ts +1 -2
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/ui-kit/Text/Text.d.ts +1 -26
- package/dist/ui-kit/Text/Text.js.map +1 -1
- package/dist/ui-kit/Text/TextProps.d.ts +26 -0
- package/dist/ui-kit/Text/TextProps.js +2 -0
- package/dist/ui-kit/Text/TextProps.js.map +1 -0
- package/dist/ui-kit/YandexMap/useYandexMaps.js +1 -1
- package/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/dist/utils/adjustHref.js +3 -1
- package/dist/utils/adjustHref.js.map +1 -1
- package/dist/utils/debounce.d.ts +5 -0
- package/dist/utils/debounce.js +19 -0
- package/dist/utils/debounce.js.map +1 -0
- package/lib/EventBus/EventBus.d.ts +6 -5
- package/lib/EventBus/EventBus.js +5 -3
- package/lib/EventBus/EventBus.js.map +1 -1
- package/lib/EventBus/EventMap.d.ts +1 -4
- package/lib/ProjectSettings.d.ts +2 -0
- package/lib/ProjectSettings.js +3 -0
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +1 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js +1 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.js +7 -3
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +2 -2
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BusinessBlock/BusinessBlock.js +1 -1
- package/lib/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.js +5 -3
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +4 -2
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +5 -3
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/renderProposal.js +2 -2
- package/lib/components/Calculator/renderProposal.js.map +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +1 -1
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +2 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCard.js +2 -2
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.fixture.d.ts +10 -0
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +26 -0
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
- package/{bundle/components/InvestmentGallery/InvestmentGalleryContent.d.ts → lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/Catalog/Catalog.js +1 -1
- package/lib/components/Catalog/Catalog.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +4 -4
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.js +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +2 -0
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/useContentPageData.js +4 -8
- package/lib/components/ContentPage/useContentPageData.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/FooterDataProps.d.ts +8 -3
- package/lib/components/Footer/MediaButton.js +1 -1
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +1 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +7 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +5 -0
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriod.js +2 -2
- package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +3 -3
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +1 -1
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/ImgBlock/ImgBlock.d.ts +6 -0
- package/lib/components/{InvestmentGallery/InvestmentGallery.fixture.d.ts → ImgBlock/ImgBlock.fixture.d.ts} +0 -2
- package/lib/components/ImgBlock/ImgBlock.js +9 -0
- package/lib/components/ImgBlock/ImgBlock.js.map +1 -0
- package/lib/components/ImgBlock/ImgBlockContent.d.ts +7 -0
- package/lib/components/ImgBlock/ImgBlockContent.js +2 -0
- package/lib/components/ImgBlock/ImgBlockContent.js.map +1 -0
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +7 -9
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -4
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkList/LinkList.js +1 -1
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
- package/lib/components/OfficeMap/useOfficeMap.js +3 -4
- package/lib/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/lib/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
- package/lib/components/ParagraphBlock/ParagraphBlock.fixture.d.ts +9 -0
- package/lib/components/ParagraphBlock/ParagraphBlock.js +9 -0
- package/lib/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
- package/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
- package/lib/components/ParagraphBlock/ParagraphBlockContent.js +2 -0
- package/lib/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +10 -10
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +3 -1
- package/lib/components/SafeDepositRental/RegionsAndBranches.js +1 -3
- package/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/lib/components/SafeDepositRental/RenderRadioButtons.js +2 -2
- package/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js +2 -4
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +3 -5
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +3 -3
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/Tabs/LinkTab.d.ts +0 -1
- package/lib/components/Tabs/LinkTab.js +2 -8
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/Tabs.d.ts +0 -4
- package/lib/components/Tabs/Tabs.js +7 -13
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/TariffsTable/TableTileHeader.js +1 -3
- package/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +6 -6
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +4 -2
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/Video/VideoContent.d.ts +1 -0
- package/lib/hooks/useLink.js +11 -2
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/services/BlockRouter/BlockIntersection.d.ts +2 -0
- package/lib/services/BlockRouter/BlockIntersection.js +2 -0
- package/lib/services/BlockRouter/BlockIntersection.js.map +1 -0
- package/lib/services/BlockRouter/BlockRouter.d.ts +23 -0
- package/lib/services/BlockRouter/BlockRouter.js +29 -0
- package/lib/services/BlockRouter/BlockRouter.js.map +1 -0
- package/lib/services/BlockRouter/findActiveBlock.d.ts +3 -0
- package/lib/services/BlockRouter/findActiveBlock.js +12 -0
- package/lib/services/BlockRouter/findActiveBlock.js.map +1 -0
- package/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +5 -0
- package/lib/services/BlockRouter/useBlockIntersectionObserver.js +25 -0
- package/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -0
- package/lib/services/BlockRouter/useBlockRouter.d.ts +2 -0
- package/lib/services/BlockRouter/useBlockRouter.js +5 -0
- package/lib/services/BlockRouter/useBlockRouter.js.map +1 -0
- package/lib/services/BlockRouter/useBlockRouterProvider.d.ts +2 -0
- package/lib/services/BlockRouter/useBlockRouterProvider.js +34 -0
- package/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.js +7 -21
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.mobile.js +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.mobile.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTable.js +4 -3
- package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableBody.js +3 -5
- package/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.d.ts +3 -2
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableProps.d.ts +0 -3
- package/lib/ui-kit/Paragraph/Paragraph.d.ts +1 -8
- package/lib/ui-kit/Paragraph/Paragraph.js.map +1 -1
- package/lib/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
- package/lib/ui-kit/Paragraph/ParagraphProps.js +2 -0
- package/lib/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
- package/lib/ui-kit/Radio/Radio.js +1 -1
- package/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/lib/ui-kit/Radio/RadioProps.d.ts +1 -2
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/ui-kit/Text/Text.d.ts +1 -26
- package/lib/ui-kit/Text/Text.js.map +1 -1
- package/lib/ui-kit/Text/TextProps.d.ts +26 -0
- package/lib/ui-kit/Text/TextProps.js +2 -0
- package/lib/ui-kit/Text/TextProps.js.map +1 -0
- package/lib/ui-kit/YandexMap/useYandexMaps.js +1 -1
- package/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/lib/utils/adjustHref.js +3 -1
- package/lib/utils/adjustHref.js.map +1 -1
- package/lib/utils/debounce.d.ts +5 -0
- package/lib/utils/debounce.js +16 -0
- package/lib/utils/debounce.js.map +1 -0
- package/mobile/bundle/EventBus/EventBus.d.ts +6 -5
- package/mobile/bundle/EventBus/EventMap.d.ts +1 -4
- package/mobile/bundle/ProjectSettings.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +147 -53
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
- package/mobile/bundle/components/{InvestmentGallery/InvestmentGalleryContent.d.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
- package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
- package/mobile/bundle/components/Footer/FooterDataProps.d.ts +8 -3
- package/mobile/bundle/components/Gallery/GalleryContent.d.ts +5 -0
- package/mobile/bundle/components/ImgBlock/ImgBlock.d.ts +6 -0
- package/mobile/bundle/components/ImgBlock/ImgBlockContent.d.ts +7 -0
- package/mobile/bundle/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
- package/mobile/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
- package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
- package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +0 -1
- package/mobile/bundle/components/Tabs/Tabs.d.ts +0 -4
- package/mobile/bundle/components/Video/VideoContent.d.ts +1 -0
- package/mobile/bundle/services/BlockRouter/BlockIntersection.d.ts +2 -0
- package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +23 -0
- package/mobile/bundle/services/BlockRouter/findActiveBlock.d.ts +3 -0
- package/mobile/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +5 -0
- package/mobile/bundle/services/BlockRouter/useBlockRouter.d.ts +2 -0
- package/mobile/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +2 -0
- package/mobile/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +3 -2
- package/mobile/bundle/ui-kit/InnerTable/InnerTableProps.d.ts +0 -3
- package/mobile/bundle/ui-kit/Paragraph/Paragraph.d.ts +1 -8
- package/mobile/bundle/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
- package/mobile/bundle/ui-kit/Radio/RadioProps.d.ts +1 -2
- package/mobile/bundle/ui-kit/Text/Text.d.ts +1 -26
- package/mobile/bundle/ui-kit/Text/TextProps.d.ts +26 -0
- package/mobile/bundle/utils/debounce.d.ts +5 -0
- package/mobile/dist/EventBus/EventBus.d.ts +6 -5
- package/mobile/dist/EventBus/EventBus.js +5 -3
- package/mobile/dist/EventBus/EventBus.js.map +1 -1
- package/mobile/dist/EventBus/EventMap.d.ts +1 -4
- package/mobile/dist/ProjectSettings.d.ts +2 -0
- package/mobile/dist/ProjectSettings.js +3 -0
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.js +1 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +2 -2
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +4 -2
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +3 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +4 -2
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/renderProposal.js +2 -2
- package/mobile/dist/components/Calculator/renderProposal.js.map +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +2 -1
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js +2 -2
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +28 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +46 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.js +1 -1
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +2 -0
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/useContentPageData.js +4 -8
- package/mobile/dist/components/ContentPage/useContentPageData.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Footer/FooterDataProps.d.ts +8 -3
- package/mobile/dist/components/Footer/MediaButton.js +1 -1
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +1 -1
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +7 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +5 -0
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriod.js +2 -2
- package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +2 -2
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +1 -1
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/ImgBlock/ImgBlock.d.ts +6 -0
- package/mobile/dist/components/ImgBlock/ImgBlock.js +11 -0
- package/mobile/dist/components/ImgBlock/ImgBlock.js.map +1 -0
- package/mobile/dist/components/ImgBlock/ImgBlockContent.d.ts +7 -0
- package/mobile/dist/components/ImgBlock/ImgBlockContent.js +2 -0
- package/mobile/dist/components/ImgBlock/ImgBlockContent.js.map +1 -0
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -8
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -4
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/LinkList/LinkList.js +1 -1
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/OfficeMap/useOfficeMap.js +3 -4
- package/mobile/dist/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/dist/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
- package/mobile/dist/components/ParagraphBlock/ParagraphBlock.js +11 -0
- package/mobile/dist/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
- package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
- package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.js +2 -0
- package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
- package/mobile/dist/components/ProductGallery/ProductGallery.js +9 -9
- package/mobile/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js +1 -3
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js +1 -1
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +2 -4
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/Tabs/LinkTab.d.ts +0 -1
- package/mobile/dist/components/Tabs/LinkTab.js +2 -8
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.d.ts +0 -4
- package/mobile/dist/components/Tabs/Tabs.js +6 -12
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.js +1 -3
- package/mobile/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +3 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/Video/VideoContent.d.ts +1 -0
- package/mobile/dist/hooks/useLink.js +11 -2
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/services/BlockRouter/BlockIntersection.d.ts +2 -0
- package/mobile/dist/services/BlockRouter/BlockIntersection.js +2 -0
- package/mobile/dist/services/BlockRouter/BlockIntersection.js.map +1 -0
- package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +23 -0
- package/mobile/dist/services/BlockRouter/BlockRouter.js +32 -0
- package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -0
- package/mobile/dist/services/BlockRouter/findActiveBlock.d.ts +3 -0
- package/mobile/dist/services/BlockRouter/findActiveBlock.js +15 -0
- package/mobile/dist/services/BlockRouter/findActiveBlock.js.map +1 -0
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +5 -0
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js +28 -0
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -0
- package/mobile/dist/services/BlockRouter/useBlockRouter.d.ts +2 -0
- package/mobile/dist/services/BlockRouter/useBlockRouter.js +8 -0
- package/mobile/dist/services/BlockRouter/useBlockRouter.js.map +1 -0
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.d.ts +2 -0
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js +37 -0
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +6 -20
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/HeaderItem/HeaderItem.js +1 -1
- package/mobile/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js +3 -2
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js +2 -4
- package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.d.ts +3 -2
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableProps.d.ts +0 -3
- package/mobile/dist/ui-kit/Paragraph/Paragraph.d.ts +1 -8
- package/mobile/dist/ui-kit/Paragraph/Paragraph.js.map +1 -1
- package/mobile/dist/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
- package/mobile/dist/ui-kit/Paragraph/ParagraphProps.js +2 -0
- package/mobile/dist/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
- package/mobile/dist/ui-kit/Radio/Radio.js +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/dist/ui-kit/Radio/RadioProps.d.ts +1 -2
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/ui-kit/Text/Text.d.ts +1 -26
- package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
- package/mobile/dist/ui-kit/Text/TextProps.d.ts +26 -0
- package/mobile/dist/ui-kit/Text/TextProps.js +2 -0
- package/mobile/dist/ui-kit/Text/TextProps.js.map +1 -0
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js +1 -1
- package/mobile/dist/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/mobile/dist/utils/adjustHref.js +3 -1
- package/mobile/dist/utils/adjustHref.js.map +1 -1
- package/mobile/dist/utils/debounce.d.ts +5 -0
- package/mobile/dist/utils/debounce.js +19 -0
- package/mobile/dist/utils/debounce.js.map +1 -0
- package/mobile/lib/EventBus/EventBus.d.ts +6 -5
- package/mobile/lib/EventBus/EventBus.js +5 -3
- package/mobile/lib/EventBus/EventBus.js.map +1 -1
- package/mobile/lib/EventBus/EventMap.d.ts +1 -4
- package/mobile/lib/ProjectSettings.d.ts +2 -0
- package/mobile/lib/ProjectSettings.js +3 -0
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.js +1 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +2 -2
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +5 -3
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +4 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +5 -3
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/renderProposal.js +2 -2
- package/mobile/lib/components/Calculator/renderProposal.js.map +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +2 -1
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js +2 -2
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +26 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +46 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.js +1 -1
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +2 -0
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/useContentPageData.js +4 -8
- package/mobile/lib/components/ContentPage/useContentPageData.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Footer/FooterDataProps.d.ts +8 -3
- package/mobile/lib/components/Footer/MediaButton.js +1 -1
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +1 -1
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +7 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +5 -0
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriod.js +2 -2
- package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +3 -3
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +1 -1
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/ImgBlock/ImgBlock.d.ts +6 -0
- package/mobile/lib/components/ImgBlock/ImgBlock.js +9 -0
- package/mobile/lib/components/ImgBlock/ImgBlock.js.map +1 -0
- package/mobile/lib/components/ImgBlock/ImgBlockContent.d.ts +7 -0
- package/mobile/lib/components/ImgBlock/ImgBlockContent.js +2 -0
- package/mobile/lib/components/ImgBlock/ImgBlockContent.js.map +1 -0
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +7 -9
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -4
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/LinkList/LinkList.js +1 -1
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/OfficeMap/useOfficeMap.js +3 -4
- package/mobile/lib/components/OfficeMap/useOfficeMap.js.map +1 -1
- package/mobile/lib/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
- package/mobile/lib/components/ParagraphBlock/ParagraphBlock.js +9 -0
- package/mobile/lib/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
- package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
- package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.js +2 -0
- package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
- package/mobile/lib/components/ProductGallery/ProductGallery.js +10 -10
- package/mobile/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js +1 -3
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js +2 -2
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +2 -4
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +3 -3
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/Tabs/LinkTab.d.ts +0 -1
- package/mobile/lib/components/Tabs/LinkTab.js +2 -8
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.d.ts +0 -4
- package/mobile/lib/components/Tabs/Tabs.js +7 -13
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.js +1 -3
- package/mobile/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +4 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/Video/VideoContent.d.ts +1 -0
- package/mobile/lib/hooks/useLink.js +11 -2
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/services/BlockRouter/BlockIntersection.d.ts +2 -0
- package/mobile/lib/services/BlockRouter/BlockIntersection.js +2 -0
- package/mobile/lib/services/BlockRouter/BlockIntersection.js.map +1 -0
- package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +23 -0
- package/mobile/lib/services/BlockRouter/BlockRouter.js +29 -0
- package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -0
- package/mobile/lib/services/BlockRouter/findActiveBlock.d.ts +3 -0
- package/mobile/lib/services/BlockRouter/findActiveBlock.js +12 -0
- package/mobile/lib/services/BlockRouter/findActiveBlock.js.map +1 -0
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +5 -0
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js +25 -0
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -0
- package/mobile/lib/services/BlockRouter/useBlockRouter.d.ts +2 -0
- package/mobile/lib/services/BlockRouter/useBlockRouter.js +5 -0
- package/mobile/lib/services/BlockRouter/useBlockRouter.js.map +1 -0
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.d.ts +2 -0
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js +34 -0
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +7 -21
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/HeaderItem/HeaderItem.js +1 -1
- package/mobile/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js +4 -3
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js +3 -5
- package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.d.ts +3 -2
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableProps.d.ts +0 -3
- package/mobile/lib/ui-kit/Paragraph/Paragraph.d.ts +1 -8
- package/mobile/lib/ui-kit/Paragraph/Paragraph.js.map +1 -1
- package/mobile/lib/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
- package/mobile/lib/ui-kit/Paragraph/ParagraphProps.js +2 -0
- package/mobile/lib/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
- package/mobile/lib/ui-kit/Radio/Radio.js +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/lib/ui-kit/Radio/RadioProps.d.ts +1 -2
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/ui-kit/Text/Text.d.ts +1 -26
- package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/lib/ui-kit/Text/TextProps.d.ts +26 -0
- package/mobile/lib/ui-kit/Text/TextProps.js +2 -0
- package/mobile/lib/ui-kit/Text/TextProps.js.map +1 -0
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js +1 -1
- package/mobile/lib/ui-kit/YandexMap/useYandexMaps.js.map +1 -1
- package/mobile/lib/utils/adjustHref.js +3 -1
- package/mobile/lib/utils/adjustHref.js.map +1 -1
- package/mobile/lib/utils/debounce.d.ts +5 -0
- package/mobile/lib/utils/debounce.js +16 -0
- package/mobile/lib/utils/debounce.js.map +1 -0
- package/mobile/src/EventBus/EventBus.ts +18 -14
- package/mobile/src/EventBus/EventMap.ts +1 -4
- package/mobile/src/ProjectSettings.ts +4 -0
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Bonus/Bonus.tsx +2 -4
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
- package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +1 -1
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +5 -3
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +5 -3
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +5 -3
- package/mobile/src/components/Calculator/renderProposal.tsx +2 -2
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +2 -1
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +2 -2
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +28 -0
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +83 -0
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.ui.json +9 -0
- package/mobile/src/components/{InvestmentGallery/InvestmentGalleryContent.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.ts} +20 -25
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +27 -32
- package/mobile/src/components/Catalog/Catalog.example.json +1 -1
- package/mobile/src/components/Catalog/Catalog.tsx +1 -1
- package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +1 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -0
- package/mobile/src/components/ContentPage/useContentPageData.ts +4 -8
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/mobile/src/components/Footer/FooterDataProps.ts +8 -3
- package/mobile/src/components/Footer/MediaButton.tsx +1 -1
- package/mobile/src/components/Gallery/Gallery.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +8 -2
- package/mobile/src/components/Gallery/GalleryContent.ts +5 -0
- package/mobile/src/components/Gallery/GalleryInner.tsx +0 -1
- package/mobile/src/components/GracePeriod/GracePeriod.tsx +2 -2
- package/mobile/src/components/Header/Header.tsx +5 -7
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -1
- package/mobile/src/components/Header/HeaderSubMenu.tsx +1 -0
- package/mobile/src/components/Header/HeaderTop.tsx +1 -1
- package/mobile/src/components/ImgBlock/ImgBlock.example.json +11 -0
- package/mobile/src/components/ImgBlock/ImgBlock.tsx +17 -0
- package/mobile/src/components/ImgBlock/ImgBlock.ui.json +7 -0
- package/mobile/src/components/ImgBlock/ImgBlockContent.ts +8 -0
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +9 -12
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -9
- package/mobile/src/components/LinkList/LinkList.tsx +1 -1
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
- package/mobile/src/components/OfficeMap/useOfficeMap.ts +4 -4
- package/mobile/src/components/ParagraphBlock/ParagraphBlock.example.json +5 -0
- package/mobile/src/components/ParagraphBlock/ParagraphBlock.tsx +19 -0
- package/mobile/src/components/ParagraphBlock/ParagraphBlock.ui.json +1 -0
- package/mobile/src/components/ParagraphBlock/ParagraphBlockContent.ts +9 -0
- package/mobile/src/components/ProductGallery/ProductGallery.tsx +15 -15
- package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +24 -26
- package/mobile/src/components/SafeDepositRental/RenderRadioButtons.tsx +2 -3
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -5
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +3 -3
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +3 -3
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +3 -3
- package/mobile/src/components/Tabs/LinkTab.tsx +2 -10
- package/mobile/src/components/Tabs/Tabs.tsx +11 -19
- package/mobile/src/components/TariffsTable/TableTileHeader.tsx +8 -10
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +12 -5
- package/mobile/src/components/Video/VideoContent.ts +1 -0
- package/mobile/src/hooks/useLink.ts +13 -2
- package/mobile/src/services/BlockRouter/BlockIntersection.ts +3 -0
- package/mobile/src/services/BlockRouter/BlockRouter.ts +51 -0
- package/mobile/src/services/BlockRouter/findActiveBlock.ts +20 -0
- package/mobile/src/services/BlockRouter/useBlockIntersectionObserver.ts +37 -0
- package/mobile/src/services/BlockRouter/useBlockRouter.ts +5 -0
- package/mobile/src/services/BlockRouter/useBlockRouterProvider.ts +49 -0
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +9 -32
- package/mobile/src/ui-kit/HeaderItem/HeaderItem.tsx +1 -1
- package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +4 -5
- package/mobile/src/ui-kit/InnerTable/InnerTableBody.tsx +6 -5
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +5 -2
- package/mobile/src/ui-kit/InnerTable/InnerTableProps.ts +0 -6
- package/mobile/src/ui-kit/Paragraph/Paragraph.tsx +1 -8
- package/mobile/src/ui-kit/Paragraph/ParagraphProps.ts +8 -0
- package/mobile/src/ui-kit/Radio/Radio.tsx +1 -1
- package/mobile/src/ui-kit/Radio/RadioProps.ts +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +2 -3
- package/mobile/src/ui-kit/Text/Text.tsx +1 -63
- package/mobile/src/ui-kit/Text/TextProps.ts +63 -0
- package/mobile/src/ui-kit/YandexMap/useYandexMaps.ts +3 -1
- package/mobile/src/utils/adjustHref.ts +3 -1
- package/mobile/src/utils/debounce.ts +24 -0
- package/package.json +1 -1
- package/src/EventBus/EventBus.ts +18 -14
- package/src/EventBus/EventMap.ts +1 -4
- package/src/ProjectSettings.ts +4 -0
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/Blocks.ts +7 -3
- package/src/components/Bonus/Bonus.tsx +2 -4
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
- package/src/components/BusinessBlock/BusinessBlock.tsx +1 -1
- package/src/components/Calculator/BonusCalculatorForm.tsx +5 -3
- package/src/components/Calculator/CreditCalculatorForm.tsx +5 -3
- package/src/components/Calculator/DepositCalculatorForm.tsx +5 -3
- package/src/components/Calculator/renderProposal.tsx +2 -2
- package/src/components/CardTransfer/CardTransfer.tsx +1 -1
- package/src/components/Carousel/Carousel.fixture.tsx +20 -1
- package/src/components/Carousel/Carousel.tsx +2 -1
- package/src/components/CarouselCard/CarouselCard.fixture.tsx +1 -1
- package/src/components/CarouselCard/CarouselCard.tsx +2 -2
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +28 -0
- package/src/components/{InvestmentGallery/InvestmentGallery.fixture.tsx → CarouselInvestmentCard/CarouselInvestmentCard.fixture.tsx} +21 -27
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +83 -0
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.ui.json +9 -0
- package/src/components/{InvestmentGallery/InvestmentGalleryContent.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.ts} +20 -25
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +0 -1
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +27 -32
- package/src/components/Catalog/Catalog.example.json +1 -1
- package/src/components/Catalog/Catalog.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTable.tsx +4 -4
- package/src/components/ContactsBlock/ContactsBlock.tsx +1 -1
- package/src/components/ContentPage/ContentPage.tsx +3 -0
- package/src/components/ContentPage/useContentPageData.ts +4 -8
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/src/components/Footer/Footer.tsx +2 -2
- package/src/components/Footer/FooterDataProps.ts +8 -3
- package/src/components/Footer/MediaButton.tsx +1 -1
- package/src/components/Gallery/Gallery.mobile.tsx +1 -1
- package/src/components/Gallery/GalleryCardInner.tsx +8 -2
- package/src/components/Gallery/GalleryContent.ts +5 -0
- package/src/components/Gallery/GalleryInner.tsx +0 -1
- package/src/components/GracePeriod/GracePeriod.tsx +2 -2
- package/src/components/Header/Header.mobile.tsx +5 -7
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +1 -1
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -1
- package/src/components/Header/HeaderSubMenu.tsx +1 -0
- package/src/components/Header/HeaderTop.tsx +1 -1
- package/src/components/Headline/Headline.tsx +1 -1
- package/src/components/ImgBlock/ImgBlock.example.json +11 -0
- package/src/components/ImgBlock/ImgBlock.fixture.tsx +21 -0
- package/src/components/ImgBlock/ImgBlock.tsx +17 -0
- package/src/components/ImgBlock/ImgBlock.ui.json +7 -0
- package/src/components/ImgBlock/ImgBlockContent.ts +8 -0
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +9 -12
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +6 -9
- package/src/components/LinkDocs/LinkDocs.tsx +1 -4
- package/src/components/LinkList/LinkList.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
- package/src/components/OfficeMap/useOfficeMap.ts +4 -4
- package/src/components/ParagraphBlock/ParagraphBlock.example.json +5 -0
- package/src/components/ParagraphBlock/ParagraphBlock.fixture.tsx +45 -0
- package/src/components/ParagraphBlock/ParagraphBlock.tsx +19 -0
- package/src/components/ParagraphBlock/ParagraphBlock.ui.json +1 -0
- package/src/components/ParagraphBlock/ParagraphBlockContent.ts +9 -0
- package/src/components/ProductBlock/ProductBlock.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.tsx +15 -15
- package/src/components/Recommendation/Recommendation.fixture.tsx +38 -1
- package/src/components/SafeDepositRental/RegionsAndBranches.tsx +24 -26
- package/src/components/SafeDepositRental/RenderRadioButtons.tsx +2 -3
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -5
- package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +3 -3
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +3 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +3 -3
- package/src/components/StepsBlock/StepsBlock.tsx +4 -7
- package/src/components/Tabs/LinkTab.tsx +2 -10
- package/src/components/Tabs/Tabs.tsx +11 -19
- package/src/components/TariffsTable/TableTileHeader.tsx +8 -10
- package/src/components/TariffsTable/TariffsTable.tsx +21 -23
- package/src/components/TariffsTable/TariffsTableRow.tsx +12 -5
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +3 -3
- package/src/components/Video/VideoContent.ts +1 -0
- package/src/hooks/useLink.ts +13 -2
- package/src/services/BlockRouter/BlockIntersection.ts +3 -0
- package/src/services/BlockRouter/BlockRouter.ts +51 -0
- package/src/services/BlockRouter/findActiveBlock.ts +20 -0
- package/src/services/BlockRouter/useBlockIntersectionObserver.ts +37 -0
- package/src/services/BlockRouter/useBlockRouter.ts +5 -0
- package/src/services/BlockRouter/useBlockRouterProvider.ts +49 -0
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -1
- package/src/ui-kit/BlockWrapper.tsx +9 -32
- package/src/ui-kit/HeaderItem/HeaderItem.mobile.tsx +1 -1
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +1 -1
- package/src/ui-kit/InnerTable/InnerTable.tsx +4 -5
- package/src/ui-kit/InnerTable/InnerTableBody.tsx +6 -5
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +5 -2
- package/src/ui-kit/InnerTable/InnerTableProps.ts +0 -6
- package/src/ui-kit/Paragraph/Paragraph.tsx +1 -8
- package/src/ui-kit/Paragraph/ParagraphProps.ts +8 -0
- package/src/ui-kit/Radio/Radio.tsx +1 -1
- package/src/ui-kit/Radio/RadioProps.ts +1 -1
- package/src/ui-kit/Select/Select.tsx +2 -3
- package/src/ui-kit/Text/Text.tsx +1 -63
- package/src/ui-kit/Text/TextProps.ts +63 -0
- package/src/ui-kit/YandexMap/useYandexMaps.ts +3 -1
- package/src/utils/adjustHref.ts +3 -1
- package/src/utils/debounce.ts +24 -0
- package/tailwind.config.cjs +8 -0
- package/bundle/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
- package/bundle/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
- package/bundle/components/SafeDepositRental/YandexMap.d.ts +0 -5
- package/bundle/components/SafeDepositRental/useYandexMaps.d.ts +0 -2
- package/bundle/utils/changeHashOnObserve.d.ts +0 -9
- package/dist/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
- package/dist/components/InvestmentGallery/InvestmentGallery.js +0 -26
- package/dist/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
- package/dist/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
- package/dist/components/InvestmentGallery/InvestmentGalleryCard.js +0 -23
- package/dist/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
- package/dist/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
- package/dist/components/SafeDepositRental/YandexMap.d.ts +0 -5
- package/dist/components/SafeDepositRental/YandexMap.js +0 -31
- package/dist/components/SafeDepositRental/YandexMap.js.map +0 -1
- package/dist/components/SafeDepositRental/useYandexMaps.d.ts +0 -2
- package/dist/components/SafeDepositRental/useYandexMaps.js +0 -12
- package/dist/components/SafeDepositRental/useYandexMaps.js.map +0 -1
- package/dist/utils/changeHashOnObserve.d.ts +0 -9
- package/dist/utils/changeHashOnObserve.js +0 -21
- package/dist/utils/changeHashOnObserve.js.map +0 -1
- package/lib/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
- package/lib/components/InvestmentGallery/InvestmentGallery.js +0 -24
- package/lib/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
- package/lib/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
- package/lib/components/InvestmentGallery/InvestmentGalleryCard.js +0 -21
- package/lib/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
- package/lib/components/InvestmentGallery/InvestmentGalleryContent.js +0 -2
- package/lib/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
- package/lib/components/SafeDepositRental/YandexMap.d.ts +0 -5
- package/lib/components/SafeDepositRental/YandexMap.js +0 -29
- package/lib/components/SafeDepositRental/YandexMap.js.map +0 -1
- package/lib/components/SafeDepositRental/useYandexMaps.d.ts +0 -2
- package/lib/components/SafeDepositRental/useYandexMaps.js +0 -9
- package/lib/components/SafeDepositRental/useYandexMaps.js.map +0 -1
- package/lib/utils/changeHashOnObserve.d.ts +0 -9
- package/lib/utils/changeHashOnObserve.js +0 -18
- package/lib/utils/changeHashOnObserve.js.map +0 -1
- package/mobile/bundle/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
- package/mobile/bundle/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
- package/mobile/bundle/components/SafeDepositRental/YandexMap.d.ts +0 -5
- package/mobile/bundle/components/SafeDepositRental/useYandexMaps.d.ts +0 -2
- package/mobile/bundle/utils/changeHashOnObserve.d.ts +0 -9
- package/mobile/dist/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
- package/mobile/dist/components/InvestmentGallery/InvestmentGallery.js +0 -26
- package/mobile/dist/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.js +0 -23
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryContent.d.ts +0 -50
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
- package/mobile/dist/components/SafeDepositRental/YandexMap.d.ts +0 -5
- package/mobile/dist/components/SafeDepositRental/YandexMap.js +0 -31
- package/mobile/dist/components/SafeDepositRental/YandexMap.js.map +0 -1
- package/mobile/dist/components/SafeDepositRental/useYandexMaps.d.ts +0 -2
- package/mobile/dist/components/SafeDepositRental/useYandexMaps.js +0 -12
- package/mobile/dist/components/SafeDepositRental/useYandexMaps.js.map +0 -1
- package/mobile/dist/utils/changeHashOnObserve.d.ts +0 -9
- package/mobile/dist/utils/changeHashOnObserve.js +0 -21
- package/mobile/dist/utils/changeHashOnObserve.js.map +0 -1
- package/mobile/lib/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
- package/mobile/lib/components/InvestmentGallery/InvestmentGallery.js +0 -24
- package/mobile/lib/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.js +0 -21
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryContent.d.ts +0 -50
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryContent.js +0 -2
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
- package/mobile/lib/components/SafeDepositRental/YandexMap.d.ts +0 -5
- package/mobile/lib/components/SafeDepositRental/YandexMap.js +0 -29
- package/mobile/lib/components/SafeDepositRental/YandexMap.js.map +0 -1
- package/mobile/lib/components/SafeDepositRental/useYandexMaps.d.ts +0 -2
- package/mobile/lib/components/SafeDepositRental/useYandexMaps.js +0 -9
- package/mobile/lib/components/SafeDepositRental/useYandexMaps.js.map +0 -1
- package/mobile/lib/utils/changeHashOnObserve.d.ts +0 -9
- package/mobile/lib/utils/changeHashOnObserve.js +0 -18
- package/mobile/lib/utils/changeHashOnObserve.js.map +0 -1
- package/mobile/src/components/InvestmentGallery/InvestmentGallery.example.json +0 -64
- package/mobile/src/components/InvestmentGallery/InvestmentGallery.tsx +0 -66
- package/mobile/src/components/InvestmentGallery/InvestmentGallery.ui.json +0 -11
- package/mobile/src/components/InvestmentGallery/InvestmentGalleryCard.tsx +0 -84
- package/mobile/src/components/SafeDepositRental/YandexMap.tsx +0 -43
- package/mobile/src/components/SafeDepositRental/useYandexMaps.ts +0 -13
- package/mobile/src/utils/changeHashOnObserve.ts +0 -30
- package/src/components/InvestmentGallery/InvestmentGallery.example.json +0 -64
- package/src/components/InvestmentGallery/InvestmentGallery.tsx +0 -66
- package/src/components/InvestmentGallery/InvestmentGallery.ui.json +0 -11
- package/src/components/InvestmentGallery/InvestmentGalleryCard.tsx +0 -84
- package/src/components/SafeDepositRental/YandexMap.tsx +0 -43
- package/src/components/SafeDepositRental/useYandexMaps.ts +0 -13
- package/src/utils/changeHashOnObserve.ts +0 -30
package/bundle/bundle.umd.js
CHANGED
|
@@ -85,6 +85,9 @@
|
|
|
85
85
|
get CDN() {
|
|
86
86
|
return this._.CDN;
|
|
87
87
|
}
|
|
88
|
+
get BASE_PATH() {
|
|
89
|
+
return this._.BASE_PATH;
|
|
90
|
+
}
|
|
88
91
|
get YANDEX_MAP_API_KEY() {
|
|
89
92
|
return this._.YANDEX_MAP_API_KEY;
|
|
90
93
|
}
|
|
@@ -289,8 +292,7 @@
|
|
|
289
292
|
subscribers = {};
|
|
290
293
|
subjectsStateMap = {};
|
|
291
294
|
subscribe(type, listener) {
|
|
292
|
-
this.subscribers[type]
|
|
293
|
-
this.subscribers[type]?.push(listener);
|
|
295
|
+
this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
|
|
294
296
|
const latestEvent = this.subjectsStateMap[type];
|
|
295
297
|
if (latestEvent) {
|
|
296
298
|
listener(latestEvent);
|
|
@@ -303,7 +305,10 @@
|
|
|
303
305
|
this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
|
|
304
306
|
}
|
|
305
307
|
fire(type, event) {
|
|
306
|
-
this.subjectsStateMap
|
|
308
|
+
const isSubjectDeclared = type in this.subjectsStateMap;
|
|
309
|
+
if (isSubjectDeclared) {
|
|
310
|
+
this.subjectsStateMap[type] = event;
|
|
311
|
+
}
|
|
307
312
|
this.subscribers[type]?.forEach((s) => s(event));
|
|
308
313
|
}
|
|
309
314
|
subject(type, event) {
|
|
@@ -335,51 +340,71 @@
|
|
|
335
340
|
.concat(1);
|
|
336
341
|
}
|
|
337
342
|
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
|
|
343
|
+
const normalizeAnchor = (rawAnchor) => rawAnchor?.replace('#', '');
|
|
344
|
+
class BlockRouter {
|
|
345
|
+
static inst = new BlockRouter();
|
|
346
|
+
eventBus = new EventBus();
|
|
347
|
+
constructor() {
|
|
348
|
+
const anchor = normalizeAnchor(globalThis.location?.hash);
|
|
349
|
+
if (anchor) {
|
|
350
|
+
this.eventBus.subject('goto', { anchor });
|
|
351
|
+
}
|
|
341
352
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
353
|
+
goto(rawAnchor) {
|
|
354
|
+
const anchor = normalizeAnchor(rawAnchor);
|
|
355
|
+
if (anchor) {
|
|
356
|
+
this.push(anchor);
|
|
357
|
+
this.eventBus.fire('goto', { anchor });
|
|
358
|
+
}
|
|
345
359
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
EventBus.inst.fire('tab', { type: 'link', label: anchor });
|
|
360
|
+
push(rawAnchor) {
|
|
361
|
+
globalThis.history?.pushState(null, '', `#${normalizeAnchor(rawAnchor)}`);
|
|
349
362
|
}
|
|
350
|
-
|
|
351
|
-
|
|
363
|
+
replace(rawAnchor) {
|
|
364
|
+
globalThis.history?.replaceState(null, '', `#${normalizeAnchor(rawAnchor)}`);
|
|
352
365
|
}
|
|
353
|
-
|
|
366
|
+
reset() {
|
|
367
|
+
globalThis.history?.replaceState(null, '', '#');
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
function useBlockIntersectionObserver(block, router = BlockRouter.inst) {
|
|
372
|
+
const observerCallback = useCallback((entries) => {
|
|
373
|
+
if (!block || !entries?.length) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const intersection = entries[entries.length - 1];
|
|
377
|
+
router.eventBus.fire('intersection', { block, intersection });
|
|
378
|
+
}, [block, router]);
|
|
379
|
+
const ref = useIntersectionObserver(observerCallback, { sensitivity: 1 });
|
|
380
|
+
useEffect(() => {
|
|
381
|
+
if (!ref.current) {
|
|
382
|
+
return undefined;
|
|
383
|
+
}
|
|
384
|
+
return router.eventBus.subscribe('goto', ({ anchor }) => {
|
|
385
|
+
if (ref.current && block?.anchor === anchor) {
|
|
386
|
+
ref.current.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}, [block, router]);
|
|
390
|
+
return ref;
|
|
391
|
+
}
|
|
354
392
|
|
|
355
393
|
const BlockWrapper = JSX(({ className, block, tag = 'section', role, children }) => {
|
|
356
394
|
const Tag = tag;
|
|
357
|
-
const
|
|
395
|
+
const ref = useBlockIntersectionObserver(block);
|
|
358
396
|
const [isVisible, setVisible] = useState(true);
|
|
359
|
-
const anchorClickRef = useRef({});
|
|
360
|
-
const observerCallback = useMemo(() => changeHashOnObserve({ anchor, anchorClickRef }), [anchor]);
|
|
361
|
-
const ref = useIntersectionObserver(observerCallback, { sensitivity: 1 });
|
|
362
|
-
useEffect(() => EventBus.inst.subscribe('anchorClick', (e) => {
|
|
363
|
-
setVisible(true);
|
|
364
|
-
anchorClickRef.current = e;
|
|
365
|
-
}), []);
|
|
366
397
|
useEffect(() => EventBus.inst.subscribe('tab', (event) => {
|
|
367
398
|
if (event.type === 'group') {
|
|
368
|
-
const hasSettings = labels?.length || block?.anchor;
|
|
369
|
-
setVisible(event.label ? !hasSettings || Boolean(labels?.includes(event.label)) : true);
|
|
399
|
+
const hasSettings = block?.labels?.length || block?.anchor;
|
|
400
|
+
setVisible(event.label ? !hasSettings || Boolean(block?.labels?.includes(event.label)) : true);
|
|
370
401
|
}
|
|
371
402
|
else {
|
|
372
|
-
changeHash(event.label);
|
|
373
403
|
setVisible(true);
|
|
374
404
|
}
|
|
375
|
-
}), []);
|
|
376
|
-
return isVisible ? (jsx(Tag, { className: className, role: role, ...(anchor ? { id: anchor, ref } : {}), children: children })) : null;
|
|
405
|
+
}), [block]);
|
|
406
|
+
return isVisible ? (jsx(Tag, { className: className, role: role, ...(block?.anchor ? { id: block.anchor, ref } : {}), children: children })) : null;
|
|
377
407
|
});
|
|
378
|
-
function changeHash(label) {
|
|
379
|
-
if (label) {
|
|
380
|
-
globalThis.document.location.hash = label;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
408
|
|
|
384
409
|
const HEADING_STYLE_MAP = {
|
|
385
410
|
h0: 'text-h0',
|
|
@@ -403,7 +428,7 @@
|
|
|
403
428
|
|
|
404
429
|
const AccordionItemsList = JSX(({ children }) => (jsx("ul", { className: "list-none m-0 p-0", children: children })));
|
|
405
430
|
|
|
406
|
-
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-
|
|
431
|
+
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 bg-white text-primary-text ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${AlignText[accordionAlignTitle]}`, title: title })) : null, description ? (jsx("div", { className: "mb-2.5", children: jsx(Paragraph, { size: "text-l", children: description }) })) : null, jsx(AccordionItemsList, { children: renderChildren(rest) })] })));
|
|
407
432
|
Accordion.childrenTypes = ['AccordionItem'];
|
|
408
433
|
|
|
409
434
|
const Foldable = JSX(({ isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
@@ -533,7 +558,7 @@
|
|
|
533
558
|
const BenefitsBlock = JSX(({ className = '', title, benefitList, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-12 flex flex-col items-center ${className} ${VersionStyleMap[version]}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `max-w-[47rem] text-center ${benefitsTextStyleMap[version]}`, title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep(version)) })) : null] })));
|
|
534
559
|
const renderStep = (version) => (benefit, i) => {
|
|
535
560
|
const description = benefit.description;
|
|
536
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-
|
|
561
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full ${benefitsIconStyleMap[version]}`, image: getIconWithVersion(benefit.icon, version), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[version]}`, children: benefit.label })) : null, renderDescription$3(description, version)] })] }, String(i)));
|
|
537
562
|
};
|
|
538
563
|
const renderDescription$3 = (description, version) => {
|
|
539
564
|
const benefitType = description?.benefitType || null;
|
|
@@ -547,6 +572,10 @@
|
|
|
547
572
|
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
|
|
548
573
|
};
|
|
549
574
|
|
|
575
|
+
function useBlockRouter() {
|
|
576
|
+
return BlockRouter.inst;
|
|
577
|
+
}
|
|
578
|
+
|
|
550
579
|
const isURL = (href) => href?.includes('//');
|
|
551
580
|
const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
|
|
552
581
|
const getOrigin = (href) => {
|
|
@@ -581,9 +610,10 @@
|
|
|
581
610
|
if (!href) {
|
|
582
611
|
return href;
|
|
583
612
|
}
|
|
613
|
+
const hrefWithBasePath = `${projectSettings.BASE_PATH || ''}${href}`;
|
|
584
614
|
const origin = getOrigin(router?.href);
|
|
585
615
|
// Relative URL
|
|
586
|
-
return origin ?
|
|
616
|
+
return origin ? hrefWithBasePath.replace(origin, '') || '/' : hrefWithBasePath;
|
|
587
617
|
};
|
|
588
618
|
|
|
589
619
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
@@ -615,6 +645,7 @@
|
|
|
615
645
|
|
|
616
646
|
function useLink() {
|
|
617
647
|
const router = useRouter();
|
|
648
|
+
const blockRouter = useBlockRouter();
|
|
618
649
|
return (props) => {
|
|
619
650
|
const href = adjustHref(props.href, router);
|
|
620
651
|
return {
|
|
@@ -625,8 +656,15 @@
|
|
|
625
656
|
props.onClick && props.onClick(ev);
|
|
626
657
|
const isLocalHref = href && !isURL(href);
|
|
627
658
|
const isLocalTarget = !props.target || props.target === '_self';
|
|
628
|
-
if (isLocalHref
|
|
629
|
-
|
|
659
|
+
if (!isLocalHref || !isLocalTarget) {
|
|
660
|
+
// Default handle
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
ev?.preventDefault();
|
|
664
|
+
if (isHash(href)) {
|
|
665
|
+
blockRouter.goto(href);
|
|
666
|
+
}
|
|
667
|
+
else {
|
|
630
668
|
router.push(href);
|
|
631
669
|
}
|
|
632
670
|
}, props),
|
|
@@ -783,12 +821,12 @@
|
|
|
783
821
|
const Headline = JSX(({ className = '', bgColorHeadline = 'transparent', align = 'center', title, description, headlineVersion = 'XL', as, ...rest }) => {
|
|
784
822
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
785
823
|
const SIZE_MAPS = HEADLINE_VERSION[headlineVersion];
|
|
786
|
-
return (jsxs(BlockWrapper, { className: `font-sans flex flex-col p-
|
|
824
|
+
return (jsxs(BlockWrapper, { className: `font-sans flex flex-col p-12 ${SIZE_MAPS.gap} ${STYLE_MAPS.background} ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: SIZE_MAPS?.headingType, as: as || SIZE_MAPS?.as, className: `whitespace-pre-wrap ${STYLE_MAPS.text} ${AlignText[align]}`, title: title })) : null, description ? (jsx("p", { className: `${SIZE_MAPS.descriptionFont} ${STYLE_MAPS.text} ${AlignText[align]}`, children: description })) : null] }));
|
|
787
825
|
});
|
|
788
826
|
|
|
789
827
|
const Bonus = JSX((props) => {
|
|
790
828
|
const { className = '', title, description, bonusItems, ...rest } = props;
|
|
791
|
-
return (jsx(BlockWrapper, { className: `font-sans bg-white p-
|
|
829
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white p-12 pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center", ...rest }), jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems?.length
|
|
792
830
|
? bonusItems.map((_, i) => {
|
|
793
831
|
return (jsx("div", { className: "flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "flex flex-col justify-between mr-4", children: [jsxs("div", { children: [jsx("div", { className: "text-h4", children: _.title }), jsx("div", { className: "text-xl-light mt-2 max-w-[488px]", children: _.description })] }), _?.buttons?.length ? jsx(ButtonSection, { buttons: _?.buttons }) : null] }), _.bonusItemContent?.bonusType
|
|
794
832
|
? renderBonusItemContent(_.bonusItemContent)
|
|
@@ -800,9 +838,9 @@
|
|
|
800
838
|
? renderBonusCount(bonusItemContent)
|
|
801
839
|
: renderBonusImage(bonusItemContent) }));
|
|
802
840
|
const renderBonusCount = (_) => (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [_.bonusCount ? (jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount })) : null, _.bonusName ? (jsx("span", { className: "text-h2 bg-clip-text text-transparent bg-green-to-yellow", children: _.bonusName })) : null] }));
|
|
803
|
-
const renderBonusImage = (_) => _.image ?
|
|
841
|
+
const renderBonusImage = (_) => _.image ? jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full`, image: _.image }) : null;
|
|
804
842
|
|
|
805
|
-
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-
|
|
843
|
+
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M", align: "center", ...rest }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
806
844
|
const renderBonusBenefit = ({ icon, label, description }, i) => {
|
|
807
845
|
return (jsxs("div", { className: "flex flex-col items-center text-h6", children: [description ? jsx("span", { children: description }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", width: "auto", className: "h-[180px] w-auto" }) : null, jsx("div", { children: label ? jsx("span", { children: label }) : null })] }, String(i)));
|
|
808
846
|
};
|
|
@@ -828,7 +866,7 @@
|
|
|
828
866
|
return (jsxs("li", { className: "flex items-center gap-3.5 mb-3 last:mb-0", children: [icon?.icon ? (jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider`, image: icon.icon, asSVG: true })) : null, icon?.src ? jsx(ImgInner, { image: icon.icon }) : null, jsx("span", { className: "text-xl-light", children: text })] }, key));
|
|
829
867
|
};
|
|
830
868
|
|
|
831
|
-
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-
|
|
869
|
+
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-12 pb-9 ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }), jsx("div", { className: "flex gap-5", children: cards?.length ? cards.map((_, i) => jsx(BusinessCard, { ..._ }, String(i))) : null })] })));
|
|
832
870
|
|
|
833
871
|
const useCarouselControls = (props) => {
|
|
834
872
|
const { itemCount, visibleItemCount, isCyclic } = props;
|
|
@@ -1074,7 +1112,9 @@
|
|
|
1074
1112
|
|
|
1075
1113
|
const BonusCalculatorForm = JSX(({ className = '', sourceBookDir = '', buttons, footnote }) => {
|
|
1076
1114
|
const [travelExpenseValue, setTravelExpenseValue] = useState(DEFAULT_TRAVEL_MIN_SUM);
|
|
1115
|
+
const handleTravelExpenseValue = useCallback((_) => setTravelExpenseValue(_), []);
|
|
1077
1116
|
const [restExpenseValue, setRestExpenseValue] = useState(DEFAULT_REST_MIN_SUM);
|
|
1117
|
+
const handleRestExpenseValue = useCallback((_) => setRestExpenseValue(_), []);
|
|
1078
1118
|
const userInputParams = {
|
|
1079
1119
|
travelExpenseValue,
|
|
1080
1120
|
restExpenseValue,
|
|
@@ -1086,14 +1126,14 @@
|
|
|
1086
1126
|
moneyValue: travelExpenseValue,
|
|
1087
1127
|
step: 500,
|
|
1088
1128
|
isShowItems: false,
|
|
1089
|
-
},
|
|
1129
|
+
}, handleTravelExpenseValue), renderWantedSumInput('Сумма покупок в остальных категориях, ₽', {
|
|
1090
1130
|
className: 'mt-7',
|
|
1091
1131
|
minSum: minSumOther,
|
|
1092
1132
|
maxSum: maxSumOther,
|
|
1093
1133
|
moneyValue: restExpenseValue,
|
|
1094
1134
|
step: 500,
|
|
1095
1135
|
isShowItems: false,
|
|
1096
|
-
},
|
|
1136
|
+
}, handleRestExpenseValue)] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]" })) : null }), jsxs("div", { className: "w-full max-w-[350px]", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonSection(buttons), renderFootnote(footnote)] })] }));
|
|
1097
1137
|
});
|
|
1098
1138
|
|
|
1099
1139
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
@@ -1179,7 +1219,9 @@
|
|
|
1179
1219
|
const [isSalaryClient, toggleIsSalaryClient] = useState(false);
|
|
1180
1220
|
const [isStateEmployee, toggleIsStateEmployee] = useState(false);
|
|
1181
1221
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
1222
|
+
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
1182
1223
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1224
|
+
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
1183
1225
|
const userInputParams = {
|
|
1184
1226
|
isAnnuity,
|
|
1185
1227
|
isInsurance,
|
|
@@ -1189,7 +1231,7 @@
|
|
|
1189
1231
|
monthsValue,
|
|
1190
1232
|
};
|
|
1191
1233
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
|
|
1192
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 },
|
|
1234
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx(RadioButtonGroup, { items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => toggleIsAnnuity(text === ANNUITY) }), renderButtonSection(buttons), renderFootnote(footnote)] })] }));
|
|
1193
1235
|
});
|
|
1194
1236
|
|
|
1195
1237
|
const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
@@ -1229,6 +1271,7 @@
|
|
|
1229
1271
|
];
|
|
1230
1272
|
const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
1231
1273
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
1274
|
+
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
1232
1275
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1233
1276
|
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
1234
1277
|
const userInputParams = {
|
|
@@ -1236,13 +1279,14 @@
|
|
|
1236
1279
|
monthsValue,
|
|
1237
1280
|
isMonthlyInterestPayment,
|
|
1238
1281
|
};
|
|
1282
|
+
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
1239
1283
|
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
1240
1284
|
const { income, finalSum, rate } = calculatorParams;
|
|
1241
1285
|
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
1242
1286
|
...calculatorParams,
|
|
1243
|
-
},
|
|
1287
|
+
}, handleMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
|
|
1244
1288
|
...calculatorParams,
|
|
1245
|
-
},
|
|
1289
|
+
}, handleMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [income ? (jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) : null, finalSum ? (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })) : null, jsx(RadioButtonGroup, { items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => toggleIsMonthlyInterestPayment(text === EVERY_MONTH) }), renderButtonSection(buttons), renderFootnote(footnote)] })] }));
|
|
1246
1290
|
});
|
|
1247
1291
|
|
|
1248
1292
|
const EmbeddableCalcBlocks = {
|
|
@@ -1278,7 +1322,7 @@
|
|
|
1278
1322
|
className: 'top-8',
|
|
1279
1323
|
})] }), jsx("div", { className: "flex", style: { transform: `translateX(-${slideIndexShift}00%)` }, role: "list", children: calculatorBlocks?.length ? calculatorBlocks.map(renderCalculatorBlock) : null })] }));
|
|
1280
1324
|
});
|
|
1281
|
-
function renderNavButton$
|
|
1325
|
+
function renderNavButton$3({ tab, i, isActive, onClick }) {
|
|
1282
1326
|
const btnClassName = isActive
|
|
1283
1327
|
? 'h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white'
|
|
1284
1328
|
: `h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text`;
|
|
@@ -1297,7 +1341,7 @@
|
|
|
1297
1341
|
}
|
|
1298
1342
|
function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
|
|
1299
1343
|
const CARD_SHIFT = 388;
|
|
1300
|
-
return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$
|
|
1344
|
+
return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$3({
|
|
1301
1345
|
tab,
|
|
1302
1346
|
i,
|
|
1303
1347
|
isActive: Boolean(i === slideIndexShift),
|
|
@@ -1374,7 +1418,7 @@
|
|
|
1374
1418
|
? getDisabledButtonClasses({ version: button?.version })
|
|
1375
1419
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
1376
1420
|
const link = useLink();
|
|
1377
|
-
return (jsxs(BlockWrapper, { className: `p-
|
|
1421
|
+
return (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: handleChange, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
|
|
1378
1422
|
});
|
|
1379
1423
|
|
|
1380
1424
|
const mapChildren = (mapper) => (children) => {
|
|
@@ -1491,7 +1535,7 @@
|
|
|
1491
1535
|
|
|
1492
1536
|
const ITEMS_GAP = 4;
|
|
1493
1537
|
const blurBaseStyle = 'absolute top-0 bottom-0 z-50 w-[84px]';
|
|
1494
|
-
const scrollButtonStyle = 'absolute top-
|
|
1538
|
+
const scrollButtonStyle = 'absolute top-[calc(50%-12px)] z-50';
|
|
1495
1539
|
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, ...rest }) => {
|
|
1496
1540
|
const { blocks: childBlocks } = rest.block || {};
|
|
1497
1541
|
const count = itemCount || childBlocks?.length || 0;
|
|
@@ -1506,16 +1550,14 @@
|
|
|
1506
1550
|
'CarouselTariffsCard',
|
|
1507
1551
|
'CarouselLinks',
|
|
1508
1552
|
'CarouselProgramsCard',
|
|
1553
|
+
'CarouselInvestmentCard',
|
|
1509
1554
|
];
|
|
1510
1555
|
const renderScrollButtons = ({ scrollLeft, scrollRight, canScrollLeft, canScrollRight, }) => (jsxs("div", { children: [canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-8`, onClick: scrollLeft })) : null, canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} right-8`, onClick: scrollRight })) : null] }));
|
|
1511
1556
|
|
|
1512
|
-
const CarouselProgramsCard = JSX(({ className = '', title, icon, list = [], version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans border border-main-stroke flex min-w-[536px] ${VersionStyleMap[version]} ${className}`, ...rest, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-end", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: " mb-3.5", headingType: "h5", title: title }) : null, list.length ? jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$2) }) : null] })] })));
|
|
1513
|
-
const renderList$2 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: `text-h6`, children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
|
|
1514
|
-
|
|
1515
1557
|
const BLOCK_CLASSES = 'absolute border border-solid border-main-stroke w-full h-full';
|
|
1516
1558
|
const CARD_WIDTH_MAP = {
|
|
1517
|
-
normal:
|
|
1518
|
-
mini:
|
|
1559
|
+
normal: 'min-w-[1007px]',
|
|
1560
|
+
mini: 'min-w-[355px]',
|
|
1519
1561
|
};
|
|
1520
1562
|
const CarouselCard = JSX(({ className = '', button, description, title, version = 'normal' }) => (jsx("section", { className: `flex pb-9 pl-12 ${CARD_WIDTH_MAP[version]} ${className}`, children: jsxs("div", { className: "relative w-full", children: [jsx("div", { className: `${BLOCK_CLASSES} z-10 top-9 right-12 bg-green-dark` }), jsx("div", { className: `${BLOCK_CLASSES} z-10 top-6 right-8 bg-green` }), jsx("div", { className: `${BLOCK_CLASSES} z-10 top-3 right-4 bg-green-light` }), jsxs("div", { className: "relative bg-white z-10 py-6 px-10 border border-solid border-green-light", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), button ? jsx("div", { className: "mt-6", children: renderButton({ button }) }) : null] })] }) })));
|
|
1521
1563
|
|
|
@@ -1541,12 +1583,17 @@
|
|
|
1541
1583
|
.map((link, index) => (jsx(LinkButton, { className: "m-1", ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
1542
1584
|
};
|
|
1543
1585
|
|
|
1586
|
+
const CarouselProgramsCard = JSX(({ className = '', title, icon, list = [], version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans border border-main-stroke flex min-w-[536px] ${VersionStyleMap[version]} ${className}`, ...rest, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-end", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: " mb-3.5", headingType: "h5", title: title }) : null, list.length ? jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$2) }) : null] })] })));
|
|
1587
|
+
const renderList$2 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: `text-h6`, children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
|
|
1588
|
+
|
|
1544
1589
|
const VISIBLE_ROWS_COUNT = 1;
|
|
1545
1590
|
const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, rows = [], ...rest }) => {
|
|
1546
1591
|
const rowsNode = rows.map(renderCardInfo);
|
|
1547
1592
|
const visibleRows = rowsNode.slice(0, VISIBLE_ROWS_COUNT);
|
|
1548
1593
|
const hiddenRows = rowsNode.slice(VISIBLE_ROWS_COUNT);
|
|
1549
|
-
return (
|
|
1594
|
+
return (jsxs(BlockWrapper, { className: `font-sans relative bg-white border border-main-stroke min-w-[322px] p-8
|
|
1595
|
+
${getHitStyle(isHighlighting)}
|
|
1596
|
+
${className}`, ...rest, children: [isHighlighting ? renderHitIcon() : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, title ? (jsx(Heading, { className: "text-primary-text text-center pt-2", headingType: "h5", title: title })) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, rows.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: rows.length > 1 ? renderFoldButton$1 : null })) : null] }));
|
|
1550
1597
|
});
|
|
1551
1598
|
const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-9 pt-[70px]' : 'mt-[70px] pt-9';
|
|
1552
1599
|
const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16", asSVG: true })] }));
|
|
@@ -1560,7 +1607,7 @@
|
|
|
1560
1607
|
const CatalogCard = JSX(({ className = '', title, description, image, price, button, colors }) => (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-s-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] })));
|
|
1561
1608
|
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)));
|
|
1562
1609
|
|
|
1563
|
-
const BLUR_BLOCK_CLASSES$
|
|
1610
|
+
const BLUR_BLOCK_CLASSES$1 = 'absolute top-0 bottom-0 w-[84px]';
|
|
1564
1611
|
const CARD_VIEW_COUNT$1 = 3;
|
|
1565
1612
|
const CARD_SHIFT$1 = 430;
|
|
1566
1613
|
const Catalog = JSX(({ cards = [], className = '', title, description, ...rest }) => {
|
|
@@ -1568,11 +1615,11 @@
|
|
|
1568
1615
|
itemCount: cards?.length,
|
|
1569
1616
|
visibleItemCount: CARD_VIEW_COUNT$1,
|
|
1570
1617
|
});
|
|
1571
|
-
return (jsxs(BlockWrapper, { className: `bg-white relative font-sans p-
|
|
1618
|
+
return (jsxs(BlockWrapper, { className: `bg-white relative font-sans p-12 overflow-hidden text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center", ...rest }), jsx("div", { className: "flex duration-1000 gap-3.5 mt-8", style: { transform: `translateX(-${activeIndex * CARD_SHIFT$1}px)` }, role: "list", children: cards?.length ? cards.map((card, i) => jsx(CatalogCard, { ...card }, String(i))) : null }), renderArrows({
|
|
1572
1619
|
...controls,
|
|
1573
1620
|
btnClass: ['left-8', 'right-8'],
|
|
1574
1621
|
className: 'top-1/2 z-10 mt-6',
|
|
1575
|
-
}), jsx("div", { className: `${BLUR_BLOCK_CLASSES$
|
|
1622
|
+
}), jsx("div", { className: `${BLUR_BLOCK_CLASSES$1} left-0 bg-opacity-from-white` }), jsx("div", { className: `${BLUR_BLOCK_CLASSES$1} right-0 bg-opacity-to-white` })] }));
|
|
1576
1623
|
});
|
|
1577
1624
|
|
|
1578
1625
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
@@ -1637,14 +1684,14 @@
|
|
|
1637
1684
|
|
|
1638
1685
|
const ComparisonTable = JSX(({ className = '', title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, ...rest }) => {
|
|
1639
1686
|
const [isShowAllRow, setIsShowAllRow] = useState(!visibleRowLength);
|
|
1640
|
-
const
|
|
1641
|
-
return (jsxs(BlockWrapper, { className: `bg-white font-sans py-
|
|
1642
|
-
? renderShowMoreToggleButton({ isShowAllRow, onClick:
|
|
1687
|
+
const handleToggle = useCallback(() => setIsShowAllRow((_) => !_), []);
|
|
1688
|
+
return (jsxs(BlockWrapper, { className: `bg-white font-sans py-12 pl-12 overflow-hidden text-primary-text relative ${className}`, ...rest, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center mb-9 mx-auto", title: title }), jsx(ComparisonTableBody, { columns: columns, rowHeaders: rowHeaders, isShowAllRow: isShowAllRow, isColoredFirstColumn: isColoredFirstColumn, visibleRowLength: visibleRowLength }), visibleRowLength
|
|
1689
|
+
? renderShowMoreToggleButton({ isShowAllRow, onClick: handleToggle })
|
|
1643
1690
|
: null] }));
|
|
1644
1691
|
});
|
|
1645
|
-
const renderShowMoreToggleButton = ({ isShowAllRow, onClick, }) => (jsx("div", { className: "pr-
|
|
1692
|
+
const renderShowMoreToggleButton = ({ isShowAllRow, onClick, }) => (jsx("div", { className: "pr-12", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: onClick, className: "mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans text-xs-light font-medium py-3", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
|
|
1646
1693
|
|
|
1647
|
-
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `${VersionStyleMap[version]} flex p-
|
|
1694
|
+
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `${VersionStyleMap[version]} flex p-12 ${className}`, ...rest, children: [info?.length ? renderBlocks(info, version) : null, contacts?.length ? renderBlocks(contacts, version) : null] })));
|
|
1648
1695
|
const renderBlocks = (info, version) => (jsx("div", { className: "flex grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index, version })) }));
|
|
1649
1696
|
const renderBlocksColumn = ({ column, index, version }) => column ? (jsx("div", { className: "flex flex-col grow basis-0 pr-11 last:pr-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { className: "mt-6 first:mt-0", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "XS", align: "left", bgColorHeadline: version }), additionalDescription ? (jsx("div", { className: "mt-1.5 opacity-80", children: jsx(Paragraph, { size: "text-m-light", children: additionalDescription }) })) : null, button ? jsx(Button, { className: "mt-6", ...button }) : null] }, String(key)))) }, `col-${String(index)}`)) : null;
|
|
1650
1697
|
|
|
@@ -1749,7 +1796,7 @@
|
|
|
1749
1796
|
setSelectedItem(value || { key: '', text: '' });
|
|
1750
1797
|
}, [value]);
|
|
1751
1798
|
return (jsxs("div", { className: `${className}`, ref: wrapperRef, children: [label ? jsx("span", { className: "mb-2 flex text-primary-text", children: label }) : null, jsxs("div", { className: `relative ${isOpen ? 'z-20' : 'z-10'}`, children: [jsxs("div", { className: `text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer
|
|
1752
|
-
${getBorderStyle(isBorder)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-
|
|
1799
|
+
${getBorderStyle(isBorder)}`, onClick: () => setIsOpen(!isOpen), children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: selectedItem?.text || placeholder }), jsx(Icon, { name: "ArrowUpIcon", width: "16", height: "16", className: `absolute right-3 ${isOpen ? '' : 'rotate-180'}` })] }), options?.length ? (jsx("div", { className: `h-0 ${renderOptionsStyle(isOpen)}`, children: jsx("div", { className: `bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]`, children: options.map(renderOption(choiceOption, isOpen, isSelected)) }) })) : null] })] }));
|
|
1753
1800
|
});
|
|
1754
1801
|
const renderOptionsStyle = (isOpen) => (isOpen ? '' : 'overflow-hidden');
|
|
1755
1802
|
const renderOption = (choiceOption, isOpen, isSelected) => (option, i) => {
|
|
@@ -1872,7 +1919,7 @@
|
|
|
1872
1919
|
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
1873
1920
|
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
1874
1921
|
currencyRatesSell.push({ currency: { currency: Currency.RUB } });
|
|
1875
|
-
return (jsx(BlockWrapper, { className: `bg-white text-primary-text font-sans p-9 box-border min-h-
|
|
1922
|
+
return (jsx(BlockWrapper, { className: `bg-white text-primary-text font-sans p-9 box-border min-h-80 ${className}`, ...rest, children: jsx(BaseTile, { 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", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
1876
1923
|
});
|
|
1877
1924
|
const getCurrencyRates = (currencies) => {
|
|
1878
1925
|
return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
|
|
@@ -2018,7 +2065,7 @@
|
|
|
2018
2065
|
}
|
|
2019
2066
|
const classes = version === 'secondary'
|
|
2020
2067
|
? 'bg-white hover:bg-secondary-hover'
|
|
2021
|
-
: 'border-solid border
|
|
2068
|
+
: 'border-solid border border-main-divider hover:border-transparent hover:bg-primary-main';
|
|
2022
2069
|
const isPrimary = version === 'primary';
|
|
2023
2070
|
return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", onClick: onClick, children: icon ? (jsx(ImgInner, { image: getIconWithVersion(icon), imageClassName: "group-hover:text-white", width: "24", height: "24", asSVG: true })) : null }));
|
|
2024
2071
|
});
|
|
@@ -2036,8 +2083,8 @@
|
|
|
2036
2083
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
2037
2084
|
const Footer = JSX(({ className, ...rest }) => {
|
|
2038
2085
|
const fallback = rest.options?.page?.fallback;
|
|
2039
|
-
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
2040
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 bg-white font-sans ${className || ''}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", items: topItems, fallback: fallback })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
2086
|
+
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
2087
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 bg-white font-sans ${className || ''}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", items: topItems, fallback: fallback })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
2041
2088
|
});
|
|
2042
2089
|
|
|
2043
2090
|
const galleryLengthForScrollMap = {
|
|
@@ -2090,8 +2137,13 @@
|
|
|
2090
2137
|
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${TEXT_SIZE_MAP[listItemSize]} ${className} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: `${itemClassName} mb-1.5`, isDotted: isDotted, version: version, size: listItemSize, children: item }, String(i)))) }));
|
|
2091
2138
|
});
|
|
2092
2139
|
|
|
2093
|
-
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isDotted = true, align = 'center', }) => (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, version), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text
|
|
2094
|
-
|
|
2140
|
+
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isFullWidth = true, isDotted = true, align = 'center', }) => (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, version), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text
|
|
2141
|
+
? renderButton({
|
|
2142
|
+
button,
|
|
2143
|
+
buttonClassName: `mt-6 ${isFullWidth ? '' : 'self-center'}`,
|
|
2144
|
+
})
|
|
2145
|
+
: null] })));
|
|
2146
|
+
const renderImage$1 = (image, version) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-8 h-8 min-w-8 mb-5 rounded-full`, image: getIconWithVersion(image, version), asSVG: true })) : null] }));
|
|
2095
2147
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
2096
2148
|
const renderDescription$2 = (description, title) => description ? jsx("div", { className: `text-l ${title ? 'mt-2' : ''}`, children: description }) : null;
|
|
2097
2149
|
const renderAdditionalDescription$1 = (additionalDescription) => additionalDescription ? (jsx("div", { className: "text-m-light text-secondary-text mt-auto", children: additionalDescription })) : null;
|
|
@@ -2118,7 +2170,7 @@
|
|
|
2118
2170
|
|
|
2119
2171
|
const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
|
|
2120
2172
|
|
|
2121
|
-
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-
|
|
2173
|
+
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-12 ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M", align: "center", ...rest }), calendar ? renderCalendar(calendar) : null] })));
|
|
2122
2174
|
const renderCalendar = (calendar) => {
|
|
2123
2175
|
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
2124
2176
|
const colSize = 100 / colCount;
|
|
@@ -2132,7 +2184,7 @@
|
|
|
2132
2184
|
return (jsxs("div", { className: "w-full flex flex-col justify-center mt-13", children: [jsx("div", { className: "flex w-full mb-3 text-h6 text-center", children: mappedCalendar.map((_) => renderMonthNames(_, colSize)) }), jsx("div", { className: "flex w-full", children: mappedCalendar.map((_, ind) => (jsxs("div", { className: "pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0", style: { flexBasis: _.flexBasis }, children: [jsx("div", { className: "flex", children: renderMonthImages(_) }), jsxs("div", { className: "text-s-light text-primary-text mt-3", children: [jsx("span", { children: _.text }), "\u2009", jsx("span", { className: "text-primary-main", children: _.greenText })] })] }, `monthItem-${ind}`))) })] }));
|
|
2133
2185
|
};
|
|
2134
2186
|
const renderMonthNames = (item, colSize) => item.month?.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
|
|
2135
|
-
const renderMonthImages = (item) => item.month?.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r
|
|
2187
|
+
const renderMonthImages = (item) => item.month?.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(ImgInner, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
2136
2188
|
|
|
2137
2189
|
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
2138
2190
|
|
|
@@ -2184,7 +2236,7 @@
|
|
|
2184
2236
|
return [city, getCity];
|
|
2185
2237
|
}
|
|
2186
2238
|
|
|
2187
|
-
const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-
|
|
2239
|
+
const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-6 h-6 flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
|
|
2188
2240
|
|
|
2189
2241
|
const COLORS_MAP = {
|
|
2190
2242
|
'bg-white': 'text-primary-text hover:text-primary-main',
|
|
@@ -2200,7 +2252,7 @@
|
|
|
2200
2252
|
};
|
|
2201
2253
|
const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
2202
2254
|
const [city, getCity] = useGeolocation(defaultLocation);
|
|
2203
|
-
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(ImgInner, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-
|
|
2255
|
+
return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(ImgInner, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(ImgInner, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
|
|
2204
2256
|
});
|
|
2205
2257
|
|
|
2206
2258
|
const findActiveSubItem = (router) => (items = []) => {
|
|
@@ -2225,7 +2277,7 @@
|
|
|
2225
2277
|
const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
|
|
2226
2278
|
|
|
2227
2279
|
const TEXT_CLASSES$1 = 'font-sans text-l-light';
|
|
2228
|
-
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-
|
|
2280
|
+
const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-0.5';
|
|
2229
2281
|
const HeaderItem = JSX(({ className = '', active, bgColor = 'bg-white', dataItemName, children, ...rest }) => {
|
|
2230
2282
|
const link = useLink();
|
|
2231
2283
|
const { href, target, text, onClick } = link(rest);
|
|
@@ -2284,7 +2336,7 @@
|
|
|
2284
2336
|
const { topItems, logo, defaultLocation, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
2285
2337
|
const activeTopItem = showSubMenu ? getActiveItem(topItems, router) : null;
|
|
2286
2338
|
const topMenu = topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, "aria-label": _.text, bgColor: bgColor, ..._ }, String(i))));
|
|
2287
|
-
return (jsx(BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-
|
|
2339
|
+
return (jsx(BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-px ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2288
2340
|
});
|
|
2289
2341
|
const getActiveItem = (topItems, router) => {
|
|
2290
2342
|
const [firstPortal] = topItems || [];
|
|
@@ -2292,6 +2344,11 @@
|
|
|
2292
2344
|
return topItems?.find(isTopItemActive(router)) || firstPortal;
|
|
2293
2345
|
};
|
|
2294
2346
|
|
|
2347
|
+
const ImgBlock = JSX((props) => {
|
|
2348
|
+
const { className, image, ...rest } = props;
|
|
2349
|
+
return (jsx(BlockWrapper, { className: className, ...rest, children: jsx(ImgInner, { image: image }) }));
|
|
2350
|
+
});
|
|
2351
|
+
|
|
2295
2352
|
const InsuranceAmountBlockInner = JSX(({ className = '', cards = [], button }) => {
|
|
2296
2353
|
const [selectedCardIndex, setSelectedCardIndex] = useState(0);
|
|
2297
2354
|
const handleSelectedCardIndex = useCallback((_) => setSelectedCardIndex(_), []);
|
|
@@ -2312,21 +2369,21 @@
|
|
|
2312
2369
|
})
|
|
2313
2370
|
: null, renderArrows({
|
|
2314
2371
|
...controls,
|
|
2315
|
-
btnClass: ['left-
|
|
2372
|
+
btnClass: ['left-12', 'right-12'],
|
|
2316
2373
|
className: 'top-[62px]',
|
|
2317
|
-
}), canDec ? (jsx("div", { className: "absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white" })) : null, canInc ? (jsx("div", { className: "absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white" })) : null] }), jsx(Button, { className: "w-
|
|
2374
|
+
}), canDec ? (jsx("div", { className: "absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white" })) : null, canInc ? (jsx("div", { className: "absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white" })) : null] }), jsx(Button, { className: "w-60 text-center", version: "primary", ...button, href: activeHref })] }));
|
|
2318
2375
|
});
|
|
2319
2376
|
function renderGallery({ activeIndex, cards, selectedCardIndex, onClick }) {
|
|
2320
2377
|
const tabsShiftWidth = activeIndex * 460;
|
|
2321
2378
|
const cardsAlignStyle = cards.length > 2 ? 'justify-start' : 'justify-center';
|
|
2322
|
-
return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000 px-
|
|
2379
|
+
return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000 px-12", children: jsx("div", { className: `w-full flex flex-nowrap gap-3.5 pb-12 ${cardsAlignStyle}`, children: cards.map((slide, i) => renderNavButton$2({
|
|
2323
2380
|
slide,
|
|
2324
2381
|
i,
|
|
2325
2382
|
isActive: Boolean(i === selectedCardIndex),
|
|
2326
2383
|
onClick: () => onClick(i),
|
|
2327
2384
|
})) }) }));
|
|
2328
2385
|
}
|
|
2329
|
-
function
|
|
2386
|
+
function renderNavButton$2({ slide, i, isActive, onClick }) {
|
|
2330
2387
|
const btnClassName = isActive
|
|
2331
2388
|
? 'shadow-dark-blue/42 border-primary-main'
|
|
2332
2389
|
: `ease-in duration-300 border-main-stroke`;
|
|
@@ -2341,11 +2398,12 @@
|
|
|
2341
2398
|
|
|
2342
2399
|
const InsuranceAmountBlock = JSX(({ className = '', title, insuranceTabs = [], button, ...rest }) => {
|
|
2343
2400
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
2344
|
-
|
|
2401
|
+
const handleActiveSlideIndex = useCallback((_) => setActiveSlideIndex(_), []);
|
|
2402
|
+
return (jsxs(BlockWrapper, { className: `box-border py-12 overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center mb-8", title: title, headingType: "h3" }) : null, insuranceTabs?.length > 1 ? (jsx("div", { className: "p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md", children: insuranceTabs.map((item, i) => renderNavButton$1({
|
|
2345
2403
|
title: item?.title,
|
|
2346
2404
|
i,
|
|
2347
|
-
activeSlideIndex,
|
|
2348
|
-
onClick: () =>
|
|
2405
|
+
isActive: Boolean(i === activeSlideIndex),
|
|
2406
|
+
onClick: () => handleActiveSlideIndex(i),
|
|
2349
2407
|
})) })) : null, jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: renderInsuranceGalleries({
|
|
2350
2408
|
insuranceTabs,
|
|
2351
2409
|
button,
|
|
@@ -2357,50 +2415,11 @@
|
|
|
2357
2415
|
? insuranceGalleries.map((cards, i) => (jsx(InsuranceAmountBlockInner, { button: button, cards: cards }, String(i))))
|
|
2358
2416
|
: null;
|
|
2359
2417
|
};
|
|
2360
|
-
function renderNavButton$1({ title, i,
|
|
2361
|
-
const
|
|
2362
|
-
const btnClassName = isActiveBtn
|
|
2363
|
-
? 'bg-primary-main text-white rounded-md'
|
|
2364
|
-
: `text-secondary-text`;
|
|
2418
|
+
function renderNavButton$1({ title, i, isActive, onClick }) {
|
|
2419
|
+
const btnClassName = isActive ? 'bg-primary-main text-white rounded-md' : `text-secondary-text`;
|
|
2365
2420
|
return (jsx("button", { type: "button", onClick: onClick, "aria-label": title, className: `box-border px-4 py-3 text-m-light ${btnClassName}`, children: title }, String(i)));
|
|
2366
2421
|
}
|
|
2367
2422
|
|
|
2368
|
-
const BorderVersionStyleMap = {
|
|
2369
|
-
primary: 'border-main-stroke',
|
|
2370
|
-
secondary: 'border-white/50',
|
|
2371
|
-
};
|
|
2372
|
-
|
|
2373
|
-
const getItemListFontSize = (colValue) => (colValue === 'single' ? 'text-h6' : 'text-l');
|
|
2374
|
-
const cardColumnsModeStyleMap = {
|
|
2375
|
-
double: 'flex gap-y-2 gap-x-10 flex-wrap',
|
|
2376
|
-
single: 'flex gap-y-2 flex-col',
|
|
2377
|
-
};
|
|
2378
|
-
const InvestmentGalleryCard = JSX(({ className = '', columnsMode = 'double', description, additionalDescription, image, cardList, title, version = 'primary', }) => {
|
|
2379
|
-
const tileTitle = title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
2380
|
-
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
2381
|
-
return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border
|
|
2382
|
-
p-9 min-w-[697px] min-h-[319px]
|
|
2383
|
-
${BorderVersionStyleMap[version]}
|
|
2384
|
-
${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "flex flex-col justify-between", children: [jsxs("div", { className: "flex itens-center justify-between mb-4", children: [description ? jsx("span", { className: "text-h6", children: description }) : null, additionalDescription ? (jsxs("span", { className: "text-m-light text-secondary-text", children: [" ", additionalDescription, " "] })) : null] }), cardList?.length ? (jsx("div", { className: `${cardColumnsModeStyleMap[columnsMode]}`, role: "list", children: renderCardList(cardList, columnsMode) })) : null] }) }) }));
|
|
2385
|
-
});
|
|
2386
|
-
const renderCardList = (cardList, columnsMode) => cardList.map((item, i) => (jsxs("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: [item?.parameter ? (jsx("span", { className: `pr-2.5 ${getItemListFontSize(columnsMode)}`, children: item.parameter })) : null, item?.parameterDesccription ? (jsx("span", { className: "text-m-light text-secondary-text", children: item.parameterDesccription })) : null] }, String(i))));
|
|
2387
|
-
|
|
2388
|
-
const BLUR_BLOCK_CLASSES$1 = 'absolute top-0 bottom-0 w-[84px]';
|
|
2389
|
-
const CARD_FULL_VIEW_COUNT = 1;
|
|
2390
|
-
const InvestmentGallery = JSX(({ cards = [], className = '', title, version = 'primary', ...rest }) => {
|
|
2391
|
-
const cardWidth = 710;
|
|
2392
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
2393
|
-
itemCount: cards.length,
|
|
2394
|
-
visibleItemCount: CARD_FULL_VIEW_COUNT,
|
|
2395
|
-
});
|
|
2396
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${VersionStyleMap[version]} ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-9", title: title }) : null, jsxs("div", { children: [jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * cardWidth}px)` }, role: "list", children: cards?.length ? cards.map(renderInvestmentGalleryCard(className, version)) : null }), renderArrows({
|
|
2397
|
-
...controls,
|
|
2398
|
-
btnClass: ['left-8', 'right-8'],
|
|
2399
|
-
className: 'top-1/2 mt-3',
|
|
2400
|
-
})] }), jsx("div", { className: `${BLUR_BLOCK_CLASSES$1} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), jsx("div", { className: `${BLUR_BLOCK_CLASSES$1} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
2401
|
-
});
|
|
2402
|
-
const renderInvestmentGalleryCard = (className, version) => (card, i) => jsx(InvestmentGalleryCard, { className: className, version: version, ...card }, String(i));
|
|
2403
|
-
|
|
2404
2423
|
function joinList(sep) {
|
|
2405
2424
|
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
2406
2425
|
}
|
|
@@ -2475,7 +2494,7 @@
|
|
|
2475
2494
|
double: 'flex gap-x-5 gap-y-[26px] flex-wrap',
|
|
2476
2495
|
single: 'flex gap-3.5 flex-col',
|
|
2477
2496
|
};
|
|
2478
|
-
const LinkDocs = JSX(({ className = '', title, description, align = 'center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-
|
|
2497
|
+
const LinkDocs = JSX(({ className = '', title, description, align = 'center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-12 bg-white ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, align: align, headlineVersion: "M", as: "h2", ...rest }), jsx(LinkDocsList, { className: `mt-8 ${linkColumnsModeStyleMap[columnsMode]}`, columnsMode: columnsMode, documents: documents, icon: icon })] })));
|
|
2479
2498
|
|
|
2480
2499
|
const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
|
|
2481
2500
|
|
|
@@ -2502,7 +2521,7 @@
|
|
|
2502
2521
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
2503
2522
|
const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
|
|
2504
2523
|
const buttonsWithClass = buttons?.map((_) => ({ ..._, className: 'min-w-[168px]' }));
|
|
2505
|
-
return (jsxs(BlockWrapper, { className: `flex justify-between font-sans p-
|
|
2524
|
+
return (jsxs(BlockWrapper, { className: `flex justify-between font-sans p-12 box-border relative min-h-80
|
|
2506
2525
|
${getTileMinHeight(className)}
|
|
2507
2526
|
${VersionStyleMap[version]}
|
|
2508
2527
|
${className}`, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-7 w-full
|
|
@@ -2647,7 +2666,7 @@
|
|
|
2647
2666
|
|
|
2648
2667
|
const YMAPS_NAMESPACE = 'ymaps';
|
|
2649
2668
|
const useYandexMaps = () => {
|
|
2650
|
-
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY}&lang=ru_RU`;
|
|
2669
|
+
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY || ''}&lang=ru_RU`;
|
|
2651
2670
|
return useExternalNS(YMAPS_NAMESPACE, url);
|
|
2652
2671
|
};
|
|
2653
2672
|
|
|
@@ -2871,16 +2890,15 @@
|
|
|
2871
2890
|
// TODO: Список регионов можно получить через api/v1/regions
|
|
2872
2891
|
function useOfficeMap(regionCode) {
|
|
2873
2892
|
const { data } = useAsyncData(regionCode ? `${OFFICE_MAP_URL}?regionCode=${regionCode}` : undefined, fetchOfficeMap);
|
|
2874
|
-
console.warn('
|
|
2875
|
-
console.log('Hook useOfficeMap get this data:', data);
|
|
2893
|
+
console.warn('Hook useOfficeMap RETURNs MOCK object for testing', data);
|
|
2876
2894
|
return OFFICE_MAP;
|
|
2877
2895
|
}
|
|
2878
|
-
|
|
2896
|
+
function fetchOfficeMap(url) {
|
|
2879
2897
|
if (!url) {
|
|
2880
2898
|
return {};
|
|
2881
2899
|
}
|
|
2882
2900
|
return fetchJSON(url, { method: 'GET' });
|
|
2883
|
-
}
|
|
2901
|
+
}
|
|
2884
2902
|
|
|
2885
2903
|
const OfficeMap = JSX(({ className = '' }) => {
|
|
2886
2904
|
// TODO: useOfficeMap endpoint had use /api/v1/branches. This endpoint now is`t correct/
|
|
@@ -2957,6 +2975,11 @@
|
|
|
2957
2975
|
});
|
|
2958
2976
|
OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
|
|
2959
2977
|
|
|
2978
|
+
const ParagraphBlock = JSX((props) => {
|
|
2979
|
+
const { className, text, size, color, align, font, ...rest } = props;
|
|
2980
|
+
return (jsx(BlockWrapper, { className: className, ...rest, children: jsx(Paragraph, { size: size, color: color, align: align, font: font, children: text }) }));
|
|
2981
|
+
});
|
|
2982
|
+
|
|
2960
2983
|
const titleStyleMap = {
|
|
2961
2984
|
primary: 'text-primary-text',
|
|
2962
2985
|
secondary: 'text-white',
|
|
@@ -2979,7 +3002,7 @@
|
|
|
2979
3002
|
else if (benefitsVersion === 'normal') {
|
|
2980
3003
|
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
2981
3004
|
}
|
|
2982
|
-
return `w-
|
|
3005
|
+
return `w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${bgColorStyle}`;
|
|
2983
3006
|
}
|
|
2984
3007
|
|
|
2985
3008
|
const PictureText = JSX(({ className = '', title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => (jsxs(BlockWrapper, { className: `relative font-sans py-12 px-24 ${VersionStyleMap[version]} ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center", ...rest }), 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))] })] })] })));
|
|
@@ -3062,11 +3085,16 @@
|
|
|
3062
3085
|
const ProductBlock = JSX((props) => {
|
|
3063
3086
|
const { className = '', breadcrumbs, backwardButton, version = 'primary', ...rest } = props;
|
|
3064
3087
|
const buttonVersion = version === 'primary' ? version : 'white';
|
|
3065
|
-
return (jsxs(BlockWrapper, { className: `font-sans overflow-hidden p-
|
|
3088
|
+
return (jsxs(BlockWrapper, { className: `font-sans overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${VersionStyleMap[version]} ${className}`, ...rest, children: [backwardButton?.text
|
|
3066
3089
|
? renderBackwardButton(backwardButton, buttonVersion, 'mb-10 -mt-2.5')
|
|
3067
3090
|
: null, breadcrumbs?.length ? (jsx("div", { className: "text-xs-light mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { className: breadcrumbsStyleMap[version], ...breadcrumb }, String(i))))) })) : null, jsx(ProductBlockInner, { version: version, ...rest })] }));
|
|
3068
3091
|
});
|
|
3069
3092
|
|
|
3093
|
+
const BorderVersionStyleMap = {
|
|
3094
|
+
primary: 'border-main-stroke',
|
|
3095
|
+
secondary: 'border-white/50',
|
|
3096
|
+
};
|
|
3097
|
+
|
|
3070
3098
|
const productBlockStyleMap = {
|
|
3071
3099
|
primary: { title: 'text-secondary-text', text: 'text-secondary-text' },
|
|
3072
3100
|
secondary: { title: 'text-white', text: 'text-white/80' },
|
|
@@ -3075,30 +3103,30 @@
|
|
|
3075
3103
|
const galleryNav = slides.map((s) => s.nav);
|
|
3076
3104
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
3077
3105
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
3078
|
-
|
|
3106
|
+
const handleActiveSlideIndex = useCallback((_) => setActiveSlideIndex(_), []);
|
|
3107
|
+
return (jsxs(BlockWrapper, { className: `box-border pt-12 overflow-hidden relative font-sans w-100 mb-6 ${className}
|
|
3079
3108
|
${VersionStyleMap[version]}`, ...rest, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, ...rest, version }, i)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28", children: galleryNav.map((slide, i) => renderNavButton({
|
|
3080
3109
|
slide,
|
|
3081
3110
|
i,
|
|
3082
|
-
activeSlideIndex,
|
|
3083
|
-
onClick: () =>
|
|
3111
|
+
isActive: Boolean(i === activeSlideIndex),
|
|
3112
|
+
onClick: () => handleActiveSlideIndex(i),
|
|
3084
3113
|
version,
|
|
3085
3114
|
})) })] }));
|
|
3086
3115
|
});
|
|
3087
3116
|
function renderProductBlock(block, i) {
|
|
3088
3117
|
const { version } = block;
|
|
3089
3118
|
const additionalClass = version ? productBlockStyleMap[version].title : '';
|
|
3090
|
-
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { className: `pl-
|
|
3119
|
+
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full", role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { className: `pl-12 z-10 ${additionalClass}`, textBlockClassName: "mb-[154px]", headlineVersion: "XXL", ...block }) }) }, String(i)));
|
|
3091
3120
|
}
|
|
3092
|
-
function renderNavButton({ slide, i,
|
|
3093
|
-
const
|
|
3094
|
-
const btnClassName = isActiveBtn
|
|
3121
|
+
function renderNavButton({ slide, i, isActive, onClick, version }) {
|
|
3122
|
+
const btnClassName = isActive
|
|
3095
3123
|
? 'bg-white shadow-dark-blue/42 min-w-[350px] border-none p-6'
|
|
3096
3124
|
: `min-w-[290px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10 px-6 py-5 backdrop-blur
|
|
3097
3125
|
${VersionStyleMap[version]}`;
|
|
3098
|
-
const btnTitleClassName =
|
|
3126
|
+
const btnTitleClassName = isActive
|
|
3099
3127
|
? 'text-primary-text !text-h6 p-2'
|
|
3100
3128
|
: `text-l pb-1 ${productBlockStyleMap[version].title}`;
|
|
3101
|
-
const btnDescClassName =
|
|
3129
|
+
const btnDescClassName = isActive
|
|
3102
3130
|
? 'text-secondary-text text-l-light'
|
|
3103
3131
|
: `text-m-light ${productBlockStyleMap[version].text}`;
|
|
3104
3132
|
return (jsx("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `box-border relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0
|
|
@@ -3211,15 +3239,13 @@
|
|
|
3211
3239
|
return (jsx(Select, { options: dataFormat, label: label, placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj }));
|
|
3212
3240
|
});
|
|
3213
3241
|
|
|
3214
|
-
const RegionsAndBranches = JSX(({ regions = [], selectedRegion, onSelectedRegion: onSelectedRegion, branches = [], selectedBranch, onSelectedBranch, }) => {
|
|
3215
|
-
return (jsxs("div", { className: "flex justify-between gap-4 mb-6", children: [jsx("div", { className: "max-w-[396px] w-1/2", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0420\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "max-w-[396px] w-1/2", children: jsx(WrapperSelect, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: selectedBranch, setSelected: onSelectedBranch, label: "\u041E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435" }) })] }));
|
|
3216
|
-
});
|
|
3242
|
+
const RegionsAndBranches = JSX(({ regions = [], selectedRegion, onSelectedRegion: onSelectedRegion, branches = [], selectedBranch, onSelectedBranch, }) => (jsxs("div", { className: "flex justify-between gap-4 mb-6", children: [jsx("div", { className: "max-w-[396px] w-1/2", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0420\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "max-w-[396px] w-1/2", children: jsx(WrapperSelect, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: selectedBranch, setSelected: onSelectedBranch, label: "\u041E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435" }) })] })));
|
|
3217
3243
|
|
|
3218
|
-
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-checkbox-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "text-primary-text ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
3244
|
+
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-checkbox-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer", type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange(_.target.value) }), text ? jsx("span", { className: "text-primary-text ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
3219
3245
|
|
|
3220
3246
|
const RenderRadioButtons = JSX(() => {
|
|
3221
3247
|
const [selectedOption, setSelectedOption] = useState('option2');
|
|
3222
|
-
const onChange = (_) => setSelectedOption(_
|
|
3248
|
+
const onChange = useCallback((_) => setSelectedOption(_), []);
|
|
3223
3249
|
return (jsxs("div", { children: [jsx(Radio, { className: "mb-2", name: "contractType", text: "\u041F\u0440\u043E\u0441\u0442\u043E\u0435 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", value: "option1", checked: selectedOption === 'option1', onChange: onChange }), jsx(Radio, { name: "contractType", text: "\u0421\u0434\u0435\u043B\u043A\u0430 \u0441 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C\u044E", value: "option2", checked: selectedOption === 'option2', onChange: onChange })] }));
|
|
3224
3250
|
});
|
|
3225
3251
|
|
|
@@ -3232,8 +3258,8 @@
|
|
|
3232
3258
|
return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "mr-4 w-full", children: jsx(WrapperSelect, { data: caseVolumes, fieldLabel: "volume", selected: selectedCaseVolume, setSelected: onSelectedCaseVolume, label: "\u0420\u0430\u0437\u043C\u0435\u0440", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440" }) }), jsx("div", { className: "w-full", children: jsx(WrapperSelect, { data: safeBoxCases, fieldLabel: "safeBoxCasesSize", selected: selectedBoxSize, setSelected: onSelectedBoxSize, label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u044F\u0447\u0435\u0439\u043A\u0438, \u043C\u043C (\u0412\u0445\u0428\u0445\u0414)", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u044F\u0447\u0435\u0439\u043A\u0438" }) })] }));
|
|
3233
3259
|
});
|
|
3234
3260
|
|
|
3235
|
-
const SafeDepositRentalFields = JSX(({ regions, selectedRegion, branches, selectedBranch, days, selectedCaseVolume, selectedBoxSize, safeBoxCases, caseVolumes, onChange,
|
|
3236
|
-
return (jsxs("div", { className: "flex-1 mr-9", children: [jsx(RegionsAndBranches, { regions: regions, selectedRegion: selectedRegion, onSelectedRegion: (value) => onChange({ selectedRegion: value }), branches: branches, selectedBranch: selectedBranch, onSelectedBranch: onSelectedBranch(onChange) }), jsx(RentalPeriod, { days: days, setDays: (value) => onChange({ days: value }) }), jsx(SafeBoxCases, { caseVolumes: caseVolumes, selectedCaseVolume: selectedCaseVolume, onSelectedCaseVolume: onSelectedCaseVolume(onChange), safeBoxCases: safeBoxCases, selectedBoxSize: selectedBoxSize, onSelectedBoxSize: (value) => onChange({ selectedBoxSize: value }) }), jsx("span", { className: "text-secondary-text text-l-light", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }), jsxs("div", { className: "flex justify-between items-center mt-5", children: [jsx(RenderRadioButtons, {}), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary", onClick:
|
|
3261
|
+
const SafeDepositRentalFields = JSX(({ regions, selectedRegion, branches, selectedBranch, days, selectedCaseVolume, selectedBoxSize, safeBoxCases, caseVolumes, onChange, onClick, }) => {
|
|
3262
|
+
return (jsxs("div", { className: "flex-1 mr-9", children: [jsx(RegionsAndBranches, { regions: regions, selectedRegion: selectedRegion, onSelectedRegion: (value) => onChange({ selectedRegion: value }), branches: branches, selectedBranch: selectedBranch, onSelectedBranch: onSelectedBranch(onChange) }), jsx(RentalPeriod, { days: days, setDays: (value) => onChange({ days: value }) }), jsx(SafeBoxCases, { caseVolumes: caseVolumes, selectedCaseVolume: selectedCaseVolume, onSelectedCaseVolume: onSelectedCaseVolume(onChange), safeBoxCases: safeBoxCases, selectedBoxSize: selectedBoxSize, onSelectedBoxSize: (value) => onChange({ selectedBoxSize: value }) }), jsx("span", { className: "text-secondary-text text-l-light", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }), jsxs("div", { className: "flex justify-between items-center mt-5", children: [jsx(RenderRadioButtons, {}), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary", onClick: onClick })] })] }));
|
|
3237
3263
|
});
|
|
3238
3264
|
const onSelectedBranch = (onChange) => (value) => {
|
|
3239
3265
|
onChange({ selectedBranch: value, selectedCaseVolume: '', selectedBoxSize: '' });
|
|
@@ -3282,7 +3308,7 @@
|
|
|
3282
3308
|
const getBranch = (branches, selectedBranch) => branches.find((_) => _.branchCode === selectedBranch);
|
|
3283
3309
|
|
|
3284
3310
|
const SafeDepositRentalForm = JSX((props) => {
|
|
3285
|
-
const { regions, data, branches, onChange,
|
|
3311
|
+
const { regions, data, branches, onChange, onClick } = props;
|
|
3286
3312
|
useEffect(() => {
|
|
3287
3313
|
onChange({
|
|
3288
3314
|
selectedBranch: '',
|
|
@@ -3294,7 +3320,7 @@
|
|
|
3294
3320
|
const caseVolumes = getCaseVolumes(branch?.safeBoxCaseVolumes);
|
|
3295
3321
|
const safeBoxCases = getCaseVolume(branch?.safeBoxCaseVolumes, data.selectedCaseVolume)?.safeBoxCases;
|
|
3296
3322
|
const tariffs = getTariffs(safeBoxCases, data.selectedBoxSize);
|
|
3297
|
-
return (jsxs("div", { className: "flex justify-between align-top mb-6", children: [jsx(SafeDepositRentalFields, { ...data, regions: regions,
|
|
3323
|
+
return (jsxs("div", { className: "flex justify-between align-top mb-6", children: [jsx(SafeDepositRentalFields, { ...data, regions: regions, onClick: onClick, branches: branches, caseVolumes: caseVolumes, safeBoxCases: safeBoxCases, onChange: onChange }), jsx(SafeDepositRentalTotal, { days: data.days, tariffs: tariffs })] }));
|
|
3298
3324
|
});
|
|
3299
3325
|
const getCaseVolumes = (safeBoxCaseVolumes) => safeBoxCaseVolumes?.length ? safeBoxCaseVolumes?.filter((_) => _?.safeBoxCases?.length) : [];
|
|
3300
3326
|
const getCaseVolume = (caseVolumes, selectedCaseVolume) => caseVolumes?.find((_) => _.volume === selectedCaseVolume);
|
|
@@ -3309,6 +3335,7 @@
|
|
|
3309
3335
|
const DEFAULT_DAYS = 26;
|
|
3310
3336
|
const SafeDepositRental = JSX(({ title, footnote, className = '', ...rest }) => {
|
|
3311
3337
|
const [showMap, setShowMap] = useState(false);
|
|
3338
|
+
const handleShowMap = useCallback(() => setShowMap((_) => !_), []);
|
|
3312
3339
|
const [safeDepositState, setStateDepositState] = useState({
|
|
3313
3340
|
selectedRegion: '',
|
|
3314
3341
|
selectedBranch: '',
|
|
@@ -3320,11 +3347,8 @@
|
|
|
3320
3347
|
const selectedRegion = normalizeSelectedRegion(safeDepositState.selectedRegion, regions);
|
|
3321
3348
|
const branches = useSafeBoxes(selectedRegion);
|
|
3322
3349
|
const handleChangeSafeDepositState = useCallback((state) => setStateDepositState((oldState) => ({ ...oldState, ...state })), [setStateDepositState]);
|
|
3323
|
-
const onShowMapToggle = () => {
|
|
3324
|
-
setShowMap(!showMap);
|
|
3325
|
-
};
|
|
3326
3350
|
const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
|
|
3327
|
-
return (jsxs(BlockWrapper, { 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: "text-primary-text mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion },
|
|
3351
|
+
return (jsxs(BlockWrapper, { 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: "text-primary-text mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onClick: handleShowMap, 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] }));
|
|
3328
3352
|
});
|
|
3329
3353
|
const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
3330
3354
|
|
|
@@ -3381,18 +3405,16 @@
|
|
|
3381
3405
|
const titleMargin = title ? 'mt-9' : '';
|
|
3382
3406
|
const paddingX = getPaddingX(steps.length);
|
|
3383
3407
|
return (jsxs(BlockWrapper, { className: [
|
|
3384
|
-
'box-border py-
|
|
3408
|
+
'box-border py-12 font-sans',
|
|
3385
3409
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
3386
3410
|
'flex flex-col items-center overflow-hidden',
|
|
3387
3411
|
styleMap.background,
|
|
3388
3412
|
styleMap.title,
|
|
3389
3413
|
className,
|
|
3390
|
-
].join(' '), ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? (jsxs("div", { className: `box-border ${titleMargin}`, children: [jsx("div", { className: `flex items-center ${paddingX}`, children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap, version))) }), jsx("div", { className: `flex justify-between mt-4 ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepContent({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ?
|
|
3414
|
+
].join(' '), ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? (jsxs("div", { className: `box-border ${titleMargin}`, children: [jsx("div", { className: `flex items-center ${paddingX}`, children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap, version))) }), jsx("div", { className: `flex justify-between mt-4 ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepContent({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? jsx(Button, { className: "mt-8 min-w-60", version: "primary", ...button }) : null] }));
|
|
3391
3415
|
});
|
|
3392
|
-
const renderStepIcon = (styleMap, version) => ({ icon }, i) => {
|
|
3393
|
-
return (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center
|
|
3416
|
+
const renderStepIcon = (styleMap, version) => ({ icon }, i) => (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center
|
|
3394
3417
|
${styleMap.iconBackground} ${styleMap.title}`, children: checkIsIconRenderable(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, version), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
|
|
3395
|
-
};
|
|
3396
3418
|
|
|
3397
3419
|
function assertUnreachable(x) {
|
|
3398
3420
|
throw new Error(x);
|
|
@@ -3406,14 +3428,10 @@
|
|
|
3406
3428
|
const INACTIVE_TEXT_CLASSES = 'text-secondary-text group-hover:text-primary-main';
|
|
3407
3429
|
|
|
3408
3430
|
const LinkTab = JSX((props) => {
|
|
3409
|
-
const { tab, currentTab
|
|
3431
|
+
const { tab, currentTab } = props;
|
|
3410
3432
|
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
3411
|
-
const handleClick = useCallback(() => {
|
|
3412
|
-
onClick && onClick(tab);
|
|
3413
|
-
EventBus.inst.fire('anchorClick', { isScrolling: true, label: tab.href });
|
|
3414
|
-
}, [tab, onClick]);
|
|
3415
3433
|
const link = useLink();
|
|
3416
|
-
const adjustedProps = link(
|
|
3434
|
+
const adjustedProps = link(tab);
|
|
3417
3435
|
return (jsx("a", { role: "tab", className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, target: tab.target, href: adjustedProps.href, onClick: adjustedProps.onClick, children: jsx("span", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: tab.text }) }));
|
|
3418
3436
|
});
|
|
3419
3437
|
|
|
@@ -3453,26 +3471,20 @@
|
|
|
3453
3471
|
const { className = '', tabs, showCounter, isSticky, ...rest } = props;
|
|
3454
3472
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
3455
3473
|
useEffect(() => EventBus.inst.subscribe('tab', (event) => {
|
|
3456
|
-
|
|
3457
|
-
return;
|
|
3458
|
-
}
|
|
3459
|
-
const tab = tabs.find(checkTab(event));
|
|
3474
|
+
const tab = tabs?.find(checkTab(event));
|
|
3460
3475
|
if (event.type === 'link' && tab) {
|
|
3461
3476
|
setCurrentTab(tab);
|
|
3462
3477
|
}
|
|
3463
3478
|
}), [tabs]);
|
|
3464
|
-
useEffect(() =>
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
return undefined;
|
|
3469
|
-
}, [currentTab]);
|
|
3470
|
-
const handleClick = (selectedTab) => {
|
|
3479
|
+
useEffect(() => currentTab?.type === 'group'
|
|
3480
|
+
? EventBus.inst.subject('tab', { label: currentTab.ref })
|
|
3481
|
+
: undefined, [currentTab]);
|
|
3482
|
+
const handleClick = useCallback((selectedTab) => {
|
|
3471
3483
|
if (selectedTab?.type === 'group') {
|
|
3472
3484
|
EventBus.inst.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
3473
3485
|
}
|
|
3474
3486
|
setCurrentTab(selectedTab);
|
|
3475
|
-
};
|
|
3487
|
+
}, []);
|
|
3476
3488
|
return (jsx(BlockWrapper, { className: `${isSticky ? 'sticky top-1 z-20 ' : ''}box-border flex gap-x-1 ${className}`, role: "tablist", ...rest, children: tabs?.map(renderTab({ onClick: handleClick, currentTab, showCounter, ...rest })) }));
|
|
3477
3489
|
});
|
|
3478
3490
|
const checkTab = (event) => (_) => _.type === 'link' && _.href === `#${event.label}`;
|
|
@@ -3555,18 +3567,6 @@
|
|
|
3555
3567
|
: null }));
|
|
3556
3568
|
});
|
|
3557
3569
|
|
|
3558
|
-
function useTariffsInnerTableData(directoryName) {
|
|
3559
|
-
const { data } = useAsyncData(tariffsInnerTableDataUrl(directoryName), fetchTariffsInnerTableData);
|
|
3560
|
-
return data || {};
|
|
3561
|
-
}
|
|
3562
|
-
async function fetchTariffsInnerTableData(url) {
|
|
3563
|
-
const response = await fetch(url);
|
|
3564
|
-
return await response.json();
|
|
3565
|
-
}
|
|
3566
|
-
function tariffsInnerTableDataUrl(directoryName) {
|
|
3567
|
-
return `/wcms-resources/${directoryName || 'tariffs-inner-table-data'}.json`;
|
|
3568
|
-
}
|
|
3569
|
-
|
|
3570
3570
|
const COLUMN_WIDTH = 140;
|
|
3571
3571
|
const InnerTableBodyItem = JSX(({ rows }) => {
|
|
3572
3572
|
const rowsLength = rows?.[0]?.length ?? 0;
|
|
@@ -3599,33 +3599,46 @@
|
|
|
3599
3599
|
|
|
3600
3600
|
const InnerTableBody = JSX(({ activeTabIndex, items }) => {
|
|
3601
3601
|
const [hiddenTables, setHiddenTables] = useState({});
|
|
3602
|
-
const
|
|
3603
|
-
setHiddenTables((oldState) => ({ ...oldState, [key]: !oldState[key] }));
|
|
3604
|
-
};
|
|
3602
|
+
const toggleTables = useCallback((key) => setHiddenTables((oldState) => ({ ...oldState, [key]: !oldState[key] })), []);
|
|
3605
3603
|
return (jsx("div", { children: items.map((_, tableIdx) => {
|
|
3606
3604
|
const key = `activeTabIdx:${activeTabIndex}-tableIdx:${tableIdx}`;
|
|
3607
|
-
return (jsxs("div", { className: "w-full", children: [jsxs("div", { className: "flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative", onClick: () =>
|
|
3605
|
+
return (jsxs("div", { className: "w-full", children: [jsxs("div", { className: "flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative", onClick: () => toggleTables(key), children: [_.title, jsx(ImgInner, { image: hiddenTables[key] ? 'PlusIcon' : 'MinusIcon', className: "absolute right-[22px]", width: "24", height: "24" })] }), jsx("div", { className: `w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out ${hiddenTables[key] ? 'h-0' : ''}`, children: jsx("div", { className: "relative", children: jsx(InnerTableBodyItem, { rows: _.rowsData }) }) })] }, key));
|
|
3608
3606
|
}) }));
|
|
3609
3607
|
});
|
|
3610
3608
|
|
|
3611
3609
|
const InnerTableHeader = JSX(({ currencies, linkToPDF, activeTabIndex, setActiveTabIndex }) => (jsxs("div", { className: "flex justify-between w-full pt-2.5 pb-3", children: [currencies && currencies.length > 1 ? (jsx("div", { className: "flex bg-secondary-light p-1.5 rounded-md", children: currencies.map((currency, idx) => (jsx("div", { className: `rounded-md text-xl-light px-4 py-3 cursor-pointer ${idx === activeTabIndex ? 'bg-primary-main text-white' : 'text-secondary-text'}`, onClick: () => setActiveTabIndex(idx), children: currency || idx + 1 }, currency))) })) : null, linkToPDF ? (jsx(Button, { href: linkToPDF, version: "secondary", target: "_blank", appendLeft: jsx(Icon, { name: "DocDownloadIcon", iconVersion: "color", className: "mr-0.5", width: "20", height: "20", asSVG: true }), text: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0432 PDF" })) : null] })));
|
|
3612
3610
|
|
|
3611
|
+
function useTariffsInnerTableData(directoryName) {
|
|
3612
|
+
const { data } = useAsyncData(tariffsInnerTableDataUrl(directoryName), fetchTariffsInnerTableData);
|
|
3613
|
+
return data || {};
|
|
3614
|
+
}
|
|
3615
|
+
async function fetchTariffsInnerTableData(url) {
|
|
3616
|
+
const response = await fetch(url);
|
|
3617
|
+
return await response.json();
|
|
3618
|
+
}
|
|
3619
|
+
function tariffsInnerTableDataUrl(directoryName) {
|
|
3620
|
+
return `/wcms-resources/${directoryName || 'tariffs-inner-table-data'}.json`;
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3613
3623
|
const EMPTY_DATA = 'Данных нет';
|
|
3614
3624
|
const InnerTable = JSX(({ dataUrl, pdfUrl, onClick }) => {
|
|
3615
3625
|
const { tableData } = useTariffsInnerTableData(dataUrl);
|
|
3616
3626
|
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
3627
|
+
const handleActiveTabIndex = useCallback((_) => setActiveTabIndex(_), []);
|
|
3617
3628
|
const items = tableData?.[activeTabIndex]?.items ?? [];
|
|
3618
3629
|
const currencies = tableData?.map((item) => item.currency ?? '');
|
|
3619
|
-
return tableData ? (jsxs("div", { className: "bg-white z-10", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex:
|
|
3630
|
+
return tableData ? (jsxs("div", { className: "bg-white z-10", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: handleActiveTabIndex, linkToPDF: pdfUrl }), jsx(InnerTableBody, { activeTabIndex: activeTabIndex, items: items }), jsx(TableInnerButton, { onClick: onClick, isOpen: true })] })) : (jsxs("div", { className: "my-5 text-h6 text-center", children: [jsx("p", { children: EMPTY_DATA }), jsx(TableInnerButton, { onClick: onClick, isOpen: true })] }));
|
|
3620
3631
|
});
|
|
3621
3632
|
|
|
3622
3633
|
const TariffsTableRowContainer = JSX(({ children, tableInner, onHideContentClick }) => (jsxs("div", { className: "self-start flex flex-col", role: "row", children: [jsx("div", { className: "flex", children: children }), tableInner ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { ...tableInner, onClick: onHideContentClick }) })) : null] })));
|
|
3623
3634
|
|
|
3624
3635
|
const TariffsTableRow = JSX(({ row: { header, data }, activeIndex, rowIdx, ...rest }) => {
|
|
3625
3636
|
const [tableInner, setTableInner] = useState(undefined);
|
|
3637
|
+
const handleSetTableInner = useCallback((_) => setTableInner(_), []);
|
|
3626
3638
|
const [openTableInnerIdx, setOpenTableInnerIdx] = useState(undefined);
|
|
3639
|
+
const handleOpenTableInnerIdx = useCallback((_) => setOpenTableInnerIdx(_), []);
|
|
3627
3640
|
const onHideContentClick = () => setTableInner(undefined);
|
|
3628
|
-
return (jsxs(TariffsTableRowContainer, { onHideContentClick: onHideContentClick, tableInner: tableInner, ...rest, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(ImgInner, { className: "mr-
|
|
3641
|
+
return (jsxs(TariffsTableRowContainer, { onHideContentClick: onHideContentClick, tableInner: tableInner, ...rest, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(ImgInner, { className: "mr-3.5 max-w-6 max-h-6", image: getIconWithVersion(header.icon), width: "24px", height: "24px", asSVG: true })) : null, header?.title ? jsx("div", { className: "text-m-light", children: header?.title }) : null] }) }), data?.length ? (jsx(TableCarouselContainer, { activeIndex: activeIndex, columnWidth: COLUMN_WIDTH$1, version: "tariff", children: data.map((cells, i) => (jsx(TariffsTableCell, { cells: cells, rowIdx: rowIdx, cellIdx: i, setTableInner: handleSetTableInner, tableInner: tableInner, openTableInnerIdx: openTableInnerIdx, setOpenTableInnerIdx: handleOpenTableInnerIdx, ...rest }, String(i)))) })) : null] }));
|
|
3629
3642
|
});
|
|
3630
3643
|
|
|
3631
3644
|
const TariffsTable = JSX(({ className = '', title, description, rowHeaders, tariffsColumns: columns, hiddenRowsNum = 0, ...rest }) => {
|
|
@@ -3639,10 +3652,9 @@
|
|
|
3639
3652
|
itemCount: itemCount,
|
|
3640
3653
|
visibleItemCount: COLS_LENGTH_FOR_SCROLL,
|
|
3641
3654
|
});
|
|
3642
|
-
const { isScrollAvailable } = controls;
|
|
3643
3655
|
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
|
|
3644
3656
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
3645
|
-
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-
|
|
3657
|
+
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-12 overflow-hidden text-primary-text relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle({ title, description }), renderDescription(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
|
|
3646
3658
|
});
|
|
3647
3659
|
function renderTitle({ title, description }) {
|
|
3648
3660
|
return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
|
|
@@ -3650,13 +3662,14 @@
|
|
|
3650
3662
|
function renderDescription(description) {
|
|
3651
3663
|
return description ? jsx("div", { className: "mb-9 text-center text-l", children: description }) : null;
|
|
3652
3664
|
}
|
|
3653
|
-
const Wrapper = JSX(({ children, controls
|
|
3654
|
-
|
|
3665
|
+
const Wrapper = JSX(({ children, controls }) => {
|
|
3666
|
+
const { isScrollAvailable } = controls;
|
|
3667
|
+
return (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [children, renderArrows({
|
|
3655
3668
|
...controls,
|
|
3656
3669
|
btnClass: ['top-[108px]', 'top-[44px]'],
|
|
3657
3670
|
className: 'right-7',
|
|
3658
|
-
})
|
|
3659
|
-
|
|
3671
|
+
})] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
3672
|
+
});
|
|
3660
3673
|
|
|
3661
3674
|
const textBlockStyleMaps = {
|
|
3662
3675
|
primary: {
|
|
@@ -3744,6 +3757,25 @@
|
|
|
3744
3757
|
return (jsxs(BlockWrapper, { className: `bg-white ${getPaddings(className)} ${className}`, ...rest, children: [jsx(Headline, { title: title, headlineVersion: "M" }), src ? (jsx("video", { className: "m-auto w-full object-fill", preload: "metadata", poster: previewImg?.src, style: { maxHeight: 524 }, controls: true, children: jsx("source", { src: src }) })) : null] }));
|
|
3745
3758
|
});
|
|
3746
3759
|
|
|
3760
|
+
const getItemListFontSize = (colValue) => (colValue === 1 ? 'text-h6' : 'text-l');
|
|
3761
|
+
const cardColumnsModeStyleMap = {
|
|
3762
|
+
1: 'flex gap-y-2 flex-col',
|
|
3763
|
+
2: 'flex gap-y-2 gap-x-10 flex-wrap',
|
|
3764
|
+
};
|
|
3765
|
+
const CarouselInvestmentCard = JSX(({ additionalDescription, cardsList = [], className = '', columnsMode = 1, description, image, title, version = 'primary', ...rest }) => {
|
|
3766
|
+
const tileTitle = title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
3767
|
+
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
3768
|
+
return (jsx(BlockWrapper, { className: `relative text-left border border-solid box-border
|
|
3769
|
+
p-9 w-[697px]
|
|
3770
|
+
${BorderVersionStyleMap[version]}
|
|
3771
|
+
${className}`, ...rest, children: jsxs(BaseTile, { title: tileTitle, image: tileImage, children: [jsxs("div", { className: "flex justify-between mb-4", children: [description ? jsx("span", { className: "text-h6 w-1/3", children: description }) : null, additionalDescription ? (jsx("span", { className: "text-m-light text-secondary-text", children: additionalDescription })) : null] }), cardsList.length ? (jsx("ul", { className: `list-none m-0 p-0 ${cardColumnsModeStyleMap[columnsMode]}`, children: renderCardList(cardsList, columnsMode) })) : null] }) }));
|
|
3772
|
+
});
|
|
3773
|
+
const renderCardList = (cardsList, columnsMode) => {
|
|
3774
|
+
const CARDS_COUNT_MAP = [4, 9];
|
|
3775
|
+
const visibleCardsList = cardsList.slice(0, CARDS_COUNT_MAP[columnsMode - 1]);
|
|
3776
|
+
return visibleCardsList.map((item, i) => (jsxs("li", { className: columnsMode === 2 ? 'basis-[calc(50%-20px)]' : '', children: [item?.parameter ? (jsx("span", { className: `pr-2.5 ${getItemListFontSize(columnsMode)}`, children: item.parameter })) : null, item?.parameterDescription ? (jsx("span", { className: "text-m-light text-secondary-text", children: item.parameterDescription })) : null] }, String(i))));
|
|
3777
|
+
};
|
|
3778
|
+
|
|
3747
3779
|
const Blocks = {
|
|
3748
3780
|
Accordion,
|
|
3749
3781
|
AccordionItem,
|
|
@@ -3768,12 +3800,13 @@
|
|
|
3768
3800
|
GracePeriod,
|
|
3769
3801
|
Header,
|
|
3770
3802
|
Headline,
|
|
3803
|
+
ImgBlock,
|
|
3771
3804
|
InsuranceAmountBlock,
|
|
3772
3805
|
InvestmentInfo,
|
|
3773
|
-
InvestmentGallery,
|
|
3774
3806
|
LinkDocs,
|
|
3775
3807
|
MiniGallery,
|
|
3776
3808
|
MobileAppTile,
|
|
3809
|
+
ParagraphBlock,
|
|
3777
3810
|
PictureText,
|
|
3778
3811
|
Placeholder,
|
|
3779
3812
|
ProductBlock,
|
|
@@ -3794,8 +3827,66 @@
|
|
|
3794
3827
|
Tile,
|
|
3795
3828
|
VerticalLayout,
|
|
3796
3829
|
Video,
|
|
3830
|
+
CarouselInvestmentCard,
|
|
3797
3831
|
};
|
|
3798
3832
|
|
|
3833
|
+
const debounce = (fn, delay = 600) => {
|
|
3834
|
+
let timerId;
|
|
3835
|
+
const debouncedCallback = (...args) => {
|
|
3836
|
+
debouncedCallback.dispose();
|
|
3837
|
+
timerId = setTimeout(() => {
|
|
3838
|
+
fn(...args);
|
|
3839
|
+
}, delay);
|
|
3840
|
+
};
|
|
3841
|
+
debouncedCallback.dispose = () => {
|
|
3842
|
+
if (timerId) {
|
|
3843
|
+
clearTimeout(timerId);
|
|
3844
|
+
}
|
|
3845
|
+
};
|
|
3846
|
+
return debouncedCallback;
|
|
3847
|
+
};
|
|
3848
|
+
|
|
3849
|
+
const SPECIAL_BLOCK_TYPES = ['Header', 'Footer'];
|
|
3850
|
+
const EPS = 0.01;
|
|
3851
|
+
const topLineDelta = ([, { target }]) => Math.abs(target.getBoundingClientRect().top);
|
|
3852
|
+
function findActiveBlock(intersections) {
|
|
3853
|
+
const visibleIntersections = intersections
|
|
3854
|
+
.filter(([block]) => !SPECIAL_BLOCK_TYPES.includes(block.type || ''))
|
|
3855
|
+
.filter(([, { intersectionRatio }]) => intersectionRatio > EPS);
|
|
3856
|
+
const [activeBlock] = visibleIntersections.length > 0 ? minBy(topLineDelta)(visibleIntersections) : [];
|
|
3857
|
+
return activeBlock;
|
|
3858
|
+
}
|
|
3859
|
+
|
|
3860
|
+
const isScrolledEnough = () => globalThis.scrollY > (globalThis.innerHeight * 3) / 4;
|
|
3861
|
+
function useBlockRouterProvider(router = BlockRouter.inst, scrollTarget = globalThis) {
|
|
3862
|
+
const intersectionsMapRef = useRef(new Map());
|
|
3863
|
+
useEffect(() => router.eventBus.subscribe('intersection', ({ block, intersection }) => {
|
|
3864
|
+
if (intersectionsMapRef.current) {
|
|
3865
|
+
intersectionsMapRef.current.set(block, intersection);
|
|
3866
|
+
}
|
|
3867
|
+
}), [router]);
|
|
3868
|
+
useEffect(() => {
|
|
3869
|
+
const handleScroll = debounce(() => {
|
|
3870
|
+
if (!isScrolledEnough()) {
|
|
3871
|
+
router.reset();
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
3874
|
+
const activeBlock = findActiveBlock([...(intersectionsMapRef.current || [])]);
|
|
3875
|
+
if (activeBlock?.anchor) {
|
|
3876
|
+
router.replace(activeBlock.anchor);
|
|
3877
|
+
}
|
|
3878
|
+
else if (!activeBlock) {
|
|
3879
|
+
router.reset();
|
|
3880
|
+
}
|
|
3881
|
+
}, 100);
|
|
3882
|
+
scrollTarget.addEventListener('scroll', handleScroll);
|
|
3883
|
+
return () => {
|
|
3884
|
+
handleScroll.dispose();
|
|
3885
|
+
scrollTarget.removeEventListener('scroll', handleScroll);
|
|
3886
|
+
};
|
|
3887
|
+
}, [router, scrollTarget]);
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3799
3890
|
const api = LikeAPI();
|
|
3800
3891
|
function useLikeService(pagePath) {
|
|
3801
3892
|
const [likeCount, setLikeCount] = useState(0);
|
|
@@ -3847,6 +3938,7 @@
|
|
|
3847
3938
|
blockDecorator,
|
|
3848
3939
|
parent: data,
|
|
3849
3940
|
};
|
|
3941
|
+
useBlockRouterProvider();
|
|
3850
3942
|
return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, {
|
|
3851
3943
|
...options,
|
|
3852
3944
|
slotName: 'header',
|
|
@@ -3863,7 +3955,7 @@
|
|
|
3863
3955
|
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" }) }));
|
|
3864
3956
|
}
|
|
3865
3957
|
|
|
3866
|
-
const packageVersion = "0.6.
|
|
3958
|
+
const packageVersion = "0.6.38";
|
|
3867
3959
|
|
|
3868
3960
|
exports.Blocks = Blocks;
|
|
3869
3961
|
exports.ContentPage = ContentPage;
|