@redneckz/wildless-cms-uni-blocks 0.13.17 → 0.13.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.13.14.js +25 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +34 -20
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/CarouselContent.d.ts +0 -2
- package/bundle/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/cosmos-static/icons/RutubeIcon.svg +1 -0
- package/dist/components/Blocks.mobile.js +4 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +2 -2
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +0 -2
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.js +3 -5
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/dist/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/dist/components/ContentPage/toMobileBlock.js +12 -0
- package/dist/components/ContentPage/toMobileBlock.js.map +1 -0
- package/dist/components/Footer/iconsMap.js +5 -0
- package/dist/components/Footer/iconsMap.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +5 -5
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Header/isHrefActive.js +3 -1
- package/dist/components/Header/isHrefActive.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +12 -3
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/dist/components/ProductBlock/renderBackwardButton.js +8 -7
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/dist/components/StickyBottomMenu/RenderItem.js +7 -5
- package/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/dist/components/StickyBottomMenu/RenderMenuItems.js +12 -0
- package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +2 -2
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/dist/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.js +4 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +2 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +0 -2
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.js +3 -5
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/lib/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/lib/components/ContentPage/toMobileBlock.js +9 -0
- package/lib/components/ContentPage/toMobileBlock.js.map +1 -0
- package/lib/components/DepositFiltration/DepositFiltration.fixture.mobile.d.ts +6 -0
- package/lib/components/Footer/iconsMap.js +5 -0
- package/lib/components/Footer/iconsMap.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +5 -5
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Header/isHrefActive.js +3 -1
- package/lib/components/Header/isHrefActive.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltration.fixture.mobile.d.ts +6 -0
- package/lib/components/ProductBlock/ProductBlock.js +12 -3
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/lib/components/ProductBlock/renderBackwardButton.js +8 -7
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/lib/components/StickyBottomMenu/RenderItem.js +7 -5
- package/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/lib/components/StickyBottomMenu/RenderMenuItems.js +10 -0
- package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +2 -2
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/lib/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.d.ts +0 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +240 -46
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +0 -2
- package/mobile/bundle/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/mobile/bundle/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/mobile/dist/components/Blocks.js +4 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +2 -2
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +0 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizeBlock.js +3 -5
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/mobile/dist/components/ContentPage/toMobileBlock.js +12 -0
- package/mobile/dist/components/ContentPage/toMobileBlock.js.map +1 -0
- package/mobile/dist/components/Footer/iconsMap.js +5 -0
- package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +5 -5
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Header/isHrefActive.js +3 -1
- package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +12 -3
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/mobile/dist/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +8 -7
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js +7 -5
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +12 -0
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +2 -2
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +4 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +2 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +0 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizeBlock.js +3 -5
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/toMobileBlock.d.ts +2 -0
- package/mobile/lib/components/ContentPage/toMobileBlock.js +9 -0
- package/mobile/lib/components/ContentPage/toMobileBlock.js.map +1 -0
- package/mobile/lib/components/Footer/iconsMap.js +5 -0
- package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +5 -5
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Header/isHrefActive.js +3 -1
- package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +12 -3
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -3
- package/mobile/lib/components/ProductBlock/renderBackwardButton.d.ts +1 -2
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +8 -7
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js +1 -3
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +6 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +1 -0
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js +7 -5
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +7 -0
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +10 -0
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +1 -1
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/src/components/Blocks.ts +4 -0
- package/mobile/src/components/Carousel/Carousel.tsx +6 -9
- package/mobile/src/components/Carousel/CarouselContent.ts +0 -2
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +0 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/ContentPage/normalizeBlock.ts +3 -10
- package/mobile/src/components/ContentPage/toMobileBlock.ts +11 -0
- package/mobile/src/components/Footer/iconsMap.ts +5 -0
- package/mobile/src/components/Header/HeaderTop.tsx +34 -28
- package/mobile/src/components/Header/isHrefActive.ts +3 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -4
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +27 -16
- package/mobile/src/components/ProductBlock/ProductBlock.ui.json +0 -8
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -3
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +11 -16
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenu.tsx +4 -4
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +9 -1
- package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +9 -6
- package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +24 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.example.json +4 -4
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +2 -2
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +1 -1
- package/mobile/src/components/StickyBottomMenu/TopItemMobile.tsx +1 -1
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/icons/RutubeIcon.svg +1 -0
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +3 -3
- package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +3 -3
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +5 -1
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +4 -0
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +0 -8
- package/src/components/Carousel/Carousel.tsx +6 -9
- package/src/components/Carousel/CarouselContent.ts +0 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +0 -1
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/ContentPage/normalizeBlock.mobile.ts +3 -10
- package/src/components/ContentPage/toMobileBlock.ts +11 -0
- package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +203 -0
- package/src/components/Footer/iconsMap.ts +5 -0
- package/src/components/Header/HeaderTop.tsx +34 -28
- package/src/components/Header/isHrefActive.ts +3 -1
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +205 -0
- package/src/components/ProductBlock/ProductBlock.example.json +1 -4
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +3 -9
- package/src/components/ProductBlock/ProductBlock.tsx +27 -16
- package/src/components/ProductBlock/ProductBlock.ui.json +0 -8
- package/src/components/ProductBlock/ProductBlockContent.ts +2 -3
- package/src/components/ProductBlock/renderBackwardButton.tsx +11 -16
- package/src/components/StickyBottomMenu/ActiveSubMenu.tsx +4 -4
- package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +9 -1
- package/src/components/StickyBottomMenu/RenderItem.tsx +9 -6
- package/src/components/StickyBottomMenu/RenderMenuItems.tsx +24 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.example.json +4 -4
- package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.tsx +4 -4
- package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.tsx +4 -4
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +2 -2
- package/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +1 -1
- package/src/components/StickyBottomMenu/TopItemMobile.tsx +1 -1
- package/src/icons/IconName.ts +4 -1
- package/src/icons/RutubeIcon.svg +1 -0
- package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +3 -3
- package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +3 -3
- package/src/ui-kit/DialogManager/Dialog.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +5 -1
- package/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/dist/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/dist/components/StickyBottomMenu/renderMenuItems.js +0 -8
- package/dist/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/lib/components/StickyBottomMenu/renderMenuItems.d.ts +0 -2
- package/lib/components/StickyBottomMenu/renderMenuItems.js +0 -5
- package/lib/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/mobile/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js +0 -8
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.d.ts +0 -3
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js +0 -5
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js.map +0 -1
- package/mobile/src/components/StickyBottomMenu/renderMenuItems.tsx +0 -13
- package/src/components/StickyBottomMenu/renderMenuItems.tsx +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/ui-kit/DialogManager/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQtD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,KAAK,EAAE,CAAC;QACR,OAAO,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/ui-kit/DialogManager/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAQtD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACnC,KAAK,EAAE,CAAC;QACR,OAAO,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,EAAE,SAAS,CAAC,aACvE,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,WAAW,IAAC,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAE,WAAW,GAAI,EACxE,cAAK,SAAS,EAAC,WAAW,YAAE,IAAI,GAAO,IACnC,EACN,cAAK,SAAS,EAAC,kBAAkB,YAAE,QAAQ,GAAO,IAC9C,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -20,6 +20,6 @@ export const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount =
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
return dotCount ? (_jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
|
|
23
|
+
return dotCount ? (_jsx("div", { className: style('flex gap-xs @lg:hidden', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
|
|
24
24
|
});
|
|
25
25
|
//# sourceMappingURL=SwipeListControlDots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListControlDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControlDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,qBAAqB;IACxC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAEF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yIAAyI,CAAC;AAE5I,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAU9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,iBAAiB,EAAE,OAAO,EAAE,EAAE,EAAE;IACrF,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;QAClC,IAAI,GAAG,KAAK,WAAW,IAAI,YAAY,EAAE,OAAO,EAAE;YAChD,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;gBACjD,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,cACE,SAAS,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"SwipeListControlDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControlDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,qBAAqB;IACxC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAEF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yIAAyI,CAAC;AAE5I,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAU9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,iBAAiB,EAAE,OAAO,EAAE,EAAE,EAAE;IACrF,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;QAClC,IAAI,GAAG,KAAK,WAAW,IAAI,YAAY,EAAE,OAAO,EAAE;YAChD,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;gBACjD,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,cACE,SAAS,EAAE,KAAK,CACd,wBAAwB,EACxB,eAAe,CAAC,QAAQ,CAAC,EACzB,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CACvB,KACG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,YAE3C,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAW,EAAE,EAAE,CAAC,CACtD,cAEE,SAAS,EAAE,GAAG,QAAQ,IACpB,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBACpD,EAAE,EACF,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAN1B,MAAM,CAAC,GAAG,CAAC,CAOhB,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC"}
|
|
@@ -1488,7 +1488,7 @@
|
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
1490
|
};
|
|
1491
|
-
return dotCount ? (jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
|
|
1491
|
+
return dotCount ? (jsx("div", { className: style('flex gap-xs @lg:hidden', containerStyles[listType], version ? 'group' : ''), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
|
|
1492
1492
|
});
|
|
1493
1493
|
|
|
1494
1494
|
const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
|
|
@@ -1634,8 +1634,8 @@
|
|
|
1634
1634
|
const calculatorValueBlockStyle = 'flex justify-between md:flex-col';
|
|
1635
1635
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", toLocalNumberFormat(2)(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
1636
1636
|
|
|
1637
|
-
const DEFAULT_MIN_SUM = 10000;
|
|
1638
|
-
const DEFAULT_MAX_SUM = 5000000;
|
|
1637
|
+
const DEFAULT_MIN_SUM$1 = 10000;
|
|
1638
|
+
const DEFAULT_MAX_SUM$1 = 5000000;
|
|
1639
1639
|
const CREDIT_DEFAULT_SUM = 200000;
|
|
1640
1640
|
const REFINANCING_DEFAULT_SUM = 700000;
|
|
1641
1641
|
const REFINANCING_DEFAULT_MAX_SUM = 3000000;
|
|
@@ -1645,11 +1645,11 @@
|
|
|
1645
1645
|
const REFINANCING_EXTRA_MIN_SUM = 0;
|
|
1646
1646
|
const REFINANCING_EXTRA_MAX_SUM = 500000;
|
|
1647
1647
|
const DEPOSIT_DEFAULT_SUM = 20000;
|
|
1648
|
-
const DEFAULT_MIN_MONTHS = 13;
|
|
1648
|
+
const DEFAULT_MIN_MONTHS$1 = 13;
|
|
1649
1649
|
const DEFAULT_REFINANCING_MIN_MONTHS = 13;
|
|
1650
1650
|
const DEFAULT_REFINANCING_MONTHS = 48;
|
|
1651
|
-
const DEFAULT_MAX_MONTHS = 60;
|
|
1652
|
-
const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
|
|
1651
|
+
const DEFAULT_MAX_MONTHS$1 = 60;
|
|
1652
|
+
const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS$1 - DEFAULT_MIN_MONTHS$1) / 2);
|
|
1653
1653
|
const BUSINESS_DEFAULT_SUM = 100000;
|
|
1654
1654
|
const BUSINESS_MIN_DAYS = 1;
|
|
1655
1655
|
const BUSINESS_MAX_DAYS = 1095;
|
|
@@ -1660,10 +1660,10 @@
|
|
|
1660
1660
|
const MONTHS_IN_YEAR = 12;
|
|
1661
1661
|
const MONTHLY_INTEREST_RATE = MONTHS_IN_YEAR * 100;
|
|
1662
1662
|
const DEFAULT_CREDIT_CALCULATOR_PARAMS = {
|
|
1663
|
-
minSum: DEFAULT_MIN_SUM,
|
|
1664
|
-
maxSum: DEFAULT_MAX_SUM,
|
|
1665
|
-
minMonths: DEFAULT_MIN_MONTHS,
|
|
1666
|
-
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1663
|
+
minSum: DEFAULT_MIN_SUM$1,
|
|
1664
|
+
maxSum: DEFAULT_MAX_SUM$1,
|
|
1665
|
+
minMonths: DEFAULT_MIN_MONTHS$1,
|
|
1666
|
+
maxMonths: DEFAULT_MAX_MONTHS$1,
|
|
1667
1667
|
rate: 0,
|
|
1668
1668
|
isSalaryClient: false,
|
|
1669
1669
|
isPensionClient: false,
|
|
@@ -1671,14 +1671,14 @@
|
|
|
1671
1671
|
isInsurance: true,
|
|
1672
1672
|
};
|
|
1673
1673
|
const DEFAULT_REFINANCING_CALCULATOR_PARAMS = {
|
|
1674
|
-
minSum: DEFAULT_MIN_SUM,
|
|
1674
|
+
minSum: DEFAULT_MIN_SUM$1,
|
|
1675
1675
|
maxSum: REFINANCING_DEFAULT_MAX_SUM,
|
|
1676
1676
|
minSumOld: REFINANCING_OLD_MIN_SUM,
|
|
1677
1677
|
maxSumOld: REFINANCING_OLD_MAX_SUM,
|
|
1678
1678
|
minSumExtra: REFINANCING_EXTRA_MIN_SUM,
|
|
1679
1679
|
maxSumExtra: REFINANCING_EXTRA_MAX_SUM,
|
|
1680
1680
|
minMonths: DEFAULT_REFINANCING_MIN_MONTHS,
|
|
1681
|
-
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1681
|
+
maxMonths: DEFAULT_MAX_MONTHS$1,
|
|
1682
1682
|
rate: 0,
|
|
1683
1683
|
isExtraMoney: false,
|
|
1684
1684
|
isSalaryClient: false,
|
|
@@ -2520,7 +2520,7 @@
|
|
|
2520
2520
|
'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider');
|
|
2521
2521
|
const isCardHighlighted = (_) => _?.content && 'isHighlighting' in _.content && _.content.isHighlighting;
|
|
2522
2522
|
|
|
2523
|
-
const Carousel = JSX(({ className, itemCount, visibleItemCount = 0, noCardBorder, isAlignCenter,
|
|
2523
|
+
const Carousel = JSX(({ className, itemCount, visibleItemCount = 0, noCardBorder, isAlignCenter, arrowsPadded = true, isGap = true, cardSize = 'normal', ...rest }) => {
|
|
2524
2524
|
const { blocks: childBlocks = [] } = rest.block || {};
|
|
2525
2525
|
const count = itemCount || childBlocks?.length;
|
|
2526
2526
|
const [activeIndex, { inc: increaseActiveIndex, dec: decreaseActiveIndex }] = useCarouselControls({
|
|
@@ -2531,7 +2531,7 @@
|
|
|
2531
2531
|
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
2532
2532
|
// TODO Remove
|
|
2533
2533
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
2534
|
-
return (
|
|
2534
|
+
return (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [jsxs("div", { className: style(isAlignCenter ? 'flex justify-center' : '', 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : undefined, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderCarouselCards({ noCardBorder, activeIndex, cardSize, ...rest }) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }), jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: count, listType: "horizontal-list" })] }));
|
|
2535
2535
|
});
|
|
2536
2536
|
Carousel.childrenTypes = [
|
|
2537
2537
|
'CarouselCard',
|
|
@@ -2584,7 +2584,7 @@
|
|
|
2584
2584
|
const CarouselLinks = JSX(({ className, additionalDescription, description, links, title, maxLinksCount = 10, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col sm:flex-row w-full overflow-hidden', className), ...rest, children: [jsxs("div", { className: "mr-xl flex-auto", children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx(Headline, { className: "pt-m", description: additionalDescription, align: "text-left", isEmbedded: true })) : null] }), links?.length ? renderLinks(links, maxLinksCount) : null] })));
|
|
2585
2585
|
const renderLinks = (links, maxLinksCount) => {
|
|
2586
2586
|
const itemCount = Math.ceil(links.length / maxLinksCount);
|
|
2587
|
-
return (jsx(Carousel, { className: "@container-normal sm:w-2/3 w-full p-0 sm:p-xs", version: "secondary", itemCount: itemCount, arrowsPadded: false,
|
|
2587
|
+
return (jsx(Carousel, { className: "@container-normal sm:w-2/3 w-full p-0 sm:p-xs", version: "secondary", itemCount: itemCount, arrowsPadded: false, children: new Array(itemCount).fill(null).map((_, groupIndex) => (jsx("div", { className: style('flex flex-wrap self-start w-full sm:w-[672px]'), children: links
|
|
2588
2588
|
.slice(groupIndex * maxLinksCount, (groupIndex + 1) * maxLinksCount)
|
|
2589
2589
|
.map((link, index) => (jsx(CarouselLinkButton, { className: "sm:m-2xs", ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
2590
2590
|
};
|
|
@@ -2740,6 +2740,11 @@
|
|
|
2740
2740
|
iconMapped: { icon: 'YoutubeIcon' },
|
|
2741
2741
|
label: 'Youtube',
|
|
2742
2742
|
},
|
|
2743
|
+
{
|
|
2744
|
+
origins: ['rutube.com'],
|
|
2745
|
+
iconMapped: { icon: 'RutubeIcon' },
|
|
2746
|
+
label: 'Rutube',
|
|
2747
|
+
},
|
|
2743
2748
|
];
|
|
2744
2749
|
|
|
2745
2750
|
const findIconByHref = (href) => ICONS_MAP.find(({ origins }) => origins?.some((_) => href?.includes(_))) || {};
|
|
@@ -3141,12 +3146,12 @@
|
|
|
3141
3146
|
e.preventDefault();
|
|
3142
3147
|
router.back();
|
|
3143
3148
|
}, []);
|
|
3144
|
-
return (jsxs("div", { className: "flex items-center justify-between w-full", children: [isRootLocation ? (jsx(Logo, { className: "
|
|
3149
|
+
return (jsxs("div", { className: "flex items-center justify-between w-full", children: [isRootLocation ? (jsx("div", { children: jsx(Logo, { className: "my-2xs", bgColor: bgColor, logo: logo }) })) : (renderBackButton(onClick)), internetBankUrl ? (jsx("div", { children: jsx(Button, { href: internetBankUrl, ariaLabel: "\u0412\u043E\u0439\u0442\u0438", target: "_blank", className: style('p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover', BUTTON_STYLE[version === 'transparent' ? 'transparent' : 'default']), children: "\u0412\u043E\u0439\u0442\u0438" }) })) : null] }));
|
|
3145
3150
|
});
|
|
3146
|
-
const renderBackButton = (onClick) => (jsxs("button", { className: "flex items-center text-l
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3151
|
+
const renderBackButton = (onClick) => (jsx("div", { children: jsxs("button", { className: "flex items-center text-l my-2xs", "aria-label": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434", onClick: onClick, children: [jsx(Img, { className: "w-6 h-6", image: {
|
|
3152
|
+
icon: 'ChevronLeftIcon',
|
|
3153
|
+
iconVersion: 'black',
|
|
3154
|
+
}, width: "24", height: "24" }), "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434"] }) }));
|
|
3150
3155
|
|
|
3151
3156
|
const BG_COLOR_TO_BLOCK_VERSION = {
|
|
3152
3157
|
'bg-white': 'primary',
|
|
@@ -3267,19 +3272,26 @@
|
|
|
3267
3272
|
const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-light" }, String(index)));
|
|
3268
3273
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
3269
3274
|
|
|
3270
|
-
function renderBackwardButton(
|
|
3275
|
+
function renderBackwardButton(version, handleClick) {
|
|
3271
3276
|
const iconVersion = version === 'primary' ? 'white' : 'black';
|
|
3272
|
-
const
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
icon:
|
|
3276
|
-
iconVersion:
|
|
3277
|
-
} }) }), jsx(Button, { version: "link",
|
|
3277
|
+
const className = 'w-12 h-12 min-h-12 min-w-12 flex items-center justify-center';
|
|
3278
|
+
const text = 'Вернуться назад';
|
|
3279
|
+
return (jsxs("div", { className: "flex items-center gap-s", children: [jsx("div", { className: getRegularButtonClasses({ className, version, rounded: true }), onClick: handleClick, children: jsx(Img, { className: "w-4 h-4", image: {
|
|
3280
|
+
icon: 'ArrowLeftIcon',
|
|
3281
|
+
iconVersion: iconVersion,
|
|
3282
|
+
} }) }), jsx(Button, { version: "link", text: text, ariaLabel: text, onClick: handleClick })] }));
|
|
3278
3283
|
}
|
|
3279
3284
|
|
|
3280
|
-
const ProductBlock = JSX(({ className, padding, backwardButton, ...rest }) =>
|
|
3281
|
-
|
|
3282
|
-
|
|
3285
|
+
const ProductBlock = JSX(({ className, padding, backwardButton, ...rest }) => {
|
|
3286
|
+
const router = useRouter();
|
|
3287
|
+
const handleClick = useCallback((ev) => {
|
|
3288
|
+
ev?.preventDefault();
|
|
3289
|
+
router.back();
|
|
3290
|
+
}, []);
|
|
3291
|
+
return (jsxs(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', className), defaultPadding: "p-6xl", padding: padding, ...rest, children: [backwardButton
|
|
3292
|
+
? renderBackwardButton(!rest.version || rest.version === 'primary' ? 'primary' : 'white', handleClick)
|
|
3293
|
+
: null, jsx(BaseProductTile, { className: "grow h-full", ...rest })] }));
|
|
3294
|
+
});
|
|
3283
3295
|
|
|
3284
3296
|
const ProductGallery = JSX(({ className, padding, slides = [], ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden relative', className), padding: padding, ...rest, children: jsx(SwipeListControl, { gap: 0, padding: 0, children: slides
|
|
3285
3297
|
.map((s) => s.productBlock)
|
|
@@ -3730,7 +3742,9 @@
|
|
|
3730
3742
|
return (jsx("div", { className: style(iconAreaSize, containerStyle, 'z-10 mr-s flex justify-center content-center'), children: jsx("span", { className: "flex self-center text-h4 text-secondary-text group-data-secondary:text-white", children: checkCanRenderIcon(step?.icon) ? (jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, width: iconSize, height: iconSize })) : (jsx("span", { children: i + 1 })) }) }));
|
|
3731
3743
|
};
|
|
3732
3744
|
|
|
3733
|
-
const isHrefActive = (router) => ({ href }) =>
|
|
3745
|
+
const isHrefActive = (router) => ({ href }) => !href
|
|
3746
|
+
? false
|
|
3747
|
+
: withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
|
|
3734
3748
|
|
|
3735
3749
|
const isTopItemActive = (router) => isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
|
|
3736
3750
|
|
|
@@ -3790,7 +3804,7 @@
|
|
|
3790
3804
|
close();
|
|
3791
3805
|
onClose && onClose();
|
|
3792
3806
|
}, [onClose]);
|
|
3793
|
-
return (jsxs("div", { className: style('relative min-h-full bg-white p-5', className), children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
3807
|
+
return (jsxs("div", { className: style('relative min-h-full bg-white pt-0 p-5', className), children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
3794
3808
|
});
|
|
3795
3809
|
|
|
3796
3810
|
const REGIONS_URL = '/api/v1/regions';
|
|
@@ -4021,14 +4035,14 @@
|
|
|
4021
4035
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
4022
4036
|
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
4023
4037
|
const { href, target, onClick } = link(item);
|
|
4024
|
-
|
|
4038
|
+
const router = useRouter();
|
|
4039
|
+
const isActive = isHrefActive(router)({ href });
|
|
4040
|
+
return (jsxs("a", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `py-3 text-h5 font-light flex justify-between cursor-pointer`), href: href, target: target, onClick: onClick, children: [item.text, jsx(Img, { image: { icon: 'ChevronLeftIcon', iconVersion: 'black' }, width: "24", height: "24", className: "text-secondary-text rotate-180 opacity-30" })] }));
|
|
4025
4041
|
});
|
|
4026
4042
|
|
|
4027
|
-
const ActiveSubMenu = JSX(({ activeMenuSubItems, basePath }) => {
|
|
4028
|
-
return activeMenuSubItems ? (jsx("div", { className: "mb-5", children: activeMenuSubItems.map((_, i) => (jsx(ActiveSubMenuItem, { item: _, basePath: basePath }, String(i)))) })) : null;
|
|
4029
|
-
});
|
|
4043
|
+
const ActiveSubMenu = JSX(({ activeMenuSubItems, basePath }) => activeMenuSubItems ? (jsx("div", { className: "mb-5", children: activeMenuSubItems.map((_, i) => (jsx(ActiveSubMenuItem, { item: _, basePath: basePath }, String(i)))) })) : null);
|
|
4030
4044
|
|
|
4031
|
-
const TopItemMobile = ({ item, isActive, onClick }) => (jsxs("button", { type: "button", onClick: onClick, children: [jsx("span", { className: style('whitespace-nowrap', isActive ? 'text-primary-main' : ''), children: item.text }), isActive ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4045
|
+
const TopItemMobile = ({ item, isActive, onClick }) => (jsxs("button", { type: "button", className: "relative", onClick: onClick, children: [jsx("span", { className: style('whitespace-nowrap', isActive ? 'text-primary-main' : ''), children: item.text }), isActive ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4032
4046
|
|
|
4033
4047
|
const BurgerMenuDialog = JSX((props) => {
|
|
4034
4048
|
const { topItems, officesLink, defaultLocation } = useSitemap(props.options?.page?.fallback);
|
|
@@ -4055,22 +4069,27 @@
|
|
|
4055
4069
|
});
|
|
4056
4070
|
const renderOfficeLink = (officesLink) => officesLink ? (jsxs("a", { className: "flex items-center mb-3", href: officesLink, rel: "noopener noreferrer", "aria-label": "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", children: [jsx(Img, { image: { icon: 'MapOpenedIcon', iconVersion: 'black' }, width: "24", height: "24", className: "text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md" }), jsx("span", { children: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B" })] })) : null;
|
|
4057
4071
|
|
|
4058
|
-
const RenderItem = JSX(({ item, onClick }) => {
|
|
4072
|
+
const RenderItem = JSX(({ isActive, item, onClick }) => {
|
|
4059
4073
|
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
4060
|
-
? !item.
|
|
4074
|
+
? !item.href?.startsWith(projectSettings?.BASE_PATH)
|
|
4061
4075
|
: true;
|
|
4062
4076
|
const link = useLink({ isRemote: isAnotherPortal });
|
|
4063
4077
|
const { href, target, onClick: handleClick, } = link({
|
|
4064
|
-
href: item.
|
|
4078
|
+
href: item.href,
|
|
4065
4079
|
target: '_self',
|
|
4066
4080
|
});
|
|
4067
|
-
|
|
4081
|
+
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
4082
|
+
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
4083
|
+
return (jsxs("a", { className: style(isActiveItem ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: () => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick()), href: href, target: target, children: [jsx(Img, { className: "w-6 h-6", image: {
|
|
4068
4084
|
icon: item?.icon?.icon,
|
|
4069
|
-
iconVersion:
|
|
4085
|
+
iconVersion: iconVersion,
|
|
4070
4086
|
} }), item.title] }));
|
|
4071
4087
|
});
|
|
4072
4088
|
|
|
4073
|
-
const
|
|
4089
|
+
const RenderMenuItems = JSX(({ menuItems, onClick }) => {
|
|
4090
|
+
const [activeIndex] = useActiveRoute(menuItems);
|
|
4091
|
+
return (jsx(BlockWrapper, { className: "sticky bottom-0 left-0 right-0 bg-transparent z-[100]", padding: "p-0", children: jsx("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => (jsx(RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }) }));
|
|
4092
|
+
});
|
|
4074
4093
|
|
|
4075
4094
|
function useList(initialList = []) {
|
|
4076
4095
|
const [list, setList] = useState(initialList);
|
|
@@ -4147,7 +4166,7 @@
|
|
|
4147
4166
|
burgerMenu,
|
|
4148
4167
|
...menuItems.slice(middleIdx),
|
|
4149
4168
|
], [menuItems, middleIdx, burgerMenu]);
|
|
4150
|
-
return (jsxs("div", { className: "contents", children: [
|
|
4169
|
+
return (jsxs("div", { className: "contents", children: [jsx(RenderMenuItems, { menuItems: menuItemsWithButton, onClick: toggle }), isBurgerMenuDialogOpen ? jsx(BurgerMenuDialog, {}) : null] }));
|
|
4151
4170
|
});
|
|
4152
4171
|
|
|
4153
4172
|
const tabPaddingStyleMap = {
|
|
@@ -4309,6 +4328,179 @@
|
|
|
4309
4328
|
|
|
4310
4329
|
const Tile = JSX(({ className, padding, headlineVersion = 'S', listItemSize = 'M', ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-xl", padding: padding, headlineVersion: headlineVersion, listItemSize: listItemSize, ...rest }) })));
|
|
4311
4330
|
|
|
4331
|
+
const isEmpty = (v) => v === null ||
|
|
4332
|
+
v === undefined ||
|
|
4333
|
+
v === '' ||
|
|
4334
|
+
(Array.isArray(v) && v.length === 0) ||
|
|
4335
|
+
(typeof v === 'object' && Object.keys(v).length === 0);
|
|
4336
|
+
|
|
4337
|
+
const isSingularFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) || isEmpty(target[key]) || pattern[key] === target[key];
|
|
4338
|
+
const isMultipleFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
4339
|
+
isEmpty(target[key]) ||
|
|
4340
|
+
pattern[key]?.some((_) => target[key]?.includes(_));
|
|
4341
|
+
const isNumberFieldMatch = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
4342
|
+
isEmpty(target[key]) ||
|
|
4343
|
+
naturalNumber(pattern[key]) <= naturalNumber(target[key]);
|
|
4344
|
+
const isValueInRange = (key, pattern) => (target) => isEmpty(pattern[key]) ||
|
|
4345
|
+
isEmpty(target[key]) ||
|
|
4346
|
+
(naturalNumber(pattern[key]?.min) >= naturalNumber(target[key]?.min) &&
|
|
4347
|
+
naturalNumber(pattern[key]?.min) <= naturalNumber(target[key]?.max));
|
|
4348
|
+
const checkShouldRenderBlock = (pattern, target) => Object.entries(pattern)
|
|
4349
|
+
.map(([key, subPattern]) => {
|
|
4350
|
+
if (typeof subPattern === 'number') {
|
|
4351
|
+
return isNumberFieldMatch(key, pattern);
|
|
4352
|
+
}
|
|
4353
|
+
if (typeof subPattern === 'object' && 'min' in subPattern && 'max' in subPattern) {
|
|
4354
|
+
return isValueInRange(key, pattern);
|
|
4355
|
+
}
|
|
4356
|
+
return Array.isArray(subPattern)
|
|
4357
|
+
? isMultipleFieldMatch(key, pattern)
|
|
4358
|
+
: isSingularFieldMatch(key, pattern);
|
|
4359
|
+
})
|
|
4360
|
+
.every((predicate) => predicate(target));
|
|
4361
|
+
const naturalNumber = (n) => Number(n || 0);
|
|
4362
|
+
|
|
4363
|
+
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
4364
|
+
const resultsGridStyle = 'lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
4365
|
+
const BaseFiltrationInner = JSX(({ label = '', filtrationState = {}, topItemsCount = 0, block, notFound, ...rest }) => {
|
|
4366
|
+
const blocksToRender = block?.blocks?.filter((b) => checkShouldRenderBlock(filtrationState, b.content || {})) || [];
|
|
4367
|
+
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
4368
|
+
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
4369
|
+
: [blocksToRender, []];
|
|
4370
|
+
return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? renderNotFound(notFound) : null }), jsxs("div", { className: style('space-y-2xs', blocksToRender.length ? '' : 'hidden'), children: [jsx("div", { className: style(resultsGridStyle), children: renderBlocksList(visibleBlocks, { ...rest.options, parent: block }) }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
4371
|
+
return (jsx(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }) }));
|
|
4372
|
+
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
4373
|
+
});
|
|
4374
|
+
function renderNotFound({ title, description }) {
|
|
4375
|
+
return (jsx("div", { className: "bg-white py-20", children: jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true }) }));
|
|
4376
|
+
}
|
|
4377
|
+
|
|
4378
|
+
const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
|
|
4379
|
+
const handleChange = (newValue) => {
|
|
4380
|
+
if (!onChange) {
|
|
4381
|
+
return;
|
|
4382
|
+
}
|
|
4383
|
+
if (multiple) {
|
|
4384
|
+
const hasAlready = value?.includes(newValue);
|
|
4385
|
+
onChange(hasAlready ? (value || []).filter((v) => v !== newValue) : [...(value || []), newValue]);
|
|
4386
|
+
}
|
|
4387
|
+
else {
|
|
4388
|
+
onChange(value === newValue ? '' : newValue);
|
|
4389
|
+
}
|
|
4390
|
+
};
|
|
4391
|
+
return items.map((item) => (jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
4392
|
+
});
|
|
4393
|
+
|
|
4394
|
+
const renderFiltrationForm = ({ field, reset, filtrationSchema, resetButton, children, }) => (jsxs("form", { className: "flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0", children: [jsxs("div", { className: "flex flex-col @4xl:flex-row gap-5xl", children: [children, Object.entries(filtrationSchema).map(renderFormItem(field))] }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-full @4xl:w-72 @4xl:ml-s", onClick: reset, ...resetButton }) })) : null] }));
|
|
4395
|
+
const renderFormItem = (field) => ([key, item]) => {
|
|
4396
|
+
const type = item?.type;
|
|
4397
|
+
switch (type) {
|
|
4398
|
+
case 'array':
|
|
4399
|
+
return renderCheckboxes(key, field)(item);
|
|
4400
|
+
default:
|
|
4401
|
+
return null;
|
|
4402
|
+
}
|
|
4403
|
+
};
|
|
4404
|
+
const renderCheckboxes = (key, field) => (item) => {
|
|
4405
|
+
const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
4406
|
+
[];
|
|
4407
|
+
return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: true, ...field(key) })] }, key));
|
|
4408
|
+
};
|
|
4409
|
+
|
|
4410
|
+
const DEFAULT_MIN_MONTHS = 3;
|
|
4411
|
+
const DEFAULT_MAX_MONTHS = 60;
|
|
4412
|
+
const DEFAULT_MIN_SUM = 500;
|
|
4413
|
+
const DEFAULT_MAX_SUM = 1000000000;
|
|
4414
|
+
const initialFiltrationState$1 = {
|
|
4415
|
+
sum: {
|
|
4416
|
+
min: 10000,
|
|
4417
|
+
max: DEFAULT_MAX_SUM,
|
|
4418
|
+
},
|
|
4419
|
+
period: {
|
|
4420
|
+
min: 3,
|
|
4421
|
+
max: 36,
|
|
4422
|
+
},
|
|
4423
|
+
};
|
|
4424
|
+
const DepositFiltration = JSX(({ className, filtrationSchema = {}, resetButton, sumInput, periodInput, ...rest }) => {
|
|
4425
|
+
const [filtrationState, { field, reset }] = useForm(initialFiltrationState$1);
|
|
4426
|
+
const maxPeriodValue = periodInput?.max || DEFAULT_MAX_MONTHS;
|
|
4427
|
+
const Inputs = (jsxs("div", { children: [jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', {
|
|
4428
|
+
parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
|
|
4429
|
+
format: ({ min }) => String(min),
|
|
4430
|
+
}) }), jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], min: periodInput?.min || DEFAULT_MIN_MONTHS, max: maxPeriodValue, ...field('period', {
|
|
4431
|
+
parse: (min) => ({ min, max: maxPeriodValue }),
|
|
4432
|
+
format: ({ min }) => min,
|
|
4433
|
+
}) })] }));
|
|
4434
|
+
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [renderFiltrationForm({ field, reset, filtrationSchema, resetButton, children: Inputs }), jsx(BaseFiltrationInner, { filtrationState: filtrationState, ...rest })] }));
|
|
4435
|
+
});
|
|
4436
|
+
DepositFiltration.childrenTypes = ['ProductTile'];
|
|
4437
|
+
DepositFiltration.childSchema = (content) => content?.filtrationSchema || {};
|
|
4438
|
+
|
|
4439
|
+
const badgeBgStyleMap = {
|
|
4440
|
+
primary: 'bg-white/30',
|
|
4441
|
+
secondary: 'bg-main-divider',
|
|
4442
|
+
};
|
|
4443
|
+
const badgeTextColorStyleMap = {
|
|
4444
|
+
primary: 'text-white',
|
|
4445
|
+
secondary: 'text-secondary-text',
|
|
4446
|
+
};
|
|
4447
|
+
const Badge = JSX(({ count, version = 'secondary' }) => {
|
|
4448
|
+
return (jsx("div", { className: style('w-6 h-6 rounded-full flex items-center justify-center', badgeBgStyleMap[version]), children: jsx(Text, { size: "text-xs", color: badgeTextColorStyleMap[version], children: count }) }));
|
|
4449
|
+
});
|
|
4450
|
+
|
|
4451
|
+
const getBadgeCount = (blocks = [], filter = {}) => blocks.filter(({ content = {} }) => checkShouldRenderBlock(filter, content)).length;
|
|
4452
|
+
|
|
4453
|
+
const scalarCmp = (a, b) => a === b;
|
|
4454
|
+
const arrCmp = (cmp = scalarCmp) => (a, b) => a === b || Boolean(a && b && a.length === b.length && a.every((_, i) => cmp(_, b[i])));
|
|
4455
|
+
const objCmp = (cmp) => (a, b) => a === b ||
|
|
4456
|
+
Boolean(a &&
|
|
4457
|
+
b &&
|
|
4458
|
+
Object.keys(a).length === Object.keys(b).length &&
|
|
4459
|
+
Object.entries(a).every(([key, value]) => cmp(value, b[key])));
|
|
4460
|
+
function combineBoolCmps(...comparators) {
|
|
4461
|
+
return (a, b) => comparators.some((cmp) => cmp(a, b));
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4464
|
+
const hotFilterRecordCmp = objCmp(combineBoolCmps(scalarCmp, arrCmp()));
|
|
4465
|
+
|
|
4466
|
+
const EMPTY_ARR = [];
|
|
4467
|
+
const EMPTY_OBJ = {};
|
|
4468
|
+
const useHotFilters = ({ hotFilters = EMPTY_ARR, filtrationState = EMPTY_OBJ, blocks = EMPTY_ARR, onFiltrationStateChange, }) => {
|
|
4469
|
+
const activeItemIndex = useMemo(() => Math.max(0, hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState))), [hotFilters, filtrationState]);
|
|
4470
|
+
const items = useMemo(() => hotFilters.map((_) => ({
|
|
4471
|
+
text: _.text,
|
|
4472
|
+
appendRight: (jsx(Badge, { version: _ === hotFilters[activeItemIndex] ? 'primary' : 'secondary', count: getBadgeCount(blocks, _.filter) })),
|
|
4473
|
+
})), [hotFilters, blocks, activeItemIndex]);
|
|
4474
|
+
const handleChange = useCallback((_) => {
|
|
4475
|
+
onFiltrationStateChange(hotFilters[items.indexOf(_)].filter);
|
|
4476
|
+
}, [hotFilters, items]);
|
|
4477
|
+
return {
|
|
4478
|
+
value: items[activeItemIndex],
|
|
4479
|
+
items: items,
|
|
4480
|
+
onChange: handleChange,
|
|
4481
|
+
};
|
|
4482
|
+
};
|
|
4483
|
+
|
|
4484
|
+
const initialFiltrationState = {
|
|
4485
|
+
categories: [],
|
|
4486
|
+
extraOptions: [],
|
|
4487
|
+
propertyType: [],
|
|
4488
|
+
stage: [],
|
|
4489
|
+
};
|
|
4490
|
+
const MortgageFiltration = JSX(({ className, hotFilters, filtrationSchema = {}, resetButton, ...rest }) => {
|
|
4491
|
+
const [filtrationState, { field, reset, update: replaceFiltrationState }] = useForm(initialFiltrationState);
|
|
4492
|
+
const handleFiltrationStateChange = useCallback((_ = initialFiltrationState) => replaceFiltrationState(_), []);
|
|
4493
|
+
const tabsControlProps = useHotFilters({
|
|
4494
|
+
hotFilters,
|
|
4495
|
+
filtrationState,
|
|
4496
|
+
blocks: rest.block?.blocks,
|
|
4497
|
+
onFiltrationStateChange: handleFiltrationStateChange,
|
|
4498
|
+
});
|
|
4499
|
+
return (jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { ...tabsControlProps }), renderFiltrationForm({ field, reset, filtrationSchema, resetButton }), jsx(BaseFiltrationInner, { filtrationState: filtrationState, ...rest })] }));
|
|
4500
|
+
});
|
|
4501
|
+
MortgageFiltration.childrenTypes = ['ProductTile'];
|
|
4502
|
+
MortgageFiltration.childSchema = (content) => content?.filtrationSchema || {};
|
|
4503
|
+
|
|
4312
4504
|
const Blocks = {
|
|
4313
4505
|
ApplicationForm,
|
|
4314
4506
|
BenefitsBlock,
|
|
@@ -4327,6 +4519,8 @@
|
|
|
4327
4519
|
CarouselRecommendationCard,
|
|
4328
4520
|
CarouselTariffsCard,
|
|
4329
4521
|
ComparisonTable,
|
|
4522
|
+
DepositFiltration,
|
|
4523
|
+
MortgageFiltration,
|
|
4330
4524
|
ErrorBlock,
|
|
4331
4525
|
ExchangeRateTile,
|
|
4332
4526
|
Footer,
|
|
@@ -4510,7 +4704,7 @@
|
|
|
4510
4704
|
parent: data,
|
|
4511
4705
|
};
|
|
4512
4706
|
useBlockRouterProvider();
|
|
4513
|
-
return (jsxs("div", { children: [jsxs("section", { className: style('relative @container', pageStyle, className), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @lg:space-y-0 @lg:grid @lg:grid-cols-12 @lg:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null
|
|
4707
|
+
return (jsxs("div", { children: [jsxs("section", { className: style('relative @container', pageStyle, className), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @lg:space-y-0 @lg:grid @lg:grid-cols-12 @lg:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null, jsx(StickyBottomMenu, {}), jsx(DialogManager, {})] }), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
|
|
4514
4708
|
});
|
|
4515
4709
|
ContentPage.childrenTypes = [];
|
|
4516
4710
|
ContentPage.slots = () => ['header', 'footer', 'StickyBottomMenu'];
|
|
@@ -4520,7 +4714,7 @@
|
|
|
4520
4714
|
|
|
4521
4715
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
4522
4716
|
|
|
4523
|
-
const packageVersion = "0.13.
|
|
4717
|
+
const packageVersion = "0.13.19";
|
|
4524
4718
|
|
|
4525
4719
|
exports.Blocks = Blocks;
|
|
4526
4720
|
exports.ContentPage = ContentPage;
|