dockview 1.5.1 → 1.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 (378) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +52 -52
  3. package/dist/cjs/actionbar/actionsContainer.d.ts +7 -7
  4. package/dist/cjs/actionbar/actionsContainer.js +26 -26
  5. package/dist/cjs/api/component.api.d.ts +145 -144
  6. package/dist/cjs/api/component.api.js +578 -571
  7. package/dist/cjs/api/component.api.js.map +1 -1
  8. package/dist/cjs/api/{groupPanelApi.d.ts → dockviewPanelApi.d.ts} +34 -34
  9. package/dist/cjs/api/{groupPanelApi.js → dockviewPanelApi.js} +84 -86
  10. package/dist/cjs/api/dockviewPanelApi.js.map +1 -0
  11. package/dist/cjs/api/gridviewPanelApi.d.ts +37 -36
  12. package/dist/cjs/api/gridviewPanelApi.js +47 -47
  13. package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
  14. package/dist/cjs/api/panelApi.d.ts +88 -81
  15. package/dist/cjs/api/panelApi.js +137 -121
  16. package/dist/cjs/api/panelApi.js.map +1 -1
  17. package/dist/cjs/api/paneviewPanelApi.d.ts +26 -26
  18. package/dist/cjs/api/paneviewPanelApi.js +57 -57
  19. package/dist/cjs/api/splitviewPanelApi.d.ts +32 -32
  20. package/dist/cjs/api/splitviewPanelApi.js +47 -47
  21. package/dist/cjs/array.d.ts +13 -13
  22. package/dist/cjs/array.js +77 -77
  23. package/dist/cjs/dnd/abstractDragHandler.d.ts +11 -11
  24. package/dist/cjs/dnd/abstractDragHandler.js +115 -115
  25. package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
  26. package/dist/cjs/dnd/dataTransfer.d.ts +31 -31
  27. package/dist/cjs/dnd/dataTransfer.js +100 -100
  28. package/dist/cjs/dnd/dataTransfer.js.map +1 -1
  29. package/dist/cjs/dnd/dnd.d.ts +27 -27
  30. package/dist/cjs/dnd/dnd.js +59 -64
  31. package/dist/cjs/dnd/dnd.js.map +1 -1
  32. package/dist/cjs/dnd/droptarget.d.ts +42 -37
  33. package/dist/cjs/dnd/droptarget.js +279 -201
  34. package/dist/cjs/dnd/droptarget.js.map +1 -1
  35. package/dist/cjs/dnd/ghost.d.ts +1 -0
  36. package/dist/cjs/dnd/ghost.js +15 -0
  37. package/dist/cjs/dnd/ghost.js.map +1 -0
  38. package/dist/cjs/dnd/groupDragHandler.d.ts +11 -0
  39. package/dist/cjs/dnd/groupDragHandler.js +62 -0
  40. package/dist/cjs/dnd/groupDragHandler.js.map +1 -0
  41. package/dist/cjs/dockview/components/tab/defaultTab.d.ts +27 -27
  42. package/dist/cjs/dockview/components/tab/defaultTab.js +121 -121
  43. package/dist/cjs/dockview/components/watermark/watermark.d.ts +20 -20
  44. package/dist/cjs/dockview/components/watermark/watermark.js +101 -101
  45. package/dist/cjs/dockview/defaultGroupPanelView.d.ts +29 -29
  46. package/dist/cjs/dockview/defaultGroupPanelView.js +68 -68
  47. package/dist/cjs/dockview/deserializer.d.ts +6 -5
  48. package/dist/cjs/dockview/deserializer.js +2 -2
  49. package/dist/cjs/dockview/dockviewComponent.d.ts +133 -125
  50. package/dist/cjs/dockview/dockviewComponent.js +795 -614
  51. package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
  52. package/dist/{esm/dockview/dockviewGroupPanel.d.ts → cjs/dockview/dockviewPanel.d.ts} +42 -31
  53. package/dist/cjs/dockview/{dockviewGroupPanel.js → dockviewPanel.js} +161 -157
  54. package/dist/cjs/dockview/dockviewPanel.js.map +1 -0
  55. package/dist/cjs/dockview/options.d.ts +110 -88
  56. package/dist/cjs/dockview/options.js +31 -2
  57. package/dist/cjs/dockview/options.js.map +1 -1
  58. package/dist/cjs/dockview/validation.d.ts +2 -0
  59. package/dist/cjs/dockview/validation.js +135 -0
  60. package/dist/cjs/dockview/validation.js.map +1 -0
  61. package/dist/cjs/dom.d.ts +14 -14
  62. package/dist/cjs/dom.js +182 -182
  63. package/dist/cjs/events.d.ts +30 -30
  64. package/dist/cjs/events.js +129 -129
  65. package/dist/cjs/gridview/baseComponentGridview.d.ts +87 -87
  66. package/dist/cjs/gridview/baseComponentGridview.js +278 -279
  67. package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
  68. package/dist/cjs/gridview/basePanelView.d.ts +43 -43
  69. package/dist/cjs/gridview/basePanelView.js +123 -123
  70. package/dist/cjs/gridview/branchNode.d.ts +49 -46
  71. package/dist/cjs/gridview/branchNode.js +342 -342
  72. package/dist/cjs/gridview/branchNode.js.map +1 -1
  73. package/dist/cjs/gridview/gridview.d.ts +132 -123
  74. package/dist/cjs/gridview/gridview.js +510 -479
  75. package/dist/cjs/gridview/gridview.js.map +1 -1
  76. package/dist/cjs/gridview/gridviewComponent.d.ts +85 -85
  77. package/dist/cjs/gridview/gridviewComponent.js +324 -325
  78. package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
  79. package/dist/cjs/gridview/gridviewPanel.d.ts +60 -60
  80. package/dist/cjs/gridview/gridviewPanel.js +201 -202
  81. package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
  82. package/dist/cjs/gridview/leafNode.d.ts +34 -31
  83. package/dist/cjs/gridview/leafNode.js +170 -165
  84. package/dist/cjs/gridview/leafNode.js.map +1 -1
  85. package/dist/cjs/gridview/options.d.ts +18 -18
  86. package/dist/cjs/gridview/options.js +2 -2
  87. package/dist/cjs/gridview/types.d.ts +3 -3
  88. package/dist/cjs/gridview/types.js +2 -2
  89. package/dist/cjs/groupview/dnd.d.ts +6 -5
  90. package/dist/cjs/groupview/dnd.js +10 -9
  91. package/dist/cjs/groupview/dnd.js.map +1 -1
  92. package/dist/cjs/groupview/groupview.d.ts +177 -177
  93. package/dist/cjs/groupview/groupview.js +607 -589
  94. package/dist/cjs/groupview/groupview.js.map +1 -1
  95. package/dist/cjs/groupview/groupviewPanel.d.ts +35 -35
  96. package/dist/cjs/groupview/groupviewPanel.js +128 -128
  97. package/dist/cjs/groupview/panel/content.d.ts +30 -30
  98. package/dist/cjs/groupview/panel/content.js +100 -100
  99. package/dist/cjs/groupview/tab.d.ts +31 -41
  100. package/dist/cjs/groupview/tab.js +124 -120
  101. package/dist/cjs/groupview/tab.js.map +1 -1
  102. package/dist/cjs/groupview/titlebar/tabsContainer.d.ts +65 -68
  103. package/dist/cjs/groupview/titlebar/tabsContainer.js +251 -258
  104. package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
  105. package/dist/cjs/groupview/titlebar/voidContainer.d.ts +15 -0
  106. package/dist/cjs/groupview/titlebar/voidContainer.js +74 -0
  107. package/dist/cjs/groupview/titlebar/voidContainer.js.map +1 -0
  108. package/dist/cjs/groupview/types.d.ts +68 -52
  109. package/dist/cjs/groupview/types.js +2 -2
  110. package/dist/cjs/hostedContainer.d.ts +23 -23
  111. package/dist/cjs/hostedContainer.js +73 -73
  112. package/dist/cjs/index.d.ts +30 -30
  113. package/dist/cjs/index.js +47 -46
  114. package/dist/cjs/index.js.map +1 -1
  115. package/dist/cjs/lifecycle.d.ts +22 -22
  116. package/dist/cjs/lifecycle.js +88 -88
  117. package/dist/cjs/math.d.ts +4 -4
  118. package/dist/cjs/math.js +15 -15
  119. package/dist/cjs/panel/componentFactory.d.ts +8 -8
  120. package/dist/cjs/panel/componentFactory.js +30 -30
  121. package/dist/cjs/panel/types.d.ts +33 -33
  122. package/dist/cjs/panel/types.js +2 -2
  123. package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +21 -21
  124. package/dist/cjs/paneview/defaultPaneviewHeader.js +90 -90
  125. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +19 -19
  126. package/dist/cjs/paneview/draggablePaneviewPanel.js +130 -129
  127. package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
  128. package/dist/cjs/paneview/options.d.ts +27 -27
  129. package/dist/cjs/paneview/options.js +2 -2
  130. package/dist/cjs/paneview/paneview.d.ts +40 -40
  131. package/dist/cjs/paneview/paneview.js +201 -201
  132. package/dist/cjs/paneview/paneviewComponent.d.ts +129 -129
  133. package/dist/cjs/paneview/paneviewComponent.js +394 -394
  134. package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
  135. package/dist/cjs/paneview/paneviewPanel.d.ts +92 -89
  136. package/dist/cjs/paneview/paneviewPanel.js +275 -274
  137. package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
  138. package/dist/cjs/react/deserializer.d.ts +10 -9
  139. package/dist/cjs/react/deserializer.js +43 -43
  140. package/dist/cjs/react/deserializer.js.map +1 -1
  141. package/dist/cjs/react/dockview/defaultTab.d.ts +4 -4
  142. package/dist/cjs/react/dockview/defaultTab.js +72 -72
  143. package/dist/cjs/react/dockview/dockview.d.ts +35 -34
  144. package/dist/cjs/react/dockview/dockview.js +213 -212
  145. package/dist/cjs/react/dockview/dockview.js.map +1 -1
  146. package/dist/cjs/react/dockview/groupControlsRenderer.d.ts +43 -43
  147. package/dist/cjs/react/dockview/groupControlsRenderer.js +86 -86
  148. package/dist/cjs/react/dockview/reactContentPart.d.ts +30 -30
  149. package/dist/cjs/react/dockview/reactContentPart.js +58 -58
  150. package/dist/cjs/react/dockview/reactHeaderPart.d.ts +26 -26
  151. package/dist/cjs/react/dockview/reactHeaderPart.js +55 -55
  152. package/dist/cjs/react/dockview/reactWatermarkPart.d.ts +29 -29
  153. package/dist/cjs/react/dockview/reactWatermarkPart.js +65 -65
  154. package/dist/cjs/react/dockview/v2/reactContentRenderer.d.ts +29 -29
  155. package/dist/cjs/react/dockview/v2/reactContentRenderer.js +87 -87
  156. package/dist/cjs/react/dockview/v2/reactGroupPanelView.d.ts +7 -7
  157. package/dist/cjs/react/dockview/v2/reactGroupPanelView.js +34 -34
  158. package/dist/cjs/react/dockview/v2/webviewContentRenderer.d.ts +18 -18
  159. package/dist/cjs/react/dockview/v2/webviewContentRenderer.js +45 -45
  160. package/dist/cjs/react/gridview/gridview.d.ts +24 -24
  161. package/dist/cjs/react/gridview/gridview.js +112 -112
  162. package/dist/cjs/react/gridview/view.d.ts +11 -11
  163. package/dist/cjs/react/gridview/view.js +41 -40
  164. package/dist/cjs/react/gridview/view.js.map +1 -1
  165. package/dist/cjs/react/index.d.ts +9 -9
  166. package/dist/cjs/react/index.js +23 -23
  167. package/dist/cjs/react/paneview/paneview.d.ts +30 -30
  168. package/dist/cjs/react/paneview/paneview.js +155 -155
  169. package/dist/cjs/react/paneview/view.d.ts +20 -20
  170. package/dist/cjs/react/paneview/view.js +44 -44
  171. package/dist/cjs/react/react.d.ts +36 -36
  172. package/dist/cjs/react/react.js +194 -194
  173. package/dist/cjs/react/splitview/splitview.d.ts +24 -24
  174. package/dist/cjs/react/splitview/splitview.js +108 -108
  175. package/dist/cjs/react/splitview/view.d.ts +10 -10
  176. package/dist/cjs/react/splitview/view.js +40 -40
  177. package/dist/cjs/react/svg.d.ts +3 -3
  178. package/dist/cjs/react/svg.js +35 -35
  179. package/dist/cjs/react/types.d.ts +7 -7
  180. package/dist/cjs/react/types.js +2 -2
  181. package/dist/cjs/splitview/core/options.d.ts +26 -26
  182. package/dist/cjs/splitview/core/options.js +2 -2
  183. package/dist/cjs/splitview/core/splitview.d.ts +127 -124
  184. package/dist/cjs/splitview/core/splitview.js +908 -908
  185. package/dist/cjs/splitview/core/splitview.js.map +1 -1
  186. package/dist/cjs/splitview/core/viewItem.d.ts +25 -25
  187. package/dist/cjs/splitview/core/viewItem.js +124 -124
  188. package/dist/cjs/splitview/splitviewComponent.d.ts +101 -101
  189. package/dist/cjs/splitview/splitviewComponent.js +373 -373
  190. package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
  191. package/dist/cjs/splitview/splitviewPanel.d.ts +45 -42
  192. package/dist/cjs/splitview/splitviewPanel.js +179 -178
  193. package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
  194. package/dist/cjs/svg.d.ts +3 -3
  195. package/dist/cjs/svg.js +43 -43
  196. package/dist/cjs/types.d.ts +8 -7
  197. package/dist/cjs/types.js +7 -2
  198. package/dist/cjs/types.js.map +1 -1
  199. package/dist/dockview.amd.js +7168 -6739
  200. package/dist/dockview.amd.min.js +2 -2
  201. package/dist/dockview.amd.min.noStyle.js +2 -2
  202. package/dist/dockview.amd.noStyle.js +7176 -6747
  203. package/dist/dockview.cjs.js +7167 -6738
  204. package/dist/dockview.esm.js +7152 -6726
  205. package/dist/dockview.esm.min.js +2 -2
  206. package/dist/dockview.js +7168 -6739
  207. package/dist/dockview.min.js +2 -2
  208. package/dist/dockview.min.noStyle.js +2 -2
  209. package/dist/dockview.noStyle.js +7176 -6747
  210. package/dist/esm/actionbar/actionsContainer.d.ts +7 -7
  211. package/dist/esm/actionbar/actionsContainer.js +17 -17
  212. package/dist/esm/api/component.api.d.ts +145 -144
  213. package/dist/esm/api/component.api.js +329 -326
  214. package/dist/esm/api/{groupPanelApi.d.ts → dockviewPanelApi.d.ts} +34 -34
  215. package/dist/esm/api/{groupPanelApi.js → dockviewPanelApi.js} +48 -50
  216. package/dist/esm/api/gridviewPanelApi.d.ts +37 -36
  217. package/dist/esm/api/gridviewPanelApi.js +25 -25
  218. package/dist/esm/api/panelApi.d.ts +88 -81
  219. package/dist/esm/api/panelApi.js +95 -79
  220. package/dist/esm/api/paneviewPanelApi.d.ts +26 -26
  221. package/dist/esm/api/paneviewPanelApi.js +27 -27
  222. package/dist/esm/api/splitviewPanelApi.d.ts +32 -32
  223. package/dist/esm/api/splitviewPanelApi.js +25 -25
  224. package/dist/esm/array.d.ts +13 -13
  225. package/dist/esm/array.js +67 -67
  226. package/dist/esm/dnd/abstractDragHandler.d.ts +11 -11
  227. package/dist/esm/dnd/abstractDragHandler.js +37 -37
  228. package/dist/esm/dnd/dataTransfer.d.ts +31 -31
  229. package/dist/esm/dnd/dataTransfer.js +69 -69
  230. package/dist/esm/dnd/dnd.d.ts +27 -27
  231. package/dist/esm/dnd/dnd.js +36 -41
  232. package/dist/esm/dnd/droptarget.d.ts +42 -37
  233. package/dist/esm/dnd/droptarget.js +249 -167
  234. package/dist/esm/dnd/ghost.d.ts +1 -0
  235. package/dist/esm/dnd/ghost.js +10 -0
  236. package/dist/esm/dnd/groupDragHandler.d.ts +11 -0
  237. package/dist/esm/dnd/groupDragHandler.js +38 -0
  238. package/dist/esm/dockview/components/tab/defaultTab.d.ts +27 -27
  239. package/dist/esm/dockview/components/tab/defaultTab.js +79 -79
  240. package/dist/esm/dockview/components/watermark/watermark.d.ts +20 -20
  241. package/dist/esm/dockview/components/watermark/watermark.js +70 -70
  242. package/dist/esm/dockview/defaultGroupPanelView.d.ts +29 -29
  243. package/dist/esm/dockview/defaultGroupPanelView.js +44 -44
  244. package/dist/esm/dockview/deserializer.d.ts +6 -5
  245. package/dist/esm/dockview/deserializer.js +1 -1
  246. package/dist/esm/dockview/dockviewComponent.d.ts +133 -125
  247. package/dist/esm/dockview/dockviewComponent.js +632 -468
  248. package/dist/{cjs/dockview/dockviewGroupPanel.d.ts → esm/dockview/dockviewPanel.d.ts} +42 -31
  249. package/dist/esm/dockview/{dockviewGroupPanel.js → dockviewPanel.js} +111 -107
  250. package/dist/esm/dockview/options.d.ts +110 -88
  251. package/dist/esm/dockview/options.js +24 -1
  252. package/dist/esm/dockview/validation.d.ts +2 -0
  253. package/dist/esm/dockview/validation.js +86 -0
  254. package/dist/esm/dom.d.ts +14 -14
  255. package/dist/esm/dom.js +113 -113
  256. package/dist/esm/events.d.ts +30 -30
  257. package/dist/esm/events.js +88 -88
  258. package/dist/esm/gridview/baseComponentGridview.d.ts +87 -87
  259. package/dist/esm/gridview/baseComponentGridview.js +188 -189
  260. package/dist/esm/gridview/basePanelView.d.ts +43 -43
  261. package/dist/esm/gridview/basePanelView.js +74 -74
  262. package/dist/esm/gridview/branchNode.d.ts +49 -46
  263. package/dist/esm/gridview/branchNode.js +218 -218
  264. package/dist/esm/gridview/gridview.d.ts +132 -123
  265. package/dist/esm/gridview/gridview.js +423 -397
  266. package/dist/esm/gridview/gridviewComponent.d.ts +85 -85
  267. package/dist/esm/gridview/gridviewComponent.js +237 -238
  268. package/dist/esm/gridview/gridviewPanel.d.ts +60 -60
  269. package/dist/esm/gridview/gridviewPanel.js +138 -138
  270. package/dist/esm/gridview/leafNode.d.ts +34 -31
  271. package/dist/esm/gridview/leafNode.js +103 -98
  272. package/dist/esm/gridview/options.d.ts +18 -18
  273. package/dist/esm/gridview/options.js +1 -1
  274. package/dist/esm/gridview/types.d.ts +3 -3
  275. package/dist/esm/gridview/types.js +1 -1
  276. package/dist/esm/groupview/dnd.d.ts +6 -5
  277. package/dist/esm/groupview/dnd.js +7 -6
  278. package/dist/esm/groupview/groupview.d.ts +177 -177
  279. package/dist/esm/groupview/groupview.js +462 -444
  280. package/dist/esm/groupview/groupviewPanel.d.ts +35 -35
  281. package/dist/esm/groupview/groupviewPanel.js +61 -61
  282. package/dist/esm/groupview/panel/content.d.ts +30 -30
  283. package/dist/esm/groupview/panel/content.js +73 -73
  284. package/dist/esm/groupview/tab.d.ts +31 -41
  285. package/dist/esm/groupview/tab.js +94 -90
  286. package/dist/esm/groupview/titlebar/tabsContainer.d.ts +65 -68
  287. package/dist/esm/groupview/titlebar/tabsContainer.js +183 -190
  288. package/dist/esm/groupview/titlebar/voidContainer.d.ts +15 -0
  289. package/dist/esm/groupview/titlebar/voidContainer.js +47 -0
  290. package/dist/esm/groupview/types.d.ts +68 -52
  291. package/dist/esm/groupview/types.js +1 -1
  292. package/dist/esm/hostedContainer.d.ts +23 -23
  293. package/dist/esm/hostedContainer.js +63 -63
  294. package/dist/esm/index.d.ts +30 -30
  295. package/dist/esm/index.js +23 -23
  296. package/dist/esm/lifecycle.d.ts +22 -22
  297. package/dist/esm/lifecycle.js +39 -39
  298. package/dist/esm/math.d.ts +4 -4
  299. package/dist/esm/math.js +10 -10
  300. package/dist/esm/panel/componentFactory.d.ts +8 -8
  301. package/dist/esm/panel/componentFactory.js +24 -24
  302. package/dist/esm/panel/types.d.ts +33 -33
  303. package/dist/esm/panel/types.js +1 -1
  304. package/dist/esm/paneview/defaultPaneviewHeader.d.ts +21 -21
  305. package/dist/esm/paneview/defaultPaneviewHeader.js +63 -63
  306. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +19 -19
  307. package/dist/esm/paneview/draggablePaneviewPanel.js +91 -90
  308. package/dist/esm/paneview/options.d.ts +27 -27
  309. package/dist/esm/paneview/options.js +1 -1
  310. package/dist/esm/paneview/paneview.d.ts +40 -40
  311. package/dist/esm/paneview/paneview.js +145 -145
  312. package/dist/esm/paneview/paneviewComponent.d.ts +129 -129
  313. package/dist/esm/paneview/paneviewComponent.js +270 -270
  314. package/dist/esm/paneview/paneviewPanel.d.ts +92 -89
  315. package/dist/esm/paneview/paneviewPanel.js +192 -191
  316. package/dist/esm/react/deserializer.d.ts +10 -9
  317. package/dist/esm/react/deserializer.js +38 -38
  318. package/dist/esm/react/dockview/defaultTab.d.ts +4 -4
  319. package/dist/esm/react/dockview/defaultTab.js +34 -34
  320. package/dist/esm/react/dockview/dockview.d.ts +35 -34
  321. package/dist/esm/react/dockview/dockview.js +158 -157
  322. package/dist/esm/react/dockview/groupControlsRenderer.d.ts +43 -43
  323. package/dist/esm/react/dockview/groupControlsRenderer.js +68 -68
  324. package/dist/esm/react/dockview/reactContentPart.d.ts +30 -30
  325. package/dist/esm/react/dockview/reactContentPart.js +49 -49
  326. package/dist/esm/react/dockview/reactHeaderPart.d.ts +26 -26
  327. package/dist/esm/react/dockview/reactHeaderPart.js +46 -46
  328. package/dist/esm/react/dockview/reactWatermarkPart.d.ts +29 -29
  329. package/dist/esm/react/dockview/reactWatermarkPart.js +55 -55
  330. package/dist/esm/react/dockview/v2/reactContentRenderer.d.ts +29 -29
  331. package/dist/esm/react/dockview/v2/reactContentRenderer.js +69 -69
  332. package/dist/esm/react/dockview/v2/reactGroupPanelView.d.ts +7 -7
  333. package/dist/esm/react/dockview/v2/reactGroupPanelView.js +12 -12
  334. package/dist/esm/react/dockview/v2/webviewContentRenderer.d.ts +18 -18
  335. package/dist/esm/react/dockview/v2/webviewContentRenderer.js +36 -36
  336. package/dist/esm/react/gridview/gridview.d.ts +24 -24
  337. package/dist/esm/react/gridview/gridview.js +70 -70
  338. package/dist/esm/react/gridview/view.d.ts +11 -11
  339. package/dist/esm/react/gridview/view.js +19 -18
  340. package/dist/esm/react/index.d.ts +9 -9
  341. package/dist/esm/react/index.js +7 -7
  342. package/dist/esm/react/paneview/paneview.d.ts +30 -30
  343. package/dist/esm/react/paneview/paneview.js +100 -100
  344. package/dist/esm/react/paneview/view.d.ts +20 -20
  345. package/dist/esm/react/paneview/view.js +35 -35
  346. package/dist/esm/react/react.d.ts +36 -36
  347. package/dist/esm/react/react.js +125 -125
  348. package/dist/esm/react/splitview/splitview.d.ts +24 -24
  349. package/dist/esm/react/splitview/splitview.js +66 -66
  350. package/dist/esm/react/splitview/view.d.ts +10 -10
  351. package/dist/esm/react/splitview/view.js +18 -18
  352. package/dist/esm/react/svg.d.ts +3 -3
  353. package/dist/esm/react/svg.js +7 -7
  354. package/dist/esm/react/types.d.ts +7 -7
  355. package/dist/esm/react/types.js +1 -1
  356. package/dist/esm/splitview/core/options.d.ts +26 -26
  357. package/dist/esm/splitview/core/options.js +1 -1
  358. package/dist/esm/splitview/core/splitview.d.ts +127 -124
  359. package/dist/esm/splitview/core/splitview.js +689 -689
  360. package/dist/esm/splitview/core/viewItem.d.ts +25 -25
  361. package/dist/esm/splitview/core/viewItem.js +79 -79
  362. package/dist/esm/splitview/splitviewComponent.d.ts +101 -101
  363. package/dist/esm/splitview/splitviewComponent.js +249 -249
  364. package/dist/esm/splitview/splitviewPanel.d.ts +45 -42
  365. package/dist/esm/splitview/splitviewPanel.js +108 -107
  366. package/dist/esm/svg.d.ts +3 -3
  367. package/dist/esm/svg.js +31 -31
  368. package/dist/esm/types.d.ts +8 -7
  369. package/dist/esm/types.js +3 -1
  370. package/dist/styles/dockview.css +23 -26
  371. package/package.json +12 -16
  372. package/dist/cjs/api/groupPanelApi.js.map +0 -1
  373. package/dist/cjs/dockview/dockviewGroupPanel.js.map +0 -1
  374. package/dist/cjs/groupview/groupPanel.d.ts +0 -32
  375. package/dist/cjs/groupview/groupPanel.js +0 -3
  376. package/dist/cjs/groupview/groupPanel.js.map +0 -1
  377. package/dist/esm/groupview/groupPanel.d.ts +0 -32
  378. package/dist/esm/groupview/groupPanel.js +0 -1
@@ -1,590 +1,608 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __read = (this && this.__read) || function (o, n) {
18
- var m = typeof Symbol === "function" && o[Symbol.iterator];
19
- if (!m) return o;
20
- var i = m.call(o), r, ar = [], e;
21
- try {
22
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23
- }
24
- catch (error) { e = { error: error }; }
25
- finally {
26
- try {
27
- if (r && !r.done && (m = i["return"])) m.call(i);
28
- }
29
- finally { if (e) throw e.error; }
30
- }
31
- return ar;
32
- };
33
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
34
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
- if (ar || !(i in from)) {
36
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
- ar[i] = from[i];
38
- }
39
- }
40
- return to.concat(ar || Array.prototype.slice.call(from));
41
- };
42
- var __values = (this && this.__values) || function(o) {
43
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
44
- if (m) return m.call(o);
45
- if (o && typeof o.length === "number") return {
46
- next: function () {
47
- if (o && i >= o.length) o = void 0;
48
- return { value: o && o[i++], done: !o };
49
- }
50
- };
51
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
52
- };
53
- Object.defineProperty(exports, "__esModule", { value: true });
54
- exports.Groupview = void 0;
55
- var component_api_1 = require("../api/component.api");
56
- var dataTransfer_1 = require("../dnd/dataTransfer");
57
- var droptarget_1 = require("../dnd/droptarget");
58
- var dom_1 = require("../dom");
59
- var events_1 = require("../events");
60
- var lifecycle_1 = require("../lifecycle");
61
- var content_1 = require("./panel/content");
62
- var tabsContainer_1 = require("./titlebar/tabsContainer");
63
- var dnd_1 = require("./dnd");
64
- var Groupview = /** @class */ (function (_super) {
65
- __extends(Groupview, _super);
66
- function Groupview(container, accessor, id, options, parent) {
67
- var _this = _super.call(this) || this;
68
- _this.container = container;
69
- _this.accessor = accessor;
70
- _this.id = id;
71
- _this.options = options;
72
- _this.parent = parent;
73
- _this._isGroupActive = false;
74
- _this._locked = false;
75
- _this.mostRecentlyUsed = [];
76
- _this._onDidChange = new events_1.Emitter();
77
- _this.onDidChange = _this._onDidChange.event;
78
- _this._width = 0;
79
- _this._height = 0;
80
- _this._panels = [];
81
- _this._onMove = new events_1.Emitter();
82
- _this.onMove = _this._onMove.event;
83
- _this._onDidDrop = new events_1.Emitter();
84
- _this.onDidDrop = _this._onDidDrop.event;
85
- _this._onDidAddPanel = new events_1.Emitter();
86
- _this.onDidAddPanel = _this._onDidAddPanel.event;
87
- _this._onDidRemovePanel = new events_1.Emitter();
88
- _this.onDidRemovePanel = _this._onDidRemovePanel.event;
89
- _this._onDidActivePanelChange = new events_1.Emitter();
90
- _this.onDidActivePanelChange = _this._onDidActivePanelChange.event;
91
- _this.container.classList.add('groupview');
92
- _this.tabsContainer = new tabsContainer_1.TabsContainer(_this.accessor, _this.parent, {
93
- tabHeight: options.tabHeight,
94
- });
95
- _this.contentContainer = new content_1.ContentContainer();
96
- _this.dropTarget = new droptarget_1.Droptarget(_this.contentContainer.element, {
97
- validOverlays: 'all',
98
- canDisplayOverlay: function (event, quadrant) {
99
- if (_this.locked && !quadrant) {
100
- return false;
101
- }
102
- var data = (0, dataTransfer_1.getPanelData)();
103
- if (data && data.viewId === _this.accessor.id) {
104
- var groupHasOnePanelAndIsActiveDragElement = _this._panels.length === 1 && data.groupId === _this.id;
105
- return !groupHasOnePanelAndIsActiveDragElement;
106
- }
107
- return _this.canDisplayOverlay(event, dnd_1.DockviewDropTargets.Panel);
108
- },
109
- });
110
- container.append(_this.tabsContainer.element, _this.contentContainer.element);
111
- _this.header.hidden = !!options.hideHeader;
112
- _this.locked = !!options.locked;
113
- _this.addDisposables(_this._onMove, _this._onDidChange, _this._onDidDrop, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidActivePanelChange, _this.tabsContainer.onDrop(function (event) {
114
- _this.handleDropEvent(event.event, droptarget_1.Position.Center, event.index);
115
- }), _this.contentContainer.onDidFocus(function () {
116
- _this.accessor.doSetGroupActive(_this.parent, true);
117
- }), _this.contentContainer.onDidBlur(function () {
118
- // noop
119
- }), _this.dropTarget.onDrop(function (event) {
120
- _this.handleDropEvent(event.nativeEvent, event.position);
121
- }));
122
- return _this;
123
- }
124
- Object.defineProperty(Groupview.prototype, "element", {
125
- get: function () {
126
- throw new Error('not supported');
127
- },
128
- enumerable: false,
129
- configurable: true
130
- });
131
- Object.defineProperty(Groupview.prototype, "activePanel", {
132
- get: function () {
133
- return this._activePanel;
134
- },
135
- enumerable: false,
136
- configurable: true
137
- });
138
- Object.defineProperty(Groupview.prototype, "locked", {
139
- get: function () {
140
- return this._locked;
141
- },
142
- set: function (value) {
143
- this._locked = value;
144
- },
145
- enumerable: false,
146
- configurable: true
147
- });
148
- Object.defineProperty(Groupview.prototype, "isActive", {
149
- get: function () {
150
- return this._isGroupActive;
151
- },
152
- enumerable: false,
153
- configurable: true
154
- });
155
- Object.defineProperty(Groupview.prototype, "panels", {
156
- get: function () {
157
- return this._panels;
158
- },
159
- enumerable: false,
160
- configurable: true
161
- });
162
- Object.defineProperty(Groupview.prototype, "size", {
163
- get: function () {
164
- return this._panels.length;
165
- },
166
- enumerable: false,
167
- configurable: true
168
- });
169
- Object.defineProperty(Groupview.prototype, "isEmpty", {
170
- get: function () {
171
- return this._panels.length === 0;
172
- },
173
- enumerable: false,
174
- configurable: true
175
- });
176
- Object.defineProperty(Groupview.prototype, "minimumHeight", {
177
- get: function () {
178
- return 100;
179
- },
180
- enumerable: false,
181
- configurable: true
182
- });
183
- Object.defineProperty(Groupview.prototype, "maximumHeight", {
184
- get: function () {
185
- return Number.MAX_SAFE_INTEGER;
186
- },
187
- enumerable: false,
188
- configurable: true
189
- });
190
- Object.defineProperty(Groupview.prototype, "minimumWidth", {
191
- get: function () {
192
- return 100;
193
- },
194
- enumerable: false,
195
- configurable: true
196
- });
197
- Object.defineProperty(Groupview.prototype, "maximumWidth", {
198
- get: function () {
199
- return Number.MAX_SAFE_INTEGER;
200
- },
201
- enumerable: false,
202
- configurable: true
203
- });
204
- Object.defineProperty(Groupview.prototype, "hasWatermark", {
205
- get: function () {
206
- return !!(this.watermark && this.container.contains(this.watermark.element));
207
- },
208
- enumerable: false,
209
- configurable: true
210
- });
211
- Object.defineProperty(Groupview.prototype, "header", {
212
- get: function () {
213
- return this.tabsContainer;
214
- },
215
- enumerable: false,
216
- configurable: true
217
- });
218
- Object.defineProperty(Groupview.prototype, "isContentFocused", {
219
- get: function () {
220
- if (!document.activeElement) {
221
- return false;
222
- }
223
- return (0, dom_1.isAncestor)(document.activeElement, this.contentContainer.element);
224
- },
225
- enumerable: false,
226
- configurable: true
227
- });
228
- Groupview.prototype.initialize = function () {
229
- var _this = this;
230
- var _a, _b;
231
- if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
232
- this.options.panels.forEach(function (panel) {
233
- _this.doAddPanel(panel);
234
- });
235
- }
236
- if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.activePanel) {
237
- this.openPanel(this.options.activePanel);
238
- }
239
- // must be run after the constructor otherwise this.parent may not be
240
- // correctly initialized
241
- this.setActive(this.isActive, true, true);
242
- this.updateContainer();
243
- if (this.accessor.options.createGroupControlElement) {
244
- this._control = this.accessor.options.createGroupControlElement(this.parent);
245
- this.addDisposables(this._control);
246
- this._control.init({
247
- containerApi: new component_api_1.DockviewApi(this.accessor),
248
- api: this.parent.api,
249
- });
250
- this.tabsContainer.setActionElement(this._control.element);
251
- }
252
- };
253
- Groupview.prototype.indexOf = function (panel) {
254
- return this.tabsContainer.indexOf(panel.id);
255
- };
256
- Groupview.prototype.toJSON = function () {
257
- var _a;
258
- var result = {
259
- views: this.tabsContainer.panels,
260
- activeView: (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.id,
261
- id: this.id,
262
- };
263
- if (this.locked) {
264
- result.locked = true;
265
- }
266
- if (this.header.hidden) {
267
- result.hideHeader = true;
268
- }
269
- return result;
270
- };
271
- Groupview.prototype.moveToNext = function (options) {
272
- if (!options) {
273
- options = {};
274
- }
275
- if (!options.panel) {
276
- options.panel = this.activePanel;
277
- }
278
- var index = options.panel ? this.panels.indexOf(options.panel) : -1;
279
- var normalizedIndex;
280
- if (index < this.panels.length - 1) {
281
- normalizedIndex = index + 1;
282
- }
283
- else if (!options.suppressRoll) {
284
- normalizedIndex = 0;
285
- }
286
- else {
287
- return;
288
- }
289
- this.openPanel(this.panels[normalizedIndex]);
290
- };
291
- Groupview.prototype.moveToPrevious = function (options) {
292
- if (!options) {
293
- options = {};
294
- }
295
- if (!options.panel) {
296
- options.panel = this.activePanel;
297
- }
298
- if (!options.panel) {
299
- return;
300
- }
301
- var index = this.panels.indexOf(options.panel);
302
- var normalizedIndex;
303
- if (index > 0) {
304
- normalizedIndex = index - 1;
305
- }
306
- else if (!options.suppressRoll) {
307
- normalizedIndex = this.panels.length - 1;
308
- }
309
- else {
310
- return;
311
- }
312
- this.openPanel(this.panels[normalizedIndex]);
313
- };
314
- Groupview.prototype.containsPanel = function (panel) {
315
- return this.panels.includes(panel);
316
- };
317
- Groupview.prototype.init = function (_params) {
318
- //noop
319
- };
320
- Groupview.prototype.update = function (_params) {
321
- //noop
322
- };
323
- Groupview.prototype.focus = function () {
324
- var _a;
325
- (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus();
326
- };
327
- Groupview.prototype.openPanel = function (panel, options) {
328
- if (options === void 0) { options = {}; }
329
- if (typeof options.index !== 'number' ||
330
- options.index > this.panels.length) {
331
- options.index = this.panels.length;
332
- }
333
- var skipSetPanelActive = !!options.skipSetPanelActive;
334
- var skipSetGroupActive = !!options.skipSetGroupActive;
335
- // ensure the group is updated before we fire any events
336
- panel.updateParentGroup(this.parent, true);
337
- if (this._activePanel === panel) {
338
- if (!skipSetGroupActive) {
339
- this.accessor.doSetGroupActive(this.parent);
340
- }
341
- return;
342
- }
343
- this.doAddPanel(panel, options.index, skipSetPanelActive);
344
- if (!skipSetPanelActive) {
345
- this.doSetActivePanel(panel);
346
- }
347
- if (!skipSetGroupActive) {
348
- this.accessor.doSetGroupActive(this.parent, !!options.skipFocus);
349
- }
350
- this.updateContainer();
351
- };
352
- Groupview.prototype.removePanel = function (groupItemOrId) {
353
- var id = typeof groupItemOrId === 'string'
354
- ? groupItemOrId
355
- : groupItemOrId.id;
356
- var panelToRemove = this._panels.find(function (panel) { return panel.id === id; });
357
- if (!panelToRemove) {
358
- throw new Error('invalid operation');
359
- }
360
- return this._removePanel(panelToRemove);
361
- };
362
- Groupview.prototype.closeAllPanels = function () {
363
- var e_1, _a;
364
- if (this.panels.length > 0) {
365
- // take a copy since we will be edting the array as we iterate through
366
- var arrPanelCpy = __spreadArray([], __read(this.panels), false);
367
- try {
368
- for (var arrPanelCpy_1 = __values(arrPanelCpy), arrPanelCpy_1_1 = arrPanelCpy_1.next(); !arrPanelCpy_1_1.done; arrPanelCpy_1_1 = arrPanelCpy_1.next()) {
369
- var panel = arrPanelCpy_1_1.value;
370
- this.doClose(panel);
371
- }
372
- }
373
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
374
- finally {
375
- try {
376
- if (arrPanelCpy_1_1 && !arrPanelCpy_1_1.done && (_a = arrPanelCpy_1.return)) _a.call(arrPanelCpy_1);
377
- }
378
- finally { if (e_1) throw e_1.error; }
379
- }
380
- }
381
- else {
382
- this.accessor.removeGroup(this.parent);
383
- }
384
- };
385
- Groupview.prototype.closePanel = function (panel) {
386
- this.doClose(panel);
387
- };
388
- Groupview.prototype.doClose = function (panel) {
389
- this.accessor.removePanel(panel);
390
- };
391
- Groupview.prototype.isPanelActive = function (panel) {
392
- return this._activePanel === panel;
393
- };
394
- Groupview.prototype.updateActions = function (element) {
395
- this.tabsContainer.setActionElement(element);
396
- };
397
- Groupview.prototype.setActive = function (isGroupActive, skipFocus, force) {
398
- var _a, _b;
399
- if (skipFocus === void 0) { skipFocus = false; }
400
- if (force === void 0) { force = false; }
401
- if (!force && this.isActive === isGroupActive) {
402
- if (!skipFocus) {
403
- (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus();
404
- }
405
- return;
406
- }
407
- this._isGroupActive = isGroupActive;
408
- (0, dom_1.toggleClass)(this.container, 'active-group', isGroupActive);
409
- (0, dom_1.toggleClass)(this.container, 'inactive-group', !isGroupActive);
410
- this.tabsContainer.setActive(this.isActive);
411
- if (!this._activePanel && this.panels.length > 0) {
412
- this.doSetActivePanel(this.panels[0]);
413
- }
414
- this.updateContainer();
415
- if (isGroupActive) {
416
- if (!skipFocus) {
417
- (_b = this._activePanel) === null || _b === void 0 ? void 0 : _b.focus();
418
- }
419
- }
420
- };
421
- Groupview.prototype.layout = function (width, height) {
422
- var _a;
423
- this._width = width;
424
- this._height = height;
425
- this.contentContainer.layout(this._width, this._height);
426
- if ((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.layout) {
427
- this._activePanel.layout(this._width, this._height);
428
- }
429
- };
430
- Groupview.prototype._removePanel = function (panel) {
431
- var isActivePanel = this._activePanel === panel;
432
- this.doRemovePanel(panel);
433
- if (isActivePanel && this.panels.length > 0) {
434
- var nextPanel = this.mostRecentlyUsed[0];
435
- this.openPanel(nextPanel);
436
- }
437
- if (this._activePanel && this.panels.length === 0) {
438
- this.doSetActivePanel(undefined);
439
- }
440
- this.updateContainer();
441
- return panel;
442
- };
443
- Groupview.prototype.doRemovePanel = function (panel) {
444
- var index = this.panels.indexOf(panel);
445
- if (this._activePanel === panel) {
446
- this.contentContainer.closePanel();
447
- }
448
- this.tabsContainer.delete(panel.id);
449
- this._panels.splice(index, 1);
450
- if (this.mostRecentlyUsed.includes(panel)) {
451
- this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
452
- }
453
- this._onDidRemovePanel.fire({ panel: panel });
454
- };
455
- Groupview.prototype.doAddPanel = function (panel, index, skipSetActive) {
456
- if (index === void 0) { index = this.panels.length; }
457
- if (skipSetActive === void 0) { skipSetActive = false; }
458
- var existingPanel = this._panels.indexOf(panel);
459
- var hasExistingPanel = existingPanel > -1;
460
- this.tabsContainer.openPanel(panel, index);
461
- if (!skipSetActive) {
462
- this.contentContainer.openPanel(panel);
463
- }
464
- this.tabsContainer.show();
465
- this.contentContainer.show();
466
- if (hasExistingPanel) {
467
- // TODO - need to ensure ordering hasn't changed and if it has need to re-order this.panels
468
- return;
469
- }
470
- this.updateMru(panel);
471
- this.panels.splice(index, 0, panel);
472
- this._onDidAddPanel.fire({ panel: panel });
473
- };
474
- Groupview.prototype.doSetActivePanel = function (panel) {
475
- this._activePanel = panel;
476
- if (panel) {
477
- this.tabsContainer.setActivePanel(panel);
478
- panel.layout(this._width, this._height);
479
- this.updateMru(panel);
480
- this._onDidActivePanelChange.fire({ panel: panel });
481
- }
482
- };
483
- Groupview.prototype.updateMru = function (panel) {
484
- if (this.mostRecentlyUsed.includes(panel)) {
485
- this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
486
- }
487
- this.mostRecentlyUsed = __spreadArray([panel], __read(this.mostRecentlyUsed), false);
488
- };
489
- Groupview.prototype.updateContainer = function () {
490
- var _this = this;
491
- (0, dom_1.toggleClass)(this.container, 'empty', this.isEmpty);
492
- this.panels.forEach(function (panel) {
493
- return panel.updateParentGroup(_this.parent, _this.isActive);
494
- });
495
- if (this.isEmpty && !this.watermark) {
496
- var watermark = this.accessor.createWatermarkComponent();
497
- watermark.init({
498
- containerApi: new component_api_1.DockviewApi(this.accessor),
499
- params: {},
500
- title: '',
501
- api: null,
502
- });
503
- this.watermark = watermark;
504
- (0, events_1.addDisposableListener)(this.watermark.element, 'click', function () {
505
- if (!_this.isActive) {
506
- _this.accessor.doSetGroupActive(_this.parent);
507
- }
508
- });
509
- this.contentContainer.hide();
510
- this.tabsContainer.hide();
511
- this.container.appendChild(this.watermark.element);
512
- this.watermark.updateParentGroup(this.parent, true);
513
- }
514
- if (!this.isEmpty && this.watermark) {
515
- this.watermark.element.remove();
516
- this.watermark.dispose();
517
- this.watermark = undefined;
518
- this.contentContainer.show();
519
- this.tabsContainer.show();
520
- }
521
- };
522
- Groupview.prototype.canDisplayOverlay = function (event, target) {
523
- // custom overlay handler
524
- if (this.accessor.options.showDndOverlay) {
525
- return this.accessor.options.showDndOverlay({
526
- nativeEvent: event,
527
- target: target,
528
- group: this.accessor.getPanel(this.id),
529
- getData: dataTransfer_1.getPanelData,
530
- });
531
- }
532
- return false;
533
- };
534
- Groupview.prototype.handleDropEvent = function (event, position, index) {
535
- var data = (0, dataTransfer_1.getPanelData)();
536
- if (data) {
537
- var fromSameGroup = this.tabsContainer.indexOf(data.panelId) !== -1;
538
- if (fromSameGroup && this.tabsContainer.size === 1) {
539
- return;
540
- }
541
- var groupId = data.groupId, panelId = data.panelId;
542
- var isSameGroup = this.id === groupId;
543
- if (isSameGroup && !position) {
544
- var oldIndex = this.tabsContainer.indexOf(panelId);
545
- if (oldIndex === index) {
546
- return;
547
- }
548
- }
549
- this._onMove.fire({
550
- target: position,
551
- groupId: data.groupId,
552
- itemId: data.panelId,
553
- index: index,
554
- });
555
- }
556
- else {
557
- this._onDidDrop.fire({
558
- nativeEvent: event,
559
- position: position,
560
- index: index,
561
- getData: function () { return (0, dataTransfer_1.getPanelData)(); },
562
- });
563
- }
564
- };
565
- Groupview.prototype.dispose = function () {
566
- var e_2, _a;
567
- var _b;
568
- _super.prototype.dispose.call(this);
569
- (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose();
570
- try {
571
- for (var _c = __values(this.panels), _d = _c.next(); !_d.done; _d = _c.next()) {
572
- var panel = _d.value;
573
- panel.dispose();
574
- }
575
- }
576
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
577
- finally {
578
- try {
579
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
580
- }
581
- finally { if (e_2) throw e_2.error; }
582
- }
583
- this.dropTarget.dispose();
584
- this.tabsContainer.dispose();
585
- this.contentContainer.dispose();
586
- };
587
- return Groupview;
588
- }(lifecycle_1.CompositeDisposable));
589
- exports.Groupview = Groupview;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __read = (this && this.__read) || function (o, n) {
18
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
19
+ if (!m) return o;
20
+ var i = m.call(o), r, ar = [], e;
21
+ try {
22
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23
+ }
24
+ catch (error) { e = { error: error }; }
25
+ finally {
26
+ try {
27
+ if (r && !r.done && (m = i["return"])) m.call(i);
28
+ }
29
+ finally { if (e) throw e.error; }
30
+ }
31
+ return ar;
32
+ };
33
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
34
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
+ if (ar || !(i in from)) {
36
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
+ ar[i] = from[i];
38
+ }
39
+ }
40
+ return to.concat(ar || Array.prototype.slice.call(from));
41
+ };
42
+ var __values = (this && this.__values) || function(o) {
43
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
44
+ if (m) return m.call(o);
45
+ if (o && typeof o.length === "number") return {
46
+ next: function () {
47
+ if (o && i >= o.length) o = void 0;
48
+ return { value: o && o[i++], done: !o };
49
+ }
50
+ };
51
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.Groupview = void 0;
55
+ var component_api_1 = require("../api/component.api");
56
+ var dataTransfer_1 = require("../dnd/dataTransfer");
57
+ var droptarget_1 = require("../dnd/droptarget");
58
+ var dom_1 = require("../dom");
59
+ var events_1 = require("../events");
60
+ var lifecycle_1 = require("../lifecycle");
61
+ var content_1 = require("./panel/content");
62
+ var tabsContainer_1 = require("./titlebar/tabsContainer");
63
+ var dnd_1 = require("./dnd");
64
+ var Groupview = /** @class */ (function (_super) {
65
+ __extends(Groupview, _super);
66
+ function Groupview(container, accessor, id, options, groupPanel) {
67
+ var _this = _super.call(this) || this;
68
+ _this.container = container;
69
+ _this.accessor = accessor;
70
+ _this.id = id;
71
+ _this.options = options;
72
+ _this.groupPanel = groupPanel;
73
+ _this._isGroupActive = false;
74
+ _this._locked = false;
75
+ _this.mostRecentlyUsed = [];
76
+ _this._onDidChange = new events_1.Emitter();
77
+ _this.onDidChange = _this._onDidChange.event;
78
+ _this._width = 0;
79
+ _this._height = 0;
80
+ _this._panels = [];
81
+ _this._onMove = new events_1.Emitter();
82
+ _this.onMove = _this._onMove.event;
83
+ _this._onDidDrop = new events_1.Emitter();
84
+ _this.onDidDrop = _this._onDidDrop.event;
85
+ _this._onDidAddPanel = new events_1.Emitter();
86
+ _this.onDidAddPanel = _this._onDidAddPanel.event;
87
+ _this._onDidRemovePanel = new events_1.Emitter();
88
+ _this.onDidRemovePanel = _this._onDidRemovePanel.event;
89
+ _this._onDidActivePanelChange = new events_1.Emitter();
90
+ _this.onDidActivePanelChange = _this._onDidActivePanelChange.event;
91
+ _this.container.classList.add('groupview');
92
+ _this.tabsContainer = new tabsContainer_1.TabsContainer(_this.accessor, _this.groupPanel);
93
+ _this.contentContainer = new content_1.ContentContainer();
94
+ _this.dropTarget = new droptarget_1.Droptarget(_this.contentContainer.element, {
95
+ acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
96
+ canDisplayOverlay: function (event, position) {
97
+ if (_this.locked && position === 'center') {
98
+ return false;
99
+ }
100
+ var data = (0, dataTransfer_1.getPanelData)();
101
+ if (data && data.viewId === _this.accessor.id) {
102
+ if (data.groupId === _this.id) {
103
+ if (position === 'center') {
104
+ // don't allow to drop on self for center position
105
+ return false;
106
+ }
107
+ if (data.panelId === null) {
108
+ // don't allow group move to drop anywhere on self
109
+ return false;
110
+ }
111
+ }
112
+ var groupHasOnePanelAndIsActiveDragElement = _this._panels.length === 1 && data.groupId === _this.id;
113
+ return !groupHasOnePanelAndIsActiveDragElement;
114
+ }
115
+ return _this.canDisplayOverlay(event, position, dnd_1.DockviewDropTargets.Panel);
116
+ },
117
+ });
118
+ container.append(_this.tabsContainer.element, _this.contentContainer.element);
119
+ _this.header.hidden = !!options.hideHeader;
120
+ _this.locked = !!options.locked;
121
+ _this.addDisposables(_this._onMove, _this._onDidChange, _this._onDidDrop, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidActivePanelChange, _this.tabsContainer.onDrop(function (event) {
122
+ _this.handleDropEvent(event.event, 'center', event.index);
123
+ }), _this.contentContainer.onDidFocus(function () {
124
+ _this.accessor.doSetGroupActive(_this.groupPanel, true);
125
+ }), _this.contentContainer.onDidBlur(function () {
126
+ // noop
127
+ }), _this.dropTarget.onDrop(function (event) {
128
+ _this.handleDropEvent(event.nativeEvent, event.position);
129
+ }));
130
+ return _this;
131
+ }
132
+ Object.defineProperty(Groupview.prototype, "element", {
133
+ get: function () {
134
+ throw new Error('not supported');
135
+ },
136
+ enumerable: false,
137
+ configurable: true
138
+ });
139
+ Object.defineProperty(Groupview.prototype, "activePanel", {
140
+ get: function () {
141
+ return this._activePanel;
142
+ },
143
+ enumerable: false,
144
+ configurable: true
145
+ });
146
+ Object.defineProperty(Groupview.prototype, "locked", {
147
+ get: function () {
148
+ return this._locked;
149
+ },
150
+ set: function (value) {
151
+ this._locked = value;
152
+ (0, dom_1.toggleClass)(this.container, 'locked-groupview', value);
153
+ },
154
+ enumerable: false,
155
+ configurable: true
156
+ });
157
+ Object.defineProperty(Groupview.prototype, "isActive", {
158
+ get: function () {
159
+ return this._isGroupActive;
160
+ },
161
+ enumerable: false,
162
+ configurable: true
163
+ });
164
+ Object.defineProperty(Groupview.prototype, "panels", {
165
+ get: function () {
166
+ return this._panels;
167
+ },
168
+ enumerable: false,
169
+ configurable: true
170
+ });
171
+ Object.defineProperty(Groupview.prototype, "size", {
172
+ get: function () {
173
+ return this._panels.length;
174
+ },
175
+ enumerable: false,
176
+ configurable: true
177
+ });
178
+ Object.defineProperty(Groupview.prototype, "isEmpty", {
179
+ get: function () {
180
+ return this._panels.length === 0;
181
+ },
182
+ enumerable: false,
183
+ configurable: true
184
+ });
185
+ Object.defineProperty(Groupview.prototype, "minimumHeight", {
186
+ get: function () {
187
+ return 100;
188
+ },
189
+ enumerable: false,
190
+ configurable: true
191
+ });
192
+ Object.defineProperty(Groupview.prototype, "maximumHeight", {
193
+ get: function () {
194
+ return Number.MAX_SAFE_INTEGER;
195
+ },
196
+ enumerable: false,
197
+ configurable: true
198
+ });
199
+ Object.defineProperty(Groupview.prototype, "minimumWidth", {
200
+ get: function () {
201
+ return 100;
202
+ },
203
+ enumerable: false,
204
+ configurable: true
205
+ });
206
+ Object.defineProperty(Groupview.prototype, "maximumWidth", {
207
+ get: function () {
208
+ return Number.MAX_SAFE_INTEGER;
209
+ },
210
+ enumerable: false,
211
+ configurable: true
212
+ });
213
+ Object.defineProperty(Groupview.prototype, "hasWatermark", {
214
+ get: function () {
215
+ return !!(this.watermark && this.container.contains(this.watermark.element));
216
+ },
217
+ enumerable: false,
218
+ configurable: true
219
+ });
220
+ Object.defineProperty(Groupview.prototype, "header", {
221
+ get: function () {
222
+ return this.tabsContainer;
223
+ },
224
+ enumerable: false,
225
+ configurable: true
226
+ });
227
+ Object.defineProperty(Groupview.prototype, "isContentFocused", {
228
+ get: function () {
229
+ if (!document.activeElement) {
230
+ return false;
231
+ }
232
+ return (0, dom_1.isAncestor)(document.activeElement, this.contentContainer.element);
233
+ },
234
+ enumerable: false,
235
+ configurable: true
236
+ });
237
+ Groupview.prototype.initialize = function () {
238
+ var _this = this;
239
+ var _a, _b;
240
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
241
+ this.options.panels.forEach(function (panel) {
242
+ _this.doAddPanel(panel);
243
+ });
244
+ }
245
+ if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.activePanel) {
246
+ this.openPanel(this.options.activePanel);
247
+ }
248
+ // must be run after the constructor otherwise this.parent may not be
249
+ // correctly initialized
250
+ this.setActive(this.isActive, true, true);
251
+ this.updateContainer();
252
+ if (this.accessor.options.createGroupControlElement) {
253
+ this._control = this.accessor.options.createGroupControlElement(this.groupPanel);
254
+ this.addDisposables(this._control);
255
+ this._control.init({
256
+ containerApi: new component_api_1.DockviewApi(this.accessor),
257
+ api: this.groupPanel.api,
258
+ });
259
+ this.tabsContainer.setActionElement(this._control.element);
260
+ }
261
+ };
262
+ Groupview.prototype.indexOf = function (panel) {
263
+ return this.tabsContainer.indexOf(panel.id);
264
+ };
265
+ Groupview.prototype.toJSON = function () {
266
+ var _a;
267
+ var result = {
268
+ views: this.tabsContainer.panels,
269
+ activeView: (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.id,
270
+ id: this.id,
271
+ };
272
+ if (this.locked) {
273
+ result.locked = true;
274
+ }
275
+ if (this.header.hidden) {
276
+ result.hideHeader = true;
277
+ }
278
+ return result;
279
+ };
280
+ Groupview.prototype.moveToNext = function (options) {
281
+ if (!options) {
282
+ options = {};
283
+ }
284
+ if (!options.panel) {
285
+ options.panel = this.activePanel;
286
+ }
287
+ var index = options.panel ? this.panels.indexOf(options.panel) : -1;
288
+ var normalizedIndex;
289
+ if (index < this.panels.length - 1) {
290
+ normalizedIndex = index + 1;
291
+ }
292
+ else if (!options.suppressRoll) {
293
+ normalizedIndex = 0;
294
+ }
295
+ else {
296
+ return;
297
+ }
298
+ this.openPanel(this.panels[normalizedIndex]);
299
+ };
300
+ Groupview.prototype.moveToPrevious = function (options) {
301
+ if (!options) {
302
+ options = {};
303
+ }
304
+ if (!options.panel) {
305
+ options.panel = this.activePanel;
306
+ }
307
+ if (!options.panel) {
308
+ return;
309
+ }
310
+ var index = this.panels.indexOf(options.panel);
311
+ var normalizedIndex;
312
+ if (index > 0) {
313
+ normalizedIndex = index - 1;
314
+ }
315
+ else if (!options.suppressRoll) {
316
+ normalizedIndex = this.panels.length - 1;
317
+ }
318
+ else {
319
+ return;
320
+ }
321
+ this.openPanel(this.panels[normalizedIndex]);
322
+ };
323
+ Groupview.prototype.containsPanel = function (panel) {
324
+ return this.panels.includes(panel);
325
+ };
326
+ Groupview.prototype.init = function (_params) {
327
+ //noop
328
+ };
329
+ Groupview.prototype.update = function (_params) {
330
+ //noop
331
+ };
332
+ Groupview.prototype.focus = function () {
333
+ var _a;
334
+ (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus();
335
+ };
336
+ Groupview.prototype.openPanel = function (panel, options) {
337
+ if (options === void 0) { options = {}; }
338
+ if (typeof options.index !== 'number' ||
339
+ options.index > this.panels.length) {
340
+ options.index = this.panels.length;
341
+ }
342
+ var skipSetPanelActive = !!options.skipSetPanelActive;
343
+ var skipSetGroupActive = !!options.skipSetGroupActive;
344
+ // ensure the group is updated before we fire any events
345
+ panel.updateParentGroup(this.groupPanel, true);
346
+ if (this._activePanel === panel) {
347
+ if (!skipSetGroupActive) {
348
+ this.accessor.doSetGroupActive(this.groupPanel);
349
+ }
350
+ return;
351
+ }
352
+ this.doAddPanel(panel, options.index, skipSetPanelActive);
353
+ if (!skipSetPanelActive) {
354
+ this.doSetActivePanel(panel);
355
+ }
356
+ if (!skipSetGroupActive) {
357
+ this.accessor.doSetGroupActive(this.groupPanel, !!options.skipFocus);
358
+ }
359
+ this.updateContainer();
360
+ };
361
+ Groupview.prototype.removePanel = function (groupItemOrId) {
362
+ var id = typeof groupItemOrId === 'string'
363
+ ? groupItemOrId
364
+ : groupItemOrId.id;
365
+ var panelToRemove = this._panels.find(function (panel) { return panel.id === id; });
366
+ if (!panelToRemove) {
367
+ throw new Error('invalid operation');
368
+ }
369
+ return this._removePanel(panelToRemove);
370
+ };
371
+ Groupview.prototype.closeAllPanels = function () {
372
+ var e_1, _a;
373
+ if (this.panels.length > 0) {
374
+ // take a copy since we will be edting the array as we iterate through
375
+ var arrPanelCpy = __spreadArray([], __read(this.panels), false);
376
+ try {
377
+ for (var arrPanelCpy_1 = __values(arrPanelCpy), arrPanelCpy_1_1 = arrPanelCpy_1.next(); !arrPanelCpy_1_1.done; arrPanelCpy_1_1 = arrPanelCpy_1.next()) {
378
+ var panel = arrPanelCpy_1_1.value;
379
+ this.doClose(panel);
380
+ }
381
+ }
382
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
383
+ finally {
384
+ try {
385
+ if (arrPanelCpy_1_1 && !arrPanelCpy_1_1.done && (_a = arrPanelCpy_1.return)) _a.call(arrPanelCpy_1);
386
+ }
387
+ finally { if (e_1) throw e_1.error; }
388
+ }
389
+ }
390
+ else {
391
+ this.accessor.removeGroup(this.groupPanel);
392
+ }
393
+ };
394
+ Groupview.prototype.closePanel = function (panel) {
395
+ this.doClose(panel);
396
+ };
397
+ Groupview.prototype.doClose = function (panel) {
398
+ this.accessor.removePanel(panel);
399
+ };
400
+ Groupview.prototype.isPanelActive = function (panel) {
401
+ return this._activePanel === panel;
402
+ };
403
+ Groupview.prototype.updateActions = function (element) {
404
+ this.tabsContainer.setActionElement(element);
405
+ };
406
+ Groupview.prototype.setActive = function (isGroupActive, skipFocus, force) {
407
+ var _a, _b;
408
+ if (skipFocus === void 0) { skipFocus = false; }
409
+ if (force === void 0) { force = false; }
410
+ if (!force && this.isActive === isGroupActive) {
411
+ if (!skipFocus) {
412
+ (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus();
413
+ }
414
+ return;
415
+ }
416
+ this._isGroupActive = isGroupActive;
417
+ (0, dom_1.toggleClass)(this.container, 'active-group', isGroupActive);
418
+ (0, dom_1.toggleClass)(this.container, 'inactive-group', !isGroupActive);
419
+ this.tabsContainer.setActive(this.isActive);
420
+ if (!this._activePanel && this.panels.length > 0) {
421
+ this.doSetActivePanel(this.panels[0]);
422
+ }
423
+ this.updateContainer();
424
+ if (isGroupActive) {
425
+ if (!skipFocus) {
426
+ (_b = this._activePanel) === null || _b === void 0 ? void 0 : _b.focus();
427
+ }
428
+ }
429
+ };
430
+ Groupview.prototype.layout = function (width, height) {
431
+ var _a;
432
+ this._width = width;
433
+ this._height = height;
434
+ this.contentContainer.layout(this._width, this._height);
435
+ if ((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.layout) {
436
+ this._activePanel.layout(this._width, this._height);
437
+ }
438
+ };
439
+ Groupview.prototype._removePanel = function (panel) {
440
+ var isActivePanel = this._activePanel === panel;
441
+ this.doRemovePanel(panel);
442
+ if (isActivePanel && this.panels.length > 0) {
443
+ var nextPanel = this.mostRecentlyUsed[0];
444
+ this.openPanel(nextPanel);
445
+ }
446
+ if (this._activePanel && this.panels.length === 0) {
447
+ this.doSetActivePanel(undefined);
448
+ }
449
+ this.updateContainer();
450
+ return panel;
451
+ };
452
+ Groupview.prototype.doRemovePanel = function (panel) {
453
+ var index = this.panels.indexOf(panel);
454
+ if (this._activePanel === panel) {
455
+ this.contentContainer.closePanel();
456
+ }
457
+ this.tabsContainer.delete(panel.id);
458
+ this._panels.splice(index, 1);
459
+ if (this.mostRecentlyUsed.includes(panel)) {
460
+ this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
461
+ }
462
+ this._onDidRemovePanel.fire({ panel: panel });
463
+ };
464
+ Groupview.prototype.doAddPanel = function (panel, index, skipSetActive) {
465
+ if (index === void 0) { index = this.panels.length; }
466
+ if (skipSetActive === void 0) { skipSetActive = false; }
467
+ var existingPanel = this._panels.indexOf(panel);
468
+ var hasExistingPanel = existingPanel > -1;
469
+ this.tabsContainer.openPanel(panel, index);
470
+ if (!skipSetActive) {
471
+ this.contentContainer.openPanel(panel);
472
+ }
473
+ this.tabsContainer.show();
474
+ this.contentContainer.show();
475
+ if (hasExistingPanel) {
476
+ // TODO - need to ensure ordering hasn't changed and if it has need to re-order this.panels
477
+ return;
478
+ }
479
+ this.updateMru(panel);
480
+ this.panels.splice(index, 0, panel);
481
+ this._onDidAddPanel.fire({ panel: panel });
482
+ };
483
+ Groupview.prototype.doSetActivePanel = function (panel) {
484
+ this._activePanel = panel;
485
+ if (panel) {
486
+ this.tabsContainer.setActivePanel(panel);
487
+ panel.layout(this._width, this._height);
488
+ this.updateMru(panel);
489
+ this._onDidActivePanelChange.fire({ panel: panel });
490
+ }
491
+ };
492
+ Groupview.prototype.updateMru = function (panel) {
493
+ if (this.mostRecentlyUsed.includes(panel)) {
494
+ this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
495
+ }
496
+ this.mostRecentlyUsed = __spreadArray([panel], __read(this.mostRecentlyUsed), false);
497
+ };
498
+ Groupview.prototype.updateContainer = function () {
499
+ var _this = this;
500
+ (0, dom_1.toggleClass)(this.container, 'empty', this.isEmpty);
501
+ this.panels.forEach(function (panel) {
502
+ return panel.updateParentGroup(_this.groupPanel, _this.isActive);
503
+ });
504
+ if (this.isEmpty && !this.watermark) {
505
+ var watermark = this.accessor.createWatermarkComponent();
506
+ watermark.init({
507
+ containerApi: new component_api_1.DockviewApi(this.accessor),
508
+ params: {},
509
+ title: '',
510
+ api: null,
511
+ });
512
+ this.watermark = watermark;
513
+ (0, events_1.addDisposableListener)(this.watermark.element, 'click', function () {
514
+ if (!_this.isActive) {
515
+ _this.accessor.doSetGroupActive(_this.groupPanel);
516
+ }
517
+ });
518
+ this.tabsContainer.hide();
519
+ this.contentContainer.element.appendChild(this.watermark.element);
520
+ this.watermark.updateParentGroup(this.groupPanel, true);
521
+ }
522
+ if (!this.isEmpty && this.watermark) {
523
+ this.watermark.element.remove();
524
+ this.watermark.dispose();
525
+ this.watermark = undefined;
526
+ this.tabsContainer.show();
527
+ }
528
+ };
529
+ Groupview.prototype.canDisplayOverlay = function (event, position, target) {
530
+ // custom overlay handler
531
+ if (this.accessor.options.showDndOverlay) {
532
+ return this.accessor.options.showDndOverlay({
533
+ nativeEvent: event,
534
+ target: target,
535
+ group: this.accessor.getPanel(this.id),
536
+ position: position,
537
+ getData: dataTransfer_1.getPanelData,
538
+ });
539
+ }
540
+ return false;
541
+ };
542
+ Groupview.prototype.handleDropEvent = function (event, position, index) {
543
+ var data = (0, dataTransfer_1.getPanelData)();
544
+ if (data && data.viewId === this.accessor.id) {
545
+ if (data.panelId === null) {
546
+ // this is a group move dnd event
547
+ var groupId_1 = data.groupId;
548
+ this._onMove.fire({
549
+ target: position,
550
+ groupId: groupId_1,
551
+ index: index,
552
+ });
553
+ return;
554
+ }
555
+ var fromSameGroup = this.tabsContainer.indexOf(data.panelId) !== -1;
556
+ if (fromSameGroup && this.tabsContainer.size === 1) {
557
+ return;
558
+ }
559
+ var groupId = data.groupId, panelId = data.panelId;
560
+ var isSameGroup = this.id === groupId;
561
+ if (isSameGroup && !position) {
562
+ var oldIndex = this.tabsContainer.indexOf(panelId);
563
+ if (oldIndex === index) {
564
+ return;
565
+ }
566
+ }
567
+ this._onMove.fire({
568
+ target: position,
569
+ groupId: data.groupId,
570
+ itemId: data.panelId,
571
+ index: index,
572
+ });
573
+ }
574
+ else {
575
+ this._onDidDrop.fire({
576
+ nativeEvent: event,
577
+ position: position,
578
+ index: index,
579
+ getData: function () { return (0, dataTransfer_1.getPanelData)(); },
580
+ });
581
+ }
582
+ };
583
+ Groupview.prototype.dispose = function () {
584
+ var e_2, _a;
585
+ var _b;
586
+ _super.prototype.dispose.call(this);
587
+ (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose();
588
+ try {
589
+ for (var _c = __values(this.panels), _d = _c.next(); !_d.done; _d = _c.next()) {
590
+ var panel = _d.value;
591
+ panel.dispose();
592
+ }
593
+ }
594
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
595
+ finally {
596
+ try {
597
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
598
+ }
599
+ finally { if (e_2) throw e_2.error; }
600
+ }
601
+ this.dropTarget.dispose();
602
+ this.tabsContainer.dispose();
603
+ this.contentContainer.dispose();
604
+ };
605
+ return Groupview;
606
+ }(lifecycle_1.CompositeDisposable));
607
+ exports.Groupview = Groupview;
590
608
  //# sourceMappingURL=groupview.js.map