@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyToAllRoutesToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/ApplyToAllRoutesToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,2BAA2B;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,2BAA2B,qBAoBxF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React__default from'react';function ApplyToAllRoutesToggle({
|
|
2
|
+
checked,
|
|
3
|
+
onChange
|
|
4
|
+
}) {
|
|
5
|
+
return React__default.createElement("div", {
|
|
6
|
+
className: "flex items-center justify-between"
|
|
7
|
+
}, React__default.createElement("div", null, React__default.createElement("p", {
|
|
8
|
+
className: "text-sm text-black dark:text-white font-medium"
|
|
9
|
+
}, "Apply to All Routes"), React__default.createElement("p", {
|
|
10
|
+
className: "text-xs text-gray-600 dark:text-gray-400"
|
|
11
|
+
}, "When enabled, route-specific settings will apply to all routes instead of just the current route")), React__default.createElement("label", {
|
|
12
|
+
className: "relative inline-flex items-center cursor-pointer"
|
|
13
|
+
}, React__default.createElement("input", {
|
|
14
|
+
type: "checkbox",
|
|
15
|
+
className: "sr-only peer",
|
|
16
|
+
checked: checked,
|
|
17
|
+
onChange: e => onChange(e.target.checked)
|
|
18
|
+
}), React__default.createElement("div", {
|
|
19
|
+
className: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"
|
|
20
|
+
})));
|
|
21
|
+
}export{ApplyToAllRoutesToggle};//# sourceMappingURL=ApplyToAllRoutesToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyToAllRoutesToggle.js","sources":["../../../../src/components/SettingDrawer/components/ApplyToAllRoutesToggle.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"2CAOgB,sBAAsB,CAAC;AACnC,EAAA,OAAA;AAEQ,EAAA;;AAEI,EAAA,OAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;aAIJ,EAAA;iCACI,CAAA,KAAA,EAAA,IAAA,EAAAA,cACI,CAAA,aAAK,CAAA,GACL,EAAA;AAIJ,IAAA,SAAA,EAAA;AAIhB,GAAC,EAAA,qBAAA,CAAA,EAAAA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckBoxTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/CheckBoxTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAwDrD,wBAAgB,aAAa,CAAC,KAAK,EAAE,mBAAmB,qBAsCvD"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import*as React from'react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {getSettingValue}from'../../../utils/settingsUtils.js';const themelist = [{
|
|
2
|
+
key: 'light',
|
|
3
|
+
title: 'Light',
|
|
4
|
+
svg: React.createElement("svg", {
|
|
5
|
+
width: "58",
|
|
6
|
+
height: "50",
|
|
7
|
+
viewBox: "0 0 58 50",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, React.createElement("defs", null, React.createElement("filter", {
|
|
10
|
+
id: "softShadow",
|
|
11
|
+
x: "-20%",
|
|
12
|
+
y: "-20%",
|
|
13
|
+
width: "140%",
|
|
14
|
+
height: "140%"
|
|
15
|
+
}, React.createElement("feDropShadow", {
|
|
16
|
+
dx: "0",
|
|
17
|
+
dy: "2",
|
|
18
|
+
stdDeviation: "4",
|
|
19
|
+
floodColor: "#000000",
|
|
20
|
+
floodOpacity: "0.1"
|
|
21
|
+
}))), React.createElement("rect", {
|
|
22
|
+
x: "0",
|
|
23
|
+
y: "0",
|
|
24
|
+
width: "58",
|
|
25
|
+
height: "50",
|
|
26
|
+
rx: "8",
|
|
27
|
+
fill: "#ffffff",
|
|
28
|
+
filter: "url(#softShadow)"
|
|
29
|
+
}))
|
|
30
|
+
}, {
|
|
31
|
+
key: 'realDark',
|
|
32
|
+
title: 'realDark',
|
|
33
|
+
svg: React.createElement("svg", {
|
|
34
|
+
width: "58",
|
|
35
|
+
height: "50",
|
|
36
|
+
viewBox: "0 0 58 50",
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
38
|
+
}, React.createElement("rect", {
|
|
39
|
+
x: "0",
|
|
40
|
+
y: "0",
|
|
41
|
+
width: "58",
|
|
42
|
+
height: "50",
|
|
43
|
+
rx: "8",
|
|
44
|
+
fill: "#ffffff"
|
|
45
|
+
}), React.createElement("path", {
|
|
46
|
+
d: "M0,8\n A8,8 0 0 1 8,0\n H18\n V50\n H8\n A8,8 0 0 1 0,42\n Z",
|
|
47
|
+
fill: "#011627"
|
|
48
|
+
}))
|
|
49
|
+
}, {
|
|
50
|
+
key: 'dark',
|
|
51
|
+
title: 'Dark',
|
|
52
|
+
svg: React.createElement("svg", {
|
|
53
|
+
width: "58",
|
|
54
|
+
height: "50",
|
|
55
|
+
viewBox: "0 0 58 50",
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
57
|
+
}, React.createElement("rect", {
|
|
58
|
+
width: "58",
|
|
59
|
+
height: "50",
|
|
60
|
+
rx: "8",
|
|
61
|
+
fill: "#000000"
|
|
62
|
+
}), React.createElement("clipPath", {
|
|
63
|
+
id: "roundedClip"
|
|
64
|
+
}, React.createElement("rect", {
|
|
65
|
+
width: "58",
|
|
66
|
+
height: "50",
|
|
67
|
+
rx: "8"
|
|
68
|
+
})), React.createElement("g", {
|
|
69
|
+
clipPath: "url(#roundedClip)"
|
|
70
|
+
}, React.createElement("rect", {
|
|
71
|
+
x: "0",
|
|
72
|
+
y: "13",
|
|
73
|
+
width: "29",
|
|
74
|
+
height: "37",
|
|
75
|
+
fill: "#0d1117"
|
|
76
|
+
}), React.createElement("rect", {
|
|
77
|
+
x: "29",
|
|
78
|
+
y: "13",
|
|
79
|
+
width: "29",
|
|
80
|
+
height: "37",
|
|
81
|
+
fill: "#233445"
|
|
82
|
+
})))
|
|
83
|
+
}];
|
|
84
|
+
function CheckBoxTheme(props) {
|
|
85
|
+
const {
|
|
86
|
+
changeSetting,
|
|
87
|
+
settings,
|
|
88
|
+
location,
|
|
89
|
+
routePattern,
|
|
90
|
+
applyToAllRoutes = false
|
|
91
|
+
} = props;
|
|
92
|
+
const {
|
|
93
|
+
isMobile
|
|
94
|
+
} = useMediaQuery();
|
|
95
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
96
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
97
|
+
// Use getSettingValue to get the correct navTheme based on applyToAllRoutes
|
|
98
|
+
const navThemeValue = getSettingValue(settings, 'navTheme', applyToAllRoutes, currentRoute, deviceType, 'light');
|
|
99
|
+
return React.createElement("div", {
|
|
100
|
+
className: "flex flex-row gap-4"
|
|
101
|
+
}, themelist.map((themeItems, index) => {
|
|
102
|
+
return React.createElement("div", {
|
|
103
|
+
key: `themeItem_${index}`,
|
|
104
|
+
className: "relative cursor-pointer hover:opacity-80 transition-opacity",
|
|
105
|
+
style: {
|
|
106
|
+
boxShadow: '0 1px 2.5px 0 rgb(0 0 0 / 18%)'
|
|
107
|
+
},
|
|
108
|
+
onClick: () => {
|
|
109
|
+
changeSetting('navTheme', themeItems.key);
|
|
110
|
+
}
|
|
111
|
+
}, React.createElement("div", null, themeItems.svg, navThemeValue === themeItems.key && React.createElement("svg", {
|
|
112
|
+
className: "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-6 h-6 text-blue-500",
|
|
113
|
+
viewBox: "0 0 24 24",
|
|
114
|
+
fill: "currentColor"
|
|
115
|
+
}, React.createElement("path", {
|
|
116
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
117
|
+
}))));
|
|
118
|
+
}));
|
|
119
|
+
}export{CheckBoxTheme};//# sourceMappingURL=CheckBoxTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckBoxTheme.js","sources":["../../../../src/components/SettingDrawer/components/CheckBoxTheme.tsx"],"sourcesContent":[null],"names":[],"mappings":"6OAKA,MAAM,SAAS,GAAG,CAAA;AACd,EAAA,GAAA,EAAA,OAAA;AACI,EAAA,KAAA,EAAA,OAAK;AACL,EAAA,GAAA,EAAA,KAAA,CAAK,aAAS,CAAA,KAAA,EAAA;AACd,IAAA,KAAA,EAAG,IACC;AACI,IAAA,MAAA,EAAA,IAAA;AACI,IAAA,OAAA,EAAA,WAAA;;AAIJ,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAA,KAAO,CAAC,aAAU,CAAA,QAAM,EAAI;AAGvC,IAAA,EAAA,EAAA,YAAA;AACD,IAAA,CAAA,EAAA,MAAA;AACI,IAAA,CAAA,EAAA,MAAK;AACL,IAAA,KAAA,EAAA,MAAO;AACP,IAAA,MAAA;wBAEQ,CAAA,cAAA,EAAA;;AAaX,IAAA,EAAA,EAAA,GAAA;AACD,IAAA,YAAA,EAAA,GAAA;AACI,IAAA,UAAK,EAAA,SAAM;AACX,IAAA,YAAO,EAAA;AACP,GAAA,CAAA,CAAA,CAAA,EAAA,KAAK,CACD,aAAA,CAAA,MAAA,EAAA;AACI,IAAA,CAAA,EAAA,GAAA;;AAEI,IAAA,KAAA,EAAA,IAAA;YAEJ,IAAA;AACI,IAAA,EAAA,EAAA,GAAA;mBACA;AAIf,IAAA,MAAA,EAAA;GACH,CAAA;AAEF,CAAA,EAAA;AACI,EAAA,GAAA,EAAA,UAAQ;AACR,EAAA,KAAA,EAAA,UAAQ;KACR,EAAA,KAAM,CAAA,aAAe,CAAA,KAAA,EAAA;IACrB,KAAA,EAAM,IAAA;IAEN,MAAA,EAAA,IAAA;AACA,IAAA,oBAAmB;AACnB,IAAA,KAAA,EAAO;UAGK,CAAA;AAMY,IAAA,CAAA,EAAA,GAAA;;AAGJ,IAAA,KAAA,EAAA,IAAA;AACK,IAAA,MAAA,EAAA,IAAA;AAEA,IAAA,EAAA,EAAA,GAAA;;IAYjB,EAAE,KAER,CAAA,aAAA,CAAA,MAAA,EAAA;AACN,IAAC,CAAA,EAAA,kMAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DeviceTabsProps {
|
|
3
|
+
activeTab: 'desktop' | 'mobile';
|
|
4
|
+
onTabChange: (tab: 'desktop' | 'mobile') => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function DeviceTabs({ activeTab, onTabChange }: DeviceTabsProps): React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=DeviceTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/DeviceTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,eAAe;IACrB,SAAS,EAAE,SAAS,GAAG,QAAQ,CAAC;IAChC,WAAW,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,QAAQ,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,eAAe,qBAgErE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React__default from'react';import {useTranslation}from'react-i18next';function DeviceTabs({
|
|
2
|
+
activeTab,
|
|
3
|
+
onTabChange
|
|
4
|
+
}) {
|
|
5
|
+
const {
|
|
6
|
+
t
|
|
7
|
+
} = useTranslation('settings');
|
|
8
|
+
return React__default.createElement("div", {
|
|
9
|
+
className: "mt-4"
|
|
10
|
+
}, React__default.createElement("div", {
|
|
11
|
+
className: "flex mb-4"
|
|
12
|
+
}, React__default.createElement("button", {
|
|
13
|
+
className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700'}`,
|
|
14
|
+
onClick: () => onTabChange('desktop')
|
|
15
|
+
}, React__default.createElement("span", {
|
|
16
|
+
className: "flex items-center justify-center"
|
|
17
|
+
}, React__default.createElement("svg", {
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
width: "16",
|
|
20
|
+
height: "16",
|
|
21
|
+
viewBox: "0 0 24 24",
|
|
22
|
+
fill: "none",
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeWidth: "2",
|
|
25
|
+
strokeLinecap: "round",
|
|
26
|
+
strokeLinejoin: "round",
|
|
27
|
+
className: "mr-1"
|
|
28
|
+
}, React__default.createElement("rect", {
|
|
29
|
+
x: "2",
|
|
30
|
+
y: "3",
|
|
31
|
+
width: "20",
|
|
32
|
+
height: "14",
|
|
33
|
+
rx: "2",
|
|
34
|
+
ry: "2"
|
|
35
|
+
}), React__default.createElement("line", {
|
|
36
|
+
x1: "8",
|
|
37
|
+
y1: "21",
|
|
38
|
+
x2: "16",
|
|
39
|
+
y2: "21"
|
|
40
|
+
}), React__default.createElement("line", {
|
|
41
|
+
x1: "12",
|
|
42
|
+
y1: "17",
|
|
43
|
+
x2: "12",
|
|
44
|
+
y2: "21"
|
|
45
|
+
})), t('desktop_tab'))), React__default.createElement("button", {
|
|
46
|
+
className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700'}`,
|
|
47
|
+
onClick: () => onTabChange('mobile')
|
|
48
|
+
}, React__default.createElement("span", {
|
|
49
|
+
className: "flex items-center justify-center"
|
|
50
|
+
}, React__default.createElement("svg", {
|
|
51
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
52
|
+
width: "16",
|
|
53
|
+
height: "16",
|
|
54
|
+
viewBox: "0 0 24 24",
|
|
55
|
+
fill: "none",
|
|
56
|
+
stroke: "currentColor",
|
|
57
|
+
strokeWidth: "2",
|
|
58
|
+
strokeLinecap: "round",
|
|
59
|
+
strokeLinejoin: "round",
|
|
60
|
+
className: "mr-1"
|
|
61
|
+
}, React__default.createElement("rect", {
|
|
62
|
+
x: "5",
|
|
63
|
+
y: "2",
|
|
64
|
+
width: "14",
|
|
65
|
+
height: "20",
|
|
66
|
+
rx: "2",
|
|
67
|
+
ry: "2"
|
|
68
|
+
}), React__default.createElement("line", {
|
|
69
|
+
x1: "12",
|
|
70
|
+
y1: "18",
|
|
71
|
+
x2: "12",
|
|
72
|
+
y2: "18"
|
|
73
|
+
})), t('mobile_tab')))));
|
|
74
|
+
}export{DeviceTabs};//# sourceMappingURL=DeviceTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceTabs.js","sources":["../../../../src/components/SettingDrawer/components/DeviceTabs.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"sFAQgB,UAAU,CAAC;WACjB;AAEN,EAAA;;AAGY,EAAA,MAAA;AAGY,IAAA;AACA,GAAA,GAAA,cAAA,CAAC,UAAC,CAAA;qCAIV,CAAA,KAAA,EAAA;AACI,IAAA,SAAA,EAAA;iCAYI,CAAA,KAAA,EAAA;AACA,IAAA,SAAA,EAAA;AACA,GAAA,EAAAA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAEH,IAAA,SAAA,EAAA,CAAA,mHAEA,EAAA,SAAA,KAAA,SAAA,GAAA,wCAAA,GAAA,oGAAA,CAAA,CAAA;AACT,IAAA,OAAA,EAAA,MAAA,WAAA,CAAA,SAAA;AAGY,GAAA,EAAAA,cAAA,CAAA,aAAE,CAAA,MAAA,EAAA;AACF,IAAA,SAAA,EAAA;iCAIR,CAAA,KAAA,EAAA;AACI,IAAA,KAAA,EAAA,4BAAA;;AAaI,IAAA,MAAA,EAAA,IAAA;;AAQ5B,IAAC,IAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/InvitationSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAItD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,qBAsEnE"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {getSettingValue}from'../../../utils/settingsUtils.js';function InvitationSettings(props) {
|
|
2
|
+
const {
|
|
3
|
+
settings,
|
|
4
|
+
changeSetting,
|
|
5
|
+
location,
|
|
6
|
+
routePattern,
|
|
7
|
+
applyToAllRoutes = false
|
|
8
|
+
} = props;
|
|
9
|
+
const {
|
|
10
|
+
t
|
|
11
|
+
} = useTranslation('settings');
|
|
12
|
+
const {
|
|
13
|
+
isMobile
|
|
14
|
+
} = useMediaQuery();
|
|
15
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
16
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
17
|
+
// Get organization invitations using the utility function
|
|
18
|
+
const invitations = React.useMemo(() => {
|
|
19
|
+
return getSettingValue(settings, 'organization.members.invitations', applyToAllRoutes, currentRoute, deviceType, {});
|
|
20
|
+
}, [settings, applyToAllRoutes, currentRoute, deviceType]);
|
|
21
|
+
const handleInvitationChange = (key, value) => {
|
|
22
|
+
if (!changeSetting) return;
|
|
23
|
+
const newInvitations = {
|
|
24
|
+
...invitations,
|
|
25
|
+
[key]: value
|
|
26
|
+
};
|
|
27
|
+
changeSetting(`organization.members.invitations`, newInvitations);
|
|
28
|
+
};
|
|
29
|
+
const textColor = {
|
|
30
|
+
color: settings?.navTheme === 'dark' ? '#ffff' : 'black'
|
|
31
|
+
};
|
|
32
|
+
return React.createElement("div", null, React.createElement("p", {
|
|
33
|
+
className: "mb-2 font-medium",
|
|
34
|
+
style: textColor
|
|
35
|
+
}, t('invitation_settings') || 'Invitation Settings'), React.createElement("div", {
|
|
36
|
+
className: "flex items-center mt-4"
|
|
37
|
+
}, React.createElement("span", {
|
|
38
|
+
style: textColor
|
|
39
|
+
}, t('show_email_invite') || 'Show Email Invite'), React.createElement("div", {
|
|
40
|
+
className: "flex-grow"
|
|
41
|
+
}), React.createElement(Switch, {
|
|
42
|
+
value: !!invitations.showEmailInvite,
|
|
43
|
+
onChange: checked => handleInvitationChange('showEmailInvite', checked)
|
|
44
|
+
})), React.createElement("div", {
|
|
45
|
+
className: "flex items-center mt-4"
|
|
46
|
+
}, React.createElement("span", {
|
|
47
|
+
style: textColor
|
|
48
|
+
}, t('show_sms_invite') || 'Show SMS Invite'), React.createElement("div", {
|
|
49
|
+
className: "flex-grow"
|
|
50
|
+
}), React.createElement(Switch, {
|
|
51
|
+
value: !!invitations.showSmsInvite,
|
|
52
|
+
onChange: checked => handleInvitationChange('showSmsInvite', checked)
|
|
53
|
+
})), React.createElement("div", {
|
|
54
|
+
className: "flex items-center mt-4"
|
|
55
|
+
}, React.createElement("span", {
|
|
56
|
+
style: textColor
|
|
57
|
+
}, t('show_qr_code_invite') || 'Show QR Code Invite'), React.createElement("div", {
|
|
58
|
+
className: "flex-grow"
|
|
59
|
+
}), React.createElement(Switch, {
|
|
60
|
+
value: !!invitations.showQrCodeInvite,
|
|
61
|
+
onChange: checked => handleInvitationChange('showQrCodeInvite', checked)
|
|
62
|
+
})), React.createElement("div", {
|
|
63
|
+
className: "flex items-center mt-4"
|
|
64
|
+
}, React.createElement("span", {
|
|
65
|
+
style: textColor
|
|
66
|
+
}, t('show_invite_link') || 'Show Invite Link'), React.createElement("div", {
|
|
67
|
+
className: "flex-grow"
|
|
68
|
+
}), React.createElement(Switch, {
|
|
69
|
+
value: !!invitations.showInviteLink,
|
|
70
|
+
onChange: checked => handleInvitationChange('showInviteLink', checked)
|
|
71
|
+
})));
|
|
72
|
+
}export{InvitationSettings};//# sourceMappingURL=InvitationSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationSettings.js","sources":["../../../../src/components/SettingDrawer/components/InvitationSettings.tsx"],"sourcesContent":[null],"names":[],"mappings":"yTAOM,SAAU,kBAAkB,CAAC,KAAiC,EAAA;AAChE,EAAA,MAAA;IACA,QAAQ;AACR,IAAA,aAAQ;IACR,QAAM;IACN,YAAM;IAEN,gBAAA,GAAA;AACA,GAAA,GAAA;AACI,EAAA,MAAA;IAQJ;AAEA,GAAA,GAAA,0BAA4B;AACxB,EAAA,MAAA;;AACA,GAAA,GAAA;AACI,EAAA,MAAA,YAAG,GAAA,YAAW,IAAA,QAAA,EAAA,QAAA,IAAA,GAAA;kBACT,GAAE,QAAK,GAAA,QAAA,GAAA,SAAA;;AAGhB,EAAA,MAAA,WAAA,GAAc,KAAA,CAAA,OAAA,CAAA,MAAA;AAClB,IAAA,OAAE,eAAA,CAAA,QAAA,EAAA,kCAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,EAAA,CAAA;AAEF,EAAA,CAAA,EAAA,CAAA,0BAA2B,EAAA,YAAU,EAAA,YAAmB;AAExD,EAAA,MAAA,sBACI,GAAA,CAAA,GAAA,EAAA,KAAA,KAAA;AACI,IAAA,IAAA,CAAA,aAAA,EAAA;UAGA,cAAA,GAAA;oBACI;aACA;;iBAMJ,CAAA,CAAA,gCAAe,CAAA,EAAA,cAAA,CAAA;;iBAEX,GAAA;mBACA,EAAA,QAAA,KAAC,MAAM,GACH,OAAQ,GAAC;;cAKb,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAM,KAAK,CAAA,aAAW,CAAG,GAAE,EAAA;aAC3B,EAAA,kBAAA;;4BAMJ,CAAA,IAAA,qBAAe,CAAA,EAAA,KAAA,CAAA,aAAwB,CAAA,KAAA,EAAA;aACnC,EAAA;wBACA,CAAA,MAAA,EAAA;;AAQhB,GAAC,EAAA,CAAA,CAAA,mBAAA,CAAA,IAAA,mBAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutChange.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/LayoutChange.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAItD,wBAAgB,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,qBAwI7D"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import*as React from'react';import {useMemo}from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {getSettingValue}from'../../../utils/settingsUtils.js';function LayoutChange(props) {
|
|
2
|
+
const {
|
|
3
|
+
settings,
|
|
4
|
+
changeSetting,
|
|
5
|
+
location,
|
|
6
|
+
routePattern,
|
|
7
|
+
applyToAllRoutes = false
|
|
8
|
+
} = props;
|
|
9
|
+
const {
|
|
10
|
+
t
|
|
11
|
+
} = useTranslation('settings');
|
|
12
|
+
const {
|
|
13
|
+
isMobile
|
|
14
|
+
} = useMediaQuery();
|
|
15
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
16
|
+
const {
|
|
17
|
+
navTheme
|
|
18
|
+
} = settings || {};
|
|
19
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
20
|
+
// Get layout values using the utility function
|
|
21
|
+
const layoutValues = useMemo(() => ({
|
|
22
|
+
fixedHeader: getSettingValue(settings, 'fixedHeader', applyToAllRoutes, currentRoute, deviceType, true),
|
|
23
|
+
fixedSidebar: getSettingValue(settings, 'fixedSidebar', applyToAllRoutes, currentRoute, deviceType, true),
|
|
24
|
+
splitMenus: getSettingValue(settings, 'splitMenus', applyToAllRoutes, currentRoute, deviceType, false),
|
|
25
|
+
upperMenuDividerName: getSettingValue(settings, 'upperMenuDividerName', applyToAllRoutes, currentRoute, deviceType, 'Navigation'),
|
|
26
|
+
middleMenuDividerName: getSettingValue(settings, 'middleMenuDividerName', applyToAllRoutes, currentRoute, deviceType, 'Dashboard'),
|
|
27
|
+
lowerMenuDividerName: getSettingValue(settings, 'lowerMenuDividerName', applyToAllRoutes, currentRoute, deviceType, 'Admin')
|
|
28
|
+
}), [settings, applyToAllRoutes, currentRoute, deviceType]);
|
|
29
|
+
const handleLayoutChange = (key, value) => {
|
|
30
|
+
if (!changeSetting) return;
|
|
31
|
+
// Pass simple key - handleSettingChange in SettingDrawer will decide if it's global or route-specific
|
|
32
|
+
changeSetting(key, value);
|
|
33
|
+
};
|
|
34
|
+
const textColor = {
|
|
35
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
36
|
+
};
|
|
37
|
+
return React.createElement("div", null, React.createElement("div", {
|
|
38
|
+
className: "flex items-center mt-4"
|
|
39
|
+
}, React.createElement("p", {
|
|
40
|
+
className: "mb-0",
|
|
41
|
+
style: textColor
|
|
42
|
+
}, t('fixed_header')), React.createElement("div", {
|
|
43
|
+
className: "flex-grow"
|
|
44
|
+
}), React.createElement(Switch, {
|
|
45
|
+
value: layoutValues.fixedHeader,
|
|
46
|
+
onChange: checked => handleLayoutChange('fixedHeader', checked)
|
|
47
|
+
})), React.createElement("div", {
|
|
48
|
+
className: "flex items-center mt-4"
|
|
49
|
+
}, React.createElement("p", {
|
|
50
|
+
className: "mb-0",
|
|
51
|
+
style: textColor
|
|
52
|
+
}, t('fixed_sidebar')), React.createElement("div", {
|
|
53
|
+
className: "flex-grow"
|
|
54
|
+
}), React.createElement(Switch, {
|
|
55
|
+
value: layoutValues.fixedSidebar,
|
|
56
|
+
onChange: checked => handleLayoutChange('fixedSidebar', checked)
|
|
57
|
+
})), React.createElement("div", {
|
|
58
|
+
className: "flex items-center mt-4"
|
|
59
|
+
}, React.createElement("p", {
|
|
60
|
+
className: "mb-0",
|
|
61
|
+
style: textColor
|
|
62
|
+
}, t('split_menus')), React.createElement("div", {
|
|
63
|
+
className: "flex-grow"
|
|
64
|
+
}), React.createElement(Switch, {
|
|
65
|
+
value: layoutValues.splitMenus,
|
|
66
|
+
onChange: checked => handleLayoutChange('splitMenus', checked)
|
|
67
|
+
})), layoutValues.splitMenus && React.createElement(React.Fragment, null, React.createElement("div", {
|
|
68
|
+
className: "mt-6 mb-2"
|
|
69
|
+
}, React.createElement("p", {
|
|
70
|
+
className: "text-sm font-medium",
|
|
71
|
+
style: textColor
|
|
72
|
+
}, t('menu_divider_names'))), React.createElement("div", {
|
|
73
|
+
className: "flex flex-col space-y-4"
|
|
74
|
+
}, React.createElement("div", {
|
|
75
|
+
className: "flex flex-col"
|
|
76
|
+
}, React.createElement("label", {
|
|
77
|
+
className: "text-xs mb-1",
|
|
78
|
+
style: textColor
|
|
79
|
+
}, t('upper_menu_divider')), React.createElement("input", {
|
|
80
|
+
type: "text",
|
|
81
|
+
className: "px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",
|
|
82
|
+
value: layoutValues.upperMenuDividerName,
|
|
83
|
+
onChange: e => {
|
|
84
|
+
handleLayoutChange('upperMenuDividerName', e.target.value);
|
|
85
|
+
}
|
|
86
|
+
})), React.createElement("div", {
|
|
87
|
+
className: "flex flex-col"
|
|
88
|
+
}, React.createElement("label", {
|
|
89
|
+
className: "text-xs mb-1",
|
|
90
|
+
style: textColor
|
|
91
|
+
}, t('middle_menu_divider')), React.createElement("input", {
|
|
92
|
+
type: "text",
|
|
93
|
+
className: "px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",
|
|
94
|
+
value: layoutValues.middleMenuDividerName,
|
|
95
|
+
onChange: e => {
|
|
96
|
+
handleLayoutChange('middleMenuDividerName', e.target.value);
|
|
97
|
+
}
|
|
98
|
+
})), React.createElement("div", {
|
|
99
|
+
className: "flex flex-col"
|
|
100
|
+
}, React.createElement("label", {
|
|
101
|
+
className: "text-xs mb-1",
|
|
102
|
+
style: textColor
|
|
103
|
+
}, t('lower_menu_divider')), React.createElement("input", {
|
|
104
|
+
type: "text",
|
|
105
|
+
className: "px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",
|
|
106
|
+
value: layoutValues.lowerMenuDividerName,
|
|
107
|
+
onChange: e => {
|
|
108
|
+
handleLayoutChange('lowerMenuDividerName', e.target.value);
|
|
109
|
+
}
|
|
110
|
+
})))));
|
|
111
|
+
}export{LayoutChange};//# sourceMappingURL=LayoutChange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutChange.js","sources":["../../../../src/components/SettingDrawer/components/LayoutChange.tsx"],"sourcesContent":[null],"names":[],"mappings":"qVAQM,SAAU,YAAY,CAAC,KAAiC,EAAA;AAC1D,EAAA,MAAA;IACA,QAAQ;AACR,IAAA,aAAQ;IACR,QAAM;AACN,IAAA,YAAQ;AACR,IAAA,gBAAgB,GAAG;MAEnB,KAAA;AACA,EAAA,MAAA;AAEQ,IAAA;AACA,GAAA,GAAA,cAAY,CAAA,UAAE,CAAA;AACd,EAAA,MAAA;AACA,IAAA;AAQA,GAAA,GAAA,aAAA,EAAA;AAQA,EAAA,MAAA,YAAA,GAAA,YAAsB,IAAA,QAClB,EAAA,QACA,IAAA,GAAA;QAOR;AAGJ,IAAA;AACI,GAAA,GAAA,QAAK,IAAA,EAAA;kBAAe,GAAO,QAAA,GAAA,QAAA,GAAA,SAAA;;AAE3B,EAAA,MAAA,YAAA,GAAc,OAAK,CAAA,OAAO;AAC9B,IAAA,WAAE,EAAA,eAAA,CAAA,QAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,IAAA,CAAA;AAEF,IAAA,sCAAmC,EAAK,cAAS,EAAO,gBAAa,EAAA,YAAA,EAAA,UAAA,EAAA,IAAA,CAAA;AAErE,IAAA,UACI,EAAA,eAAA,CAAA,QAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,CAAA;wBACI,EAAA,eAAK,CAAA,QAAU,EAAA,sBAAwB,EAAA,gBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,CAAA;AACnC,IAAA,qBAAA,EAAA,eAAG,CAAA,QAAU,EAAA,uBAAuB,EAC/B,gBAAgB,EACjB,YAAA,EAAA,UAAA,EAAA,WAAA,CAAA;wBACJ,EAAA,eAAK,CAAA,QAAS,EAAC,sBAAc,EAAA,gBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,OAAA;eAC7B,EAAA,gBAAC,EAAA,YACQ,EAAE,YAAY;QAI3B,kBAAA,GAAA,CAAA,GAAA,EAAA,KAAK,KAAA;AACD,IAAA,IAAA,CAAA,aAAA,EAAA;;iBAIA,CAAA,GAAA,EAAA,KAAA,CAAA;;AAMA,EAAA,MAAA,SAAA,GAAA;mBAGA,KAAA,MAAA,GAAA,OAAA,GAAK;;SAQR,KAAA,CAAA,aAAa,CAAA,KAAU,EACpB,IAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;aACI,EAAA;AACI,GAAA,EAAA,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA;aAIJ,EAAA,MAAA;;AAEQ,GAAA,EAAA,CAAA,CAAA,cAAA,CAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAO;AAGP,IAAA,SAAA,EAAA;gCAKQ,EAAA;AACJ,IAAA,KAAA,EAAA,YAAA,CAAA,WAEF;qBACN,IAAA,kBAAA,CAAA,aAAe,EAAA,OAAA;AACX,GAAA,CAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAGA,IAAA,SAAA,EAAA;4BAKQ,EAAA;AACJ,IAAA,SAAA,EAAA,MAAA;;AAIJ,GAAA,EAAA,CAAA,CAAA,eAAA,CAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAO,EAAA;AAGP,IAAA,SAAA,EAAA;gCAKQ,EAAA;AACJ,IAAA,KAAA,EAAA,YAAA,CAAA,YAO1B;AACN,IAAC,QAAA,EAAA,OAAA,IAAA,kBAAA,CAAA,cAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface MenuItem {
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
path: string;
|
|
6
|
+
position?: string;
|
|
7
|
+
children?: MenuItem[];
|
|
8
|
+
tab?: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
interface MenuVisibilitySettingsProps {
|
|
12
|
+
fullMenuData: MenuItem[];
|
|
13
|
+
settings: {
|
|
14
|
+
hiddenMenuKeys?: string[];
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
changeSetting: (key: string, value: any) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function MenuVisibilitySettings({ fullMenuData, settings, changeSetting }: MenuVisibilitySettingsProps): React.JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=MenuVisibilitySettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuVisibilitySettings.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/MenuVisibilitySettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,UAAU,QAAQ;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,UAAU,2BAA2B;IACjC,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,QAAQ,EAAE;QACN,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACtB,CAAC;IACF,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACpD;AA0DD,wBAAgB,sBAAsB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,2BAA2B,qBAqF5G"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import*as React from'react';import {useState,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';// all keys included now ['usermenu', 'topmenu']
|
|
2
|
+
const EXCLUDED_MENU_KEYS = [];
|
|
3
|
+
const MENU_POSITIONS = ['UPPER', 'MIDDLE', 'LOWER', 'BOTTOM'];
|
|
4
|
+
// Helper functions
|
|
5
|
+
function getDisplayName(item, t) {
|
|
6
|
+
if (item.tab) return item.tab;
|
|
7
|
+
if (item.name?.startsWith('menu.')) {
|
|
8
|
+
const parts = item.name.split('.');
|
|
9
|
+
return parts.length > 1 ? parts[parts.length - 1].charAt(0).toUpperCase() + parts[parts.length - 1].slice(1) : item.name;
|
|
10
|
+
}
|
|
11
|
+
return t(item.name) || item.name;
|
|
12
|
+
}
|
|
13
|
+
function toggleMenuItem(itemKey, hiddenMenuKeys, changeSetting) {
|
|
14
|
+
const uniqueKeys = new Set(hiddenMenuKeys);
|
|
15
|
+
uniqueKeys.has(itemKey) ? uniqueKeys.delete(itemKey) : uniqueKeys.add(itemKey);
|
|
16
|
+
changeSetting('hiddenMenuKeys', Array.from(uniqueKeys));
|
|
17
|
+
}
|
|
18
|
+
function renderMenuItems(items, indent, hiddenMenuKeys, getDisplayNameFn, toggleMenuItemFn) {
|
|
19
|
+
return items.map(item => {
|
|
20
|
+
const isVisible = !hiddenMenuKeys.includes(item.key);
|
|
21
|
+
const displayName = getDisplayNameFn(item);
|
|
22
|
+
return React.createElement("div", {
|
|
23
|
+
key: item.key
|
|
24
|
+
}, React.createElement("div", {
|
|
25
|
+
className: "flex items-center py-0.5"
|
|
26
|
+
}, React.createElement("input", {
|
|
27
|
+
type: "checkbox",
|
|
28
|
+
id: `menu-item-${item.key}`,
|
|
29
|
+
className: "mr-2 h-3 w-3 rounded border-gray-300 dark:border-gray-600 focus:ring-primary dark:focus:ring-primary bg-white dark:bg-gray-700 accent-primary",
|
|
30
|
+
checked: isVisible,
|
|
31
|
+
onChange: () => toggleMenuItemFn(item.key)
|
|
32
|
+
}), React.createElement("label", {
|
|
33
|
+
htmlFor: `menu-item-${item.key}`,
|
|
34
|
+
className: "text-xs text-black dark:text-white cursor-pointer flex-1",
|
|
35
|
+
style: {
|
|
36
|
+
paddingLeft: `${indent * 12}px`
|
|
37
|
+
}
|
|
38
|
+
}, displayName)), isVisible && item.children && item.children.length > 0 && React.createElement("div", {
|
|
39
|
+
className: "ml-6"
|
|
40
|
+
}, renderMenuItems(item.children, indent + 1, hiddenMenuKeys, getDisplayNameFn, toggleMenuItemFn)));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function MenuVisibilitySettings({
|
|
44
|
+
fullMenuData,
|
|
45
|
+
settings,
|
|
46
|
+
changeSetting
|
|
47
|
+
}) {
|
|
48
|
+
const {
|
|
49
|
+
t
|
|
50
|
+
} = useTranslation('settings');
|
|
51
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
52
|
+
// Get deduplicated hidden menu keys
|
|
53
|
+
const hiddenMenuKeys = useMemo(() => {
|
|
54
|
+
return settings.hiddenMenuKeys ? Array.from(new Set(settings.hiddenMenuKeys)) : [];
|
|
55
|
+
}, [settings.hiddenMenuKeys]);
|
|
56
|
+
// Organize menu items by position
|
|
57
|
+
const allMenuItems = useMemo(() => {
|
|
58
|
+
const categories = [];
|
|
59
|
+
if (fullMenuData?.length) {
|
|
60
|
+
MENU_POSITIONS.forEach(position => {
|
|
61
|
+
const positionItems = fullMenuData.filter(item => item.position === position && item.key && !EXCLUDED_MENU_KEYS.includes(item.key));
|
|
62
|
+
categories.push(...positionItems);
|
|
63
|
+
});
|
|
64
|
+
const itemsWithoutPosition = fullMenuData.filter(item => !item.position && item.key && !EXCLUDED_MENU_KEYS.includes(item.key));
|
|
65
|
+
categories.push(...itemsWithoutPosition);
|
|
66
|
+
}
|
|
67
|
+
return categories;
|
|
68
|
+
}, [fullMenuData]);
|
|
69
|
+
// Create bound functions with current dependencies
|
|
70
|
+
const boundGetDisplayName = useCallback(item => getDisplayName(item, t), [t]);
|
|
71
|
+
const boundToggleMenuItem = useCallback(itemKey => toggleMenuItem(itemKey, hiddenMenuKeys, changeSetting), [hiddenMenuKeys, changeSetting]);
|
|
72
|
+
// Memoize rendered menu items to prevent unnecessary JSX creation
|
|
73
|
+
const renderedMenuItems = useMemo(() => {
|
|
74
|
+
return renderMenuItems(allMenuItems, 0, hiddenMenuKeys, boundGetDisplayName, boundToggleMenuItem);
|
|
75
|
+
}, [allMenuItems, hiddenMenuKeys, boundGetDisplayName, boundToggleMenuItem]);
|
|
76
|
+
return React.createElement("div", {
|
|
77
|
+
className: "space-y-4"
|
|
78
|
+
}, React.createElement("div", {
|
|
79
|
+
className: "flex items-center mb-2"
|
|
80
|
+
}, React.createElement("button", {
|
|
81
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
82
|
+
className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200"
|
|
83
|
+
}, React.createElement("svg", {
|
|
84
|
+
className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isExpanded ? 'rotate-180' : ''}`,
|
|
85
|
+
fill: "none",
|
|
86
|
+
stroke: "currentColor",
|
|
87
|
+
viewBox: "0 0 24 24"
|
|
88
|
+
}, React.createElement("path", {
|
|
89
|
+
strokeLinecap: "round",
|
|
90
|
+
strokeLinejoin: "round",
|
|
91
|
+
strokeWidth: 2,
|
|
92
|
+
d: "M19 9l-7 7-7-7"
|
|
93
|
+
})), React.createElement("p", {
|
|
94
|
+
className: "text-md font-medium text-black dark:text-white"
|
|
95
|
+
}, t('menu_visibility.title') || 'Menu Visibility'))), React.createElement("div", {
|
|
96
|
+
className: `grid transition-all duration-300 ease-in-out ${isExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`
|
|
97
|
+
}, React.createElement("div", {
|
|
98
|
+
className: "overflow-hidden"
|
|
99
|
+
}, React.createElement("div", {
|
|
100
|
+
className: "ml-4 mb-4 border-l-2 border-gray-200 dark:border-gray-600 pl-4"
|
|
101
|
+
}, React.createElement("div", {
|
|
102
|
+
className: "space-y-2"
|
|
103
|
+
}, allMenuItems.length === 0 ? React.createElement("div", {
|
|
104
|
+
className: "text-center text-gray-500 dark:text-gray-400 py-4"
|
|
105
|
+
}, t('menu_visibility.no_items') || 'No menu items found') : renderedMenuItems)))));
|
|
106
|
+
}export{MenuVisibilitySettings};//# sourceMappingURL=MenuVisibilitySettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuVisibilitySettings.js","sources":["../../../../src/components/SettingDrawer/components/MenuVisibilitySettings.tsx"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NavMenuSelectorProps } from '../utils/types';
|
|
3
|
+
export declare function NavigationModes({ changeSetting, settings, location, routePattern, applyToAllRoutes, }: NavMenuSelectorProps): React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=NavigationsModes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationsModes.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/NavigationsModes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAkFtD,wBAAgB,eAAe,CAAC,EAC5B,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,gBAAwB,GAC3B,EAAE,oBAAoB,qBA+FtB"}
|