@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,73 @@
|
|
|
1
|
+
import isBrowser from'../../../utils/isBrowser/index.js';/**
|
|
2
|
+
* Transform changed settings to wrap in uilayout structure for backend API
|
|
3
|
+
* Converts keys like "[desktop].theme" to "[desktop].uilayout.theme"
|
|
4
|
+
*/
|
|
5
|
+
function transformSettingsForBackend(changedSettings) {
|
|
6
|
+
const wrappedSettings = {};
|
|
7
|
+
function flattenAndWrap(obj, prefix = '') {
|
|
8
|
+
Object.keys(obj).forEach(key => {
|
|
9
|
+
const value = obj[key];
|
|
10
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
11
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
12
|
+
// Recursively flatten nested objects
|
|
13
|
+
flattenAndWrap(value, fullKey);
|
|
14
|
+
} else {
|
|
15
|
+
// For leaf values, insert .uilayout after the bracket prefix
|
|
16
|
+
const bracketPrefix = prefix.split('.')[0]; // Extract bracket part like "[/route][desktop]"
|
|
17
|
+
const settingPath = fullKey.replace(`${bracketPrefix}.`, ''); // Get the setting path after bracket
|
|
18
|
+
wrappedSettings[`${bracketPrefix}.uilayout.${settingPath}`] = value;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
Object.keys(changedSettings || {}).forEach(routeDeviceKey => {
|
|
23
|
+
const settingsObj = changedSettings[routeDeviceKey];
|
|
24
|
+
// Skip if not an object or if it's a route path
|
|
25
|
+
if (typeof settingsObj !== 'object' || settingsObj === null || routeDeviceKey.startsWith('/')) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
// Flatten the nested settings object with the route-device prefix
|
|
29
|
+
flattenAndWrap(settingsObj, routeDeviceKey);
|
|
30
|
+
});
|
|
31
|
+
return wrappedSettings;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Extract and parse settings from browser cookies
|
|
35
|
+
* Returns null if cookie not found or parsing fails
|
|
36
|
+
*/
|
|
37
|
+
function getCookieSettings() {
|
|
38
|
+
if (!isBrowser()) return null;
|
|
39
|
+
try {
|
|
40
|
+
const settingsCookie = document.cookie.split(';').find(cookie => cookie.startsWith(' settings='));
|
|
41
|
+
if (!settingsCookie) {
|
|
42
|
+
console.log('settings Cookie not found');
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const settingsValue = settingsCookie.split('=')[1];
|
|
46
|
+
const decodedComponent = decodeURIComponent(settingsValue);
|
|
47
|
+
const parsedSettings = JSON.parse(atob(decodedComponent));
|
|
48
|
+
console.log('Settings in cookies:', parsedSettings);
|
|
49
|
+
return parsedSettings;
|
|
50
|
+
} catch (err) {
|
|
51
|
+
console.error('Failed to get cookie settings:', err);
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Clear settings cookies by sending DELETE request to server
|
|
57
|
+
*/
|
|
58
|
+
async function clearSettingsCookies() {
|
|
59
|
+
if (!isBrowser()) return false;
|
|
60
|
+
try {
|
|
61
|
+
const response = await fetch('/resources/settings', {
|
|
62
|
+
method: 'DELETE',
|
|
63
|
+
headers: {
|
|
64
|
+
'Content-Type': 'application/json'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const result = await response.json();
|
|
68
|
+
return true;
|
|
69
|
+
} catch (err) {
|
|
70
|
+
console.error('⚠️ Failed to clear cookies:', err);
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}export{clearSettingsCookies,getCookieSettings,transformSettingsForBackend};//# sourceMappingURL=transformers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformers.js","sources":["../../../../src/components/SettingDrawer/utils/transformers.ts"],"sourcesContent":[null],"names":[],"mappings":"yDAEA;;;AAGG;AACG,SAAU,2BAA2B,CAAC,eAAoC,EAAA;QAC5E,eAAM,GAAe,EAAwB;AAE7C,EAAA,SAAA,cAAS,CAAA,GAAe,EAAwB,WAAmB,EAAE;UACjE,CAAA,IAAO,CAAA,GAAI,CAAC,CAAA,OAAK,CAAA,GAAO,IAAE;AACtB,MAAA,MAAA,KAAA,MAAW,CAAA,GAAG,CAAA;AAC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,IAAA;AACD,IAAA;AACA,IAAA,MAAA,aAAW,GAAC,cAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA;UACf,gBAAA,GAAA,kBAAA,CAAA,aAAA,CAAA;UAED,cAAM,GAAa,IAAG,CAAA,KAAA,CAAA,IAAA,CAAA,gBAA6B,CAAA,CAAA;AACnD,IAAA,OAAA,CAAA,0BAAyB,EAAA,cAAmB,CAAA;WAC5C,cAAM;AAEN,EAAA,CAAA,CAAA,OAAA,GAAA,EAAQ;AACR,IAAA,OAAA,CAAA,sCAAsB,EAAA,GAAA,CAAA;IAC1B,OAAC,IAAA;;AACG;AACA;;AAER;AAEA,eAAA,oBAAA,GAAA;;AAEG,EAAA,IAAA;AACH,IAAA,MAAO,QAAK,GAAA,MAAU,KAAA,CAAA,qBAAoB,EAAA;MACtC,gBAAgB;AAAE,MAAA,OAAA,EAAO;AAEzB,QAAI,cAAC,EAAA;AACD;AACI,KAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAO,MAAE,QAAA,CAAA,IAAA,EAAA;AACL,IAAA,OAAA,IAAA;AACH,EAAA,CAAA,CAAA,OAAA,GAAA,EAAA;AACJ,IAAA,OAAE,CAAA,KAAA,CAAA,6BAAA,EAAA,GAAA,CAAA;AAEH,IAAA,OAAA;AACA,EAAA;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ProSettings } from '@admin-layout/client';
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
value?: boolean;
|
|
4
|
+
onChange?: (checked: boolean) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export type ICheckboxThemeProps = {
|
|
8
|
+
list?: any[];
|
|
9
|
+
changeSetting?: (key: string, value: string | boolean | any) => void;
|
|
10
|
+
settings?: any;
|
|
11
|
+
location?: any;
|
|
12
|
+
routePattern?: string;
|
|
13
|
+
applyToAllRoutes?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type ILayoutSettingsProps = {
|
|
16
|
+
settings?: Partial<ProSettings>;
|
|
17
|
+
changeSetting?: (key: string, value: string | boolean) => void;
|
|
18
|
+
location?: any;
|
|
19
|
+
routePattern?: string;
|
|
20
|
+
applyToAllRoutes?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type NavMenuSelectorProps = {
|
|
23
|
+
changeSetting?: (key: string, value: string | boolean | any) => void;
|
|
24
|
+
settings?: any;
|
|
25
|
+
location?: any;
|
|
26
|
+
routePattern?: string;
|
|
27
|
+
applyToAllRoutes?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type IRegionalSettingsProps = {
|
|
30
|
+
settings?: Partial<ProSettings | any>;
|
|
31
|
+
changeSetting?: (key: string, value: string | boolean | any) => void;
|
|
32
|
+
location?: any;
|
|
33
|
+
routePattern?: string;
|
|
34
|
+
applyToAllRoutes?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type MergerSettingsType<T> = Partial<T> & {
|
|
37
|
+
primaryColor?: string;
|
|
38
|
+
colorWeak?: boolean;
|
|
39
|
+
upperMenuDividerName?: string;
|
|
40
|
+
middleMenuDividerName?: string;
|
|
41
|
+
lowerMenuDividerName?: string;
|
|
42
|
+
};
|
|
43
|
+
export interface IShowSettingPanel extends ProSettings {
|
|
44
|
+
showSettingPanel: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface SettingDrawerProps {
|
|
47
|
+
settings?: MergerSettingsType<IShowSettingPanel | ProSettings>;
|
|
48
|
+
collapse?: boolean;
|
|
49
|
+
getContainer?: any;
|
|
50
|
+
publicPath?: string;
|
|
51
|
+
hideLoading?: boolean;
|
|
52
|
+
hideColors?: boolean;
|
|
53
|
+
hideHintAlert?: boolean;
|
|
54
|
+
prefixCls?: string;
|
|
55
|
+
hideCopyButton?: boolean;
|
|
56
|
+
navTheme?: string;
|
|
57
|
+
primaryColor?: string;
|
|
58
|
+
pathname?: string;
|
|
59
|
+
routePattern?: string;
|
|
60
|
+
onCollapseChange?: (collapse: boolean) => void;
|
|
61
|
+
onSettingChange?: (settings: MergerSettingsType<ProSettings>) => void;
|
|
62
|
+
actor?: any;
|
|
63
|
+
colorList?: {
|
|
64
|
+
key: string;
|
|
65
|
+
color: string;
|
|
66
|
+
title?: string;
|
|
67
|
+
}[];
|
|
68
|
+
toggleContent?: string;
|
|
69
|
+
hasPageChange?: boolean;
|
|
70
|
+
hasChangePage?: boolean;
|
|
71
|
+
onChangeAllPages?: () => void;
|
|
72
|
+
isOpen?: boolean;
|
|
73
|
+
setOpen?: (open: boolean) => void;
|
|
74
|
+
fullMenuData?: any;
|
|
75
|
+
location?: any;
|
|
76
|
+
}
|
|
77
|
+
export type IThemeColorProps = {
|
|
78
|
+
color?: Array<{
|
|
79
|
+
key: string;
|
|
80
|
+
color: string;
|
|
81
|
+
title?: string;
|
|
82
|
+
}>;
|
|
83
|
+
changeSetting?: (key: string, value: string | boolean | any) => void;
|
|
84
|
+
settings?: any;
|
|
85
|
+
location?: any;
|
|
86
|
+
routePattern?: string;
|
|
87
|
+
applyToAllRoutes?: boolean;
|
|
88
|
+
};
|
|
89
|
+
export interface ThemeSelectorProps {
|
|
90
|
+
value: string;
|
|
91
|
+
onChange: (theme: string) => void;
|
|
92
|
+
options: Array<{
|
|
93
|
+
key: string;
|
|
94
|
+
title: string;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
export interface WebFontsSelectorProps {
|
|
98
|
+
value: string;
|
|
99
|
+
onChange: (fontFamily: string) => void;
|
|
100
|
+
options: Array<{
|
|
101
|
+
key: string;
|
|
102
|
+
title: string;
|
|
103
|
+
}>;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/SettingDrawer/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,E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AAW,qBAAqB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,KAAK,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACN"}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { IAppLoadContext } from '@common-stack/client-core';
|
|
2
|
+
import { IResourceParams } from '@common-stack/core';
|
|
3
|
+
export declare const action: ({ request, context, params, }: {
|
|
4
|
+
request: Request;
|
|
5
|
+
context?: IAppLoadContext;
|
|
6
|
+
params?: IResourceParams;
|
|
7
|
+
}) => Promise<import("@remix-run/node").TypedResponse<any>>;
|
|
8
|
+
export declare const loader: ({ request, context, params, }: {
|
|
9
|
+
request: Request;
|
|
10
|
+
context?: IAppLoadContext;
|
|
11
|
+
params?: IResourceParams;
|
|
12
|
+
}) => Promise<import("@remix-run/node").TypedResponse<{
|
|
13
|
+
settings: any;
|
|
14
|
+
}> | import("@remix-run/node").TypedResponse<{
|
|
15
|
+
error: string;
|
|
16
|
+
}>>;
|
|
2
17
|
//# sourceMappingURL=UpdateSettingsResource.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettingsResource.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettingsResource/UpdateSettingsResource.server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSettingsResource.server.d.ts","sourceRoot":"","sources":["../../../src/components/UpdateSettingsResource/UpdateSettingsResource.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAOrD,eAAO,MAAM,MAAM,GAAU,+BAI1B;IACC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B,0DAyCA,CAAC;AAEF,eAAO,MAAM,MAAM,GAAU,+BAI1B;IACC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC5B;;;;GAmBA,CAAC"}
|
|
@@ -1,4 +1,97 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { json } from '@remix-run/node';
|
|
2
|
+
import { settingsCookie, settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
|
|
3
|
+
const action = async ({
|
|
4
|
+
request,
|
|
5
|
+
context,
|
|
6
|
+
params
|
|
7
|
+
}) => {
|
|
8
|
+
try {
|
|
9
|
+
// Handle DELETE request - Clear settings cookies
|
|
10
|
+
// Note: Database deletion is handled by resetApplicationSettings mutation on the client
|
|
11
|
+
if (request.method === 'DELETE') {
|
|
12
|
+
try {
|
|
13
|
+
// Clear the settings cookie by setting it to empty with maxAge 0
|
|
14
|
+
const cookie = await settingsCookie.serialize({}, {
|
|
15
|
+
maxAge: 0
|
|
16
|
+
});
|
|
17
|
+
return json({
|
|
18
|
+
success: true,
|
|
19
|
+
message: 'Settings cookies cleared successfully'
|
|
20
|
+
}, {
|
|
21
|
+
headers: {
|
|
22
|
+
'Set-Cookie': cookie
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error('❌ Error clearing cookies:', error);
|
|
27
|
+
return json({
|
|
28
|
+
success: false,
|
|
29
|
+
error: 'Failed to clear cookies'
|
|
30
|
+
}, {
|
|
31
|
+
status: 500
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Handle POST request - Update settings using the utility
|
|
36
|
+
const {
|
|
37
|
+
settings,
|
|
38
|
+
setCookie
|
|
39
|
+
} = await settingsLoaderUtil({
|
|
40
|
+
request,
|
|
41
|
+
context,
|
|
42
|
+
params
|
|
43
|
+
});
|
|
44
|
+
// Return the full settings as JSON, and set the new cookie in the response headers
|
|
45
|
+
return json(settings, {
|
|
46
|
+
headers: {
|
|
47
|
+
'Set-Cookie': setCookie
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} catch (error) {
|
|
51
|
+
// If anything fails, log the error and return a 500 error response
|
|
52
|
+
console.error('Error in action:', error);
|
|
53
|
+
return json({
|
|
54
|
+
error: 'Failed to update settings'
|
|
55
|
+
}, {
|
|
56
|
+
status: 500
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const loader = async ({
|
|
61
|
+
request,
|
|
62
|
+
context,
|
|
63
|
+
params
|
|
64
|
+
}) => {
|
|
65
|
+
try {
|
|
66
|
+
const {
|
|
67
|
+
settings,
|
|
68
|
+
setCookie
|
|
69
|
+
} = await settingsLoaderUtil({
|
|
70
|
+
request,
|
|
71
|
+
context,
|
|
72
|
+
params
|
|
73
|
+
});
|
|
74
|
+
// Always include headers, but only set cookie if provided
|
|
75
|
+
const headers = {};
|
|
76
|
+
if (setCookie) {
|
|
77
|
+
headers['Set-Cookie'] = setCookie;
|
|
78
|
+
}
|
|
79
|
+
// returnInfo: {"returnType":"json","keys":["settings"],"hasOptions":true}
|
|
80
|
+
return {
|
|
81
|
+
data: [settings],
|
|
82
|
+
options: {
|
|
83
|
+
headers
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error('Error in settings loader:', error);
|
|
88
|
+
// returnInfo: {"returnType":"json","keys":["settings","error"],"hasOptions":true}
|
|
89
|
+
return {
|
|
90
|
+
data: ['Failed to load settings'],
|
|
91
|
+
options: {
|
|
92
|
+
status: 500
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export { action, loader }; //# sourceMappingURL=UpdateSettingsResource.server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettingsResource.server.js","sources":["../../../src/components/UpdateSettingsResource/UpdateSettingsResource.server.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSettingsResource.server.js","sources":["../../../src/components/UpdateSettingsResource/UpdateSettingsResource.server.ts"],"sourcesContent":[null],"names":[],"mappings":"4JAQO,MAAM,MAAM,GAAG,OAAO;AASzB,EAAA,OAAK;SACD;;AAEA,CAAA,KAAA;AACI,EAAA,IAAA;;AAEI;gBAEA,MAAA,KAAW,QACL,EAAO;AAEL,MAAA,IAAA;AACI;AACH,QAAA,MAAA,MAAA,GAAA,MAAA,cAAA,CAAA,SAAA,CAAA,EAAA,EAAA;AACJ,UAAA,MAAA,EACJ;;eACH,IAAO,CAAA;AACL,UAAA,OAAA,EAAA,IAAO;AACP,UAAA,OAAA,EAAA;;UAEP,OAAA,EAAA;YAED,YAAA,EAAA;;;eAGI,KAAO,EAAA;eACP,CAAA,KAAM,CAAA,2BAAA,EAAA,KAAA,CAAA;AACT,QAAA,OAAE,IAAA,CAAA;UAEH,OAAA,EAAA,KAAA;UACA,KAAO,EAAA;AACH,SAAA,EAAA;AACI,UAAA,MAAA,EAAA;AACH,SAAA,CAAA;AACJ,MAAA;IACL;;UACI;AACA,MAAA,QAAA;AACA,MAAA;KACH,GAAA,MAAA,kBAAA,CAAA;AACL,MAAE,OAAA;AAEF,MAAM,OAAO;AAST,MAAA;;;eAGQ,CAAA,QAAO,EAAA;aACP,EAAA;AACH,QAAA,YAAE,EAAA;;;WAIH,KAAI,EAAA;AACA;WACH,CAAA,KAAA,CAAA,kBAAA,EAAA,KAAA,CAAA;WAED,IAAO,CAAA;MACV,KAAA,EAAA;KAAC,EAAA;AACE,MAAA,MAAA,EAAA;AACA,KAAA,CAAA;;AAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{MainHeader}from'./Layout/GlobalHeader/MainHeader.js';export{RightMenu}from'./Layout/GlobalHeader/RightMenu.js';//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,73 +1,177 @@
|
|
|
1
1
|
import * as H from 'history';
|
|
2
2
|
import { RouterProps as BasicRouteProps } from 'react-router-dom';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { GlobalHeaderProps, MenuDataItem, ProSettings, SeparateMenusTypes } from '@admin-layout/client';
|
|
5
|
+
import { PermissionType } from 'common';
|
|
4
6
|
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
5
7
|
to: H.Location;
|
|
6
8
|
replace?: boolean;
|
|
7
9
|
innerRef?: React.Ref<HTMLAnchorElement>;
|
|
8
10
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
export type MergerSettingsType<T> = Partial<T> & {
|
|
12
|
+
primaryColor?: string;
|
|
13
|
+
colorWeak?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export interface IRoute extends MenuDataItem {
|
|
16
|
+
routes?: IRoute[];
|
|
17
|
+
}
|
|
18
|
+
export type WithFalse<T> = T | false;
|
|
19
|
+
export interface RouterTypes<P> extends Omit<BasicRouteProps, 'location'> {
|
|
20
|
+
computedMatch?: any;
|
|
21
|
+
route?: IRoute;
|
|
22
|
+
location: BasicRouteProps['location'] | {
|
|
23
|
+
pathname?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface MessageDescriptor {
|
|
27
|
+
id: any;
|
|
28
|
+
description?: string;
|
|
29
|
+
defaultMessage?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SidebarMenuProps {
|
|
32
|
+
menuData: MenuDataItem[];
|
|
33
|
+
routeParams: Record<string, string>;
|
|
34
|
+
settings: {
|
|
35
|
+
primaryColor: string;
|
|
36
|
+
};
|
|
37
|
+
collapsed?: boolean;
|
|
38
|
+
siderPinned?: boolean;
|
|
39
|
+
setSiderPinned?: (siderPinned: boolean) => void;
|
|
40
|
+
actor?: any;
|
|
41
|
+
deviceSettings?: any;
|
|
42
|
+
}
|
|
43
|
+
export interface SidebarProps {
|
|
44
|
+
isSideMenuOpen: boolean;
|
|
45
|
+
closeSideMenu: () => void;
|
|
46
|
+
menuData: any;
|
|
47
|
+
collapsed: boolean;
|
|
48
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
49
|
+
routeParams: {
|
|
50
|
+
orgName?: string;
|
|
51
|
+
[key: string]: string;
|
|
52
|
+
};
|
|
53
|
+
settings?: any;
|
|
54
|
+
sideBarMarginTop?: string;
|
|
55
|
+
showHeader?: boolean;
|
|
56
|
+
upperMenuDividerName?: string;
|
|
57
|
+
middleMenuDividerName?: string;
|
|
58
|
+
lowerMenuDividerName?: string;
|
|
59
|
+
location?: any;
|
|
60
|
+
siderPinned?: boolean;
|
|
61
|
+
setSiderPinned?: (siderPinned: boolean) => void;
|
|
62
|
+
layoutSettings?: any;
|
|
63
|
+
deviceSettings?: any;
|
|
64
|
+
menuHeaderRender?: any;
|
|
65
|
+
isSideMenuLayout?: boolean;
|
|
66
|
+
actor?: any;
|
|
67
|
+
authorities?: Record<string, PermissionType>;
|
|
68
|
+
picture?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface BottomMenuDropDownProps {
|
|
71
|
+
menus: any;
|
|
72
|
+
collapsed: boolean;
|
|
73
|
+
routeParams: {
|
|
74
|
+
orgName?: string;
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
};
|
|
77
|
+
layoutSettings?: any;
|
|
78
|
+
}
|
|
79
|
+
export interface GlobalHeaderRightProps {
|
|
80
|
+
theme?: string;
|
|
81
|
+
layout?: any;
|
|
82
|
+
upperMenus: any;
|
|
83
|
+
routeParams: {
|
|
84
|
+
orgName?: string;
|
|
85
|
+
[key: string]: string;
|
|
86
|
+
};
|
|
87
|
+
formatMessage?: any;
|
|
88
|
+
collapsed?: boolean;
|
|
89
|
+
settings?: ProSettings;
|
|
90
|
+
toggleSideMenu?: any;
|
|
91
|
+
location?: any;
|
|
92
|
+
}
|
|
93
|
+
export interface ILogoProps {
|
|
94
|
+
logo: any;
|
|
95
|
+
settings: any;
|
|
96
|
+
scrolled: any;
|
|
97
|
+
location: any;
|
|
98
|
+
}
|
|
99
|
+
export type PrivateHeaderProps = {
|
|
100
|
+
scrolled?: boolean;
|
|
101
|
+
drawerRef?: any;
|
|
102
|
+
setSettingToggle?: any;
|
|
103
|
+
settingToggle?: any;
|
|
104
|
+
navTheme?: any;
|
|
105
|
+
location?: any;
|
|
106
|
+
layout?: any;
|
|
107
|
+
title?: any;
|
|
108
|
+
menuData?: IRoute[];
|
|
109
|
+
routeParams?: any;
|
|
110
|
+
settings?: any;
|
|
111
|
+
transition?: any;
|
|
112
|
+
onSettingChange?: (settings: MergerSettingsType<ProSettings>) => void;
|
|
113
|
+
pageTitleInfo?: any;
|
|
114
|
+
searchOptionsShown?: boolean;
|
|
115
|
+
setSearchOptionsShown?: (optionsShown: boolean) => void;
|
|
116
|
+
authorities: Record<string, PermissionType>;
|
|
117
|
+
picture?: string;
|
|
118
|
+
componentVisibility?: Record<string, boolean>;
|
|
119
|
+
containerRef?: React.RefObject<HTMLDivElement>;
|
|
120
|
+
};
|
|
121
|
+
export interface MainHeaderProps extends Partial<GlobalHeaderProps> {
|
|
122
|
+
rightContentRender?: WithFalse<(props: any) => React.ReactNode>;
|
|
123
|
+
showSettings?: boolean;
|
|
124
|
+
showMenu?: boolean;
|
|
125
|
+
toggleSideMenu?: () => void;
|
|
126
|
+
}
|
|
127
|
+
export type IRightMenuProps = {
|
|
128
|
+
match?: any;
|
|
129
|
+
menuData?: IRoute[];
|
|
130
|
+
scrolled?: boolean;
|
|
131
|
+
navTheme?: string;
|
|
132
|
+
getMenuSeparation?: (menuData: [] | any) => SeparateMenusTypes;
|
|
133
|
+
routeParams: {
|
|
134
|
+
orgName?: string;
|
|
135
|
+
};
|
|
136
|
+
settings?: Partial<ProSettings>;
|
|
137
|
+
authorities: Record<string, PermissionType>;
|
|
138
|
+
picture?: string;
|
|
139
|
+
isMobile?: boolean;
|
|
140
|
+
};
|
|
141
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
30
142
|
/**
|
|
31
|
-
*
|
|
143
|
+
* Text to display in the middle of the divider
|
|
32
144
|
*/
|
|
33
|
-
|
|
145
|
+
children?: React.ReactNode;
|
|
34
146
|
/**
|
|
35
|
-
*
|
|
147
|
+
* Direction of the divider
|
|
148
|
+
* @default "horizontal"
|
|
36
149
|
*/
|
|
37
|
-
|
|
150
|
+
orientation?: 'horizontal' | 'vertical';
|
|
38
151
|
/**
|
|
39
|
-
*
|
|
152
|
+
* Whether the divider text is less emphasized
|
|
153
|
+
* @default false
|
|
40
154
|
*/
|
|
41
|
-
|
|
155
|
+
plain?: boolean;
|
|
42
156
|
/**
|
|
43
|
-
*
|
|
157
|
+
* Custom className for the divider
|
|
44
158
|
*/
|
|
45
|
-
|
|
159
|
+
className?: string;
|
|
46
160
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @description When this node is selected, the node of ParentKeys will be selected.
|
|
161
|
+
* Custom style for the divider
|
|
49
162
|
*/
|
|
50
|
-
|
|
163
|
+
style?: React.CSSProperties;
|
|
51
164
|
/**
|
|
52
|
-
*
|
|
165
|
+
* Text alignment
|
|
166
|
+
* @default "center"
|
|
53
167
|
*/
|
|
54
|
-
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
}
|
|
57
|
-
export interface Route extends MenuDataItem {
|
|
58
|
-
routes?: Route[];
|
|
168
|
+
align?: 'left' | 'right' | 'center';
|
|
59
169
|
}
|
|
60
|
-
export
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface MessageDescriptor {
|
|
69
|
-
id: any;
|
|
70
|
-
description?: string;
|
|
71
|
-
defaultMessage?: string;
|
|
170
|
+
export interface DynamicTypeIconsProps {
|
|
171
|
+
icon: any;
|
|
172
|
+
iconColor?: string;
|
|
173
|
+
w?: any;
|
|
174
|
+
h?: any;
|
|
175
|
+
iconStyle?: any;
|
|
72
176
|
}
|
|
73
177
|
//# sourceMappingURL=typings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../src/components/typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../src/components/typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAgB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,WAAW,SAAU,SAAQ,KAAK,C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Ac,CAAC;IACtE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,CAAC,EAAE,GAAG,CAAC;IACR,CAAC,CAAC,EAAE,GAAG,CAAC;IACR,SAAS,CAAC,EAAE,GAAG,CAAC;CACnB"}
|
package/lib/compute.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../src/compute.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../src/compute.ts"],"names":[],"mappings":"AA8BA,QAAA,MAAM,aAAa,0CAA0C,CAAC;AAG9D,QAAA,MAAM,cAAc,0CAA2C,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
|
package/lib/compute.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { getFilteredMenus, getFilteredRoutes } from '@common-stack/client-react/lib/utils/filteredRoutes.js';
|
|
2
|
+
import { config } from './config/env-config.js';
|
|
2
3
|
const key = 'root-layout';
|
|
3
|
-
const
|
|
4
|
+
const tailwindDesignProPage = [{
|
|
4
5
|
key: key,
|
|
5
6
|
name: 'root layout',
|
|
6
|
-
path:
|
|
7
|
+
path: config.LAYOUT_ROOT,
|
|
7
8
|
auth: 'optional',
|
|
8
9
|
extraPermissions: ['*'],
|
|
9
10
|
exact: false,
|
|
@@ -11,6 +12,7 @@ const antUIPage = [{
|
|
|
11
12
|
hasLoader: true,
|
|
12
13
|
hasClientLoader: true,
|
|
13
14
|
hasComponent: true,
|
|
15
|
+
hasLinks: true,
|
|
14
16
|
hasShouldRevalidate: true,
|
|
15
17
|
hasHandle: true,
|
|
16
18
|
loaderReturnInfo: {
|
|
@@ -23,14 +25,22 @@ const antUIPage = [{
|
|
|
23
25
|
hasServerCode: true,
|
|
24
26
|
name: 'UpdateSettingsResource',
|
|
25
27
|
isResourceRoute: true,
|
|
26
|
-
auth: false
|
|
28
|
+
auth: false
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
,
|
|
31
|
+
|
|
27
32
|
path: '/resources/settings',
|
|
28
33
|
componentPath: "@admin-layout/tailwind-design-pro/lib/components/UpdateSettingsResource/UpdateSettingsResource.js",
|
|
29
34
|
hasLoader: true,
|
|
30
|
-
hasAction: true
|
|
35
|
+
hasAction: true,
|
|
36
|
+
loaderReturnInfo: {
|
|
37
|
+
returnType: "json",
|
|
38
|
+
hasOptions: true,
|
|
39
|
+
keys: ["settings", "error"]
|
|
40
|
+
}
|
|
31
41
|
}];
|
|
32
42
|
// get menus
|
|
33
|
-
getFilteredMenus(
|
|
43
|
+
getFilteredMenus(tailwindDesignProPage);
|
|
34
44
|
// get routes
|
|
35
|
-
const filteredRoutes = getFilteredRoutes(
|
|
45
|
+
const filteredRoutes = getFilteredRoutes(tailwindDesignProPage);
|
|
36
46
|
export { filteredRoutes }; //# sourceMappingURL=compute.js.map
|
package/lib/compute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.js","sources":["../src/compute.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute.js","sources":["../src/compute.ts"],"sourcesContent":[null],"names":[],"mappings":"oJAIA,MAAM,GAAG,GAAG,aAAa;AAEzB,MAAM,qBAAqB,GAAmB,CAAA;AAC1C,EAAA,GAAA,EAAA,GAAA;AACI,EAAA,IAAA,EAAA,aAAQ;AACR,EAAA,IAAA,EAAA,MAAM,CAAA,WAAA;QACN,UAAM;AACN,EAAA,gBAAM,EAAA,CAAA,GAAU,CAAA;SAChB,KAAA;AACA,EAAA,SAAA,EAAK,MAAE,OAAK,0CAAA;AAEZ,CAAA,EAAA;AACH,EAAA,GAAA,EAAA,0BAAA;AACD,EAAA,aAAA,EAAA,IAAA;AACI,EAAA,IAAA,EAAA,wBAAK;AACL,EAAA,eAAA,EAAA,IAAe;AACf,EAAA,IAAA,EAAA;AACA;AACA,EAAA,SAAA,QAAW,OAAA,+DAAA,CAAA;QACX;AACA,CAAA,CAAA;AACA;AACH,gBAAA,CAAA,qBAAA;;AAGL,MAAA,cAAY,GAAA,iBAAA,CAAA,qBAAA"}
|