@redneckz/wildless-cms-uni-blocks 0.6.33 → 0.6.35
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.34.js +51 -0
- package/bundle/BlockRenderer/BlockRendererOptions.d.ts +11 -0
- package/bundle/BlockRenderer/defaultBlockDecorator.d.ts +2 -0
- package/bundle/BlockRenderer/getParentBlockContent.d.ts +2 -0
- package/bundle/BlockRenderer/getParentBlockDef.d.ts +3 -0
- package/bundle/BlockRenderer/renderBlock.d.ts +3 -0
- package/bundle/BlockRenderer/renderBlockList.d.ts +9 -0
- package/bundle/BlockRenderer/renderChildren.d.ts +10 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +415 -400
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -3
- package/bundle/components/Calculator/constants.d.ts +3 -0
- package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/bundle/components/Carousel/CarouselContainer.d.ts +8 -5
- package/bundle/components/Carousel/CarouselContent.d.ts +5 -8
- package/bundle/components/CarouselCard/CarouselCard.d.ts +0 -2
- package/bundle/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/bundle/components/ComparisonTable/ComparisonTableRows.d.ts +1 -2
- package/bundle/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/bundle/components/ComparisonTable/TableRow.d.ts +1 -1
- package/bundle/components/ComparisonTable/constants.d.ts +1 -1
- package/bundle/components/Gallery/GalleryContainer.d.ts +1 -1
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/bundle/components/SafeDepositRental/SafeDepositRentalContent.d.ts +1 -4
- package/bundle/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/bundle/components/Video/Video.d.ts +6 -0
- package/bundle/components/Video/VideoContent.d.ts +8 -0
- package/bundle/components/Video/getPaddings.d.ts +1 -0
- package/bundle/hooks/useCarouselControls.d.ts +5 -3
- package/bundle/model/JSXBlock.d.ts +4 -5
- package/bundle/model/LinkProps.d.ts +1 -0
- package/bundle/model/Picture.d.ts +8 -2
- package/bundle/services/sitemap/SitemapProps.d.ts +1 -2
- package/bundle/{react/setup-fixture.d.ts → setup-fixture.d.ts} +0 -0
- package/bundle/ui-kit/Button/renderArrows.d.ts +6 -4
- package/bundle/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +2 -1
- package/dist/BlockRenderer/BlockRendererOptions.d.ts +11 -0
- package/dist/BlockRenderer/BlockRendererOptions.js +2 -0
- package/dist/BlockRenderer/BlockRendererOptions.js.map +1 -0
- package/dist/BlockRenderer/defaultBlockDecorator.d.ts +2 -0
- package/dist/BlockRenderer/defaultBlockDecorator.js +5 -0
- package/dist/BlockRenderer/defaultBlockDecorator.js.map +1 -0
- package/dist/BlockRenderer/getParentBlockContent.d.ts +2 -0
- package/dist/{model → BlockRenderer}/getParentBlockContent.js +2 -2
- package/dist/BlockRenderer/getParentBlockContent.js.map +1 -0
- package/dist/BlockRenderer/getParentBlockDef.d.ts +3 -0
- package/dist/BlockRenderer/getParentBlockDef.js +7 -0
- package/dist/BlockRenderer/getParentBlockDef.js.map +1 -0
- package/dist/BlockRenderer/renderBlock.d.ts +3 -0
- package/dist/BlockRenderer/renderBlock.js +27 -0
- package/dist/BlockRenderer/renderBlock.js.map +1 -0
- package/dist/BlockRenderer/renderBlockList.d.ts +9 -0
- package/dist/BlockRenderer/renderBlockList.js +14 -0
- package/dist/BlockRenderer/renderBlockList.js.map +1 -0
- package/dist/BlockRenderer/renderChildren.d.ts +10 -0
- package/dist/BlockRenderer/renderChildren.js +13 -0
- package/dist/BlockRenderer/renderChildren.js.map +1 -0
- package/dist/components/Accordion/Accordion.js +2 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +2 -1
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.js +2 -1
- package/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.js +5 -4
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Blocks.js +3 -1
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +16 -4
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -3
- package/dist/components/Calculator/Calculator.js +22 -22
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CalculatorValueBlock.js +1 -3
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +13 -11
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/constants.d.ts +3 -0
- package/dist/components/Calculator/constants.js +10 -1
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js +28 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/dist/components/CardTransfer/CardTransfer.js +2 -1
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +1 -0
- package/dist/components/Carousel/Carousel.js +16 -14
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContainer.d.ts +8 -5
- package/dist/components/Carousel/CarouselContainer.js +8 -5
- package/dist/components/Carousel/CarouselContainer.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +5 -8
- package/dist/components/Carousel/CarouselContent.js +0 -3
- package/dist/components/Carousel/CarouselContent.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCard.d.ts +0 -2
- package/dist/components/CarouselCard/CarouselCard.js +4 -11
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +7 -7
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/Catalog/Catalog.js +8 -11
- package/dist/components/Catalog/Catalog.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +2 -2
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableBody.js +4 -4
- package/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/dist/components/ComparisonTable/ComparisonTableColumnHeaders.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTableColumnHeaders.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableRows.d.ts +1 -2
- package/dist/components/ComparisonTable/ComparisonTableRows.js +8 -7
- package/dist/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/dist/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/dist/components/ComparisonTable/TableCarouselContainer.js +1 -1
- package/dist/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
- package/dist/components/ComparisonTable/TableRow.d.ts +1 -1
- package/dist/components/ComparisonTable/TableRow.js +1 -1
- package/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/dist/components/ComparisonTable/constants.d.ts +1 -1
- package/dist/components/ComparisonTable/constants.js +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.js +1 -3
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +13 -7
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +1 -3
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -3
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +2 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +2 -4
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContainer.d.ts +1 -1
- package/dist/components/Gallery/GalleryContainer.js +1 -3
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +9 -12
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +2 -3
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/dist/components/Header/HeaderSecondaryMenu.js +2 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +23 -25
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/InvestmentGallery/InvestmentGallery.js +10 -20
- package/dist/components/InvestmentGallery/InvestmentGallery.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +4 -4
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/OtherProducts/OtherProducts.js +2 -1
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.js +5 -4
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +11 -21
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +5 -3
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +1 -4
- package/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +12 -14
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +2 -2
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +6 -3
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/components/Video/Video.d.ts +6 -0
- package/dist/components/Video/Video.js +12 -0
- package/dist/components/Video/Video.js.map +1 -0
- package/dist/components/Video/VideoContent.d.ts +8 -0
- package/dist/components/Video/VideoContent.js +2 -0
- package/dist/components/Video/VideoContent.js.map +1 -0
- package/dist/components/Video/getPaddings.d.ts +1 -0
- package/dist/components/Video/getPaddings.js +7 -0
- package/dist/components/Video/getPaddings.js.map +1 -0
- package/dist/hooks/useCarouselControls.d.ts +5 -3
- package/dist/hooks/useCarouselControls.js +19 -8
- package/dist/hooks/useCarouselControls.js.map +1 -1
- package/dist/model/JSXBlock.d.ts +4 -5
- package/dist/model/LinkProps.d.ts +1 -0
- package/dist/model/Picture.d.ts +8 -2
- package/dist/services/sitemap/SitemapProps.d.ts +1 -2
- package/dist/{react/setup-fixture.d.ts → setup-fixture.d.ts} +0 -0
- package/{mobile/dist/react → dist}/setup-fixture.js +4 -4
- package/dist/setup-fixture.js.map +1 -0
- package/dist/ui-kit/Button/renderArrows.d.ts +6 -4
- package/dist/ui-kit/Button/renderArrows.js +3 -2
- package/dist/ui-kit/Button/renderArrows.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.js +9 -10
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +5 -2
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +9 -12
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.js +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.js.map +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +5 -3
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +2 -1
- package/lib/BlockRenderer/BlockRendererOptions.d.ts +11 -0
- package/lib/BlockRenderer/BlockRendererOptions.js +2 -0
- package/lib/BlockRenderer/BlockRendererOptions.js.map +1 -0
- package/lib/BlockRenderer/defaultBlockDecorator.d.ts +2 -0
- package/lib/BlockRenderer/defaultBlockDecorator.js +2 -0
- package/lib/BlockRenderer/defaultBlockDecorator.js.map +1 -0
- package/lib/BlockRenderer/getParentBlockContent.d.ts +2 -0
- package/lib/BlockRenderer/getParentBlockContent.js +6 -0
- package/lib/BlockRenderer/getParentBlockContent.js.map +1 -0
- package/lib/BlockRenderer/getParentBlockDef.d.ts +3 -0
- package/lib/BlockRenderer/getParentBlockDef.js +4 -0
- package/lib/BlockRenderer/getParentBlockDef.js.map +1 -0
- package/lib/BlockRenderer/renderBlock.d.ts +3 -0
- package/lib/BlockRenderer/renderBlock.js +24 -0
- package/lib/BlockRenderer/renderBlock.js.map +1 -0
- package/lib/BlockRenderer/renderBlockList.d.ts +9 -0
- package/lib/BlockRenderer/renderBlockList.js +11 -0
- package/lib/BlockRenderer/renderBlockList.js.map +1 -0
- package/lib/BlockRenderer/renderChildren.d.ts +10 -0
- package/lib/BlockRenderer/renderChildren.js +10 -0
- package/lib/BlockRenderer/renderChildren.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +3 -2
- package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +3 -2
- package/lib/components/Accordion/Accordion.js +2 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +2 -1
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/AccordionItem/AccordionItem.js +2 -1
- package/lib/components/AccordionItem/AccordionItem.js.map +1 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js +5 -4
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.fixture.d.ts +1 -1
- package/lib/components/Blocks.js +3 -1
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Bonus/Bonus.fixture.d.ts +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.d.ts +2 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +16 -4
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -3
- package/lib/components/BusinessBlock/BusinessBlock.fixture.d.ts +1 -1
- package/lib/components/Calculator/Calculator.fixture.d.ts +1 -1
- package/lib/components/Calculator/Calculator.js +23 -23
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CalculatorValueBlock.js +1 -3
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +14 -12
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/constants.d.ts +3 -0
- package/lib/components/Calculator/constants.js +9 -0
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js +25 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/lib/components/CardTransfer/CardTransfer.fixture.d.ts +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +3 -2
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/Carousel/Carousel.d.ts +1 -0
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -1
- package/lib/components/Carousel/Carousel.js +16 -14
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContainer.d.ts +8 -5
- package/lib/components/Carousel/CarouselContainer.js +8 -5
- package/lib/components/Carousel/CarouselContainer.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +5 -8
- package/lib/components/Carousel/CarouselContent.js +0 -3
- package/lib/components/Carousel/CarouselContent.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCard.d.ts +0 -2
- package/lib/components/CarouselCard/CarouselCard.fixture.d.ts +2 -1
- package/lib/components/CarouselCard/CarouselCard.js +4 -11
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +7 -7
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/Catalog/Catalog.fixture.d.ts +1 -1
- package/lib/components/Catalog/Catalog.js +8 -11
- package/lib/components/Catalog/Catalog.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.fixture.d.ts +2 -2
- package/lib/components/ComparisonTable/ComparisonTable.fixture.mobile.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +2 -2
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableBody.js +4 -4
- package/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/lib/components/ComparisonTable/ComparisonTableColumnHeaders.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTableColumnHeaders.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableRows.d.ts +1 -2
- package/lib/components/ComparisonTable/ComparisonTableRows.js +8 -7
- package/lib/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/lib/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/lib/components/ComparisonTable/TableCarouselContainer.js +1 -1
- package/lib/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
- package/lib/components/ComparisonTable/TableRow.d.ts +1 -1
- package/lib/components/ComparisonTable/TableRow.js +1 -1
- package/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/lib/components/ComparisonTable/constants.d.ts +1 -1
- package/lib/components/ComparisonTable/constants.js +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.fixture.d.ts +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.js +1 -3
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.fixture.d.ts +1 -1
- package/lib/components/ContentPage/ContentPage.fixture.mobile.d.ts +1 -1
- package/lib/components/ContentPage/ContentPage.js +13 -7
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ErrorBlock/ErrorBlock.fixture.d.ts +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +1 -3
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -4
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.d.ts +1 -1
- package/lib/components/Footer/Footer.fixture.d.ts +1 -1
- package/lib/components/Footer/Footer.fixture.mobile.d.ts +1 -1
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +2 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Gallery/Gallery.fixture.d.ts +1 -1
- package/lib/components/Gallery/Gallery.fixture.mobile.d.ts +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +2 -4
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContainer.d.ts +1 -1
- package/lib/components/Gallery/GalleryContainer.js +1 -3
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +9 -12
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriod.fixture.d.ts +1 -1
- package/lib/components/Header/Header.fixture.d.ts +1 -1
- package/lib/components/Header/Header.fixture.mobile.d.ts +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +2 -3
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/lib/components/Header/HeaderSecondaryMenu.js +2 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +1 -1
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.d.ts +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +24 -26
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/InvestmentGallery/InvestmentGallery.fixture.d.ts +1 -1
- package/lib/components/InvestmentGallery/InvestmentGallery.js +10 -20
- package/lib/components/InvestmentGallery/InvestmentGallery.js.map +1 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.fixture.d.ts +1 -1
- package/lib/components/LikeControl/LikeControl.fixture.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocs.fixture.mobile.d.ts +1 -1
- package/lib/components/LinkList/LinkList.fixture.d.ts +1 -1
- package/lib/components/MiniGallery/MiniGallery.fixture.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.fixture.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.fixture.mobile.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +4 -4
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/OfficeMap/OfficeMap.fixture.d.ts +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.fixture.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +3 -2
- package/lib/components/OtherProducts/OtherProducts.js +2 -1
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.js +5 -4
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/lib/components/PictureText/PictureText.fixture.d.ts +1 -1
- package/lib/components/Placeholder/Placeholder.fixture.d.ts +1 -1
- package/lib/components/Placeholder/Placeholder.fixture.mobile.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +2 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.fixture.d.ts +1 -1
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +1 -1
- package/lib/components/PromoTile/PromoTile.fixture.d.ts +1 -1
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +1 -1
- package/lib/components/Recommendation/Recommendation.js +11 -21
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +5 -3
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.fixture.d.ts +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +1 -4
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/Tabs/Tabs.fixture.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.fixture.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.fixture.mobile.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +12 -14
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +2 -2
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.d.ts +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +1 -1
- package/lib/components/Tile/Tile.fixture.d.ts +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +6 -3
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/components/Video/Video.d.ts +6 -0
- package/lib/components/Video/Video.fixture.d.ts +8 -0
- package/lib/components/Video/Video.js +10 -0
- package/lib/components/Video/Video.js.map +1 -0
- package/lib/components/Video/VideoContent.d.ts +8 -0
- package/lib/components/Video/VideoContent.js +2 -0
- package/lib/components/Video/VideoContent.js.map +1 -0
- package/lib/components/Video/getPaddings.d.ts +1 -0
- package/lib/components/Video/getPaddings.js +4 -0
- package/lib/components/Video/getPaddings.js.map +1 -0
- package/lib/hooks/useCarouselControls.d.ts +5 -3
- package/lib/hooks/useCarouselControls.js +19 -8
- package/lib/hooks/useCarouselControls.js.map +1 -1
- package/lib/model/JSXBlock.d.ts +4 -5
- package/lib/model/LinkProps.d.ts +1 -0
- package/lib/model/Picture.d.ts +8 -2
- package/lib/services/sitemap/SitemapProps.d.ts +1 -2
- package/lib/{react/setup-fixture.d.ts → setup-fixture.d.ts} +0 -0
- package/lib/{react/setup-fixture.js → setup-fixture.js} +4 -4
- package/lib/setup-fixture.js.map +1 -0
- package/lib/ui-kit/Button/Button.fixture.d.ts +1 -1
- package/lib/ui-kit/Button/renderArrows.d.ts +6 -4
- package/lib/ui-kit/Button/renderArrows.js +3 -2
- package/lib/ui-kit/Button/renderArrows.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.fixture.d.ts +1 -1
- package/lib/ui-kit/Icon/Icon.fixture.d.ts +1 -1
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.js +9 -10
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/lib/ui-kit/List/List.fixture.d.ts +1 -1
- package/lib/ui-kit/Logo/Logo.fixture.d.ts +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.d.ts +3 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +6 -3
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +9 -12
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.js.map +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +5 -3
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +2 -1
- package/lib/ui-kit/TopItem/TopItem.fixture.d.ts +1 -1
- package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +11 -0
- package/mobile/bundle/BlockRenderer/defaultBlockDecorator.d.ts +2 -0
- package/mobile/bundle/BlockRenderer/getParentBlockContent.d.ts +2 -0
- package/mobile/bundle/BlockRenderer/getParentBlockDef.d.ts +3 -0
- package/mobile/bundle/BlockRenderer/renderBlock.d.ts +3 -0
- package/mobile/bundle/BlockRenderer/renderBlockList.d.ts +9 -0
- package/mobile/bundle/BlockRenderer/renderChildren.d.ts +10 -0
- package/mobile/bundle/bundle.umd.js +89 -86
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -3
- package/mobile/bundle/components/Calculator/constants.d.ts +3 -0
- package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/bundle/components/Carousel/CarouselContainer.d.ts +8 -5
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +5 -8
- package/mobile/bundle/components/CarouselCard/CarouselCard.d.ts +0 -2
- package/mobile/bundle/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/mobile/bundle/components/ComparisonTable/ComparisonTableRows.d.ts +1 -2
- package/mobile/bundle/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/mobile/bundle/components/ComparisonTable/TableRow.d.ts +1 -1
- package/mobile/bundle/components/ComparisonTable/constants.d.ts +1 -1
- package/mobile/bundle/components/Gallery/GalleryContainer.d.ts +1 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalContent.d.ts +1 -4
- package/mobile/bundle/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/mobile/bundle/components/Video/Video.d.ts +6 -0
- package/mobile/bundle/components/Video/VideoContent.d.ts +8 -0
- package/mobile/bundle/components/Video/getPaddings.d.ts +1 -0
- package/mobile/bundle/hooks/useCarouselControls.d.ts +5 -3
- package/mobile/bundle/model/JSXBlock.d.ts +4 -5
- package/mobile/bundle/model/LinkProps.d.ts +1 -0
- package/mobile/bundle/model/Picture.d.ts +8 -2
- package/mobile/bundle/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/bundle/{react/setup-fixture.d.ts → setup-fixture.d.ts} +0 -0
- package/mobile/bundle/ui-kit/Button/renderArrows.d.ts +6 -4
- package/mobile/bundle/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +2 -1
- package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +11 -0
- package/mobile/dist/BlockRenderer/BlockRendererOptions.js +2 -0
- package/mobile/dist/BlockRenderer/BlockRendererOptions.js.map +1 -0
- package/mobile/dist/BlockRenderer/defaultBlockDecorator.d.ts +2 -0
- package/mobile/dist/BlockRenderer/defaultBlockDecorator.js +5 -0
- package/mobile/dist/BlockRenderer/defaultBlockDecorator.js.map +1 -0
- package/mobile/dist/BlockRenderer/getParentBlockContent.d.ts +2 -0
- package/mobile/dist/{model → BlockRenderer}/getParentBlockContent.js +2 -2
- package/mobile/dist/BlockRenderer/getParentBlockContent.js.map +1 -0
- package/mobile/dist/BlockRenderer/getParentBlockDef.d.ts +3 -0
- package/mobile/dist/BlockRenderer/getParentBlockDef.js +7 -0
- package/mobile/dist/BlockRenderer/getParentBlockDef.js.map +1 -0
- package/mobile/dist/BlockRenderer/renderBlock.d.ts +3 -0
- package/mobile/dist/BlockRenderer/renderBlock.js +27 -0
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -0
- package/mobile/dist/BlockRenderer/renderBlockList.d.ts +9 -0
- package/mobile/dist/BlockRenderer/renderBlockList.js +14 -0
- package/mobile/dist/BlockRenderer/renderBlockList.js.map +1 -0
- package/mobile/dist/BlockRenderer/renderChildren.d.ts +10 -0
- package/mobile/dist/BlockRenderer/renderChildren.js +13 -0
- package/mobile/dist/BlockRenderer/renderChildren.js.map +1 -0
- package/mobile/dist/components/Accordion/Accordion.js +2 -1
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.js +5 -4
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +16 -4
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -3
- package/mobile/dist/components/Calculator/Calculator.js +22 -22
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +1 -3
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -11
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.d.ts +3 -0
- package/mobile/dist/components/Calculator/constants.js +10 -1
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +28 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/mobile/dist/components/CardTransfer/CardTransfer.js +2 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/dist/components/Carousel/Carousel.js +16 -14
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContainer.d.ts +8 -5
- package/mobile/dist/components/Carousel/CarouselContainer.js +8 -5
- package/mobile/dist/components/Carousel/CarouselContainer.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +5 -8
- package/mobile/dist/components/Carousel/CarouselContent.js +0 -3
- package/mobile/dist/components/Carousel/CarouselContent.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.d.ts +0 -2
- package/mobile/dist/components/CarouselCard/CarouselCard.js +4 -11
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +7 -7
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.js +8 -11
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +2 -2
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js +4 -4
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableColumnHeaders.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableColumnHeaders.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.d.ts +1 -2
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.js +8 -7
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableCarouselContainer.js +1 -1
- package/mobile/dist/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableRow.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/TableRow.js +1 -1
- package/mobile/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/constants.d.ts +1 -1
- package/mobile/dist/components/ComparisonTable/constants.js +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js +1 -3
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +13 -7
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +1 -3
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -3
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +2 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -4
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.js +1 -3
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +9 -12
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +2 -3
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +2 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +23 -25
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/InvestmentGallery/InvestmentGallery.js +10 -20
- package/mobile/dist/components/InvestmentGallery/InvestmentGallery.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +2 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +5 -4
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +11 -21
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +5 -3
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +1 -4
- package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +2 -2
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +6 -3
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/components/Video/Video.d.ts +6 -0
- package/mobile/dist/components/Video/Video.js +12 -0
- package/mobile/dist/components/Video/Video.js.map +1 -0
- package/mobile/dist/components/Video/VideoContent.d.ts +8 -0
- package/mobile/dist/components/Video/VideoContent.js +2 -0
- package/mobile/dist/components/Video/VideoContent.js.map +1 -0
- package/mobile/dist/components/Video/getPaddings.d.ts +1 -0
- package/mobile/dist/components/Video/getPaddings.js +7 -0
- package/mobile/dist/components/Video/getPaddings.js.map +1 -0
- package/mobile/dist/hooks/useCarouselControls.d.ts +5 -3
- package/mobile/dist/hooks/useCarouselControls.js +19 -8
- package/mobile/dist/hooks/useCarouselControls.js.map +1 -1
- package/mobile/dist/model/JSXBlock.d.ts +4 -5
- package/mobile/dist/model/LinkProps.d.ts +1 -0
- package/mobile/dist/model/Picture.d.ts +8 -2
- package/mobile/dist/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/dist/{react/setup-fixture.d.ts → setup-fixture.d.ts} +0 -0
- package/{dist/react → mobile/dist}/setup-fixture.js +4 -4
- package/mobile/dist/setup-fixture.js.map +1 -0
- package/mobile/dist/ui-kit/Button/renderArrows.d.ts +6 -4
- package/mobile/dist/ui-kit/Button/renderArrows.js +3 -2
- package/mobile/dist/ui-kit/Button/renderArrows.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.js +9 -10
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +5 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +9 -12
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.js +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.js.map +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +5 -3
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +2 -1
- package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +11 -0
- package/mobile/lib/BlockRenderer/BlockRendererOptions.js +2 -0
- package/mobile/lib/BlockRenderer/BlockRendererOptions.js.map +1 -0
- package/mobile/lib/BlockRenderer/defaultBlockDecorator.d.ts +2 -0
- package/mobile/lib/BlockRenderer/defaultBlockDecorator.js +2 -0
- package/mobile/lib/BlockRenderer/defaultBlockDecorator.js.map +1 -0
- package/mobile/lib/BlockRenderer/getParentBlockContent.d.ts +2 -0
- package/mobile/lib/BlockRenderer/getParentBlockContent.js +6 -0
- package/mobile/lib/BlockRenderer/getParentBlockContent.js.map +1 -0
- package/mobile/lib/BlockRenderer/getParentBlockDef.d.ts +3 -0
- package/mobile/lib/BlockRenderer/getParentBlockDef.js +4 -0
- package/mobile/lib/BlockRenderer/getParentBlockDef.js.map +1 -0
- package/mobile/lib/BlockRenderer/renderBlock.d.ts +3 -0
- package/mobile/lib/BlockRenderer/renderBlock.js +24 -0
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -0
- package/mobile/lib/BlockRenderer/renderBlockList.d.ts +9 -0
- package/mobile/lib/BlockRenderer/renderBlockList.js +11 -0
- package/mobile/lib/BlockRenderer/renderBlockList.js.map +1 -0
- package/mobile/lib/BlockRenderer/renderChildren.d.ts +10 -0
- package/mobile/lib/BlockRenderer/renderChildren.js +10 -0
- package/mobile/lib/BlockRenderer/renderChildren.js.map +1 -0
- package/mobile/lib/components/Accordion/Accordion.js +2 -1
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.js +5 -4
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +16 -4
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +6 -3
- package/mobile/lib/components/Calculator/Calculator.js +23 -23
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +1 -3
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +14 -12
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.d.ts +3 -0
- package/mobile/lib/components/Calculator/constants.js +9 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +25 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -0
- package/mobile/lib/components/CardTransfer/CardTransfer.js +3 -2
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/lib/components/Carousel/Carousel.js +16 -14
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContainer.d.ts +8 -5
- package/mobile/lib/components/Carousel/CarouselContainer.js +8 -5
- package/mobile/lib/components/Carousel/CarouselContainer.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +5 -8
- package/mobile/lib/components/Carousel/CarouselContent.js +0 -3
- package/mobile/lib/components/Carousel/CarouselContent.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.d.ts +0 -2
- package/mobile/lib/components/CarouselCard/CarouselCard.js +4 -11
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +7 -7
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.js +8 -11
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +2 -2
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js +4 -4
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableColumnHeaders.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableColumnHeaders.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.d.ts +1 -2
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.js +8 -7
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableCarouselContainer.js +1 -1
- package/mobile/lib/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableRow.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/TableRow.js +1 -1
- package/mobile/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/constants.d.ts +1 -1
- package/mobile/lib/components/ComparisonTable/constants.js +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js +1 -3
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +13 -7
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +1 -3
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -4
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +2 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -4
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.js +1 -3
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +9 -12
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +2 -3
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +2 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +24 -26
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/InvestmentGallery/InvestmentGallery.js +10 -20
- package/mobile/lib/components/InvestmentGallery/InvestmentGallery.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +2 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +5 -4
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +11 -21
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +5 -3
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +1 -4
- package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +2 -2
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +6 -3
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/components/Video/Video.d.ts +6 -0
- package/mobile/lib/components/Video/Video.js +10 -0
- package/mobile/lib/components/Video/Video.js.map +1 -0
- package/mobile/lib/components/Video/VideoContent.d.ts +8 -0
- package/mobile/lib/components/Video/VideoContent.js +2 -0
- package/mobile/lib/components/Video/VideoContent.js.map +1 -0
- package/mobile/lib/components/Video/getPaddings.d.ts +1 -0
- package/mobile/lib/components/Video/getPaddings.js +4 -0
- package/mobile/lib/components/Video/getPaddings.js.map +1 -0
- package/mobile/lib/hooks/useCarouselControls.d.ts +5 -3
- package/mobile/lib/hooks/useCarouselControls.js +19 -8
- package/mobile/lib/hooks/useCarouselControls.js.map +1 -1
- package/mobile/lib/model/JSXBlock.d.ts +4 -5
- package/mobile/lib/model/LinkProps.d.ts +1 -0
- package/mobile/lib/model/Picture.d.ts +8 -2
- package/mobile/lib/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/lib/{react/setup-fixture.d.ts → setup-fixture.d.ts} +0 -0
- package/mobile/lib/{react/setup-fixture.js → setup-fixture.js} +4 -4
- package/mobile/lib/setup-fixture.js.map +1 -0
- package/mobile/lib/ui-kit/Button/renderArrows.d.ts +6 -4
- package/mobile/lib/ui-kit/Button/renderArrows.js +3 -2
- package/mobile/lib/ui-kit/Button/renderArrows.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.js +9 -10
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +6 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +9 -12
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.js.map +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +5 -3
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +2 -1
- package/mobile/src/BlockRenderer/BlockRendererOptions.ts +12 -0
- package/mobile/src/BlockRenderer/defaultBlockDecorator.ts +4 -0
- package/mobile/src/{model → BlockRenderer}/getParentBlockContent.ts +3 -3
- package/mobile/src/BlockRenderer/getParentBlockDef.ts +6 -0
- package/mobile/src/BlockRenderer/renderBlock.tsx +47 -0
- package/mobile/src/BlockRenderer/renderBlockList.tsx +33 -0
- package/mobile/src/BlockRenderer/renderChildren.ts +25 -0
- package/mobile/src/components/Accordion/Accordion.tsx +3 -2
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +5 -4
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -0
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +31 -18
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +6 -3
- package/mobile/src/components/Calculator/Calculator.tsx +32 -33
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +10 -12
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +17 -22
- package/mobile/src/components/Calculator/constants.ts +11 -0
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +64 -0
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +3 -2
- package/mobile/src/components/Carousel/Carousel.example.json +2 -2
- package/mobile/src/components/Carousel/Carousel.tsx +29 -40
- package/mobile/src/components/Carousel/CarouselContainer.tsx +19 -12
- package/mobile/src/components/Carousel/CarouselContent.ts +5 -9
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +22 -34
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +24 -24
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +3 -3
- package/mobile/src/components/Catalog/Catalog.tsx +8 -13
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
- package/mobile/src/components/ComparisonTable/ComparisonTableBody.tsx +6 -7
- package/mobile/src/components/ComparisonTable/ComparisonTableColumnHeaders.tsx +3 -3
- package/mobile/src/components/ComparisonTable/ComparisonTableRows.tsx +10 -14
- package/mobile/src/components/ComparisonTable/TableCarouselContainer.tsx +3 -3
- package/mobile/src/components/ComparisonTable/TableRow.tsx +3 -3
- package/mobile/src/components/ComparisonTable/constants.ts +1 -1
- package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +6 -8
- package/mobile/src/components/ContentPage/ContentPage.tsx +21 -20
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +12 -14
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +5 -4
- package/mobile/src/components/Footer/Footer.tsx +3 -3
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +12 -14
- package/mobile/src/components/Gallery/GalleryContainer.tsx +14 -16
- package/mobile/src/components/Gallery/GalleryInner.tsx +9 -22
- package/mobile/src/components/Header/Header.tsx +3 -4
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +29 -42
- package/mobile/src/components/InvestmentGallery/InvestmentGallery.tsx +12 -34
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +3 -2
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +6 -5
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/mobile/src/components/Recommendation/Recommendation.tsx +12 -36
- package/mobile/src/components/RollupItem/RollupItem.tsx +9 -7
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalContent.ts +1 -5
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +3 -3
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +7 -4
- package/mobile/src/components/Video/Video.tsx +29 -0
- package/mobile/src/components/Video/Video.ui.json +12 -0
- package/mobile/src/components/Video/VideoContent.ts +9 -0
- package/mobile/src/components/Video/getPaddings.ts +6 -0
- package/mobile/src/hooks/useCarouselControls.ts +33 -19
- package/mobile/src/model/JSXBlock.ts +4 -5
- package/mobile/src/model/LinkProps.ts +1 -0
- package/mobile/src/model/Picture.ts +8 -2
- package/mobile/src/services/sitemap/SitemapProps.ts +1 -2
- package/{src/react → mobile/src}/setup-fixture.ts +4 -4
- package/mobile/src/ui-kit/Button/renderArrows.tsx +22 -17
- package/mobile/src/ui-kit/InnerTable/InnerTableBodyItem.tsx +9 -13
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +35 -28
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +32 -27
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlList.tsx +10 -8
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +5 -3
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +2 -1
- package/package.json +1 -1
- package/src/BlockRenderer/BlockRendererOptions.ts +12 -0
- package/src/BlockRenderer/defaultBlockDecorator.ts +4 -0
- package/src/{model → BlockRenderer}/getParentBlockContent.ts +3 -3
- package/src/BlockRenderer/getParentBlockDef.ts +6 -0
- package/src/BlockRenderer/renderBlock.tsx +47 -0
- package/src/BlockRenderer/renderBlockList.tsx +33 -0
- package/src/BlockRenderer/renderChildren.ts +25 -0
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +40 -55
- package/src/components/Accordion/Accordion.fixture.tsx +79 -52
- package/src/components/Accordion/Accordion.mobile.tsx +3 -2
- package/src/components/Accordion/Accordion.tsx +3 -2
- package/src/components/AccordionItem/AccordionItem.fixture.mobile.tsx +13 -2
- package/src/components/AccordionItem/AccordionItem.fixture.tsx +12 -1
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +5 -4
- package/src/components/AccordionItem/AccordionItem.tsx +3 -2
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +1 -1
- package/src/components/Blocks.ts +3 -1
- package/src/components/Bonus/Bonus.fixture.tsx +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +12 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +31 -18
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +6 -3
- package/src/components/BusinessBlock/BusinessBlock.fixture.tsx +1 -1
- package/src/components/Calculator/Calculator.fixture.tsx +1 -6
- package/src/components/Calculator/Calculator.tsx +32 -33
- package/src/components/Calculator/CalculatorValueBlock.tsx +10 -12
- package/src/components/Calculator/DepositCalculatorForm.tsx +17 -22
- package/src/components/Calculator/constants.ts +11 -0
- package/src/components/Calculator/useDepositCalculatorParams.ts +64 -0
- package/src/components/CardTransfer/CardTransfer.fixture.tsx +1 -1
- package/src/components/CardTransfer/CardTransfer.tsx +3 -2
- package/src/components/Carousel/Carousel.example.json +2 -2
- package/src/components/Carousel/Carousel.fixture.tsx +38 -45
- package/src/components/Carousel/Carousel.tsx +29 -40
- package/src/components/Carousel/CarouselContainer.tsx +19 -12
- package/src/components/Carousel/CarouselContent.ts +5 -9
- package/src/components/CarouselCard/CarouselCard.fixture.tsx +9 -4
- package/src/components/CarouselCard/CarouselCard.tsx +22 -34
- package/src/components/CarouselLinks/CarouselLinks.tsx +24 -24
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +3 -3
- package/src/components/Catalog/Catalog.fixture.tsx +1 -1
- package/src/components/Catalog/Catalog.tsx +8 -13
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +2 -2
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +2 -2
- package/src/components/ComparisonTable/ComparisonTableBody.tsx +6 -7
- package/src/components/ComparisonTable/ComparisonTableColumnHeaders.tsx +3 -3
- package/src/components/ComparisonTable/ComparisonTableRows.tsx +10 -14
- package/src/components/ComparisonTable/TableCarouselContainer.tsx +3 -3
- package/src/components/ComparisonTable/TableRow.tsx +3 -3
- package/src/components/ComparisonTable/constants.ts +1 -1
- package/src/components/ContactsBlock/ContactsBlock.fixture.tsx +1 -1
- package/src/components/ContactsBlock/ContactsBlock.tsx +6 -8
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
- package/src/components/ContentPage/ContentPage.fixture.tsx +1 -1
- package/src/components/ContentPage/ContentPage.tsx +21 -20
- package/src/components/ErrorBlock/ErrorBlock.fixture.tsx +1 -1
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +12 -14
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +5 -4
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/Footer/Footer.fixture.mobile.tsx +1 -1
- package/src/components/Footer/Footer.fixture.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +3 -3
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +1 -1
- package/src/components/Gallery/Gallery.fixture.tsx +1 -1
- package/src/components/Gallery/GalleryCardInner.tsx +12 -14
- package/src/components/Gallery/GalleryContainer.tsx +14 -16
- package/src/components/Gallery/GalleryInner.tsx +9 -22
- package/src/components/GracePeriod/GracePeriod.fixture.tsx +1 -1
- package/src/components/Header/Header.fixture.mobile.tsx +1 -1
- package/src/components/Header/Header.fixture.tsx +1 -1
- package/src/components/Header/Header.mobile.tsx +3 -4
- package/src/components/Header/Header.tsx +3 -2
- package/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/src/components/Headline/Headline.fixture.mobile.tsx +1 -1
- package/src/components/Headline/Headline.fixture.tsx +1 -1
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +1 -1
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +29 -42
- package/src/components/InvestmentGallery/InvestmentGallery.fixture.tsx +1 -1
- package/src/components/InvestmentGallery/InvestmentGallery.tsx +12 -34
- package/src/components/InvestmentInfo/InvestmentInfo.fixture.tsx +1 -1
- package/src/components/LikeControl/LikeControl.fixture.tsx +1 -1
- package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +1 -1
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +1 -1
- package/src/components/LinkList/LinkList.fixture.tsx +1 -1
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.fixture.mobile.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -1
- package/src/components/MobileAppTile/MobileAppTile.tsx +5 -5
- package/src/components/OfficeMap/OfficeMap.fixture.tsx +1 -1
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +1 -1
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +86 -76
- package/src/components/OtherProducts/OtherProducts.tsx +3 -2
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +16 -1
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +6 -5
- package/src/components/PictureText/PictureText.fixture.tsx +1 -1
- package/src/components/Placeholder/Placeholder.fixture.mobile.tsx +1 -1
- package/src/components/Placeholder/Placeholder.fixture.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +13 -1
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +26 -22
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +1 -1
- package/src/components/ProductTile/ProductTile.fixture.tsx +1 -1
- package/src/components/PromoTile/PromoTile.fixture.tsx +1 -1
- package/src/components/Recommendation/Recommendation.fixture.tsx +1 -1
- package/src/components/Recommendation/Recommendation.tsx +12 -36
- package/src/components/RollupItem/RollupItem.fixture.tsx +44 -11
- package/src/components/RollupItem/RollupItem.tsx +9 -7
- package/src/components/SafeDepositRental/SafeDepositRental.fixture.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRentalContent.ts +1 -5
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.tsx +1 -1
- package/src/components/Tabs/Tabs.fixture.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.tsx +21 -38
- package/src/components/TariffsTable/TariffsTableRow.tsx +3 -3
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +1 -1
- package/src/components/TextBlock/TextBlock.fixture.tsx +1 -1
- package/src/components/Tile/Tile.fixture.tsx +1 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +126 -47
- package/src/components/VerticalLayout/VerticalLayout.tsx +7 -4
- package/src/components/Video/Video.fixture.tsx +33 -0
- package/src/components/Video/Video.tsx +29 -0
- package/src/components/Video/Video.ui.json +12 -0
- package/src/components/Video/VideoContent.ts +9 -0
- package/src/components/Video/getPaddings.ts +6 -0
- package/src/hooks/useCarouselControls.ts +33 -19
- package/src/model/JSXBlock.ts +4 -5
- package/src/model/LinkProps.ts +1 -0
- package/src/model/Picture.ts +8 -2
- package/src/services/sitemap/SitemapProps.ts +1 -2
- package/{mobile/src/react → src}/setup-fixture.ts +4 -4
- package/src/ui-kit/Button/Button.fixture.tsx +1 -1
- package/src/ui-kit/Button/renderArrows.tsx +22 -17
- package/src/ui-kit/HeaderItem/HeaderItem.fixture.tsx +1 -1
- package/src/ui-kit/Icon/Icon.fixture.tsx +1 -1
- package/src/ui-kit/InnerTable/InnerTableBodyItem.tsx +9 -13
- package/src/ui-kit/List/List.fixture.tsx +1 -1
- package/src/ui-kit/Logo/Logo.fixture.tsx +1 -1
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +24 -8
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +35 -28
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +32 -27
- package/src/ui-kit/SwipeListControl/SwipeListControlList.tsx +10 -8
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +5 -3
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +2 -1
- package/src/ui-kit/TopItem/TopItem.fixture.tsx +1 -1
- package/bundle/components/Carousel/CarouselNavButtons.d.ts +0 -11
- package/bundle/components/ContentPage/renderBlock.d.ts +0 -15
- package/bundle/components/ContentPage/renderBlockList.d.ts +0 -14
- package/bundle/components/ContentPage/renderSlots.d.ts +0 -12
- package/bundle/model/getParentBlockContent.d.ts +0 -2
- package/bundle/model/getParentBlockDef.d.ts +0 -3
- package/bundle/utils/sliceArray.d.ts +0 -1
- package/dist/components/Carousel/CarouselNavButtons.d.ts +0 -11
- package/dist/components/Carousel/CarouselNavButtons.js +0 -36
- package/dist/components/Carousel/CarouselNavButtons.js.map +0 -1
- package/dist/components/ContentPage/renderBlock.d.ts +0 -15
- package/dist/components/ContentPage/renderBlock.js +0 -29
- package/dist/components/ContentPage/renderBlock.js.map +0 -1
- package/dist/components/ContentPage/renderBlockList.d.ts +0 -14
- package/dist/components/ContentPage/renderBlockList.js +0 -11
- package/dist/components/ContentPage/renderBlockList.js.map +0 -1
- package/dist/components/ContentPage/renderSlots.d.ts +0 -12
- package/dist/components/ContentPage/renderSlots.js +0 -15
- package/dist/components/ContentPage/renderSlots.js.map +0 -1
- package/dist/model/getParentBlockContent.d.ts +0 -2
- package/dist/model/getParentBlockContent.js.map +0 -1
- package/dist/model/getParentBlockDef.d.ts +0 -3
- package/dist/model/getParentBlockDef.js +0 -11
- package/dist/model/getParentBlockDef.js.map +0 -1
- package/dist/react/setup-fixture.js.map +0 -1
- package/dist/utils/sliceArray.d.ts +0 -1
- package/dist/utils/sliceArray.js +0 -15
- package/dist/utils/sliceArray.js.map +0 -1
- package/lib/components/Carousel/CarouselNavButtons.d.ts +0 -11
- package/lib/components/Carousel/CarouselNavButtons.js +0 -34
- package/lib/components/Carousel/CarouselNavButtons.js.map +0 -1
- package/lib/components/ContentPage/renderBlock.d.ts +0 -15
- package/lib/components/ContentPage/renderBlock.js +0 -26
- package/lib/components/ContentPage/renderBlock.js.map +0 -1
- package/lib/components/ContentPage/renderBlockList.d.ts +0 -14
- package/lib/components/ContentPage/renderBlockList.js +0 -8
- package/lib/components/ContentPage/renderBlockList.js.map +0 -1
- package/lib/components/ContentPage/renderSlots.d.ts +0 -12
- package/lib/components/ContentPage/renderSlots.js +0 -12
- package/lib/components/ContentPage/renderSlots.js.map +0 -1
- package/lib/model/getParentBlockContent.d.ts +0 -2
- package/lib/model/getParentBlockContent.js +0 -6
- package/lib/model/getParentBlockContent.js.map +0 -1
- package/lib/model/getParentBlockDef.d.ts +0 -3
- package/lib/model/getParentBlockDef.js +0 -8
- package/lib/model/getParentBlockDef.js.map +0 -1
- package/lib/react/setup-fixture.js.map +0 -1
- package/lib/utils/sliceArray.d.ts +0 -1
- package/lib/utils/sliceArray.js +0 -12
- package/lib/utils/sliceArray.js.map +0 -1
- package/mobile/bundle/components/Carousel/CarouselNavButtons.d.ts +0 -11
- package/mobile/bundle/components/ContentPage/renderBlock.d.ts +0 -15
- package/mobile/bundle/components/ContentPage/renderBlockList.d.ts +0 -14
- package/mobile/bundle/components/ContentPage/renderSlots.d.ts +0 -12
- package/mobile/bundle/model/getParentBlockContent.d.ts +0 -2
- package/mobile/bundle/model/getParentBlockDef.d.ts +0 -3
- package/mobile/bundle/utils/sliceArray.d.ts +0 -1
- package/mobile/dist/components/Carousel/CarouselNavButtons.d.ts +0 -11
- package/mobile/dist/components/Carousel/CarouselNavButtons.js +0 -36
- package/mobile/dist/components/Carousel/CarouselNavButtons.js.map +0 -1
- package/mobile/dist/components/ContentPage/renderBlock.d.ts +0 -15
- package/mobile/dist/components/ContentPage/renderBlock.js +0 -29
- package/mobile/dist/components/ContentPage/renderBlock.js.map +0 -1
- package/mobile/dist/components/ContentPage/renderBlockList.d.ts +0 -14
- package/mobile/dist/components/ContentPage/renderBlockList.js +0 -11
- package/mobile/dist/components/ContentPage/renderBlockList.js.map +0 -1
- package/mobile/dist/components/ContentPage/renderSlots.d.ts +0 -12
- package/mobile/dist/components/ContentPage/renderSlots.js +0 -15
- package/mobile/dist/components/ContentPage/renderSlots.js.map +0 -1
- package/mobile/dist/model/getParentBlockContent.d.ts +0 -2
- package/mobile/dist/model/getParentBlockContent.js.map +0 -1
- package/mobile/dist/model/getParentBlockDef.d.ts +0 -3
- package/mobile/dist/model/getParentBlockDef.js +0 -11
- package/mobile/dist/model/getParentBlockDef.js.map +0 -1
- package/mobile/dist/react/setup-fixture.js.map +0 -1
- package/mobile/dist/utils/sliceArray.d.ts +0 -1
- package/mobile/dist/utils/sliceArray.js +0 -15
- package/mobile/dist/utils/sliceArray.js.map +0 -1
- package/mobile/lib/components/Carousel/CarouselNavButtons.d.ts +0 -11
- package/mobile/lib/components/Carousel/CarouselNavButtons.js +0 -34
- package/mobile/lib/components/Carousel/CarouselNavButtons.js.map +0 -1
- package/mobile/lib/components/ContentPage/renderBlock.d.ts +0 -15
- package/mobile/lib/components/ContentPage/renderBlock.js +0 -26
- package/mobile/lib/components/ContentPage/renderBlock.js.map +0 -1
- package/mobile/lib/components/ContentPage/renderBlockList.d.ts +0 -14
- package/mobile/lib/components/ContentPage/renderBlockList.js +0 -8
- package/mobile/lib/components/ContentPage/renderBlockList.js.map +0 -1
- package/mobile/lib/components/ContentPage/renderSlots.d.ts +0 -12
- package/mobile/lib/components/ContentPage/renderSlots.js +0 -12
- package/mobile/lib/components/ContentPage/renderSlots.js.map +0 -1
- package/mobile/lib/model/getParentBlockContent.d.ts +0 -2
- package/mobile/lib/model/getParentBlockContent.js +0 -6
- package/mobile/lib/model/getParentBlockContent.js.map +0 -1
- package/mobile/lib/model/getParentBlockDef.d.ts +0 -3
- package/mobile/lib/model/getParentBlockDef.js +0 -8
- package/mobile/lib/model/getParentBlockDef.js.map +0 -1
- package/mobile/lib/react/setup-fixture.js.map +0 -1
- package/mobile/lib/utils/sliceArray.d.ts +0 -1
- package/mobile/lib/utils/sliceArray.js +0 -12
- package/mobile/lib/utils/sliceArray.js.map +0 -1
- package/mobile/src/components/Carousel/CarouselNavButtons.tsx +0 -51
- package/mobile/src/components/ContentPage/renderBlock.tsx +0 -61
- package/mobile/src/components/ContentPage/renderBlockList.tsx +0 -28
- package/mobile/src/components/ContentPage/renderSlots.tsx +0 -32
- package/mobile/src/model/getParentBlockDef.ts +0 -12
- package/mobile/src/utils/sliceArray.ts +0 -15
- package/src/components/Carousel/CarouselNavButtons.tsx +0 -51
- package/src/components/ContentPage/renderBlock.tsx +0 -61
- package/src/components/ContentPage/renderBlockList.tsx +0 -28
- package/src/components/ContentPage/renderSlots.tsx +0 -32
- package/src/model/.CarouselCardVersion.ts.icloud +0 -0
- package/src/model/getParentBlockDef.ts +0 -12
- package/src/utils/sliceArray.ts +0 -15
package/bundle/bundle.umd.js
CHANGED
|
@@ -231,6 +231,53 @@
|
|
|
231
231
|
return JSXTmpl;
|
|
232
232
|
};
|
|
233
233
|
|
|
234
|
+
const DEFAULT_SLOT_NAME = null;
|
|
235
|
+
|
|
236
|
+
function style2className(style) {
|
|
237
|
+
return style ? style.filter(Boolean).join(' ') : '';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
241
|
+
|
|
242
|
+
const DEFAULT_ANCESTORS = [];
|
|
243
|
+
const DEFAULT_STYLE = ['col-span-12'];
|
|
244
|
+
function renderBlock(block, options) {
|
|
245
|
+
const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, } = options;
|
|
246
|
+
const { type } = block;
|
|
247
|
+
if (!(type && type in blocksRegistry)) {
|
|
248
|
+
console.warn(`No block with "${type}" is registered`);
|
|
249
|
+
}
|
|
250
|
+
const BlockComponent = type && blocksRegistry[type];
|
|
251
|
+
return blockDecorator({
|
|
252
|
+
blockClassName: `scroll-mt-12 ${style2className(block.style || DEFAULT_STYLE)}`,
|
|
253
|
+
block,
|
|
254
|
+
ancestors,
|
|
255
|
+
// Adjusted by decorator block and blockClassName
|
|
256
|
+
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
257
|
+
const { content } = adjustedBlock;
|
|
258
|
+
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content }, key)) : null;
|
|
259
|
+
},
|
|
260
|
+
}, key);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const EMPTY_ANCESTORS = [];
|
|
264
|
+
const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderChild = renderBlock, ...options }) => (blocks || []).map((_, j) => renderChild(_, {
|
|
265
|
+
...options,
|
|
266
|
+
key: `${key ? key : _.type}-${j}`,
|
|
267
|
+
ancestors: options.parent
|
|
268
|
+
? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
|
|
269
|
+
: ancestors,
|
|
270
|
+
}));
|
|
271
|
+
|
|
272
|
+
function renderChildren({ children, block, options, renderChild, }) {
|
|
273
|
+
if (children) {
|
|
274
|
+
return children;
|
|
275
|
+
}
|
|
276
|
+
return block && options
|
|
277
|
+
? renderBlocksList(block.blocks, { ...options, parent: block, renderChild })
|
|
278
|
+
: null;
|
|
279
|
+
}
|
|
280
|
+
|
|
234
281
|
const AlignText = {
|
|
235
282
|
left: 'text-left',
|
|
236
283
|
center: 'text-center',
|
|
@@ -357,7 +404,7 @@
|
|
|
357
404
|
|
|
358
405
|
const AccordionItemsList = JSX(({ children }) => (jsx("ul", { className: "list-none m-0 p-0", children: children })));
|
|
359
406
|
|
|
360
|
-
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description,
|
|
407
|
+
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-[50px] 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) })] })));
|
|
361
408
|
Accordion.childrenTypes = ['AccordionItem'];
|
|
362
409
|
|
|
363
410
|
const Foldable = JSX(({ isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
@@ -458,51 +505,47 @@
|
|
|
458
505
|
});
|
|
459
506
|
|
|
460
507
|
const icons$1 = ['PlusIcon', 'MinusIcon'];
|
|
461
|
-
const AccordionItem = JSX(({ className = '', label = '', isExpanded,
|
|
508
|
+
const AccordionItem = JSX(({ className = '', label = '', isExpanded, ...rest }) => (jsx("li", { className: `border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "grid grid-cols-12 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton$1, { label: label, icon: icons$1[Number(isUnfolded)], onClick: onToggle })) }) })));
|
|
462
509
|
AccordionItem.childrenTypes = [];
|
|
463
510
|
const FoldButton$1 = JSX(({ label, icon, onClick }) => (jsxs("button", { className: "border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer", onClick: onClick, children: [jsx(Text, { size: "text-xl", font: "font-medium", children: label }), jsx(ImgInner, { image: icon, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })] })));
|
|
464
511
|
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
return (jsxs("div", { className: `relative group cursor-pointer w-[328px] h-[82px] ${className}`, children: [jsxs("a", { className: LINK_CLASS_NAME, role: "link", href: href, target: target, children: [jsx("div", { className: "p-0.5", children: text }), jsx("div", { className: "w-6 h-6", children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100", image: { icon: 'ArrowRightIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "24", height: "24", asSVG: true }) })] }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mx-1.5 mt-1.5` }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mt-3 mr-3` })] }));
|
|
512
|
+
const VersionStyleMap = {
|
|
513
|
+
primary: 'bg-white text-primary-text',
|
|
514
|
+
secondary: 'bg-primary-main text-white',
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
const getIconWithVersion = (icon, version = 'primary') => ({
|
|
518
|
+
...icon,
|
|
519
|
+
iconVersion: icon?.iconVersion ?? (version === 'secondary' ? 'white' : 'color'),
|
|
474
520
|
});
|
|
475
521
|
|
|
476
|
-
const
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
if (!resultArray[chunkIndex]) {
|
|
480
|
-
resultArray[chunkIndex] = [item];
|
|
481
|
-
}
|
|
482
|
-
resultArray[chunkIndex].push(item);
|
|
483
|
-
return resultArray;
|
|
484
|
-
}, []);
|
|
485
|
-
return result;
|
|
522
|
+
const benefitsTextStyleMap = {
|
|
523
|
+
primary: '',
|
|
524
|
+
secondary: 'text-white',
|
|
486
525
|
};
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
526
|
+
const benefitsDescriptionStyleMap = {
|
|
527
|
+
primary: 'text-secondary-text',
|
|
528
|
+
secondary: 'text-white opacity-80',
|
|
529
|
+
};
|
|
530
|
+
const benefitsIconStyleMap = {
|
|
531
|
+
primary: 'bg-main-divider text-primary-main',
|
|
532
|
+
secondary: 'bg-white/30 text-black',
|
|
533
|
+
};
|
|
534
|
+
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] })));
|
|
535
|
+
const renderStep = (version) => (benefit, i) => {
|
|
536
|
+
const description = benefit.description;
|
|
537
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] 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)));
|
|
538
|
+
};
|
|
539
|
+
const renderDescription$3 = (description, version) => {
|
|
540
|
+
const benefitType = description?.benefitType || null;
|
|
541
|
+
return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
|
|
542
|
+
? renderListBenefit(description)
|
|
543
|
+
: renderTextBenefit(description) })) : null;
|
|
544
|
+
};
|
|
545
|
+
const renderTextBenefit = (description) => description?.name || null;
|
|
546
|
+
const renderListBenefit = (description) => {
|
|
547
|
+
const listStyleType = description?.bullets ? 'list-disc pl-6' : '';
|
|
548
|
+
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
|
|
506
549
|
};
|
|
507
550
|
|
|
508
551
|
const isURL = (href) => href?.includes('//');
|
|
@@ -656,90 +699,6 @@
|
|
|
656
699
|
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, children }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, children: children })));
|
|
657
700
|
const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
|
|
658
701
|
|
|
659
|
-
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
660
|
-
? 'bg-secondary-light text-secondary-text'
|
|
661
|
-
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "16", height: "16", asSVG: true }) })));
|
|
662
|
-
|
|
663
|
-
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
664
|
-
return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
const CarouselContainer = JSX(({ children, activeItem, cardFullViewCount, cardWidth }) => {
|
|
668
|
-
const cardFullViewStyles = cardFullViewCount === 1
|
|
669
|
-
? `translateX(-${activeItem}00%)`
|
|
670
|
-
: `translateX(-${activeItem * Number(cardWidth)}px)`;
|
|
671
|
-
return (jsx("div", { className: "w-auto flex flex-1 duration-1000", style: { transform: `${cardFullViewStyles}` }, role: "list", children: children }));
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
const Carousel = JSX(({ cardFullViewCount = 1, children, cardWidth = '1007', className = '', isBlur = true, isCyclic = false, block, ...rest }) => {
|
|
675
|
-
const blurClasses = isBlur ? 'absolute top-0 bottom-0 w-[84px]' : '';
|
|
676
|
-
const { blocks: childBlocks } = block || {};
|
|
677
|
-
const childBlocksLength = childBlocks !== undefined ? childBlocks.length : 0;
|
|
678
|
-
const isScrollAvailable = childBlocksLength > cardFullViewCount;
|
|
679
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
680
|
-
itemsCount: childBlocksLength,
|
|
681
|
-
visibleItemCount: cardFullViewCount,
|
|
682
|
-
isCyclic,
|
|
683
|
-
});
|
|
684
|
-
const { inc, dec, canDec, canInc } = controls;
|
|
685
|
-
return (jsxs(BlockWrapper, { className: `box-border h-full relative font-sans flex flex-col justify-center overflow-hidden ${className}`, ...rest, children: [jsx(CarouselContainer, { activeItem: activeIndex, cardFullViewCount: cardFullViewCount, cardWidth: cardWidth, children: children }), isScrollAvailable ? (jsx("div", { children: renderArrows({
|
|
686
|
-
handler: [dec, inc],
|
|
687
|
-
isShown: [canDec, canInc],
|
|
688
|
-
btnClass: ['left-8', 'right-8'],
|
|
689
|
-
className: 'top-1/2 z-10',
|
|
690
|
-
}) })) : null, isScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: `${blurClasses} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurClasses} right-0 bg-opacity-to-white` })] })) : null] }));
|
|
691
|
-
});
|
|
692
|
-
Carousel.childrenTypes = ['CarouselCard', 'CarouselTariffsCard'];
|
|
693
|
-
|
|
694
|
-
const MAX_LINKS_COUNT = 12;
|
|
695
|
-
const CarouselLinks = JSX(({ additionalDescription, description, links, title, className = '', ...rest }) => {
|
|
696
|
-
return (jsxs(BlockWrapper, { className: `bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [title ? jsx(Heading, { title: title, as: "h1", headingType: "h0", className: "pb-0.5" }) : null, description ? (jsx("div", { className: "pt-5", children: jsx(Paragraph, { size: "text-xl", font: "font-light", children: description }) })) : null, additionalDescription ? (jsx("div", { className: "pt-6", children: jsx(Paragraph, { children: additionalDescription }) })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
697
|
-
});
|
|
698
|
-
const renderLinks = (links) => {
|
|
699
|
-
const slicedLinks = sliceArray(links, MAX_LINKS_COUNT);
|
|
700
|
-
const slides = slicedLinks.map((slide) => (jsx("div", { className: "w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start", children: slide.map((link, index) => (jsx(LinkButton, { className: "m-1", ...link }, String(index)))) })));
|
|
701
|
-
return (jsx(Carousel, { className: "min-w-[832px] w-[832px]", isBlur: false, cardFullViewCount: 1, cardWidth: '832', isCyclic: true, block: { type: 'Carousel', blocks: slides }, children: slides }));
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
const VersionStyleMap = {
|
|
705
|
-
primary: 'bg-white text-primary-text',
|
|
706
|
-
secondary: 'bg-primary-main text-white',
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
const getIconWithVersion = (icon, version = 'primary') => ({
|
|
710
|
-
...icon,
|
|
711
|
-
iconVersion: icon?.iconVersion ?? (version === 'secondary' ? 'white' : 'color'),
|
|
712
|
-
});
|
|
713
|
-
|
|
714
|
-
const benefitsTextStyleMap = {
|
|
715
|
-
primary: '',
|
|
716
|
-
secondary: 'text-white',
|
|
717
|
-
};
|
|
718
|
-
const benefitsDescriptionStyleMap = {
|
|
719
|
-
primary: 'text-secondary-text',
|
|
720
|
-
secondary: 'text-white opacity-80',
|
|
721
|
-
};
|
|
722
|
-
const benefitsIconStyleMap = {
|
|
723
|
-
primary: 'bg-main-divider text-primary-main',
|
|
724
|
-
secondary: 'bg-white/30 text-black',
|
|
725
|
-
};
|
|
726
|
-
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] })));
|
|
727
|
-
const renderStep = (version) => (benefit, i) => {
|
|
728
|
-
const description = benefit.description;
|
|
729
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] 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)));
|
|
730
|
-
};
|
|
731
|
-
const renderDescription$3 = (description, version) => {
|
|
732
|
-
const benefitType = description?.benefitType || null;
|
|
733
|
-
return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
|
|
734
|
-
? renderListBenefit(description)
|
|
735
|
-
: renderTextBenefit(description) })) : null;
|
|
736
|
-
};
|
|
737
|
-
const renderTextBenefit = (description) => description?.name || null;
|
|
738
|
-
const renderListBenefit = (description) => {
|
|
739
|
-
const listStyleType = description?.bullets ? 'list-disc pl-6' : '';
|
|
740
|
-
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
|
|
741
|
-
};
|
|
742
|
-
|
|
743
702
|
const ButtonSection = JSX(({ className = '', buttons }) => buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton({ button, index })) })) : null);
|
|
744
703
|
function renderButton({ button, buttonClassName, index }) {
|
|
745
704
|
const { icon, iconRight, version, ...rest } = button;
|
|
@@ -844,11 +803,22 @@
|
|
|
844
803
|
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] }));
|
|
845
804
|
const renderBonusImage = (_) => _.image ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] p-3 rounded-full`, image: _.image })) : null;
|
|
846
805
|
|
|
847
|
-
const BonusBenefitsBlock = JSX(({
|
|
848
|
-
const renderBonusBenefit = (
|
|
849
|
-
return (jsxs("div", { className: "flex flex-col items-center
|
|
806
|
+
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-[50px] 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] })));
|
|
807
|
+
const renderBonusBenefit = ({ icon, label, description }, i) => {
|
|
808
|
+
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)));
|
|
809
|
+
};
|
|
810
|
+
const getElementsColsValue = (colValue) => {
|
|
811
|
+
switch (colValue) {
|
|
812
|
+
case '3':
|
|
813
|
+
return 'grid-cols-3';
|
|
814
|
+
case '4':
|
|
815
|
+
return 'grid-cols-4';
|
|
816
|
+
case '5':
|
|
817
|
+
return 'grid-cols-5';
|
|
818
|
+
default:
|
|
819
|
+
return 'grid-cols-5';
|
|
820
|
+
}
|
|
850
821
|
};
|
|
851
|
-
const getElementsColsValue = (colValue) => colValue === '4' ? 'grid-cols-4' : 'grid-cols-5';
|
|
852
822
|
|
|
853
823
|
const BusinessCard = JSX((props) => {
|
|
854
824
|
const { title, image, cardItems, button } = props;
|
|
@@ -861,11 +831,49 @@
|
|
|
861
831
|
|
|
862
832
|
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-[50px] 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 })] })));
|
|
863
833
|
|
|
834
|
+
const useCarouselControls = (props) => {
|
|
835
|
+
const { itemCount, visibleItemCount, isCyclic } = props;
|
|
836
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
837
|
+
const inc = useCallback(() => setActiveIndex((_) => (isCyclic ? (_ + 1) % itemCount : Math.min(_ + 1, itemCount - 1))), [isCyclic, itemCount]);
|
|
838
|
+
const dec = useCallback(() => setActiveIndex((_) => (isCyclic ? (itemCount + _ - 1) % itemCount : Math.max(_ - 1, 0))), [isCyclic, itemCount]);
|
|
839
|
+
const canInc = isCyclic ||
|
|
840
|
+
(isScrollable(activeIndex, props) && activeIndex < itemCount - (visibleItemCount || 1));
|
|
841
|
+
const canDec = isCyclic || activeIndex > 0;
|
|
842
|
+
const isScrollAvailable = canDec || canInc;
|
|
843
|
+
return [
|
|
844
|
+
activeIndex,
|
|
845
|
+
{
|
|
846
|
+
inc,
|
|
847
|
+
dec,
|
|
848
|
+
canInc,
|
|
849
|
+
canDec,
|
|
850
|
+
isScrollAvailable,
|
|
851
|
+
},
|
|
852
|
+
];
|
|
853
|
+
};
|
|
854
|
+
function isScrollable(activeIndex, { itemCount, visibleItemCount, container }) {
|
|
855
|
+
if (visibleItemCount) {
|
|
856
|
+
return itemCount > visibleItemCount;
|
|
857
|
+
}
|
|
858
|
+
if (container) {
|
|
859
|
+
const scrollLeft = (container.scrollWidth * activeIndex) / itemCount;
|
|
860
|
+
return scrollLeft + container.clientWidth < container.scrollWidth;
|
|
861
|
+
}
|
|
862
|
+
return false;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
866
|
+
? 'bg-secondary-light text-secondary-text'
|
|
867
|
+
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "16", height: "16", asSVG: true }) })));
|
|
868
|
+
|
|
869
|
+
function renderArrows({ dec, inc, canDec, canInc, btnClass, className = '', }) {
|
|
870
|
+
const isVisible = canDec || canInc;
|
|
871
|
+
return isVisible ? (jsxs("div", { children: [canDec ? (jsx(ArrowButton, { className: `absolute z-50 ${btnClass[0]} ${className}`, onClick: dec, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !canDec })) : null, canInc ? (jsx(ArrowButton, { className: `absolute z-50 rotate-180 ${btnClass[1]} ${className}`, onClick: inc, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !canInc })) : null] })) : null;
|
|
872
|
+
}
|
|
873
|
+
|
|
864
874
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
865
875
|
|
|
866
|
-
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
867
|
-
return (jsxs("div", { className: `mb-7 ${className}`, children: [title ? jsx("div", { className: "text-l-light text-secondary-text", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
|
|
868
|
-
});
|
|
876
|
+
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: `mb-7 ${className}`, children: [title ? jsx("div", { className: "text-l-light text-secondary-text", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] })));
|
|
869
877
|
|
|
870
878
|
const DEFAULT_MIN_SUM = 60000;
|
|
871
879
|
const DEFAULT_MAX_SUM = 2000000;
|
|
@@ -901,8 +909,17 @@
|
|
|
901
909
|
travelBonusRate: 0.015,
|
|
902
910
|
restBonusRate: 0.01,
|
|
903
911
|
};
|
|
912
|
+
const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
|
|
913
|
+
minSum: 50000,
|
|
914
|
+
maxSum: 5000000,
|
|
915
|
+
minMonths: 2,
|
|
916
|
+
maxMonths: 120,
|
|
917
|
+
rate: 5.9,
|
|
918
|
+
isMonthlyInterestPayment: true,
|
|
919
|
+
};
|
|
904
920
|
const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
|
|
905
921
|
const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
|
|
922
|
+
const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
|
|
906
923
|
|
|
907
924
|
const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-l-light text-secondary-text", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${rateBlockClassName}`, children: String(rate).replace('.', ',') }), unit ? jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit }) : ''] })] })));
|
|
908
925
|
|
|
@@ -1174,6 +1191,29 @@
|
|
|
1174
1191
|
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), 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)] })] }));
|
|
1175
1192
|
});
|
|
1176
1193
|
|
|
1194
|
+
const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1195
|
+
const { isMonthlyInterestPayment, moneyValue } = userInputParams;
|
|
1196
|
+
const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
|
|
1197
|
+
const depositCalculatorSourceBookParams = data?.rows.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment) ||
|
|
1198
|
+
DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
1199
|
+
const { rate } = depositCalculatorSourceBookParams;
|
|
1200
|
+
const income = getDepositIncome(rate, userInputParams);
|
|
1201
|
+
const finalSum = moneyValue + income;
|
|
1202
|
+
return { ...depositCalculatorSourceBookParams, ...userInputParams, income, finalSum };
|
|
1203
|
+
};
|
|
1204
|
+
const getDepositIncome = (rate, userInputParams) => {
|
|
1205
|
+
const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
|
|
1206
|
+
if (isMonthlyInterestPayment) {
|
|
1207
|
+
return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, monthsValue) - moneyValue);
|
|
1208
|
+
}
|
|
1209
|
+
else {
|
|
1210
|
+
/*
|
|
1211
|
+
Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
|
|
1212
|
+
*/
|
|
1213
|
+
return Math.round((moneyValue * rate * 30 * monthsValue) / 365 / 100);
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1177
1217
|
const EVERY_MONTH = 'everyMonth';
|
|
1178
1218
|
const AT_END_TERM = 'atEndTerm';
|
|
1179
1219
|
const depositTypeItems = [
|
|
@@ -1186,21 +1226,22 @@
|
|
|
1186
1226
|
text: 'В конце срока',
|
|
1187
1227
|
},
|
|
1188
1228
|
];
|
|
1189
|
-
const DepositCalculatorForm = JSX(({ className = '',
|
|
1229
|
+
const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
1190
1230
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
1191
1231
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1192
|
-
const [
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1232
|
+
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
1233
|
+
const userInputParams = {
|
|
1234
|
+
moneyValue,
|
|
1235
|
+
monthsValue,
|
|
1236
|
+
isMonthlyInterestPayment,
|
|
1237
|
+
};
|
|
1238
|
+
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
1239
|
+
const { income, finalSum, rate } = calculatorParams;
|
|
1195
1240
|
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
1196
|
-
|
|
1197
|
-
minSum: DEFAULT_MIN_SUM,
|
|
1198
|
-
maxSum: DEFAULT_MAX_SUM,
|
|
1241
|
+
...calculatorParams,
|
|
1199
1242
|
}, setMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
monthsValue,
|
|
1203
|
-
}, setMonthsValue)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [(jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) , (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finallySum, postfix: "\u20BD" })) , jsx(RadioButtonGroup, { items: depositTypeItems, checkedItem: isEveryMonth ? EVERY_MONTH : AT_END_TERM, onChange: (text) => toggleIsEveryMonth(text === EVERY_MONTH) }), renderButtonSection(buttons), renderFootnote(footnote)] })] }));
|
|
1243
|
+
...calculatorParams,
|
|
1244
|
+
}, setMonthsValue)] }), 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)] })] }));
|
|
1204
1245
|
});
|
|
1205
1246
|
|
|
1206
1247
|
const EmbeddableCalcBlocks = {
|
|
@@ -1221,46 +1262,45 @@
|
|
|
1221
1262
|
const Calculator = JSX(({ className = '', calculatorTabs = [], ...rest }) => {
|
|
1222
1263
|
const tabsNav = calculatorTabs.map((_) => _.nav || {});
|
|
1223
1264
|
const calculatorBlocks = calculatorTabs.map(({ calculatorBlock }) => calculatorBlock || {});
|
|
1224
|
-
const [
|
|
1225
|
-
const
|
|
1226
|
-
const
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1265
|
+
const [slideIndexShift, setSlideIndexShift] = useState(0);
|
|
1266
|
+
const handleSlideIndexShift = useCallback((_) => setSlideIndexShift(_), []);
|
|
1267
|
+
const COLUMNS_FOR_SCROLL = 3;
|
|
1268
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
1269
|
+
itemCount: calculatorTabs?.length,
|
|
1270
|
+
visibleItemCount: COLUMNS_FOR_SCROLL,
|
|
1271
|
+
});
|
|
1231
1272
|
return (jsxs(BlockWrapper, { className: `box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${className}`, ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
|
|
1232
|
-
? renderTabs({
|
|
1273
|
+
? renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
|
|
1233
1274
|
: null, renderArrows({
|
|
1234
|
-
|
|
1235
|
-
isShown: [showPrevButton, showNextButton],
|
|
1275
|
+
...controls,
|
|
1236
1276
|
btnClass: ['left-3', 'right-3'],
|
|
1237
1277
|
className: 'top-8',
|
|
1238
|
-
})] }), jsx("div", { className: "flex", style: { transform: `translateX(-${
|
|
1278
|
+
})] }), jsx("div", { className: "flex", style: { transform: `translateX(-${slideIndexShift}00%)` }, role: "list", children: calculatorBlocks?.length ? calculatorBlocks.map(renderCalculatorBlock) : null })] }));
|
|
1239
1279
|
});
|
|
1240
|
-
function renderNavButton$2({ tab, i,
|
|
1241
|
-
const
|
|
1242
|
-
const btnClassName = isActiveBtn
|
|
1280
|
+
function renderNavButton$2({ tab, i, isActive, onClick }) {
|
|
1281
|
+
const btnClassName = isActive
|
|
1243
1282
|
? 'h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white'
|
|
1244
1283
|
: `h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text`;
|
|
1245
|
-
const btnTitleClassName =
|
|
1246
|
-
const btnDescClassName =
|
|
1284
|
+
const btnTitleClassName = isActive ? 'text-xl mb-1.5' : `text-l mb-[3px]`;
|
|
1285
|
+
const btnDescClassName = isActive
|
|
1247
1286
|
? 'text-l-light text-white'
|
|
1248
1287
|
: `text-m-light text-secondary-text`;
|
|
1249
|
-
const iconClassName =
|
|
1288
|
+
const iconClassName = isActive ? '' : `text-primary-main`;
|
|
1250
1289
|
const iconVersion = tab?.icon?.iconVersion;
|
|
1251
|
-
const activeIconStyle =
|
|
1290
|
+
const activeIconStyle = isActive ? 'white' : 'normal';
|
|
1252
1291
|
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]
|
|
1253
1292
|
${btnClassName}`, children: [jsx(ImgInner, { className: `h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`, image: {
|
|
1254
1293
|
...tab?.icon,
|
|
1255
1294
|
iconVersion: iconVersion ?? activeIconStyle,
|
|
1256
1295
|
}, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `${btnDescClassName}`, children: tab.description })] })] }, String(i)));
|
|
1257
1296
|
}
|
|
1258
|
-
function renderTabs({
|
|
1259
|
-
|
|
1297
|
+
function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
|
|
1298
|
+
const CARD_SHIFT = 388;
|
|
1299
|
+
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$2({
|
|
1260
1300
|
tab,
|
|
1261
1301
|
i,
|
|
1262
|
-
|
|
1263
|
-
onClick: () =>
|
|
1302
|
+
isActive: Boolean(i === slideIndexShift),
|
|
1303
|
+
onClick: () => onClick(i),
|
|
1264
1304
|
})) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
1265
1305
|
}
|
|
1266
1306
|
|
|
@@ -1327,28 +1367,74 @@
|
|
|
1327
1367
|
const DEFAULT_PLACEHOLDER = '1500';
|
|
1328
1368
|
const CardTransfer = JSX(({ className = '', title = DEFAULT_TITLE, label = DEFAULT_LABEL, placeholder = DEFAULT_PLACEHOLDER, button, ...rest }) => {
|
|
1329
1369
|
const [value, setValue] = useState('');
|
|
1370
|
+
const handleChange = useCallback((_) => setValue(_), []);
|
|
1330
1371
|
const isDisabled = !Number(getSanitizedValue(value));
|
|
1331
1372
|
const buttonStyle = isDisabled
|
|
1332
1373
|
? getDisabledButtonClasses({ version: button?.version })
|
|
1333
1374
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
1334
1375
|
const link = useLink();
|
|
1335
|
-
return (jsxs(BlockWrapper, { className: `p-[50px] 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:
|
|
1376
|
+
return (jsxs(BlockWrapper, { className: `p-[50px] 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] })] }));
|
|
1336
1377
|
});
|
|
1337
1378
|
|
|
1338
|
-
const
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1379
|
+
const childStyleMap = ['[&>*]:min-w-[100%]', '[&>*]:min-w-[50%]', '[&>*]:min-w-[33.33%]'];
|
|
1380
|
+
const CarouselContainer = JSX(({ activeIndex, itemCount, visibleItemCount, containerRef, children }) => {
|
|
1381
|
+
const scrollWidth = containerRef?.current?.scrollWidth || 0;
|
|
1382
|
+
const maxScrollLeft = scrollWidth - (containerRef?.current?.clientWidth || 0);
|
|
1383
|
+
const translateX = visibleItemCount
|
|
1384
|
+
? `${-Math.round((100 * activeIndex) / visibleItemCount)}%`
|
|
1385
|
+
: `${-Math.round(Math.min((scrollWidth * activeIndex) / (itemCount || 1), maxScrollLeft))}px`;
|
|
1386
|
+
return (jsx("div", { className: `flex gap-1 duration-1000 ${visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''}`, style: { transform: `translateX(${translateX})` }, role: "list", ref: containerRef, children: children }));
|
|
1387
|
+
});
|
|
1388
|
+
|
|
1389
|
+
const blurBaseStyle = 'absolute top-0 bottom-0 z-50 w-[84px]';
|
|
1390
|
+
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, ...rest }) => {
|
|
1391
|
+
const { blocks: childBlocks } = rest.block || {};
|
|
1392
|
+
const count = itemCount || childBlocks?.length || 0;
|
|
1393
|
+
const containerRef = useRef(null);
|
|
1394
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
1395
|
+
itemCount: count,
|
|
1396
|
+
visibleItemCount,
|
|
1397
|
+
isCyclic,
|
|
1398
|
+
container: containerRef.current,
|
|
1399
|
+
});
|
|
1400
|
+
const { isScrollAvailable } = controls;
|
|
1401
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans overflow-hidden ${className}`, ...rest, children: [jsx(CarouselContainer, { activeIndex: activeIndex, itemCount: count, visibleItemCount: visibleItemCount, containerRef: containerRef, children: renderChildren(rest) }), isScrollAvailable && isBlur ? (jsxs("div", { children: [jsx("div", { className: `${blurBaseStyle} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurBaseStyle} right-0 bg-opacity-to-white` })] })) : null, renderArrows({
|
|
1402
|
+
...controls,
|
|
1403
|
+
btnClass: ['left-8', 'right-8'],
|
|
1404
|
+
className: 'top-1/2',
|
|
1405
|
+
})] }));
|
|
1406
|
+
});
|
|
1407
|
+
Carousel.childrenTypes = ['CarouselCard', 'CarouselTariffsCard'];
|
|
1408
|
+
|
|
1409
|
+
const BLOCK_CLASSES = 'absolute border border-solid border-main-stroke w-full h-full';
|
|
1343
1410
|
const CARD_WIDTH_MAP = {
|
|
1344
|
-
normal:
|
|
1345
|
-
mini:
|
|
1411
|
+
normal: `w-[${1007 + 48}px]`,
|
|
1412
|
+
mini: `w-[${350 + 48}px]`,
|
|
1346
1413
|
};
|
|
1347
|
-
const CarouselCard = JSX(({
|
|
1348
|
-
|
|
1349
|
-
|
|
1414
|
+
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] })] }) })));
|
|
1415
|
+
|
|
1416
|
+
const LINK_CLASS_NAME = `absolute border border-primary-main ml-3 px-6 py-5
|
|
1417
|
+
text-l-light bg-white text-primary-text flex w-[316px]
|
|
1418
|
+
justify-between items-center group-hover:text-primary-main z-10`;
|
|
1419
|
+
const LINK_BORDER_CLASS_NAME = 'bg-transparent border-white border h-[70px] absolute w-[316px] top-0';
|
|
1420
|
+
const LinkButton = JSX(({ text, href = '', target = '', className = '' }) => {
|
|
1421
|
+
if (!text) {
|
|
1422
|
+
return null;
|
|
1423
|
+
}
|
|
1424
|
+
return (jsxs("div", { className: `relative group cursor-pointer w-[328px] h-[82px] ${className}`, children: [jsxs("a", { className: LINK_CLASS_NAME, role: "link", href: href, target: target, children: [jsx("div", { className: "p-0.5", children: text }), jsx("div", { className: "w-6 h-6", children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100", image: { icon: 'ArrowRightIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "24", height: "24", asSVG: true }) })] }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mx-1.5 mt-1.5` }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mt-3 mr-3` })] }));
|
|
1350
1425
|
});
|
|
1351
1426
|
|
|
1427
|
+
const MAX_LINKS_COUNT = 12;
|
|
1428
|
+
const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, ...rest }) => {
|
|
1429
|
+
return (jsxs(BlockWrapper, { className: `bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { title: title, as: "h1", description: description, align: "left", className: "p-0", bgColorHeadline: "secondary" }), additionalDescription ? (jsx("div", { className: "pt-6", children: jsx(Paragraph, { children: additionalDescription }) })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
1430
|
+
});
|
|
1431
|
+
const renderLinks = (links) => {
|
|
1432
|
+
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
1433
|
+
return (jsx(Carousel, { className: "min-w-[832px] w-[832px]", isBlur: false, isCyclic: true, itemCount: itemCount, children: new Array(itemCount).fill(null).map((_, groupIndex) => (jsx("div", { className: "w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start", children: links
|
|
1434
|
+
.slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
|
|
1435
|
+
.map((link, index) => (jsx(LinkButton, { className: "m-1", ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
1436
|
+
};
|
|
1437
|
+
|
|
1352
1438
|
const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, rows = [], ...rest }) => {
|
|
1353
1439
|
const hitStyle = getHitStyle(Boolean(isHighlighting));
|
|
1354
1440
|
const rowsNode = rows.map(renderCardInfo);
|
|
@@ -1357,11 +1443,11 @@
|
|
|
1357
1443
|
rowsNode.slice(0, VISIBLE_ROWS_COUNT),
|
|
1358
1444
|
rowsNode.slice(VISIBLE_ROWS_COUNT),
|
|
1359
1445
|
];
|
|
1360
|
-
return (jsxs(BlockWrapper, { className: `font-sans bg-white p-
|
|
1446
|
+
return (jsxs(BlockWrapper, { className: `font-sans bg-white p-8 border border-main-stroke relative w-[322px] min-w-[322px] -ml-[1px] ${hitStyle} ${className}`, ...rest, children: [isHighlighting ? renderHitIcon() : null, icon?.src ? jsx(ImgInner, { className: "flex justify-center", 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] }));
|
|
1361
1447
|
});
|
|
1362
1448
|
const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-9 pt-[71px]' : 'mt-[70px] pt-9';
|
|
1363
1449
|
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 })] }));
|
|
1364
|
-
const renderCardInfo = (cell) => (jsxs("div", { className: "py-5 border-b border-main-divider flex flex-col gap-1", children: [cell?.title ? (jsx("div", { className: "text-secondary-text text-m-light opacity-80", children: cell.title })) : null, cell?.description ? jsx("div", { className: "text-primary-text text-h6", children: cell.description }) : null] }));
|
|
1450
|
+
const renderCardInfo = (cell, i) => (jsxs("div", { className: "py-5 border-b border-main-divider flex flex-col gap-1", children: [cell?.title ? (jsx("div", { className: "text-secondary-text text-m-light opacity-80", children: cell.title })) : null, cell?.description ? jsx("div", { className: "text-primary-text text-h6", children: cell.description }) : null] }, String(i)));
|
|
1365
1451
|
const renderHitIcon = () => {
|
|
1366
1452
|
const POSITION_STYLE = 'absolute -top-7 -right-4';
|
|
1367
1453
|
return (jsxs("div", { className: `h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)] ${POSITION_STYLE}`, children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "23", height: "22", asSVG: true }), jsx("div", { className: "text-center", children: "\u0425\u0438\u0442" })] }));
|
|
@@ -1375,18 +1461,15 @@
|
|
|
1375
1461
|
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)));
|
|
1376
1462
|
|
|
1377
1463
|
const BLUR_BLOCK_CLASSES$2 = 'absolute top-0 bottom-0 w-[84px]';
|
|
1378
|
-
const
|
|
1464
|
+
const CARD_VIEW_COUNT$1 = 3;
|
|
1379
1465
|
const CARD_SHIFT$1 = 430;
|
|
1380
1466
|
const Catalog = JSX(({ cards = [], className = '', title, description, ...rest }) => {
|
|
1381
|
-
const [
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
return (jsxs(BlockWrapper, { className: `bg-white relative font-sans p-[50px] 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(-${activeCardIndex * CARD_SHIFT$1}px)` }, role: "list", children: cards?.length ? cards.map((card, i) => jsx(CatalogCard, { ...card }, String(i))) : null }), renderArrows({
|
|
1388
|
-
handler: [handlePrevClick, handleNextClick],
|
|
1389
|
-
isShown: [showPrevButton, showNextButton],
|
|
1467
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
1468
|
+
itemCount: cards?.length,
|
|
1469
|
+
visibleItemCount: CARD_VIEW_COUNT$1,
|
|
1470
|
+
});
|
|
1471
|
+
return (jsxs(BlockWrapper, { className: `bg-white relative font-sans p-[50px] 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({
|
|
1472
|
+
...controls,
|
|
1390
1473
|
btnClass: ['left-8', 'right-8'],
|
|
1391
1474
|
className: 'top-1/2 z-10 mt-6',
|
|
1392
1475
|
}), jsx("div", { className: `${BLUR_BLOCK_CLASSES$2} left-0 bg-opacity-from-white` }), jsx("div", { className: `${BLUR_BLOCK_CLASSES$2} right-0 bg-opacity-to-white` })] }));
|
|
@@ -1396,7 +1479,7 @@
|
|
|
1396
1479
|
const BORDER_CLASSES$1 = 'border-main-stroke border-solid border';
|
|
1397
1480
|
const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
|
|
1398
1481
|
const FIRST_CELL_CLASSES$1 = 'w-[200px] mr-6';
|
|
1399
|
-
const COLS_LENGTH_FOR_SCROLL$1 =
|
|
1482
|
+
const COLS_LENGTH_FOR_SCROLL$1 = 3;
|
|
1400
1483
|
const COLUMN_WIDTH$2 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
|
|
1401
1484
|
|
|
1402
1485
|
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", children: [icon && !image?.src && (jsx(ImgInner, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: getIconWithVersion(icon), width: "63", height: "63", asSVG: true })), image?.src && jsx(ImgInner, { className: "mb-[18px]", image: image }), title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "text-center text-white", title: title })) : null, link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "text-xs-light font-medium py-[11px]", children: link.text }) }) }))] })));
|
|
@@ -1405,11 +1488,11 @@
|
|
|
1405
1488
|
comparison: 'flex gap-4 duration-1000',
|
|
1406
1489
|
tariff: 'flex flex-grow duration-1000',
|
|
1407
1490
|
};
|
|
1408
|
-
const TableCarouselContainer = JSX(({ children,
|
|
1491
|
+
const TableCarouselContainer = JSX(({ children, activeIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeIndex * columnWidth}px)` }, children: children }) })));
|
|
1409
1492
|
|
|
1410
1493
|
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
1411
1494
|
|
|
1412
|
-
const ComparisonTableColumnHeaders = JSX(({ colHeaders,
|
|
1495
|
+
const ComparisonTableColumnHeaders = JSX(({ colHeaders, activeIndex }) => (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader" }), jsx(TableCarouselContainer, { activeIndex: activeIndex, columnWidth: COLUMN_WIDTH$2, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header }, String(i)))) })] })));
|
|
1413
1496
|
|
|
1414
1497
|
const TableCell = JSX(({ cell, isFirstRow, isLastRow, isFillGradient }) => {
|
|
1415
1498
|
const cellWrapperClasses = `w-80 box-border flex flex-col ${BORDER_CLASSES$1} ${!isLastRow ? 'border-y-0' : 'border-t-0 rounded-b-md'} ${isFillGradient ? GRADIENT : ''}`;
|
|
@@ -1421,20 +1504,21 @@
|
|
|
1421
1504
|
const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? jsx("h4", { className: labelStyle(isFillGradient), children: label }) : null, description ? jsx("div", { className: descriptionStyle(isFillGradient), children: description }) : null] }, String(i)));
|
|
1422
1505
|
|
|
1423
1506
|
const titleStyle = (isLastRow = false) => `text-s py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${isLastRow ? 'border-b-0' : 'border-solid'}`;
|
|
1424
|
-
const TableRow = JSX(({ row: { header, data },
|
|
1425
|
-
|
|
1426
|
-
const ComparisonTableRows = JSX(({ rowData, isColoredFirstColumn,
|
|
1427
|
-
const {
|
|
1428
|
-
return (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TableRow, { row: row, isFirstRow: i === 0, isLastRow: i + 1 === length,
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
btnClass: ['top-[108px]', 'top-
|
|
1507
|
+
const TableRow = JSX(({ row: { header, data }, activeIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? jsx("div", { className: titleStyle(isLastRow), children: header.title }) : null, data?.length ? (jsx(TableCarouselContainer, { activeIndex: activeIndex, columnWidth: COLUMN_WIDTH$2, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
|
|
1508
|
+
|
|
1509
|
+
const ComparisonTableRows = JSX(({ rowData, isColoredFirstColumn, activeIndex, controls }) => {
|
|
1510
|
+
const { isScrollAvailable } = controls;
|
|
1511
|
+
return (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TableRow, { row: row, isFirstRow: i === 0, isLastRow: i + 1 === length, activeIndex: activeIndex, isColoredFirstColumn: isColoredFirstColumn }, String(i)))), isScrollAvailable
|
|
1512
|
+
? renderArrows({
|
|
1513
|
+
...controls,
|
|
1514
|
+
btnClass: ['top-[108px]', 'top-[44px]'],
|
|
1432
1515
|
className: 'right-7',
|
|
1433
1516
|
isDisabled: true,
|
|
1434
|
-
})
|
|
1517
|
+
})
|
|
1518
|
+
: null] }));
|
|
1435
1519
|
});
|
|
1436
1520
|
|
|
1437
|
-
const ComparisonTableBody = JSX(({ columns, rowHeaders, isShowAllRow, visibleRowLength, isColoredFirstColumn }) => {
|
|
1521
|
+
const ComparisonTableBody = JSX(({ columns = [], rowHeaders, isShowAllRow, visibleRowLength, isColoredFirstColumn }) => {
|
|
1438
1522
|
const colHeaders = columns?.map(({ header }) => header || {});
|
|
1439
1523
|
const colData = columns?.map(({ data }) => data) || [];
|
|
1440
1524
|
const rowData = rowHeaders
|
|
@@ -1443,12 +1527,12 @@
|
|
|
1443
1527
|
data: colData.map((col) => col?.[i] || [{}]),
|
|
1444
1528
|
}))
|
|
1445
1529
|
.slice(0, isShowAllRow ? rowHeaders.length : visibleRowLength);
|
|
1446
|
-
const isScrollAvailable = colData.length > COLS_LENGTH_FOR_SCROLL$1;
|
|
1447
1530
|
const [activeIndex, controls] = useCarouselControls({
|
|
1448
|
-
|
|
1531
|
+
itemCount: columns.length,
|
|
1449
1532
|
visibleItemCount: COLS_LENGTH_FOR_SCROLL$1,
|
|
1450
1533
|
});
|
|
1451
|
-
|
|
1534
|
+
const { isScrollAvailable } = controls;
|
|
1535
|
+
return (jsxs("div", { children: [jsxs("div", { role: "table", children: [colHeaders?.length ? (jsx(ComparisonTableColumnHeaders, { colHeaders: colHeaders, activeIndex: activeIndex })) : null, rowData?.length ? (jsx(ComparisonTableRows, { rowData: rowData, isColoredFirstColumn: isColoredFirstColumn, activeIndex: activeIndex, controls: controls })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
1452
1536
|
});
|
|
1453
1537
|
|
|
1454
1538
|
const ComparisonTable = JSX(({ className = '', title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, ...rest }) => {
|
|
@@ -1460,9 +1544,7 @@
|
|
|
1460
1544
|
});
|
|
1461
1545
|
const renderShowMoreToggleButton = ({ isShowAllRow, onClick, }) => (jsx("div", { className: "pr-[50px]", 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 ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
|
|
1462
1546
|
|
|
1463
|
-
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => {
|
|
1464
|
-
return (jsxs(BlockWrapper, { className: `${VersionStyleMap[version]} flex p-[50px] ${className}`, ...rest, children: [info?.length ? renderBlocks(info, version) : null, contacts?.length ? renderBlocks(contacts, version) : null] }));
|
|
1465
|
-
});
|
|
1547
|
+
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => (jsxs(BlockWrapper, { className: `${VersionStyleMap[version]} flex p-[50px] ${className}`, ...rest, children: [info?.length ? renderBlocks(info, version) : null, contacts?.length ? renderBlocks(contacts, version) : null] })));
|
|
1466
1548
|
const renderBlocks = (info, version) => (jsx("div", { className: "flex grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index, version })) }));
|
|
1467
1549
|
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;
|
|
1468
1550
|
|
|
@@ -1497,9 +1579,7 @@
|
|
|
1497
1579
|
USD: 'DollarIcon',
|
|
1498
1580
|
EUR: 'EuroIcon',
|
|
1499
1581
|
};
|
|
1500
|
-
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => {
|
|
1501
|
-
return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
|
|
1502
|
-
});
|
|
1582
|
+
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
|
|
1503
1583
|
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1504
1584
|
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
1505
1585
|
return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [currency ? (jsx(ImgInner, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx("span", { className: "ml-2", children: currency })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) })] }, currency));
|
|
@@ -1596,9 +1676,7 @@
|
|
|
1596
1676
|
selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
|
|
1597
1677
|
selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
|
|
1598
1678
|
});
|
|
1599
|
-
const handleSetCalcState = (newState) => {
|
|
1600
|
-
setCalcState((oldState) => ({ ...oldState, ...newState }));
|
|
1601
|
-
};
|
|
1679
|
+
const handleSetCalcState = useCallback((newState) => setCalcState((oldState) => ({ ...oldState, ...newState })), []);
|
|
1602
1680
|
return (jsxs("div", { className: `grid gap-[18px] pt-2 ${className}`, children: [renderInput({
|
|
1603
1681
|
placeholder: 'Хочу продать',
|
|
1604
1682
|
rates: currencyRatesSell,
|
|
@@ -1857,7 +1935,7 @@
|
|
|
1857
1935
|
|
|
1858
1936
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
1859
1937
|
const Footer = JSX(({ className, ...rest }) => {
|
|
1860
|
-
const fallback = rest.page?.fallback;
|
|
1938
|
+
const fallback = rest.options?.page?.fallback;
|
|
1861
1939
|
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
1862
1940
|
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 })] }));
|
|
1863
1941
|
});
|
|
@@ -1912,37 +1990,30 @@
|
|
|
1912
1990
|
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)))) }));
|
|
1913
1991
|
});
|
|
1914
1992
|
|
|
1915
|
-
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isDotted = true, align = 'center', }) => {
|
|
1916
|
-
return (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$1(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text ? renderButton({ button, buttonClassName: 'mt-6' }) : null] }));
|
|
1917
|
-
});
|
|
1993
|
+
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 ? renderButton({ button, buttonClassName: 'mt-6' }) : null] })));
|
|
1918
1994
|
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-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: getIconWithVersion(image, version), asSVG: true })) : null] }));
|
|
1919
1995
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
1920
1996
|
const renderDescription$2 = (description, title) => description ? jsx("div", { className: `text-l ${title ? 'mt-2' : ''}`, children: description }) : null;
|
|
1921
1997
|
const renderAdditionalDescription$1 = (additionalDescription) => additionalDescription ? (jsx("div", { className: "text-m-light text-secondary-text mt-auto", children: additionalDescription })) : null;
|
|
1922
1998
|
const renderItems$1 = (items, isDotted, version = 'primary') => (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
|
|
1923
1999
|
|
|
1924
|
-
const GalleryContainer = JSX(({ headlineVersion = 'M', cards = [], version = 'normal',
|
|
1925
|
-
return (jsxs("div", { children: [jsx(Headline, { ...rest, className: "!p-0", headlineVersion: headlineVersion, align: "center" }), jsx("div", { className: `flex mt-8 ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard({ card, version }, i)) })] }));
|
|
1926
|
-
});
|
|
2000
|
+
const GalleryContainer = JSX(({ headlineVersion = 'M', cards = [], version = 'normal', activeIndex, ...rest }) => (jsxs("div", { children: [jsx(Headline, { ...rest, className: "!p-0", headlineVersion: headlineVersion, align: "center" }), jsx("div", { className: `flex mt-8 ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard({ card, version }, i)) })] })));
|
|
1927
2001
|
function renderCard({ card, version }, i) {
|
|
1928
2002
|
return (jsx("section", { className: `box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between
|
|
1929
2003
|
items-stretch ${cardStyleMap[version]} ${VersionStyleMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
|
|
1930
2004
|
}
|
|
1931
2005
|
|
|
1932
2006
|
const GalleryInner = JSX(({ cards = [], className = '', version = 'normal', button, ...rest }) => {
|
|
1933
|
-
const [
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${className}`, ...rest, children: [jsx(GalleryContainer, { cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), renderArrows({
|
|
1941
|
-
handler: [handlePrevClick, handleNextClick],
|
|
1942
|
-
isShown: [showPrevButton, showNextButton],
|
|
2007
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
2008
|
+
itemCount: cards?.length,
|
|
2009
|
+
visibleItemCount: galleryLengthForScrollMap[version],
|
|
2010
|
+
});
|
|
2011
|
+
const { isScrollAvailable } = controls;
|
|
2012
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${className}`, ...rest, children: [jsx(GalleryContainer, { cards: cards, version: version, activeIndex: activeIndex, ...rest }), renderArrows({
|
|
2013
|
+
...controls,
|
|
1943
2014
|
btnClass: ['left-8', 'right-8'],
|
|
1944
2015
|
className: 'top-1/2',
|
|
1945
|
-
}),
|
|
2016
|
+
}), isScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] })) : null, button ? renderButton({ button, buttonClassName: 'mt-8 mx-auto' }) : null] }));
|
|
1946
2017
|
});
|
|
1947
2018
|
|
|
1948
2019
|
const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
|
|
@@ -2027,9 +2098,9 @@
|
|
|
2027
2098
|
'bg-white': 'black',
|
|
2028
2099
|
transparent: 'white',
|
|
2029
2100
|
};
|
|
2030
|
-
const HeaderSecondaryMenu = JSX(({ className, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
2101
|
+
const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
2031
2102
|
const [city, getCity] = useGeolocation(defaultLocation);
|
|
2032
|
-
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 }), jsx(TopItem, { className: "mr-7", flat: true, href:
|
|
2103
|
+
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-[32px] min-h-[32px]`, 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 }) })] }));
|
|
2033
2104
|
});
|
|
2034
2105
|
|
|
2035
2106
|
const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
@@ -2112,10 +2183,10 @@
|
|
|
2112
2183
|
};
|
|
2113
2184
|
const Header = JSX(({ bgColor = 'bg-white', className = '', showSubMenu = true, ...rest }) => {
|
|
2114
2185
|
const router = useRouter();
|
|
2115
|
-
const { topItems, logo, defaultLocation } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.page?.fallback);
|
|
2186
|
+
const { topItems, logo, defaultLocation, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
2116
2187
|
const activeTopItem = showSubMenu ? getActiveItem(topItems, router) : null;
|
|
2117
2188
|
const topMenu = topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, "aria-label": _.text, bgColor: bgColor, ..._ }, String(i))));
|
|
2118
|
-
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, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2189
|
+
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-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2119
2190
|
});
|
|
2120
2191
|
const getActiveItem = (topItems, router) => {
|
|
2121
2192
|
const [firstPortal] = topItems || [];
|
|
@@ -2124,47 +2195,44 @@
|
|
|
2124
2195
|
};
|
|
2125
2196
|
|
|
2126
2197
|
const InsuranceAmountBlockInner = JSX(({ className = '', cards = [], button }) => {
|
|
2127
|
-
const [
|
|
2128
|
-
const
|
|
2129
|
-
const
|
|
2130
|
-
const
|
|
2131
|
-
const
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
const
|
|
2136
|
-
const activeHref = cards[
|
|
2198
|
+
const [selectedCardIndex, setSelectedCardIndex] = useState(0);
|
|
2199
|
+
const handleSelectedCardIndex = useCallback((_) => setSelectedCardIndex(_), []);
|
|
2200
|
+
const galleryLength = cards.length;
|
|
2201
|
+
const CARD_VIEW_COUNT = 2;
|
|
2202
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
2203
|
+
itemCount: galleryLength,
|
|
2204
|
+
visibleItemCount: CARD_VIEW_COUNT,
|
|
2205
|
+
});
|
|
2206
|
+
const { canDec, canInc } = controls;
|
|
2207
|
+
const activeHref = cards[activeIndex]?.href;
|
|
2137
2208
|
return (jsxs("section", { role: "listitem", className: `min-w-full text-center ${className}`, children: [jsxs("div", { className: "relative overflow-hidden", children: [galleryLength
|
|
2138
2209
|
? renderGallery({
|
|
2139
|
-
|
|
2210
|
+
activeIndex,
|
|
2140
2211
|
cards,
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
setActiveSlideIndex,
|
|
2212
|
+
selectedCardIndex,
|
|
2213
|
+
onClick: handleSelectedCardIndex,
|
|
2144
2214
|
})
|
|
2145
2215
|
: null, renderArrows({
|
|
2146
|
-
|
|
2147
|
-
isShown: [showPrevButton, showNextButton],
|
|
2216
|
+
...controls,
|
|
2148
2217
|
btnClass: ['left-[50px]', 'right-[50px]'],
|
|
2149
2218
|
className: 'top-[62px]',
|
|
2150
|
-
}),
|
|
2219
|
+
}), 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-[240px] text-center", version: "primary", ...button, href: activeHref })] }));
|
|
2151
2220
|
});
|
|
2152
|
-
function renderGallery({
|
|
2153
|
-
const tabsShiftWidth =
|
|
2221
|
+
function renderGallery({ activeIndex, cards, selectedCardIndex, onClick }) {
|
|
2222
|
+
const tabsShiftWidth = activeIndex * 460;
|
|
2154
2223
|
const cardsAlignStyle = cards.length > 2 ? 'justify-start' : 'justify-center';
|
|
2155
2224
|
return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000 px-[50px]", children: jsx("div", { className: `w-full flex flex-nowrap gap-3.5 pb-12 ${cardsAlignStyle}`, children: cards.map((slide, i) => renderSlide({
|
|
2156
2225
|
slide,
|
|
2157
2226
|
i,
|
|
2158
|
-
|
|
2159
|
-
onClick: () =>
|
|
2227
|
+
isActive: Boolean(i === selectedCardIndex),
|
|
2228
|
+
onClick: () => onClick(i),
|
|
2160
2229
|
})) }) }));
|
|
2161
2230
|
}
|
|
2162
|
-
function renderSlide({ slide, i,
|
|
2163
|
-
const
|
|
2164
|
-
const btnClassName = isActiveBtn
|
|
2231
|
+
function renderSlide({ slide, i, isActive, onClick }) {
|
|
2232
|
+
const btnClassName = isActive
|
|
2165
2233
|
? 'shadow-dark-blue/42 border-primary-main'
|
|
2166
2234
|
: `ease-in duration-300 border-main-stroke`;
|
|
2167
|
-
return (jsxs("button", { type: "button", onClick: onClick, className: `p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(ImgInner, { className: "p-5 rounded-full bg-secondary-light mr-[30px]", image: slide.icon, width: "108", height: "108" })) : null, jsxs("div", { className: "flex gap-3.5", children: [slide?.sum ? renderValueBlock$1('страховая сумма', slide.sum) : null, slide?.fee ? renderValueBlock$1('страховой взнос', slide.fee) : null] }), renderDoneIcon(
|
|
2235
|
+
return (jsxs("button", { type: "button", onClick: onClick, className: `p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(ImgInner, { className: "p-5 rounded-full bg-secondary-light mr-[30px]", image: slide.icon, width: "108", height: "108" })) : null, jsxs("div", { className: "flex gap-3.5", children: [slide?.sum ? renderValueBlock$1('страховая сумма', slide.sum) : null, slide?.fee ? renderValueBlock$1('страховой взнос', slide.fee) : null] }), renderDoneIcon(isActive)] }, String(i)));
|
|
2168
2236
|
}
|
|
2169
2237
|
function renderValueBlock$1(title, sum) {
|
|
2170
2238
|
return (jsxs("div", { className: "flex flex-col text-left whitespace-pre", children: [jsxs("span", { className: "text-h6", children: [addSpacesBetweenNumbers(sum), " \u20BD"] }), jsx("span", { className: "text-secondary-text text-l mt-1", children: title })] }));
|
|
@@ -2220,30 +2288,20 @@
|
|
|
2220
2288
|
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))));
|
|
2221
2289
|
|
|
2222
2290
|
const BLUR_BLOCK_CLASSES$1 = 'absolute top-0 bottom-0 w-[84px]';
|
|
2223
|
-
const CARD_FULL_VIEW_COUNT
|
|
2291
|
+
const CARD_FULL_VIEW_COUNT = 1;
|
|
2224
2292
|
const InvestmentGallery = JSX(({ cards = [], className = '', title, version = 'primary', ...rest }) => {
|
|
2225
|
-
const
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2293
|
+
const cardWidth = 710;
|
|
2294
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
2295
|
+
itemCount: cards.length,
|
|
2296
|
+
visibleItemCount: CARD_FULL_VIEW_COUNT,
|
|
2297
|
+
});
|
|
2298
|
+
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({
|
|
2299
|
+
...controls,
|
|
2300
|
+
btnClass: ['left-8', 'right-8'],
|
|
2301
|
+
className: 'top-1/2 mt-3',
|
|
2231
2302
|
})] }), 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'}` })] }));
|
|
2232
2303
|
});
|
|
2233
2304
|
const renderInvestmentGalleryCard = (className, version) => (card, i) => jsx(InvestmentGalleryCard, { className: className, version: version, ...card }, String(i));
|
|
2234
|
-
const renderNavButtons$1 = ({ cardsCount, activeCardIndex, setActiveCardIndex }) => {
|
|
2235
|
-
const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT$1;
|
|
2236
|
-
const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT$1;
|
|
2237
|
-
const showPrevButton = isUseSlider && activeCardIndex > 0;
|
|
2238
|
-
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
2239
|
-
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
2240
|
-
return (jsx("div", { children: renderArrows({
|
|
2241
|
-
handler: [handlePrevClick, handleNextClick],
|
|
2242
|
-
isShown: [showPrevButton, showNextButton],
|
|
2243
|
-
btnClass: ['left-8', 'right-8'],
|
|
2244
|
-
className: 'top-1/2 mt-3',
|
|
2245
|
-
}) }));
|
|
2246
|
-
};
|
|
2247
2305
|
|
|
2248
2306
|
function joinList(sep) {
|
|
2249
2307
|
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
@@ -2346,16 +2404,16 @@
|
|
|
2346
2404
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
2347
2405
|
const containerStyle = version === 'secondary' ? 'p-3.5 min-w-[120px]' : 'min-w-[92px]';
|
|
2348
2406
|
const buttonsWithClass = buttons?.map((_) => ({ ..._, className: 'min-w-[168px]' }));
|
|
2349
|
-
return (jsxs(BlockWrapper, { className: `flex justify-between font-sans p-
|
|
2407
|
+
return (jsxs(BlockWrapper, { className: `flex justify-between font-sans p-[50px] box-border relative min-h-[320px]
|
|
2350
2408
|
${getTileMinHeight(className)}
|
|
2351
2409
|
${VersionStyleMap[version]}
|
|
2352
|
-
${className}`, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-
|
|
2353
|
-
${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4", ...rest })) : null, children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 items-center", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(version, items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
|
|
2410
|
+
${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
|
|
2411
|
+
${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4 mt-8", ...rest })) : null, children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(version, items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
|
|
2354
2412
|
});
|
|
2355
2413
|
const renderList$1 = (version, items) => {
|
|
2356
2414
|
return items?.length ? (jsx(List, { items: items, itemClassName: "text-l-light mb-2 last:mb-0", version: version })) : (jsx("span", { className: "text-m-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
|
|
2357
2415
|
};
|
|
2358
|
-
const renderDescription$1 = (description) => description ? jsx("p", { className: "text-xl-light mb-5", children: description }) : null;
|
|
2416
|
+
const renderDescription$1 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
|
|
2359
2417
|
|
|
2360
2418
|
function renderClusterer(yandexMaps, map, points) {
|
|
2361
2419
|
map.geoObjects.removeAll();
|
|
@@ -2763,19 +2821,15 @@
|
|
|
2763
2821
|
const OfficeServicesBlock = JSX(({ className = '', title, servicesList, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-8 flex flex-col ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h5", className: "mb-5", title: title }) : null, servicesList?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: servicesList.map(renderListItems) })) : null] })));
|
|
2764
2822
|
const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-5 last:mb-0 list-none", children: [itemList.icon ? (jsx(ImgInner, { className: "mr-3 min-w-6 min-h-6 w-6 h-6", width: "24", height: "24", asSVG: true, image: getIconWithVersion(itemList.icon) })) : null, itemList.label ? jsx("span", { className: "text-l-light", children: itemList.label }) : null] }, `list_item_${String(i)}`));
|
|
2765
2823
|
|
|
2766
|
-
const OtherProducts = JSX(({ className = '',
|
|
2824
|
+
const OtherProducts = JSX(({ className = '', ...rest }) => (jsx(BlockWrapper, { className: `font-sans text-primary-text ${className}`, ...rest, children: renderChildren(rest) })));
|
|
2767
2825
|
OtherProducts.childrenTypes = ['OtherProductsItem'];
|
|
2768
2826
|
|
|
2769
|
-
function getParentBlockDef(
|
|
2770
|
-
|
|
2771
|
-
.map((item) => item)
|
|
2772
|
-
.reverse()
|
|
2773
|
-
.find(([_]) => _ && 'type' in _ && (!type || type === _.type)) || [];
|
|
2774
|
-
return block || {};
|
|
2827
|
+
function getParentBlockDef(options) {
|
|
2828
|
+
return options?.parent || {};
|
|
2775
2829
|
}
|
|
2776
2830
|
|
|
2777
|
-
function getParentBlockContent(
|
|
2778
|
-
const { content } = getParentBlockDef(
|
|
2831
|
+
function getParentBlockContent(options, defaultContent) {
|
|
2832
|
+
const { content } = getParentBlockDef(options);
|
|
2779
2833
|
return content || defaultContent;
|
|
2780
2834
|
}
|
|
2781
2835
|
|
|
@@ -2799,9 +2853,9 @@
|
|
|
2799
2853
|
};
|
|
2800
2854
|
|
|
2801
2855
|
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
2802
|
-
const OtherProductsItem = JSX(({ className,
|
|
2803
|
-
const { colorPalette } = getParentBlockContent(
|
|
2804
|
-
return (jsx("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: jsx(Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children:
|
|
2856
|
+
const OtherProductsItem = JSX(({ className, label = '', isUnfolded: unfoldedByDefault, ...rest }) => {
|
|
2857
|
+
const { colorPalette } = getParentBlockContent(rest.options, {});
|
|
2858
|
+
return (jsx("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: jsx(Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: renderChildren(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: colorPalette || rest.options?.page?.colorPalette, onClick: onToggle })) }) }));
|
|
2805
2859
|
});
|
|
2806
2860
|
OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
|
|
2807
2861
|
|
|
@@ -2886,10 +2940,10 @@
|
|
|
2886
2940
|
|
|
2887
2941
|
const renderBenefit$1 = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => (jsx(BenefitItem, { icon: icon, label: label, description: description, version: version, benefitsVersion: benefitsVersion }, String(i)));
|
|
2888
2942
|
|
|
2889
|
-
const ProductBlockInner = JSX(({ className = '', title, headlineVersion = 'L', description, benefitsCountOfRow = 3, benefits, benefitsVersion, buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', ...rest }) => {
|
|
2943
|
+
const ProductBlockInner = JSX(({ className = '', title, headlineVersion = 'L', description, benefitsCountOfRow = 3, benefits, benefitsVersion, buttons, footnote, image, items, version = 'primary', isDotted = true, textBlockClassName = '', ...rest }) => {
|
|
2890
2944
|
const benefitsCount = benefits?.filter((_) => _.label)?.length;
|
|
2891
2945
|
const benefitsContainerStyles = getBenefitsContainerStyles(benefitsCountOfRow);
|
|
2892
|
-
return (jsxs("div", { className: `flex grow justify-between items-stretch h-full ${className}`, children: [jsxs("div", { className: `flex flex-col ${textBlockClassName}`, children: [jsx(Headline, { title: title, description: description, className: `!p-0 max-w-[600px]`, bgColorHeadline: version, headlineVersion: headlineVersion, align: "left", ...rest }), jsxs(BaseTile, { buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "flex gap-4", ...rest })) : null, children: [benefitsCount ? (jsx("div", { className: benefitsContainerStyles, children: benefits.map(renderBenefit$1(version, benefitsVersion)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] })] }), image?.src && jsx(ImgInner, { className: "mt-[-50px]", image: image })] }));
|
|
2946
|
+
return (jsxs("div", { className: `flex grow justify-between items-stretch h-full ${className}`, children: [jsxs("div", { className: `flex flex-col ${textBlockClassName}`, children: [jsx(Headline, { title: title, description: description, className: `!p-0 max-w-[600px]`, bgColorHeadline: version, headlineVersion: headlineVersion, align: "left", ...rest }), jsxs("div", { className: "flex flex-col justify-between h-full", children: [jsxs(BaseTile, { buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "flex gap-4", ...rest })) : null, children: [benefitsCount ? (jsx("div", { className: benefitsContainerStyles, children: benefits.map(renderBenefit$1(version, benefitsVersion)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }), footnote ? jsx("p", { className: "text-m-light pt-12", children: footnote }) : null] })] }), image?.src && jsx(ImgInner, { className: "mt-[-50px]", image: image })] }));
|
|
2893
2947
|
});
|
|
2894
2948
|
const getBenefitsContainerStyles = (benefitsCountOfRow = 2) => `gap-6 mt-6 ${benefitsCountOfRow > 2
|
|
2895
2949
|
? 'inline-grid grid-cols-[auto_auto_auto]'
|
|
@@ -3005,38 +3059,29 @@
|
|
|
3005
3059
|
});
|
|
3006
3060
|
|
|
3007
3061
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
3008
|
-
const
|
|
3062
|
+
const CARD_VIEW_COUNT = 2;
|
|
3009
3063
|
const CARD_SHIFT = 525;
|
|
3010
3064
|
const Recommendation = JSX(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
3011
|
-
const [
|
|
3012
|
-
|
|
3065
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
3066
|
+
itemCount: recommendations.length,
|
|
3067
|
+
visibleItemCount: CARD_VIEW_COUNT,
|
|
3068
|
+
});
|
|
3069
|
+
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-6", title: title }) : null, jsxs("div", { children: [jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
3013
3070
|
? recommendations.map((card, i) => (jsx(RecommendationCard, { version: version, className: BorderVersionStyleMap[version], ...card }, String(i))))
|
|
3014
|
-
: null }),
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3071
|
+
: null }), renderArrows({
|
|
3072
|
+
...controls,
|
|
3073
|
+
btnClass: ['left-8', 'right-8'],
|
|
3074
|
+
className: 'top-1/2 mt-3',
|
|
3018
3075
|
})] }), jsx("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), jsx("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
3019
3076
|
});
|
|
3020
|
-
const renderNavButtons = ({ cardsCount, activeCardIndex, setActiveCardIndex, }) => {
|
|
3021
|
-
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
3022
|
-
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
3023
|
-
const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT;
|
|
3024
|
-
const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT;
|
|
3025
|
-
const showPrevButton = isUseSlider && activeCardIndex > 0;
|
|
3026
|
-
return (jsx("div", { children: renderArrows({
|
|
3027
|
-
handler: [handlePrevClick, handleNextClick],
|
|
3028
|
-
isShown: [showPrevButton, showNextButton],
|
|
3029
|
-
btnClass: ['left-8', 'right-8'],
|
|
3030
|
-
className: 'top-1/2 mt-3',
|
|
3031
|
-
}) }));
|
|
3032
|
-
};
|
|
3033
3077
|
|
|
3034
|
-
const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary',
|
|
3078
|
+
const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => (jsx("div", { className: `border-b border-solid border-main-divider w-full ${className}`, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: `grid grid-cols-12 gap-1 border-box`, isUnfolded: isUnfolded, children: renderChildren(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ isUnfolded, onToggle, label, version }) }) })));
|
|
3035
3079
|
RollupItem.childrenTypes = [];
|
|
3036
3080
|
const renderFoldButton = ({ isUnfolded, onToggle, label, version }) => {
|
|
3037
|
-
const
|
|
3081
|
+
const iconsPrimary = ['PlusIcon', 'MinusIcon'];
|
|
3082
|
+
const iconsSecondary = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3038
3083
|
const labels = label ? [label, label] : ['Развернуть', 'Скрыть'];
|
|
3039
|
-
return version === 'primary' ? (jsx(FoldButton, { icon:
|
|
3084
|
+
return version === 'primary' ? (jsx(FoldButton, { icon: iconsPrimary[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle })) : (jsx(DefaultFoldButton, { icon: iconsSecondary[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3040
3085
|
};
|
|
3041
3086
|
const FoldButton = JSX(({ label, icon, onClick }) => (jsxs("button", { className: "border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer", onClick: onClick, children: [jsx("span", { className: "text-xl font-medium pr-2.5", children: label }), icon ? jsx(ImgInner, { image: getIconWithVersion({ icon }), width: "24", height: "24", asSVG: true }) : null] })));
|
|
3042
3087
|
|
|
@@ -3231,7 +3276,7 @@
|
|
|
3231
3276
|
return (jsxs(BlockWrapper, { className: [
|
|
3232
3277
|
'box-border py-[50px] font-sans',
|
|
3233
3278
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
3234
|
-
'flex flex-col items-center',
|
|
3279
|
+
'flex flex-col items-center overflow-hidden',
|
|
3235
3280
|
styleMap.background,
|
|
3236
3281
|
styleMap.title,
|
|
3237
3282
|
className,
|
|
@@ -3417,16 +3462,15 @@
|
|
|
3417
3462
|
|
|
3418
3463
|
const COLUMN_WIDTH = 140;
|
|
3419
3464
|
const InnerTableBodyItem = JSX(({ rows }) => {
|
|
3420
|
-
const [activeColumnIndex, setActiveColumnIndex] = useState(0);
|
|
3421
|
-
const handleNextClick = () => setActiveColumnIndex(activeColumnIndex + 1);
|
|
3422
|
-
const handlePrevClick = () => setActiveColumnIndex(activeColumnIndex - 1);
|
|
3423
3465
|
const rowsLength = rows?.[0]?.length ?? 0;
|
|
3424
|
-
const
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3466
|
+
const CARD_VIEW_COUNT = 5;
|
|
3467
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
3468
|
+
itemCount: rowsLength,
|
|
3469
|
+
visibleItemCount: CARD_VIEW_COUNT,
|
|
3470
|
+
});
|
|
3471
|
+
return (jsxs("div", { children: [rows?.map(renderRow(activeIndex)), renderArrows({
|
|
3472
|
+
...controls,
|
|
3473
|
+
btnClass: ['left-3 top-20', 'right-3 top-20'],
|
|
3430
3474
|
className: '',
|
|
3431
3475
|
})] }));
|
|
3432
3476
|
});
|
|
@@ -3470,11 +3514,11 @@
|
|
|
3470
3514
|
|
|
3471
3515
|
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] })));
|
|
3472
3516
|
|
|
3473
|
-
const TariffsTableRow = JSX(({ row: { header, data },
|
|
3517
|
+
const TariffsTableRow = JSX(({ row: { header, data }, activeIndex, rowIdx, ...rest }) => {
|
|
3474
3518
|
const [tableInner, setTableInner] = useState(undefined);
|
|
3475
3519
|
const [openTableInnerIdx, setOpenTableInnerIdx] = useState(undefined);
|
|
3476
3520
|
const onHideContentClick = () => setTableInner(undefined);
|
|
3477
|
-
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-[14px] 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, {
|
|
3521
|
+
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-[14px] 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: setTableInner, tableInner: tableInner, openTableInnerIdx: openTableInnerIdx, setOpenTableInnerIdx: setOpenTableInnerIdx, ...rest }, String(i)))) })) : null] }));
|
|
3478
3522
|
});
|
|
3479
3523
|
|
|
3480
3524
|
const TariffsTable = JSX(({ className = '', title, description, rowHeaders, tariffsColumns: columns, hiddenRowsNum = 0, ...rest }) => {
|
|
@@ -3483,15 +3527,15 @@
|
|
|
3483
3527
|
header,
|
|
3484
3528
|
data: colData.map((col) => col?.[i] || []),
|
|
3485
3529
|
}));
|
|
3486
|
-
const
|
|
3530
|
+
const itemCount = colData.length;
|
|
3487
3531
|
const [activeIndex, controls] = useCarouselControls({
|
|
3488
|
-
|
|
3532
|
+
itemCount: itemCount,
|
|
3489
3533
|
visibleItemCount: COLS_LENGTH_FOR_SCROLL,
|
|
3490
3534
|
});
|
|
3491
|
-
const isScrollAvailable =
|
|
3492
|
-
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row,
|
|
3535
|
+
const { isScrollAvailable } = controls;
|
|
3536
|
+
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
|
|
3493
3537
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
3494
|
-
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${
|
|
3538
|
+
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] 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, isScrollAvailable: isScrollAvailable, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, isScrollAvailable: isScrollAvailable, children: rows }))] }));
|
|
3495
3539
|
});
|
|
3496
3540
|
function renderTitle({ title, description }) {
|
|
3497
3541
|
return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
|
|
@@ -3499,15 +3543,13 @@
|
|
|
3499
3543
|
function renderDescription(description) {
|
|
3500
3544
|
return description ? jsx("div", { className: "mb-9 text-center text-l", children: description }) : null;
|
|
3501
3545
|
}
|
|
3502
|
-
const Wrapper = JSX(({ children, controls, isScrollAvailable }) => {
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
}) })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
3510
|
-
});
|
|
3546
|
+
const Wrapper = JSX(({ children, controls, isScrollAvailable }) => (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [children, isScrollAvailable
|
|
3547
|
+
? renderArrows({
|
|
3548
|
+
...controls,
|
|
3549
|
+
btnClass: ['top-[108px]', 'top-[44px]'],
|
|
3550
|
+
className: 'right-7',
|
|
3551
|
+
})
|
|
3552
|
+
: null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] })));
|
|
3511
3553
|
|
|
3512
3554
|
const textBlockStyleMaps = {
|
|
3513
3555
|
primary: {
|
|
@@ -3574,17 +3616,27 @@
|
|
|
3574
3616
|
primary: 'bg-white',
|
|
3575
3617
|
secondary: 'bg-primary-main',
|
|
3576
3618
|
};
|
|
3577
|
-
const VerticalLayout = JSX(({ className = '',
|
|
3619
|
+
const VerticalLayout = JSX(({ className = '', gap = '', align, version = 'transparent', ...rest }) => (jsx(BlockWrapper, { className: [
|
|
3578
3620
|
'flex flex-col',
|
|
3579
3621
|
gapStyleMap[gap],
|
|
3580
|
-
alignStyle[align],
|
|
3622
|
+
align && alignStyle[align],
|
|
3581
3623
|
backgroundStyleMap[version],
|
|
3582
3624
|
className,
|
|
3583
|
-
]
|
|
3625
|
+
]
|
|
3626
|
+
.filter(Boolean)
|
|
3627
|
+
.join(' '), ...rest, children: renderChildren(rest) })));
|
|
3584
3628
|
VerticalLayout.childrenTypes = {
|
|
3585
3629
|
exclude: ['VerticalLayout'],
|
|
3586
3630
|
};
|
|
3587
3631
|
|
|
3632
|
+
const MIN_COL_SPAN = 10;
|
|
3633
|
+
const getPaddings = (className) => getColSpan(className) < MIN_COL_SPAN ? 'py-6 px-11' : 'py-12 px-32';
|
|
3634
|
+
|
|
3635
|
+
const Video = JSX((props) => {
|
|
3636
|
+
const { title, src, previewImg, className = '', ...rest } = props;
|
|
3637
|
+
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] }));
|
|
3638
|
+
});
|
|
3639
|
+
|
|
3588
3640
|
const Blocks = {
|
|
3589
3641
|
Accordion,
|
|
3590
3642
|
AccordionItem,
|
|
@@ -3633,12 +3685,9 @@
|
|
|
3633
3685
|
TextBlock,
|
|
3634
3686
|
Tile,
|
|
3635
3687
|
VerticalLayout,
|
|
3688
|
+
Video,
|
|
3636
3689
|
};
|
|
3637
3690
|
|
|
3638
|
-
function style2className(style) {
|
|
3639
|
-
return style ? style.filter(Boolean).join(' ') : '';
|
|
3640
|
-
}
|
|
3641
|
-
|
|
3642
3691
|
const api = LikeAPI();
|
|
3643
3692
|
function useLikeService(pagePath) {
|
|
3644
3693
|
const [likeCount, setLikeCount] = useState(0);
|
|
@@ -3680,59 +3729,25 @@
|
|
|
3680
3729
|
return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className}`, children: [jsx(LikeButton, { onClick: handlerDecorator(likeService.like), ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: handlerDecorator(likeService.dislike), className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
|
|
3681
3730
|
});
|
|
3682
3731
|
|
|
3683
|
-
const DEFAULT_SLOT_NAME = null;
|
|
3684
|
-
|
|
3685
|
-
const renderSlots = ({ slots, parent, options, ancestors = [], }) => Object.entries(slots || {}).reduce((res, [slotName, slotBlocks]) => ({
|
|
3686
|
-
...res,
|
|
3687
|
-
[slotName]: renderBlocksList({
|
|
3688
|
-
blocks: slotBlocks,
|
|
3689
|
-
parent,
|
|
3690
|
-
slotName,
|
|
3691
|
-
options,
|
|
3692
|
-
ancestors,
|
|
3693
|
-
}),
|
|
3694
|
-
}), {});
|
|
3695
|
-
|
|
3696
|
-
function renderBlock({ block = {}, options, ancestors = [] }) {
|
|
3697
|
-
const { key, page, blockDecorator, blocksRegistry = {} } = options;
|
|
3698
|
-
const { type, slots, blocks: childBlocks } = block;
|
|
3699
|
-
if (!(type && type in blocksRegistry)) {
|
|
3700
|
-
console.warn(`No block with "${type}" is registered`);
|
|
3701
|
-
}
|
|
3702
|
-
const BlockComponent = type && blocksRegistry[type];
|
|
3703
|
-
const subBlockRenderProps = { parent: block, options, ancestors };
|
|
3704
|
-
const children = renderBlocksList({ ...subBlockRenderProps, blocks: childBlocks });
|
|
3705
|
-
const blockSlots = slots ? renderSlots({ ...subBlockRenderProps, slots }) : {};
|
|
3706
|
-
return blockDecorator({
|
|
3707
|
-
blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
|
|
3708
|
-
block,
|
|
3709
|
-
ancestors,
|
|
3710
|
-
// Adjusted by decorator block and blockClassName
|
|
3711
|
-
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
3712
|
-
const { content } = adjustedBlock;
|
|
3713
|
-
return BlockComponent ? (jsx(BlockComponent, { page: page, block: adjustedBlock, className: adjustedBlockClassName, ancestors: ancestors, slots: blockSlots, ...content, children: children }, key)) : null;
|
|
3714
|
-
},
|
|
3715
|
-
}, key);
|
|
3716
|
-
}
|
|
3717
|
-
|
|
3718
|
-
const renderBlocksList = ({ blocks, parent, slotName = DEFAULT_SLOT_NAME, options, ancestors = [], }) => (blocks || []).map((_, j) => renderBlock({
|
|
3719
|
-
block: _,
|
|
3720
|
-
options: { ...options, key: `${options.key ? options.key : _.type}-${j}` },
|
|
3721
|
-
ancestors: [...ancestors, [parent, slotName]],
|
|
3722
|
-
}));
|
|
3723
|
-
|
|
3724
|
-
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
3725
3732
|
const ContentPage = JSX((props) => {
|
|
3726
3733
|
const { className = '', blocksRegistry, blockDecorator, data = {} } = props;
|
|
3727
3734
|
const { style: pageStyle, blocks, slots, likeControl, colorPalette = 'pc' } = data;
|
|
3728
3735
|
const options = {
|
|
3729
3736
|
key: '',
|
|
3730
|
-
blocksRegistry,
|
|
3731
3737
|
page: data,
|
|
3732
|
-
|
|
3738
|
+
blocksRegistry,
|
|
3739
|
+
blockDecorator,
|
|
3740
|
+
parent: data,
|
|
3733
3741
|
};
|
|
3734
|
-
|
|
3735
|
-
|
|
3742
|
+
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, {
|
|
3743
|
+
...options,
|
|
3744
|
+
slotName: 'header',
|
|
3745
|
+
}) })) : null, jsxs("div", { className: "container grid grid-cols-12 gap-1", children: [renderBlocksList(blocks, options), slots?.footer
|
|
3746
|
+
? renderBlocksList(slots?.footer, {
|
|
3747
|
+
...options,
|
|
3748
|
+
slotName: 'footer',
|
|
3749
|
+
})
|
|
3750
|
+
: null] }), likeControl ? renderLikeControl() : null] }));
|
|
3736
3751
|
});
|
|
3737
3752
|
ContentPage.childrenTypes = [];
|
|
3738
3753
|
ContentPage.slots = () => ['header', 'footer'];
|
|
@@ -3740,7 +3755,7 @@
|
|
|
3740
3755
|
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" }) }));
|
|
3741
3756
|
}
|
|
3742
3757
|
|
|
3743
|
-
const packageVersion = "0.6.
|
|
3758
|
+
const packageVersion = "0.6.35";
|
|
3744
3759
|
|
|
3745
3760
|
exports.Blocks = Blocks;
|
|
3746
3761
|
exports.ContentPage = ContentPage;
|