flexlayout-react 0.8.12 → 0.8.13

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 (307) hide show
  1. package/README.md +16 -5
  2. package/declarations/Attribute.d.ts +25 -1
  3. package/declarations/AttributeDefinitions.d.ts +18 -1
  4. package/declarations/DockLocation.d.ts +22 -0
  5. package/declarations/I18nLabel.d.ts +2 -1
  6. package/declarations/Orientation.d.ts +4 -0
  7. package/declarations/Rect.d.ts +3 -0
  8. package/declarations/index.d.ts +1 -0
  9. package/declarations/model/BorderNode.d.ts +53 -0
  10. package/declarations/model/BorderSet.d.ts +28 -0
  11. package/declarations/model/IDraggable.d.ts +4 -0
  12. package/declarations/model/IDropTarget.d.ts +10 -0
  13. package/declarations/model/LayoutWindow.d.ts +16 -0
  14. package/declarations/model/Model.d.ts +55 -0
  15. package/declarations/model/Node.d.ts +61 -0
  16. package/declarations/model/RowNode.d.ts +67 -0
  17. package/declarations/model/TabNode.d.ts +79 -0
  18. package/declarations/model/TabSetNode.d.ts +60 -0
  19. package/declarations/model/Utils.d.ts +8 -0
  20. package/declarations/view/BorderButton.d.ts +13 -1
  21. package/declarations/view/BorderTab.d.ts +8 -0
  22. package/declarations/view/BorderTabSet.d.ts +10 -1
  23. package/declarations/view/DragContainer.d.ts +9 -1
  24. package/declarations/view/ErrorBoundary.d.ts +22 -1
  25. package/declarations/view/Icons.d.ts +1 -0
  26. package/declarations/view/Layout.d.ts +143 -1
  27. package/declarations/view/Overlay.d.ts +8 -1
  28. package/declarations/view/PopoutWindow.d.ts +14 -1
  29. package/declarations/view/PopupMenu.d.ts +12 -1
  30. package/declarations/view/Row.d.ts +9 -1
  31. package/declarations/view/Splitter.d.ts +14 -1
  32. package/declarations/view/Tab.d.ts +11 -1
  33. package/declarations/view/TabButton.d.ts +11 -1
  34. package/declarations/view/TabButtonStamp.d.ts +9 -1
  35. package/declarations/view/TabOverflowHook.d.ts +16 -1
  36. package/declarations/view/TabSet.d.ts +9 -1
  37. package/declarations/view/Utils.d.ts +13 -0
  38. package/lib/index.js +6410 -22
  39. package/package.json +34 -26
  40. package/ChangeLog.txt +0 -372
  41. package/declarations/DragDrop.d.ts +0 -15
  42. package/declarations/PopupMenu.d.ts +0 -1
  43. package/declarations/model/SplitterNode.d.ts +0 -5
  44. package/declarations/model/WindowLayout.d.ts +0 -24
  45. package/declarations/src/Attribute.d.ts +0 -1
  46. package/declarations/src/AttributeDefinitions.d.ts +0 -1
  47. package/declarations/src/DockLocation.d.ts +0 -12
  48. package/declarations/src/DropInfo.d.ts +0 -12
  49. package/declarations/src/I18nLabel.d.ts +0 -10
  50. package/declarations/src/Orientation.d.ts +0 -7
  51. package/declarations/src/PopupMenu.d.ts +0 -1
  52. package/declarations/src/Rect.d.ts +0 -31
  53. package/declarations/src/Types.d.ts +0 -92
  54. package/declarations/src/index.d.ts +0 -20
  55. package/declarations/src/model/Action.d.ts +0 -5
  56. package/declarations/src/model/Actions.d.ts +0 -110
  57. package/declarations/src/model/BorderNode.d.ts +0 -28
  58. package/declarations/src/model/BorderSet.d.ts +0 -3
  59. package/declarations/src/model/ICloseType.d.ts +0 -5
  60. package/declarations/src/model/IDraggable.d.ts +0 -2
  61. package/declarations/src/model/IDropTarget.d.ts +0 -2
  62. package/declarations/src/model/IJsonModel.d.ts +0 -153
  63. package/declarations/src/model/Model.d.ts +0 -98
  64. package/declarations/src/model/Node.d.ts +0 -16
  65. package/declarations/src/model/RowNode.d.ts +0 -11
  66. package/declarations/src/model/TabNode.d.ts +0 -36
  67. package/declarations/src/model/TabSetNode.d.ts +0 -37
  68. package/declarations/src/model/Utils.d.ts +0 -1
  69. package/declarations/src/view/BorderButton.d.ts +0 -1
  70. package/declarations/src/view/BorderTab.d.ts +0 -2
  71. package/declarations/src/view/BorderTabSet.d.ts +0 -1
  72. package/declarations/src/view/DragContainer.d.ts +0 -1
  73. package/declarations/src/view/ErrorBoundary.d.ts +0 -1
  74. package/declarations/src/view/FloatingWindow.d.ts +0 -1
  75. package/declarations/src/view/Icons.d.ts +0 -7
  76. package/declarations/src/view/Layout.d.ts +0 -113
  77. package/declarations/src/view/Overlay.d.ts +0 -1
  78. package/declarations/src/view/PopupMenu.d.ts +0 -1
  79. package/declarations/src/view/Row.d.ts +0 -1
  80. package/declarations/src/view/Splitter.d.ts +0 -1
  81. package/declarations/src/view/Tab.d.ts +0 -1
  82. package/declarations/src/view/TabButton.d.ts +0 -1
  83. package/declarations/src/view/TabButtonStamp.d.ts +0 -1
  84. package/declarations/src/view/TabOverflowHook.d.ts +0 -1
  85. package/declarations/src/view/TabSet.d.ts +0 -1
  86. package/declarations/src/view/Utils.d.ts +0 -4
  87. package/declarations/view/ExtendedResizeObserver.d.ts +0 -23
  88. package/declarations/view/FloatingWindow.d.ts +0 -1
  89. package/declarations/view/FloatingWindowTab.d.ts +0 -1
  90. package/declarations/view/TabFloating.d.ts +0 -1
  91. package/dist/flexlayout.js +0 -610
  92. package/dist/flexlayout_min.js +0 -2
  93. package/dist/flexlayout_min.js.LICENSE.txt +0 -29
  94. package/dist/src/Attribute.js +0 -43
  95. package/dist/src/Attribute.js.map +0 -1
  96. package/dist/src/AttributeDefinitions.js +0 -132
  97. package/dist/src/AttributeDefinitions.js.map +0 -1
  98. package/dist/src/DockLocation.js +0 -121
  99. package/dist/src/DockLocation.js.map +0 -1
  100. package/dist/src/DropInfo.js +0 -10
  101. package/dist/src/DropInfo.js.map +0 -1
  102. package/dist/src/I18nLabel.js +0 -14
  103. package/dist/src/I18nLabel.js.map +0 -1
  104. package/dist/src/Orientation.js +0 -23
  105. package/dist/src/Orientation.js.map +0 -1
  106. package/dist/src/Rect.js +0 -111
  107. package/dist/src/Rect.js.map +0 -1
  108. package/dist/src/Types.js +0 -95
  109. package/dist/src/Types.js.map +0 -1
  110. package/dist/src/index.js +0 -22
  111. package/dist/src/index.js.map +0 -1
  112. package/dist/src/model/Action.js +0 -7
  113. package/dist/src/model/Action.js.map +0 -1
  114. package/dist/src/model/Actions.js +0 -170
  115. package/dist/src/model/Actions.js.map +0 -1
  116. package/dist/src/model/BorderNode.js +0 -390
  117. package/dist/src/model/BorderNode.js.map +0 -1
  118. package/dist/src/model/BorderSet.js +0 -67
  119. package/dist/src/model/BorderSet.js.map +0 -1
  120. package/dist/src/model/ICloseType.js +0 -7
  121. package/dist/src/model/ICloseType.js.map +0 -1
  122. package/dist/src/model/IDraggable.js +0 -2
  123. package/dist/src/model/IDraggable.js.map +0 -1
  124. package/dist/src/model/IDropTarget.js +0 -2
  125. package/dist/src/model/IDropTarget.js.map +0 -1
  126. package/dist/src/model/IJsonModel.js +0 -2
  127. package/dist/src/model/IJsonModel.js.map +0 -1
  128. package/dist/src/model/LayoutWindow.js +0 -81
  129. package/dist/src/model/LayoutWindow.js.map +0 -1
  130. package/dist/src/model/Model.js +0 -608
  131. package/dist/src/model/Model.js.map +0 -1
  132. package/dist/src/model/Node.js +0 -218
  133. package/dist/src/model/Node.js.map +0 -1
  134. package/dist/src/model/RowNode.js +0 -492
  135. package/dist/src/model/RowNode.js.map +0 -1
  136. package/dist/src/model/TabNode.js +0 -293
  137. package/dist/src/model/TabNode.js.map +0 -1
  138. package/dist/src/model/TabSetNode.js +0 -469
  139. package/dist/src/model/TabSetNode.js.map +0 -1
  140. package/dist/src/model/Utils.js +0 -48
  141. package/dist/src/model/Utils.js.map +0 -1
  142. package/dist/src/view/BorderButton.js +0 -126
  143. package/dist/src/view/BorderButton.js.map +0 -1
  144. package/dist/src/view/BorderTab.js +0 -44
  145. package/dist/src/view/BorderTab.js.map +0 -1
  146. package/dist/src/view/BorderTabSet.js +0 -138
  147. package/dist/src/view/BorderTabSet.js.map +0 -1
  148. package/dist/src/view/DragContainer.js +0 -16
  149. package/dist/src/view/DragContainer.js.map +0 -1
  150. package/dist/src/view/ErrorBoundary.js +0 -24
  151. package/dist/src/view/ErrorBoundary.js.map +0 -1
  152. package/dist/src/view/Icons.js +0 -29
  153. package/dist/src/view/Icons.js.map +0 -1
  154. package/dist/src/view/Layout.js +0 -881
  155. package/dist/src/view/Layout.js.map +0 -1
  156. package/dist/src/view/Overlay.js +0 -9
  157. package/dist/src/view/Overlay.js.map +0 -1
  158. package/dist/src/view/PopoutWindow.js +0 -129
  159. package/dist/src/view/PopoutWindow.js.map +0 -1
  160. package/dist/src/view/PopupMenu.js +0 -89
  161. package/dist/src/view/PopupMenu.js.map +0 -1
  162. package/dist/src/view/Row.js +0 -46
  163. package/dist/src/view/Row.js.map +0 -1
  164. package/dist/src/view/SizeTracker.js +0 -12
  165. package/dist/src/view/SizeTracker.js.map +0 -1
  166. package/dist/src/view/Splitter.js +0 -192
  167. package/dist/src/view/Splitter.js.map +0 -1
  168. package/dist/src/view/Tab.js +0 -91
  169. package/dist/src/view/Tab.js.map +0 -1
  170. package/dist/src/view/TabButton.js +0 -124
  171. package/dist/src/view/TabButton.js.map +0 -1
  172. package/dist/src/view/TabButtonStamp.js +0 -15
  173. package/dist/src/view/TabButtonStamp.js.map +0 -1
  174. package/dist/src/view/TabOverflowHook.js +0 -266
  175. package/dist/src/view/TabOverflowHook.js.map +0 -1
  176. package/dist/src/view/TabSet.js +0 -256
  177. package/dist/src/view/TabSet.js.map +0 -1
  178. package/dist/src/view/Utils.js +0 -110
  179. package/dist/src/view/Utils.js.map +0 -1
  180. package/lib/Attribute.js +0 -43
  181. package/lib/Attribute.js.map +0 -1
  182. package/lib/AttributeDefinitions.js +0 -132
  183. package/lib/AttributeDefinitions.js.map +0 -1
  184. package/lib/DockLocation.js +0 -121
  185. package/lib/DockLocation.js.map +0 -1
  186. package/lib/DropInfo.js +0 -10
  187. package/lib/DropInfo.js.map +0 -1
  188. package/lib/I18nLabel.js +0 -14
  189. package/lib/I18nLabel.js.map +0 -1
  190. package/lib/Orientation.js +0 -23
  191. package/lib/Orientation.js.map +0 -1
  192. package/lib/Rect.js +0 -111
  193. package/lib/Rect.js.map +0 -1
  194. package/lib/Types.js +0 -95
  195. package/lib/Types.js.map +0 -1
  196. package/lib/index.js.map +0 -1
  197. package/lib/model/Action.js +0 -7
  198. package/lib/model/Action.js.map +0 -1
  199. package/lib/model/Actions.js +0 -170
  200. package/lib/model/Actions.js.map +0 -1
  201. package/lib/model/BorderNode.js +0 -390
  202. package/lib/model/BorderNode.js.map +0 -1
  203. package/lib/model/BorderSet.js +0 -67
  204. package/lib/model/BorderSet.js.map +0 -1
  205. package/lib/model/ICloseType.js +0 -7
  206. package/lib/model/ICloseType.js.map +0 -1
  207. package/lib/model/IDraggable.js +0 -2
  208. package/lib/model/IDraggable.js.map +0 -1
  209. package/lib/model/IDropTarget.js +0 -2
  210. package/lib/model/IDropTarget.js.map +0 -1
  211. package/lib/model/IJsonModel.js +0 -2
  212. package/lib/model/IJsonModel.js.map +0 -1
  213. package/lib/model/LayoutWindow.js +0 -81
  214. package/lib/model/LayoutWindow.js.map +0 -1
  215. package/lib/model/Model.js +0 -608
  216. package/lib/model/Model.js.map +0 -1
  217. package/lib/model/Node.js +0 -218
  218. package/lib/model/Node.js.map +0 -1
  219. package/lib/model/RowNode.js +0 -492
  220. package/lib/model/RowNode.js.map +0 -1
  221. package/lib/model/TabNode.js +0 -293
  222. package/lib/model/TabNode.js.map +0 -1
  223. package/lib/model/TabSetNode.js +0 -469
  224. package/lib/model/TabSetNode.js.map +0 -1
  225. package/lib/model/Utils.js +0 -48
  226. package/lib/model/Utils.js.map +0 -1
  227. package/lib/view/BorderButton.js +0 -126
  228. package/lib/view/BorderButton.js.map +0 -1
  229. package/lib/view/BorderTab.js +0 -56
  230. package/lib/view/BorderTab.js.map +0 -1
  231. package/lib/view/BorderTabSet.js +0 -138
  232. package/lib/view/BorderTabSet.js.map +0 -1
  233. package/lib/view/DragContainer.js +0 -16
  234. package/lib/view/DragContainer.js.map +0 -1
  235. package/lib/view/ErrorBoundary.js +0 -24
  236. package/lib/view/ErrorBoundary.js.map +0 -1
  237. package/lib/view/Icons.js +0 -29
  238. package/lib/view/Icons.js.map +0 -1
  239. package/lib/view/Layout.js +0 -881
  240. package/lib/view/Layout.js.map +0 -1
  241. package/lib/view/Overlay.js +0 -9
  242. package/lib/view/Overlay.js.map +0 -1
  243. package/lib/view/PopoutWindow.js +0 -129
  244. package/lib/view/PopoutWindow.js.map +0 -1
  245. package/lib/view/PopupMenu.js +0 -89
  246. package/lib/view/PopupMenu.js.map +0 -1
  247. package/lib/view/Row.js +0 -46
  248. package/lib/view/Row.js.map +0 -1
  249. package/lib/view/SizeTracker.js +0 -12
  250. package/lib/view/SizeTracker.js.map +0 -1
  251. package/lib/view/Splitter.js +0 -197
  252. package/lib/view/Splitter.js.map +0 -1
  253. package/lib/view/Tab.js +0 -91
  254. package/lib/view/Tab.js.map +0 -1
  255. package/lib/view/TabButton.js +0 -124
  256. package/lib/view/TabButton.js.map +0 -1
  257. package/lib/view/TabButtonStamp.js +0 -15
  258. package/lib/view/TabButtonStamp.js.map +0 -1
  259. package/lib/view/TabOverflowHook.js +0 -266
  260. package/lib/view/TabOverflowHook.js.map +0 -1
  261. package/lib/view/TabSet.js +0 -269
  262. package/lib/view/TabSet.js.map +0 -1
  263. package/lib/view/Utils.js +0 -110
  264. package/lib/view/Utils.js.map +0 -1
  265. package/src/Attribute.ts +0 -64
  266. package/src/AttributeDefinitions.ts +0 -144
  267. package/src/DockLocation.ts +0 -133
  268. package/src/DropInfo.ts +0 -20
  269. package/src/I18nLabel.ts +0 -12
  270. package/src/Orientation.ts +0 -28
  271. package/src/Rect.ts +0 -147
  272. package/src/Types.ts +0 -112
  273. package/src/index.ts +0 -23
  274. package/src/model/Action.ts +0 -9
  275. package/src/model/Actions.ts +0 -188
  276. package/src/model/BorderNode.ts +0 -458
  277. package/src/model/BorderSet.ts +0 -87
  278. package/src/model/ICloseType.ts +0 -5
  279. package/src/model/IDraggable.ts +0 -7
  280. package/src/model/IDropTarget.ts +0 -14
  281. package/src/model/IJsonModel.ts +0 -967
  282. package/src/model/LayoutWindow.ts +0 -119
  283. package/src/model/Model.ts +0 -704
  284. package/src/model/Node.ts +0 -280
  285. package/src/model/RowNode.ts +0 -559
  286. package/src/model/TabNode.ts +0 -424
  287. package/src/model/TabSetNode.ts +0 -592
  288. package/src/model/Utils.ts +0 -52
  289. package/src/view/BorderButton.tsx +0 -201
  290. package/src/view/BorderTab.tsx +0 -81
  291. package/src/view/BorderTabSet.tsx +0 -259
  292. package/src/view/DragContainer.tsx +0 -32
  293. package/src/view/ErrorBoundary.tsx +0 -42
  294. package/src/view/Icons.tsx +0 -57
  295. package/src/view/Layout.tsx +0 -1334
  296. package/src/view/Overlay.tsx +0 -21
  297. package/src/view/PopoutWindow.tsx +0 -152
  298. package/src/view/PopupMenu.tsx +0 -156
  299. package/src/view/Row.tsx +0 -68
  300. package/src/view/SizeTracker.tsx +0 -20
  301. package/src/view/Splitter.tsx +0 -262
  302. package/src/view/Tab.tsx +0 -128
  303. package/src/view/TabButton.tsx +0 -200
  304. package/src/view/TabButtonStamp.tsx +0 -42
  305. package/src/view/TabOverflowHook.tsx +0 -305
  306. package/src/view/TabSet.tsx +0 -475
  307. package/src/view/Utils.tsx +0 -135
@@ -1,133 +0,0 @@
1
- import { Orientation } from "./Orientation";
2
- import { Rect } from "./Rect";
3
-
4
- export class DockLocation {
5
- static values = new Map<string, DockLocation>();
6
- static TOP = new DockLocation("top", Orientation.VERT, 0);
7
- static BOTTOM = new DockLocation("bottom", Orientation.VERT, 1);
8
- static LEFT = new DockLocation("left", Orientation.HORZ, 0);
9
- static RIGHT = new DockLocation("right", Orientation.HORZ, 1);
10
- static CENTER = new DockLocation("center", Orientation.VERT, 0);
11
-
12
- /** @internal */
13
- static getByName(name: string): DockLocation {
14
- return DockLocation.values.get(name)!;
15
- }
16
-
17
- /** @internal */
18
- static getLocation(rect: Rect, x: number, y: number) {
19
- x = (x - rect.x) / rect.width;
20
- y = (y - rect.y) / rect.height;
21
-
22
- if (x >= 0.25 && x < 0.75 && y >= 0.25 && y < 0.75) {
23
- return DockLocation.CENTER;
24
- }
25
-
26
- // Whether or not the point is in the bottom-left half of the rect
27
- // +-----+
28
- // |\ |
29
- // |x\ |
30
- // |xx\ |
31
- // |xxx\ |
32
- // |xxxx\|
33
- // +-----+
34
- const bl = y >= x;
35
-
36
- // Whether or not the point is in the bottom-right half of the rect
37
- // +-----+
38
- // | /|
39
- // | /x|
40
- // | /xx|
41
- // | /xxx|
42
- // |/xxxx|
43
- // +-----+
44
- const br = y >= 1 - x;
45
-
46
- if (bl) {
47
- return br ? DockLocation.BOTTOM : DockLocation.LEFT;
48
- } else {
49
- return br ? DockLocation.RIGHT : DockLocation.TOP;
50
- }
51
- }
52
-
53
- /** @internal */
54
- name: string;
55
- /** @internal */
56
- orientation: Orientation;
57
- /** @internal */
58
- indexPlus: number;
59
-
60
- /** @internal */
61
- constructor(_name: string, _orientation: Orientation, _indexPlus: number) {
62
- this.name = _name;
63
- this.orientation = _orientation;
64
- this.indexPlus = _indexPlus;
65
- DockLocation.values.set(this.name, this);
66
- }
67
-
68
- getName() {
69
- return this.name;
70
- }
71
-
72
- getOrientation() {
73
- return this.orientation;
74
- }
75
-
76
- /** @internal */
77
- getDockRect(r: Rect) {
78
- if (this === DockLocation.TOP) {
79
- return new Rect(r.x, r.y, r.width, r.height / 2);
80
- } else if (this === DockLocation.BOTTOM) {
81
- return new Rect(r.x, r.getBottom() - r.height / 2, r.width, r.height / 2);
82
- }
83
- if (this === DockLocation.LEFT) {
84
- return new Rect(r.x, r.y, r.width / 2, r.height);
85
- } else if (this === DockLocation.RIGHT) {
86
- return new Rect(r.getRight() - r.width / 2, r.y, r.width / 2, r.height);
87
- } else {
88
- return r.clone();
89
- }
90
- }
91
-
92
- /** @internal */
93
- split(rect: Rect, size: number) {
94
- if (this === DockLocation.TOP) {
95
- const r1 = new Rect(rect.x, rect.y, rect.width, size);
96
- const r2 = new Rect(rect.x, rect.y + size, rect.width, rect.height - size);
97
- return { start: r1, end: r2 };
98
- } else if (this === DockLocation.LEFT) {
99
- const r1 = new Rect(rect.x, rect.y, size, rect.height);
100
- const r2 = new Rect(rect.x + size, rect.y, rect.width - size, rect.height);
101
- return { start: r1, end: r2 };
102
- }
103
- if (this === DockLocation.RIGHT) {
104
- const r1 = new Rect(rect.getRight() - size, rect.y, size, rect.height);
105
- const r2 = new Rect(rect.x, rect.y, rect.width - size, rect.height);
106
- return { start: r1, end: r2 };
107
- } else {
108
- // if (this === DockLocation.BOTTOM) {
109
- const r1 = new Rect(rect.x, rect.getBottom() - size, rect.width, size);
110
- const r2 = new Rect(rect.x, rect.y, rect.width, rect.height - size);
111
- return { start: r1, end: r2 };
112
- }
113
- }
114
-
115
- /** @internal */
116
- reflect() {
117
- if (this === DockLocation.TOP) {
118
- return DockLocation.BOTTOM;
119
- } else if (this === DockLocation.LEFT) {
120
- return DockLocation.RIGHT;
121
- }
122
- if (this === DockLocation.RIGHT) {
123
- return DockLocation.LEFT;
124
- } else {
125
- // if (this === DockLocation.BOTTOM) {
126
- return DockLocation.TOP;
127
- }
128
- }
129
-
130
- toString() {
131
- return "(DockLocation: name=" + this.name + ", orientation=" + this.orientation + ")";
132
- }
133
- }
package/src/DropInfo.ts DELETED
@@ -1,20 +0,0 @@
1
- import { DockLocation } from "./DockLocation";
2
- import { IDropTarget } from "./model/IDropTarget";
3
- import { Node } from "./model/Node";
4
- import { Rect } from "./Rect";
5
-
6
- export class DropInfo {
7
- node: Node & IDropTarget;
8
- rect: Rect;
9
- location: DockLocation;
10
- index: number;
11
- className: string;
12
-
13
- constructor(node: Node & IDropTarget, rect: Rect, location: DockLocation, index: number, className: string) {
14
- this.node = node;
15
- this.rect = rect;
16
- this.location = location;
17
- this.index = index;
18
- this.className = className;
19
- }
20
- }
package/src/I18nLabel.ts DELETED
@@ -1,12 +0,0 @@
1
- export enum I18nLabel {
2
- Close_Tab = "Close",
3
- Close_Tabset = "Close tab set",
4
- Active_Tabset = "Active tab set",
5
- Move_Tabset = "Move tab set",
6
- Move_Tabs = "Move tabs(?)",
7
- Maximize = "Maximize tab set",
8
- Restore = "Restore tab set",
9
- Popout_Tab = "Popout selected tab",
10
- Overflow_Menu_Tooltip = "Hidden tabs",
11
- Error_rendering_component = "Error rendering component",
12
- }
@@ -1,28 +0,0 @@
1
- export class Orientation {
2
- static HORZ = new Orientation("horz");
3
- static VERT = new Orientation("vert");
4
-
5
- static flip(from: Orientation) {
6
- if (from === Orientation.HORZ) {
7
- return Orientation.VERT;
8
- } else {
9
- return Orientation.HORZ;
10
- }
11
- }
12
-
13
- /** @internal */
14
- private _name: string;
15
-
16
- /** @internal */
17
- private constructor(name: string) {
18
- this._name = name;
19
- }
20
-
21
- getName() {
22
- return this._name;
23
- }
24
-
25
- toString() {
26
- return this._name;
27
- }
28
- }
package/src/Rect.ts DELETED
@@ -1,147 +0,0 @@
1
- import { IJsonRect } from "./model/IJsonModel";
2
- import { Orientation } from "./Orientation";
3
-
4
- export class Rect {
5
- static empty() {
6
- return new Rect(0, 0, 0, 0);
7
- }
8
-
9
- static fromJson(json: IJsonRect): Rect {
10
- return new Rect(json.x, json.y, json.width, json.height);
11
- }
12
-
13
- x: number;
14
- y: number;
15
- width: number;
16
- height: number;
17
-
18
- constructor(x: number, y: number, width: number, height: number) {
19
- this.x = x;
20
- this.y = y;
21
- this.width = width;
22
- this.height = height;
23
- }
24
-
25
- toJson() {
26
- return {x: this.x, y: this.y, width: this.width, height: this.height};
27
- }
28
-
29
- snap(round: number) {
30
- this.x = Math.round(this.x / round) * round;
31
- this.y = Math.round(this.y / round) * round;
32
- this.width = Math.round(this.width / round) * round;
33
- this.height= Math.round(this.height / round) * round;
34
- }
35
-
36
- static getBoundingClientRect(element: Element) {
37
- const { x, y, width, height } = element.getBoundingClientRect();
38
- return new Rect(x, y, width, height);
39
- }
40
-
41
- static getContentRect(element: HTMLElement) {
42
- const rect = element.getBoundingClientRect();
43
- const style = window.getComputedStyle(element);
44
-
45
- const paddingLeft = parseFloat(style.paddingLeft);
46
- const paddingRight = parseFloat(style.paddingRight);
47
- const paddingTop = parseFloat(style.paddingTop);
48
- const paddingBottom = parseFloat(style.paddingBottom);
49
- const borderLeftWidth = parseFloat(style.borderLeftWidth);
50
- const borderRightWidth = parseFloat(style.borderRightWidth);
51
- const borderTopWidth = parseFloat(style.borderTopWidth);
52
- const borderBottomWidth = parseFloat(style.borderBottomWidth);
53
-
54
- const contentWidth = rect.width - borderLeftWidth - paddingLeft - paddingRight - borderRightWidth;
55
- const contentHeight = rect.height - borderTopWidth - paddingTop - paddingBottom - borderBottomWidth;
56
-
57
- return new Rect(
58
- rect.left + borderLeftWidth + paddingLeft,
59
- rect.top + borderTopWidth + paddingTop,
60
- contentWidth,
61
- contentHeight,
62
- );
63
- }
64
-
65
- static fromDomRect(domRect: DOMRect) {
66
- return new Rect(domRect.x, domRect.y, domRect.width, domRect.height);
67
- }
68
-
69
- relativeTo(r: Rect | DOMRect) {
70
- return new Rect(this.x - r.x, this.y - r.y, this.width, this.height);
71
- }
72
-
73
- clone() {
74
- return new Rect(this.x, this.y, this.width, this.height);
75
- }
76
-
77
- equals(rect: Rect | null | undefined) {
78
- return this.x === rect?.x && this.y === rect?.y && this.width === rect?.width && this.height === rect?.height
79
- }
80
-
81
- equalSize(rect: Rect | null | undefined) {
82
- return this.width === rect?.width && this.height === rect?.height
83
- }
84
-
85
- getBottom() {
86
- return this.y + this.height;
87
- }
88
-
89
- getRight() {
90
- return this.x + this.width;
91
- }
92
-
93
- get bottom() {
94
- return this.y + this.height;
95
- }
96
-
97
- get right() {
98
- return this.x + this.width;
99
- }
100
-
101
- getCenter() {
102
- return { x: this.x + this.width / 2, y: this.y + this.height / 2 };
103
- }
104
-
105
- positionElement(element: HTMLElement, position?: string) {
106
- this.styleWithPosition(element.style, position);
107
- }
108
-
109
- styleWithPosition(style: Record<string, any>, position: string = "absolute") {
110
- style.left = this.x + "px";
111
- style.top = this.y + "px";
112
- style.width = Math.max(0, this.width) + "px"; // need Math.max to prevent -ve, cause error in IE
113
- style.height = Math.max(0, this.height) + "px";
114
- style.position = position;
115
- return style;
116
- }
117
-
118
- contains(x: number, y: number) {
119
- if (this.x <= x && x <= this.getRight() && this.y <= y && y <= this.getBottom()) {
120
- return true;
121
- } else {
122
- return false;
123
- }
124
- }
125
-
126
- removeInsets(insets: { top: number; left: number; bottom: number; right: number }) {
127
- return new Rect(this.x + insets.left, this.y + insets.top, Math.max(0, this.width - insets.left - insets.right), Math.max(0, this.height - insets.top - insets.bottom));
128
- }
129
-
130
- centerInRect(outerRect: Rect) {
131
- this.x = (outerRect.width - this.width) / 2;
132
- this.y = (outerRect.height - this.height) / 2;
133
- }
134
-
135
- /** @internal */
136
- _getSize(orientation: Orientation) {
137
- let prefSize = this.width;
138
- if (orientation === Orientation.VERT) {
139
- prefSize = this.height;
140
- }
141
- return prefSize;
142
- }
143
-
144
- toString() {
145
- return "(Rect: x=" + this.x + ", y=" + this.y + ", width=" + this.width + ", height=" + this.height + ")";
146
- }
147
- }
package/src/Types.ts DELETED
@@ -1,112 +0,0 @@
1
- export enum CLASSES {
2
- FLEXLAYOUT__BORDER = "flexlayout__border",
3
- FLEXLAYOUT__BORDER_ = "flexlayout__border_",
4
-
5
- FLEXLAYOUT__BORDER_TAB_CONTENTS = "flexlayout__border_tab_contents",
6
- FLEXLAYOUT__BORDER_BUTTON = "flexlayout__border_button",
7
- FLEXLAYOUT__BORDER_BUTTON_ = "flexlayout__border_button_",
8
- FLEXLAYOUT__BORDER_BUTTON_CONTENT = "flexlayout__border_button_content",
9
- FLEXLAYOUT__BORDER_BUTTON_LEADING = "flexlayout__border_button_leading",
10
- FLEXLAYOUT__BORDER_BUTTON_TRAILING = "flexlayout__border_button_trailing",
11
- FLEXLAYOUT__BORDER_BUTTON__SELECTED = "flexlayout__border_button--selected",
12
- FLEXLAYOUT__BORDER_BUTTON__UNSELECTED = "flexlayout__border_button--unselected",
13
- FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW = "flexlayout__border_toolbar_button_overflow",
14
- FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_ = "flexlayout__border_toolbar_button_overflow_",
15
-
16
- FLEXLAYOUT__BORDER_INNER = "flexlayout__border_inner",
17
- FLEXLAYOUT__BORDER_INNER_ = "flexlayout__border_inner_",
18
- FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER = "flexlayout__border_inner_tab_container",
19
- FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_ = "flexlayout__border_inner_tab_container_",
20
- FLEXLAYOUT__BORDER_TAB_DIVIDER = "flexlayout__border_tab_divider",
21
-
22
- FLEXLAYOUT__BORDER_SIZER = "flexlayout__border_sizer",
23
-
24
- FLEXLAYOUT__BORDER_TOOLBAR = "flexlayout__border_toolbar",
25
- FLEXLAYOUT__BORDER_TOOLBAR_ = "flexlayout__border_toolbar_",
26
- FLEXLAYOUT__BORDER_TOOLBAR_BUTTON = "flexlayout__border_toolbar_button",
27
- FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT = "flexlayout__border_toolbar_button-float",
28
-
29
- FLEXLAYOUT__DRAG_RECT = "flexlayout__drag_rect",
30
-
31
- FLEXLAYOUT__EDGE_RECT = "flexlayout__edge_rect",
32
- FLEXLAYOUT__EDGE_RECT_TOP = "flexlayout__edge_rect_top",
33
- FLEXLAYOUT__EDGE_RECT_LEFT = "flexlayout__edge_rect_left",
34
- FLEXLAYOUT__EDGE_RECT_BOTTOM = "flexlayout__edge_rect_bottom",
35
- FLEXLAYOUT__EDGE_RECT_RIGHT = "flexlayout__edge_rect_right",
36
-
37
- FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER = "flexlayout__error_boundary_container",
38
- FLEXLAYOUT__ERROR_BOUNDARY_CONTENT = "flexlayout__error_boundary_content",
39
-
40
- FLEXLAYOUT__FLOATING_WINDOW_CONTENT = "flexlayout__floating_window_content",
41
-
42
- FLEXLAYOUT__LAYOUT = "flexlayout__layout",
43
- FLEXLAYOUT__LAYOUT_MOVEABLES = "flexlayout__layout_moveables",
44
- FLEXLAYOUT__LAYOUT_OVERLAY = "flexlayout__layout_overlay",
45
- FLEXLAYOUT__LAYOUT_TAB_STAMPS = "flexlayout__layout_tab_stamps",
46
- FLEXLAYOUT__LAYOUT_MAIN = "flexlayout__layout_main",
47
- FLEXLAYOUT__LAYOUT_BORDER_CONTAINER = "flexlayout__layout_border_container",
48
- FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER = "flexlayout__layout_border_container_inner",
49
-
50
- FLEXLAYOUT__OUTLINE_RECT = "flexlayout__outline_rect",
51
- FLEXLAYOUT__OUTLINE_RECT_EDGE = "flexlayout__outline_rect_edge",
52
-
53
- FLEXLAYOUT__SPLITTER = "flexlayout__splitter",
54
- FLEXLAYOUT__SPLITTER_EXTRA = "flexlayout__splitter_extra",
55
- FLEXLAYOUT__SPLITTER_ = "flexlayout__splitter_",
56
- FLEXLAYOUT__SPLITTER_BORDER = "flexlayout__splitter_border",
57
- FLEXLAYOUT__SPLITTER_DRAG = "flexlayout__splitter_drag",
58
- FLEXLAYOUT__SPLITTER_HANDLE = "flexlayout__splitter_handle",
59
- FLEXLAYOUT__SPLITTER_HANDLE_HORZ = "flexlayout__splitter_handle_horz",
60
- FLEXLAYOUT__SPLITTER_HANDLE_VERT = "flexlayout__splitter_handle_vert",
61
-
62
- FLEXLAYOUT__ROW = "flexlayout__row",
63
- FLEXLAYOUT__TAB = "flexlayout__tab",
64
- FLEXLAYOUT__TAB_POSITION = "flexlayout__tab_position",
65
- FLEXLAYOUT__TAB_MOVEABLE = "flexlayout__tab_moveable",
66
- FLEXLAYOUT__TAB_OVERLAY = "flexlayout__tab_overlay",
67
-
68
- FLEXLAYOUT__TABSET = "flexlayout__tabset",
69
- FLEXLAYOUT__TABSET_CONTAINER = "flexlayout__tabset_container",
70
- FLEXLAYOUT__TABSET_HEADER = "flexlayout__tabset_header",
71
- FLEXLAYOUT__TABSET_HEADER_CONTENT = "flexlayout__tabset_header_content",
72
- FLEXLAYOUT__TABSET_MAXIMIZED = "flexlayout__tabset-maximized",
73
- FLEXLAYOUT__TABSET_SELECTED = "flexlayout__tabset-selected",
74
- FLEXLAYOUT__TABSET_TAB_DIVIDER = "flexlayout__tabset_tab_divider",
75
- FLEXLAYOUT__TABSET_CONTENT = "flexlayout__tabset_content",
76
- FLEXLAYOUT__TABSET_TABBAR_INNER = "flexlayout__tabset_tabbar_inner",
77
- FLEXLAYOUT__TABSET_TABBAR_INNER_ = "flexlayout__tabset_tabbar_inner_",
78
-
79
- FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER = "flexlayout__tabset_tabbar_inner_tab_container",
80
- FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_ = "flexlayout__tabset_tabbar_inner_tab_container_",
81
-
82
- FLEXLAYOUT__TABSET_TABBAR_OUTER = "flexlayout__tabset_tabbar_outer",
83
- FLEXLAYOUT__TABSET_TABBAR_OUTER_ = "flexlayout__tabset_tabbar_outer_",
84
-
85
- FLEXLAYOUT__TAB_BORDER = "flexlayout__tab_border",
86
- FLEXLAYOUT__TAB_BORDER_ = "flexlayout__tab_border_",
87
- FLEXLAYOUT__TAB_BUTTON = "flexlayout__tab_button",
88
- FLEXLAYOUT__TAB_BUTTON_STRETCH = "flexlayout__tab_button_stretch",
89
- FLEXLAYOUT__TAB_BUTTON_CONTENT = "flexlayout__tab_button_content",
90
- FLEXLAYOUT__TAB_BUTTON_LEADING = "flexlayout__tab_button_leading",
91
- FLEXLAYOUT__TAB_BUTTON_OVERFLOW = "flexlayout__tab_button_overflow",
92
- FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT = "flexlayout__tab_button_overflow_count",
93
- FLEXLAYOUT__TAB_BUTTON_TEXTBOX = "flexlayout__tab_button_textbox",
94
- FLEXLAYOUT__TAB_BUTTON_TRAILING = "flexlayout__tab_button_trailing",
95
- FLEXLAYOUT__TAB_BUTTON_STAMP = "flexlayout__tab_button_stamp",
96
-
97
- FLEXLAYOUT__TAB_TOOLBAR = "flexlayout__tab_toolbar",
98
- FLEXLAYOUT__TAB_TOOLBAR_BUTTON = "flexlayout__tab_toolbar_button",
99
- FLEXLAYOUT__TAB_TOOLBAR_ICON = "flexlayout__tab_toolbar_icon",
100
- FLEXLAYOUT__TAB_TOOLBAR_BUTTON_ = "flexlayout__tab_toolbar_button-",
101
- FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT = "flexlayout__tab_toolbar_button-float",
102
- FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER = "flexlayout__tab_toolbar_sticky_buttons_container",
103
- FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE = "flexlayout__tab_toolbar_button-close",
104
-
105
- FLEXLAYOUT__POPUP_MENU_CONTAINER = "flexlayout__popup_menu_container",
106
- FLEXLAYOUT__POPUP_MENU_ITEM = "flexlayout__popup_menu_item",
107
- FLEXLAYOUT__POPUP_MENU_ITEM__SELECTED = "flexlayout__popup_menu_item--selected",
108
- FLEXLAYOUT__POPUP_MENU = "flexlayout__popup_menu",
109
-
110
- FLEXLAYOUT__MINI_SCROLLBAR = "flexlayout__mini_scrollbar",
111
- FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER = "flexlayout__mini_scrollbar_container",
112
- }
package/src/index.ts DELETED
@@ -1,23 +0,0 @@
1
- export * from './view/Layout';
2
-
3
- export * from './model/Action';
4
- export * from './model/Actions';
5
- export * from './model/BorderNode';
6
- export * from './model/BorderSet';
7
- export * from './model/ICloseType';
8
- export * from './model/IDraggable';
9
- export * from './model/IDropTarget';
10
- export * from './model/IJsonModel';
11
- export * from './model/Model';
12
- export * from './model/Node';
13
- export * from './model/RowNode';
14
- export * from './model/TabNode';
15
- export * from './model/TabSetNode';
16
- export * from './model/LayoutWindow';
17
-
18
- export * from './DockLocation';
19
- export * from './DropInfo';
20
- export * from './I18nLabel';
21
- export * from './Orientation';
22
- export * from './Rect';
23
- export * from './Types';
@@ -1,9 +0,0 @@
1
- export class Action {
2
- type: string;
3
- data: Record<string, any>;
4
-
5
- constructor(type: string, data: Record<string, any>) {
6
- this.type = type;
7
- this.data = data;
8
- }
9
- }
@@ -1,188 +0,0 @@
1
- import { DockLocation } from "../DockLocation";
2
- import { Action } from "./Action";
3
- import { IJsonRect, IJsonRowNode } from "./IJsonModel";
4
-
5
- /**
6
- * The Action creator class for FlexLayout model actions
7
- */
8
- export class Actions {
9
- static ADD_NODE = "FlexLayout_AddNode";
10
- static MOVE_NODE = "FlexLayout_MoveNode";
11
- static DELETE_TAB = "FlexLayout_DeleteTab";
12
- static DELETE_TABSET = "FlexLayout_DeleteTabset";
13
- static RENAME_TAB = "FlexLayout_RenameTab";
14
- static SELECT_TAB = "FlexLayout_SelectTab";
15
- static SET_ACTIVE_TABSET = "FlexLayout_SetActiveTabset";
16
- static ADJUST_WEIGHTS = "FlexLayout_AdjustWeights";
17
- static ADJUST_BORDER_SPLIT = "FlexLayout_AdjustBorderSplit";
18
- static MAXIMIZE_TOGGLE = "FlexLayout_MaximizeToggle";
19
- static UPDATE_MODEL_ATTRIBUTES = "FlexLayout_UpdateModelAttributes";
20
- static UPDATE_NODE_ATTRIBUTES = "FlexLayout_UpdateNodeAttributes";
21
- static POPOUT_TAB = "FlexLayout_PopoutTab";
22
- static POPOUT_TABSET = "FlexLayout_PopoutTabset";
23
- static CLOSE_WINDOW = "FlexLayout_CloseWindow";
24
- static CREATE_WINDOW = "FlexLayout_CreateWindow";
25
-
26
- /**
27
- * Adds a tab node to the given tabset node
28
- * @param json the json for the new tab node e.g {type:"tab", component:"table"}
29
- * @param toNodeId the new tab node will be added to the tabset with this node id
30
- * @param location the location where the new tab will be added, one of the DockLocation enum values.
31
- * @param index for docking to the center this value is the index of the tab, use -1 to add to the end.
32
- * @param select (optional) whether to select the new tab, overriding autoSelectTab
33
- * @returns {Action} the action
34
- */
35
- static addNode(json: any, toNodeId: string, location: DockLocation, index: number, select?: boolean): Action {
36
- return new Action(Actions.ADD_NODE, {
37
- json,
38
- toNode: toNodeId,
39
- location: location.getName(),
40
- index,
41
- select,
42
- });
43
- }
44
-
45
- /**
46
- * Moves a node (tab or tabset) from one location to another
47
- * @param fromNodeId the id of the node to move
48
- * @param toNodeId the id of the node to receive the moved node
49
- * @param location the location where the moved node will be added, one of the DockLocation enum values.
50
- * @param index for docking to the center this value is the index of the tab, use -1 to add to the end.
51
- * @param select (optional) whether to select the moved tab(s) in new tabset, overriding autoSelectTab
52
- * @returns {Action} the action
53
- */
54
- static moveNode(fromNodeId: string, toNodeId: string, location: DockLocation, index: number, select?: boolean): Action {
55
- return new Action(Actions.MOVE_NODE, {
56
- fromNode: fromNodeId,
57
- toNode: toNodeId,
58
- location: location.getName(),
59
- index,
60
- select,
61
- });
62
- }
63
-
64
- /**
65
- * Deletes a tab node from the layout
66
- * @param tabNodeId the id of the tab node to delete
67
- * @returns {Action} the action
68
- */
69
- static deleteTab(tabNodeId: string): Action {
70
- return new Action(Actions.DELETE_TAB, { node: tabNodeId });
71
- }
72
-
73
- /**
74
- * Deletes a tabset node and all it's child tab nodes from the layout
75
- * @param tabsetNodeId the id of the tabset node to delete
76
- * @returns {Action} the action
77
- */
78
- static deleteTabset(tabsetNodeId: string): Action {
79
- return new Action(Actions.DELETE_TABSET, { node: tabsetNodeId });
80
- }
81
-
82
- /**
83
- * Change the given nodes tab text
84
- * @param tabNodeId the id of the node to rename
85
- * @param text the test of the tab
86
- * @returns {Action} the action
87
- */
88
- static renameTab(tabNodeId: string, text: string): Action {
89
- return new Action(Actions.RENAME_TAB, { node: tabNodeId, text });
90
- }
91
-
92
- /**
93
- * Selects the given tab in its parent tabset
94
- * @param tabNodeId the id of the node to set selected
95
- * @returns {Action} the action
96
- */
97
- static selectTab(tabNodeId: string): Action {
98
- return new Action(Actions.SELECT_TAB, { tabNode: tabNodeId });
99
- }
100
-
101
- /**
102
- * Set the given tabset node as the active tabset
103
- * @param tabsetNodeId the id of the tabset node to set as active
104
- * @returns {Action} the action
105
- */
106
- static setActiveTabset(tabsetNodeId: string | undefined, windowId?: string | undefined): Action {
107
- return new Action(Actions.SET_ACTIVE_TABSET, { tabsetNode: tabsetNodeId, windowId: windowId });
108
- }
109
-
110
- /**
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
114
- * @returns {Action} the action
115
- */
116
- static adjustWeights(nodeId: string, weights: number[]): Action {
117
- return new Action(Actions.ADJUST_WEIGHTS, {nodeId, weights});
118
- }
119
-
120
- static adjustBorderSplit(nodeId: string, pos: number): Action {
121
- return new Action(Actions.ADJUST_BORDER_SPLIT, { node: nodeId, pos });
122
- }
123
-
124
- /**
125
- * Maximizes the given tabset
126
- * @param tabsetNodeId the id of the tabset to maximize
127
- * @returns {Action} the action
128
- */
129
- static maximizeToggle(tabsetNodeId: string, windowId?: string | undefined): Action {
130
- return new Action(Actions.MAXIMIZE_TOGGLE, { node: tabsetNodeId, windowId: windowId });
131
- }
132
-
133
- /**
134
- * Updates the global model jsone attributes
135
- * @param attributes the json for the model attributes to update (merge into the existing attributes)
136
- * @returns {Action} the action
137
- */
138
- static updateModelAttributes(attributes: any): Action {
139
- return new Action(Actions.UPDATE_MODEL_ATTRIBUTES, { json: attributes });
140
- }
141
-
142
- /**
143
- * Updates the given nodes json attributes
144
- * @param nodeId the id of the node to update
145
- * @param attributes the json attributes to update (merge with the existing attributes)
146
- * @returns {Action} the action
147
- */
148
- static updateNodeAttributes(nodeId: string, attributes: any): Action {
149
- return new Action(Actions.UPDATE_NODE_ATTRIBUTES, { node: nodeId, json: attributes });
150
- }
151
-
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 });
168
- }
169
-
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});
187
- }
188
- }