@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 11.2.1-alpha.1
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/README.md +471 -1
- package/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/en/settings.json +40 -1
- package/lib/cdm-locales/es/menu.json +2 -1
- package/lib/cdm-locales/es/settings.json +42 -3
- 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 +2 -1
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +40 -61
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +6 -12
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +274 -108
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +4 -2
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +80 -109
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +28 -38
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -15
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +107 -65
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js +187 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +3 -16
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +86 -0
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js +248 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js +109 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts +3 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts +3 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +77 -12
- 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 +294 -0
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/Divider.d.ts +2 -31
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js +26 -28
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js +50 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
- 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 +224 -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 +451 -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 +254 -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 +318 -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 +46 -13
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.d.ts +1 -16
- package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
- package/lib/components/Layout/getPageTitle.js +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +5 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
- package/lib/components/Layout/slot-fill/Footer.d.ts +4 -3
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +6 -6
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.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.d.ts +4 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +4 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
- package/lib/components/Layout/slot-fill/Logo.d.ts +5 -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.d.ts +4 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.js +6 -0
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +5 -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 +6 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.d.ts.map +1 -1
- package/lib/components/Layout/util.js +12 -0
- package/lib/components/Layout/util.js.map +1 -0
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -25
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +203 -382
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +8 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +21 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +4 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js +119 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +8 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js +74 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +4 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.js +72 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +4 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/LayoutChange.js +111 -0
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +21 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +106 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +4 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.js +322 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +4 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.js +519 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +13 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js +42 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +5 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +22 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
- package/lib/components/SettingDrawer/components/Switch.d.ts +4 -0
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/Switch.js +20 -0
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +4 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeColor.js +45 -0
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +4 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.js +16 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +4 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.js +22 -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 +115 -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 +154 -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 +73 -0
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
- package/lib/components/SettingDrawer/utils/types.d.ts +105 -0
- package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +16 -1
- 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.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/typings.d.ts +154 -50
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +16 -6
- package/lib/compute.js.map +1 -1
- package/lib/config/analytics-config.d.ts +59 -0
- package/lib/config/analytics-config.d.ts.map +1 -0
- package/lib/config/constants.d.ts +8 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +32 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/config/env-config.d.ts +21 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +86 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/helpers/DynamicIcon.d.ts +8 -5
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +50 -0
- package/lib/helpers/DynamicIcon.js.map +1 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.d.ts +14 -0
- package/lib/hooks/useMediaQuery.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.js +48 -0
- package/lib/hooks/useMediaQuery.js.map +1 -0
- package/lib/hooks/useScrollThreshold.d.ts +12 -0
- package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
- package/lib/hooks/useScrollThreshold.js +60 -0
- package/lib/hooks/useScrollThreshold.js.map +1 -0
- package/lib/hooks/useTailwindTheme.d.ts +34 -0
- package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
- package/lib/hooks/useTailwindTheme.js +82 -0
- package/lib/hooks/useTailwindTheme.js.map +1 -0
- package/lib/icons.d.ts +18 -0
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +14 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +3 -3
- 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 +29 -0
- package/lib/machines/settingsMachine.d.ts.map +1 -0
- package/lib/machines/settingsMachine.js +171 -0
- package/lib/machines/settingsMachine.js.map +1 -0
- package/lib/machines/types.d.ts +272 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/machines/types.js +5 -0
- package/lib/machines/types.js.map +1 -0
- package/lib/module.d.ts +0 -1
- package/lib/module.d.ts.map +1 -1
- package/lib/module.js +14 -15
- package/lib/module.js.map +1 -1
- package/lib/redux/index.d.ts +2 -0
- package/lib/redux/index.d.ts.map +1 -0
- package/lib/redux/searchReducer.d.ts +42 -0
- package/lib/redux/searchReducer.d.ts.map +1 -0
- package/lib/redux/searchReducer.js +64 -0
- package/lib/redux/searchReducer.js.map +1 -0
- package/lib/routes.json +10 -1
- package/lib/styles/index.css +667 -45
- package/lib/tailwindConfig.d.ts +100 -0
- package/lib/tailwindConfig.d.ts.map +1 -0
- package/lib/tailwindConfig.js +101 -0
- package/lib/tailwindConfig.js.map +1 -0
- package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
- package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
- package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
- package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
- package/lib/utils/__tests__/menu.test.d.ts +2 -0
- package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
- package/lib/utils/__tests__/selectors.test.d.ts +2 -0
- package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
- package/lib/utils/analytics-utils.d.ts +43 -0
- package/lib/utils/analytics-utils.d.ts.map +1 -0
- package/lib/utils/analytics.d.ts +48 -0
- package/lib/utils/analytics.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/formateCarData.d.ts +2 -0
- package/lib/utils/formateCarData.d.ts.map +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -1
- package/lib/utils/menu.d.ts.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/test-utils.d.ts.map +1 -1
- package/lib/utils/utils/index.d.ts.map +1 -1
- package/lib/utils/utils/index.js.map +1 -1
- package/package.json +7 -15
- package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
- package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
- package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
- package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -15
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +0 -141
- package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -6
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -89
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -8
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -48
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -7
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.js +0 -69
- package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -8
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +0 -95
- package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +0 -9
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.js +0 -39
- package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -8
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.js +0 -32
- package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
- package/lib/components/defaultSettings.d.ts +0 -4
- package/lib/components/defaultSettings.d.ts.map +0 -1
- package/lib/components/defaultSettings.js +0 -14
- package/lib/components/defaultSettings.js.map +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -13
- package/lib/utils/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React__default from'react';import {Link}from'@remix-run/react';import {useDispatch,useSelector}from'react-redux';import {RightContent}from'./RightContent.js';import {icons}from'../../../icons.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {SearchBar}from'./SearchBar.js';import {HeaderNoticeSlot}from'../slot-fill/HeaderNotice.js';import'@common-stack/components-pro';import'reflect-metadata';import'@admin-layout/client/lib/constants/layout.js';const GlobalHeader = props => {
|
|
2
2
|
const {
|
|
3
3
|
theme,
|
|
4
4
|
layout,
|
|
@@ -6,69 +6,111 @@ import {jsx,jsxs}from'react/jsx-runtime';import {useState}from'react';import {Me
|
|
|
6
6
|
routeParams,
|
|
7
7
|
collapsed,
|
|
8
8
|
settings,
|
|
9
|
-
toggleSideMenu
|
|
9
|
+
toggleSideMenu,
|
|
10
|
+
location
|
|
10
11
|
} = props;
|
|
11
|
-
const [isNotificationsMenuOpen, setIsNotificationsMenuOpen] = useState(false);
|
|
12
|
-
const [isProfileMenuOpen, setIsProfileMenuOpen] = useState(false);
|
|
13
12
|
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
13
|
+
MenuIcon
|
|
14
|
+
} = icons;
|
|
15
|
+
const {
|
|
16
|
+
isMobile
|
|
17
|
+
} = useMediaQuery();
|
|
18
|
+
useDispatch();
|
|
19
|
+
const {
|
|
20
|
+
searchQuery,
|
|
21
|
+
isSearching
|
|
22
|
+
} = useSelector(state => state.search);
|
|
23
|
+
const currentRoute = location?.pathname || '/';
|
|
24
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
25
|
+
// Helper function to get value from uilayout with route/device override support
|
|
26
|
+
const getUILayoutValue = path => {
|
|
27
|
+
// Check for route/device-specific override first
|
|
28
|
+
const routeDeviceKey = `[${currentRoute}][${deviceType}]`;
|
|
29
|
+
const uiOverride = settings?.uiSettings?.[routeDeviceKey];
|
|
30
|
+
if (uiOverride) {
|
|
31
|
+
const value = path.split('.').reduce((obj, key) => obj?.[key], uiOverride);
|
|
32
|
+
if (value !== undefined) return value;
|
|
33
|
+
}
|
|
34
|
+
// Fallback to settings (flattened uilayout from configuration-registries)
|
|
35
|
+
return path.split('.').reduce((obj, key) => obj?.[key], settings);
|
|
36
|
+
};
|
|
37
|
+
// Get device settings directly from uilayout
|
|
38
|
+
const deviceSettings = {
|
|
39
|
+
header: getUILayoutValue('header'),
|
|
40
|
+
background: getUILayoutValue('background')
|
|
41
|
+
};
|
|
42
|
+
// Get layout settings directly from uilayout
|
|
43
|
+
const layoutSettings = {
|
|
44
|
+
contentWidth: getUILayoutValue('contentWidth'),
|
|
45
|
+
navigationMode: getUILayoutValue('navigationMode'),
|
|
46
|
+
sideMenuType: getUILayoutValue('sideMenuType'),
|
|
47
|
+
fixedHeader: getUILayoutValue('fixedHeader'),
|
|
48
|
+
fixedSidebar: getUILayoutValue('fixedSidebar'),
|
|
49
|
+
splitMenus: getUILayoutValue('splitMenus'),
|
|
50
|
+
upperMenuDividerName: getUILayoutValue('upperMenuDividerName'),
|
|
51
|
+
middleMenuDividerName: getUILayoutValue('middleMenuDividerName'),
|
|
52
|
+
lowerMenuDividerName: getUILayoutValue('lowerMenuDividerName')
|
|
53
|
+
};
|
|
54
|
+
const headerSettings = deviceSettings?.header || {};
|
|
55
|
+
const backgroundSettings = deviceSettings?.background || {};
|
|
56
|
+
// Use CSS classes instead of theme-based styling
|
|
57
|
+
const getHeaderClasses = () => {
|
|
58
|
+
let classes = `z-10 py-4 top-0 border-b border-border header-container relative ${layoutSettings?.fixedHeader ? 'sticky' : 'relative'}`;
|
|
59
|
+
if (backgroundSettings.type === 'image' && backgroundSettings.image) {
|
|
60
|
+
classes += ' bg-cover bg-center';
|
|
61
|
+
}
|
|
62
|
+
return classes;
|
|
63
|
+
};
|
|
64
|
+
const getHeaderStyles = () => {
|
|
65
|
+
const baseStyles = {};
|
|
66
|
+
if (backgroundSettings.type === 'image' && backgroundSettings.image) {
|
|
67
|
+
baseStyles.backgroundImage = `url(${backgroundSettings.image})`;
|
|
68
|
+
} else if (backgroundSettings.type === 'color' && backgroundSettings.color !== 'inherit') {
|
|
69
|
+
baseStyles.backgroundColor = backgroundSettings.color;
|
|
70
|
+
}
|
|
71
|
+
// Add dark theme styling
|
|
72
|
+
if (settings?.navTheme === 'realDark') {
|
|
73
|
+
baseStyles.backgroundColor = '#222';
|
|
74
|
+
baseStyles.color = '#fff !important';
|
|
75
|
+
}
|
|
76
|
+
return baseStyles;
|
|
77
|
+
};
|
|
78
|
+
// Early return if header is disabled
|
|
79
|
+
if (!headerSettings?.showHeader) return null;
|
|
80
|
+
// Determine if search bar should be shown
|
|
81
|
+
const showSearchBar = headerSettings?.showSearchSlot && headerSettings?.searchBarRender;
|
|
82
|
+
// Determine if right content should be shown
|
|
83
|
+
const showRightContent = headerSettings?.showRightContent && layoutSettings?.navigationMode !== 'sidebar';
|
|
84
|
+
return React__default.createElement("header", {
|
|
85
|
+
className: getHeaderClasses(),
|
|
86
|
+
style: getHeaderStyles()
|
|
87
|
+
}, React__default.createElement("div", {
|
|
88
|
+
className: `flex items-center justify-between h-full px-4 sm:px-6 mx-auto relative z-10 ${settings?.navTheme === 'realDark' ? 'text-white' : 'text-foreground'}`
|
|
89
|
+
}, isMobile && headerSettings?.showMenuToggle && React__default.createElement("button", {
|
|
90
|
+
className: "p-1 -ml-1 rounded-md md:hidden focus:outline-none focus-themed",
|
|
91
|
+
onClick: toggleSideMenu,
|
|
92
|
+
"aria-label": "Menu"
|
|
93
|
+
}, React__default.createElement(MenuIcon, {
|
|
94
|
+
className: "w-6 h-6"
|
|
95
|
+
})), headerSettings?.showLogo && React__default.createElement("div", null, React__default.createElement(Link, {
|
|
96
|
+
to: "/",
|
|
97
|
+
className: "ml-6 flex items-center gap-2.5 text-lg font-bold text-foreground"
|
|
98
|
+
}, typeof settings?.logo === 'string' ? React__default.createElement("img", {
|
|
99
|
+
src: settings?.logo,
|
|
100
|
+
alt: "Logo",
|
|
101
|
+
className: "w-[28px]"
|
|
102
|
+
}) : settings?.logo, !isMobile && headerSettings?.showPageTitle && React__default.createElement("span", {
|
|
103
|
+
style: {
|
|
104
|
+
color: settings?.navTheme === 'realDark' ? '#fff' : undefined
|
|
105
|
+
}
|
|
106
|
+
}, settings?.title))), showSearchBar && React__default.createElement("div", {
|
|
107
|
+
className: "flex-1 max-w-xl mx-4 hidden md:block"
|
|
108
|
+
}, React__default.createElement(SearchBar, null)), React__default.createElement("div", null, React__default.createElement("span", {
|
|
109
|
+
className: "pull-right pt-2 mr-2"
|
|
110
|
+
}, React__default.createElement(HeaderNoticeSlot, null))), showRightContent && React__default.createElement(RightContent, {
|
|
111
|
+
upperMenus: upperMenus,
|
|
112
|
+
collapsed: collapsed,
|
|
113
|
+
routeParams: routeParams,
|
|
114
|
+
settings: settings
|
|
115
|
+
})));
|
|
116
|
+
};export{GlobalHeader};//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"sourcesContent":[null],"names":[],"mappings":"ojBAUO,MAAM,YAAY,GAAqC,KAAC,IAAO;AAClE,EAAA,MAAA;AACA,IAAA,KAAA;AACA,IAAA,MAAM;AACN,IAAA,UAAM;AACN,IAAA,WAAQ;AAER,IAAA;IACA,QAAM;IAEN,cAAA;AACA,IAAA;WACI;AACA,EAAA,MAAA;;WAGA;;;AAE6B,GAAA,GAAA,aAAA,EAAA;EAC5B,WAAA;QAED;eACO;AACX,IAAA;MAEA,WAAA,CAAA,KAAA,IAAA,KAAA,CAAA,MAAA,CAAA;AACA,EAAA,MAAA,uBAAuB,EAAA,QAAA,IAAA,GAAA;AACnB,EAAA,MAAA,UAAQ,GAAA,QAAA,GAAgB,QAAC,GAAS,SAAA;AAClC;QACF,gBAAA,GAAA,IAAA,IAAA;;AAGF,IAAA,MAAM,cAAc,GAAG,CAAA,CAAA,EAAA,YAAA,CAAA,EAAA,EAAA,UAAA,CAAA,CAAA,CAAA;AACnB,IAAA,MAAA,UAAY,GAAE,QAAA,EAAA,UAAiB,GAAA,cAAe,CAAA;AAC9C,IAAA,IAAA,UAAA,EAAA;AACA,MAAA,MAAA,KAAA,GAAY,IAAE,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,MAAiB,CAAA,CAAA,GAAA,EAAA,GAAA,KAAe,GAAA,GAAA,GAAA,CAAA,EAAA,UAAA,CAAA;AAC9C,MAAA,IAAA,KAAA,KAAW,SAAE,EAAA,OAAiB,KAAA;AAC9B,IAAA;AACA;AACA,IAAA,OAAA,IAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,MAAsB,CAAA,CAAA,GAAA,EAAA,GAAA,KAAiB,GAAA,GAAA,GAAA,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kBAA6C,CAAA,KAAA;IAC7C;;AAIQ,IAAA,IAAA,QAAA,EAAA,QAAA,KAAA;AAMK,MAAA,UAAA,CAAA,eAAY,GAAA,MAAgB;AAMrB,MAAA,UAAA,CAAA,KAAA,GAAA;;qBAOA;AACK,EAAA,CAAA;AAKA;AAYZ,EAAA,IAAA,CAAA,cAAA,EAAA,UACG,EAAA,OAAA,IAAA;;AAKJ,EAAA,MAAA,aAAA,GAAA,cAAA,EAAA,cAAA,IAAA,cAAA,EAAA,eAAA;;wBAEQ,GAAA,cAAC,EAAA,gBAAgB,IAAG,cAEtB,EAAA,cAAA,KAAA,SAAA;uBAGL,CAAA,aAAgB,CAAA,QACb,EAAA;AAUpB,IAAE,SAAA,EAAA,gBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MainHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/MainHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMpE,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,GAAG,kBAAkB,CA0PrE,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import*as React from'react';import {getMenuSeparation}from'@admin-layout/client';import {Link}from'@remix-run/react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {SearchBarBehavior}from'../../../machines/types.js';import'@common-stack/components-pro';import {HeaderSearchBarSlot}from'../slot-fill/HeaderSearchBar.js';import {HeaderSearchButtonSlot}from'../slot-fill/HeaderSearchButton.js';import {RightContentSlot}from'../slot-fill/RightContent.js';import {LogoSlot}from'../slot-fill/Logo.js';import {RightMenu}from'./RightMenu.js';const MainHeader = props => {
|
|
2
|
+
const {
|
|
3
|
+
rightContentRender,
|
|
4
|
+
setSettingToggle,
|
|
5
|
+
settingToggle,
|
|
6
|
+
menuData,
|
|
7
|
+
routeParams,
|
|
8
|
+
navTheme,
|
|
9
|
+
layout,
|
|
10
|
+
location,
|
|
11
|
+
showSettings,
|
|
12
|
+
settings,
|
|
13
|
+
primaryColor,
|
|
14
|
+
pageTitleInfo,
|
|
15
|
+
scrolled,
|
|
16
|
+
searchOptionsShown,
|
|
17
|
+
setSearchOptionsShown,
|
|
18
|
+
authorities,
|
|
19
|
+
picture,
|
|
20
|
+
componentVisibility,
|
|
21
|
+
showMenu,
|
|
22
|
+
toggleSideMenu
|
|
23
|
+
} = props;
|
|
24
|
+
const {
|
|
25
|
+
isMobile
|
|
26
|
+
} = useMediaQuery();
|
|
27
|
+
const currentRoute = location?.pathname || '/';
|
|
28
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
29
|
+
// Helper function to get value from uilayout with route/device override support
|
|
30
|
+
const getUILayoutValue = path => {
|
|
31
|
+
// Check for route/device-specific override first
|
|
32
|
+
const routeDeviceKey = `[${currentRoute}][${deviceType}]`;
|
|
33
|
+
const uiOverride = settings?.uiSettings?.[routeDeviceKey];
|
|
34
|
+
if (uiOverride) {
|
|
35
|
+
const value = path.split('.').reduce((obj, key) => obj?.[key], uiOverride);
|
|
36
|
+
if (value !== undefined) return value;
|
|
37
|
+
}
|
|
38
|
+
// Fallback to settings (flattened uilayout from configuration-registries)
|
|
39
|
+
return path.split('.').reduce((obj, key) => obj?.[key], settings);
|
|
40
|
+
};
|
|
41
|
+
// Get device regions directly from uilayout
|
|
42
|
+
const deviceRegions = {
|
|
43
|
+
header: getUILayoutValue('header')
|
|
44
|
+
};
|
|
45
|
+
const headerSettings = deviceRegions?.header || {};
|
|
46
|
+
// State to track reduced motion preference
|
|
47
|
+
const [prefersReducedMotion, setPrefersReducedMotion] = React.useState(false);
|
|
48
|
+
const [showSearchBar, setShowSearchBar] = React.useState(false);
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
// Check reduced motion preference - only in browser
|
|
51
|
+
if (typeof window !== 'undefined') {
|
|
52
|
+
setPrefersReducedMotion(window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
53
|
+
// Optional: add listener for preference changes
|
|
54
|
+
const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
55
|
+
const handleMediaChange = e => {
|
|
56
|
+
setPrefersReducedMotion(e.matches);
|
|
57
|
+
};
|
|
58
|
+
mediaQuery.addEventListener('change', handleMediaChange);
|
|
59
|
+
return () => {
|
|
60
|
+
mediaQuery.removeEventListener('change', handleMediaChange);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}, []);
|
|
64
|
+
React.useEffect(() => {
|
|
65
|
+
if (!deviceRegions?.header?.searchBarRender || !headerSettings?.showSearchSlot) {
|
|
66
|
+
setShowSearchBar(false);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (deviceRegions?.header?.searchBarBehavior === SearchBarBehavior.ON_SCROLL) {
|
|
70
|
+
// Show search bar only when scrolling
|
|
71
|
+
setShowSearchBar(componentVisibility['search-bar']);
|
|
72
|
+
} else {
|
|
73
|
+
// Show search bar by default when PERMANENT
|
|
74
|
+
setShowSearchBar(true);
|
|
75
|
+
}
|
|
76
|
+
}, [componentVisibility['search-bar'], scrolled, deviceRegions?.header?.searchBarRender, deviceRegions?.header?.searchBarBehavior, headerSettings?.showSearchSlot]);
|
|
77
|
+
// const toggleSettings = () => {
|
|
78
|
+
// setSettingToggle(!settingToggle);
|
|
79
|
+
// };
|
|
80
|
+
// Use CSS classes instead of theme-based styling
|
|
81
|
+
const getHeaderClasses = () => {
|
|
82
|
+
let classes = ` ${isMobile ? headerSettings?.position || 'fixed' : scrolled ? 'fixed' : 'absolute'} w-full top-0 z-[100] px-[8%] transition-all duration-1000 ease-in-out group`;
|
|
83
|
+
if (scrolled) {
|
|
84
|
+
classes += ' py-2 shadow-themed-md';
|
|
85
|
+
} else {
|
|
86
|
+
classes += ' py-2';
|
|
87
|
+
}
|
|
88
|
+
if (searchOptionsShown) {
|
|
89
|
+
classes += ' pb-8';
|
|
90
|
+
}
|
|
91
|
+
if (showMenu) {
|
|
92
|
+
classes += ' border-b';
|
|
93
|
+
}
|
|
94
|
+
if (isMobile) {
|
|
95
|
+
classes += ' border-none';
|
|
96
|
+
}
|
|
97
|
+
return classes;
|
|
98
|
+
};
|
|
99
|
+
const getHeaderStyles = () => {
|
|
100
|
+
if (scrolled) {
|
|
101
|
+
return {
|
|
102
|
+
backgroundColor: 'hsl(var(--card))',
|
|
103
|
+
color: 'hsl(var(--card-foreground))'
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
backgroundColor: 'transparent',
|
|
108
|
+
color: 'hsl(var(--foreground))'
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
if (!deviceRegions?.header?.showHeader && deviceRegions?.header?.showHeader !== undefined) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return React.createElement("div", {
|
|
115
|
+
className: getHeaderClasses(),
|
|
116
|
+
style: getHeaderStyles()
|
|
117
|
+
}, React.createElement("div", {
|
|
118
|
+
className: "flex flex-col"
|
|
119
|
+
}, React.createElement("div", {
|
|
120
|
+
className: `
|
|
121
|
+
justify-around items-start ${deviceRegions?.header?.searchBarRender ? 'pt-0' : 'pt-[7px]'}
|
|
122
|
+
${deviceRegions?.header?.hidden ? 'hidden' : 'flex'}
|
|
123
|
+
`
|
|
124
|
+
}, isMobile && showMenu && React.createElement("button", {
|
|
125
|
+
onClick: toggleSideMenu,
|
|
126
|
+
className: "flex items-center justify-center p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors duration-200",
|
|
127
|
+
"aria-label": "Toggle sidebar"
|
|
128
|
+
}, React.createElement("svg", {
|
|
129
|
+
className: "w-6 h-6 text-gray-600 dark:text-gray-300",
|
|
130
|
+
fill: "none",
|
|
131
|
+
stroke: "currentColor",
|
|
132
|
+
viewBox: "0 0 24 24",
|
|
133
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
134
|
+
}, React.createElement("path", {
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round",
|
|
137
|
+
strokeWidth: 2,
|
|
138
|
+
d: "M4 6h16M4 12h16M4 18h16"
|
|
139
|
+
}))), headerSettings?.showLogo && React.createElement(Link, {
|
|
140
|
+
to: "/",
|
|
141
|
+
className: "text-foreground"
|
|
142
|
+
}, React.createElement(LogoSlot, {
|
|
143
|
+
settings: settings,
|
|
144
|
+
scrolled: scrolled,
|
|
145
|
+
location: location,
|
|
146
|
+
prefersReducedMotion: prefersReducedMotion,
|
|
147
|
+
layout: layout
|
|
148
|
+
})), React.createElement("div", {
|
|
149
|
+
className: "flex-grow"
|
|
150
|
+
}), headerSettings?.showSearchSlot && React.createElement("div", {
|
|
151
|
+
className: "relative flex items-start justify-center"
|
|
152
|
+
}, React.createElement("div", {
|
|
153
|
+
className: `transition-all duration-300 ease-in-out ${searchOptionsShown ? 'opacity-0 absolute' : 'opacity-100'}`
|
|
154
|
+
}, showSearchBar && !searchOptionsShown ? React.createElement(HeaderSearchButtonSlot, {
|
|
155
|
+
transform: "scale",
|
|
156
|
+
transitionDuration: "1.5s",
|
|
157
|
+
transitionTimingFunction: "ease-in",
|
|
158
|
+
setSearchOptionsShown: () => {
|
|
159
|
+
setSearchOptionsShown(true);
|
|
160
|
+
}
|
|
161
|
+
}) : null), React.createElement("div", {
|
|
162
|
+
className: `transition-all duration-300 ease-in-out ${searchOptionsShown ? 'opacity-100' : 'opacity-0 absolute'}`
|
|
163
|
+
}, showSearchBar && searchOptionsShown ? React.createElement(HeaderSearchBarSlot, {
|
|
164
|
+
searchOptionsShown: searchOptionsShown,
|
|
165
|
+
listId: "navbar_searchbox",
|
|
166
|
+
onClose: () => {
|
|
167
|
+
setSearchOptionsShown(false);
|
|
168
|
+
setShowSearchBar(deviceRegions?.header?.searchBarBehavior !== SearchBarBehavior.ON_SCROLL || scrolled);
|
|
169
|
+
}
|
|
170
|
+
}) : null)), React.createElement("div", {
|
|
171
|
+
className: "flex-grow"
|
|
172
|
+
}), headerSettings?.showRightContent && React.createElement("div", {
|
|
173
|
+
className: "flex space-x-1 md:space-x-4"
|
|
174
|
+
}, React.createElement(RightContentSlot, {
|
|
175
|
+
scrolled: scrolled,
|
|
176
|
+
navTheme: settings?.navTheme
|
|
177
|
+
}), React.createElement(RightMenu, {
|
|
178
|
+
match: null,
|
|
179
|
+
menuData: menuData,
|
|
180
|
+
settings: settings,
|
|
181
|
+
routeParams: routeParams,
|
|
182
|
+
getMenuSeparation: getMenuSeparation,
|
|
183
|
+
scrolled: scrolled,
|
|
184
|
+
authorities: authorities,
|
|
185
|
+
picture: picture
|
|
186
|
+
})))));
|
|
187
|
+
};export{MainHeader};//# sourceMappingURL=MainHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MainHeader.js","sources":["../../../../src/components/Layout/GlobalHeader/MainHeader.tsx"],"sourcesContent":[null],"names":[],"mappings":"ioBAWO,MAAM,UAAU,GAAmD,KAAC,IAAO;AAC9E,EAAA,MAAA;AAuBA,IAAA,kBAAkB;AAClB,IAAA;IACA,aAAM;IAEN,QAAA;AACA,IAAA,WAAM;YACF;AACA,IAAA,MAAA;YACA;gBAEI;YACA;gBACI;AAAqB,IAAA,aAAA;YAC5B;sBAED;yBACiB;AACrB,IAAA,WAAE;IAEF,OAAA;AACA,IAAA,mBAAmB;AACf,IAAA,QAAA;;AAGJ,GAAA,GAAA;QAEA;AACA,IAAA;AACA,GAAA,GAAA,aAAO,EAAA;AAEP,EAAA,MAAA,YAAgB,GAAG,QAAE,EAAA,QAAA,IAAA,GAAA;QACjB,UAAA,GAAA,QAAA,GAAA,QAAA,GAAA,SAAA;AACA;wBACI,GAAA,IAAA,IAAuB;;wBAGjB,GAAA,CAAU,GAAG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AAEQ,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;mDAQ3B,EAAA,aAAU,EAAW,MAAO,EAAA,eAAA,GAAA,MAAA,GAAA,UAAA;AAGhC,wBAAA,EAAA,aAAgB,EAAA,MAAA,EAAgB,MAC7B,GAAA,QAAA,GAAA,MAAA;oBACI;AACA,GAAA,EAAA,QAAA,IAAA,QAAA,IAAA,KAAA,CAAA,cAAU,QACN;AAehC,IAAE,OAAA,EAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface GlobalHeaderRightProps {
|
|
4
|
-
theme?: string;
|
|
5
|
-
layout?: any;
|
|
6
|
-
upperMenus: any;
|
|
7
|
-
routeParams: {
|
|
8
|
-
orgName?: string;
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
collapsed?: boolean;
|
|
12
|
-
settings?: ProSettings | any;
|
|
13
|
-
}
|
|
2
|
+
import { GlobalHeaderRightProps } from '../../typings';
|
|
14
3
|
declare const OrganizationDropDown: React.FC<GlobalHeaderRightProps>;
|
|
15
4
|
export default OrganizationDropDown;
|
|
16
5
|
//# sourceMappingURL=OrganizationDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OrganizationDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuE1D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useTranslation}from'react-i18next';import {generateMenuPath}from'@admin-layout/client';const OrganizationDropDown = props => {
|
|
2
2
|
const {
|
|
3
3
|
theme,
|
|
4
4
|
layout,
|
|
@@ -38,36 +38,32 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useState,useRef,useEffect}from'
|
|
|
38
38
|
const handleMouseLeave = () => {
|
|
39
39
|
setIsProfileMenuOpen(false);
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return React__default.createElement("div", {
|
|
42
42
|
ref: dropdownRef,
|
|
43
43
|
className: "relative",
|
|
44
44
|
onMouseEnter: handleMouseEnter,
|
|
45
|
-
onMouseLeave: handleMouseLeave
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, menu?.key || menu?.name)
|
|
70
|
-
}, menu?.key || menu?.name))
|
|
71
|
-
})]
|
|
72
|
-
});
|
|
45
|
+
onMouseLeave: handleMouseLeave
|
|
46
|
+
}, React__default.createElement("button", {
|
|
47
|
+
className: "align-middle rounded-full flex items-center focus-themed",
|
|
48
|
+
onClick: toggleProfileMenu,
|
|
49
|
+
"aria-label": "Account",
|
|
50
|
+
"aria-haspopup": "true"
|
|
51
|
+
}, React__default.createElement("img", {
|
|
52
|
+
className: "object-cover w-8 h-8 rounded-full",
|
|
53
|
+
src: "https://e7.pngegg.com/pngimages/241/832/png-clipart-business-management-computer-software-apartment-organization-user-avatar-blue-angle.png",
|
|
54
|
+
alt: "",
|
|
55
|
+
"aria-hidden": "true"
|
|
56
|
+
}), React__default.createElement("span", {
|
|
57
|
+
className: "ml-2 text-foreground"
|
|
58
|
+
}, routeParams?.orgName)), isProfileMenuOpen && React__default.createElement("ul", {
|
|
59
|
+
className: "absolute right-0 w-56 p-2 space-y-2 themed-dropdown",
|
|
60
|
+
"aria-label": "submenu"
|
|
61
|
+
}, upperMenus && upperMenus[0]?.children?.map(menu => React__default.createElement("li", {
|
|
62
|
+
className: "flex",
|
|
63
|
+
key: menu?.key || menu?.name
|
|
64
|
+
}, React__default.createElement(Link, {
|
|
65
|
+
key: menu?.key || menu?.name,
|
|
66
|
+
to: generateMenuPath(menu?.path, routeParams),
|
|
67
|
+
className: "w-full px-3 py-2 hover:bg-muted rounded-themed transition-colors duration-150 text-foreground"
|
|
68
|
+
}, t(menu?.name))))));
|
|
73
69
|
};export{OrganizationDropDown as default};//# sourceMappingURL=OrganizationDropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationDropdown.js","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrganizationDropdown.js","sources":["../../../../src/components/Layout/GlobalHeader/OrganizationDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":"gMAMA,MAAM,oBAAoB,GAAqC,KAAC,IAAO;AACnE,EAAA,MAAA;IACA,KAAA;IACA,MAAM;AACN,IAAA;IACA,WAAW;IAEX,SAAA;IACA;AACI,GAAA,GAAA,KAAA;QACA,CAAA,uBAAA,EAA0B,0BAAQ,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;AACtC,EAAA,MAAE,CAAA,iBAAA,EAAA,oBAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;QAEF,WAAA,GAAA,MAAA,CAAA,IAAA,CAAA;QACA;AACI,IAAA,CAAA;AACI,IAAA;oBACI,CAAA,MAAA,CAAA;;AAER,EAAA,MAAA,iBAAE,GAAA,MAAA;AAEF,IAAA,oBAAS,CAAA,CAAA;AACT,IAAA,0BAAY,CAAA,KAAA,CAAA;AACR,EAAA,CAAA;AACJ;WACG,CAAA,MAAA;IAEP,MAAA,kBAAsB,GAAA,KAAA,IAAA;MACtB,IAAM,WAAA,CAAA,OAAmB,IAAG,CAAE,WAAA,CAAA,OAAA,CAAA,QAAA,CAAA,KAAA,CAAA,MAAA,CAAA,EAAA;QAC1B,oBAAoB,CAAC,KAAK,CAAC;AAC/B,MAAE;IAEF,CAAA;YACI,CAAA,gBAAqB,CAAA,WAAO,EAAA,kBAAA,CAAA;AAChC,IAAA,OAAE,MAAA;AAEF,MAAA,QACI,CAAA,mBAAA,CAAA,WAAU,EAAA,kBAAa,CAAA;;AAOf,EAAA,CAAA,EAAA,EAAA,CAAA;;QASH,gBAAA,GAAiB,MACd;wBAEoB,CAAC,IAAE,CAAA;AAEP,EAAA,CAAA;AAahC,EAAE,MAAA,gBAAA,GAAA,MAAA;AAEF,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
layout?: any;
|
|
6
|
-
upperMenus: any;
|
|
7
|
-
routeParams: {
|
|
8
|
-
orgName?: string;
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
formatMessage?: any;
|
|
12
|
-
collapsed?: boolean;
|
|
13
|
-
settings?: ProSettings;
|
|
14
|
-
}
|
|
15
|
-
export declare const useHorizontalScroll: () => React.MutableRefObject<undefined>;
|
|
16
|
-
declare const GlobalHeaderRight: React.FC<GlobalHeaderRightProps>;
|
|
17
|
-
export default GlobalHeaderRight;
|
|
2
|
+
import { GlobalHeaderRightProps } from '../../typings';
|
|
3
|
+
export declare const useHorizontalScroll: () => React.MutableRefObject<HTMLDivElement>;
|
|
4
|
+
export declare const RightContent: React.FC<GlobalHeaderRightProps>;
|
|
18
5
|
//# sourceMappingURL=RightContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"RightContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,eAAO,MAAM,mBAAmB,8CAsB/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8EzD,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import*as React from'react';import {useState,useEffect,useRef}from'react';import {LanguageMenu}from'../../LanguageMenu/LanguageMenu.js';import OrganizationDropDown from'./OrganizationDropdown.js';const useHorizontalScroll = () => {
|
|
2
|
+
const elRef = useRef(null);
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
const el = elRef.current;
|
|
5
|
+
if (el) {
|
|
6
|
+
const onWheel = e => {
|
|
7
|
+
if (e.deltaY === 0) return;
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
el.scrollTo({
|
|
10
|
+
left: el.scrollLeft + e.deltaY,
|
|
11
|
+
behavior: 'smooth'
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
el.addEventListener('wheel', onWheel);
|
|
15
|
+
return () => {
|
|
16
|
+
el.removeEventListener('wheel', onWheel);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}, []);
|
|
20
|
+
return elRef;
|
|
21
|
+
};
|
|
22
|
+
const RightContent = props => {
|
|
23
|
+
const {
|
|
24
|
+
theme,
|
|
25
|
+
layout,
|
|
26
|
+
upperMenus,
|
|
27
|
+
routeParams,
|
|
28
|
+
collapsed,
|
|
29
|
+
settings
|
|
30
|
+
} = props;
|
|
31
|
+
const [navBarItems, setNavBarItems] = useState([]);
|
|
32
|
+
const scrollRef = useHorizontalScroll();
|
|
33
|
+
// TODO: uncomment this once the extension API is updated
|
|
34
|
+
// const controller: any = useExtensionController();
|
|
35
|
+
// useEffect(() => {
|
|
36
|
+
// if (controller) {
|
|
37
|
+
// const subscription = controller.services.contribution.getContributions().subscribe(({ pageNavBar }) => {
|
|
38
|
+
// setNavBarItems(pageNavBar || []);
|
|
39
|
+
// });
|
|
40
|
+
// return () => subscription.unsubscribe();
|
|
41
|
+
// }
|
|
42
|
+
// }, [controller]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
const ele = document.getElementById('item-wrapper');
|
|
45
|
+
if (ele) {
|
|
46
|
+
if (check(ele)) {
|
|
47
|
+
ele.style.boxShadow = 'inset 0 0 5px #e2e2e2';
|
|
48
|
+
} else {
|
|
49
|
+
ele.style.boxShadow = 'none';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const check = el => {
|
|
54
|
+
const curOverflow = el.style.overflow;
|
|
55
|
+
if (!curOverflow || curOverflow === 'visible') {
|
|
56
|
+
el.style.overflow = 'hidden';
|
|
57
|
+
}
|
|
58
|
+
const isOverflowing = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
|
|
59
|
+
el.style.overflow = curOverflow;
|
|
60
|
+
return isOverflowing;
|
|
61
|
+
};
|
|
62
|
+
return React.createElement("div", {
|
|
63
|
+
className: `flex items-center ${collapsed ? 'ml-2.5' : 'ml-0'}`
|
|
64
|
+
}, React.createElement("div", {
|
|
65
|
+
id: "item-wrapper",
|
|
66
|
+
ref: scrollRef,
|
|
67
|
+
className: "flex overflow-x-auto scrollbar-hide whitespace-nowrap space-x-2 py-2 px-1"
|
|
68
|
+
}, navBarItems.map((item, index) => {
|
|
69
|
+
if (item.position === 'right' && item.component) {
|
|
70
|
+
return React.createElement("div", {
|
|
71
|
+
key: index,
|
|
72
|
+
className: "flex-shrink-0"
|
|
73
|
+
}, item.component(props));
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
})), React.createElement("div", {
|
|
77
|
+
className: "relative"
|
|
78
|
+
}, React.createElement(LanguageMenu, null)), React.createElement("div", {
|
|
79
|
+
className: "relative"
|
|
80
|
+
}, React.createElement(OrganizationDropDown, {
|
|
81
|
+
upperMenus: upperMenus,
|
|
82
|
+
routeParams: routeParams,
|
|
83
|
+
collapsed: collapsed,
|
|
84
|
+
settings: settings
|
|
85
|
+
})));
|
|
86
|
+
};export{RightContent,useHorizontalScroll};//# sourceMappingURL=RightContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RightContent.js","sources":["../../../../src/components/Layout/GlobalHeader/RightContent.tsx"],"sourcesContent":[null],"names":[],"mappings":"oMAOO,MAAM,mBAAmB,GAAG,MAAK;AACpC,EAAA,MAAA,QAAW,MAAG,CAAA,IAAuB,CAAA;WAErC,CAAA,MAAa;AACT,IAAA,MAAA,EAAA,GAAM,KAAK,CAAA;QACX,EAAA,EAAI;AACA,MAAA,MAAA,OAAM,GAAA,CAAA,IAAO;AACT,QAAA,IAAA,CAAA,CAAA,MAAI,KAAE,CAAA,EAAM;wBAAQ,EAAA;mBAClB,CAAA;gBACF,EAAE,CAAC,UAAS,GAAA,CAAA,CAAA,MAAA;AACR,UAAA,QAAA,EAAA;AACA,SAAA,CAAA;AACH,MAAA,CAAA;AACL,MAAA,EAAA,CAAA,gBAAE,CAAA,OAAA,EAAA,OAAA,CAAA;AACF,MAAA,OAAA,MAAG;AACH,QAAA,EAAA,CAAA,mBAAY,CAAA,OAAA,EAAA,OAAA,CAAA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