@redneckz/wildless-cms-uni-blocks 0.14.361 → 0.14.363
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.14.325.js +0 -1
- package/bin/migration-scripts/0.14.328.js +0 -1
- package/bundle/ProjectSettings.d.ts +1 -0
- package/bundle/bundle.umd.js +121 -75
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/LinkList.d.ts +0 -1
- package/bundle/components/Header/DropdownMenu.d.ts +3 -0
- package/bundle/components/Header/isHrefActive.d.ts +3 -6
- package/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/bundle/hooks/useActiveRoute.d.ts +2 -3
- package/bundle/hooks/useLink.d.ts +2 -2
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -1
- package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +3 -1
- package/bundle/ui-kit/Sitemap/isVisibleItem.d.ts +2 -0
- package/bundle/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -0
- package/bundle/utils/adjustBase.d.ts +1 -0
- package/bundle/utils/adjustHref.d.ts +1 -1
- package/bundle/utils/getBasePath.d.ts +1 -0
- package/bundle/utils/url.d.ts +1 -0
- package/dist/ProjectSettings.d.ts +1 -0
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/Depository/DepositoryItem.js +1 -1
- package/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/dist/components/Footer/LinkList.d.ts +0 -1
- package/dist/components/Footer/LinkList.js +8 -8
- package/dist/components/Footer/LinkList.js.map +1 -1
- package/dist/components/Footer/TextInformationLink.js +1 -1
- package/dist/components/Footer/TextInformationLink.js.map +1 -1
- package/dist/components/Footer/renderLogoSearchBar.js +2 -1
- package/dist/components/Footer/renderLogoSearchBar.js.map +1 -1
- package/dist/components/Header/DropdownMenu.d.ts +3 -0
- package/dist/components/Header/DropdownMenu.js +12 -13
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/Header/Header.js +5 -3
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js +7 -11
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +7 -4
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Header/isHrefActive.d.ts +3 -6
- package/dist/components/Header/isHrefActive.js +14 -3
- package/dist/components/Header/isHrefActive.js.map +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +2 -8
- package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/hooks/useActiveRoute.d.ts +2 -3
- package/dist/hooks/useActiveRoute.js +12 -2
- package/dist/hooks/useActiveRoute.js.map +1 -1
- package/dist/hooks/useLink.d.ts +2 -2
- package/dist/hooks/useLink.js +19 -8
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/setup-fixture.js +2 -2
- package/dist/setup-fixture.js.map +1 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +2 -2
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.d.ts +3 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +1 -5
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.js +5 -6
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.mobile.js +1 -2
- package/dist/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
- package/dist/ui-kit/Sitemap/isVisibleItem.d.ts +2 -0
- package/dist/ui-kit/Sitemap/isVisibleItem.js +5 -0
- package/dist/ui-kit/Sitemap/isVisibleItem.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/scrollBy.js +3 -2
- package/dist/ui-kit/SwipeListControl/scrollBy.js.map +1 -1
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +12 -0
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItem.d.ts +1 -0
- package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.js +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/adjustBase.d.ts +1 -0
- package/dist/utils/adjustBase.js +5 -0
- package/dist/utils/adjustBase.js.map +1 -0
- package/dist/utils/adjustHref.d.ts +1 -1
- package/dist/utils/adjustHref.js +3 -4
- package/dist/utils/adjustHref.js.map +1 -1
- package/dist/utils/getBasePath.d.ts +1 -0
- package/dist/utils/getBasePath.js +14 -0
- package/dist/utils/getBasePath.js.map +1 -0
- package/dist/utils/url.d.ts +1 -0
- package/dist/utils/url.js +3 -1
- package/dist/utils/url.js.map +1 -1
- package/lib/ProjectSettings.d.ts +1 -0
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/components/Depository/DepositoryItem.js +1 -1
- package/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/lib/components/Footer/LinkList.d.ts +0 -1
- package/lib/components/Footer/LinkList.js +8 -8
- package/lib/components/Footer/LinkList.js.map +1 -1
- package/lib/components/Footer/TextInformationLink.js +1 -1
- package/lib/components/Footer/TextInformationLink.js.map +1 -1
- package/lib/components/Footer/renderLogoSearchBar.js +2 -1
- package/lib/components/Footer/renderLogoSearchBar.js.map +1 -1
- package/lib/components/Header/DropdownMenu.d.ts +3 -0
- package/lib/components/Header/DropdownMenu.js +11 -12
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/Header/Header.js +5 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js +7 -11
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +7 -4
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Header/isHrefActive.d.ts +3 -6
- package/lib/components/Header/isHrefActive.js +13 -3
- package/lib/components/Header/isHrefActive.js.map +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +2 -8
- package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/hooks/useActiveRoute.d.ts +2 -3
- package/lib/hooks/useActiveRoute.js +12 -2
- package/lib/hooks/useActiveRoute.js.map +1 -1
- package/lib/hooks/useLink.d.ts +2 -2
- package/lib/hooks/useLink.js +20 -9
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/setup-fixture.js +2 -2
- package/lib/setup-fixture.js.map +1 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +2 -2
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.d.ts +3 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +1 -5
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.js +5 -6
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.mobile.js +1 -2
- package/lib/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
- package/lib/ui-kit/Sitemap/isVisibleItem.d.ts +2 -0
- package/lib/ui-kit/Sitemap/isVisibleItem.js +2 -0
- package/lib/ui-kit/Sitemap/isVisibleItem.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/scrollBy.js +1 -1
- package/lib/ui-kit/SwipeListControl/scrollBy.js.map +1 -1
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +12 -0
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItem.d.ts +1 -0
- package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.js +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/adjustBase.d.ts +1 -0
- package/lib/utils/adjustBase.js +2 -0
- package/lib/utils/adjustBase.js.map +1 -0
- package/lib/utils/adjustHref.d.ts +1 -1
- package/lib/utils/adjustHref.js +2 -3
- package/lib/utils/adjustHref.js.map +1 -1
- package/lib/utils/getBasePath.d.ts +1 -0
- package/lib/utils/getBasePath.js +11 -0
- package/lib/utils/getBasePath.js.map +1 -0
- package/lib/utils/url.d.ts +1 -0
- package/lib/utils/url.js +1 -0
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/ProjectSettings.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +76 -34
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/LinkList.d.ts +0 -1
- package/mobile/bundle/components/Header/DropdownMenu.d.ts +3 -0
- package/mobile/bundle/components/Header/isHrefActive.d.ts +3 -6
- package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/mobile/bundle/hooks/useActiveRoute.d.ts +2 -3
- package/mobile/bundle/hooks/useLink.d.ts +2 -2
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -1
- package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +3 -1
- package/mobile/bundle/ui-kit/Sitemap/isVisibleItem.d.ts +2 -0
- package/mobile/bundle/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -0
- package/mobile/bundle/utils/adjustBase.d.ts +1 -0
- package/mobile/bundle/utils/adjustHref.d.ts +1 -1
- package/mobile/bundle/utils/getBasePath.d.ts +1 -0
- package/mobile/bundle/utils/url.d.ts +1 -0
- package/mobile/dist/ProjectSettings.d.ts +1 -0
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/dist/components/Footer/LinkList.d.ts +0 -1
- package/mobile/dist/components/Footer/LinkList.js +8 -8
- package/mobile/dist/components/Footer/LinkList.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformationLink.js +1 -1
- package/mobile/dist/components/Footer/TextInformationLink.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.d.ts +3 -0
- package/mobile/dist/components/Header/DropdownMenu.js +12 -13
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +7 -11
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +7 -4
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Header/isHrefActive.d.ts +3 -6
- package/mobile/dist/components/Header/isHrefActive.js +14 -3
- package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +2 -8
- package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/hooks/useActiveRoute.d.ts +2 -3
- package/mobile/dist/hooks/useActiveRoute.js +12 -2
- package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
- package/mobile/dist/hooks/useLink.d.ts +2 -2
- package/mobile/dist/hooks/useLink.js +19 -8
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/setup-fixture.js +2 -2
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +3 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +1 -5
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +1 -2
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/isVisibleItem.d.ts +2 -0
- package/mobile/dist/ui-kit/Sitemap/isVisibleItem.js +5 -0
- package/mobile/dist/ui-kit/Sitemap/isVisibleItem.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.js +3 -2
- package/mobile/dist/ui-kit/SwipeListControl/scrollBy.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +12 -0
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +1 -0
- package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/adjustBase.d.ts +1 -0
- package/mobile/dist/utils/adjustBase.js +5 -0
- package/mobile/dist/utils/adjustBase.js.map +1 -0
- package/mobile/dist/utils/adjustHref.d.ts +1 -1
- package/mobile/dist/utils/adjustHref.js +3 -4
- package/mobile/dist/utils/adjustHref.js.map +1 -1
- package/mobile/dist/utils/getBasePath.d.ts +1 -0
- package/mobile/dist/utils/getBasePath.js +14 -0
- package/mobile/dist/utils/getBasePath.js.map +1 -0
- package/mobile/dist/utils/url.d.ts +1 -0
- package/mobile/dist/utils/url.js +3 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/ProjectSettings.d.ts +1 -0
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/lib/components/Footer/LinkList.d.ts +0 -1
- package/mobile/lib/components/Footer/LinkList.js +8 -8
- package/mobile/lib/components/Footer/LinkList.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformationLink.js +1 -1
- package/mobile/lib/components/Footer/TextInformationLink.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.d.ts +3 -0
- package/mobile/lib/components/Header/DropdownMenu.js +11 -12
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +7 -11
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +7 -4
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Header/isHrefActive.d.ts +3 -6
- package/mobile/lib/components/Header/isHrefActive.js +13 -3
- package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +1 -1
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +2 -8
- package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +2 -2
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/hooks/useActiveRoute.d.ts +2 -3
- package/mobile/lib/hooks/useActiveRoute.js +12 -2
- package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
- package/mobile/lib/hooks/useLink.d.ts +2 -2
- package/mobile/lib/hooks/useLink.js +20 -9
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/setup-fixture.js +2 -2
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +3 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +1 -5
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +1 -2
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/isVisibleItem.d.ts +2 -0
- package/mobile/lib/ui-kit/Sitemap/isVisibleItem.js +2 -0
- package/mobile/lib/ui-kit/Sitemap/isVisibleItem.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/scrollBy.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +12 -0
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +1 -0
- package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/adjustBase.d.ts +1 -0
- package/mobile/lib/utils/adjustBase.js +2 -0
- package/mobile/lib/utils/adjustBase.js.map +1 -0
- package/mobile/lib/utils/adjustHref.d.ts +1 -1
- package/mobile/lib/utils/adjustHref.js +2 -3
- package/mobile/lib/utils/adjustHref.js.map +1 -1
- package/mobile/lib/utils/getBasePath.d.ts +1 -0
- package/mobile/lib/utils/getBasePath.js +11 -0
- package/mobile/lib/utils/getBasePath.js.map +1 -0
- package/mobile/lib/utils/url.d.ts +1 -0
- package/mobile/lib/utils/url.js +1 -0
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/ProjectSettings.ts +1 -0
- package/mobile/src/components/Depository/DepositoryItem.tsx +1 -1
- package/mobile/src/components/Footer/LinkList.tsx +9 -11
- package/mobile/src/components/Footer/TextInformationLink.tsx +1 -1
- package/mobile/src/components/Header/DropdownMenu.tsx +34 -29
- package/mobile/src/components/Header/HeaderSubMenu.tsx +7 -12
- package/mobile/src/components/Header/HeaderTop.tsx +10 -4
- package/mobile/src/components/Header/isHrefActive.ts +18 -8
- package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +3 -11
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/mobile/src/hooks/useActiveRoute.ts +16 -5
- package/mobile/src/hooks/useLink.ts +25 -11
- package/mobile/src/setup-fixture.ts +2 -6
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -3
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +2 -2
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +6 -8
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +1 -2
- package/mobile/src/ui-kit/Sitemap/isVisibleItem.ts +4 -0
- package/mobile/src/ui-kit/SwipeListControl/scrollBy.ts +1 -1
- package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +14 -0
- package/mobile/src/ui-kit/TabsControl/TabItem.tsx +1 -0
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/mobile/src/utils/adjustBase.ts +1 -0
- package/mobile/src/utils/adjustHref.ts +2 -6
- package/mobile/src/utils/getBasePath.ts +11 -0
- package/mobile/src/utils/url.ts +3 -0
- package/package.json +1 -1
- package/src/ProjectSettings.ts +1 -0
- package/src/components/Depository/DepositoryItem.tsx +1 -1
- package/src/components/Footer/LinkList.tsx +9 -11
- package/src/components/Footer/TextInformationLink.tsx +1 -1
- package/src/components/Footer/renderLogoSearchBar.tsx +2 -1
- package/src/components/Header/DropdownMenu.tsx +34 -29
- package/src/components/Header/Header.tsx +7 -4
- package/src/components/Header/HeaderSubMenu.tsx +7 -12
- package/src/components/Header/HeaderTop.tsx +10 -4
- package/src/components/Header/isHrefActive.ts +18 -8
- package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +3 -11
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/src/hooks/useActiveRoute.ts +16 -5
- package/src/hooks/useLink.ts +25 -11
- package/src/setup-fixture.ts +2 -6
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +2 -2
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -3
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +2 -2
- package/src/ui-kit/LocationDialog/renderRegion.tsx +6 -8
- package/src/ui-kit/Sitemap/Sitemap.mobile.tsx +1 -2
- package/src/ui-kit/Sitemap/Sitemap.tsx +5 -8
- package/src/ui-kit/Sitemap/isVisibleItem.ts +4 -0
- package/src/ui-kit/SwipeListControl/scrollBy.ts +1 -1
- package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +14 -0
- package/src/ui-kit/TabsControl/TabItem.tsx +1 -0
- package/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/src/utils/adjustBase.ts +1 -0
- package/src/utils/adjustHref.ts +2 -6
- package/src/utils/getBasePath.ts +11 -0
- package/src/utils/url.ts +3 -0
- package/bundle/components/Header/findActiveSubItem.d.ts +0 -3
- package/bundle/components/Header/isTopItemActive.d.ts +0 -4
- package/bundle/components/Header/isVisibleItem.d.ts +0 -2
- package/bundle/ui-kit/Sitemap/SitemapItem.d.ts +0 -7
- package/dist/components/Header/findActiveSubItem.d.ts +0 -3
- package/dist/components/Header/findActiveSubItem.js +0 -12
- package/dist/components/Header/findActiveSubItem.js.map +0 -1
- package/dist/components/Header/isTopItemActive.d.ts +0 -4
- package/dist/components/Header/isTopItemActive.js +0 -7
- package/dist/components/Header/isTopItemActive.js.map +0 -1
- package/dist/components/Header/isVisibleItem.d.ts +0 -2
- package/dist/components/Header/isVisibleItem.js +0 -6
- package/dist/components/Header/isVisibleItem.js.map +0 -1
- package/dist/ui-kit/Sitemap/SitemapItem.d.ts +0 -7
- package/dist/ui-kit/Sitemap/SitemapItem.js +0 -14
- package/dist/ui-kit/Sitemap/SitemapItem.js.map +0 -1
- package/lib/components/Header/findActiveSubItem.d.ts +0 -3
- package/lib/components/Header/findActiveSubItem.js +0 -9
- package/lib/components/Header/findActiveSubItem.js.map +0 -1
- package/lib/components/Header/isTopItemActive.d.ts +0 -4
- package/lib/components/Header/isTopItemActive.js +0 -4
- package/lib/components/Header/isTopItemActive.js.map +0 -1
- package/lib/components/Header/isVisibleItem.d.ts +0 -2
- package/lib/components/Header/isVisibleItem.js +0 -3
- package/lib/components/Header/isVisibleItem.js.map +0 -1
- package/lib/ui-kit/Sitemap/SitemapItem.d.ts +0 -7
- package/lib/ui-kit/Sitemap/SitemapItem.js +0 -12
- package/lib/ui-kit/Sitemap/SitemapItem.js.map +0 -1
- package/mobile/bundle/components/Header/findActiveSubItem.d.ts +0 -3
- package/mobile/bundle/components/Header/isTopItemActive.d.ts +0 -4
- package/mobile/bundle/components/Header/isVisibleItem.d.ts +0 -2
- package/mobile/bundle/ui-kit/Sitemap/SitemapItem.d.ts +0 -7
- package/mobile/dist/components/Header/findActiveSubItem.d.ts +0 -3
- package/mobile/dist/components/Header/findActiveSubItem.js +0 -12
- package/mobile/dist/components/Header/findActiveSubItem.js.map +0 -1
- package/mobile/dist/components/Header/isTopItemActive.d.ts +0 -4
- package/mobile/dist/components/Header/isTopItemActive.js +0 -7
- package/mobile/dist/components/Header/isTopItemActive.js.map +0 -1
- package/mobile/dist/components/Header/isVisibleItem.d.ts +0 -2
- package/mobile/dist/components/Header/isVisibleItem.js +0 -6
- package/mobile/dist/components/Header/isVisibleItem.js.map +0 -1
- package/mobile/dist/ui-kit/Sitemap/SitemapItem.d.ts +0 -7
- package/mobile/dist/ui-kit/Sitemap/SitemapItem.js +0 -14
- package/mobile/dist/ui-kit/Sitemap/SitemapItem.js.map +0 -1
- package/mobile/lib/components/Header/findActiveSubItem.d.ts +0 -3
- package/mobile/lib/components/Header/findActiveSubItem.js +0 -9
- package/mobile/lib/components/Header/findActiveSubItem.js.map +0 -1
- package/mobile/lib/components/Header/isTopItemActive.d.ts +0 -4
- package/mobile/lib/components/Header/isTopItemActive.js +0 -4
- package/mobile/lib/components/Header/isTopItemActive.js.map +0 -1
- package/mobile/lib/components/Header/isVisibleItem.d.ts +0 -2
- package/mobile/lib/components/Header/isVisibleItem.js +0 -3
- package/mobile/lib/components/Header/isVisibleItem.js.map +0 -1
- package/mobile/lib/ui-kit/Sitemap/SitemapItem.d.ts +0 -7
- package/mobile/lib/ui-kit/Sitemap/SitemapItem.js +0 -12
- package/mobile/lib/ui-kit/Sitemap/SitemapItem.js.map +0 -1
- package/mobile/src/components/Header/findActiveSubItem.ts +0 -14
- package/mobile/src/components/Header/isTopItemActive.ts +0 -6
- package/mobile/src/components/Header/isVisibleItem.ts +0 -6
- package/mobile/src/ui-kit/Sitemap/SitemapItem.tsx +0 -30
- package/src/components/Header/findActiveSubItem.ts +0 -14
- package/src/components/Header/isTopItemActive.ts +0 -6
- package/src/components/Header/isVisibleItem.ts +0 -6
- package/src/ui-kit/Sitemap/SitemapItem.tsx +0 -30
package/bundle/bundle.umd.js
CHANGED
|
@@ -297,6 +297,7 @@
|
|
|
297
297
|
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
298
298
|
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
299
299
|
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
300
|
+
const hasPrefix = (href, prefix) => prefix && href && href.startsWith(prefix);
|
|
300
301
|
|
|
301
302
|
var url = /*#__PURE__*/Object.freeze({
|
|
302
303
|
__proto__: null,
|
|
@@ -304,12 +305,13 @@
|
|
|
304
305
|
isLocalURL: isLocalURL,
|
|
305
306
|
isHash: isHash,
|
|
306
307
|
withoutQuery: withoutQuery,
|
|
307
|
-
joinPath: joinPath
|
|
308
|
+
joinPath: joinPath,
|
|
309
|
+
hasPrefix: hasPrefix
|
|
308
310
|
});
|
|
309
311
|
|
|
310
312
|
const PREFIX_API = '/api/';
|
|
311
313
|
const FILE_STORAGE_API = `${PREFIX_API}v1/storage`;
|
|
312
|
-
const adjustHref = (router) => (href, basePath
|
|
314
|
+
const adjustHref = (router) => (href, basePath) => {
|
|
313
315
|
if ([
|
|
314
316
|
!href,
|
|
315
317
|
isURL(href),
|
|
@@ -324,7 +326,6 @@
|
|
|
324
326
|
const isRelativeToBase = href?.startsWith('/');
|
|
325
327
|
return joinPath(hasPrefix(href, basePath) ? '' : basePath, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
326
328
|
};
|
|
327
|
-
const hasPrefix = (href, prefix) => prefix && href && href.startsWith(prefix);
|
|
328
329
|
|
|
329
330
|
const isOnlyDigits = (str) => str && !/\D/.test(str);
|
|
330
331
|
|
|
@@ -429,6 +430,29 @@
|
|
|
429
430
|
closeAll: () => defaultEventBus.fire('dialog', { type: 'close', all: true }),
|
|
430
431
|
});
|
|
431
432
|
|
|
433
|
+
const adjustBase = (href, basePath = '') => href.replace(basePath, '');
|
|
434
|
+
|
|
435
|
+
const env = new Proxy({
|
|
436
|
+
_: {},
|
|
437
|
+
setup(_) {
|
|
438
|
+
this._ = _;
|
|
439
|
+
},
|
|
440
|
+
}, {
|
|
441
|
+
get(target, p) {
|
|
442
|
+
return target._[p] || target[p];
|
|
443
|
+
},
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
function getBasePath() {
|
|
447
|
+
try {
|
|
448
|
+
const [, first] = new URL(env.SITE_URL ?? '').pathname.split('/');
|
|
449
|
+
return `/${first}`;
|
|
450
|
+
}
|
|
451
|
+
catch (_) {
|
|
452
|
+
return '';
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
432
456
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
433
457
|
const handlerDecorator = (handler) => {
|
|
434
458
|
return handlerDecorator._impl(handler);
|
|
@@ -439,18 +463,25 @@
|
|
|
439
463
|
};
|
|
440
464
|
|
|
441
465
|
function useLink(params = {}) {
|
|
442
|
-
const {
|
|
466
|
+
const { compatibleMode } = params;
|
|
467
|
+
const basePath = getBasePath();
|
|
443
468
|
const router = useRouter();
|
|
444
469
|
const { closeAll } = useDialogManager();
|
|
445
|
-
return (props) =>
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
470
|
+
return (props) => {
|
|
471
|
+
//? basePath should ends WITH "/" or be EMPTY string
|
|
472
|
+
const href = adjustHref(router)(props.href, compatibleMode ? '' : appendSlash(basePath));
|
|
473
|
+
return {
|
|
474
|
+
...props,
|
|
475
|
+
href,
|
|
476
|
+
'aria-label': props.text,
|
|
477
|
+
onClick: handlerDecorator(handleHref({ ...props, href })),
|
|
478
|
+
};
|
|
479
|
+
};
|
|
451
480
|
function handleHref({ href, target, onClick }) {
|
|
452
481
|
return (ev) => {
|
|
453
482
|
onClick && onClick(ev);
|
|
483
|
+
//? basePath should ends WITH "/"
|
|
484
|
+
const isRemote = !hasPrefix(href, appendSlash(basePath) || '/');
|
|
454
485
|
if (!href || isRemote || !isLocalURL(href, target)) {
|
|
455
486
|
// Default routing
|
|
456
487
|
return;
|
|
@@ -458,7 +489,8 @@
|
|
|
458
489
|
closeAll();
|
|
459
490
|
// Client routing
|
|
460
491
|
ev?.preventDefault();
|
|
461
|
-
|
|
492
|
+
//? basePath should ends WITHOUT "/" or be EMPTY string
|
|
493
|
+
router.push(adjustBase(href, basePath));
|
|
462
494
|
};
|
|
463
495
|
}
|
|
464
496
|
}
|
|
@@ -3318,8 +3350,8 @@
|
|
|
3318
3350
|
.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
3319
3351
|
};
|
|
3320
3352
|
|
|
3321
|
-
const LinkWrapper = JSX(({ className = '', href, target,
|
|
3322
|
-
const link = useLink({
|
|
3353
|
+
const LinkWrapper = JSX(({ className = '', href, target, compatibleMode = false, onClick, data, children }) => {
|
|
3354
|
+
const link = useLink({ compatibleMode: compatibleMode });
|
|
3323
3355
|
const linkProps = link({ href, target, onClick });
|
|
3324
3356
|
const Tag = href ? 'a' : 'div';
|
|
3325
3357
|
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), role: href ? 'link' : 'none', ...getAspectsAttributes(data), children: children }));
|
|
@@ -3616,7 +3648,7 @@
|
|
|
3616
3648
|
const DepositoryFilter = JSX(({ field, onClearFilter, filtrationState }) => (jsxs("div", { className: "grid grid-cols-12 mb-3xl space-x-xl", children: [jsx(SearchInput, { className: "col-span-4 mt-auto", placeholder: "\u041F\u043E\u0438\u0441\u043A", ...field('query') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u043E\u0442", maxDate: filtrationState.endDate, ...field('startDate') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u0434\u043E", minDate: filtrationState.startDate, ...field('endDate') }), jsx("div", { className: "col-span-2 mt-auto", children: jsx(Button, { type: "reset", className: "w-full", version: "secondary", onClick: onClearFilter, children: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C" }) })] })));
|
|
3617
3649
|
|
|
3618
3650
|
const DepositoryItem = ({ title, timestamp, publicId }) => {
|
|
3619
|
-
const link = useLink(
|
|
3651
|
+
const link = useLink();
|
|
3620
3652
|
const { href } = link({ href: `/api/v1/depository/${publicId}/file` });
|
|
3621
3653
|
return (jsxs("div", { className: "grid grid-cols-12 py-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2", children: timestamp ? (jsx(Text, { size: "text-m", "font-weight": "font-light", children: formatDate(timestamp) })) : null }), jsx("div", { className: "col-span-10 text-h6 hover:text-primary-active", children: jsx("a", { href: href, download: true, "aria-label": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: title }) })] }, publicId));
|
|
3622
3654
|
};
|
|
@@ -3870,28 +3902,30 @@
|
|
|
3870
3902
|
return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
3871
3903
|
};
|
|
3872
3904
|
|
|
3873
|
-
const LinkList = JSX(({ className = '', items
|
|
3874
|
-
const
|
|
3875
|
-
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
3905
|
+
const LinkList = JSX(({ className = '', items }) => {
|
|
3906
|
+
const link = useLink({ compatibleMode: true });
|
|
3876
3907
|
return (jsx("ul", { className: style('flex flex-col gap-s w-full', className), children: items?.map(renderLinkListItem(link)) }));
|
|
3877
3908
|
});
|
|
3878
|
-
const renderLinkListItem = (link) => (
|
|
3879
|
-
const { text,
|
|
3880
|
-
|
|
3881
|
-
|
|
3909
|
+
const renderLinkListItem = (link) => ({ dataFooter, ...linkProps }, i) => {
|
|
3910
|
+
const { text, href, target, onClick } = link(linkProps);
|
|
3911
|
+
if (!text) {
|
|
3912
|
+
return null;
|
|
3913
|
+
}
|
|
3914
|
+
return (jsx("li", { className: "list-none", children: jsx("a", { className: "hover:text-primary-main font-light", role: "link", href: href, target: target || '_self', onClick: onClick, ...getAspectsAttributes(dataFooter), children: text ? text : null }) }, String(i)));
|
|
3882
3915
|
};
|
|
3883
3916
|
|
|
3917
|
+
const isVisibleItem = (areaKeys) => (_) => !_.displayArea || areaKeys.includes(_.displayArea.toLowerCase());
|
|
3918
|
+
|
|
3884
3919
|
const FOOTER_AREA_KEYS = ['all', 'footer'];
|
|
3885
3920
|
const Sitemap = JSX(({ className, topItems }) => {
|
|
3886
|
-
const link = useLink({
|
|
3887
|
-
return (jsx("div", { role: "menu", className: style('w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2', className), children: topItems?.filter(isVisibleItem
|
|
3921
|
+
const link = useLink({ compatibleMode: true });
|
|
3922
|
+
return (jsx("div", { role: "menu", className: style('w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2', className), children: topItems?.filter(isVisibleItem(FOOTER_AREA_KEYS)).map(link).map(renderColumn) }));
|
|
3888
3923
|
});
|
|
3889
3924
|
const renderColumn = (menuItem, index) => {
|
|
3890
3925
|
const { text, items = [], href, target = '_self', onClick, dataFooter } = menuItem;
|
|
3891
|
-
const visibleSubItems = items.filter(isVisibleItem
|
|
3892
|
-
return (jsxs("div", { role: "menuitem", className: "flex flex-col gap-s w-full @md:w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target, onClick: onClick, ...getAspectsAttributes(dataFooter), children: text }), visibleSubItems ? jsx(LinkList, { items: visibleSubItems
|
|
3926
|
+
const visibleSubItems = items.filter(isVisibleItem(FOOTER_AREA_KEYS));
|
|
3927
|
+
return (jsxs("div", { role: "menuitem", className: "flex flex-col gap-s w-full @md:w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target, onClick: onClick, ...getAspectsAttributes(dataFooter), children: text }), visibleSubItems ? jsx(LinkList, { items: visibleSubItems }) : null] }, String(index)));
|
|
3893
3928
|
};
|
|
3894
|
-
const isVisibleItem$1 = (_) => !_.displayArea || FOOTER_AREA_KEYS.includes(_.displayArea.toLowerCase());
|
|
3895
3929
|
|
|
3896
3930
|
const Contacts = JSX(({ className = '', items = [] }) => items?.length ? (jsx("div", { className: style('space-y-m', className), children: items.map(renderContactsGroup) })) : null);
|
|
3897
3931
|
const renderContactsGroup = (item, i) => (jsxs("div", { className: "space-y-m", children: [jsx("div", { children: jsx(Text, { size: "text-l", font: "font-medium", children: item?.title }) }), jsx("div", { className: "space-y-m", children: item.items?.map(renderContact) })] }, String(i)));
|
|
@@ -4140,12 +4174,13 @@
|
|
|
4140
4174
|
|
|
4141
4175
|
const renderLogoSearchBar = (sitemap, LEFT_COL_WIDTH = '') => {
|
|
4142
4176
|
const { logo } = sitemap ?? {};
|
|
4143
|
-
|
|
4177
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4178
|
+
const { dataHeader, dataFooter, ...logoProps } = logo ?? {};
|
|
4144
4179
|
return (jsxs("div", { className: "flex items-stretch gap-3xl", children: [jsx(Logo, { className: LEFT_COL_WIDTH, logo: logoProps, data: dataFooter }), jsx(SearchBar$1, { className: "grow", ...sitemap })] }));
|
|
4145
4180
|
};
|
|
4146
4181
|
|
|
4147
4182
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
4148
|
-
const link = useLink(
|
|
4183
|
+
const link = useLink();
|
|
4149
4184
|
const { href, target, text, onClick } = link(rest);
|
|
4150
4185
|
return (jsx("a", { className: `text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
|
|
4151
4186
|
});
|
|
@@ -4193,19 +4228,36 @@
|
|
|
4193
4228
|
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
|
|
4194
4229
|
});
|
|
4195
4230
|
|
|
4196
|
-
const isHrefActive = (router) => ({ href }) =>
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4231
|
+
const isHrefActive = (router, strict = false) => ({ href }) => {
|
|
4232
|
+
if (!href) {
|
|
4233
|
+
return false;
|
|
4234
|
+
}
|
|
4235
|
+
const routerHref = withoutQuery(getRouterHref(href, router));
|
|
4236
|
+
return strict ? routerHref === withoutQuery(href) : routerHref.startsWith(withoutQuery(href));
|
|
4237
|
+
};
|
|
4238
|
+
const getRouterHref = (href, router) => {
|
|
4239
|
+
const basePath = getBasePath();
|
|
4240
|
+
return isURL(href) ? router.href : joinPath(basePath, router.pathname);
|
|
4241
|
+
};
|
|
4200
4242
|
|
|
4201
4243
|
function useActiveRoute(items = []) {
|
|
4202
4244
|
const router = useRouter();
|
|
4203
|
-
const
|
|
4245
|
+
const isTopItemActive = isHrefActive(router);
|
|
4246
|
+
const isTopItemActiveStrict = isHrefActive(router, true);
|
|
4247
|
+
let activeIndex = -1;
|
|
4248
|
+
for (const [i, item] of items.entries()) {
|
|
4249
|
+
if (isTopItemActive(item)) {
|
|
4250
|
+
activeIndex = i;
|
|
4251
|
+
if (isTopItemActiveStrict(item)) {
|
|
4252
|
+
break;
|
|
4253
|
+
}
|
|
4254
|
+
}
|
|
4255
|
+
}
|
|
4204
4256
|
return [activeIndex, items[activeIndex]];
|
|
4205
4257
|
}
|
|
4206
4258
|
|
|
4207
4259
|
const TopItem = JSX(({ className = '', active, flat, children, data, ...rest }) => {
|
|
4208
|
-
const link = useLink({
|
|
4260
|
+
const link = useLink({ compatibleMode: true });
|
|
4209
4261
|
const { href, target, text, onClick } = link(rest);
|
|
4210
4262
|
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, ...getAspectsAttributes(data), children: jsx("span", { suppressHydrationWarning: true, className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
4211
4263
|
});
|
|
@@ -4233,11 +4285,7 @@
|
|
|
4233
4285
|
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
4234
4286
|
});
|
|
4235
4287
|
|
|
4236
|
-
const renderRegion = (data, onChangeLocation) => (region) => {
|
|
4237
|
-
return region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
4238
|
-
onChangeLocation && onChangeLocation(region);
|
|
4239
|
-
}, data: getAspectsWithInclude(data, region.name), children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4240
|
-
};
|
|
4288
|
+
const renderRegion = (data, onChangeLocation) => (region) => region.name ? (jsx(LinkWrapper, { compatibleMode: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => onChangeLocation?.(region), data: getAspectsWithInclude(data, region.name), children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4241
4289
|
|
|
4242
4290
|
const renderRegionGroup = (onChangeLocation, data) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(data, onChangeLocation))] }, letter));
|
|
4243
4291
|
|
|
@@ -4249,7 +4297,7 @@
|
|
|
4249
4297
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4250
4298
|
const LocationDialog = JSX(({ foreignOffices, branches }) => {
|
|
4251
4299
|
const [currentLocation, selectCurrentLocation] = useLocation(branches?.default);
|
|
4252
|
-
const link = useLink({
|
|
4300
|
+
const link = useLink({ compatibleMode: true });
|
|
4253
4301
|
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
4254
4302
|
const [query, setQuery] = useState('');
|
|
4255
4303
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -4259,7 +4307,7 @@
|
|
|
4259
4307
|
selectCurrentLocation(region);
|
|
4260
4308
|
close();
|
|
4261
4309
|
}, []);
|
|
4262
|
-
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, {
|
|
4310
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsx("div", { className: "mb-s", children: jsxs(Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", jsx(LinkWrapper, { href: href, compatibleMode: true, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4263
4311
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4264
4312
|
.map(renderRegion(branches?.dataSelect, handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation, branches?.dataSelect)) })), renderForeignOffices(foreignOffices)] }));
|
|
4265
4313
|
});
|
|
@@ -4296,26 +4344,17 @@
|
|
|
4296
4344
|
});
|
|
4297
4345
|
|
|
4298
4346
|
const DropdownMenu = JSX(({ className = '', items, activeItem, ariaLabel }) => {
|
|
4299
|
-
const
|
|
4300
|
-
const
|
|
4301
|
-
|
|
4302
|
-
const handleClickOutside = useCallback(() => setVisible(false), []);
|
|
4303
|
-
const ref = useOutsideClick(handleClickOutside);
|
|
4304
|
-
return (jsxs("div", { className: style(isVisible ? 'bg-white rounded-md shadow-blue-gray' : '', className), ref: ref, role: "navigation", children: [jsx("button", { type: "button", className: "group/btn flex justify-between items-center h-6", "aria-label": ariaLabel, onClick: handleToggle, children: Array(3)
|
|
4347
|
+
const [isVisible, { setFalse, toggle }] = useBool(false);
|
|
4348
|
+
const ref = useOutsideClick(setFalse);
|
|
4349
|
+
return (jsxs("div", { className: style(isVisible ? 'bg-white rounded-md shadow-blue-gray' : '', className), ref: ref, role: "navigation", children: [jsx("button", { type: "button", className: "group/btn flex justify-between items-center h-6", "aria-label": ariaLabel, onClick: toggle, children: Array(3)
|
|
4305
4350
|
.fill(null)
|
|
4306
|
-
.map((_, i) => (jsx("div", { className: "w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white" }, String(i)))) }), jsx("div", { className: style('absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56', isVisible ? '' : 'hidden'), "aria-hidden": !isVisible, children: items?.map((item, i) => {
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4351
|
+
.map((_, i) => (jsx("div", { className: "w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white" }, String(i)))) }), jsx("div", { className: style('absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56', isVisible ? '' : 'hidden'), "aria-hidden": !isVisible, children: items?.map((item, i) => (jsx(DropdownMenuItem, { isActive: item === activeItem, ...item }, item?.text ?? String(i)))) })] }));
|
|
4352
|
+
});
|
|
4353
|
+
const DropdownMenuItem = JSX(({ isActive, ...rest }) => {
|
|
4354
|
+
const link = useLink({ compatibleMode: true });
|
|
4355
|
+
const { text, href, target, onClick } = link(rest);
|
|
4356
|
+
return (jsx("a", { className: style('text-l font-light pb-m hover:text-primary-main', isActive ? 'text-primary-main' : ''), href: href, target: target, onClick: onClick, role: "menuitem", ...getAspectsAttributes(rest?.data), children: text }));
|
|
4311
4357
|
});
|
|
4312
|
-
|
|
4313
|
-
const findActiveSubItem = (router) => (items = []) => {
|
|
4314
|
-
const possibleActiveSubItems = items?.filter(isHrefActive(router));
|
|
4315
|
-
return possibleActiveSubItems?.length
|
|
4316
|
-
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
4317
|
-
: undefined;
|
|
4318
|
-
};
|
|
4319
4358
|
|
|
4320
4359
|
const getNS = (_) => globalThis[_];
|
|
4321
4360
|
const initializeExternalNS = (namespaceName, url) => {
|
|
@@ -4413,9 +4452,9 @@
|
|
|
4413
4452
|
});
|
|
4414
4453
|
|
|
4415
4454
|
const HeaderItem = JSX(({ className = '', active, dataItemName, children, data, ...rest }) => {
|
|
4416
|
-
const link = useLink();
|
|
4455
|
+
const link = useLink({ compatibleMode: true });
|
|
4417
4456
|
const { href, target, text, onClick } = link(rest);
|
|
4418
|
-
return (jsxs("a", { className: style('relative inline-block bg-transparent text-center no-underline', className), href: href, target: target, "data-item-name": dataItemName, ...getAspectsAttributes(data),
|
|
4457
|
+
return (jsxs("a", { className: style('relative inline-block bg-transparent text-center no-underline', className), href: href, target: target, "data-item-name": dataItemName, onClick: onClick, ...getAspectsAttributes(data), children: [jsx("span", { className: getTextStyle(active), children: text || children }), active ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4419
4458
|
});
|
|
4420
4459
|
const getTextStyle = (active = false) => style('font-sans text-l font-light', active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main', 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4421
4460
|
|
|
@@ -4443,24 +4482,19 @@
|
|
|
4443
4482
|
return text ? (jsx(LinkButton, { className: style('py-s font-light whitespace-nowrap', BUTTON_STYLE[version === 'transparent' ? 'transparent' : 'default']), ...rest, children: text })) : null;
|
|
4444
4483
|
});
|
|
4445
4484
|
|
|
4446
|
-
const HEADER_AREA_KEYS = ['all', 'header'];
|
|
4447
|
-
const isVisibleItem = (item) => !item.displayArea || HEADER_AREA_KEYS.includes(item.displayArea.toLowerCase());
|
|
4448
|
-
|
|
4449
4485
|
const HeaderSubMenu = JSX(({ subItems = [], version, internetBankButton, dropdownMenuAriaLabel, chatBotAriaLabel }) => {
|
|
4450
4486
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
4451
|
-
const
|
|
4452
|
-
const
|
|
4453
|
-
const
|
|
4454
|
-
const [visibleItemsCount, setVisibleItemsCount] = useState(visibleSubItems.length);
|
|
4455
|
-
const dropDownMenuItems = visibleSubItems.slice(visibleItemsCount);
|
|
4487
|
+
const [, activeSubItem] = useActiveRoute(subItems);
|
|
4488
|
+
const [visibleItemsCount, setVisibleItemsCount] = useState(subItems.length);
|
|
4489
|
+
const dropDownMenuItems = subItems.slice(visibleItemsCount);
|
|
4456
4490
|
const subItemsListRef = useRef(null);
|
|
4457
4491
|
const observerOptions = { rootRef: subItemsListRef };
|
|
4458
|
-
const subItemsVisibilityHandlers = useMemo(() =>
|
|
4492
|
+
const subItemsVisibilityHandlers = useMemo(() => subItems.map((_, index) => (isIntersecting) => {
|
|
4459
4493
|
setVisibleItemsCount(isIntersecting
|
|
4460
4494
|
? handleIntersectionActivation(index)
|
|
4461
4495
|
: handleIntersectionDeactivation(index));
|
|
4462
|
-
}), [
|
|
4463
|
-
return (jsxs("nav", { className: "relative mt-s flex items-center justify-between", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl", role: "menu", children:
|
|
4496
|
+
}), [subItems]);
|
|
4497
|
+
return (jsxs("nav", { className: "relative mt-s flex items-center justify-between", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl", role: "menu", children: subItems.map((_, i) => (jsx(HeaderSubMenuItem, { className: visibleItemsCount - 1 < i ? 'invisible' : '', active: _ === activeSubItem, observerOptions: observerOptions, onVisibilityChange: subItemsVisibilityHandlers[i], data: _.dataHeader, ..._ }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { className: "relative w-auto z-40", items: dropDownMenuItems, activeItem: activeSubItem, ariaLabel: dropdownMenuAriaLabel })) : null, jsxs("div", { className: "flex gap-s", children: [projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "ml-4xl", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT, ariaLabel: chatBotAriaLabel })) : null, jsx(InternetBankButton, { version: version, ...internetBankButton })] })] }));
|
|
4464
4498
|
});
|
|
4465
4499
|
const handleIntersectionActivation = (index) => (prev) => Math.max(prev, index + 1);
|
|
4466
4500
|
const handleIntersectionDeactivation = (index) => (prev) => Math.min(prev, index);
|
|
@@ -4469,13 +4503,15 @@
|
|
|
4469
4503
|
'bg-white': 'primary',
|
|
4470
4504
|
transparent: 'transparent',
|
|
4471
4505
|
};
|
|
4506
|
+
const HEADER_AREA_KEYS = ['all', 'header'];
|
|
4472
4507
|
const Header = UniBlock(({ className, bgColor = 'bg-white', logo: customLogo, version = BG_COLOR_TO_BLOCK_VERSION[bgColor], portal, ...rest }) => {
|
|
4473
4508
|
const sitemap = rest.options?.page?.sitemap ?? {};
|
|
4474
4509
|
const { topItems, logo } = sitemap;
|
|
4475
|
-
|
|
4510
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4511
|
+
const { dataFooter, dataHeader, ...logoProps } = logo ?? {};
|
|
4476
4512
|
const [, activeTopItem] = useActiveRoute(topItems);
|
|
4477
4513
|
const { internetBankButton } = portal || {};
|
|
4478
|
-
return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: customLogo ?? logoProps, data: dataHeader }), topItems?.filter(isVisibleItem).map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, data: _.dataHeader, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", ...sitemap })] }), jsx("div", { className: style('mt-xl h-px bg-main-divider', getVersionStyle(version)) }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem
|
|
4514
|
+
return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: customLogo ?? logoProps, data: dataHeader }), topItems?.filter(isVisibleItem(HEADER_AREA_KEYS)).map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, data: _.dataHeader, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", ...sitemap })] }), jsx("div", { className: style('mt-xl h-px bg-main-divider', getVersionStyle(version)) }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem?.items?.filter(isVisibleItem(HEADER_AREA_KEYS)), version: version, internetBankButton: internetBankButton })) : null] }) }));
|
|
4479
4515
|
});
|
|
4480
4516
|
const getVersionStyle = (version) => (version === 'transparent' ? 'opacity-30' : '');
|
|
4481
4517
|
|
|
@@ -5686,8 +5722,18 @@
|
|
|
5686
5722
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
5687
5723
|
itemCount: items?.length || 0,
|
|
5688
5724
|
});
|
|
5725
|
+
useEffect(() => scrollToSelected(containerRef.current, items), []);
|
|
5689
5726
|
return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyle[tabsType].item, gap: scrollStyle[tabsType].gap, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle, scrollStyle[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle, scrollStyle[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
|
|
5690
5727
|
});
|
|
5728
|
+
const scrollToSelected = (container, items) => {
|
|
5729
|
+
const selectedIndex = items.findIndex((_) => _?.selected);
|
|
5730
|
+
if (container && selectedIndex > 1) {
|
|
5731
|
+
container.scrollTo({
|
|
5732
|
+
left: selectedIndex * getItemWidth(container)(items.length),
|
|
5733
|
+
behavior: 'smooth',
|
|
5734
|
+
});
|
|
5735
|
+
}
|
|
5736
|
+
};
|
|
5691
5737
|
|
|
5692
5738
|
const renderTabs = ({ tabsMode, ...props }) => {
|
|
5693
5739
|
switch (tabsMode) {
|
|
@@ -6265,7 +6311,7 @@
|
|
|
6265
6311
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6266
6312
|
});
|
|
6267
6313
|
|
|
6268
|
-
const packageVersion = "0.14.
|
|
6314
|
+
const packageVersion = "0.14.362";
|
|
6269
6315
|
|
|
6270
6316
|
exports.Blocks = Blocks;
|
|
6271
6317
|
exports.ContentPage = ContentPage;
|