@redneckz/wildless-cms-uni-blocks 0.3.80 → 0.3.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +120 -131
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +3 -2
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +2 -2
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +3 -2
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +3 -2
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Catalog/Catalog.js +3 -2
- package/dist/components/Catalog/Catalog.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +3 -2
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +0 -10
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Footer.js +3 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +4 -3
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/GracePeriod/GracePeriod.js +3 -2
- package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/dist/components/GroupBlock/GroupBlock.js +5 -4
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/dist/components/Header/Header.js +3 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Insurance/Insurance.js +3 -2
- package/dist/components/Insurance/Insurance.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/LikeControl/LikeControl.js +3 -2
- package/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +3 -2
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkList/LinkList.js +3 -2
- package/dist/components/LinkList/LinkList.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +4 -3
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/Navigation/Navigation.js +3 -2
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/dist/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/dist/components/OtherProducts/OtherProducts.js +3 -2
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +3 -2
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +3 -2
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +3 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/dist/components/ProductGallery/ProductGallery.js +4 -3
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +3 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +3 -2
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.js +4 -3
- package/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +5 -4
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +3 -2
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +3 -2
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +3 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/react/IntersectionObserverTag.d.ts +1 -1
- package/dist/react/IntersectionObserverTag.js +2 -2
- package/dist/react/IntersectionObserverTag.js.map +1 -1
- package/dist/react/setup-fixture.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.d.ts +9 -0
- package/dist/ui-kit/BlockWrapper.js +10 -0
- package/dist/ui-kit/BlockWrapper.js.map +1 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/dist/utils/changeHashOnObserve.d.ts +1 -0
- package/dist/utils/changeHashOnObserve.js +13 -0
- package/dist/utils/changeHashOnObserve.js.map +1 -0
- package/lib/components/Accordion/Accordion.js +3 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +2 -2
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +3 -2
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/Calculator/Calculator.js +3 -2
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Catalog/Catalog.js +3 -2
- package/lib/components/Catalog/Catalog.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +3 -2
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +0 -10
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Footer.js +3 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +4 -3
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/GracePeriod/GracePeriod.js +3 -2
- package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/lib/components/GroupBlock/GroupBlock.js +5 -4
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/lib/components/Header/Header.js +3 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Insurance/Insurance.js +3 -2
- package/lib/components/Insurance/Insurance.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/LikeControl/LikeControl.js +3 -2
- package/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +3 -2
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkList/LinkList.js +3 -2
- package/lib/components/LinkList/LinkList.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +4 -3
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/Navigation/Navigation.js +3 -2
- package/lib/components/Navigation/Navigation.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/lib/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/lib/components/OtherProducts/OtherProducts.js +3 -2
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +3 -2
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +3 -2
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +3 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/lib/components/ProductGallery/ProductGallery.js +4 -3
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +3 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +3 -2
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.js +4 -3
- package/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +5 -4
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +3 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +3 -2
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +3 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/react/IntersectionObserverTag.d.ts +1 -1
- package/lib/react/IntersectionObserverTag.js +2 -2
- package/lib/react/IntersectionObserverTag.js.map +1 -1
- package/lib/react/setup-fixture.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.d.ts +9 -0
- package/lib/ui-kit/BlockWrapper.js +8 -0
- package/lib/ui-kit/BlockWrapper.js.map +1 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/lib/utils/changeHashOnObserve.d.ts +1 -0
- package/lib/utils/changeHashOnObserve.js +10 -0
- package/lib/utils/changeHashOnObserve.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +26 -36
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +2 -2
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +3 -2
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +3 -2
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Catalog/Catalog.js +3 -2
- package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +0 -10
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +4 -3
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/GracePeriod/GracePeriod.js +3 -2
- package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/dist/components/GroupBlock/GroupBlock.js +5 -4
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/dist/components/Insurance/Insurance.js +3 -2
- package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/LikeControl/LikeControl.js +3 -2
- package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/dist/components/LinkList/LinkList.js +3 -2
- package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/components/Navigation/Navigation.js +3 -2
- package/mobile/dist/components/Navigation/Navigation.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +3 -2
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +3 -2
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +3 -2
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/mobile/dist/components/ProductTile/ProductTile.js +3 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +3 -2
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.js +4 -3
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +3 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/react/IntersectionObserverTag.d.ts +1 -1
- package/mobile/dist/react/IntersectionObserverTag.js +2 -2
- package/mobile/dist/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/dist/react/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.d.ts +9 -0
- package/mobile/dist/ui-kit/BlockWrapper.js +10 -0
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -0
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/mobile/dist/utils/changeHashOnObserve.d.ts +1 -0
- package/mobile/dist/utils/changeHashOnObserve.js +13 -0
- package/mobile/dist/utils/changeHashOnObserve.js.map +1 -0
- package/mobile/lib/components/BaseTile/BaseTile.js +2 -2
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +3 -2
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +3 -2
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +3 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +3 -2
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Catalog/Catalog.js +3 -2
- package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +0 -10
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +3 -2
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +4 -3
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/GracePeriod/GracePeriod.js +3 -2
- package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/lib/components/GroupBlock/GroupBlock.js +5 -4
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
- package/mobile/lib/components/Insurance/Insurance.js +3 -2
- package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -4
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +3 -3
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/LikeControl/LikeControl.js +3 -2
- package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
- package/mobile/lib/components/LinkList/LinkList.js +3 -2
- package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/components/Navigation/Navigation.js +3 -2
- package/mobile/lib/components/Navigation/Navigation.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +7 -7
- package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +3 -2
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +3 -2
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +3 -2
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -3
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +2 -2
- package/mobile/lib/components/ProductTile/ProductTile.js +3 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +3 -2
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.js +4 -3
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +3 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/react/IntersectionObserverTag.d.ts +1 -1
- package/mobile/lib/react/IntersectionObserverTag.js +2 -2
- package/mobile/lib/react/IntersectionObserverTag.js.map +1 -1
- package/mobile/lib/react/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.d.ts +9 -0
- package/mobile/lib/ui-kit/BlockWrapper.js +8 -0
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -0
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +3 -2
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +13 -1
- package/mobile/lib/utils/changeHashOnObserve.d.ts +1 -0
- package/mobile/lib/utils/changeHashOnObserve.js +10 -0
- package/mobile/lib/utils/changeHashOnObserve.js.map +1 -0
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +5 -4
- package/mobile/src/components/Bonus/Bonus.tsx +4 -3
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +5 -4
- package/mobile/src/components/Calculator/Calculator.tsx +6 -4
- package/mobile/src/components/Catalog/Catalog.tsx +6 -4
- package/mobile/src/components/ContentPage/ContentPage.tsx +0 -14
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +3 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +6 -4
- package/mobile/src/components/Gallery/GalleryInner.tsx +8 -6
- package/mobile/src/components/GracePeriod/GracePeriod.tsx +4 -3
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +6 -5
- package/mobile/src/components/Insurance/Insurance.tsx +7 -3
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -6
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +5 -5
- package/mobile/src/components/LikeControl/LikeControl.tsx +7 -4
- package/mobile/src/components/LinkList/LinkList.tsx +4 -3
- package/mobile/src/components/Navigation/Navigation.tsx +6 -4
- package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +1 -1
- package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +13 -13
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +8 -3
- package/mobile/src/components/PictureText/PictureText.tsx +6 -5
- package/mobile/src/components/Placeholder/Placeholder.tsx +6 -4
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -3
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +2 -2
- package/mobile/src/components/ProductTile/ProductTile.tsx +6 -4
- package/mobile/src/components/PromoTile/PromoTile.tsx +6 -4
- package/mobile/src/components/Recommendation/Recommendation.tsx +7 -5
- package/mobile/src/components/Tile/Tile.tsx +6 -6
- package/mobile/src/react/IntersectionObserverTag.tsx +11 -3
- package/mobile/src/react/setup-fixture.ts +0 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +33 -0
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +6 -3
- package/mobile/src/ui-kit/Button/ButtonProps.ts +14 -1
- package/mobile/src/utils/changeHashOnObserve.ts +10 -0
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +9 -4
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +5 -4
- package/src/components/Bonus/Bonus.tsx +4 -3
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +5 -4
- package/src/components/Calculator/Calculator.tsx +6 -4
- package/src/components/Catalog/Catalog.tsx +6 -4
- package/src/components/ComparisonTable/ComparisonTable.tsx +6 -4
- package/src/components/ContentPage/ContentPage.tsx +0 -14
- package/src/components/ContentPage/ContentPageContext.tsx +3 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +6 -4
- package/src/components/Footer/Footer.tsx +9 -3
- package/src/components/Gallery/GalleryInner.tsx +8 -6
- package/src/components/GracePeriod/GracePeriod.tsx +4 -3
- package/src/components/GroupBlock/GroupBlock.tsx +6 -5
- package/src/components/Header/Header.tsx +9 -3
- package/src/components/Headline/Headline.tsx +5 -4
- package/src/components/Insurance/Insurance.tsx +7 -3
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -6
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +5 -5
- package/src/components/LikeControl/LikeControl.tsx +7 -4
- package/src/components/LinkDocs/LinkDocs.tsx +8 -3
- package/src/components/LinkList/LinkList.tsx +4 -3
- package/src/components/MobileAppTile/MobileAppTile.tsx +6 -4
- package/src/components/Navigation/Navigation.tsx +6 -4
- package/src/components/NavigatorTabs/NavigatorTabItem.tsx +1 -1
- package/src/components/NavigatorTabs/NavigatorTabs.tsx +13 -13
- package/src/components/OtherProducts/OtherProducts.tsx +8 -3
- package/src/components/PictureText/PictureText.tsx +6 -5
- package/src/components/Placeholder/Placeholder.tsx +6 -4
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.tsx +5 -4
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -3
- package/src/components/ProductBlock/renderBackwardButton.tsx +2 -2
- package/src/components/ProductGallery/ProductGallery.tsx +6 -4
- package/src/components/ProductTile/ProductTile.tsx +6 -4
- package/src/components/PromoTile/PromoTile.tsx +6 -4
- package/src/components/Recommendation/Recommendation.tsx +7 -5
- package/src/components/StepsBlock/StepsBlock.tsx +7 -5
- package/src/components/TariffsTable/TariffsTable.tsx +6 -13
- package/src/components/TextBlock/TextBlock.tsx +5 -12
- package/src/components/Tile/Tile.tsx +6 -6
- package/src/react/IntersectionObserverTag.tsx +11 -3
- package/src/react/setup-fixture.ts +0 -1
- package/src/ui-kit/BlockWrapper.tsx +33 -0
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +6 -3
- package/src/ui-kit/Button/ButtonProps.ts +14 -1
- package/src/utils/changeHashOnObserve.ts +10 -0
- package/dist/utils/changeHashOnScroll.d.ts +0 -2
- package/dist/utils/changeHashOnScroll.js +0 -17
- package/dist/utils/changeHashOnScroll.js.map +0 -1
- package/lib/utils/changeHashOnScroll.d.ts +0 -2
- package/lib/utils/changeHashOnScroll.js +0 -14
- package/lib/utils/changeHashOnScroll.js.map +0 -1
- package/mobile/dist/utils/changeHashOnScroll.d.ts +0 -2
- package/mobile/dist/utils/changeHashOnScroll.js +0 -17
- package/mobile/dist/utils/changeHashOnScroll.js.map +0 -1
- package/mobile/lib/utils/changeHashOnScroll.d.ts +0 -2
- package/mobile/lib/utils/changeHashOnScroll.js +0 -14
- package/mobile/lib/utils/changeHashOnScroll.js.map +0 -1
- package/mobile/src/utils/changeHashOnScroll.ts +0 -17
- package/src/utils/changeHashOnScroll.ts +0 -17
package/bundle/bundle.umd.js
CHANGED
|
@@ -186,6 +186,19 @@
|
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
const changeHashOnObserve = (entries) => {
|
|
190
|
+
if (!entries.length) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const [entry] = entries;
|
|
194
|
+
if (entry.isIntersecting) ;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const BlockWrapper = JSX(({ anchor, className, context, children, Tag = 'section', ...rest }) => {
|
|
198
|
+
const { IntersectionObserverTag } = context;
|
|
199
|
+
return anchor ? (jsx(IntersectionObserverTag, { Tag: Tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, ...rest, children: children })) : (jsx(Tag, { className: className, ...rest, children: children }));
|
|
200
|
+
});
|
|
201
|
+
|
|
189
202
|
const HEADING_STYLE_MAP = {
|
|
190
203
|
h1: 'text-title-xl tracking-[-0.3px]',
|
|
191
204
|
h2: 'text-title-lg',
|
|
@@ -473,9 +486,9 @@
|
|
|
473
486
|
},
|
|
474
487
|
};
|
|
475
488
|
|
|
476
|
-
const Headline = JSX(({ bgColorHeadline = 'transparent', align = 'left', className = '', title, description,
|
|
489
|
+
const Headline = JSX(({ bgColorHeadline = 'transparent', align = 'left', className = '', title, description, headingType = 'h2', ...rest }) => {
|
|
477
490
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
478
|
-
return (jsxs(
|
|
491
|
+
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col gap-4 ${STYLE_MAPS.background} ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: headingType, className: `text-primary-text ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })) : null, description ? (jsx("p", { className: `text-base ${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, children: description })) : null] }));
|
|
479
492
|
});
|
|
480
493
|
|
|
481
494
|
const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
|
|
@@ -506,16 +519,16 @@
|
|
|
506
519
|
double: 'flex gap-x-5 gap-y-[26px] flex-wrap',
|
|
507
520
|
single: 'flex gap-3.5 flex-col',
|
|
508
521
|
};
|
|
509
|
-
const LinkDocs = JSX(({ context, className = '', title, description, align = 'center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double',
|
|
510
|
-
return (jsxs(
|
|
522
|
+
const LinkDocs = JSX(({ context, className = '', title, description, align = 'center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => {
|
|
523
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans text-primary-text p-[50px] bg-white ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, context: context, align: align, headingType: "h3" }), jsx(LinkDocsList, { className: `mt-8 ${linkColumnsModeStyleMap[columnsMode]}`, columnsMode: columnsMode, documents: documents, icon: icon })] }));
|
|
511
524
|
});
|
|
512
525
|
|
|
513
526
|
const pictureTextStyleMap = {
|
|
514
527
|
primary: 'bg-white text-primary-text',
|
|
515
528
|
secondary: 'bg-primary-main text-white',
|
|
516
529
|
};
|
|
517
|
-
const PictureText = JSX(({ className = '', title, image, benefits, version = 'primary', directionRight = false,
|
|
518
|
-
return (jsxs(
|
|
530
|
+
const PictureText = JSX(({ className = '', title, image, benefits, version = 'primary', directionRight = false, ...rest }) => {
|
|
531
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`, ...rest, children: [jsx(Heading, { headingType: "h2", className: "text-center", title: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: directionRight ? 'order-2 ml-6' : 'mr-6', image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map((_, i) => renderBenefit$2(_, i, version)) })) : null] })] }));
|
|
519
532
|
});
|
|
520
533
|
function renderBenefit$2(benefit, i, version) {
|
|
521
534
|
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon ? (jsx(Img, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", image: benefit.icon, width: "48", height: "48", asSVG: true })) : null, jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit?.label ? (jsx("div", { className: `font-medium text-xl-light m-0 ${version === 'primary' ? 'text-primary-text' : ''}`, children: benefit.label })) : null, benefit?.description ? (jsx("div", { className: `font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`, children: benefit.description })) : null] })] }, String(i)));
|
|
@@ -699,8 +712,8 @@
|
|
|
699
712
|
: null }));
|
|
700
713
|
});
|
|
701
714
|
|
|
702
|
-
const BaseTile = JSX(({ className = '', title, children, buttons, image
|
|
703
|
-
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`,
|
|
715
|
+
const BaseTile = JSX(({ className = '', title, children, buttons, image }) => {
|
|
716
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { children: buttons }) : null] }), image] })] }));
|
|
704
717
|
});
|
|
705
718
|
|
|
706
719
|
const benefitTitleStyleMap = {
|
|
@@ -752,10 +765,10 @@
|
|
|
752
765
|
secondary: 'text-white/80',
|
|
753
766
|
};
|
|
754
767
|
const ProductBlock = JSX((props) => {
|
|
755
|
-
const { context, className = '', breadcrumbs, backwardButton, version = 'primary',
|
|
768
|
+
const { context, className = '', breadcrumbs, backwardButton, version = 'primary', ...otherProps } = props;
|
|
756
769
|
const router = context.useRouter();
|
|
757
770
|
const { handlerDecorator } = context;
|
|
758
|
-
return (jsxs(
|
|
771
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans overflow-hidden pt-[50px] pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${productBlockStyleMap$1[version]} ${className}`, ...otherProps, children: [backwardButton?.text ? renderBackwardButton(backwardButton, version, 'mb-10 -mt-2.5') : null, breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
759
772
|
});
|
|
760
773
|
|
|
761
774
|
const textBlockStyleMaps = {
|
|
@@ -778,9 +791,9 @@
|
|
|
778
791
|
description: 'text-secondary-text',
|
|
779
792
|
},
|
|
780
793
|
};
|
|
781
|
-
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className,
|
|
794
|
+
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className, ...rest }) => {
|
|
782
795
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
783
|
-
return (jsxs(
|
|
796
|
+
return (jsxs(BlockWrapper, { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, ...rest, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null] })] }));
|
|
784
797
|
});
|
|
785
798
|
function renderIcon(className) {
|
|
786
799
|
return (jsx("div", { className: "pt-1.5 pl-1 pr-4", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
|
|
@@ -826,8 +839,8 @@
|
|
|
826
839
|
secondary: 'bg-primary-main text-white',
|
|
827
840
|
};
|
|
828
841
|
const Tile = JSX((props) => {
|
|
829
|
-
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary',
|
|
830
|
-
return (jsx(
|
|
842
|
+
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary', ...rest } = props;
|
|
843
|
+
return (jsx(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
831
844
|
${version === 'primary' ? 'text-primary-text' : ''}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$2(items, version, isDotted)] }) }));
|
|
832
845
|
});
|
|
833
846
|
function renderList$2(items, version, isDotted) {
|
|
@@ -838,8 +851,8 @@
|
|
|
838
851
|
primary: 'bg-white text-primary-text',
|
|
839
852
|
secondary: 'bg-primary-main text-white',
|
|
840
853
|
};
|
|
841
|
-
const ProductTile = JSX(({ context, className = '', title, headingType = 'h3', description, additionalDescription, benefits, buttons, image, version = 'primary',
|
|
842
|
-
return (jsxs(
|
|
854
|
+
const ProductTile = JSX(({ context, className = '', title, headingType = 'h3', description, additionalDescription, benefits, buttons, image, version = 'primary', ...rest }) => {
|
|
855
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border min-h-[364px] relative justify-between grid ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: [jsxs("div", { className: "z-[1]", children: [title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap text-h4` })) : null, description ? (jsx(Description, { className: "mt-2 text-md font-light", description: description })) : null, renderBenefits$1(benefits || [], version), additionalDescription
|
|
843
856
|
? renderAdditionalDescription(additionalDescription, version)
|
|
844
857
|
: null] }), buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-[1]" })) : null, image?.src ? jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
845
858
|
});
|
|
@@ -864,6 +877,14 @@
|
|
|
864
877
|
return jsx("div", { className: `text-m mt-2.5 ${descStyleMap[version]}`, children: additionalDescription });
|
|
865
878
|
}
|
|
866
879
|
|
|
880
|
+
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `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
|
|
881
|
+
? 'bg-secondary-light text-secondary-text'
|
|
882
|
+
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
|
|
883
|
+
|
|
884
|
+
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
885
|
+
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] }));
|
|
886
|
+
}
|
|
887
|
+
|
|
867
888
|
const cardVersionMap = {
|
|
868
889
|
primary: 'bg-white text-secondary-text',
|
|
869
890
|
secondary: 'bg-primary-main text-white',
|
|
@@ -908,15 +929,7 @@
|
|
|
908
929
|
items-stretch ${cardStyleMap$1[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
|
|
909
930
|
}
|
|
910
931
|
|
|
911
|
-
const
|
|
912
|
-
? 'bg-secondary-light text-secondary-text'
|
|
913
|
-
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
|
|
914
|
-
|
|
915
|
-
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
916
|
-
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] }));
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', anchor = null, ...rest }) => {
|
|
932
|
+
const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', ...rest }) => {
|
|
920
933
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
921
934
|
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
922
935
|
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
@@ -924,7 +937,7 @@
|
|
|
924
937
|
const showNextButton = isGalleryScrollAvailable &&
|
|
925
938
|
cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
|
|
926
939
|
const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
|
|
927
|
-
return (jsxs(
|
|
940
|
+
return (jsxs(BlockWrapper, { context: context, className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, ...rest, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), renderArrows({
|
|
928
941
|
handler: [handlePrevClick, handleNextClick],
|
|
929
942
|
isShown: [showPrevButton, showNextButton],
|
|
930
943
|
btnClass: ['left-8', 'right-8'],
|
|
@@ -936,8 +949,8 @@
|
|
|
936
949
|
|
|
937
950
|
const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
|
|
938
951
|
|
|
939
|
-
const LinkList = JSX(({ className = '', documents,
|
|
940
|
-
return (jsx(
|
|
952
|
+
const LinkList = JSX(({ className = '', documents, ...rest }) => {
|
|
953
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white mt-[10px] ${className}`, ...rest, children: jsx("ul", { className: "flex flex-col text-sm text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
|
|
941
954
|
});
|
|
942
955
|
const renderLinkListItem = (documents) => {
|
|
943
956
|
return documents.map((doc, i) => {
|
|
@@ -965,9 +978,10 @@
|
|
|
965
978
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
966
979
|
return null;
|
|
967
980
|
}
|
|
968
|
-
const
|
|
981
|
+
const { style, ...rest } = block;
|
|
982
|
+
const classNameBlock = style2className(style);
|
|
969
983
|
const EmbeddedBlock = EmbeddableBlocks[type];
|
|
970
|
-
return (jsx(EmbeddedBlock, {
|
|
984
|
+
return (jsx(EmbeddedBlock, { className: `${className} ${classNameBlock}`, context: context, ...rest }, `block_${i}`));
|
|
971
985
|
};
|
|
972
986
|
|
|
973
987
|
const AccordionItemInner = JSX(({ blocks, context }) => {
|
|
@@ -1008,12 +1022,12 @@
|
|
|
1008
1022
|
center: 'text-center',
|
|
1009
1023
|
right: 'text-right',
|
|
1010
1024
|
};
|
|
1011
|
-
const Accordion = JSX(({ title, description, accordionItems, context, className = '',
|
|
1012
|
-
return (jsxs(
|
|
1025
|
+
const Accordion = JSX(({ title, description, accordionItems, context, className = '', accordionAlignTitle = 'center', ...rest }) => {
|
|
1026
|
+
return (jsxs(BlockWrapper, { context: context, className: `p-[50px] font-sans bg-white text-primary-text ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h4", className: `mb-2.5 ${ALIGN_TITLE[accordionAlignTitle]}`, title: title })) : null, description ? jsx("div", { className: "mb-2.5 text-base", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context }, `AccordionItem${i}`))) })) : null] }));
|
|
1013
1027
|
});
|
|
1014
1028
|
|
|
1015
|
-
const BenefitsBlock = JSX(({ className = '', headingType = 'h2', title, benefitList,
|
|
1016
|
-
return (jsxs(
|
|
1029
|
+
const BenefitsBlock = JSX(({ className = '', headingType = 'h2', title, benefitList, ...rest }) => {
|
|
1030
|
+
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: headingType, as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? renderBenefits(benefitList) : null] }));
|
|
1017
1031
|
});
|
|
1018
1032
|
const renderBenefits = (benefits) => {
|
|
1019
1033
|
return (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-9", children: benefits.map(renderStep) }));
|
|
@@ -1038,8 +1052,8 @@
|
|
|
1038
1052
|
};
|
|
1039
1053
|
|
|
1040
1054
|
const Bonus = JSX((props) => {
|
|
1041
|
-
const { className = '', title, description, bonusItems,
|
|
1042
|
-
return (jsx(
|
|
1055
|
+
const { className = '', title, description, bonusItems, ...rest } = props;
|
|
1056
|
+
return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container", children: [title ? jsx(Heading, { headingType: "h3", className: "text-center", title: title }) : null, description ? (jsx("div", { className: "text-md font-light text-center mt-[10px]", children: description })) : null, jsx("div", { className: "flex flex-wrap w-full mt-9", children: bonusItems
|
|
1043
1057
|
? bonusItems.map((_, i) => {
|
|
1044
1058
|
return (jsx("div", { className: "flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0", children: jsxs("div", { className: "flex justify-between w-full", children: [jsxs("div", { className: "mr-4", children: [jsx("div", { className: "text-title-sm", children: _.title }), jsx("div", { className: "text-md font-light mt-[14px] max-w-[488px]", children: _.description })] }), _.bonusCount ? (jsxs("div", { className: "relative -bottom-3 h-auto flex items-end mt-14 shrink-0", children: [jsx("span", { className: "font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7", children: _.bonusCount }), jsx("span", { className: "text-[44px] bg-clip-text text-transparent bg-green-to-yellow", children: _.bonusName })] })) : null] }) }, String(i)));
|
|
1045
1059
|
})
|
|
@@ -1059,8 +1073,8 @@
|
|
|
1059
1073
|
}
|
|
1060
1074
|
}
|
|
1061
1075
|
|
|
1062
|
-
const BonusBenefitsBlock = JSX(({ className = '', title, subtitle, bonusBenefits,
|
|
1063
|
-
return (jsxs(
|
|
1076
|
+
const BonusBenefitsBlock = JSX(({ className = '', title, subtitle, bonusBenefits, ...rest }) => {
|
|
1077
|
+
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-50 flex flex-col text-center ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-[10px]", title: title }) : null, subtitle ? jsx("span", { className: "text-md font-normal", children: subtitle }) : null, bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
|
|
1064
1078
|
});
|
|
1065
1079
|
const renderBonusBenefit = (bonusBenefit, i) => {
|
|
1066
1080
|
return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "title-2xs m-0", children: bonusBenefit.label }) : null })] }, String(i)));
|
|
@@ -1372,7 +1386,7 @@
|
|
|
1372
1386
|
return (jsx("section", { className: `box-border relative flex shrink-0 basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...blockCalcTabs, className: "flex justify-between" }) }) }, String(i)));
|
|
1373
1387
|
};
|
|
1374
1388
|
|
|
1375
|
-
const Calculator = JSX(({ className = '', context, calcTabs = [],
|
|
1389
|
+
const Calculator = JSX(({ className = '', context, calcTabs = [], ...rest }) => {
|
|
1376
1390
|
const tabsNav = calcTabs.map((_) => _.nav || {});
|
|
1377
1391
|
const blockCalcTabs = calcTabs.map(({ calculatorBlock }) => calculatorBlock || {});
|
|
1378
1392
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
@@ -1382,7 +1396,7 @@
|
|
|
1382
1396
|
const isGalleryScrollAvailable = calcTabs?.length > 3;
|
|
1383
1397
|
const showNextButton = isGalleryScrollAvailable && calcTabs?.length > tabsShift + 3;
|
|
1384
1398
|
const showPrevButton = tabsShift > 0;
|
|
1385
|
-
return (jsxs(
|
|
1399
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border overflow-hidden relative font-sans w-100 bg-white text-primary-text ${className}`, ...rest, children: [jsxs("div", { children: [tabsNav.length > 1
|
|
1386
1400
|
? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
|
|
1387
1401
|
: null, renderArrows({
|
|
1388
1402
|
handler: [handlePrevClick, handleNextClick],
|
|
@@ -1425,9 +1439,9 @@
|
|
|
1425
1439
|
const BLUR_BLOCK_CLASSES$1 = 'absolute top-0 bottom-0 w-[84px]';
|
|
1426
1440
|
const CARD_FULL_VIEW_COUNT$1 = 3;
|
|
1427
1441
|
const CARD_SHIFT$1 = 430;
|
|
1428
|
-
const Catalog = JSX(({ context, cards = [], className = '', title, description,
|
|
1442
|
+
const Catalog = JSX(({ context, cards = [], className = '', title, description, ...rest }) => {
|
|
1429
1443
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1430
|
-
return (jsxs(
|
|
1444
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white relative font-sans p-9 overflow-hidden text-center ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h2", className: "mb-6", title: title }) : null, description ? jsx(Description, { className: "mb-6", description: description }) : null, jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT$1}px)` }, role: "list", children: cards?.length ? cards.map(renderCatalogCard(context)) : null }), renderNavButtons$1({
|
|
1431
1445
|
cardsCount: cards.length,
|
|
1432
1446
|
activeCardIndex,
|
|
1433
1447
|
setActiveCardIndex,
|
|
@@ -1528,10 +1542,10 @@
|
|
|
1528
1542
|
return (jsxs("div", { children: [jsxs("div", { role: "table", children: [colHeaders?.length ? (jsx(ComparisonTableColumnHeaders, { colHeaders: colHeaders, activeCardIndex: activeCardIndex, router: router, handlerDecorator: handlerDecorator })) : null, rowData?.length ? (jsx(ComparisonTableRows, { rowData: rowData, activeCardIndex: activeCardIndex, isColoredFirstColumn: isColoredFirstColumn, ...tableArrowScrollProps })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
1529
1543
|
});
|
|
1530
1544
|
|
|
1531
|
-
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false,
|
|
1545
|
+
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, ...rest }) => {
|
|
1532
1546
|
const [isShowAllRow, setIsShowAllRow] = context.useState(!visibleRowLength);
|
|
1533
1547
|
const showToggle = () => setIsShowAllRow(!isShowAllRow);
|
|
1534
|
-
return (jsxs(
|
|
1548
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, ...rest, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center mb-9 mx-auto", title: title }), jsx(ComparisonTableBody, { context: context, columns: columns, rowHeaders: rowHeaders, isShowAllRow: isShowAllRow, isColoredFirstColumn: isColoredFirstColumn, visibleRowLength: visibleRowLength }), visibleRowLength
|
|
1535
1549
|
? renderShowMoreToggleButton({ isShowAllRow, onClick: showToggle })
|
|
1536
1550
|
: null] }));
|
|
1537
1551
|
});
|
|
@@ -1766,13 +1780,13 @@
|
|
|
1766
1780
|
address: 'Москва, ул.Ленина д.28',
|
|
1767
1781
|
distance: '6км',
|
|
1768
1782
|
};
|
|
1769
|
-
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют',
|
|
1783
|
+
const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', ...rest }) => {
|
|
1770
1784
|
const currencyRates = useExchangeRates(context.useAsyncData);
|
|
1771
1785
|
const currencyRatesBuy = currencyRates.filter((_) => _.buy);
|
|
1772
1786
|
currencyRatesBuy.unshift({ code: Currency.RUB });
|
|
1773
1787
|
const currencyRatesSell = currencyRates.filter((_) => _.sell);
|
|
1774
1788
|
currencyRatesSell.push({ code: Currency.RUB });
|
|
1775
|
-
return (jsx(
|
|
1789
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-[43px] pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell })) : null] }) }) }));
|
|
1776
1790
|
});
|
|
1777
1791
|
|
|
1778
1792
|
const LOGO_PATHS = [
|
|
@@ -1923,12 +1937,12 @@
|
|
|
1923
1937
|
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1924
1938
|
|
|
1925
1939
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
1926
|
-
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context,
|
|
1927
|
-
return (jsxs("footer",
|
|
1940
|
+
const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, ...rest }) => {
|
|
1941
|
+
return (jsxs(BlockWrapper, { Tag: "footer", context: context, className: `p-9 bg-white ${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, { context: context, 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, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, 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]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
|
|
1928
1942
|
});
|
|
1929
1943
|
|
|
1930
|
-
const GracePeriod = JSX(({ className = '', title, description, calendar,
|
|
1931
|
-
return (jsxs(
|
|
1944
|
+
const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => {
|
|
1945
|
+
return (jsxs(BlockWrapper, { className: `font-sans bg-white p-[50px] ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", className: "text-center", title: title }), jsx("div", { className: "font-light text-base-md text-center mt-3", children: description }), calendar ? renderCalendar(calendar) : null] }));
|
|
1932
1946
|
});
|
|
1933
1947
|
const renderCalendar = (calendar) => {
|
|
1934
1948
|
const colCount = calendar.reduce((accumulator, currentValue) => currentValue?.month?.length ? accumulator + currentValue.month.length : accumulator, 0) || 1;
|
|
@@ -1944,18 +1958,8 @@
|
|
|
1944
1958
|
const renderMonthNames = (item, colSize) => item.month.map((_, i) => (jsx("div", { style: { flexBasis: `${colSize}%` }, children: _.text }, `monthName-${i}`)));
|
|
1945
1959
|
const renderMonthImages = (item) => item.month.map((_) => _.image?.src ? (jsx("div", { className: "h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0", children: jsx(Img, { image: _.image, className: "flex" }) }, `monthImage-${_.image.src}`)) : null);
|
|
1946
1960
|
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab$1(onTabClick, isShowCounter, currentTag)) }));
|
|
1950
|
-
});
|
|
1951
|
-
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
|
|
1952
|
-
const renderTab$1 = (onTabClick, isShowCounter, currentTag) => (tab, i) => {
|
|
1953
|
-
const isActive = currentTag === tab.tag;
|
|
1954
|
-
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
1955
|
-
const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
|
|
1956
|
-
const counterBlockStyle = `${badgeStyle}
|
|
1957
|
-
${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
|
|
1958
|
-
return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 text-s-bold ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
|
|
1961
|
+
const filterBlocksByTag = (blocks, tag) => {
|
|
1962
|
+
return tag ? blocks.filter((block) => block?.tags?.includes(tag)) : blocks;
|
|
1959
1963
|
};
|
|
1960
1964
|
|
|
1961
1965
|
const EmbeddableGroupBlocks = {
|
|
@@ -1976,11 +1980,21 @@
|
|
|
1976
1980
|
return (jsx(EmbeddedBlock, { context: context, ...block, className: classNameBlock }, `block_${i}`));
|
|
1977
1981
|
};
|
|
1978
1982
|
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1983
|
+
const GroupBlockTabs = JSX((props) => {
|
|
1984
|
+
const { tabs, currentTag, onTabClick, className = '', isShowCounter } = props;
|
|
1985
|
+
return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab$1(onTabClick, isShowCounter, currentTag)) }));
|
|
1986
|
+
});
|
|
1987
|
+
const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
|
|
1988
|
+
const renderTab$1 = (onTabClick, isShowCounter, currentTag) => (tab, i) => {
|
|
1989
|
+
const isActive = currentTag === tab.tag;
|
|
1990
|
+
const tabBg = isActive ? 'bg-primary-main' : 'group bg-white';
|
|
1991
|
+
const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
|
|
1992
|
+
const counterBlockStyle = `${badgeStyle}
|
|
1993
|
+
${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
|
|
1994
|
+
return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 text-s-bold ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
|
|
1981
1995
|
};
|
|
1982
1996
|
|
|
1983
|
-
const GroupBlock = JSX(({ className = '', tabs, context,
|
|
1997
|
+
const GroupBlock = JSX(({ className = '', tabs, context, groupBlocks = [], isShowCounter, ...rest }) => {
|
|
1984
1998
|
const [currentTag, setCurrentTag] = context.useState(tabs?.[0]?.tag);
|
|
1985
1999
|
const filteredBlocks = filterBlocksByTag(groupBlocks, currentTag);
|
|
1986
2000
|
const tabsNewMap = tabs?.map((tab) => {
|
|
@@ -1989,7 +2003,7 @@
|
|
|
1989
2003
|
: groupBlocks.length;
|
|
1990
2004
|
return { ...tab, count };
|
|
1991
2005
|
});
|
|
1992
|
-
return (jsxs(
|
|
2006
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border gap-1 ${className}`, ...rest, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap, isShowCounter: isShowCounter })) : null, groupBlocks.length ? (jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks })) : null] }));
|
|
1993
2007
|
});
|
|
1994
2008
|
|
|
1995
2009
|
const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
|
|
@@ -2108,18 +2122,18 @@
|
|
|
2108
2122
|
'bg-white': 'bg-main-divider',
|
|
2109
2123
|
transparent: 'bg-main-divider opacity-30',
|
|
2110
2124
|
};
|
|
2111
|
-
const Header = JSX(({ className = '', defaultLocation = 'Москва', showSubMenu = true, bgColor = 'bg-white', context, topItems,
|
|
2125
|
+
const Header = JSX(({ className = '', defaultLocation = 'Москва', showSubMenu = true, bgColor = 'bg-white', context, topItems, logo, ...rest }) => {
|
|
2112
2126
|
const router = context.useRouter();
|
|
2113
2127
|
const sitemap = useSitemap(context.useAsyncData);
|
|
2114
2128
|
const { handlerDecorator } = context;
|
|
2115
2129
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
2116
2130
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
2117
2131
|
const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), "aria-label": _.text, bgColor: bgColor }, String(i))));
|
|
2118
|
-
return (jsx("header",
|
|
2132
|
+
return (jsx(BlockWrapper, { Tag: "header", context: context, className: `pt-6 pb-8 px-20 ${bgColor} ${className}`, ...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, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { context: context, subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
|
|
2119
2133
|
});
|
|
2120
2134
|
|
|
2121
|
-
const Insurance = JSX(({ className = '', title, description, image, benefits, sum, monthLimit }) => {
|
|
2122
|
-
return (jsxs(
|
|
2135
|
+
const Insurance = JSX(({ className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
|
|
2136
|
+
return (jsxs(BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center" }) : null, description ? jsx("div", { className: "text-center text-md mt-3", children: description }) : null, jsx("div", { children: jsxs("div", { className: "mt-5 mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? jsx(Img, { image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
|
|
2123
2137
|
});
|
|
2124
2138
|
function renderBenefit(benefit, i) {
|
|
2125
2139
|
return (jsxs("div", { className: "flex items-center gap-4", children: [benefit?.icon ? (jsx(Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, jsxs("div", { children: [benefit?.label ? jsx("div", { className: "text-title-2xs font-normal", children: benefit.label }) : null, benefit?.description ? (jsx("div", { className: "mt-0.5 font-light text-secondary-text font-light", children: benefit.description })) : null] })] }, String(i)));
|
|
@@ -2134,7 +2148,7 @@
|
|
|
2134
2148
|
return (jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [jsx("span", { className: "text-secondary-text text-base", children: title }), jsxs("span", { className: "text-primary-main text-title-2xs", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
|
|
2135
2149
|
}
|
|
2136
2150
|
|
|
2137
|
-
const InsuranceAmountBlockInner = JSX(({ className = '', context, cards = []
|
|
2151
|
+
const InsuranceAmountBlockInner = JSX(({ className = '', context, cards = [] }) => {
|
|
2138
2152
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2139
2153
|
const [tabsShift, setTabsShift] = context.useState(0);
|
|
2140
2154
|
const handleNextClick = () => setTabsShift(tabsShift + 1);
|
|
@@ -2144,7 +2158,7 @@
|
|
|
2144
2158
|
const showNextButton = isGalleryScrollAvailable && galleryLength > tabsShift + 2;
|
|
2145
2159
|
const isLastShift = galleryLength === tabsShift + 2;
|
|
2146
2160
|
const showPrevButton = tabsShift > 0;
|
|
2147
|
-
return (jsx("section", {
|
|
2161
|
+
return (jsx("section", { className: `min-w-full ${className}`, children: jsxs("div", { className: "relative mt-7 overflow-hidden", children: [galleryLength
|
|
2148
2162
|
? renderGallery({
|
|
2149
2163
|
tabsShift,
|
|
2150
2164
|
cards,
|
|
@@ -2182,9 +2196,9 @@
|
|
|
2182
2196
|
return isActive ? (jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4`, image: "DoneIcon", width: "24", height: "24" })) : null;
|
|
2183
2197
|
}
|
|
2184
2198
|
|
|
2185
|
-
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button,
|
|
2199
|
+
const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button, ...rest }) => {
|
|
2186
2200
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2187
|
-
return (jsxs(
|
|
2201
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title, headingType: "h3" }) : null, jsx("div", { className: "p-1.5 bg-secondary-light w-fit m-auto rounded-md mt-[34px]", children: insuranceTabs.map((item, i) => renderNavButton$1({
|
|
2188
2202
|
title: item?.title,
|
|
2189
2203
|
i,
|
|
2190
2204
|
activeSlideIndex,
|
|
@@ -2213,12 +2227,12 @@
|
|
|
2213
2227
|
primary: 'bg-white text-primary-text',
|
|
2214
2228
|
secondary: 'bg-primary-main text-white',
|
|
2215
2229
|
};
|
|
2216
|
-
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons,
|
|
2230
|
+
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons, version = 'primary', items, image, ...rest }) => {
|
|
2217
2231
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
2218
|
-
return (jsxs(
|
|
2232
|
+
return (jsxs(BlockWrapper, { context: context, className: `flex justify-between font-sans p-9 box-border relative
|
|
2219
2233
|
${getTileRightPadding(className)} ${getTileMinHeight(className)}
|
|
2220
2234
|
${mobileAppStyleMap[version]}
|
|
2221
|
-
${className}`,
|
|
2235
|
+
${className}`, ...rest, children: [jsx(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: "h3", title: title, className: `whitespace-pre-wrap max-w-[509px] mb-6
|
|
2222
2236
|
${textColorClass}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-[30px] gap-4" })) : null, children: jsxs("div", { className: "flex flex-1 items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", "aria-label": title, children: jsx("img", { src: qr.src, alt: title, title: title, width: "122", height: "122", className: "w-[122px] h-[122px] min-w-[122px] min-h-[122px] bg-secondary-light mr-[23px] rounded-md" }) })), renderList$1(version, items)] }) }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(Img, { image: image }) })) : null] }));
|
|
2223
2237
|
});
|
|
2224
2238
|
const renderList$1 = (version, items) => {
|
|
@@ -2227,18 +2241,18 @@
|
|
|
2227
2241
|
|
|
2228
2242
|
const NavigationItem = JSX(({ className, text, onClick, href, target, isActive }) => (jsx("a", { className: `bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${className || ''} ${isActive ? 'border-primary-main text-primary-main' : 'border-white text-secondary-text'}`, onClick: onClick, href: href, target: target, children: text })));
|
|
2229
2243
|
|
|
2230
|
-
const Navigation = JSX(({ className, context, title, buttons,
|
|
2244
|
+
const Navigation = JSX(({ className, context, title, buttons, ...rest }) => {
|
|
2231
2245
|
const router = context.useRouter();
|
|
2232
2246
|
const { handlerDecorator } = context;
|
|
2233
2247
|
const activeButton = findActiveSubItem(router)(buttons);
|
|
2234
|
-
return (jsxs(
|
|
2248
|
+
return (jsxs(BlockWrapper, { context: context, className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, ...rest, children: [jsx("h2", { className: "font-medium text-xl-light m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
2235
2249
|
.filter(({ text }) => text)
|
|
2236
2250
|
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
2237
2251
|
});
|
|
2238
2252
|
|
|
2239
2253
|
const TEXT_CLASSES = 'font-sans font-normal text-m-md';
|
|
2240
2254
|
const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
|
|
2241
|
-
const NavigatorTabItem = JSX(({ className = '', text, active,
|
|
2255
|
+
const NavigatorTabItem = JSX(({ className = '', text, active, onClick, href, target = '_self', children }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: text || children }) })));
|
|
2242
2256
|
const getLinkClasses = (className, active) => {
|
|
2243
2257
|
const classes = active ? 'bg-primary-main' : 'group bg-white';
|
|
2244
2258
|
return `${classes} ${LINK_CLASSES} ${className}`;
|
|
@@ -2248,16 +2262,15 @@
|
|
|
2248
2262
|
return `${classes} ${TEXT_CLASSES}`;
|
|
2249
2263
|
};
|
|
2250
2264
|
|
|
2251
|
-
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context,
|
|
2252
|
-
|
|
2253
|
-
return (jsx("section", { className: `sticky top-0 z-20 box-border flex gap-x-1 h-14 ${className}`, id: anchor, children: navigatorTabs ? navigatorTabs.map(renderTab(context, href)) : null }));
|
|
2265
|
+
const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, ...rest }) => {
|
|
2266
|
+
return (jsx(BlockWrapper, { context: context, className: `sticky top-0 z-20 box-border flex gap-x-1 h-14 ${className}`, ...rest, children: navigatorTabs ? navigatorTabs.map(renderTab(context)) : null }));
|
|
2254
2267
|
});
|
|
2255
|
-
const renderTab = (context
|
|
2256
|
-
const {
|
|
2268
|
+
const renderTab = (context) => (tab, i) => {
|
|
2269
|
+
const { handlerDecorator, useRouter } = context;
|
|
2257
2270
|
const router = useRouter();
|
|
2258
|
-
const hash = getHash(href);
|
|
2271
|
+
const hash = getHash(router.href);
|
|
2259
2272
|
const active = hash ? tab.href === hash : i === 0;
|
|
2260
|
-
return (jsx(NavigatorTabItem, { active: active, ...useLink({ router, handlerDecorator }, tab) }, tab.
|
|
2273
|
+
return (jsx(NavigatorTabItem, { active: active, ...useLink({ router, handlerDecorator }, tab) }, tab.text));
|
|
2261
2274
|
};
|
|
2262
2275
|
|
|
2263
2276
|
const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
|
|
@@ -2305,13 +2318,13 @@
|
|
|
2305
2318
|
return jsx("div", { className: "box-border", children: children });
|
|
2306
2319
|
});
|
|
2307
2320
|
|
|
2308
|
-
const OtherProducts = JSX(({ blockItems, colorPalette, context, className = '' }) => {
|
|
2309
|
-
return (jsx(
|
|
2321
|
+
const OtherProducts = JSX(({ blockItems, colorPalette, context, className = '', ...rest }) => {
|
|
2322
|
+
return (jsx(BlockWrapper, { context: context, className: `font-sans text-primary-text ${className}`, ...rest, children: blockItems?.length ? (jsx("div", { className: "box-border1", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, dataTheme: colorPalette, context: context }, `BlockItem${i}`))) })) : null }));
|
|
2310
2323
|
});
|
|
2311
2324
|
|
|
2312
2325
|
const GOLDEN_RATIO = 1.618;
|
|
2313
|
-
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...',
|
|
2314
|
-
return (jsx(
|
|
2326
|
+
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', ...rest }) => {
|
|
2327
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
|
|
2315
2328
|
});
|
|
2316
2329
|
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
2317
2330
|
.map((_) => Math.floor(_))
|
|
@@ -2331,12 +2344,12 @@
|
|
|
2331
2344
|
primary: 'bg-white text-primary-text',
|
|
2332
2345
|
secondary: 'bg-primary-main text-white',
|
|
2333
2346
|
};
|
|
2334
|
-
const ProductGallery = JSX(({ className = '', context, slides = [], version = 'primary',
|
|
2347
|
+
const ProductGallery = JSX(({ className = '', context, slides = [], version = 'primary', ...rest }) => {
|
|
2335
2348
|
const galleryNav = slides.map((s) => s.nav);
|
|
2336
2349
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
2337
2350
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
2338
|
-
return (jsxs(
|
|
2339
|
-
${productGalleryStyleMap[version]}`, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2351
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border pt-[50px] overflow-hidden relative font-sans w-100 ${className}
|
|
2352
|
+
${productGalleryStyleMap[version]}`, ...rest, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
2340
2353
|
slide,
|
|
2341
2354
|
i,
|
|
2342
2355
|
activeSlideIndex,
|
|
@@ -2371,8 +2384,8 @@
|
|
|
2371
2384
|
primary: 'bg-white text-primary-text',
|
|
2372
2385
|
secondary: 'bg-primary-main text-white',
|
|
2373
2386
|
};
|
|
2374
|
-
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary',
|
|
2375
|
-
return (jsx(
|
|
2387
|
+
const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => {
|
|
2388
|
+
return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: jsxs("div", { className: "mt-1.5", children: [date ? jsx("div", { className: "text-sm mb-2", children: formatDate(date) }) : null, jsx("div", { className: "text-base", children: description })] }) }) }));
|
|
2376
2389
|
});
|
|
2377
2390
|
function formatDate(date) {
|
|
2378
2391
|
const dateObj = new Date(date);
|
|
@@ -2391,11 +2404,11 @@
|
|
|
2391
2404
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
2392
2405
|
const CARD_FULL_VIEW_COUNT = 2;
|
|
2393
2406
|
const CARD_SHIFT = 525;
|
|
2394
|
-
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version,
|
|
2407
|
+
const Recommendation = JSX(({ context, recommendations = [], className = '', title, version, ...rest }) => {
|
|
2395
2408
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
2396
2409
|
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
2397
2410
|
const cardClassName = version === 'secondary' ? 'border-white/50' : 'border-main-stroke';
|
|
2398
|
-
return (jsxs(
|
|
2411
|
+
return (jsxs(BlockWrapper, { context: context, className: `relative font-sans p-9 overflow-hidden text-center ${blockClassName} ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h2", className: "mb-6", title: title }) : null, jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
2399
2412
|
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
2400
2413
|
: null }), renderNavButtons({
|
|
2401
2414
|
cardsCount: recommendations.length,
|
|
@@ -2420,6 +2433,8 @@
|
|
|
2420
2433
|
}) }));
|
|
2421
2434
|
};
|
|
2422
2435
|
|
|
2436
|
+
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
2437
|
+
|
|
2423
2438
|
const STEPS_BLOCK_STYLE_MAPS = {
|
|
2424
2439
|
primary: {
|
|
2425
2440
|
background: 'bg-white',
|
|
@@ -2438,19 +2453,17 @@
|
|
|
2438
2453
|
};
|
|
2439
2454
|
const getStyleMap = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
2440
2455
|
|
|
2441
|
-
const
|
|
2442
|
-
|
|
2443
|
-
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, anchor = null, version = 'primary', }) => {
|
|
2456
|
+
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, version = 'primary', ...rest }) => {
|
|
2444
2457
|
const styleMap = getStyleMap(version);
|
|
2445
2458
|
const shortGaps = steps.length > 3;
|
|
2446
|
-
return (jsxs(
|
|
2459
|
+
return (jsxs(BlockWrapper, { className: [
|
|
2447
2460
|
'box-border font-sans text-primary-text bg-white',
|
|
2448
2461
|
shortGaps ? 'px-20' : 'px-[70px]',
|
|
2449
2462
|
'py-[50px] flex flex-col items-center',
|
|
2450
2463
|
styleMap.background,
|
|
2451
2464
|
styleMap.title,
|
|
2452
2465
|
className,
|
|
2453
|
-
].join(' '),
|
|
2466
|
+
].join(' '), ...rest, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle(styleMap, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "mt-8 w-full max-w-[240px]", version: "primary", ...button })) : null] }));
|
|
2454
2467
|
});
|
|
2455
2468
|
const renderStepIcon = (styleMap) => ({ icon }, i) => {
|
|
2456
2469
|
return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 ${styleMap.iconBackground}`, children: checkIsIconRenderable(icon) ? (jsx(Img, { image: icon, width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `font-normal text-title-sm ${styleMap.title}`, children: i + 1 })) }) }, String(i)));
|
|
@@ -2478,7 +2491,7 @@
|
|
|
2478
2491
|
return (jsxs(TableRowContainer, { children: [jsx("div", { className: `text-sm py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", children: [header?.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH, version: "tariff", children: data.map((cell, i) => (jsx(TariffsTableCell, { cell: cell, isLastRow: isLastRow }, String(i)))) })) : null] }));
|
|
2479
2492
|
});
|
|
2480
2493
|
|
|
2481
|
-
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns,
|
|
2494
|
+
const TariffsTable = JSX(({ className, context, title, description, rowHeaders, columns, hiddenRowsNum = 0, ...rest }) => {
|
|
2482
2495
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
2483
2496
|
const colData = getColData(columns);
|
|
2484
2497
|
const rowData = getRowData(rowHeaders, colData);
|
|
@@ -2489,7 +2502,7 @@
|
|
|
2489
2502
|
setActiveCardIndex,
|
|
2490
2503
|
});
|
|
2491
2504
|
const foldableBlocks = rowData?.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i))));
|
|
2492
|
-
return (jsxs(
|
|
2505
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h2", className: `text-center ${description ? 'mb-2.5' : 'mb-9'}`, title: title })) : null, description ? jsx("div", { className: "mb-9 text-center text-m-base", children: description }) : null, rowData?.length ? (jsx(Foldable, { blocks: foldableBlocks, hiddenBlocksNum: hiddenRowsNum, context: context, render: (children) => (jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: children })), foldButtonLabel: "\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C" })) : null] }));
|
|
2493
2506
|
});
|
|
2494
2507
|
const getColData = (columns) => columns?.map(({ data }) => data) || [];
|
|
2495
2508
|
const getRowData = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
@@ -2537,22 +2550,6 @@
|
|
|
2537
2550
|
BonusBenefitsBlock,
|
|
2538
2551
|
};
|
|
2539
2552
|
|
|
2540
|
-
const changeHashOnScroll = (router, blocks) => {
|
|
2541
|
-
blocks?.forEach((block) => {
|
|
2542
|
-
const currentHash = globalThis.location?.hash; // TODO: remove globalThis, use href from router
|
|
2543
|
-
const anchorHash = `#${block?.id}`;
|
|
2544
|
-
if (currentHash === anchorHash) {
|
|
2545
|
-
return;
|
|
2546
|
-
}
|
|
2547
|
-
const position = block?.getBoundingClientRect();
|
|
2548
|
-
if (position && position.top > 0 && position.top < 150) {
|
|
2549
|
-
router.replace(`#${block?.id}`);
|
|
2550
|
-
}
|
|
2551
|
-
});
|
|
2552
|
-
};
|
|
2553
|
-
|
|
2554
|
-
const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
2555
|
-
|
|
2556
2553
|
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
2557
2554
|
const renderLikeIcon = () => {
|
|
2558
2555
|
const params = {
|
|
@@ -2564,22 +2561,14 @@
|
|
|
2564
2561
|
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10", d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
|
|
2565
2562
|
};
|
|
2566
2563
|
|
|
2567
|
-
const LikeControl = JSX(({ className, context,
|
|
2564
|
+
const LikeControl = JSX(({ className, context, ...rest }) => {
|
|
2568
2565
|
const likeService = context.useLikeService();
|
|
2569
|
-
return (jsxs("div",
|
|
2566
|
+
return (jsxs(BlockWrapper, { Tag: "div", context: context, className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, ...rest, children: [jsx(LikeButton, { onClick: 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: 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 })] }));
|
|
2570
2567
|
});
|
|
2571
2568
|
|
|
2572
|
-
const isClient = !isSSR();
|
|
2573
2569
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
2574
2570
|
const ContentPage = JSX(({ className = '', context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
|
|
2575
2571
|
const { header } = slots;
|
|
2576
|
-
const router = context.useRouter();
|
|
2577
|
-
// listener is for NavigatorTabs
|
|
2578
|
-
isClient &&
|
|
2579
|
-
globalThis.addEventListener('load', () => {
|
|
2580
|
-
const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
|
|
2581
|
-
globalThis.document.addEventListener('scroll', () => changeHashOnScroll(router, sectionsWithAnchors));
|
|
2582
|
-
});
|
|
2583
2572
|
return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, likeControl ? (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") })) : null] }));
|
|
2584
2573
|
});
|
|
2585
2574
|
function renderBlock({ block, blockDecorator, blocksRegistry, context }, i) {
|