@admin-layout/tailwind-design-pro 12.0.16-alpha.9 → 12.0.16-alpha.90
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/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/es/menu.json +2 -1
- package/lib/cdm-locales/index.d.ts +2 -0
- package/lib/cdm-locales/index.d.ts.map +1 -0
- package/lib/cdm-locales/index.ts +1 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +16 -20
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +6 -5
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +220 -124
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +2 -0
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +16 -13
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +9 -14
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +0 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +38 -10
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +0 -2
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +54 -85
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -0
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +73 -6
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +2 -4
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts +0 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +69 -7
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.d.ts +4 -0
- package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/BottomMenu.js +330 -0
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebar.js +246 -0
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +6 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +467 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +4 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +279 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +332 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +29 -10
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.js +7 -0
- package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.d.ts +4 -0
- package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/Logo.js +7 -0
- package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +4 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.js +7 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +2 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.js +1 -1
- package/lib/components/Layout/util.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -3
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +166 -416
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +7 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +30 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +3 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{CheckBoxTheme.js → components/CheckBoxTheme.js} +14 -5
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +7 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js +82 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +3 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{InvitationSettings.js → components/InvitationSettings.js} +11 -7
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +3 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{LayoutChange.js → components/LayoutChange.js} +24 -17
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +20 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +119 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +3 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{NavigationsModes.js → components/NavigationsModes.js} +91 -40
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +3 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{RegionalSettings.js → components/RegionalSettings.js} +55 -178
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +12 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js +69 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +4 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +25 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
- package/lib/components/SettingDrawer/{Switch/index.d.ts → components/Switch.d.ts} +2 -2
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{Switch/index.js → components/Switch.js} +1 -1
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +3 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{ThemeColor.js → components/ThemeColor.js} +16 -4
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
- package/lib/components/SettingDrawer/{ThemeSelector.d.ts → components/ThemeSelector.d.ts} +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts +18 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +119 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -0
- package/lib/components/SettingDrawer/utils/constants.d.ts +11 -0
- package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -0
- package/lib/components/SettingDrawer/utils/constants.js +77 -0
- package/lib/components/SettingDrawer/utils/constants.js.map +1 -0
- package/lib/components/SettingDrawer/utils/helper.d.ts +37 -0
- package/lib/components/SettingDrawer/utils/helper.d.ts.map +1 -0
- package/lib/components/SettingDrawer/utils/helper.js +243 -0
- package/lib/components/SettingDrawer/utils/helper.js.map +1 -0
- package/lib/components/SettingDrawer/utils/transformers.d.ts +15 -0
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -0
- package/lib/components/SettingDrawer/utils/transformers.js +76 -0
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
- package/lib/components/SettingDrawer/{types.d.ts → utils/types.d.ts} +14 -0
- package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +10 -5
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +97 -4
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/typings.d.ts +20 -1
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +10 -2
- package/lib/compute.js.map +1 -1
- package/lib/config/constants.js.map +1 -1
- package/lib/config/env-config.d.ts +3 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +10 -0
- package/lib/config/env-config.js.map +1 -1
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/hooks/useMediaQuery.js.map +1 -1
- package/lib/hooks/useScrollThreshold.js.map +1 -1
- package/lib/hooks/useTailwindTheme.js +82 -0
- package/lib/hooks/useTailwindTheme.js.map +1 -0
- package/lib/icons.d.ts +2 -0
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +4 -2
- package/lib/icons.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/selectors.d.ts +118 -0
- package/lib/machines/selectors.d.ts.map +1 -0
- package/lib/machines/settingsMachine.d.ts +25 -2
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +139 -168
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/machines/settingsMachine.test.d.ts +2 -0
- package/lib/machines/settingsMachine.test.d.ts.map +1 -0
- package/lib/machines/types.d.ts +107 -9
- package/lib/machines/types.d.ts.map +1 -1
- package/lib/machines/types.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/redux/searchReducer.js.map +1 -1
- package/lib/routes.json +9 -1
- package/lib/tailwindConfig.js.map +1 -1
- package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
- package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
- package/lib/utils/configOverrides.d.ts +213 -0
- package/lib/utils/configOverrides.d.ts.map +1 -0
- package/lib/utils/configOverrides.js +91 -0
- package/lib/utils/configOverrides.js.map +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -1
- package/lib/utils/settingsUtils.d.ts +20 -0
- package/lib/utils/settingsUtils.d.ts.map +1 -0
- package/lib/utils/settingsUtils.js +74 -0
- package/lib/utils/settingsUtils.js.map +1 -0
- package/lib/utils/utils/index.js.map +1 -1
- package/package.json +6 -6
- package/lib/components/Layout/GlobalHeader/Logo.d.ts +0 -4
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +0 -1
- package/lib/components/Layout/GlobalHeader/Logo.js +0 -141
- package/lib/components/Layout/GlobalHeader/Logo.js.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +0 -180
- package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -176
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -3
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
- package/lib/components/SettingDrawer/InvitationSettings.d.ts +0 -3
- package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/InvitationSettings.js.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -3
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +0 -3
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +0 -1
- package/lib/components/SettingDrawer/NavigationsModes.js.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -3
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -3
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.js.map +0 -1
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts +0 -3
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +0 -1
- package/lib/components/SettingDrawer/WebFontsSelector.js.map +0 -1
- package/lib/components/SettingDrawer/types.d.ts.map +0 -1
- /package/lib/components/SettingDrawer/{ThemeSelector.js → components/ThemeSelector.js} +0 -0
- /package/lib/components/SettingDrawer/{WebFontsSelector.js → components/WebFontsSelector.js} +0 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import React__default,{useEffect}from'react';import {useTranslation}from'react-i18next';import {getMenuSeparation}from'@admin-layout/client';import {Divider}from'./Divider.js';import {PerplexSidebarMenu}from'./PerplexSidebarMenu.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import'@common-stack/components-pro';import'reflect-metadata';import'@admin-layout/client/lib/constants/layout.js';import {SideMenuLogoSlot}from'../slot-fill/SideMenuLogo.js';import {BottomMenu}from'./BottomMenu.js';import {icons}from'../../../icons.js';import {MainSidebarMenu}from'./MainSidebarMenu.js';const PerplexSidebar = props => {
|
|
2
|
+
const {
|
|
3
|
+
isSideMenuOpen,
|
|
4
|
+
closeSideMenu,
|
|
5
|
+
menuData,
|
|
6
|
+
collapsed,
|
|
7
|
+
routeParams,
|
|
8
|
+
settings,
|
|
9
|
+
location,
|
|
10
|
+
siderPinned,
|
|
11
|
+
setSiderPinned,
|
|
12
|
+
layoutSettings,
|
|
13
|
+
deviceSettings,
|
|
14
|
+
actor,
|
|
15
|
+
sideBarMarginTop,
|
|
16
|
+
showHeader,
|
|
17
|
+
menuHeaderRender,
|
|
18
|
+
isSideMenuLayout,
|
|
19
|
+
authorities,
|
|
20
|
+
picture
|
|
21
|
+
} = props;
|
|
22
|
+
const [iconModule, setIconModule] = React__default.useState(null);
|
|
23
|
+
const {
|
|
24
|
+
t,
|
|
25
|
+
i18n
|
|
26
|
+
} = useTranslation('menu');
|
|
27
|
+
const {
|
|
28
|
+
isMobile
|
|
29
|
+
} = useMediaQuery();
|
|
30
|
+
const currentRoute = location?.pathname || '/';
|
|
31
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
32
|
+
const {
|
|
33
|
+
ChevronLeftIcon,
|
|
34
|
+
ChevronRightIcon
|
|
35
|
+
} = icons;
|
|
36
|
+
// Helper function to get value from settings with route/device override support
|
|
37
|
+
const getUILayoutValue = path => {
|
|
38
|
+
// Check for route/device-specific override first
|
|
39
|
+
const routeDeviceKey = `[${currentRoute}][${deviceType}]`;
|
|
40
|
+
const uiOverride = settings?.uiSettings?.[routeDeviceKey];
|
|
41
|
+
if (uiOverride) {
|
|
42
|
+
const value = path.split('.').reduce((obj, key) => obj?.[key], uiOverride);
|
|
43
|
+
if (value !== undefined) return value;
|
|
44
|
+
}
|
|
45
|
+
// Fallback to settings (flattened uilayout from configuration-registries)
|
|
46
|
+
return path.split('.').reduce((obj, key) => obj?.[key], settings);
|
|
47
|
+
};
|
|
48
|
+
// Get layout settings from the new flat structure
|
|
49
|
+
const deviceLayout = {
|
|
50
|
+
navigationMode: getUILayoutValue('navigationMode'),
|
|
51
|
+
sideMenuType: getUILayoutValue('sideMenuType'),
|
|
52
|
+
contentWidth: getUILayoutValue('contentWidth'),
|
|
53
|
+
fixedHeader: getUILayoutValue('fixedHeader'),
|
|
54
|
+
fixedSidebar: getUILayoutValue('fixedSidebar'),
|
|
55
|
+
splitMenus: getUILayoutValue('splitMenus'),
|
|
56
|
+
upperMenuDividerName: getUILayoutValue('upperMenuDividerName'),
|
|
57
|
+
middleMenuDividerName: getUILayoutValue('middleMenuDividerName'),
|
|
58
|
+
lowerMenuDividerName: getUILayoutValue('lowerMenuDividerName')
|
|
59
|
+
};
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!iconModule) {
|
|
62
|
+
import('./DynamicIcon.js').then(module => {
|
|
63
|
+
setIconModule(module);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, []);
|
|
67
|
+
// Close sidebar when clicking outside on mobile
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
const handleClickOutside = event => {
|
|
70
|
+
const sidebar = document.getElementById('mobile-sidebar');
|
|
71
|
+
if (sidebar && !sidebar.contains(event.target) && isSideMenuOpen) {
|
|
72
|
+
closeSideMenu();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
76
|
+
return () => {
|
|
77
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
78
|
+
};
|
|
79
|
+
}, [isSideMenuOpen, closeSideMenu]);
|
|
80
|
+
// Close sidebar when pressing escape
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const handleEscape = event => {
|
|
83
|
+
if (event.key === 'Escape' && isSideMenuOpen) {
|
|
84
|
+
closeSideMenu();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
document.addEventListener('keydown', handleEscape);
|
|
88
|
+
return () => {
|
|
89
|
+
document.removeEventListener('keydown', handleEscape);
|
|
90
|
+
};
|
|
91
|
+
}, [isSideMenuOpen, closeSideMenu]);
|
|
92
|
+
const {
|
|
93
|
+
middleMenus,
|
|
94
|
+
lowerMenus,
|
|
95
|
+
bottomMenus
|
|
96
|
+
} = getMenuSeparation(menuData || []);
|
|
97
|
+
const updateMenuIcons = (menuItems = []) => {
|
|
98
|
+
if (!menuItems || !Array.isArray(menuItems)) return [];
|
|
99
|
+
return menuItems.map(item => {
|
|
100
|
+
const updatedItem = {
|
|
101
|
+
...item,
|
|
102
|
+
name: t(item.name),
|
|
103
|
+
icon: iconModule && item.icon ? iconModule.renderDynamicIcon(item.icon) : null
|
|
104
|
+
};
|
|
105
|
+
if (updatedItem.children) {
|
|
106
|
+
updatedItem.children = updateMenuIcons(updatedItem.children);
|
|
107
|
+
}
|
|
108
|
+
return updatedItem;
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
({
|
|
112
|
+
menuData: updateMenuIcons(bottomMenus)
|
|
113
|
+
});
|
|
114
|
+
// Use CSS classes instead of theme-based styling
|
|
115
|
+
const getSidebarClasses = () => {
|
|
116
|
+
let classes = `text-gray-500 dark:text-gray-400 h-full flex flex-col`;
|
|
117
|
+
if (settings?.navTheme === 'realDark') {
|
|
118
|
+
classes += ' themed-sidebar';
|
|
119
|
+
}
|
|
120
|
+
if (showHeader) {
|
|
121
|
+
classes += ' md:h-[82vh]';
|
|
122
|
+
}
|
|
123
|
+
if (!showHeader) {
|
|
124
|
+
classes += ' md:h-[84vh]';
|
|
125
|
+
}
|
|
126
|
+
if (!showHeader && !menuHeaderRender) {
|
|
127
|
+
classes += ' md:h-[91vh]';
|
|
128
|
+
}
|
|
129
|
+
return classes;
|
|
130
|
+
};
|
|
131
|
+
const SidebarStyles = React__default.useMemo(() => ({
|
|
132
|
+
backgroundColor: settings?.navTheme === 'realDark' ? '#222' : undefined,
|
|
133
|
+
color: settings?.navTheme === 'realDark' ? '#fff !important' : undefined
|
|
134
|
+
}), [settings]);
|
|
135
|
+
// Helper function to render a separator with a name
|
|
136
|
+
const renderSeparator = name => {
|
|
137
|
+
if (!deviceLayout?.splitMenus) return null;
|
|
138
|
+
return collapsed ? jsx("hr", {
|
|
139
|
+
className: "border-t border-border"
|
|
140
|
+
}) : jsx(Divider, {
|
|
141
|
+
className: "text-muted-foreground border-border my-2 p-0",
|
|
142
|
+
plain: true,
|
|
143
|
+
children: name
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
const renderSidebarContent = () => {
|
|
147
|
+
return jsxs("div", {
|
|
148
|
+
className: getSidebarClasses(),
|
|
149
|
+
style: SidebarStyles,
|
|
150
|
+
children: [jsx("div", {
|
|
151
|
+
className: "relative"
|
|
152
|
+
}), jsxs("div", {
|
|
153
|
+
className: "flex-grow overflow-y-auto",
|
|
154
|
+
children: [middleMenus?.length > 0 && jsxs("div", {
|
|
155
|
+
className: "removeBoxShadow",
|
|
156
|
+
children: [renderSeparator(deviceLayout?.middleMenuDividerName), jsx(PerplexSidebarMenu, {
|
|
157
|
+
menuData: updateMenuIcons(middleMenus),
|
|
158
|
+
routeParams: routeParams,
|
|
159
|
+
settings: settings,
|
|
160
|
+
collapsed: collapsed,
|
|
161
|
+
siderPinned: siderPinned,
|
|
162
|
+
setSiderPinned: setSiderPinned,
|
|
163
|
+
actor: actor,
|
|
164
|
+
deviceSettings: deviceSettings
|
|
165
|
+
})]
|
|
166
|
+
}), lowerMenus?.length > 0 && jsxs("div", {
|
|
167
|
+
className: "removeBoxShadow",
|
|
168
|
+
children: [renderSeparator(deviceLayout?.lowerMenuDividerName), jsx(PerplexSidebarMenu, {
|
|
169
|
+
menuData: updateMenuIcons(lowerMenus),
|
|
170
|
+
routeParams: routeParams,
|
|
171
|
+
settings: settings,
|
|
172
|
+
collapsed: collapsed,
|
|
173
|
+
siderPinned: siderPinned,
|
|
174
|
+
setSiderPinned: setSiderPinned,
|
|
175
|
+
actor: actor,
|
|
176
|
+
deviceSettings: deviceSettings
|
|
177
|
+
})]
|
|
178
|
+
})]
|
|
179
|
+
})]
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
const renderMobileSidebarContent = () => {
|
|
183
|
+
return jsxs("div", {
|
|
184
|
+
className: getSidebarClasses(),
|
|
185
|
+
style: SidebarStyles,
|
|
186
|
+
children: [jsx("div", {
|
|
187
|
+
className: "relative",
|
|
188
|
+
children: jsx("button", {
|
|
189
|
+
onClick: closeSideMenu,
|
|
190
|
+
className: "w-6 h-6 text-center bg-card text-muted-foreground flex items-center justify-center rounded-full shadow-themed-sm hover:text-foreground hover:shadow-themed-md transition-colors text-[22px] absolute right-[-13px] top-[20px]",
|
|
191
|
+
"aria-label": collapsed ? 'Expand sidebar' : 'Collapse sidebar',
|
|
192
|
+
children: collapsed ? jsx(ChevronRightIcon, {
|
|
193
|
+
fontSize: '11px'
|
|
194
|
+
}) : jsx(ChevronLeftIcon, {
|
|
195
|
+
fontSize: '11px'
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
}), jsx("div", {
|
|
199
|
+
className: "flex-grow overflow-y-auto",
|
|
200
|
+
children: jsxs("div", {
|
|
201
|
+
children: [middleMenus?.length > 0 && jsxs("div", {
|
|
202
|
+
className: "removeBoxShadow",
|
|
203
|
+
children: [renderSeparator(deviceLayout?.middleMenuDividerName), jsx(MainSidebarMenu, {
|
|
204
|
+
menuData: updateMenuIcons(middleMenus),
|
|
205
|
+
routeParams: routeParams,
|
|
206
|
+
settings: settings,
|
|
207
|
+
collapsed: collapsed
|
|
208
|
+
})]
|
|
209
|
+
}), lowerMenus?.length > 0 && jsxs("div", {
|
|
210
|
+
className: "removeBoxShadow",
|
|
211
|
+
children: [renderSeparator(deviceLayout?.lowerMenuDividerName), jsx(MainSidebarMenu, {
|
|
212
|
+
menuData: updateMenuIcons(lowerMenus),
|
|
213
|
+
routeParams: routeParams,
|
|
214
|
+
settings: settings,
|
|
215
|
+
collapsed: collapsed
|
|
216
|
+
})]
|
|
217
|
+
})]
|
|
218
|
+
})
|
|
219
|
+
})]
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
return jsxs("div", {
|
|
223
|
+
children: [!isMobile && jsxs("aside", {
|
|
224
|
+
style: SidebarStyles,
|
|
225
|
+
className: `${deviceLayout?.fixedSidebar ? 'fixed' : 'relative'} border-r border-border z-20 h-screen bg-card text-card-foreground md:block flex-shrink-0 transition-all duration-300 ease-in-out w-[92px]`,
|
|
226
|
+
children: [menuHeaderRender && isSideMenuLayout && jsx("div", {
|
|
227
|
+
className: "border-b border-border py-1 flex items-center justify-center",
|
|
228
|
+
children: jsx(SideMenuLogoSlot, {
|
|
229
|
+
settings: settings,
|
|
230
|
+
location: location
|
|
231
|
+
})
|
|
232
|
+
}), jsx("div", {
|
|
233
|
+
children: renderSidebarContent()
|
|
234
|
+
}), jsx("div", {
|
|
235
|
+
className: "flex-shrink-0 p-4 border-t border-border",
|
|
236
|
+
children: jsx(BottomMenu, {
|
|
237
|
+
match: null,
|
|
238
|
+
menuData: menuData,
|
|
239
|
+
settings: settings,
|
|
240
|
+
routeParams: routeParams,
|
|
241
|
+
getMenuSeparation: getMenuSeparation,
|
|
242
|
+
scrolled: undefined,
|
|
243
|
+
authorities: authorities,
|
|
244
|
+
picture: picture
|
|
245
|
+
})
|
|
246
|
+
})]
|
|
247
|
+
}), isSideMenuOpen && isMobile && jsx("div", {
|
|
248
|
+
className: "fixed mt-16 inset-0 z-40 bg-black bg-opacity-50 transition-opacity duration-300 ease-in-out",
|
|
249
|
+
onClick: closeSideMenu
|
|
250
|
+
}), jsx("aside", {
|
|
251
|
+
id: "mobile-sidebar",
|
|
252
|
+
style: SidebarStyles,
|
|
253
|
+
className: `fixed mt-16 top-0 left-0 z-50 h-full w-[280px] shadow-xl transform transition-transform duration-300 ease-in-out md:hidden ${isSideMenuOpen ? 'translate-x-0' : '-translate-x-full'}`,
|
|
254
|
+
children: jsxs("div", {
|
|
255
|
+
className: "flex flex-col h-[calc(100vh-64px)]",
|
|
256
|
+
children: [jsx("div", {
|
|
257
|
+
className: "flex-1 overflow-y-auto py-2 px-4",
|
|
258
|
+
children: jsx("div", {
|
|
259
|
+
className: "space-y-1",
|
|
260
|
+
children: renderMobileSidebarContent()
|
|
261
|
+
})
|
|
262
|
+
}), jsx("div", {
|
|
263
|
+
className: "flex-shrink-0 p-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",
|
|
264
|
+
children: jsx(BottomMenu, {
|
|
265
|
+
match: null,
|
|
266
|
+
menuData: menuData,
|
|
267
|
+
settings: settings,
|
|
268
|
+
routeParams: routeParams,
|
|
269
|
+
getMenuSeparation: getMenuSeparation,
|
|
270
|
+
scrolled: undefined,
|
|
271
|
+
authorities: authorities,
|
|
272
|
+
picture: picture,
|
|
273
|
+
isMobile: isMobile
|
|
274
|
+
})
|
|
275
|
+
})]
|
|
276
|
+
})
|
|
277
|
+
})]
|
|
278
|
+
});
|
|
279
|
+
};export{PerplexSidebar};//# sourceMappingURL=PerplexSidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PerplexSidebar.js","sources":["../../../../src/components/Layout/Sidebar/PerplexSidebar.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"stBAaO,MAAM,cAAc,GAA2B,KAAC,IAAO;AAC1D,EAAA,MAAA;AAoBA,IAAA,cAAO;IACP,aAAW;AACX,IAAA,QAAQ;AACR,IAAA;IACA,WAAM;AACN,IAAA,QAAQ;IAER,QAAA;AACA,IAAA,WAAM;kBACF;AACA,IAAA;kBACM;SAEN;oBACU;cACN;AAAyB,IAAA,gBAAA;oBAC5B;eAED;;AAEJ,GAAA,GAAE,KAAA;QAEF,CAAA,UAAA,EAAA,aAAA,CAAA,GAAAA,cAAA,CAAA,QAAA,CAAA,IAAkD,CAAA;AAClD,EAAA,MAAA;AACI,IAAA,CAAA;AACA,IAAA;AACA,GAAA,GAAA,cAAY,CAAA,MAAE,CAAA;AACd,EAAA,MAAA;AACA,IAAA;AACA,GAAA,GAAA,aAAU,EAAE;AACZ,EAAA,MAAA,YAAA,GAAA,QAAsB,EAAA,QAAA,IAAA,GAAiB;AACvC,EAAA,MAAA,UAAA,GAAA,QAAqB,GAAE,QAAA,GAAA,SAAiB;AACxC,EAAA,MAAA;mBACF;IAEF;WACI;;wBAEQ,GAAA,IAAc,IAAA;AAClB;UACH,cAAA,GAAA,CAAA,CAAA,EAAA,YAAA,CAAA,EAAA,EAAA,UAAA,CAAA,CAAA,CAAA;IACL,MAAM,UAAC,GAAA,QAAA,EAAA,UAAA,GAAA,cAAA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,iBAAA,GAAA,MAAA;IACF,IAAA,gEAKgB,CAAA;AAmEpB,IAAE,IAAA,QAAA,EAAA,QAAA,KAAA,UAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PerplexSidebarMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/PerplexSidebarMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,GAAG,GAAG,CAqa/D,CAAC"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import React__default,{useState,useRef}from'react';import {useSelector}from'@xstate/react';import {useLocation,Link}from'@remix-run/react';import {generateMenuPath}from'@admin-layout/client';import {icons}from'../../../icons.js';const PerplexSidebarMenu = ({
|
|
2
|
+
menuData,
|
|
3
|
+
routeParams,
|
|
4
|
+
settings,
|
|
5
|
+
collapsed,
|
|
6
|
+
siderPinned,
|
|
7
|
+
setSiderPinned,
|
|
8
|
+
actor,
|
|
9
|
+
deviceSettings = {} // Provide empty object as default
|
|
10
|
+
}) => {
|
|
11
|
+
const [openMenus, setOpenMenus] = useState([]);
|
|
12
|
+
const [hoveredMenu, setHoveredMenu] = useState(null);
|
|
13
|
+
const [activeMenuItem, setActiveMenuItem] = useState(null);
|
|
14
|
+
const [popupPosition, setPopupPosition] = useState({
|
|
15
|
+
top: 0,
|
|
16
|
+
height: 0
|
|
17
|
+
});
|
|
18
|
+
const [menuTransition, setMenuTransition] = useState('opening');
|
|
19
|
+
const [flyoutVisible, setFlyoutVisible] = useState(false);
|
|
20
|
+
const hoverCloseTimeout = React__default.useRef(null);
|
|
21
|
+
const hoverOpenTimeout = React__default.useRef(null);
|
|
22
|
+
const currentHoveredMenu = useRef(null);
|
|
23
|
+
const {
|
|
24
|
+
PushpinLineIcon,
|
|
25
|
+
PushpinFillIcon
|
|
26
|
+
} = icons;
|
|
27
|
+
const location = useLocation();
|
|
28
|
+
const machineState = useSelector(actor, state => state);
|
|
29
|
+
const pinnedPath = machineState?.context?.sidebar?.pinnedPath || null;
|
|
30
|
+
// Extract showHeader with fallback to true if not defined
|
|
31
|
+
const showHeader = deviceSettings && deviceSettings.header && deviceSettings.header.showHeader !== undefined ? deviceSettings.header.showHeader : true;
|
|
32
|
+
const isMenuItemActive = itemPath => {
|
|
33
|
+
const currentPath = location.pathname;
|
|
34
|
+
const menuPath = generateMenuPath(itemPath, routeParams);
|
|
35
|
+
// Exact match
|
|
36
|
+
if (currentPath === menuPath) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
// Check if current path is a child of the menu item path
|
|
40
|
+
if (menuPath && currentPath.startsWith(menuPath + '/')) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
45
|
+
const toggleMenu = (path, depth, e) => {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
if (collapsed) return;
|
|
48
|
+
setOpenMenus(prev => {
|
|
49
|
+
if (prev.includes(path)) {
|
|
50
|
+
return prev.filter(item => item !== path);
|
|
51
|
+
} else {
|
|
52
|
+
return [...prev, path];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const handleMenuClick = (path, hasChildren, depth, e) => {
|
|
57
|
+
if (hasChildren && !collapsed) {
|
|
58
|
+
toggleMenu(path, depth, e);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const getFirstLetter = name => {
|
|
62
|
+
return name.charAt(0).toUpperCase();
|
|
63
|
+
};
|
|
64
|
+
const getFirstWord = name => {
|
|
65
|
+
if (!name) return '';
|
|
66
|
+
const parts = name.trim().split(/\s+/);
|
|
67
|
+
return parts[0] || name;
|
|
68
|
+
};
|
|
69
|
+
const handleMenuHover = (e, item, isHoverMenu, depth = 0) => {
|
|
70
|
+
// Only set hover state if the menu has children
|
|
71
|
+
const canShowHoverPopup = collapsed && !isHoverMenu || !collapsed && depth === 0 && !isHoverMenu;
|
|
72
|
+
if (item.children && item.children.length > 0 && canShowHoverPopup) {
|
|
73
|
+
const element = e.currentTarget;
|
|
74
|
+
const rect = element.getBoundingClientRect();
|
|
75
|
+
// Calculate position ensuring it stays within viewport roughly
|
|
76
|
+
const viewportHeight = window.innerHeight;
|
|
77
|
+
let top = rect.top;
|
|
78
|
+
const maxTop = Math.max(8, viewportHeight - 300); // crude lower bound to avoid going off screen
|
|
79
|
+
if (top > maxTop) top = maxTop;
|
|
80
|
+
setPopupPosition({
|
|
81
|
+
top: top,
|
|
82
|
+
height: rect.height
|
|
83
|
+
});
|
|
84
|
+
// Clear any existing timeouts
|
|
85
|
+
if (hoverCloseTimeout.current) {
|
|
86
|
+
window.clearTimeout(hoverCloseTimeout.current);
|
|
87
|
+
hoverCloseTimeout.current = null;
|
|
88
|
+
}
|
|
89
|
+
if (hoverOpenTimeout.current) {
|
|
90
|
+
window.clearTimeout(hoverOpenTimeout.current);
|
|
91
|
+
hoverOpenTimeout.current = null;
|
|
92
|
+
}
|
|
93
|
+
currentHoveredMenu.current = item.path;
|
|
94
|
+
// Update which item is being hovered and its children data
|
|
95
|
+
if (hoveredMenu !== item.path) {
|
|
96
|
+
// Update the active menu item data first
|
|
97
|
+
setActiveMenuItem(item);
|
|
98
|
+
// If we're already showing a menu, just update content without closing/reopening
|
|
99
|
+
if (flyoutVisible) {
|
|
100
|
+
// Just update the hovered menu path without animation
|
|
101
|
+
setHoveredMenu(item.path);
|
|
102
|
+
} else {
|
|
103
|
+
// No flyout visible yet, show it with animation
|
|
104
|
+
setMenuTransition('opening');
|
|
105
|
+
setFlyoutVisible(true);
|
|
106
|
+
setHoveredMenu(item.path);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// If a different top-level item is hovered while pinned, update pinnedPath
|
|
110
|
+
if (depth === 0 && pinnedPath) {
|
|
111
|
+
actor?.send({
|
|
112
|
+
type: 'UISETTING_UPDATE',
|
|
113
|
+
value: {
|
|
114
|
+
'sidebar.pinnedPath': item.path
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const handleMenuLeave = (item, isHoverMenu) => {
|
|
121
|
+
if (!isHoverMenu) {
|
|
122
|
+
// Clear any existing timeouts
|
|
123
|
+
if (hoverCloseTimeout.current) {
|
|
124
|
+
window.clearTimeout(hoverCloseTimeout.current);
|
|
125
|
+
}
|
|
126
|
+
if (hoverOpenTimeout.current) {
|
|
127
|
+
window.clearTimeout(hoverOpenTimeout.current);
|
|
128
|
+
hoverOpenTimeout.current = null;
|
|
129
|
+
}
|
|
130
|
+
currentHoveredMenu.current = null;
|
|
131
|
+
// Add a longer delay before closing the menu
|
|
132
|
+
hoverCloseTimeout.current = window.setTimeout(() => {
|
|
133
|
+
if (!currentHoveredMenu.current) {
|
|
134
|
+
// Only close if we're not currently hovering any menu
|
|
135
|
+
setMenuTransition('closing');
|
|
136
|
+
// Additional delay to complete closing animation
|
|
137
|
+
setTimeout(() => {
|
|
138
|
+
if (!currentHoveredMenu.current) {
|
|
139
|
+
setFlyoutVisible(false);
|
|
140
|
+
setHoveredMenu(null);
|
|
141
|
+
}
|
|
142
|
+
}, 150);
|
|
143
|
+
}
|
|
144
|
+
}, 300); // Extended delay to give more time to move between items
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const SidebarStyles = React__default.useMemo(() => ({
|
|
148
|
+
backgroundColor: settings?.navTheme === 'realDark' ? '#222' : undefined,
|
|
149
|
+
color: settings?.navTheme === 'realDark' ? '#fff !important' : undefined
|
|
150
|
+
}), [settings]);
|
|
151
|
+
const toggleSiderPinned = (e, path) => {
|
|
152
|
+
e.preventDefault();
|
|
153
|
+
e.stopPropagation();
|
|
154
|
+
const nextPinned = pinnedPath === path ? null : path;
|
|
155
|
+
actor?.send({
|
|
156
|
+
type: 'UISETTING_UPDATE',
|
|
157
|
+
value: {
|
|
158
|
+
'sidebar.pinnedPath': nextPinned
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
// Find the menu item by path and set it as active
|
|
162
|
+
if (nextPinned) {
|
|
163
|
+
const findItemByPath = (items, targetPath) => {
|
|
164
|
+
for (const item of items) {
|
|
165
|
+
if (item.path === targetPath) return item;
|
|
166
|
+
if (item.children) {
|
|
167
|
+
const found = findItemByPath(item.children, targetPath);
|
|
168
|
+
if (found) return found;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return null;
|
|
172
|
+
};
|
|
173
|
+
const menuItem = findItemByPath(menuData, path);
|
|
174
|
+
if (menuItem) {
|
|
175
|
+
setActiveMenuItem(menuItem);
|
|
176
|
+
setHoveredMenu(path);
|
|
177
|
+
setFlyoutVisible(true);
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
setFlyoutVisible(false);
|
|
181
|
+
setHoveredMenu(null);
|
|
182
|
+
}
|
|
183
|
+
setSiderPinned(!siderPinned);
|
|
184
|
+
};
|
|
185
|
+
// Single persistent flyout component for all menus
|
|
186
|
+
const renderSingleFlyout = () => {
|
|
187
|
+
if (!flyoutVisible || !activeMenuItem) return null;
|
|
188
|
+
const sidebarWidth = 92; // Updated fixed sidebar rail width
|
|
189
|
+
const item = activeMenuItem; // Use the currently active menu item
|
|
190
|
+
return jsxs("div", {
|
|
191
|
+
className: `fixed border border-border z-[999] overflow-hidden bg-background menu-${menuTransition}`,
|
|
192
|
+
style: {
|
|
193
|
+
left: `${sidebarWidth}px`,
|
|
194
|
+
top: !showHeader ? '0px' : '5rem',
|
|
195
|
+
height: !showHeader ? '100vh' : 'calc(100vh - 5rem)',
|
|
196
|
+
width: '228px',
|
|
197
|
+
maxWidth: 'calc(100vw - 100px)',
|
|
198
|
+
pointerEvents: menuTransition === 'closing' ? 'none' : 'auto',
|
|
199
|
+
...SidebarStyles
|
|
200
|
+
},
|
|
201
|
+
onMouseEnter: () => {
|
|
202
|
+
if (hoverCloseTimeout.current) {
|
|
203
|
+
window.clearTimeout(hoverCloseTimeout.current);
|
|
204
|
+
hoverCloseTimeout.current = null;
|
|
205
|
+
}
|
|
206
|
+
// Keep the flyout open while hovering it
|
|
207
|
+
},
|
|
208
|
+
onMouseLeave: () => {
|
|
209
|
+
if (pinnedPath === item.path) return; // don't close if pinned
|
|
210
|
+
if (hoverCloseTimeout.current) {
|
|
211
|
+
window.clearTimeout(hoverCloseTimeout.current);
|
|
212
|
+
}
|
|
213
|
+
currentHoveredMenu.current = null;
|
|
214
|
+
setMenuTransition('closing');
|
|
215
|
+
hoverCloseTimeout.current = window.setTimeout(() => {
|
|
216
|
+
if (!currentHoveredMenu.current) {
|
|
217
|
+
setFlyoutVisible(false);
|
|
218
|
+
setHoveredMenu(null);
|
|
219
|
+
}
|
|
220
|
+
}, 150);
|
|
221
|
+
},
|
|
222
|
+
children: [jsx("style", {
|
|
223
|
+
dangerouslySetInnerHTML: {
|
|
224
|
+
__html: `
|
|
225
|
+
@keyframes fadeIn {
|
|
226
|
+
from { opacity: 0; transform: translateX(-10px); }
|
|
227
|
+
to { opacity: 1; transform: translateX(0); }
|
|
228
|
+
}
|
|
229
|
+
@keyframes fadeOut {
|
|
230
|
+
from { opacity: 1; transform: translateX(0); }
|
|
231
|
+
to { opacity: 0; transform: translateX(-10px); }
|
|
232
|
+
}
|
|
233
|
+
.menu-opening {
|
|
234
|
+
animation: fadeIn 0.15s ease-out forwards;
|
|
235
|
+
}
|
|
236
|
+
.menu-closing {
|
|
237
|
+
animation: fadeOut 0.15s ease-in forwards;
|
|
238
|
+
}
|
|
239
|
+
`
|
|
240
|
+
}
|
|
241
|
+
}), jsxs("div", {
|
|
242
|
+
className: "font-medium text-sm px-3 py-2 border-b border-border sticky top-0 flex items-center justify-between",
|
|
243
|
+
children: [jsx("span", {
|
|
244
|
+
className: "text-primary whitespace-nowrap overflow-hidden text-ellipsis pr-2",
|
|
245
|
+
children: item.name
|
|
246
|
+
}), jsx("button", {
|
|
247
|
+
className: "text-muted-foreground hover:text-primary transition-colors",
|
|
248
|
+
"aria-label": pinnedPath === item.path ? 'Unpin' : 'Pin',
|
|
249
|
+
onClick: e => toggleSiderPinned(e, item.path),
|
|
250
|
+
children: pinnedPath === item.path ? jsx(PushpinFillIcon, {
|
|
251
|
+
className: "h-4 w-4"
|
|
252
|
+
}) : jsx(PushpinLineIcon, {
|
|
253
|
+
className: "h-4 w-4"
|
|
254
|
+
})
|
|
255
|
+
})]
|
|
256
|
+
}), jsx("div", {
|
|
257
|
+
className: "overflow-y-auto overflow-x-hidden py-1",
|
|
258
|
+
style: {
|
|
259
|
+
height: !showHeader ? 'calc(100vh - 44px)' : 'calc(100vh - 5rem - 44px)'
|
|
260
|
+
},
|
|
261
|
+
children: item.children?.map(child => jsx("div", {
|
|
262
|
+
className: "w-full min-w-max hover:text-primary",
|
|
263
|
+
children: renderMenuItem(child, 1, true)
|
|
264
|
+
}, child.path))
|
|
265
|
+
})]
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
const renderMenuItem = (item, depth = 0, isHoverMenu = false) => {
|
|
269
|
+
const hasChildren = item.children && item.children.length > 0;
|
|
270
|
+
const isOpen = openMenus.includes(item.path);
|
|
271
|
+
const isActive = isMenuItemActive(item.path);
|
|
272
|
+
const isHovered = hoveredMenu === item.path;
|
|
273
|
+
const paddingLeft = `${depth * 1}rem`;
|
|
274
|
+
// Determine styling based on whether it's a parent or child item
|
|
275
|
+
const isParentWithChildren = hasChildren && depth === 0;
|
|
276
|
+
const shouldApplyBackground = isHovered || !isParentWithChildren && isActive;
|
|
277
|
+
return jsxs("div", {
|
|
278
|
+
className: `w-full relative group hover:text-primary`,
|
|
279
|
+
onMouseEnter: e => handleMenuHover(e, item, isHoverMenu, depth),
|
|
280
|
+
onMouseLeave: () => handleMenuLeave(item, isHoverMenu),
|
|
281
|
+
children: [depth === 0 && (isActive || isParentWithChildren && isHovered) && jsx("span", {
|
|
282
|
+
className: "absolute left-0 top-1 bottom-1 w-0.5 bg-primary rounded-sm"
|
|
283
|
+
}), jsx(Link, {
|
|
284
|
+
to: hasChildren && (collapsed || !collapsed && depth === 0) && !isHoverMenu ? '#' : generateMenuPath(item?.path, routeParams),
|
|
285
|
+
className: `flex hover:text-primary items-center justify-between w-full px-1 py-2 text-xs cursor-pointer transition-colors mx-1 my-1 whitespace-nowrap overflow-hidden text-ellipsis ${shouldApplyBackground ? 'text-primary' : undefined}`,
|
|
286
|
+
style: {
|
|
287
|
+
paddingLeft: depth === 0 && !isHoverMenu ? '0.25rem' : `calc(1rem + ${paddingLeft})`
|
|
288
|
+
},
|
|
289
|
+
onClick: e => handleMenuClick(item.path, hasChildren && depth > 0, depth, e),
|
|
290
|
+
children: jsxs("div", {
|
|
291
|
+
className: `flex ${depth === 0 && !isHoverMenu ? 'flex-col items-center justify-center w-full gap-1' : 'items-center gap-3'}`,
|
|
292
|
+
children: [item.icon ? jsx("span", {
|
|
293
|
+
className: `flex-shrink-0 ${isActive ? 'text-primary' : 'text-muted-foreground'} ${depth === 0 && !isHoverMenu ? 'text-[20px]' : ''}`,
|
|
294
|
+
style: {
|
|
295
|
+
color: !isActive && settings?.navTheme === 'realDark' ? '#fff' : undefined
|
|
296
|
+
},
|
|
297
|
+
children: item.icon
|
|
298
|
+
}) : jsx("span", {
|
|
299
|
+
className: `flex items-center justify-center flex-shrink-0 ${isActive ? 'text-primary' : 'text-muted-foreground'} ${depth === 0 && !isHoverMenu ? 'text-[16px] h-6 w-6 select-none text-center' : ''}`,
|
|
300
|
+
style: {
|
|
301
|
+
color: !isActive && settings?.navTheme === 'realDark' ? '#fff' : undefined
|
|
302
|
+
},
|
|
303
|
+
children: getFirstLetter(item.name)
|
|
304
|
+
}), depth === 0 && !isHoverMenu ? jsx("span", {
|
|
305
|
+
className: `font-medium text-[11px] leading-4 text-center whitespace-nowrap overflow-hidden text-ellipsis w-full px-1 ${isActive ? 'text-primary' : 'text-foreground'}`,
|
|
306
|
+
style: {
|
|
307
|
+
color: !isActive && settings?.navTheme === 'realDark' ? '#fff' : undefined
|
|
308
|
+
},
|
|
309
|
+
title: item.name,
|
|
310
|
+
children: getFirstWord(item.name)
|
|
311
|
+
}) : (!collapsed || isHoverMenu) && jsx("span", {
|
|
312
|
+
className: `font-medium whitespace-nowrap overflow-hidden text-ellipsis ${isActive ? 'text-primary' : 'text-foreground'}`,
|
|
313
|
+
style: {
|
|
314
|
+
color: !isActive && settings?.navTheme === 'realDark' ? '#fff' : undefined
|
|
315
|
+
},
|
|
316
|
+
children: item.name
|
|
317
|
+
})]
|
|
318
|
+
})
|
|
319
|
+
}), hasChildren && isOpen && !collapsed && depth > 0 && jsx("div", {
|
|
320
|
+
className: "transition-all duration-200 ease-in-out bg-background",
|
|
321
|
+
children: item.children.map(child => renderMenuItem(child, depth + 1))
|
|
322
|
+
})]
|
|
323
|
+
}, item.path);
|
|
324
|
+
};
|
|
325
|
+
return jsxs("div", {
|
|
326
|
+
className: "overflow-hidden",
|
|
327
|
+
children: [jsx("nav", {
|
|
328
|
+
className: `mt-2 ${collapsed ? 'px-1' : 'px-2'} overflow-x-hidden`,
|
|
329
|
+
children: menuData.map(item => renderMenuItem(item))
|
|
330
|
+
}), renderSingleFlyout()]
|
|
331
|
+
});
|
|
332
|
+
};export{PerplexSidebarMenu};//# sourceMappingURL=PerplexSidebarMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PerplexSidebarMenu.js","sources":["../../../../src/components/Layout/Sidebar/PerplexSidebarMenu.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings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tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"TailwindLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAK3E,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AAyFvF,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEvD,QAAA,MAAM,SAAS;;;0EAAoB,CAAC;AAEpC,KAAK,+BAA+B,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEzE,QAAA,MAAM,mBAAmB,EAAE,kBAAkB,CACzC,KAAK,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAAE,+BAA+B,KAAK,GAAG,CAAC,OAAO,CAAC,EAClF,GAAG,CAC8C,CAAC;AAEtD,eAAe,mBAAmB,CAAC"}
|