flexlayout-react 0.5.18 → 0.6.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.
Files changed (92) hide show
  1. package/ChangeLog.txt +27 -0
  2. package/README.md +126 -108
  3. package/declarations/Types.d.ts +8 -1
  4. package/declarations/model/IJsonModel.d.ts +3 -0
  5. package/declarations/model/Model.d.ts +2 -0
  6. package/declarations/view/Icons.d.ts +6 -0
  7. package/declarations/view/Layout.d.ts +8 -4
  8. package/declarations/view/MenuTabButton.d.ts +1 -0
  9. package/declarations/view/TabButtonStamp.d.ts +1 -0
  10. package/declarations/view/Utils.d.ts +1 -0
  11. package/dist/flexlayout.js +53 -17
  12. package/dist/flexlayout_min.js +1 -1
  13. package/lib/PopupMenu.js +22 -12
  14. package/lib/PopupMenu.js.map +1 -1
  15. package/lib/Types.js +7 -0
  16. package/lib/Types.js.map +1 -1
  17. package/lib/model/BorderNode.js +8 -7
  18. package/lib/model/BorderNode.js.map +1 -1
  19. package/lib/model/Model.js +15 -3
  20. package/lib/model/Model.js.map +1 -1
  21. package/lib/model/RowNode.js +19 -5
  22. package/lib/model/RowNode.js.map +1 -1
  23. package/lib/model/TabNode.js +6 -1
  24. package/lib/model/TabNode.js.map +1 -1
  25. package/lib/model/TabSetNode.js +8 -4
  26. package/lib/model/TabSetNode.js.map +1 -1
  27. package/lib/view/BorderButton.js +19 -38
  28. package/lib/view/BorderButton.js.map +1 -1
  29. package/lib/view/BorderTabSet.js +19 -8
  30. package/lib/view/BorderTabSet.js.map +1 -1
  31. package/lib/view/FloatingWindow.js +13 -5
  32. package/lib/view/FloatingWindow.js.map +1 -1
  33. package/lib/view/Icons.js +36 -0
  34. package/lib/view/Icons.js.map +1 -0
  35. package/lib/view/Layout.js +148 -71
  36. package/lib/view/Layout.js.map +1 -1
  37. package/lib/view/MenuTabButton.js +22 -0
  38. package/lib/view/MenuTabButton.js.map +1 -0
  39. package/lib/view/Splitter.js +3 -3
  40. package/lib/view/Splitter.js.map +1 -1
  41. package/lib/view/Tab.js +9 -6
  42. package/lib/view/Tab.js.map +1 -1
  43. package/lib/view/TabButton.js +20 -44
  44. package/lib/view/TabButton.js.map +1 -1
  45. package/lib/view/TabButtonStamp.js +22 -0
  46. package/lib/view/TabButtonStamp.js.map +1 -0
  47. package/lib/view/TabFloating.js +29 -15
  48. package/lib/view/TabFloating.js.map +1 -1
  49. package/lib/view/TabOverflowHook.js +1 -1
  50. package/lib/view/TabSet.js +40 -25
  51. package/lib/view/TabSet.js.map +1 -1
  52. package/lib/view/Utils.js +61 -0
  53. package/lib/view/Utils.js.map +1 -0
  54. package/package.json +11 -6
  55. package/src/I18nLabel.ts +1 -1
  56. package/src/PopupMenu.tsx +54 -15
  57. package/src/Types.ts +7 -0
  58. package/src/model/BorderNode.ts +8 -7
  59. package/src/model/IJsonModel.ts +3 -0
  60. package/src/model/Model.ts +19 -3
  61. package/src/model/RowNode.ts +8 -5
  62. package/src/model/TabNode.ts +6 -1
  63. package/src/model/TabSetNode.ts +8 -4
  64. package/src/view/BorderButton.tsx +38 -43
  65. package/src/view/BorderTabSet.tsx +34 -7
  66. package/src/view/FloatingWindow.tsx +14 -6
  67. package/src/view/Icons.tsx +36 -0
  68. package/src/view/Layout.tsx +179 -88
  69. package/src/view/Splitter.tsx +4 -1
  70. package/src/view/Tab.tsx +17 -6
  71. package/src/view/TabButton.tsx +42 -55
  72. package/src/view/TabButtonStamp.tsx +47 -0
  73. package/src/view/TabFloating.tsx +47 -23
  74. package/src/view/TabOverflowHook.tsx +1 -1
  75. package/src/view/TabSet.tsx +71 -22
  76. package/src/view/Utils.tsx +71 -0
  77. package/style/_base.scss +146 -92
  78. package/style/dark.css +157 -129
  79. package/style/dark.css.map +1 -1
  80. package/style/dark.scss +31 -21
  81. package/style/gray.css +157 -129
  82. package/style/gray.css.map +1 -1
  83. package/style/gray.scss +30 -23
  84. package/style/light.css +157 -129
  85. package/style/light.css.map +1 -1
  86. package/style/light.scss +30 -20
  87. package/images/close.png +0 -0
  88. package/images/maximize.png +0 -0
  89. package/images/more.png +0 -0
  90. package/images/more2.png +0 -0
  91. package/images/popout.png +0 -0
  92. package/images/restore.png +0 -0
package/ChangeLog.txt CHANGED
@@ -1,3 +1,30 @@
1
+ 0.6.0
2
+ Changed icons to use svg images, these will now scale with the font size.
3
+ Improved element spacing, removed most margin/padding spacers.
4
+ The overflow menu and drag rectangle will now show the tab icon and content as rendered in the tab.
5
+ Added altName attribute to TabNode, this will be used as the name in the overflow menu if there is no
6
+ name attribute (e.g the tab has just an icon).
7
+ Changed the drag outline colors from red/green to light blue/green.
8
+ Removed closeIcon prop from Layout, use the icons property instead.
9
+ Changed onRenderDragRect callback to take a ReactElement rather than a string, the content now
10
+ contains the tabbutton as rendered.
11
+
12
+ 0.5.21
13
+ Fixed copying stylesheet links for popout windows when cssRules throw exception.
14
+ Added option, enableUseVisibility, to allow use of visibility: hidden rather than display:none for hiding elements.
15
+
16
+ 0.5.20
17
+ Added Cypress Tests
18
+ Fixed bug with tab icon not showing
19
+
20
+ 0.5.19
21
+ Added onRenderFloatingTabPlaceholder callback prop for rendering the floating tab placeholder.
22
+ Changed style sheets to use CSS custom properties (variables) for several values.
23
+ Fix selected index in single empty tabset.
24
+ Added onContextMenu callback prop for handling context menus on tabs and tabsets.
25
+ Added onAuxMouseClick callback prop for handling mouse clicks on tabs and tabsets
26
+ with alt, meta, shift keys, also handles center mouse clicks
27
+
1
28
  0.5.18
2
29
  Added onRenderDragRect callback prop for rendering the drag rectangles
3
30
  New border attribute: enableAutoHide, to hide border if it has zero tabs
package/README.md CHANGED
@@ -4,9 +4,9 @@ FlexLayout is a layout manager that arranges React components in multiple tab se
4
4
 
5
5
  ![FlexLayout Demo Screenshot](/../screenshots/github_images/v0.5/demo1.png?raw=true "FlexLayout Demo Screenshot")
6
6
 
7
- [Run the Demo](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.5/demo/index.html)
7
+ [Run the Demo](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.6/demo/index.html)
8
8
 
9
- Try it now using [JSFiddle](https://jsfiddle.net/7oe4q2pc/)
9
+ Try it now using [JSFiddle](https://jsfiddle.net/18zfp0qm/)
10
10
 
11
11
  <!-- [API Doc](./typedoc/index.html) -->
12
12
 
@@ -66,26 +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`, `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. |
88
- | onRenderDragRect | optional | callback for rendering the drag rectangles |
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
+
89
102
 
90
103
  The model is tree of Node objects that define the structure of the layout.
91
104
 
@@ -105,38 +118,36 @@ render() {
105
118
 
106
119
  ```javascript
107
120
  var json = {
108
- global: {},
109
- borders: [],
110
- layout:{
111
- "type": "row",
112
- "weight": 100,
113
- "children": [
114
- {
115
- "type": "tabset",
116
- "weight": 50,
117
- "selected": 0,
118
- "children": [
119
- {
120
- "type": "tab",
121
- "name": "FX",
122
- "component":"grid",
123
- }
124
- ]
125
- },
126
- {
127
- "type": "tabset",
128
- "weight": 50,
129
- "selected": 0,
130
- "children": [
131
- {
132
- "type": "tab",
133
- "name": "FI",
134
- "component":"grid",
135
- }
136
- ]
137
- }
138
- ]
139
- }
121
+ global: {},
122
+ borders: [],
123
+ layout: {
124
+ type: "row",
125
+ weight: 100,
126
+ children: [
127
+ {
128
+ type: "tabset",
129
+ weight: 50,
130
+ children: [
131
+ {
132
+ type: "tab",
133
+ name: "One",
134
+ component: "button",
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ type: "tabset",
140
+ weight: 50,
141
+ children: [
142
+ {
143
+ type: "tab",
144
+ name: "Two",
145
+ component: "button",
146
+ }
147
+ ]
148
+ }
149
+ ]
150
+ }
140
151
  };
141
152
  ```
142
153
 
@@ -174,7 +185,7 @@ ReactDOM.render(<Main/>, document.getElementById("container"));
174
185
 
175
186
  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.
176
187
 
177
- Try it now using [JSFiddle](https://jsfiddle.net/7oe4q2pc/)
188
+ Try it now using [JSFiddle](https://jsfiddle.net/18zfp0qm/)
178
189
 
179
190
  A simple Create React App (CRA) example (using typescript) can be found here:
180
191
 
@@ -202,56 +213,56 @@ The model json contains 3 top level elements:
202
213
 
203
214
  Weights on rows and tabsets specify the relative weight of these nodes within the parent row, the actual values do not matter just their relative values (ie two tabsets of weights 30,70 would render the same if they had weights of 3,7).
204
215
 
205
- NOTE: the easiest way to create your initial layout JSON is to use the [demo](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.5/demo/index.html) app, modify one of the
216
+ NOTE: the easiest way to create your initial layout JSON is to use the [demo](https://rawgit.com/caplin/FlexLayout/demos/demos/v0.6/demo/index.html) app, modify one of the
206
217
  existing layouts by dragging/dropping and adding nodes then press the 'Show Layout JSON in console' button to print the JSON to the browser developer console.
207
218
 
208
219
 
209
220
  example borders section:
210
221
  ```
211
- "borders": [
212
- {
213
- "type":"border",
214
- "location": "left",
215
- "children": [
216
- {
217
- "type": "tab",
218
- "enableClose":false,
219
- "name": "Navigation",
220
- "component": "grid",
221
- }
222
- ]
223
- },
224
- {
225
- "type":"border",
226
- "location": "right",
227
- "children": [
228
- {
229
- "type": "tab",
230
- "enableClose":false,
231
- "name": "Options",
232
- "component": "grid",
233
- }
234
- ]
235
- },
236
- {
237
- "type":"border",
238
- "location": "bottom",
239
- "children": [
240
- {
241
- "type": "tab",
242
- "enableClose":false,
243
- "name": "Activity Blotter",
244
- "component": "grid",
245
- },
246
- {
247
- "type": "tab",
248
- "enableClose":false,
249
- "name": "Execution Blotter",
250
- "component": "grid",
251
- }
252
- ]
253
- }
254
- ]
222
+ borders: [
223
+ {
224
+ type: "border",
225
+ location: "left",
226
+ children: [
227
+ {
228
+ type: "tab",
229
+ enableClose: false,
230
+ name: "Navigation",
231
+ component: "grid",
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ type: "border",
237
+ location: "right",
238
+ children: [
239
+ {
240
+ type: "tab",
241
+ enableClose: false,
242
+ name: "Options",
243
+ component: "grid",
244
+ }
245
+ ]
246
+ },
247
+ {
248
+ type: "border",
249
+ location: "bottom",
250
+ children: [
251
+ {
252
+ type: "tab",
253
+ enableClose: false,
254
+ name: "Activity Blotter",
255
+ component: "grid",
256
+ },
257
+ {
258
+ type: "tab",
259
+ enableClose: false,
260
+ name: "Execution Blotter",
261
+ component: "grid",
262
+ }
263
+ ]
264
+ }
265
+ ]
255
266
  ```
256
267
 
257
268
  To control where nodes can be dropped you can add a callback function to the model:
@@ -324,6 +335,7 @@ Attributes allowed in the 'global' element
324
335
  | ------------- |:-------------:| -----|
325
336
  | splitterSize | 8 | width in pixels of all splitters between tabsets/borders |
326
337
  | splitterExtra | 0 | additional width in pixels of the splitter hit test area |
338
+ | legacyOverflowMenu | false | use the legacy text only overflow menu |
327
339
  | enableEdgeDock | true | |
328
340
  | tabEnableClose | true | allow user to close all tabs via close button |
329
341
  | tabCloseType | 1 | see values in ICloseType |
@@ -384,7 +396,8 @@ Inherited defaults will take their value from the associated global attributes (
384
396
  | Attribute | Default | Description |
385
397
  | ------------- |:-------------:| -----|
386
398
  | type | tab | |
387
- | name | *required* | internal unique string identifying tab (for factory) |
399
+ | name | *required* | name of tab to be displayed in the tab button |
400
+ | altName | *optional* | if there is no name specifed then this value will be used in the overflow menu |
388
401
  | component | *required* | string identifying which component to run (for factory) |
389
402
  | config | null | a place to hold json config for the hosted component |
390
403
  | id | auto generated | |
@@ -570,13 +583,6 @@ First install dependencies:
570
583
  yarn install
571
584
  ```
572
585
 
573
- Install the peer dependencies:
574
-
575
- ```
576
- yarn add react
577
- yarn add react-dom
578
- ```
579
-
580
586
  Compile the project and run the examples:
581
587
 
582
588
  ```
@@ -588,4 +594,16 @@ Open your browser at http://localhost:8080/examples/ to show the examples direct
588
594
  The 'yarn start' command will watch for changes to flexlayout and example source, so you can make changes to the code
589
595
  and then refresh the browser to see the result.
590
596
 
597
+ To run the tests in the Cypress interactive runner use:
598
+
599
+ ```
600
+ yarn cypress
601
+ ```
602
+
603
+ ![FlexLayout Cypress tests](/../screenshots/github_images/CypressTests.png?raw=true "Cypress interactive runner Screenshot")
604
+
605
+
591
606
  To build the npm distribution run 'yarn build', this will create the artifacts in the dist dir.
607
+
608
+
609
+
@@ -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,6 +27,7 @@ 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",
29
32
  FLEXLAYOUT__SPLITTER_EXTRA = "flexlayout__splitter_extra",
30
33
  FLEXLAYOUT__SPLITTER_ = "flexlayout__splitter_",
@@ -52,6 +55,7 @@ export declare enum CLASSES {
52
55
  FLEXLAYOUT__TAB_BUTTON_OVERFLOW = "flexlayout__tab_button_overflow",
53
56
  FLEXLAYOUT__TAB_BUTTON_TEXTBOX = "flexlayout__tab_button_textbox",
54
57
  FLEXLAYOUT__TAB_BUTTON_TRAILING = "flexlayout__tab_button_trailing",
58
+ FLEXLAYOUT__TAB_BUTTON_STAMP = "flexlayout__tab_button_stamp",
55
59
  FLEXLAYOUT__TAB_FLOATING = "flexlayout__tab_floating",
56
60
  FLEXLAYOUT__TAB_FLOATING_INNER = "flexlayout__tab_floating_inner",
57
61
  FLEXLAYOUT__TAB_TOOLBAR = "flexlayout__tab_toolbar",
@@ -59,5 +63,8 @@ export declare enum CLASSES {
59
63
  FLEXLAYOUT__TAB_TOOLBAR_BUTTON_ = "flexlayout__tab_toolbar_button-",
60
64
  FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT = "flexlayout__tab_toolbar_button-float",
61
65
  FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER = "flexlayout__tab_toolbar_sticky_buttons_container",
62
- FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE = "flexlayout__tab_toolbar_button-close"
66
+ FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE = "flexlayout__tab_toolbar_button-close",
67
+ FLEXLAYOUT__POPUP_MENU_CONTAINER = "flexlayout__popup_menu_container",
68
+ FLEXLAYOUT__POPUP_MENU_ITEM = "flexlayout__popup_menu_item",
69
+ FLEXLAYOUT__POPUP_MENU = "flexlayout__popup_menu"
63
70
  }
@@ -36,6 +36,8 @@ export interface IGlobalAttributes {
36
36
  borderMinSize?: number;
37
37
  borderSize?: number;
38
38
  enableEdgeDock?: boolean;
39
+ enableUseVisibility?: boolean;
40
+ legacyOverflowMenu?: boolean;
39
41
  marginInsets?: IInsets;
40
42
  rootOrientationVertical?: boolean;
41
43
  splitterExtra?: number;
@@ -104,6 +106,7 @@ export interface ITabSetAttributes {
104
106
  width?: number;
105
107
  }
106
108
  export interface ITabAttributes {
109
+ altName?: string;
107
110
  borderHeight?: number;
108
111
  borderWidth?: number;
109
112
  className?: string;
@@ -31,6 +31,7 @@ declare class Model {
31
31
  */
32
32
  getRoot(): RowNode;
33
33
  isRootOrientationVertical(): boolean;
34
+ isUseVisibility(): boolean;
34
35
  /**
35
36
  * Gets the
36
37
  * @returns {BorderSet|*}
@@ -59,6 +60,7 @@ declare class Model {
59
60
  */
60
61
  toJson(): IJsonModel;
61
62
  getSplitterSize(): number;
63
+ isLegacyOverflowMenu(): boolean;
62
64
  getSplitterExtra(): number;
63
65
  isEnableEdgeDock(): boolean;
64
66
  /**
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const CloseIcon: () => JSX.Element;
3
+ export declare const MaximizeIcon: () => JSX.Element;
4
+ export declare const OverflowIcon: () => JSX.Element;
5
+ export declare const PopoutIcon: () => JSX.Element;
6
+ export declare const RestoreIcon: () => JSX.Element;
@@ -10,7 +10,9 @@ import TabSetNode from "../model/TabSetNode";
10
10
  import Rect from "../Rect";
11
11
  import { IJsonTabNode } from "../model/IJsonModel";
12
12
  export declare type CustomDragCallback = (dragging: TabNode | IJsonTabNode, over: TabNode, x: number, y: number, location: DockLocation) => void;
13
- export declare type DragRectRenderCallback = (text: String, node?: Node, json?: IJsonTabNode) => React.ReactElement | undefined;
13
+ export declare type DragRectRenderCallback = (content: React.ReactElement | undefined, node?: Node, json?: IJsonTabNode) => React.ReactElement | undefined;
14
+ export declare type FloatingTabPlaceholderRenderCallback = (dockPopout: () => void, showPopout: () => void) => React.ReactElement | undefined;
15
+ export declare type NodeMouseEvent = (node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
14
16
  export interface ILayoutProps {
15
17
  model: Model;
16
18
  factory: (node: TabNode) => React.ReactNode;
@@ -18,7 +20,6 @@ export interface ILayoutProps {
18
20
  fontFamily?: string;
19
21
  iconFactory?: (node: TabNode) => React.ReactNode | undefined;
20
22
  titleFactory?: (node: TabNode) => ITitleObject | React.ReactNode | undefined;
21
- closeIcon?: React.ReactNode;
22
23
  icons?: IIcons;
23
24
  onAction?: (action: Action) => Action | undefined;
24
25
  onRenderTab?: (node: TabNode, renderValues: ITabRenderValues) => void;
@@ -44,6 +45,9 @@ export interface ILayoutProps {
44
45
  cursor?: string | undefined;
45
46
  };
46
47
  onRenderDragRect?: DragRectRenderCallback;
48
+ onRenderFloatingTabPlaceholder?: FloatingTabPlaceholderRenderCallback;
49
+ onContextMenu?: NodeMouseEvent;
50
+ onAuxMouseClick?: NodeMouseEvent;
47
51
  }
48
52
  export interface IFontValues {
49
53
  size?: string;
@@ -116,7 +120,7 @@ export declare class Layout extends React.Component<ILayoutProps, ILayoutState>
116
120
  * @param json the json for the new tab node
117
121
  * @param onDrop a callback to call when the drag is complete (node and event will be undefined if the drag was cancelled)
118
122
  */
119
- addTabWithDragAndDrop(dragText: string, json: IJsonTabNode, onDrop?: (node?: Node, event?: Event) => void): void;
123
+ addTabWithDragAndDrop(dragText: string | undefined, json: IJsonTabNode, onDrop?: (node?: Node, event?: Event) => void): void;
120
124
  /**
121
125
  * Adds a new tab by dragging a labeled panel to the drop location, dragging starts when you
122
126
  * mouse down on the panel
@@ -125,6 +129,6 @@ export declare class Layout extends React.Component<ILayoutProps, ILayoutState>
125
129
  * @param json the json for the new tab node
126
130
  * @param onDrop a callback to call when the drag is complete (node and event will be undefined if the drag was cancelled)
127
131
  */
128
- addTabWithDragAndDropIndirect(dragText: string, json: IJsonTabNode, onDrop?: (node?: Node, event?: Event) => void): void;
132
+ addTabWithDragAndDropIndirect(dragText: string | undefined, json: IJsonTabNode, onDrop?: (node?: Node, event?: Event) => void): void;
129
133
  }
130
134
  export default Layout;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};