@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,20 @@
|
|
|
1
|
+
import*as React from'react';function Switch({
|
|
2
|
+
value = false,
|
|
3
|
+
onChange,
|
|
4
|
+
className = ''
|
|
5
|
+
}) {
|
|
6
|
+
const handleClick = () => {
|
|
7
|
+
onChange?.(!value);
|
|
8
|
+
};
|
|
9
|
+
return React.createElement("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
role: "switch",
|
|
12
|
+
"aria-checked": value,
|
|
13
|
+
className: `relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 ${value ? 'bg-indigo-600' : 'bg-gray-200'} ${className}`,
|
|
14
|
+
onClick: handleClick
|
|
15
|
+
}, React.createElement("span", {
|
|
16
|
+
className: "sr-only"
|
|
17
|
+
}, "Toggle switch"), React.createElement("span", {
|
|
18
|
+
className: `inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${value ? 'translate-x-6' : 'translate-x-1'}`
|
|
19
|
+
}));
|
|
20
|
+
}export{Switch};//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../../../src/components/SettingDrawer/components/Switch.tsx"],"sourcesContent":[null],"names":[],"mappings":"4BAGM,SAAU,MAAM,CAAC;OACnB,GAAM,KAAA;AACF,EAAA,QAAA;AACJ,EAAA,SAAE,GAAA;AAEF,CAAA,EAAA;QAUQ,WAAA,GAAA,MAAA;AACA,IAAA,QAAA,GAAA,CAAA,KAAA,CAAA;AAOZ,EAAC,CAAA;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeColor.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/ThemeColor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,qBAgDjD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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';function ThemeColor(props) {
|
|
2
|
+
const {
|
|
3
|
+
color,
|
|
4
|
+
changeSetting,
|
|
5
|
+
settings,
|
|
6
|
+
location,
|
|
7
|
+
routePattern,
|
|
8
|
+
applyToAllRoutes = false
|
|
9
|
+
} = props;
|
|
10
|
+
const {
|
|
11
|
+
isMobile
|
|
12
|
+
} = useMediaQuery();
|
|
13
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
14
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
15
|
+
// Use getSettingValue to get the correct primaryColor based on applyToAllRoutes
|
|
16
|
+
const getPrimaryColorValue = () => {
|
|
17
|
+
return getSettingValue(settings, 'primaryColor', applyToAllRoutes, currentRoute, deviceType, '#1890ff');
|
|
18
|
+
};
|
|
19
|
+
if (!color || color.length < 1) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return React.createElement("div", {
|
|
23
|
+
className: "flex flex-row space-x-2"
|
|
24
|
+
}, color.map((item, index) => {
|
|
25
|
+
return React.createElement("div", {
|
|
26
|
+
key: index,
|
|
27
|
+
className: "w-5 h-5 rounded cursor-pointer shadow-sm pl-1 flex items-center justify-center",
|
|
28
|
+
style: {
|
|
29
|
+
backgroundColor: item.color
|
|
30
|
+
},
|
|
31
|
+
onClick: () => {
|
|
32
|
+
changeSetting('primaryColor', item.color);
|
|
33
|
+
}
|
|
34
|
+
}, getPrimaryColorValue() === item.color ? React.createElement("svg", {
|
|
35
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
+
className: "h-4 w-4 text-white mb-1",
|
|
37
|
+
viewBox: "0 0 20 20",
|
|
38
|
+
fill: "currentColor"
|
|
39
|
+
}, React.createElement("path", {
|
|
40
|
+
fillRule: "evenodd",
|
|
41
|
+
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
42
|
+
clipRule: "evenodd"
|
|
43
|
+
})) : '');
|
|
44
|
+
}));
|
|
45
|
+
}export{ThemeColor};//# sourceMappingURL=ThemeColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeColor.js","sources":["../../../../src/components/SettingDrawer/components/ThemeColor.tsx"],"sourcesContent":[null],"names":[],"mappings":"6OAKM,SAAU,UAAU,CAAC,KAAuB,EAAA;AAC9C,EAAA,MAAA;AACA,IAAA,KAAA;IACA,aAAM;IACN,QAAM;IAEN,QAAA;IACA,YAAM;AACF,IAAA,gBAAO,GAAA;AACX,GAAA,GAAE,KAAA;QAEE;AACA,IAAA;MACH,aAAA,EAAA;AAED,EAAA,MAAA,YACI,GAAA,YAAA,IAAA,QAAK,EAAA;QAEG;AAMY;4BAGH,GAAA,MAAoB;0BAOb,CAAA,QAAA,EAAA,gBACa,gBACP,EAAA,YAAA,EAAA,UAAA,EAAA,SAAA,CAAA;;AAYtC,EAAC,IAAA,CAAA,KAAA,IAAA,KAAA,CAAA,MAAA,GAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/ThemeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,kBAAkB,qBAgB7E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import*as React from'react';function ThemeSelector({
|
|
2
|
+
value,
|
|
3
|
+
onChange,
|
|
4
|
+
options
|
|
5
|
+
}) {
|
|
6
|
+
return React.createElement("div", {
|
|
7
|
+
className: "relative"
|
|
8
|
+
}, React.createElement("select", {
|
|
9
|
+
value: value,
|
|
10
|
+
onChange: e => onChange(e.target.value),
|
|
11
|
+
className: "w-full rounded-md border border-gray-300 bg-white py-2 pl-3 pr-10 text-left shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-200"
|
|
12
|
+
}, options.map(option => React.createElement("option", {
|
|
13
|
+
key: option.key,
|
|
14
|
+
value: option.key
|
|
15
|
+
}, option.title))));
|
|
16
|
+
}export{ThemeSelector};//# sourceMappingURL=ThemeSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeSelector.js","sources":["../../../../src/components/SettingDrawer/components/ThemeSelector.tsx"],"sourcesContent":[null],"names":[],"mappings":"4BAGM,SAAU,aAAa,CAAC;AAC1B,EAAA,KAAA;UAEQ;AAaZ,EAAC;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebFontsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/components/WebFontsSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAiB5D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import*as React from'react';const WebFontsSelector = ({
|
|
2
|
+
value,
|
|
3
|
+
onChange,
|
|
4
|
+
options
|
|
5
|
+
}) => {
|
|
6
|
+
return React.createElement("div", {
|
|
7
|
+
className: "relative"
|
|
8
|
+
}, React.createElement("select", {
|
|
9
|
+
value: value,
|
|
10
|
+
onChange: e => onChange(e.target.value),
|
|
11
|
+
className: "w-full rounded-md border border-gray-300 bg-white py-2 pl-3 pr-10 text-left shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-200",
|
|
12
|
+
style: {
|
|
13
|
+
fontFamily: value
|
|
14
|
+
}
|
|
15
|
+
}, options.map(option => React.createElement("option", {
|
|
16
|
+
key: option.key,
|
|
17
|
+
value: option.key,
|
|
18
|
+
style: {
|
|
19
|
+
fontFamily: option.key
|
|
20
|
+
}
|
|
21
|
+
}, option.title))));
|
|
22
|
+
};export{WebFontsSelector};//# sourceMappingURL=WebFontsSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebFontsSelector.js","sources":["../../../../src/components/SettingDrawer/components/WebFontsSelector.tsx"],"sourcesContent":[null],"names":[],"mappings":"4BAGO,MAAM,gBAAgB,GAAoC,CAAC;AAC9D,EAAA,KAAA;AAEQ,EAAA,QAAA;AAcZ,EAAE;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface UseSettingsOperationsProps {
|
|
2
|
+
actor: any;
|
|
3
|
+
settingState: any;
|
|
4
|
+
changedSettings: any;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Custom hook to handle all settings operations (save, reset, copy)
|
|
8
|
+
*/
|
|
9
|
+
export declare function useSettingsOperations({ actor, settingState, changedSettings }: UseSettingsOperationsProps): {
|
|
10
|
+
copied: boolean;
|
|
11
|
+
copiedModified: boolean;
|
|
12
|
+
handleCopySettings: () => Promise<void>;
|
|
13
|
+
handleCopyModifiedSettings: () => Promise<void>;
|
|
14
|
+
handleSaveSettings: () => Promise<void>;
|
|
15
|
+
handleResetSettings: () => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useSettingsOperations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSettingsOperations.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/hooks/useSettingsOperations.ts"],"names":[],"mappings":"AASA,UAAU,0BAA0B;IAChC,KAAK,EAAE,GAAG,CAAC;IACX,YAAY,EAAE,GAAG,CAAC;IAClB,eAAe,EAAE,GAAG,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,0BAA0B;;;;;;;EA8HzG"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import {useState}from'react';import {useWriteSettingsMutation,useResetApplicationUiSettingsMutation}from'common/lib/generated/generated.js';import {ConfigCollectionName,ConfigFragmentName}from'common/lib/generated/generated-models.js';import {generateCdecodeUri,DEFAULT_CONTRIBUTION_TENANT_ID}from'@adminide-stack/core';import {config}from'../../../config/env-config.js';import isBrowser from'../../../utils/isBrowser/index.js';import {clearSettingsCookies,transformSettingsForBackend,getCookieSettings}from'../utils/transformers.js';import {RESET_CONFIRMATION_MESSAGE,COPY_TIMEOUT_MS}from'../utils/constants.js';/**
|
|
2
|
+
* Custom hook to handle all settings operations (save, reset, copy)
|
|
3
|
+
*/
|
|
4
|
+
function useSettingsOperations({
|
|
5
|
+
actor,
|
|
6
|
+
settingState,
|
|
7
|
+
changedSettings
|
|
8
|
+
}) {
|
|
9
|
+
const [copied, setCopied] = useState(false);
|
|
10
|
+
const [copiedModified, setCopiedModified] = useState(false);
|
|
11
|
+
// Mutations
|
|
12
|
+
const [writeSettingsMutation] = useWriteSettingsMutation();
|
|
13
|
+
const [resetApplicationSettings] = useResetApplicationUiSettingsMutation();
|
|
14
|
+
// Generate resource URI for API calls
|
|
15
|
+
const resource = generateCdecodeUri(DEFAULT_CONTRIBUTION_TENANT_ID, {
|
|
16
|
+
resourceType: ConfigCollectionName.Applications,
|
|
17
|
+
resourceId: config.APPLICATION_ID,
|
|
18
|
+
idField: 'appId'
|
|
19
|
+
}, {}, ConfigFragmentName.UiSettings);
|
|
20
|
+
/**
|
|
21
|
+
* Copy all current settings to clipboard
|
|
22
|
+
*/
|
|
23
|
+
const handleCopySettings = async () => {
|
|
24
|
+
if (!isBrowser()) return;
|
|
25
|
+
try {
|
|
26
|
+
const settings = JSON.stringify(settingState, null, 2);
|
|
27
|
+
await navigator.clipboard.writeText(settings);
|
|
28
|
+
setCopied(true);
|
|
29
|
+
setTimeout(() => setCopied(false), COPY_TIMEOUT_MS);
|
|
30
|
+
} catch (err) {
|
|
31
|
+
console.error('Failed to copy settings:', err);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Copy modified settings from cookies to clipboard
|
|
36
|
+
*/
|
|
37
|
+
const handleCopyModifiedSettings = async () => {
|
|
38
|
+
if (!isBrowser()) return;
|
|
39
|
+
try {
|
|
40
|
+
const parsedSettings = getCookieSettings();
|
|
41
|
+
if (parsedSettings) {
|
|
42
|
+
await navigator.clipboard.writeText(JSON.stringify(parsedSettings, null, 2));
|
|
43
|
+
setCopiedModified(true);
|
|
44
|
+
setTimeout(() => setCopiedModified(false), COPY_TIMEOUT_MS);
|
|
45
|
+
}
|
|
46
|
+
} catch (err) {
|
|
47
|
+
console.error('Failed to copy modified settings:', err);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Save changed settings to backend
|
|
52
|
+
*/
|
|
53
|
+
const handleSaveSettings = async () => {
|
|
54
|
+
if (!isBrowser()) return;
|
|
55
|
+
try {
|
|
56
|
+
// Transform changedSettings to wrap in uilayout structure for backend
|
|
57
|
+
const wrappedSettings = transformSettingsForBackend(changedSettings);
|
|
58
|
+
const variables = {
|
|
59
|
+
editingUri: resource,
|
|
60
|
+
settings: wrappedSettings
|
|
61
|
+
};
|
|
62
|
+
const response = await writeSettingsMutation({
|
|
63
|
+
variables
|
|
64
|
+
});
|
|
65
|
+
if (response.data) {
|
|
66
|
+
if (actor) actor.send({
|
|
67
|
+
type: 'UISETTING_RESET_CHANGED_SETTINGS'
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
} catch (err) {
|
|
71
|
+
console.error('❌ Failed to save settings:', err);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Reset all settings (database + cookies) and reload
|
|
76
|
+
*/
|
|
77
|
+
const handleResetSettings = async () => {
|
|
78
|
+
if (!isBrowser()) return;
|
|
79
|
+
const confirmed = window.confirm(RESET_CONFIRMATION_MESSAGE);
|
|
80
|
+
if (!confirmed) return;
|
|
81
|
+
try {
|
|
82
|
+
// Step 1: Delete uiSettings from database
|
|
83
|
+
try {
|
|
84
|
+
await resetApplicationSettings({
|
|
85
|
+
variables: {
|
|
86
|
+
appId: config.APPLICATION_ID
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
} catch (dbErr) {
|
|
90
|
+
console.error('⚠️ Failed to delete database uiSettings:', dbErr);
|
|
91
|
+
}
|
|
92
|
+
// Step 2: Clear cookies
|
|
93
|
+
await clearSettingsCookies();
|
|
94
|
+
// Step 3: Reset XState machine
|
|
95
|
+
if (actor) {
|
|
96
|
+
actor.send({
|
|
97
|
+
type: 'UISETTING_RESET_CHANGED_SETTINGS'
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
} catch (err) {
|
|
101
|
+
console.error('❌ Error resetting settings:', err);
|
|
102
|
+
alert('Failed to reset settings. Please try again.');
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
// State
|
|
107
|
+
copied,
|
|
108
|
+
copiedModified,
|
|
109
|
+
// Handlers
|
|
110
|
+
handleCopySettings,
|
|
111
|
+
handleCopyModifiedSettings,
|
|
112
|
+
handleSaveSettings,
|
|
113
|
+
handleResetSettings
|
|
114
|
+
};
|
|
115
|
+
}export{useSettingsOperations};//# sourceMappingURL=useSettingsOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSettingsOperations.js","sources":["../../../../src/components/SettingDrawer/hooks/useSettings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
|
+
title: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const FONT_OPTIONS: {
|
|
6
|
+
key: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const COPY_TIMEOUT_MS = 2000;
|
|
10
|
+
export declare const RESET_CONFIRMATION_MESSAGE = "Are you sure you want to reset all settings? This will delete all customizations from database and cookies, then reload the page.";
|
|
11
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/utils/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa;;;GAMzB,CAAC;AAGF,eAAO,MAAM,YAAY;;;GAmBxB,CAAC;AAGF,eAAO,MAAM,eAAe,OAAO,CAAC;AAGpC,eAAO,MAAM,0BAA0B,sIACgG,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Theme options for the settings drawer
|
|
2
|
+
const THEME_OPTIONS = [{
|
|
3
|
+
key: 'default',
|
|
4
|
+
title: 'Default'
|
|
5
|
+
}, {
|
|
6
|
+
key: 'github',
|
|
7
|
+
title: 'Github Theme'
|
|
8
|
+
}, {
|
|
9
|
+
key: 'slack',
|
|
10
|
+
title: 'Slack Theme'
|
|
11
|
+
}, {
|
|
12
|
+
key: 'airbnb',
|
|
13
|
+
title: 'Airbnb Theme'
|
|
14
|
+
}, {
|
|
15
|
+
key: 'spotify',
|
|
16
|
+
title: 'Spotify Theme'
|
|
17
|
+
}];
|
|
18
|
+
// Font options for the settings drawer
|
|
19
|
+
const FONT_OPTIONS = [{
|
|
20
|
+
key: 'Poppins, sans-serif',
|
|
21
|
+
title: 'Poppins'
|
|
22
|
+
}, {
|
|
23
|
+
key: 'Roboto, sans-serif',
|
|
24
|
+
title: 'Roboto'
|
|
25
|
+
}, {
|
|
26
|
+
key: 'Open Sans, sans-serif',
|
|
27
|
+
title: 'Open Sans'
|
|
28
|
+
}, {
|
|
29
|
+
key: 'Montserrat, sans-serif',
|
|
30
|
+
title: 'Montserrat'
|
|
31
|
+
}, {
|
|
32
|
+
key: 'Lato, sans-serif',
|
|
33
|
+
title: 'Lato'
|
|
34
|
+
}, {
|
|
35
|
+
key: 'Nunito, sans-serif',
|
|
36
|
+
title: 'Nunito'
|
|
37
|
+
}, {
|
|
38
|
+
key: 'Ubuntu, sans-serif',
|
|
39
|
+
title: 'Ubuntu'
|
|
40
|
+
}, {
|
|
41
|
+
key: 'Inter, sans-serif',
|
|
42
|
+
title: 'Inter'
|
|
43
|
+
}, {
|
|
44
|
+
key: 'Arial, sans-serif',
|
|
45
|
+
title: 'Arial'
|
|
46
|
+
}, {
|
|
47
|
+
key: 'Helvetica, sans-serif',
|
|
48
|
+
title: 'Helvetica'
|
|
49
|
+
}, {
|
|
50
|
+
key: 'Tahoma, sans-serif',
|
|
51
|
+
title: 'Tahoma'
|
|
52
|
+
}, {
|
|
53
|
+
key: 'Trebuchet MS, sans-serif',
|
|
54
|
+
title: 'Trebuchet MS'
|
|
55
|
+
}, {
|
|
56
|
+
key: 'Georgia, serif',
|
|
57
|
+
title: 'Georgia'
|
|
58
|
+
}, {
|
|
59
|
+
key: 'Bookman, serif',
|
|
60
|
+
title: 'Bookman'
|
|
61
|
+
}, {
|
|
62
|
+
key: 'Geneva, sans-serif',
|
|
63
|
+
title: 'Geneva'
|
|
64
|
+
}, {
|
|
65
|
+
key: 'Lucida Console, monospace',
|
|
66
|
+
title: 'Lucida Console'
|
|
67
|
+
}, {
|
|
68
|
+
key: 'Courier New, monospace',
|
|
69
|
+
title: 'Courier New'
|
|
70
|
+
}, {
|
|
71
|
+
key: 'Lucida Sans, sans-serif',
|
|
72
|
+
title: 'Lucida Sans'
|
|
73
|
+
}];
|
|
74
|
+
// Timeouts
|
|
75
|
+
const COPY_TIMEOUT_MS = 2000;
|
|
76
|
+
// Confirmation messages
|
|
77
|
+
const RESET_CONFIRMATION_MESSAGE = 'Are you sure you want to reset all settings? This will delete all customizations from database and cookies, then reload the page.';export{COPY_TIMEOUT_MS,FONT_OPTIONS,RESET_CONFIRMATION_MESSAGE,THEME_OPTIONS};//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/SettingDrawer/utils/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACO,MAAM,aAAa,GAAG,CAAA;AACzB,EAAA,GAAA,WAAO;AACP,EAAA,OAAK;AACL,CAAA,EAAA;AACA,EAAA,GAAA,UAAO;AACP,EAAA,OAAK;CACR,EAAC;AAEF,EAAA,GAAA,EAAA,OAAA;AACA,EAAA,KAAO,EAAA;AACH,CAAA,EAAA;AACA,EAAA,GAAA,UAAO;AACP,EAAA,OAAK;AACL,CAAA,EAAA;AACA,EAAA,GAAA,WAAO;AACP,EAAA,OAAK;AACL,CAAA;AACA;AACO,MAAA,YAAA,GAAA,CAAA;AACP,EAAA,GAAA,uBAAO;AACP,EAAA,OAAK;AACL,CAAA,EAAA;AACA,EAAA,GAAA,sBAAuB;AACvB,EAAA,OAAK;AACL,CAAA,EAAA;AACA,EAAA,GAAA,yBAAO;AACP,EAAA,OAAK;AACL,CAAA,EAAA;EACF,GAAA,EAAA,wBAAA;AAEF,EAAA,KAAA,EAAA;AACA,CAAA,EAAA;AAEA,EAAA,GAAA,EAAA,kBAAwB;AACxB,EAAA,KAAO,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ProSettings } from '@admin-layout/client';
|
|
2
|
+
import { MergerSettingsType, SettingDrawerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Initialize settings from URL parameters and apply theme
|
|
5
|
+
*/
|
|
6
|
+
export declare function initState(settings: Partial<MergerSettingsType<ProSettings>>, onSettingChange: SettingDrawerProps['onSettingChange'], publicPath?: string, oldSetting?: Partial<MergerSettingsType<ProSettings>>): void;
|
|
7
|
+
/**
|
|
8
|
+
* Update theme by dynamically loading CSS file
|
|
9
|
+
*/
|
|
10
|
+
export declare function updateTheme(dark?: boolean | any, color?: string, publicPath?: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* Get theme list with colors based on current settings and device
|
|
13
|
+
*/
|
|
14
|
+
export declare function useThemeList(settings: Partial<ProSettings>, location: any, routePattern?: string): {
|
|
15
|
+
colorList: {
|
|
16
|
+
dark: {
|
|
17
|
+
key: string;
|
|
18
|
+
color: string;
|
|
19
|
+
theme?: "dark" | "light";
|
|
20
|
+
}[];
|
|
21
|
+
light: {
|
|
22
|
+
key: string;
|
|
23
|
+
color: string;
|
|
24
|
+
theme?: "dark" | "light";
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
themeList: {
|
|
28
|
+
key: string;
|
|
29
|
+
title: string;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Parse a dot-separated path into a nested object structure
|
|
34
|
+
* Example: parseSettingPath('a.b.c', 'value') => { a: { b: { c: 'value' } } }
|
|
35
|
+
*/
|
|
36
|
+
export declare function parseSettingPath(path: string, value: any): any;
|
|
37
|
+
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/utils/helper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjE;;GAEG;AACH,wBAAgB,SAAS,CACrB,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,EAClD,eAAe,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,EACtD,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,QAkExD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,UAAU,SAAW,QA+CtF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,MAAM;;;iBAsGpF,MAAM;mBACJ,MAAM;oBACL,MAAM,GAAG,OAAO;;;iBAUnB,MAAM;mBACJ,MAAM;oBACL,MAAM,GAAG,OAAO;;;;;;;EA8C/B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAoB9D"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import'qs';import {useTranslation}from'react-i18next';import'../../../utils/isBrowser/index.js';import'react';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import {useMediaQuery}from'../../../hooks/useMediaQuery.js';/**
|
|
2
|
+
* Get theme list with colors based on current settings and device
|
|
3
|
+
*/
|
|
4
|
+
function useThemeList(settings, location, routePattern) {
|
|
5
|
+
const {
|
|
6
|
+
t
|
|
7
|
+
} = useTranslation('settings');
|
|
8
|
+
const {
|
|
9
|
+
isMobile
|
|
10
|
+
} = useMediaQuery();
|
|
11
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
12
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
13
|
+
// Helper function to get value from settings with route/device override support
|
|
14
|
+
const getUILayoutValue = path => {
|
|
15
|
+
const routeDeviceKey = `[${currentRoute}][${deviceType}]`;
|
|
16
|
+
const uiOverride = settings?.uiSettings?.[routeDeviceKey];
|
|
17
|
+
if (uiOverride) {
|
|
18
|
+
const value = path.split('.').reduce((obj, key) => obj?.[key], uiOverride);
|
|
19
|
+
if (value !== undefined) return value;
|
|
20
|
+
}
|
|
21
|
+
return path.split('.').reduce((obj, key) => obj?.[key], settings);
|
|
22
|
+
};
|
|
23
|
+
const deviceLayout = {
|
|
24
|
+
navigationMode: getUILayoutValue('navigationMode'),
|
|
25
|
+
sideMenuType: getUILayoutValue('sideMenuType'),
|
|
26
|
+
contentWidth: getUILayoutValue('contentWidth'),
|
|
27
|
+
fixedHeader: getUILayoutValue('fixedHeader'),
|
|
28
|
+
fixedSidebar: getUILayoutValue('fixedSidebar'),
|
|
29
|
+
splitMenus: getUILayoutValue('splitMenus')
|
|
30
|
+
};
|
|
31
|
+
let list = [];
|
|
32
|
+
const defaultList = [
|
|
33
|
+
//@sri following are needed otherwise we need make above plugin to work
|
|
34
|
+
{
|
|
35
|
+
key: 'dust',
|
|
36
|
+
fileName: 'dust.css',
|
|
37
|
+
modifyVars: {
|
|
38
|
+
'@primary-color': '#F5222D'
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
key: 'volcano',
|
|
42
|
+
fileName: 'volcano.css',
|
|
43
|
+
modifyVars: {
|
|
44
|
+
'@primary-color': '#FA541C'
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
key: 'sunset',
|
|
48
|
+
fileName: 'sunset.css',
|
|
49
|
+
modifyVars: {
|
|
50
|
+
'@primary-color': '#FAAD14'
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
key: 'cyan',
|
|
54
|
+
fileName: 'cyan.css',
|
|
55
|
+
modifyVars: {
|
|
56
|
+
'@primary-color': '#13C2C2'
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
key: 'green',
|
|
60
|
+
fileName: 'green.css',
|
|
61
|
+
modifyVars: {
|
|
62
|
+
'@primary-color': '#52C41A'
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
key: 'geekblue',
|
|
66
|
+
fileName: 'geekblue.css',
|
|
67
|
+
modifyVars: {
|
|
68
|
+
'@primary-color': '#2F54EB'
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: 'purple',
|
|
72
|
+
fileName: 'purple.css',
|
|
73
|
+
modifyVars: {
|
|
74
|
+
'@primary-color': '#722ED1'
|
|
75
|
+
}
|
|
76
|
+
}];
|
|
77
|
+
// ssr
|
|
78
|
+
if (typeof window === 'undefined') {
|
|
79
|
+
list = defaultList;
|
|
80
|
+
} else {
|
|
81
|
+
list = window.umi_plugin_ant_themeVar || defaultList;
|
|
82
|
+
}
|
|
83
|
+
const themeList = [{
|
|
84
|
+
key: 'light',
|
|
85
|
+
title: t('light')
|
|
86
|
+
}];
|
|
87
|
+
const darkColorList = [{
|
|
88
|
+
key: 'daybreak',
|
|
89
|
+
color: '#1890ff',
|
|
90
|
+
theme: 'dark'
|
|
91
|
+
}];
|
|
92
|
+
const lightColorList = [{
|
|
93
|
+
key: 'daybreak',
|
|
94
|
+
color: '#1890ff',
|
|
95
|
+
theme: 'dark'
|
|
96
|
+
}];
|
|
97
|
+
if (deviceLayout.navigationMode !== 'mixed') {
|
|
98
|
+
themeList.push({
|
|
99
|
+
key: 'dark',
|
|
100
|
+
title: t('dark')
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (list.find(item => item.theme === 'dark')) {
|
|
104
|
+
themeList.push({
|
|
105
|
+
key: 'realDark',
|
|
106
|
+
title: t('dark')
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
// insert theme color List
|
|
110
|
+
list.forEach(item => {
|
|
111
|
+
const color = (item.modifyVars || {})['@primary-color'];
|
|
112
|
+
if (item.theme === 'dark' && color) {
|
|
113
|
+
darkColorList.push({
|
|
114
|
+
color,
|
|
115
|
+
...item
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (!item.theme || item.theme === 'light') {
|
|
119
|
+
lightColorList.push({
|
|
120
|
+
color,
|
|
121
|
+
...item
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
colorList: {
|
|
127
|
+
dark: darkColorList,
|
|
128
|
+
light: lightColorList
|
|
129
|
+
},
|
|
130
|
+
themeList
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parse a dot-separated path into a nested object structure
|
|
135
|
+
* Example: parseSettingPath('a.b.c', 'value') => { a: { b: { c: 'value' } } }
|
|
136
|
+
*/
|
|
137
|
+
function parseSettingPath(path, value) {
|
|
138
|
+
const keys = path.split('.');
|
|
139
|
+
// Base case: no nesting
|
|
140
|
+
if (keys.length === 1) {
|
|
141
|
+
return {
|
|
142
|
+
[path]: value
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// Build nested object
|
|
146
|
+
let result = {};
|
|
147
|
+
let current = result;
|
|
148
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
149
|
+
current[keys[i]] = {};
|
|
150
|
+
current = current[keys[i]];
|
|
151
|
+
}
|
|
152
|
+
current[keys[keys.length - 1]] = value;
|
|
153
|
+
return result;
|
|
154
|
+
}export{parseSettingPath,useThemeList};//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../src/components/SettingDrawer/utils/helper.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAoIA;AAEA,SAAA,YAAA,CAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA;;AAEG,IAAA;AACH,GAAA,GAAM,cAAU,CAAA;QACZ;AACA,IAAA;MACA,aAAM,EAAA;QACN,YAAgB,GAAG,YAAW,IAAA,QAAW,EAAA,QAAU,IAAA,GAAA;QAEnD,UAAA,GAAA,QAAA,GAAA,QAAA,GAAA,SAAA;AACA;AACI,EAAA,MAAA,uBAAuB,IAAI;UAC3B,cAAgB,GAAG,CAAA,CAAA,EAAA,iBAAoB,UAAG,CAAA,CAAA,CAAA;UAE1C,UAAI,WAAa,EAAA,UAAA,GAAA,cAAA,CAAA;kBACP,EAAA;YACN,KAAI,GA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AA,CAAA,IAAA,IAAA;AACF,IAAA,mBAAiB,CAAA,UAAA,IAAc,EAAK,EAAA,gBAAU,CAAA;QAC1C,IAAA,CAAA,KAAU,KAAK,MAAA,IAAA,KAAA,EAAA;AACX,MAAA,aAAK,CAAA,IAAM,CAAA;AACX,QAAA,KAAA;AACH,QAAA,GAAE;OACN,CAAA;AAED,IAAA;QACI,CAAA,IAAA,CAAA,SAAe,IAAA,CAAA,KAAA,KAAA,OAAA,EAAA;AACX,MAAA,cAAK,CAAA,IAAA,CAAA;AACL,QAAA,KAAA;AACH,QAAA,GAAE;OACN,CAAA;IAED;AACA,EAAA,CAAA,CAAA;AACI,EAAA,OAAA;aACI,EAAA;YACA,aAAa;;AAET,KAAA;AACH,IAAA;;;;;AAKG;AACH;SACJ,gBAAA,CAAA,IAAA,EAAA,KAAA,EAAA;AACL,EAAA,MAAG,IAAA,GAAA,IAAA,CAAA,KAAA,CAAA,GAAA,CAAA;;AAGC,EAAA,IAAA,IAAA,CAAA,MAAS,KAAE,CAAA,EAAA;AACP,IAAA,OAAA;AACA,MAAA,CAAA,IAAA,GAAA;AACH,KAAA;;;AAGT,EAAC,IAAA,MAAA,GAAA,EAAA;AAED,EAAA,IAAA,OAAA,GAAA,MAAA;;;AAGG,IAAA,OAAA,GAAA,OAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACH,EAAA;SACI,CAAM,IAAI,KAAG,CAAA,SAAW,CAAA,CAAG,CAAC,GAAC,KAAA;SAE7B,MAAA;AACA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transform changed settings to wrap in uilayout structure for backend API
|
|
3
|
+
* Converts keys like "[desktop].theme" to "[desktop].uilayout.theme"
|
|
4
|
+
*/
|
|
5
|
+
export declare function transformSettingsForBackend(changedSettings: Record<string, any>): Record<string, any>;
|
|
6
|
+
/**
|
|
7
|
+
* Extract and parse settings from browser cookies
|
|
8
|
+
* Returns null if cookie not found or parsing fails
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCookieSettings(): Record<string, any> | null;
|
|
11
|
+
/**
|
|
12
|
+
* Clear settings cookies by sending DELETE request to server
|
|
13
|
+
*/
|
|
14
|
+
export declare function clearSettingsCookies(): Promise<boolean>;
|
|
15
|
+
//# sourceMappingURL=transformers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformers.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/utils/transformers.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAiCrG;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAqB9D;AAED;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAiB7D"}
|