flexlayout-react 0.7.14 → 0.8.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/ChangeLog.txt +26 -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 -6
- package/declarations/view/Layout.d.ts +139 -160
- 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 +457 -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 +124 -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 -40
- package/lib/view/Icons.js.map +1 -1
- package/lib/view/Layout.js +918 -901
- 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 +122 -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 +267 -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 +300 -242
- package/src/model/Utils.ts +6 -32
- package/src/view/BorderButton.tsx +32 -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 +13 -0
- package/src/view/Layout.tsx +1071 -1047
- 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 +36 -55
- package/src/view/TabButtonStamp.tsx +5 -9
- package/src/view/TabOverflowHook.tsx +14 -9
- package/src/view/TabSet.tsx +217 -176
- package/src/view/Utils.tsx +119 -39
- package/style/_base.scss +143 -35
- package/style/dark.css +685 -577
- package/style/dark.css.map +1 -1
- package/style/dark.scss +4 -1
- package/style/gray.css +668 -560
- package/style/gray.css.map +1 -1
- package/style/gray.scss +4 -1
- package/style/light.css +669 -561
- package/style/light.css.map +1 -1
- package/style/light.scss +6 -3
- package/style/rounded.css +697 -0
- package/style/rounded.css.map +1 -0
- package/style/rounded.scss +194 -0
- package/style/underline.css +690 -582
- package/style/underline.css.map +1 -1
- package/style/underline.scss +4 -1
- 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
package/src/Types.ts
CHANGED
|
@@ -2,6 +2,7 @@ export enum CLASSES {
|
|
|
2
2
|
FLEXLAYOUT__BORDER = "flexlayout__border",
|
|
3
3
|
FLEXLAYOUT__BORDER_ = "flexlayout__border_",
|
|
4
4
|
|
|
5
|
+
FLEXLAYOUT__BORDER_TAB_CONTENTS = "flexlayout__border_tab_contents",
|
|
5
6
|
FLEXLAYOUT__BORDER_BUTTON = "flexlayout__border_button",
|
|
6
7
|
FLEXLAYOUT__BORDER_BUTTON_ = "flexlayout__border_button_",
|
|
7
8
|
FLEXLAYOUT__BORDER_BUTTON_CONTENT = "flexlayout__border_button_content",
|
|
@@ -40,6 +41,12 @@ export enum CLASSES {
|
|
|
40
41
|
FLEXLAYOUT__FLOATING_WINDOW_TAB = "flexlayout__floating_window_tab",
|
|
41
42
|
|
|
42
43
|
FLEXLAYOUT__LAYOUT = "flexlayout__layout",
|
|
44
|
+
FLEXLAYOUT__LAYOUT_MOVEABLES = "flexlayout__layout_moveables",
|
|
45
|
+
FLEXLAYOUT__LAYOUT_OVERLAY = "flexlayout__layout_overlay",
|
|
46
|
+
FLEXLAYOUT__LAYOUT_TAB_STAMPS = "flexlayout__layout_tab_stamps",
|
|
47
|
+
FLEXLAYOUT__LAYOUT_MAIN = "flexlayout__layout_main",
|
|
48
|
+
FLEXLAYOUT__LAYOUT_BORDER_CONTAINER = "flexlayout__layout_border_container",
|
|
49
|
+
FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER = "flexlayout__layout_border_container_inner",
|
|
43
50
|
|
|
44
51
|
FLEXLAYOUT__OUTLINE_RECT = "flexlayout__outline_rect",
|
|
45
52
|
FLEXLAYOUT__OUTLINE_RECT_EDGE = "flexlayout__outline_rect_edge",
|
|
@@ -49,10 +56,18 @@ export enum CLASSES {
|
|
|
49
56
|
FLEXLAYOUT__SPLITTER_ = "flexlayout__splitter_",
|
|
50
57
|
FLEXLAYOUT__SPLITTER_BORDER = "flexlayout__splitter_border",
|
|
51
58
|
FLEXLAYOUT__SPLITTER_DRAG = "flexlayout__splitter_drag",
|
|
59
|
+
FLEXLAYOUT__SPLITTER_HANDLE = "flexlayout__splitter_handle",
|
|
60
|
+
FLEXLAYOUT__SPLITTER_HANDLE_HORZ = "flexlayout__splitter_handle_horz",
|
|
61
|
+
FLEXLAYOUT__SPLITTER_HANDLE_VERT = "flexlayout__splitter_handle_vert",
|
|
52
62
|
|
|
63
|
+
FLEXLAYOUT__ROW = "flexlayout__row",
|
|
53
64
|
FLEXLAYOUT__TAB = "flexlayout__tab",
|
|
65
|
+
FLEXLAYOUT__TAB_POSITION = "flexlayout__tab_position",
|
|
66
|
+
FLEXLAYOUT__TAB_MOVEABLE = "flexlayout__tab_moveable",
|
|
67
|
+
FLEXLAYOUT__TAB_OVERLAY = "flexlayout__tab_overlay",
|
|
54
68
|
|
|
55
69
|
FLEXLAYOUT__TABSET = "flexlayout__tabset",
|
|
70
|
+
FLEXLAYOUT__TABSET_CONTAINER = "flexlayout__tabset_container",
|
|
56
71
|
FLEXLAYOUT__TABSET_HEADER = "flexlayout__tabset_header",
|
|
57
72
|
FLEXLAYOUT__TABSET_HEADER_SIZER = "flexlayout__tabset_header_sizer",
|
|
58
73
|
FLEXLAYOUT__TABSET_HEADER_CONTENT = "flexlayout__tabset_header_content",
|
|
@@ -87,6 +102,7 @@ export enum CLASSES {
|
|
|
87
102
|
|
|
88
103
|
FLEXLAYOUT__TAB_TOOLBAR = "flexlayout__tab_toolbar",
|
|
89
104
|
FLEXLAYOUT__TAB_TOOLBAR_BUTTON = "flexlayout__tab_toolbar_button",
|
|
105
|
+
FLEXLAYOUT__TAB_TOOLBAR_ICON = "flexlayout__tab_toolbar_icon",
|
|
90
106
|
FLEXLAYOUT__TAB_TOOLBAR_BUTTON_ = "flexlayout__tab_toolbar_button-",
|
|
91
107
|
FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT = "flexlayout__tab_toolbar_button-float",
|
|
92
108
|
FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER = "flexlayout__tab_toolbar_sticky_buttons_container",
|
package/src/index.ts
CHANGED
|
@@ -11,12 +11,11 @@ export * from './model/IJsonModel';
|
|
|
11
11
|
export * from './model/Model';
|
|
12
12
|
export * from './model/Node';
|
|
13
13
|
export * from './model/RowNode';
|
|
14
|
-
export * from './model/SplitterNode';
|
|
15
14
|
export * from './model/TabNode';
|
|
16
15
|
export * from './model/TabSetNode';
|
|
16
|
+
export * from './model/LayoutWindow';
|
|
17
17
|
|
|
18
18
|
export * from './DockLocation';
|
|
19
|
-
export * from './DragDrop';
|
|
20
19
|
export * from './DropInfo';
|
|
21
20
|
export * from './I18nLabel';
|
|
22
21
|
export * from './Orientation';
|
package/src/model/Actions.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DockLocation } from "../DockLocation";
|
|
2
2
|
import { Action } from "./Action";
|
|
3
|
+
import { IJsonRect, IJsonRowNode } from "./IJsonModel";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The Action creator class for FlexLayout model actions
|
|
@@ -12,13 +13,15 @@ export class Actions {
|
|
|
12
13
|
static RENAME_TAB = "FlexLayout_RenameTab";
|
|
13
14
|
static SELECT_TAB = "FlexLayout_SelectTab";
|
|
14
15
|
static SET_ACTIVE_TABSET = "FlexLayout_SetActiveTabset";
|
|
15
|
-
static
|
|
16
|
+
static ADJUST_WEIGHTS = "FlexLayout_AdjustWeights";
|
|
16
17
|
static ADJUST_BORDER_SPLIT = "FlexLayout_AdjustBorderSplit";
|
|
17
18
|
static MAXIMIZE_TOGGLE = "FlexLayout_MaximizeToggle";
|
|
18
19
|
static UPDATE_MODEL_ATTRIBUTES = "FlexLayout_UpdateModelAttributes";
|
|
19
20
|
static UPDATE_NODE_ATTRIBUTES = "FlexLayout_UpdateNodeAttributes";
|
|
20
|
-
static
|
|
21
|
-
static
|
|
21
|
+
static POPOUT_TAB = "FlexLayout_PopoutTab";
|
|
22
|
+
static POPOUT_TABSET = "FlexLayout_PopoutTabset";
|
|
23
|
+
static CLOSE_WINDOW = "FlexLayout_CloseWindow";
|
|
24
|
+
static CREATE_WINDOW = "FlexLayout_CreateWindow";
|
|
22
25
|
|
|
23
26
|
/**
|
|
24
27
|
* Adds a tab node to the given tabset node
|
|
@@ -60,7 +63,7 @@ export class Actions {
|
|
|
60
63
|
|
|
61
64
|
/**
|
|
62
65
|
* Deletes a tab node from the layout
|
|
63
|
-
* @param
|
|
66
|
+
* @param tabNodeId the id of the tab node to delete
|
|
64
67
|
* @returns {Action} the action
|
|
65
68
|
*/
|
|
66
69
|
static deleteTab(tabNodeId: string): Action {
|
|
@@ -100,30 +103,18 @@ export class Actions {
|
|
|
100
103
|
* @param tabsetNodeId the id of the tabset node to set as active
|
|
101
104
|
* @returns {Action} the action
|
|
102
105
|
*/
|
|
103
|
-
static setActiveTabset(tabsetNodeId: string | undefined): Action {
|
|
104
|
-
return new Action(Actions.SET_ACTIVE_TABSET, { tabsetNode: tabsetNodeId });
|
|
106
|
+
static setActiveTabset(tabsetNodeId: string | undefined, windowId?: string | undefined): Action {
|
|
107
|
+
return new Action(Actions.SET_ACTIVE_TABSET, { tabsetNode: tabsetNodeId, windowId: windowId });
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
/**
|
|
108
|
-
* Adjust the splitter
|
|
109
|
-
* @
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* @param splitSpec an object the defines the new split between two tabsets, see example below.
|
|
111
|
+
* Adjust the weights of a row, used when the splitter is moved
|
|
112
|
+
* @param nodeId the row node whose childrens weights are being adjusted
|
|
113
|
+
* @param weights an array of weights to be applied to the children
|
|
113
114
|
* @returns {Action} the action
|
|
114
115
|
*/
|
|
115
|
-
static
|
|
116
|
-
|
|
117
|
-
const node2 = splitSpec.node2Id;
|
|
118
|
-
|
|
119
|
-
return new Action(Actions.ADJUST_SPLIT, {
|
|
120
|
-
node1,
|
|
121
|
-
weight1: splitSpec.weight1,
|
|
122
|
-
pixelWidth1: splitSpec.pixelWidth1,
|
|
123
|
-
node2,
|
|
124
|
-
weight2: splitSpec.weight2,
|
|
125
|
-
pixelWidth2: splitSpec.pixelWidth2,
|
|
126
|
-
});
|
|
116
|
+
static adjustWeights(nodeId: string, weights: number[]): Action {
|
|
117
|
+
return new Action(Actions.ADJUST_WEIGHTS, {nodeId, weights});
|
|
127
118
|
}
|
|
128
119
|
|
|
129
120
|
static adjustBorderSplit(nodeId: string, pos: number): Action {
|
|
@@ -135,8 +126,8 @@ export class Actions {
|
|
|
135
126
|
* @param tabsetNodeId the id of the tabset to maximize
|
|
136
127
|
* @returns {Action} the action
|
|
137
128
|
*/
|
|
138
|
-
static maximizeToggle(tabsetNodeId: string): Action {
|
|
139
|
-
return new Action(Actions.MAXIMIZE_TOGGLE, { node: tabsetNodeId });
|
|
129
|
+
static maximizeToggle(tabsetNodeId: string, windowId?: string | undefined): Action {
|
|
130
|
+
return new Action(Actions.MAXIMIZE_TOGGLE, { node: tabsetNodeId, windowId: windowId });
|
|
140
131
|
}
|
|
141
132
|
|
|
142
133
|
/**
|
|
@@ -158,11 +149,40 @@ export class Actions {
|
|
|
158
149
|
return new Action(Actions.UPDATE_NODE_ATTRIBUTES, { node: nodeId, json: attributes });
|
|
159
150
|
}
|
|
160
151
|
|
|
161
|
-
|
|
162
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Pops out the given tab node into a new browser window
|
|
154
|
+
* @param nodeId the tab node to popout
|
|
155
|
+
* @returns
|
|
156
|
+
*/
|
|
157
|
+
static popoutTab(nodeId: string): Action {
|
|
158
|
+
return new Action(Actions.POPOUT_TAB, { node: nodeId });
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Pops out the given tab set node into a new browser window
|
|
163
|
+
* @param nodeId the tab set node to popout
|
|
164
|
+
* @returns
|
|
165
|
+
*/
|
|
166
|
+
static popoutTabset(nodeId: string): Action {
|
|
167
|
+
return new Action(Actions.POPOUT_TABSET, { node: nodeId });
|
|
163
168
|
}
|
|
164
169
|
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
/**
|
|
171
|
+
* Closes the popout window
|
|
172
|
+
* @param windowId the id of the popout window to close
|
|
173
|
+
* @returns
|
|
174
|
+
*/
|
|
175
|
+
static closeWindow(windowId: string): Action {
|
|
176
|
+
return new Action(Actions.CLOSE_WINDOW, { windowId });
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Creates a new empty popout window with the given layout
|
|
181
|
+
* @param layout the json layout for the new window
|
|
182
|
+
* @param rect the window rectangle in screen coordinates
|
|
183
|
+
* @returns
|
|
184
|
+
*/
|
|
185
|
+
static createWindow(layout: IJsonRowNode, rect: IJsonRect): Action {
|
|
186
|
+
return new Action(Actions.CREATE_WINDOW, { layout, rect});
|
|
167
187
|
}
|
|
168
188
|
}
|