@vuu-ui/vuu-shell 0.6.8-debug → 0.6.9-debug

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 CHANGED
@@ -7,9 +7,9 @@
7
7
  "@salt-ds/core": "1.0.0",
8
8
  "@salt-ds/icons": "1.0.0",
9
9
  "@heswell/salt-lab": "1.0.0-alpha.0-vuu.1",
10
- "@vuu-ui/vuu-data": "0.6.8",
11
- "@vuu-ui/vuu-layout": "0.6.8",
12
- "@vuu-ui/vuu-utils": "0.6.8",
10
+ "@vuu-ui/vuu-data": "0.6.9",
11
+ "@vuu-ui/vuu-layout": "0.6.9",
12
+ "@vuu-ui/vuu-utils": "0.6.9",
13
13
  "classnames": "^2.2.6",
14
14
  "react": "^17.0.2",
15
15
  "react-dom": "^17.0.2"
@@ -18,9 +18,11 @@
18
18
  "cjs",
19
19
  "esm",
20
20
  "index.css",
21
- "index.css.map"
21
+ "index.css.map",
22
+ "/types"
22
23
  ],
23
24
  "module": "esm/index.js",
24
25
  "main": "cjs/index.js",
25
- "version": "0.6.8-debug"
26
+ "version": "0.6.9-debug",
27
+ "types": "types/index.d.ts"
26
28
  }
@@ -0,0 +1,13 @@
1
+ import { MenuRpcResponse } from "@vuu-ui/vuu-data";
2
+ import { ColumnDescriptor } from "@vuu-ui/vuu-datagrid-types";
3
+ import { ReactElement, ReactNode } from "react";
4
+ export interface ShellContextProps {
5
+ getDefaultColumnConfig?: (tableName: string, columnName: string) => Partial<ColumnDescriptor>;
6
+ handleRpcResponse?: (response?: MenuRpcResponse) => void;
7
+ }
8
+ export interface ShellProviderProps {
9
+ children: ReactNode;
10
+ value?: ShellContextProps;
11
+ }
12
+ export declare const ShellContextProvider: ({ children, value, }: ShellProviderProps) => ReactElement;
13
+ export declare const useShellContext: () => ShellContextProps;
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { VuuUser } from "../shell";
3
+ import { ThemeMode } from "../theme-switch";
4
+ import "./AppHeader.css";
5
+ export interface AppHeaderProps extends HTMLAttributes<HTMLDivElement> {
6
+ layoutId: string;
7
+ loginUrl?: string;
8
+ onNavigate: (id: string) => void;
9
+ onSwitchTheme?: (mode: ThemeMode) => void;
10
+ themeMode?: ThemeMode;
11
+ user: VuuUser;
12
+ }
13
+ export declare const AppHeader: ({ className: classNameProp, layoutId, loginUrl, onNavigate, onSwitchTheme, themeMode, user, ...htmlAttributes }: AppHeaderProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './AppHeader';
@@ -0,0 +1,11 @@
1
+ export class ErrorBoundary extends React.Component<any, any, any> {
2
+ static getDerivedStateFromError(error: any): {
3
+ errorMessage: any;
4
+ };
5
+ constructor(props: any);
6
+ state: {
7
+ errorMessage: null;
8
+ };
9
+ componentDidCatch(error: any, errorInfo: any): void;
10
+ }
11
+ import React from "react";
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface FeatureProps<Params extends object | undefined = undefined> {
3
+ height?: number;
4
+ url: string;
5
+ css?: string;
6
+ width?: number;
7
+ params: Params;
8
+ }
9
+ declare function RawFeature<Params extends object | undefined>({ url, css, params, ...props }: FeatureProps<Params>): JSX.Element;
10
+ export declare const Feature: React.MemoExoticComponent<typeof RawFeature>;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Loader: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const importCSS: (path: string) => Promise<CSSStyleSheet>;
@@ -0,0 +1 @@
1
+ export * from './Feature';
@@ -0,0 +1,8 @@
1
+ import { VuuUser } from "./shell";
2
+ export interface LayoutHistoryItem {
3
+ user: string;
4
+ id: string;
5
+ uniqueId: string;
6
+ lastUpdate: number;
7
+ }
8
+ export declare const getLayoutHistory: (user: VuuUser) => Promise<LayoutHistoryItem[]>;
@@ -0,0 +1,6 @@
1
+ export * from "./feature";
2
+ export * from "./login";
3
+ export * from "./shell";
4
+ export * from "./shellTypes";
5
+ export * from "./ShellContextProvider";
6
+ export * from "./theme-switch";
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from "react";
2
+ import "./LoginPanel.css";
3
+ export interface LoginPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSubmit"> {
4
+ onSubmit: (username: string, password: string) => void;
5
+ }
6
+ export declare const LoginPanel: ({ onSubmit }: LoginPanelProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './LoginPanel';
2
+ export * from './login-utils';
@@ -0,0 +1,3 @@
1
+ export declare const getAuthDetailsFromCookies: () => (string | undefined)[];
2
+ export declare const redirectToLogin: (loginUrl?: string) => void;
3
+ export declare const logout: (loginUrl?: string) => void;
@@ -0,0 +1,16 @@
1
+ import { HTMLAttributes, ReactElement, ReactNode } from "react";
2
+ import { LayoutJSON } from "@vuu-ui/vuu-layout/src/layout-reducer";
3
+ import "./shell.css";
4
+ export type VuuUser = {
5
+ username: string;
6
+ token: string;
7
+ };
8
+ export interface ShellProps extends HTMLAttributes<HTMLDivElement> {
9
+ children?: ReactNode;
10
+ defaultLayout?: LayoutJSON;
11
+ leftSidePanel?: ReactElement;
12
+ loginUrl?: string;
13
+ serverUrl?: string;
14
+ user: VuuUser;
15
+ }
16
+ export declare const Shell: ({ children, className: classNameProp, defaultLayout, leftSidePanel, loginUrl, serverUrl, user, ...htmlAttributes }: ShellProps) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ declare global {
2
+ const vuuConfig: Promise<VuuConfig>;
3
+ }
4
+ export interface FeatureConfig {
5
+ name: string;
6
+ title: string;
7
+ url: string;
8
+ css?: string;
9
+ }
10
+ export type Features = {
11
+ [key: string]: FeatureConfig;
12
+ };
13
+ export interface VuuConfig {
14
+ features: Features;
15
+ websocketUrl: string;
16
+ }
@@ -0,0 +1,18 @@
1
+ import React, { ReactElement } from "react";
2
+ export declare const DEFAULT_DENSITY = "medium";
3
+ export declare const DEFAULT_THEME = "salt-theme";
4
+ export type Density = "high" | "medium" | "low" | "touch";
5
+ export interface ThemeContextProps {
6
+ density?: Density;
7
+ themes?: string[];
8
+ theme?: string;
9
+ }
10
+ export declare const ThemeContext: React.Context<ThemeContextProps>;
11
+ interface ThemeProviderProps {
12
+ children: ReactElement;
13
+ density?: Density;
14
+ theme?: string;
15
+ applyClassesToChild?: true;
16
+ }
17
+ export declare const ThemeProvider: ({ children, density: densityProp, theme: themeProp, }: ThemeProviderProps) => JSX.Element;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { HTMLAttributes } from "react";
2
+ import "./ThemeSwitch.css";
3
+ export type ThemeMode = "light" | "dark";
4
+ export interface ThemeSwitchProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
5
+ defaultMode?: ThemeMode;
6
+ mode?: ThemeMode;
7
+ onChange: (mode: ThemeMode) => void;
8
+ }
9
+ export declare const ThemeSwitch: ({ className: classNameProp, defaultMode: defaultModeProp, mode: modeProp, onChange, ...htmlAttributes }: ThemeSwitchProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./ThemeSwitch";
@@ -0,0 +1 @@
1
+ export function useForceRender(): import("react").Dispatch<import("react").SetStateAction<{}>>;
@@ -0,0 +1,2 @@
1
+ export default useLayoutConfig;
2
+ declare function useLayoutConfig(user: any, defaultLayout: any): any[];
@@ -0,0 +1,10 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { VuuUser } from "../shell";
3
+ import "./UserPanel.css";
4
+ export interface UserPanelProps extends HTMLAttributes<HTMLDivElement> {
5
+ loginUrl?: string;
6
+ onNavigate: (id: string) => void;
7
+ user: VuuUser;
8
+ layoutId: string;
9
+ }
10
+ export declare const UserPanel: import("react").ForwardRefExoticComponent<UserPanelProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import "./UserProfile.css";
3
+ import { VuuUser } from "../shell";
4
+ export interface UserProfileProps {
5
+ layoutId: string;
6
+ loginUrl?: string;
7
+ onNavigate: (id: string) => void;
8
+ user: VuuUser;
9
+ }
10
+ export declare const UserProfile: ({ layoutId, loginUrl, onNavigate, user, }: UserProfileProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './UserProfile';