@redneckz/wildless-cms-uni-blocks 0.13.8 → 0.13.10
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/ProjectSettings.d.ts +4 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +82 -46
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
- package/bundle/components/Header/HeaderSubMenu.d.ts +5 -1
- package/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
- package/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
- package/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
- package/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
- package/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
- package/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
- package/bundle/hooks/useActiveRoute.d.ts +2 -0
- package/bundle/hooks/useSWRResource.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +10 -6
- package/bundle/services/sitemap/SitemapData.d.ts +5 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
- package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
- package/cosmos-static/icons/BurgerIcon.svg +1 -1
- package/cosmos-static/icons/ChartIcon.svg +1 -0
- package/cosmos-static/icons/MapOpenedIcon.svg +1 -0
- package/dist/ProjectSettings.d.ts +4 -0
- package/dist/ProjectSettings.js +6 -0
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/ApplicationForm/ResponseNotification.js +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +3 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.page.json +37 -0
- package/dist/components/ContentPage/useContentPageData.js +1 -1
- package/dist/components/ContentPage/useContentPageData.js.map +1 -1
- package/dist/components/DepositFiltration/DepositFiltration.js +14 -8
- package/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
- package/dist/components/Header/Header.js +6 -5
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.d.ts +5 -1
- package/dist/components/Header/HeaderSubMenu.js +8 -7
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js +9 -0
- package/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +12 -0
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +38 -0
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.js +6 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +30 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
- package/dist/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
- package/dist/components/StickyBottomMenu/TopItemMobile.js +12 -0
- package/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
- package/dist/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
- package/dist/components/StickyBottomMenu/renderMenuItems.js +13 -0
- package/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +26 -0
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
- package/dist/hooks/useActiveRoute.d.ts +2 -0
- package/dist/hooks/useActiveRoute.js +11 -0
- package/dist/hooks/useActiveRoute.js.map +1 -0
- package/dist/hooks/useSWRResource.d.ts +1 -1
- package/dist/hooks/useSWRResource.js +3 -2
- package/dist/hooks/useSWRResource.js.map +1 -1
- package/dist/icons/IconName.d.ts +10 -6
- package/dist/icons/IconName.js +9 -5
- package/dist/icons/IconName.js.map +1 -1
- package/dist/services/sitemap/SitemapData.d.ts +5 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/dist/ui-kit/BaseTile/BaseTile.js +8 -5
- package/dist/ui-kit/BaseTile/BaseTile.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/DialogManager/isDialogOpen.d.ts +2 -0
- package/dist/ui-kit/DialogManager/isDialogOpen.js +5 -0
- package/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
- package/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBar.js +2 -1
- package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.js +3 -1
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/dist/wlc.json +1 -0
- package/lib/ProjectSettings.d.ts +4 -0
- package/lib/ProjectSettings.js +6 -0
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ResponseNotification.js +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +3 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.page.json +37 -0
- package/lib/components/ContentPage/useContentPageData.js +1 -1
- package/lib/components/ContentPage/useContentPageData.js.map +1 -1
- package/lib/components/DepositFiltration/DepositFiltration.js +14 -8
- package/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
- package/lib/components/Header/Header.js +6 -5
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.d.ts +5 -1
- package/lib/components/Header/HeaderSubMenu.js +8 -7
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js +7 -0
- package/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +10 -0
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +36 -0
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.fixture.d.ts +8 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.d.ts +6 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.js +4 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +28 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
- package/lib/components/StickyBottomMenu/TopItemMobile.d.ts +8 -0
- package/lib/components/StickyBottomMenu/TopItemMobile.js +9 -0
- package/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
- package/lib/components/StickyBottomMenu/renderMenuItems.d.ts +2 -0
- package/lib/components/StickyBottomMenu/renderMenuItems.js +10 -0
- package/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +23 -0
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
- package/lib/hooks/useActiveRoute.d.ts +2 -0
- package/lib/hooks/useActiveRoute.js +8 -0
- package/lib/hooks/useActiveRoute.js.map +1 -0
- package/lib/hooks/useSWRResource.d.ts +1 -1
- package/lib/hooks/useSWRResource.js +3 -2
- package/lib/hooks/useSWRResource.js.map +1 -1
- package/lib/icons/IconName.d.ts +10 -6
- package/lib/icons/IconName.js +9 -5
- package/lib/icons/IconName.js.map +1 -1
- package/lib/services/sitemap/SitemapData.d.ts +5 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/lib/ui-kit/BaseTile/BaseTile.js +8 -5
- package/lib/ui-kit/BaseTile/BaseTile.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/DialogManager/isDialogOpen.d.ts +2 -0
- package/lib/ui-kit/DialogManager/isDialogOpen.js +2 -0
- package/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
- package/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +0 -1
- package/lib/ui-kit/LocationDialog/renderRegion.d.ts +0 -1
- package/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +0 -1
- package/lib/ui-kit/SearchBar/SearchBar.js +2 -1
- package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.js +3 -1
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/lib/wlc.json +1 -0
- package/mobile/bundle/ProjectSettings.d.ts +4 -0
- package/mobile/bundle/bundle.umd.js +446 -68
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
- package/mobile/bundle/components/Header/HeaderSubMenu.d.ts +5 -1
- package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
- package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
- package/mobile/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
- package/mobile/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
- package/mobile/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
- package/mobile/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
- package/mobile/bundle/hooks/useActiveRoute.d.ts +2 -0
- package/mobile/bundle/hooks/useSWRResource.d.ts +1 -1
- package/mobile/bundle/icons/IconName.d.ts +10 -6
- package/mobile/bundle/services/sitemap/SitemapData.d.ts +5 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
- package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
- package/mobile/dist/ProjectSettings.d.ts +4 -0
- package/mobile/dist/ProjectSettings.js +6 -0
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ResponseNotification.js +1 -1
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +3 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.page.json +37 -0
- package/mobile/dist/components/ContentPage/useContentPageData.js +1 -1
- package/mobile/dist/components/ContentPage/useContentPageData.js.map +1 -1
- package/mobile/dist/components/DepositFiltration/DepositFiltration.js +14 -8
- package/mobile/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/mobile/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
- package/mobile/dist/components/Header/HeaderSubMenu.d.ts +5 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +8 -7
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js +9 -0
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +12 -0
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +38 -0
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +30 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js +12 -0
- package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js +13 -0
- package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +26 -0
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
- package/mobile/dist/hooks/useActiveRoute.d.ts +2 -0
- package/mobile/dist/hooks/useActiveRoute.js +11 -0
- package/mobile/dist/hooks/useActiveRoute.js.map +1 -0
- package/mobile/dist/hooks/useSWRResource.d.ts +1 -1
- package/mobile/dist/hooks/useSWRResource.js +3 -2
- package/mobile/dist/hooks/useSWRResource.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +10 -6
- package/mobile/dist/icons/IconName.js +9 -5
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/services/sitemap/SitemapData.d.ts +5 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +8 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.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/DialogManager/isDialogOpen.d.ts +2 -0
- package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js +5 -0
- package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +3 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/dist/wlc.json +1 -0
- package/mobile/lib/ProjectSettings.d.ts +4 -0
- package/mobile/lib/ProjectSettings.js +6 -0
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ResponseNotification.js +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +3 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.page.json +37 -0
- package/mobile/lib/components/ContentPage/useContentPageData.js +1 -1
- package/mobile/lib/components/ContentPage/useContentPageData.js.map +1 -1
- package/mobile/lib/components/DepositFiltration/DepositFiltration.js +14 -8
- package/mobile/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
- package/mobile/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
- package/mobile/lib/components/Header/HeaderSubMenu.d.ts +5 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +8 -7
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js +7 -0
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +10 -0
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +36 -0
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +28 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js +9 -0
- package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/renderMenuItems.d.ts +3 -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/useBurgerMenuDialog.d.ts +6 -0
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +23 -0
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
- package/mobile/lib/hooks/useActiveRoute.d.ts +2 -0
- package/mobile/lib/hooks/useActiveRoute.js +8 -0
- package/mobile/lib/hooks/useActiveRoute.js.map +1 -0
- package/mobile/lib/hooks/useSWRResource.d.ts +1 -1
- package/mobile/lib/hooks/useSWRResource.js +3 -2
- package/mobile/lib/hooks/useSWRResource.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +10 -6
- package/mobile/lib/icons/IconName.js +9 -5
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/services/sitemap/SitemapData.d.ts +5 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +8 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.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/DialogManager/isDialogOpen.d.ts +2 -0
- package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js +2 -0
- package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +3 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/lib/wlc.json +1 -0
- package/mobile/src/ProjectSettings.ts +8 -0
- package/mobile/src/components/ApplicationForm/ResponseNotification.tsx +2 -2
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ContentPage/ContentPage.page.json +37 -0
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -1
- package/mobile/src/components/ContentPage/useContentPageData.ts +1 -1
- package/mobile/src/components/DepositFiltration/DepositFiltration.example.json +11 -1
- package/mobile/src/components/DepositFiltration/DepositFiltration.tsx +18 -12
- package/mobile/src/components/DepositFiltration/DepositFiltrationContent.ts +1 -2
- package/mobile/src/components/Header/HeaderSubMenu.tsx +16 -8
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenu.tsx +16 -0
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +32 -0
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +102 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.example.json +35 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +43 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.ui.json +11 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +24 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +10 -0
- package/mobile/src/components/StickyBottomMenu/TopItemMobile.tsx +32 -0
- package/mobile/src/components/StickyBottomMenu/renderMenuItems.tsx +32 -0
- package/mobile/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +34 -0
- package/mobile/src/hooks/useActiveRoute.ts +12 -0
- package/mobile/src/hooks/useSWRResource.ts +3 -1
- package/mobile/src/icons/BurgerIcon.svg +4 -4
- package/mobile/src/icons/ChartIcon.svg +7 -0
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/MapOpenedIcon.svg +5 -0
- package/mobile/src/services/sitemap/SitemapData.ts +5 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +17 -12
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +16 -7
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +2 -2
- package/mobile/src/ui-kit/DialogManager/isDialogOpen.ts +4 -0
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +1 -1
- package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +3 -2
- package/mobile/src/ui-kit/SearchDialog/SearchInput.tsx +2 -2
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +5 -3
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +11 -0
- package/mobile/src/wlc.json +1 -0
- package/package.json +1 -1
- package/src/ProjectSettings.ts +8 -0
- package/src/components/ApplicationForm/ResponseNotification.tsx +2 -2
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +37 -0
- package/src/components/ContentPage/ContentPage.tsx +3 -1
- package/src/components/ContentPage/useContentPageData.ts +1 -1
- package/src/components/DepositFiltration/DepositFiltration.example.json +11 -1
- package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +21 -8
- package/src/components/DepositFiltration/DepositFiltration.tsx +18 -12
- package/src/components/DepositFiltration/DepositFiltrationContent.ts +1 -2
- package/src/components/Header/Header.tsx +12 -6
- package/src/components/Header/HeaderSubMenu.tsx +16 -8
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/StickyBottomMenu/ActiveSubMenu.tsx +16 -0
- package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +32 -0
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +102 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.example.json +35 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.tsx +36 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.tsx +36 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +43 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.tsx +4 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.ui.json +11 -0
- package/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +24 -0
- package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +10 -0
- package/src/components/StickyBottomMenu/TopItemMobile.tsx +32 -0
- package/src/components/StickyBottomMenu/renderMenuItems.tsx +32 -0
- package/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +34 -0
- package/src/hooks/useActiveRoute.ts +12 -0
- package/src/hooks/useSWRResource.ts +3 -1
- package/src/icons/BurgerIcon.svg +4 -4
- package/src/icons/ChartIcon.svg +7 -0
- package/src/icons/IconName.ts +6 -389
- package/src/icons/MapOpenedIcon.svg +5 -0
- package/src/services/sitemap/SitemapData.ts +5 -1
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +17 -12
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
- package/src/ui-kit/BaseTile/BaseTile.tsx +16 -7
- package/src/ui-kit/DialogManager/Dialog.tsx +2 -2
- package/src/ui-kit/DialogManager/isDialogOpen.ts +4 -0
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBar.tsx +3 -2
- package/src/ui-kit/SearchDialog/SearchInput.tsx +2 -2
- package/src/ui-kit/Sitemap/Sitemap.tsx +5 -3
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +11 -0
- package/src/wlc.json +1 -0
- /package/cosmos-static/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
- /package/cosmos-static/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
- /package/mobile/src/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
- /package/mobile/src/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
- /package/src/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
- /package/src/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
|
@@ -78,7 +78,17 @@ const SCHEMA: DepositFiltrationContent['filtrationSchema'] = {
|
|
|
78
78
|
},
|
|
79
79
|
sum: {
|
|
80
80
|
title: 'Сумма',
|
|
81
|
-
type: '
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
min: {
|
|
84
|
+
title: 'Минимум',
|
|
85
|
+
type: 'number',
|
|
86
|
+
},
|
|
87
|
+
max: {
|
|
88
|
+
title: 'Максимум',
|
|
89
|
+
type: 'number',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
82
92
|
},
|
|
83
93
|
period: {
|
|
84
94
|
title: 'Срок',
|
|
@@ -109,7 +119,7 @@ export default {
|
|
|
109
119
|
filtrationSchema={SCHEMA}
|
|
110
120
|
topItemsCount={2}
|
|
111
121
|
sumInput={{ title: 'Сумма' }}
|
|
112
|
-
periodInput={{ title: 'Срок, месяцев', min: 3, max:
|
|
122
|
+
periodInput={{ title: 'Срок, месяцев', min: 3, max: 60 }}
|
|
113
123
|
resetButton={{ text: 'Очистить фильтры', version: 'secondary' }}
|
|
114
124
|
notFound={{
|
|
115
125
|
title: 'Нет подходящей программы',
|
|
@@ -125,7 +135,7 @@ export default {
|
|
|
125
135
|
OPTIONS_PENSIONER,
|
|
126
136
|
PERCENTS_IN_THE_END,
|
|
127
137
|
{
|
|
128
|
-
sum: 5000,
|
|
138
|
+
sum: { min: 500, max: 5000 },
|
|
129
139
|
period: { min: 9, max: 38 },
|
|
130
140
|
},
|
|
131
141
|
),
|
|
@@ -135,7 +145,10 @@ export default {
|
|
|
135
145
|
OPTIONS_ADD,
|
|
136
146
|
OPTIONS_ONLINE,
|
|
137
147
|
PERCENTS_EACH_MONTH,
|
|
138
|
-
{
|
|
148
|
+
{
|
|
149
|
+
sum: { min: 500, max: 1000 },
|
|
150
|
+
period: { min: 9, max: 38 },
|
|
151
|
+
},
|
|
139
152
|
),
|
|
140
153
|
generateBlock(
|
|
141
154
|
PRODUCT_TILE,
|
|
@@ -144,7 +157,7 @@ export default {
|
|
|
144
157
|
OPTIONS_PENSIONER,
|
|
145
158
|
PERCENTS_EACH_MONTH,
|
|
146
159
|
{
|
|
147
|
-
sum: 500,
|
|
160
|
+
sum: { min: 500, max: 1500 },
|
|
148
161
|
period: { min: 9, max: 38 },
|
|
149
162
|
},
|
|
150
163
|
),
|
|
@@ -155,7 +168,7 @@ export default {
|
|
|
155
168
|
OPTIONS_PENSIONER,
|
|
156
169
|
PERCENTS_EACH_MONTH,
|
|
157
170
|
{
|
|
158
|
-
sum: 1000,
|
|
171
|
+
sum: { min: 500, max: 1000 },
|
|
159
172
|
period: { min: 9, max: 38 },
|
|
160
173
|
},
|
|
161
174
|
),
|
|
@@ -166,7 +179,7 @@ export default {
|
|
|
166
179
|
OPTIONS_ONLINE,
|
|
167
180
|
PERCENTS_IN_THE_END,
|
|
168
181
|
{
|
|
169
|
-
sum: 1000,
|
|
182
|
+
sum: { min: 500, max: 1000 },
|
|
170
183
|
period: { min: 9, max: 38 },
|
|
171
184
|
},
|
|
172
185
|
),
|
|
@@ -177,7 +190,7 @@ export default {
|
|
|
177
190
|
OPTIONS_PENSIONER,
|
|
178
191
|
PERCENTS_EACH_MONTH,
|
|
179
192
|
{
|
|
180
|
-
sum: 1000,
|
|
193
|
+
sum: { min: 500, max: 1000 },
|
|
181
194
|
period: { min: 9, max: 38 },
|
|
182
195
|
},
|
|
183
196
|
),
|
|
@@ -11,25 +11,28 @@ import type { DepositFiltrationContent } from './DepositFiltrationContent';
|
|
|
11
11
|
|
|
12
12
|
interface DepositFiltrationProps extends DepositFiltrationContent, UniBlockProps {}
|
|
13
13
|
|
|
14
|
+
const DEFAULT_MIN_MONTHS = 3;
|
|
15
|
+
const DEFAULT_MAX_MONTHS = 60;
|
|
16
|
+
|
|
17
|
+
const DEFAULT_MIN_SUM = 500;
|
|
18
|
+
const DEFAULT_MAX_SUM = 1000000000;
|
|
19
|
+
|
|
14
20
|
const initialFiltrationState = {
|
|
15
|
-
sum:
|
|
21
|
+
sum: {
|
|
22
|
+
min: 10000,
|
|
23
|
+
max: DEFAULT_MAX_SUM,
|
|
24
|
+
},
|
|
16
25
|
period: {
|
|
17
26
|
min: 3,
|
|
18
27
|
max: 36,
|
|
19
28
|
},
|
|
20
29
|
};
|
|
21
30
|
|
|
22
|
-
const DEFAULT_MIN_MONTHS = 3;
|
|
23
|
-
const DEFAULT_MAX_MONTHS = 36;
|
|
24
|
-
|
|
25
|
-
const DEFAULT_MIN_SUM = 500;
|
|
26
|
-
const DEFAULT_MAX_SUM = 1000000000;
|
|
27
|
-
|
|
28
31
|
export const DepositFiltration: JSXBlock<DepositFiltrationProps> = JSX<DepositFiltrationProps>(
|
|
29
32
|
({ className, filtrationSchema = {}, resetButton, sumInput, periodInput, ...rest }) => {
|
|
30
33
|
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
31
34
|
|
|
32
|
-
const
|
|
35
|
+
const maxPeriodValue = periodInput?.max || DEFAULT_MAX_MONTHS;
|
|
33
36
|
|
|
34
37
|
const Inputs = (
|
|
35
38
|
<div>
|
|
@@ -37,15 +40,18 @@ export const DepositFiltration: JSXBlock<DepositFiltrationProps> = JSX<DepositFi
|
|
|
37
40
|
label={sumInput?.title}
|
|
38
41
|
min={DEFAULT_MIN_SUM}
|
|
39
42
|
max={DEFAULT_MAX_SUM}
|
|
40
|
-
{...field('sum', {
|
|
43
|
+
{...field('sum', {
|
|
44
|
+
parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
|
|
45
|
+
format: ({ min }) => String(min),
|
|
46
|
+
})}
|
|
41
47
|
/>
|
|
42
48
|
<InputRange
|
|
43
49
|
title={periodInput?.title}
|
|
44
|
-
items={['От 3 мес', 'До
|
|
50
|
+
items={['От 3 мес', 'До 5 лет']}
|
|
45
51
|
min={periodInput?.min || DEFAULT_MIN_MONTHS}
|
|
46
|
-
max={
|
|
52
|
+
max={maxPeriodValue}
|
|
47
53
|
{...field('period', {
|
|
48
|
-
parse: (min) => ({ min, max:
|
|
54
|
+
parse: (min) => ({ min, max: maxPeriodValue }),
|
|
49
55
|
format: ({ min }) => min,
|
|
50
56
|
})}
|
|
51
57
|
/>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
BaseFiltrationInnerContent,
|
|
3
3
|
NumberRange,
|
|
4
|
-
NumberValue,
|
|
5
4
|
StringArray,
|
|
6
5
|
} from '../../ui-kit/BaseFiltration/BaseFiltrationContent';
|
|
7
6
|
|
|
@@ -13,7 +12,7 @@ export type DepositFiltrationSchema = {
|
|
|
13
12
|
/** @title Выплата процентов */
|
|
14
13
|
percents?: StringArray;
|
|
15
14
|
/** @hidden */
|
|
16
|
-
sum?:
|
|
15
|
+
sum?: NumberRange;
|
|
17
16
|
/** @hidden */
|
|
18
17
|
period?: NumberRange;
|
|
19
18
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
3
|
+
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
4
|
+
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
3
5
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
4
6
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
7
|
+
import type { SitemapData } from '../../services/sitemap/SitemapData';
|
|
5
8
|
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
6
9
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
10
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
@@ -10,7 +13,6 @@ import { style } from '../../utils/style';
|
|
|
10
13
|
import type { HeaderProps } from './HeaderProps';
|
|
11
14
|
import { HeaderSecondaryMenu } from './HeaderSecondaryMenu';
|
|
12
15
|
import { HeaderSubMenu } from './HeaderSubMenu';
|
|
13
|
-
import { isTopItemActive } from './isTopItemActive';
|
|
14
16
|
|
|
15
17
|
const BG_COLOR_TO_BLOCK_VERSION: Record<BgColorVersion, BlockVersion> = {
|
|
16
18
|
'bg-white': 'primary',
|
|
@@ -19,12 +21,16 @@ const BG_COLOR_TO_BLOCK_VERSION: Record<BgColorVersion, BlockVersion> = {
|
|
|
19
21
|
|
|
20
22
|
export const Header = JSX<HeaderProps>(
|
|
21
23
|
({ className, bgColor = 'bg-white', version = BG_COLOR_TO_BLOCK_VERSION[bgColor], ...rest }) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const { topItems, logo, officesLink, internetBankUrl, defaultLocation } = useSitemap(
|
|
24
|
+
const { topItems, logo, officesLink, defaultLocation } = useSitemap(
|
|
25
25
|
rest.options?.page?.fallback,
|
|
26
26
|
);
|
|
27
|
-
const activeTopItem = topItems
|
|
27
|
+
const [, activeTopItem] = useActiveRoute(topItems);
|
|
28
|
+
|
|
29
|
+
const { internetBankUrl } = useSWRResource<SitemapData>(
|
|
30
|
+
projectSettings.PORTAL_DATA || 'portal-data',
|
|
31
|
+
{},
|
|
32
|
+
'portal-resources',
|
|
33
|
+
);
|
|
28
34
|
|
|
29
35
|
return (
|
|
30
36
|
<BlockWrapper
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useMemo, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import { projectSettings } from '../../ProjectSettings';
|
|
4
3
|
import type { IntersectionObserverOptions } from '../../hooks/useIntersectionObserver';
|
|
5
4
|
import { useRouter } from '../../hooks/useRouter';
|
|
6
5
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
7
6
|
import type { IconVersion } from '../../model/IconVersion';
|
|
8
7
|
import type { LinkProps } from '../../model/LinkProps';
|
|
8
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
9
9
|
import { DropdownMenu } from './DropdownMenu';
|
|
10
|
+
import { findActiveSubItem } from './findActiveSubItem';
|
|
10
11
|
import { HeaderChatBotButton } from './HeaderChatBotButton';
|
|
11
12
|
import { HeaderSubMenuItem } from './HeaderSubMenuItem';
|
|
12
13
|
import { InternetBankButton } from './InternetBankButton';
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
interface HeaderSubMenuLinkProps extends LinkProps {
|
|
16
|
+
displayArea?: string;
|
|
17
|
+
}
|
|
14
18
|
|
|
15
19
|
export interface HeaderSubMenuProps {
|
|
16
20
|
version?: BlockVersion;
|
|
17
|
-
subItems?:
|
|
21
|
+
subItems?: HeaderSubMenuLinkProps[];
|
|
18
22
|
internetBankUrl?: string;
|
|
19
23
|
}
|
|
20
24
|
|
|
@@ -24,24 +28,28 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
|
|
|
24
28
|
|
|
25
29
|
const router = useRouter();
|
|
26
30
|
|
|
31
|
+
const visibleSubItems = useMemo(
|
|
32
|
+
() => subItems.filter((item) => !item.displayArea || item.displayArea === 'Header'),
|
|
33
|
+
[subItems],
|
|
34
|
+
);
|
|
27
35
|
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
28
36
|
|
|
29
|
-
const [visibleItemsCount, setVisibleItemsCount] = useState(
|
|
37
|
+
const [visibleItemsCount, setVisibleItemsCount] = useState(visibleSubItems.length);
|
|
30
38
|
|
|
31
|
-
const dropDownMenuItems =
|
|
39
|
+
const dropDownMenuItems = visibleSubItems.slice(visibleItemsCount);
|
|
32
40
|
|
|
33
41
|
const subItemsListRef = useRef<HTMLDivElement | null>(null);
|
|
34
42
|
const observerOptions: IntersectionObserverOptions = { rootRef: subItemsListRef };
|
|
35
43
|
const subItemsVisibilityHandlers = useMemo(
|
|
36
44
|
() =>
|
|
37
|
-
|
|
45
|
+
visibleSubItems.map((_, index) => (isIntersecting: boolean) => {
|
|
38
46
|
setVisibleItemsCount(
|
|
39
47
|
isIntersecting
|
|
40
48
|
? handleIntersectionActivation(index)
|
|
41
49
|
: handleIntersectionDeactivation(index),
|
|
42
50
|
);
|
|
43
51
|
}),
|
|
44
|
-
[
|
|
52
|
+
[visibleSubItems],
|
|
45
53
|
);
|
|
46
54
|
|
|
47
55
|
return (
|
|
@@ -50,7 +58,7 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
|
|
|
50
58
|
ref={subItemsListRef}
|
|
51
59
|
className="overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl"
|
|
52
60
|
>
|
|
53
|
-
{
|
|
61
|
+
{visibleSubItems.map((_, i) => (
|
|
54
62
|
<HeaderSubMenuItem
|
|
55
63
|
key={String(i)}
|
|
56
64
|
className={visibleItemsCount - 1 < i ? 'invisible' : ''}
|
|
@@ -25,7 +25,7 @@ export const PictureText = JSX<PictureTextProps>(
|
|
|
25
25
|
padding={padding}
|
|
26
26
|
headlineVersion={headlineVersion}
|
|
27
27
|
align={align}
|
|
28
|
-
|
|
28
|
+
isFullWidthTitle={false}
|
|
29
29
|
imageOptions={{ directionRight: false, imageAlign: 'center', ...imageOptions }}
|
|
30
30
|
{...rest}
|
|
31
31
|
>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
3
|
+
import { ActiveSubMenuItem } from './ActiveSubMenuItem';
|
|
4
|
+
|
|
5
|
+
interface ActiveSubMenuProps {
|
|
6
|
+
activeMenuSubItems?: LinkProps[];
|
|
7
|
+
}
|
|
8
|
+
export const ActiveSubMenu = JSX<ActiveSubMenuProps>(({ activeMenuSubItems }) => {
|
|
9
|
+
return activeMenuSubItems ? (
|
|
10
|
+
<div className="mb-5">
|
|
11
|
+
{activeMenuSubItems.map((_, i) => (
|
|
12
|
+
<ActiveSubMenuItem item={_} i={i} />
|
|
13
|
+
))}
|
|
14
|
+
</div>
|
|
15
|
+
) : null;
|
|
16
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
3
|
+
import { useLink } from '../../hooks/useLink';
|
|
4
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
+
|
|
6
|
+
interface ActiveSubMenuItemProps {
|
|
7
|
+
item: LinkProps;
|
|
8
|
+
i: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const ActiveSubMenuItem = JSX<ActiveSubMenuItemProps>(({ item, i }) => {
|
|
12
|
+
const link = useLink();
|
|
13
|
+
const { href, target, onClick } = link(item);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<a
|
|
17
|
+
key={`subItems-${String(i)}`}
|
|
18
|
+
className="py-3 text-h5 font-light flex justify-between cursor-pointer"
|
|
19
|
+
href={href}
|
|
20
|
+
target={target}
|
|
21
|
+
onClick={onClick}
|
|
22
|
+
>
|
|
23
|
+
{item.text}
|
|
24
|
+
<Img
|
|
25
|
+
image={{ icon: 'ChevronLeftIcon', iconVersion: 'black' }}
|
|
26
|
+
width="24"
|
|
27
|
+
height="24"
|
|
28
|
+
className="text-secondary-text rotate-180 opacity-30"
|
|
29
|
+
/>
|
|
30
|
+
</a>
|
|
31
|
+
);
|
|
32
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLocation } from '../../hooks/useLocation';
|
|
3
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
4
|
+
import { SearchBar } from '../../ui-kit/SearchBar/SearchBar';
|
|
5
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
6
|
+
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
7
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
8
|
+
import { useLocationDialog } from '../../ui-kit/LocationDialog/useLocationDialog';
|
|
9
|
+
import { SwipeListContainer } from '../../ui-kit/SwipeListControl/SwipeListContainer';
|
|
10
|
+
import { useSwipeListScroll } from '../../ui-kit/SwipeListControl/useSwipeListScroll';
|
|
11
|
+
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
12
|
+
import { TopItemMobile } from './TopItemMobile';
|
|
13
|
+
import { ActiveSubMenu } from './ActiveSubMenu';
|
|
14
|
+
import { Dialog } from '../../ui-kit/DialogManager/Dialog';
|
|
15
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
16
|
+
import type { RefObject } from 'react';
|
|
17
|
+
import { useActiveRoute } from '../../hooks/useActiveRoute';
|
|
18
|
+
|
|
19
|
+
interface BurgerMenuDialogProps extends UniBlockProps {
|
|
20
|
+
containerRef?: RefObject<HTMLDivElement>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const BurgerMenuDialog = JSX<BurgerMenuDialogProps>((props) => {
|
|
24
|
+
const { topItems, officesLink, defaultLocation } = useSitemap(props.options?.page?.fallback);
|
|
25
|
+
const [location] = useLocation(defaultLocation);
|
|
26
|
+
const locationDialog = useLocationDialog();
|
|
27
|
+
const openLocationDialog = useCallback(() => locationDialog.open(), []);
|
|
28
|
+
const itemCount = Array.isArray(topItems) ? topItems.length : 0;
|
|
29
|
+
const [containerRef, scroll] = useSwipeListScroll<HTMLDivElement>({
|
|
30
|
+
itemCount,
|
|
31
|
+
});
|
|
32
|
+
const [activeTopItemIndex, activeRoute] = useActiveRoute(topItems);
|
|
33
|
+
const activeMenuSubItems = activeRoute?.items || [];
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (activeTopItemIndex > 0) {
|
|
37
|
+
scroll.scrollTo(activeTopItemIndex);
|
|
38
|
+
}
|
|
39
|
+
}, [activeTopItemIndex, scroll]);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Dialog
|
|
43
|
+
head={
|
|
44
|
+
<div className="flex items-center">
|
|
45
|
+
<Heading as="h4" title="Меню" />
|
|
46
|
+
</div>
|
|
47
|
+
}
|
|
48
|
+
>
|
|
49
|
+
<div className="flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md">
|
|
50
|
+
<div className="w-full mb-3">
|
|
51
|
+
<SwipeListContainer
|
|
52
|
+
containerRef={containerRef}
|
|
53
|
+
visibleItemCount={0}
|
|
54
|
+
gap={20}
|
|
55
|
+
className="pb-3"
|
|
56
|
+
>
|
|
57
|
+
{topItems?.map((item, i) => (
|
|
58
|
+
<TopItemMobile item={item} i={i} isActive={activeTopItemIndex === i} />
|
|
59
|
+
))}
|
|
60
|
+
</SwipeListContainer>
|
|
61
|
+
</div>
|
|
62
|
+
<div className="relative grow overflow-auto">
|
|
63
|
+
<ActiveSubMenu activeMenuSubItems={activeMenuSubItems} />
|
|
64
|
+
<SearchBar className="grow mb-5" />
|
|
65
|
+
{renderOfficeLink(officesLink)}
|
|
66
|
+
<div className="flex items-center text-s cursor-pointer" onClick={openLocationDialog}>
|
|
67
|
+
<Img
|
|
68
|
+
image={{ icon: 'GeolocationIcon', iconVersion: 'black' }}
|
|
69
|
+
width="24"
|
|
70
|
+
height="24"
|
|
71
|
+
className="text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"
|
|
72
|
+
/>
|
|
73
|
+
<div className="flex flex-col items-start">
|
|
74
|
+
<Text size="text-h5">{location.name}</Text>
|
|
75
|
+
<Text color="text-secondary-text" size="text-s">
|
|
76
|
+
Ваша локация
|
|
77
|
+
</Text>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</Dialog>
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const renderOfficeLink = (officesLink?: string) =>
|
|
87
|
+
officesLink ? (
|
|
88
|
+
<a
|
|
89
|
+
className="flex items-center mb-3"
|
|
90
|
+
href={officesLink}
|
|
91
|
+
rel="noopener noreferrer"
|
|
92
|
+
aria-label="Офисы и банкоматы"
|
|
93
|
+
>
|
|
94
|
+
<Img
|
|
95
|
+
image={{ icon: 'MapOpenedIcon', iconVersion: 'black' }}
|
|
96
|
+
width="24"
|
|
97
|
+
height="24"
|
|
98
|
+
className="text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"
|
|
99
|
+
/>
|
|
100
|
+
<span>Офисы и банкоматы</span>
|
|
101
|
+
</a>
|
|
102
|
+
) : null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"content": {
|
|
3
|
+
"title": "Кнопки меню",
|
|
4
|
+
"menuItems": [
|
|
5
|
+
{
|
|
6
|
+
"title": "Кредиты",
|
|
7
|
+
"url": "#EmptyWalletIcon",
|
|
8
|
+
"icon": {
|
|
9
|
+
"icon": "EmptyWalletIcon"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Карты",
|
|
14
|
+
"url": "#CardIcon",
|
|
15
|
+
"icon": {
|
|
16
|
+
"icon": "CardIcon"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"title": "Вклады",
|
|
21
|
+
"url": "#SafeIcon",
|
|
22
|
+
"icon": {
|
|
23
|
+
"icon": "SafeIcon"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"title": "Инвестиции",
|
|
28
|
+
"url": "#ChartIcon",
|
|
29
|
+
"icon": {
|
|
30
|
+
"icon": "ChartIcon"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
import { StickyBottomMenu } from './StickyBottomMenu';
|
|
3
|
+
import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
|
|
4
|
+
import type { MenuItem } from './StickyBottomMenuContent';
|
|
5
|
+
|
|
6
|
+
const MENU_ITEMS: MenuItem[] = [
|
|
7
|
+
{
|
|
8
|
+
title: 'Кредиты',
|
|
9
|
+
url: '#EmptyWalletIcon',
|
|
10
|
+
icon: { icon: 'EmptyWalletIcon' },
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: 'Карты',
|
|
14
|
+
url: '#CardIcon',
|
|
15
|
+
icon: { icon: 'CardIcon' },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'Вклады',
|
|
19
|
+
url: '#SafeIcon',
|
|
20
|
+
icon: { icon: 'SafeIcon' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Инвестиции',
|
|
24
|
+
url: '#ChartIcon',
|
|
25
|
+
icon: { icon: 'ChartIcon' },
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
default: (
|
|
31
|
+
<div>
|
|
32
|
+
<StickyBottomMenu menuItems={MENU_ITEMS} />
|
|
33
|
+
<DialogManager />
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
import { StickyBottomMenu } from './StickyBottomMenu';
|
|
3
|
+
import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
|
|
4
|
+
import type { MenuItem } from './StickyBottomMenuContent';
|
|
5
|
+
|
|
6
|
+
export const MENU_ITEMS: MenuItem[] = [
|
|
7
|
+
{
|
|
8
|
+
title: 'Кредиты',
|
|
9
|
+
url: '#EmptyWalletIcon',
|
|
10
|
+
icon: { icon: 'EmptyWalletIcon' },
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: 'Карты',
|
|
14
|
+
url: '#CardIcon',
|
|
15
|
+
icon: { icon: 'CardIcon' },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'Вклады',
|
|
19
|
+
url: '#SafeIcon',
|
|
20
|
+
icon: { icon: 'SafeIcon' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Инвестиции',
|
|
24
|
+
url: '#ChartIcon',
|
|
25
|
+
icon: { icon: 'ChartIcon' },
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
default: (
|
|
31
|
+
<div>
|
|
32
|
+
<StickyBottomMenu menuItems={MENU_ITEMS} />
|
|
33
|
+
<DialogManager />
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { BurgerMenuDialog } from './BurgerMenuDialog';
|
|
4
|
+
import { useBurgerMenuDialog } from './useBurgerMenuDialog';
|
|
5
|
+
import type { MenuItemProps, StickyBottomMenuProps } from './StickyBottomMenuProps';
|
|
6
|
+
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
7
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
8
|
+
import { renderMenuItems } from './renderMenuItems';
|
|
9
|
+
|
|
10
|
+
export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
11
|
+
const { menuItems = [] } = useSWRResource<StickyBottomMenuProps>(
|
|
12
|
+
projectSettings.STICKY_MOBILE_MENU || 'stickyBottomMenu',
|
|
13
|
+
rest.options?.page?.fallback,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const [isBurgerMenuDialogOpen, { toggle }] = useBurgerMenuDialog();
|
|
17
|
+
|
|
18
|
+
const burgerMenu = {
|
|
19
|
+
title: 'Меню',
|
|
20
|
+
icon: {
|
|
21
|
+
icon: 'BurgerIcon',
|
|
22
|
+
iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
|
|
23
|
+
},
|
|
24
|
+
isActive: isBurgerMenuDialogOpen,
|
|
25
|
+
};
|
|
26
|
+
const middleIdx = Math.floor(menuItems.length / 2);
|
|
27
|
+
const menuItemsWithButton = useMemo(
|
|
28
|
+
() =>
|
|
29
|
+
[
|
|
30
|
+
...menuItems.slice(0, middleIdx),
|
|
31
|
+
burgerMenu,
|
|
32
|
+
...menuItems.slice(middleIdx),
|
|
33
|
+
] as MenuItemProps[],
|
|
34
|
+
[menuItems, middleIdx, burgerMenu],
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className="contents">
|
|
39
|
+
{renderMenuItems(menuItemsWithButton, toggle)}
|
|
40
|
+
{isBurgerMenuDialogOpen ? <BurgerMenuDialog /> : null}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { StickyBottomMenuProps } from './StickyBottomMenuProps';
|
|
3
|
+
|
|
4
|
+
export const StickyBottomMenu = JSX<StickyBottomMenuProps>(() => <div></div>); // DO not remove "<div></div>". Required to pass tests. With "null" it's falling.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Picture } from '../../model/Picture';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @title Пункт меню
|
|
5
|
+
*/
|
|
6
|
+
export interface MenuItem {
|
|
7
|
+
/** @title Название */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** @title Адрес */
|
|
10
|
+
url?: string;
|
|
11
|
+
/** @title Иконка */
|
|
12
|
+
icon?: Picture;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @title Кнопки меню
|
|
17
|
+
*/
|
|
18
|
+
export interface StickyBottomMenuContent {
|
|
19
|
+
/**
|
|
20
|
+
* @title Кнопки
|
|
21
|
+
* @maxItems 4
|
|
22
|
+
*/
|
|
23
|
+
menuItems?: MenuItem[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
+
import type { MenuItem, StickyBottomMenuContent } from './StickyBottomMenuContent';
|
|
3
|
+
|
|
4
|
+
export interface MenuItemProps extends MenuItem {
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface StickyBottomMenuProps extends StickyBottomMenuContent, UniBlockProps {
|
|
9
|
+
menuItems?: MenuItemProps[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { TopMenuItemProps } from '../../services/sitemap/SitemapData';
|
|
2
|
+
import { style } from '../../utils/style';
|
|
3
|
+
import { useLink } from '../../hooks/useLink';
|
|
4
|
+
|
|
5
|
+
interface TopItemProps {
|
|
6
|
+
item: TopMenuItemProps;
|
|
7
|
+
i: number;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const TopItemMobile = ({ item, i, isActive }: TopItemProps) => {
|
|
12
|
+
const link = useLink();
|
|
13
|
+
const { href, target, onClick } = link(item);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<a
|
|
17
|
+
key={String(i)}
|
|
18
|
+
href={href}
|
|
19
|
+
target={target}
|
|
20
|
+
onClick={onClick}
|
|
21
|
+
className="relative"
|
|
22
|
+
aria-label={item.text}
|
|
23
|
+
>
|
|
24
|
+
<span className={style('whitespace-nowrap', isActive ? 'text-primary-main' : '')}>
|
|
25
|
+
{item.text}
|
|
26
|
+
</span>
|
|
27
|
+
{isActive ? (
|
|
28
|
+
<div className="absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" />
|
|
29
|
+
) : null}
|
|
30
|
+
</a>
|
|
31
|
+
);
|
|
32
|
+
};
|