flexlayout-react 0.7.15 → 0.8.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/ChangeLog.txt +28 -0
- package/README.md +157 -330
- package/Screenshot_light.png +0 -0
- package/Screenshot_rounded.png +0 -0
- package/declarations/Attribute.d.ts +1 -1
- package/declarations/AttributeDefinitions.d.ts +1 -1
- package/declarations/DockLocation.d.ts +12 -12
- package/declarations/DropInfo.d.ts +12 -12
- package/declarations/I18nLabel.d.ts +12 -14
- package/declarations/Orientation.d.ts +7 -7
- package/declarations/PopupMenu.d.ts +1 -1
- package/declarations/Rect.d.ts +41 -28
- package/declarations/Types.d.ts +95 -79
- package/declarations/examples/demo/Utils.d.ts +4 -0
- package/declarations/index.d.ts +21 -22
- package/declarations/model/Action.d.ts +5 -5
- package/declarations/model/Actions.d.ts +127 -110
- package/declarations/model/BorderNode.d.ts +30 -34
- package/declarations/model/BorderSet.d.ts +3 -4
- package/declarations/model/ICloseType.d.ts +5 -5
- package/declarations/model/IDraggable.d.ts +2 -2
- package/declarations/model/IDropTarget.d.ts +2 -2
- package/declarations/model/IJsonModel.d.ts +811 -149
- package/declarations/model/LayoutWindow.d.ts +28 -0
- package/declarations/model/Model.d.ts +91 -86
- package/declarations/model/Node.d.ts +17 -17
- package/declarations/model/RowNode.d.ts +10 -11
- package/declarations/model/TabNode.d.ts +44 -37
- package/declarations/model/TabSetNode.d.ts +44 -41
- package/declarations/model/Utils.d.ts +1 -1
- package/declarations/model/WindowLayout.d.ts +24 -0
- package/declarations/src/Attribute.d.ts +1 -0
- package/declarations/src/AttributeDefinitions.d.ts +1 -0
- package/declarations/src/DockLocation.d.ts +12 -0
- package/declarations/src/DropInfo.d.ts +12 -0
- package/declarations/src/I18nLabel.d.ts +10 -0
- package/declarations/src/Orientation.d.ts +7 -0
- package/declarations/src/PopupMenu.d.ts +1 -0
- package/declarations/src/Rect.d.ts +31 -0
- package/declarations/src/Types.d.ts +92 -0
- package/declarations/src/index.d.ts +20 -0
- package/declarations/src/model/Action.d.ts +5 -0
- package/declarations/src/model/Actions.d.ts +110 -0
- package/declarations/src/model/BorderNode.d.ts +28 -0
- package/declarations/src/model/BorderSet.d.ts +3 -0
- package/declarations/src/model/ICloseType.d.ts +5 -0
- package/declarations/src/model/IDraggable.d.ts +2 -0
- package/declarations/src/model/IDropTarget.d.ts +2 -0
- package/declarations/src/model/IJsonModel.d.ts +153 -0
- package/declarations/src/model/Model.d.ts +98 -0
- package/declarations/src/model/Node.d.ts +16 -0
- package/declarations/src/model/RowNode.d.ts +11 -0
- package/declarations/src/model/TabNode.d.ts +36 -0
- package/declarations/src/model/TabSetNode.d.ts +37 -0
- package/declarations/src/model/Utils.d.ts +1 -0
- package/declarations/src/view/BorderButton.d.ts +1 -0
- package/declarations/src/view/BorderTab.d.ts +2 -0
- package/declarations/src/view/BorderTabSet.d.ts +1 -0
- package/declarations/src/view/DragContainer.d.ts +1 -0
- package/declarations/src/view/ErrorBoundary.d.ts +1 -0
- package/declarations/src/view/FloatingWindow.d.ts +1 -0
- package/declarations/src/view/Icons.d.ts +7 -0
- package/declarations/src/view/Layout.d.ts +113 -0
- package/declarations/src/view/Overlay.d.ts +1 -0
- package/declarations/src/view/PopupMenu.d.ts +1 -0
- package/declarations/src/view/Row.d.ts +1 -0
- package/declarations/src/view/Splitter.d.ts +1 -0
- package/declarations/src/view/Tab.d.ts +1 -0
- package/declarations/src/view/TabButton.d.ts +1 -0
- package/declarations/src/view/TabButtonStamp.d.ts +1 -0
- package/declarations/src/view/TabOverflowHook.d.ts +1 -0
- package/declarations/src/view/TabSet.d.ts +1 -0
- package/declarations/src/view/Utils.d.ts +4 -0
- package/declarations/view/BorderButton.d.ts +1 -1
- package/declarations/view/BorderTab.d.ts +2 -0
- package/declarations/view/BorderTabSet.d.ts +1 -1
- package/declarations/view/DragContainer.d.ts +1 -0
- package/declarations/view/ErrorBoundary.d.ts +1 -1
- package/declarations/view/ExtendedResizeObserver.d.ts +23 -0
- package/declarations/view/FloatingWindow.d.ts +1 -1
- package/declarations/view/Icons.d.ts +8 -7
- package/declarations/view/Layout.d.ts +140 -161
- package/declarations/view/Overlay.d.ts +1 -0
- package/declarations/view/PopoutWindow.d.ts +1 -0
- package/declarations/view/PopupMenu.d.ts +1 -0
- package/declarations/view/Row.d.ts +1 -0
- package/declarations/view/SizeTracker.d.ts +10 -0
- package/declarations/view/Splitter.d.ts +1 -1
- package/declarations/view/Tab.d.ts +1 -1
- package/declarations/view/TabButton.d.ts +1 -1
- package/declarations/view/TabButtonStamp.d.ts +1 -1
- package/declarations/view/TabOverflowHook.d.ts +1 -1
- package/declarations/view/TabSet.d.ts +1 -1
- package/declarations/view/Utils.d.ts +11 -1
- package/dist/bundles/demo.js +232052 -0
- package/dist/bundles/demo.js.map +1 -0
- package/dist/flexlayout.js +122 -92
- package/dist/flexlayout_min.js +1 -1
- package/lib/Attribute.js +42 -31
- package/lib/Attribute.js.map +1 -1
- package/lib/AttributeDefinitions.js +131 -108
- package/lib/AttributeDefinitions.js.map +1 -1
- package/lib/DockLocation.js +120 -124
- package/lib/DockLocation.js.map +1 -1
- package/lib/DropInfo.js +9 -13
- package/lib/DropInfo.js.map +1 -1
- package/lib/I18nLabel.js +13 -18
- package/lib/I18nLabel.js.map +1 -1
- package/lib/Orientation.js +22 -26
- package/lib/Orientation.js.map +1 -1
- package/lib/Rect.js +104 -72
- package/lib/Rect.js.map +1 -1
- package/lib/Types.js +96 -83
- package/lib/Types.js.map +1 -1
- package/lib/index.js +21 -38
- package/lib/index.js.map +1 -1
- package/lib/model/Action.js +6 -10
- package/lib/model/Action.js.map +1 -1
- package/lib/model/Actions.js +169 -155
- package/lib/model/Actions.js.map +1 -1
- package/lib/model/BorderNode.js +385 -406
- package/lib/model/BorderNode.js.map +1 -1
- package/lib/model/BorderSet.js +66 -121
- package/lib/model/BorderSet.js.map +1 -1
- package/lib/model/ICloseType.js +6 -9
- package/lib/model/ICloseType.js.map +1 -1
- package/lib/model/IDraggable.js +1 -2
- package/lib/model/IDropTarget.js +1 -2
- package/lib/model/IJsonModel.js +1 -2
- package/lib/model/LayoutWindow.js +83 -0
- package/lib/model/LayoutWindow.js.map +1 -0
- package/lib/model/Model.js +614 -496
- package/lib/model/Model.js.map +1 -1
- package/lib/model/Node.js +217 -228
- package/lib/model/Node.js.map +1 -1
- package/lib/model/RowNode.js +491 -504
- package/lib/model/RowNode.js.map +1 -1
- package/lib/model/TabNode.js +289 -184
- package/lib/model/TabNode.js.map +1 -1
- package/lib/model/TabSetNode.js +459 -446
- package/lib/model/TabSetNode.js.map +1 -1
- package/lib/model/Utils.js +47 -82
- package/lib/model/Utils.js.map +1 -1
- package/lib/view/BorderButton.js +129 -138
- package/lib/view/BorderButton.js.map +1 -1
- package/lib/view/BorderTab.js +47 -0
- package/lib/view/BorderTab.js.map +1 -0
- package/lib/view/BorderTabSet.js +134 -128
- package/lib/view/BorderTabSet.js.map +1 -1
- package/lib/view/DragContainer.js +16 -0
- package/lib/view/DragContainer.js.map +1 -0
- package/lib/view/ErrorBoundary.js +23 -27
- package/lib/view/ErrorBoundary.js.map +1 -1
- package/lib/view/Icons.js +40 -45
- package/lib/view/Icons.js.map +1 -1
- package/lib/view/Layout.js +919 -907
- package/lib/view/Layout.js.map +1 -1
- package/lib/view/Overlay.js +9 -0
- package/lib/view/Overlay.js.map +1 -0
- package/lib/view/PopoutWindow.js +129 -0
- package/lib/view/PopoutWindow.js.map +1 -0
- package/lib/view/PopupMenu.js +71 -0
- package/lib/view/PopupMenu.js.map +1 -0
- package/lib/view/Row.js +45 -0
- package/lib/view/Row.js.map +1 -0
- package/lib/view/SizeTracker.js +11 -0
- package/lib/view/SizeTracker.js.map +1 -0
- package/lib/view/Splitter.js +191 -147
- package/lib/view/Splitter.js.map +1 -1
- package/lib/view/Tab.js +86 -60
- package/lib/view/Tab.js.map +1 -1
- package/lib/view/TabButton.js +127 -135
- package/lib/view/TabButton.js.map +1 -1
- package/lib/view/TabButtonStamp.js +16 -21
- package/lib/view/TabButtonStamp.js.map +1 -1
- package/lib/view/TabOverflowHook.js +150 -149
- package/lib/view/TabOverflowHook.js.map +1 -1
- package/lib/view/TabSet.js +272 -234
- package/lib/view/TabSet.js.map +1 -1
- package/lib/view/Utils.js +126 -68
- package/lib/view/Utils.js.map +1 -1
- package/package.json +36 -30
- package/src/Attribute.ts +23 -0
- package/src/AttributeDefinitions.ts +38 -15
- package/src/DockLocation.ts +13 -13
- package/src/I18nLabel.ts +7 -9
- package/src/Rect.ts +53 -1
- package/src/Types.ts +16 -0
- package/src/index.ts +1 -2
- package/src/model/Actions.ts +49 -29
- package/src/model/BorderNode.ts +208 -214
- package/src/model/BorderSet.ts +42 -91
- package/src/model/IJsonModel.ts +883 -103
- package/src/model/LayoutWindow.ts +121 -0
- package/src/model/Model.ts +488 -366
- package/src/model/Node.ts +98 -111
- package/src/model/RowNode.ts +323 -319
- package/src/model/TabNode.ts +294 -110
- package/src/model/TabSetNode.ts +303 -242
- package/src/model/Utils.ts +6 -32
- package/src/view/BorderButton.tsx +36 -52
- package/src/view/BorderTab.tsx +70 -0
- package/src/view/BorderTabSet.tsx +64 -52
- package/src/view/DragContainer.tsx +32 -0
- package/src/view/Icons.tsx +6 -0
- package/src/view/Layout.tsx +1053 -1046
- package/src/view/Overlay.tsx +22 -0
- package/src/view/PopoutWindow.tsx +152 -0
- package/src/{PopupMenu.tsx → view/PopupMenu.tsx} +36 -31
- package/src/view/Row.tsx +68 -0
- package/src/view/SizeTracker.tsx +20 -0
- package/src/view/Splitter.tsx +167 -112
- package/src/view/Tab.tsx +76 -42
- package/src/view/TabButton.tsx +39 -54
- package/src/view/TabButtonStamp.tsx +5 -9
- package/src/view/TabOverflowHook.tsx +14 -9
- package/src/view/TabSet.tsx +221 -176
- package/src/view/Utils.tsx +119 -39
- package/style/_base.scss +140 -34
- package/style/dark.css +140 -35
- package/style/dark.css.map +1 -1
- package/style/dark.scss +3 -1
- package/style/gray.css +139 -34
- package/style/gray.css.map +1 -1
- package/style/gray.scss +2 -0
- package/style/light.css +141 -36
- package/style/light.css.map +1 -1
- package/style/light.scss +4 -2
- package/style/rounded.css +697 -0
- package/style/rounded.css.map +1 -0
- package/style/rounded.scss +194 -0
- package/style/underline.css +139 -34
- package/style/underline.css.map +1 -1
- package/style/underline.scss +2 -0
- package/cypress.config.ts +0 -16
- package/lib/DragDrop.js +0 -316
- package/lib/DragDrop.js.map +0 -1
- package/lib/PopupMenu.js +0 -68
- package/lib/PopupMenu.js.map +0 -1
- package/lib/model/SplitterNode.js +0 -72
- package/lib/model/SplitterNode.js.map +0 -1
- package/lib/view/FloatingWindow.js +0 -123
- package/lib/view/FloatingWindow.js.map +0 -1
- package/lib/view/FloatingWindowTab.js +0 -19
- package/lib/view/FloatingWindowTab.js.map +0 -1
- package/lib/view/TabFloating.js +0 -66
- package/lib/view/TabFloating.js.map +0 -1
- package/src/DragDrop.ts +0 -392
- package/src/model/SplitterNode.ts +0 -78
- package/src/view/FloatingWindow.tsx +0 -140
- package/src/view/FloatingWindowTab.tsx +0 -29
- package/src/view/TabFloating.tsx +0 -101
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
toJson(): IJsonPopout;
|
|
27
|
+
static fromJson(windowJson: IJsonPopout, model: Model, windowId: string): LayoutWindow;
|
|
28
|
+
}
|
|
@@ -1,86 +1,91 @@
|
|
|
1
|
-
import { DropInfo } from "../DropInfo";
|
|
2
|
-
import { Action } from "./Action";
|
|
3
|
-
import { BorderSet } from "./BorderSet";
|
|
4
|
-
import { IJsonModel, ITabSetAttributes } from "./IJsonModel";
|
|
5
|
-
import { Node } from "./Node";
|
|
6
|
-
import { RowNode } from "./RowNode";
|
|
7
|
-
import { TabNode } from "./TabNode";
|
|
8
|
-
import { TabSetNode } from "./TabSetNode";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
import { DropInfo } from "../DropInfo";
|
|
2
|
+
import { Action } from "./Action";
|
|
3
|
+
import { BorderSet } from "./BorderSet";
|
|
4
|
+
import { IJsonModel, ITabSetAttributes } from "./IJsonModel";
|
|
5
|
+
import { Node } from "./Node";
|
|
6
|
+
import { RowNode } from "./RowNode";
|
|
7
|
+
import { TabNode } from "./TabNode";
|
|
8
|
+
import { TabSetNode } from "./TabSetNode";
|
|
9
|
+
import { LayoutWindow } from "./LayoutWindow";
|
|
10
|
+
/**
|
|
11
|
+
* Class containing the Tree of Nodes used by the FlexLayout component
|
|
12
|
+
*/
|
|
13
|
+
export declare class Model {
|
|
14
|
+
static MAIN_WINDOW_ID: string;
|
|
15
|
+
/**
|
|
16
|
+
* Update the node tree by performing the given action,
|
|
17
|
+
* Actions should be generated via static methods on the Actions class
|
|
18
|
+
* @param action the action to perform
|
|
19
|
+
* @returns added Node for Actions.addNode, windowId for createWindow
|
|
20
|
+
*/
|
|
21
|
+
doAction(action: Action): any;
|
|
22
|
+
/**
|
|
23
|
+
* Get the currently active tabset node
|
|
24
|
+
*/
|
|
25
|
+
getActiveTabset(windowId?: string): TabSetNode | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Get the currently maximized tabset node
|
|
28
|
+
*/
|
|
29
|
+
getMaximizedTabset(windowId?: string): TabSetNode | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the root RowNode of the model
|
|
32
|
+
* @returns {RowNode}
|
|
33
|
+
*/
|
|
34
|
+
getRoot(windowId?: string): RowNode;
|
|
35
|
+
isRootOrientationVertical(): boolean;
|
|
36
|
+
isEnableRotateBorderIcons(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Gets the
|
|
39
|
+
* @returns {BorderSet|*}
|
|
40
|
+
*/
|
|
41
|
+
getBorderSet(): BorderSet;
|
|
42
|
+
getwindowsMap(): Map<string, LayoutWindow>;
|
|
43
|
+
/**
|
|
44
|
+
* Visits all the nodes in the model and calls the given function for each
|
|
45
|
+
* @param fn a function that takes visited node and a integer level as parameters
|
|
46
|
+
*/
|
|
47
|
+
visitNodes(fn: (node: Node, level: number) => void): void;
|
|
48
|
+
visitWindowNodes(windowId: string, fn: (node: Node, level: number) => void): void;
|
|
49
|
+
/**
|
|
50
|
+
* Gets a node by its id
|
|
51
|
+
* @param id the id to find
|
|
52
|
+
*/
|
|
53
|
+
getNodeById(id: string): Node | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Finds the first/top left tab set of the given node.
|
|
56
|
+
* @param node The top node you want to begin searching from, deafults to the root node
|
|
57
|
+
* @returns The first Tab Set
|
|
58
|
+
*/
|
|
59
|
+
getFirstTabSet(node?: Node): TabSetNode;
|
|
60
|
+
/**
|
|
61
|
+
* Loads the model from the given json object
|
|
62
|
+
* @param json the json model to load
|
|
63
|
+
* @returns {Model} a new Model object
|
|
64
|
+
*/
|
|
65
|
+
static fromJson(json: IJsonModel): Model;
|
|
66
|
+
/**
|
|
67
|
+
* Converts the model to a json object
|
|
68
|
+
* @returns {IJsonModel} json object that represents this model
|
|
69
|
+
*/
|
|
70
|
+
toJson(): IJsonModel;
|
|
71
|
+
getSplitterSize(): number;
|
|
72
|
+
getSplitterExtra(): number;
|
|
73
|
+
isEnableEdgeDock(): boolean;
|
|
74
|
+
isSplitterEnableHandle(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Sets a function to allow/deny dropping a node
|
|
77
|
+
* @param onAllowDrop function that takes the drag node and DropInfo and returns true if the drop is allowed
|
|
78
|
+
*/
|
|
79
|
+
setOnAllowDrop(onAllowDrop: (dragNode: Node, dropInfo: DropInfo) => boolean): void;
|
|
80
|
+
/**
|
|
81
|
+
* set callback called when a new TabSet is created.
|
|
82
|
+
* The tabNode can be undefined if it's the auto created first tabset in the root row (when the last
|
|
83
|
+
* tab is deleted, the root tabset can be recreated)
|
|
84
|
+
* @param onCreateTabSet
|
|
85
|
+
*/
|
|
86
|
+
setOnCreateTabSet(onCreateTabSet: (tabNode?: TabNode) => ITabSetAttributes): void;
|
|
87
|
+
addChangeListener(listener: ((action: Action) => void)): void;
|
|
88
|
+
removeChangeListener(listener: ((action: Action) => void)): void;
|
|
89
|
+
toString(): string;
|
|
90
|
+
static toTypescriptInterfaces(): void;
|
|
91
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Orientation } from "../Orientation";
|
|
2
|
-
import { Rect } from "../Rect";
|
|
3
|
-
import { IJsonBorderNode, IJsonRowNode, IJsonTabNode, IJsonTabSetNode } from "./IJsonModel";
|
|
4
|
-
import { Model } from "./Model";
|
|
5
|
-
export declare abstract class Node {
|
|
6
|
-
getId(): string;
|
|
7
|
-
getModel(): Model;
|
|
8
|
-
getType(): string;
|
|
9
|
-
getParent(): Node | undefined;
|
|
10
|
-
getChildren(): Node[];
|
|
11
|
-
getRect(): Rect;
|
|
12
|
-
|
|
13
|
-
getOrientation(): Orientation;
|
|
14
|
-
setEventListener(event: string, callback: (params: any) => void): void;
|
|
15
|
-
removeEventListener(event: string): void;
|
|
16
|
-
abstract toJson(): IJsonRowNode | IJsonBorderNode | IJsonTabSetNode | IJsonTabNode | undefined;
|
|
17
|
-
}
|
|
1
|
+
import { Orientation } from "../Orientation";
|
|
2
|
+
import { Rect } from "../Rect";
|
|
3
|
+
import { IJsonBorderNode, IJsonRowNode, IJsonTabNode, IJsonTabSetNode } from "./IJsonModel";
|
|
4
|
+
import { Model } from "./Model";
|
|
5
|
+
export declare abstract class Node {
|
|
6
|
+
getId(): string;
|
|
7
|
+
getModel(): Model;
|
|
8
|
+
getType(): string;
|
|
9
|
+
getParent(): Node | undefined;
|
|
10
|
+
getChildren(): Node[];
|
|
11
|
+
getRect(): Rect;
|
|
12
|
+
getPath(): string;
|
|
13
|
+
getOrientation(): Orientation;
|
|
14
|
+
setEventListener(event: string, callback: (params: any) => void): void;
|
|
15
|
+
removeEventListener(event: string): void;
|
|
16
|
+
abstract toJson(): IJsonRowNode | IJsonBorderNode | IJsonTabSetNode | IJsonTabNode | undefined;
|
|
17
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IDropTarget } from "./IDropTarget";
|
|
2
|
-
import { IJsonRowNode } from "./IJsonModel";
|
|
3
|
-
import { Node } from "./Node";
|
|
4
|
-
export declare class RowNode extends Node implements IDropTarget {
|
|
5
|
-
static readonly TYPE = "row";
|
|
6
|
-
getWeight(): number;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
import { IDropTarget } from "./IDropTarget";
|
|
2
|
+
import { IJsonRowNode } from "./IJsonModel";
|
|
3
|
+
import { Node } from "./Node";
|
|
4
|
+
export declare class RowNode extends Node implements IDropTarget {
|
|
5
|
+
static readonly TYPE = "row";
|
|
6
|
+
getWeight(): number;
|
|
7
|
+
toJson(): IJsonRowNode;
|
|
8
|
+
setWindowId(windowId: string): void;
|
|
9
|
+
normalizeWeights(): void;
|
|
10
|
+
}
|
|
@@ -1,37 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
getIcon(): string | undefined;
|
|
27
|
-
isEnableClose(): boolean;
|
|
28
|
-
getCloseType(): number;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
import { IDraggable } from "./IDraggable";
|
|
2
|
+
import { IJsonTabNode } from "./IJsonModel";
|
|
3
|
+
import { Node } from "./Node";
|
|
4
|
+
export declare class TabNode extends Node implements IDraggable {
|
|
5
|
+
static readonly TYPE = "tab";
|
|
6
|
+
getName(): string;
|
|
7
|
+
getHelpText(): string | undefined;
|
|
8
|
+
getComponent(): string | undefined;
|
|
9
|
+
getWindowId(): string;
|
|
10
|
+
getWindow(): Window | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the config attribute that can be used to store node specific data that
|
|
13
|
+
* WILL be saved to the json. The config attribute should be changed via the action Actions.updateNodeAttributes rather
|
|
14
|
+
* than directly, for example:
|
|
15
|
+
* this.state.model.doAction(
|
|
16
|
+
* FlexLayout.Actions.updateNodeAttributes(node.getId(), {config:myConfigObject}));
|
|
17
|
+
*/
|
|
18
|
+
getConfig(): any;
|
|
19
|
+
/**
|
|
20
|
+
* Returns an object that can be used to store transient node specific data that will
|
|
21
|
+
* NOT be saved in the json.
|
|
22
|
+
*/
|
|
23
|
+
getExtraData(): Record<string, any>;
|
|
24
|
+
isPoppedOut(): boolean;
|
|
25
|
+
isSelected(): boolean;
|
|
26
|
+
getIcon(): string | undefined;
|
|
27
|
+
isEnableClose(): boolean;
|
|
28
|
+
getCloseType(): number;
|
|
29
|
+
isEnablePopout(): boolean;
|
|
30
|
+
isEnablePopoutIcon(): boolean;
|
|
31
|
+
isEnablePopoutOverlay(): boolean;
|
|
32
|
+
isEnableDrag(): boolean;
|
|
33
|
+
isEnableRename(): boolean;
|
|
34
|
+
isEnableWindowReMount(): boolean;
|
|
35
|
+
getClassName(): string | undefined;
|
|
36
|
+
getContentClassName(): string | undefined;
|
|
37
|
+
getTabSetClassName(): string | undefined;
|
|
38
|
+
isEnableRenderOnDemand(): boolean;
|
|
39
|
+
getMinWidth(): number;
|
|
40
|
+
getMinHeight(): number;
|
|
41
|
+
getMaxWidth(): number;
|
|
42
|
+
getMaxHeight(): number;
|
|
43
|
+
toJson(): IJsonTabNode;
|
|
44
|
+
}
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import { IDraggable } from "./IDraggable";
|
|
2
|
-
import { IDropTarget } from "./IDropTarget";
|
|
3
|
-
import { IJsonTabSetNode } from "./IJsonModel";
|
|
4
|
-
import { Node } from "./Node";
|
|
5
|
-
export declare class TabSetNode extends Node implements IDraggable, IDropTarget {
|
|
6
|
-
static readonly TYPE = "tabset";
|
|
7
|
-
getName(): string | undefined;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { IDraggable } from "./IDraggable";
|
|
2
|
+
import { IDropTarget } from "./IDropTarget";
|
|
3
|
+
import { IJsonTabSetNode } from "./IJsonModel";
|
|
4
|
+
import { Node } from "./Node";
|
|
5
|
+
export declare class TabSetNode extends Node implements IDraggable, IDropTarget {
|
|
6
|
+
static readonly TYPE = "tabset";
|
|
7
|
+
getName(): string | undefined;
|
|
8
|
+
isEnableActiveIcon(): boolean;
|
|
9
|
+
getSelected(): number;
|
|
10
|
+
getSelectedNode(): Node | undefined;
|
|
11
|
+
getWeight(): number;
|
|
12
|
+
getAttrMinWidth(): number;
|
|
13
|
+
getAttrMinHeight(): number;
|
|
14
|
+
getMinWidth(): number;
|
|
15
|
+
getMinHeight(): number;
|
|
16
|
+
getAttrMaxWidth(): number;
|
|
17
|
+
getAttrMaxHeight(): number;
|
|
18
|
+
getMaxWidth(): number;
|
|
19
|
+
getMaxHeight(): number;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the config attribute that can be used to store node specific data that
|
|
22
|
+
* WILL be saved to the json. The config attribute should be changed via the action Actions.updateNodeAttributes rather
|
|
23
|
+
* than directly, for example:
|
|
24
|
+
* this.state.model.doAction(
|
|
25
|
+
* FlexLayout.Actions.updateNodeAttributes(node.getId(), {config:myConfigObject}));
|
|
26
|
+
*/
|
|
27
|
+
getConfig(): any;
|
|
28
|
+
isMaximized(): boolean;
|
|
29
|
+
isActive(): boolean;
|
|
30
|
+
isEnableDeleteWhenEmpty(): boolean;
|
|
31
|
+
isEnableDrop(): boolean;
|
|
32
|
+
isEnableTabWrap(): boolean;
|
|
33
|
+
isEnableDrag(): boolean;
|
|
34
|
+
isEnableDivide(): boolean;
|
|
35
|
+
isEnableMaximize(): boolean;
|
|
36
|
+
isEnableClose(): boolean;
|
|
37
|
+
isEnableSingleTabStretch(): boolean;
|
|
38
|
+
isEnableTabStrip(): boolean;
|
|
39
|
+
isAutoSelectTab(): boolean;
|
|
40
|
+
getClassNameTabStrip(): string | undefined;
|
|
41
|
+
getTabLocation(): string;
|
|
42
|
+
toJson(): IJsonTabSetNode;
|
|
43
|
+
getWindowId(): string;
|
|
44
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function randomUUID():
|
|
1
|
+
export declare function randomUUID(): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export declare class WindowLayout {
|
|
8
|
+
private _windowId;
|
|
9
|
+
private _rect;
|
|
10
|
+
private _window?;
|
|
11
|
+
private _root?;
|
|
12
|
+
private _maximizedTabSet?;
|
|
13
|
+
private _activeTabSet?;
|
|
14
|
+
constructor(windowId: string, rect: Rect);
|
|
15
|
+
visitNodes(fn: (node: Node, level: number) => void): void;
|
|
16
|
+
get windowId(): string;
|
|
17
|
+
get rect(): Rect;
|
|
18
|
+
get window(): Window | undefined;
|
|
19
|
+
get root(): RowNode | undefined;
|
|
20
|
+
get maximizedTabSet(): TabSetNode | undefined;
|
|
21
|
+
get activeTabSet(): TabSetNode | undefined;
|
|
22
|
+
toJson(): IJsonPopout;
|
|
23
|
+
static fromJson(windowJson: IJsonPopout, model: Model, windowId: string): WindowLayout;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Orientation } from "./Orientation";
|
|
2
|
+
export declare class DockLocation {
|
|
3
|
+
static values: Map<string, DockLocation>;
|
|
4
|
+
static TOP: DockLocation;
|
|
5
|
+
static BOTTOM: DockLocation;
|
|
6
|
+
static LEFT: DockLocation;
|
|
7
|
+
static RIGHT: DockLocation;
|
|
8
|
+
static CENTER: DockLocation;
|
|
9
|
+
getName(): string;
|
|
10
|
+
getOrientation(): Orientation;
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DockLocation } from "./DockLocation";
|
|
2
|
+
import { IDropTarget } from "./model/IDropTarget";
|
|
3
|
+
import { Node } from "./model/Node";
|
|
4
|
+
import { Rect } from "./Rect";
|
|
5
|
+
export declare class DropInfo {
|
|
6
|
+
node: Node & IDropTarget;
|
|
7
|
+
rect: Rect;
|
|
8
|
+
location: DockLocation;
|
|
9
|
+
index: number;
|
|
10
|
+
className: string;
|
|
11
|
+
constructor(node: Node & IDropTarget, rect: Rect, location: DockLocation, index: number, className: string);
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum I18nLabel {
|
|
2
|
+
Close_Tab = "Close",
|
|
3
|
+
Close_Tabset = "Close tabset",
|
|
4
|
+
Move_Tabset = "Move tabset",
|
|
5
|
+
Maximize = "Maximize tabset",
|
|
6
|
+
Restore = "Restore tabset",
|
|
7
|
+
Popout_Tab = "Show selected tab in a floating window",
|
|
8
|
+
Overflow_Menu_Tooltip = "Hidden tabs",
|
|
9
|
+
Error_rendering_component = "Error rendering component"
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare class Rect {
|
|
2
|
+
static empty(): Rect;
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
constructor(x: number, y: number, width: number, height: number);
|
|
8
|
+
static getBoundingClientRect(element: Element): Rect;
|
|
9
|
+
static getContentRect(element: HTMLDivElement): Rect;
|
|
10
|
+
static fromDomRect(domRect: DOMRect): Rect;
|
|
11
|
+
relativeTo(r: Rect | DOMRect): Rect;
|
|
12
|
+
clone(): Rect;
|
|
13
|
+
equals(rect: Rect | null | undefined): boolean;
|
|
14
|
+
getBottom(): number;
|
|
15
|
+
getRight(): number;
|
|
16
|
+
getCenter(): {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
positionElement(element: HTMLElement, position?: string): void;
|
|
21
|
+
styleWithPosition(style: Record<string, any>, position?: string): Record<string, any>;
|
|
22
|
+
contains(x: number, y: number): boolean;
|
|
23
|
+
removeInsets(insets: {
|
|
24
|
+
top: number;
|
|
25
|
+
left: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
right: number;
|
|
28
|
+
}): Rect;
|
|
29
|
+
centerInRect(outerRect: Rect): void;
|
|
30
|
+
toString(): string;
|
|
31
|
+
}
|