flexlayout-react 0.5.15 → 0.5.19

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.
Files changed (88) hide show
  1. package/ChangeLog.txt +26 -0
  2. package/README.md +121 -97
  3. package/declarations/DragDrop.d.ts +1 -0
  4. package/declarations/I18nLabel.d.ts +1 -0
  5. package/declarations/Rect.d.ts +4 -0
  6. package/declarations/Types.d.ts +9 -1
  7. package/declarations/model/Actions.d.ts +18 -11
  8. package/declarations/model/BorderNode.d.ts +2 -1
  9. package/declarations/model/IJsonModel.d.ts +10 -0
  10. package/declarations/model/Model.d.ts +1 -0
  11. package/declarations/model/TabNode.d.ts +1 -0
  12. package/declarations/model/TabSetNode.d.ts +1 -0
  13. package/declarations/view/Layout.d.ts +20 -6
  14. package/dist/flexlayout.js +20 -20
  15. package/dist/flexlayout_min.js +1 -1
  16. package/lib/DockLocation.js +25 -11
  17. package/lib/DockLocation.js.map +1 -1
  18. package/lib/DragDrop.js +19 -3
  19. package/lib/DragDrop.js.map +1 -1
  20. package/lib/I18nLabel.js +1 -0
  21. package/lib/I18nLabel.js.map +1 -1
  22. package/lib/PopupMenu.js +14 -9
  23. package/lib/PopupMenu.js.map +1 -1
  24. package/lib/Rect.js +3 -0
  25. package/lib/Rect.js.map +1 -1
  26. package/lib/Types.js +8 -0
  27. package/lib/Types.js.map +1 -1
  28. package/lib/model/Actions.js +20 -11
  29. package/lib/model/Actions.js.map +1 -1
  30. package/lib/model/BorderNode.js +61 -14
  31. package/lib/model/BorderNode.js.map +1 -1
  32. package/lib/model/BorderSet.js +33 -19
  33. package/lib/model/BorderSet.js.map +1 -1
  34. package/lib/model/Model.js +39 -1
  35. package/lib/model/Model.js.map +1 -1
  36. package/lib/model/RowNode.js +19 -5
  37. package/lib/model/RowNode.js.map +1 -1
  38. package/lib/model/TabNode.js +14 -0
  39. package/lib/model/TabNode.js.map +1 -1
  40. package/lib/model/TabSetNode.js +42 -19
  41. package/lib/model/TabSetNode.js.map +1 -1
  42. package/lib/view/BorderButton.js +14 -3
  43. package/lib/view/BorderButton.js.map +1 -1
  44. package/lib/view/BorderTabSet.js +15 -4
  45. package/lib/view/BorderTabSet.js.map +1 -1
  46. package/lib/view/Layout.js +206 -45
  47. package/lib/view/Layout.js.map +1 -1
  48. package/lib/view/Splitter.js +34 -3
  49. package/lib/view/Splitter.js.map +1 -1
  50. package/lib/view/TabButton.js +11 -2
  51. package/lib/view/TabButton.js.map +1 -1
  52. package/lib/view/TabFloating.js +23 -11
  53. package/lib/view/TabFloating.js.map +1 -1
  54. package/lib/view/TabSet.js +50 -17
  55. package/lib/view/TabSet.js.map +1 -1
  56. package/package.json +1 -1
  57. package/src/DockLocation.ts +30 -9
  58. package/src/DragDrop.ts +26 -3
  59. package/src/I18nLabel.ts +1 -0
  60. package/src/PopupMenu.tsx +28 -10
  61. package/src/Rect.ts +6 -2
  62. package/src/Types.ts +9 -0
  63. package/src/model/Actions.ts +21 -11
  64. package/src/model/BorderNode.ts +57 -15
  65. package/src/model/BorderSet.ts +32 -19
  66. package/src/model/IJsonModel.ts +10 -0
  67. package/src/model/Model.ts +43 -1
  68. package/src/model/RowNode.ts +8 -5
  69. package/src/model/TabNode.ts +16 -0
  70. package/src/model/TabSetNode.ts +43 -19
  71. package/src/view/BorderButton.tsx +22 -3
  72. package/src/view/BorderTabSet.tsx +21 -4
  73. package/src/view/Layout.tsx +263 -70
  74. package/src/view/Splitter.tsx +49 -3
  75. package/src/view/TabButton.tsx +17 -1
  76. package/src/view/TabFloating.tsx +36 -19
  77. package/src/view/TabSet.tsx +76 -16
  78. package/style/_base.scss +75 -44
  79. package/style/dark.css +90 -61
  80. package/style/dark.css.map +1 -1
  81. package/style/dark.scss +20 -20
  82. package/style/gray.css +90 -61
  83. package/style/gray.css.map +1 -1
  84. package/style/gray.scss +20 -20
  85. package/style/light.css +90 -61
  86. package/style/light.css.map +1 -1
  87. package/style/light.scss +18 -18
  88. package/yarn-error.log +0 -11828
package/ChangeLog.txt CHANGED
@@ -1,3 +1,29 @@
1
+ 0.5.19
2
+ Added onRenderFloatingTabPlaceholder callback prop for rendering the floating tab placeholder.
3
+ Changed style sheets to use CSS custom properties (variables) for several values.
4
+ Fix selected index in single empty tabset.
5
+ Added onContextMenu callback prop for handling context menus on tabs and tabsets.
6
+ Added onAuxMouseClick callback prop for handling mouse clicks on tabs and tabsets
7
+ with alt, meta, shift keys, also handles center mouse clicks
8
+
9
+ 0.5.18
10
+ Added onRenderDragRect callback prop for rendering the drag rectangles
11
+ New border attribute: enableAutoHide, to hide border if it has zero tabs
12
+
13
+ 0.5.17
14
+ New global option, splitterExtra, to allow splitters to have an extended hit test areas.
15
+ This makes it easier to use narrow splitters.
16
+ Added new TabNode attributes: borderWidth and borderHeight, these allow for individual border sizes for certain tabs.
17
+ Fix for #263 - borders splitters not taking minimum size of center into account
18
+ Improved algorithm for finding drop location
19
+ Additional parameter: cursor, for onTabDrag
20
+
21
+ 0.5.16
22
+ Added 'New Features' layout to demo.
23
+ New tab attribute, helpText, to show tooltip over tabs.
24
+ New model action, deleteTabset, to delete a tabset and all it's child tabs.
25
+ New tabset attribute, enableClose, to close the tabset
26
+
1
27
  0.5.15
2
28
  Added new Layout prop: onTabDrag that allows tab dragging to be intercepted.
3
29
  Added example of onTabDrag in demo app, example shows a list where tabs can be dragged into,
package/README.md CHANGED
@@ -6,7 +6,7 @@ FlexLayout is a layout manager that arranges React components in multiple tab se
6
6
 
7
7
  [Run the Demo](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.5/demo/index.html)
8
8
 
9
- Try it now using [JSFiddle](https://jsfiddle.net/9x6hecdw/)
9
+ Try it now using [JSFiddle](https://jsfiddle.net/7oe4q2pc/)
10
10
 
11
11
  <!-- [API Doc](./typedoc/index.html) -->
12
12
 
@@ -66,25 +66,39 @@ Include the light, gray or dark style in your html:
66
66
  The `<Layout>` component renders the tabsets and splitters, it takes the following props:
67
67
 
68
68
 
69
- | Prop | Required/Optional | Description |
70
- | --------------- |:-----------------:| ----------------- |
71
- | model | required | the layout model |
72
- | factory | required | a factory function for creating React components |
73
- | font | optional | the tab font (overrides value in css). Example: font={{size:"12px", style:"italic"}}|
74
- | iconFactory | optional | a factory function for creating icon components for tab bar buttons |
75
- | titleFactory | optional | a factory function for creating title components for tab bar buttons |
76
- | icons | optional | object mapping keys among `close`, `maximize`, `restore`, `more`, `popout` to React nodes to use in place of the default icons |
77
- | onAction | optional | function called whenever the layout generates an action to update the model (allows for intercepting actions before they are dispatched to the model, for example, asking the user to confirm a tab close.) Returning `undefined` from the function will halt the action, otherwise return the action to continue |
78
- | onRenderTab | optional | function called when rendering a tab, allows leading (icon), content section, buttons and name used in overflow menu to be customized |
79
- | onRenderTabSet | optional | function called when rendering a tabset, allows header and buttons to be customized |
80
- | onModelChange | optional | function called when model has changed |
81
- | onExternalDrag | optional | function called when an external object (not a tab) gets dragged onto the layout, with a single `dragenter` argument. Should return either `undefined` to reject the drag/drop or an object with keys `dragText`, `json`, and optionally `onDrop`, to create a tab via drag (similar to a call to `addTabToTabSet`). Function `onDrop` is passed the added tab `Node` and the `drop` `DragEvent`, unless the drag was canceled. |
82
- | classNameMapper | optional | function called with default css class name, return value is class name that will be used. Mainly for use with css modules.|
83
- | i18nMapper | optional | function called for each I18nLabel to allow user translation, currently used for tab and tabset move messages, return undefined to use default values |
84
- | supportsPopout | optional | if left undefined will do simple check based on userAgent |
85
- | popoutURL | optional | URL of popout window relative to origin, defaults to popout.html |
86
- | realtimeResize | optional | boolean value, defaults to false, resize tabs as splitters are dragged. Warning: this can cause resizing to become choppy when tabs are slow to draw |
87
- | onTabDrag | optional | function called while dragging a tab, whether from the layout or using `addTabWithDragAndDrop`. Called with the `TabNode` being dragged / the tab json from `addTabWithDragAndDrop`, the `TabNode` being dragged over, the x and y coordinates relative to the dragged-over tab, and the `DockLocation` that would be used. Should return undefined for default behavior, or an object containing `x`, `y`, `width`, `height`, `callback` fields. Coordinates are in pixels relative to the dragged-over tab, and `callback` will be called with the same arguments if the tab is dropped. If `callback` is called, the layout does not do anything else on drop. |
69
+ #### Required props:
70
+
71
+
72
+ | Prop | Description |
73
+ | --------------- | ----------------- |
74
+ | model | the layout model |
75
+ | factory | a factory function for creating React components |
76
+
77
+ #### Optional props:
78
+
79
+
80
+ | Prop | Description |
81
+ | --------------- | ----------------- |
82
+ | font | the tab font (overrides value in css). Example: font={{size:"12px", style:"italic"}}|
83
+ | icons | object mapping keys among `close`, `maximize`, `restore`, `more`, `popout` to React nodes to use in place of the default icons |
84
+ | onAction | function called whenever the layout generates an action to update the model (allows for intercepting actions before they are dispatched to the model, for example, asking the user to confirm a tab close.) Returning `undefined` from the function will halt the action, otherwise return the action to continue |
85
+ | onRenderTab | function called when rendering a tab, allows leading (icon), content section, buttons and name used in overflow menu to be customized |
86
+ | onRenderTabSet | function called when rendering a tabset, allows header and buttons to be customized |
87
+ | onModelChange | function called when model has changed |
88
+ | onExternalDrag | function called when an external object (not a tab) gets dragged onto the layout, with a single `dragenter` argument. Should return either `undefined` to reject the drag/drop or an object with keys `dragText`, `json`Drop`, to create a tab via drag (similar to a call to `addTabToTabSet`). Function `onDrop` is passed the added tab `Node` and the `drop` `DragEvent`, unless the drag was canceled. |
89
+ | classNameMapper | function called with default css class name, return value is class name that will be used. Mainly for use with css modules.|
90
+ | i18nMapper | function called for each I18nLabel to allow user translation, currently used for tab and tabset move messages, return undefined to use default values |
91
+ | supportsPopout | if left undefined will do simple check based on userAgent |
92
+ | popoutURL | URL of popout window relative to origin, defaults to popout.html |
93
+ | realtimeResize | boolean value, defaults to false, resize tabs as splitters are dragged. Warning: this can cause resizing to become choppy when tabs are slow to draw |
94
+ | onTabDrag | function called while dragging a tab, whether from the layout or using `addTabWithDragAndDrop`. Called with the `TabNode` being dragged / the tab json from `addTabWithDragAndDrop`, the `TabNode` being dragged over, the x and y coordinates relative to the dragged-over tab, and the `DockLocation` that would be used. Should return undefined for default behavior, or an object containing `x`, `y`, `width`, `height`, `callback`, `cursor` fields. Coordinates are in pixels relative to the dragged-over tab, and `callback` will be called with the same arguments if the tab is dropped. `cursor` is an optional string field that should contain a CSS cursor value, such as `copy` or `row-resize`. If `callback` is called, the layout does not perform its default behavior on drop. |
95
+ | onRenderDragRect | callback for rendering the drag rectangles |
96
+ | onRenderFloatingTabPlaceholder | callback for rendering the floating tab placeholder |
97
+ | onContextMenu | callback for handling context actions on tabs and tabsets |
98
+ | onAuxMouseClick | callback for handling mouse clicks on tabs and tabsets with alt, meta, shift keys, also handles center mouse clicks |
99
+ | iconFactory | a factory function for creating icon components for tab bar buttons. <br/><br/> NOTE: for greater customization of the tab use onRenderTab instead of this callback |
100
+ | titleFactory | a factory function for creating title components for tab bar buttons. <br /><br /> NOTE: for greater customization of the tab use onRenderTab instead of this callback |
101
+
88
102
 
89
103
  The model is tree of Node objects that define the structure of the layout.
90
104
 
@@ -104,38 +118,38 @@ render() {
104
118
 
105
119
  ```javascript
106
120
  var json = {
107
- global: {},
108
- borders: [],
109
- layout:{
110
- "type": "row",
111
- "weight": 100,
112
- "children": [
113
- {
114
- "type": "tabset",
115
- "weight": 50,
116
- "selected": 0,
117
- "children": [
118
- {
119
- "type": "tab",
120
- "name": "FX",
121
- "component":"grid",
122
- }
123
- ]
124
- },
125
- {
126
- "type": "tabset",
127
- "weight": 50,
128
- "selected": 0,
129
- "children": [
130
- {
131
- "type": "tab",
132
- "name": "FI",
133
- "component":"grid",
134
- }
135
- ]
136
- }
137
- ]
138
- }
121
+ global: {},
122
+ borders: [],
123
+ layout:{
124
+ "type": "row",
125
+ "weight": 100,
126
+ "children": [
127
+ {
128
+ "type": "tabset",
129
+ "weight": 50,
130
+ "selected": 0,
131
+ "children": [
132
+ {
133
+ "type": "tab",
134
+ "name": "FX",
135
+ "component":"grid",
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "type": "tabset",
141
+ "weight": 50,
142
+ "selected": 0,
143
+ "children": [
144
+ {
145
+ "type": "tab",
146
+ "name": "FI",
147
+ "component":"grid",
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ }
139
153
  };
140
154
  ```
141
155
 
@@ -173,7 +187,7 @@ ReactDOM.render(<Main/>, document.getElementById("container"));
173
187
 
174
188
  The above code would render two tabsets horizontally each containing a single tab that hosts a button component. The tabs could be moved and resized by dragging and dropping. Additional grids could be added to the layout by sending actions to the model.
175
189
 
176
- Try it now using [JSFiddle](https://jsfiddle.net/9x6hecdw/)
190
+ Try it now using [JSFiddle](https://jsfiddle.net/7oe4q2pc/)
177
191
 
178
192
  A simple Create React App (CRA) example (using typescript) can be found here:
179
193
 
@@ -207,50 +221,50 @@ existing layouts by dragging/dropping and adding nodes then press the 'Show Layo
207
221
 
208
222
  example borders section:
209
223
  ```
210
- "borders": [
211
- {
212
- "type":"border",
213
- "location": "left",
214
- "children": [
215
- {
216
- "type": "tab",
217
- "enableClose":false,
218
- "name": "Navigation",
219
- "component": "grid",
220
- }
221
- ]
222
- },
223
- {
224
- "type":"border",
225
- "location": "right",
226
- "children": [
227
- {
228
- "type": "tab",
229
- "enableClose":false,
230
- "name": "Options",
231
- "component": "grid",
232
- }
233
- ]
234
- },
235
- {
236
- "type":"border",
237
- "location": "bottom",
238
- "children": [
239
- {
240
- "type": "tab",
241
- "enableClose":false,
242
- "name": "Activity Blotter",
243
- "component": "grid",
244
- },
245
- {
246
- "type": "tab",
247
- "enableClose":false,
248
- "name": "Execution Blotter",
249
- "component": "grid",
250
- }
251
- ]
252
- }
253
- ]
224
+ "borders": [
225
+ {
226
+ "type":"border",
227
+ "location": "left",
228
+ "children": [
229
+ {
230
+ "type": "tab",
231
+ "enableClose":false,
232
+ "name": "Navigation",
233
+ "component": "grid",
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ "type":"border",
239
+ "location": "right",
240
+ "children": [
241
+ {
242
+ "type": "tab",
243
+ "enableClose":false,
244
+ "name": "Options",
245
+ "component": "grid",
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "type":"border",
251
+ "location": "bottom",
252
+ "children": [
253
+ {
254
+ "type": "tab",
255
+ "enableClose":false,
256
+ "name": "Activity Blotter",
257
+ "component": "grid",
258
+ },
259
+ {
260
+ "type": "tab",
261
+ "enableClose":false,
262
+ "name": "Execution Blotter",
263
+ "component": "grid",
264
+ }
265
+ ]
266
+ }
267
+ ]
254
268
  ```
255
269
 
256
270
  To control where nodes can be dropped you can add a callback function to the model:
@@ -322,6 +336,7 @@ Attributes allowed in the 'global' element
322
336
  | Attribute | Default | Description |
323
337
  | ------------- |:-------------:| -----|
324
338
  | splitterSize | 8 | width in pixels of all splitters between tabsets/borders |
339
+ | splitterExtra | 0 | additional width in pixels of the splitter hit test area |
325
340
  | enableEdgeDock | true | |
326
341
  | tabEnableClose | true | allow user to close all tabs via close button |
327
342
  | tabCloseType | 1 | see values in ICloseType |
@@ -332,11 +347,14 @@ Attributes allowed in the 'global' element
332
347
  | tabIcon | null | |
333
348
  | tabEnableRenderOnDemand | true | whether to avoid rendering component until tab is visible |
334
349
  | tabDragSpeed | 0.3 | CSS transition speed of drag outlines (in seconds) |
350
+ | tabBorderWidth | -1 | width when added to border, -1 will use border size |
351
+ | tabBorderHeight | -1 | height when added to border, -1 will use border size |
335
352
  | tabSetEnableDeleteWhenEmpty | true | |
336
353
  | tabSetEnableDrop | true | allow user to drag tabs into all tabsets |
337
354
  | tabSetEnableDrag | true | allow user to drag tabs out of all tabsets |
338
355
  | tabSetEnableDivide | true | allow user to drag tabs to region of all tabsets, splitting into new tabset |
339
356
  | tabSetEnableMaximize | true | allow user to maximize all tabsets to fill view via maximize button |
357
+ | tabSetEnableClose | false | allow user to close all tabsets via close button |
340
358
  | tabSetAutoSelectTab | true | whether to select new/moved tabs in all tabsets |
341
359
  | tabSetClassNameTabStrip | null | height in pixels of tab strips in all tabsets |
342
360
  | tabSetClassNameHeader | null | |
@@ -344,6 +362,7 @@ Attributes allowed in the 'global' element
344
362
  | tabSetHeaderHeight | 0 | height of tabset header in pixels; if left as 0 then the value will be calculated from the current fontSize |
345
363
  | tabSetTabStripHeight | 0 | height of tabset tab bar in pixels; if left as 0 then the value will be calculated from the current fontSize |
346
364
  | borderBarSize | 0 | size of the border bars in pixels; if left as 0 then the value will be calculated from the current fontSize |
365
+ | borderEnableAutoHide | false | hide border if it has zero tabs |
347
366
  | borderEnableDrop | true | allow user to drag tabs into this border |
348
367
  | borderAutoSelectTabWhenOpen | true | whether to select new/moved tabs in border when the border is already open |
349
368
  | borderAutoSelectTabWhenClosed | false | whether to select new/moved tabs in border when the border is curently closed |
@@ -382,6 +401,7 @@ Inherited defaults will take their value from the associated global attributes (
382
401
  | component | *required* | string identifying which component to run (for factory) |
383
402
  | config | null | a place to hold json config for the hosted component |
384
403
  | id | auto generated | |
404
+ | helpText | *optional* | An optional help text for the tab to be displayed upon tab hover. |
385
405
  | enableClose | *inherited* | allow user to close tab via close button |
386
406
  | closeType | *inherited* | see values in ICloseType |
387
407
  | enableDrag | *inherited* | allow user to drag tab to new location |
@@ -391,6 +411,8 @@ Inherited defaults will take their value from the associated global attributes (
391
411
  | className | *inherited* | |
392
412
  | icon | *inherited* | |
393
413
  | enableRenderOnDemand | *inherited* | whether to avoid rendering component until tab is visible |
414
+ | borderWidth | *inherited* | width when added to border, -1 will use border size |
415
+ | borderHeight | *inherited* | height when added to border, -1 will use border size |
394
416
 
395
417
  Tab nodes have a getExtraData() method that initially returns an empty object, this is the place to
396
418
  add extra data to a tab node that will not be saved.
@@ -414,6 +436,7 @@ Note: tabsets can be dynamically created as tabs are moved and deleted when all
414
436
  | config | null | a place to hold json config used in your own code |
415
437
  | selected | 0 | index of selected/visible tab in tabset |
416
438
  | maximized | false | whether tabset is currently maximized to fill view |
439
+ | enableClose | false | allow user to close tabset via a close button |
417
440
  | id | auto generated | |
418
441
  | children | *required* | a list of tab nodes |
419
442
  | enableDeleteWhenEmpty | *inherited* | |
@@ -447,6 +470,7 @@ Inherited defaults will take their value from the associated global attributes (
447
470
  | id | auto generated | border_ + border name e.g. border_left |
448
471
  | config | null | a place to hold json config used in your own code |
449
472
  | show | true | show/hide this border |
473
+ | enableAutoHide | false | hide border if it has zero tabs |
450
474
  | children | *required* | a list of tab nodes |
451
475
  | barSize | *inherited* | size of this border's bar in pixels; if left as 0 then the value will be calculated from the current fontSize |
452
476
  | enableDrop | *inherited* | |
@@ -4,6 +4,7 @@ declare class DragDrop {
4
4
  addGlass(fCancel: ((wasDragging: boolean) => void) | undefined): void;
5
5
  resizeGlass(): void;
6
6
  hideGlass(): void;
7
+ setGlassCursorOverride(cursor: string | undefined): void;
7
8
  startDrag(event: Event | React.MouseEvent<HTMLDivElement, MouseEvent> | React.TouchEvent<HTMLDivElement> | React.DragEvent<Element> | undefined, fDragStart: ((pos: {
8
9
  clientX: number;
9
10
  clientY: number;
@@ -1,5 +1,6 @@
1
1
  export declare enum I18nLabel {
2
2
  Close_Tab = "Close",
3
+ Close_Tabset = "Close tabset",
3
4
  Move_Tab = "Move: ",
4
5
  Move_Tabset = "Move tabset",
5
6
  Maximize = "Maximize tabset",
@@ -10,6 +10,10 @@ declare class Rect {
10
10
  equals(rect: Rect): boolean;
11
11
  getBottom(): number;
12
12
  getRight(): number;
13
+ getCenter(): {
14
+ x: number;
15
+ y: number;
16
+ };
13
17
  positionElement(element: HTMLElement, position?: string): void;
14
18
  styleWithPosition(style: Record<string, any>, position?: string): Record<string, any>;
15
19
  contains(x: number, y: number): boolean;
@@ -8,6 +8,8 @@ export declare enum CLASSES {
8
8
  FLEXLAYOUT__BORDER_BUTTON_TRAILING = "flexlayout__border_button_trailing",
9
9
  FLEXLAYOUT__BORDER_BUTTON__SELECTED = "flexlayout__border_button--selected",
10
10
  FLEXLAYOUT__BORDER_BUTTON__UNSELECTED = "flexlayout__border_button--unselected",
11
+ FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW = "flexlayout__border_toolbar_button_overflow",
12
+ FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_ = "flexlayout__border_toolbar_button_overflow_",
11
13
  FLEXLAYOUT__BORDER_INNER = "flexlayout__border_inner",
12
14
  FLEXLAYOUT__BORDER_INNER_ = "flexlayout__border_inner_",
13
15
  FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER = "flexlayout__border_inner_tab_container",
@@ -25,7 +27,9 @@ export declare enum CLASSES {
25
27
  FLEXLAYOUT__FLOATING_WINDOW_TAB = "flexlayout__floating_window_tab",
26
28
  FLEXLAYOUT__LAYOUT = "flexlayout__layout",
27
29
  FLEXLAYOUT__OUTLINE_RECT = "flexlayout__outline_rect",
30
+ FLEXLAYOUT__OUTLINE_RECT_EDGE = "flexlayout__outline_rect_edge",
28
31
  FLEXLAYOUT__SPLITTER = "flexlayout__splitter",
32
+ FLEXLAYOUT__SPLITTER_EXTRA = "flexlayout__splitter_extra",
29
33
  FLEXLAYOUT__SPLITTER_ = "flexlayout__splitter_",
30
34
  FLEXLAYOUT__SPLITTER_BORDER = "flexlayout__splitter_border",
31
35
  FLEXLAYOUT__SPLITTER_DRAG = "flexlayout__splitter_drag",
@@ -57,5 +61,9 @@ export declare enum CLASSES {
57
61
  FLEXLAYOUT__TAB_TOOLBAR_BUTTON = "flexlayout__tab_toolbar_button",
58
62
  FLEXLAYOUT__TAB_TOOLBAR_BUTTON_ = "flexlayout__tab_toolbar_button-",
59
63
  FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT = "flexlayout__tab_toolbar_button-float",
60
- FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER = "flexlayout__tab_toolbar_sticky_buttons_container"
64
+ FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER = "flexlayout__tab_toolbar_sticky_buttons_container",
65
+ FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE = "flexlayout__tab_toolbar_button-close",
66
+ FLEXLAYOUT__POPUP_MENU_CONTAINER = "flexlayout__popup_menu_container",
67
+ FLEXLAYOUT__POPUP_MENU_ITEM = "flexlayout__popup_menu_item",
68
+ FLEXLAYOUT__POPUP_MENU = "flexlayout__popup_menu"
61
69
  }
@@ -7,6 +7,7 @@ declare class Actions {
7
7
  static ADD_NODE: string;
8
8
  static MOVE_NODE: string;
9
9
  static DELETE_TAB: string;
10
+ static DELETE_TABSET: string;
10
11
  static RENAME_TAB: string;
11
12
  static SELECT_TAB: string;
12
13
  static SET_ACTIVE_TABSET: string;
@@ -24,7 +25,7 @@ declare class Actions {
24
25
  * @param location the location where the new tab will be added, one of the DockLocation enum values.
25
26
  * @param index for docking to the center this value is the index of the tab, use -1 to add to the end.
26
27
  * @param select (optional) whether to select the new tab, overriding autoSelectTab
27
- * @returns {{type: (string|string), json: *, toNode: *, location: (*|string), index: *, select?: boolean}}
28
+ * @returns {Action} the action
28
29
  */
29
30
  static addNode(json: any, toNodeId: string, location: DockLocation, index: number, select?: boolean): Action;
30
31
  /**
@@ -34,32 +35,38 @@ declare class Actions {
34
35
  * @param location the location where the moved node will be added, one of the DockLocation enum values.
35
36
  * @param index for docking to the center this value is the index of the tab, use -1 to add to the end.
36
37
  * @param select (optional) whether to select the moved tab(s) in new tabset, overriding autoSelectTab
37
- * @returns {{type: (string|string), fromNode: *, toNode: *, location: (*|string), index: *}}
38
+ * @returns {Action} the action
38
39
  */
39
40
  static moveNode(fromNodeId: string, toNodeId: string, location: DockLocation, index: number, select?: boolean): Action;
40
41
  /**
41
42
  * Deletes a tab node from the layout
42
- * @param tabNodeId the id of the node to delete
43
- * @returns {{type: (string|string), node: *}}
43
+ * @param tabsetNodeId the id of the tab node to delete
44
+ * @returns {Action} the action
44
45
  */
45
46
  static deleteTab(tabNodeId: string): Action;
47
+ /**
48
+ * Deletes a tabset node and all it's child tab nodes from the layout
49
+ * @param tabsetNodeId the id of the tabset node to delete
50
+ * @returns {Action} the action
51
+ */
52
+ static deleteTabset(tabsetNodeId: string): Action;
46
53
  /**
47
54
  * Change the given nodes tab text
48
55
  * @param tabNodeId the id of the node to rename
49
56
  * @param text the test of the tab
50
- * @returns {{type: (string|string), node: *, text: *}}
57
+ * @returns {Action} the action
51
58
  */
52
59
  static renameTab(tabNodeId: string, text: string): Action;
53
60
  /**
54
61
  * Selects the given tab in its parent tabset
55
62
  * @param tabNodeId the id of the node to set selected
56
- * @returns {{type: (string|string), tabNode: *}}
63
+ * @returns {Action} the action
57
64
  */
58
65
  static selectTab(tabNodeId: string): Action;
59
66
  /**
60
67
  * Set the given tabset node as the active tabset
61
68
  * @param tabsetNodeId the id of the tabset node to set as active
62
- * @returns {{type: (string|string), tabsetNode: *}}
69
+ * @returns {Action} the action
63
70
  */
64
71
  static setActiveTabset(tabsetNodeId: string): Action;
65
72
  /**
@@ -68,7 +75,7 @@ declare class Actions {
68
75
  * Actions.adjustSplit({node1: "1", weight1:30, pixelWidth1:300, node2: "2", weight2:70, pixelWidth2:700});
69
76
  *
70
77
  * @param splitSpec an object the defines the new split between two tabsets, see example below.
71
- * @returns {{type: (string|string), node1: *, weight1: *, pixelWidth1: *, node2: *, weight2: *, pixelWidth2: *}}
78
+ * @returns {Action} the action
72
79
  */
73
80
  static adjustSplit(splitSpec: {
74
81
  node1Id: string;
@@ -82,20 +89,20 @@ declare class Actions {
82
89
  /**
83
90
  * Maximizes the given tabset
84
91
  * @param tabsetNodeId the id of the tabset to maximize
85
- * @returns {{type: (string|string), node: *}}
92
+ * @returns {Action} the action
86
93
  */
87
94
  static maximizeToggle(tabsetNodeId: string): Action;
88
95
  /**
89
96
  * Updates the global model jsone attributes
90
97
  * @param attributes the json for the model attributes to update (merge into the existing attributes)
91
- * @returns {{type: (string|string), json: *}}
98
+ * @returns {Action} the action
92
99
  */
93
100
  static updateModelAttributes(attributes: any): Action;
94
101
  /**
95
102
  * Updates the given nodes json attributes
96
103
  * @param nodeId the id of the node to update
97
104
  * @param attributes the json attributes to update (merge with the existing attributes)
98
- * @returns {{type: (string|string), node: *, json: *}}
105
+ * @returns {Action} the action
99
106
  */
100
107
  static updateNodeAttributes(nodeId: string, attributes: any): Action;
101
108
  static floatTab(nodeId: string): Action;
@@ -14,7 +14,7 @@ declare class BorderNode extends Node implements IDropTarget {
14
14
  isAutoSelectTab(whenOpen?: boolean): boolean;
15
15
  getClassName(): string | undefined;
16
16
  getBorderBarSize(): number;
17
- getSize(): number;
17
+ getSize(): any;
18
18
  getMinSize(): number;
19
19
  getSelected(): number;
20
20
  getSelectedNode(): Node | undefined;
@@ -29,6 +29,7 @@ declare class BorderNode extends Node implements IDropTarget {
29
29
  getConfig(): any;
30
30
  isMaximized(): boolean;
31
31
  isShowing(): boolean;
32
+ isAutoHide(): boolean;
32
33
  toJson(): IJsonBorderNode;
33
34
  }
34
35
  export default BorderNode;
@@ -31,13 +31,17 @@ export interface IGlobalAttributes {
31
31
  borderAutoSelectTabWhenOpen?: boolean;
32
32
  borderBarSize?: number;
33
33
  borderClassName?: string;
34
+ borderEnableAutoHide?: boolean;
34
35
  borderEnableDrop?: boolean;
35
36
  borderMinSize?: number;
36
37
  borderSize?: number;
37
38
  enableEdgeDock?: boolean;
38
39
  marginInsets?: IInsets;
39
40
  rootOrientationVertical?: boolean;
41
+ splitterExtra?: number;
40
42
  splitterSize?: number;
43
+ tabBorderHeight?: number;
44
+ tabBorderWidth?: number;
41
45
  tabClassName?: string;
42
46
  tabCloseType?: ICloseType;
43
47
  tabDragSpeed?: number;
@@ -51,6 +55,7 @@ export interface IGlobalAttributes {
51
55
  tabSetBorderInsets?: IInsets;
52
56
  tabSetClassNameHeader?: string;
53
57
  tabSetClassNameTabStrip?: string;
58
+ tabSetEnableClose?: boolean;
54
59
  tabSetEnableDeleteWhenEmpty?: boolean;
55
60
  tabSetEnableDivide?: boolean;
56
61
  tabSetEnableDrag?: boolean;
@@ -77,6 +82,7 @@ export interface ITabSetAttributes {
77
82
  classNameHeader?: string;
78
83
  classNameTabStrip?: string;
79
84
  config?: any;
85
+ enableClose?: boolean;
80
86
  enableDeleteWhenEmpty?: boolean;
81
87
  enableDivide?: boolean;
82
88
  enableDrag?: boolean;
@@ -98,6 +104,8 @@ export interface ITabSetAttributes {
98
104
  width?: number;
99
105
  }
100
106
  export interface ITabAttributes {
107
+ borderHeight?: number;
108
+ borderWidth?: number;
101
109
  className?: string;
102
110
  closeType?: ICloseType;
103
111
  component?: string;
@@ -108,6 +116,7 @@ export interface ITabAttributes {
108
116
  enableRename?: boolean;
109
117
  enableRenderOnDemand?: boolean;
110
118
  floating?: boolean;
119
+ helpText?: string;
111
120
  icon?: string;
112
121
  id?: string;
113
122
  name?: string;
@@ -119,6 +128,7 @@ export interface IBorderAttributes {
119
128
  barSize?: number;
120
129
  className?: string;
121
130
  config?: any;
131
+ enableAutoHide?: boolean;
122
132
  enableDrop?: boolean;
123
133
  minSize?: number;
124
134
  selected?: number;
@@ -59,6 +59,7 @@ declare class Model {
59
59
  */
60
60
  toJson(): IJsonModel;
61
61
  getSplitterSize(): number;
62
+ getSplitterExtra(): number;
62
63
  isEnableEdgeDock(): boolean;
63
64
  /**
64
65
  * Sets a function to allow/deny dropping a node
@@ -7,6 +7,7 @@ declare class TabNode extends Node implements IDraggable {
7
7
  getWindow(): Window | undefined;
8
8
  getTabRect(): Rect | undefined;
9
9
  getName(): string;
10
+ getHelpText(): string | undefined;
10
11
  getComponent(): string | undefined;
11
12
  /**
12
13
  * Returns the config attribute that can be used to store node specific data that
@@ -27,6 +27,7 @@ declare class TabSetNode extends Node implements IDraggable, IDropTarget {
27
27
  isEnableDrag(): boolean;
28
28
  isEnableDivide(): boolean;
29
29
  isEnableMaximize(): boolean;
30
+ isEnableClose(): boolean;
30
31
  canMaximize(): boolean;
31
32
  isEnableTabStrip(): boolean;
32
33
  isAutoSelectTab(): boolean;