@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,392 +1,213 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const updateTheme = (dark, color, publicPath = '/theme') => {
|
|
3
|
-
// ssr
|
|
4
|
-
if (typeof window === 'undefined' || !window.umi_plugin_ant_themeVar) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
const href = dark ? `${publicPath}/dark` : `${publicPath}/`;
|
|
8
|
-
// If it is DARK, and is color = daybreak, there is no need to splice
|
|
9
|
-
let colorFileName = dark && color ? `-${encodeURIComponent(color)}` : encodeURIComponent(color || '');
|
|
10
|
-
if (color === 'daybreak' && dark) {
|
|
11
|
-
colorFileName = '';
|
|
12
|
-
}
|
|
13
|
-
const dom = document.getElementById('theme-style');
|
|
14
|
-
// If these two are empty
|
|
15
|
-
if (!href && !colorFileName) {
|
|
16
|
-
if (dom) {
|
|
17
|
-
dom.remove();
|
|
18
|
-
localStorage.removeItem('site-theme');
|
|
19
|
-
}
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const url = `${href}${colorFileName || ''}.css`;
|
|
23
|
-
if (dom) {
|
|
24
|
-
dom.onload = () => {
|
|
25
|
-
window.setTimeout(() => {});
|
|
26
|
-
};
|
|
27
|
-
dom.href = url;
|
|
28
|
-
} else {
|
|
29
|
-
const style = document.createElement('link');
|
|
30
|
-
style.type = 'text/css';
|
|
31
|
-
style.rel = 'stylesheet';
|
|
32
|
-
style.id = 'theme-style';
|
|
33
|
-
style.onload = () => {
|
|
34
|
-
window.setTimeout(() => {});
|
|
35
|
-
};
|
|
36
|
-
style.href = url;
|
|
37
|
-
if (document.body.append) {
|
|
38
|
-
document.body.append(style);
|
|
39
|
-
} else {
|
|
40
|
-
document.body.appendChild(style);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// localStorage.setItem('site-theme', dark ? 'dark' : 'light');
|
|
44
|
-
};
|
|
45
|
-
const initState = (settings, onSettingChange, publicPath) => {
|
|
46
|
-
if (!isBrowser()) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
let loadedStyle = false;
|
|
50
|
-
if (window.location.search) {
|
|
51
|
-
const params = parse(window.location.search.replace('?', ''));
|
|
52
|
-
const replaceSetting = {};
|
|
53
|
-
Object.keys(params).forEach(key => {
|
|
54
|
-
if (defaultSettings[key] || defaultSettings[key] === undefined) {
|
|
55
|
-
replaceSetting[key] = params[key];
|
|
56
|
-
if (key.includes('Render')) {
|
|
57
|
-
replaceSetting[key] = params[key] === 'false' ? false : undefined;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
if (onSettingChange) {
|
|
62
|
-
onSettingChange({
|
|
63
|
-
...settings,
|
|
64
|
-
...replaceSetting
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
// Set the topic in the URL and load it once.
|
|
68
|
-
if (oldSetting.navTheme !== params.navTheme && params.navTheme) {
|
|
69
|
-
updateTheme(settings.navTheme === 'realDark', params.primaryColor, publicPath);
|
|
70
|
-
loadedStyle = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (loadedStyle) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
// If there is no topic in the URL, and no load in the URL is loaded.
|
|
77
|
-
if (defaultSettings.navTheme !== settings.navTheme && settings.navTheme) {
|
|
78
|
-
updateTheme(settings.navTheme === 'realDark', settings.primaryColor, publicPath);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const getParamsFromUrl = settings => {
|
|
82
|
-
if (!isBrowser()) {
|
|
83
|
-
return defaultSettings;
|
|
84
|
-
}
|
|
85
|
-
// The first time I entered the browser parameters synchronized.
|
|
86
|
-
let params = {};
|
|
87
|
-
if (window.location.search) {
|
|
88
|
-
params = parse(window.location.search.replace('?', ''));
|
|
89
|
-
}
|
|
90
|
-
Object.keys(params).forEach(key => {
|
|
91
|
-
if (params[key] === 'true') {
|
|
92
|
-
params[key] = true;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
...defaultSettings,
|
|
97
|
-
...(settings || {}),
|
|
98
|
-
...params
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
const getThemeList = settings => {
|
|
1
|
+
import {useSelector}from'@xstate/react';import clsx from'clsx';import*as React from'react';import {useRef,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';import {icons}from'../../icons.js';import isBrowser from'../../utils/isBrowser/index.js';import {getDefaultApplyToAllRoutes,getSettingValue}from'../../utils/settingsUtils.js';import'@common-stack/components-pro';import {AdditionalSettingsSlot}from'../Layout/slot-fill/AdditionalSettings.js';import'reflect-metadata';import'@admin-layout/client/lib/constants/layout.js';import {ApplyToAllRoutesToggle}from'./components/ApplyToAllRoutesToggle.js';import {CheckBoxTheme}from'./components/CheckBoxTheme.js';import {DeviceTabs}from'./components/DeviceTabs.js';import {InvitationSettings}from'./components/InvitationSettings.js';import {LayoutChange}from'./components/LayoutChange.js';import {MenuVisibilitySettings}from'./components/MenuVisibilitySettings.js';import {NavigationModes}from'./components/NavigationsModes.js';import {RegionalSettings}from'./components/RegionalSettings.js';import {SettingsActions}from'./components/SettingsActions.js';import {SettingsDrawerHeader}from'./components/SettingsDrawerHeader.js';import {ThemeColor}from'./components/ThemeColor.js';import {ThemeSelector}from'./components/ThemeSelector.js';import {WebFontsSelector}from'./components/WebFontsSelector.js';import {useSettingsOperations}from'./hooks/useSettingsOperations.js';import {THEME_OPTIONS,FONT_OPTIONS}from'./utils/constants.js';import {useThemeList,parseSettingPath}from'./utils/helper.js';function SettingDrawer(props) {
|
|
102
2
|
const {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
let list = [];
|
|
106
|
-
const defaultList = [
|
|
107
|
-
//@sri following are needed otherwise we need make above plugin to work
|
|
108
|
-
{
|
|
109
|
-
key: 'dust',
|
|
110
|
-
fileName: 'dust.css',
|
|
111
|
-
modifyVars: {
|
|
112
|
-
'@primary-color': '#F5222D'
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
key: 'volcano',
|
|
116
|
-
fileName: 'volcano.css',
|
|
117
|
-
modifyVars: {
|
|
118
|
-
'@primary-color': '#FA541C'
|
|
119
|
-
}
|
|
120
|
-
}, {
|
|
121
|
-
key: 'sunset',
|
|
122
|
-
fileName: 'sunset.css',
|
|
123
|
-
modifyVars: {
|
|
124
|
-
'@primary-color': '#FAAD14'
|
|
125
|
-
}
|
|
126
|
-
}, {
|
|
127
|
-
key: 'cyan',
|
|
128
|
-
fileName: 'cyan.css',
|
|
129
|
-
modifyVars: {
|
|
130
|
-
'@primary-color': '#13C2C2'
|
|
131
|
-
}
|
|
132
|
-
}, {
|
|
133
|
-
key: 'green',
|
|
134
|
-
fileName: 'green.css',
|
|
135
|
-
modifyVars: {
|
|
136
|
-
'@primary-color': '#52C41A'
|
|
137
|
-
}
|
|
138
|
-
}, {
|
|
139
|
-
key: 'geekblue',
|
|
140
|
-
fileName: 'geekblue.css',
|
|
141
|
-
modifyVars: {
|
|
142
|
-
'@primary-color': '#2F54EB'
|
|
143
|
-
}
|
|
144
|
-
}, {
|
|
145
|
-
key: 'purple',
|
|
146
|
-
fileName: 'purple.css',
|
|
147
|
-
modifyVars: {
|
|
148
|
-
'@primary-color': '#722ED1'
|
|
149
|
-
}
|
|
150
|
-
}];
|
|
151
|
-
// ssr
|
|
152
|
-
if (typeof window === 'undefined') {
|
|
153
|
-
list = defaultList;
|
|
154
|
-
} else {
|
|
155
|
-
list = window.umi_plugin_ant_themeVar || defaultList;
|
|
156
|
-
}
|
|
157
|
-
const themeList = [{
|
|
158
|
-
key: 'light',
|
|
159
|
-
title: t('light')
|
|
160
|
-
}];
|
|
161
|
-
const darkColorList = [{
|
|
162
|
-
key: 'daybreak',
|
|
163
|
-
color: '#1890ff',
|
|
164
|
-
theme: 'dark'
|
|
165
|
-
}];
|
|
166
|
-
const lightColorList = [{
|
|
167
|
-
key: 'daybreak',
|
|
168
|
-
color: '#1890ff',
|
|
169
|
-
theme: 'dark'
|
|
170
|
-
}];
|
|
171
|
-
if (settings.layout !== 'mix') {
|
|
172
|
-
themeList.push({
|
|
173
|
-
key: 'dark',
|
|
174
|
-
title: t('dark')
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
if (list.find(item => item.theme === 'dark')) {
|
|
178
|
-
themeList.push({
|
|
179
|
-
key: 'realDark',
|
|
180
|
-
title: t('dark')
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
// insert theme color List
|
|
184
|
-
list.forEach(item => {
|
|
185
|
-
const color = (item.modifyVars || {})['@primary-color'];
|
|
186
|
-
if (item.theme === 'dark' && color) {
|
|
187
|
-
darkColorList.push({
|
|
188
|
-
color,
|
|
189
|
-
...item
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
if (!item.theme || item.theme === 'light') {
|
|
193
|
-
lightColorList.push({
|
|
194
|
-
color,
|
|
195
|
-
...item
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
return {
|
|
200
|
-
colorList: {
|
|
201
|
-
dark: darkColorList,
|
|
202
|
-
light: lightColorList
|
|
203
|
-
},
|
|
204
|
-
themeList
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
const SettingDrawer = props => {
|
|
208
|
-
let {
|
|
3
|
+
actor,
|
|
4
|
+
colorList,
|
|
209
5
|
navTheme,
|
|
210
|
-
|
|
211
|
-
|
|
6
|
+
pathname,
|
|
7
|
+
location,
|
|
8
|
+
fullMenuData,
|
|
9
|
+
routePattern
|
|
212
10
|
} = props;
|
|
213
|
-
const
|
|
11
|
+
const {
|
|
12
|
+
CloseIcon,
|
|
13
|
+
Settings5FillIcon
|
|
14
|
+
} = icons;
|
|
15
|
+
// Refs
|
|
16
|
+
const btnRef = useRef();
|
|
17
|
+
// Hooks
|
|
18
|
+
const {
|
|
19
|
+
isMobile
|
|
20
|
+
} = useMediaQuery();
|
|
214
21
|
const {
|
|
215
22
|
t
|
|
216
23
|
} = useTranslation('settings');
|
|
217
|
-
|
|
218
|
-
const [
|
|
219
|
-
|
|
220
|
-
|
|
24
|
+
// State
|
|
25
|
+
const [show, setShow] = useState(false);
|
|
26
|
+
const [activeDeviceTab, setActiveDeviceTab] = useState(isMobile ? 'mobile' : 'desktop');
|
|
27
|
+
const [applyToAllRoutes, setApplyToAllRoutes] = useState(false);
|
|
28
|
+
// Selectors - guard actor so that useSelector isn't called with undefined/invalid actor
|
|
29
|
+
const settingState = actor ? useSelector(actor, state => state.context.public) : {};
|
|
30
|
+
const changedSettings = actor ? useSelector(actor, state => state.context.internal.changedSettings) : {};
|
|
31
|
+
// Custom hooks
|
|
32
|
+
const {
|
|
33
|
+
copied,
|
|
34
|
+
copiedModified,
|
|
35
|
+
handleCopySettings,
|
|
36
|
+
handleCopyModifiedSettings,
|
|
37
|
+
handleSaveSettings,
|
|
38
|
+
handleResetSettings
|
|
39
|
+
} = useSettingsOperations({
|
|
40
|
+
actor,
|
|
41
|
+
settingState,
|
|
42
|
+
changedSettings
|
|
221
43
|
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
if (key === 'navTheme') {
|
|
234
|
-
updateTheme(value === 'realDark', undefined);
|
|
235
|
-
nextState.primaryColor = value;
|
|
236
|
-
}
|
|
237
|
-
if (key === 'primaryColor') {
|
|
238
|
-
updateTheme(nextState.navTheme === 'realDark', value === 'daybreak' ? '' : value);
|
|
239
|
-
}
|
|
240
|
-
if (key === 'layout') {
|
|
241
|
-
nextState.contentWidth = value === 'top' ? 'Fixed' : 'Fluid';
|
|
242
|
-
}
|
|
243
|
-
if (key === 'layout' && value !== 'mix') {
|
|
244
|
-
nextState.splitMenus = false;
|
|
245
|
-
}
|
|
246
|
-
if (key === 'layout' && value === 'mix') {
|
|
247
|
-
nextState.navTheme = 'light';
|
|
248
|
-
}
|
|
249
|
-
if (key === 'colorWeak' && value === true) {
|
|
250
|
-
const dom = document.querySelector('body');
|
|
251
|
-
if (dom) {
|
|
252
|
-
dom.dataset.prosettingdrawer = dom.style.filter;
|
|
253
|
-
dom.style.filter = 'invert(80%)';
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (key === 'colorWeak' && value === false) {
|
|
257
|
-
const dom = document.querySelector('body');
|
|
258
|
-
if (dom) {
|
|
259
|
-
dom.style.filter = dom.dataset.prosettingdrawer || 'none';
|
|
260
|
-
delete dom.dataset.prosettingdrawer;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
setSettingState(nextState);
|
|
264
|
-
};
|
|
44
|
+
// Computed values
|
|
45
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
46
|
+
const deviceType = activeDeviceTab;
|
|
47
|
+
const currentPathname = isBrowser() ? window.location.pathname : pathname || '';
|
|
48
|
+
const themeList = useThemeList(settingState, location, routePattern);
|
|
49
|
+
// Derived state
|
|
50
|
+
const defaultApplyToAllRoutes = React.useMemo(() => {
|
|
51
|
+
return getDefaultApplyToAllRoutes(settingState, currentRoute, deviceType);
|
|
52
|
+
}, [settingState, currentRoute, deviceType]);
|
|
53
|
+
const settingsForComponents = settingState;
|
|
54
|
+
// Effects
|
|
265
55
|
useEffect(() => {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
56
|
+
setApplyToAllRoutes(defaultApplyToAllRoutes);
|
|
57
|
+
}, [defaultApplyToAllRoutes]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
setActiveDeviceTab(isMobile ? 'mobile' : 'desktop');
|
|
60
|
+
}, [isMobile]);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (actor) {
|
|
63
|
+
actor.send({
|
|
64
|
+
type: 'UISETTING_UPDATE_DEVICE_TYPE',
|
|
65
|
+
deviceType: activeDeviceTab
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, [activeDeviceTab, actor]);
|
|
69
|
+
// Helper func
|
|
70
|
+
function handleSettingChange(key, value) {
|
|
71
|
+
const isGlobalSetting = key === 'hiddenMenuKeys' || key === 'hiddenMenuCategories' || key === 'applyToAllRoutes' || key === 'fixedHeader' || key === 'fixedSidebar' || key === 'splitMenus' || key === 'upperMenuDividerName' || key === 'middleMenuDividerName' || key === 'lowerMenuDividerName';
|
|
72
|
+
if (isGlobalSetting) {
|
|
73
|
+
actor.send({
|
|
74
|
+
type: 'UISETTING_UPDATE',
|
|
75
|
+
value: {
|
|
76
|
+
[key]: value
|
|
276
77
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
showSettingPanel: process.env.NODE_ENV !== 'production'
|
|
280
|
-
};
|
|
281
|
-
setSettingState(nextState);
|
|
282
|
-
}
|
|
78
|
+
});
|
|
79
|
+
return;
|
|
283
80
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
81
|
+
const bracketKey = applyToAllRoutes ? `[${deviceType}]` : `[${currentRoute}][${deviceType}]`;
|
|
82
|
+
const settingObject = parseSettingPath(key, value);
|
|
83
|
+
const nestedValue = {
|
|
84
|
+
[bracketKey]: settingObject
|
|
85
|
+
};
|
|
86
|
+
actor.send({
|
|
87
|
+
type: 'UISETTING_UPDATE',
|
|
88
|
+
value: nestedValue
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function getThemeValue() {
|
|
92
|
+
return getSettingValue(settingState, 'theme', applyToAllRoutes, currentRoute, deviceType, 'default');
|
|
93
|
+
}
|
|
94
|
+
function getFontFamilyValue() {
|
|
95
|
+
return getSettingValue(settingState, 'fontFamily', applyToAllRoutes, currentRoute, deviceType, 'Poppins, sans-serif');
|
|
96
|
+
}
|
|
97
|
+
return React.createElement(React.Fragment, null, settingState?.showSettingPanel && React.createElement(React.Fragment, null, React.createElement("button", {
|
|
98
|
+
ref: btnRef,
|
|
99
|
+
onClick: () => setShow(!show),
|
|
100
|
+
style: {
|
|
101
|
+
backgroundColor: settingState?.primaryColor,
|
|
102
|
+
display: 'flex',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
justifyContent: 'center'
|
|
105
|
+
},
|
|
106
|
+
className: `fixed top-24 right-0 z-50 border-none cursor-pointer transition duration-500 w-12 h-12 rounded-l-lg hover:bg-opacity-80 ${show ? 'mr-[20rem]' : 'mr-0'}`
|
|
107
|
+
}, !show ? React.createElement(Settings5FillIcon, {
|
|
108
|
+
fontSize: '32px',
|
|
109
|
+
className: "text-white"
|
|
110
|
+
}) : React.createElement(CloseIcon, {
|
|
111
|
+
className: "text-white",
|
|
112
|
+
fontSize: '36px'
|
|
113
|
+
})), React.createElement("div", {
|
|
114
|
+
className: clsx('fixed right-0 top-0 w-[20rem] transition-all duration-500 overflow-hidden overflow-y-auto z-50 p-4 min-h-full max-h-full', 'bg-white dark:bg-[#1f1f1f]', show ? 'opacity-100 visible' : 'w-0 opacity-0 invisible', 'shadow-lg')
|
|
115
|
+
}, React.createElement(SettingsDrawerHeader, {
|
|
116
|
+
onClose: () => setShow(false)
|
|
117
|
+
}), React.createElement("div", {
|
|
118
|
+
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]"
|
|
119
|
+
}, React.createElement(MenuVisibilitySettings, {
|
|
120
|
+
fullMenuData: fullMenuData,
|
|
121
|
+
settings: settingState,
|
|
122
|
+
changeSetting: handleSettingChange
|
|
123
|
+
}), React.createElement(ApplyToAllRoutesToggle, {
|
|
124
|
+
checked: applyToAllRoutes,
|
|
125
|
+
onChange: setApplyToAllRoutes
|
|
126
|
+
}), React.createElement(DeviceTabs, {
|
|
127
|
+
activeTab: activeDeviceTab,
|
|
128
|
+
onTabChange: setActiveDeviceTab
|
|
129
|
+
})), React.createElement("div", {
|
|
130
|
+
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]"
|
|
131
|
+
}, React.createElement("p", {
|
|
132
|
+
className: "text-black dark:text-white"
|
|
133
|
+
}, t('page_style_settings')), React.createElement("div", null, React.createElement(CheckBoxTheme, {
|
|
134
|
+
list: themeList.themeList,
|
|
135
|
+
changeSetting: handleSettingChange,
|
|
136
|
+
settings: settingsForComponents,
|
|
137
|
+
location: location,
|
|
138
|
+
applyToAllRoutes: applyToAllRoutes
|
|
139
|
+
})), React.createElement("div", {
|
|
140
|
+
className: "mt-8"
|
|
141
|
+
}, React.createElement("p", {
|
|
142
|
+
className: "text-black dark:text-white"
|
|
143
|
+
}, t('Select Theme')), React.createElement(ThemeSelector, {
|
|
144
|
+
value: getThemeValue(),
|
|
145
|
+
onChange: value => handleSettingChange('theme', value),
|
|
146
|
+
options: THEME_OPTIONS
|
|
147
|
+
})), React.createElement("div", {
|
|
148
|
+
className: "mt-8 dark:border-[#2a2b2a]"
|
|
149
|
+
}, React.createElement("p", {
|
|
150
|
+
className: "mb-2 text-black dark:text-white"
|
|
151
|
+
}, t('theme_color')), React.createElement(ThemeColor, {
|
|
152
|
+
color: colorList || themeList.colorList[navTheme === 'realDark' ? 'dark' : 'light'],
|
|
153
|
+
changeSetting: handleSettingChange,
|
|
154
|
+
settings: settingsForComponents,
|
|
155
|
+
location: location,
|
|
156
|
+
routePattern: routePattern,
|
|
157
|
+
applyToAllRoutes: applyToAllRoutes
|
|
158
|
+
})), React.createElement("div", {
|
|
159
|
+
className: "mt-8"
|
|
160
|
+
}, React.createElement("p", {
|
|
161
|
+
className: "text-black dark:text-white"
|
|
162
|
+
}, t('Font Family')), React.createElement(WebFontsSelector, {
|
|
163
|
+
value: getFontFamilyValue(),
|
|
164
|
+
onChange: value => handleSettingChange('fontFamily', value),
|
|
165
|
+
options: FONT_OPTIONS
|
|
166
|
+
}))), React.createElement("div", {
|
|
167
|
+
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]"
|
|
168
|
+
}, React.createElement(NavigationModes, {
|
|
169
|
+
settings: settingsForComponents,
|
|
170
|
+
changeSetting: handleSettingChange,
|
|
171
|
+
applyToAllRoutes: applyToAllRoutes,
|
|
172
|
+
location: location,
|
|
173
|
+
routePattern: routePattern
|
|
174
|
+
}), React.createElement("div", {
|
|
175
|
+
className: "mt-8"
|
|
176
|
+
}, React.createElement(LayoutChange, {
|
|
177
|
+
settings: settingsForComponents,
|
|
178
|
+
changeSetting: handleSettingChange,
|
|
179
|
+
applyToAllRoutes: applyToAllRoutes,
|
|
180
|
+
location: location,
|
|
181
|
+
routePattern: routePattern
|
|
182
|
+
})), React.createElement("div", {
|
|
183
|
+
className: "mt-8"
|
|
184
|
+
}, React.createElement(InvitationSettings, {
|
|
185
|
+
settings: settingsForComponents,
|
|
186
|
+
changeSetting: handleSettingChange,
|
|
187
|
+
location: location,
|
|
188
|
+
routePattern: routePattern,
|
|
189
|
+
applyToAllRoutes: applyToAllRoutes
|
|
190
|
+
}))), React.createElement("div", {
|
|
191
|
+
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]"
|
|
192
|
+
}, React.createElement(RegionalSettings, {
|
|
193
|
+
settings: settingsForComponents,
|
|
194
|
+
changeSetting: handleSettingChange,
|
|
195
|
+
applyToAllRoutes: applyToAllRoutes,
|
|
196
|
+
location: location,
|
|
197
|
+
routePattern: routePattern
|
|
198
|
+
})), React.createElement("div", {
|
|
199
|
+
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]"
|
|
200
|
+
}, React.createElement(AdditionalSettingsSlot, {
|
|
201
|
+
settings: settingsForComponents,
|
|
202
|
+
onSettingsChange: handleSettingChange,
|
|
203
|
+
pathname: currentPathname
|
|
204
|
+
})), React.createElement(SettingsActions, {
|
|
205
|
+
hasChanges: changedSettings && Object.keys(changedSettings).length > 0,
|
|
206
|
+
copied: copied,
|
|
207
|
+
copiedModified: copiedModified,
|
|
208
|
+
onSave: handleSaveSettings,
|
|
209
|
+
onCopyAll: handleCopySettings,
|
|
210
|
+
onCopyModified: handleCopyModifiedSettings,
|
|
211
|
+
onReset: handleResetSettings
|
|
212
|
+
}))));
|
|
213
|
+
}export{SettingDrawer};//# sourceMappingURL=SettingDrawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingDrawer.js","sources":["../../../src/components/SettingDrawer/SettingDrawer.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"SettingDrawer.js","sources":["../../../src/components/SettingDrawer/SettingDrawer.tsx"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ApplyToAllRoutesToggleProps {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onChange: (checked: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function ApplyToAllRoutesToggle({ checked, onChange }: ApplyToAllRoutesToggleProps): React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ApplyToAllRoutesToggle.d.ts.map
|