@redneckz/wildless-cms-uni-blocks 0.6.34 → 0.6.36
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 +214 -71
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/constants.d.ts +3 -0
- package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/bundle/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/bundle/hooks/useIntersectionObserver.d.ts +7 -1
- package/bundle/services/sitemap/SitemapProps.d.ts +1 -2
- package/bundle/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/bundle/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/bundle/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/bundle/utils/areArraysEqual.d.ts +1 -0
- package/bundle/utils/mapChildren.d.ts +2 -0
- package/bundle/utils/maxBy.d.ts +2 -2
- package/bundle/utils/minBy.d.ts +1 -0
- package/dist/components/Blocks.js +3 -1
- package/dist/components/Blocks.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/Carousel/Carousel.js +14 -15
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +12 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +1 -1
- package/dist/components/Header/Header.js +2 -2
- package/dist/components/Header/Header.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/Header/HeaderSubMenu.js +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/dist/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +10 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +5 -3
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/hooks/useIntersectionObserver.d.ts +7 -1
- package/dist/hooks/useIntersectionObserver.js +10 -1
- package/dist/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/hooks/useLink.js +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/services/sitemap/SitemapProps.d.ts +1 -2
- package/dist/ui-kit/BlockWrapper.js +1 -11
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/dist/ui-kit/Button/ArrowButton.js +3 -1
- package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +35 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/dist/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js +16 -0
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.js +8 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToEnd.js +7 -0
- package/dist/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollToStart.js +7 -0
- package/dist/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +57 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/dist/utils/areArraysEqual.d.ts +1 -0
- package/dist/utils/areArraysEqual.js +5 -0
- package/dist/utils/areArraysEqual.js.map +1 -0
- package/dist/utils/mapChildren.d.ts +2 -0
- package/dist/utils/mapChildren.js +10 -0
- package/dist/utils/mapChildren.js.map +1 -0
- package/dist/utils/maxBy.d.ts +2 -2
- package/dist/utils/maxBy.js +4 -4
- package/dist/utils/maxBy.js.map +1 -1
- package/dist/utils/minBy.d.ts +1 -0
- package/dist/utils/minBy.js +6 -0
- package/dist/utils/minBy.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +3 -1
- package/lib/components/Blocks.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/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +14 -15
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +8 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +10 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.d.ts +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +1 -1
- package/lib/components/Header/Header.js +2 -2
- package/lib/components/Header/Header.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/Header/HeaderSubMenu.js +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/lib/components/Header/HeaderSubMenuItem.js +1 -1
- package/lib/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +10 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +5 -3
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.d.ts +7 -1
- package/lib/hooks/useIntersectionObserver.js +11 -2
- package/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/hooks/useLink.js +2 -2
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/services/sitemap/SitemapProps.d.ts +1 -2
- package/lib/ui-kit/BlockWrapper.js +1 -11
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/lib/ui-kit/Button/ArrowButton.js +2 -0
- package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +33 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/lib/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js +14 -0
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.js +5 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToEnd.js +4 -0
- package/lib/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollToStart.js +4 -0
- package/lib/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +54 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/lib/utils/areArraysEqual.d.ts +1 -0
- package/lib/utils/areArraysEqual.js +2 -0
- package/lib/utils/areArraysEqual.js.map +1 -0
- package/lib/utils/mapChildren.d.ts +2 -0
- package/lib/utils/mapChildren.js +7 -0
- package/lib/utils/mapChildren.js.map +1 -0
- package/lib/utils/maxBy.d.ts +2 -2
- package/lib/utils/maxBy.js +2 -2
- package/lib/utils/maxBy.js.map +1 -1
- package/lib/utils/minBy.d.ts +1 -0
- package/lib/utils/minBy.js +3 -0
- package/lib/utils/minBy.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +141 -140
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/constants.d.ts +3 -0
- package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +22 -0
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +1 -0
- package/mobile/bundle/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/mobile/bundle/hooks/useIntersectionObserver.d.ts +7 -1
- package/mobile/bundle/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/bundle/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/mobile/bundle/utils/areArraysEqual.d.ts +1 -0
- package/mobile/bundle/utils/mapChildren.d.ts +2 -0
- package/mobile/bundle/utils/maxBy.d.ts +2 -2
- package/mobile/bundle/utils/minBy.d.ts +1 -0
- 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/Carousel/Carousel.js +14 -15
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +12 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +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/Header/HeaderSubMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/mobile/dist/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +10 -1
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +5 -3
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/hooks/useIntersectionObserver.d.ts +7 -1
- package/mobile/dist/hooks/useIntersectionObserver.js +10 -1
- package/mobile/dist/hooks/useIntersectionObserver.js.map +1 -1
- package/mobile/dist/hooks/useLink.js +1 -1
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/dist/ui-kit/BlockWrapper.js +1 -11
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/mobile/dist/ui-kit/Button/ArrowButton.js +3 -1
- package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +35 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +16 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.js +8 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToEnd.js +7 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToStart.js +7 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +57 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/mobile/dist/utils/areArraysEqual.d.ts +1 -0
- package/mobile/dist/utils/areArraysEqual.js +5 -0
- package/mobile/dist/utils/areArraysEqual.js.map +1 -0
- package/mobile/dist/utils/mapChildren.d.ts +2 -0
- package/mobile/dist/utils/mapChildren.js +10 -0
- package/mobile/dist/utils/mapChildren.js.map +1 -0
- package/mobile/dist/utils/maxBy.d.ts +2 -2
- package/mobile/dist/utils/maxBy.js +4 -4
- package/mobile/dist/utils/maxBy.js.map +1 -1
- package/mobile/dist/utils/minBy.d.ts +1 -0
- package/mobile/dist/utils/minBy.js +6 -0
- package/mobile/dist/utils/minBy.js.map +1 -0
- 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/Carousel/Carousel.js +14 -15
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +5 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +10 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +12 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js +2 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +7 -13
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +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/Header/HeaderSubMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.d.ts +2 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenuItem.js.map +1 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +1 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +10 -1
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +5 -3
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/hooks/useIntersectionObserver.d.ts +7 -1
- package/mobile/lib/hooks/useIntersectionObserver.js +11 -2
- package/mobile/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/mobile/lib/hooks/useLink.js +2 -2
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/services/sitemap/SitemapProps.d.ts +1 -2
- package/mobile/lib/ui-kit/BlockWrapper.js +1 -11
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +2 -0
- package/mobile/lib/ui-kit/Button/ArrowButton.js +2 -0
- package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +19 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +33 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +17 -38
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +7 -4
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +10 -27
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +3 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.d.ts +14 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +14 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.js +5 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToEnd.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToEnd.js +4 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToEnd.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToStart.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToStart.js +4 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollToStart.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +17 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +54 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -0
- package/mobile/lib/utils/areArraysEqual.d.ts +1 -0
- package/mobile/lib/utils/areArraysEqual.js +2 -0
- package/mobile/lib/utils/areArraysEqual.js.map +1 -0
- package/mobile/lib/utils/mapChildren.d.ts +2 -0
- package/mobile/lib/utils/mapChildren.js +7 -0
- package/mobile/lib/utils/mapChildren.js.map +1 -0
- package/mobile/lib/utils/maxBy.d.ts +2 -2
- package/mobile/lib/utils/maxBy.js +2 -2
- package/mobile/lib/utils/maxBy.js.map +1 -1
- package/mobile/lib/utils/minBy.d.ts +1 -0
- package/mobile/lib/utils/minBy.js +3 -0
- package/mobile/lib/utils/minBy.js.map +1 -0
- package/mobile/src/common.css +0 -7
- 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/Carousel/Carousel.tsx +41 -23
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +25 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +36 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.ui.json +1 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +13 -0
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +44 -43
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +1 -1
- package/mobile/src/components/Gallery/Gallery.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/mobile/src/components/Header/HeaderSubMenu.tsx +2 -4
- package/mobile/src/components/Header/HeaderSubMenuItem.tsx +5 -2
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +1 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +10 -1
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +5 -3
- package/mobile/src/hooks/useIntersectionObserver.ts +23 -2
- package/mobile/src/hooks/useLink.ts +2 -2
- package/mobile/src/services/sitemap/SitemapProps.ts +1 -2
- package/mobile/src/ui-kit/BlockWrapper.tsx +1 -16
- package/mobile/src/ui-kit/Button/ArrowButton.tsx +13 -0
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +3 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +97 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +31 -55
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +25 -59
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +3 -3
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +44 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollBy.ts +10 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollToEnd.ts +3 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollToStart.ts +3 -0
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +84 -0
- package/mobile/src/utils/areArraysEqual.ts +2 -0
- package/mobile/src/utils/mapChildren.ts +11 -0
- package/mobile/src/utils/maxBy.ts +3 -4
- package/mobile/src/utils/minBy.ts +5 -0
- package/package.json +2 -2
- package/src/common.css +0 -7
- package/src/components/Blocks.ts +3 -1
- package/src/components/Calculator/Calculator.fixture.tsx +0 -5
- 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/Carousel/Carousel.fixture.tsx +20 -0
- package/src/components/Carousel/Carousel.tsx +41 -23
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +25 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +38 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +36 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.ui.json +1 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +13 -0
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +2 -2
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +44 -43
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +1 -1
- package/src/components/Gallery/Gallery.mobile.tsx +1 -1
- package/src/components/Header/Header.tsx +2 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +12 -9
- package/src/components/Header/HeaderSubMenu.tsx +2 -4
- package/src/components/Header/HeaderSubMenuItem.tsx +5 -2
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +1 -1
- package/src/components/RollupItem/RollupItem.tsx +10 -1
- package/src/components/VerticalLayout/VerticalLayout.tsx +5 -3
- package/src/hooks/useIntersectionObserver.ts +23 -2
- package/src/hooks/useLink.ts +2 -2
- package/src/services/sitemap/SitemapProps.ts +1 -2
- package/src/ui-kit/BlockWrapper.tsx +1 -16
- package/src/ui-kit/Button/ArrowButton.tsx +13 -0
- package/src/ui-kit/Foldable/FoldableSection.tsx +3 -1
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +97 -0
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +31 -55
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +25 -59
- package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +3 -3
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +44 -0
- package/src/ui-kit/SwipeListControl/scrollBy.ts +10 -0
- package/src/ui-kit/SwipeListControl/scrollToEnd.ts +3 -0
- package/src/ui-kit/SwipeListControl/scrollToStart.ts +3 -0
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +84 -0
- package/src/utils/areArraysEqual.ts +2 -0
- package/src/utils/mapChildren.ts +11 -0
- package/src/utils/maxBy.ts +3 -4
- package/src/utils/minBy.ts +5 -0
- package/bundle/components/Carousel/CarouselContainer.d.ts +0 -10
- package/bundle/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/bundle/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/bundle/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/bundle/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/bundle/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/bundle/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/dist/components/Carousel/CarouselContainer.d.ts +0 -10
- package/dist/components/Carousel/CarouselContainer.js +0 -14
- package/dist/components/Carousel/CarouselContainer.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -8
- package/dist/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.js +0 -11
- package/dist/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/dist/ui-kit/SwipeListControl/constants.js +0 -12
- package/dist/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -13
- package/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -19
- package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -33
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/lib/components/Carousel/CarouselContainer.d.ts +0 -10
- package/lib/components/Carousel/CarouselContainer.js +0 -12
- package/lib/components/Carousel/CarouselContainer.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -6
- package/lib/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.js +0 -9
- package/lib/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/lib/ui-kit/SwipeListControl/constants.js +0 -10
- package/lib/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -10
- package/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -7
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -16
- package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -11
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -30
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/mobile/bundle/components/Carousel/CarouselContainer.d.ts +0 -10
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/mobile/bundle/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/mobile/bundle/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/mobile/bundle/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/mobile/bundle/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/mobile/dist/components/Carousel/CarouselContainer.d.ts +0 -10
- package/mobile/dist/components/Carousel/CarouselContainer.js +0 -14
- package/mobile/dist/components/Carousel/CarouselContainer.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -8
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.js +0 -11
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/mobile/dist/ui-kit/SwipeListControl/constants.js +0 -12
- package/mobile/dist/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -13
- package/mobile/dist/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -19
- package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -33
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/mobile/lib/components/Carousel/CarouselContainer.d.ts +0 -10
- package/mobile/lib/components/Carousel/CarouselContainer.js +0 -12
- package/mobile/lib/components/Carousel/CarouselContainer.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +0 -9
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.js +0 -6
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +0 -11
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.js +0 -9
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/constants.d.ts +0 -2
- package/mobile/lib/ui-kit/SwipeListControl/constants.js +0 -10
- package/mobile/lib/ui-kit/SwipeListControl/constants.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getContainerStyle.d.ts +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js +0 -10
- package/mobile/lib/ui-kit/SwipeListControl/utils/getContainerStyle.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.d.ts +0 -4
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +0 -16
- package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +0 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +0 -8
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +0 -30
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +0 -1
- package/mobile/src/components/Carousel/CarouselContainer.tsx +0 -34
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlItem.tsx +0 -24
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlList.tsx +0 -50
- package/mobile/src/ui-kit/SwipeListControl/constants.ts +0 -10
- package/mobile/src/ui-kit/SwipeListControl/utils/getContainerStyle.ts +0 -9
- package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +0 -25
- package/mobile/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +0 -49
- package/src/components/Carousel/CarouselContainer.tsx +0 -34
- package/src/ui-kit/SwipeListControl/SwipeListControlItem.tsx +0 -24
- package/src/ui-kit/SwipeListControl/SwipeListControlList.tsx +0 -50
- package/src/ui-kit/SwipeListControl/constants.ts +0 -10
- package/src/ui-kit/SwipeListControl/utils/getContainerStyle.ts +0 -9
- package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +0 -25
- package/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +0 -49
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BonusCalculatorSourceBookParams } from './useBonusCalculatorParams';
|
|
2
2
|
import { CreditCalculatorSourceBookParams } from './useCreditCalculatorParams';
|
|
3
|
+
import { DepositCalculatorSourceBookParams } from './useDepositCalculatorParams';
|
|
3
4
|
|
|
4
5
|
export const DEFAULT_MIN_SUM = 60000;
|
|
5
6
|
export const DEFAULT_MAX_SUM = 2000000;
|
|
@@ -41,5 +42,15 @@ export const DEFAULT_BONUS_CALCULATOR_PARAMS: BonusCalculatorSourceBookParams =
|
|
|
41
42
|
restBonusRate: 0.01,
|
|
42
43
|
};
|
|
43
44
|
|
|
45
|
+
export const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams = {
|
|
46
|
+
minSum: 50000,
|
|
47
|
+
maxSum: 5000000,
|
|
48
|
+
minMonths: 2,
|
|
49
|
+
maxMonths: 120,
|
|
50
|
+
rate: 5.9,
|
|
51
|
+
isMonthlyInterestPayment: true,
|
|
52
|
+
};
|
|
53
|
+
|
|
44
54
|
export const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
|
|
45
55
|
export const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
|
|
56
|
+
export const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DEFAULT_DEPOSIT_CALCULATOR_PARAMS, DEPOSIT_CALC_DEFAULT_DIR } from './constants';
|
|
2
|
+
import { useCalculatorParams } from './useCalculatorParams';
|
|
3
|
+
|
|
4
|
+
export interface CommonDepositParams {
|
|
5
|
+
isMonthlyInterestPayment: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface DepositCalculatorSourceBookParams extends CommonDepositParams {
|
|
8
|
+
minSum: number;
|
|
9
|
+
maxSum: number;
|
|
10
|
+
minMonths: number;
|
|
11
|
+
maxMonths: number;
|
|
12
|
+
rate: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DepositCalculatorUserInputParams extends CommonDepositParams {
|
|
16
|
+
moneyValue: number;
|
|
17
|
+
monthsValue: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DepositCalculatorParams
|
|
21
|
+
extends DepositCalculatorSourceBookParams,
|
|
22
|
+
DepositCalculatorUserInputParams {
|
|
23
|
+
income: number;
|
|
24
|
+
finalSum: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type DepositCalculatorData = {
|
|
28
|
+
rows: DepositCalculatorSourceBookParams[];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const useDepositCalculatorParams = (
|
|
32
|
+
userInputParams: DepositCalculatorUserInputParams,
|
|
33
|
+
sourceBookDir?: string,
|
|
34
|
+
): DepositCalculatorParams => {
|
|
35
|
+
const { isMonthlyInterestPayment, moneyValue } = userInputParams;
|
|
36
|
+
|
|
37
|
+
const data = useCalculatorParams<DepositCalculatorData>(
|
|
38
|
+
sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const depositCalculatorSourceBookParams =
|
|
42
|
+
data?.rows.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment) ||
|
|
43
|
+
DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
44
|
+
|
|
45
|
+
const { rate } = depositCalculatorSourceBookParams;
|
|
46
|
+
|
|
47
|
+
const income = getDepositIncome(rate, userInputParams);
|
|
48
|
+
const finalSum = moneyValue + income;
|
|
49
|
+
|
|
50
|
+
return { ...depositCalculatorSourceBookParams, ...userInputParams, income, finalSum };
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const getDepositIncome = (rate: number, userInputParams: DepositCalculatorUserInputParams) => {
|
|
54
|
+
const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
|
|
55
|
+
|
|
56
|
+
if (isMonthlyInterestPayment) {
|
|
57
|
+
return Math.round(moneyValue * Math.pow((1200 + rate) / 1200, monthsValue) - moneyValue);
|
|
58
|
+
} else {
|
|
59
|
+
/*
|
|
60
|
+
Приблизительный расчёт, не учитывающий разницу в количестве дней в месяцах. Месяц принят за 30 дней, год за 365 дней.
|
|
61
|
+
*/
|
|
62
|
+
return Math.round((moneyValue * rate * 30 * monthsValue) / 365 / 100);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -1,58 +1,76 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
2
|
import { renderChildren } from '../../BlockRenderer/renderChildren';
|
|
4
|
-
import { useCarouselControls } from '../../hooks/useCarouselControls';
|
|
5
3
|
import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
|
|
6
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { ScrollLeftButton, ScrollRightButton } from '../../ui-kit/Button/ArrowButton';
|
|
6
|
+
import { SwipeListContainer } from '../../ui-kit/SwipeListControl/SwipeListContainer';
|
|
7
|
+
import {
|
|
8
|
+
SwipeListScroll,
|
|
9
|
+
useSwipeListScroll,
|
|
10
|
+
} from '../../ui-kit/SwipeListControl/useSwipeListScroll';
|
|
9
11
|
import type { CarouselContent } from './CarouselContent';
|
|
10
12
|
|
|
11
13
|
export interface CarouselProps extends CarouselContent, UniBlockProps {
|
|
12
14
|
itemCount?: number;
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
const ITEMS_GAP = 4;
|
|
18
|
+
|
|
15
19
|
const blurBaseStyle = 'absolute top-0 bottom-0 z-50 w-[84px]';
|
|
20
|
+
const scrollButtonStyle = 'absolute top-1/2 z-50';
|
|
16
21
|
|
|
17
22
|
export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
|
|
18
23
|
({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, ...rest }) => {
|
|
19
24
|
const { blocks: childBlocks } = rest.block || {};
|
|
20
25
|
const count = itemCount || childBlocks?.length || 0;
|
|
21
26
|
|
|
22
|
-
const containerRef =
|
|
23
|
-
|
|
24
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
27
|
+
const [containerRef, scroll] = useSwipeListScroll<HTMLDivElement>({
|
|
25
28
|
itemCount: count,
|
|
26
|
-
visibleItemCount,
|
|
27
29
|
isCyclic,
|
|
28
|
-
container: containerRef.current,
|
|
29
30
|
});
|
|
30
|
-
const { isScrollAvailable } = controls;
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
|
-
<BlockWrapper className={`relative font-sans
|
|
34
|
-
<
|
|
35
|
-
activeIndex={activeIndex}
|
|
36
|
-
itemCount={count}
|
|
37
|
-
visibleItemCount={visibleItemCount}
|
|
33
|
+
<BlockWrapper className={`relative font-sans ${className}`} {...rest}>
|
|
34
|
+
<SwipeListContainer
|
|
38
35
|
containerRef={containerRef}
|
|
36
|
+
visibleItemCount={visibleItemCount}
|
|
37
|
+
snapAlign="snap-start"
|
|
38
|
+
gap={ITEMS_GAP}
|
|
39
|
+
onVisibleIndicesChange={scroll.handleVisibleIndicesChange}
|
|
39
40
|
>
|
|
40
41
|
{renderChildren(rest)}
|
|
41
|
-
</
|
|
42
|
-
{
|
|
42
|
+
</SwipeListContainer>
|
|
43
|
+
{(scroll.canScrollLeft || scroll.canScrollRight) && isBlur ? (
|
|
43
44
|
<div>
|
|
44
45
|
<div className={`${blurBaseStyle} left-0 bg-opacity-from-white`} />
|
|
45
46
|
<div className={`${blurBaseStyle} right-0 bg-opacity-to-white`} />
|
|
46
47
|
</div>
|
|
47
48
|
) : null}
|
|
48
|
-
{
|
|
49
|
-
...controls,
|
|
50
|
-
btnClass: ['left-8', 'right-8'],
|
|
51
|
-
className: 'top-1/2',
|
|
52
|
-
})}
|
|
49
|
+
{renderScrollButtons(scroll)}
|
|
53
50
|
</BlockWrapper>
|
|
54
51
|
);
|
|
55
52
|
},
|
|
56
53
|
);
|
|
57
54
|
|
|
58
|
-
Carousel.childrenTypes = [
|
|
55
|
+
Carousel.childrenTypes = [
|
|
56
|
+
'CarouselCard',
|
|
57
|
+
'CarouselTariffsCard',
|
|
58
|
+
'CarouselLinks',
|
|
59
|
+
'CarouselProgramsCard',
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const renderScrollButtons = ({
|
|
63
|
+
scrollLeft,
|
|
64
|
+
scrollRight,
|
|
65
|
+
canScrollLeft,
|
|
66
|
+
canScrollRight,
|
|
67
|
+
}: SwipeListScroll) => (
|
|
68
|
+
<div>
|
|
69
|
+
{canScrollLeft ? (
|
|
70
|
+
<ScrollLeftButton className={`${scrollButtonStyle} left-8`} onClick={scrollLeft} />
|
|
71
|
+
) : null}
|
|
72
|
+
{canScrollRight ? (
|
|
73
|
+
<ScrollRightButton className={`${scrollButtonStyle} right-8`} onClick={scrollRight} />
|
|
74
|
+
) : null}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"icon": {
|
|
3
|
+
"icon": "SignDocsIcon",
|
|
4
|
+
"format": "webp",
|
|
5
|
+
"size": {
|
|
6
|
+
"width": 200,
|
|
7
|
+
"height": 242
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"title": "Заголовок",
|
|
11
|
+
"list": [
|
|
12
|
+
{
|
|
13
|
+
"title": "Ячейка 1-1",
|
|
14
|
+
"description": "Описание 1-1"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Ячейка 1-2",
|
|
18
|
+
"description": "Описание 1-2"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Ячейка 1-3",
|
|
22
|
+
"description": "Описание 1-3"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { VersionStyleMap } from '../../model/BlockVersion';
|
|
3
|
+
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
4
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
9
|
+
import type { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
|
|
10
|
+
|
|
11
|
+
export interface CarouselTariffsCardProps extends CarouselProgramsCardContent, UniBlockProps {}
|
|
12
|
+
|
|
13
|
+
export const CarouselProgramsCard = JSX<CarouselTariffsCardProps>(
|
|
14
|
+
({ className = '', title, icon, list = [], version = 'primary', ...rest }) => (
|
|
15
|
+
<BlockWrapper
|
|
16
|
+
className={`font-sans border border-main-stroke flex min-w-[536px] ${VersionStyleMap[version]} ${className}`}
|
|
17
|
+
{...rest}
|
|
18
|
+
>
|
|
19
|
+
<div className="w-[200px] min-w-[200px] self-end">
|
|
20
|
+
{icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
|
|
21
|
+
{icon?.src ? <Img image={icon} /> : null}
|
|
22
|
+
</div>
|
|
23
|
+
<div className="p-8 pl-3 w-full">
|
|
24
|
+
{title ? <Heading className=" mb-3.5" headingType="h5" title={title} /> : null}
|
|
25
|
+
{list.length ? <div className="flex flex-col gap-3">{list?.map(renderList)}</div> : null}
|
|
26
|
+
</div>
|
|
27
|
+
</BlockWrapper>
|
|
28
|
+
),
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const renderList = (_: HeadlineCommonProps, i: number) => (
|
|
32
|
+
<div key={String(i)} className="break-words">
|
|
33
|
+
{_.title ? <div className={`text-h6`}>{_.title}</div> : null}
|
|
34
|
+
{_.description ? <span className="text-l-light mt-1">{_.description}</span> : null}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { Picture } from '../../model/Picture';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @title Карточка программ карусели
|
|
7
|
+
*/
|
|
8
|
+
export type CarouselProgramsCardContent = TitleProps & {
|
|
9
|
+
icon?: Picture;
|
|
10
|
+
/** @title Список */
|
|
11
|
+
list?: HeadlineCommonProps[];
|
|
12
|
+
version?: BlockVersion;
|
|
13
|
+
};
|
|
@@ -14,45 +14,50 @@ import type { CarouselTariffsCardContent } from './CarouselTariffsCardContent';
|
|
|
14
14
|
|
|
15
15
|
export interface CarouselTariffsCardProps extends CarouselTariffsCardContent, UniBlockProps {}
|
|
16
16
|
|
|
17
|
+
const VISIBLE_ROWS_COUNT = 1;
|
|
18
|
+
|
|
17
19
|
export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
|
|
18
20
|
({ className = '', title, icon, isHighlighting, button, rows = [], ...rest }) => {
|
|
19
|
-
const hitStyle = getHitStyle(Boolean(isHighlighting));
|
|
20
21
|
const rowsNode = rows.map(renderCardInfo);
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
rowsNode.slice(0, VISIBLE_ROWS_COUNT),
|
|
24
|
-
rowsNode.slice(VISIBLE_ROWS_COUNT),
|
|
25
|
-
];
|
|
22
|
+
const visibleRows = rowsNode.slice(0, VISIBLE_ROWS_COUNT);
|
|
23
|
+
const hiddenRows = rowsNode.slice(VISIBLE_ROWS_COUNT);
|
|
26
24
|
|
|
27
25
|
return (
|
|
28
|
-
<BlockWrapper
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
26
|
+
<BlockWrapper className={`font-sans ${className}`} {...rest}>
|
|
27
|
+
<div
|
|
28
|
+
className={`relative bg-white border border-main-stroke min-w-[322px] p-8 ${getHitStyle(
|
|
29
|
+
isHighlighting,
|
|
30
|
+
)}`}
|
|
31
|
+
>
|
|
32
|
+
{isHighlighting ? renderHitIcon() : null}
|
|
33
|
+
{icon?.src ? <Img image={icon} /> : null}
|
|
34
|
+
{title ? (
|
|
35
|
+
<Heading
|
|
36
|
+
className="text-primary-text text-center pt-2"
|
|
37
|
+
headingType="h5"
|
|
38
|
+
title={title}
|
|
39
|
+
/>
|
|
40
|
+
) : null}
|
|
41
|
+
{button ? <Button className="w-full mt-4" {...button} /> : null}
|
|
42
|
+
{rows?.length ? (
|
|
43
|
+
<Foldable
|
|
44
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
45
|
+
<div>
|
|
46
|
+
{visibleRows}
|
|
47
|
+
<FoldableSection isUnfolded={isUnfolded}>{hiddenRows}</FoldableSection>
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
50
|
+
renderFoldButton={rows.length > 1 ? renderFoldButton : null}
|
|
51
|
+
/>
|
|
52
|
+
) : null}
|
|
53
|
+
</div>
|
|
49
54
|
</BlockWrapper>
|
|
50
55
|
);
|
|
51
56
|
},
|
|
52
57
|
);
|
|
53
58
|
|
|
54
|
-
const getHitStyle = (isHighlighting
|
|
55
|
-
isHighlighting ? 'mt-9 pt-[
|
|
59
|
+
const getHitStyle = (isHighlighting?: boolean): string =>
|
|
60
|
+
isHighlighting ? 'mt-9 pt-[70px]' : 'mt-[70px] pt-9';
|
|
56
61
|
|
|
57
62
|
const renderFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps): VNode => (
|
|
58
63
|
<button
|
|
@@ -71,23 +76,19 @@ const renderFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps): VNode =>
|
|
|
71
76
|
);
|
|
72
77
|
|
|
73
78
|
const renderCardInfo = (cell: HeadlineCommonProps, i: number): VNode => (
|
|
74
|
-
<div key={String(i)} className="py-5 border-b border-main-divider
|
|
79
|
+
<div key={String(i)} className="py-5 border-b border-main-divider">
|
|
75
80
|
{cell?.title ? (
|
|
76
81
|
<div className="text-secondary-text text-m-light opacity-80">{cell.title}</div>
|
|
77
82
|
) : null}
|
|
78
|
-
{cell?.description ?
|
|
83
|
+
{cell?.description ? (
|
|
84
|
+
<div className="text-primary-text text-h6 mt-1">{cell.description}</div>
|
|
85
|
+
) : null}
|
|
79
86
|
</div>
|
|
80
87
|
);
|
|
81
88
|
|
|
82
|
-
const renderHitIcon = (): VNode =>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
>
|
|
89
|
-
<Icon iconVersion="black" name="HeartIcon" width="23" height="22" asSVG />
|
|
90
|
-
<div className="text-center">Хит</div>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
};
|
|
89
|
+
const renderHitIcon = (): VNode => (
|
|
90
|
+
<div className="absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]">
|
|
91
|
+
<Icon iconVersion="black" name="HeartIcon" width="23" height="22" asSVG />
|
|
92
|
+
<div className="text-center">Хит</div>
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
@@ -62,7 +62,7 @@ const TableInner = JSX<ComparisonTableProps>(
|
|
|
62
62
|
));
|
|
63
63
|
|
|
64
64
|
return orientation === 'horizontal' ? (
|
|
65
|
-
<SwipeListControl
|
|
65
|
+
<SwipeListControl onVisibleIndicesChange={handleSlideChange}>{tableColumns}</SwipeListControl>
|
|
66
66
|
) : (
|
|
67
67
|
tableColumns
|
|
68
68
|
);
|
|
@@ -45,7 +45,7 @@ function renderCardsLayout(orientation: ListOrientation, cards: GalleryCardProps
|
|
|
45
45
|
function renderCard(card: GalleryCardProps, key: number) {
|
|
46
46
|
return (
|
|
47
47
|
<div
|
|
48
|
-
className={`h-full justify-between box-border
|
|
48
|
+
className={`w-full h-full flex flex-col justify-between shrink-0 box-border snap-start snap-always border-solid border rounded-md border-main-stroke p-4
|
|
49
49
|
${VersionStyleMap[card.version ?? 'primary']}`}
|
|
50
50
|
key={key}
|
|
51
51
|
>
|
|
@@ -8,6 +8,7 @@ import { HeaderSecondaryMenuButton } from './HeaderSecondaryMenuButton';
|
|
|
8
8
|
|
|
9
9
|
interface HeaderSecondaryMenuContent {
|
|
10
10
|
defaultLocation?: string;
|
|
11
|
+
officesLink?: string;
|
|
11
12
|
bgColor?: BgColorVersion;
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -29,7 +30,7 @@ const LINKS_ICON_VERSION_MAP: Record<BgColorVersion, IconVersion> = {
|
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
32
|
-
({ className, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
33
|
+
({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
|
|
33
34
|
const [city, getCity] = useGeolocation(defaultLocation);
|
|
34
35
|
|
|
35
36
|
return (
|
|
@@ -43,14 +44,16 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
|
|
|
43
44
|
onClick={getCity}
|
|
44
45
|
bgColor={bgColor}
|
|
45
46
|
/>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
{officesLink ? (
|
|
48
|
+
<TopItem
|
|
49
|
+
className="mr-7"
|
|
50
|
+
flat={true}
|
|
51
|
+
href={officesLink}
|
|
52
|
+
text="Офисы и банкоматы"
|
|
53
|
+
ariaLabel="Список всех доступных офисов и банкоматов"
|
|
54
|
+
bgColor={bgColor}
|
|
55
|
+
/>
|
|
56
|
+
) : null}
|
|
54
57
|
<HeaderSecondaryMenuButton
|
|
55
58
|
className={`mr-5 group ${COLORS_MAP[bgColor]}`}
|
|
56
59
|
ariaLabel="Поиск по сайту"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useMemo, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import type { IntersectionObserverOptions } from '../../hooks/useIntersectionObserver';
|
|
3
4
|
import { useRouter } from '../../hooks/useRouter';
|
|
4
5
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
5
6
|
import type { LinkProps } from '../../model/LinkProps';
|
|
@@ -21,10 +22,7 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(({ subItems = [], bgColor }
|
|
|
21
22
|
const dropDownMenuItems = subItems.slice(visibleItemsCount);
|
|
22
23
|
|
|
23
24
|
const subItemsListRef = useRef<HTMLDivElement | null>(null);
|
|
24
|
-
const observerOptions =
|
|
25
|
-
() => ({ threshold: 1, root: subItemsListRef.current }),
|
|
26
|
-
[subItemsListRef.current],
|
|
27
|
-
);
|
|
25
|
+
const observerOptions: IntersectionObserverOptions = { rootRef: subItemsListRef };
|
|
28
26
|
const subItemsVisibilityHandlers = useMemo(
|
|
29
27
|
() =>
|
|
30
28
|
subItems.map((_, index) => (isIntersecting: boolean) => {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
useIntersectionObserver,
|
|
5
|
+
type IntersectionObserverOptions,
|
|
6
|
+
} from '../../hooks/useIntersectionObserver';
|
|
4
7
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
5
8
|
import type { LinkProps } from '../../model/LinkProps';
|
|
6
9
|
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
|
|
@@ -9,7 +12,7 @@ export interface HeaderSubMenuItemProps extends LinkProps {
|
|
|
9
12
|
className?: string;
|
|
10
13
|
active?: boolean;
|
|
11
14
|
bgColor?: BgColorVersion;
|
|
12
|
-
observerOptions?:
|
|
15
|
+
observerOptions?: IntersectionObserverOptions;
|
|
13
16
|
onVisibilityChange?: (isIntersecting: boolean) => void;
|
|
14
17
|
}
|
|
15
18
|
|
|
@@ -35,7 +35,7 @@ export const OtherProductsItem: JSXBlock<OtherProductsItemProps> = JSX<OtherProd
|
|
|
35
35
|
<DefaultFoldButton
|
|
36
36
|
label={label}
|
|
37
37
|
icon={icons[Number(isUnfolded)]}
|
|
38
|
-
dataTheme={rest.options?.page?.colorPalette
|
|
38
|
+
dataTheme={colorPalette || rest.options?.page?.colorPalette}
|
|
39
39
|
onClick={onToggle}
|
|
40
40
|
/>
|
|
41
41
|
)}
|
|
@@ -55,7 +55,16 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
55
55
|
),
|
|
56
56
|
);
|
|
57
57
|
|
|
58
|
-
RollupItem.childrenTypes =
|
|
58
|
+
RollupItem.childrenTypes = {
|
|
59
|
+
exclude: [
|
|
60
|
+
'RollupItem',
|
|
61
|
+
'Accordion',
|
|
62
|
+
'AccordionItem',
|
|
63
|
+
'OtherProducts',
|
|
64
|
+
'OtherProductsItem',
|
|
65
|
+
'VerticalLayout',
|
|
66
|
+
],
|
|
67
|
+
};
|
|
59
68
|
|
|
60
69
|
const renderFoldButton = ({ isUnfolded, onToggle, label, version }: RollupFoldablePartProps) => {
|
|
61
70
|
const iconsPrimary: IconName[] = ['PlusIcon', 'MinusIcon'];
|
|
@@ -31,15 +31,17 @@ const backgroundStyleMap: Record<BlockVersionWithTransparent, string> = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const VerticalLayout: JSXBlock<VerticalLayoutProps> = JSX<VerticalLayoutProps>(
|
|
34
|
-
({ className = '', gap = '', align
|
|
34
|
+
({ className = '', gap = '', align, version = 'transparent', ...rest }) => (
|
|
35
35
|
<BlockWrapper
|
|
36
36
|
className={[
|
|
37
37
|
'flex flex-col',
|
|
38
38
|
gapStyleMap[gap],
|
|
39
|
-
alignStyle[align],
|
|
39
|
+
align && alignStyle[align],
|
|
40
40
|
backgroundStyleMap[version],
|
|
41
41
|
className,
|
|
42
|
-
]
|
|
42
|
+
]
|
|
43
|
+
.filter(Boolean)
|
|
44
|
+
.join(' ')}
|
|
43
45
|
{...rest}
|
|
44
46
|
>
|
|
45
47
|
{renderChildren(rest)}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
1
|
+
import { useEffect, useMemo, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
|
|
3
|
+
export interface IntersectionObserverOptions<E extends Element = Element> {
|
|
4
|
+
sensitivity?: number; // from 0 to 1
|
|
5
|
+
rootRef?: { current: E | null };
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const SENSITIVITY_SCALE = 10;
|
|
2
9
|
|
|
3
10
|
export function useIntersectionObserver<R extends Element>(
|
|
4
11
|
observerCallback: IntersectionObserverCallback,
|
|
5
|
-
|
|
12
|
+
{ sensitivity, rootRef }: IntersectionObserverOptions = {},
|
|
6
13
|
) {
|
|
7
14
|
const ref = useRef<R | null>(null);
|
|
8
15
|
|
|
16
|
+
const observerOptions = useMemo(
|
|
17
|
+
() => ({ threshold: sensitivityToThreshold(sensitivity), root: rootRef?.current }),
|
|
18
|
+
[sensitivity, rootRef?.current],
|
|
19
|
+
);
|
|
20
|
+
|
|
9
21
|
useEffect(() => {
|
|
10
22
|
if (!ref.current) {
|
|
11
23
|
return undefined;
|
|
@@ -21,3 +33,12 @@ export function useIntersectionObserver<R extends Element>(
|
|
|
21
33
|
|
|
22
34
|
return ref;
|
|
23
35
|
}
|
|
36
|
+
|
|
37
|
+
function sensitivityToThreshold(sensitivity = 0): number[] {
|
|
38
|
+
const thresholdsCount = Math.round(sensitivity * SENSITIVITY_SCALE);
|
|
39
|
+
|
|
40
|
+
return new Array(thresholdsCount)
|
|
41
|
+
.fill(0)
|
|
42
|
+
.map((_, thi) => Math.min(thi / thresholdsCount), 1)
|
|
43
|
+
.concat(1);
|
|
44
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LinkProps } from '../model/LinkProps';
|
|
2
2
|
import { adjustHref } from '../utils/adjustHref';
|
|
3
|
-
import { isURL } from '../utils/url';
|
|
3
|
+
import { isHash, isURL } from '../utils/url';
|
|
4
4
|
import { handlerDecorator } from './handlerDecorator';
|
|
5
5
|
import { useRouter } from './useRouter';
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ export function useLink(): <L extends Partial<LinkProps & ClickHandler>>(
|
|
|
24
24
|
props.onClick && props.onClick(ev);
|
|
25
25
|
const isLocalHref = href && !isURL(href);
|
|
26
26
|
const isLocalTarget = !props.target || props.target === '_self';
|
|
27
|
-
if (isLocalHref && isLocalTarget) {
|
|
27
|
+
if (isLocalHref && isLocalTarget && !isHash(href)) {
|
|
28
28
|
ev?.preventDefault();
|
|
29
29
|
router.push(href);
|
|
30
30
|
}
|
|
@@ -20,13 +20,12 @@ export interface DispositionItem extends LinkProps {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface SitemapDataProps {
|
|
23
|
-
/** @title Основное меню */
|
|
24
23
|
topItems?: TopMenuItem[];
|
|
25
|
-
/** @title Дополнительное меню */
|
|
26
24
|
dispositions?: DispositionItem[];
|
|
27
25
|
logo?: {
|
|
28
26
|
image?: Picture;
|
|
29
27
|
title?: string;
|
|
30
28
|
};
|
|
31
29
|
defaultLocation?: string;
|
|
30
|
+
officesLink?: string;
|
|
32
31
|
}
|
|
@@ -11,15 +11,6 @@ interface BlockWrapperProps extends UniBlockProps {
|
|
|
11
11
|
role?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const THRESHOLD_ACCURACY = 100; // Decimals number (100 is for two decimals number, 0.**)
|
|
15
|
-
const THRESHOLD_ARRAY_LENGTH = 18;
|
|
16
|
-
const THRESHOLD_ARRAY_START_VALUE =
|
|
17
|
-
(THRESHOLD_ACCURACY - THRESHOLD_ARRAY_LENGTH) / THRESHOLD_ACCURACY;
|
|
18
|
-
|
|
19
|
-
const OBSERVER_OPTIONS = {
|
|
20
|
-
threshold: new Array(THRESHOLD_ARRAY_LENGTH).fill(0).map(getIntersectionThreshold),
|
|
21
|
-
};
|
|
22
|
-
|
|
23
14
|
export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
24
15
|
({ className, block, tag = 'section', role, children }) => {
|
|
25
16
|
const Tag: any = tag;
|
|
@@ -33,7 +24,7 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
|
33
24
|
() => changeHashOnObserve({ anchor, anchorClickRef }),
|
|
34
25
|
[anchor],
|
|
35
26
|
);
|
|
36
|
-
const ref = useIntersectionObserver(observerCallback,
|
|
27
|
+
const ref = useIntersectionObserver(observerCallback, { sensitivity: 1 });
|
|
37
28
|
|
|
38
29
|
useEffect(
|
|
39
30
|
() =>
|
|
@@ -65,12 +56,6 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
|
|
|
65
56
|
},
|
|
66
57
|
);
|
|
67
58
|
|
|
68
|
-
function getIntersectionThreshold(_: number, i: number): number {
|
|
69
|
-
const value = (i + 1) / THRESHOLD_ACCURACY + THRESHOLD_ARRAY_START_VALUE;
|
|
70
|
-
|
|
71
|
-
return Math.round(value * THRESHOLD_ACCURACY) / THRESHOLD_ACCURACY;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
59
|
function changeHash(label?: string) {
|
|
75
60
|
if (label) {
|
|
76
61
|
globalThis.document.location.hash = label;
|