@admin-layout/tailwind-design-pro 12.0.16-alpha.9 → 12.0.16-alpha.90
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/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/es/menu.json +2 -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.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +16 -20
- 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 +220 -124
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +2 -0
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +16 -13
- 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 +9 -14
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.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 +38 -10
- 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 +54 -85
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +1 -1
- 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 +73 -6
- 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 +2 -4
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- 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 +69 -7
- 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 +330 -0
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- 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 +246 -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 +467 -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 +279 -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 +332 -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 +29 -10
- 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.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js.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.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.d.ts +4 -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.js.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +4 -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 -3
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +166 -416
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +7 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +30 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +3 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{CheckBoxTheme.js → components/CheckBoxTheme.js} +14 -5
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +7 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js +82 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +3 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{InvitationSettings.js → components/InvitationSettings.js} +11 -7
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +3 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{LayoutChange.js → components/LayoutChange.js} +24 -17
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +20 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +119 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +3 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{NavigationsModes.js → components/NavigationsModes.js} +91 -40
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +3 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{RegionalSettings.js → components/RegionalSettings.js} +55 -178
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +12 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js +69 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +4 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +25 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
- package/lib/components/SettingDrawer/{Switch/index.d.ts → components/Switch.d.ts} +2 -2
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{Switch/index.js → components/Switch.js} +1 -1
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +3 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
- package/lib/components/SettingDrawer/{ThemeColor.js → components/ThemeColor.js} +16 -4
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
- package/lib/components/SettingDrawer/{ThemeSelector.d.ts → components/ThemeSelector.d.ts} +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -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 +119 -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 +243 -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 +76 -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 +10 -5
- 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.js +1 -1
- package/lib/components/typings.d.ts +20 -1
- 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/constants.js.map +1 -1
- package/lib/config/env-config.d.ts +3 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +10 -0
- package/lib/config/env-config.js.map +1 -1
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/hooks/useMediaQuery.js.map +1 -1
- package/lib/hooks/useScrollThreshold.js.map +1 -1
- package/lib/hooks/useTailwindTheme.js +82 -0
- package/lib/hooks/useTailwindTheme.js.map +1 -0
- 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 -0
- 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 +139 -168
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/machines/settingsMachine.test.d.ts +2 -0
- package/lib/machines/settingsMachine.test.d.ts.map +1 -0
- 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.js.map +1 -1
- package/lib/routes.json +9 -1
- package/lib/tailwindConfig.js.map +1 -1
- package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
- package/lib/utils/__tests__/configOverrides.test.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 +6 -6
- 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 -180
- 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 -176
- 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.map +0 -1
- package/lib/components/SettingDrawer/InvitationSettings.d.ts +0 -3
- package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/InvitationSettings.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.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.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.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
- 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.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +0 -1
- 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.map +0 -1
- package/lib/components/SettingDrawer/types.d.ts.map +0 -1
- /package/lib/components/SettingDrawer/{ThemeSelector.js → components/ThemeSelector.js} +0 -0
- /package/lib/components/SettingDrawer/{WebFontsSelector.js → components/WebFontsSelector.js} +0 -0
package/lib/machines/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type ThemeColor = 'blue' | 'indigo' | 'red' | 'orange' | 'yellow' | 'teal' | 'green' | 'blue' | 'purple';
|
|
2
2
|
export type NavigationMode = 'sidebar' | 'topbar' | 'mixed';
|
|
3
|
-
export type SideMenuType = 'expanded' | 'collapsed';
|
|
3
|
+
export type SideMenuType = 'expanded' | 'collapsed' | 'perplexLayout';
|
|
4
4
|
export type ContentWidth = 'fixed' | 'fluid';
|
|
5
5
|
export declare enum SearchBarBehavior {
|
|
6
6
|
PERMANENT = "permanent",
|
|
@@ -43,6 +43,58 @@ export type RouteSettings = {
|
|
|
43
43
|
lowerMenuDividerName?: string;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
header?: {
|
|
47
|
+
desktop?: {
|
|
48
|
+
showLogo?: boolean;
|
|
49
|
+
showSearchSlot?: boolean;
|
|
50
|
+
showRightContent?: boolean;
|
|
51
|
+
showMenuToggle?: boolean;
|
|
52
|
+
showBackButton?: boolean;
|
|
53
|
+
showPageTitle?: boolean;
|
|
54
|
+
showActionButtons?: boolean;
|
|
55
|
+
position?: 'fixed' | 'static';
|
|
56
|
+
height?: string;
|
|
57
|
+
elevation?: number;
|
|
58
|
+
showHeader?: boolean;
|
|
59
|
+
showMenu?: boolean;
|
|
60
|
+
menuHeaderRender?: boolean;
|
|
61
|
+
searchBarRender?: boolean;
|
|
62
|
+
searchBarBehavior?: SearchBarBehavior;
|
|
63
|
+
searchBarOverlay?: boolean;
|
|
64
|
+
scrollThreshold?: number;
|
|
65
|
+
};
|
|
66
|
+
mobile?: {
|
|
67
|
+
showLogo?: boolean;
|
|
68
|
+
showSearchSlot?: boolean;
|
|
69
|
+
showRightContent?: boolean;
|
|
70
|
+
showMenuToggle?: boolean;
|
|
71
|
+
showBackButton?: boolean;
|
|
72
|
+
showPageTitle?: boolean;
|
|
73
|
+
showActionButtons?: boolean;
|
|
74
|
+
position?: 'fixed' | 'static';
|
|
75
|
+
height?: string;
|
|
76
|
+
elevation?: number;
|
|
77
|
+
showHeader?: boolean;
|
|
78
|
+
showMenu?: boolean;
|
|
79
|
+
menuHeaderRender?: boolean;
|
|
80
|
+
searchBarRender?: boolean;
|
|
81
|
+
searchBarBehavior?: SearchBarBehavior;
|
|
82
|
+
searchBarOverlay?: boolean;
|
|
83
|
+
scrollThreshold?: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
footer?: {
|
|
87
|
+
desktop?: {
|
|
88
|
+
showFooter?: boolean;
|
|
89
|
+
};
|
|
90
|
+
mobile?: {
|
|
91
|
+
showFooter?: boolean;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
background?: {
|
|
95
|
+
desktop?: BackgroundSettings;
|
|
96
|
+
mobile?: BackgroundSettings;
|
|
97
|
+
};
|
|
46
98
|
regions?: {
|
|
47
99
|
desktop?: {
|
|
48
100
|
background?: BackgroundSettings;
|
|
@@ -96,7 +148,11 @@ export type RouteSettings = {
|
|
|
96
148
|
};
|
|
97
149
|
};
|
|
98
150
|
};
|
|
99
|
-
|
|
151
|
+
/**
|
|
152
|
+
* UI Settings - User-facing settings that control the visual appearance and layout.
|
|
153
|
+
* This includes all visual/layout settings but excludes internal machine state.
|
|
154
|
+
*/
|
|
155
|
+
export interface UISettings {
|
|
100
156
|
navTheme: 'light' | 'dark' | 'realDark';
|
|
101
157
|
primaryColor: string;
|
|
102
158
|
secondaryColor: string;
|
|
@@ -111,6 +167,7 @@ export interface SettingsContext {
|
|
|
111
167
|
titleFontSize: string;
|
|
112
168
|
letterSpacings: string;
|
|
113
169
|
siderBgColor: string;
|
|
170
|
+
sideMenuType: SideMenuType;
|
|
114
171
|
headerBgColor: string;
|
|
115
172
|
textColor: string;
|
|
116
173
|
themeType: string;
|
|
@@ -125,11 +182,46 @@ export interface SettingsContext {
|
|
|
125
182
|
verifyFormShowSkipButton: boolean;
|
|
126
183
|
components: ComponentSettings[];
|
|
127
184
|
activeComponent?: string;
|
|
128
|
-
|
|
129
|
-
|
|
185
|
+
hiddenMenuKeys?: string[];
|
|
186
|
+
hiddenMenuCategories?: string[];
|
|
187
|
+
uiSettings?: {
|
|
188
|
+
uilayout?: {
|
|
189
|
+
layout?: any;
|
|
190
|
+
regions?: any;
|
|
191
|
+
};
|
|
192
|
+
overrides?: Record<string, any>;
|
|
193
|
+
};
|
|
194
|
+
overrides?: Record<string, any>;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Machine-internal state used for XState machine logic only.
|
|
198
|
+
* These values are NEVER exposed to consumers or synced to Redux.
|
|
199
|
+
*
|
|
200
|
+
* IMPORTANT: This interface contains ONLY machine-internal state.
|
|
201
|
+
* NO user-facing settings should be added here.
|
|
202
|
+
*/
|
|
203
|
+
export interface MachineInternalState {
|
|
204
|
+
configModel: any;
|
|
205
|
+
deviceType: 'desktop' | 'mobile';
|
|
206
|
+
currentRoute: string;
|
|
207
|
+
changedSettings: Record<string, any>;
|
|
208
|
+
currentChangedSetting?: Record<string, any>;
|
|
209
|
+
routePattern?: string;
|
|
130
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Settings Context - Complete state with separated UI and internal concerns.
|
|
213
|
+
*/
|
|
214
|
+
export interface SettingsContext {
|
|
215
|
+
public: UISettings;
|
|
216
|
+
internal: MachineInternalState;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Legacy type for backward compatibility
|
|
220
|
+
* @deprecated Use UISettings instead
|
|
221
|
+
*/
|
|
222
|
+
export type SettingsContextLegacy = UISettings;
|
|
131
223
|
export type UpdateEvent = {
|
|
132
|
-
type: '
|
|
224
|
+
type: 'UISETTING_UPDATE';
|
|
133
225
|
value?: Partial<SettingsContext>;
|
|
134
226
|
};
|
|
135
227
|
export type ComponentEvent = {
|
|
@@ -146,7 +238,7 @@ export type ComponentEvent = {
|
|
|
146
238
|
type: 'CLEAR_COMPONENT_SELECTION';
|
|
147
239
|
};
|
|
148
240
|
export type MachineEvent = {
|
|
149
|
-
type: '
|
|
241
|
+
type: 'UISETTING_UPDATE';
|
|
150
242
|
value: Partial<SettingsContext>;
|
|
151
243
|
} | {
|
|
152
244
|
type: 'REGISTER_COMPONENT';
|
|
@@ -161,14 +253,20 @@ export type MachineEvent = {
|
|
|
161
253
|
} | {
|
|
162
254
|
type: 'CLEAR_COMPONENT_SELECTION';
|
|
163
255
|
} | {
|
|
164
|
-
type: '
|
|
256
|
+
type: 'UISETTING_RESET';
|
|
165
257
|
} | {
|
|
166
258
|
type: 'SAVE';
|
|
167
259
|
} | {
|
|
168
|
-
type: '
|
|
260
|
+
type: 'UISETTING_RESET_CHANGED_SETTINGS';
|
|
261
|
+
} | {
|
|
262
|
+
type: 'UISETTING_ROUTE_CHANGE';
|
|
169
263
|
pathname: string;
|
|
264
|
+
routePattern?: string;
|
|
170
265
|
} | {
|
|
171
|
-
type: '
|
|
266
|
+
type: 'UISETTING_UPDATE_ROUTE_SETTINGS';
|
|
172
267
|
settings: Record<string, Partial<SettingsContext>>;
|
|
268
|
+
} | {
|
|
269
|
+
type: 'UISETTING_UPDATE_DEVICE_TYPE';
|
|
270
|
+
deviceType: 'desktop' | 'mobile';
|
|
173
271
|
};
|
|
174
272
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/machines/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/machines/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,eAAe,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7C,oBAAY,iBAAiB;IACzB,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE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,QAAQ,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../src/machines/types.ts"],"sourcesContent":[null],"names":[],"mappings":"IAKY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,EAAA,iBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;AACA,EAAA,iBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;AACJ,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../src/machines/types.ts"],"sourcesContent":[null],"names":[],"mappings":"IAKY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,EAAA,iBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;AACA,EAAA,iBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;AACJ,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA"}
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.tsx"],"sourcesContent":[null],"names":[],"mappings":"oOAWA;AACA;AACA;AACA,eAAe,IAAI,OAAO,CAAC;AACvB,EAAA,oBAAA,EAAoB;;;;;AAKnB,GAAA;AACD,EAAA,WAAA,EAAW,
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.tsx"],"sourcesContent":[null],"names":[],"mappings":"oOAWA;AACA;AACA;AACA,eAAe,IAAI,OAAO,CAAC;AACvB,EAAA,oBAAA,EAAoB;;;;;AAKnB,GAAA;AACD,EAAA,WAAA,EAAW,cAAE;AACb,EAAA,iBAAA,EAAiB;gBACb,EAAA,CAAA,cAAe;AAClB,GAAA;AACD,EAAA,OAAA,EAAO;qBACH;AACA,IAAA,QAAA,EAAA,eAAU;AACV,IAAA,MAAA,EAAA;AACH,GAAA;cACD,EAAY,CAAA,wDAAG;AAClB,CAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchReducer.js","sources":["../../src/redux/searchReducer.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;
|
|
1
|
+
{"version":3,"file":"searchReducer.js","sources":["../../src/redux/searchReducer.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACO,MAAM,cAAc,GAAG;AAC1B,EAAA,gBAAA,EAAgB,yBAAE;AAClB,EAAA,iBAAA,EAAiB,0BAAE;AACnB,EAAA,gBAAA,EAAgB,yBAAE;AAClB,EAAA,YAAA,EAAY,qBAAE;AACd,EAAA,QAAA,EAAQ,iBAAE;AACV,EAAA,kBAAA,EAAkB,2BAAE;AACpB,EAAA,WAAA,EAAW,oBAAE;AACb,EAAA,eAAA,EAAe;;AAMnB;MACa,cAAc,GAAG,KAAC,KAAiB;MAExC,EAAI,cAAE,CAAA,gBAAe;AACrB,EAAA,OAAA,EAAO;AACA,CAAA;MAEF,eAAe,GAAG,OAAC,KAA2B;MAEnD,EAAI,cAAE,CAAA,iBAAe;AACrB,EAAA,OAAA,EAAO;AACA,CAAA;MAEF,cAAc,GAAG,KAAC,KAAiB;MAExC,EAAI,cAAE,CAAA,gBAAe;AACrB,EAAA,OAAA,EAAO;AACA,CAAA;AAER,MAAM,WAAW,GAAG,OACtB;MACG,EAAI,cAAE,CAAA;AACC,CAAA;AAyBf;AACA,MAAM,YAAY,GAAgB;AAC9B,EAAA,WAAA,EAAW,EAAE;AACb,EAAA,aAAA,EAAa,EAAE;AACf,EAAA,WAAA,EAAW,KAAE;AACb,EAAA,WAAA,EAAW;CACd;AAED;SACgB,aAAa,CAAC,KAAK,GAAG,YAAY,EAAE,MAAoB,EAAA;AACpE,EAAA,QAAA,MAAQ,CAAA,IAAO;SACX,cAAK,CAAA,gBAAe;aAChB;AACI,QAAA,GAAA,KAAA;mBACA,EAAA,MAAW,CAAA,OAAQ;AACnB,QAAA,WAAA,EAAA,MAAW,QAAQ,CAAC,SAAQ;;SAEpC,cAAK,CAAA,iBAAe;aAChB;AACI,QAAA,GAAA,KAAA;qBACA,EAAA,MAAa,CAAA,OAAQ;AACrB,QAAA,WAAA,EAAA,KAAA;AACA,QAAA,WAAA,EAAA;;SAER,cAAK,CAAA,gBAAe;aAChB;AACI,QAAA,GAAA,KAAA;mBACA,EAAA,MAAW,CAAA,OAAQ;AACnB,QAAA,WAAA,EAAA;;SAER,cAAK,CAAA,YAAe;aAChB;AACI,QAAA,GAAA;;AAER,IAAA;AACI,MAAA,OAAA,KAAA;;AAEZ"}
|
package/lib/routes.json
CHANGED
|
@@ -36,7 +36,15 @@
|
|
|
36
36
|
"path": "/resources/settings",
|
|
37
37
|
"componentPath": "@admin-layout/tailwind-design-pro/lib/components/UpdateSettingsResource/UpdateSettingsResource.js",
|
|
38
38
|
"hasLoader": true,
|
|
39
|
-
"hasAction": true
|
|
39
|
+
"hasAction": true,
|
|
40
|
+
"loaderReturnInfo": {
|
|
41
|
+
"returnType": "json",
|
|
42
|
+
"hasOptions": true,
|
|
43
|
+
"keys": [
|
|
44
|
+
"settings",
|
|
45
|
+
"error"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
50
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindConfig.js","sources":["../src/tailwindConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwindConfig.js","sources":["../src/tailwindConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAM,WAAW,GAAG;AACvB,EAAA,MAAA,EAAM;AACF,IAAA,MAAA,EAAA,oBAAQ;AACR,IAAA,KAAA,EAAA,mBAAO;AACP,IAAA,IAAA,EAAA,kBAAM;AACN,IAAA,UAAA,EAAA,wBAAY;AACZ,IAAA,UAAA,EAAA,wBAAY;AACZ,IAAA,OAAA,EAAA;AACI,MAAA,OAAA,EAAA,qBAAS;AACT,MAAA,UAAA,EAAA;AACH,KAAA;AACD,IAAA,SAAA,EAAA;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,IAAA,EAAA,EAAA,kBAAI;AACJ,IAAA,EAAA,EAAA;AACH,GAAA;AACD,EAAA,kBAAA,EAAkB;AACd,IAAA,MAAA,EAAA,0BAAQ;AACR,IAAA,SAAA,EAAA,6BAAW;AACX,IAAA,GAAA,EAAA;AACH,GAAA;AACD,EAAA,YAAA,EAAY;AACR,IAAA,EAAA,EAAA,eAAI;AACJ,IAAA,EAAA,EAAA,2BAAI;AACJ,IAAA,EAAA,EAAA;AACH,GAAA;AACD,EAAA,SAAA,EAAS;AACL,IAAA,gBAAA,EAAA;AACI,MAAA,IAAA,EAAA;AACI,QAAA,MAAA,EAAA;AACH,OAAA;AACD,MAAA,EAAA,EAAA;AACI,QAAA,MAAA,EAAA;AACH;AACJ,KAAA;AACD,IAAA,cAAA,EAAA;AACI,MAAA,IAAA,EAAA;AACI,QAAA,MAAA,EAAA;AACH,OAAA;AACD,MAAA,EAAA,EAAA;AACI,QAAA,MAAA,EAAA;AACH;AACJ;AACJ,GAAA;AACD,EAAA,SAAA,EAAS;AACL,IAAA,gBAAA,EAAA,8BAAkB;AAClB,IAAA,cAAA,EAAA;AACH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configOverrides.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/configOverrides.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Override System
|
|
3
|
+
*
|
|
4
|
+
* This module implements a VS Code-style configuration override pattern.
|
|
5
|
+
* Instead of deeply nested route and device-specific settings, we use a nested
|
|
6
|
+
* structure with context keys for overrides.
|
|
7
|
+
*
|
|
8
|
+
* ## Pattern
|
|
9
|
+
*
|
|
10
|
+
* Base configuration:
|
|
11
|
+
* ```
|
|
12
|
+
* uilayout.regions.header.showLogo = true
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Override for specific route and device:
|
|
16
|
+
* ```
|
|
17
|
+
* [route=/dashboard][device=mobile]: {
|
|
18
|
+
* uilayout: {
|
|
19
|
+
* regions: {
|
|
20
|
+
* header: {
|
|
21
|
+
* showLogo: false
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ## Benefits
|
|
29
|
+
*
|
|
30
|
+
* 1. **Flat Schema**: Configuration schema is defined once, not duplicated per route/device
|
|
31
|
+
* 2. **Clear Inheritance**: Easy to see what's overridden and what uses defaults
|
|
32
|
+
* 3. **Flexibility**: Can add new context dimensions (e.g., [user=admin], [theme=dark])
|
|
33
|
+
* 4. **Database Friendly**: Nested structure is natural for MongoDB
|
|
34
|
+
* 5. **Type Safe**: TypeScript can enforce config keys
|
|
35
|
+
*
|
|
36
|
+
* ## Usage in MongoDB
|
|
37
|
+
*
|
|
38
|
+
* ```json
|
|
39
|
+
* {
|
|
40
|
+
* "uiSettings": {
|
|
41
|
+
* "uilayout": {
|
|
42
|
+
* "regions": {
|
|
43
|
+
* "header": {
|
|
44
|
+
* "showLogo": true
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* },
|
|
48
|
+
* "[route=/dashboard][device=mobile]": {
|
|
49
|
+
* "uilayout": {
|
|
50
|
+
* "regions": {
|
|
51
|
+
* "header": {
|
|
52
|
+
* "showLogo": false
|
|
53
|
+
* }
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export interface OverrideContext {
|
|
62
|
+
route?: string;
|
|
63
|
+
device?: 'desktop' | 'mobile';
|
|
64
|
+
theme?: string;
|
|
65
|
+
user?: string;
|
|
66
|
+
[key: string]: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Parse multiple bracket pattern into array of identifiers
|
|
70
|
+
* Supports both single bracket [/route.mobile] and multiple bracket [/route][mobile] patterns
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* parseMultipleBracketIdentifiers("[/dashboard][mobile]")
|
|
74
|
+
* // Returns: ['/dashboard', 'mobile']
|
|
75
|
+
*
|
|
76
|
+
* parseMultipleBracketIdentifiers("[mobile]")
|
|
77
|
+
* // Returns: ['mobile']
|
|
78
|
+
*
|
|
79
|
+
* parseMultipleBracketIdentifiers("[/dashboard.mobile]") // Backward compatibility
|
|
80
|
+
* // Returns: ['/dashboard', 'mobile']
|
|
81
|
+
*/
|
|
82
|
+
export declare function parseMultipleBracketIdentifiers(overrideKey: string): string[];
|
|
83
|
+
/**
|
|
84
|
+
* Build multiple bracket pattern from identifiers array
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* buildMultipleBracketKey(['/dashboard', 'mobile'])
|
|
88
|
+
* // Returns: "[/dashboard][mobile]"
|
|
89
|
+
*
|
|
90
|
+
* buildMultipleBracketKey(['mobile'])
|
|
91
|
+
* // Returns: "[mobile]"
|
|
92
|
+
*/
|
|
93
|
+
export declare function buildMultipleBracketKey(identifiers: string[]): string;
|
|
94
|
+
/**
|
|
95
|
+
* Build multiple bracket pattern from context object
|
|
96
|
+
* Uses the new multiple bracket format: [/route][device]
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* buildMultipleBracketKeyFromContext({ route: '/dashboard', device: 'mobile' })
|
|
100
|
+
* // Returns: "[/dashboard][mobile]"
|
|
101
|
+
*
|
|
102
|
+
* buildMultipleBracketKeyFromContext({ device: 'mobile' })
|
|
103
|
+
* // Returns: "[mobile]"
|
|
104
|
+
*/
|
|
105
|
+
export declare function buildMultipleBracketKeyFromContext(context: OverrideContext): string;
|
|
106
|
+
/**
|
|
107
|
+
* Convert multiple bracket pattern to context object
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* multipleBracketToContext("[/dashboard][mobile]")
|
|
111
|
+
* // Returns: { route: '/dashboard', device: 'mobile' }
|
|
112
|
+
*/
|
|
113
|
+
export declare function multipleBracketToContext(overrideKey: string): OverrideContext;
|
|
114
|
+
/**
|
|
115
|
+
* Convert a dot-notation path to a nested object
|
|
116
|
+
* @example
|
|
117
|
+
* setNestedValue({}, 'uilayout.regions.header.showLogo', false)
|
|
118
|
+
* // Returns: { uilayout: { regions: { header: { showLogo: false } } } }
|
|
119
|
+
*/
|
|
120
|
+
export declare function setNestedValue(obj: any, path: string, value: any): any;
|
|
121
|
+
/**
|
|
122
|
+
* Get a value from a nested object using dot notation
|
|
123
|
+
* @example
|
|
124
|
+
* getNestedValue({ uilayout: { regions: { header: { showLogo: false } } } }, 'uilayout.regions.header.showLogo')
|
|
125
|
+
* // Returns: false
|
|
126
|
+
*/
|
|
127
|
+
export declare function getNestedValue(obj: any, path: string, defaultValue?: any): any;
|
|
128
|
+
/**
|
|
129
|
+
* Deep merge two objects
|
|
130
|
+
*/
|
|
131
|
+
export declare function deepMerge(target: any, source: any): any;
|
|
132
|
+
/**
|
|
133
|
+
* Build an override context key from context
|
|
134
|
+
*
|
|
135
|
+
* Format: [route][device] or [route] or [device]
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* buildOverrideKey({ route: '/dashboard', device: 'mobile' })
|
|
139
|
+
* // Returns: "[/dashboard][mobile]"
|
|
140
|
+
*
|
|
141
|
+
* buildOverrideKey({ route: '/dashboard' })
|
|
142
|
+
* // Returns: "[/dashboard]"
|
|
143
|
+
*
|
|
144
|
+
* buildOverrideKey({ device: 'mobile' })
|
|
145
|
+
* // Returns: "[mobile]"
|
|
146
|
+
*/
|
|
147
|
+
export declare function buildOverrideKey(context: OverrideContext): string;
|
|
148
|
+
/**
|
|
149
|
+
* Parse an override key into its components
|
|
150
|
+
* Supports both new multiple bracket format and legacy dot notation
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* parseOverrideKey("[/dashboard][mobile]") // New format
|
|
154
|
+
* // Returns: { route: '/dashboard', device: 'mobile' }
|
|
155
|
+
*
|
|
156
|
+
* parseOverrideKey("[/dashboard.mobile]") // Legacy format
|
|
157
|
+
* // Returns: { route: '/dashboard', device: 'mobile' }
|
|
158
|
+
*
|
|
159
|
+
* parseOverrideKey("[/dashboard]")
|
|
160
|
+
* // Returns: { route: '/dashboard' }
|
|
161
|
+
*
|
|
162
|
+
* parseOverrideKey("[mobile]")
|
|
163
|
+
* // Returns: { device: 'mobile' }
|
|
164
|
+
*
|
|
165
|
+
* parseOverrideKey("[.mobile]") // Legacy device-only format
|
|
166
|
+
* // Returns: { device: 'mobile' }
|
|
167
|
+
*/
|
|
168
|
+
export declare function parseOverrideKey(overrideKey: string): OverrideContext;
|
|
169
|
+
/**
|
|
170
|
+
* Get a configuration value with override support
|
|
171
|
+
*
|
|
172
|
+
* Priority:
|
|
173
|
+
* 1. Most specific override (all context matches)
|
|
174
|
+
* 2. Partial overrides (some context matches)
|
|
175
|
+
* 3. Base configuration value
|
|
176
|
+
* 4. Default value
|
|
177
|
+
*
|
|
178
|
+
* Works with nested storage where overrides are stored as:
|
|
179
|
+
* { "[route=/dashboard][device=mobile]": { uilayout: { regions: { header: { showLogo: false } } } } }
|
|
180
|
+
*/
|
|
181
|
+
export declare function getConfigValue<T = any>(settings: any, configKey: string, context: OverrideContext, defaultValue?: T): T;
|
|
182
|
+
/**
|
|
183
|
+
* Set a configuration value as an override
|
|
184
|
+
*
|
|
185
|
+
* Returns the context key and nested value structure.
|
|
186
|
+
* The service layer will merge this into the settings object.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* const result = setConfigOverride('regions.header.showLogo', false, { route: '/dashboard', device: 'mobile' });
|
|
190
|
+
* // Returns: {
|
|
191
|
+
* // contextKey: '[device=mobile][route=/dashboard]',
|
|
192
|
+
* // path: 'uilayout.regions.header.showLogo',
|
|
193
|
+
* // value: false,
|
|
194
|
+
* // nestedValue: { uilayout: { regions: { header: { showLogo: false } } } }
|
|
195
|
+
* // }
|
|
196
|
+
*/
|
|
197
|
+
export declare function setConfigOverride(configKey: string, value: any, context: OverrideContext): {
|
|
198
|
+
contextKey: string;
|
|
199
|
+
path: string;
|
|
200
|
+
value: any;
|
|
201
|
+
nestedValue: any;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Get all overrides for a specific context
|
|
205
|
+
* Works with nested storage format
|
|
206
|
+
*/
|
|
207
|
+
export declare function getContextOverrides(settings: any, context: OverrideContext): Record<string, any>;
|
|
208
|
+
/**
|
|
209
|
+
* Remove all overrides for a specific context
|
|
210
|
+
* Returns the context key to remove from settings
|
|
211
|
+
*/
|
|
212
|
+
export declare function clearContextOverrides(settings: any, context: OverrideContext): string | null;
|
|
213
|
+
//# sourceMappingURL=configOverrides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configOverrides.d.ts","sourceRoot":"","sources":["../../src/utils/configOverrides.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,MAAM,WAAW,eAAe;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CA2C7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAMrE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAqBnF;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CA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AG,IAAI,CAQ5F"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Override System
|
|
3
|
+
*
|
|
4
|
+
* This module implements a VS Code-style configuration override pattern.
|
|
5
|
+
* Instead of deeply nested route and device-specific settings, we use a nested
|
|
6
|
+
* structure with context keys for overrides.
|
|
7
|
+
*
|
|
8
|
+
* ## Pattern
|
|
9
|
+
*
|
|
10
|
+
* Base configuration:
|
|
11
|
+
* ```
|
|
12
|
+
* uilayout.regions.header.showLogo = true
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Override for specific route and device:
|
|
16
|
+
* ```
|
|
17
|
+
* [route=/dashboard][device=mobile]: {
|
|
18
|
+
* uilayout: {
|
|
19
|
+
* regions: {
|
|
20
|
+
* header: {
|
|
21
|
+
* showLogo: false
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ## Benefits
|
|
29
|
+
*
|
|
30
|
+
* 1. **Flat Schema**: Configuration schema is defined once, not duplicated per route/device
|
|
31
|
+
* 2. **Clear Inheritance**: Easy to see what's overridden and what uses defaults
|
|
32
|
+
* 3. **Flexibility**: Can add new context dimensions (e.g., [user=admin], [theme=dark])
|
|
33
|
+
* 4. **Database Friendly**: Nested structure is natural for MongoDB
|
|
34
|
+
* 5. **Type Safe**: TypeScript can enforce config keys
|
|
35
|
+
*
|
|
36
|
+
* ## Usage in MongoDB
|
|
37
|
+
*
|
|
38
|
+
* ```json
|
|
39
|
+
* {
|
|
40
|
+
* "uiSettings": {
|
|
41
|
+
* "uilayout": {
|
|
42
|
+
* "regions": {
|
|
43
|
+
* "header": {
|
|
44
|
+
* "showLogo": true
|
|
45
|
+
* }
|
|
46
|
+
* }
|
|
47
|
+
* },
|
|
48
|
+
* "[route=/dashboard][device=mobile]": {
|
|
49
|
+
* "uilayout": {
|
|
50
|
+
* "regions": {
|
|
51
|
+
* "header": {
|
|
52
|
+
* "showLogo": false
|
|
53
|
+
* }
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* Parse multiple bracket pattern into array of identifiers
|
|
63
|
+
* Supports both single bracket [/route.mobile] and multiple bracket [/route][mobile] patterns
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* parseMultipleBracketIdentifiers("[/dashboard][mobile]")
|
|
67
|
+
* // Returns: ['/dashboard', 'mobile']
|
|
68
|
+
*
|
|
69
|
+
* parseMultipleBracketIdentifiers("[mobile]")
|
|
70
|
+
* // Returns: ['mobile']
|
|
71
|
+
*
|
|
72
|
+
* parseMultipleBracketIdentifiers("[/dashboard.mobile]") // Backward compatibility
|
|
73
|
+
* // Returns: ['/dashboard', 'mobile']
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Get a value from a nested object using dot notation
|
|
77
|
+
* @example
|
|
78
|
+
* getNestedValue({ uilayout: { regions: { header: { showLogo: false } } } }, 'uilayout.regions.header.showLogo')
|
|
79
|
+
* // Returns: false
|
|
80
|
+
*/
|
|
81
|
+
function getNestedValue(obj, path, defaultValue) {
|
|
82
|
+
const keys = path.split('.');
|
|
83
|
+
let current = obj;
|
|
84
|
+
for (const key of keys) {
|
|
85
|
+
if (current === null || current === undefined || typeof current !== 'object') {
|
|
86
|
+
return defaultValue;
|
|
87
|
+
}
|
|
88
|
+
current = current[key];
|
|
89
|
+
}
|
|
90
|
+
return current !== undefined ? current : defaultValue;
|
|
91
|
+
}export{getNestedValue};//# sourceMappingURL=configOverrides.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configOverrides.js","sources":["../../src/utils/configOverrides.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DG;AAUH;;;;;;;;;;;;;AAaG;;AA6JA;AACH;;;AAII;AACI,SAAI,cAAgB,CAAA,GAAI,EAAA,IAAO,EAAA,YAAc,EAAA;AACzC,EAAA,MAAA,IAAA,GAAA,IAAO;aACV,GAAA,GAAA;AACD,EAAA,KAAA,MAAA,GAAO,IAAG,IAAA,EAAQ;IACtB,IAAC,OAAA,KAAA,IAAA,IAAA,OAAA,KAAA,SAAA,IAAA,OAAA,OAAA,KAAA,QAAA,EAAA;MAED,OAAO,YAAY;AACvB,IAAC;AAED,IAAA,OAAA,GAAA,OAAA,CAAA,GAAA,CAAA;;AAEG,EAAA,OAAA,OAAA,KAAA,SAAA,GAAA,OAAA,GAAA,YAAA;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/utils/isBrowser/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utils/isBrowser/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI;AAE1G,MAAM,SAAS,GAAG,MAAK;MACnB,OAAI,CAAA,GAAQ,CAAA,aAAY,MAAK,EAAM;AAC/B,IAAA,OAAA,IAAO;;AAEX,EAAA,OAAA,OAAO,MAAO,KAAM,WAAK,WAAe,MAAO,CAAA,QAAO,KAAQ,WAAK,IAAW,CAAA;AAClF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a setting value based on applyToAllRoutes flag and current route/device context
|
|
3
|
+
* @param machineSettings - The settings object from XState machine
|
|
4
|
+
* @param settingName - The setting key to retrieve (e.g., 'fixedHeader', 'organization.members.invitations')
|
|
5
|
+
* @param applyToAllRoutes - Whether to use global or route-specific overrides
|
|
6
|
+
* @param currentRoute - Current route path or route pattern
|
|
7
|
+
* @param deviceType - Current device type ('desktop' or 'mobile')
|
|
8
|
+
* @param defaultValue - Default value if setting not found
|
|
9
|
+
* @returns The setting value from the appropriate scope
|
|
10
|
+
*/
|
|
11
|
+
export declare const getSettingValue: (machineSettings: any, settingName: string, applyToAllRoutes: boolean, currentRoute: string, deviceType: "desktop" | "mobile", defaultValue?: any) => any;
|
|
12
|
+
/**
|
|
13
|
+
* Calculate the default value for applyToAllRoutes based on what overrides exist
|
|
14
|
+
* @param settings - The full settings object with ConfigurationModel
|
|
15
|
+
* @param currentRoute - Current route path or route pattern
|
|
16
|
+
* @param deviceType - Current device type ('desktop' or 'mobile')
|
|
17
|
+
* @returns The default value for applyToAllRoutes
|
|
18
|
+
*/
|
|
19
|
+
export declare const getDefaultApplyToAllRoutes: (settings: any, currentRoute: string, deviceType: "desktop" | "mobile") => boolean;
|
|
20
|
+
//# sourceMappingURL=settingsUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsUtils.d.ts","sourceRoot":"","sources":["../../src/utils/settingsUtils.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GACxB,iBAAiB,GAAG,EACpB,aAAa,MAAM,EACnB,kBAAkB,OAAO,EACzB,cAAc,MAAM,EACpB,YAAY,SAAS,GAAG,QAAQ,EAChC,eAAe,GAAG,QAwCrB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACnC,UAAU,GAAG,EACb,cAAc,MAAM,EACpB,YAAY,SAAS,GAAG,QAAQ,KACjC,OA2BF,CAAC"}
|