dockview-core 1.9.2 → 1.10.1
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.
- package/dist/cjs/api/component.api.d.ts +35 -8
- package/dist/cjs/api/component.api.js +37 -7
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +7 -1
- package/dist/cjs/api/dockviewGroupPanelApi.js +22 -3
- package/dist/cjs/api/dockviewPanelApi.d.ts +24 -7
- package/dist/cjs/api/dockviewPanelApi.js +60 -14
- package/dist/cjs/api/gridviewPanelApi.d.ts +0 -1
- package/dist/cjs/api/gridviewPanelApi.js +1 -4
- package/dist/cjs/api/panelApi.d.ts +10 -8
- package/dist/cjs/api/panelApi.js +19 -29
- package/dist/cjs/api/paneviewPanelApi.d.ts +0 -1
- package/dist/cjs/api/paneviewPanelApi.js +0 -1
- package/dist/cjs/api/splitviewPanelApi.d.ts +0 -1
- package/dist/cjs/api/splitviewPanelApi.js +0 -1
- package/dist/cjs/array.d.ts +0 -1
- package/dist/cjs/array.js +0 -1
- package/dist/cjs/constants.d.ts +0 -1
- package/dist/cjs/constants.js +0 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +0 -1
- package/dist/cjs/dnd/abstractDragHandler.js +0 -1
- package/dist/cjs/dnd/dataTransfer.d.ts +0 -1
- package/dist/cjs/dnd/dataTransfer.js +0 -1
- package/dist/cjs/dnd/dnd.d.ts +0 -1
- package/dist/cjs/dnd/dnd.js +0 -1
- package/dist/cjs/dnd/droptarget.d.ts +20 -9
- package/dist/cjs/dnd/droptarget.js +71 -14
- package/dist/cjs/dnd/ghost.d.ts +0 -1
- package/dist/cjs/dnd/ghost.js +0 -1
- package/dist/cjs/dnd/groupDragHandler.d.ts +0 -1
- package/dist/cjs/dnd/groupDragHandler.js +1 -2
- package/dist/cjs/dnd/overlay.d.ts +0 -1
- package/dist/cjs/dnd/overlay.js +0 -1
- package/dist/cjs/dockview/components/panel/content.d.ts +0 -1
- package/dist/cjs/dockview/components/panel/content.js +6 -7
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -1
- package/dist/cjs/dockview/components/tab/tab.d.ts +5 -13
- package/dist/cjs/dockview/components/tab/tab.js +5 -6
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +17 -14
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +26 -22
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +3 -3
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +5 -6
- package/dist/cjs/dockview/components/watermark/watermark.d.ts +0 -1
- package/dist/cjs/dockview/components/watermark/watermark.js +0 -1
- package/dist/cjs/dockview/deserializer.d.ts +0 -1
- package/dist/cjs/dockview/deserializer.js +0 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +86 -25
- package/dist/cjs/dockview/dockviewComponent.js +586 -198
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +0 -1
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +0 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.js +6 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +81 -37
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +226 -57
- package/dist/cjs/dockview/dockviewPanel.d.ts +8 -3
- package/dist/cjs/dockview/dockviewPanel.js +39 -12
- package/dist/cjs/dockview/dockviewPanelModel.d.ts +1 -4
- package/dist/cjs/dockview/dockviewPanelModel.js +2 -22
- package/dist/cjs/dockview/options.d.ts +10 -6
- package/dist/cjs/dockview/options.js +0 -1
- package/dist/cjs/dockview/types.d.ts +0 -11
- package/dist/cjs/dockview/types.js +0 -9
- package/dist/cjs/dom.d.ts +0 -1
- package/dist/cjs/dom.js +0 -1
- package/dist/cjs/events.d.ts +10 -1
- package/dist/cjs/events.js +25 -2
- package/dist/cjs/gridview/baseComponentGridview.d.ts +15 -16
- package/dist/cjs/gridview/baseComponentGridview.js +37 -27
- package/dist/cjs/gridview/basePanelView.d.ts +0 -1
- package/dist/cjs/gridview/basePanelView.js +7 -2
- package/dist/cjs/gridview/branchNode.d.ts +3 -2
- package/dist/cjs/gridview/branchNode.js +12 -2
- package/dist/cjs/gridview/gridview.d.ts +5 -3
- package/dist/cjs/gridview/gridview.js +54 -21
- package/dist/cjs/gridview/gridviewComponent.d.ts +10 -2
- package/dist/cjs/gridview/gridviewComponent.js +14 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.js +2 -3
- package/dist/cjs/gridview/leafNode.d.ts +0 -1
- package/dist/cjs/gridview/leafNode.js +0 -1
- package/dist/cjs/gridview/options.d.ts +1 -2
- package/dist/cjs/gridview/options.js +0 -1
- package/dist/cjs/gridview/types.d.ts +0 -1
- package/dist/cjs/gridview/types.js +0 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/lifecycle.d.ts +3 -4
- package/dist/cjs/lifecycle.js +5 -2
- package/dist/cjs/math.d.ts +0 -1
- package/dist/cjs/math.js +0 -1
- package/dist/cjs/overlayRenderContainer.d.ts +1 -1
- package/dist/cjs/overlayRenderContainer.js +8 -4
- package/dist/cjs/panel/componentFactory.d.ts +0 -1
- package/dist/cjs/panel/componentFactory.js +0 -1
- package/dist/cjs/panel/types.d.ts +1 -2
- package/dist/cjs/panel/types.js +0 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +0 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -1
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +0 -1
- package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -1
- package/dist/cjs/paneview/options.d.ts +1 -2
- package/dist/cjs/paneview/options.js +0 -1
- package/dist/cjs/paneview/paneview.d.ts +1 -1
- package/dist/cjs/paneview/paneview.js +3 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +2 -1
- package/dist/cjs/paneview/paneviewComponent.js +6 -1
- package/dist/cjs/paneview/paneviewPanel.d.ts +2 -1
- package/dist/cjs/paneview/paneviewPanel.js +5 -2
- package/dist/cjs/popoutWindow.d.ts +15 -4
- package/dist/cjs/popoutWindow.js +140 -56
- package/dist/cjs/resizable.d.ts +1 -2
- package/dist/cjs/resizable.js +1 -10
- package/dist/cjs/splitview/options.d.ts +3 -7
- package/dist/cjs/splitview/options.js +0 -1
- package/dist/cjs/splitview/splitview.d.ts +3 -1
- package/dist/cjs/splitview/splitview.js +12 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts +1 -2
- package/dist/cjs/splitview/splitviewComponent.js +5 -6
- package/dist/cjs/splitview/splitviewPanel.d.ts +2 -3
- package/dist/cjs/splitview/splitviewPanel.js +1 -2
- package/dist/cjs/splitview/viewItem.d.ts +0 -1
- package/dist/cjs/splitview/viewItem.js +0 -1
- package/dist/cjs/svg.d.ts +0 -1
- package/dist/cjs/svg.js +0 -1
- package/dist/cjs/types.d.ts +0 -1
- package/dist/cjs/types.js +0 -1
- package/dist/dockview-core.amd.js +1298 -531
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +1297 -530
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +1298 -531
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +1296 -532
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +1298 -531
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +1297 -530
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/component.api.d.ts +35 -8
- package/dist/esm/api/component.api.js +29 -7
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +7 -1
- package/dist/esm/api/dockviewGroupPanelApi.js +22 -3
- package/dist/esm/api/dockviewPanelApi.d.ts +24 -7
- package/dist/esm/api/dockviewPanelApi.js +56 -14
- package/dist/esm/api/gridviewPanelApi.d.ts +0 -1
- package/dist/esm/api/gridviewPanelApi.js +1 -4
- package/dist/esm/api/panelApi.d.ts +10 -8
- package/dist/esm/api/panelApi.js +16 -29
- package/dist/esm/api/paneviewPanelApi.d.ts +0 -1
- package/dist/esm/api/paneviewPanelApi.js +0 -1
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -1
- package/dist/esm/api/splitviewPanelApi.js +0 -1
- package/dist/esm/array.d.ts +0 -1
- package/dist/esm/array.js +0 -1
- package/dist/esm/constants.d.ts +0 -1
- package/dist/esm/constants.js +0 -1
- package/dist/esm/dnd/abstractDragHandler.d.ts +0 -1
- package/dist/esm/dnd/abstractDragHandler.js +0 -1
- package/dist/esm/dnd/dataTransfer.d.ts +0 -1
- package/dist/esm/dnd/dataTransfer.js +0 -1
- package/dist/esm/dnd/dnd.d.ts +0 -1
- package/dist/esm/dnd/dnd.js +0 -1
- package/dist/esm/dnd/droptarget.d.ts +20 -9
- package/dist/esm/dnd/droptarget.js +59 -14
- package/dist/esm/dnd/ghost.d.ts +0 -1
- package/dist/esm/dnd/ghost.js +0 -1
- package/dist/esm/dnd/groupDragHandler.d.ts +0 -1
- package/dist/esm/dnd/groupDragHandler.js +1 -2
- package/dist/esm/dnd/overlay.d.ts +0 -1
- package/dist/esm/dnd/overlay.js +0 -1
- package/dist/esm/dockview/components/panel/content.d.ts +0 -1
- package/dist/esm/dockview/components/panel/content.js +6 -7
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/esm/dockview/components/tab/defaultTab.js +0 -1
- package/dist/esm/dockview/components/tab/tab.d.ts +5 -13
- package/dist/esm/dockview/components/tab/tab.js +6 -7
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +17 -14
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +24 -20
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +3 -3
- package/dist/esm/dockview/components/titlebar/voidContainer.js +6 -7
- package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -1
- package/dist/esm/dockview/components/watermark/watermark.js +0 -1
- package/dist/esm/dockview/deserializer.d.ts +0 -1
- package/dist/esm/dockview/deserializer.js +0 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +86 -25
- package/dist/esm/dockview/dockviewComponent.js +529 -163
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +0 -1
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +0 -1
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -1
- package/dist/esm/dockview/dockviewGroupPanel.js +6 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +81 -37
- package/dist/esm/dockview/dockviewGroupPanelModel.js +169 -53
- package/dist/esm/dockview/dockviewPanel.d.ts +8 -3
- package/dist/esm/dockview/dockviewPanel.js +39 -12
- package/dist/esm/dockview/dockviewPanelModel.d.ts +1 -4
- package/dist/esm/dockview/dockviewPanelModel.js +2 -22
- package/dist/esm/dockview/options.d.ts +10 -6
- package/dist/esm/dockview/options.js +0 -1
- package/dist/esm/dockview/types.d.ts +0 -11
- package/dist/esm/dockview/types.js +1 -8
- package/dist/esm/dom.d.ts +0 -1
- package/dist/esm/dom.js +0 -1
- package/dist/esm/events.d.ts +10 -1
- package/dist/esm/events.js +14 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts +15 -16
- package/dist/esm/gridview/baseComponentGridview.js +33 -27
- package/dist/esm/gridview/basePanelView.d.ts +0 -1
- package/dist/esm/gridview/basePanelView.js +7 -2
- package/dist/esm/gridview/branchNode.d.ts +3 -2
- package/dist/esm/gridview/branchNode.js +8 -2
- package/dist/esm/gridview/gridview.d.ts +5 -3
- package/dist/esm/gridview/gridview.js +49 -20
- package/dist/esm/gridview/gridviewComponent.d.ts +10 -2
- package/dist/esm/gridview/gridviewComponent.js +14 -1
- package/dist/esm/gridview/gridviewPanel.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.js +2 -3
- package/dist/esm/gridview/leafNode.d.ts +0 -1
- package/dist/esm/gridview/leafNode.js +0 -1
- package/dist/esm/gridview/options.d.ts +1 -2
- package/dist/esm/gridview/options.js +0 -1
- package/dist/esm/gridview/types.d.ts +0 -1
- package/dist/esm/gridview/types.js +0 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +0 -2
- package/dist/esm/lifecycle.d.ts +3 -4
- package/dist/esm/lifecycle.js +5 -2
- package/dist/esm/math.d.ts +0 -1
- package/dist/esm/math.js +0 -1
- package/dist/esm/overlayRenderContainer.d.ts +1 -1
- package/dist/esm/overlayRenderContainer.js +8 -4
- package/dist/esm/panel/componentFactory.d.ts +0 -1
- package/dist/esm/panel/componentFactory.js +0 -1
- package/dist/esm/panel/types.d.ts +1 -2
- package/dist/esm/panel/types.js +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.js +0 -1
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -1
- package/dist/esm/paneview/draggablePaneviewPanel.js +0 -1
- package/dist/esm/paneview/options.d.ts +1 -2
- package/dist/esm/paneview/options.js +0 -1
- package/dist/esm/paneview/paneview.d.ts +1 -1
- package/dist/esm/paneview/paneview.js +3 -1
- package/dist/esm/paneview/paneviewComponent.d.ts +2 -1
- package/dist/esm/paneview/paneviewComponent.js +6 -1
- package/dist/esm/paneview/paneviewPanel.d.ts +2 -1
- package/dist/esm/paneview/paneviewPanel.js +5 -2
- package/dist/esm/popoutWindow.d.ts +15 -4
- package/dist/esm/popoutWindow.js +105 -52
- package/dist/esm/resizable.d.ts +1 -2
- package/dist/esm/resizable.js +1 -10
- package/dist/esm/splitview/options.d.ts +3 -7
- package/dist/esm/splitview/options.js +0 -1
- package/dist/esm/splitview/splitview.d.ts +3 -1
- package/dist/esm/splitview/splitview.js +8 -1
- package/dist/esm/splitview/splitviewComponent.d.ts +1 -2
- package/dist/esm/splitview/splitviewComponent.js +5 -6
- package/dist/esm/splitview/splitviewPanel.d.ts +2 -3
- package/dist/esm/splitview/splitviewPanel.js +1 -2
- package/dist/esm/splitview/viewItem.d.ts +0 -1
- package/dist/esm/splitview/viewItem.js +0 -1
- package/dist/esm/svg.d.ts +0 -1
- package/dist/esm/svg.js +0 -1
- package/dist/esm/types.d.ts +0 -1
- package/dist/esm/types.js +0 -1
- package/dist/styles/dockview.css +20 -6
- package/package.json +3 -3
- package/dist/cjs/api/component.api.d.ts.map +0 -1
- package/dist/cjs/api/component.api.js.map +0 -1
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts.map +0 -1
- package/dist/cjs/api/dockviewGroupPanelApi.js.map +0 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts.map +0 -1
- package/dist/cjs/api/dockviewPanelApi.js.map +0 -1
- package/dist/cjs/api/gridviewPanelApi.d.ts.map +0 -1
- package/dist/cjs/api/gridviewPanelApi.js.map +0 -1
- package/dist/cjs/api/panelApi.d.ts.map +0 -1
- package/dist/cjs/api/panelApi.js.map +0 -1
- package/dist/cjs/api/paneviewPanelApi.d.ts.map +0 -1
- package/dist/cjs/api/paneviewPanelApi.js.map +0 -1
- package/dist/cjs/api/splitviewPanelApi.d.ts.map +0 -1
- package/dist/cjs/api/splitviewPanelApi.js.map +0 -1
- package/dist/cjs/array.d.ts.map +0 -1
- package/dist/cjs/array.js.map +0 -1
- package/dist/cjs/constants.d.ts.map +0 -1
- package/dist/cjs/constants.js.map +0 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts.map +0 -1
- package/dist/cjs/dnd/abstractDragHandler.js.map +0 -1
- package/dist/cjs/dnd/dataTransfer.d.ts.map +0 -1
- package/dist/cjs/dnd/dataTransfer.js.map +0 -1
- package/dist/cjs/dnd/dnd.d.ts.map +0 -1
- package/dist/cjs/dnd/dnd.js.map +0 -1
- package/dist/cjs/dnd/droptarget.d.ts.map +0 -1
- package/dist/cjs/dnd/droptarget.js.map +0 -1
- package/dist/cjs/dnd/ghost.d.ts.map +0 -1
- package/dist/cjs/dnd/ghost.js.map +0 -1
- package/dist/cjs/dnd/groupDragHandler.d.ts.map +0 -1
- package/dist/cjs/dnd/groupDragHandler.js.map +0 -1
- package/dist/cjs/dnd/overlay.d.ts.map +0 -1
- package/dist/cjs/dnd/overlay.js.map +0 -1
- package/dist/cjs/dockview/components/panel/content.d.ts.map +0 -1
- package/dist/cjs/dockview/components/panel/content.js.map +0 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts.map +0 -1
- package/dist/cjs/dockview/components/tab/defaultTab.js.map +0 -1
- package/dist/cjs/dockview/components/tab/tab.d.ts.map +0 -1
- package/dist/cjs/dockview/components/tab/tab.js.map +0 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts.map +0 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js.map +0 -1
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts.map +0 -1
- package/dist/cjs/dockview/components/titlebar/voidContainer.js.map +0 -1
- package/dist/cjs/dockview/components/watermark/watermark.d.ts.map +0 -1
- package/dist/cjs/dockview/components/watermark/watermark.js.map +0 -1
- package/dist/cjs/dockview/deserializer.d.ts.map +0 -1
- package/dist/cjs/dockview/deserializer.js.map +0 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewComponent.js.map +0 -1
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js.map +0 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +0 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js.map +0 -1
- package/dist/cjs/dockview/dockviewPanel.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewPanel.js.map +0 -1
- package/dist/cjs/dockview/dockviewPanelModel.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewPanelModel.js.map +0 -1
- package/dist/cjs/dockview/dockviewPopoutGroupPanel.d.ts +0 -16
- package/dist/cjs/dockview/dockviewPopoutGroupPanel.d.ts.map +0 -1
- package/dist/cjs/dockview/dockviewPopoutGroupPanel.js +0 -50
- package/dist/cjs/dockview/dockviewPopoutGroupPanel.js.map +0 -1
- package/dist/cjs/dockview/options.d.ts.map +0 -1
- package/dist/cjs/dockview/options.js.map +0 -1
- package/dist/cjs/dockview/types.d.ts.map +0 -1
- package/dist/cjs/dockview/types.js.map +0 -1
- package/dist/cjs/dom.d.ts.map +0 -1
- package/dist/cjs/dom.js.map +0 -1
- package/dist/cjs/events.d.ts.map +0 -1
- package/dist/cjs/events.js.map +0 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts.map +0 -1
- package/dist/cjs/gridview/baseComponentGridview.js.map +0 -1
- package/dist/cjs/gridview/basePanelView.d.ts.map +0 -1
- package/dist/cjs/gridview/basePanelView.js.map +0 -1
- package/dist/cjs/gridview/branchNode.d.ts.map +0 -1
- package/dist/cjs/gridview/branchNode.js.map +0 -1
- package/dist/cjs/gridview/gridview.d.ts.map +0 -1
- package/dist/cjs/gridview/gridview.js.map +0 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts.map +0 -1
- package/dist/cjs/gridview/gridviewComponent.js.map +0 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts.map +0 -1
- package/dist/cjs/gridview/gridviewPanel.js.map +0 -1
- package/dist/cjs/gridview/leafNode.d.ts.map +0 -1
- package/dist/cjs/gridview/leafNode.js.map +0 -1
- package/dist/cjs/gridview/options.d.ts.map +0 -1
- package/dist/cjs/gridview/options.js.map +0 -1
- package/dist/cjs/gridview/types.d.ts.map +0 -1
- package/dist/cjs/gridview/types.js.map +0 -1
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/lifecycle.d.ts.map +0 -1
- package/dist/cjs/lifecycle.js.map +0 -1
- package/dist/cjs/math.d.ts.map +0 -1
- package/dist/cjs/math.js.map +0 -1
- package/dist/cjs/overlayRenderContainer.d.ts.map +0 -1
- package/dist/cjs/overlayRenderContainer.js.map +0 -1
- package/dist/cjs/panel/componentFactory.d.ts.map +0 -1
- package/dist/cjs/panel/componentFactory.js.map +0 -1
- package/dist/cjs/panel/types.d.ts.map +0 -1
- package/dist/cjs/panel/types.js.map +0 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.d.ts.map +0 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.js.map +0 -1
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts.map +0 -1
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +0 -1
- package/dist/cjs/paneview/options.d.ts.map +0 -1
- package/dist/cjs/paneview/options.js.map +0 -1
- package/dist/cjs/paneview/paneview.d.ts.map +0 -1
- package/dist/cjs/paneview/paneview.js.map +0 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts.map +0 -1
- package/dist/cjs/paneview/paneviewComponent.js.map +0 -1
- package/dist/cjs/paneview/paneviewPanel.d.ts.map +0 -1
- package/dist/cjs/paneview/paneviewPanel.js.map +0 -1
- package/dist/cjs/popoutWindow.d.ts.map +0 -1
- package/dist/cjs/popoutWindow.js.map +0 -1
- package/dist/cjs/resizable.d.ts.map +0 -1
- package/dist/cjs/resizable.js.map +0 -1
- package/dist/cjs/splitview/options.d.ts.map +0 -1
- package/dist/cjs/splitview/options.js.map +0 -1
- package/dist/cjs/splitview/splitview.d.ts.map +0 -1
- package/dist/cjs/splitview/splitview.js.map +0 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts.map +0 -1
- package/dist/cjs/splitview/splitviewComponent.js.map +0 -1
- package/dist/cjs/splitview/splitviewPanel.d.ts.map +0 -1
- package/dist/cjs/splitview/splitviewPanel.js.map +0 -1
- package/dist/cjs/splitview/viewItem.d.ts.map +0 -1
- package/dist/cjs/splitview/viewItem.js.map +0 -1
- package/dist/cjs/svg.d.ts.map +0 -1
- package/dist/cjs/svg.js.map +0 -1
- package/dist/cjs/types.d.ts.map +0 -1
- package/dist/cjs/types.js.map +0 -1
- package/dist/esm/api/component.api.d.ts.map +0 -1
- package/dist/esm/api/component.api.js.map +0 -1
- package/dist/esm/api/dockviewGroupPanelApi.d.ts.map +0 -1
- package/dist/esm/api/dockviewGroupPanelApi.js.map +0 -1
- package/dist/esm/api/dockviewPanelApi.d.ts.map +0 -1
- package/dist/esm/api/dockviewPanelApi.js.map +0 -1
- package/dist/esm/api/gridviewPanelApi.d.ts.map +0 -1
- package/dist/esm/api/gridviewPanelApi.js.map +0 -1
- package/dist/esm/api/panelApi.d.ts.map +0 -1
- package/dist/esm/api/panelApi.js.map +0 -1
- package/dist/esm/api/paneviewPanelApi.d.ts.map +0 -1
- package/dist/esm/api/paneviewPanelApi.js.map +0 -1
- package/dist/esm/api/splitviewPanelApi.d.ts.map +0 -1
- package/dist/esm/api/splitviewPanelApi.js.map +0 -1
- package/dist/esm/array.d.ts.map +0 -1
- package/dist/esm/array.js.map +0 -1
- package/dist/esm/constants.d.ts.map +0 -1
- package/dist/esm/constants.js.map +0 -1
- package/dist/esm/dnd/abstractDragHandler.d.ts.map +0 -1
- package/dist/esm/dnd/abstractDragHandler.js.map +0 -1
- package/dist/esm/dnd/dataTransfer.d.ts.map +0 -1
- package/dist/esm/dnd/dataTransfer.js.map +0 -1
- package/dist/esm/dnd/dnd.d.ts.map +0 -1
- package/dist/esm/dnd/dnd.js.map +0 -1
- package/dist/esm/dnd/droptarget.d.ts.map +0 -1
- package/dist/esm/dnd/droptarget.js.map +0 -1
- package/dist/esm/dnd/ghost.d.ts.map +0 -1
- package/dist/esm/dnd/ghost.js.map +0 -1
- package/dist/esm/dnd/groupDragHandler.d.ts.map +0 -1
- package/dist/esm/dnd/groupDragHandler.js.map +0 -1
- package/dist/esm/dnd/overlay.d.ts.map +0 -1
- package/dist/esm/dnd/overlay.js.map +0 -1
- package/dist/esm/dockview/components/panel/content.d.ts.map +0 -1
- package/dist/esm/dockview/components/panel/content.js.map +0 -1
- package/dist/esm/dockview/components/tab/defaultTab.d.ts.map +0 -1
- package/dist/esm/dockview/components/tab/defaultTab.js.map +0 -1
- package/dist/esm/dockview/components/tab/tab.d.ts.map +0 -1
- package/dist/esm/dockview/components/tab/tab.js.map +0 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts.map +0 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js.map +0 -1
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts.map +0 -1
- package/dist/esm/dockview/components/titlebar/voidContainer.js.map +0 -1
- package/dist/esm/dockview/components/watermark/watermark.d.ts.map +0 -1
- package/dist/esm/dockview/components/watermark/watermark.js.map +0 -1
- package/dist/esm/dockview/deserializer.d.ts.map +0 -1
- package/dist/esm/dockview/deserializer.js.map +0 -1
- package/dist/esm/dockview/dockviewComponent.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewComponent.js.map +0 -1
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js.map +0 -1
- package/dist/esm/dockview/dockviewGroupPanel.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewGroupPanel.js.map +0 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js.map +0 -1
- package/dist/esm/dockview/dockviewPanel.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewPanel.js.map +0 -1
- package/dist/esm/dockview/dockviewPanelModel.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewPanelModel.js.map +0 -1
- package/dist/esm/dockview/dockviewPopoutGroupPanel.d.ts +0 -16
- package/dist/esm/dockview/dockviewPopoutGroupPanel.d.ts.map +0 -1
- package/dist/esm/dockview/dockviewPopoutGroupPanel.js +0 -28
- package/dist/esm/dockview/dockviewPopoutGroupPanel.js.map +0 -1
- package/dist/esm/dockview/options.d.ts.map +0 -1
- package/dist/esm/dockview/options.js.map +0 -1
- package/dist/esm/dockview/types.d.ts.map +0 -1
- package/dist/esm/dockview/types.js.map +0 -1
- package/dist/esm/dom.d.ts.map +0 -1
- package/dist/esm/dom.js.map +0 -1
- package/dist/esm/events.d.ts.map +0 -1
- package/dist/esm/events.js.map +0 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts.map +0 -1
- package/dist/esm/gridview/baseComponentGridview.js.map +0 -1
- package/dist/esm/gridview/basePanelView.d.ts.map +0 -1
- package/dist/esm/gridview/basePanelView.js.map +0 -1
- package/dist/esm/gridview/branchNode.d.ts.map +0 -1
- package/dist/esm/gridview/branchNode.js.map +0 -1
- package/dist/esm/gridview/gridview.d.ts.map +0 -1
- package/dist/esm/gridview/gridview.js.map +0 -1
- package/dist/esm/gridview/gridviewComponent.d.ts.map +0 -1
- package/dist/esm/gridview/gridviewComponent.js.map +0 -1
- package/dist/esm/gridview/gridviewPanel.d.ts.map +0 -1
- package/dist/esm/gridview/gridviewPanel.js.map +0 -1
- package/dist/esm/gridview/leafNode.d.ts.map +0 -1
- package/dist/esm/gridview/leafNode.js.map +0 -1
- package/dist/esm/gridview/options.d.ts.map +0 -1
- package/dist/esm/gridview/options.js.map +0 -1
- package/dist/esm/gridview/types.d.ts.map +0 -1
- package/dist/esm/gridview/types.js.map +0 -1
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lifecycle.d.ts.map +0 -1
- package/dist/esm/lifecycle.js.map +0 -1
- package/dist/esm/math.d.ts.map +0 -1
- package/dist/esm/math.js.map +0 -1
- package/dist/esm/overlayRenderContainer.d.ts.map +0 -1
- package/dist/esm/overlayRenderContainer.js.map +0 -1
- package/dist/esm/panel/componentFactory.d.ts.map +0 -1
- package/dist/esm/panel/componentFactory.js.map +0 -1
- package/dist/esm/panel/types.d.ts.map +0 -1
- package/dist/esm/panel/types.js.map +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts.map +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.js.map +0 -1
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts.map +0 -1
- package/dist/esm/paneview/draggablePaneviewPanel.js.map +0 -1
- package/dist/esm/paneview/options.d.ts.map +0 -1
- package/dist/esm/paneview/options.js.map +0 -1
- package/dist/esm/paneview/paneview.d.ts.map +0 -1
- package/dist/esm/paneview/paneview.js.map +0 -1
- package/dist/esm/paneview/paneviewComponent.d.ts.map +0 -1
- package/dist/esm/paneview/paneviewComponent.js.map +0 -1
- package/dist/esm/paneview/paneviewPanel.d.ts.map +0 -1
- package/dist/esm/paneview/paneviewPanel.js.map +0 -1
- package/dist/esm/popoutWindow.d.ts.map +0 -1
- package/dist/esm/popoutWindow.js.map +0 -1
- package/dist/esm/resizable.d.ts.map +0 -1
- package/dist/esm/resizable.js.map +0 -1
- package/dist/esm/splitview/options.d.ts.map +0 -1
- package/dist/esm/splitview/options.js.map +0 -1
- package/dist/esm/splitview/splitview.d.ts.map +0 -1
- package/dist/esm/splitview/splitview.js.map +0 -1
- package/dist/esm/splitview/splitviewComponent.d.ts.map +0 -1
- package/dist/esm/splitview/splitviewComponent.js.map +0 -1
- package/dist/esm/splitview/splitviewPanel.d.ts.map +0 -1
- package/dist/esm/splitview/splitviewPanel.js.map +0 -1
- package/dist/esm/splitview/viewItem.d.ts.map +0 -1
- package/dist/esm/splitview/viewItem.js.map +0 -1
- package/dist/esm/svg.d.ts.map +0 -1
- package/dist/esm/svg.js.map +0 -1
- package/dist/esm/types.d.ts.map +0 -1
- package/dist/esm/types.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.10.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -88,6 +88,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
})(exports.DockviewEvent || (exports.DockviewEvent = {}));
|
|
91
|
+
class DockviewEvent {
|
|
92
|
+
constructor() {
|
|
93
|
+
this._defaultPrevented = false;
|
|
94
|
+
}
|
|
95
|
+
get defaultPrevented() {
|
|
96
|
+
return this._defaultPrevented;
|
|
97
|
+
}
|
|
98
|
+
preventDefault() {
|
|
99
|
+
this._defaultPrevented = true;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
91
102
|
class LeakageMonitor {
|
|
92
103
|
constructor() {
|
|
93
104
|
this.events = new Map();
|
|
@@ -131,6 +142,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
131
142
|
}
|
|
132
143
|
Emitter.ENABLE_TRACKING = isEnabled;
|
|
133
144
|
}
|
|
145
|
+
get value() {
|
|
146
|
+
return this._last;
|
|
147
|
+
}
|
|
134
148
|
constructor(options) {
|
|
135
149
|
this.options = options;
|
|
136
150
|
this._listeners = [];
|
|
@@ -253,8 +267,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
253
267
|
args.forEach((arg) => this._disposables.push(arg));
|
|
254
268
|
}
|
|
255
269
|
dispose() {
|
|
256
|
-
this.
|
|
270
|
+
if (this._isDisposed) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
257
273
|
this._isDisposed = true;
|
|
274
|
+
this._disposables.forEach((arg) => arg.dispose());
|
|
275
|
+
this._disposables = [];
|
|
258
276
|
}
|
|
259
277
|
}
|
|
260
278
|
class MutableDisposable {
|
|
@@ -738,6 +756,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
738
756
|
this._endSnappingEnabled = endSnappingEnabled;
|
|
739
757
|
this.updateSashEnablement();
|
|
740
758
|
}
|
|
759
|
+
get disabled() {
|
|
760
|
+
return this._disabled;
|
|
761
|
+
}
|
|
762
|
+
set disabled(value) {
|
|
763
|
+
this._disabled = value;
|
|
764
|
+
toggleClass(this.element, 'dv-splitview-disabled', value);
|
|
765
|
+
}
|
|
741
766
|
constructor(container, options) {
|
|
742
767
|
this.container = container;
|
|
743
768
|
this.viewItems = [];
|
|
@@ -748,6 +773,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
748
773
|
this._proportions = undefined;
|
|
749
774
|
this._startSnappingEnabled = true;
|
|
750
775
|
this._endSnappingEnabled = true;
|
|
776
|
+
this._disabled = false;
|
|
751
777
|
this._onDidSashEnd = new Emitter();
|
|
752
778
|
this.onDidSashEnd = this._onDidSashEnd.event;
|
|
753
779
|
this._onDidAddView = new Emitter();
|
|
@@ -1422,6 +1448,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1422
1448
|
this._onDidChange.fire();
|
|
1423
1449
|
}));
|
|
1424
1450
|
}
|
|
1451
|
+
setViewVisible(index, visible) {
|
|
1452
|
+
this.splitview.setViewVisible(index, visible);
|
|
1453
|
+
}
|
|
1425
1454
|
addPane(pane, size, index = this.splitview.length, skipLayout = false) {
|
|
1426
1455
|
const disposable = pane.onDidChangeExpansionState(() => {
|
|
1427
1456
|
this.setupAnimation();
|
|
@@ -1675,7 +1704,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1675
1704
|
}
|
|
1676
1705
|
return exports.LayoutPriority.Normal;
|
|
1677
1706
|
}
|
|
1678
|
-
|
|
1707
|
+
get disabled() {
|
|
1708
|
+
return this.splitview.disabled;
|
|
1709
|
+
}
|
|
1710
|
+
set disabled(value) {
|
|
1711
|
+
this.splitview.disabled = value;
|
|
1712
|
+
}
|
|
1713
|
+
constructor(orientation, proportionalLayout, styles, size, orthogonalSize, disabled, childDescriptors) {
|
|
1679
1714
|
super();
|
|
1680
1715
|
this.orientation = orientation;
|
|
1681
1716
|
this.proportionalLayout = proportionalLayout;
|
|
@@ -1720,6 +1755,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1720
1755
|
styles,
|
|
1721
1756
|
});
|
|
1722
1757
|
}
|
|
1758
|
+
this.disabled = disabled;
|
|
1723
1759
|
this.addDisposables(this._onDidChange, this._onDidVisibilityChange, this.splitview.onDidSashEnd(() => {
|
|
1724
1760
|
this._onDidChange.fire({});
|
|
1725
1761
|
}));
|
|
@@ -1853,7 +1889,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1853
1889
|
}
|
|
1854
1890
|
function flipNode(node, size, orthogonalSize) {
|
|
1855
1891
|
if (node instanceof BranchNode) {
|
|
1856
|
-
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
1892
|
+
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize, node.disabled);
|
|
1857
1893
|
let totalSize = 0;
|
|
1858
1894
|
for (let i = node.children.length - 1; i >= 0; i--) {
|
|
1859
1895
|
const child = node.children[i];
|
|
@@ -1989,31 +2025,57 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
1989
2025
|
get maximumHeight() {
|
|
1990
2026
|
return this.root.maximumHeight;
|
|
1991
2027
|
}
|
|
2028
|
+
get locked() {
|
|
2029
|
+
return this._locked;
|
|
2030
|
+
}
|
|
2031
|
+
set locked(value) {
|
|
2032
|
+
this._locked = value;
|
|
2033
|
+
const branch = [this.root];
|
|
2034
|
+
/**
|
|
2035
|
+
* simple depth-first-search to cover all nodes
|
|
2036
|
+
*
|
|
2037
|
+
* @see https://en.wikipedia.org/wiki/Depth-first_search
|
|
2038
|
+
*/
|
|
2039
|
+
while (branch.length > 0) {
|
|
2040
|
+
const node = branch.pop();
|
|
2041
|
+
if (node instanceof BranchNode) {
|
|
2042
|
+
node.disabled = value;
|
|
2043
|
+
branch.push(...node.children);
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
1992
2047
|
maximizedView() {
|
|
1993
2048
|
var _a;
|
|
1994
|
-
return (_a = this._maximizedNode) === null || _a === void 0 ? void 0 : _a.view;
|
|
2049
|
+
return (_a = this._maximizedNode) === null || _a === void 0 ? void 0 : _a.leaf.view;
|
|
1995
2050
|
}
|
|
1996
2051
|
hasMaximizedView() {
|
|
1997
2052
|
return this._maximizedNode !== undefined;
|
|
1998
2053
|
}
|
|
1999
2054
|
maximizeView(view) {
|
|
2055
|
+
var _a;
|
|
2000
2056
|
const location = getGridLocation(view.element);
|
|
2001
2057
|
const [_, node] = this.getNode(location);
|
|
2002
2058
|
if (!(node instanceof LeafNode)) {
|
|
2003
2059
|
return;
|
|
2004
2060
|
}
|
|
2005
|
-
if (this._maximizedNode === node) {
|
|
2061
|
+
if (((_a = this._maximizedNode) === null || _a === void 0 ? void 0 : _a.leaf) === node) {
|
|
2006
2062
|
return;
|
|
2007
2063
|
}
|
|
2008
2064
|
if (this.hasMaximizedView()) {
|
|
2009
2065
|
this.exitMaximizedView();
|
|
2010
2066
|
}
|
|
2067
|
+
const hiddenOnMaximize = [];
|
|
2011
2068
|
function hideAllViewsBut(parent, exclude) {
|
|
2012
2069
|
for (let i = 0; i < parent.children.length; i++) {
|
|
2013
2070
|
const child = parent.children[i];
|
|
2014
2071
|
if (child instanceof LeafNode) {
|
|
2015
2072
|
if (child !== exclude) {
|
|
2016
|
-
parent.
|
|
2073
|
+
if (parent.isChildVisible(i)) {
|
|
2074
|
+
parent.setChildVisible(i, false);
|
|
2075
|
+
}
|
|
2076
|
+
else {
|
|
2077
|
+
hiddenOnMaximize.push(child);
|
|
2078
|
+
}
|
|
2017
2079
|
}
|
|
2018
2080
|
}
|
|
2019
2081
|
else {
|
|
@@ -2022,18 +2084,21 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2022
2084
|
}
|
|
2023
2085
|
}
|
|
2024
2086
|
hideAllViewsBut(this.root, node);
|
|
2025
|
-
this._maximizedNode = node;
|
|
2026
|
-
this.
|
|
2087
|
+
this._maximizedNode = { leaf: node, hiddenOnMaximize };
|
|
2088
|
+
this._onDidMaximizedNodeChange.fire();
|
|
2027
2089
|
}
|
|
2028
2090
|
exitMaximizedView() {
|
|
2029
2091
|
if (!this._maximizedNode) {
|
|
2030
2092
|
return;
|
|
2031
2093
|
}
|
|
2094
|
+
const hiddenOnMaximize = this._maximizedNode.hiddenOnMaximize;
|
|
2032
2095
|
function showViewsInReverseOrder(parent) {
|
|
2033
2096
|
for (let index = parent.children.length - 1; index >= 0; index--) {
|
|
2034
2097
|
const child = parent.children[index];
|
|
2035
2098
|
if (child instanceof LeafNode) {
|
|
2036
|
-
|
|
2099
|
+
if (!hiddenOnMaximize.includes(child)) {
|
|
2100
|
+
parent.setChildVisible(index, true);
|
|
2101
|
+
}
|
|
2037
2102
|
}
|
|
2038
2103
|
else {
|
|
2039
2104
|
showViewsInReverseOrder(child);
|
|
@@ -2042,13 +2107,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2042
2107
|
}
|
|
2043
2108
|
showViewsInReverseOrder(this.root);
|
|
2044
2109
|
this._maximizedNode = undefined;
|
|
2045
|
-
this.
|
|
2110
|
+
this._onDidMaximizedNodeChange.fire();
|
|
2046
2111
|
}
|
|
2047
2112
|
serialize() {
|
|
2048
2113
|
if (this.hasMaximizedView()) {
|
|
2049
2114
|
/**
|
|
2050
|
-
* do not persist maximized view state
|
|
2051
|
-
*
|
|
2115
|
+
* do not persist maximized view state
|
|
2116
|
+
* firstly exit any maximized views to ensure the correct dimensions are persisted
|
|
2052
2117
|
*/
|
|
2053
2118
|
this.exitMaximizedView();
|
|
2054
2119
|
}
|
|
@@ -2063,14 +2128,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2063
2128
|
dispose() {
|
|
2064
2129
|
this.disposable.dispose();
|
|
2065
2130
|
this._onDidChange.dispose();
|
|
2066
|
-
this.
|
|
2131
|
+
this._onDidMaximizedNodeChange.dispose();
|
|
2067
2132
|
this.root.dispose();
|
|
2068
2133
|
this._maximizedNode = undefined;
|
|
2069
2134
|
this.element.remove();
|
|
2070
2135
|
}
|
|
2071
2136
|
clear() {
|
|
2072
2137
|
const orientation = this.root.orientation;
|
|
2073
|
-
this.root = new BranchNode(orientation, this.proportionalLayout, this.styles, this.root.size, this.root.orthogonalSize);
|
|
2138
|
+
this.root = new BranchNode(orientation, this.proportionalLayout, this.styles, this.root.size, this.root.orthogonalSize, this._locked);
|
|
2074
2139
|
}
|
|
2075
2140
|
deserialize(json, deserializer) {
|
|
2076
2141
|
const orientation = json.orientation;
|
|
@@ -2091,8 +2156,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2091
2156
|
};
|
|
2092
2157
|
});
|
|
2093
2158
|
result = new BranchNode(orientation, this.proportionalLayout, this.styles, node.size, // <- orthogonal size - flips at each depth
|
|
2094
|
-
orthogonalSize, // <- size - flips at each depth
|
|
2095
|
-
children);
|
|
2159
|
+
orthogonalSize, // <- size - flips at each depth,
|
|
2160
|
+
this._locked, children);
|
|
2096
2161
|
}
|
|
2097
2162
|
else {
|
|
2098
2163
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2125,7 +2190,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2125
2190
|
}
|
|
2126
2191
|
const oldRoot = this.root;
|
|
2127
2192
|
oldRoot.element.remove();
|
|
2128
|
-
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
2193
|
+
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size, this._locked);
|
|
2129
2194
|
if (oldRoot.children.length === 0) ;
|
|
2130
2195
|
else if (oldRoot.children.length === 1) {
|
|
2131
2196
|
// can remove one level of redundant branching if there is only a single child
|
|
@@ -2193,15 +2258,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2193
2258
|
constructor(proportionalLayout, styles, orientation) {
|
|
2194
2259
|
this.proportionalLayout = proportionalLayout;
|
|
2195
2260
|
this.styles = styles;
|
|
2261
|
+
this._locked = false;
|
|
2196
2262
|
this._maximizedNode = undefined;
|
|
2197
2263
|
this.disposable = new MutableDisposable();
|
|
2198
2264
|
this._onDidChange = new Emitter();
|
|
2199
2265
|
this.onDidChange = this._onDidChange.event;
|
|
2200
|
-
this.
|
|
2201
|
-
this.
|
|
2266
|
+
this._onDidMaximizedNodeChange = new Emitter();
|
|
2267
|
+
this.onDidMaximizedNodeChange = this._onDidMaximizedNodeChange.event;
|
|
2202
2268
|
this.element = document.createElement('div');
|
|
2203
2269
|
this.element.className = 'grid-view';
|
|
2204
|
-
this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
|
|
2270
|
+
this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0, this._locked);
|
|
2205
2271
|
}
|
|
2206
2272
|
isViewVisible(location) {
|
|
2207
2273
|
const [rest, index] = tail(location);
|
|
@@ -2252,7 +2318,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2252
2318
|
}
|
|
2253
2319
|
const child = grandParent.removeChild(parentIndex);
|
|
2254
2320
|
child.dispose();
|
|
2255
|
-
const newParent = new BranchNode(parent.orientation, this.proportionalLayout, this.styles, parent.size, parent.orthogonalSize);
|
|
2321
|
+
const newParent = new BranchNode(parent.orientation, this.proportionalLayout, this.styles, parent.size, parent.orthogonalSize, this._locked);
|
|
2256
2322
|
grandParent.addChild(newParent, parent.size, parentIndex);
|
|
2257
2323
|
const newSibling = new LeafNode(parent.view, grandParent.orientation, parent.size);
|
|
2258
2324
|
newParent.addChild(newSibling, newSiblingSize, 0);
|
|
@@ -2880,13 +2946,36 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
2880
2946
|
return this.component.onDidDrop;
|
|
2881
2947
|
}
|
|
2882
2948
|
/**
|
|
2883
|
-
* Invoked
|
|
2949
|
+
* Invoked when a Drag'n'Drop event occurs but before dockview handles it giving the user an opportunity to intecept and
|
|
2950
|
+
* prevent the event from occuring using the standard `preventDefault()` syntax.
|
|
2951
|
+
*
|
|
2952
|
+
* Preventing certain events may causes unexpected behaviours, use carefully.
|
|
2953
|
+
*/
|
|
2954
|
+
get onWillDrop() {
|
|
2955
|
+
return this.component.onWillDrop;
|
|
2956
|
+
}
|
|
2957
|
+
/**
|
|
2958
|
+
* Invoked before an overlay is shown indicating a drop target.
|
|
2959
|
+
*
|
|
2960
|
+
* Calling `event.preventDefault()` will prevent the overlay being shown and prevent
|
|
2961
|
+
* the any subsequent drop event.
|
|
2962
|
+
*/
|
|
2963
|
+
get onWillShowOverlay() {
|
|
2964
|
+
return this.component.onWillShowOverlay;
|
|
2965
|
+
}
|
|
2966
|
+
/**
|
|
2967
|
+
* Invoked before a group is dragged.
|
|
2968
|
+
*
|
|
2969
|
+
* Calling `event.nativeEvent.preventDefault()` will prevent the group drag starting.
|
|
2970
|
+
*
|
|
2884
2971
|
*/
|
|
2885
2972
|
get onWillDragGroup() {
|
|
2886
2973
|
return this.component.onWillDragGroup;
|
|
2887
2974
|
}
|
|
2888
2975
|
/**
|
|
2889
|
-
* Invoked before a panel is dragged.
|
|
2976
|
+
* Invoked before a panel is dragged.
|
|
2977
|
+
*
|
|
2978
|
+
* Calling `event.nativeEvent.preventDefault()` will prevent the panel drag starting.
|
|
2890
2979
|
*/
|
|
2891
2980
|
get onWillDragPanel() {
|
|
2892
2981
|
return this.component.onWillDragPanel;
|
|
@@ -3014,17 +3103,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3014
3103
|
hasMaximizedGroup() {
|
|
3015
3104
|
return this.component.hasMaximizedGroup();
|
|
3016
3105
|
}
|
|
3017
|
-
|
|
3106
|
+
exitMaximizedGroup() {
|
|
3018
3107
|
this.component.exitMaximizedGroup();
|
|
3019
3108
|
}
|
|
3020
|
-
get
|
|
3021
|
-
return this.component.
|
|
3109
|
+
get onDidMaximizedGroupChange() {
|
|
3110
|
+
return this.component.onDidMaximizedGroupChange;
|
|
3022
3111
|
}
|
|
3023
3112
|
/**
|
|
3024
3113
|
* Add a popout group in a new Window
|
|
3025
3114
|
*/
|
|
3026
3115
|
addPopoutGroup(item, options) {
|
|
3027
|
-
this.component.addPopoutGroup(item, options);
|
|
3116
|
+
return this.component.addPopoutGroup(item, options);
|
|
3028
3117
|
}
|
|
3029
3118
|
}
|
|
3030
3119
|
|
|
@@ -3078,6 +3167,18 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3078
3167
|
}
|
|
3079
3168
|
}
|
|
3080
3169
|
|
|
3170
|
+
class WillShowOverlayEvent extends DockviewEvent {
|
|
3171
|
+
get nativeEvent() {
|
|
3172
|
+
return this.options.nativeEvent;
|
|
3173
|
+
}
|
|
3174
|
+
get position() {
|
|
3175
|
+
return this.options.position;
|
|
3176
|
+
}
|
|
3177
|
+
constructor(options) {
|
|
3178
|
+
super();
|
|
3179
|
+
this.options = options;
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3081
3182
|
function directionToPosition(direction) {
|
|
3082
3183
|
switch (direction) {
|
|
3083
3184
|
case 'above':
|
|
@@ -3130,6 +3231,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3130
3231
|
this.options = options;
|
|
3131
3232
|
this._onDrop = new Emitter();
|
|
3132
3233
|
this.onDrop = this._onDrop.event;
|
|
3234
|
+
this._onWillShowOverlay = new Emitter();
|
|
3235
|
+
this.onWillShowOverlay = this._onWillShowOverlay.event;
|
|
3133
3236
|
// use a set to take advantage of #<set>.has
|
|
3134
3237
|
this._acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
3135
3238
|
this.dnd = new DragAndDropObserver(this.element, {
|
|
@@ -3158,6 +3261,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3158
3261
|
this.removeDropTarget();
|
|
3159
3262
|
return;
|
|
3160
3263
|
}
|
|
3264
|
+
const willShowOverlayEvent = new WillShowOverlayEvent({
|
|
3265
|
+
nativeEvent: e,
|
|
3266
|
+
position: quadrant,
|
|
3267
|
+
});
|
|
3268
|
+
/**
|
|
3269
|
+
* Provide an opportunity to prevent the overlay appearing and in turn
|
|
3270
|
+
* any dnd behaviours
|
|
3271
|
+
*/
|
|
3272
|
+
this._onWillShowOverlay.fire(willShowOverlayEvent);
|
|
3273
|
+
if (willShowOverlayEvent.defaultPrevented) {
|
|
3274
|
+
this.removeDropTarget();
|
|
3275
|
+
return;
|
|
3276
|
+
}
|
|
3161
3277
|
if (typeof this.options.canDisplayOverlay === 'boolean') {
|
|
3162
3278
|
if (!this.options.canDisplayOverlay) {
|
|
3163
3279
|
this.removeDropTarget();
|
|
@@ -3200,7 +3316,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3200
3316
|
}
|
|
3201
3317
|
},
|
|
3202
3318
|
});
|
|
3203
|
-
this.addDisposables(this._onDrop, this.dnd);
|
|
3319
|
+
this.addDisposables(this._onDrop, this._onWillShowOverlay, this.dnd);
|
|
3204
3320
|
}
|
|
3205
3321
|
setTargetZones(acceptedTargetZones) {
|
|
3206
3322
|
this._acceptedTargetZonesSet = new Set(acceptedTargetZones);
|
|
@@ -3253,25 +3369,44 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3253
3369
|
size = clamp(0, sizeOptions.value, height) / height;
|
|
3254
3370
|
}
|
|
3255
3371
|
}
|
|
3256
|
-
const
|
|
3257
|
-
|
|
3258
|
-
|
|
3372
|
+
const box = { top: '0px', left: '0px', width: '100%', height: '100%' };
|
|
3373
|
+
/**
|
|
3374
|
+
* You can also achieve the overlay placement using the transform CSS property
|
|
3375
|
+
* to translate and scale the element however this has the undesired effect of
|
|
3376
|
+
* 'skewing' the element. Comment left here for anybody that ever revisits this.
|
|
3377
|
+
*
|
|
3378
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform
|
|
3379
|
+
*
|
|
3380
|
+
* right
|
|
3381
|
+
* translateX(${100 * (1 - size) / 2}%) scaleX(${scale})
|
|
3382
|
+
*
|
|
3383
|
+
* left
|
|
3384
|
+
* translateX(-${100 * (1 - size) / 2}%) scaleX(${scale})
|
|
3385
|
+
*
|
|
3386
|
+
* top
|
|
3387
|
+
* translateY(-${100 * (1 - size) / 2}%) scaleY(${scale})
|
|
3388
|
+
*
|
|
3389
|
+
* bottom
|
|
3390
|
+
* translateY(${100 * (1 - size) / 2}%) scaleY(${scale})
|
|
3391
|
+
*/
|
|
3259
3392
|
if (rightClass) {
|
|
3260
|
-
|
|
3393
|
+
box.left = `${100 * (1 - size)}%`;
|
|
3394
|
+
box.width = `${100 * size}%`;
|
|
3261
3395
|
}
|
|
3262
3396
|
else if (leftClass) {
|
|
3263
|
-
|
|
3397
|
+
box.width = `${100 * size}%`;
|
|
3264
3398
|
}
|
|
3265
3399
|
else if (topClass) {
|
|
3266
|
-
|
|
3400
|
+
box.height = `${100 * size}%`;
|
|
3267
3401
|
}
|
|
3268
3402
|
else if (bottomClass) {
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
else {
|
|
3272
|
-
transform = '';
|
|
3403
|
+
box.top = `${100 * (1 - size)}%`;
|
|
3404
|
+
box.height = `${100 * size}%`;
|
|
3273
3405
|
}
|
|
3274
|
-
this.overlayElement.style.
|
|
3406
|
+
this.overlayElement.style.top = box.top;
|
|
3407
|
+
this.overlayElement.style.left = box.left;
|
|
3408
|
+
this.overlayElement.style.width = box.width;
|
|
3409
|
+
this.overlayElement.style.height = box.height;
|
|
3275
3410
|
toggleClass(this.overlayElement, 'dv-drop-target-small-vertical', isSmallY);
|
|
3276
3411
|
toggleClass(this.overlayElement, 'dv-drop-target-small-horizontal', isSmallX);
|
|
3277
3412
|
toggleClass(this.overlayElement, 'dv-drop-target-left', isLeft);
|
|
@@ -3339,14 +3474,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3339
3474
|
return 'center';
|
|
3340
3475
|
}
|
|
3341
3476
|
|
|
3342
|
-
exports.DockviewDropTargets = void 0;
|
|
3343
|
-
(function (DockviewDropTargets) {
|
|
3344
|
-
DockviewDropTargets[DockviewDropTargets["Tab"] = 0] = "Tab";
|
|
3345
|
-
DockviewDropTargets[DockviewDropTargets["Panel"] = 1] = "Panel";
|
|
3346
|
-
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
3347
|
-
DockviewDropTargets[DockviewDropTargets["Edge"] = 3] = "Edge";
|
|
3348
|
-
})(exports.DockviewDropTargets || (exports.DockviewDropTargets = {}));
|
|
3349
|
-
|
|
3350
3477
|
class ContentContainer extends CompositeDisposable {
|
|
3351
3478
|
get element() {
|
|
3352
3479
|
return this._element;
|
|
@@ -3374,7 +3501,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3374
3501
|
const data = getPanelData();
|
|
3375
3502
|
if (!data &&
|
|
3376
3503
|
event.shiftKey &&
|
|
3377
|
-
this.group.location !== 'floating') {
|
|
3504
|
+
this.group.location.type !== 'floating') {
|
|
3378
3505
|
return false;
|
|
3379
3506
|
}
|
|
3380
3507
|
if (data && data.viewId === this.accessor.id) {
|
|
@@ -3392,7 +3519,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3392
3519
|
data.groupId === this.group.id;
|
|
3393
3520
|
return !groupHasOnePanelAndIsActiveDragElement;
|
|
3394
3521
|
}
|
|
3395
|
-
return this.group.canDisplayOverlay(event, position,
|
|
3522
|
+
return this.group.canDisplayOverlay(event, position, 'content');
|
|
3396
3523
|
},
|
|
3397
3524
|
});
|
|
3398
3525
|
this.addDisposables(this.dropTarget);
|
|
@@ -3417,7 +3544,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3417
3544
|
let container;
|
|
3418
3545
|
switch (panel.api.renderer) {
|
|
3419
3546
|
case 'onlyWhenVisibile':
|
|
3420
|
-
this.
|
|
3547
|
+
this.group.renderContainer.detatch(panel);
|
|
3421
3548
|
if (this.panel) {
|
|
3422
3549
|
if (doRender) {
|
|
3423
3550
|
this._element.appendChild(this.panel.view.content.element);
|
|
@@ -3429,7 +3556,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3429
3556
|
if (panel.view.content.element.parentElement === this._element) {
|
|
3430
3557
|
this._element.removeChild(panel.view.content.element);
|
|
3431
3558
|
}
|
|
3432
|
-
container = this.
|
|
3559
|
+
container = this.group.renderContainer.attach({
|
|
3433
3560
|
panel,
|
|
3434
3561
|
referenceContainer: this,
|
|
3435
3562
|
});
|
|
@@ -3460,9 +3587,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3460
3587
|
// noop
|
|
3461
3588
|
}
|
|
3462
3589
|
closePanel() {
|
|
3590
|
+
var _a;
|
|
3463
3591
|
if (this.panel) {
|
|
3464
3592
|
if (this.panel.api.renderer === 'onlyWhenVisibile') {
|
|
3465
|
-
this.
|
|
3593
|
+
(_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
|
|
3466
3594
|
}
|
|
3467
3595
|
}
|
|
3468
3596
|
this.panel = undefined;
|
|
@@ -3573,7 +3701,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3573
3701
|
this._element.draggable = true;
|
|
3574
3702
|
toggleClass(this.element, 'inactive-tab', true);
|
|
3575
3703
|
const dragHandler = new TabDragHandler(this._element, this.accessor, this.group, this.panel);
|
|
3576
|
-
this.
|
|
3704
|
+
this.dropTarget = new Droptarget(this._element, {
|
|
3577
3705
|
acceptedTargetZones: ['center'],
|
|
3578
3706
|
canDisplayOverlay: (event, position) => {
|
|
3579
3707
|
if (this.group.locked) {
|
|
@@ -3588,9 +3716,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3588
3716
|
}
|
|
3589
3717
|
return this.panel.id !== data.panelId;
|
|
3590
3718
|
}
|
|
3591
|
-
return this.group.model.canDisplayOverlay(event, position,
|
|
3719
|
+
return this.group.model.canDisplayOverlay(event, position, 'tab');
|
|
3592
3720
|
},
|
|
3593
3721
|
});
|
|
3722
|
+
this.onWillShowOverlay = this.dropTarget.onWillShowOverlay;
|
|
3594
3723
|
this.addDisposables(this._onChanged, this._onDropped, this._onDragStart, dragHandler.onDragStart((event) => {
|
|
3595
3724
|
this._onDragStart.fire(event);
|
|
3596
3725
|
}), dragHandler, addDisposableListener(this._element, 'mousedown', (event) => {
|
|
@@ -3598,9 +3727,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3598
3727
|
return;
|
|
3599
3728
|
}
|
|
3600
3729
|
this._onChanged.fire(event);
|
|
3601
|
-
}), this.
|
|
3730
|
+
}), this.dropTarget.onDrop((event) => {
|
|
3602
3731
|
this._onDropped.fire(event);
|
|
3603
|
-
}), this.
|
|
3732
|
+
}), this.dropTarget);
|
|
3604
3733
|
}
|
|
3605
3734
|
setActive(isActive) {
|
|
3606
3735
|
toggleClass(this.element, 'active-tab', isActive);
|
|
@@ -3647,7 +3776,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3647
3776
|
}, true));
|
|
3648
3777
|
}
|
|
3649
3778
|
isCancelled(_event) {
|
|
3650
|
-
if (this.group.api.location === 'floating' && !_event.shiftKey) {
|
|
3779
|
+
if (this.group.api.location.type === 'floating' && !_event.shiftKey) {
|
|
3651
3780
|
return true;
|
|
3652
3781
|
}
|
|
3653
3782
|
return false;
|
|
@@ -3699,7 +3828,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3699
3828
|
this.accessor.doSetGroupActive(this.group);
|
|
3700
3829
|
}));
|
|
3701
3830
|
const handler = new GroupDragHandler(this._element, accessor, group);
|
|
3702
|
-
this.
|
|
3831
|
+
this.dropTraget = new Droptarget(this._element, {
|
|
3703
3832
|
acceptedTargetZones: ['center'],
|
|
3704
3833
|
canDisplayOverlay: (event, position) => {
|
|
3705
3834
|
var _a;
|
|
@@ -3713,14 +3842,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3713
3842
|
// don't show the overlay if the tab being dragged is the last panel of this group
|
|
3714
3843
|
return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
|
|
3715
3844
|
}
|
|
3716
|
-
return group.model.canDisplayOverlay(event, position,
|
|
3845
|
+
return group.model.canDisplayOverlay(event, position, 'header_space');
|
|
3717
3846
|
},
|
|
3718
3847
|
});
|
|
3848
|
+
this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
|
|
3719
3849
|
this.addDisposables(handler, handler.onDragStart((event) => {
|
|
3720
3850
|
this._onDragStart.fire(event);
|
|
3721
|
-
}), this.
|
|
3851
|
+
}), this.dropTraget.onDrop((event) => {
|
|
3722
3852
|
this._onDrop.fire(event);
|
|
3723
|
-
}), this.
|
|
3853
|
+
}), this.dropTraget);
|
|
3724
3854
|
}
|
|
3725
3855
|
}
|
|
3726
3856
|
|
|
@@ -3808,19 +3938,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3808
3938
|
this.onTabDragStart = this._onTabDragStart.event;
|
|
3809
3939
|
this._onGroupDragStart = new Emitter();
|
|
3810
3940
|
this.onGroupDragStart = this._onGroupDragStart.event;
|
|
3811
|
-
this.
|
|
3941
|
+
this._onWillShowOverlay = new Emitter();
|
|
3942
|
+
this.onWillShowOverlay = this._onWillShowOverlay.event;
|
|
3812
3943
|
this._element = document.createElement('div');
|
|
3813
3944
|
this._element.className = 'tabs-and-actions-container';
|
|
3814
3945
|
toggleClass(this._element, 'dv-full-width-single-tab', this.accessor.options.singleTabMode === 'fullwidth');
|
|
3815
|
-
this.addDisposables(this.accessor.onDidAddPanel((e) => {
|
|
3816
|
-
if (e.api.group === this.group) {
|
|
3817
|
-
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3818
|
-
}
|
|
3819
|
-
}), this.accessor.onDidRemovePanel((e) => {
|
|
3820
|
-
if (e.api.group === this.group) {
|
|
3821
|
-
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3822
|
-
}
|
|
3823
|
-
}));
|
|
3824
3946
|
this.rightActionsContainer = document.createElement('div');
|
|
3825
3947
|
this.rightActionsContainer.className = 'right-actions-container';
|
|
3826
3948
|
this.leftActionsContainer = document.createElement('div');
|
|
@@ -3835,7 +3957,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3835
3957
|
this._element.appendChild(this.leftActionsContainer);
|
|
3836
3958
|
this._element.appendChild(this.voidContainer.element);
|
|
3837
3959
|
this._element.appendChild(this.rightActionsContainer);
|
|
3838
|
-
this.addDisposables(this.
|
|
3960
|
+
this.addDisposables(this.accessor.onDidAddPanel((e) => {
|
|
3961
|
+
if (e.api.group === this.group) {
|
|
3962
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3963
|
+
}
|
|
3964
|
+
}), this.accessor.onDidRemovePanel((e) => {
|
|
3965
|
+
if (e.api.group === this.group) {
|
|
3966
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3967
|
+
}
|
|
3968
|
+
}), this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
|
|
3839
3969
|
this._onGroupDragStart.fire({
|
|
3840
3970
|
nativeEvent: event,
|
|
3841
3971
|
group: this.group,
|
|
@@ -3845,11 +3975,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3845
3975
|
event: event.nativeEvent,
|
|
3846
3976
|
index: this.tabs.length,
|
|
3847
3977
|
});
|
|
3978
|
+
}), this.voidContainer.onWillShowOverlay((event) => {
|
|
3979
|
+
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
3980
|
+
kind: 'header_space',
|
|
3981
|
+
}));
|
|
3848
3982
|
}), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
|
|
3849
3983
|
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3850
3984
|
if (isFloatingGroupsEnabled &&
|
|
3851
3985
|
event.shiftKey &&
|
|
3852
|
-
this.group.api.location !== 'floating') {
|
|
3986
|
+
this.group.api.location.type !== 'floating') {
|
|
3853
3987
|
event.preventDefault();
|
|
3854
3988
|
const { top, left } = this.element.getBoundingClientRect();
|
|
3855
3989
|
const { top: rootTop, left: rootLeft } = this.accessor.element.getBoundingClientRect();
|
|
@@ -3912,9 +4046,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3912
4046
|
const disposable = new CompositeDisposable(tab.onDragStart((event) => {
|
|
3913
4047
|
this._onTabDragStart.fire({ nativeEvent: event, panel });
|
|
3914
4048
|
}), tab.onChanged((event) => {
|
|
3915
|
-
var _a;
|
|
3916
4049
|
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
3917
|
-
const isFloatingWithOnePanel = this.group.api.location === 'floating' &&
|
|
4050
|
+
const isFloatingWithOnePanel = this.group.api.location.type === 'floating' &&
|
|
4051
|
+
this.size === 1;
|
|
3918
4052
|
if (isFloatingGroupsEnabled &&
|
|
3919
4053
|
!isFloatingWithOnePanel &&
|
|
3920
4054
|
event.shiftKey) {
|
|
@@ -3928,20 +4062,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3928
4062
|
}, { inDragMode: true });
|
|
3929
4063
|
return;
|
|
3930
4064
|
}
|
|
3931
|
-
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
3932
|
-
this.group.model.isContentFocused;
|
|
3933
4065
|
const isLeftClick = event.button === 0;
|
|
3934
4066
|
if (!isLeftClick || event.defaultPrevented) {
|
|
3935
4067
|
return;
|
|
3936
4068
|
}
|
|
3937
|
-
this.group.
|
|
3938
|
-
|
|
3939
|
-
}
|
|
4069
|
+
if (this.group.activePanel !== panel) {
|
|
4070
|
+
this.group.model.openPanel(panel);
|
|
4071
|
+
}
|
|
3940
4072
|
}), tab.onDrop((event) => {
|
|
3941
4073
|
this._onDrop.fire({
|
|
3942
4074
|
event: event.nativeEvent,
|
|
3943
4075
|
index: this.tabs.findIndex((x) => x.value === tab),
|
|
3944
4076
|
});
|
|
4077
|
+
}), tab.onWillShowOverlay((event) => {
|
|
4078
|
+
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, { kind: 'tab' }));
|
|
3945
4079
|
}));
|
|
3946
4080
|
const value = { value: tab, disposable };
|
|
3947
4081
|
this.addTab(value, index);
|
|
@@ -3959,6 +4093,60 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
3959
4093
|
}
|
|
3960
4094
|
}
|
|
3961
4095
|
|
|
4096
|
+
class DockviewDidDropEvent extends DockviewEvent {
|
|
4097
|
+
get nativeEvent() {
|
|
4098
|
+
return this.options.nativeEvent;
|
|
4099
|
+
}
|
|
4100
|
+
get position() {
|
|
4101
|
+
return this.options.position;
|
|
4102
|
+
}
|
|
4103
|
+
get panel() {
|
|
4104
|
+
return this.options.panel;
|
|
4105
|
+
}
|
|
4106
|
+
get group() {
|
|
4107
|
+
return this.options.group;
|
|
4108
|
+
}
|
|
4109
|
+
get api() {
|
|
4110
|
+
return this.options.api;
|
|
4111
|
+
}
|
|
4112
|
+
constructor(options) {
|
|
4113
|
+
super();
|
|
4114
|
+
this.options = options;
|
|
4115
|
+
}
|
|
4116
|
+
getData() {
|
|
4117
|
+
return this.options.getData();
|
|
4118
|
+
}
|
|
4119
|
+
}
|
|
4120
|
+
class DockviewWillDropEvent extends DockviewDidDropEvent {
|
|
4121
|
+
get kind() {
|
|
4122
|
+
return this._kind;
|
|
4123
|
+
}
|
|
4124
|
+
constructor(options) {
|
|
4125
|
+
super(options);
|
|
4126
|
+
this._kind = options.kind;
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
class WillShowOverlayLocationEvent {
|
|
4130
|
+
get kind() {
|
|
4131
|
+
return this._kind;
|
|
4132
|
+
}
|
|
4133
|
+
get nativeEvent() {
|
|
4134
|
+
return this.event.nativeEvent;
|
|
4135
|
+
}
|
|
4136
|
+
get position() {
|
|
4137
|
+
return this.event.position;
|
|
4138
|
+
}
|
|
4139
|
+
get defaultPrevented() {
|
|
4140
|
+
return this.event.defaultPrevented;
|
|
4141
|
+
}
|
|
4142
|
+
preventDefault() {
|
|
4143
|
+
this.event.preventDefault();
|
|
4144
|
+
}
|
|
4145
|
+
constructor(event, options) {
|
|
4146
|
+
this.event = event;
|
|
4147
|
+
this._kind = options.kind;
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
3962
4150
|
class DockviewGroupPanelModel extends CompositeDisposable {
|
|
3963
4151
|
get element() {
|
|
3964
4152
|
throw new Error('not supported');
|
|
@@ -4004,7 +4192,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4004
4192
|
this._location = value;
|
|
4005
4193
|
toggleClass(this.container, 'dv-groupview-floating', false);
|
|
4006
4194
|
toggleClass(this.container, 'dv-groupview-popout', false);
|
|
4007
|
-
switch (value) {
|
|
4195
|
+
switch (value.type) {
|
|
4008
4196
|
case 'grid':
|
|
4009
4197
|
this.contentContainer.dropTarget.setTargetZones([
|
|
4010
4198
|
'top',
|
|
@@ -4040,7 +4228,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4040
4228
|
this.groupPanel = groupPanel;
|
|
4041
4229
|
this._isGroupActive = false;
|
|
4042
4230
|
this._locked = false;
|
|
4043
|
-
this._location = 'grid';
|
|
4231
|
+
this._location = { type: 'grid' };
|
|
4044
4232
|
this.mostRecentlyUsed = [];
|
|
4045
4233
|
this._onDidChange = new Emitter();
|
|
4046
4234
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -4051,6 +4239,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4051
4239
|
this.onMove = this._onMove.event;
|
|
4052
4240
|
this._onDidDrop = new Emitter();
|
|
4053
4241
|
this.onDidDrop = this._onDidDrop.event;
|
|
4242
|
+
this._onWillDrop = new Emitter();
|
|
4243
|
+
this.onWillDrop = this._onWillDrop.event;
|
|
4244
|
+
this._onWillShowOverlay = new Emitter();
|
|
4245
|
+
this.onWillShowOverlay = this._onWillShowOverlay.event;
|
|
4054
4246
|
this._onTabDragStart = new Emitter();
|
|
4055
4247
|
this.onTabDragStart = this._onTabDragStart.event;
|
|
4056
4248
|
this._onGroupDragStart = new Emitter();
|
|
@@ -4061,46 +4253,69 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4061
4253
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4062
4254
|
this._onDidActivePanelChange = new Emitter();
|
|
4063
4255
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4256
|
+
this._overwriteRenderContainer = null;
|
|
4064
4257
|
toggleClass(this.container, 'groupview', true);
|
|
4258
|
+
this._api = new DockviewApi(this.accessor);
|
|
4065
4259
|
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
4066
4260
|
this.contentContainer = new ContentContainer(this.accessor, this);
|
|
4067
4261
|
container.append(this.tabsContainer.element, this.contentContainer.element);
|
|
4068
4262
|
this.header.hidden = !!options.hideHeader;
|
|
4069
4263
|
this.locked = (_a = options.locked) !== null && _a !== void 0 ? _a : false;
|
|
4070
|
-
this.addDisposables(this._onTabDragStart, this._onGroupDragStart, this.tabsContainer.onTabDragStart((event) => {
|
|
4264
|
+
this.addDisposables(this._onTabDragStart, this._onGroupDragStart, this._onWillShowOverlay, this.tabsContainer.onTabDragStart((event) => {
|
|
4071
4265
|
this._onTabDragStart.fire(event);
|
|
4072
4266
|
}), this.tabsContainer.onGroupDragStart((event) => {
|
|
4073
4267
|
this._onGroupDragStart.fire(event);
|
|
4074
4268
|
}), this.tabsContainer.onDrop((event) => {
|
|
4075
|
-
this.handleDropEvent(event.event, 'center', event.index);
|
|
4269
|
+
this.handleDropEvent('header', event.event, 'center', event.index);
|
|
4076
4270
|
}), this.contentContainer.onDidFocus(() => {
|
|
4077
|
-
this.accessor.doSetGroupActive(this.groupPanel
|
|
4271
|
+
this.accessor.doSetGroupActive(this.groupPanel);
|
|
4078
4272
|
}), this.contentContainer.onDidBlur(() => {
|
|
4079
4273
|
// noop
|
|
4080
4274
|
}), this.contentContainer.dropTarget.onDrop((event) => {
|
|
4081
|
-
this.handleDropEvent(event.nativeEvent, event.position);
|
|
4082
|
-
}), this.
|
|
4275
|
+
this.handleDropEvent('content', event.nativeEvent, event.position);
|
|
4276
|
+
}), this.tabsContainer.onWillShowOverlay((event) => {
|
|
4277
|
+
this._onWillShowOverlay.fire(event);
|
|
4278
|
+
}), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
|
|
4279
|
+
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4280
|
+
kind: 'content',
|
|
4281
|
+
}));
|
|
4282
|
+
}), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
|
|
4283
|
+
}
|
|
4284
|
+
focusContent() {
|
|
4285
|
+
this.contentContainer.element.focus();
|
|
4286
|
+
}
|
|
4287
|
+
set renderContainer(value) {
|
|
4288
|
+
this.panels.forEach((panel) => {
|
|
4289
|
+
this.renderContainer.detatch(panel);
|
|
4290
|
+
});
|
|
4291
|
+
this._overwriteRenderContainer = value;
|
|
4292
|
+
this.panels.forEach((panel) => {
|
|
4293
|
+
this.rerender(panel);
|
|
4294
|
+
});
|
|
4295
|
+
}
|
|
4296
|
+
get renderContainer() {
|
|
4297
|
+
var _a;
|
|
4298
|
+
return ((_a = this._overwriteRenderContainer) !== null && _a !== void 0 ? _a : this.accessor.overlayRenderContainer);
|
|
4083
4299
|
}
|
|
4084
4300
|
initialize() {
|
|
4085
|
-
|
|
4086
|
-
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
|
|
4301
|
+
if (this.options.panels) {
|
|
4087
4302
|
this.options.panels.forEach((panel) => {
|
|
4088
4303
|
this.doAddPanel(panel);
|
|
4089
4304
|
});
|
|
4090
4305
|
}
|
|
4091
|
-
if (
|
|
4306
|
+
if (this.options.activePanel) {
|
|
4092
4307
|
this.openPanel(this.options.activePanel);
|
|
4093
4308
|
}
|
|
4094
4309
|
// must be run after the constructor otherwise this.parent may not be
|
|
4095
4310
|
// correctly initialized
|
|
4096
|
-
this.setActive(this.isActive, true
|
|
4311
|
+
this.setActive(this.isActive, true);
|
|
4097
4312
|
this.updateContainer();
|
|
4098
4313
|
if (this.accessor.options.createRightHeaderActionsElement) {
|
|
4099
4314
|
this._rightHeaderActions =
|
|
4100
4315
|
this.accessor.options.createRightHeaderActionsElement(this.groupPanel);
|
|
4101
4316
|
this.addDisposables(this._rightHeaderActions);
|
|
4102
4317
|
this._rightHeaderActions.init({
|
|
4103
|
-
containerApi:
|
|
4318
|
+
containerApi: this._api,
|
|
4104
4319
|
api: this.groupPanel.api,
|
|
4105
4320
|
});
|
|
4106
4321
|
this.tabsContainer.setRightActionsElement(this._rightHeaderActions.element);
|
|
@@ -4110,7 +4325,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4110
4325
|
this.accessor.options.createLeftHeaderActionsElement(this.groupPanel);
|
|
4111
4326
|
this.addDisposables(this._leftHeaderActions);
|
|
4112
4327
|
this._leftHeaderActions.init({
|
|
4113
|
-
containerApi:
|
|
4328
|
+
containerApi: this._api,
|
|
4114
4329
|
api: this.groupPanel.api,
|
|
4115
4330
|
});
|
|
4116
4331
|
this.tabsContainer.setLeftActionsElement(this._leftHeaderActions.element);
|
|
@@ -4120,7 +4335,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4120
4335
|
this.accessor.options.createPrefixHeaderActionsElement(this.groupPanel);
|
|
4121
4336
|
this.addDisposables(this._prefixHeaderActions);
|
|
4122
4337
|
this._prefixHeaderActions.init({
|
|
4123
|
-
containerApi:
|
|
4338
|
+
containerApi: this._api,
|
|
4124
4339
|
api: this.groupPanel.api,
|
|
4125
4340
|
});
|
|
4126
4341
|
this.tabsContainer.setPrefixActionsElement(this._prefixHeaderActions.element);
|
|
@@ -4200,35 +4415,45 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4200
4415
|
//noop
|
|
4201
4416
|
}
|
|
4202
4417
|
focus() {
|
|
4203
|
-
var _a
|
|
4204
|
-
(
|
|
4418
|
+
var _a;
|
|
4419
|
+
(_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4205
4420
|
}
|
|
4206
4421
|
openPanel(panel, options = {}) {
|
|
4422
|
+
/**
|
|
4423
|
+
* set the panel group
|
|
4424
|
+
* add the panel
|
|
4425
|
+
* check if group active
|
|
4426
|
+
* check if panel active
|
|
4427
|
+
*/
|
|
4207
4428
|
if (typeof options.index !== 'number' ||
|
|
4208
4429
|
options.index > this.panels.length) {
|
|
4209
4430
|
options.index = this.panels.length;
|
|
4210
4431
|
}
|
|
4211
|
-
const
|
|
4212
|
-
const skipSetGroupActive = !!options.skipSetGroupActive;
|
|
4432
|
+
const skipSetActive = !!options.skipSetActive;
|
|
4213
4433
|
// ensure the group is updated before we fire any events
|
|
4214
|
-
panel.updateParentGroup(this.groupPanel,
|
|
4434
|
+
panel.updateParentGroup(this.groupPanel, {
|
|
4435
|
+
skipSetActive: options.skipSetActive,
|
|
4436
|
+
});
|
|
4437
|
+
this.doAddPanel(panel, options.index, {
|
|
4438
|
+
skipSetActive: skipSetActive,
|
|
4439
|
+
});
|
|
4215
4440
|
if (this._activePanel === panel) {
|
|
4216
|
-
if (!skipSetGroupActive) {
|
|
4217
|
-
this.accessor.doSetGroupActive(this.groupPanel);
|
|
4218
|
-
}
|
|
4219
4441
|
this.contentContainer.renderPanel(panel, { asActive: true });
|
|
4220
4442
|
return;
|
|
4221
4443
|
}
|
|
4222
|
-
|
|
4223
|
-
if (!skipSetPanelActive) {
|
|
4444
|
+
if (!skipSetActive) {
|
|
4224
4445
|
this.doSetActivePanel(panel);
|
|
4225
4446
|
}
|
|
4226
|
-
if (!skipSetGroupActive) {
|
|
4227
|
-
this.accessor.doSetGroupActive(this.groupPanel
|
|
4447
|
+
if (!options.skipSetGroupActive) {
|
|
4448
|
+
this.accessor.doSetGroupActive(this.groupPanel);
|
|
4449
|
+
}
|
|
4450
|
+
if (!options.skipSetActive) {
|
|
4451
|
+
this.updateContainer();
|
|
4228
4452
|
}
|
|
4229
|
-
this.updateContainer();
|
|
4230
4453
|
}
|
|
4231
|
-
removePanel(groupItemOrId
|
|
4454
|
+
removePanel(groupItemOrId, options = {
|
|
4455
|
+
skipSetActive: false,
|
|
4456
|
+
}) {
|
|
4232
4457
|
const id = typeof groupItemOrId === 'string'
|
|
4233
4458
|
? groupItemOrId
|
|
4234
4459
|
: groupItemOrId.id;
|
|
@@ -4236,7 +4461,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4236
4461
|
if (!panelToRemove) {
|
|
4237
4462
|
throw new Error('invalid operation');
|
|
4238
4463
|
}
|
|
4239
|
-
return this._removePanel(panelToRemove);
|
|
4464
|
+
return this._removePanel(panelToRemove, options);
|
|
4240
4465
|
}
|
|
4241
4466
|
closeAllPanels() {
|
|
4242
4467
|
if (this.panels.length > 0) {
|
|
@@ -4262,12 +4487,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4262
4487
|
updateActions(element) {
|
|
4263
4488
|
this.tabsContainer.setRightActionsElement(element);
|
|
4264
4489
|
}
|
|
4265
|
-
setActive(isGroupActive,
|
|
4266
|
-
var _a, _b, _c, _d;
|
|
4490
|
+
setActive(isGroupActive, force = false) {
|
|
4267
4491
|
if (!force && this.isActive === isGroupActive) {
|
|
4268
|
-
if (!skipFocus) {
|
|
4269
|
-
(_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
4270
|
-
}
|
|
4271
4492
|
return;
|
|
4272
4493
|
}
|
|
4273
4494
|
this._isGroupActive = isGroupActive;
|
|
@@ -4278,11 +4499,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4278
4499
|
this.doSetActivePanel(this.panels[0]);
|
|
4279
4500
|
}
|
|
4280
4501
|
this.updateContainer();
|
|
4281
|
-
if (isGroupActive) {
|
|
4282
|
-
if (!skipFocus) {
|
|
4283
|
-
(_d = (_c = this._activePanel) === null || _c === void 0 ? void 0 : _c.focus) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
4284
|
-
}
|
|
4285
|
-
}
|
|
4286
4502
|
}
|
|
4287
4503
|
layout(width, height) {
|
|
4288
4504
|
var _a;
|
|
@@ -4293,17 +4509,22 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4293
4509
|
this._activePanel.layout(this._width, this._height);
|
|
4294
4510
|
}
|
|
4295
4511
|
}
|
|
4296
|
-
_removePanel(panel) {
|
|
4512
|
+
_removePanel(panel, options) {
|
|
4297
4513
|
const isActivePanel = this._activePanel === panel;
|
|
4298
4514
|
this.doRemovePanel(panel);
|
|
4299
4515
|
if (isActivePanel && this.panels.length > 0) {
|
|
4300
4516
|
const nextPanel = this.mostRecentlyUsed[0];
|
|
4301
|
-
this.openPanel(nextPanel
|
|
4517
|
+
this.openPanel(nextPanel, {
|
|
4518
|
+
skipSetActive: options.skipSetActive,
|
|
4519
|
+
skipSetGroupActive: options.skipSetActiveGroup,
|
|
4520
|
+
});
|
|
4302
4521
|
}
|
|
4303
4522
|
if (this._activePanel && this.panels.length === 0) {
|
|
4304
4523
|
this.doSetActivePanel(undefined);
|
|
4305
4524
|
}
|
|
4306
|
-
|
|
4525
|
+
if (!options.skipSetActive) {
|
|
4526
|
+
this.updateContainer();
|
|
4527
|
+
}
|
|
4307
4528
|
return panel;
|
|
4308
4529
|
}
|
|
4309
4530
|
doRemovePanel(panel) {
|
|
@@ -4318,13 +4539,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4318
4539
|
}
|
|
4319
4540
|
this._onDidRemovePanel.fire({ panel });
|
|
4320
4541
|
}
|
|
4321
|
-
doAddPanel(panel, index = this.panels.length,
|
|
4542
|
+
doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
|
|
4322
4543
|
const existingPanel = this._panels.indexOf(panel);
|
|
4323
4544
|
const hasExistingPanel = existingPanel > -1;
|
|
4324
4545
|
this.tabsContainer.show();
|
|
4325
4546
|
this.contentContainer.show();
|
|
4326
4547
|
this.tabsContainer.openPanel(panel, index);
|
|
4327
|
-
if (!skipSetActive) {
|
|
4548
|
+
if (!options.skipSetActive) {
|
|
4328
4549
|
this.contentContainer.openPanel(panel);
|
|
4329
4550
|
}
|
|
4330
4551
|
if (hasExistingPanel) {
|
|
@@ -4336,12 +4557,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4336
4557
|
this._onDidAddPanel.fire({ panel });
|
|
4337
4558
|
}
|
|
4338
4559
|
doSetActivePanel(panel) {
|
|
4560
|
+
if (this._activePanel === panel) {
|
|
4561
|
+
return;
|
|
4562
|
+
}
|
|
4339
4563
|
this._activePanel = panel;
|
|
4340
4564
|
if (panel) {
|
|
4341
4565
|
this.tabsContainer.setActivePanel(panel);
|
|
4342
4566
|
panel.layout(this._width, this._height);
|
|
4343
4567
|
this.updateMru(panel);
|
|
4344
|
-
this._onDidActivePanelChange.fire({
|
|
4568
|
+
this._onDidActivePanelChange.fire({
|
|
4569
|
+
panel,
|
|
4570
|
+
});
|
|
4345
4571
|
}
|
|
4346
4572
|
}
|
|
4347
4573
|
updateMru(panel) {
|
|
@@ -4353,11 +4579,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4353
4579
|
updateContainer() {
|
|
4354
4580
|
var _a, _b;
|
|
4355
4581
|
toggleClass(this.container, 'empty', this.isEmpty);
|
|
4356
|
-
this.panels.forEach((panel) => panel.
|
|
4582
|
+
this.panels.forEach((panel) => panel.runEvents());
|
|
4357
4583
|
if (this.isEmpty && !this.watermark) {
|
|
4358
4584
|
const watermark = this.accessor.createWatermarkComponent();
|
|
4359
4585
|
watermark.init({
|
|
4360
|
-
containerApi:
|
|
4586
|
+
containerApi: this._api,
|
|
4361
4587
|
group: this.groupPanel,
|
|
4362
4588
|
});
|
|
4363
4589
|
this.watermark = watermark;
|
|
@@ -4390,10 +4616,32 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4390
4616
|
}
|
|
4391
4617
|
return false;
|
|
4392
4618
|
}
|
|
4393
|
-
handleDropEvent(event, position, index) {
|
|
4619
|
+
handleDropEvent(type, event, position, index) {
|
|
4394
4620
|
if (this.locked === 'no-drop-target') {
|
|
4395
4621
|
return;
|
|
4396
4622
|
}
|
|
4623
|
+
function getKind() {
|
|
4624
|
+
switch (type) {
|
|
4625
|
+
case 'header':
|
|
4626
|
+
return typeof index === 'number' ? 'tab' : 'header_space';
|
|
4627
|
+
case 'content':
|
|
4628
|
+
return 'content';
|
|
4629
|
+
}
|
|
4630
|
+
}
|
|
4631
|
+
const panel = typeof index === 'number' ? this.panels[index] : undefined;
|
|
4632
|
+
const willDropEvent = new DockviewWillDropEvent({
|
|
4633
|
+
nativeEvent: event,
|
|
4634
|
+
position,
|
|
4635
|
+
panel,
|
|
4636
|
+
getData: () => getPanelData(),
|
|
4637
|
+
kind: getKind(),
|
|
4638
|
+
group: this.groupPanel,
|
|
4639
|
+
api: this._api,
|
|
4640
|
+
});
|
|
4641
|
+
this._onWillDrop.fire(willDropEvent);
|
|
4642
|
+
if (willDropEvent.defaultPrevented) {
|
|
4643
|
+
return;
|
|
4644
|
+
}
|
|
4397
4645
|
const data = getPanelData();
|
|
4398
4646
|
if (data && data.viewId === this.accessor.id) {
|
|
4399
4647
|
if (data.panelId === null) {
|
|
@@ -4426,12 +4674,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4426
4674
|
});
|
|
4427
4675
|
}
|
|
4428
4676
|
else {
|
|
4429
|
-
this._onDidDrop.fire({
|
|
4677
|
+
this._onDidDrop.fire(new DockviewDidDropEvent({
|
|
4430
4678
|
nativeEvent: event,
|
|
4431
4679
|
position,
|
|
4432
|
-
|
|
4680
|
+
panel,
|
|
4433
4681
|
getData: () => getPanelData(),
|
|
4434
|
-
|
|
4682
|
+
group: this.groupPanel,
|
|
4683
|
+
api: this._api,
|
|
4684
|
+
}));
|
|
4435
4685
|
}
|
|
4436
4686
|
}
|
|
4437
4687
|
dispose() {
|
|
@@ -4439,6 +4689,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4439
4689
|
super.dispose();
|
|
4440
4690
|
(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.element.remove();
|
|
4441
4691
|
(_c = (_b = this.watermark) === null || _b === void 0 ? void 0 : _b.dispose) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
4692
|
+
this.watermark = undefined;
|
|
4442
4693
|
for (const panel of this.panels) {
|
|
4443
4694
|
panel.dispose();
|
|
4444
4695
|
}
|
|
@@ -4460,15 +4711,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4460
4711
|
constructor(parentElement, disableResizing = false) {
|
|
4461
4712
|
super();
|
|
4462
4713
|
this._disableResizing = disableResizing;
|
|
4463
|
-
|
|
4464
|
-
this._element = parentElement;
|
|
4465
|
-
}
|
|
4466
|
-
else {
|
|
4467
|
-
this._element = document.createElement('div');
|
|
4468
|
-
this._element.style.height = '100%';
|
|
4469
|
-
this._element.style.width = '100%';
|
|
4470
|
-
this._element.className = 'dv-resizable-container';
|
|
4471
|
-
}
|
|
4714
|
+
this._element = parentElement;
|
|
4472
4715
|
this.addDisposables(watchElementResize(this._element, (entry) => {
|
|
4473
4716
|
if (this.isDisposed) {
|
|
4474
4717
|
/**
|
|
@@ -4556,25 +4799,38 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4556
4799
|
get activeGroup() {
|
|
4557
4800
|
return this._activeGroup;
|
|
4558
4801
|
}
|
|
4802
|
+
get locked() {
|
|
4803
|
+
return this.gridview.locked;
|
|
4804
|
+
}
|
|
4805
|
+
set locked(value) {
|
|
4806
|
+
this.gridview.locked = value;
|
|
4807
|
+
}
|
|
4559
4808
|
constructor(options) {
|
|
4560
|
-
super(
|
|
4809
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
4561
4810
|
this._id = nextLayoutId$1.next();
|
|
4562
4811
|
this._groups = new Map();
|
|
4563
4812
|
this._onDidLayoutChange = new Emitter();
|
|
4564
4813
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
4565
|
-
this.
|
|
4566
|
-
this.
|
|
4567
|
-
this.
|
|
4568
|
-
this.
|
|
4569
|
-
this.
|
|
4570
|
-
this.
|
|
4814
|
+
this._onDidRemove = new Emitter();
|
|
4815
|
+
this.onDidRemove = this._onDidRemove.event;
|
|
4816
|
+
this._onDidAdd = new Emitter();
|
|
4817
|
+
this.onDidAdd = this._onDidAdd.event;
|
|
4818
|
+
this._onDidActiveChange = new Emitter();
|
|
4819
|
+
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
4571
4820
|
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
4821
|
+
this.element.style.height = '100%';
|
|
4822
|
+
this.element.style.width = '100%';
|
|
4823
|
+
options.parentElement.appendChild(this.element);
|
|
4572
4824
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
4825
|
+
this.gridview.locked = !!options.locked;
|
|
4573
4826
|
this.element.appendChild(this.gridview.element);
|
|
4574
4827
|
this.layout(0, 0, true); // set some elements height/widths
|
|
4575
|
-
this.addDisposables(
|
|
4828
|
+
this.addDisposables(Disposable.from(() => {
|
|
4829
|
+
var _a;
|
|
4830
|
+
(_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.element);
|
|
4831
|
+
}), this.gridview.onDidChange(() => {
|
|
4576
4832
|
this._bufferOnDidLayoutChange.fire();
|
|
4577
|
-
}), exports.DockviewEvent.any(this.
|
|
4833
|
+
}), exports.DockviewEvent.any(this.onDidAdd, this.onDidRemove, this.onDidActiveChange)(() => {
|
|
4578
4834
|
this._bufferOnDidLayoutChange.fire();
|
|
4579
4835
|
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
4580
4836
|
this._onDidLayoutChange.fire();
|
|
@@ -4589,6 +4845,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4589
4845
|
}
|
|
4590
4846
|
maximizeGroup(panel) {
|
|
4591
4847
|
this.gridview.maximizeView(panel);
|
|
4848
|
+
this.doSetGroupActive(panel);
|
|
4592
4849
|
}
|
|
4593
4850
|
isMaximizedGroup(panel) {
|
|
4594
4851
|
return this.gridview.maximizedView() === panel;
|
|
@@ -4599,13 +4856,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4599
4856
|
hasMaximizedGroup() {
|
|
4600
4857
|
return this.gridview.hasMaximizedView();
|
|
4601
4858
|
}
|
|
4602
|
-
get
|
|
4603
|
-
return this.gridview.
|
|
4859
|
+
get onDidMaximizedGroupChange() {
|
|
4860
|
+
return this.gridview.onDidMaximizedNodeChange;
|
|
4604
4861
|
}
|
|
4605
4862
|
doAddGroup(group, location = [0], size) {
|
|
4606
4863
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
4607
|
-
this.
|
|
4608
|
-
this.doSetGroupActive(group);
|
|
4864
|
+
this._onDidAdd.fire(group);
|
|
4609
4865
|
}
|
|
4610
4866
|
doRemoveGroup(group, options) {
|
|
4611
4867
|
if (!this._groups.has(group.id)) {
|
|
@@ -4617,8 +4873,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4617
4873
|
item.disposable.dispose();
|
|
4618
4874
|
item.value.dispose();
|
|
4619
4875
|
this._groups.delete(group.id);
|
|
4876
|
+
this._onDidRemove.fire(group);
|
|
4620
4877
|
}
|
|
4621
|
-
this._onDidRemoveGroup.fire(group);
|
|
4622
4878
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
4623
4879
|
const groups = Array.from(this._groups.values());
|
|
4624
4880
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -4629,25 +4885,18 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4629
4885
|
var _a;
|
|
4630
4886
|
return (_a = this._groups.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4631
4887
|
}
|
|
4632
|
-
doSetGroupActive(group
|
|
4633
|
-
var _a, _b, _c;
|
|
4888
|
+
doSetGroupActive(group) {
|
|
4634
4889
|
if (this._activeGroup === group) {
|
|
4635
4890
|
return;
|
|
4636
4891
|
}
|
|
4637
4892
|
if (this._activeGroup) {
|
|
4638
4893
|
this._activeGroup.setActive(false);
|
|
4639
|
-
if (!skipFocus) {
|
|
4640
|
-
(_b = (_a = this._activeGroup).focus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
4641
|
-
}
|
|
4642
4894
|
}
|
|
4643
4895
|
if (group) {
|
|
4644
4896
|
group.setActive(true);
|
|
4645
|
-
if (!skipFocus) {
|
|
4646
|
-
(_c = group.focus) === null || _c === void 0 ? void 0 : _c.call(group);
|
|
4647
|
-
}
|
|
4648
4897
|
}
|
|
4649
4898
|
this._activeGroup = group;
|
|
4650
|
-
this.
|
|
4899
|
+
this._onDidActiveChange.fire(group);
|
|
4651
4900
|
}
|
|
4652
4901
|
removeGroup(group) {
|
|
4653
4902
|
this.doRemoveGroup(group);
|
|
@@ -4692,9 +4941,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4692
4941
|
this.gridview.layout(width, height);
|
|
4693
4942
|
}
|
|
4694
4943
|
dispose() {
|
|
4695
|
-
this.
|
|
4696
|
-
this.
|
|
4697
|
-
this.
|
|
4944
|
+
this._onDidActiveChange.dispose();
|
|
4945
|
+
this._onDidAdd.dispose();
|
|
4946
|
+
this._onDidRemove.dispose();
|
|
4698
4947
|
this._onDidLayoutChange.dispose();
|
|
4699
4948
|
for (const group of this.groups) {
|
|
4700
4949
|
group.dispose();
|
|
@@ -4704,11 +4953,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4704
4953
|
}
|
|
4705
4954
|
}
|
|
4706
4955
|
|
|
4956
|
+
class WillFocusEvent extends DockviewEvent {
|
|
4957
|
+
constructor() {
|
|
4958
|
+
super();
|
|
4959
|
+
}
|
|
4960
|
+
}
|
|
4707
4961
|
/**
|
|
4708
4962
|
* A core api implementation that should be used across all panel-like objects
|
|
4709
4963
|
*/
|
|
4710
4964
|
class PanelApiImpl extends CompositeDisposable {
|
|
4711
|
-
//
|
|
4712
4965
|
get isFocused() {
|
|
4713
4966
|
return this._isFocused;
|
|
4714
4967
|
}
|
|
@@ -4733,35 +4986,22 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4733
4986
|
this._width = 0;
|
|
4734
4987
|
this._height = 0;
|
|
4735
4988
|
this.panelUpdatesDisposable = new MutableDisposable();
|
|
4736
|
-
this._onDidDimensionChange = new Emitter(
|
|
4737
|
-
replay: true,
|
|
4738
|
-
});
|
|
4989
|
+
this._onDidDimensionChange = new Emitter();
|
|
4739
4990
|
this.onDidDimensionsChange = this._onDidDimensionChange.event;
|
|
4740
|
-
|
|
4741
|
-
this._onDidChangeFocus = new Emitter({
|
|
4742
|
-
replay: true,
|
|
4743
|
-
});
|
|
4991
|
+
this._onDidChangeFocus = new Emitter();
|
|
4744
4992
|
this.onDidFocusChange = this._onDidChangeFocus.event;
|
|
4745
4993
|
//
|
|
4746
|
-
this.
|
|
4747
|
-
this.
|
|
4994
|
+
this._onWillFocus = new Emitter();
|
|
4995
|
+
this.onWillFocus = this._onWillFocus.event;
|
|
4748
4996
|
//
|
|
4749
|
-
this._onDidVisibilityChange = new Emitter(
|
|
4750
|
-
replay: true,
|
|
4751
|
-
});
|
|
4997
|
+
this._onDidVisibilityChange = new Emitter();
|
|
4752
4998
|
this.onDidVisibilityChange = this._onDidVisibilityChange.event;
|
|
4753
|
-
|
|
4754
|
-
this.
|
|
4755
|
-
this.
|
|
4756
|
-
//
|
|
4757
|
-
this._onDidActiveChange = new Emitter({
|
|
4758
|
-
replay: true,
|
|
4759
|
-
});
|
|
4999
|
+
this._onWillVisibilityChange = new Emitter();
|
|
5000
|
+
this.onWillVisibilityChange = this._onWillVisibilityChange.event;
|
|
5001
|
+
this._onDidActiveChange = new Emitter();
|
|
4760
5002
|
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
4761
|
-
//
|
|
4762
5003
|
this._onActiveChange = new Emitter();
|
|
4763
5004
|
this.onActiveChange = this._onActiveChange.event;
|
|
4764
|
-
//
|
|
4765
5005
|
this._onUpdateParameters = new Emitter();
|
|
4766
5006
|
this.onUpdateParameters = this._onUpdateParameters.event;
|
|
4767
5007
|
this.addDisposables(this.onDidFocusChange((event) => {
|
|
@@ -4773,7 +5013,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4773
5013
|
}), this.onDidDimensionsChange((event) => {
|
|
4774
5014
|
this._width = event.width;
|
|
4775
5015
|
this._height = event.height;
|
|
4776
|
-
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this.
|
|
5016
|
+
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onUpdateParameters, this._onWillFocus, this._onWillVisibilityChange, this._onUpdateParameters);
|
|
4777
5017
|
}
|
|
4778
5018
|
initialize(panel) {
|
|
4779
5019
|
this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
|
|
@@ -4783,7 +5023,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4783
5023
|
});
|
|
4784
5024
|
}
|
|
4785
5025
|
setVisible(isVisible) {
|
|
4786
|
-
this.
|
|
5026
|
+
this._onWillVisibilityChange.fire({ isVisible });
|
|
4787
5027
|
}
|
|
4788
5028
|
setActive() {
|
|
4789
5029
|
this._onActiveChange.fire();
|
|
@@ -4791,9 +5031,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4791
5031
|
updateParameters(parameters) {
|
|
4792
5032
|
this._onUpdateParameters.fire(parameters);
|
|
4793
5033
|
}
|
|
4794
|
-
dispose() {
|
|
4795
|
-
super.dispose();
|
|
4796
|
-
}
|
|
4797
5034
|
}
|
|
4798
5035
|
|
|
4799
5036
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
@@ -4881,7 +5118,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4881
5118
|
}), focusTracker);
|
|
4882
5119
|
}
|
|
4883
5120
|
focus() {
|
|
4884
|
-
|
|
5121
|
+
const event = new WillFocusEvent();
|
|
5122
|
+
this.api._onWillFocus.fire(event);
|
|
5123
|
+
if (event.defaultPrevented) {
|
|
5124
|
+
return;
|
|
5125
|
+
}
|
|
5126
|
+
this._element.focus();
|
|
4885
5127
|
}
|
|
4886
5128
|
layout(width, height) {
|
|
4887
5129
|
this._width = width;
|
|
@@ -4999,7 +5241,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4999
5241
|
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
5000
5242
|
this._orientation = orientation;
|
|
5001
5243
|
this.element.classList.add('pane');
|
|
5002
|
-
this.addDisposables(this.api.
|
|
5244
|
+
this.addDisposables(this.api.onWillVisibilityChange((event) => {
|
|
5245
|
+
const { isVisible } = event;
|
|
5246
|
+
const { accessor } = this._params;
|
|
5247
|
+
accessor.setVisible(this, isVisible);
|
|
5248
|
+
}), this.api.onDidSizeChange((event) => {
|
|
5003
5249
|
this._onDidChange.fire({ size: event.size });
|
|
5004
5250
|
}), addDisposableListener(this.element, 'mouseenter', (ev) => {
|
|
5005
5251
|
this.api._onMouseEnter.fire(ev);
|
|
@@ -5210,9 +5456,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5210
5456
|
super(id);
|
|
5211
5457
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5212
5458
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5213
|
-
this._onDidConstraintsChange = new Emitter(
|
|
5214
|
-
replay: true,
|
|
5215
|
-
});
|
|
5459
|
+
this._onDidConstraintsChange = new Emitter();
|
|
5216
5460
|
this.onDidConstraintsChange = this._onDidConstraintsChange.event;
|
|
5217
5461
|
this._onDidSizeChange = new Emitter();
|
|
5218
5462
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
@@ -5305,13 +5549,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5305
5549
|
this._maximumHeight = options.maximumHeight;
|
|
5306
5550
|
}
|
|
5307
5551
|
this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
|
|
5308
|
-
this.addDisposables(this.api.
|
|
5552
|
+
this.addDisposables(this.api.onWillVisibilityChange((event) => {
|
|
5309
5553
|
const { isVisible } = event;
|
|
5310
5554
|
const { accessor } = this._params;
|
|
5311
5555
|
accessor.setVisible(this, isVisible);
|
|
5312
5556
|
}), this.api.onActiveChange(() => {
|
|
5313
5557
|
const { accessor } = this._params;
|
|
5314
|
-
accessor.
|
|
5558
|
+
accessor.doSetGroupActive(this);
|
|
5315
5559
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
5316
5560
|
if (typeof event.minimumWidth === 'number' ||
|
|
5317
5561
|
typeof event.minimumWidth === 'function') {
|
|
@@ -5394,6 +5638,17 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5394
5638
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5395
5639
|
this.addDisposables(this._onDidLocationChange);
|
|
5396
5640
|
}
|
|
5641
|
+
close() {
|
|
5642
|
+
if (!this._group) {
|
|
5643
|
+
return;
|
|
5644
|
+
}
|
|
5645
|
+
return this.accessor.removeGroup(this._group);
|
|
5646
|
+
}
|
|
5647
|
+
getWindow() {
|
|
5648
|
+
return this.location.type === 'popout'
|
|
5649
|
+
? this.location.getWindow()
|
|
5650
|
+
: window;
|
|
5651
|
+
}
|
|
5397
5652
|
moveTo(options) {
|
|
5398
5653
|
var _a, _b, _c;
|
|
5399
5654
|
if (!this._group) {
|
|
@@ -5401,14 +5656,23 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5401
5656
|
}
|
|
5402
5657
|
const group = (_a = options.group) !== null && _a !== void 0 ? _a : this.accessor.addGroup({
|
|
5403
5658
|
direction: positionToDirection((_b = options.position) !== null && _b !== void 0 ? _b : 'right'),
|
|
5659
|
+
skipSetActive: true,
|
|
5660
|
+
});
|
|
5661
|
+
this.accessor.moveGroupOrPanel({
|
|
5662
|
+
from: { groupId: this._group.id },
|
|
5663
|
+
to: {
|
|
5664
|
+
group,
|
|
5665
|
+
position: options.group
|
|
5666
|
+
? (_c = options.position) !== null && _c !== void 0 ? _c : 'center'
|
|
5667
|
+
: 'center',
|
|
5668
|
+
},
|
|
5404
5669
|
});
|
|
5405
|
-
this.accessor.moveGroupOrPanel(group, this._group.id, undefined, options.group ? (_c = options.position) !== null && _c !== void 0 ? _c : 'center' : 'center');
|
|
5406
5670
|
}
|
|
5407
5671
|
maximize() {
|
|
5408
5672
|
if (!this._group) {
|
|
5409
5673
|
throw new Error(NOT_INITIALIZED_MESSAGE);
|
|
5410
5674
|
}
|
|
5411
|
-
if (this.location !== 'grid') {
|
|
5675
|
+
if (this.location.type !== 'grid') {
|
|
5412
5676
|
// only grid groups can be maximized
|
|
5413
5677
|
return;
|
|
5414
5678
|
}
|
|
@@ -5465,6 +5729,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5465
5729
|
this.api.initialize(this); // cannot use 'this' after after 'super' call
|
|
5466
5730
|
this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
|
|
5467
5731
|
}
|
|
5732
|
+
focus() {
|
|
5733
|
+
if (!this.api.isActive) {
|
|
5734
|
+
this.api.setActive();
|
|
5735
|
+
}
|
|
5736
|
+
super.focus();
|
|
5737
|
+
}
|
|
5468
5738
|
initialize() {
|
|
5469
5739
|
this._model.initialize();
|
|
5470
5740
|
}
|
|
@@ -5510,6 +5780,9 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5510
5780
|
}
|
|
5511
5781
|
|
|
5512
5782
|
class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
5783
|
+
get location() {
|
|
5784
|
+
return this.group.api.location;
|
|
5785
|
+
}
|
|
5513
5786
|
get title() {
|
|
5514
5787
|
return this.panel.title;
|
|
5515
5788
|
}
|
|
@@ -5520,16 +5793,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5520
5793
|
return this.panel.renderer;
|
|
5521
5794
|
}
|
|
5522
5795
|
set group(value) {
|
|
5523
|
-
const
|
|
5524
|
-
this._group
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
this.
|
|
5528
|
-
|
|
5796
|
+
const oldGroup = this._group;
|
|
5797
|
+
if (this._group !== value) {
|
|
5798
|
+
this._group = value;
|
|
5799
|
+
this._onDidGroupChange.fire({});
|
|
5800
|
+
this.setupGroupEventListeners(oldGroup);
|
|
5801
|
+
this._onDidLocationChange.fire({
|
|
5802
|
+
location: this.group.api.location,
|
|
5529
5803
|
});
|
|
5530
|
-
if (this.isGroupActive !== isOldGroupActive) {
|
|
5531
|
-
this._onDidActiveGroupChange.fire();
|
|
5532
|
-
}
|
|
5533
5804
|
}
|
|
5534
5805
|
}
|
|
5535
5806
|
get group() {
|
|
@@ -5547,14 +5818,27 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5547
5818
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
5548
5819
|
this._onDidRendererChange = new Emitter();
|
|
5549
5820
|
this.onDidRendererChange = this._onDidRendererChange.event;
|
|
5550
|
-
this.
|
|
5821
|
+
this._onDidLocationChange = new Emitter();
|
|
5822
|
+
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5823
|
+
this.groupEventsDisposable = new MutableDisposable();
|
|
5551
5824
|
this.initialize(panel);
|
|
5552
5825
|
this._group = group;
|
|
5553
|
-
this.
|
|
5826
|
+
this.setupGroupEventListeners();
|
|
5827
|
+
this.addDisposables(this.groupEventsDisposable, this._onDidRendererChange, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange, this._onDidLocationChange);
|
|
5828
|
+
}
|
|
5829
|
+
getWindow() {
|
|
5830
|
+
return this.group.api.getWindow();
|
|
5554
5831
|
}
|
|
5555
5832
|
moveTo(options) {
|
|
5556
5833
|
var _a;
|
|
5557
|
-
this.accessor.moveGroupOrPanel(
|
|
5834
|
+
this.accessor.moveGroupOrPanel({
|
|
5835
|
+
from: { groupId: this._group.id, panelId: this.panel.id },
|
|
5836
|
+
to: {
|
|
5837
|
+
group: options.group,
|
|
5838
|
+
position: (_a = options.position) !== null && _a !== void 0 ? _a : 'center',
|
|
5839
|
+
index: options.index,
|
|
5840
|
+
},
|
|
5841
|
+
});
|
|
5558
5842
|
}
|
|
5559
5843
|
setTitle(title) {
|
|
5560
5844
|
this.panel.setTitle(title);
|
|
@@ -5574,6 +5858,35 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5574
5858
|
exitMaximized() {
|
|
5575
5859
|
this.group.api.exitMaximized();
|
|
5576
5860
|
}
|
|
5861
|
+
setupGroupEventListeners(previousGroup) {
|
|
5862
|
+
var _a;
|
|
5863
|
+
let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
|
|
5864
|
+
this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
|
|
5865
|
+
if (!event.isVisible && this.isVisible) {
|
|
5866
|
+
this._onDidVisibilityChange.fire(event);
|
|
5867
|
+
}
|
|
5868
|
+
else if (event.isVisible &&
|
|
5869
|
+
!this.isVisible &&
|
|
5870
|
+
this.group.model.isPanelActive(this.panel)) {
|
|
5871
|
+
this._onDidVisibilityChange.fire(event);
|
|
5872
|
+
}
|
|
5873
|
+
}), this.group.api.onDidLocationChange((event) => {
|
|
5874
|
+
if (this.group !== this.panel.group) {
|
|
5875
|
+
return;
|
|
5876
|
+
}
|
|
5877
|
+
this._onDidLocationChange.fire(event);
|
|
5878
|
+
}), this.group.api.onDidActiveChange(() => {
|
|
5879
|
+
if (this.group !== this.panel.group) {
|
|
5880
|
+
return;
|
|
5881
|
+
}
|
|
5882
|
+
if (_trackGroupActive !== this.isGroupActive) {
|
|
5883
|
+
_trackGroupActive = this.isGroupActive;
|
|
5884
|
+
this._onDidActiveGroupChange.fire({
|
|
5885
|
+
isActive: this.isGroupActive,
|
|
5886
|
+
});
|
|
5887
|
+
}
|
|
5888
|
+
}));
|
|
5889
|
+
}
|
|
5577
5890
|
}
|
|
5578
5891
|
|
|
5579
5892
|
class DockviewPanel extends CompositeDisposable {
|
|
@@ -5615,7 +5928,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5615
5928
|
this.setTitle(params.title);
|
|
5616
5929
|
}
|
|
5617
5930
|
focus() {
|
|
5618
|
-
|
|
5931
|
+
const event = new WillFocusEvent();
|
|
5932
|
+
this.api._onWillFocus.fire(event);
|
|
5933
|
+
if (event.defaultPrevented) {
|
|
5934
|
+
return;
|
|
5935
|
+
}
|
|
5936
|
+
if (!this.api.isActive) {
|
|
5937
|
+
this.api.setActive();
|
|
5938
|
+
}
|
|
5619
5939
|
}
|
|
5620
5940
|
toJSON() {
|
|
5621
5941
|
return {
|
|
@@ -5672,20 +5992,40 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5672
5992
|
},
|
|
5673
5993
|
});
|
|
5674
5994
|
}
|
|
5675
|
-
updateParentGroup(group,
|
|
5995
|
+
updateParentGroup(group, options) {
|
|
5676
5996
|
this._group = group;
|
|
5677
|
-
this.api.group =
|
|
5997
|
+
this.api.group = this._group;
|
|
5678
5998
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
5679
|
-
this.api.
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5999
|
+
const isActive = this.group.api.isActive && isPanelVisible;
|
|
6000
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipSetActive)) {
|
|
6001
|
+
if (this.api.isActive !== isActive) {
|
|
6002
|
+
this.api._onDidActiveChange.fire({
|
|
6003
|
+
isActive: this.group.api.isActive && isPanelVisible,
|
|
6004
|
+
});
|
|
6005
|
+
}
|
|
6006
|
+
}
|
|
6007
|
+
if (this.api.isVisible !== isPanelVisible) {
|
|
6008
|
+
this.api._onDidVisibilityChange.fire({
|
|
6009
|
+
isVisible: isPanelVisible,
|
|
6010
|
+
});
|
|
6011
|
+
}
|
|
6012
|
+
}
|
|
6013
|
+
runEvents() {
|
|
6014
|
+
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
6015
|
+
const isActive = this.group.api.isActive && isPanelVisible;
|
|
6016
|
+
if (this.api.isActive !== isActive) {
|
|
6017
|
+
this.api._onDidActiveChange.fire({
|
|
6018
|
+
isActive: this.group.api.isActive && isPanelVisible,
|
|
6019
|
+
});
|
|
6020
|
+
}
|
|
6021
|
+
if (this.api.isVisible !== isPanelVisible) {
|
|
6022
|
+
this.api._onDidVisibilityChange.fire({
|
|
6023
|
+
isVisible: isPanelVisible,
|
|
6024
|
+
});
|
|
6025
|
+
}
|
|
5686
6026
|
}
|
|
5687
6027
|
layout(width, height) {
|
|
5688
|
-
//
|
|
6028
|
+
// TODO: Can we somehow do height without header height or indicate what the header height is?
|
|
5689
6029
|
this.api._onDidDimensionChange.fire({
|
|
5690
6030
|
width,
|
|
5691
6031
|
height: height,
|
|
@@ -5807,8 +6147,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5807
6147
|
this.id = id;
|
|
5808
6148
|
this.contentComponent = contentComponent;
|
|
5809
6149
|
this.tabComponent = tabComponent;
|
|
5810
|
-
this._group = null;
|
|
5811
|
-
this._isPanelVisible = null;
|
|
5812
6150
|
this._content = this.createContentComponent(this.id, contentComponent);
|
|
5813
6151
|
this._tab = this.createTabComponent(this.id, tabComponent);
|
|
5814
6152
|
}
|
|
@@ -5816,25 +6154,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5816
6154
|
this.content.init(Object.assign(Object.assign({}, params), { tab: this.tab }));
|
|
5817
6155
|
this.tab.init(params);
|
|
5818
6156
|
}
|
|
5819
|
-
updateParentGroup(
|
|
5820
|
-
|
|
5821
|
-
this._group = group;
|
|
5822
|
-
if (this._content.onGroupChange) {
|
|
5823
|
-
this._content.onGroupChange(group);
|
|
5824
|
-
}
|
|
5825
|
-
if (this._tab.onGroupChange) {
|
|
5826
|
-
this._tab.onGroupChange(group);
|
|
5827
|
-
}
|
|
5828
|
-
}
|
|
5829
|
-
if (isPanelVisible !== this._isPanelVisible) {
|
|
5830
|
-
this._isPanelVisible = isPanelVisible;
|
|
5831
|
-
if (this._content.onPanelVisibleChange) {
|
|
5832
|
-
this._content.onPanelVisibleChange(isPanelVisible);
|
|
5833
|
-
}
|
|
5834
|
-
if (this._tab.onPanelVisibleChange) {
|
|
5835
|
-
this._tab.onPanelVisibleChange(isPanelVisible);
|
|
5836
|
-
}
|
|
5837
|
-
}
|
|
6157
|
+
updateParentGroup(_group, _isPanelVisible) {
|
|
6158
|
+
// noop
|
|
5838
6159
|
}
|
|
5839
6160
|
layout(width, height) {
|
|
5840
6161
|
var _a, _b;
|
|
@@ -6267,117 +6588,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6267
6588
|
}
|
|
6268
6589
|
}
|
|
6269
6590
|
|
|
6270
|
-
class PopoutWindow extends CompositeDisposable {
|
|
6271
|
-
constructor(id, className, options) {
|
|
6272
|
-
super();
|
|
6273
|
-
this.id = id;
|
|
6274
|
-
this.className = className;
|
|
6275
|
-
this.options = options;
|
|
6276
|
-
this._onDidClose = new Emitter();
|
|
6277
|
-
this.onDidClose = this._onDidClose.event;
|
|
6278
|
-
this._window = null;
|
|
6279
|
-
this.addDisposables(this._onDidClose, {
|
|
6280
|
-
dispose: () => {
|
|
6281
|
-
this.close();
|
|
6282
|
-
},
|
|
6283
|
-
});
|
|
6284
|
-
}
|
|
6285
|
-
dimensions() {
|
|
6286
|
-
if (!this._window) {
|
|
6287
|
-
return null;
|
|
6288
|
-
}
|
|
6289
|
-
const left = this._window.value.screenX;
|
|
6290
|
-
const top = this._window.value.screenY;
|
|
6291
|
-
const width = this._window.value.innerWidth;
|
|
6292
|
-
const height = this._window.value.innerHeight;
|
|
6293
|
-
return { top, left, width, height };
|
|
6294
|
-
}
|
|
6295
|
-
close() {
|
|
6296
|
-
if (this._window) {
|
|
6297
|
-
this._window.disposable.dispose();
|
|
6298
|
-
this._window.value.close();
|
|
6299
|
-
this._window = null;
|
|
6300
|
-
}
|
|
6301
|
-
}
|
|
6302
|
-
open(content) {
|
|
6303
|
-
if (this._window) {
|
|
6304
|
-
throw new Error('instance of popout window is already open');
|
|
6305
|
-
}
|
|
6306
|
-
const url = `${this.options.url}`;
|
|
6307
|
-
const features = Object.entries({
|
|
6308
|
-
top: this.options.top,
|
|
6309
|
-
left: this.options.left,
|
|
6310
|
-
width: this.options.width,
|
|
6311
|
-
height: this.options.height,
|
|
6312
|
-
})
|
|
6313
|
-
.map(([key, value]) => `${key}=${value}`)
|
|
6314
|
-
.join(',');
|
|
6315
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/open
|
|
6316
|
-
const externalWindow = window.open(url, this.id, features);
|
|
6317
|
-
if (!externalWindow) {
|
|
6318
|
-
return;
|
|
6319
|
-
}
|
|
6320
|
-
const disposable = new CompositeDisposable();
|
|
6321
|
-
this._window = { value: externalWindow, disposable };
|
|
6322
|
-
const cleanUp = () => {
|
|
6323
|
-
this._onDidClose.fire();
|
|
6324
|
-
this._window = null;
|
|
6325
|
-
};
|
|
6326
|
-
// prevent any default content from loading
|
|
6327
|
-
// externalWindow.document.body.replaceWith(document.createElement('div'));
|
|
6328
|
-
disposable.addDisposables(addDisposableWindowListener(window, 'beforeunload', () => {
|
|
6329
|
-
cleanUp();
|
|
6330
|
-
this.close();
|
|
6331
|
-
}));
|
|
6332
|
-
externalWindow.addEventListener('load', () => {
|
|
6333
|
-
const externalDocument = externalWindow.document;
|
|
6334
|
-
externalDocument.title = document.title;
|
|
6335
|
-
const div = document.createElement('div');
|
|
6336
|
-
div.classList.add('dv-popout-window');
|
|
6337
|
-
div.style.position = 'absolute';
|
|
6338
|
-
div.style.width = '100%';
|
|
6339
|
-
div.style.height = '100%';
|
|
6340
|
-
div.style.top = '0px';
|
|
6341
|
-
div.style.left = '0px';
|
|
6342
|
-
div.classList.add(this.className);
|
|
6343
|
-
div.appendChild(content);
|
|
6344
|
-
externalDocument.body.replaceChildren(div);
|
|
6345
|
-
externalDocument.body.classList.add(this.className);
|
|
6346
|
-
addStyles(externalDocument, window.document.styleSheets);
|
|
6347
|
-
externalWindow.addEventListener('beforeunload', () => {
|
|
6348
|
-
// TODO: indicate external window is closing
|
|
6349
|
-
cleanUp();
|
|
6350
|
-
});
|
|
6351
|
-
});
|
|
6352
|
-
}
|
|
6353
|
-
}
|
|
6354
|
-
|
|
6355
|
-
class DockviewPopoutGroupPanel extends CompositeDisposable {
|
|
6356
|
-
constructor(id, group, options) {
|
|
6357
|
-
var _a;
|
|
6358
|
-
super();
|
|
6359
|
-
this.id = id;
|
|
6360
|
-
this.group = group;
|
|
6361
|
-
this.options = options;
|
|
6362
|
-
this.window = new PopoutWindow(id, (_a = options.className) !== null && _a !== void 0 ? _a : '', {
|
|
6363
|
-
url: this.options.popoutUrl,
|
|
6364
|
-
left: this.options.box.left,
|
|
6365
|
-
top: this.options.box.top,
|
|
6366
|
-
width: this.options.box.width,
|
|
6367
|
-
height: this.options.box.height,
|
|
6368
|
-
});
|
|
6369
|
-
group.model.location = 'popout';
|
|
6370
|
-
this.addDisposables(this.window, {
|
|
6371
|
-
dispose: () => {
|
|
6372
|
-
group.model.location = 'grid';
|
|
6373
|
-
},
|
|
6374
|
-
}, this.window.onDidClose(() => {
|
|
6375
|
-
this.dispose();
|
|
6376
|
-
}));
|
|
6377
|
-
this.window.open(group.element);
|
|
6378
|
-
}
|
|
6379
|
-
}
|
|
6380
|
-
|
|
6381
6591
|
const DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE = 100;
|
|
6382
6592
|
const DEFAULT_FLOATING_GROUP_POSITION = { left: 100, top: 100 };
|
|
6383
6593
|
|
|
@@ -6391,11 +6601,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6391
6601
|
super();
|
|
6392
6602
|
this.element = element;
|
|
6393
6603
|
this.map = {};
|
|
6604
|
+
this._disposed = false;
|
|
6394
6605
|
this.addDisposables(Disposable.from(() => {
|
|
6395
6606
|
for (const value of Object.values(this.map)) {
|
|
6396
6607
|
value.disposable.dispose();
|
|
6397
6608
|
value.destroy.dispose();
|
|
6398
6609
|
}
|
|
6610
|
+
this._disposed = true;
|
|
6399
6611
|
}));
|
|
6400
6612
|
}
|
|
6401
6613
|
detatch(panel) {
|
|
@@ -6435,7 +6647,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6435
6647
|
focusContainer.style.top = `${box.top - box2.top}px`;
|
|
6436
6648
|
focusContainer.style.width = `${box.width}px`;
|
|
6437
6649
|
focusContainer.style.height = `${box.height}px`;
|
|
6438
|
-
toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location === 'floating');
|
|
6650
|
+
toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
|
|
6439
6651
|
};
|
|
6440
6652
|
const visibilityChanged = () => {
|
|
6441
6653
|
if (panel.api.isVisible) {
|
|
@@ -6481,8 +6693,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6481
6693
|
resize();
|
|
6482
6694
|
}));
|
|
6483
6695
|
this.map[panel.api.id].destroy = Disposable.from(() => {
|
|
6484
|
-
|
|
6485
|
-
|
|
6696
|
+
var _a;
|
|
6697
|
+
if (panel.view.content.element.parentElement === focusContainer) {
|
|
6698
|
+
focusContainer.removeChild(panel.view.content.element);
|
|
6699
|
+
}
|
|
6700
|
+
(_a = focusContainer.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(focusContainer);
|
|
6486
6701
|
});
|
|
6487
6702
|
queueMicrotask(() => {
|
|
6488
6703
|
if (this.isDisposed) {
|
|
@@ -6503,11 +6718,187 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6503
6718
|
}
|
|
6504
6719
|
}
|
|
6505
6720
|
|
|
6721
|
+
/******************************************************************************
|
|
6722
|
+
Copyright (c) Microsoft Corporation.
|
|
6723
|
+
|
|
6724
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6725
|
+
purpose with or without fee is hereby granted.
|
|
6726
|
+
|
|
6727
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
6728
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
6729
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
6730
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
6731
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
6732
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
6733
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
6734
|
+
***************************************************************************** */
|
|
6735
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
6736
|
+
|
|
6737
|
+
|
|
6738
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
6739
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6740
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6741
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6742
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6743
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
6744
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6745
|
+
});
|
|
6746
|
+
}
|
|
6747
|
+
|
|
6748
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
6749
|
+
var e = new Error(message);
|
|
6750
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
6751
|
+
};
|
|
6752
|
+
|
|
6753
|
+
class PopoutWindow extends CompositeDisposable {
|
|
6754
|
+
get window() {
|
|
6755
|
+
var _a, _b;
|
|
6756
|
+
return (_b = (_a = this._window) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
|
|
6757
|
+
}
|
|
6758
|
+
constructor(target, className, options) {
|
|
6759
|
+
super();
|
|
6760
|
+
this.target = target;
|
|
6761
|
+
this.className = className;
|
|
6762
|
+
this.options = options;
|
|
6763
|
+
this._onWillClose = new Emitter();
|
|
6764
|
+
this.onWillClose = this._onWillClose.event;
|
|
6765
|
+
this._onDidClose = new Emitter();
|
|
6766
|
+
this.onDidClose = this._onDidClose.event;
|
|
6767
|
+
this._window = null;
|
|
6768
|
+
this.addDisposables(this._onWillClose, this._onDidClose, {
|
|
6769
|
+
dispose: () => {
|
|
6770
|
+
this.close();
|
|
6771
|
+
},
|
|
6772
|
+
});
|
|
6773
|
+
}
|
|
6774
|
+
dimensions() {
|
|
6775
|
+
if (!this._window) {
|
|
6776
|
+
return null;
|
|
6777
|
+
}
|
|
6778
|
+
const left = this._window.value.screenX;
|
|
6779
|
+
const top = this._window.value.screenY;
|
|
6780
|
+
const width = this._window.value.innerWidth;
|
|
6781
|
+
const height = this._window.value.innerHeight;
|
|
6782
|
+
return { top, left, width, height };
|
|
6783
|
+
}
|
|
6784
|
+
close() {
|
|
6785
|
+
var _a, _b;
|
|
6786
|
+
if (this._window) {
|
|
6787
|
+
this._onWillClose.fire();
|
|
6788
|
+
(_b = (_a = this.options).onWillClose) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
6789
|
+
id: this.target,
|
|
6790
|
+
window: this._window.value,
|
|
6791
|
+
});
|
|
6792
|
+
this._window.disposable.dispose();
|
|
6793
|
+
this._window.value.close();
|
|
6794
|
+
this._window = null;
|
|
6795
|
+
this._onDidClose.fire();
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6798
|
+
open() {
|
|
6799
|
+
var _a, _b;
|
|
6800
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6801
|
+
if (this._window) {
|
|
6802
|
+
throw new Error('instance of popout window is already open');
|
|
6803
|
+
}
|
|
6804
|
+
const url = `${this.options.url}`;
|
|
6805
|
+
const features = Object.entries({
|
|
6806
|
+
top: this.options.top,
|
|
6807
|
+
left: this.options.left,
|
|
6808
|
+
width: this.options.width,
|
|
6809
|
+
height: this.options.height,
|
|
6810
|
+
})
|
|
6811
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
6812
|
+
.join(',');
|
|
6813
|
+
/**
|
|
6814
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/open
|
|
6815
|
+
*/
|
|
6816
|
+
const externalWindow = window.open(url, this.target, features);
|
|
6817
|
+
if (!externalWindow) {
|
|
6818
|
+
/**
|
|
6819
|
+
* Popup blocked
|
|
6820
|
+
*/
|
|
6821
|
+
return null;
|
|
6822
|
+
}
|
|
6823
|
+
const disposable = new CompositeDisposable();
|
|
6824
|
+
this._window = { value: externalWindow, disposable };
|
|
6825
|
+
disposable.addDisposables(addDisposableWindowListener(window, 'beforeunload', () => {
|
|
6826
|
+
/**
|
|
6827
|
+
* before the main window closes we should close this popup too
|
|
6828
|
+
* to be good citizens
|
|
6829
|
+
*
|
|
6830
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
|
6831
|
+
*/
|
|
6832
|
+
this.close();
|
|
6833
|
+
}));
|
|
6834
|
+
const container = this.createPopoutWindowContainer();
|
|
6835
|
+
if (this.className) {
|
|
6836
|
+
container.classList.add(this.className);
|
|
6837
|
+
}
|
|
6838
|
+
(_b = (_a = this.options).onDidOpen) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
6839
|
+
id: this.target,
|
|
6840
|
+
window: externalWindow,
|
|
6841
|
+
});
|
|
6842
|
+
return new Promise((resolve) => {
|
|
6843
|
+
externalWindow.addEventListener('unload', (e) => {
|
|
6844
|
+
// if page fails to load before unloading
|
|
6845
|
+
// this.close();
|
|
6846
|
+
});
|
|
6847
|
+
externalWindow.addEventListener('load', () => {
|
|
6848
|
+
/**
|
|
6849
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
|
|
6850
|
+
*/
|
|
6851
|
+
const externalDocument = externalWindow.document;
|
|
6852
|
+
externalDocument.title = document.title;
|
|
6853
|
+
externalDocument.body.appendChild(container);
|
|
6854
|
+
addStyles(externalDocument, window.document.styleSheets);
|
|
6855
|
+
/**
|
|
6856
|
+
* beforeunload must be registered after load for reasons I could not determine
|
|
6857
|
+
* otherwise the beforeunload event will not fire when the window is closed
|
|
6858
|
+
*/
|
|
6859
|
+
addDisposableWindowListener(externalWindow, 'beforeunload', () => {
|
|
6860
|
+
/**
|
|
6861
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
|
6862
|
+
*/
|
|
6863
|
+
this.close();
|
|
6864
|
+
});
|
|
6865
|
+
resolve(container);
|
|
6866
|
+
});
|
|
6867
|
+
});
|
|
6868
|
+
});
|
|
6869
|
+
}
|
|
6870
|
+
createPopoutWindowContainer() {
|
|
6871
|
+
const el = document.createElement('div');
|
|
6872
|
+
el.classList.add('dv-popout-window');
|
|
6873
|
+
el.id = 'dv-popout-window';
|
|
6874
|
+
el.style.position = 'absolute';
|
|
6875
|
+
el.style.width = '100%';
|
|
6876
|
+
el.style.height = '100%';
|
|
6877
|
+
el.style.top = '0px';
|
|
6878
|
+
el.style.left = '0px';
|
|
6879
|
+
return el;
|
|
6880
|
+
}
|
|
6881
|
+
}
|
|
6882
|
+
|
|
6506
6883
|
const DEFAULT_ROOT_OVERLAY_MODEL = {
|
|
6507
6884
|
activationSize: { type: 'pixels', value: 10 },
|
|
6508
6885
|
size: { type: 'pixels', value: 20 },
|
|
6509
6886
|
};
|
|
6510
|
-
function
|
|
6887
|
+
function moveGroupWithoutDestroying(options) {
|
|
6888
|
+
const activePanel = options.from.activePanel;
|
|
6889
|
+
const panels = [...options.from.panels].map((panel) => {
|
|
6890
|
+
const removedPanel = options.from.model.removePanel(panel);
|
|
6891
|
+
options.from.model.renderContainer.detatch(panel);
|
|
6892
|
+
return removedPanel;
|
|
6893
|
+
});
|
|
6894
|
+
panels.forEach((panel) => {
|
|
6895
|
+
options.to.model.openPanel(panel, {
|
|
6896
|
+
skipSetActive: activePanel !== panel,
|
|
6897
|
+
skipSetGroupActive: true,
|
|
6898
|
+
});
|
|
6899
|
+
});
|
|
6900
|
+
}
|
|
6901
|
+
function getDockviewTheme(element) {
|
|
6511
6902
|
function toClassList(element) {
|
|
6512
6903
|
const list = [];
|
|
6513
6904
|
for (let i = 0; i < element.classList.length; i++) {
|
|
@@ -6558,6 +6949,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6558
6949
|
styles: options.styles,
|
|
6559
6950
|
parentElement: options.parentElement,
|
|
6560
6951
|
disableAutoResizing: options.disableAutoResizing,
|
|
6952
|
+
locked: options.locked,
|
|
6561
6953
|
});
|
|
6562
6954
|
this.nextGroupId = sequentialNumberGenerator();
|
|
6563
6955
|
this._deserializer = new DefaultDockviewDeserialzier(this);
|
|
@@ -6568,6 +6960,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6568
6960
|
this.onWillDragGroup = this._onWillDragGroup.event;
|
|
6569
6961
|
this._onDidDrop = new Emitter();
|
|
6570
6962
|
this.onDidDrop = this._onDidDrop.event;
|
|
6963
|
+
this._onWillDrop = new Emitter();
|
|
6964
|
+
this.onWillDrop = this._onWillDrop.event;
|
|
6965
|
+
this._onWillShowOverlay = new Emitter();
|
|
6966
|
+
this.onWillShowOverlay = this._onWillShowOverlay.event;
|
|
6571
6967
|
this._onDidRemovePanel = new Emitter();
|
|
6572
6968
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
6573
6969
|
this._onDidAddPanel = new Emitter();
|
|
@@ -6576,15 +6972,36 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6576
6972
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
6577
6973
|
this._onDidActivePanelChange = new Emitter();
|
|
6578
6974
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
6975
|
+
this._onDidMovePanel = new Emitter();
|
|
6579
6976
|
this._floatingGroups = [];
|
|
6580
6977
|
this._popoutGroups = [];
|
|
6978
|
+
this._ignoreEvents = 0;
|
|
6979
|
+
this._onDidRemoveGroup = new Emitter();
|
|
6980
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
6981
|
+
this._onDidAddGroup = new Emitter();
|
|
6982
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
6983
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
6984
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
6985
|
+
this._moving = false;
|
|
6581
6986
|
const gready = document.createElement('div');
|
|
6582
6987
|
gready.className = 'dv-overlay-render-container';
|
|
6583
6988
|
this.gridview.element.appendChild(gready);
|
|
6584
6989
|
this.overlayRenderContainer = new OverlayRenderContainer(gready);
|
|
6585
6990
|
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
6586
6991
|
toggleClass(this.element, 'dv-debug', !!options.debug);
|
|
6587
|
-
this.addDisposables(this.overlayRenderContainer, this._onWillDragPanel, this._onWillDragGroup, this._onDidActivePanelChange, this._onDidAddPanel, this._onDidRemovePanel, this._onDidLayoutFromJSON, this._onDidDrop,
|
|
6992
|
+
this.addDisposables(this.overlayRenderContainer, this._onWillDragPanel, this._onWillDragGroup, this._onWillShowOverlay, this._onDidActivePanelChange, this._onDidAddPanel, this._onDidRemovePanel, this._onDidLayoutFromJSON, this._onDidDrop, this._onWillDrop, this._onDidMovePanel, this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this.onDidAdd((event) => {
|
|
6993
|
+
if (!this._moving) {
|
|
6994
|
+
this._onDidAddGroup.fire(event);
|
|
6995
|
+
}
|
|
6996
|
+
}), this.onDidRemove((event) => {
|
|
6997
|
+
if (!this._moving) {
|
|
6998
|
+
this._onDidRemoveGroup.fire(event);
|
|
6999
|
+
}
|
|
7000
|
+
}), this.onDidActiveChange((event) => {
|
|
7001
|
+
if (!this._moving) {
|
|
7002
|
+
this._onDidActiveGroupChange.fire(event);
|
|
7003
|
+
}
|
|
7004
|
+
}), exports.DockviewEvent.any(this.onDidAdd, this.onDidRemove)(() => {
|
|
6588
7005
|
this.updateWatermark();
|
|
6589
7006
|
}), exports.DockviewEvent.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
6590
7007
|
this._bufferOnDidLayoutChange.fire();
|
|
@@ -6595,7 +7012,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6595
7012
|
}
|
|
6596
7013
|
// iterate over a copy of the array since .dispose() mutates the original array
|
|
6597
7014
|
for (const group of [...this._popoutGroups]) {
|
|
6598
|
-
group.dispose();
|
|
7015
|
+
group.disposable.dispose();
|
|
6599
7016
|
}
|
|
6600
7017
|
}));
|
|
6601
7018
|
this._options = options;
|
|
@@ -6641,7 +7058,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6641
7058
|
return this.options.showDndOverlay({
|
|
6642
7059
|
nativeEvent: event,
|
|
6643
7060
|
position: position,
|
|
6644
|
-
target:
|
|
7061
|
+
target: 'edge',
|
|
6645
7062
|
getData: getPanelData,
|
|
6646
7063
|
});
|
|
6647
7064
|
}
|
|
@@ -6650,88 +7067,259 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6650
7067
|
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
6651
7068
|
overlayModel: (_b = this.options.rootOverlayModel) !== null && _b !== void 0 ? _b : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
6652
7069
|
});
|
|
6653
|
-
this.addDisposables(this._rootDropTarget.
|
|
7070
|
+
this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
7071
|
+
if (this.gridview.length > 0 && event.position === 'center') {
|
|
7072
|
+
// option only available when no panels in primary grid
|
|
7073
|
+
return;
|
|
7074
|
+
}
|
|
7075
|
+
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
7076
|
+
kind: 'edge',
|
|
7077
|
+
}));
|
|
7078
|
+
}), this._rootDropTarget.onDrop((event) => {
|
|
6654
7079
|
var _a;
|
|
7080
|
+
const willDropEvent = new DockviewWillDropEvent({
|
|
7081
|
+
nativeEvent: event.nativeEvent,
|
|
7082
|
+
position: event.position,
|
|
7083
|
+
panel: undefined,
|
|
7084
|
+
api: this._api,
|
|
7085
|
+
group: undefined,
|
|
7086
|
+
getData: getPanelData,
|
|
7087
|
+
kind: 'edge',
|
|
7088
|
+
});
|
|
7089
|
+
this._onWillDrop.fire(willDropEvent);
|
|
7090
|
+
if (willDropEvent.defaultPrevented) {
|
|
7091
|
+
return;
|
|
7092
|
+
}
|
|
6655
7093
|
const data = getPanelData();
|
|
6656
7094
|
if (data) {
|
|
6657
|
-
this.moveGroupOrPanel(
|
|
7095
|
+
this.moveGroupOrPanel({
|
|
7096
|
+
from: {
|
|
7097
|
+
groupId: data.groupId,
|
|
7098
|
+
panelId: (_a = data.panelId) !== null && _a !== void 0 ? _a : undefined,
|
|
7099
|
+
},
|
|
7100
|
+
to: {
|
|
7101
|
+
group: this.orthogonalize(event.position),
|
|
7102
|
+
position: 'center',
|
|
7103
|
+
},
|
|
7104
|
+
});
|
|
6658
7105
|
}
|
|
6659
7106
|
else {
|
|
6660
|
-
this._onDidDrop.fire(
|
|
7107
|
+
this._onDidDrop.fire(new DockviewDidDropEvent({
|
|
7108
|
+
nativeEvent: event.nativeEvent,
|
|
7109
|
+
position: event.position,
|
|
7110
|
+
panel: undefined,
|
|
7111
|
+
api: this._api,
|
|
7112
|
+
group: undefined,
|
|
7113
|
+
getData: getPanelData,
|
|
7114
|
+
}));
|
|
6661
7115
|
}
|
|
6662
7116
|
}), this._rootDropTarget);
|
|
6663
7117
|
this._api = new DockviewApi(this);
|
|
6664
7118
|
this.updateWatermark();
|
|
6665
7119
|
}
|
|
6666
|
-
addPopoutGroup(
|
|
6667
|
-
var _a;
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
7120
|
+
addPopoutGroup(itemToPopout, options) {
|
|
7121
|
+
var _a, _b, _c;
|
|
7122
|
+
if (itemToPopout instanceof DockviewPanel &&
|
|
7123
|
+
itemToPopout.group.size === 1) {
|
|
7124
|
+
return this.addPopoutGroup(itemToPopout.group);
|
|
7125
|
+
}
|
|
7126
|
+
const theme = getDockviewTheme(this.gridview.element);
|
|
7127
|
+
const element = this.element;
|
|
7128
|
+
function getBox() {
|
|
7129
|
+
if (options === null || options === void 0 ? void 0 : options.position) {
|
|
7130
|
+
return options.position;
|
|
7131
|
+
}
|
|
7132
|
+
if (itemToPopout instanceof DockviewGroupPanel) {
|
|
7133
|
+
return itemToPopout.element.getBoundingClientRect();
|
|
7134
|
+
}
|
|
7135
|
+
if (itemToPopout.group) {
|
|
7136
|
+
return itemToPopout.group.element.getBoundingClientRect();
|
|
7137
|
+
}
|
|
7138
|
+
return element.getBoundingClientRect();
|
|
7139
|
+
}
|
|
7140
|
+
const box = getBox();
|
|
7141
|
+
const groupId = (_b = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.getNextGroupId(); //item.id;
|
|
7142
|
+
if (itemToPopout.api.location.type === 'grid') {
|
|
7143
|
+
itemToPopout.api.setVisible(false);
|
|
7144
|
+
}
|
|
7145
|
+
const _window = new PopoutWindow(`${this.id}-${groupId}`, // unique id
|
|
7146
|
+
theme !== null && theme !== void 0 ? theme : '', {
|
|
7147
|
+
url: (_c = options === null || options === void 0 ? void 0 : options.popoutUrl) !== null && _c !== void 0 ? _c : '/popout.html',
|
|
7148
|
+
left: window.screenX + box.left,
|
|
7149
|
+
top: window.screenY + box.top,
|
|
7150
|
+
width: box.width,
|
|
7151
|
+
height: box.height,
|
|
7152
|
+
onDidOpen: options === null || options === void 0 ? void 0 : options.onDidOpen,
|
|
7153
|
+
onWillClose: options === null || options === void 0 ? void 0 : options.onWillClose,
|
|
7154
|
+
});
|
|
7155
|
+
const popoutWindowDisposable = new CompositeDisposable(_window, _window.onDidClose(() => {
|
|
7156
|
+
popoutWindowDisposable.dispose();
|
|
7157
|
+
}));
|
|
7158
|
+
return _window
|
|
7159
|
+
.open()
|
|
7160
|
+
.then((popoutContainer) => {
|
|
7161
|
+
var _a;
|
|
7162
|
+
if (_window.isDisposed) {
|
|
7163
|
+
return;
|
|
6679
7164
|
}
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
if (!box) {
|
|
6684
|
-
box = group.element.getBoundingClientRect();
|
|
7165
|
+
if (popoutContainer === null) {
|
|
7166
|
+
popoutWindowDisposable.dispose();
|
|
7167
|
+
return;
|
|
6685
7168
|
}
|
|
6686
|
-
const
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
7169
|
+
const gready = document.createElement('div');
|
|
7170
|
+
gready.className = 'dv-overlay-render-container';
|
|
7171
|
+
const overlayRenderContainer = new OverlayRenderContainer(gready);
|
|
7172
|
+
const referenceGroup = itemToPopout instanceof DockviewPanel
|
|
7173
|
+
? itemToPopout.group
|
|
7174
|
+
: itemToPopout;
|
|
7175
|
+
const referenceLocation = itemToPopout.api.location.type;
|
|
7176
|
+
const group = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) !== null && _a !== void 0 ? _a : this.createGroup({ id: groupId });
|
|
7177
|
+
group.model.renderContainer = overlayRenderContainer;
|
|
7178
|
+
if (!(options === null || options === void 0 ? void 0 : options.overridePopoutGroup)) {
|
|
7179
|
+
this._onDidAddGroup.fire(group);
|
|
7180
|
+
}
|
|
7181
|
+
if (itemToPopout instanceof DockviewPanel) {
|
|
7182
|
+
this.movingLock(() => {
|
|
7183
|
+
const panel = referenceGroup.model.removePanel(itemToPopout);
|
|
7184
|
+
group.model.openPanel(panel);
|
|
7185
|
+
});
|
|
7186
|
+
}
|
|
7187
|
+
else {
|
|
7188
|
+
this.movingLock(() => moveGroupWithoutDestroying({
|
|
7189
|
+
from: referenceGroup,
|
|
7190
|
+
to: group,
|
|
7191
|
+
}));
|
|
7192
|
+
switch (referenceLocation) {
|
|
7193
|
+
case 'grid':
|
|
7194
|
+
referenceGroup.api.setVisible(false);
|
|
7195
|
+
break;
|
|
7196
|
+
case 'floating':
|
|
7197
|
+
case 'popout':
|
|
7198
|
+
this.removeGroup(referenceGroup);
|
|
7199
|
+
break;
|
|
7200
|
+
}
|
|
7201
|
+
}
|
|
7202
|
+
popoutContainer.classList.add('dv-dockview');
|
|
7203
|
+
popoutContainer.style.overflow = 'hidden';
|
|
7204
|
+
popoutContainer.appendChild(gready);
|
|
7205
|
+
popoutContainer.appendChild(group.element);
|
|
7206
|
+
group.model.location = {
|
|
7207
|
+
type: 'popout',
|
|
7208
|
+
getWindow: () => _window.window,
|
|
7209
|
+
};
|
|
7210
|
+
this.doSetGroupAndPanelActive(group);
|
|
7211
|
+
popoutWindowDisposable.addDisposables(group.api.onDidActiveChange((event) => {
|
|
7212
|
+
var _a;
|
|
7213
|
+
if (event.isActive) {
|
|
7214
|
+
(_a = _window.window) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7215
|
+
}
|
|
7216
|
+
}), group.api.onWillFocus(() => {
|
|
7217
|
+
var _a;
|
|
7218
|
+
(_a = _window.window) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7219
|
+
}));
|
|
7220
|
+
let returnedGroup;
|
|
7221
|
+
const value = {
|
|
7222
|
+
window: _window,
|
|
7223
|
+
popoutGroup: group,
|
|
7224
|
+
referenceGroup: this.getPanel(referenceGroup.id)
|
|
7225
|
+
? referenceGroup.id
|
|
7226
|
+
: undefined,
|
|
7227
|
+
disposable: {
|
|
7228
|
+
dispose: () => {
|
|
7229
|
+
popoutWindowDisposable.dispose();
|
|
7230
|
+
return returnedGroup;
|
|
7231
|
+
},
|
|
7232
|
+
},
|
|
7233
|
+
};
|
|
7234
|
+
popoutWindowDisposable.addDisposables(
|
|
7235
|
+
/**
|
|
7236
|
+
* ResizeObserver seems slow here, I do not know why but we don't need it
|
|
7237
|
+
* since we can reply on the window resize event as we will occupy the full
|
|
7238
|
+
* window dimensions
|
|
7239
|
+
*/
|
|
7240
|
+
addDisposableWindowListener(_window.window, 'resize', () => {
|
|
7241
|
+
group.layout(window.innerWidth, window.innerHeight);
|
|
7242
|
+
}), overlayRenderContainer, Disposable.from(() => {
|
|
7243
|
+
if (this.getPanel(referenceGroup.id)) {
|
|
7244
|
+
this.movingLock(() => moveGroupWithoutDestroying({
|
|
7245
|
+
from: group,
|
|
7246
|
+
to: referenceGroup,
|
|
7247
|
+
}));
|
|
7248
|
+
if (!referenceGroup.api.isVisible) {
|
|
7249
|
+
referenceGroup.api.setVisible(true);
|
|
7250
|
+
}
|
|
7251
|
+
if (this.getPanel(group.id)) {
|
|
7252
|
+
this.doRemoveGroup(group, {
|
|
7253
|
+
skipPopoutAssociated: true,
|
|
7254
|
+
});
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
else {
|
|
7258
|
+
if (this.getPanel(group.id)) {
|
|
7259
|
+
const removedGroup = this.doRemoveGroup(group, {
|
|
7260
|
+
skipDispose: true,
|
|
7261
|
+
skipActive: true,
|
|
7262
|
+
});
|
|
7263
|
+
removedGroup.model.renderContainer =
|
|
7264
|
+
this.overlayRenderContainer;
|
|
7265
|
+
removedGroup.model.location = { type: 'grid' };
|
|
7266
|
+
returnedGroup = removedGroup;
|
|
7267
|
+
}
|
|
7268
|
+
}
|
|
7269
|
+
}));
|
|
7270
|
+
this._popoutGroups.push(value);
|
|
7271
|
+
this.updateWatermark();
|
|
7272
|
+
})
|
|
7273
|
+
.catch((err) => {
|
|
7274
|
+
console.error(err);
|
|
6703
7275
|
});
|
|
6704
|
-
popoutWindow.addDisposables({
|
|
6705
|
-
dispose: () => {
|
|
6706
|
-
remove(this._popoutGroups, popoutWindow);
|
|
6707
|
-
this.updateWatermark();
|
|
6708
|
-
},
|
|
6709
|
-
}, popoutWindow.window.onDidClose(() => {
|
|
6710
|
-
this.doAddGroup(group, [0]);
|
|
6711
|
-
}));
|
|
6712
|
-
this._popoutGroups.push(popoutWindow);
|
|
6713
|
-
this.updateWatermark();
|
|
6714
7276
|
}
|
|
6715
7277
|
addFloatingGroup(item, coord, options) {
|
|
6716
|
-
var _a, _b, _c, _d, _e, _f;
|
|
7278
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6717
7279
|
let group;
|
|
6718
7280
|
if (item instanceof DockviewPanel) {
|
|
6719
7281
|
group = this.createGroup();
|
|
6720
|
-
this.
|
|
7282
|
+
this._onDidAddGroup.fire(group);
|
|
7283
|
+
this.movingLock(() => this.removePanel(item, {
|
|
6721
7284
|
removeEmptyGroup: true,
|
|
6722
7285
|
skipDispose: true,
|
|
6723
|
-
|
|
6724
|
-
|
|
7286
|
+
skipSetActiveGroup: true,
|
|
7287
|
+
}));
|
|
7288
|
+
group.model.openPanel(item, { skipSetGroupActive: true });
|
|
6725
7289
|
}
|
|
6726
7290
|
else {
|
|
6727
7291
|
group = item;
|
|
7292
|
+
const popoutReferenceGroupId = (_a = this._popoutGroups.find((_) => _.popoutGroup === group)) === null || _a === void 0 ? void 0 : _a.referenceGroup;
|
|
7293
|
+
const popoutReferenceGroup = popoutReferenceGroupId
|
|
7294
|
+
? this.getPanel(popoutReferenceGroupId)
|
|
7295
|
+
: undefined;
|
|
6728
7296
|
const skip = typeof (options === null || options === void 0 ? void 0 : options.skipRemoveGroup) === 'boolean' &&
|
|
6729
7297
|
options.skipRemoveGroup;
|
|
6730
7298
|
if (!skip) {
|
|
6731
|
-
|
|
7299
|
+
if (popoutReferenceGroup) {
|
|
7300
|
+
this.movingLock(() => moveGroupWithoutDestroying({
|
|
7301
|
+
from: item,
|
|
7302
|
+
to: popoutReferenceGroup,
|
|
7303
|
+
}));
|
|
7304
|
+
this.doRemoveGroup(item, {
|
|
7305
|
+
skipPopoutReturn: true,
|
|
7306
|
+
skipPopoutAssociated: true,
|
|
7307
|
+
});
|
|
7308
|
+
this.doRemoveGroup(popoutReferenceGroup, {
|
|
7309
|
+
skipDispose: true,
|
|
7310
|
+
});
|
|
7311
|
+
group = popoutReferenceGroup;
|
|
7312
|
+
}
|
|
7313
|
+
else {
|
|
7314
|
+
this.doRemoveGroup(item, {
|
|
7315
|
+
skipDispose: true,
|
|
7316
|
+
skipPopoutReturn: true,
|
|
7317
|
+
skipPopoutAssociated: !!popoutReferenceGroup,
|
|
7318
|
+
});
|
|
7319
|
+
}
|
|
6732
7320
|
}
|
|
6733
7321
|
}
|
|
6734
|
-
group.model.location = 'floating';
|
|
7322
|
+
group.model.location = { type: 'floating' };
|
|
6735
7323
|
const overlayLeft = typeof (coord === null || coord === void 0 ? void 0 : coord.x) === 'number'
|
|
6736
7324
|
? Math.max(coord.x, 0)
|
|
6737
7325
|
: DEFAULT_FLOATING_GROUP_POSITION.left;
|
|
@@ -6741,16 +7329,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6741
7329
|
const overlay = new Overlay({
|
|
6742
7330
|
container: this.gridview.element,
|
|
6743
7331
|
content: group.element,
|
|
6744
|
-
height: (
|
|
6745
|
-
width: (
|
|
7332
|
+
height: (_b = coord === null || coord === void 0 ? void 0 : coord.height) !== null && _b !== void 0 ? _b : 300,
|
|
7333
|
+
width: (_c = coord === null || coord === void 0 ? void 0 : coord.width) !== null && _c !== void 0 ? _c : 300,
|
|
6746
7334
|
left: overlayLeft,
|
|
6747
7335
|
top: overlayTop,
|
|
6748
7336
|
minimumInViewportWidth: this.options.floatingGroupBounds === 'boundedWithinViewport'
|
|
6749
7337
|
? undefined
|
|
6750
|
-
: (
|
|
7338
|
+
: (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumWidthWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE,
|
|
6751
7339
|
minimumInViewportHeight: this.options.floatingGroupBounds === 'boundedWithinViewport'
|
|
6752
7340
|
? undefined
|
|
6753
|
-
: (
|
|
7341
|
+
: (_g = (_f = this.options.floatingGroupBounds) === null || _f === void 0 ? void 0 : _f.minimumHeightWithinViewport) !== null && _g !== void 0 ? _g : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE,
|
|
6754
7342
|
});
|
|
6755
7343
|
const el = group.element.querySelector('.void-container');
|
|
6756
7344
|
if (!el) {
|
|
@@ -6781,12 +7369,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6781
7369
|
}), {
|
|
6782
7370
|
dispose: () => {
|
|
6783
7371
|
disposable.dispose();
|
|
6784
|
-
group.model.location = 'grid';
|
|
7372
|
+
group.model.location = { type: 'grid' };
|
|
6785
7373
|
remove(this._floatingGroups, floatingGroupPanel);
|
|
6786
7374
|
this.updateWatermark();
|
|
6787
7375
|
},
|
|
6788
7376
|
});
|
|
6789
7377
|
this._floatingGroups.push(floatingGroupPanel);
|
|
7378
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipActiveGroup)) {
|
|
7379
|
+
this.doSetGroupAndPanelActive(group);
|
|
7380
|
+
}
|
|
6790
7381
|
this.updateWatermark();
|
|
6791
7382
|
}
|
|
6792
7383
|
orthogonalize(position) {
|
|
@@ -6876,8 +7467,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6876
7467
|
return this.panels.find((panel) => panel.id === id);
|
|
6877
7468
|
}
|
|
6878
7469
|
setActivePanel(panel) {
|
|
6879
|
-
this.doSetGroupActive(panel.group);
|
|
6880
7470
|
panel.group.model.openPanel(panel);
|
|
7471
|
+
this.doSetGroupAndPanelActive(panel.group);
|
|
6881
7472
|
}
|
|
6882
7473
|
moveToNext(options = {}) {
|
|
6883
7474
|
var _a;
|
|
@@ -6938,7 +7529,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6938
7529
|
});
|
|
6939
7530
|
const popoutGroups = this._popoutGroups.map((group) => {
|
|
6940
7531
|
return {
|
|
6941
|
-
data: group.
|
|
7532
|
+
data: group.popoutGroup.toJSON(),
|
|
7533
|
+
gridReferenceGroup: group.referenceGroup,
|
|
6942
7534
|
position: group.window.dimensions(),
|
|
6943
7535
|
};
|
|
6944
7536
|
});
|
|
@@ -6956,7 +7548,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6956
7548
|
return result;
|
|
6957
7549
|
}
|
|
6958
7550
|
fromJSON(data) {
|
|
6959
|
-
var _a, _b;
|
|
7551
|
+
var _a, _b, _c;
|
|
6960
7552
|
this.clear();
|
|
6961
7553
|
if (typeof data !== 'object' || data === null) {
|
|
6962
7554
|
throw new Error('serialized layout must be a non-null object');
|
|
@@ -6995,7 +7587,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6995
7587
|
const isActive = typeof activeView === 'string' &&
|
|
6996
7588
|
activeView === panel.id;
|
|
6997
7589
|
group.model.openPanel(panel, {
|
|
6998
|
-
|
|
7590
|
+
skipSetActive: !isActive,
|
|
6999
7591
|
skipSetGroupActive: true,
|
|
7000
7592
|
});
|
|
7001
7593
|
}
|
|
@@ -7025,11 +7617,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7025
7617
|
}
|
|
7026
7618
|
const serializedPopoutGroups = (_b = data.popoutGroups) !== null && _b !== void 0 ? _b : [];
|
|
7027
7619
|
for (const serializedPopoutGroup of serializedPopoutGroups) {
|
|
7028
|
-
const { data, position } = serializedPopoutGroup;
|
|
7620
|
+
const { data, position, gridReferenceGroup } = serializedPopoutGroup;
|
|
7029
7621
|
const group = createGroupFromSerializedState(data);
|
|
7030
|
-
this.addPopoutGroup(
|
|
7622
|
+
this.addPopoutGroup((_c = (gridReferenceGroup
|
|
7623
|
+
? this.getPanel(gridReferenceGroup)
|
|
7624
|
+
: undefined)) !== null && _c !== void 0 ? _c : group, {
|
|
7031
7625
|
skipRemoveGroup: true,
|
|
7032
7626
|
position: position !== null && position !== void 0 ? position : undefined,
|
|
7627
|
+
overridePopoutGroup: gridReferenceGroup
|
|
7628
|
+
? group
|
|
7629
|
+
: undefined,
|
|
7033
7630
|
});
|
|
7034
7631
|
}
|
|
7035
7632
|
for (const floatingGroup of this._floatingGroups) {
|
|
@@ -7076,12 +7673,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7076
7673
|
*/
|
|
7077
7674
|
throw err;
|
|
7078
7675
|
}
|
|
7676
|
+
this.updateWatermark();
|
|
7079
7677
|
this._onDidLayoutFromJSON.fire();
|
|
7080
7678
|
}
|
|
7081
7679
|
clear() {
|
|
7082
7680
|
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
7083
7681
|
const hasActiveGroup = !!this.activeGroup;
|
|
7084
|
-
|
|
7682
|
+
!!this.activePanel;
|
|
7085
7683
|
for (const group of groups) {
|
|
7086
7684
|
// remove the group will automatically remove the panels
|
|
7087
7685
|
this.removeGroup(group, { skipActive: true });
|
|
@@ -7089,9 +7687,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7089
7687
|
if (hasActiveGroup) {
|
|
7090
7688
|
this.doSetGroupAndPanelActive(undefined);
|
|
7091
7689
|
}
|
|
7092
|
-
if (hasActivePanel) {
|
|
7093
|
-
this._onDidActivePanelChange.fire(undefined);
|
|
7094
|
-
}
|
|
7095
7690
|
this.gridview.clear();
|
|
7096
7691
|
}
|
|
7097
7692
|
closeAllGroups() {
|
|
@@ -7132,6 +7727,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7132
7727
|
const group = this.orthogonalize(directionToPosition(options.position.direction));
|
|
7133
7728
|
const panel = this.createPanel(options, group);
|
|
7134
7729
|
group.model.openPanel(panel);
|
|
7730
|
+
this.doSetGroupAndPanelActive(group);
|
|
7135
7731
|
return panel;
|
|
7136
7732
|
}
|
|
7137
7733
|
}
|
|
@@ -7143,6 +7739,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7143
7739
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
7144
7740
|
if (options.floating) {
|
|
7145
7741
|
const group = this.createGroup();
|
|
7742
|
+
this._onDidAddGroup.fire(group);
|
|
7146
7743
|
const o = typeof options.floating === 'object' &&
|
|
7147
7744
|
options.floating !== null
|
|
7148
7745
|
? options.floating
|
|
@@ -7150,16 +7747,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7150
7747
|
this.addFloatingGroup(group, o, {
|
|
7151
7748
|
inDragMode: false,
|
|
7152
7749
|
skipRemoveGroup: true,
|
|
7750
|
+
skipActiveGroup: true,
|
|
7153
7751
|
});
|
|
7154
|
-
this._onDidAddGroup.fire(group);
|
|
7155
7752
|
panel = this.createPanel(options, group);
|
|
7156
7753
|
group.model.openPanel(panel);
|
|
7157
|
-
this.doSetGroupAndPanelActive(group);
|
|
7158
7754
|
}
|
|
7159
|
-
else if (referenceGroup.api.location === 'floating' ||
|
|
7755
|
+
else if (referenceGroup.api.location.type === 'floating' ||
|
|
7160
7756
|
target === 'center') {
|
|
7161
7757
|
panel = this.createPanel(options, referenceGroup);
|
|
7162
7758
|
referenceGroup.model.openPanel(panel);
|
|
7759
|
+
this.doSetGroupAndPanelActive(referenceGroup);
|
|
7163
7760
|
}
|
|
7164
7761
|
else {
|
|
7165
7762
|
const location = getGridLocation(referenceGroup.element);
|
|
@@ -7167,10 +7764,12 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7167
7764
|
const group = this.createGroupAtLocation(relativeLocation);
|
|
7168
7765
|
panel = this.createPanel(options, group);
|
|
7169
7766
|
group.model.openPanel(panel);
|
|
7767
|
+
this.doSetGroupAndPanelActive(group);
|
|
7170
7768
|
}
|
|
7171
7769
|
}
|
|
7172
7770
|
else if (options.floating) {
|
|
7173
7771
|
const group = this.createGroup();
|
|
7772
|
+
this._onDidAddGroup.fire(group);
|
|
7174
7773
|
const o = typeof options.floating === 'object' &&
|
|
7175
7774
|
options.floating !== null
|
|
7176
7775
|
? options.floating
|
|
@@ -7178,16 +7777,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7178
7777
|
this.addFloatingGroup(group, o, {
|
|
7179
7778
|
inDragMode: false,
|
|
7180
7779
|
skipRemoveGroup: true,
|
|
7780
|
+
skipActiveGroup: true,
|
|
7181
7781
|
});
|
|
7182
|
-
this._onDidAddGroup.fire(group);
|
|
7183
7782
|
panel = this.createPanel(options, group);
|
|
7184
7783
|
group.model.openPanel(panel);
|
|
7185
|
-
this.doSetGroupAndPanelActive(group);
|
|
7186
7784
|
}
|
|
7187
7785
|
else {
|
|
7188
7786
|
const group = this.createGroupAtLocation();
|
|
7189
7787
|
panel = this.createPanel(options, group);
|
|
7190
7788
|
group.model.openPanel(panel);
|
|
7789
|
+
this.doSetGroupAndPanelActive(group);
|
|
7191
7790
|
}
|
|
7192
7791
|
return panel;
|
|
7193
7792
|
}
|
|
@@ -7199,13 +7798,15 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7199
7798
|
if (!group) {
|
|
7200
7799
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
7201
7800
|
}
|
|
7202
|
-
group.model.removePanel(panel
|
|
7801
|
+
group.model.removePanel(panel, {
|
|
7802
|
+
skipSetActiveGroup: options.skipSetActiveGroup,
|
|
7803
|
+
});
|
|
7203
7804
|
if (!options.skipDispose) {
|
|
7204
|
-
|
|
7805
|
+
panel.group.model.renderContainer.detatch(panel);
|
|
7205
7806
|
panel.dispose();
|
|
7206
7807
|
}
|
|
7207
7808
|
if (group.size === 0 && options.removeEmptyGroup) {
|
|
7208
|
-
this.removeGroup(group);
|
|
7809
|
+
this.removeGroup(group, { skipActive: options.skipSetActiveGroup });
|
|
7209
7810
|
}
|
|
7210
7811
|
}
|
|
7211
7812
|
createWatermarkComponent() {
|
|
@@ -7218,7 +7819,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7218
7819
|
}
|
|
7219
7820
|
updateWatermark() {
|
|
7220
7821
|
var _a, _b;
|
|
7221
|
-
if (this.groups.filter((x) => x.api.location === 'grid').length === 0) {
|
|
7822
|
+
if (this.groups.filter((x) => x.api.location.type === 'grid' && x.api.isVisible).length === 0) {
|
|
7222
7823
|
if (!this.watermark) {
|
|
7223
7824
|
this.watermark = this.createWatermarkComponent();
|
|
7224
7825
|
this.watermark.init({
|
|
@@ -7264,36 +7865,42 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7264
7865
|
}
|
|
7265
7866
|
else {
|
|
7266
7867
|
const group = this.orthogonalize(directionToPosition(options.direction));
|
|
7868
|
+
if (!options.skipSetActive) {
|
|
7869
|
+
this.doSetGroupAndPanelActive(group);
|
|
7870
|
+
}
|
|
7267
7871
|
return group;
|
|
7268
7872
|
}
|
|
7269
7873
|
const target = toTarget(options.direction || 'within');
|
|
7270
7874
|
const location = getGridLocation(referenceGroup.element);
|
|
7271
7875
|
const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
7272
7876
|
this.doAddGroup(group, relativeLocation);
|
|
7877
|
+
if (!options.skipSetActive) {
|
|
7878
|
+
this.doSetGroupAndPanelActive(group);
|
|
7879
|
+
}
|
|
7273
7880
|
return group;
|
|
7274
7881
|
}
|
|
7275
7882
|
else {
|
|
7276
7883
|
this.doAddGroup(group);
|
|
7884
|
+
this.doSetGroupAndPanelActive(group);
|
|
7277
7885
|
return group;
|
|
7278
7886
|
}
|
|
7279
7887
|
}
|
|
7280
7888
|
removeGroup(group, options) {
|
|
7889
|
+
this.doRemoveGroup(group, options);
|
|
7890
|
+
}
|
|
7891
|
+
doRemoveGroup(group, options) {
|
|
7281
7892
|
var _a;
|
|
7282
7893
|
const panels = [...group.panels]; // reassign since group panels will mutate
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7894
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
7895
|
+
for (const panel of panels) {
|
|
7896
|
+
this.removePanel(panel, {
|
|
7897
|
+
removeEmptyGroup: false,
|
|
7898
|
+
skipDispose: (_a = options === null || options === void 0 ? void 0 : options.skipDispose) !== null && _a !== void 0 ? _a : false,
|
|
7899
|
+
});
|
|
7900
|
+
}
|
|
7288
7901
|
}
|
|
7289
7902
|
const activePanel = this.activePanel;
|
|
7290
|
-
|
|
7291
|
-
if (this.activePanel !== activePanel) {
|
|
7292
|
-
this._onDidActivePanelChange.fire(this.activePanel);
|
|
7293
|
-
}
|
|
7294
|
-
}
|
|
7295
|
-
doRemoveGroup(group, options) {
|
|
7296
|
-
if (group.api.location === 'floating') {
|
|
7903
|
+
if (group.api.location.type === 'floating') {
|
|
7297
7904
|
const floatingGroup = this._floatingGroups.find((_) => _.group === group);
|
|
7298
7905
|
if (floatingGroup) {
|
|
7299
7906
|
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
@@ -7305,60 +7912,124 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7305
7912
|
floatingGroup.dispose();
|
|
7306
7913
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
7307
7914
|
const groups = Array.from(this._groups.values());
|
|
7308
|
-
this.
|
|
7915
|
+
this.doSetGroupAndPanelActive(groups.length > 0 ? groups[0].value : undefined);
|
|
7309
7916
|
}
|
|
7310
7917
|
return floatingGroup.group;
|
|
7311
7918
|
}
|
|
7312
7919
|
throw new Error('failed to find floating group');
|
|
7313
7920
|
}
|
|
7314
|
-
if (group.api.location === 'popout') {
|
|
7315
|
-
const selectedGroup = this._popoutGroups.find((_) => _.
|
|
7921
|
+
if (group.api.location.type === 'popout') {
|
|
7922
|
+
const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
|
|
7316
7923
|
if (selectedGroup) {
|
|
7317
7924
|
if (!(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
7318
|
-
|
|
7925
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipPopoutAssociated)) {
|
|
7926
|
+
const refGroup = selectedGroup.referenceGroup
|
|
7927
|
+
? this.getPanel(selectedGroup.referenceGroup)
|
|
7928
|
+
: undefined;
|
|
7929
|
+
if (refGroup) {
|
|
7930
|
+
this.removeGroup(refGroup);
|
|
7931
|
+
}
|
|
7932
|
+
}
|
|
7933
|
+
selectedGroup.popoutGroup.dispose();
|
|
7319
7934
|
this._groups.delete(group.id);
|
|
7320
7935
|
this._onDidRemoveGroup.fire(group);
|
|
7321
7936
|
}
|
|
7322
|
-
selectedGroup.dispose();
|
|
7937
|
+
const removedGroup = selectedGroup.disposable.dispose();
|
|
7938
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipPopoutReturn) && removedGroup) {
|
|
7939
|
+
this.doAddGroup(removedGroup, [0]);
|
|
7940
|
+
this.doSetGroupAndPanelActive(removedGroup);
|
|
7941
|
+
}
|
|
7323
7942
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
7324
7943
|
const groups = Array.from(this._groups.values());
|
|
7325
|
-
this.
|
|
7944
|
+
this.doSetGroupAndPanelActive(groups.length > 0 ? groups[0].value : undefined);
|
|
7326
7945
|
}
|
|
7327
|
-
|
|
7946
|
+
this.updateWatermark();
|
|
7947
|
+
return selectedGroup.popoutGroup;
|
|
7328
7948
|
}
|
|
7329
7949
|
throw new Error('failed to find popout group');
|
|
7330
7950
|
}
|
|
7331
|
-
|
|
7951
|
+
const re = super.doRemoveGroup(group, options);
|
|
7952
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
|
|
7953
|
+
if (this.activePanel !== activePanel) {
|
|
7954
|
+
this._onDidActivePanelChange.fire(this.activePanel);
|
|
7955
|
+
}
|
|
7956
|
+
}
|
|
7957
|
+
return re;
|
|
7332
7958
|
}
|
|
7333
|
-
|
|
7334
|
-
|
|
7959
|
+
movingLock(func) {
|
|
7960
|
+
const isMoving = this._moving;
|
|
7961
|
+
try {
|
|
7962
|
+
this._moving = true;
|
|
7963
|
+
return func();
|
|
7964
|
+
}
|
|
7965
|
+
finally {
|
|
7966
|
+
this._moving = isMoving;
|
|
7967
|
+
}
|
|
7968
|
+
}
|
|
7969
|
+
moveGroupOrPanel(options) {
|
|
7970
|
+
var _a;
|
|
7971
|
+
const destinationGroup = options.to.group;
|
|
7972
|
+
const sourceGroupId = options.from.groupId;
|
|
7973
|
+
const sourceItemId = options.from.panelId;
|
|
7974
|
+
const destinationTarget = options.to.position;
|
|
7975
|
+
const destinationIndex = options.to.index;
|
|
7335
7976
|
const sourceGroup = sourceGroupId
|
|
7336
7977
|
? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
7337
7978
|
: undefined;
|
|
7979
|
+
if (!sourceGroup) {
|
|
7980
|
+
throw new Error(`Failed to find group id ${sourceGroupId}`);
|
|
7981
|
+
}
|
|
7338
7982
|
if (sourceItemId === undefined) {
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7983
|
+
/**
|
|
7984
|
+
* Moving an entire group into another group
|
|
7985
|
+
*/
|
|
7986
|
+
this.moveGroup({
|
|
7987
|
+
from: { group: sourceGroup },
|
|
7988
|
+
to: {
|
|
7989
|
+
group: destinationGroup,
|
|
7990
|
+
position: destinationTarget,
|
|
7991
|
+
},
|
|
7992
|
+
});
|
|
7342
7993
|
return;
|
|
7343
7994
|
}
|
|
7344
7995
|
if (!destinationTarget || destinationTarget === 'center') {
|
|
7345
|
-
|
|
7346
|
-
|
|
7996
|
+
/**
|
|
7997
|
+
* Dropping a panel within another group
|
|
7998
|
+
*/
|
|
7999
|
+
const removedPanel = this.movingLock(() => sourceGroup.model.removePanel(sourceItemId, {
|
|
8000
|
+
skipSetActive: false,
|
|
8001
|
+
skipSetActiveGroup: true,
|
|
8002
|
+
}));
|
|
8003
|
+
if (!removedPanel) {
|
|
7347
8004
|
throw new Error(`No panel with id ${sourceItemId}`);
|
|
7348
8005
|
}
|
|
7349
|
-
if (
|
|
7350
|
-
|
|
8006
|
+
if (sourceGroup.model.size === 0) {
|
|
8007
|
+
// remove the group and do not set a new group as active
|
|
8008
|
+
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
7351
8009
|
}
|
|
7352
|
-
destinationGroup.model.openPanel(
|
|
8010
|
+
this.movingLock(() => destinationGroup.model.openPanel(removedPanel, {
|
|
7353
8011
|
index: destinationIndex,
|
|
8012
|
+
skipSetGroupActive: true,
|
|
8013
|
+
}));
|
|
8014
|
+
this.doSetGroupAndPanelActive(destinationGroup);
|
|
8015
|
+
this._onDidMovePanel.fire({
|
|
8016
|
+
panel: removedPanel,
|
|
7354
8017
|
});
|
|
7355
8018
|
}
|
|
7356
8019
|
else {
|
|
8020
|
+
/**
|
|
8021
|
+
* Dropping a panel to the extremities of a group which will place that panel
|
|
8022
|
+
* into an adjacent group
|
|
8023
|
+
*/
|
|
7357
8024
|
const referenceLocation = getGridLocation(destinationGroup.element);
|
|
7358
8025
|
const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
7359
|
-
if (sourceGroup
|
|
8026
|
+
if (sourceGroup.size < 2) {
|
|
8027
|
+
/**
|
|
8028
|
+
* If we are moving from a group which only has one panel left we will consider
|
|
8029
|
+
* moving the group itself rather than moving the panel into a newly created group
|
|
8030
|
+
*/
|
|
7360
8031
|
const [targetParentLocation, to] = tail(targetLocation);
|
|
7361
|
-
if (sourceGroup.api.location === 'grid') {
|
|
8032
|
+
if (sourceGroup.api.location.type === 'grid') {
|
|
7362
8033
|
const sourceLocation = getGridLocation(sourceGroup.element);
|
|
7363
8034
|
const [sourceParentLocation, from] = tail(sourceLocation);
|
|
7364
8035
|
if (sequenceEquals(sourceParentLocation, targetParentLocation)) {
|
|
@@ -7366,77 +8037,122 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7366
8037
|
// if a group has one tab - we are essentially moving the 'group'
|
|
7367
8038
|
// which is equivalent to swapping two views in this case
|
|
7368
8039
|
this.gridview.moveView(sourceParentLocation, from, to);
|
|
8040
|
+
return;
|
|
7369
8041
|
}
|
|
7370
8042
|
}
|
|
7371
8043
|
// source group will become empty so delete the group
|
|
7372
|
-
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
8044
|
+
const targetGroup = this.movingLock(() => this.doRemoveGroup(sourceGroup, {
|
|
7373
8045
|
skipActive: true,
|
|
7374
8046
|
skipDispose: true,
|
|
7375
|
-
});
|
|
8047
|
+
}));
|
|
7376
8048
|
// after deleting the group we need to re-evaulate the ref location
|
|
7377
8049
|
const updatedReferenceLocation = getGridLocation(destinationGroup.element);
|
|
7378
8050
|
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, destinationTarget);
|
|
7379
|
-
this.doAddGroup(targetGroup, location);
|
|
8051
|
+
this.movingLock(() => this.doAddGroup(targetGroup, location));
|
|
8052
|
+
this.doSetGroupAndPanelActive(targetGroup);
|
|
7380
8053
|
}
|
|
7381
8054
|
else {
|
|
7382
|
-
|
|
7383
|
-
|
|
8055
|
+
/**
|
|
8056
|
+
* The group we are removing from has many panels, we need to remove the panels we are moving,
|
|
8057
|
+
* create a new group, add the panels to that new group and add the new group in an appropiate position
|
|
8058
|
+
*/
|
|
8059
|
+
const removedPanel = this.movingLock(() => sourceGroup.model.removePanel(sourceItemId, {
|
|
8060
|
+
skipSetActive: false,
|
|
8061
|
+
skipSetActiveGroup: true,
|
|
8062
|
+
}));
|
|
8063
|
+
if (!removedPanel) {
|
|
7384
8064
|
throw new Error(`No panel with id ${sourceItemId}`);
|
|
7385
8065
|
}
|
|
7386
8066
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
7387
8067
|
const group = this.createGroupAtLocation(dropLocation);
|
|
7388
|
-
group.model.openPanel(
|
|
8068
|
+
this.movingLock(() => group.model.openPanel(removedPanel, {
|
|
8069
|
+
skipSetGroupActive: true,
|
|
8070
|
+
}));
|
|
8071
|
+
this.doSetGroupAndPanelActive(group);
|
|
7389
8072
|
}
|
|
7390
8073
|
}
|
|
7391
8074
|
}
|
|
7392
|
-
moveGroup(
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
8075
|
+
moveGroup(options) {
|
|
8076
|
+
const from = options.from.group;
|
|
8077
|
+
const to = options.to.group;
|
|
8078
|
+
const target = options.to.position;
|
|
8079
|
+
if (target === 'center') {
|
|
8080
|
+
const activePanel = from.activePanel;
|
|
8081
|
+
const panels = this.movingLock(() => [...from.panels].map((p) => from.model.removePanel(p.id, {
|
|
8082
|
+
skipSetActive: true,
|
|
8083
|
+
})));
|
|
8084
|
+
if ((from === null || from === void 0 ? void 0 : from.model.size) === 0) {
|
|
8085
|
+
this.doRemoveGroup(from, { skipActive: true });
|
|
8086
|
+
}
|
|
8087
|
+
this.movingLock(() => {
|
|
7400
8088
|
for (const panel of panels) {
|
|
7401
|
-
|
|
7402
|
-
|
|
8089
|
+
to.model.openPanel(panel, {
|
|
8090
|
+
skipSetActive: panel !== activePanel,
|
|
8091
|
+
skipSetGroupActive: true,
|
|
7403
8092
|
});
|
|
7404
8093
|
}
|
|
7405
|
-
}
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
8094
|
+
});
|
|
8095
|
+
this.doSetGroupAndPanelActive(to);
|
|
8096
|
+
panels.forEach((panel) => {
|
|
8097
|
+
this._onDidMovePanel.fire({ panel });
|
|
8098
|
+
});
|
|
8099
|
+
}
|
|
8100
|
+
else {
|
|
8101
|
+
switch (from.api.location.type) {
|
|
8102
|
+
case 'grid':
|
|
8103
|
+
this.gridview.removeView(getGridLocation(from.element));
|
|
8104
|
+
break;
|
|
8105
|
+
case 'floating': {
|
|
8106
|
+
const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
|
|
8107
|
+
if (!selectedFloatingGroup) {
|
|
8108
|
+
throw new Error('failed to find floating group');
|
|
7418
8109
|
}
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
8110
|
+
selectedFloatingGroup.dispose();
|
|
8111
|
+
break;
|
|
8112
|
+
}
|
|
8113
|
+
case 'popout': {
|
|
8114
|
+
const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
|
|
8115
|
+
if (!selectedPopoutGroup) {
|
|
8116
|
+
throw new Error('failed to find popout group');
|
|
7425
8117
|
}
|
|
8118
|
+
selectedPopoutGroup.disposable.dispose();
|
|
7426
8119
|
}
|
|
7427
|
-
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
7428
|
-
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
7429
|
-
this.gridview.addView(sourceGroup, exports.Sizing.Distribute, dropLocation);
|
|
7430
8120
|
}
|
|
8121
|
+
const referenceLocation = getGridLocation(to.element);
|
|
8122
|
+
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
8123
|
+
this.gridview.addView(from, exports.Sizing.Distribute, dropLocation);
|
|
8124
|
+
from.panels.forEach((panel) => {
|
|
8125
|
+
this._onDidMovePanel.fire({ panel });
|
|
8126
|
+
});
|
|
7431
8127
|
}
|
|
7432
8128
|
}
|
|
7433
|
-
|
|
7434
|
-
|
|
8129
|
+
doSetGroupActive(group) {
|
|
8130
|
+
super.doSetGroupActive(group);
|
|
8131
|
+
const activePanel = this.activePanel;
|
|
8132
|
+
if (!this._moving &&
|
|
8133
|
+
activePanel !== this._onDidActivePanelChange.value) {
|
|
8134
|
+
this._onDidActivePanelChange.fire(activePanel);
|
|
8135
|
+
}
|
|
8136
|
+
}
|
|
8137
|
+
doSetGroupAndPanelActive(group) {
|
|
8138
|
+
super.doSetGroupActive(group);
|
|
7435
8139
|
const activePanel = this.activePanel;
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
this.
|
|
8140
|
+
if (group &&
|
|
8141
|
+
this.hasMaximizedGroup() &&
|
|
8142
|
+
!this.isMaximizedGroup(group)) {
|
|
8143
|
+
this.exitMaximizedGroup();
|
|
8144
|
+
}
|
|
8145
|
+
if (!this._moving &&
|
|
8146
|
+
activePanel !== this._onDidActivePanelChange.value) {
|
|
8147
|
+
this._onDidActivePanelChange.fire(activePanel);
|
|
8148
|
+
}
|
|
8149
|
+
}
|
|
8150
|
+
getNextGroupId() {
|
|
8151
|
+
let id = this.nextGroupId.next();
|
|
8152
|
+
while (this._groups.has(id)) {
|
|
8153
|
+
id = this.nextGroupId.next();
|
|
7439
8154
|
}
|
|
8155
|
+
return id;
|
|
7440
8156
|
}
|
|
7441
8157
|
createGroup(options) {
|
|
7442
8158
|
if (!options) {
|
|
@@ -7454,7 +8170,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7454
8170
|
}
|
|
7455
8171
|
}
|
|
7456
8172
|
const view = new DockviewGroupPanel(this, id, options);
|
|
7457
|
-
view.init({ params: {}, accessor:
|
|
8173
|
+
view.init({ params: {}, accessor: this });
|
|
7458
8174
|
if (!this._groups.has(view.id)) {
|
|
7459
8175
|
const disposable = new CompositeDisposable(view.model.onTabDragStart((event) => {
|
|
7460
8176
|
this._onWillDragPanel.fire(event);
|
|
@@ -7462,20 +8178,48 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7462
8178
|
this._onWillDragGroup.fire(event);
|
|
7463
8179
|
}), view.model.onMove((event) => {
|
|
7464
8180
|
const { groupId, itemId, target, index } = event;
|
|
7465
|
-
this.moveGroupOrPanel(
|
|
8181
|
+
this.moveGroupOrPanel({
|
|
8182
|
+
from: { groupId: groupId, panelId: itemId },
|
|
8183
|
+
to: {
|
|
8184
|
+
group: view,
|
|
8185
|
+
position: target,
|
|
8186
|
+
index,
|
|
8187
|
+
},
|
|
8188
|
+
});
|
|
7466
8189
|
}), view.model.onDidDrop((event) => {
|
|
7467
|
-
this._onDidDrop.fire(
|
|
8190
|
+
this._onDidDrop.fire(event);
|
|
8191
|
+
}), view.model.onWillDrop((event) => {
|
|
8192
|
+
this._onWillDrop.fire(event);
|
|
8193
|
+
}), view.model.onWillShowOverlay((event) => {
|
|
8194
|
+
if (this.options.disableDnd) {
|
|
8195
|
+
event.preventDefault();
|
|
8196
|
+
return;
|
|
8197
|
+
}
|
|
8198
|
+
this._onWillShowOverlay.fire(event);
|
|
7468
8199
|
}), view.model.onDidAddPanel((event) => {
|
|
8200
|
+
if (this._moving) {
|
|
8201
|
+
return;
|
|
8202
|
+
}
|
|
7469
8203
|
this._onDidAddPanel.fire(event.panel);
|
|
7470
8204
|
}), view.model.onDidRemovePanel((event) => {
|
|
8205
|
+
if (this._moving) {
|
|
8206
|
+
return;
|
|
8207
|
+
}
|
|
7471
8208
|
this._onDidRemovePanel.fire(event.panel);
|
|
7472
8209
|
}), view.model.onDidActivePanelChange((event) => {
|
|
7473
|
-
this.
|
|
8210
|
+
if (this._moving) {
|
|
8211
|
+
return;
|
|
8212
|
+
}
|
|
8213
|
+
if (event.panel !== this.activePanel) {
|
|
8214
|
+
return;
|
|
8215
|
+
}
|
|
8216
|
+
if (this._onDidActivePanelChange.value !== event.panel) {
|
|
8217
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
8218
|
+
}
|
|
7474
8219
|
}));
|
|
7475
8220
|
this._groups.set(view.id, { value: view, disposable });
|
|
7476
8221
|
}
|
|
7477
|
-
// TODO: must be called after the above listeners have been setup,
|
|
7478
|
-
// not an ideal pattern
|
|
8222
|
+
// TODO: must be called after the above listeners have been setup, not an ideal pattern
|
|
7479
8223
|
view.initialize();
|
|
7480
8224
|
return view;
|
|
7481
8225
|
}
|
|
@@ -7528,7 +8272,20 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7528
8272
|
});
|
|
7529
8273
|
this._onDidLayoutfromJSON = new Emitter();
|
|
7530
8274
|
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
8275
|
+
this._onDidRemoveGroup = new Emitter();
|
|
8276
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
8277
|
+
this._onDidAddGroup = new Emitter();
|
|
8278
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
8279
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
8280
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
7531
8281
|
this._options = options;
|
|
8282
|
+
this.addDisposables(this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this.onDidAdd((event) => {
|
|
8283
|
+
this._onDidAddGroup.fire(event);
|
|
8284
|
+
}), this.onDidRemove((event) => {
|
|
8285
|
+
this._onDidRemoveGroup.fire(event);
|
|
8286
|
+
}), this.onDidActiveChange((event) => {
|
|
8287
|
+
this._onDidActiveGroupChange.fire(event);
|
|
8288
|
+
}));
|
|
7532
8289
|
if (!this.options.components) {
|
|
7533
8290
|
this.options.components = {};
|
|
7534
8291
|
}
|
|
@@ -7703,6 +8460,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7703
8460
|
});
|
|
7704
8461
|
this.registerPanel(view);
|
|
7705
8462
|
this.doAddGroup(view, relativeLocation, options.size);
|
|
8463
|
+
this.doSetGroupActive(view);
|
|
7706
8464
|
return view;
|
|
7707
8465
|
}
|
|
7708
8466
|
registerPanel(panel) {
|
|
@@ -7844,19 +8602,19 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
7844
8602
|
const index = this.panels.indexOf(panel);
|
|
7845
8603
|
this.splitview.setViewVisible(index, visible);
|
|
7846
8604
|
}
|
|
7847
|
-
setActive(
|
|
7848
|
-
this._activePanel =
|
|
8605
|
+
setActive(panel, skipFocus) {
|
|
8606
|
+
this._activePanel = panel;
|
|
7849
8607
|
this.panels
|
|
7850
|
-
.filter((v) => v !==
|
|
8608
|
+
.filter((v) => v !== panel)
|
|
7851
8609
|
.forEach((v) => {
|
|
7852
8610
|
v.api._onDidActiveChange.fire({ isActive: false });
|
|
7853
8611
|
if (!skipFocus) {
|
|
7854
8612
|
v.focus();
|
|
7855
8613
|
}
|
|
7856
8614
|
});
|
|
7857
|
-
|
|
8615
|
+
panel.api._onDidActiveChange.fire({ isActive: true });
|
|
7858
8616
|
if (!skipFocus) {
|
|
7859
|
-
|
|
8617
|
+
panel.focus();
|
|
7860
8618
|
}
|
|
7861
8619
|
}
|
|
7862
8620
|
removePanel(panel, sizing) {
|
|
@@ -8155,6 +8913,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8155
8913
|
});
|
|
8156
8914
|
this.addDisposables(this._disposable);
|
|
8157
8915
|
}
|
|
8916
|
+
setVisible(panel, visible) {
|
|
8917
|
+
const index = this.panels.indexOf(panel);
|
|
8918
|
+
this.paneview.setViewVisible(index, visible);
|
|
8919
|
+
}
|
|
8158
8920
|
focus() {
|
|
8159
8921
|
//noop
|
|
8160
8922
|
}
|
|
@@ -8201,6 +8963,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8201
8963
|
isExpanded: options.isExpanded,
|
|
8202
8964
|
title: options.title,
|
|
8203
8965
|
containerApi: new PaneviewApi(this),
|
|
8966
|
+
accessor: this,
|
|
8204
8967
|
});
|
|
8205
8968
|
this.paneview.addPane(view, size, index);
|
|
8206
8969
|
view.orientation = this.paneview.orientation;
|
|
@@ -8300,6 +9063,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8300
9063
|
title: data.title,
|
|
8301
9064
|
isExpanded: !!view.expanded,
|
|
8302
9065
|
containerApi: new PaneviewApi(this),
|
|
9066
|
+
accessor: this,
|
|
8303
9067
|
});
|
|
8304
9068
|
panel.orientation = this.paneview.orientation;
|
|
8305
9069
|
});
|
|
@@ -8388,7 +9152,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8388
9152
|
this._onDidChange = new Emitter();
|
|
8389
9153
|
this.onDidChange = this._onDidChange.event;
|
|
8390
9154
|
this.api.initialize(this);
|
|
8391
|
-
this.addDisposables(this._onDidChange, this.api.
|
|
9155
|
+
this.addDisposables(this._onDidChange, this.api.onWillVisibilityChange((event) => {
|
|
8392
9156
|
const { isVisible } = event;
|
|
8393
9157
|
const { accessor } = this._params;
|
|
8394
9158
|
accessor.setVisible(this, isVisible);
|
|
@@ -8457,11 +9221,13 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8457
9221
|
exports.DockviewApi = DockviewApi;
|
|
8458
9222
|
exports.DockviewComponent = DockviewComponent;
|
|
8459
9223
|
exports.DockviewCompositeDisposable = CompositeDisposable;
|
|
9224
|
+
exports.DockviewDidDropEvent = DockviewDidDropEvent;
|
|
8460
9225
|
exports.DockviewEmitter = Emitter;
|
|
8461
9226
|
exports.DockviewGroupPanel = DockviewGroupPanel;
|
|
8462
9227
|
exports.DockviewGroupPanelModel = DockviewGroupPanelModel;
|
|
8463
9228
|
exports.DockviewMutableDisposable = MutableDisposable;
|
|
8464
9229
|
exports.DockviewPanel = DockviewPanel;
|
|
9230
|
+
exports.DockviewWillDropEvent = DockviewWillDropEvent;
|
|
8465
9231
|
exports.DraggablePaneviewPanel = DraggablePaneviewPanel;
|
|
8466
9232
|
exports.Gridview = Gridview;
|
|
8467
9233
|
exports.GridviewApi = GridviewApi;
|
|
@@ -8480,6 +9246,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8480
9246
|
exports.SplitviewComponent = SplitviewComponent;
|
|
8481
9247
|
exports.SplitviewPanel = SplitviewPanel;
|
|
8482
9248
|
exports.Tab = Tab;
|
|
9249
|
+
exports.WillShowOverlayLocationEvent = WillShowOverlayLocationEvent;
|
|
8483
9250
|
exports.createComponent = createComponent;
|
|
8484
9251
|
exports.directionToPosition = directionToPosition;
|
|
8485
9252
|
exports.getDirectionOrientation = getDirectionOrientation;
|