@vuu-ui/vuu-shell 4.0.0-alpha.25 → 4.0.0-alpha.26
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 +15 -15
- package/src/persistence-manager/PersistenceProvider.js +5 -7
- package/src/persistence-manager/index.js +1 -3
- package/src/workspace-management/LayoutList.js +1 -1
- package/src/workspace-management/index.js +1 -8
- package/src/workspace-management/useWorkspaceContextMenuItems.js +1 -2
- package/types/feature/FeatureErrorBoundary.d.ts +13 -0
- package/types/persistence-manager/PersistenceProvider.d.ts +2 -3
- package/types/persistence-manager/index.d.ts +1 -3
- package/types/src/ShellContextProvider.d.ts +7 -0
- package/types/src/app-header/AppHeader.d.ts +6 -0
- package/types/src/app-header/index.d.ts +1 -0
- package/types/src/application-provider/ApplicationContext.d.ts +11 -0
- package/types/src/application-provider/ApplicationProvider.d.ts +17 -0
- package/types/src/application-provider/index.d.ts +1 -0
- package/types/src/feature/Feature.d.ts +10 -0
- package/types/src/feature/FeatureErrorBoundary.d.ts +13 -0
- package/types/src/feature/Loader.d.ts +1 -0
- package/types/src/feature/index.d.ts +1 -0
- package/types/src/feature-and-layout-provider/FeatureAndLayoutProvider.d.ts +19 -0
- package/types/src/feature-and-layout-provider/index.d.ts +1 -0
- package/types/src/feature-list/FeatureList.d.ts +7 -0
- package/types/src/feature-list/index.d.ts +1 -0
- package/types/src/get-layout-history.d.ts +8 -0
- package/types/src/index.d.ts +14 -0
- package/types/src/left-nav/LeftNav.d.ts +14 -0
- package/types/src/left-nav/index.d.ts +1 -0
- package/types/src/login/LoginPanel.d.ts +6 -0
- package/types/src/login/VuuLogo.d.ts +1 -0
- package/types/src/persistence-manager/LocalPersistenceManager.d.ts +20 -0
- package/types/src/persistence-manager/PersistenceManager.d.ts +71 -0
- package/types/src/persistence-manager/PersistenceProvider.d.ts +11 -0
- package/types/src/persistence-manager/RemotePersistenceManager.d.ts +25 -0
- package/types/src/persistence-manager/StaticPersistenceManager.d.ts +25 -0
- package/types/src/persistence-manager/index.d.ts +5 -0
- package/types/src/shell-layout-templates/context-panel/ContextPanel.d.ts +13 -0
- package/types/src/shell-layout-templates/context-panel/index.d.ts +1 -0
- package/types/src/shell-layout-templates/full-height-left-panel/useFullHeightLeftPanel.d.ts +2 -0
- package/types/src/shell-layout-templates/index.d.ts +3 -0
- package/types/src/shell-layout-templates/inlay-left-panel/useInlayLeftPanel.d.ts +2 -0
- package/types/src/shell-layout-templates/left-main-tabs/useLeftMainTabs.d.ts +2 -0
- package/types/src/shell-layout-templates/side-panel/SidePanel.d.ts +8 -0
- package/types/src/shell-layout-templates/side-panel/index.d.ts +1 -0
- package/types/src/shell-layout-templates/simple-content-pane/useSimpleContentPane.d.ts +2 -0
- package/types/src/shell-layout-templates/useShellLayout.d.ts +51 -0
- package/types/src/shell.d.ts +17 -0
- package/types/src/theme-switch/ThemeSwitch.d.ts +8 -0
- package/types/src/theme-switch/index.d.ts +1 -0
- package/types/src/user-settings/SettingsForm.d.ts +46 -0
- package/types/src/user-settings/UserSettingsPanel.d.ts +3 -0
- package/types/src/user-settings/index.d.ts +2 -0
- package/types/src/workspace-management/LayoutList.d.ts +2 -0
- package/types/src/workspace-management/LayoutTile.d.ts +7 -0
- package/types/src/workspace-management/SaveLayoutPanel.d.ts +9 -0
- package/types/src/workspace-management/WorkspaceProvider.d.ts +52 -0
- package/types/src/workspace-management/defaultWorkspaceJSON.d.ts +10 -0
- package/types/src/workspace-management/index.d.ts +5 -0
- package/types/src/workspace-management/screenshot-utils.d.ts +6 -0
- package/types/src/workspace-management/useWorkspaceContextMenuItems.d.ts +5 -0
- package/types/user-settings/SettingsForm.d.ts +46 -0
- package/types/user-settings/UserSettingsPanel.d.ts +3 -0
- package/types/user-settings/index.d.ts +2 -0
- package/types/workspace-management/WorkspaceProvider.d.ts +50 -61
- package/types/workspace-management/index.d.ts +5 -8
- package/types/workspace-management/shell-workspace-components.d.ts +1 -1
- 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/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/WorkspaceProvider.js +0 -730
- 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/workspace-component-registry.js +0 -30
- package/src/workspace-management/workspace-schemas.js +0 -257
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.0-alpha.
|
|
2
|
+
"version": "4.0.0-alpha.26",
|
|
3
3
|
"description": "VUU UI Shell",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"author": "heswell",
|
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
"type-defs": "node ../../scripts/build-type-defs.mjs"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@vuu-ui/vuu-data-types": "4.0.0-alpha.
|
|
14
|
-
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.
|
|
15
|
-
"@vuu-ui/vuu-table-types": "4.0.0-alpha.
|
|
13
|
+
"@vuu-ui/vuu-data-types": "4.0.0-alpha.26",
|
|
14
|
+
"@vuu-ui/vuu-protocol-types": "4.0.0-alpha.26",
|
|
15
|
+
"@vuu-ui/vuu-table-types": "4.0.0-alpha.26"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@vuu-ui/grid-layout": "4.0.0-alpha.
|
|
18
|
+
"@vuu-ui/grid-layout": "4.0.0-alpha.26",
|
|
19
19
|
"@salt-ds/core": "1.72.0",
|
|
20
20
|
"@salt-ds/styles": "0.4.1",
|
|
21
21
|
"@salt-ds/window": "0.1.2",
|
|
22
|
-
"@vuu-ui/vuu-context-menu": "4.0.0-alpha.
|
|
23
|
-
"@vuu-ui/vuu-data-react": "4.0.0-alpha.
|
|
24
|
-
"@vuu-ui/vuu-data-remote": "4.0.0-alpha.
|
|
25
|
-
"@vuu-ui/vuu-icons": "4.0.0-alpha.
|
|
26
|
-
"@vuu-ui/vuu-layout": "4.0.0-alpha.
|
|
27
|
-
"@vuu-ui/vuu-notifications": "4.0.0-alpha.
|
|
28
|
-
"@vuu-ui/vuu-table": "4.0.0-alpha.
|
|
29
|
-
"@vuu-ui/vuu-ui-controls": "4.0.0-alpha.
|
|
30
|
-
"@vuu-ui/vuu-utils": "4.0.0-alpha.
|
|
22
|
+
"@vuu-ui/vuu-context-menu": "4.0.0-alpha.26",
|
|
23
|
+
"@vuu-ui/vuu-data-react": "4.0.0-alpha.26",
|
|
24
|
+
"@vuu-ui/vuu-data-remote": "4.0.0-alpha.26",
|
|
25
|
+
"@vuu-ui/vuu-icons": "4.0.0-alpha.26",
|
|
26
|
+
"@vuu-ui/vuu-layout": "4.0.0-alpha.26",
|
|
27
|
+
"@vuu-ui/vuu-notifications": "4.0.0-alpha.26",
|
|
28
|
+
"@vuu-ui/vuu-table": "4.0.0-alpha.26",
|
|
29
|
+
"@vuu-ui/vuu-ui-controls": "4.0.0-alpha.26",
|
|
30
|
+
"@vuu-ui/vuu-utils": "4.0.0-alpha.26",
|
|
31
31
|
"@module-federation/enhanced": "2.8.0",
|
|
32
|
-
"@vuu-ui/core": "4.0.0-alpha.
|
|
32
|
+
"@vuu-ui/core": "4.0.0-alpha.26",
|
|
33
33
|
"html-to-image": "^1.11.11"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { WorkspacePersistenceProvider, useOptionalWorkspacePersistenceService, useWorkspacePersistenceService } from "@vuu-ui/core";
|
|
2
3
|
import { createContext, useContext } from "react";
|
|
3
4
|
const PersistenceContext = /*#__PURE__*/ createContext({});
|
|
4
5
|
const PersistenceProvider = ({ children, persistenceManager, workspacePersistenceService })=>/*#__PURE__*/ jsx(PersistenceContext.Provider, {
|
|
@@ -6,16 +7,13 @@ const PersistenceProvider = ({ children, persistenceManager, workspacePersistenc
|
|
|
6
7
|
persistenceManager,
|
|
7
8
|
workspacePersistenceService
|
|
8
9
|
},
|
|
9
|
-
children:
|
|
10
|
+
children: /*#__PURE__*/ jsx(WorkspacePersistenceProvider, {
|
|
11
|
+
service: workspacePersistenceService,
|
|
12
|
+
children: children
|
|
13
|
+
})
|
|
10
14
|
});
|
|
11
15
|
const usePersistenceManager = ()=>{
|
|
12
16
|
const { persistenceManager } = useContext(PersistenceContext);
|
|
13
17
|
return persistenceManager;
|
|
14
18
|
};
|
|
15
|
-
const useWorkspacePersistenceService = ()=>{
|
|
16
|
-
const { workspacePersistenceService } = useContext(PersistenceContext);
|
|
17
|
-
if (!workspacePersistenceService) throw new Error("useWorkspacePersistenceService requires a configured PersistenceProvider");
|
|
18
|
-
return workspacePersistenceService;
|
|
19
|
-
};
|
|
20
|
-
const useOptionalWorkspacePersistenceService = ()=>useContext(PersistenceContext).workspacePersistenceService;
|
|
21
19
|
export { PersistenceContext, PersistenceProvider, useOptionalWorkspacePersistenceService, usePersistenceManager, useWorkspacePersistenceService };
|
|
@@ -3,6 +3,4 @@ export * from "./PersistenceProvider.js";
|
|
|
3
3
|
export * from "./LocalPersistenceManager.js";
|
|
4
4
|
export * from "./RemotePersistenceManager.js";
|
|
5
5
|
export * from "./StaticPersistenceManager.js";
|
|
6
|
-
export
|
|
7
|
-
export * from "./LocalWorkspacePersistenceService.js";
|
|
8
|
-
export * from "./RemoteWorkspacePersistenceService.js";
|
|
6
|
+
export { LocalWorkspacePersistenceService, RemoteWorkspacePersistenceService, WorkspacePersistenceError } from "@vuu-ui/core";
|
|
@@ -4,7 +4,7 @@ import { useComponentCssInjection } from "@salt-ds/styles";
|
|
|
4
4
|
import { useWindow } from "@salt-ds/window";
|
|
5
5
|
import { IconButton } from "@vuu-ui/vuu-ui-controls";
|
|
6
6
|
import clsx from "clsx";
|
|
7
|
-
import { useWorkspace } from "
|
|
7
|
+
import { useWorkspace } from "@vuu-ui/core";
|
|
8
8
|
import LayoutList from "./LayoutList.css";
|
|
9
9
|
const classBase = "vuuLayoutList";
|
|
10
10
|
const NO_SELECTION = [];
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
export * from "./SaveLayoutPanel.js";
|
|
2
2
|
export * from "./LayoutList.js";
|
|
3
|
-
export * from "./WorkspaceProvider.js";
|
|
4
3
|
export * from "./defaultWorkspaceJSON.js";
|
|
5
4
|
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
5
|
export * from "./shell-workspace-components.js";
|
|
6
|
+
export { APPLICATION_SESSION_VERSION, NAMED_WORKSPACE_DEFINITION_VERSION, StaleWorkspaceScopeError, WORKSPACE_SNAPSHOT_RECORD_VERSION, WORKSPACE_SNAPSHOT_VERSION, WorkspaceController, WorkspaceHost, WorkspacePersistentStateProvider, WorkspacePersistentStateStore, WorkspaceProvider, WorkspaceRepository, WorkspaceRepositoryDisposedError, WorkspaceStartPanel, WorkspaceValidationError, cloneWorkspaceValue, createWorkspaceComponentRegistries, emptyWorkspaceSnapshot, jsonValueWorkspaceComponentCodec, useComponentPersistentState, useWorkspace, useWorkspacePersistentStateStore, validateApplicationSessionV1, validateNamedWorkspaceDefinitionV1, validateNamedWorkspaceMetadataV1, validateWorkspaceSnapshotRecordV1, validateWorkspaceSnapshotV1, workspaceMetadata } from "@vuu-ui/core";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModal } from "@vuu-ui/core";
|
|
2
|
+
import { useModal, useWorkspace } from "@vuu-ui/core";
|
|
3
3
|
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { SaveLayoutPanel } from "./SaveLayoutPanel.js";
|
|
5
|
-
import { useWorkspace } from "./WorkspaceProvider.js";
|
|
6
5
|
const useWorkspaceContextMenuItems = ()=>{
|
|
7
6
|
const { activeWorkspace, closeWorkspace, saveActiveWorkspaceAs } = useWorkspace();
|
|
8
7
|
const { showDialog, closeDialog } = useModal();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DynamicFeatureProps } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import React, { ErrorInfo, ReactNode } from "react";
|
|
3
|
+
export interface FeatureErrorBoundaryProps extends DynamicFeatureProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare class FeatureErrorBoundary extends React.Component<FeatureErrorBoundaryProps, any> {
|
|
7
|
+
constructor(props: FeatureErrorBoundaryProps);
|
|
8
|
+
static getDerivedStateFromError(error: Error): {
|
|
9
|
+
errorMessage: string;
|
|
10
|
+
};
|
|
11
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
+
render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
13
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type WorkspacePersistenceService } from "@vuu-ui/core";
|
|
1
2
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
3
|
import type { IPersistenceManager } from "./PersistenceManager";
|
|
3
|
-
|
|
4
|
+
export { useOptionalWorkspacePersistenceService, useWorkspacePersistenceService, } from "@vuu-ui/core";
|
|
4
5
|
export interface PersistenceContextProps {
|
|
5
6
|
persistenceManager?: IPersistenceManager;
|
|
6
7
|
workspacePersistenceService?: WorkspacePersistenceService;
|
|
@@ -11,5 +12,3 @@ export interface PersistenceProviderProps extends PersistenceContextProps {
|
|
|
11
12
|
}
|
|
12
13
|
export declare const PersistenceProvider: ({ children, persistenceManager, workspacePersistenceService, }: PersistenceProviderProps) => ReactElement;
|
|
13
14
|
export declare const usePersistenceManager: () => IPersistenceManager | undefined;
|
|
14
|
-
export declare const useWorkspacePersistenceService: () => WorkspacePersistenceService;
|
|
15
|
-
export declare const useOptionalWorkspacePersistenceService: () => WorkspacePersistenceService | undefined;
|
|
@@ -3,6 +3,4 @@ export * from "./PersistenceProvider";
|
|
|
3
3
|
export * from "./LocalPersistenceManager";
|
|
4
4
|
export * from "./RemotePersistenceManager";
|
|
5
5
|
export * from "./StaticPersistenceManager";
|
|
6
|
-
export
|
|
7
|
-
export * from "./LocalWorkspacePersistenceService";
|
|
8
|
-
export * from "./RemoteWorkspacePersistenceService";
|
|
6
|
+
export { LocalWorkspacePersistenceService, type PersistenceScope, type RemoteWorkspacePersistenceOptions, RemoteWorkspacePersistenceService, type UserPersistenceScope, WorkspacePersistenceError, type WorkspacePersistenceService, type WorkspaceRequestInitProvider, } from "@vuu-ui/core";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShellContextProps } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
export interface ShellProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
value?: ShellContextProps;
|
|
6
|
+
}
|
|
7
|
+
export declare const ShellContextProvider: ({ children, value, }: ShellProviderProps) => ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ThemeMode } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
export interface AppHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
themeMode?: ThemeMode;
|
|
5
|
+
}
|
|
6
|
+
export declare const AppHeader: ({ className: classNameProp, themeMode: _, ...htmlAttributes }: AppHeaderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AppHeader';
|
|
@@ -0,0 +1,11 @@
|
|
|
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";
|
|
4
|
+
export interface ApplicationContextProps {
|
|
5
|
+
onUserSettingChanged: (propertyName: string, value: VuuRowDataItemType) => void;
|
|
6
|
+
logout?: () => void;
|
|
7
|
+
userSettings?: Settings;
|
|
8
|
+
userSettingsSchema?: SettingsSchema;
|
|
9
|
+
user: VuuUser;
|
|
10
|
+
}
|
|
11
|
+
export declare const ApplicationContext: import("react").Context<ApplicationContextProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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">> {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
density?: Density;
|
|
8
|
+
}
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ApplicationProvider";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { 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>): React.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 {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DynamicFeatureProps } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import React, { ErrorInfo, ReactNode } from "react";
|
|
3
|
+
export interface FeatureErrorBoundaryProps extends DynamicFeatureProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare class FeatureErrorBoundary extends React.Component<FeatureErrorBoundaryProps, any> {
|
|
7
|
+
constructor(props: FeatureErrorBoundaryProps);
|
|
8
|
+
static getDerivedStateFromError(error: Error): {
|
|
9
|
+
errorMessage: string;
|
|
10
|
+
};
|
|
11
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
+
render(): string | number | bigint | boolean | React.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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Loader: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Feature';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DynamicFeatureDescriptor, DynamicFeatureProps, FilterTableFeatureProps, StaticFeatureDescriptor, SystemLayoutMetadata } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
export interface FeatureContextProps {
|
|
4
|
+
dynamicFeatures?: DynamicFeatureProps[];
|
|
5
|
+
tableFeatures?: DynamicFeatureProps<FilterTableFeatureProps>[];
|
|
6
|
+
staticFeatures?: StaticFeatureDescriptor[];
|
|
7
|
+
}
|
|
8
|
+
export interface LayoutContextProps {
|
|
9
|
+
systemLayouts?: SystemLayoutMetadata[];
|
|
10
|
+
}
|
|
11
|
+
export interface FeatureAndLayoutProviderProps extends Partial<FeatureContextProps> {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
dynamicFeatures?: DynamicFeatureDescriptor[];
|
|
14
|
+
staticFeatures?: StaticFeatureDescriptor[];
|
|
15
|
+
systemLayouts?: SystemLayoutMetadata[];
|
|
16
|
+
}
|
|
17
|
+
export declare const FeatureAndLayoutProvider: ({ children, dynamicFeatures: dynamicFeaturesProp, staticFeatures, systemLayouts, }: FeatureAndLayoutProviderProps) => ReactElement;
|
|
18
|
+
export declare const useFeatures: () => FeatureContextProps;
|
|
19
|
+
export declare const useLayouts: () => LayoutContextProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FeatureAndLayoutProvider";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DynamicFeatureProps, StaticFeatureDescriptor } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
export type GroupedFeatureProps<P extends object | undefined = object> = Record<string, DynamicFeatureProps<P>[]>;
|
|
4
|
+
export interface FeatureListProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
features: DynamicFeatureProps[] | GroupedFeatureProps | StaticFeatureDescriptor[];
|
|
6
|
+
}
|
|
7
|
+
export declare const FeatureList: ({ features, title, ...htmlAttributes }: FeatureListProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FeatureList";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./application-provider";
|
|
2
|
+
export * from "./app-header";
|
|
3
|
+
export * from "./feature";
|
|
4
|
+
export * from "./feature-and-layout-provider";
|
|
5
|
+
export * from "./left-nav";
|
|
6
|
+
export { LoginPanel, type LoginPanelProps } from "./login/LoginPanel";
|
|
7
|
+
export * from "./persistence-manager";
|
|
8
|
+
export * from "./shell";
|
|
9
|
+
export * from "./shell-layout-templates";
|
|
10
|
+
export * from "./ShellContextProvider";
|
|
11
|
+
export * from "./feature-list";
|
|
12
|
+
export * from "./theme-switch";
|
|
13
|
+
export * from "./user-settings";
|
|
14
|
+
export * from "./workspace-management";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export type NavDisplayStatus = "menu-full" | "menu-icons" | "menu-full-content" | "menu-icons-content";
|
|
3
|
+
export type NavDisplayStatusHandler = (navDisplayStatus: NavDisplayStatus) => void;
|
|
4
|
+
export interface LeftNavProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
"data-path"?: string;
|
|
6
|
+
defaultActiveTabIndex?: number;
|
|
7
|
+
defaultExpanded?: boolean;
|
|
8
|
+
onActiveChange?: (activeTabIndex: number) => void;
|
|
9
|
+
onTogglePrimaryMenu?: (expanded: boolean) => void;
|
|
10
|
+
sizeCollapsed?: number;
|
|
11
|
+
sizeContent?: number;
|
|
12
|
+
sizeExpanded?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const LeftNav: (props: LeftNavProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LeftNav";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export interface LoginPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSubmit"> {
|
|
3
|
+
appName?: string;
|
|
4
|
+
onSubmit: (username: string, password: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const LoginPanel: ({ appName, className, onSubmit, ...htmlAttributes }: LoginPanelProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VuuLogo: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApplicationJSON, LayoutJSON, Settings, Layout, LayoutMetadata, LayoutMetadataDto } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { IPersistenceManager } from "./PersistenceManager";
|
|
3
|
+
export declare class LocalPersistenceManager implements IPersistenceManager {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(userName: string, urlKey?: string);
|
|
6
|
+
clearUserSettings(): void;
|
|
7
|
+
createLayout(metadata: LayoutMetadataDto, layout: LayoutJSON): Promise<LayoutMetadata>;
|
|
8
|
+
updateLayout(id: string, newMetadata: LayoutMetadataDto, newLayout: LayoutJSON): Promise<void>;
|
|
9
|
+
deleteLayout(id: string): Promise<void>;
|
|
10
|
+
loadLayout(id: string): Promise<LayoutJSON>;
|
|
11
|
+
loadMetadata(): Promise<LayoutMetadata[]>;
|
|
12
|
+
loadApplicationJSON(): Promise<ApplicationJSON | undefined>;
|
|
13
|
+
saveApplicationJSON(applicationJSON: ApplicationJSON): Promise<void>;
|
|
14
|
+
loadLayouts: () => Promise<Layout[]>;
|
|
15
|
+
saveLayoutsWithMetadata: (layouts: Layout[], metadata: LayoutMetadata[]) => void;
|
|
16
|
+
validateIds: (id: string) => Promise<void>;
|
|
17
|
+
validateId: (id: string, dataType: "metadata" | "layout") => Promise<void>;
|
|
18
|
+
getUserSettings(): Promise<Settings>;
|
|
19
|
+
saveUserSettings(userSettings: Settings): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ApplicationJSON, LayoutJSON, LayoutMetadata, LayoutMetadataDto, Settings } from "@vuu-ui/vuu-utils";
|
|
2
|
+
export interface IPersistenceManager {
|
|
3
|
+
/**
|
|
4
|
+
* Clear saved user settings/preferences. Right now, this clears ALL saved
|
|
5
|
+
* settimgs for user. We will introduce a more fine grained scheme here.
|
|
6
|
+
*/
|
|
7
|
+
clearUserSettings: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Saves a new layout and its corresponding metadata
|
|
10
|
+
*
|
|
11
|
+
* @param metadata - Metadata about the layout to be saved
|
|
12
|
+
* @param layout - Full JSON representation of the layout to be saved
|
|
13
|
+
*
|
|
14
|
+
* @returns Unique identifier assigned to the saved layout
|
|
15
|
+
*/
|
|
16
|
+
createLayout: (metadata: LayoutMetadataDto, layout: LayoutJSON) => Promise<LayoutMetadata>;
|
|
17
|
+
/**
|
|
18
|
+
* Overwrites an existing layout and its corresponding metadata with the provided information
|
|
19
|
+
*
|
|
20
|
+
* @param id - Unique identifier of the existing layout to be updated
|
|
21
|
+
* @param metadata - Metadata describing the new layout to overwrite with
|
|
22
|
+
* @param layout - Full JSON representation of the new layout to overwrite with
|
|
23
|
+
*/
|
|
24
|
+
updateLayout: (id: string, metadata: LayoutMetadataDto, layout: LayoutJSON) => Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Deletes an existing layout and its corresponding metadata
|
|
27
|
+
*
|
|
28
|
+
* @param id - Unique identifier of the existing layout to be deleted
|
|
29
|
+
*/
|
|
30
|
+
deleteLayout: (id: string) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves an existing layout
|
|
33
|
+
*
|
|
34
|
+
* @param id - Unique identifier of the existing layout to be retrieved
|
|
35
|
+
*
|
|
36
|
+
* @returns Full JSON representation of the layout corresponding to the provided ID
|
|
37
|
+
*/
|
|
38
|
+
loadLayout: (id: string) => Promise<LayoutJSON>;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves metadata for all existing layouts
|
|
41
|
+
*
|
|
42
|
+
* @returns an array of all persisted layout metadata
|
|
43
|
+
*/
|
|
44
|
+
loadMetadata: () => Promise<LayoutMetadata[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves the application JSON. This includes the application layout,
|
|
47
|
+
* which describes all layouts on screen
|
|
48
|
+
*
|
|
49
|
+
* @returns Full JSON representation of the application json
|
|
50
|
+
*/
|
|
51
|
+
loadApplicationJSON: () => Promise<ApplicationJSON | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Saves the application JSON. This includes the application layout,
|
|
54
|
+
* which describes all layouts on screen
|
|
55
|
+
*
|
|
56
|
+
* @param layout - Full JSON representation of the application layout to be saved
|
|
57
|
+
*/
|
|
58
|
+
saveApplicationJSON: (layout: ApplicationJSON) => Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Save user settings. These get saved within the Application JSON.
|
|
61
|
+
*
|
|
62
|
+
* @param userSettings
|
|
63
|
+
*/
|
|
64
|
+
saveUserSettings: (userSettings: Settings) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Get the user settings. These are stored within Application JSON.
|
|
67
|
+
*
|
|
68
|
+
* @returns userSettings
|
|
69
|
+
*/
|
|
70
|
+
getUserSettings: () => Promise<Settings>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { IPersistenceManager } from ".";
|
|
3
|
+
export interface PersistenceContextProps {
|
|
4
|
+
persistenceManager?: IPersistenceManager;
|
|
5
|
+
}
|
|
6
|
+
export declare const PersistenceContext: import("react").Context<PersistenceContextProps>;
|
|
7
|
+
export interface PersistenceProviderProps extends PersistenceContextProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const PersistenceProvider: ({ children, persistenceManager, }: PersistenceProviderProps) => ReactElement;
|
|
11
|
+
export declare const usePersistenceManager: () => IPersistenceManager | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ApplicationJSON, LayoutJSON, LayoutMetadata, LayoutMetadataDto, Settings } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { IPersistenceManager } from "./PersistenceManager";
|
|
3
|
+
export type CreateLayoutResponseDto = {
|
|
4
|
+
metadata: LayoutMetadata;
|
|
5
|
+
};
|
|
6
|
+
export type GetLayoutResponseDto = {
|
|
7
|
+
definition: LayoutJSON;
|
|
8
|
+
};
|
|
9
|
+
export type GetApplicationResponseDto = {
|
|
10
|
+
definition: ApplicationJSON;
|
|
11
|
+
};
|
|
12
|
+
export declare class RemotePersistenceManager implements IPersistenceManager {
|
|
13
|
+
private userName;
|
|
14
|
+
constructor(userName: string);
|
|
15
|
+
createLayout(metadata: LayoutMetadataDto, layout: LayoutJSON): Promise<LayoutMetadata>;
|
|
16
|
+
clearUserSettings(): void;
|
|
17
|
+
updateLayout(id: string, metadata: LayoutMetadataDto, newLayoutJson: LayoutJSON): Promise<void>;
|
|
18
|
+
deleteLayout(id: string): Promise<void>;
|
|
19
|
+
loadLayout(id: string): Promise<LayoutJSON>;
|
|
20
|
+
loadMetadata(): Promise<LayoutMetadata[]>;
|
|
21
|
+
saveApplicationJSON(applicationJSON: ApplicationJSON): Promise<void>;
|
|
22
|
+
loadApplicationJSON(): Promise<ApplicationJSON>;
|
|
23
|
+
getUserSettings(): Promise<{}>;
|
|
24
|
+
saveUserSettings(userSettings: Settings): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ApplicationJSON, LayoutJSON, LayoutMetadata, Settings } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import { IPersistenceManager } from "./PersistenceManager";
|
|
3
|
+
/**
|
|
4
|
+
* Use in Showcase examples only
|
|
5
|
+
*/
|
|
6
|
+
export declare class StaticPersistenceManager implements IPersistenceManager {
|
|
7
|
+
#private;
|
|
8
|
+
constructor({ applicationJSON, applicationLoadDelay, layoutMetadata, }: {
|
|
9
|
+
applicationJSON?: ApplicationJSON;
|
|
10
|
+
applicationLoadDelay?: number;
|
|
11
|
+
layoutMetadata?: LayoutMetadata[];
|
|
12
|
+
});
|
|
13
|
+
createLayout(): Promise<LayoutMetadata>;
|
|
14
|
+
clearUserSettings(): void;
|
|
15
|
+
updateLayout(): Promise<void>;
|
|
16
|
+
deleteLayout(): Promise<void>;
|
|
17
|
+
loadLayout(id: string): Promise<LayoutJSON<{
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>>;
|
|
20
|
+
loadMetadata(): Promise<LayoutMetadata[]>;
|
|
21
|
+
loadApplicationJSON(): Promise<ApplicationJSON | undefined>;
|
|
22
|
+
saveApplicationJSON(applicationJson: ApplicationJSON): Promise<void>;
|
|
23
|
+
getUserSettings(): Promise<Settings>;
|
|
24
|
+
saveUserSettings(userSettings: Settings): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LayoutJSON } from "@vuu-ui/vuu-utils";
|
|
2
|
+
import React, { ReactElement, ReactNode } from "react";
|
|
3
|
+
export interface ContextPanelProps {
|
|
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;
|
|
12
|
+
}
|
|
13
|
+
export declare const ContextPanel: ({ className: classNameProp, expanded, content: contentProp, id, onClose, overlay, title, }: ContextPanelProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ContextPanel";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export interface SidePanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
path?: string;
|
|
5
|
+
sizeOpen?: number;
|
|
6
|
+
sizeClosed?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const SidePanel: ({ children, open, sizeClosed, sizeOpen, style: styleProp, ...htmlAttributes }: SidePanelProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SidePanel";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { SidePanelProps as ShellSidePanelProps } from "./side-panel";
|
|
3
|
+
declare const LayoutHook: {
|
|
4
|
+
"full-height": ShellLayoutTemplateHook;
|
|
5
|
+
inlay: ShellLayoutTemplateHook;
|
|
6
|
+
"left-main-tabs": ShellLayoutTemplateHook;
|
|
7
|
+
"simple-content-pane": ShellLayoutTemplateHook;
|
|
8
|
+
};
|
|
9
|
+
export type LayoutTemplateId = keyof typeof LayoutHook;
|
|
10
|
+
export type ShellLayoutTemplateProps = Omit<ShellLayoutProps, "layoutTemplateId">;
|
|
11
|
+
export type ShellToolbarProps = {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
position?: "left";
|
|
14
|
+
width?: number;
|
|
15
|
+
};
|
|
16
|
+
export type ShellLayoutTemplateHook = (props: ShellLayoutTemplateProps) => ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* The Shell Layout is the outermost 'chrome' of the appliciation,
|
|
19
|
+
* enclosing the main content area. It will be rendered by one of
|
|
20
|
+
* two available templates, determined by the layoutTemplateId,
|
|
21
|
+
*/
|
|
22
|
+
export interface ShellLayoutProps {
|
|
23
|
+
/**
|
|
24
|
+
* App Header will be rendered in position determined by layout-template
|
|
25
|
+
*/
|
|
26
|
+
appHeader?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* HTML attributes that will be applied to root div.
|
|
29
|
+
*/
|
|
30
|
+
htmlAttributes?: HTMLAttributes<HTMLDivElement>;
|
|
31
|
+
/**
|
|
32
|
+
* identifier for shell layout template to be used. Default template
|
|
33
|
+
* will be "inlay"
|
|
34
|
+
*/
|
|
35
|
+
layoutTemplateId?: LayoutTemplateId;
|
|
36
|
+
/**
|
|
37
|
+
* If template renders SidePanel, these props will be provided
|
|
38
|
+
*/
|
|
39
|
+
SidePanelProps?: ShellSidePanelProps;
|
|
40
|
+
/**
|
|
41
|
+
* If template renders Toolbar, these props will be provided
|
|
42
|
+
*/
|
|
43
|
+
ToolbarProps?: ShellToolbarProps;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This hook acts as a stub for the actual shell layout
|
|
47
|
+
* template hooks. It will delegate to the appropriate shell
|
|
48
|
+
* layout hook, based on the value of layoutTemplateId.
|
|
49
|
+
*/
|
|
50
|
+
export declare const useShellLayout: ({ layoutTemplateId, ...props }: ShellLayoutProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
51
|
+
export {};
|