dockview-core 1.8.4 → 1.8.5

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 (334) hide show
  1. package/README.md +51 -51
  2. package/dist/cjs/api/component.api.d.ts +455 -152
  3. package/dist/cjs/api/component.api.d.ts.map +1 -1
  4. package/dist/cjs/api/component.api.js +895 -592
  5. package/dist/cjs/api/component.api.js.map +1 -1
  6. package/dist/cjs/api/dockviewGroupPanelApi.d.ts +29 -29
  7. package/dist/cjs/api/dockviewGroupPanelApi.js +53 -53
  8. package/dist/cjs/api/dockviewPanelApi.d.ts +47 -47
  9. package/dist/cjs/api/dockviewPanelApi.js +88 -88
  10. package/dist/cjs/api/gridviewPanelApi.d.ts +37 -37
  11. package/dist/cjs/api/gridviewPanelApi.js +47 -47
  12. package/dist/cjs/api/panelApi.d.ts +88 -88
  13. package/dist/cjs/api/panelApi.js +135 -135
  14. package/dist/cjs/api/paneviewPanelApi.d.ts +26 -26
  15. package/dist/cjs/api/paneviewPanelApi.js +57 -57
  16. package/dist/cjs/api/splitviewPanelApi.d.ts +32 -32
  17. package/dist/cjs/api/splitviewPanelApi.js +47 -47
  18. package/dist/cjs/array.d.ts +13 -13
  19. package/dist/cjs/array.js +67 -67
  20. package/dist/cjs/dnd/abstractDragHandler.d.ts +12 -12
  21. package/dist/cjs/dnd/abstractDragHandler.js +141 -141
  22. package/dist/cjs/dnd/dataTransfer.d.ts +30 -31
  23. package/dist/cjs/dnd/dataTransfer.d.ts.map +1 -1
  24. package/dist/cjs/dnd/dataTransfer.js +99 -100
  25. package/dist/cjs/dnd/dataTransfer.js.map +1 -1
  26. package/dist/cjs/dnd/dnd.d.ts +27 -27
  27. package/dist/cjs/dnd/dnd.js +59 -59
  28. package/dist/cjs/dnd/droptarget.d.ts +53 -53
  29. package/dist/cjs/dnd/droptarget.js +304 -304
  30. package/dist/cjs/dnd/droptarget.js.map +1 -1
  31. package/dist/cjs/dnd/ghost.d.ts +1 -1
  32. package/dist/cjs/dnd/ghost.js +15 -15
  33. package/dist/cjs/dnd/groupDragHandler.d.ts +12 -12
  34. package/dist/cjs/dnd/groupDragHandler.js +77 -77
  35. package/dist/cjs/dnd/overlay.d.ts +43 -43
  36. package/dist/cjs/dnd/overlay.d.ts.map +1 -1
  37. package/dist/cjs/dnd/overlay.js +412 -412
  38. package/dist/cjs/dnd/overlay.js.map +1 -1
  39. package/dist/cjs/dockview/components/panel/content.d.ts +30 -30
  40. package/dist/cjs/dockview/components/panel/content.js +100 -100
  41. package/dist/cjs/dockview/components/tab/defaultTab.d.ts +21 -21
  42. package/dist/cjs/dockview/components/tab/defaultTab.js +105 -105
  43. package/dist/cjs/dockview/components/tab/tab.d.ts +34 -34
  44. package/dist/cjs/dockview/components/tab/tab.js +120 -120
  45. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +81 -81
  46. package/dist/cjs/dockview/components/titlebar/tabsContainer.js +325 -325
  47. package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +17 -17
  48. package/dist/cjs/dockview/components/titlebar/voidContainer.js +77 -77
  49. package/dist/cjs/dockview/components/watermark/watermark.d.ts +18 -18
  50. package/dist/cjs/dockview/components/watermark/watermark.js +87 -87
  51. package/dist/cjs/dockview/deserializer.d.ts +12 -12
  52. package/dist/cjs/dockview/deserializer.js +33 -33
  53. package/dist/cjs/dockview/deserializer.js.map +1 -1
  54. package/dist/cjs/dockview/dockviewComponent.d.ts +159 -159
  55. package/dist/cjs/dockview/dockviewComponent.d.ts.map +1 -1
  56. package/dist/cjs/dockview/dockviewComponent.js +1170 -1156
  57. package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
  58. package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +23 -23
  59. package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +34 -34
  60. package/dist/cjs/dockview/dockviewGroupPanel.d.ts +30 -30
  61. package/dist/cjs/dockview/dockviewGroupPanel.js +97 -97
  62. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +185 -185
  63. package/dist/cjs/dockview/dockviewGroupPanelModel.js +632 -631
  64. package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +1 -1
  65. package/dist/cjs/dockview/dockviewPanel.d.ts +41 -41
  66. package/dist/cjs/dockview/dockviewPanel.js +172 -171
  67. package/dist/cjs/dockview/dockviewPanel.js.map +1 -1
  68. package/dist/cjs/dockview/dockviewPanelModel.d.ts +35 -35
  69. package/dist/cjs/dockview/dockviewPanelModel.js +98 -98
  70. package/dist/cjs/dockview/dockviewPanelModel.js.map +1 -1
  71. package/dist/cjs/dockview/options.d.ts +133 -136
  72. package/dist/cjs/dockview/options.d.ts.map +1 -1
  73. package/dist/cjs/dockview/options.js +31 -31
  74. package/dist/cjs/dockview/types.d.ts +63 -63
  75. package/dist/cjs/dockview/types.js +10 -10
  76. package/dist/cjs/dockview/types.js.map +1 -1
  77. package/dist/cjs/dom.d.ts +16 -16
  78. package/dist/cjs/dom.js +197 -197
  79. package/dist/cjs/events.d.ts +47 -47
  80. package/dist/cjs/events.js +216 -216
  81. package/dist/cjs/events.js.map +1 -1
  82. package/dist/cjs/gridview/baseComponentGridview.d.ts +88 -87
  83. package/dist/cjs/gridview/baseComponentGridview.d.ts.map +1 -1
  84. package/dist/cjs/gridview/baseComponentGridview.js +270 -270
  85. package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
  86. package/dist/cjs/gridview/basePanelView.d.ts +40 -40
  87. package/dist/cjs/gridview/basePanelView.js +156 -156
  88. package/dist/cjs/gridview/branchNode.d.ts +49 -49
  89. package/dist/cjs/gridview/branchNode.js +343 -343
  90. package/dist/cjs/gridview/gridview.d.ts +133 -133
  91. package/dist/cjs/gridview/gridview.js +547 -547
  92. package/dist/cjs/gridview/gridviewComponent.d.ts +80 -80
  93. package/dist/cjs/gridview/gridviewComponent.d.ts.map +1 -1
  94. package/dist/cjs/gridview/gridviewComponent.js +362 -360
  95. package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
  96. package/dist/cjs/gridview/gridviewPanel.d.ts +65 -65
  97. package/dist/cjs/gridview/gridviewPanel.js +214 -214
  98. package/dist/cjs/gridview/leafNode.d.ts +34 -34
  99. package/dist/cjs/gridview/leafNode.js +170 -170
  100. package/dist/cjs/gridview/leafNode.js.map +1 -1
  101. package/dist/cjs/gridview/options.d.ts +17 -18
  102. package/dist/cjs/gridview/options.d.ts.map +1 -1
  103. package/dist/cjs/gridview/options.js +2 -2
  104. package/dist/cjs/gridview/types.d.ts +3 -3
  105. package/dist/cjs/gridview/types.js +2 -2
  106. package/dist/cjs/index.d.ts +42 -42
  107. package/dist/cjs/index.js +61 -61
  108. package/dist/cjs/lifecycle.d.ts +23 -23
  109. package/dist/cjs/lifecycle.js +65 -65
  110. package/dist/cjs/lifecycle.js.map +1 -1
  111. package/dist/cjs/math.d.ts +5 -5
  112. package/dist/cjs/math.js +34 -34
  113. package/dist/cjs/panel/componentFactory.d.ts +11 -10
  114. package/dist/cjs/panel/componentFactory.d.ts.map +1 -1
  115. package/dist/cjs/panel/componentFactory.js +30 -30
  116. package/dist/cjs/panel/componentFactory.js.map +1 -1
  117. package/dist/cjs/panel/types.d.ts +33 -33
  118. package/dist/cjs/panel/types.js +2 -2
  119. package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +21 -21
  120. package/dist/cjs/paneview/defaultPaneviewHeader.js +90 -90
  121. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +21 -21
  122. package/dist/cjs/paneview/draggablePaneviewPanel.js +131 -131
  123. package/dist/cjs/paneview/options.d.ts +25 -28
  124. package/dist/cjs/paneview/options.d.ts.map +1 -1
  125. package/dist/cjs/paneview/options.js +2 -2
  126. package/dist/cjs/paneview/paneview.d.ts +40 -40
  127. package/dist/cjs/paneview/paneview.d.ts.map +1 -1
  128. package/dist/cjs/paneview/paneview.js +200 -201
  129. package/dist/cjs/paneview/paneview.js.map +1 -1
  130. package/dist/cjs/paneview/paneviewComponent.d.ts +128 -128
  131. package/dist/cjs/paneview/paneviewComponent.js +400 -397
  132. package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
  133. package/dist/cjs/paneview/paneviewPanel.d.ts +92 -92
  134. package/dist/cjs/paneview/paneviewPanel.d.ts.map +1 -1
  135. package/dist/cjs/paneview/paneviewPanel.js +275 -275
  136. package/dist/cjs/resizable.d.ts +10 -7
  137. package/dist/cjs/resizable.d.ts.map +1 -1
  138. package/dist/cjs/resizable.js +79 -64
  139. package/dist/cjs/resizable.js.map +1 -1
  140. package/dist/cjs/splitview/options.d.ts +26 -27
  141. package/dist/cjs/splitview/options.d.ts.map +1 -1
  142. package/dist/cjs/splitview/options.js +2 -2
  143. package/dist/cjs/splitview/splitview.d.ts +128 -128
  144. package/dist/cjs/splitview/splitview.js +936 -936
  145. package/dist/cjs/splitview/splitview.js.map +1 -1
  146. package/dist/cjs/splitview/splitviewComponent.d.ts +101 -101
  147. package/dist/cjs/splitview/splitviewComponent.js +395 -392
  148. package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
  149. package/dist/cjs/splitview/splitviewPanel.d.ts +45 -45
  150. package/dist/cjs/splitview/splitviewPanel.d.ts.map +1 -1
  151. package/dist/cjs/splitview/splitviewPanel.js +179 -179
  152. package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
  153. package/dist/cjs/splitview/viewItem.d.ts +25 -25
  154. package/dist/cjs/splitview/viewItem.js +119 -119
  155. package/dist/cjs/svg.d.ts +3 -3
  156. package/dist/cjs/svg.js +43 -43
  157. package/dist/cjs/types.d.ts +2 -2
  158. package/dist/cjs/types.js +2 -2
  159. package/dist/dockview-core.amd.js +7650 -7316
  160. package/dist/dockview-core.amd.js.map +1 -1
  161. package/dist/dockview-core.amd.min.js +2 -2
  162. package/dist/dockview-core.amd.min.js.map +1 -1
  163. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  164. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  165. package/dist/dockview-core.amd.noStyle.js +7601 -7267
  166. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  167. package/dist/dockview-core.cjs.js +7650 -7316
  168. package/dist/dockview-core.cjs.js.map +1 -1
  169. package/dist/dockview-core.esm.js +7650 -7316
  170. package/dist/dockview-core.esm.js.map +1 -1
  171. package/dist/dockview-core.esm.min.js +2 -2
  172. package/dist/dockview-core.esm.min.js.map +1 -1
  173. package/dist/dockview-core.js +7650 -7316
  174. package/dist/dockview-core.js.map +1 -1
  175. package/dist/dockview-core.min.js +2 -2
  176. package/dist/dockview-core.min.js.map +1 -1
  177. package/dist/dockview-core.min.noStyle.js +2 -2
  178. package/dist/dockview-core.min.noStyle.js.map +1 -1
  179. package/dist/dockview-core.noStyle.js +7601 -7267
  180. package/dist/dockview-core.noStyle.js.map +1 -1
  181. package/dist/esm/api/component.api.d.ts +455 -152
  182. package/dist/esm/api/component.api.d.ts.map +1 -1
  183. package/dist/esm/api/component.api.js +638 -335
  184. package/dist/esm/api/component.api.js.map +1 -1
  185. package/dist/esm/api/dockviewGroupPanelApi.d.ts +29 -29
  186. package/dist/esm/api/dockviewGroupPanelApi.js +27 -27
  187. package/dist/esm/api/dockviewPanelApi.d.ts +47 -47
  188. package/dist/esm/api/dockviewPanelApi.js +53 -53
  189. package/dist/esm/api/gridviewPanelApi.d.ts +37 -37
  190. package/dist/esm/api/gridviewPanelApi.js +25 -25
  191. package/dist/esm/api/panelApi.d.ts +88 -88
  192. package/dist/esm/api/panelApi.js +93 -93
  193. package/dist/esm/api/paneviewPanelApi.d.ts +26 -26
  194. package/dist/esm/api/paneviewPanelApi.js +27 -27
  195. package/dist/esm/api/splitviewPanelApi.d.ts +32 -32
  196. package/dist/esm/api/splitviewPanelApi.js +25 -25
  197. package/dist/esm/array.d.ts +13 -13
  198. package/dist/esm/array.js +57 -57
  199. package/dist/esm/dnd/abstractDragHandler.d.ts +12 -12
  200. package/dist/esm/dnd/abstractDragHandler.js +63 -63
  201. package/dist/esm/dnd/dataTransfer.d.ts +30 -31
  202. package/dist/esm/dnd/dataTransfer.d.ts.map +1 -1
  203. package/dist/esm/dnd/dataTransfer.js +66 -69
  204. package/dist/esm/dnd/dataTransfer.js.map +1 -1
  205. package/dist/esm/dnd/dnd.d.ts +27 -27
  206. package/dist/esm/dnd/dnd.js +36 -36
  207. package/dist/esm/dnd/droptarget.d.ts +53 -53
  208. package/dist/esm/dnd/droptarget.js +274 -274
  209. package/dist/esm/dnd/droptarget.js.map +1 -1
  210. package/dist/esm/dnd/ghost.d.ts +1 -1
  211. package/dist/esm/dnd/ghost.js +11 -11
  212. package/dist/esm/dnd/groupDragHandler.d.ts +12 -12
  213. package/dist/esm/dnd/groupDragHandler.js +54 -54
  214. package/dist/esm/dnd/overlay.d.ts +43 -43
  215. package/dist/esm/dnd/overlay.d.ts.map +1 -1
  216. package/dist/esm/dnd/overlay.js +304 -304
  217. package/dist/esm/dnd/overlay.js.map +1 -1
  218. package/dist/esm/dockview/components/panel/content.d.ts +30 -30
  219. package/dist/esm/dockview/components/panel/content.js +73 -73
  220. package/dist/esm/dockview/components/tab/defaultTab.d.ts +21 -21
  221. package/dist/esm/dockview/components/tab/defaultTab.js +67 -67
  222. package/dist/esm/dockview/components/tab/tab.d.ts +34 -34
  223. package/dist/esm/dockview/components/tab/tab.js +90 -90
  224. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +81 -81
  225. package/dist/esm/dockview/components/titlebar/tabsContainer.js +239 -239
  226. package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +17 -17
  227. package/dist/esm/dockview/components/titlebar/voidContainer.js +51 -51
  228. package/dist/esm/dockview/components/watermark/watermark.d.ts +18 -18
  229. package/dist/esm/dockview/components/watermark/watermark.js +61 -61
  230. package/dist/esm/dockview/deserializer.d.ts +12 -12
  231. package/dist/esm/dockview/deserializer.js +28 -28
  232. package/dist/esm/dockview/deserializer.js.map +1 -1
  233. package/dist/esm/dockview/dockviewComponent.d.ts +159 -159
  234. package/dist/esm/dockview/dockviewComponent.d.ts.map +1 -1
  235. package/dist/esm/dockview/dockviewComponent.js +932 -918
  236. package/dist/esm/dockview/dockviewComponent.js.map +1 -1
  237. package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +23 -23
  238. package/dist/esm/dockview/dockviewFloatingGroupPanel.js +12 -12
  239. package/dist/esm/dockview/dockviewGroupPanel.d.ts +30 -30
  240. package/dist/esm/dockview/dockviewGroupPanel.js +51 -51
  241. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +185 -185
  242. package/dist/esm/dockview/dockviewGroupPanelModel.js +499 -498
  243. package/dist/esm/dockview/dockviewGroupPanelModel.js.map +1 -1
  244. package/dist/esm/dockview/dockviewPanel.d.ts +41 -41
  245. package/dist/esm/dockview/dockviewPanel.js +105 -104
  246. package/dist/esm/dockview/dockviewPanel.js.map +1 -1
  247. package/dist/esm/dockview/dockviewPanelModel.d.ts +35 -35
  248. package/dist/esm/dockview/dockviewPanelModel.js +74 -74
  249. package/dist/esm/dockview/dockviewPanelModel.js.map +1 -1
  250. package/dist/esm/dockview/options.d.ts +133 -136
  251. package/dist/esm/dockview/options.d.ts.map +1 -1
  252. package/dist/esm/dockview/options.js +24 -24
  253. package/dist/esm/dockview/types.d.ts +63 -63
  254. package/dist/esm/dockview/types.js +7 -7
  255. package/dist/esm/dom.d.ts +16 -16
  256. package/dist/esm/dom.js +126 -126
  257. package/dist/esm/events.d.ts +47 -47
  258. package/dist/esm/events.js +156 -156
  259. package/dist/esm/events.js.map +1 -1
  260. package/dist/esm/gridview/baseComponentGridview.d.ts +88 -87
  261. package/dist/esm/gridview/baseComponentGridview.d.ts.map +1 -1
  262. package/dist/esm/gridview/baseComponentGridview.js +184 -184
  263. package/dist/esm/gridview/baseComponentGridview.js.map +1 -1
  264. package/dist/esm/gridview/basePanelView.d.ts +40 -40
  265. package/dist/esm/gridview/basePanelView.js +85 -85
  266. package/dist/esm/gridview/branchNode.d.ts +49 -49
  267. package/dist/esm/gridview/branchNode.js +219 -219
  268. package/dist/esm/gridview/gridview.d.ts +133 -133
  269. package/dist/esm/gridview/gridview.js +461 -461
  270. package/dist/esm/gridview/gridviewComponent.d.ts +80 -80
  271. package/dist/esm/gridview/gridviewComponent.d.ts.map +1 -1
  272. package/dist/esm/gridview/gridviewComponent.js +264 -262
  273. package/dist/esm/gridview/gridviewComponent.js.map +1 -1
  274. package/dist/esm/gridview/gridviewPanel.d.ts +65 -65
  275. package/dist/esm/gridview/gridviewPanel.js +151 -151
  276. package/dist/esm/gridview/leafNode.d.ts +34 -34
  277. package/dist/esm/gridview/leafNode.js +103 -103
  278. package/dist/esm/gridview/options.d.ts +17 -18
  279. package/dist/esm/gridview/options.d.ts.map +1 -1
  280. package/dist/esm/gridview/options.js +1 -1
  281. package/dist/esm/gridview/types.d.ts +3 -3
  282. package/dist/esm/gridview/types.js +1 -1
  283. package/dist/esm/index.d.ts +42 -42
  284. package/dist/esm/index.js +34 -34
  285. package/dist/esm/lifecycle.d.ts +23 -23
  286. package/dist/esm/lifecycle.js +41 -41
  287. package/dist/esm/math.d.ts +5 -5
  288. package/dist/esm/math.js +28 -28
  289. package/dist/esm/panel/componentFactory.d.ts +11 -10
  290. package/dist/esm/panel/componentFactory.d.ts.map +1 -1
  291. package/dist/esm/panel/componentFactory.js +24 -24
  292. package/dist/esm/panel/componentFactory.js.map +1 -1
  293. package/dist/esm/panel/types.d.ts +33 -33
  294. package/dist/esm/panel/types.js +1 -1
  295. package/dist/esm/paneview/defaultPaneviewHeader.d.ts +21 -21
  296. package/dist/esm/paneview/defaultPaneviewHeader.js +63 -63
  297. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +21 -21
  298. package/dist/esm/paneview/draggablePaneviewPanel.js +92 -92
  299. package/dist/esm/paneview/options.d.ts +25 -28
  300. package/dist/esm/paneview/options.d.ts.map +1 -1
  301. package/dist/esm/paneview/options.js +1 -1
  302. package/dist/esm/paneview/paneview.d.ts +40 -40
  303. package/dist/esm/paneview/paneview.d.ts.map +1 -1
  304. package/dist/esm/paneview/paneview.js +145 -145
  305. package/dist/esm/paneview/paneviewComponent.d.ts +128 -128
  306. package/dist/esm/paneview/paneviewComponent.js +276 -273
  307. package/dist/esm/paneview/paneviewComponent.js.map +1 -1
  308. package/dist/esm/paneview/paneviewPanel.d.ts +92 -92
  309. package/dist/esm/paneview/paneviewPanel.d.ts.map +1 -1
  310. package/dist/esm/paneview/paneviewPanel.js +192 -192
  311. package/dist/esm/resizable.d.ts +10 -7
  312. package/dist/esm/resizable.d.ts.map +1 -1
  313. package/dist/esm/resizable.js +48 -38
  314. package/dist/esm/resizable.js.map +1 -1
  315. package/dist/esm/splitview/options.d.ts +26 -27
  316. package/dist/esm/splitview/options.d.ts.map +1 -1
  317. package/dist/esm/splitview/options.js +1 -1
  318. package/dist/esm/splitview/splitview.d.ts +128 -128
  319. package/dist/esm/splitview/splitview.js +704 -704
  320. package/dist/esm/splitview/splitviewComponent.d.ts +101 -101
  321. package/dist/esm/splitview/splitviewComponent.js +261 -258
  322. package/dist/esm/splitview/splitviewComponent.js.map +1 -1
  323. package/dist/esm/splitview/splitviewPanel.d.ts +45 -45
  324. package/dist/esm/splitview/splitviewPanel.d.ts.map +1 -1
  325. package/dist/esm/splitview/splitviewPanel.js +108 -108
  326. package/dist/esm/splitview/splitviewPanel.js.map +1 -1
  327. package/dist/esm/splitview/viewItem.d.ts +25 -25
  328. package/dist/esm/splitview/viewItem.js +74 -74
  329. package/dist/esm/svg.d.ts +3 -3
  330. package/dist/esm/svg.js +31 -31
  331. package/dist/esm/types.d.ts +2 -2
  332. package/dist/esm/types.js +1 -1
  333. package/package.json +30 -42
  334. package/LICENSE +0 -21
@@ -1,344 +1,344 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
4
- * https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
5
- *--------------------------------------------------------------------------------------------*/
6
- var __extends = (this && this.__extends) || (function () {
7
- var extendStatics = function (d, b) {
8
- extendStatics = Object.setPrototypeOf ||
9
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11
- return extendStatics(d, b);
12
- };
13
- return function (d, b) {
14
- if (typeof b !== "function" && b !== null)
15
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
16
- extendStatics(d, b);
17
- function __() { this.constructor = d; }
18
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19
- };
20
- })();
21
- var __read = (this && this.__read) || function (o, n) {
22
- var m = typeof Symbol === "function" && o[Symbol.iterator];
23
- if (!m) return o;
24
- var i = m.call(o), r, ar = [], e;
25
- try {
26
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
27
- }
28
- catch (error) { e = { error: error }; }
29
- finally {
30
- try {
31
- if (r && !r.done && (m = i["return"])) m.call(i);
32
- }
33
- finally { if (e) throw e.error; }
34
- }
35
- return ar;
36
- };
37
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
38
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
39
- if (ar || !(i in from)) {
40
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
41
- ar[i] = from[i];
42
- }
43
- }
44
- return to.concat(ar || Array.prototype.slice.call(from));
45
- };
46
- var __values = (this && this.__values) || function(o) {
47
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
48
- if (m) return m.call(o);
49
- if (o && typeof o.length === "number") return {
50
- next: function () {
51
- if (o && i >= o.length) o = void 0;
52
- return { value: o && o[i++], done: !o };
53
- }
54
- };
55
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
56
- };
57
- Object.defineProperty(exports, "__esModule", { value: true });
58
- exports.BranchNode = void 0;
59
- var splitview_1 = require("../splitview/splitview");
60
- var events_1 = require("../events");
61
- var leafNode_1 = require("./leafNode");
62
- var lifecycle_1 = require("../lifecycle");
63
- var BranchNode = /** @class */ (function (_super) {
64
- __extends(BranchNode, _super);
65
- function BranchNode(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
66
- var _this = _super.call(this) || this;
67
- _this.orientation = orientation;
68
- _this.proportionalLayout = proportionalLayout;
69
- _this.styles = styles;
70
- _this._childrenDisposable = lifecycle_1.Disposable.NONE;
71
- _this.children = [];
72
- _this._onDidChange = new events_1.Emitter();
73
- _this.onDidChange = _this._onDidChange.event;
74
- _this._orthogonalSize = orthogonalSize;
75
- _this._size = size;
76
- _this.element = document.createElement('div');
77
- _this.element.className = 'branch-node';
78
- if (!childDescriptors) {
79
- _this.splitview = new splitview_1.Splitview(_this.element, {
80
- orientation: _this.orientation,
81
- proportionalLayout: proportionalLayout,
82
- styles: styles,
83
- });
84
- _this.splitview.layout(_this.size, _this.orthogonalSize);
85
- }
86
- else {
87
- var descriptor = {
88
- views: childDescriptors.map(function (childDescriptor) {
89
- return {
90
- view: childDescriptor.node,
91
- size: childDescriptor.node.size,
92
- visible: childDescriptor.node instanceof leafNode_1.LeafNode &&
93
- childDescriptor.visible !== undefined
94
- ? childDescriptor.visible
95
- : true,
96
- };
97
- }),
98
- size: _this.orthogonalSize,
99
- };
100
- _this.children = childDescriptors.map(function (c) { return c.node; });
101
- _this.splitview = new splitview_1.Splitview(_this.element, {
102
- orientation: _this.orientation,
103
- descriptor: descriptor,
104
- proportionalLayout: proportionalLayout,
105
- styles: styles,
106
- });
107
- }
108
- _this.addDisposables(_this._onDidChange, _this.splitview.onDidSashEnd(function () {
109
- _this._onDidChange.fire({});
110
- }));
111
- _this.setupChildrenEvents();
112
- return _this;
113
- }
114
- Object.defineProperty(BranchNode.prototype, "width", {
115
- get: function () {
116
- return this.orientation === splitview_1.Orientation.HORIZONTAL
117
- ? this.size
118
- : this.orthogonalSize;
119
- },
120
- enumerable: false,
121
- configurable: true
122
- });
123
- Object.defineProperty(BranchNode.prototype, "height", {
124
- get: function () {
125
- return this.orientation === splitview_1.Orientation.HORIZONTAL
126
- ? this.orthogonalSize
127
- : this.size;
128
- },
129
- enumerable: false,
130
- configurable: true
131
- });
132
- Object.defineProperty(BranchNode.prototype, "minimumSize", {
133
- get: function () {
134
- return this.children.length === 0
135
- ? 0
136
- : Math.max.apply(Math, __spreadArray([], __read(this.children.map(function (c) { return c.minimumOrthogonalSize; })), false));
137
- },
138
- enumerable: false,
139
- configurable: true
140
- });
141
- Object.defineProperty(BranchNode.prototype, "maximumSize", {
142
- get: function () {
143
- return Math.min.apply(Math, __spreadArray([], __read(this.children.map(function (c) { return c.maximumOrthogonalSize; })), false));
144
- },
145
- enumerable: false,
146
- configurable: true
147
- });
148
- Object.defineProperty(BranchNode.prototype, "minimumOrthogonalSize", {
149
- get: function () {
150
- return this.splitview.minimumSize;
151
- },
152
- enumerable: false,
153
- configurable: true
154
- });
155
- Object.defineProperty(BranchNode.prototype, "maximumOrthogonalSize", {
156
- get: function () {
157
- return this.splitview.maximumSize;
158
- },
159
- enumerable: false,
160
- configurable: true
161
- });
162
- Object.defineProperty(BranchNode.prototype, "orthogonalSize", {
163
- get: function () {
164
- return this._orthogonalSize;
165
- },
166
- enumerable: false,
167
- configurable: true
168
- });
169
- Object.defineProperty(BranchNode.prototype, "size", {
170
- get: function () {
171
- return this._size;
172
- },
173
- enumerable: false,
174
- configurable: true
175
- });
176
- Object.defineProperty(BranchNode.prototype, "minimumWidth", {
177
- get: function () {
178
- return this.orientation === splitview_1.Orientation.HORIZONTAL
179
- ? this.minimumOrthogonalSize
180
- : this.minimumSize;
181
- },
182
- enumerable: false,
183
- configurable: true
184
- });
185
- Object.defineProperty(BranchNode.prototype, "minimumHeight", {
186
- get: function () {
187
- return this.orientation === splitview_1.Orientation.HORIZONTAL
188
- ? this.minimumSize
189
- : this.minimumOrthogonalSize;
190
- },
191
- enumerable: false,
192
- configurable: true
193
- });
194
- Object.defineProperty(BranchNode.prototype, "maximumWidth", {
195
- get: function () {
196
- return this.orientation === splitview_1.Orientation.HORIZONTAL
197
- ? this.maximumOrthogonalSize
198
- : this.maximumSize;
199
- },
200
- enumerable: false,
201
- configurable: true
202
- });
203
- Object.defineProperty(BranchNode.prototype, "maximumHeight", {
204
- get: function () {
205
- return this.orientation === splitview_1.Orientation.HORIZONTAL
206
- ? this.maximumSize
207
- : this.maximumOrthogonalSize;
208
- },
209
- enumerable: false,
210
- configurable: true
211
- });
212
- Object.defineProperty(BranchNode.prototype, "priority", {
213
- get: function () {
214
- if (this.children.length === 0) {
215
- return splitview_1.LayoutPriority.Normal;
216
- }
217
- var priorities = this.children.map(function (c) {
218
- return typeof c.priority === 'undefined'
219
- ? splitview_1.LayoutPriority.Normal
220
- : c.priority;
221
- });
222
- if (priorities.some(function (p) { return p === splitview_1.LayoutPriority.High; })) {
223
- return splitview_1.LayoutPriority.High;
224
- }
225
- else if (priorities.some(function (p) { return p === splitview_1.LayoutPriority.Low; })) {
226
- return splitview_1.LayoutPriority.Low;
227
- }
228
- return splitview_1.LayoutPriority.Normal;
229
- },
230
- enumerable: false,
231
- configurable: true
232
- });
233
- BranchNode.prototype.setVisible = function (visible) {
234
- var e_1, _a;
235
- try {
236
- for (var _b = __values(this.children), _c = _b.next(); !_c.done; _c = _b.next()) {
237
- var child = _c.value;
238
- child.setVisible(visible);
239
- }
240
- }
241
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
242
- finally {
243
- try {
244
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
245
- }
246
- finally { if (e_1) throw e_1.error; }
247
- }
248
- };
249
- BranchNode.prototype.isChildVisible = function (index) {
250
- if (index < 0 || index >= this.children.length) {
251
- throw new Error('Invalid index');
252
- }
253
- return this.splitview.isViewVisible(index);
254
- };
255
- BranchNode.prototype.setChildVisible = function (index, visible) {
256
- if (index < 0 || index >= this.children.length) {
257
- throw new Error('Invalid index');
258
- }
259
- if (this.splitview.isViewVisible(index) === visible) {
260
- return;
261
- }
262
- this.splitview.setViewVisible(index, visible);
263
- };
264
- BranchNode.prototype.moveChild = function (from, to) {
265
- if (from === to) {
266
- return;
267
- }
268
- if (from < 0 || from >= this.children.length) {
269
- throw new Error('Invalid from index');
270
- }
271
- if (from < to) {
272
- to--;
273
- }
274
- this.splitview.moveView(from, to);
275
- var child = this._removeChild(from);
276
- this._addChild(child, to);
277
- };
278
- BranchNode.prototype.getChildSize = function (index) {
279
- if (index < 0 || index >= this.children.length) {
280
- throw new Error('Invalid index');
281
- }
282
- return this.splitview.getViewSize(index);
283
- };
284
- BranchNode.prototype.resizeChild = function (index, size) {
285
- if (index < 0 || index >= this.children.length) {
286
- throw new Error('Invalid index');
287
- }
288
- this.splitview.resizeView(index, size);
289
- };
290
- BranchNode.prototype.layout = function (size, orthogonalSize) {
291
- this._size = orthogonalSize;
292
- this._orthogonalSize = size;
293
- this.splitview.layout(orthogonalSize, size);
294
- };
295
- BranchNode.prototype.addChild = function (node, size, index, skipLayout) {
296
- if (index < 0 || index > this.children.length) {
297
- throw new Error('Invalid index');
298
- }
299
- this.splitview.addView(node, size, index, skipLayout);
300
- this._addChild(node, index);
301
- };
302
- BranchNode.prototype.getChildCachedVisibleSize = function (index) {
303
- if (index < 0 || index >= this.children.length) {
304
- throw new Error('Invalid index');
305
- }
306
- return this.splitview.getViewCachedVisibleSize(index);
307
- };
308
- BranchNode.prototype.removeChild = function (index, sizing) {
309
- if (index < 0 || index >= this.children.length) {
310
- throw new Error('Invalid index');
311
- }
312
- this.splitview.removeView(index, sizing);
313
- return this._removeChild(index);
314
- };
315
- BranchNode.prototype._addChild = function (node, index) {
316
- this.children.splice(index, 0, node);
317
- this.setupChildrenEvents();
318
- };
319
- BranchNode.prototype._removeChild = function (index) {
320
- var _a = __read(this.children.splice(index, 1), 1), child = _a[0];
321
- this.setupChildrenEvents();
322
- return child;
323
- };
324
- BranchNode.prototype.setupChildrenEvents = function () {
325
- var _this = this;
326
- this._childrenDisposable.dispose();
327
- this._childrenDisposable = events_1.Event.any.apply(events_1.Event, __spreadArray([], __read(this.children.map(function (c) { return c.onDidChange; })), false))(function (e) {
328
- /**
329
- * indicate a change has occured to allows any re-rendering but don't bubble
330
- * event because that was specific to this branch
331
- */
332
- _this._onDidChange.fire({ size: e.orthogonalSize });
333
- });
334
- };
335
- BranchNode.prototype.dispose = function () {
336
- this._childrenDisposable.dispose();
337
- this.splitview.dispose();
338
- this.children.forEach(function (child) { return child.dispose(); });
339
- _super.prototype.dispose.call(this);
340
- };
341
- return BranchNode;
342
- }(lifecycle_1.CompositeDisposable));
343
- exports.BranchNode = BranchNode;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
4
+ * https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
5
+ *--------------------------------------------------------------------------------------------*/
6
+ var __extends = (this && this.__extends) || (function () {
7
+ var extendStatics = function (d, b) {
8
+ extendStatics = Object.setPrototypeOf ||
9
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11
+ return extendStatics(d, b);
12
+ };
13
+ return function (d, b) {
14
+ if (typeof b !== "function" && b !== null)
15
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
16
+ extendStatics(d, b);
17
+ function __() { this.constructor = d; }
18
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19
+ };
20
+ })();
21
+ var __read = (this && this.__read) || function (o, n) {
22
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
23
+ if (!m) return o;
24
+ var i = m.call(o), r, ar = [], e;
25
+ try {
26
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
27
+ }
28
+ catch (error) { e = { error: error }; }
29
+ finally {
30
+ try {
31
+ if (r && !r.done && (m = i["return"])) m.call(i);
32
+ }
33
+ finally { if (e) throw e.error; }
34
+ }
35
+ return ar;
36
+ };
37
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
38
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
39
+ if (ar || !(i in from)) {
40
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
41
+ ar[i] = from[i];
42
+ }
43
+ }
44
+ return to.concat(ar || Array.prototype.slice.call(from));
45
+ };
46
+ var __values = (this && this.__values) || function(o) {
47
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
48
+ if (m) return m.call(o);
49
+ if (o && typeof o.length === "number") return {
50
+ next: function () {
51
+ if (o && i >= o.length) o = void 0;
52
+ return { value: o && o[i++], done: !o };
53
+ }
54
+ };
55
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
56
+ };
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ exports.BranchNode = void 0;
59
+ var splitview_1 = require("../splitview/splitview");
60
+ var events_1 = require("../events");
61
+ var leafNode_1 = require("./leafNode");
62
+ var lifecycle_1 = require("../lifecycle");
63
+ var BranchNode = /** @class */ (function (_super) {
64
+ __extends(BranchNode, _super);
65
+ function BranchNode(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
66
+ var _this = _super.call(this) || this;
67
+ _this.orientation = orientation;
68
+ _this.proportionalLayout = proportionalLayout;
69
+ _this.styles = styles;
70
+ _this._childrenDisposable = lifecycle_1.Disposable.NONE;
71
+ _this.children = [];
72
+ _this._onDidChange = new events_1.Emitter();
73
+ _this.onDidChange = _this._onDidChange.event;
74
+ _this._orthogonalSize = orthogonalSize;
75
+ _this._size = size;
76
+ _this.element = document.createElement('div');
77
+ _this.element.className = 'branch-node';
78
+ if (!childDescriptors) {
79
+ _this.splitview = new splitview_1.Splitview(_this.element, {
80
+ orientation: _this.orientation,
81
+ proportionalLayout: proportionalLayout,
82
+ styles: styles,
83
+ });
84
+ _this.splitview.layout(_this.size, _this.orthogonalSize);
85
+ }
86
+ else {
87
+ var descriptor = {
88
+ views: childDescriptors.map(function (childDescriptor) {
89
+ return {
90
+ view: childDescriptor.node,
91
+ size: childDescriptor.node.size,
92
+ visible: childDescriptor.node instanceof leafNode_1.LeafNode &&
93
+ childDescriptor.visible !== undefined
94
+ ? childDescriptor.visible
95
+ : true,
96
+ };
97
+ }),
98
+ size: _this.orthogonalSize,
99
+ };
100
+ _this.children = childDescriptors.map(function (c) { return c.node; });
101
+ _this.splitview = new splitview_1.Splitview(_this.element, {
102
+ orientation: _this.orientation,
103
+ descriptor: descriptor,
104
+ proportionalLayout: proportionalLayout,
105
+ styles: styles,
106
+ });
107
+ }
108
+ _this.addDisposables(_this._onDidChange, _this.splitview.onDidSashEnd(function () {
109
+ _this._onDidChange.fire({});
110
+ }));
111
+ _this.setupChildrenEvents();
112
+ return _this;
113
+ }
114
+ Object.defineProperty(BranchNode.prototype, "width", {
115
+ get: function () {
116
+ return this.orientation === splitview_1.Orientation.HORIZONTAL
117
+ ? this.size
118
+ : this.orthogonalSize;
119
+ },
120
+ enumerable: false,
121
+ configurable: true
122
+ });
123
+ Object.defineProperty(BranchNode.prototype, "height", {
124
+ get: function () {
125
+ return this.orientation === splitview_1.Orientation.HORIZONTAL
126
+ ? this.orthogonalSize
127
+ : this.size;
128
+ },
129
+ enumerable: false,
130
+ configurable: true
131
+ });
132
+ Object.defineProperty(BranchNode.prototype, "minimumSize", {
133
+ get: function () {
134
+ return this.children.length === 0
135
+ ? 0
136
+ : Math.max.apply(Math, __spreadArray([], __read(this.children.map(function (c) { return c.minimumOrthogonalSize; })), false));
137
+ },
138
+ enumerable: false,
139
+ configurable: true
140
+ });
141
+ Object.defineProperty(BranchNode.prototype, "maximumSize", {
142
+ get: function () {
143
+ return Math.min.apply(Math, __spreadArray([], __read(this.children.map(function (c) { return c.maximumOrthogonalSize; })), false));
144
+ },
145
+ enumerable: false,
146
+ configurable: true
147
+ });
148
+ Object.defineProperty(BranchNode.prototype, "minimumOrthogonalSize", {
149
+ get: function () {
150
+ return this.splitview.minimumSize;
151
+ },
152
+ enumerable: false,
153
+ configurable: true
154
+ });
155
+ Object.defineProperty(BranchNode.prototype, "maximumOrthogonalSize", {
156
+ get: function () {
157
+ return this.splitview.maximumSize;
158
+ },
159
+ enumerable: false,
160
+ configurable: true
161
+ });
162
+ Object.defineProperty(BranchNode.prototype, "orthogonalSize", {
163
+ get: function () {
164
+ return this._orthogonalSize;
165
+ },
166
+ enumerable: false,
167
+ configurable: true
168
+ });
169
+ Object.defineProperty(BranchNode.prototype, "size", {
170
+ get: function () {
171
+ return this._size;
172
+ },
173
+ enumerable: false,
174
+ configurable: true
175
+ });
176
+ Object.defineProperty(BranchNode.prototype, "minimumWidth", {
177
+ get: function () {
178
+ return this.orientation === splitview_1.Orientation.HORIZONTAL
179
+ ? this.minimumOrthogonalSize
180
+ : this.minimumSize;
181
+ },
182
+ enumerable: false,
183
+ configurable: true
184
+ });
185
+ Object.defineProperty(BranchNode.prototype, "minimumHeight", {
186
+ get: function () {
187
+ return this.orientation === splitview_1.Orientation.HORIZONTAL
188
+ ? this.minimumSize
189
+ : this.minimumOrthogonalSize;
190
+ },
191
+ enumerable: false,
192
+ configurable: true
193
+ });
194
+ Object.defineProperty(BranchNode.prototype, "maximumWidth", {
195
+ get: function () {
196
+ return this.orientation === splitview_1.Orientation.HORIZONTAL
197
+ ? this.maximumOrthogonalSize
198
+ : this.maximumSize;
199
+ },
200
+ enumerable: false,
201
+ configurable: true
202
+ });
203
+ Object.defineProperty(BranchNode.prototype, "maximumHeight", {
204
+ get: function () {
205
+ return this.orientation === splitview_1.Orientation.HORIZONTAL
206
+ ? this.maximumSize
207
+ : this.maximumOrthogonalSize;
208
+ },
209
+ enumerable: false,
210
+ configurable: true
211
+ });
212
+ Object.defineProperty(BranchNode.prototype, "priority", {
213
+ get: function () {
214
+ if (this.children.length === 0) {
215
+ return splitview_1.LayoutPriority.Normal;
216
+ }
217
+ var priorities = this.children.map(function (c) {
218
+ return typeof c.priority === 'undefined'
219
+ ? splitview_1.LayoutPriority.Normal
220
+ : c.priority;
221
+ });
222
+ if (priorities.some(function (p) { return p === splitview_1.LayoutPriority.High; })) {
223
+ return splitview_1.LayoutPriority.High;
224
+ }
225
+ else if (priorities.some(function (p) { return p === splitview_1.LayoutPriority.Low; })) {
226
+ return splitview_1.LayoutPriority.Low;
227
+ }
228
+ return splitview_1.LayoutPriority.Normal;
229
+ },
230
+ enumerable: false,
231
+ configurable: true
232
+ });
233
+ BranchNode.prototype.setVisible = function (visible) {
234
+ var e_1, _a;
235
+ try {
236
+ for (var _b = __values(this.children), _c = _b.next(); !_c.done; _c = _b.next()) {
237
+ var child = _c.value;
238
+ child.setVisible(visible);
239
+ }
240
+ }
241
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
242
+ finally {
243
+ try {
244
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
245
+ }
246
+ finally { if (e_1) throw e_1.error; }
247
+ }
248
+ };
249
+ BranchNode.prototype.isChildVisible = function (index) {
250
+ if (index < 0 || index >= this.children.length) {
251
+ throw new Error('Invalid index');
252
+ }
253
+ return this.splitview.isViewVisible(index);
254
+ };
255
+ BranchNode.prototype.setChildVisible = function (index, visible) {
256
+ if (index < 0 || index >= this.children.length) {
257
+ throw new Error('Invalid index');
258
+ }
259
+ if (this.splitview.isViewVisible(index) === visible) {
260
+ return;
261
+ }
262
+ this.splitview.setViewVisible(index, visible);
263
+ };
264
+ BranchNode.prototype.moveChild = function (from, to) {
265
+ if (from === to) {
266
+ return;
267
+ }
268
+ if (from < 0 || from >= this.children.length) {
269
+ throw new Error('Invalid from index');
270
+ }
271
+ if (from < to) {
272
+ to--;
273
+ }
274
+ this.splitview.moveView(from, to);
275
+ var child = this._removeChild(from);
276
+ this._addChild(child, to);
277
+ };
278
+ BranchNode.prototype.getChildSize = function (index) {
279
+ if (index < 0 || index >= this.children.length) {
280
+ throw new Error('Invalid index');
281
+ }
282
+ return this.splitview.getViewSize(index);
283
+ };
284
+ BranchNode.prototype.resizeChild = function (index, size) {
285
+ if (index < 0 || index >= this.children.length) {
286
+ throw new Error('Invalid index');
287
+ }
288
+ this.splitview.resizeView(index, size);
289
+ };
290
+ BranchNode.prototype.layout = function (size, orthogonalSize) {
291
+ this._size = orthogonalSize;
292
+ this._orthogonalSize = size;
293
+ this.splitview.layout(orthogonalSize, size);
294
+ };
295
+ BranchNode.prototype.addChild = function (node, size, index, skipLayout) {
296
+ if (index < 0 || index > this.children.length) {
297
+ throw new Error('Invalid index');
298
+ }
299
+ this.splitview.addView(node, size, index, skipLayout);
300
+ this._addChild(node, index);
301
+ };
302
+ BranchNode.prototype.getChildCachedVisibleSize = function (index) {
303
+ if (index < 0 || index >= this.children.length) {
304
+ throw new Error('Invalid index');
305
+ }
306
+ return this.splitview.getViewCachedVisibleSize(index);
307
+ };
308
+ BranchNode.prototype.removeChild = function (index, sizing) {
309
+ if (index < 0 || index >= this.children.length) {
310
+ throw new Error('Invalid index');
311
+ }
312
+ this.splitview.removeView(index, sizing);
313
+ return this._removeChild(index);
314
+ };
315
+ BranchNode.prototype._addChild = function (node, index) {
316
+ this.children.splice(index, 0, node);
317
+ this.setupChildrenEvents();
318
+ };
319
+ BranchNode.prototype._removeChild = function (index) {
320
+ var _a = __read(this.children.splice(index, 1), 1), child = _a[0];
321
+ this.setupChildrenEvents();
322
+ return child;
323
+ };
324
+ BranchNode.prototype.setupChildrenEvents = function () {
325
+ var _this = this;
326
+ this._childrenDisposable.dispose();
327
+ this._childrenDisposable = events_1.Event.any.apply(events_1.Event, __spreadArray([], __read(this.children.map(function (c) { return c.onDidChange; })), false))(function (e) {
328
+ /**
329
+ * indicate a change has occured to allows any re-rendering but don't bubble
330
+ * event because that was specific to this branch
331
+ */
332
+ _this._onDidChange.fire({ size: e.orthogonalSize });
333
+ });
334
+ };
335
+ BranchNode.prototype.dispose = function () {
336
+ this._childrenDisposable.dispose();
337
+ this.splitview.dispose();
338
+ this.children.forEach(function (child) { return child.dispose(); });
339
+ _super.prototype.dispose.call(this);
340
+ };
341
+ return BranchNode;
342
+ }(lifecycle_1.CompositeDisposable));
343
+ exports.BranchNode = BranchNode;
344
344
  //# sourceMappingURL=branchNode.js.map