@vuu-ui/vuu-layout 4.0.0-alpha.9 → 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/README.md +18 -1
- package/package.json +16 -15
- package/src/placeholder/LayoutStartPanel.css.js +1 -1
- package/src/tools/config-wrapper/ConfigWrapper.js +1 -2
- package/types/dock-layout/DockLayout.d.ts +1 -1
- package/types/dock-layout/Drawer.d.ts +1 -1
- package/types/drag-drop/BoxModel.d.ts +3 -3
- package/types/flexbox/Flexbox.d.ts +4 -0
- package/types/flexbox/FlexboxLayout.d.ts +1 -1
- package/types/flexbox/Splitter.d.ts +1 -1
- package/types/layout-header/ActionButton.d.ts +1 -1
- package/types/layout-header/Header.d.ts +1 -1
- package/types/layout-provider/LayoutProvider.d.ts +1 -1
- package/types/palette/Palette.d.ts +2 -2
- package/types/placeholder/LayoutStartPanel.d.ts +1 -1
- package/types/placeholder/Placeholder.d.ts +1 -1
- package/types/responsive/overflowUtils.d.ts +2 -2
- package/types/stack/StackLayout.d.ts +1 -2
- package/types/tabs/TabPanel.d.ts +1 -1
- package/types/tools/config-wrapper/ConfigWrapper.d.ts +1 -2
- package/types/tools/devtools-box/layout-configurator.d.ts +1 -1
- package/types/tools/devtools-tree/layout-tree-viewer.d.ts +1 -2
- package/src/tools/devtools-box/layout-configurator.js +0 -293
- package/src/tools/devtools-tree/layout-tree-viewer.js +0 -40
- package/types/src/Component.d.ts +0 -6
- package/types/src/LayoutContainer.d.ts +0 -6
- package/types/src/debug.d.ts +0 -2
- package/types/src/dock-layout/DockLayout.d.ts +0 -7
- package/types/src/dock-layout/Drawer.d.ts +0 -17
- package/types/src/dock-layout/index.d.ts +0 -2
- package/types/src/drag-drop/BoxModel.d.ts +0 -143
- package/types/src/drag-drop/DragState.d.ts +0 -46
- package/types/src/drag-drop/Draggable.d.ts +0 -24
- package/types/src/drag-drop/DropTarget.d.ts +0 -60
- package/types/src/drag-drop/DropTargetRenderer.d.ts +0 -17
- package/types/src/drag-drop/dragDropTypes.d.ts +0 -51
- package/types/src/drag-drop/index.d.ts +0 -3
- package/types/src/flexbox/Flexbox.d.ts +0 -3
- package/types/src/flexbox/FlexboxLayout.d.ts +0 -5
- package/types/src/flexbox/Splitter.d.ts +0 -12
- package/types/src/flexbox/flexbox-utils.d.ts +0 -12
- package/types/src/flexbox/flexboxTypes.d.ts +0 -52
- package/types/src/flexbox/index.d.ts +0 -2
- package/types/src/flexbox/useSplitterResizing.d.ts +0 -2
- package/types/src/index.d.ts +0 -20
- package/types/src/layout-action.d.ts +0 -19
- package/types/src/layout-header/ActionButton.d.ts +0 -8
- package/types/src/layout-header/Header.d.ts +0 -15
- package/types/src/layout-header/index.d.ts +0 -1
- package/types/src/layout-header/useHeader.d.ts +0 -20
- package/types/src/layout-provider/LayoutProvider.d.ts +0 -20
- package/types/src/layout-provider/LayoutProviderContext.d.ts +0 -15
- package/types/src/layout-provider/index.d.ts +0 -2
- package/types/src/layout-provider/useLayoutDragDrop.d.ts +0 -4
- package/types/src/layout-reducer/flexUtils.d.ts +0 -22
- package/types/src/layout-reducer/index.d.ts +0 -4
- package/types/src/layout-reducer/insert-layout-element.d.ts +0 -8
- package/types/src/layout-reducer/layout-reducer.d.ts +0 -3
- package/types/src/layout-reducer/layoutTypes.d.ts +0 -135
- package/types/src/layout-reducer/layoutUtils.d.ts +0 -44
- package/types/src/layout-reducer/move-layout-element.d.ts +0 -3
- package/types/src/layout-reducer/remove-layout-element.d.ts +0 -3
- package/types/src/layout-reducer/replace-layout-element.d.ts +0 -6
- package/types/src/layout-reducer/resize-flex-children.d.ts +0 -4
- package/types/src/layout-reducer/wrap-layout-element.d.ts +0 -9
- package/types/src/layout-view/View.d.ts +0 -10
- package/types/src/layout-view/useView.d.ts +0 -20
- package/types/src/layout-view/useViewBroadcastChannel.d.ts +0 -7
- package/types/src/layout-view/useViewResize.d.ts +0 -7
- package/types/src/layout-view/viewTypes.d.ts +0 -48
- package/types/src/layout-view-actions/ViewContext.d.ts +0 -35
- package/types/src/layout-view-actions/useViewActionDispatcher.d.ts +0 -4
- package/types/src/layout-view-actions/useViewContributions.d.ts +0 -9
- package/types/src/palette/Palette.d.ts +0 -21
- package/types/src/palette/index.d.ts +0 -1
- package/types/src/placeholder/LayoutStartPanel.d.ts +0 -5
- package/types/src/placeholder/Placeholder.d.ts +0 -16
- package/types/src/placeholder/index.d.ts +0 -1
- package/types/src/responsive/index.d.ts +0 -2
- package/types/src/responsive/measureMinimumNodeSize.d.ts +0 -1
- package/types/src/responsive/overflowUtils.d.ts +0 -2
- package/types/src/responsive/useResizeObserver.d.ts +0 -13
- package/types/src/responsive/utils.d.ts +0 -6
- package/types/src/stack/Stack.d.ts +0 -3
- package/types/src/stack/StackLayout.d.ts +0 -6
- package/types/src/stack/index.d.ts +0 -3
- package/types/src/stack/stackTypes.d.ts +0 -24
- package/types/src/tabs/TabPanel.d.ts +0 -7
- package/types/src/tabs/index.d.ts +0 -1
- package/types/src/tools/config-wrapper/ConfigWrapper.d.ts +0 -2
- package/types/src/tools/config-wrapper/index.d.ts +0 -1
- package/types/src/tools/devtools-box/layout-configurator.d.ts +0 -31
- package/types/src/tools/devtools-tree/layout-tree-viewer.d.ts +0 -6
- package/types/src/tools/index.d.ts +0 -3
- package/types/src/use-persistent-state.d.ts +0 -8
- package/types/src/utils/index.d.ts +0 -5
- package/types/src/utils/pathUtils.d.ts +0 -31
- package/types/src/utils/propUtils.d.ts +0 -5
- package/types/src/utils/refUtils.d.ts +0 -2
- package/types/src/utils/styleUtils.d.ts +0 -3
- package/types/src/utils/typeOf.d.ts +0 -5
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { LayoutJSON } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { ReactElement } from "react";
|
|
3
|
-
import { DragDropRect, DragInstructions } from "../drag-drop";
|
|
4
|
-
import { DropTarget } from "../drag-drop/DropTarget";
|
|
5
|
-
export type layoutType = "Flexbox" | "View" | "LayoutContainer" | "Stack";
|
|
6
|
-
export declare const LayoutActionType: {
|
|
7
|
-
readonly ADD: "add";
|
|
8
|
-
readonly DRAG_START: "drag-start";
|
|
9
|
-
readonly DRAG_DROP: "drag-drop";
|
|
10
|
-
readonly LAYOUT_RESIZE: "layout-resize";
|
|
11
|
-
readonly MAXIMIZE: "maximize";
|
|
12
|
-
readonly MINIMIZE: "minimize";
|
|
13
|
-
readonly MOVE_CHILD: "move-child";
|
|
14
|
-
readonly QUERY: "query";
|
|
15
|
-
readonly REMOVE: "remove";
|
|
16
|
-
readonly REPLACE: "replace";
|
|
17
|
-
readonly RESTORE: "restore";
|
|
18
|
-
readonly SET_PROP: "set-prop";
|
|
19
|
-
readonly SET_PROPS: "set-props";
|
|
20
|
-
readonly SET_TITLE: "set-title";
|
|
21
|
-
readonly SPLITTER_RESIZE: "splitter-resize";
|
|
22
|
-
readonly SWITCH_TAB: "switch-tab";
|
|
23
|
-
readonly TEAROUT: "tearout";
|
|
24
|
-
};
|
|
25
|
-
export type AddAction = {
|
|
26
|
-
component: any;
|
|
27
|
-
path: string;
|
|
28
|
-
type: typeof LayoutActionType.ADD;
|
|
29
|
-
};
|
|
30
|
-
export type DragDropAction = {
|
|
31
|
-
draggedReactElement: ReactElement;
|
|
32
|
-
dragInstructions: any;
|
|
33
|
-
dropTarget: Partial<DropTarget>;
|
|
34
|
-
type: typeof LayoutActionType.DRAG_DROP;
|
|
35
|
-
};
|
|
36
|
-
export type MaximizeAction = {
|
|
37
|
-
path?: string;
|
|
38
|
-
type: typeof LayoutActionType.MAXIMIZE;
|
|
39
|
-
};
|
|
40
|
-
export type CollapseAction = {
|
|
41
|
-
path?: string;
|
|
42
|
-
type: "collapse";
|
|
43
|
-
};
|
|
44
|
-
export type ExpandAction = {
|
|
45
|
-
path?: string;
|
|
46
|
-
type: "expand";
|
|
47
|
-
};
|
|
48
|
-
export type MoveChildAction = {
|
|
49
|
-
fromIndex: number;
|
|
50
|
-
toIndex: number;
|
|
51
|
-
path: string;
|
|
52
|
-
type: typeof LayoutActionType.MOVE_CHILD;
|
|
53
|
-
};
|
|
54
|
-
export type QueryAction = {
|
|
55
|
-
path?: string;
|
|
56
|
-
query: string;
|
|
57
|
-
type: typeof LayoutActionType.QUERY;
|
|
58
|
-
};
|
|
59
|
-
export type RemoveAction = {
|
|
60
|
-
path?: string;
|
|
61
|
-
type: typeof LayoutActionType.REMOVE;
|
|
62
|
-
};
|
|
63
|
-
export type ReplaceAction = {
|
|
64
|
-
replacement: any;
|
|
65
|
-
target: any;
|
|
66
|
-
type: typeof LayoutActionType.REPLACE;
|
|
67
|
-
};
|
|
68
|
-
export type RestoreAction = {
|
|
69
|
-
path?: string;
|
|
70
|
-
type: typeof LayoutActionType.RESTORE;
|
|
71
|
-
};
|
|
72
|
-
export type SetPropAction = {
|
|
73
|
-
path: string;
|
|
74
|
-
propName: string;
|
|
75
|
-
propValue: string | number | boolean;
|
|
76
|
-
type: typeof LayoutActionType.SET_PROP;
|
|
77
|
-
};
|
|
78
|
-
export type SetPropsAction = {
|
|
79
|
-
path: string;
|
|
80
|
-
props: {
|
|
81
|
-
[key: string]: unknown;
|
|
82
|
-
};
|
|
83
|
-
type: typeof LayoutActionType.SET_PROPS;
|
|
84
|
-
};
|
|
85
|
-
export type SetTitleAction = {
|
|
86
|
-
path: string;
|
|
87
|
-
title: string;
|
|
88
|
-
type: typeof LayoutActionType.SET_TITLE;
|
|
89
|
-
};
|
|
90
|
-
export type SplitterResizeAction = {
|
|
91
|
-
path: string;
|
|
92
|
-
sizes: {
|
|
93
|
-
currentSize: number;
|
|
94
|
-
flexBasis: number;
|
|
95
|
-
}[];
|
|
96
|
-
type: typeof LayoutActionType.SPLITTER_RESIZE;
|
|
97
|
-
};
|
|
98
|
-
export type LayoutResizeAction = {
|
|
99
|
-
path: string;
|
|
100
|
-
size: number;
|
|
101
|
-
type: typeof LayoutActionType.LAYOUT_RESIZE;
|
|
102
|
-
};
|
|
103
|
-
export type SwitchTabAction = {
|
|
104
|
-
id?: string;
|
|
105
|
-
nextIdx: number;
|
|
106
|
-
path: string;
|
|
107
|
-
type: typeof LayoutActionType.SWITCH_TAB;
|
|
108
|
-
};
|
|
109
|
-
export type TearoutAction = {
|
|
110
|
-
path?: string;
|
|
111
|
-
type: typeof LayoutActionType.TEAROUT;
|
|
112
|
-
};
|
|
113
|
-
export type LayoutReducerAction = AddAction | DragDropAction | LayoutResizeAction | CollapseAction | ExpandAction | MoveChildAction | RemoveAction | ReplaceAction | RestoreAction | SetPropAction | SetPropsAction | SetTitleAction | SplitterResizeAction | SwitchTabAction;
|
|
114
|
-
export type MousedownViewAction = {
|
|
115
|
-
preDragActivity?: unknown;
|
|
116
|
-
index?: number;
|
|
117
|
-
type: "mousedown";
|
|
118
|
-
};
|
|
119
|
-
export type DragStartAction = {
|
|
120
|
-
payload?: ReactElement;
|
|
121
|
-
dragContainerPath?: string;
|
|
122
|
-
dragElement?: HTMLElement;
|
|
123
|
-
dragRect: DragDropRect;
|
|
124
|
-
dropTargets?: string[];
|
|
125
|
-
evt: MouseEvent;
|
|
126
|
-
instructions?: DragInstructions;
|
|
127
|
-
path: string;
|
|
128
|
-
type: typeof LayoutActionType.DRAG_START;
|
|
129
|
-
};
|
|
130
|
-
export type LayoutLevelChange = "add-component" | "drag-drop-operation" | "edit-feature-title" | "remove-component" | "resize-component" | "switch-active-tab" | "save-feature-props";
|
|
131
|
-
export type ApplicationLevelChange = "switch-active-layout" | "open-layout" | "close-layout" | "rename-layout" | "resize-application-chrome";
|
|
132
|
-
export type LayoutChangeReason = LayoutLevelChange | ApplicationLevelChange;
|
|
133
|
-
export type LayoutChangeHandler = (layout: LayoutJSON, layoutChangeReason: LayoutChangeReason) => void;
|
|
134
|
-
export declare const isApplicationLevelChange: (layoutChangeReason: LayoutChangeReason) => layoutChangeReason is ApplicationLevelChange;
|
|
135
|
-
export declare const isLayoutLevelChange: (layoutChangeReason: LayoutChangeReason) => layoutChangeReason is LayoutLevelChange;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { LayoutJSON, LayoutModel, dimension } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import React, { CSSProperties, ReactElement } from "react";
|
|
3
|
-
import { TabLabelFactory } from "../stack";
|
|
4
|
-
import { layoutType } from "./layoutTypes";
|
|
5
|
-
interface ComponentWithId {
|
|
6
|
-
id: string;
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
}
|
|
9
|
-
export declare const getManagedDimension: (style: CSSProperties) => [dimension, dimension];
|
|
10
|
-
export declare const applyLayoutProps: (component: ReactElement, path?: string) => ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
11
|
-
export interface LayoutProps extends ComponentWithId {
|
|
12
|
-
active?: number;
|
|
13
|
-
"data-path"?: string;
|
|
14
|
-
children?: ReactElement[];
|
|
15
|
-
column?: boolean;
|
|
16
|
-
dropTarget?: boolean;
|
|
17
|
-
key: string;
|
|
18
|
-
layout?: LayoutJSON;
|
|
19
|
-
path?: string;
|
|
20
|
-
resizeable?: boolean;
|
|
21
|
-
style: CSSProperties;
|
|
22
|
-
type?: string;
|
|
23
|
-
version?: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* parse the declarative JSX and clone adding layout attributes
|
|
27
|
-
*/
|
|
28
|
-
export declare const cloneElementAddLayoutProps: (layoutElement: ReactElement, previousLayout?: ReactElement) => ReactElement;
|
|
29
|
-
export declare const applyLayout: (type: layoutType, props: LayoutProps, previousLayout?: LayoutModel) => LayoutModel;
|
|
30
|
-
export declare function layoutFromJson({ active, id, type, children, props, state }: LayoutJSON, path: string): ReactElement;
|
|
31
|
-
export declare function layoutToJSON(component: ReactElement): LayoutJSON<{
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
}>;
|
|
34
|
-
export declare function componentToJson(component: ReactElement): LayoutJSON;
|
|
35
|
-
export declare function serializeProps(props?: LayoutProps): {
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
} | undefined;
|
|
38
|
-
export type LayoutQuery = "PARENT_CONTAINER";
|
|
39
|
-
export declare const layoutQuery: (query: LayoutQuery, path?: string, layoutRoot?: ReactElement) => {
|
|
40
|
-
parentContainerId: any;
|
|
41
|
-
parentContainerType: string | undefined;
|
|
42
|
-
} | undefined;
|
|
43
|
-
export declare const getDefaultTabLabel: TabLabelFactory;
|
|
44
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from "react";
|
|
2
|
-
import { ReplaceAction } from "./layoutTypes";
|
|
3
|
-
import { LayoutProps } from "./layoutUtils";
|
|
4
|
-
export declare function replaceChild(model: ReactElement, { target, replacement }: ReplaceAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
5
|
-
export declare function _replaceChild(model: ReactElement, child: ReactElement, replacement: ReactElement<LayoutProps>): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
6
|
-
export declare function swapChild(model: ReactElement, child: ReactElement, replacement: ReactElement, op?: "collapse" | "expand"): ReactElement;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React, { ReactElement } from "react";
|
|
2
|
-
import { LayoutResizeAction, SplitterResizeAction } from "./layoutTypes";
|
|
3
|
-
export declare function resizeFlexChild(layoutRoot: ReactElement, { path, size }: LayoutResizeAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
4
|
-
export declare function resizeFlexChildren(layoutRoot: ReactElement, { path, sizes }: SplitterResizeAction): ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { DropPos } from "../drag-drop/dragDropTypes";
|
|
3
|
-
import { DropTarget } from "../drag-drop/DropTarget";
|
|
4
|
-
export interface LayoutSpec {
|
|
5
|
-
type: "Stack" | "Flexbox";
|
|
6
|
-
flexDirection: "column" | "row";
|
|
7
|
-
showTabs?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function wrap(container: ReactElement, existingComponent: ReactElement, newComponent: any, pos: DropPos, clientRect?: DropTarget["clientRect"], dropRect?: DropTarget["dropRect"]): ReactElement;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ForwardedRef, ReactElement } from "react";
|
|
2
|
-
import { ViewProps } from "./viewTypes";
|
|
3
|
-
interface ViewComponentType {
|
|
4
|
-
(props: ViewProps & {
|
|
5
|
-
ref?: ForwardedRef<HTMLDivElement>;
|
|
6
|
-
}): ReactElement<ViewProps>;
|
|
7
|
-
displayName?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const MemoView: ViewComponentType;
|
|
10
|
-
export { MemoView as View };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
import { ConfigChangeHandler } from "../layout-view-actions/ViewContext";
|
|
3
|
-
export interface ViewHookProps {
|
|
4
|
-
id: string;
|
|
5
|
-
rootRef: RefObject<HTMLDivElement | null>;
|
|
6
|
-
path?: string;
|
|
7
|
-
dropTargets?: string[];
|
|
8
|
-
title?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const useView: ({ id, rootRef, path, dropTargets, title: titleProp, }: ViewHookProps) => {
|
|
11
|
-
contributions: import("./viewTypes").Contribution[] | undefined;
|
|
12
|
-
dispatchViewAction: import("..").ViewDispatch;
|
|
13
|
-
load: (key?: string) => any;
|
|
14
|
-
onConfigChange: ConfigChangeHandler;
|
|
15
|
-
onEditTitle: (title: string) => void;
|
|
16
|
-
purge: (key: string) => void;
|
|
17
|
-
restoredState: any;
|
|
18
|
-
save: (state: unknown, key: string) => void;
|
|
19
|
-
title: any;
|
|
20
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface ViewBroadcastMessage {
|
|
2
|
-
path?: string;
|
|
3
|
-
targetId?: string;
|
|
4
|
-
type: "highlight-on" | "highlight-off" | "layout-closed";
|
|
5
|
-
}
|
|
6
|
-
export type BroadcastMessageHandler = (message: ViewBroadcastMessage) => void;
|
|
7
|
-
export declare const useViewBroadcastChannel: (id?: string, path?: string, onMessageReceived?: BroadcastMessageHandler) => (message: ViewBroadcastMessage) => void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
export interface ViewResizeHookProps {
|
|
3
|
-
mainRef: RefObject<HTMLDivElement | null>;
|
|
4
|
-
resize?: "defer" | "responsive";
|
|
5
|
-
rootRef: RefObject<HTMLDivElement | null>;
|
|
6
|
-
}
|
|
7
|
-
export declare const useViewResize: ({ mainRef, resize, rootRef, }: ViewResizeHookProps) => void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, FunctionComponent, HTMLAttributes, ReactElement } from "react";
|
|
2
|
-
import { HeaderProps } from "../layout-header";
|
|
3
|
-
import { MaximizeAction, CollapseAction, ExpandAction, MousedownViewAction, QueryAction, RemoveAction, RestoreAction, TearoutAction } from "../layout-reducer";
|
|
4
|
-
import { ViewBroadcastMessage } from "./useViewBroadcastChannel";
|
|
5
|
-
export type SaveAction = {
|
|
6
|
-
type: "save";
|
|
7
|
-
};
|
|
8
|
-
export type ContributionLocation = "post-title" | "pre-title";
|
|
9
|
-
export type Contribution = {
|
|
10
|
-
index?: number;
|
|
11
|
-
location?: ContributionLocation;
|
|
12
|
-
content: ReactElement;
|
|
13
|
-
};
|
|
14
|
-
export type AddToolbarContributionViewAction = {
|
|
15
|
-
content: ReactElement;
|
|
16
|
-
location: ContributionLocation;
|
|
17
|
-
type: "add-toolbar-contribution";
|
|
18
|
-
};
|
|
19
|
-
export type RemoveToolbarContributionViewAction = {
|
|
20
|
-
location: ContributionLocation;
|
|
21
|
-
type: "remove-toolbar-contribution";
|
|
22
|
-
};
|
|
23
|
-
export type BroadcastMessageViewAction = {
|
|
24
|
-
type: "broadcast-message";
|
|
25
|
-
message: ViewBroadcastMessage;
|
|
26
|
-
};
|
|
27
|
-
export type ViewAction = BroadcastMessageViewAction | MaximizeAction | CollapseAction | ExpandAction | MousedownViewAction | QueryAction | RemoveAction | RestoreAction | TearoutAction | AddToolbarContributionViewAction | RemoveToolbarContributionViewAction;
|
|
28
|
-
export type ResizeStrategy = "defer" | "responsive";
|
|
29
|
-
export interface ViewProps extends HTMLAttributes<HTMLDivElement> {
|
|
30
|
-
Header?: FunctionComponent<HeaderProps>;
|
|
31
|
-
allowRename?: boolean;
|
|
32
|
-
closeable?: boolean;
|
|
33
|
-
collapsed?: boolean;
|
|
34
|
-
"data-path"?: string;
|
|
35
|
-
"data-resizeable"?: boolean;
|
|
36
|
-
dropTargets?: string[];
|
|
37
|
-
expanded?: boolean;
|
|
38
|
-
flexFill?: boolean;
|
|
39
|
-
header?: boolean | Partial<HeaderProps>;
|
|
40
|
-
onCollapse?: () => void;
|
|
41
|
-
onExpand?: () => void;
|
|
42
|
-
orientation?: "vertical" | "horizontal";
|
|
43
|
-
path?: string;
|
|
44
|
-
resize?: ResizeStrategy;
|
|
45
|
-
resizeable?: boolean;
|
|
46
|
-
restoreStyle?: CSSProperties;
|
|
47
|
-
tearOut?: boolean;
|
|
48
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React, { SyntheticEvent } from "react";
|
|
2
|
-
import { ViewAction } from "../layout-view/viewTypes";
|
|
3
|
-
export type QueryResponse = {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
};
|
|
6
|
-
export type ConfigChangeHandler = (config: {
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
type: string;
|
|
9
|
-
}) => void;
|
|
10
|
-
export type ViewDispatch = <Action extends ViewAction = ViewAction>(action: Action, evt?: SyntheticEvent) => Promise<boolean | QueryResponse | void>;
|
|
11
|
-
/**
|
|
12
|
-
* This API is available to any Feature hosted within Vuu (as all Features are wrapped
|
|
13
|
-
* with View component). It offers metadata about the View as well as access to the
|
|
14
|
-
* Vuu persistencew API;
|
|
15
|
-
*/
|
|
16
|
-
export interface ViewContextAPI {
|
|
17
|
-
/**
|
|
18
|
-
* dispatcher for View actions. These are a subset of LayoutActions, specifically for
|
|
19
|
-
* View manipulation
|
|
20
|
-
*/
|
|
21
|
-
dispatch?: ViewDispatch | null;
|
|
22
|
-
id?: string;
|
|
23
|
-
load?: <T = unknown>(key?: string) => T;
|
|
24
|
-
onConfigChange?: ConfigChangeHandler;
|
|
25
|
-
path?: string;
|
|
26
|
-
purge?: (key: string) => void;
|
|
27
|
-
save?: (state: unknown, key: string) => void;
|
|
28
|
-
setComponentProps: (props: {
|
|
29
|
-
[key: string]: unknown;
|
|
30
|
-
}) => void;
|
|
31
|
-
title?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare const ViewContext: React.Context<ViewContextAPI>;
|
|
34
|
-
export declare const useViewDispatch: () => ViewDispatch | null;
|
|
35
|
-
export declare const useViewContext: () => ViewContextAPI;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
import { ViewDispatch } from "./ViewContext";
|
|
3
|
-
import { Contribution } from "../layout-view/viewTypes";
|
|
4
|
-
export declare const useViewActionDispatcher: (id: string, rootRef: RefObject<HTMLDivElement | null>, viewPath?: string, dropTargets?: string[]) => [ViewDispatch, Contribution[] | undefined];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import type { Contribution, ContributionLocation } from "../layout-view/viewTypes";
|
|
3
|
-
export declare const useViewContributions: ({ sessionKey, }: {
|
|
4
|
-
sessionKey: string;
|
|
5
|
-
}) => {
|
|
6
|
-
clearContributions: () => void;
|
|
7
|
-
contributions: Contribution[];
|
|
8
|
-
updateContributions: (location: ContributionLocation, content: ReactElement) => void;
|
|
9
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ListBoxProps, OptionProps } from "@salt-ds/core";
|
|
2
|
-
import { HTMLAttributes, ReactElement } from "react";
|
|
3
|
-
import type { ViewProps } from "../layout-view/viewTypes";
|
|
4
|
-
export interface PaletteItemProps extends OptionProps {
|
|
5
|
-
/**
|
|
6
|
-
* This is the payload that will be created when the
|
|
7
|
-
* palette item is dropped
|
|
8
|
-
*/
|
|
9
|
-
ViewProps?: Pick<ViewProps, "allowRename" | "closeable" | "header" | "resizeable" | "resize" | "title">;
|
|
10
|
-
component: ReactElement;
|
|
11
|
-
idx?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const PaletteItem: import("react").MemoExoticComponent<({ className, component, idx, key, value, ViewProps, ...props }: PaletteItemProps) => import("react").JSX.Element>;
|
|
14
|
-
export interface PaletteProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDragStart" | "onDrop" | "onSelect"> {
|
|
15
|
-
ListBoxProps?: Partial<ListBoxProps>;
|
|
16
|
-
ViewProps?: Partial<ViewProps>;
|
|
17
|
-
children: ReactElement[];
|
|
18
|
-
orientation: "horizontal" | "vertical";
|
|
19
|
-
selection?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare const Palette: ({ ListBoxProps, ViewProps, children, className, orientation, ...props }: PaletteProps) => import("react").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Palette";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ViewProps } from "../layout-view/viewTypes";
|
|
2
|
-
export interface PlaceholderProps extends ViewProps {
|
|
3
|
-
closeable?: boolean;
|
|
4
|
-
flexFill?: boolean;
|
|
5
|
-
resizeable?: boolean;
|
|
6
|
-
showStartMenu?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* shim is only when we're dealing with intrinsically sized children, which is never
|
|
9
|
-
* in an actual application. Intrinsic sizing is still experimental.
|
|
10
|
-
*/
|
|
11
|
-
shim?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function Placeholder({ className: classNameProp, showStartMenu, ...viewProps }: PlaceholderProps): import("react").JSX.Element;
|
|
14
|
-
export declare namespace Placeholder {
|
|
15
|
-
var displayName: string;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Placeholder';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function measureMinimumNodeSize(node: HTMLElement, dimension?: 'width' | 'height'): number;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
export declare const WidthHeight: string[];
|
|
3
|
-
export declare const HeightOnly: string[];
|
|
4
|
-
export declare const WidthOnly: string[];
|
|
5
|
-
export type measurements<T = string | number> = {
|
|
6
|
-
height?: T;
|
|
7
|
-
scrollHeight?: T;
|
|
8
|
-
scrollWidth?: T;
|
|
9
|
-
width?: T;
|
|
10
|
-
};
|
|
11
|
-
export type ResizeHandler = (measurements: measurements<number>) => void;
|
|
12
|
-
export declare const resizeObserver: ResizeObserver;
|
|
13
|
-
export declare function useResizeObserver(ref: RefObject<Element | HTMLElement | null>, dimensions: string[], onResize: ResizeHandler, reportInitialSize?: boolean): void;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { TabstripProps } from "@vuu-ui/vuu-ui-controls";
|
|
2
|
-
import { HTMLAttributes, MouseEvent, ReactElement, ReactNode } from "react";
|
|
3
|
-
export type TabLabelFactory = (component: ReactElement, index: number, existingLabels: string[]) => string;
|
|
4
|
-
export interface SerializableStackProps {
|
|
5
|
-
active?: number;
|
|
6
|
-
/** should the Stack display a Tabstrip and where ? default top */
|
|
7
|
-
showTabs?: false | TabPosition;
|
|
8
|
-
}
|
|
9
|
-
export type TabPosition = "top" | "left" | "right" | "bottom";
|
|
10
|
-
export interface StackProps extends SerializableStackProps, Omit<HTMLAttributes<HTMLDivElement>, "onMouseDown"> {
|
|
11
|
-
TabstripProps?: Partial<TabstripProps>;
|
|
12
|
-
createNewChild?: (index: number) => ReactElement;
|
|
13
|
-
getTabIcon?: (component: ReactElement, index: number) => string | undefined;
|
|
14
|
-
getTabLabel?: TabLabelFactory;
|
|
15
|
-
keyBoardActivation?: "automatic" | "manual";
|
|
16
|
-
onAddTab?: () => void;
|
|
17
|
-
onMoveTab?: (fromIndex: number, toIndex: number) => void;
|
|
18
|
-
onMouseDown?: (e: MouseEvent, tabIndex: number) => void;
|
|
19
|
-
onTabClose?: (tabIndex: number) => void;
|
|
20
|
-
onTabEdit?: (tabIndex: number, label: string) => void;
|
|
21
|
-
onTabSelectionChanged?: (nextIndex: number) => void;
|
|
22
|
-
path?: string;
|
|
23
|
-
toolbarContent?: ReactNode;
|
|
24
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import './TabPanel.css';
|
|
3
|
-
export interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
ariaLabelledBy: string;
|
|
5
|
-
}
|
|
6
|
-
declare const TabPanel: ({ ariaLabelledBy, children, id }: TabPanelProps) => import("react").JSX.Element;
|
|
7
|
-
export default TabPanel;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TabPanel } from './TabPanel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ConfigWrapper';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare const MARGIN_STYLES: {
|
|
2
|
-
margin: boolean;
|
|
3
|
-
marginTop: boolean;
|
|
4
|
-
marginRight: boolean;
|
|
5
|
-
marginBottom: boolean;
|
|
6
|
-
marginLeft: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const PADDING_STYLES: {
|
|
9
|
-
padding: boolean;
|
|
10
|
-
paddingTop: boolean;
|
|
11
|
-
paddingRight: boolean;
|
|
12
|
-
paddingBottom: boolean;
|
|
13
|
-
paddingLeft: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const BORDER_STYLES: {
|
|
16
|
-
border: boolean;
|
|
17
|
-
borderColor: boolean;
|
|
18
|
-
borderWidth: boolean;
|
|
19
|
-
borderTopWidth: boolean;
|
|
20
|
-
borderRightWidth: boolean;
|
|
21
|
-
borderBottomWidth: boolean;
|
|
22
|
-
borderLeftWidth: boolean;
|
|
23
|
-
};
|
|
24
|
-
export declare const LayoutConfigurator: ({ height, managedStyle, onChange, style, width, }: {
|
|
25
|
-
height: any;
|
|
26
|
-
managedStyle: any;
|
|
27
|
-
onChange: any;
|
|
28
|
-
style: any;
|
|
29
|
-
width: any;
|
|
30
|
-
}) => import("react").JSX.Element;
|
|
31
|
-
export declare function XXXnormalizeStyles(layoutStyle?: {}, visualStyle?: {}): {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const getPersistentState: (id: string) => any;
|
|
2
|
-
export declare const hasPersistentState: (id: string) => boolean;
|
|
3
|
-
export declare const setPersistentState: (id: string, value: any) => Map<string, any>;
|
|
4
|
-
export declare const usePersistentState: () => {
|
|
5
|
-
loadState: (id: string, key?: string) => any;
|
|
6
|
-
saveState: (id: string, key: string | undefined, data: unknown) => void;
|
|
7
|
-
purgeState: (id: string, key?: string) => void;
|
|
8
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { LayoutJSON, LayoutModel } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import React, { ReactElement } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* This is a very specific function at the moment. It resolves a path of the form
|
|
5
|
-
* '#{componentid}.ACTIVE_CHILD'
|
|
6
|
-
* It allows a templated path to be resolved to a concrete path at runtime.
|
|
7
|
-
* The above pattern is used to identify a layout drop target. Further patterns
|
|
8
|
-
* will be added if needed.
|
|
9
|
-
*/
|
|
10
|
-
export declare const resolvePath: (source: ReactElement, path?: string) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Similar to resolvePath but operates on a JSON
|
|
13
|
-
* layout structure and returns the matching JSON node.
|
|
14
|
-
*/
|
|
15
|
-
export declare const resolveJSONPath: (source: LayoutJSON, path?: string) => LayoutJSON | undefined;
|
|
16
|
-
export declare function followPathToParent(source: ReactElement, path: string): ReactElement | null;
|
|
17
|
-
export declare function findTarget(source: LayoutModel | undefined, test: (props: any) => boolean): LayoutModel | undefined;
|
|
18
|
-
export declare function containerOf(source: LayoutModel, target: LayoutModel): LayoutModel | null;
|
|
19
|
-
export declare const getChild: (children: ReactElement[], idx: number) => ReactElement | undefined;
|
|
20
|
-
export declare function followPathToComponent(component: ReactElement, path: string): ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
|
|
21
|
-
export declare function followPath(source: LayoutModel, path: string): LayoutModel | undefined;
|
|
22
|
-
export declare function followPath(source: ReactElement, path: string, throwIfNotFound: true): ReactElement;
|
|
23
|
-
export declare function nextLeaf(root: ReactElement, path: string): any;
|
|
24
|
-
export declare function previousLeaf(root: ReactElement, path: string): any;
|
|
25
|
-
type NextStepResult = {
|
|
26
|
-
idx: number;
|
|
27
|
-
finalStep: boolean;
|
|
28
|
-
};
|
|
29
|
-
export declare function nextStep(pathSoFar: string, targetPath: string, followPathToEnd?: boolean): NextStepResult;
|
|
30
|
-
export declare function resetPath(model: ReactElement, path: string, additionalProps?: any): ReactElement;
|
|
31
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { LayoutModel } from "@vuu-ui/vuu-utils";
|
|
3
|
-
export declare const getProp: (component: LayoutModel | undefined, propName: string) => any;
|
|
4
|
-
export declare const getProps: (component?: LayoutModel) => any;
|
|
5
|
-
export declare const getChildProp: (container: LayoutModel) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LayoutJSON, LayoutModel, WithType } from "@vuu-ui/vuu-utils";
|
|
2
|
-
import { ReactElement } from "react";
|
|
3
|
-
export declare function typeOf(element?: LayoutModel | WithType): string | undefined;
|
|
4
|
-
export declare const isTypeOf: (element: ReactElement, type: string) => boolean;
|
|
5
|
-
export declare const isLayoutJSON: (layout: LayoutJSON) => layout is LayoutJSON;
|