flexlayout-react 0.8.18 → 0.9.0
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 +144 -206
- package/dist/index.js +6451 -6398
- package/package.json +31 -34
- package/style/_base.scss +109 -33
- package/style/_themes.scss +720 -49
- package/style/alpha_dark.css +862 -0
- package/style/alpha_dark.css.map +1 -0
- package/style/alpha_dark.scss +6 -0
- package/style/alpha_light.css +856 -0
- package/style/alpha_light.css.map +1 -0
- package/style/alpha_light.scss +6 -0
- package/style/alpha_rounded.css +811 -0
- package/style/alpha_rounded.css.map +1 -0
- package/style/alpha_rounded.scss +6 -0
- package/style/combined.css +569 -44
- package/style/combined.css.map +1 -1
- package/style/combined.scss +25 -1
- package/style/dark.css +95 -22
- package/style/dark.css.map +1 -1
- package/style/gray.css +96 -23
- package/style/gray.css.map +1 -1
- package/style/light.css +96 -20
- package/style/light.css.map +1 -1
- package/style/rounded.css +107 -25
- package/style/rounded.css.map +1 -1
- package/style/underline.css +99 -22
- package/style/underline.css.map +1 -1
- package/types/index.d.ts +14 -14
- package/types/model/Actions.d.ts +62 -31
- package/types/model/Attributes.d.ts +42 -0
- package/types/model/BorderNode.d.ts +11 -11
- package/types/model/BorderSet.d.ts +2 -2
- package/types/{DropInfo.d.ts → model/DropInfo.d.ts} +2 -2
- package/types/model/IDropTarget.d.ts +2 -2
- package/types/model/IJsonModel.d.ts +70 -48
- package/types/model/Layout.d.ts +41 -0
- package/types/model/Model.d.ts +31 -26
- package/types/model/Node.d.ts +18 -10
- package/types/{Rect.d.ts → model/Rect.d.ts} +6 -3
- package/types/model/RowNode.d.ts +15 -14
- package/types/model/TabNode.d.ts +15 -21
- package/types/model/TabSetNode.d.ts +15 -21
- package/types/view/BorderButton.d.ts +4 -3
- package/types/view/BorderTab.d.ts +3 -3
- package/types/view/BorderTabSet.d.ts +3 -3
- package/types/{Types.d.ts → view/CSSClassNames.d.ts} +9 -2
- package/types/view/DragContainer.d.ts +6 -4
- package/types/view/FloatWindow.d.ts +11 -0
- package/types/{I18nLabel.d.ts → view/I18nLabel.d.ts} +1 -0
- package/types/view/Icons.d.ts +1 -0
- package/types/view/Layout.d.ts +34 -212
- package/types/view/Overlay.d.ts +2 -2
- package/types/view/PopoutWindow.d.ts +6 -6
- package/types/view/PopupMenu.d.ts +2 -2
- package/types/view/Row.d.ts +3 -3
- package/types/view/Splitter.d.ts +2 -4
- package/types/view/Tab.d.ts +3 -4
- package/types/view/TabButton.d.ts +3 -3
- package/types/view/TabButtonStamp.d.ts +3 -3
- package/types/view/TabContentRenderer.d.ts +14 -0
- package/types/view/TabLayout.d.ts +12 -0
- package/types/view/TabOverflowHook.d.ts +3 -3
- package/types/view/TabSet.d.ts +3 -3
- package/types/view/Utils.d.ts +7 -4
- package/types/view/layout/BorderContainer.d.ts +7 -0
- package/types/view/layout/DragDropManager.d.ts +48 -0
- package/types/view/layout/EdgeIndicators.d.ts +5 -0
- package/types/view/layout/FloatingWindowContainer.d.ts +5 -0
- package/types/view/layout/LayoutInternal.d.ts +151 -0
- package/types/view/layout/LayoutTypes.d.ts +51 -0
- package/types/Attribute.d.ts +0 -25
- package/types/AttributeDefinitions.d.ts +0 -18
- package/types/model/Action.d.ts +0 -5
- package/types/model/LayoutWindow.d.ts +0 -44
- package/types/view/SizeTracker.d.ts +0 -13
- /package/types/{DockLocation.d.ts → model/DockLocation.d.ts} +0 -0
- /package/types/{Orientation.d.ts → model/Orientation.d.ts} +0 -0
package/types/view/Tab.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { TabNode } from "../model/TabNode";
|
|
2
|
-
import {
|
|
2
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export interface ITabProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
controller: LayoutController;
|
|
6
|
+
tabNode: TabNode;
|
|
7
7
|
selected: boolean;
|
|
8
|
-
path: string;
|
|
9
8
|
}
|
|
10
9
|
/** @internal */
|
|
11
10
|
export declare const Tab: (props: ITabProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TabNode } from "../model/TabNode";
|
|
2
|
-
import {
|
|
2
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export interface ITabButtonProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
controller: LayoutController;
|
|
6
|
+
tabNode: TabNode;
|
|
7
7
|
selected: boolean;
|
|
8
8
|
path: string;
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TabNode } from "../model/TabNode";
|
|
2
|
-
import {
|
|
2
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export interface ITabButtonStampProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
tabNode: TabNode;
|
|
6
|
+
controller: LayoutController;
|
|
7
7
|
}
|
|
8
8
|
/** @internal */
|
|
9
9
|
export declare const TabButtonStamp: (props: ITabButtonStampProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Rect } from "../model/Rect";
|
|
3
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
4
|
+
import { TabNode } from "../model/TabNode";
|
|
5
|
+
export interface ITabContentRenderProps {
|
|
6
|
+
controller: LayoutController;
|
|
7
|
+
tabNode: TabNode;
|
|
8
|
+
rect: Rect;
|
|
9
|
+
windowId: string;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
fullRedrawRevision: number;
|
|
12
|
+
parentRedrawRevision: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const TabContentRenderer: React.MemoExoticComponent<({ controller, tabNode }: ITabContentRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TabNode } from "../model/TabNode";
|
|
2
|
+
export interface ITabLayoutProps {
|
|
3
|
+
tabNode: TabNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Component that can be used within the factory to render a tabs defined sublayout.
|
|
7
|
+
* This allows the sublayout to be surrounded by other controls, e.g. a header and footer bars
|
|
8
|
+
*
|
|
9
|
+
* @category Components
|
|
10
|
+
* @group Main Layout
|
|
11
|
+
*/
|
|
12
|
+
export declare const TabLayout: (props: ITabLayoutProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { TabSetNode } from "../model/TabSetNode";
|
|
3
3
|
import { BorderNode } from "../model/BorderNode";
|
|
4
|
-
import { Orientation } from "../Orientation";
|
|
5
|
-
import {
|
|
4
|
+
import { Orientation } from "../model/Orientation";
|
|
5
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
6
6
|
/** @internal */
|
|
7
|
-
export declare const useTabOverflow: (
|
|
7
|
+
export declare const useTabOverflow: (controller: LayoutController, node: TabSetNode | BorderNode, orientation: Orientation, tabStripRef: React.RefObject<HTMLElement | null>, miniScrollRef: React.RefObject<HTMLElement | null>, tabClassName: string) => {
|
|
8
8
|
selfRef: React.RefObject<HTMLDivElement | null>;
|
|
9
9
|
userControlledPositionRef: React.RefObject<boolean>;
|
|
10
10
|
onScroll: () => void;
|
package/types/view/TabSet.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TabSetNode } from "../model/TabSetNode";
|
|
2
|
-
import {
|
|
2
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
3
3
|
/** @internal */
|
|
4
4
|
export interface ITabSetProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
controller: LayoutController;
|
|
6
|
+
tabsetNode: TabSetNode;
|
|
7
7
|
}
|
|
8
8
|
/** @internal */
|
|
9
9
|
export declare const TabSet: (props: ITabSetProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/view/Utils.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Node } from "../model/Node";
|
|
3
3
|
import { TabNode } from "../model/TabNode";
|
|
4
|
-
import {
|
|
4
|
+
import { LayoutController } from "./layout/LayoutInternal";
|
|
5
|
+
import { Layout } from "../model/Layout";
|
|
5
6
|
/** @internal */
|
|
6
7
|
export declare function isDesktop(): boolean;
|
|
7
8
|
/** @internal */
|
|
8
|
-
export declare function getRenderStateEx(
|
|
9
|
+
export declare function getRenderStateEx(controller: LayoutController, tabNode: TabNode, iconAngle?: number): {
|
|
9
10
|
leading: import("react/jsx-runtime").JSX.Element | undefined;
|
|
10
11
|
content: string | Iterable<React.ReactNode>;
|
|
11
12
|
name: string;
|
|
12
|
-
buttons:
|
|
13
|
+
buttons: React.ReactNode[];
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
16
|
export declare function isAuxMouseEvent(event: React.MouseEvent<HTMLElement, MouseEvent> | React.TouchEvent<HTMLElement>): boolean;
|
|
16
17
|
export declare function enablePointerOnIFrames(enable: boolean, currentDocument: Document): void;
|
|
17
18
|
export declare function getElementsByTagName(tag: string, currentDocument: Document): Element[];
|
|
19
|
+
export declare let Utils_dragging: boolean;
|
|
18
20
|
export declare function startDrag(doc: Document, event: React.PointerEvent<HTMLElement>, drag: (x: number, y: number) => void, dragEnd: () => void, dragCancel: () => void): void;
|
|
19
|
-
export declare function
|
|
21
|
+
export declare function findParentLayout(layout: Layout): Layout | undefined;
|
|
22
|
+
export declare function canDockToLayout(node: Node, layout: Layout): boolean;
|
|
20
23
|
export declare function copyInlineStyles(source: HTMLElement, target: HTMLElement): boolean;
|
|
21
24
|
export declare function isSafari(): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { LayoutController } from "./LayoutInternal";
|
|
3
|
+
export interface IBorderContainerProps {
|
|
4
|
+
controller: LayoutController;
|
|
5
|
+
inner: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const BorderContainer: ({ controller, inner }: IBorderContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Node } from "../../model/Node";
|
|
3
|
+
import { TabNode } from "../../model/TabNode";
|
|
4
|
+
import { TabSetNode } from "../../model/TabSetNode";
|
|
5
|
+
import { IDraggable } from "../../model/IDraggable";
|
|
6
|
+
import { IJsonTabNode } from "../../model/IJsonModel";
|
|
7
|
+
import { LayoutController } from "./LayoutInternal";
|
|
8
|
+
export declare class DragDropManager {
|
|
9
|
+
private static dragState;
|
|
10
|
+
private _controller;
|
|
11
|
+
private _dragEnterCount;
|
|
12
|
+
private _dragging;
|
|
13
|
+
private _active;
|
|
14
|
+
private _dropInfo;
|
|
15
|
+
private _outlineDiv?;
|
|
16
|
+
private _mainController;
|
|
17
|
+
constructor(controller: LayoutController);
|
|
18
|
+
addTabWithDragAndDrop(event: DragEvent, json: IJsonTabNode, onDrop?: (node?: Node, event?: React.DragEvent<HTMLElement>) => void): void;
|
|
19
|
+
moveTabWithDragAndDrop(event: DragEvent, node: (TabNode | TabSetNode)): void;
|
|
20
|
+
setDragNode: (event: DragEvent, node: Node & IDraggable) => void;
|
|
21
|
+
setDragComponent(event: DragEvent, component: React.ReactNode, x: number, y: number): void;
|
|
22
|
+
updateActive(event: React.DragEvent<HTMLElement>): void;
|
|
23
|
+
setActive(active: boolean, event: React.DragEvent<HTMLElement>): void;
|
|
24
|
+
onDragEnterRaw: (event: React.DragEvent<HTMLElement>) => void;
|
|
25
|
+
onDragLeaveRaw: (event: React.DragEvent<HTMLElement>) => void;
|
|
26
|
+
clearDragMain(): void;
|
|
27
|
+
clearDragLocal(): void;
|
|
28
|
+
clearDragLocalVisuals(): void;
|
|
29
|
+
onDragEnter: (event: React.DragEvent<HTMLElement>) => void;
|
|
30
|
+
onDragOver: (event: React.DragEvent<HTMLElement>) => void;
|
|
31
|
+
onDragLeave: (event: React.DragEvent<HTMLElement>) => void;
|
|
32
|
+
onDrop: (event: React.DragEvent<HTMLElement>) => void;
|
|
33
|
+
getDragEnterCount(): number;
|
|
34
|
+
isDragging(): boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare enum DragSource {
|
|
37
|
+
Internal = "internal",
|
|
38
|
+
External = "external",
|
|
39
|
+
Add = "add"
|
|
40
|
+
}
|
|
41
|
+
export declare class DragState {
|
|
42
|
+
readonly mainLayoutController: LayoutController;
|
|
43
|
+
readonly dragSource: DragSource;
|
|
44
|
+
readonly dragNode: Node & IDraggable | undefined;
|
|
45
|
+
readonly dragJson: IJsonTabNode | undefined;
|
|
46
|
+
readonly fnNewNodeDropped: ((node?: Node, event?: React.DragEvent<HTMLElement>) => void) | undefined;
|
|
47
|
+
constructor(mainLayoutController: LayoutController, dragSource: DragSource, dragNode: Node & IDraggable | undefined, dragJson: IJsonTabNode | undefined, fnNewNodeDropped: ((node?: Node, event?: React.DragEvent<HTMLElement>) => void) | undefined);
|
|
48
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LayoutController } from "./LayoutInternal";
|
|
2
|
+
export interface IFloatingWindowContainerProps {
|
|
3
|
+
controller: LayoutController;
|
|
4
|
+
}
|
|
5
|
+
export declare const FloatingWindowContainer: ({ controller }: IFloatingWindowContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DockLocation } from "../../model/DockLocation";
|
|
3
|
+
import { I18nLabel } from "../I18nLabel";
|
|
4
|
+
import { Rect } from "../../model/Rect";
|
|
5
|
+
import { Action } from "../../model/Actions";
|
|
6
|
+
import { BorderNode } from "../../model/BorderNode";
|
|
7
|
+
import { IJsonTabNode } from "../../model/IJsonModel";
|
|
8
|
+
import { Model } from "../../model/Model";
|
|
9
|
+
import { Node } from "../../model/Node";
|
|
10
|
+
import { TabNode } from "../../model/TabNode";
|
|
11
|
+
import { TabSetNode } from "../../model/TabSetNode";
|
|
12
|
+
import { Layout as ModelLayout } from "../../model/Layout";
|
|
13
|
+
import { DragDropManager } from "./DragDropManager";
|
|
14
|
+
import { ITabSetRenderValues, ITabRenderValues, IIcons } from "./LayoutTypes";
|
|
15
|
+
import { ILayoutProps } from "../Layout";
|
|
16
|
+
/** @internal */
|
|
17
|
+
export interface ILayoutInternalProps extends ILayoutProps {
|
|
18
|
+
parentRedrawRevision: number;
|
|
19
|
+
layoutId?: string;
|
|
20
|
+
mainLayoutController?: LayoutController;
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
export interface ILayoutInternalState {
|
|
24
|
+
rect: Rect;
|
|
25
|
+
editingTab?: TabNode;
|
|
26
|
+
portal?: React.ReactPortal;
|
|
27
|
+
showEdges: boolean;
|
|
28
|
+
showOverlay: boolean;
|
|
29
|
+
calculatedBorderBarSize: number;
|
|
30
|
+
layoutRedrawRevision: number;
|
|
31
|
+
fullRedrawRevision: number;
|
|
32
|
+
showHiddenBorder: DockLocation;
|
|
33
|
+
splitterSize: number;
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const LayoutInternal: React.ForwardRefExoticComponent<ILayoutInternalProps & React.RefAttributes<LayoutController>>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare class LayoutController {
|
|
39
|
+
private static Windows;
|
|
40
|
+
private _props;
|
|
41
|
+
private _state;
|
|
42
|
+
private _setState;
|
|
43
|
+
private _layoutRef;
|
|
44
|
+
private _moveablesRef;
|
|
45
|
+
private _findBorderBarSizeRef;
|
|
46
|
+
private _mainRef;
|
|
47
|
+
private _orderedTabIds;
|
|
48
|
+
private _orderedTabMoveableIds;
|
|
49
|
+
private _moveableElementMap;
|
|
50
|
+
private _currentDocument?;
|
|
51
|
+
private _currentWindow?;
|
|
52
|
+
private _supportsPopout;
|
|
53
|
+
private _popoutURL;
|
|
54
|
+
private _icons;
|
|
55
|
+
private _dragDropManager;
|
|
56
|
+
private _layoutId;
|
|
57
|
+
private _layout;
|
|
58
|
+
private _mainController?;
|
|
59
|
+
private _popoutWindowName;
|
|
60
|
+
private _cachedLayoutDOMRect;
|
|
61
|
+
private _reLayout;
|
|
62
|
+
constructor(props: ILayoutInternalProps, state: ILayoutInternalState, setState: (update: Partial<ILayoutInternalState> | ((prevState: ILayoutInternalState, props: ILayoutInternalProps) => Partial<ILayoutInternalState>)) => void);
|
|
63
|
+
renderLayout(): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
renderTabContainers(): Map<string, React.ReactNode>;
|
|
65
|
+
renderTabContents(): Map<string, React.ReactNode>;
|
|
66
|
+
renderMetricsElements(): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
renderTabStamps(): React.ReactNode[];
|
|
68
|
+
createMoveableDivs(): void;
|
|
69
|
+
getMoveablesDiv(): HTMLDivElement | null;
|
|
70
|
+
getMoveableElement(id: string): HTMLElement;
|
|
71
|
+
tidyMoveablesMap(): void;
|
|
72
|
+
redrawLayout(): void;
|
|
73
|
+
redrawLayoutAndTabContent(isLayoutRevision?: boolean): void;
|
|
74
|
+
doAction(action: Action): Node | undefined;
|
|
75
|
+
updateRect: () => void;
|
|
76
|
+
onModelChange: (action: Action) => void;
|
|
77
|
+
reorderComponents(components: Map<string, React.ReactNode>, ids: string[]): React.ReactNode[];
|
|
78
|
+
checkForBorderToShow(x: number, y: number): void;
|
|
79
|
+
updateLayoutMetrics: () => void;
|
|
80
|
+
addTabWithDragAndDrop(event: DragEvent, json: IJsonTabNode, onDrop?: (node?: Node, event?: React.DragEvent<HTMLElement>) => void): void;
|
|
81
|
+
moveTabWithDragAndDrop(event: DragEvent, node: (TabNode | TabSetNode)): void;
|
|
82
|
+
setDragComponent(event: DragEvent, component: React.ReactNode, x: number, y: number): void;
|
|
83
|
+
getProps(): ILayoutInternalProps;
|
|
84
|
+
setProps(value: ILayoutInternalProps): void;
|
|
85
|
+
getState(): ILayoutInternalState;
|
|
86
|
+
setStateRaw(value: ILayoutInternalState): void;
|
|
87
|
+
setState(update: Partial<ILayoutInternalState> | ((prevState: ILayoutInternalState, props: ILayoutInternalProps) => Partial<ILayoutInternalState>)): void;
|
|
88
|
+
setSetState(value: (update: Partial<ILayoutInternalState> | ((prevState: ILayoutInternalState, props: ILayoutInternalProps) => Partial<ILayoutInternalState>)) => void): void;
|
|
89
|
+
getLayoutRef(): React.RefObject<HTMLDivElement | null>;
|
|
90
|
+
setLayoutRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
91
|
+
getMoveablesRef(): React.RefObject<HTMLDivElement | null>;
|
|
92
|
+
setMoveablesRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
93
|
+
getFindBorderBarSizeRef(): React.RefObject<HTMLDivElement | null>;
|
|
94
|
+
setFindBorderBarSizeRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
95
|
+
getMainRef(): React.RefObject<HTMLDivElement | null>;
|
|
96
|
+
setMainRef(value: React.RefObject<HTMLDivElement | null>): void;
|
|
97
|
+
getOrderedTabIds(): string[];
|
|
98
|
+
getOrderedTabMoveableIds(): string[];
|
|
99
|
+
getCurrentDocument(): Document | undefined;
|
|
100
|
+
setCurrentDocument(value: Document | undefined): void;
|
|
101
|
+
getCurrentWindow(): Window | undefined;
|
|
102
|
+
setCurrentWindow(value: Window | undefined): void;
|
|
103
|
+
getWindowId(): string | undefined;
|
|
104
|
+
isSupportsPopout(): boolean;
|
|
105
|
+
getPopoutURL(): string;
|
|
106
|
+
getIcons(): IIcons;
|
|
107
|
+
getDragDropManager(): DragDropManager;
|
|
108
|
+
getLayoutId(): string;
|
|
109
|
+
getLayout(): ModelLayout;
|
|
110
|
+
setLayout(value: ModelLayout): void;
|
|
111
|
+
getMainController(): LayoutController | undefined;
|
|
112
|
+
isMainLayout(): boolean;
|
|
113
|
+
getPopoutWindowName(): string;
|
|
114
|
+
isReLayout(): boolean;
|
|
115
|
+
setReLayout(value: boolean): void;
|
|
116
|
+
getBoundingClientRect(div: HTMLElement): Rect;
|
|
117
|
+
getMoveableContainer(): HTMLDivElement | null;
|
|
118
|
+
getClassName: (defaultClassName: string) => string;
|
|
119
|
+
getDomRect(): Rect;
|
|
120
|
+
getRootDiv(): HTMLDivElement | null;
|
|
121
|
+
getMainElement(): HTMLDivElement | null;
|
|
122
|
+
getFactory(): (node: TabNode) => React.ReactNode;
|
|
123
|
+
isRealtimeResize(): boolean;
|
|
124
|
+
setEditingTab(tabNode?: TabNode): void;
|
|
125
|
+
getEditingTab(): TabNode | undefined;
|
|
126
|
+
getModel(): Model;
|
|
127
|
+
getTabDragSpeed(): number;
|
|
128
|
+
onCloseLayout: (layout: ModelLayout) => void;
|
|
129
|
+
onSetWindow: (layout: ModelLayout, window: Window) => void;
|
|
130
|
+
getScreenRect(inRect: Rect): Rect;
|
|
131
|
+
getRelativeRect(inRect: Rect): Rect;
|
|
132
|
+
moveWindowToFront(layoutId: string): void;
|
|
133
|
+
addTabToTabSet(tabsetId: string, json: IJsonTabNode): TabNode | undefined;
|
|
134
|
+
addTabToActiveTabSet(json: IJsonTabNode): TabNode | undefined;
|
|
135
|
+
showControlInPortal: (control: React.ReactNode, element: HTMLElement) => void;
|
|
136
|
+
hideControlInPortal: () => void;
|
|
137
|
+
maximize(tabsetNode: TabSetNode): void;
|
|
138
|
+
customizeTab(tabNode: TabNode, renderValues: ITabRenderValues): void;
|
|
139
|
+
customizeTabSet(tabSetNode: TabSetNode | BorderNode, renderValues: ITabSetRenderValues): void;
|
|
140
|
+
i18nName(id: I18nLabel, param?: string): string;
|
|
141
|
+
getShowOverflowMenu(): import("./LayoutTypes").ShowOverflowMenuCallback | undefined;
|
|
142
|
+
getTabSetPlaceHolderCallback(): import("./LayoutTypes").TabSetPlaceHolderCallback | undefined;
|
|
143
|
+
showContextMenu(node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>): void;
|
|
144
|
+
auxMouseClick(node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>): void;
|
|
145
|
+
showOverlay(show: boolean): void;
|
|
146
|
+
showOverlayOnAllWindows(show: boolean): void;
|
|
147
|
+
}
|
|
148
|
+
/** @internal */
|
|
149
|
+
export declare const edgeRectLength = 100;
|
|
150
|
+
/** @internal */
|
|
151
|
+
export declare const edgeRectWidth = 10;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { BorderNode } from "../../model/BorderNode";
|
|
3
|
+
import { IJsonTabNode } from "../../model/IJsonModel";
|
|
4
|
+
import { Node } from "../../model/Node";
|
|
5
|
+
import { TabNode } from "../../model/TabNode";
|
|
6
|
+
import { TabSetNode } from "../../model/TabSetNode";
|
|
7
|
+
export type DragRectRenderCallback = (content: React.ReactNode | undefined, node?: Node, json?: IJsonTabNode) => React.ReactNode | undefined;
|
|
8
|
+
export type NodeMouseEvent = (node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
9
|
+
export type ShowOverflowMenuCallback = (node: TabSetNode | BorderNode, mouseEvent: React.MouseEvent<HTMLElement, MouseEvent>, items: {
|
|
10
|
+
index: number;
|
|
11
|
+
node: TabNode;
|
|
12
|
+
}[], onSelect: (item: {
|
|
13
|
+
index: number;
|
|
14
|
+
node: TabNode;
|
|
15
|
+
}) => void) => void;
|
|
16
|
+
export type TabSetPlaceHolderCallback = (node: TabSetNode) => React.ReactNode;
|
|
17
|
+
export interface ITabSetRenderValues {
|
|
18
|
+
/** a component to be placed before the tabs */
|
|
19
|
+
leading: React.ReactNode;
|
|
20
|
+
/** components that will be added after the tabs */
|
|
21
|
+
stickyButtons: React.ReactNode[];
|
|
22
|
+
/** components that will be added at the end of the tabset */
|
|
23
|
+
buttons: React.ReactNode[];
|
|
24
|
+
/** position to insert overflow button within [...stickyButtons, ...buttons]
|
|
25
|
+
* if left undefined position will be after the sticky buttons (if any)
|
|
26
|
+
*/
|
|
27
|
+
overflowPosition: number | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface ITabRenderValues {
|
|
30
|
+
/** the icon or other leading component */
|
|
31
|
+
leading: React.ReactNode;
|
|
32
|
+
/** the main tab text/component */
|
|
33
|
+
content: React.ReactNode;
|
|
34
|
+
/** a set of react components to add to the tab after the content */
|
|
35
|
+
buttons: React.ReactNode[];
|
|
36
|
+
}
|
|
37
|
+
export interface IIcons {
|
|
38
|
+
close?: (React.ReactNode | ((tabNode: TabNode) => React.ReactNode));
|
|
39
|
+
closeTabset?: (React.ReactNode | ((tabSetNode: TabSetNode) => React.ReactNode));
|
|
40
|
+
popout?: (React.ReactNode | ((tabNode: TabNode) => React.ReactNode));
|
|
41
|
+
popoutFloat?: (React.ReactNode | ((tabNode: TabNode) => React.ReactNode));
|
|
42
|
+
maximize?: (React.ReactNode | ((tabSetNode: TabSetNode) => React.ReactNode));
|
|
43
|
+
restore?: (React.ReactNode | ((tabSetNode: TabSetNode) => React.ReactNode));
|
|
44
|
+
more?: (React.ReactNode | ((tabSetNode: (TabSetNode | BorderNode), hiddenTabs: {
|
|
45
|
+
node: TabNode;
|
|
46
|
+
index: number;
|
|
47
|
+
}[]) => React.ReactNode));
|
|
48
|
+
edgeArrow?: React.ReactNode;
|
|
49
|
+
activeTabset?: (React.ReactNode | ((tabSetNode: TabSetNode) => React.ReactNode));
|
|
50
|
+
closeFloatPopout?: (React.ReactNode | (() => React.ReactNode));
|
|
51
|
+
}
|
package/types/Attribute.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** @internal */
|
|
2
|
-
export declare class Attribute {
|
|
3
|
-
static NUMBER: string;
|
|
4
|
-
static STRING: string;
|
|
5
|
-
static BOOLEAN: string;
|
|
6
|
-
name: string;
|
|
7
|
-
alias: string | undefined;
|
|
8
|
-
modelName?: string;
|
|
9
|
-
pairedAttr?: Attribute;
|
|
10
|
-
pairedType?: string;
|
|
11
|
-
defaultValue: any;
|
|
12
|
-
alwaysWriteJson?: boolean;
|
|
13
|
-
type?: string;
|
|
14
|
-
required: boolean;
|
|
15
|
-
fixed: boolean;
|
|
16
|
-
description?: string;
|
|
17
|
-
constructor(name: string, modelName: string | undefined, defaultValue: any, alwaysWriteJson?: boolean);
|
|
18
|
-
setType(value: string): this;
|
|
19
|
-
setAlias(value: string): this;
|
|
20
|
-
setDescription(value: string): void;
|
|
21
|
-
setRequired(): this;
|
|
22
|
-
setFixed(): this;
|
|
23
|
-
setpairedAttr(value: Attribute): void;
|
|
24
|
-
setPairedType(value: string): void;
|
|
25
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Attribute } from "./Attribute";
|
|
2
|
-
/** @internal */
|
|
3
|
-
export declare class AttributeDefinitions {
|
|
4
|
-
attributes: Attribute[];
|
|
5
|
-
nameToAttribute: Map<string, Attribute>;
|
|
6
|
-
constructor();
|
|
7
|
-
addWithAll(name: string, modelName: string | undefined, defaultValue: any, alwaysWriteJson?: boolean): Attribute;
|
|
8
|
-
addInherited(name: string, modelName: string): Attribute;
|
|
9
|
-
add(name: string, defaultValue: any, alwaysWriteJson?: boolean): Attribute;
|
|
10
|
-
getAttributes(): Attribute[];
|
|
11
|
-
getModelName(name: string): string | undefined;
|
|
12
|
-
toJson(jsonObj: any, obj: any): void;
|
|
13
|
-
fromJson(jsonObj: any, obj: any): void;
|
|
14
|
-
update(jsonObj: any, obj: any): void;
|
|
15
|
-
setDefaults(obj: any): void;
|
|
16
|
-
pairAttributes(type: string, childAttributes: AttributeDefinitions): void;
|
|
17
|
-
toTypescriptInterface(name: string, parentAttributes: AttributeDefinitions | undefined): string;
|
|
18
|
-
}
|
package/types/model/Action.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Rect } from "../Rect";
|
|
2
|
-
import { IJsonPopout } from "./IJsonModel";
|
|
3
|
-
import { Model } from "./Model";
|
|
4
|
-
import { RowNode } from "./RowNode";
|
|
5
|
-
import { Node } from "./Node";
|
|
6
|
-
import { TabSetNode } from "./TabSetNode";
|
|
7
|
-
import { LayoutInternal } from "../view/Layout";
|
|
8
|
-
export declare class LayoutWindow {
|
|
9
|
-
private _windowId;
|
|
10
|
-
private _layout;
|
|
11
|
-
private _rect;
|
|
12
|
-
private _window?;
|
|
13
|
-
private _root?;
|
|
14
|
-
private _maximizedTabSet?;
|
|
15
|
-
private _activeTabSet?;
|
|
16
|
-
private _toScreenRectFunction;
|
|
17
|
-
constructor(windowId: string, rect: Rect);
|
|
18
|
-
visitNodes(fn: (node: Node, level: number) => void): void;
|
|
19
|
-
get windowId(): string;
|
|
20
|
-
get rect(): Rect;
|
|
21
|
-
get layout(): LayoutInternal | undefined;
|
|
22
|
-
get window(): Window | undefined;
|
|
23
|
-
get root(): RowNode | undefined;
|
|
24
|
-
get maximizedTabSet(): TabSetNode | undefined;
|
|
25
|
-
get activeTabSet(): TabSetNode | undefined;
|
|
26
|
-
/** @internal */
|
|
27
|
-
set rect(value: Rect);
|
|
28
|
-
/** @internal */
|
|
29
|
-
set layout(value: LayoutInternal);
|
|
30
|
-
/** @internal */
|
|
31
|
-
set window(value: Window | undefined);
|
|
32
|
-
/** @internal */
|
|
33
|
-
set root(value: RowNode | undefined);
|
|
34
|
-
/** @internal */
|
|
35
|
-
set maximizedTabSet(value: TabSetNode | undefined);
|
|
36
|
-
/** @internal */
|
|
37
|
-
set activeTabSet(value: TabSetNode | undefined);
|
|
38
|
-
/** @internal */
|
|
39
|
-
get toScreenRectFunction(): (rect: Rect) => Rect;
|
|
40
|
-
/** @internal */
|
|
41
|
-
set toScreenRectFunction(value: (rect: Rect) => Rect);
|
|
42
|
-
toJson(): IJsonPopout;
|
|
43
|
-
static fromJson(windowJson: IJsonPopout, model: Model, windowId: string): LayoutWindow;
|
|
44
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Rect } from "../Rect";
|
|
3
|
-
import { LayoutInternal } from "./Layout";
|
|
4
|
-
import { TabNode } from "../model/TabNode";
|
|
5
|
-
export interface ISizeTrackerProps {
|
|
6
|
-
layout: LayoutInternal;
|
|
7
|
-
node: TabNode;
|
|
8
|
-
rect: Rect;
|
|
9
|
-
visible: boolean;
|
|
10
|
-
forceRevision: number;
|
|
11
|
-
tabsRevision: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const SizeTracker: React.MemoExoticComponent<({ layout, node }: ISizeTrackerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
File without changes
|
|
File without changes
|