@vuu-ui/vuu-shell 2.1.18 → 2.1.19-beta.2
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/package.json +17 -20
- package/src/ShellContextProvider.js +20 -0
- package/src/app-header/AppHeader.css.js +21 -0
- package/src/app-header/AppHeader.js +97 -0
- package/src/app-header/index.js +1 -0
- package/src/application-provider/ApplicationContext.js +9 -0
- package/src/application-provider/ApplicationProvider.js +77 -0
- package/src/application-provider/index.js +1 -0
- package/src/feature/Feature.js +37 -0
- package/src/feature/FeatureErrorBoundary.js +33 -0
- package/src/feature/Loader.js +5 -0
- package/src/feature/index.js +1 -0
- package/src/feature-and-layout-provider/FeatureAndLayoutProvider.js +42 -0
- package/src/feature-and-layout-provider/index.js +1 -0
- package/src/feature-list/FeatureList.css.js +62 -0
- package/src/feature-list/FeatureList.js +128 -0
- package/src/feature-list/index.js +1 -0
- package/src/get-layout-history.js +7 -0
- package/src/index.js +14 -0
- package/src/left-nav/LeftNav.css.js +177 -0
- package/src/left-nav/LeftNav.js +193 -0
- package/src/left-nav/index.js +1 -0
- package/src/login/LoginPanel.css.js +72 -0
- package/src/login/LoginPanel.js +124 -0
- package/src/login/VuuLogo.js +108 -0
- package/src/persistence-manager/LocalPersistenceManager.js +156 -0
- package/src/persistence-manager/PersistenceManager.js +0 -0
- package/src/persistence-manager/PersistenceProvider.js +14 -0
- package/src/persistence-manager/RemotePersistenceManager.js +123 -0
- package/src/persistence-manager/StaticPersistenceManager.js +53 -0
- package/src/persistence-manager/index.js +5 -0
- package/src/shell-layout-templates/context-panel/ContextPanel.css.js +66 -0
- package/src/shell-layout-templates/context-panel/ContextPanel.js +92 -0
- package/src/shell-layout-templates/context-panel/index.js +1 -0
- package/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +44 -0
- package/src/shell-layout-templates/index.js +3 -0
- package/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +68 -0
- package/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +32 -0
- package/src/shell-layout-templates/side-panel/SidePanel.css.js +9 -0
- package/src/shell-layout-templates/side-panel/SidePanel.js +31 -0
- package/src/shell-layout-templates/side-panel/index.js +1 -0
- package/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +38 -0
- package/src/shell-layout-templates/useShellLayout.js +15 -0
- package/src/shell.css.js +59 -0
- package/src/shell.js +108 -0
- package/src/theme-switch/ThemeSwitch.css.js +34 -0
- package/src/theme-switch/ThemeSwitch.js +50 -0
- package/src/theme-switch/index.js +1 -0
- package/src/user-settings/SettingsForm.css.js +10 -0
- package/src/user-settings/SettingsForm.js +141 -0
- package/src/user-settings/UserSettingsPanel.css.js +9 -0
- package/src/user-settings/UserSettingsPanel.js +29 -0
- package/src/user-settings/index.js +2 -0
- package/src/workspace-management/LayoutList.css.js +74 -0
- package/src/workspace-management/LayoutList.js +130 -0
- package/src/workspace-management/LayoutTile.css.js +31 -0
- package/src/workspace-management/LayoutTile.js +41 -0
- package/src/workspace-management/SaveLayoutPanel.css.js +123 -0
- package/src/workspace-management/SaveLayoutPanel.js +141 -0
- package/src/workspace-management/WorkspaceProvider.js +209 -0
- package/src/workspace-management/defaultWorkspaceJSON.js +88 -0
- package/src/workspace-management/index.js +5 -0
- package/src/workspace-management/screenshot-utils.js +13 -0
- package/src/workspace-management/useWorkspaceContextMenuItems.js +58 -0
- package/types/feature/FeatureErrorBoundary.d.ts +1 -1
- package/types/workspace-management/WorkspaceProvider.d.ts +5 -5
- package/cjs/ShellContextProvider.js +0 -25
- package/cjs/ShellContextProvider.js.map +0 -1
- package/cjs/app-header/AppHeader.css.js +0 -6
- package/cjs/app-header/AppHeader.css.js.map +0 -1
- package/cjs/app-header/AppHeader.js +0 -118
- package/cjs/app-header/AppHeader.js.map +0 -1
- package/cjs/application-provider/ApplicationContext.js +0 -17
- package/cjs/application-provider/ApplicationContext.js.map +0 -1
- package/cjs/application-provider/ApplicationProvider.js +0 -102
- package/cjs/application-provider/ApplicationProvider.js.map +0 -1
- package/cjs/feature/Feature.js +0 -54
- package/cjs/feature/Feature.js.map +0 -1
- package/cjs/feature/FeatureErrorBoundary.js +0 -30
- package/cjs/feature/FeatureErrorBoundary.js.map +0 -1
- package/cjs/feature-and-layout-provider/FeatureAndLayoutProvider.js +0 -60
- package/cjs/feature-and-layout-provider/FeatureAndLayoutProvider.js.map +0 -1
- package/cjs/feature-list/FeatureList.css.js +0 -6
- package/cjs/feature-list/FeatureList.css.js.map +0 -1
- package/cjs/feature-list/FeatureList.js +0 -109
- package/cjs/feature-list/FeatureList.js.map +0 -1
- package/cjs/index.js +0 -71
- package/cjs/index.js.map +0 -1
- package/cjs/left-nav/LeftNav.css.js +0 -6
- package/cjs/left-nav/LeftNav.css.js.map +0 -1
- package/cjs/left-nav/LeftNav.js +0 -202
- package/cjs/left-nav/LeftNav.js.map +0 -1
- package/cjs/login/LoginPanel.css.js +0 -6
- package/cjs/login/LoginPanel.css.js.map +0 -1
- package/cjs/login/LoginPanel.js +0 -110
- package/cjs/login/LoginPanel.js.map +0 -1
- package/cjs/login/VuuLogo.js +0 -134
- package/cjs/login/VuuLogo.js.map +0 -1
- package/cjs/persistence-manager/LocalPersistenceManager.js +0 -193
- package/cjs/persistence-manager/LocalPersistenceManager.js.map +0 -1
- package/cjs/persistence-manager/PersistenceProvider.js +0 -21
- package/cjs/persistence-manager/PersistenceProvider.js.map +0 -1
- package/cjs/persistence-manager/RemotePersistenceManager.js +0 -165
- package/cjs/persistence-manager/RemotePersistenceManager.js.map +0 -1
- package/cjs/persistence-manager/StaticPersistenceManager.js +0 -73
- package/cjs/persistence-manager/StaticPersistenceManager.js.map +0 -1
- package/cjs/shell-layout-templates/context-panel/ContextPanel.css.js +0 -6
- package/cjs/shell-layout-templates/context-panel/ContextPanel.css.js.map +0 -1
- package/cjs/shell-layout-templates/context-panel/ContextPanel.js +0 -100
- package/cjs/shell-layout-templates/context-panel/ContextPanel.js.map +0 -1
- package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +0 -51
- package/cjs/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +0 -1
- package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +0 -83
- package/cjs/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +0 -1
- package/cjs/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +0 -46
- package/cjs/shell-layout-templates/left-main-tabs/useLeftMainTabs.js.map +0 -1
- package/cjs/shell-layout-templates/side-panel/SidePanel.css.js +0 -6
- package/cjs/shell-layout-templates/side-panel/SidePanel.css.js.map +0 -1
- package/cjs/shell-layout-templates/side-panel/SidePanel.js +0 -36
- package/cjs/shell-layout-templates/side-panel/SidePanel.js.map +0 -1
- package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +0 -48
- package/cjs/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +0 -1
- package/cjs/shell-layout-templates/useShellLayout.js +0 -23
- package/cjs/shell-layout-templates/useShellLayout.js.map +0 -1
- package/cjs/shell.css.js +0 -6
- package/cjs/shell.css.js.map +0 -1
- package/cjs/shell.js +0 -137
- package/cjs/shell.js.map +0 -1
- package/cjs/theme-switch/ThemeSwitch.css.js +0 -6
- package/cjs/theme-switch/ThemeSwitch.css.js.map +0 -1
- package/cjs/theme-switch/ThemeSwitch.js +0 -56
- package/cjs/theme-switch/ThemeSwitch.js.map +0 -1
- package/cjs/user-settings/SettingsForm.css.js +0 -6
- package/cjs/user-settings/SettingsForm.css.js.map +0 -1
- package/cjs/user-settings/SettingsForm.js +0 -168
- package/cjs/user-settings/SettingsForm.js.map +0 -1
- package/cjs/user-settings/UserSettingsPanel.css.js +0 -6
- package/cjs/user-settings/UserSettingsPanel.css.js.map +0 -1
- package/cjs/user-settings/UserSettingsPanel.js +0 -42
- package/cjs/user-settings/UserSettingsPanel.js.map +0 -1
- package/cjs/workspace-management/LayoutList.css.js +0 -6
- package/cjs/workspace-management/LayoutList.css.js.map +0 -1
- package/cjs/workspace-management/LayoutList.js +0 -116
- package/cjs/workspace-management/LayoutList.js.map +0 -1
- package/cjs/workspace-management/LayoutTile.css.js +0 -6
- package/cjs/workspace-management/LayoutTile.css.js.map +0 -1
- package/cjs/workspace-management/LayoutTile.js +0 -41
- package/cjs/workspace-management/LayoutTile.js.map +0 -1
- package/cjs/workspace-management/SaveLayoutPanel.css.js +0 -6
- package/cjs/workspace-management/SaveLayoutPanel.css.js.map +0 -1
- package/cjs/workspace-management/SaveLayoutPanel.js +0 -128
- package/cjs/workspace-management/SaveLayoutPanel.js.map +0 -1
- package/cjs/workspace-management/WorkspaceProvider.js +0 -265
- package/cjs/workspace-management/WorkspaceProvider.js.map +0 -1
- package/cjs/workspace-management/defaultWorkspaceJSON.js +0 -101
- package/cjs/workspace-management/defaultWorkspaceJSON.js.map +0 -1
- package/cjs/workspace-management/screenshot-utils.js +0 -25
- package/cjs/workspace-management/screenshot-utils.js.map +0 -1
- package/cjs/workspace-management/useWorkspaceContextMenuItems.js +0 -72
- package/cjs/workspace-management/useWorkspaceContextMenuItems.js.map +0 -1
- package/esm/ShellContextProvider.js +0 -23
- package/esm/ShellContextProvider.js.map +0 -1
- package/esm/app-header/AppHeader.css.js +0 -4
- package/esm/app-header/AppHeader.css.js.map +0 -1
- package/esm/app-header/AppHeader.js +0 -116
- package/esm/app-header/AppHeader.js.map +0 -1
- package/esm/application-provider/ApplicationContext.js +0 -15
- package/esm/application-provider/ApplicationContext.js.map +0 -1
- package/esm/application-provider/ApplicationProvider.js +0 -96
- package/esm/application-provider/ApplicationProvider.js.map +0 -1
- package/esm/feature/Feature.js +0 -52
- package/esm/feature/Feature.js.map +0 -1
- package/esm/feature/FeatureErrorBoundary.js +0 -28
- package/esm/feature/FeatureErrorBoundary.js.map +0 -1
- package/esm/feature-and-layout-provider/FeatureAndLayoutProvider.js +0 -56
- package/esm/feature-and-layout-provider/FeatureAndLayoutProvider.js.map +0 -1
- package/esm/feature-list/FeatureList.css.js +0 -4
- package/esm/feature-list/FeatureList.css.js.map +0 -1
- package/esm/feature-list/FeatureList.js +0 -107
- package/esm/feature-list/FeatureList.js.map +0 -1
- package/esm/index.js +0 -25
- package/esm/index.js.map +0 -1
- package/esm/left-nav/LeftNav.css.js +0 -4
- package/esm/left-nav/LeftNav.css.js.map +0 -1
- package/esm/left-nav/LeftNav.js +0 -200
- package/esm/left-nav/LeftNav.js.map +0 -1
- package/esm/login/LoginPanel.css.js +0 -4
- package/esm/login/LoginPanel.css.js.map +0 -1
- package/esm/login/LoginPanel.js +0 -108
- package/esm/login/LoginPanel.js.map +0 -1
- package/esm/login/VuuLogo.js +0 -132
- package/esm/login/VuuLogo.js.map +0 -1
- package/esm/persistence-manager/LocalPersistenceManager.js +0 -191
- package/esm/persistence-manager/LocalPersistenceManager.js.map +0 -1
- package/esm/persistence-manager/PersistenceProvider.js +0 -17
- package/esm/persistence-manager/PersistenceProvider.js.map +0 -1
- package/esm/persistence-manager/RemotePersistenceManager.js +0 -163
- package/esm/persistence-manager/RemotePersistenceManager.js.map +0 -1
- package/esm/persistence-manager/StaticPersistenceManager.js +0 -71
- package/esm/persistence-manager/StaticPersistenceManager.js.map +0 -1
- package/esm/shell-layout-templates/context-panel/ContextPanel.css.js +0 -4
- package/esm/shell-layout-templates/context-panel/ContextPanel.css.js.map +0 -1
- package/esm/shell-layout-templates/context-panel/ContextPanel.js +0 -98
- package/esm/shell-layout-templates/context-panel/ContextPanel.js.map +0 -1
- package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +0 -49
- package/esm/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js.map +0 -1
- package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +0 -81
- package/esm/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js.map +0 -1
- package/esm/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +0 -44
- package/esm/shell-layout-templates/left-main-tabs/useLeftMainTabs.js.map +0 -1
- package/esm/shell-layout-templates/side-panel/SidePanel.css.js +0 -4
- package/esm/shell-layout-templates/side-panel/SidePanel.css.js.map +0 -1
- package/esm/shell-layout-templates/side-panel/SidePanel.js +0 -34
- package/esm/shell-layout-templates/side-panel/SidePanel.js.map +0 -1
- package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +0 -46
- package/esm/shell-layout-templates/simple-content-pane/useSimpleContentPane.js.map +0 -1
- package/esm/shell-layout-templates/useShellLayout.js +0 -21
- package/esm/shell-layout-templates/useShellLayout.js.map +0 -1
- package/esm/shell.css.js +0 -4
- package/esm/shell.css.js.map +0 -1
- package/esm/shell.js +0 -135
- package/esm/shell.js.map +0 -1
- package/esm/theme-switch/ThemeSwitch.css.js +0 -4
- package/esm/theme-switch/ThemeSwitch.css.js.map +0 -1
- package/esm/theme-switch/ThemeSwitch.js +0 -54
- package/esm/theme-switch/ThemeSwitch.js.map +0 -1
- package/esm/user-settings/SettingsForm.css.js +0 -4
- package/esm/user-settings/SettingsForm.css.js.map +0 -1
- package/esm/user-settings/SettingsForm.js +0 -162
- package/esm/user-settings/SettingsForm.js.map +0 -1
- package/esm/user-settings/UserSettingsPanel.css.js +0 -4
- package/esm/user-settings/UserSettingsPanel.css.js.map +0 -1
- package/esm/user-settings/UserSettingsPanel.js +0 -40
- package/esm/user-settings/UserSettingsPanel.js.map +0 -1
- package/esm/workspace-management/LayoutList.css.js +0 -4
- package/esm/workspace-management/LayoutList.css.js.map +0 -1
- package/esm/workspace-management/LayoutList.js +0 -114
- package/esm/workspace-management/LayoutList.js.map +0 -1
- package/esm/workspace-management/LayoutTile.css.js +0 -4
- package/esm/workspace-management/LayoutTile.css.js.map +0 -1
- package/esm/workspace-management/LayoutTile.js +0 -39
- package/esm/workspace-management/LayoutTile.js.map +0 -1
- package/esm/workspace-management/SaveLayoutPanel.css.js +0 -4
- package/esm/workspace-management/SaveLayoutPanel.css.js.map +0 -1
- package/esm/workspace-management/SaveLayoutPanel.js +0 -126
- package/esm/workspace-management/SaveLayoutPanel.js.map +0 -1
- package/esm/workspace-management/WorkspaceProvider.js +0 -262
- package/esm/workspace-management/WorkspaceProvider.js.map +0 -1
- package/esm/workspace-management/defaultWorkspaceJSON.js +0 -95
- package/esm/workspace-management/defaultWorkspaceJSON.js.map +0 -1
- package/esm/workspace-management/screenshot-utils.js +0 -23
- package/esm/workspace-management/screenshot-utils.js.map +0 -1
- package/esm/workspace-management/useWorkspaceContextMenuItems.js +0 -70
- package/esm/workspace-management/useWorkspaceContextMenuItems.js.map +0 -1
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var core = require('@salt-ds/core');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var ApplicationContext = require('./ApplicationContext.js');
|
|
7
|
-
var PersistenceProvider = require('../persistence-manager/PersistenceProvider.js');
|
|
8
|
-
require('../persistence-manager/LocalPersistenceManager.js');
|
|
9
|
-
require('../persistence-manager/StaticPersistenceManager.js');
|
|
10
|
-
|
|
11
|
-
const accentPurple = "purple";
|
|
12
|
-
const getThemeMode = (mode = "light", userSettings) => {
|
|
13
|
-
const themeMode = userSettings?.themeMode;
|
|
14
|
-
if (themeMode === "light" || themeMode === "dark") {
|
|
15
|
-
return themeMode;
|
|
16
|
-
}
|
|
17
|
-
return mode;
|
|
18
|
-
};
|
|
19
|
-
const ApplicationProvider = ({
|
|
20
|
-
children,
|
|
21
|
-
density: densityProp,
|
|
22
|
-
logout,
|
|
23
|
-
mode,
|
|
24
|
-
theme,
|
|
25
|
-
userSettingsSchema,
|
|
26
|
-
user
|
|
27
|
-
}) => {
|
|
28
|
-
const { mode: inheritedMode, theme: inheritedTheme } = core.useTheme();
|
|
29
|
-
const density = core.useDensity(densityProp);
|
|
30
|
-
const persistenceManager = PersistenceProvider.usePersistenceManager();
|
|
31
|
-
const context = React.useContext(ApplicationContext.ApplicationContext);
|
|
32
|
-
const [userSettings, setSettings] = React.useState();
|
|
33
|
-
React.useMemo(async () => {
|
|
34
|
-
if (persistenceManager) {
|
|
35
|
-
const userSettings2 = await persistenceManager.getUserSettings();
|
|
36
|
-
setSettings(userSettings2);
|
|
37
|
-
} else {
|
|
38
|
-
setSettings({});
|
|
39
|
-
}
|
|
40
|
-
}, [persistenceManager]);
|
|
41
|
-
const onUserSettingChanged = React.useCallback(
|
|
42
|
-
(propertyName, value) => {
|
|
43
|
-
setSettings((currentSettings) => {
|
|
44
|
-
const newSettings = { ...currentSettings, [propertyName]: value };
|
|
45
|
-
persistenceManager?.saveUserSettings(newSettings);
|
|
46
|
-
return newSettings;
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
[persistenceManager]
|
|
50
|
-
);
|
|
51
|
-
return userSettings ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
-
ApplicationContext.ApplicationContext.Provider,
|
|
53
|
-
{
|
|
54
|
-
value: {
|
|
55
|
-
...context,
|
|
56
|
-
logout,
|
|
57
|
-
onUserSettingChanged,
|
|
58
|
-
userSettings,
|
|
59
|
-
userSettingsSchema,
|
|
60
|
-
user: user ?? context.user
|
|
61
|
-
},
|
|
62
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
-
core.SaltProviderNext,
|
|
64
|
-
{
|
|
65
|
-
accent: accentPurple,
|
|
66
|
-
corner: "rounded",
|
|
67
|
-
theme: theme ?? inheritedTheme ?? "vuu-theme",
|
|
68
|
-
density,
|
|
69
|
-
mode: getThemeMode(mode ?? inheritedMode, userSettings),
|
|
70
|
-
children
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
) : null;
|
|
75
|
-
};
|
|
76
|
-
const useApplicationUser = () => {
|
|
77
|
-
const { user } = React.useContext(ApplicationContext.ApplicationContext);
|
|
78
|
-
return user;
|
|
79
|
-
};
|
|
80
|
-
const useApplicationSettings = () => {
|
|
81
|
-
const { onUserSettingChanged, userSettings, userSettingsSchema } = React.useContext(ApplicationContext.ApplicationContext);
|
|
82
|
-
return {
|
|
83
|
-
onUserSettingChanged,
|
|
84
|
-
userSettings,
|
|
85
|
-
userSettingsSchema
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
const useUserSetting = () => {
|
|
89
|
-
const { userSettings } = React.useContext(ApplicationContext.ApplicationContext);
|
|
90
|
-
return userSettings;
|
|
91
|
-
};
|
|
92
|
-
const useLogout = () => {
|
|
93
|
-
const { logout } = React.useContext(ApplicationContext.ApplicationContext);
|
|
94
|
-
return logout;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
exports.ApplicationProvider = ApplicationProvider;
|
|
98
|
-
exports.useApplicationSettings = useApplicationSettings;
|
|
99
|
-
exports.useApplicationUser = useApplicationUser;
|
|
100
|
-
exports.useLogout = useLogout;
|
|
101
|
-
exports.useUserSetting = useUserSetting;
|
|
102
|
-
//# sourceMappingURL=ApplicationProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationProvider.js","sources":["../../../../packages/vuu-shell/src/application-provider/ApplicationProvider.tsx"],"sourcesContent":["import { VuuRowDataItemType } from \"@vuu-ui/vuu-protocol-types\";\nimport {\n Accent,\n Density,\n Mode,\n SaltProviderNext,\n ThemeContextProps,\n useDensity,\n useTheme,\n} from \"@salt-ds/core\";\nimport {\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from \"react\";\nimport {\n ApplicationContext,\n ApplicationContextProps,\n} from \"./ApplicationContext\";\nimport { usePersistenceManager } from \"../persistence-manager\";\n\nexport interface ApplicationProviderProps\n extends Partial<Pick<ThemeContextProps, \"theme\" | \"mode\">>,\n Partial<Omit<ApplicationContextProps, \"userSettings\">> {\n children: ReactNode;\n density?: Density;\n}\n\nconst accentPurple = \"purple\" as Accent;\n\nconst getThemeMode = (\n mode: Mode = \"light\",\n userSettings?: Record<string, string | number | boolean>,\n) => {\n const themeMode = userSettings?.themeMode;\n if (themeMode === \"light\" || themeMode === \"dark\") {\n return themeMode;\n }\n return mode;\n};\n\nexport const ApplicationProvider = ({\n children,\n density: densityProp,\n logout,\n mode,\n theme,\n userSettingsSchema: userSettingsSchema,\n user,\n}: ApplicationProviderProps): ReactElement | null => {\n const { mode: inheritedMode, theme: inheritedTheme } = useTheme();\n const density = useDensity(densityProp);\n const persistenceManager = usePersistenceManager();\n const context = useContext(ApplicationContext);\n const [userSettings, setSettings] =\n useState<Record<string, string | number | boolean>>();\n\n useMemo(async () => {\n if (persistenceManager) {\n const userSettings = await persistenceManager.getUserSettings();\n setSettings(userSettings);\n } else {\n setSettings({});\n }\n }, [persistenceManager]);\n\n const onUserSettingChanged = useCallback(\n (propertyName: string, value: VuuRowDataItemType) => {\n setSettings((currentSettings) => {\n const newSettings = { ...currentSettings, [propertyName]: value };\n persistenceManager?.saveUserSettings(newSettings);\n return newSettings;\n });\n },\n [persistenceManager],\n );\n\n return userSettings ? (\n <ApplicationContext.Provider\n value={{\n ...context,\n logout,\n onUserSettingChanged,\n userSettings,\n userSettingsSchema,\n user: user ?? context.user,\n }}\n >\n <SaltProviderNext\n accent={accentPurple}\n corner=\"rounded\"\n theme={theme ?? inheritedTheme ?? \"vuu-theme\"}\n density={density}\n mode={getThemeMode(mode ?? inheritedMode, userSettings)}\n >\n {children}\n </SaltProviderNext>\n </ApplicationContext.Provider>\n ) : null;\n};\n\nexport const useApplicationUser = () => {\n const { user } = useContext(ApplicationContext);\n return user;\n};\n\n//Setter method (only used within the shell)\nexport const useApplicationSettings = () => {\n const { onUserSettingChanged, userSettings, userSettingsSchema } =\n useContext(ApplicationContext);\n return {\n onUserSettingChanged,\n userSettings,\n userSettingsSchema,\n };\n};\n\n//Getter method (read only access to applicationSetting)\nexport const useUserSetting = () => {\n const { userSettings } = useContext(ApplicationContext);\n return userSettings;\n};\n\nexport const useLogout = () => {\n const { logout } = useContext(ApplicationContext);\n return logout;\n};\n"],"names":["useTheme","useDensity","usePersistenceManager","useContext","Appl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AAY,MAAM;AAC7B,EAAA,MAAM,EAAE,MAAA,EAAW,GAAAD,gBAAA,CAAWC,qCAAkB,CAAA;AAChD,EAAO,OAAA,MAAA;AACT;;;;;;;;"}
|
package/cjs/feature/Feature.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var FeatureErrorBoundary = require('./FeatureErrorBoundary.js');
|
|
7
|
-
|
|
8
|
-
const componentsMap = /* @__PURE__ */ new Map();
|
|
9
|
-
const useCachedFeature = (url) => {
|
|
10
|
-
React.useEffect(
|
|
11
|
-
() => () => {
|
|
12
|
-
componentsMap.delete(url);
|
|
13
|
-
},
|
|
14
|
-
[url]
|
|
15
|
-
);
|
|
16
|
-
if (!componentsMap.has(url)) {
|
|
17
|
-
componentsMap.set(
|
|
18
|
-
url,
|
|
19
|
-
React.lazy(() => import(
|
|
20
|
-
/* @vite-ignore */
|
|
21
|
-
url
|
|
22
|
-
))
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
const lazyFeature = componentsMap.get(url);
|
|
26
|
-
if (!lazyFeature) {
|
|
27
|
-
throw Error(`Unable to load Lazy Feature at url ${url}`);
|
|
28
|
-
} else {
|
|
29
|
-
return lazyFeature;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
function RawFeature({
|
|
33
|
-
url,
|
|
34
|
-
css,
|
|
35
|
-
ComponentProps: params,
|
|
36
|
-
...props
|
|
37
|
-
}) {
|
|
38
|
-
if (css) {
|
|
39
|
-
vuuUtils.importCSS(css).then((styleSheet) => {
|
|
40
|
-
document.adoptedStyleSheets = [
|
|
41
|
-
...document.adoptedStyleSheets,
|
|
42
|
-
styleSheet
|
|
43
|
-
];
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
const LazyFeature = useCachedFeature(url);
|
|
47
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FeatureErrorBoundary.FeatureErrorBoundary, { url, children: /* @__PURE__ */ jsxRuntime.jsx(LazyFeature, { ...props, ...params }) });
|
|
48
|
-
}
|
|
49
|
-
const Feature = React.memo(RawFeature);
|
|
50
|
-
Feature.displayName = "Feature";
|
|
51
|
-
vuuUtils.registerComponent("Feature", Feature, "view");
|
|
52
|
-
|
|
53
|
-
exports.Feature = Feature;
|
|
54
|
-
//# sourceMappingURL=Feature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.js","sources":["../../../../packages/vuu-shell/src/feature/Feature.tsx"],"sourcesContent":["import {\n DynamicFeatureProps,\n importCSS,\n registerComponent,\n} from \"@vuu-ui/vuu-utils\";\nimport React, { useEffect } from \"react\";\nimport { FeatureErrorBoundary } from \"./FeatureErrorBoundary\";\n\n/**\n * Ensure we never lazy load the same component more than once\n */\nconst componentsMap = new Map<string, ReturnType<typeof React.lazy>>();\nconst useCachedFeature = (url: string) => {\n useEffect(\n () => () => {\n componentsMap.delete(url);\n },\n [url],\n );\n\n if (!componentsMap.has(url)) {\n componentsMap.set(\n url,\n React.lazy(() => import(/* @vite-ignore */ url)),\n );\n }\n\n const lazyFeature = componentsMap.get(url);\n\n if (!lazyFeature) {\n throw Error(`Unable to load Lazy Feature at url ${url}`);\n } else {\n return lazyFeature;\n }\n};\n\nfunction RawFeature<Params extends object | undefined>({\n url,\n css,\n ComponentProps: params,\n ...props\n}: DynamicFeatureProps<Params>) {\n if (css) {\n // import(/* @vite-ignore */ css, { assert: { type: \"css\" } }).then(\n // (cssModule) => {\n // console.log(\"%cInject Styles\", \"color: blue;font-weight: bold\");\n // document.adoptedStyleSheets = [\n // ...document.adoptedStyleSheets,\n // cssModule.default,\n // ];\n // }\n // );\n // Polyfill until cypress build supports import assertions\n // Note: already fully supported in esbuild and vite\n importCSS(css).then((styleSheet) => {\n document.adoptedStyleSheets = [\n ...document.adoptedStyleSheets,\n styleSheet,\n ];\n });\n }\n\n const LazyFeature = useCachedFeature(url);\n // Suspense has been removed here - caused components to render twice\n return (\n <FeatureErrorBoundary url={url}>\n <LazyFeature {...props} {...params} />\n </FeatureErrorBoundary>\n );\n}\n\n/**\n Feature is a wrapper around React Lazy Loading. It will load a component\n from the given url. That url must resolve to a javascript bundle with a\n single default export. That export must be a React component.\n */\nexport const Feature = React.memo(RawFeature);\nFeature.displayName = \"Feature\";\nregisterComponent(\"Feature\", Feature, \"view\");\n"],"names":["useEffect","importCSS","jsx","FeatureErrorBoundary","registerComponent"],"mappings":";;;;;;;AAWA,MAAM,aAAA,uBAAoB,GAA2C,EAAA;AACrE,MAAM,gBAAA,GAAmB,CAAC,GAAgB,KAAA;AACxC,EAAAA,eAAA;AAAA,IACE,MAAM,MAAM;AACV,MAAA,aAAA,CAAc,OAAO,GAAG,CAAA;AAAA,KAC1B;AAAA,IACA,CAAC,GAAG;AAAA,GACN;AAEA,EAAA,IAAI,CAAC,aAAA,CAAc,GAAI,CAAA,GAAG,CAAG,EAAA;AAC3B,IAAc,aAAA,CAAA,GAAA;AAAA,MACZ,GAAA;AAAA,MACA,KAAA,CAAM,KAAK,MAAM;AAAA;AAAA,QAA0B;AAAA,OAAI;AAAA,KACjD;AAAA;AAGF,EAAM,MAAA,WAAA,GAAc,aAAc,CAAA,GAAA,CAAI,GAAG,CAAA;AAEzC,EAAA,IAAI,CAAC,WAAa,EAAA;AAChB,IAAM,MAAA,KAAA,CAAM,CAAsC,mCAAA,EAAA,GAAG,CAAE,CAAA,CAAA;AAAA,GAClD,MAAA;AACL,IAAO,OAAA,WAAA;AAAA;AAEX,CAAA;AAEA,SAAS,UAA8C,CAAA;AAAA,EACrD,GAAA;AAAA,EACA,GAAA;AAAA,EACA,cAAgB,EAAA,MAAA;AAAA,EAChB,GAAG;AACL,CAAgC,EAAA;AAC9B,EAAA,IAAI,GAAK,EAAA;AAYP,IAAAC,kBAAA,CAAU,GAAG,CAAA,CAAE,IAAK,CAAA,CAAC,UAAe,KAAA;AAClC,MAAA,QAAA,CAAS,kBAAqB,GAAA;AAAA,QAC5B,GAAG,QAAS,CAAA,kBAAA;AAAA,QACZ;AAAA,OACF;AAAA,KACD,CAAA;AAAA;AAGH,EAAM,MAAA,WAAA,GAAc,iBAAiB,GAAG,CAAA;AAExC,EACE,uBAAAC,cAAA,CAACC,6CAAqB,GACpB,EAAA,QAAA,kBAAAD,cAAA,CAAC,eAAa,GAAG,KAAA,EAAQ,GAAG,MAAA,EAAQ,CACtC,EAAA,CAAA;AAEJ;AAOa,MAAA,OAAA,GAAU,KAAM,CAAA,IAAA,CAAK,UAAU;AAC5C,OAAA,CAAQ,WAAc,GAAA,SAAA;AACtBE,0BAAkB,CAAA,SAAA,EAAW,SAAS,MAAM,CAAA;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
|
|
6
|
-
class FeatureErrorBoundary extends React.Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.state = { errorMessage: null };
|
|
10
|
-
}
|
|
11
|
-
static getDerivedStateFromError(error) {
|
|
12
|
-
return { errorMessage: error.message };
|
|
13
|
-
}
|
|
14
|
-
componentDidCatch(error, errorInfo) {
|
|
15
|
-
console.log(`error creating component at ${this.props.url}`);
|
|
16
|
-
console.log(error, errorInfo);
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
if (this.state.errorMessage) {
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
21
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { children: "An error occured while creating component." }),
|
|
22
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: this.state.errorMessage })
|
|
23
|
-
] });
|
|
24
|
-
}
|
|
25
|
-
return this.props.children;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
exports.FeatureErrorBoundary = FeatureErrorBoundary;
|
|
30
|
-
//# sourceMappingURL=FeatureErrorBoundary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureErrorBoundary.js","sources":["../../../../packages/vuu-shell/src/feature/FeatureErrorBoundary.tsx"],"sourcesContent":["import { DynamicFeatureProps } from \"@vuu-ui/vuu-utils\";\nimport React, { ErrorInfo, ReactNode } from \"react\";\n\nexport interface FeatureErrorBoundaryProps extends DynamicFeatureProps {\n children: ReactNode;\n}\n\nexport class FeatureErrorBoundary extends React.Component<\n FeatureErrorBoundaryProps,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any\n> {\n constructor(props: FeatureErrorBoundaryProps) {\n super(props);\n this.state = { errorMessage: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n // Update state so the next render will show the fallback UI.\n return { errorMessage: error.message };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // You can also log the error to an error reporting service\n console.log(`error creating component at ${this.props.url}`);\n console.log(error, errorInfo);\n }\n\n render() {\n if (this.state.errorMessage) {\n return (\n <>\n <h1>An error occured while creating component.</h1>\n <p>{this.state.errorMessage}</p>\n </>\n );\n }\n\n return this.props.children;\n }\n}\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;AAOa,MAAA,oBAAA,SAA6B,MAAM,SAI9C,CAAA;AAAA,EACA,YAAY,KAAkC,EAAA;AAC5C,IAAA,KAAA,CAAM,KAAK,CAAA;AACX,IAAK,IAAA,CAAA,KAAA,GAAQ,EAAE,YAAA,EAAc,IAAK,EAAA;AAAA;AACpC,EAEA,OAAO,yBAAyB,KAAc,EAAA;AAE5C,IAAO,OAAA,EAAE,YAAc,EAAA,KAAA,CAAM,OAAQ,EAAA;AAAA;AACvC,EAEA,iBAAA,CAAkB,OAAc,SAAsB,EAAA;AAEpD,IAAA,OAAA,CAAQ,GAAI,CAAA,CAAA,4BAAA,EAA+B,IAAK,CAAA,KAAA,CAAM,GAAG,CAAE,CAAA,CAAA;AAC3D,IAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,SAAS,CAAA;AAAA;AAC9B,EAEA,MAAS,GAAA;AACP,IAAI,IAAA,IAAA,CAAK,MAAM,YAAc,EAAA;AAC3B,MAAA,uBAEIA,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAAC,QAAG,QAA0C,EAAA,4CAAA,EAAA,CAAA;AAAA,wBAC7CA,cAAA,CAAA,GAAA,EAAA,EAAG,QAAK,EAAA,IAAA,CAAA,KAAA,CAAM,YAAa,EAAA;AAAA,OAC9B,EAAA,CAAA;AAAA;AAIJ,IAAA,OAAO,KAAK,KAAM,CAAA,QAAA;AAAA;AAEtB;;;;"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var vuuDataReact = require('@vuu-ui/vuu-data-react');
|
|
7
|
-
|
|
8
|
-
const NO_FEATURES = [];
|
|
9
|
-
const NO_STATICFEATURES = [];
|
|
10
|
-
const NO_SYSTEMLAYOUTS = [];
|
|
11
|
-
const NO_FEATURES_VUU = {
|
|
12
|
-
dynamicFeatures: NO_FEATURES,
|
|
13
|
-
tableFeatures: NO_FEATURES
|
|
14
|
-
};
|
|
15
|
-
const FeatureContext = React.createContext({
|
|
16
|
-
dynamicFeatures: NO_FEATURES,
|
|
17
|
-
tableFeatures: NO_FEATURES,
|
|
18
|
-
staticFeatures: NO_STATICFEATURES
|
|
19
|
-
});
|
|
20
|
-
const LayoutContext = React.createContext({
|
|
21
|
-
systemLayouts: NO_SYSTEMLAYOUTS
|
|
22
|
-
});
|
|
23
|
-
const FeatureAndLayoutProvider = ({
|
|
24
|
-
children,
|
|
25
|
-
dynamicFeatures: dynamicFeaturesProp = [],
|
|
26
|
-
staticFeatures,
|
|
27
|
-
systemLayouts
|
|
28
|
-
}) => {
|
|
29
|
-
const tableSchemas = vuuDataReact.useVuuTables();
|
|
30
|
-
const { dynamicFeatures, tableFeatures } = React.useMemo(
|
|
31
|
-
() => tableSchemas ? vuuUtils.getCustomAndTableFeatures(dynamicFeaturesProp, tableSchemas) : NO_FEATURES_VUU,
|
|
32
|
-
[dynamicFeaturesProp, tableSchemas]
|
|
33
|
-
);
|
|
34
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
-
FeatureContext.Provider,
|
|
36
|
-
{
|
|
37
|
-
value: {
|
|
38
|
-
dynamicFeatures,
|
|
39
|
-
tableFeatures,
|
|
40
|
-
staticFeatures
|
|
41
|
-
},
|
|
42
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
-
LayoutContext.Provider,
|
|
44
|
-
{
|
|
45
|
-
value: {
|
|
46
|
-
systemLayouts
|
|
47
|
-
},
|
|
48
|
-
children
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
const useFeatures = () => React.useContext(FeatureContext);
|
|
55
|
-
const useLayouts = () => React.useContext(LayoutContext);
|
|
56
|
-
|
|
57
|
-
exports.FeatureAndLayoutProvider = FeatureAndLayoutProvider;
|
|
58
|
-
exports.useFeatures = useFeatures;
|
|
59
|
-
exports.useLayouts = useLayouts;
|
|
60
|
-
//# sourceMappingURL=FeatureAndLayoutProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureAndLayoutProvider.js","sources":["../../../../packages/vuu-shell/src/feature-and-layout-provider/FeatureAndLayoutProvider.tsx"],"sourcesContent":["import {\n DynamicFeatureDescriptor,\n DynamicFeatureProps,\n FilterTableFeatureProps,\n StaticFeatureDescriptor,\n SystemLayoutMetadata,\n getCustomAndTableFeatures,\n} from \"@vuu-ui/vuu-utils\";\nimport {\n ReactElement,\n ReactNode,\n createContext,\n useContext,\n useMemo,\n} from \"react\";\nimport { useVuuTables } from \"@vuu-ui/vuu-data-react\";\n\nexport interface FeatureContextProps {\n dynamicFeatures?: DynamicFeatureProps[];\n tableFeatures?: DynamicFeatureProps<FilterTableFeatureProps>[];\n staticFeatures?: StaticFeatureDescriptor[];\n}\n\nexport interface LayoutContextProps {\n systemLayouts?: SystemLayoutMetadata[];\n}\n\nconst NO_FEATURES: DynamicFeatureDescriptor[] = [];\nconst NO_STATICFEATURES: StaticFeatureDescriptor[] = [];\nconst NO_SYSTEMLAYOUTS: SystemLayoutMetadata[] = [];\n\nconst NO_FEATURES_VUU = {\n dynamicFeatures: NO_FEATURES,\n tableFeatures: NO_FEATURES,\n};\n\nconst FeatureContext = createContext<FeatureContextProps>({\n dynamicFeatures: NO_FEATURES,\n tableFeatures: NO_FEATURES,\n staticFeatures: NO_STATICFEATURES,\n});\n\nconst LayoutContext = createContext<LayoutContextProps>({\n systemLayouts: NO_SYSTEMLAYOUTS,\n});\n\nexport interface FeatureAndLayoutProviderProps\n extends Partial<FeatureContextProps> {\n children: ReactNode;\n dynamicFeatures?: DynamicFeatureDescriptor[];\n staticFeatures?: StaticFeatureDescriptor[];\n systemLayouts?: SystemLayoutMetadata[];\n}\n\nexport const FeatureAndLayoutProvider = ({\n children,\n dynamicFeatures: dynamicFeaturesProp = [],\n staticFeatures,\n systemLayouts,\n}: FeatureAndLayoutProviderProps): ReactElement => {\n const tableSchemas = useVuuTables();\n\n const { dynamicFeatures, tableFeatures } = useMemo<{\n dynamicFeatures: DynamicFeatureProps[];\n tableFeatures: DynamicFeatureProps<FilterTableFeatureProps>[];\n }>(\n () =>\n tableSchemas\n ? getCustomAndTableFeatures(dynamicFeaturesProp, tableSchemas)\n : NO_FEATURES_VUU,\n [dynamicFeaturesProp, tableSchemas],\n );\n\n return (\n <FeatureContext.Provider\n value={{\n dynamicFeatures,\n tableFeatures,\n staticFeatures,\n }}\n >\n <LayoutContext.Provider\n value={{\n systemLayouts,\n }}\n >\n {children}\n </LayoutContext.Provider>\n </FeatureContext.Provider>\n );\n};\n\nexport const useFeatures = () => useContext(FeatureContext);\nexport const useLayouts = () => useContext(LayoutContext);\n"],"names":["createContext","useVuuTables","useMemo","getCustomAndTableFeatures","jsx","useContext"],"mappings":";;;;;;;AA2BA,MAAM,cAA0C,EAAC;AACjD,MAAM,oBAA+C,EAAC;AACtD,MAAM,mBAA2C,EAAC;AAElD,MAAM,eAAkB,GAAA;AAAA,EACtB,eAAiB,EAAA,WAAA;AAAA,EACjB,aAAe,EAAA;AACjB,CAAA;AAEA,MAAM,iBAAiBA,mBAAmC,CAAA;AAAA,EACxD,eAAiB,EAAA,WAAA;AAAA,EACjB,aAAe,EAAA,WAAA;AAAA,EACf,cAAgB,EAAA;AAClB,CAAC,CAAA;AAED,MAAM,gBAAgBA,mBAAkC,CAAA;AAAA,EACtD,aAAe,EAAA;AACjB,CAAC,CAAA;AAUM,MAAM,2BAA2B,CAAC;AAAA,EACvC,QAAA;AAAA,EACA,eAAA,EAAiB,sBAAsB,EAAC;AAAA,EACxC,cAAA;AAAA,EACA;AACF,CAAmD,KAAA;AACjD,EAAA,MAAM,eAAeC,yBAAa,EAAA;AAElC,EAAM,MAAA,EAAE,eAAiB,EAAA,aAAA,EAAkB,GAAAC,aAAA;AAAA,IAIzC,MACE,YAAA,GACIC,kCAA0B,CAAA,mBAAA,EAAqB,YAAY,CAC3D,GAAA,eAAA;AAAA,IACN,CAAC,qBAAqB,YAAY;AAAA,GACpC;AAEA,EACE,uBAAAC,cAAA;AAAA,IAAC,cAAe,CAAA,QAAA;AAAA,IAAf;AAAA,MACC,KAAO,EAAA;AAAA,QACL,eAAA;AAAA,QACA,aAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,kBAAAA,cAAA;AAAA,QAAC,aAAc,CAAA,QAAA;AAAA,QAAd;AAAA,UACC,KAAO,EAAA;AAAA,YACL;AAAA,WACF;AAAA,UAEC;AAAA;AAAA;AACH;AAAA,GACF;AAEJ;AAEa,MAAA,WAAA,GAAc,MAAMC,gBAAA,CAAW,cAAc;AAC7C,MAAA,UAAA,GAAa,MAAMA,gBAAA,CAAW,aAAa;;;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var featureListCss = ".vuuFeatureList {\n --vuuListItem-padding: var(--salt-spacing-200);\n background: var(\n --vuuFeatureList-background,\n var(--salt-container-primary-background)\n );\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 0 var(--vuuFeatureList-padding, 0);\n}\n\n.vuuFeatureList-header {\n align-items: center;\n display: flex;\n flex: 0 0 48px;\n font-weight: 700;\n line-height: 2;\n}\n\n.vuuFeatureList-content {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n font-size: 12px;\n font-weight: 700;\n overflow: auto;\n}\n\n.vuuFeatureList-standalone {\n margin-top: 24px;\n}\n\n.vuuFeatureList-group {\n --vuuMeasuredContainer-flex: 0 0 auto;\n\n display: flex;\n flex-direction: column;\n\n .vuuFeatureList-groupHeader {\n flex: 0 0 32px;\n padding: 8px 0;\n }\n\n .vuuPalette {\n flex: 1 1 auto;\n height: auto;\n }\n}\n\n.vuuFeatureList-group:first-child {\n margin-top: 12px;\n}\n\n.vuuFeatureList-group + .vuuFeatureList-group {\n margin-top: 24px;\n}\n\n.vuuFeatureList-itemName {\n font-weight: 700;\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = featureListCss;
|
|
6
|
-
//# sourceMappingURL=FeatureList.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureList.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var vuuLayout = require('@vuu-ui/vuu-layout');
|
|
5
|
-
var vuuUiControls = require('@vuu-ui/vuu-ui-controls');
|
|
6
|
-
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
7
|
-
var styles = require('@salt-ds/styles');
|
|
8
|
-
var window = require('@salt-ds/window');
|
|
9
|
-
var cx = require('clsx');
|
|
10
|
-
var React = require('react');
|
|
11
|
-
var Feature = require('../feature/Feature.js');
|
|
12
|
-
var FeatureList$1 = require('./FeatureList.css.js');
|
|
13
|
-
|
|
14
|
-
const classBase = "vuuFeatureList";
|
|
15
|
-
const FeatureList = ({
|
|
16
|
-
features,
|
|
17
|
-
title = "VUU TABLES",
|
|
18
|
-
...htmlAttributes
|
|
19
|
-
}) => {
|
|
20
|
-
const targetWindow = window.useWindow();
|
|
21
|
-
styles.useComponentCssInjection({
|
|
22
|
-
testId: "vuu-feature-list",
|
|
23
|
-
css: FeatureList$1,
|
|
24
|
-
window: targetWindow
|
|
25
|
-
});
|
|
26
|
-
const content = React.useMemo(() => {
|
|
27
|
-
if (vuuUtils.isStaticFeatures(features)) {
|
|
28
|
-
return features.map(({ label, type }, idx) => {
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30
|
-
vuuLayout.PaletteItem,
|
|
31
|
-
{
|
|
32
|
-
ViewProps: {
|
|
33
|
-
closeable: true,
|
|
34
|
-
header: true,
|
|
35
|
-
resize: "defer",
|
|
36
|
-
resizeable: true
|
|
37
|
-
},
|
|
38
|
-
component: vuuUtils.featureFromJson({ type }),
|
|
39
|
-
value: label,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsxRuntime.jsx(vuuUiControls.Icon, { name: "draggable", size: 18 }),
|
|
42
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${classBase}-itemName`, children: label })
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
idx
|
|
46
|
-
);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
if (Array.isArray(features)) {
|
|
50
|
-
return [
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-standalone`, children: /* @__PURE__ */ jsxRuntime.jsx(vuuLayout.Palette, { orientation: "vertical", children: features.map(({ ViewProps, ...featureProps }, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
52
|
-
vuuLayout.PaletteItem,
|
|
53
|
-
{
|
|
54
|
-
ViewProps: {
|
|
55
|
-
closeable: true,
|
|
56
|
-
header: true,
|
|
57
|
-
resize: "defer",
|
|
58
|
-
resizeable: true,
|
|
59
|
-
title: featureProps.title,
|
|
60
|
-
...ViewProps
|
|
61
|
-
},
|
|
62
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(Feature.Feature, { ...featureProps }),
|
|
63
|
-
value: featureProps.title,
|
|
64
|
-
children: [
|
|
65
|
-
/* @__PURE__ */ jsxRuntime.jsx(vuuUiControls.Icon, { name: "draggable", size: 18 }),
|
|
66
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${classBase}-itemName`, children: featureProps.title })
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
i
|
|
70
|
-
)) }, "0") }, 0)
|
|
71
|
-
];
|
|
72
|
-
} else {
|
|
73
|
-
return Object.entries(features).map(([heading, featureList], index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${classBase}-group`, children: [
|
|
74
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-groupHeader`, children: heading }),
|
|
75
|
-
/* @__PURE__ */ jsxRuntime.jsx(vuuLayout.Palette, { orientation: "vertical", children: featureList.map(
|
|
76
|
-
({ ViewProps, ...featureProps }, i) => {
|
|
77
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
78
|
-
vuuLayout.PaletteItem,
|
|
79
|
-
{
|
|
80
|
-
ViewProps: {
|
|
81
|
-
closeable: true,
|
|
82
|
-
header: true,
|
|
83
|
-
resize: "defer",
|
|
84
|
-
resizeable: true,
|
|
85
|
-
title: featureProps.title,
|
|
86
|
-
...ViewProps
|
|
87
|
-
},
|
|
88
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(Feature.Feature, { ...featureProps }),
|
|
89
|
-
value: featureProps.title,
|
|
90
|
-
children: [
|
|
91
|
-
/* @__PURE__ */ jsxRuntime.jsx(vuuUiControls.Icon, { name: "draggable", size: 18 }),
|
|
92
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${classBase}-itemName`, children: featureProps.title })
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
i
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
) })
|
|
99
|
-
] }, index));
|
|
100
|
-
}
|
|
101
|
-
}, [features]);
|
|
102
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...htmlAttributes, className: cx(classBase, "vuuScrollable"), children: [
|
|
103
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-header`, children: title }),
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${classBase}-content`, children: content })
|
|
105
|
-
] });
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
exports.FeatureList = FeatureList;
|
|
109
|
-
//# sourceMappingURL=FeatureList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureList.js","sources":["../../../../packages/vuu-shell/src/feature-list/FeatureList.tsx"],"sourcesContent":["import { Palette, PaletteItem } from \"@vuu-ui/vuu-layout\";\nimport { Icon } from \"@vuu-ui/vuu-ui-controls\";\nimport {\n DynamicFeatureProps,\n StaticFeatureDescriptor,\n featureFromJson,\n isStaticFeatures,\n} from \"@vuu-ui/vuu-utils\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport cx from \"clsx\";\nimport { HTMLAttributes, Key, ReactElement, useMemo } from \"react\";\nimport { Feature } from \"../feature/Feature\";\n\nimport featureListCss from \"./FeatureList.css\";\n\nconst classBase = \"vuuFeatureList\";\n\nexport type GroupedFeatureProps<P extends object | undefined = object> = Record<\n string,\n DynamicFeatureProps<P>[]\n>;\n\nexport interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {\n features:\n | DynamicFeatureProps[]\n | GroupedFeatureProps\n | StaticFeatureDescriptor[];\n}\n\nexport const FeatureList = ({\n features,\n title = \"VUU TABLES\",\n ...htmlAttributes\n}: FeatureListProps) => {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"vuu-feature-list\",\n css: featureListCss,\n window: targetWindow,\n });\n\n const content = useMemo<ReactElement[]>(() => {\n if (isStaticFeatures(features)) {\n return features.map(({ label, type }, idx) => {\n return (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n }}\n component={featureFromJson({ type })}\n key={idx}\n value={label}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>{label}</span>\n </PaletteItem>\n );\n });\n }\n if (Array.isArray(features)) {\n return [\n <div className={`${classBase}-standalone`} key={0}>\n <Palette key=\"0\" orientation=\"vertical\">\n {features.map(({ ViewProps, ...featureProps }, i) => (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n title: featureProps.title,\n ...ViewProps,\n }}\n component={<Feature {...featureProps} />}\n key={i}\n value={featureProps.title}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>\n {featureProps.title}\n </span>\n </PaletteItem>\n ))}\n </Palette>\n </div>,\n ];\n } else {\n return Object.entries(features).map(([heading, featureList], index) => (\n <div className={`${classBase}-group`} key={index}>\n <div className={`${classBase}-groupHeader`}>{heading}</div>\n <Palette orientation=\"vertical\">\n {featureList.map(\n (\n { ViewProps, ...featureProps }: DynamicFeatureProps<object>,\n i: Key,\n ) => {\n return (\n <PaletteItem\n ViewProps={{\n closeable: true,\n header: true,\n resize: \"defer\",\n resizeable: true,\n title: featureProps.title,\n ...ViewProps,\n }}\n component={<Feature {...featureProps} />}\n key={i}\n value={featureProps.title}\n >\n <Icon name=\"draggable\" size={18} />\n <span className={`${classBase}-itemName`}>\n {featureProps.title}\n </span>\n </PaletteItem>\n );\n },\n )}\n </Palette>\n </div>\n ));\n }\n }, [features]);\n\n return (\n <div {...htmlAttributes} className={cx(classBase, \"vuuScrollable\")}>\n <div className={`${classBase}-header`}>{title}</div>\n <div className={`${classBase}-content`}>{content}</div>\n </div>\n );\n};\n"],"names":["useWindow","useComponentCssInjection","featureListCss","useMemo","isStaticFeatures","jsxs","PaletteItem","featureFromJson","jsx","Icon","Palette","Feature"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,SAAY,GAAA,gBAAA;AAcX,MAAM,cAAc,CAAC;AAAA,EAC1B,QAAA;AAAA,EACA,KAAQ,GAAA,YAAA;AAAA,EACR,GAAG;AACL,CAAwB,KAAA;AACtB,EAAA,MAAM,eAAeA,gBAAU,EAAA;AAC/B,EAAyBC,+BAAA,CAAA;AAAA,IACvB,MAAQ,EAAA,kBAAA;AAAA,IACR,GAAK,EAAAC,aAAA;AAAA,IACL,MAAQ,EAAA;AAAA,GACT,CAAA;AAED,EAAM,MAAA,OAAA,GAAUC,cAAwB,MAAM;AAC5C,IAAI,IAAAC,yBAAA,CAAiB,QAAQ,CAAG,EAAA;AAC9B,MAAA,OAAO,SAAS,GAAI,CAAA,CAAC,EAAE,KAAO,EAAA,IAAA,IAAQ,GAAQ,KAAA;AAC5C,QACE,uBAAAC,eAAA;AAAA,UAACC,qBAAA;AAAA,UAAA;AAAA,YACC,SAAW,EAAA;AAAA,cACT,SAAW,EAAA,IAAA;AAAA,cACX,MAAQ,EAAA,IAAA;AAAA,cACR,MAAQ,EAAA,OAAA;AAAA,cACR,UAAY,EAAA;AAAA,aACd;AAAA,YACA,SAAW,EAAAC,wBAAA,CAAgB,EAAE,IAAA,EAAM,CAAA;AAAA,YAEnC,KAAO,EAAA,KAAA;AAAA,YAEP,QAAA,EAAA;AAAA,8BAAAC,cAAA,CAACC,kB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AAA;AACH,GACF,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EACE,uBAAAJ,eAAA,CAAC,SAAK,GAAG,cAAA,EAAgB,WAAW,EAAG,CAAA,SAAA,EAAW,eAAe,CAC/D,EAAA,QAAA,EAAA;AAAA,oBAAAG,cAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,WAAY,QAAM,EAAA,KAAA,EAAA,CAAA;AAAA,mCAC7C,KAAI,EAAA,EAAA,SAAA,EAAW,CAAG,EAAA,SAAS,YAAa,QAAQ,EAAA,OAAA,EAAA;AAAA,GACnD,EAAA,CAAA;AAEJ;;;;"}
|
package/cjs/index.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var ApplicationProvider = require('./application-provider/ApplicationProvider.js');
|
|
4
|
-
var AppHeader = require('./app-header/AppHeader.js');
|
|
5
|
-
var Feature = require('./feature/Feature.js');
|
|
6
|
-
var FeatureAndLayoutProvider = require('./feature-and-layout-provider/FeatureAndLayoutProvider.js');
|
|
7
|
-
var LeftNav = require('./left-nav/LeftNav.js');
|
|
8
|
-
var LoginPanel = require('./login/LoginPanel.js');
|
|
9
|
-
var PersistenceProvider = require('./persistence-manager/PersistenceProvider.js');
|
|
10
|
-
var LocalPersistenceManager = require('./persistence-manager/LocalPersistenceManager.js');
|
|
11
|
-
var RemotePersistenceManager = require('./persistence-manager/RemotePersistenceManager.js');
|
|
12
|
-
var StaticPersistenceManager = require('./persistence-manager/StaticPersistenceManager.js');
|
|
13
|
-
var shell = require('./shell.js');
|
|
14
|
-
var ContextPanel = require('./shell-layout-templates/context-panel/ContextPanel.js');
|
|
15
|
-
var useShellLayout = require('./shell-layout-templates/useShellLayout.js');
|
|
16
|
-
var SidePanel = require('./shell-layout-templates/side-panel/SidePanel.js');
|
|
17
|
-
var ShellContextProvider = require('./ShellContextProvider.js');
|
|
18
|
-
var FeatureList = require('./feature-list/FeatureList.js');
|
|
19
|
-
var ThemeSwitch = require('./theme-switch/ThemeSwitch.js');
|
|
20
|
-
var UserSettingsPanel = require('./user-settings/UserSettingsPanel.js');
|
|
21
|
-
var SettingsForm = require('./user-settings/SettingsForm.js');
|
|
22
|
-
var SaveLayoutPanel = require('./workspace-management/SaveLayoutPanel.js');
|
|
23
|
-
var LayoutList = require('./workspace-management/LayoutList.js');
|
|
24
|
-
var WorkspaceProvider = require('./workspace-management/WorkspaceProvider.js');
|
|
25
|
-
var defaultWorkspaceJSON = require('./workspace-management/defaultWorkspaceJSON.js');
|
|
26
|
-
var useWorkspaceContextMenuItems = require('./workspace-management/useWorkspaceContextMenuItems.js');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
exports.ApplicationProvider = ApplicationProvider.ApplicationProvider;
|
|
31
|
-
exports.useApplicationSettings = ApplicationProvider.useApplicationSettings;
|
|
32
|
-
exports.useApplicationUser = ApplicationProvider.useApplicationUser;
|
|
33
|
-
exports.useLogout = ApplicationProvider.useLogout;
|
|
34
|
-
exports.useUserSetting = ApplicationProvider.useUserSetting;
|
|
35
|
-
exports.AppHeader = AppHeader.AppHeader;
|
|
36
|
-
exports.Feature = Feature.Feature;
|
|
37
|
-
exports.FeatureAndLayoutProvider = FeatureAndLayoutProvider.FeatureAndLayoutProvider;
|
|
38
|
-
exports.useFeatures = FeatureAndLayoutProvider.useFeatures;
|
|
39
|
-
exports.useLayouts = FeatureAndLayoutProvider.useLayouts;
|
|
40
|
-
exports.LeftNav = LeftNav.LeftNav;
|
|
41
|
-
exports.LoginPanel = LoginPanel.LoginPanel;
|
|
42
|
-
exports.PersistenceContext = PersistenceProvider.PersistenceContext;
|
|
43
|
-
exports.PersistenceProvider = PersistenceProvider.PersistenceProvider;
|
|
44
|
-
exports.usePersistenceManager = PersistenceProvider.usePersistenceManager;
|
|
45
|
-
exports.LocalPersistenceManager = LocalPersistenceManager.LocalPersistenceManager;
|
|
46
|
-
exports.RemotePersistenceManager = RemotePersistenceManager.RemotePersistenceManager;
|
|
47
|
-
exports.StaticPersistenceManager = StaticPersistenceManager.StaticPersistenceManager;
|
|
48
|
-
exports.Shell = shell.Shell;
|
|
49
|
-
exports.ContextPanel = ContextPanel.ContextPanel;
|
|
50
|
-
exports.useShellLayout = useShellLayout.useShellLayout;
|
|
51
|
-
exports.SidePanel = SidePanel.SidePanel;
|
|
52
|
-
exports.ShellContextProvider = ShellContextProvider.ShellContextProvider;
|
|
53
|
-
exports.FeatureList = FeatureList.FeatureList;
|
|
54
|
-
exports.ThemeSwitch = ThemeSwitch.ThemeSwitch;
|
|
55
|
-
exports.UserSettingsPanel = UserSettingsPanel.UserSettingsPanel;
|
|
56
|
-
exports.FormControl = SettingsForm.FormControl;
|
|
57
|
-
exports.SettingsForm = SettingsForm.SettingsForm;
|
|
58
|
-
exports.isBooleanProperty = SettingsForm.isBooleanProperty;
|
|
59
|
-
exports.isOption = SettingsForm.isOption;
|
|
60
|
-
exports.isStringOrNumber = SettingsForm.isStringOrNumber;
|
|
61
|
-
exports.SaveLayoutPanel = SaveLayoutPanel.SaveLayoutPanel;
|
|
62
|
-
exports.LayoutList = LayoutList.LayoutList;
|
|
63
|
-
exports.WorkspaceProvider = WorkspaceProvider.WorkspaceProvider;
|
|
64
|
-
exports.useWorkspace = WorkspaceProvider.useWorkspace;
|
|
65
|
-
exports.defaultWorkspaceJSON = defaultWorkspaceJSON.defaultWorkspaceJSON;
|
|
66
|
-
exports.getStackWorkspaceJSON = defaultWorkspaceJSON.getStackWorkspaceJSON;
|
|
67
|
-
exports.getWorkspaceWithLayoutJSON = defaultWorkspaceJSON.getWorkspaceWithLayoutJSON;
|
|
68
|
-
exports.loadingJSON = defaultWorkspaceJSON.loadingJSON;
|
|
69
|
-
exports.warningLayout = defaultWorkspaceJSON.warningLayout;
|
|
70
|
-
exports.useWorkspaceContextMenuItems = useWorkspaceContextMenuItems.useWorkspaceContextMenuItems;
|
|
71
|
-
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var leftNavCss = ".vuuLeftNav {\n --vuuOverflowContainer-height: auto;\n --vuuFeatureList-padding: 195px 32px 16px 24px;\n --salt-navigable-fontWeight-active: 700;\n --vuuTab-background-selected: rgba(255, 255, 255, 0.1);\n --vuuTab-hover-background: rgba(255, 255, 255, 0.1);\n --vuuTab-before-content: none;\n --vuuTab-borderRadius: 6px;\n --vuuTab-height: 40px;\n --vuuTabstrip-fontWeight: 700;\n --vuuTabstrip-width: 100%;\n --svg-demo: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M11.3333 11C11.52 11 11.6667 10.8533 11.6667 10.6667C11.6667 10.48 11.52 10.3333 11.3333 10.3333C11.1467 10.3333 11 10.48 11 10.6667C11 10.8533 11.1467 11 11.3333 11Z\"/><path d=\"M5.99999 8.66667C6.36818 8.66667 6.66666 8.36819 6.66666 8C6.66666 7.63181 6.36818 7.33334 5.99999 7.33334C5.63181 7.33334 5.33333 7.63181 5.33333 8C5.33333 8.36819 5.63181 8.66667 5.99999 8.66667Z\"/><path d=\"M8.66667 6C9.03486 6 9.33333 5.70152 9.33333 5.33333C9.33333 4.96514 9.03486 4.66667 8.66667 4.66667C8.29848 4.66667 8 4.96514 8 5.33333C8 5.70152 8.29848 6 8.66667 6Z\"/><path d=\"M8.66667 11.3333C9.03486 11.3333 9.33333 11.0349 9.33333 10.6667C9.33333 10.2985 9.03486 10 8.66667 10C8.29848 10 8 10.2985 8 10.6667C8 11.0349 8.29848 11.3333 8.66667 11.3333Z\"/><path d=\"M11.3333 8.33333C11.52 8.33333 11.6667 8.18666 11.6667 8C11.6667 7.81333 11.52 7.66666 11.3333 7.66666C11.1467 7.66666 11 7.81333 11 8C11 8.18666 11.1467 8.33333 11.3333 8.33333Z\"/><path d=\"M8.66667 8.66667C9.03486 8.66667 9.33333 8.36819 9.33333 8C9.33333 7.63181 9.03486 7.33334 8.66667 7.33334C8.29848 7.33334 8 7.63181 8 8C8 8.36819 8.29848 8.66667 8.66667 8.66667Z\"/><path d=\"M2 2H14V3.33333H2V2Z\"/><path d=\"M3.33333 6.33333C3.88561 6.33333 4.33333 5.88562 4.33333 5.33333C4.33333 4.78105 3.88561 4.33333 3.33333 4.33333C2.78104 4.33333 2.33333 4.78105 2.33333 5.33333C2.33333 5.88562 2.78104 6.33333 3.33333 6.33333Z\"/><path d=\"M3.33333 9C3.88561 9 4.33333 8.55228 4.33333 8C4.33333 7.44772 3.88561 7 3.33333 7C2.78104 7 2.33333 7.44772 2.33333 8C2.33333 8.55228 2.78104 9 3.33333 9Z\"/><path d=\"M3.33333 11.6667C3.88561 11.6667 4.33333 11.2189 4.33333 10.6667C4.33333 10.1144 3.88561 9.66666 3.33333 9.66666C2.78104 9.66666 2.33333 10.1144 2.33333 10.6667C2.33333 11.2189 2.78104 11.6667 3.33333 11.6667Z\"/><path d=\"M11.3333 5.66667C11.52 5.66667 11.6667 5.52 11.6667 5.33333C11.6667 5.14667 11.52 5 11.3333 5C11.1467 5 11 5.14667 11 5.33333C11 5.52 11.1467 5.66667 11.3333 5.66667Z\"/><path d=\"M5.99999 11.3333C6.36818 11.3333 6.66666 11.0349 6.66666 10.6667C6.66666 10.2985 6.36818 10 5.99999 10C5.63181 10 5.33333 10.2985 5.33333 10.6667C5.33333 11.0349 5.63181 11.3333 5.99999 11.3333Z\"/><path d=\"M5.99999 6C6.36818 6 6.66666 5.70152 6.66666 5.33333C6.66666 4.96514 6.36818 4.66667 5.99999 4.66667C5.63181 4.66667 5.33333 4.96514 5.33333 5.33333C5.33333 5.70152 5.63181 6 5.99999 6Z\"/><path d=\"M2 12.6667H14V14H2V12.6667Z\"/></svg>');\n --svg-features: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M15.3333 12.6667H14L14 3.33334H15.3333L15.3333 12.6667ZM12.6667 12.6667H11.3333L11.3333 3.33334H12.6667L12.6667 12.6667ZM1.33333 12.6667L9.33333 12.6667C9.69999 12.6667 9.99999 12.3667 9.99999 12V4.00001C9.99999 3.63334 9.69999 3.33334 9.33333 3.33334L1.33333 3.33334C0.966661 3.33334 0.666661 3.63334 0.666661 4.00001L0.666661 12C0.666661 12.3667 0.966661 12.6667 1.33333 12.6667ZM1.99999 4.66667L8.66666 4.66667V11.3333L1.99999 11.3333L1.99999 4.66667Z\"/></svg>');\n --svg-tables: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M2 6H4.66667V3.33334H3.33333C2.6 3.33334 2 3.93334 2 4.66667V6ZM2 9.33334H4.66667V6.66667H2V9.33334ZM5.33333 9.33334H8V6.66667H5.33333V9.33334ZM8.66667 9.33334H11.3333V6.66667H8.66667V9.33334ZM5.33333 6H8V3.33334H5.33333V6ZM8.66667 3.33334V6H11.3333V3.33334H8.66667ZM12 9.33334H14.6667V6.66667H12V9.33334ZM3.33333 12.6667H4.66667V10H2V11.3333C2 12.0667 2.6 12.6667 3.33333 12.6667ZM5.33333 12.6667H8V10H5.33333V12.6667ZM8.66667 12.6667H11.3333V10H8.66667V12.6667ZM12 12.6667H13.3333C14.0667 12.6667 14.6667 12.0667 14.6667 11.3333V10H12V12.6667ZM12 3.33334V6H14.6667V4.66667C14.6667 3.93334 14.0667 3.33334 13.3333 3.33334H12Z\"/></svg>');\n --svg-layouts: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M15.3333 10H14V11.3333H15.3333V10ZM15.3333 12.6667H14V14H15.3333V12.6667ZM15.3333 7.33333H14V8.66667H15.3333V7.33333ZM10 2H8.66667V3.33333H10V2ZM15.3333 4.66667H14V6H15.3333V4.66667ZM0.666672 14H7.33334V10H0.666672V14ZM2.00001 4.66667H0.666672V6H2.00001V4.66667ZM10 12.6667H8.66667V14H10V12.6667ZM12.6667 2H11.3333V3.33333H12.6667V2ZM15.3333 2H14V3.33333H15.3333V2ZM12.6667 12.6667H11.3333V14H12.6667V12.6667ZM2.00001 7.33333H0.666672V8.66667H2.00001V7.33333ZM7.33334 2H6.00001V3.33333H7.33334V2ZM4.66667 2H3.33334V3.33333H4.66667V2ZM2.00001 2H0.666672V3.33333H2.00001V2Z\"/></svg>');\n --vuu-light-text-primary: #15171b;\n\n --menu-level-2-width: 0px;\n\n box-shadow: 3px 4px 4px 0 rgba(0, 0, 0, 0.15);\n display: flex;\n height: calc(100% - 4px);\n margin-bottom: 4px;\n overflow: hidden;\n position: relative;\n transition: width 0.2s ease-out;\n z-index: 0;\n /* width: calc(var(--menu-width) + var(--menu-level-2-width)); */\n /* width: 100%; */\n}\n\n.vuuLeftNav-menu-full {\n --menu-width: var(--nav-menu-expanded-width);\n}\n\n.vuuLeftNav-menu-icons {\n --menu-width: var(--nav-menu-collapsed-width);\n}\n\n.vuuLeftNav-menu-icons-content {\n --menu-width: var(--nav-menu-collapsed-width);\n --menu-level-2-width: var(--nav-menu-content-width);\n}\n\n.vuuLeftNav-menu-full-content {\n --menu-width: var(--nav-menu-expanded-width);\n --menu-level-2-width: var(--nav-menu-content-width);\n}\n\n.vuuLeftNav-menu-icons-content .vuuLeftNav-menu-secondary,\n.vuuLeftNav-menu-full-content .vuuLeftNav-menu-secondary {\n display: flex;\n}\n\n.vuuLeftNav-menu-primary {\n background-color: #2a015f;\n container-type: inline-size;\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 32px 16px;\n transition: flex-basis ease-out 0.2s;\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: var(--menu-width);\n}\n\n.vuuLeftNav-menu-secondary {\n flex: 1 1 auto;\n display: none;\n /* position: absolute; */\n top: 0;\n right: 0;\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: var(--nav-menu-content-width, 240px);\n z-index: -1;\n\n .vuuTabs-tabPanel {\n background: var(--salt-container-primary-background);\n height: 100%;\n padding: 34px 32px 8px 24px;\n }\n}\n\n.vuuLeftNav .vuuTabstrip {\n margin-top: 102px;\n}\n\n.vuuLeftNav .vuuTab {\n --vuuTab-focusVisible-color: pink;\n --vuu-icon-color: white;\n --vuu-icon-left: 12px;\n --vuu-icon-size: 16px;\n border-left: solid 4px transparent;\n padding: 0 0 0 48px;\n}\n\n.vuuLeftNav .vuuTab-selected {\n --vuu-icon-color: var(--salt-navigable-indicator-active);\n border-left: solid 4px var(--salt-navigable-indicator-active);\n}\n\n.vuuLeftNav-logo {\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n}\n\n.vuuLeftNav-main {\n flex: 1 1 auto;\n}\n\n.vuuLeftNav-menu {\n color: white;\n margin-top: 102px;\n padding: 0;\n}\n\n.vuuLeftNav [data-icon=\"demo\"] {\n --vuu-icon-svg: var(--svg-demo);\n}\n\n.vuuLeftNav [data-icon=\"tables\"] {\n --vuu-icon-svg: var(--svg-tables);\n}\n\n.vuuLeftNav [data-icon=\"features\"] {\n --vuu-icon-svg: var(--svg-features);\n}\n\n.vuuLeftNav [data-icon=\"layouts\"] {\n --vuu-icon-svg: var(--svg-layouts);\n}\n\n@container (max-width: 100px) {\n .vuuTab {\n /* --vuu-icon-left: 12px !important; */\n --vuuTab-padding: 0 0 0 42px;\n }\n\n .vuuTab-main {\n display: none !important;\n }\n}\n\n.vuuLeftNav-buttonBar {\n align-items: center;\n display: flex;\n flex: 0 0 100px;\n justify-content: center;\n}\n\n.vuuLeftNav-toggleButton {\n --vuu-icon-color: var(--vuu-light-text-primary);\n --vuu-icon-left: 11px;\n --vuu-icon-top: 10px;\n --vuu-icon-size: 16px;\n background-color: var(--salt-navigable-indicator-active);\n border-width: 0;\n border-radius: 18px;\n height: 36px;\n position: relative;\n width: 36px;\n}\n\n.vuuLeftNav-toggleButton-open {\n --vuu-icon-left: 9px;\n}\n\n.vuuLeftNav-drawer {\n display: flex;\n padding: 0 0 0 24px;\n flex-direction: column;\n align-items: flex-start;\n flex-shrink: 0;\n align-self: stretch;\n background: #fff;\n box-shadow: 3px 4px 4px 0 rgba(0, 0, 0, 0.15);\n height: 100%;\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = leftNavCss;
|
|
6
|
-
//# sourceMappingURL=LeftNav.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LeftNav.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|