@vuu-ui/vuu-shell 4.0.0-alpha.8 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +19 -20
- package/src/app-header/AppHeader.css.js +1 -1
- package/src/app-header/AppHeader.js +26 -36
- package/src/application-provider/ApplicationContext.js +5 -2
- package/src/application-provider/ApplicationProvider.js +59 -8
- package/src/feature/Feature.js +34 -3
- package/src/feature/FeatureErrorBoundary.js +33 -0
- package/src/feature/index.js +0 -1
- package/src/feature-list/FeatureList.css.js +5 -27
- package/src/feature-list/FeatureList.js +96 -117
- package/src/index.js +3 -3
- package/src/left-nav/LeftNav.css.js +4 -2
- package/src/left-nav/LeftNav.js +100 -139
- package/src/persistence-manager/PersistenceProvider.js +3 -10
- package/src/persistence-manager/index.js +0 -3
- package/src/shell-layout-templates/context-panel/ContextPanel.css.js +8 -8
- package/src/shell-layout-templates/context-panel/ContextPanel.js +35 -17
- package/src/shell-layout-templates/context-panel/index.js +0 -1
- package/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.js +40 -54
- package/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.js +64 -54
- package/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.js +28 -49
- package/src/shell-layout-templates/side-panel/SidePanel.css.js +1 -3
- package/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.js +35 -43
- package/src/shell.css.js +3 -86
- package/src/shell.js +70 -148
- 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.js +99 -59
- package/src/workspace-management/SaveLayoutPanel.js +3 -3
- package/src/workspace-management/WorkspaceProvider.js +178 -699
- package/src/workspace-management/index.js +0 -8
- package/src/workspace-management/useWorkspaceContextMenuItems.js +6 -12
- package/types/app-header/AppHeader.d.ts +2 -2
- package/types/application-provider/ApplicationContext.d.ts +6 -1
- package/types/application-provider/ApplicationProvider.d.ts +14 -5
- package/types/feature/Feature.d.ts +10 -2
- package/types/feature/FeatureErrorBoundary.d.ts +1 -1
- package/types/feature/Loader.d.ts +1 -1
- package/types/feature/index.d.ts +1 -2
- package/types/feature-list/FeatureList.d.ts +4 -4
- package/types/index.d.ts +3 -3
- package/types/left-nav/LeftNav.d.ts +1 -2
- package/types/login/LoginPanel.d.ts +1 -1
- package/types/login/VuuLogo.d.ts +1 -1
- package/types/persistence-manager/PersistenceProvider.d.ts +3 -7
- package/types/persistence-manager/index.d.ts +0 -3
- package/types/shell-layout-templates/context-panel/ContextPanel.d.ts +11 -9
- package/types/shell-layout-templates/context-panel/index.d.ts +0 -1
- package/types/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.d.ts +1 -1
- package/types/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.d.ts +1 -1
- package/types/shell-layout-templates/left-main-tabs/useLeftMainTabs.d.ts +1 -1
- package/types/shell-layout-templates/side-panel/SidePanel.d.ts +1 -1
- package/types/shell-layout-templates/simple-content-pane/useSimpleContentPane.d.ts +1 -1
- package/types/shell-layout-templates/useShellLayout.d.ts +2 -4
- package/types/shell.d.ts +15 -19
- package/types/theme-switch/ThemeSwitch.d.ts +1 -1
- package/types/workspace-management/LayoutList.d.ts +2 -2
- package/types/workspace-management/LayoutTile.d.ts +1 -1
- package/types/workspace-management/SaveLayoutPanel.d.ts +2 -2
- package/types/workspace-management/WorkspaceProvider.d.ts +50 -61
- package/types/workspace-management/defaultWorkspaceJSON.d.ts +6 -7
- package/types/workspace-management/index.d.ts +0 -8
- package/types/workspace-management/useWorkspaceContextMenuItems.d.ts +1 -1
- package/src/module-registry/getRegisteredModules.js +0 -12
- package/src/persistence-manager/LocalWorkspacePersistenceService.js +0 -129
- package/src/persistence-manager/RemoteWorkspacePersistenceService.js +0 -112
- package/src/persistence-manager/WorkspacePersistenceService.js +0 -9
- package/src/shell-layout-templates/context-panel/ApplicationSettingsContextPanel.js +0 -24
- package/src/workspace-management/WorkspaceController.js +0 -73
- package/src/workspace-management/WorkspaceHost.js +0 -194
- package/src/workspace-management/WorkspacePersistentState.js +0 -67
- package/src/workspace-management/WorkspaceRepository.js +0 -127
- package/src/workspace-management/WorkspaceStartPanel.css.js +0 -44
- package/src/workspace-management/WorkspaceStartPanel.js +0 -34
- package/src/workspace-management/shell-workspace-components.js +0 -59
- package/src/workspace-management/workspace-component-registry.js +0 -30
- package/src/workspace-management/workspace-schemas.js +0 -257
- package/types/module-registry/getRegisteredModules.d.ts +0 -5
- package/types/persistence-manager/LocalWorkspacePersistenceService.d.ts +0 -18
- package/types/persistence-manager/RemoteWorkspacePersistenceService.d.ts +0 -25
- package/types/persistence-manager/WorkspacePersistenceService.d.ts +0 -27
- package/types/shell-layout-templates/context-panel/ApplicationSettingsContextPanel.d.ts +0 -1
- package/types/src/ShellContextProvider.d.ts +0 -7
- package/types/src/app-header/AppHeader.d.ts +0 -6
- package/types/src/app-header/index.d.ts +0 -1
- package/types/src/application-provider/ApplicationContext.d.ts +0 -11
- package/types/src/application-provider/ApplicationProvider.d.ts +0 -17
- package/types/src/application-provider/index.d.ts +0 -1
- package/types/src/feature/Feature.d.ts +0 -10
- package/types/src/feature/FeatureErrorBoundary.d.ts +0 -13
- package/types/src/feature/Loader.d.ts +0 -1
- package/types/src/feature/index.d.ts +0 -1
- package/types/src/feature-and-layout-provider/FeatureAndLayoutProvider.d.ts +0 -19
- package/types/src/feature-and-layout-provider/index.d.ts +0 -1
- package/types/src/feature-list/FeatureList.d.ts +0 -7
- package/types/src/feature-list/index.d.ts +0 -1
- package/types/src/get-layout-history.d.ts +0 -8
- package/types/src/index.d.ts +0 -14
- package/types/src/left-nav/LeftNav.d.ts +0 -14
- package/types/src/left-nav/index.d.ts +0 -1
- package/types/src/login/LoginPanel.d.ts +0 -6
- package/types/src/login/VuuLogo.d.ts +0 -1
- package/types/src/persistence-manager/LocalPersistenceManager.d.ts +0 -20
- package/types/src/persistence-manager/PersistenceManager.d.ts +0 -71
- package/types/src/persistence-manager/PersistenceProvider.d.ts +0 -11
- package/types/src/persistence-manager/RemotePersistenceManager.d.ts +0 -25
- package/types/src/persistence-manager/StaticPersistenceManager.d.ts +0 -25
- package/types/src/persistence-manager/index.d.ts +0 -5
- package/types/src/shell-layout-templates/context-panel/ContextPanel.d.ts +0 -13
- package/types/src/shell-layout-templates/context-panel/index.d.ts +0 -1
- package/types/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.d.ts +0 -2
- package/types/src/shell-layout-templates/index.d.ts +0 -3
- package/types/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.d.ts +0 -2
- package/types/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.d.ts +0 -2
- package/types/src/shell-layout-templates/side-panel/SidePanel.d.ts +0 -8
- package/types/src/shell-layout-templates/side-panel/index.d.ts +0 -1
- package/types/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.d.ts +0 -2
- package/types/src/shell-layout-templates/useShellLayout.d.ts +0 -51
- package/types/src/shell.d.ts +0 -17
- package/types/src/theme-switch/ThemeSwitch.d.ts +0 -8
- package/types/src/theme-switch/index.d.ts +0 -1
- package/types/src/user-settings/SettingsForm.d.ts +0 -46
- package/types/src/user-settings/UserSettingsPanel.d.ts +0 -3
- package/types/src/user-settings/index.d.ts +0 -2
- package/types/src/workspace-management/LayoutList.d.ts +0 -2
- package/types/src/workspace-management/LayoutTile.d.ts +0 -7
- package/types/src/workspace-management/SaveLayoutPanel.d.ts +0 -9
- package/types/src/workspace-management/WorkspaceProvider.d.ts +0 -52
- package/types/src/workspace-management/defaultWorkspaceJSON.d.ts +0 -10
- package/types/src/workspace-management/index.d.ts +0 -5
- package/types/src/workspace-management/screenshot-utils.d.ts +0 -6
- package/types/src/workspace-management/useWorkspaceContextMenuItems.d.ts +0 -5
- package/types/workspace-management/WorkspaceController.d.ts +0 -32
- package/types/workspace-management/WorkspaceHost.d.ts +0 -1
- package/types/workspace-management/WorkspacePersistentState.d.ts +0 -19
- package/types/workspace-management/WorkspaceRepository.d.ts +0 -13
- package/types/workspace-management/WorkspaceStartPanel.d.ts +0 -1
- package/types/workspace-management/shell-workspace-components.d.ts +0 -2
- package/types/workspace-management/workspace-component-registry.d.ts +0 -12
- package/types/workspace-management/workspace-schemas.d.ts +0 -69
|
@@ -3,11 +3,3 @@ export * from "./LayoutList.js";
|
|
|
3
3
|
export * from "./WorkspaceProvider.js";
|
|
4
4
|
export * from "./defaultWorkspaceJSON.js";
|
|
5
5
|
export * from "./useWorkspaceContextMenuItems.js";
|
|
6
|
-
export * from "./workspace-schemas.js";
|
|
7
|
-
export * from "./WorkspaceRepository.js";
|
|
8
|
-
export * from "./WorkspacePersistentState.js";
|
|
9
|
-
export * from "./WorkspaceController.js";
|
|
10
|
-
export * from "./workspace-component-registry.js";
|
|
11
|
-
export * from "./WorkspaceHost.js";
|
|
12
|
-
export * from "./WorkspaceStartPanel.js";
|
|
13
|
-
export * from "./shell-workspace-components.js";
|
|
@@ -4,7 +4,7 @@ import { useCallback, useMemo } from "react";
|
|
|
4
4
|
import { SaveLayoutPanel } from "./SaveLayoutPanel.js";
|
|
5
5
|
import { useWorkspace } from "./WorkspaceProvider.js";
|
|
6
6
|
const useWorkspaceContextMenuItems = ()=>{
|
|
7
|
-
const {
|
|
7
|
+
const { saveLayout } = useWorkspace();
|
|
8
8
|
const { showDialog, closeDialog } = useModal();
|
|
9
9
|
const handleCloseDialog = useCallback(()=>{
|
|
10
10
|
closeDialog();
|
|
@@ -12,11 +12,11 @@ const useWorkspaceContextMenuItems = ()=>{
|
|
|
12
12
|
closeDialog
|
|
13
13
|
]);
|
|
14
14
|
const handleSave = useCallback((layoutMetadata)=>{
|
|
15
|
-
|
|
15
|
+
saveLayout(layoutMetadata);
|
|
16
16
|
closeDialog();
|
|
17
17
|
}, [
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
saveLayout,
|
|
19
|
+
closeDialog
|
|
20
20
|
]);
|
|
21
21
|
const [buildMenuOptions, handleMenuAction] = useMemo(()=>[
|
|
22
22
|
(location, options)=>{
|
|
@@ -27,8 +27,8 @@ const useWorkspaceContextMenuItems = ()=>{
|
|
|
27
27
|
id: "save-layout",
|
|
28
28
|
options
|
|
29
29
|
}, {
|
|
30
|
-
label: "
|
|
31
|
-
id: "
|
|
30
|
+
label: "Layout Settings",
|
|
31
|
+
id: "layout-settings",
|
|
32
32
|
options
|
|
33
33
|
});
|
|
34
34
|
return menuDescriptors;
|
|
@@ -43,15 +43,9 @@ const useWorkspaceContextMenuItems = ()=>{
|
|
|
43
43
|
}), "Save Layout", [], true);
|
|
44
44
|
return true;
|
|
45
45
|
}
|
|
46
|
-
if ("close-workspace" === menuItemId && activeWorkspace) {
|
|
47
|
-
closeWorkspace(activeWorkspace.instanceId);
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
46
|
return false;
|
|
51
47
|
}
|
|
52
48
|
], [
|
|
53
|
-
activeWorkspace,
|
|
54
|
-
closeWorkspace,
|
|
55
49
|
handleCloseDialog,
|
|
56
50
|
handleSave,
|
|
57
51
|
showDialog
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ThemeMode } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import {
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
3
|
export interface AppHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
themeMode?: ThemeMode;
|
|
5
5
|
}
|
|
6
|
-
export declare const AppHeader: ({ className: classNameProp, themeMode: _, ...htmlAttributes }: AppHeaderProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const AppHeader: ({ className: classNameProp, themeMode: _, ...htmlAttributes }: AppHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Settings, VuuUser } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
+
import { SettingsSchema } from "../user-settings";
|
|
2
4
|
export interface ApplicationContextProps {
|
|
3
5
|
onUserSettingChanged: (propertyName: string, value: VuuRowDataItemType) => void;
|
|
4
6
|
logout?: () => void;
|
|
7
|
+
userSettings?: Settings;
|
|
8
|
+
userSettingsSchema?: SettingsSchema;
|
|
9
|
+
user: VuuUser;
|
|
5
10
|
}
|
|
6
11
|
export declare const ApplicationContext: import("react").Context<ApplicationContextProps>;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
import { Density, ThemeContextProps } from "@salt-ds/core";
|
|
3
|
+
import { ReactElement, ReactNode } from "react";
|
|
4
|
+
import { ApplicationContextProps } from "./ApplicationContext";
|
|
5
|
+
export interface ApplicationProviderProps extends Partial<Pick<ThemeContextProps, "theme" | "mode">>, Partial<Omit<ApplicationContextProps, "userSettings">> {
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
density?: Density;
|
|
7
8
|
}
|
|
8
|
-
export declare const ApplicationProvider: ({ children, density: densityProp, logout, mode, theme, }: ApplicationProviderProps) => ReactElement | null;
|
|
9
|
+
export declare const ApplicationProvider: ({ children, density: densityProp, logout, mode, theme, userSettingsSchema: userSettingsSchema, user, }: ApplicationProviderProps) => ReactElement | null;
|
|
10
|
+
export declare const useApplicationUser: () => import("@vuu-ui/vuu-utils").VuuUser;
|
|
11
|
+
export declare const useApplicationSettings: () => {
|
|
12
|
+
onUserSettingChanged: (propertyName: string, value: VuuRowDataItemType) => void;
|
|
13
|
+
userSettings: import("@vuu-ui/vuu-utils").Settings | undefined;
|
|
14
|
+
userSettingsSchema: import("..").SettingsSchema | undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare const useUserSetting: () => import("@vuu-ui/vuu-utils").Settings | undefined;
|
|
17
|
+
export declare const useLogout: () => (() => void) | undefined;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type DynamicFeatureProps } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare function RawFeature<Params extends object | undefined>({ url, css, ComponentProps: params, ...props }: DynamicFeatureProps<Params>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
Feature is a wrapper around React Lazy Loading. It will load a component
|
|
6
|
+
from the given url. That url must resolve to a javascript bundle with a
|
|
7
|
+
single default export. That export must be a React component.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Feature: React.MemoExoticComponent<typeof RawFeature>;
|
|
10
|
+
export {};
|
|
@@ -9,5 +9,5 @@ export declare class FeatureErrorBoundary extends React.Component<FeatureErrorBo
|
|
|
9
9
|
errorMessage: string;
|
|
10
10
|
};
|
|
11
11
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
-
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<
|
|
12
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | null | undefined;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Loader: () => import("react").JSX.Element;
|
|
1
|
+
export declare const Loader: () => import("react/jsx-runtime").JSX.Element;
|
package/types/feature/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { RemoteModule, type RemoteModuleProps, } from "@vuu-ui/core/portal";
|
|
1
|
+
export * from './Feature';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DynamicFeatureProps, StaticFeatureDescriptor } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
3
|
export type GroupedFeatureProps<P extends object | undefined = object> = Record<string, DynamicFeatureProps<P>[]>;
|
|
4
4
|
export interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
|
|
5
|
+
features: DynamicFeatureProps[] | GroupedFeatureProps | StaticFeatureDescriptor[];
|
|
6
6
|
}
|
|
7
|
-
export declare const FeatureList: ({ features, title, ...htmlAttributes }: FeatureListProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const FeatureList: ({ features, title, ...htmlAttributes }: FeatureListProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from "./app-header";
|
|
2
1
|
export * from "./application-provider";
|
|
2
|
+
export * from "./app-header";
|
|
3
3
|
export * from "./feature";
|
|
4
4
|
export * from "./feature-and-layout-provider";
|
|
5
|
-
export * from "./feature-list";
|
|
6
5
|
export * from "./left-nav";
|
|
7
6
|
export { LoginPanel, type LoginPanelProps } from "./login/LoginPanel";
|
|
8
|
-
export { getRegisteredModules } from './module-registry/getRegisteredModules';
|
|
9
7
|
export * from "./persistence-manager";
|
|
10
8
|
export * from "./shell";
|
|
11
9
|
export * from "./shell-layout-templates";
|
|
12
10
|
export * from "./ShellContextProvider";
|
|
11
|
+
export * from "./feature-list";
|
|
13
12
|
export * from "./theme-switch";
|
|
13
|
+
export * from "./user-settings";
|
|
14
14
|
export * from "./workspace-management";
|
|
@@ -7,9 +7,8 @@ export interface LeftNavProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
defaultExpanded?: boolean;
|
|
8
8
|
onActiveChange?: (activeTabIndex: number) => void;
|
|
9
9
|
onTogglePrimaryMenu?: (expanded: boolean) => void;
|
|
10
|
-
onWidthChange?: (width: number) => void;
|
|
11
10
|
sizeCollapsed?: number;
|
|
12
11
|
sizeContent?: number;
|
|
13
12
|
sizeExpanded?: number;
|
|
14
13
|
}
|
|
15
|
-
export declare const LeftNav: (props: LeftNavProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const LeftNav: (props: LeftNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,4 +3,4 @@ export interface LoginPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "o
|
|
|
3
3
|
appName?: string;
|
|
4
4
|
onSubmit: (username: string, password: string) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const LoginPanel: ({ appName, className, onSubmit, ...htmlAttributes }: LoginPanelProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const LoginPanel: ({ appName, className, onSubmit, ...htmlAttributes }: LoginPanelProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/login/VuuLogo.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VuuLogo: () => import("react").JSX.Element;
|
|
1
|
+
export declare const VuuLogo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import type { WorkspacePersistenceService } from "./WorkspacePersistenceService";
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { IPersistenceManager } from ".";
|
|
4
3
|
export interface PersistenceContextProps {
|
|
5
4
|
persistenceManager?: IPersistenceManager;
|
|
6
|
-
workspacePersistenceService?: WorkspacePersistenceService;
|
|
7
5
|
}
|
|
8
6
|
export declare const PersistenceContext: import("react").Context<PersistenceContextProps>;
|
|
9
7
|
export interface PersistenceProviderProps extends PersistenceContextProps {
|
|
10
8
|
children: ReactNode;
|
|
11
9
|
}
|
|
12
|
-
export declare const PersistenceProvider: ({ children, persistenceManager,
|
|
10
|
+
export declare const PersistenceProvider: ({ children, persistenceManager, }: PersistenceProviderProps) => ReactElement;
|
|
13
11
|
export declare const usePersistenceManager: () => IPersistenceManager | undefined;
|
|
14
|
-
export declare const useWorkspacePersistenceService: () => WorkspacePersistenceService;
|
|
15
|
-
export declare const useOptionalWorkspacePersistenceService: () => WorkspacePersistenceService | undefined;
|
|
@@ -3,6 +3,3 @@ export * from "./PersistenceProvider";
|
|
|
3
3
|
export * from "./LocalPersistenceManager";
|
|
4
4
|
export * from "./RemotePersistenceManager";
|
|
5
5
|
export * from "./StaticPersistenceManager";
|
|
6
|
-
export * from "./WorkspacePersistenceService";
|
|
7
|
-
export * from "./LocalWorkspacePersistenceService";
|
|
8
|
-
export * from "./RemoteWorkspacePersistenceService";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LayoutJSON } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
3
|
export interface ContextPanelProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
className?: string;
|
|
6
|
+
content?: ReactElement | LayoutJSON;
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
overlay?: boolean;
|
|
11
|
+
title?: ReactNode;
|
|
10
12
|
}
|
|
11
|
-
export declare const ContextPanel: ({ className
|
|
13
|
+
export declare const ContextPanel: ({ className: classNameProp, expanded, content: contentProp, id, onClose, overlay, title, }: ContextPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ShellLayoutTemplateHook } from "../useShellLayout";
|
|
2
2
|
export declare const useFullHeightLeftPanel: ShellLayoutTemplateHook;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ShellLayoutTemplateHook } from "../useShellLayout";
|
|
2
2
|
export declare const useInlayLeftPanel: ShellLayoutTemplateHook;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ShellLayoutTemplateHook } from "../useShellLayout";
|
|
2
2
|
export declare const useLeftMainTabs: ShellLayoutTemplateHook;
|
|
@@ -5,4 +5,4 @@ export interface SidePanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
5
5
|
sizeOpen?: number;
|
|
6
6
|
sizeClosed?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare const SidePanel: ({ children, open, sizeClosed, sizeOpen, style: styleProp, ...htmlAttributes }: SidePanelProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const SidePanel: ({ children, open, sizeClosed, sizeOpen, style: styleProp, ...htmlAttributes }: SidePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ShellLayoutTemplateHook } from "../useShellLayout";
|
|
2
2
|
export declare const useSimpleContentPane: ShellLayoutTemplateHook;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { SidePanelProps as ShellSidePanelProps } from "./side-panel";
|
|
3
3
|
declare const LayoutHook: {
|
|
4
4
|
"full-height": ShellLayoutTemplateHook;
|
|
5
5
|
inlay: ShellLayoutTemplateHook;
|
|
@@ -41,8 +41,6 @@ export interface ShellLayoutProps {
|
|
|
41
41
|
* If template renders Toolbar, these props will be provided
|
|
42
42
|
*/
|
|
43
43
|
ToolbarProps?: ShellToolbarProps;
|
|
44
|
-
/** Supplied by Shell; application code should not normally set this. */
|
|
45
|
-
workspaceHost?: ReactNode;
|
|
46
44
|
}
|
|
47
45
|
/**
|
|
48
46
|
* This hook acts as a stub for the actual shell layout
|
package/types/shell.d.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
+
import { VuuUser } from "@vuu-ui/vuu-utils";
|
|
1
2
|
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { ShellLayoutProps } from "./shell-layout-templates";
|
|
4
|
+
import { SettingsSchema } from "./user-settings";
|
|
5
|
+
import { WorkspaceProps } from "./workspace-management";
|
|
6
|
+
export type LayoutTemplateName = "full-height" | "inlay";
|
|
7
|
+
export interface ShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
shellLayoutProps?: ShellLayoutProps;
|
|
9
|
+
userSettingsSchema?: SettingsSchema;
|
|
10
|
+
workspaceProps?: WorkspaceProps;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
logout?: () => void;
|
|
13
|
+
saveUrl?: string;
|
|
14
|
+
serverUrl?: string;
|
|
15
|
+
user: VuuUser;
|
|
14
16
|
}
|
|
15
|
-
export
|
|
16
|
-
readonly appHeader?: ReactNode;
|
|
17
|
-
readonly leftNavWidth?: number;
|
|
18
|
-
readonly workspaceHost?: ReactNode;
|
|
19
|
-
}
|
|
20
|
-
export declare const StaticShellLayout: ({ appHeader, className, leftNavWidth: initialLeftNavWidth, style, workspaceHost, ...htmlAttributes }: StaticShellLayoutProps) => import("react").JSX.Element;
|
|
21
|
-
export declare const Shell: ({ appHeader, children, leftNavWidth, logout, saveUrl: _saveUrl, serverUrl: _serverUrl, shellLayoutProps, workspaceProps, ...htmlAttributes }: ShellProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const Shell: ({ logout, user, userSettingsSchema, workspaceProps, ...props }: ShellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,4 +5,4 @@ export interface ThemeSwitchProps extends Omit<HTMLAttributes<HTMLDivElement>, "
|
|
|
5
5
|
mode?: ThemeMode;
|
|
6
6
|
onChange: (mode: ThemeMode) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const ThemeSwitch: ({ className: classNameProp, defaultMode: defaultModeProp, mode: modeProp, onChange, ...htmlAttributes }: ThemeSwitchProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const ThemeSwitch: ({ className: classNameProp, defaultMode: defaultModeProp, mode: modeProp, onChange, ...htmlAttributes }: ThemeSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const LayoutList: ({ className, title, ...htmlAttributes }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export declare const LayoutList: ({ className, title, ...htmlAttributes }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,4 +4,4 @@ export interface LayoutTileProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
metadata: LayoutMetadata | SystemLayoutMetadata;
|
|
5
5
|
onLoadLayout: (layoutId?: string, layoutJSON?: LayoutJSON) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const LayoutTile: ({ metadata, onLoadLayout, ...htmlAttributes }: LayoutTileProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const LayoutTile: ({ metadata, onLoadLayout, ...htmlAttributes }: LayoutTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LayoutMetadataDto } from "@vuu-ui/vuu-utils";
|
|
2
2
|
type SaveLayoutPanelProps = {
|
|
3
3
|
componentId?: string;
|
|
4
4
|
defaultTitle?: string;
|
|
5
5
|
onCancel: () => void;
|
|
6
6
|
onSave: (layoutMetadata: LayoutMetadataDto) => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const SaveLayoutPanel: (props: SaveLayoutPanelProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const SaveLayoutPanel: (props: SaveLayoutPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,63 +1,52 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import
|
|
3
|
-
import { type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
readonly settingsCodecs?: GridComponentSettingsRegistry;
|
|
19
|
-
/** @deprecated Tabs are managed by WorkspaceHost. */
|
|
20
|
-
readonly showTabs?: boolean | "left" | "right";
|
|
21
|
-
readonly systemWorkspaces?: readonly NamedWorkspaceDefinitionV1[];
|
|
22
|
-
/** @deprecated Tabs are managed by WorkspaceHost. */
|
|
23
|
-
readonly TabstripProps?: Readonly<Record<string, unknown>>;
|
|
24
|
-
/** @deprecated Migrate this layout to defaultWorkspace. */
|
|
25
|
-
readonly workspaceJSON?: LayoutJSON | readonly LayoutJSON[];
|
|
26
|
-
}
|
|
1
|
+
import { LayoutMetadata, LayoutMetadataDto, type ApplicationSetting, type ApplicationSettings, type LayoutJSON } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
import { type WorkspaceStackProps } from "./defaultWorkspaceJSON";
|
|
4
|
+
export type WorkspaceProps = WorkspaceStackProps & {
|
|
5
|
+
layoutPlaceholderJSON?: LayoutJSON;
|
|
6
|
+
/**
|
|
7
|
+
* layoutJSON defines the default layout to render on first load and until such time as
|
|
8
|
+
* layout state has been persisted. After that, the persisted state will be rendered.
|
|
9
|
+
*/
|
|
10
|
+
layoutJSON?: LayoutJSON | LayoutJSON[];
|
|
11
|
+
activeLayoutIndex?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The Vuu workspace is the container into which layouts are loaded. By default, it will be
|
|
14
|
+
* a Tabbed Panel (Stack + Tabstrip), showing a tab per Layout.
|
|
15
|
+
*/
|
|
16
|
+
workspaceJSON?: LayoutJSON | LayoutJSON[];
|
|
17
|
+
};
|
|
27
18
|
export interface WorkspaceProviderProps extends WorkspaceProps {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
readonly activeWorkspace?: WorkspaceController;
|
|
34
|
-
readonly activeWorkspaceInstanceId: string | null;
|
|
35
|
-
readonly closeWorkspace: (instanceId: string) => Promise<void>;
|
|
36
|
-
readonly componentRenderers?: GridComponentRendererRegistry;
|
|
37
|
-
readonly controllers: readonly WorkspaceController[];
|
|
38
|
-
readonly createWorkspaceFromSnapshot: (snapshot: WorkspaceSnapshotV1, title?: string) => Promise<string>;
|
|
39
|
-
readonly deleteNamedWorkspace: (definitionId: string) => Promise<void>;
|
|
40
|
-
readonly error?: Error;
|
|
41
|
-
readonly getApplicationSetting: (key: string) => JsonValue | undefined;
|
|
42
|
-
readonly getApplicationSettings: (key?: string) => JsonValue | Readonly<Record<string, JsonValue>> | undefined;
|
|
43
|
-
readonly namedWorkspaces: readonly NamedWorkspaceMetadataV1[];
|
|
44
|
-
readonly openNamedWorkspace: (definitionId: string) => Promise<void>;
|
|
45
|
-
readonly openSystemWorkspace: (definition: NamedWorkspaceDefinitionV1) => Promise<void>;
|
|
46
|
-
readonly renameWorkspace: (instanceId: string, title: string) => Promise<void>;
|
|
47
|
-
readonly saveActiveWorkspaceAs: (name: string, description?: string) => Promise<void>;
|
|
48
|
-
readonly saveApplicationSettings: (settings: JsonValue, key?: string) => Promise<void>;
|
|
49
|
-
readonly selectWorkspace: (instanceId: string) => Promise<void>;
|
|
50
|
-
readonly setApplicationSetting: (key: string, value: JsonValue) => Promise<void>;
|
|
51
|
-
readonly settings: Readonly<Record<string, JsonValue>>;
|
|
52
|
-
readonly settingsCodecs?: GridComponentSettingsRegistry;
|
|
53
|
-
/** Identifies the authenticated persistence scope. Changes synchronously on a scope transition. */
|
|
54
|
-
readonly scopeIdentity: string;
|
|
55
|
-
readonly status: WorkspaceStatus;
|
|
56
|
-
readonly systemWorkspaces: readonly NamedWorkspaceDefinitionV1[];
|
|
57
|
-
readonly resetApplication: () => Promise<void>;
|
|
58
|
-
}
|
|
59
|
-
export declare class StaleWorkspaceScopeError extends Error {
|
|
60
|
-
constructor();
|
|
19
|
+
children: ReactElement | ReactElement[];
|
|
20
|
+
/**
|
|
21
|
+
* layoutPlaceholderJSON defines the layout to render when a new workspace layout is created.
|
|
22
|
+
*/
|
|
23
|
+
layoutPlaceholderJSON?: LayoutJSON;
|
|
61
24
|
}
|
|
62
|
-
|
|
63
|
-
|
|
25
|
+
/**
|
|
26
|
+
* LayoutManagementProvider supplies an API for loading and saving layout documents.
|
|
27
|
+
* Initial layout is automatically loaded on startup. Because this hook is responsible
|
|
28
|
+
* only for loading and saving layouts, it only triggers a render when content is loaded.
|
|
29
|
+
*
|
|
30
|
+
* Initial layout displays a loading state
|
|
31
|
+
* User may supply a default layout. This will not be displayed until call has been made to
|
|
32
|
+
* persistenceManager to retrieve stored layout state. If no stored state is returned, the
|
|
33
|
+
* default layout provided by user will be set as current state (and hence rendered). If no
|
|
34
|
+
* default layout has been provided by user, the sysem default will be used (simple PlaceHolder)
|
|
35
|
+
* If saved layout state has been returned, that will be set as current state (and rendered)
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare const WorkspaceProvider: ({ TabstripProps, children, layoutJSON, activeLayoutIndex, layoutPlaceholderJSON, showTabs, workspaceJSON: customWorkspaceJSON, }: WorkspaceProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const useWorkspace: () => {
|
|
40
|
+
layoutMetadata: LayoutMetadata[];
|
|
41
|
+
layoutPlaceholderJSON?: LayoutJSON;
|
|
42
|
+
getApplicationSettings: (key?: keyof ApplicationSettings) => ApplicationSettings | ApplicationSetting | undefined;
|
|
43
|
+
loadLayoutById: (id: string) => void;
|
|
44
|
+
saveApplicationSettings: (settings: ApplicationSettings | ApplicationSetting, key?: keyof ApplicationSettings) => void;
|
|
45
|
+
saveLayout: (n: LayoutMetadataDto) => void;
|
|
46
|
+
saveApplicationLayout: (layout: LayoutJSON) => void;
|
|
47
|
+
workspaceJSON: LayoutJSON<{
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>[] | LayoutJSON<{
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
readonly showTabs?: boolean | "left" | "right";
|
|
5
|
-
readonly TabstripProps?: HTMLAttributes<HTMLDivElement>;
|
|
6
|
-
}
|
|
1
|
+
import { StackProps } from "@vuu-ui/vuu-layout";
|
|
2
|
+
import { LayoutJSON } from "@vuu-ui/vuu-utils";
|
|
3
|
+
export type WorkspaceStackProps = Pick<StackProps, "showTabs" | "TabstripProps">;
|
|
7
4
|
export declare const warningLayout: LayoutJSON;
|
|
8
5
|
export declare const loadingJSON: Readonly<LayoutJSON>;
|
|
9
|
-
export declare const defaultWorkspaceJSON: LayoutJSON
|
|
6
|
+
export declare const defaultWorkspaceJSON: LayoutJSON<StackProps & {
|
|
7
|
+
preserve: boolean;
|
|
8
|
+
}>;
|
|
10
9
|
export declare const getStackWorkspaceJSON: (activeLayoutIndex?: number) => LayoutJSON;
|
|
11
10
|
export declare const getWorkspaceWithLayoutJSON: (customWorkspaceJSON?: LayoutJSON | LayoutJSON[], layoutJSON?: LayoutJSON | LayoutJSON[], activeLayoutIndex?: number, stackProps?: WorkspaceStackProps) => LayoutJSON | LayoutJSON[];
|
|
@@ -3,11 +3,3 @@ export * from "./LayoutList";
|
|
|
3
3
|
export * from "./WorkspaceProvider";
|
|
4
4
|
export * from "./defaultWorkspaceJSON";
|
|
5
5
|
export * from "./useWorkspaceContextMenuItems";
|
|
6
|
-
export * from "./workspace-schemas";
|
|
7
|
-
export * from "./WorkspaceRepository";
|
|
8
|
-
export * from "./WorkspacePersistentState";
|
|
9
|
-
export * from "./WorkspaceController";
|
|
10
|
-
export * from "./workspace-component-registry";
|
|
11
|
-
export * from "./WorkspaceHost";
|
|
12
|
-
export * from "./WorkspaceStartPanel";
|
|
13
|
-
export * from "./shell-workspace-components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-context-menu";
|
|
2
2
|
export declare const useWorkspaceContextMenuItems: () => {
|
|
3
3
|
buildMenuOptions: MenuBuilder;
|
|
4
4
|
handleMenuAction: MenuActionHandler;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const getRegisteredModules = async (registryUrl, bearerToken)=>{
|
|
2
|
-
console.log(`getRegisteredModules ${registryUrl}`);
|
|
3
|
-
const response = await fetch(registryUrl, {
|
|
4
|
-
cache: "no-store",
|
|
5
|
-
headers: {
|
|
6
|
-
Authorization: `Bearer ${bearerToken}`
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
if (!response.ok) throw Error("bad return from module registry");
|
|
10
|
-
return await response.json();
|
|
11
|
-
};
|
|
12
|
-
export { getRegisteredModules };
|