@admin-layout/tailwind-design-pro 10.1.1-alpha.9 → 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 +376 -250
- package/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/en/settings.json +6 -1
- package/lib/cdm-locales/es/menu.json +2 -1
- package/lib/cdm-locales/es/settings.json +6 -1
- package/lib/cdm-locales/index.d.ts +2 -0
- package/lib/cdm-locales/index.d.ts.map +1 -0
- package/lib/cdm-locales/index.ts +1 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts +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 -5
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +255 -175
- 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.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 +0 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +82 -66
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +0 -2
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +119 -162
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- 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 +1 -0
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +82 -19
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +116 -158
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +36 -45
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts +0 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +70 -9
- 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 -1
- 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 +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js +10 -11
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebar.js +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 +37 -20
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +3 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +2 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +2 -2
- 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 +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- 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 +2 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js +2 -2
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- 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 +2 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.js +1 -1
- package/lib/components/Layout/util.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -2
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +190 -499
- 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/{types.d.ts → utils/types.d.ts} +14 -0
- package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +13 -4
- 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 +0 -2
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/typings.d.ts +20 -6
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +10 -2
- package/lib/compute.js.map +1 -1
- package/lib/config/analytics-config.d.ts +59 -0
- package/lib/config/analytics-config.d.ts.map +1 -0
- package/lib/config/constants.js.map +1 -1
- package/lib/config/env-config.d.ts +6 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +21 -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 +1 -1
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +16 -17
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -3
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useMediaQuery.js.map +1 -1
- package/lib/hooks/useScrollThreshold.js.map +1 -1
- package/lib/hooks/useTailwindTheme.js.map +1 -1
- package/lib/icons.d.ts +2 -0
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +4 -2
- package/lib/icons.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/selectors.d.ts +118 -0
- package/lib/machines/selectors.d.ts.map +1 -0
- package/lib/machines/settingsMachine.d.ts +25 -2
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +133 -168
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/machines/types.d.ts +107 -9
- package/lib/machines/types.d.ts.map +1 -1
- package/lib/machines/types.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/redux/searchReducer.d.ts +1 -1
- package/lib/redux/searchReducer.d.ts.map +1 -1
- package/lib/redux/searchReducer.js.map +1 -1
- package/lib/routes.json +9 -1
- package/lib/styles/index.css +602 -372
- package/lib/tailwindConfig.d.ts +85 -27
- package/lib/tailwindConfig.d.ts.map +1 -1
- package/lib/tailwindConfig.js +96 -18
- package/lib/tailwindConfig.js.map +1 -1
- 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/isBrowser/index.js.map +1 -1
- package/lib/utils/settingsUtils.d.ts +20 -0
- package/lib/utils/settingsUtils.d.ts.map +1 -0
- package/lib/utils/settingsUtils.js +74 -0
- package/lib/utils/settingsUtils.js.map +1 -0
- package/lib/utils/utils/index.js.map +1 -1
- package/package.json +7 -15
- package/lib/components/Layout/GlobalHeader/Logo.d.ts +0 -4
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +0 -1
- package/lib/components/Layout/GlobalHeader/Logo.js +0 -141
- package/lib/components/Layout/GlobalHeader/Logo.js.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +0 -186
- package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -183
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -3
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -123
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -3
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.js +0 -123
- package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +0 -3
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +0 -1
- package/lib/components/SettingDrawer/NavigationsModes.js +0 -289
- package/lib/components/SettingDrawer/NavigationsModes.js.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -3
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +0 -740
- package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +0 -3
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.js +0 -22
- package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -3
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.js +0 -35
- package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts +0 -3
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.js +0 -18
- package/lib/components/SettingDrawer/ThemeSelector.js.map +0 -1
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts +0 -3
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +0 -1
- package/lib/components/SettingDrawer/WebFontsSelector.js +0 -24
- package/lib/components/SettingDrawer/WebFontsSelector.js.map +0 -1
- package/lib/components/SettingDrawer/types.d.ts.map +0 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +0 -8
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +0 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +0 -60
- package/lib/components/ThemeProvider/ThemeProvider.js.map +0 -1
- package/lib/components/ThemeProvider/ThemeToggle.d.ts +0 -7
- package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +0 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +0 -50
- package/lib/components/ThemeProvider/ThemeToggle.js.map +0 -1
- package/lib/components/ThemeProvider/index.d.ts +0 -4
- package/lib/components/ThemeProvider/index.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/airbnb.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/airbnb.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/airbnb.js +0 -186
- package/lib/components/ThemeProvider/themes/airbnb.js.map +0 -1
- package/lib/components/ThemeProvider/themes/default.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/default.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/default.js +0 -183
- package/lib/components/ThemeProvider/themes/default.js.map +0 -1
- package/lib/components/ThemeProvider/themes/github.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/github.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/github.js +0 -190
- package/lib/components/ThemeProvider/themes/github.js.map +0 -1
- package/lib/components/ThemeProvider/themes/index.d.ts +0 -15
- package/lib/components/ThemeProvider/themes/index.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/index.js +0 -7
- package/lib/components/ThemeProvider/themes/index.js.map +0 -1
- package/lib/components/ThemeProvider/themes/slack.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/slack.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/slack.js +0 -188
- package/lib/components/ThemeProvider/themes/slack.js.map +0 -1
- package/lib/components/ThemeProvider/themes/spotify.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/spotify.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/spotify.js +0 -189
- package/lib/components/ThemeProvider/themes/spotify.js.map +0 -1
- package/lib/components/ThemeProvider/types.d.ts +0 -112
- package/lib/components/ThemeProvider/types.d.ts.map +0 -1
- package/lib/components/UI/CardList.d.ts +0 -61
- package/lib/components/UI/CardList.d.ts.map +0 -1
- package/lib/components/UI/CardList.js +0 -43
- package/lib/components/UI/CardList.js.map +0 -1
- package/lib/components/UI/CategoriesTypeList.d.ts +0 -29
- package/lib/components/UI/CategoriesTypeList.d.ts.map +0 -1
- package/lib/components/UI/CategoriesTypeList.js +0 -140
- package/lib/components/UI/CategoriesTypeList.js.map +0 -1
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +0 -83
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +0 -1
- package/lib/components/UI/LazyLoadingGoogleMarker.js +0 -107
- package/lib/components/UI/LazyLoadingGoogleMarker.js.map +0 -1
- package/lib/components/UI/Pagination.d.ts +0 -6
- package/lib/components/UI/Pagination.d.ts.map +0 -1
- package/lib/components/UI/Pagination.js +0 -59
- package/lib/components/UI/Pagination.js.map +0 -1
- package/lib/components/UI/ParamSearchResultContainer.d.ts +0 -99
- package/lib/components/UI/ParamSearchResultContainer.d.ts.map +0 -1
- package/lib/components/UI/ParamSearchResultContainer.js +0 -120
- package/lib/components/UI/ParamSearchResultContainer.js.map +0 -1
- package/lib/components/UI/PropertyCard.d.ts +0 -24
- package/lib/components/UI/PropertyCard.d.ts.map +0 -1
- package/lib/components/UI/PropertyCard.js +0 -375
- package/lib/components/UI/PropertyCard.js.map +0 -1
- package/lib/components/UI/PropertyCardOnMap.d.ts +0 -10
- package/lib/components/UI/PropertyCardOnMap.d.ts.map +0 -1
- package/lib/components/UI/PropertyCardOnMap.js +0 -108
- package/lib/components/UI/PropertyCardOnMap.js.map +0 -1
- package/lib/components/UI/VehicleCard/PricePopover.d.ts +0 -8
- package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/PricePopover.js +0 -98
- package/lib/components/UI/VehicleCard/PricePopover.js.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +0 -7
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +0 -9
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleFeature.js +0 -23
- package/lib/components/UI/VehicleCard/VehicleFeature.js.map +0 -1
- package/lib/components/UI/VehicleCard/types.d.ts +0 -59
- package/lib/components/UI/VehicleCard/types.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard.d.ts +0 -15
- package/lib/components/UI/VehicleCard.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard.js +0 -166
- package/lib/components/UI/VehicleCard.js.map +0 -1
- package/lib/components/UI/VehicleCardList.d.ts +0 -14
- package/lib/components/UI/VehicleCardList.d.ts.map +0 -1
- package/lib/components/UI/VehicleCardList.js +0 -38
- package/lib/components/UI/VehicleCardList.js.map +0 -1
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +0 -90
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +0 -1
- package/lib/components/UI/icons/LocationIcon.d.ts +0 -7
- package/lib/components/UI/icons/LocationIcon.d.ts.map +0 -1
- package/lib/components/UI/icons/LocationIcon.js +0 -18
- package/lib/components/UI/icons/LocationIcon.js.map +0 -1
- package/lib/components/UI/icons/index.d.ts +0 -2
- package/lib/components/UI/icons/index.d.ts.map +0 -1
- package/lib/components/UI/index.d.ts +0 -10
- package/lib/components/UI/index.d.ts.map +0 -1
- package/lib/components/typings.js +0 -6
- package/lib/components/typings.js.map +0 -1
- package/lib/hooks/use-get-current-lat-long.d.ts +0 -18
- package/lib/hooks/use-get-current-lat-long.d.ts.map +0 -1
- package/lib/hooks/use-get-current-lat-long.js +0 -29
- package/lib/hooks/use-get-current-lat-long.js.map +0 -1
- package/lib/hooks/useWindowSize.d.ts +0 -6
- package/lib/hooks/useWindowSize.d.ts.map +0 -1
- package/lib/hooks/useWindowSize.js +0 -20
- package/lib/hooks/useWindowSize.js.map +0 -1
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +0 -6
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts +0 -6
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +0 -1
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +0 -7
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/datasourcesMiddleware.d.ts +0 -6
- package/lib/middlewares/datasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +0 -7
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +0 -1
|
@@ -1,522 +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 getThemeList = (settings, location) => {
|
|
82
|
-
const {
|
|
83
|
-
t
|
|
84
|
-
} = useTranslation('settings');
|
|
85
|
-
const {
|
|
86
|
-
isMobile
|
|
87
|
-
} = useMediaQuery();
|
|
88
|
-
const currentRoute = location?.pathname || '/';
|
|
89
|
-
const routeSettings = settings?.routeSettings?.[currentRoute] || settings?.routeSettings?.['/'] || settings;
|
|
90
|
-
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
91
|
-
const deviceLayout = routeSettings?.layout?.[deviceType] || {};
|
|
92
|
-
let list = [];
|
|
93
|
-
const defaultList = [
|
|
94
|
-
//@sri following are needed otherwise we need make above plugin to work
|
|
95
|
-
{
|
|
96
|
-
key: 'dust',
|
|
97
|
-
fileName: 'dust.css',
|
|
98
|
-
modifyVars: {
|
|
99
|
-
'@primary-color': '#F5222D'
|
|
100
|
-
}
|
|
101
|
-
}, {
|
|
102
|
-
key: 'volcano',
|
|
103
|
-
fileName: 'volcano.css',
|
|
104
|
-
modifyVars: {
|
|
105
|
-
'@primary-color': '#FA541C'
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
key: 'sunset',
|
|
109
|
-
fileName: 'sunset.css',
|
|
110
|
-
modifyVars: {
|
|
111
|
-
'@primary-color': '#FAAD14'
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
key: 'cyan',
|
|
115
|
-
fileName: 'cyan.css',
|
|
116
|
-
modifyVars: {
|
|
117
|
-
'@primary-color': '#13C2C2'
|
|
118
|
-
}
|
|
119
|
-
}, {
|
|
120
|
-
key: 'green',
|
|
121
|
-
fileName: 'green.css',
|
|
122
|
-
modifyVars: {
|
|
123
|
-
'@primary-color': '#52C41A'
|
|
124
|
-
}
|
|
125
|
-
}, {
|
|
126
|
-
key: 'geekblue',
|
|
127
|
-
fileName: 'geekblue.css',
|
|
128
|
-
modifyVars: {
|
|
129
|
-
'@primary-color': '#2F54EB'
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
|
-
key: 'purple',
|
|
133
|
-
fileName: 'purple.css',
|
|
134
|
-
modifyVars: {
|
|
135
|
-
'@primary-color': '#722ED1'
|
|
136
|
-
}
|
|
137
|
-
}];
|
|
138
|
-
// ssr
|
|
139
|
-
if (typeof window === 'undefined') {
|
|
140
|
-
list = defaultList;
|
|
141
|
-
} else {
|
|
142
|
-
list = window.umi_plugin_ant_themeVar || defaultList;
|
|
143
|
-
}
|
|
144
|
-
const themeList = [{
|
|
145
|
-
key: 'light',
|
|
146
|
-
title: t('light')
|
|
147
|
-
}];
|
|
148
|
-
const darkColorList = [{
|
|
149
|
-
key: 'daybreak',
|
|
150
|
-
color: '#1890ff',
|
|
151
|
-
theme: 'dark'
|
|
152
|
-
}];
|
|
153
|
-
const lightColorList = [{
|
|
154
|
-
key: 'daybreak',
|
|
155
|
-
color: '#1890ff',
|
|
156
|
-
theme: 'dark'
|
|
157
|
-
}];
|
|
158
|
-
if (deviceLayout.navigationMode !== 'mixed') {
|
|
159
|
-
themeList.push({
|
|
160
|
-
key: 'dark',
|
|
161
|
-
title: t('dark')
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
if (list.find(item => item.theme === 'dark')) {
|
|
165
|
-
themeList.push({
|
|
166
|
-
key: 'realDark',
|
|
167
|
-
title: t('dark')
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
// insert theme color List
|
|
171
|
-
list.forEach(item => {
|
|
172
|
-
const color = (item.modifyVars || {})['@primary-color'];
|
|
173
|
-
if (item.theme === 'dark' && color) {
|
|
174
|
-
darkColorList.push({
|
|
175
|
-
color,
|
|
176
|
-
...item
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
if (!item.theme || item.theme === 'light') {
|
|
180
|
-
lightColorList.push({
|
|
181
|
-
color,
|
|
182
|
-
...item
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
return {
|
|
187
|
-
colorList: {
|
|
188
|
-
dark: darkColorList,
|
|
189
|
-
light: lightColorList
|
|
190
|
-
},
|
|
191
|
-
themeList
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
const themeOptions = [{
|
|
195
|
-
key: 'default',
|
|
196
|
-
title: 'Default'
|
|
197
|
-
}, {
|
|
198
|
-
key: 'github',
|
|
199
|
-
title: 'Github Theme'
|
|
200
|
-
}, {
|
|
201
|
-
key: 'slack',
|
|
202
|
-
title: 'Slack Theme'
|
|
203
|
-
}, {
|
|
204
|
-
key: 'airbnb',
|
|
205
|
-
title: 'Airbnb Theme'
|
|
206
|
-
}, {
|
|
207
|
-
key: 'spotify',
|
|
208
|
-
title: 'Spotify Theme'
|
|
209
|
-
}];
|
|
210
|
-
const fontOptions = [{
|
|
211
|
-
key: 'Poppins, sans-serif',
|
|
212
|
-
title: 'Poppins'
|
|
213
|
-
}, {
|
|
214
|
-
key: 'Roboto, sans-serif',
|
|
215
|
-
title: 'Roboto'
|
|
216
|
-
}, {
|
|
217
|
-
key: 'Open Sans, sans-serif',
|
|
218
|
-
title: 'Open Sans'
|
|
219
|
-
}, {
|
|
220
|
-
key: 'Montserrat, sans-serif',
|
|
221
|
-
title: 'Montserrat'
|
|
222
|
-
}, {
|
|
223
|
-
key: 'Lato, sans-serif',
|
|
224
|
-
title: 'Lato'
|
|
225
|
-
}, {
|
|
226
|
-
key: 'Nunito, sans-serif',
|
|
227
|
-
title: 'Nunito'
|
|
228
|
-
}, {
|
|
229
|
-
key: 'Ubuntu, sans-serif',
|
|
230
|
-
title: 'Ubuntu'
|
|
231
|
-
}, {
|
|
232
|
-
key: 'Inter, sans-serif',
|
|
233
|
-
title: 'Inter'
|
|
234
|
-
}, {
|
|
235
|
-
key: 'Arial, sans-serif',
|
|
236
|
-
title: 'Arial'
|
|
237
|
-
}, {
|
|
238
|
-
key: 'Helvetica, sans-serif',
|
|
239
|
-
title: 'Helvetica'
|
|
240
|
-
}, {
|
|
241
|
-
key: 'Tahoma, sans-serif',
|
|
242
|
-
title: 'Tahoma'
|
|
243
|
-
}, {
|
|
244
|
-
key: 'Trebuchet MS, sans-serif',
|
|
245
|
-
title: 'Trebuchet MS'
|
|
246
|
-
}, {
|
|
247
|
-
key: 'Georgia, serif',
|
|
248
|
-
title: 'Georgia'
|
|
249
|
-
}, {
|
|
250
|
-
key: 'Bookman, serif',
|
|
251
|
-
title: 'Bookman'
|
|
252
|
-
}, {
|
|
253
|
-
key: 'Geneva, sans-serif',
|
|
254
|
-
title: 'Geneva'
|
|
255
|
-
}, {
|
|
256
|
-
key: 'Lucida Console, monospace',
|
|
257
|
-
title: 'Lucida Console'
|
|
258
|
-
}, {
|
|
259
|
-
key: 'Courier New, monospace',
|
|
260
|
-
title: 'Courier New'
|
|
261
|
-
}, {
|
|
262
|
-
key: 'Lucida Sans, sans-serif',
|
|
263
|
-
title: 'Lucida Sans'
|
|
264
|
-
}];
|
|
265
|
-
const SettingDrawer = props => {
|
|
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) {
|
|
266
2
|
const {
|
|
267
|
-
settings,
|
|
268
|
-
onSettingChange,
|
|
269
|
-
hideLoading,
|
|
270
|
-
hideColors,
|
|
271
|
-
publicPath,
|
|
272
|
-
hideHintAlert,
|
|
273
|
-
hideCopyButton,
|
|
274
3
|
actor,
|
|
275
4
|
colorList,
|
|
276
5
|
navTheme,
|
|
277
6
|
pathname,
|
|
278
|
-
location
|
|
7
|
+
location,
|
|
8
|
+
fullMenuData,
|
|
9
|
+
routePattern
|
|
279
10
|
} = props;
|
|
280
11
|
const {
|
|
281
12
|
CloseIcon,
|
|
282
|
-
Settings5FillIcon
|
|
283
|
-
CopyIcon,
|
|
284
|
-
CheckIcon
|
|
13
|
+
Settings5FillIcon
|
|
285
14
|
} = icons;
|
|
286
|
-
|
|
15
|
+
// Refs
|
|
16
|
+
const btnRef = useRef();
|
|
17
|
+
// Hooks
|
|
287
18
|
const {
|
|
288
19
|
isMobile
|
|
289
20
|
} = useMediaQuery();
|
|
290
|
-
const [copied, setCopied] = useState(false);
|
|
291
|
-
const [copiedModified, setCopiedModified] = useState(false);
|
|
292
21
|
const {
|
|
293
22
|
t
|
|
294
23
|
} = useTranslation('settings');
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
//
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
//
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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
|
|
43
|
+
});
|
|
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
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setApplyToAllRoutes(defaultApplyToAllRoutes);
|
|
57
|
+
}, [defaultApplyToAllRoutes]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
setActiveDeviceTab(isMobile ? 'mobile' : 'desktop');
|
|
60
|
+
}, [isMobile]);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (actor) {
|
|
314
63
|
actor.send({
|
|
315
|
-
type: '
|
|
316
|
-
|
|
317
|
-
[`routeSettings.${currentRoute}.layout.${deviceType}.${layoutKey}`]: value
|
|
318
|
-
}
|
|
64
|
+
type: 'UISETTING_UPDATE_DEVICE_TYPE',
|
|
65
|
+
deviceType: activeDeviceTab
|
|
319
66
|
});
|
|
320
|
-
}
|
|
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) {
|
|
321
73
|
actor.send({
|
|
322
|
-
type: '
|
|
74
|
+
type: 'UISETTING_UPDATE',
|
|
323
75
|
value: {
|
|
324
76
|
[key]: value
|
|
325
77
|
}
|
|
326
78
|
});
|
|
79
|
+
return;
|
|
327
80
|
}
|
|
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
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]",
|
|
462
|
-
children: [jsx("p", {
|
|
463
|
-
className: "mb-2 text-black dark:text-white",
|
|
464
|
-
children: t('regional_rettings')
|
|
465
|
-
}), jsx(RegionalSettings, {
|
|
466
|
-
settings: settingState,
|
|
467
|
-
changeSetting: handleSettingChange,
|
|
468
|
-
...props
|
|
469
|
-
})]
|
|
470
|
-
}), jsx("div", {
|
|
471
|
-
className: "mt-8 pb-8 border-b border-black dark:border-[#2a2b2a]",
|
|
472
|
-
children: jsx(AdditionalSettingsSlot, {
|
|
473
|
-
settings: settingState,
|
|
474
|
-
onSettingsChange: handleSettingChange,
|
|
475
|
-
pathname: currentPathname
|
|
476
|
-
})
|
|
477
|
-
}), jsxs("div", {
|
|
478
|
-
className: "bg-yellow-50 dark:bg-yellow-900 border border-yellow-200 dark:border-yellow-700 rounded-lg p-4 mt-4",
|
|
479
|
-
children: [jsx("p", {
|
|
480
|
-
className: "text-sm text-yellow-700 dark:text-yellow-200",
|
|
481
|
-
children: "Setting panel shows in development environment only, please manually modify"
|
|
482
|
-
}), jsxs("div", {
|
|
483
|
-
className: "flex flex-wrap gap-2 mt-2",
|
|
484
|
-
children: [jsx("button", {
|
|
485
|
-
className: clsx('flex-1 min-w-[140px] sm:flex-none sm:w-auto px-4 py-2 rounded-lg border text-sm font-medium shadow-sm transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2', copied ? 'border-green-300 text-green-700 bg-green-50 dark:border-green-600 dark:text-green-200 dark:bg-green-900' : 'border-yellow-300 text-yellow-700 bg-yellow-50 hover:bg-yellow-100 active:bg-yellow-200 dark:border-yellow-600 dark:text-yellow-200 dark:bg-yellow-900/50 dark:hover:bg-yellow-900'),
|
|
486
|
-
onClick: handleCopySettings,
|
|
487
|
-
children: copied ? jsxs(Fragment, {
|
|
488
|
-
children: [jsx(CheckIcon, {
|
|
489
|
-
className: "w-4 h-4"
|
|
490
|
-
}), jsx("span", {
|
|
491
|
-
children: "Copied!"
|
|
492
|
-
})]
|
|
493
|
-
}) : jsxs(Fragment, {
|
|
494
|
-
children: [jsx(CopyIcon, {
|
|
495
|
-
className: "w-4 h-4"
|
|
496
|
-
}), jsx("span", {
|
|
497
|
-
children: "Copy All Settings"
|
|
498
|
-
})]
|
|
499
|
-
})
|
|
500
|
-
}), jsx("button", {
|
|
501
|
-
className: clsx('flex-1 min-w-[140px] sm:flex-none sm:w-auto px-4 py-2 rounded-lg border text-sm font-medium shadow-sm transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2', copiedModified ? 'border-green-300 text-green-700 bg-green-50 dark:border-green-600 dark:text-green-200 dark:bg-green-900' : 'border-blue-300 text-blue-700 bg-blue-50 hover:bg-blue-100 active:bg-blue-200 dark:border-blue-600 dark:text-blue-200 dark:bg-blue-900/50 dark:hover:bg-blue-900'),
|
|
502
|
-
onClick: handleCopyModifiedSettings,
|
|
503
|
-
children: copiedModified ? jsxs(Fragment, {
|
|
504
|
-
children: [jsx(CheckIcon, {
|
|
505
|
-
className: "w-4 h-4"
|
|
506
|
-
}), jsx("span", {
|
|
507
|
-
children: "Copied!"
|
|
508
|
-
})]
|
|
509
|
-
}) : jsxs(Fragment, {
|
|
510
|
-
children: [jsx(CopyIcon, {
|
|
511
|
-
className: "w-4 h-4"
|
|
512
|
-
}), jsx("span", {
|
|
513
|
-
children: "Copy Modified Settings"
|
|
514
|
-
})]
|
|
515
|
-
})
|
|
516
|
-
})]
|
|
517
|
-
})]
|
|
518
|
-
})]
|
|
519
|
-
})]
|
|
520
|
-
})
|
|
521
|
-
});
|
|
522
|
-
};export{SettingDrawer};//# sourceMappingURL=SettingDrawer.js.map
|
|
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
|