dockview 1.0.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +243 -186
- package/dist/cjs/api/component.api.d.ts +31 -25
- package/dist/cjs/api/component.api.js +97 -40
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/api/gridviewPanelApi.js +1 -0
- package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
- package/dist/cjs/api/groupPanelApi.d.ts +11 -14
- package/dist/cjs/api/groupPanelApi.js +19 -17
- package/dist/cjs/api/groupPanelApi.js.map +1 -1
- package/dist/cjs/api/panelApi.d.ts +0 -25
- package/dist/cjs/api/panelApi.js +1 -20
- package/dist/cjs/api/panelApi.js.map +1 -1
- package/dist/cjs/api/paneviewPanelApi.js +1 -0
- package/dist/cjs/api/paneviewPanelApi.js.map +1 -1
- package/dist/cjs/api/splitviewPanelApi.d.ts +0 -1
- package/dist/cjs/api/splitviewPanelApi.js +1 -5
- package/dist/cjs/api/splitviewPanelApi.js.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +2 -2
- package/dist/cjs/dnd/abstractDragHandler.js +15 -15
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dnd/dataTransfer.d.ts +0 -25
- package/dist/cjs/dnd/dataTransfer.js +1 -45
- package/dist/cjs/dnd/dataTransfer.js.map +1 -1
- package/dist/cjs/dnd/dnd.d.ts +1 -14
- package/dist/cjs/dnd/dnd.js +1 -79
- package/dist/cjs/dnd/dnd.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +3 -0
- package/dist/cjs/dnd/droptarget.js +72 -48
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +1 -2
- package/dist/cjs/dockview/components/tab/defaultTab.js +1 -9
- package/dist/cjs/dockview/components/tab/defaultTab.js.map +1 -1
- package/dist/cjs/dockview/components/watermark/watermark.d.ts +3 -3
- package/dist/cjs/dockview/components/watermark/watermark.js +4 -4
- package/dist/cjs/dockview/components/watermark/watermark.js.map +1 -1
- package/dist/cjs/dockview/deserializer.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +34 -23
- package/dist/cjs/dockview/dockviewComponent.js +117 -209
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +3 -5
- package/dist/cjs/dockview/dockviewGroupPanel.js +10 -31
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +2 -1
- package/dist/cjs/events.js +25 -4
- package/dist/cjs/events.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +12 -20
- package/dist/cjs/gridview/baseComponentGridview.js +49 -45
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/basePanelView.d.ts +5 -8
- package/dist/cjs/gridview/basePanelView.js +16 -8
- package/dist/cjs/gridview/basePanelView.js.map +1 -1
- package/dist/cjs/gridview/branchNode.js +3 -3
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.js +21 -18
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts +5 -6
- package/dist/cjs/gridview/gridviewComponent.js +33 -9
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +0 -1
- package/dist/cjs/gridview/gridviewPanel.js +3 -6
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
- package/dist/cjs/gridview/leafNode.js +2 -1
- package/dist/cjs/gridview/leafNode.js.map +1 -1
- package/dist/cjs/groupview/groupPanel.d.ts +1 -7
- package/dist/cjs/groupview/groupview.d.ts +18 -10
- package/dist/cjs/groupview/groupview.js +51 -129
- package/dist/cjs/groupview/groupview.js.map +1 -1
- package/dist/cjs/groupview/groupviewPanel.d.ts +5 -2
- package/dist/cjs/groupview/groupviewPanel.js.map +1 -1
- package/dist/cjs/groupview/panel/content.d.ts +1 -1
- package/dist/cjs/groupview/panel/content.js +2 -1
- package/dist/cjs/groupview/panel/content.js.map +1 -1
- package/dist/cjs/groupview/tab.d.ts +10 -13
- package/dist/cjs/groupview/tab.js +22 -80
- package/dist/cjs/groupview/tab.js.map +1 -1
- package/dist/cjs/groupview/titlebar/tabsContainer.js +4 -6
- package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/hostedContainer.js +2 -2
- package/dist/cjs/hostedContainer.js.map +1 -1
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +8 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lifecycle.js +2 -1
- package/dist/cjs/lifecycle.js.map +1 -1
- package/dist/cjs/panel/types.d.ts +0 -2
- package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +1 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.js +1 -1
- package/dist/cjs/paneview/defaultPaneviewHeader.js.map +1 -1
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +32 -29
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
- package/dist/cjs/paneview/paneview.d.ts +3 -1
- package/dist/cjs/paneview/paneview.js +13 -7
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +7 -6
- package/dist/cjs/paneview/paneviewComponent.js +65 -8
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/paneview/paneviewPanel.js +1 -1
- package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
- package/dist/cjs/react/deserializer.js +1 -3
- package/dist/cjs/react/deserializer.js.map +1 -1
- package/dist/cjs/react/dockview/components.js +5 -1
- package/dist/cjs/react/dockview/components.js.map +1 -1
- package/dist/cjs/react/dockview/dockview.d.ts +9 -9
- package/dist/cjs/react/dockview/dockview.js +40 -5
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/dockview/reactContentPart.d.ts +2 -2
- package/dist/cjs/react/dockview/reactContentPart.js +6 -17
- package/dist/cjs/react/dockview/reactContentPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactHeaderPart.d.ts +2 -2
- package/dist/cjs/react/dockview/reactHeaderPart.js +3 -2
- package/dist/cjs/react/dockview/reactHeaderPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactWatermarkPart.d.ts +3 -4
- package/dist/cjs/react/dockview/reactWatermarkPart.js +3 -4
- package/dist/cjs/react/dockview/reactWatermarkPart.js.map +1 -1
- package/dist/cjs/react/dockview/v2/reactContentRenderer.d.ts +2 -2
- package/dist/cjs/react/dockview/v2/reactContentRenderer.js +2 -2
- package/dist/cjs/react/dockview/v2/reactContentRenderer.js.map +1 -1
- package/dist/cjs/react/dockview/v2/webviewContentRenderer.d.ts +2 -2
- package/dist/cjs/react/dockview/v2/webviewContentRenderer.js +2 -2
- package/dist/cjs/react/dockview/v2/webviewContentRenderer.js.map +1 -1
- package/dist/cjs/react/gridview/gridview.js +9 -2
- package/dist/cjs/react/gridview/gridview.js.map +1 -1
- package/dist/cjs/react/gridview/view.d.ts +3 -2
- package/dist/cjs/react/gridview/view.js +2 -2
- package/dist/cjs/react/gridview/view.js.map +1 -1
- package/dist/cjs/react/index.d.ts +1 -0
- package/dist/cjs/react/index.js +5 -1
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/react/paneview/paneview.js +6 -2
- package/dist/cjs/react/paneview/paneview.js.map +1 -1
- package/dist/cjs/react/react.js +6 -3
- package/dist/cjs/react/react.js.map +1 -1
- package/dist/cjs/react/splitview/splitview.js +8 -2
- package/dist/cjs/react/splitview/splitview.js.map +1 -1
- package/dist/cjs/react/splitview/view.js +2 -2
- package/dist/cjs/react/splitview/view.js.map +1 -1
- package/dist/cjs/splitview/core/splitview.js +1 -1
- package/dist/cjs/splitview/core/splitview.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts +0 -3
- package/dist/cjs/splitview/splitviewComponent.js +50 -6
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/cjs/splitview/splitviewPanel.d.ts +1 -6
- package/dist/cjs/splitview/splitviewPanel.js +5 -3
- package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
- package/dist/dockview.amd.js +666 -791
- package/dist/dockview.amd.min.js +2 -16
- package/dist/dockview.amd.min.noStyle.js +2 -16
- package/dist/dockview.amd.noStyle.js +665 -790
- package/dist/dockview.cjs.js +666 -791
- package/dist/dockview.esm.js +666 -780
- package/dist/dockview.esm.min.js +2 -16
- package/dist/dockview.js +666 -791
- package/dist/dockview.min.js +2 -16
- package/dist/dockview.min.noStyle.js +2 -16
- package/dist/dockview.noStyle.js +665 -790
- package/dist/esm/api/component.api.d.ts +31 -25
- package/dist/esm/api/component.api.js +47 -26
- package/dist/esm/api/gridviewPanelApi.js +1 -0
- package/dist/esm/api/groupPanelApi.d.ts +11 -14
- package/dist/esm/api/groupPanelApi.js +18 -13
- package/dist/esm/api/panelApi.d.ts +0 -25
- package/dist/esm/api/panelApi.js +1 -20
- package/dist/esm/api/paneviewPanelApi.js +1 -0
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -1
- package/dist/esm/api/splitviewPanelApi.js +1 -5
- package/dist/esm/dnd/abstractDragHandler.d.ts +2 -2
- package/dist/esm/dnd/abstractDragHandler.js +10 -10
- package/dist/esm/dnd/dataTransfer.d.ts +0 -25
- package/dist/esm/dnd/dataTransfer.js +0 -40
- package/dist/esm/dnd/dnd.d.ts +1 -14
- package/dist/esm/dnd/dnd.js +1 -69
- package/dist/esm/dnd/droptarget.d.ts +3 -0
- package/dist/esm/dnd/droptarget.js +72 -48
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +1 -2
- package/dist/esm/dockview/components/tab/defaultTab.js +2 -10
- package/dist/esm/dockview/components/watermark/watermark.d.ts +3 -3
- package/dist/esm/dockview/components/watermark/watermark.js +4 -4
- package/dist/esm/dockview/dockviewComponent.d.ts +34 -23
- package/dist/esm/dockview/dockviewComponent.js +82 -150
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +3 -5
- package/dist/esm/dockview/dockviewGroupPanel.js +6 -30
- package/dist/esm/dockview/options.d.ts +2 -1
- package/dist/esm/events.js +2 -3
- package/dist/esm/gridview/baseComponentGridview.d.ts +12 -20
- package/dist/esm/gridview/baseComponentGridview.js +27 -45
- package/dist/esm/gridview/basePanelView.d.ts +5 -8
- package/dist/esm/gridview/basePanelView.js +12 -8
- package/dist/esm/gridview/branchNode.js +3 -3
- package/dist/esm/gridview/gridview.js +18 -16
- package/dist/esm/gridview/gridviewComponent.d.ts +5 -6
- package/dist/esm/gridview/gridviewComponent.js +12 -10
- package/dist/esm/gridview/gridviewPanel.d.ts +0 -1
- package/dist/esm/gridview/gridviewPanel.js +3 -6
- package/dist/esm/gridview/leafNode.js +1 -0
- package/dist/esm/groupview/groupPanel.d.ts +1 -7
- package/dist/esm/groupview/groupview.d.ts +18 -10
- package/dist/esm/groupview/groupview.js +30 -59
- package/dist/esm/groupview/groupviewPanel.d.ts +5 -2
- package/dist/esm/groupview/panel/content.d.ts +1 -1
- package/dist/esm/groupview/panel/content.js +2 -1
- package/dist/esm/groupview/tab.d.ts +10 -13
- package/dist/esm/groupview/tab.js +17 -24
- package/dist/esm/groupview/titlebar/tabsContainer.js +4 -6
- package/dist/esm/hostedContainer.js +2 -2
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +1 -2
- package/dist/esm/lifecycle.js +2 -1
- package/dist/esm/panel/types.d.ts +0 -2
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +1 -1
- package/dist/esm/paneview/defaultPaneviewHeader.js +1 -1
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +32 -29
- package/dist/esm/paneview/paneview.d.ts +3 -1
- package/dist/esm/paneview/paneview.js +10 -6
- package/dist/esm/paneview/paneviewComponent.d.ts +7 -6
- package/dist/esm/paneview/paneviewComponent.js +31 -7
- package/dist/esm/paneview/paneviewPanel.js +1 -1
- package/dist/esm/react/deserializer.js +1 -3
- package/dist/esm/react/dockview/dockview.d.ts +9 -9
- package/dist/esm/react/dockview/dockview.js +36 -5
- package/dist/esm/react/dockview/reactContentPart.d.ts +2 -2
- package/dist/esm/react/dockview/reactContentPart.js +6 -17
- package/dist/esm/react/dockview/reactHeaderPart.d.ts +2 -2
- package/dist/esm/react/dockview/reactHeaderPart.js +3 -2
- package/dist/esm/react/dockview/reactWatermarkPart.d.ts +3 -4
- package/dist/esm/react/dockview/reactWatermarkPart.js +3 -4
- package/dist/esm/react/dockview/v2/reactContentRenderer.d.ts +2 -2
- package/dist/esm/react/dockview/v2/reactContentRenderer.js +2 -2
- package/dist/esm/react/dockview/v2/webviewContentRenderer.d.ts +2 -2
- package/dist/esm/react/dockview/v2/webviewContentRenderer.js +2 -2
- package/dist/esm/react/gridview/gridview.js +4 -1
- package/dist/esm/react/gridview/view.d.ts +3 -2
- package/dist/esm/react/gridview/view.js +2 -2
- package/dist/esm/react/index.d.ts +1 -0
- package/dist/esm/react/paneview/paneview.js +1 -1
- package/dist/esm/react/react.js +1 -2
- package/dist/esm/react/splitview/splitview.js +3 -1
- package/dist/esm/react/splitview/view.js +2 -2
- package/dist/esm/splitview/core/splitview.js +1 -1
- package/dist/esm/splitview/splitviewComponent.d.ts +0 -3
- package/dist/esm/splitview/splitviewComponent.js +17 -6
- package/dist/esm/splitview/splitviewPanel.d.ts +1 -6
- package/dist/esm/splitview/splitviewPanel.js +5 -3
- package/dist/styles/dockview.css +14 -17
- package/package.json +13 -13
- package/dist/cjs/functions.d.ts +0 -1
- package/dist/cjs/functions.js +0 -42
- package/dist/cjs/functions.js.map +0 -1
- package/dist/cjs/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/cjs/groupview/panel/hostedPanel.js +0 -57
- package/dist/cjs/groupview/panel/hostedPanel.js.map +0 -1
- package/dist/cjs/json.d.ts +0 -1
- package/dist/cjs/json.js +0 -14
- package/dist/cjs/json.js.map +0 -1
- package/dist/esm/functions.d.ts +0 -1
- package/dist/esm/functions.js +0 -8
- package/dist/esm/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/esm/groupview/panel/hostedPanel.js +0 -43
- package/dist/esm/json.d.ts +0 -1
- package/dist/esm/json.js +0 -9
package/dist/dockview.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.0
|
|
3
|
+
* @version 1.3.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -58,9 +58,79 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
var css_248z = ".dockview-theme-dark {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n pointer-events: none;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {\n width: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translate(100%, 0%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translate(0%, 100%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n height: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n overflow: hidden;\n outline: none;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n}\n.pane-container .view .default-header > span {\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n}\n.split-view-container .sash-container .sash:active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab.dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action:not(.dirty) {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.tab .default-tab .action-container .tab-list .tab-action.dirty:not(:hover) {\n display: block;\n -webkit-mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}";
|
|
61
|
+
var css_248z = ".dockview-theme-dark {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left {\n transform: translateX(-25%) scaleX(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translateX(25%) scaleX(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top {\n transform: translateY(-25%) scaleY(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translateY(25%) scaleY(50%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n overflow: hidden;\n outline: none;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n}\n.pane-container .view .default-header > span {\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.dockview-react-part {\n height: 100%;\n width: 100%;\n}\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n}\n.split-view-container .sash-container .sash:active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab.dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}";
|
|
62
62
|
styleInject(css_248z);
|
|
63
63
|
|
|
64
|
+
class TransferObject {
|
|
65
|
+
constructor() {
|
|
66
|
+
//
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class PanelTransfer extends TransferObject {
|
|
70
|
+
constructor(viewId, groupId, panelId) {
|
|
71
|
+
super();
|
|
72
|
+
this.viewId = viewId;
|
|
73
|
+
this.groupId = groupId;
|
|
74
|
+
this.panelId = panelId;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
class PaneTransfer extends TransferObject {
|
|
78
|
+
constructor(viewId, paneId) {
|
|
79
|
+
super();
|
|
80
|
+
this.viewId = viewId;
|
|
81
|
+
this.paneId = paneId;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
86
|
+
*/
|
|
87
|
+
class LocalSelectionTransfer {
|
|
88
|
+
constructor() {
|
|
89
|
+
// protect against external instantiation
|
|
90
|
+
}
|
|
91
|
+
static getInstance() {
|
|
92
|
+
return LocalSelectionTransfer.INSTANCE;
|
|
93
|
+
}
|
|
94
|
+
hasData(proto) {
|
|
95
|
+
return proto && proto === this.proto;
|
|
96
|
+
}
|
|
97
|
+
clearData(proto) {
|
|
98
|
+
if (this.hasData(proto)) {
|
|
99
|
+
this.proto = undefined;
|
|
100
|
+
this.data = undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
getData(proto) {
|
|
104
|
+
if (this.hasData(proto)) {
|
|
105
|
+
return this.data;
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
setData(data, proto) {
|
|
110
|
+
if (proto) {
|
|
111
|
+
this.data = data;
|
|
112
|
+
this.proto = proto;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
117
|
+
function getPanelData() {
|
|
118
|
+
const panelTransfer = LocalSelectionTransfer.getInstance();
|
|
119
|
+
const isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
120
|
+
if (!isPanelEvent) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
124
|
+
}
|
|
125
|
+
function getPaneData() {
|
|
126
|
+
const paneTransfer = LocalSelectionTransfer.getInstance();
|
|
127
|
+
const isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
128
|
+
if (!isPanelEvent) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
132
|
+
}
|
|
133
|
+
|
|
64
134
|
exports.Event = void 0;
|
|
65
135
|
(function (Event) {
|
|
66
136
|
Event.any = (...children) => {
|
|
@@ -91,7 +161,6 @@
|
|
|
91
161
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
|
|
92
162
|
listener(this._last);
|
|
93
163
|
}
|
|
94
|
-
this._listeners.length === 0;
|
|
95
164
|
this._listeners.push(listener);
|
|
96
165
|
return {
|
|
97
166
|
dispose: () => {
|
|
@@ -107,9 +176,9 @@
|
|
|
107
176
|
}
|
|
108
177
|
fire(e) {
|
|
109
178
|
this._last = e;
|
|
110
|
-
this._listeners
|
|
179
|
+
for (const listener of this._listeners) {
|
|
111
180
|
listener(e);
|
|
112
|
-
}
|
|
181
|
+
}
|
|
113
182
|
}
|
|
114
183
|
dispose() {
|
|
115
184
|
this._listeners = [];
|
|
@@ -151,164 +220,6 @@
|
|
|
151
220
|
}
|
|
152
221
|
}
|
|
153
222
|
|
|
154
|
-
exports.Disposable = void 0;
|
|
155
|
-
(function (Disposable) {
|
|
156
|
-
Disposable.NONE = {
|
|
157
|
-
dispose: () => {
|
|
158
|
-
// noop
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
})(exports.Disposable || (exports.Disposable = {}));
|
|
162
|
-
class CompositeDisposable {
|
|
163
|
-
constructor(...args) {
|
|
164
|
-
this.disposables = args;
|
|
165
|
-
}
|
|
166
|
-
static from(...args) {
|
|
167
|
-
return new CompositeDisposable(...args);
|
|
168
|
-
}
|
|
169
|
-
addDisposables(...args) {
|
|
170
|
-
args === null || args === void 0 ? void 0 : args.forEach((arg) => this.disposables.push(arg));
|
|
171
|
-
}
|
|
172
|
-
dispose() {
|
|
173
|
-
this.disposables.forEach((arg) => arg.dispose());
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
class MutableDisposable {
|
|
177
|
-
constructor() {
|
|
178
|
-
this._disposable = exports.Disposable.NONE;
|
|
179
|
-
}
|
|
180
|
-
set value(disposable) {
|
|
181
|
-
if (this._disposable) {
|
|
182
|
-
this._disposable.dispose();
|
|
183
|
-
}
|
|
184
|
-
this._disposable = disposable;
|
|
185
|
-
}
|
|
186
|
-
dispose() {
|
|
187
|
-
if (this._disposable) {
|
|
188
|
-
this._disposable.dispose();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function tryParseJSON(text, reviver) {
|
|
194
|
-
try {
|
|
195
|
-
return JSON.parse(text, reviver);
|
|
196
|
-
}
|
|
197
|
-
catch (err) {
|
|
198
|
-
console.warn('failed to parse JSON');
|
|
199
|
-
return undefined;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
class TransferObject {
|
|
204
|
-
constructor() {
|
|
205
|
-
//
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
class PanelTransfer extends TransferObject {
|
|
209
|
-
constructor(viewId, groupId, panelId) {
|
|
210
|
-
super();
|
|
211
|
-
this.viewId = viewId;
|
|
212
|
-
this.groupId = groupId;
|
|
213
|
-
this.panelId = panelId;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
class PaneTransfer extends TransferObject {
|
|
217
|
-
constructor(viewId, paneId) {
|
|
218
|
-
super();
|
|
219
|
-
this.viewId = viewId;
|
|
220
|
-
this.paneId = paneId;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
const DATA_KEY = 'splitview/transfer';
|
|
224
|
-
const isPanelTransferEvent = (event) => {
|
|
225
|
-
if (!event.dataTransfer) {
|
|
226
|
-
return false;
|
|
227
|
-
}
|
|
228
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
229
|
-
};
|
|
230
|
-
exports.DragType = void 0;
|
|
231
|
-
(function (DragType) {
|
|
232
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
233
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
234
|
-
})(exports.DragType || (exports.DragType = {}));
|
|
235
|
-
/**
|
|
236
|
-
* Determine whether this data belong to that of an event that was started by
|
|
237
|
-
* dragging a tab component
|
|
238
|
-
*/
|
|
239
|
-
const isTabDragEvent = (data) => {
|
|
240
|
-
return data.type === exports.DragType.DOCKVIEW_TAB;
|
|
241
|
-
};
|
|
242
|
-
/**
|
|
243
|
-
* Determine whether this data belong to that of an event that was started by
|
|
244
|
-
* a custom drag-enable component
|
|
245
|
-
*/
|
|
246
|
-
const isCustomDragEvent = (data) => {
|
|
247
|
-
return data.type === exports.DragType.EXTERNAL;
|
|
248
|
-
};
|
|
249
|
-
const extractData = (event) => {
|
|
250
|
-
if (!event.dataTransfer) {
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
254
|
-
if (!data) {
|
|
255
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
256
|
-
}
|
|
257
|
-
if (typeof data.type !== 'string') {
|
|
258
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
259
|
-
}
|
|
260
|
-
return data;
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
264
|
-
*/
|
|
265
|
-
class LocalSelectionTransfer {
|
|
266
|
-
constructor() {
|
|
267
|
-
// protect against external instantiation
|
|
268
|
-
}
|
|
269
|
-
static getInstance() {
|
|
270
|
-
return LocalSelectionTransfer.INSTANCE;
|
|
271
|
-
}
|
|
272
|
-
hasData(proto) {
|
|
273
|
-
return proto && proto === this.proto;
|
|
274
|
-
}
|
|
275
|
-
clearData(proto) {
|
|
276
|
-
if (this.hasData(proto)) {
|
|
277
|
-
this.proto = undefined;
|
|
278
|
-
this.data = undefined;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
getData(proto) {
|
|
282
|
-
if (this.hasData(proto)) {
|
|
283
|
-
return this.data;
|
|
284
|
-
}
|
|
285
|
-
return undefined;
|
|
286
|
-
}
|
|
287
|
-
setData(data, proto) {
|
|
288
|
-
if (proto) {
|
|
289
|
-
this.data = data;
|
|
290
|
-
this.proto = proto;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
295
|
-
function getPanelData() {
|
|
296
|
-
const panelTransfer = LocalSelectionTransfer.getInstance();
|
|
297
|
-
const isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
298
|
-
if (!isPanelEvent) {
|
|
299
|
-
return undefined;
|
|
300
|
-
}
|
|
301
|
-
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
302
|
-
}
|
|
303
|
-
function getPaneData() {
|
|
304
|
-
const paneTransfer = LocalSelectionTransfer.getInstance();
|
|
305
|
-
const isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
306
|
-
if (!isPanelEvent) {
|
|
307
|
-
return undefined;
|
|
308
|
-
}
|
|
309
|
-
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
310
|
-
}
|
|
311
|
-
|
|
312
223
|
class SplitviewApi {
|
|
313
224
|
constructor(component) {
|
|
314
225
|
this.component = component;
|
|
@@ -328,6 +239,9 @@
|
|
|
328
239
|
get length() {
|
|
329
240
|
return this.component.length;
|
|
330
241
|
}
|
|
242
|
+
get orientation() {
|
|
243
|
+
return this.component.orientation;
|
|
244
|
+
}
|
|
331
245
|
get onDidLayoutChange() {
|
|
332
246
|
return this.component.onDidLayoutChange;
|
|
333
247
|
}
|
|
@@ -337,9 +251,6 @@
|
|
|
337
251
|
get onDidRemoveView() {
|
|
338
252
|
return this.component.onDidRemoveView;
|
|
339
253
|
}
|
|
340
|
-
get orientation() {
|
|
341
|
-
return this.component.orientation;
|
|
342
|
-
}
|
|
343
254
|
updateOptions(options) {
|
|
344
255
|
this.component.updateOptions(options);
|
|
345
256
|
}
|
|
@@ -384,18 +295,18 @@
|
|
|
384
295
|
constructor(component) {
|
|
385
296
|
this.component = component;
|
|
386
297
|
}
|
|
387
|
-
get width() {
|
|
388
|
-
return this.component.width;
|
|
389
|
-
}
|
|
390
|
-
get height() {
|
|
391
|
-
return this.component.height;
|
|
392
|
-
}
|
|
393
298
|
get minimumSize() {
|
|
394
299
|
return this.component.minimumSize;
|
|
395
300
|
}
|
|
396
301
|
get maximumSize() {
|
|
397
302
|
return this.component.maximumSize;
|
|
398
303
|
}
|
|
304
|
+
get height() {
|
|
305
|
+
return this.component.height;
|
|
306
|
+
}
|
|
307
|
+
get width() {
|
|
308
|
+
return this.component.width;
|
|
309
|
+
}
|
|
399
310
|
get onDidLayoutChange() {
|
|
400
311
|
return this.component.onDidLayoutChange;
|
|
401
312
|
}
|
|
@@ -435,7 +346,7 @@
|
|
|
435
346
|
this.component.layout(width, height);
|
|
436
347
|
}
|
|
437
348
|
addPanel(options) {
|
|
438
|
-
|
|
349
|
+
this.component.addPanel(options);
|
|
439
350
|
}
|
|
440
351
|
resizeToFit() {
|
|
441
352
|
this.component.resizeToFit();
|
|
@@ -451,12 +362,6 @@
|
|
|
451
362
|
constructor(component) {
|
|
452
363
|
this.component = component;
|
|
453
364
|
}
|
|
454
|
-
get width() {
|
|
455
|
-
return this.component.width;
|
|
456
|
-
}
|
|
457
|
-
get height() {
|
|
458
|
-
return this.component.height;
|
|
459
|
-
}
|
|
460
365
|
get minimumHeight() {
|
|
461
366
|
return this.component.minimumHeight;
|
|
462
367
|
}
|
|
@@ -469,12 +374,27 @@
|
|
|
469
374
|
get maximumWidth() {
|
|
470
375
|
return this.component.maximumWidth;
|
|
471
376
|
}
|
|
472
|
-
get
|
|
473
|
-
return this.component.
|
|
377
|
+
get width() {
|
|
378
|
+
return this.component.width;
|
|
379
|
+
}
|
|
380
|
+
get height() {
|
|
381
|
+
return this.component.height;
|
|
474
382
|
}
|
|
475
383
|
get onDidLayoutChange() {
|
|
476
384
|
return this.component.onDidLayoutChange;
|
|
477
385
|
}
|
|
386
|
+
get onDidAddGroup() {
|
|
387
|
+
return this.component.onDidAddGroup;
|
|
388
|
+
}
|
|
389
|
+
get onDidRemoveGroup() {
|
|
390
|
+
return this.component.onDidRemoveGroup;
|
|
391
|
+
}
|
|
392
|
+
get onDidActiveGroupChange() {
|
|
393
|
+
return this.component.onDidActiveGroupChange;
|
|
394
|
+
}
|
|
395
|
+
get onDidLayoutFromJSON() {
|
|
396
|
+
return this.component.onDidLayoutFromJSON;
|
|
397
|
+
}
|
|
478
398
|
get panels() {
|
|
479
399
|
return this.component.groups;
|
|
480
400
|
}
|
|
@@ -549,8 +469,26 @@
|
|
|
549
469
|
get totalPanels() {
|
|
550
470
|
return this.component.totalPanels;
|
|
551
471
|
}
|
|
552
|
-
get
|
|
553
|
-
return this.component.
|
|
472
|
+
get onDidActiveGroupChange() {
|
|
473
|
+
return this.component.onDidActiveGroupChange;
|
|
474
|
+
}
|
|
475
|
+
get onDidAddGroup() {
|
|
476
|
+
return this.component.onDidAddGroup;
|
|
477
|
+
}
|
|
478
|
+
get onDidRemoveGroup() {
|
|
479
|
+
return this.component.onDidRemoveGroup;
|
|
480
|
+
}
|
|
481
|
+
get onDidActivePanelChange() {
|
|
482
|
+
return this.component.onDidActivePanelChange;
|
|
483
|
+
}
|
|
484
|
+
get onDidAddPanel() {
|
|
485
|
+
return this.component.onDidAddPanel;
|
|
486
|
+
}
|
|
487
|
+
get onDidRemovePanel() {
|
|
488
|
+
return this.component.onDidRemovePanel;
|
|
489
|
+
}
|
|
490
|
+
get onDidLayoutfromJSON() {
|
|
491
|
+
return this.component.onDidLayoutfromJSON;
|
|
554
492
|
}
|
|
555
493
|
get onDidLayoutChange() {
|
|
556
494
|
return this.component.onDidLayoutChange;
|
|
@@ -579,18 +517,12 @@
|
|
|
579
517
|
getPanel(id) {
|
|
580
518
|
return this.component.getGroupPanel(id);
|
|
581
519
|
}
|
|
582
|
-
setActivePanel(panel) {
|
|
583
|
-
this.component.setActivePanel(panel);
|
|
584
|
-
}
|
|
585
520
|
layout(width, height, force = false) {
|
|
586
521
|
this.component.layout(width, height, force);
|
|
587
522
|
}
|
|
588
523
|
addPanel(options) {
|
|
589
524
|
return this.component.addPanel(options);
|
|
590
525
|
}
|
|
591
|
-
removePanel(panel) {
|
|
592
|
-
this.component.removePanel(panel);
|
|
593
|
-
}
|
|
594
526
|
addEmptyGroup(options) {
|
|
595
527
|
this.component.addEmptyGroup(options);
|
|
596
528
|
}
|
|
@@ -620,6 +552,46 @@
|
|
|
620
552
|
}
|
|
621
553
|
}
|
|
622
554
|
|
|
555
|
+
var Disposable;
|
|
556
|
+
(function (Disposable) {
|
|
557
|
+
Disposable.NONE = {
|
|
558
|
+
dispose: () => {
|
|
559
|
+
// noop
|
|
560
|
+
},
|
|
561
|
+
};
|
|
562
|
+
})(Disposable || (Disposable = {}));
|
|
563
|
+
class CompositeDisposable {
|
|
564
|
+
constructor(...args) {
|
|
565
|
+
this.disposables = args;
|
|
566
|
+
}
|
|
567
|
+
static from(...args) {
|
|
568
|
+
return new CompositeDisposable(...args);
|
|
569
|
+
}
|
|
570
|
+
addDisposables(...args) {
|
|
571
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
572
|
+
}
|
|
573
|
+
dispose() {
|
|
574
|
+
this.disposables.forEach((arg) => arg.dispose());
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
class MutableDisposable {
|
|
578
|
+
constructor() {
|
|
579
|
+
this._disposable = Disposable.NONE;
|
|
580
|
+
}
|
|
581
|
+
set value(disposable) {
|
|
582
|
+
if (this._disposable) {
|
|
583
|
+
this._disposable.dispose();
|
|
584
|
+
}
|
|
585
|
+
this._disposable = disposable;
|
|
586
|
+
}
|
|
587
|
+
dispose() {
|
|
588
|
+
if (this._disposable) {
|
|
589
|
+
this._disposable.dispose();
|
|
590
|
+
this._disposable = Disposable.NONE;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
623
595
|
function watchElementResize(element, cb) {
|
|
624
596
|
const observer = new ResizeObserver((entires) => {
|
|
625
597
|
const firstEntry = entires[0];
|
|
@@ -1565,13 +1537,13 @@
|
|
|
1565
1537
|
this._onDidSashEnd.dispose();
|
|
1566
1538
|
this._onDidAddView.dispose();
|
|
1567
1539
|
this._onDidRemoveView.dispose();
|
|
1568
|
-
this.element.remove();
|
|
1569
1540
|
for (let i = 0; i < this.element.children.length; i++) {
|
|
1570
1541
|
if (this.element.children.item(i) === this.element) {
|
|
1571
1542
|
this.element.removeChild(this.element);
|
|
1572
1543
|
break;
|
|
1573
1544
|
}
|
|
1574
1545
|
}
|
|
1546
|
+
this.element.remove();
|
|
1575
1547
|
}
|
|
1576
1548
|
}
|
|
1577
1549
|
|
|
@@ -1594,7 +1566,7 @@
|
|
|
1594
1566
|
});
|
|
1595
1567
|
// if we've added views from the descriptor we need to
|
|
1596
1568
|
// add the panes to our Pane array and setup animation
|
|
1597
|
-
this.getPanes().forEach((pane
|
|
1569
|
+
this.getPanes().forEach((pane) => {
|
|
1598
1570
|
const disposable = new CompositeDisposable(pane.onDidChangeExpansionState(() => {
|
|
1599
1571
|
this.setupAnimation();
|
|
1600
1572
|
this._onDidChange.fire(undefined);
|
|
@@ -1610,7 +1582,7 @@
|
|
|
1610
1582
|
this.paneItems.push(paneItem);
|
|
1611
1583
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1612
1584
|
});
|
|
1613
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1585
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1614
1586
|
this._onDidChange.fire(undefined);
|
|
1615
1587
|
}), this.splitview.onDidAddView(() => {
|
|
1616
1588
|
this._onDidChange.fire();
|
|
@@ -1662,17 +1634,20 @@
|
|
|
1662
1634
|
getPanes() {
|
|
1663
1635
|
return this.splitview.getViews();
|
|
1664
1636
|
}
|
|
1665
|
-
removePane(index) {
|
|
1637
|
+
removePane(index, options = { skipDispose: false }) {
|
|
1666
1638
|
const paneItem = this.paneItems.splice(index, 1)[0];
|
|
1667
1639
|
this.splitview.removeView(index);
|
|
1668
|
-
|
|
1640
|
+
if (!options.skipDispose) {
|
|
1641
|
+
paneItem.disposable.dispose();
|
|
1642
|
+
paneItem.pane.dispose();
|
|
1643
|
+
}
|
|
1669
1644
|
return paneItem;
|
|
1670
1645
|
}
|
|
1671
1646
|
moveView(from, to) {
|
|
1672
1647
|
if (from === to) {
|
|
1673
1648
|
return;
|
|
1674
1649
|
}
|
|
1675
|
-
const view = this.removePane(from);
|
|
1650
|
+
const view = this.removePane(from, { skipDispose: true });
|
|
1676
1651
|
this.skipAnimation = true;
|
|
1677
1652
|
try {
|
|
1678
1653
|
this.addPane(view.pane, view.pane.size, to, false);
|
|
@@ -1700,15 +1675,16 @@
|
|
|
1700
1675
|
}
|
|
1701
1676
|
dispose() {
|
|
1702
1677
|
super.dispose();
|
|
1703
|
-
this.splitview.dispose();
|
|
1704
1678
|
if (this.animationTimer) {
|
|
1705
1679
|
clearTimeout(this.animationTimer);
|
|
1706
1680
|
this.animationTimer = undefined;
|
|
1707
1681
|
}
|
|
1708
1682
|
this.paneItems.forEach((paneItem) => {
|
|
1709
1683
|
paneItem.disposable.dispose();
|
|
1684
|
+
paneItem.pane.dispose();
|
|
1710
1685
|
});
|
|
1711
1686
|
this.paneItems = [];
|
|
1687
|
+
this.splitview.dispose();
|
|
1712
1688
|
this.element.remove();
|
|
1713
1689
|
}
|
|
1714
1690
|
}
|
|
@@ -1771,8 +1747,8 @@
|
|
|
1771
1747
|
this.options = options;
|
|
1772
1748
|
this._onDrop = new Emitter();
|
|
1773
1749
|
this.onDrop = this._onDrop.event;
|
|
1774
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1775
|
-
onDragEnter: (
|
|
1750
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1751
|
+
onDragEnter: () => undefined,
|
|
1776
1752
|
onDragOver: (e) => {
|
|
1777
1753
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
1778
1754
|
if (!this.options.canDisplayOverlay) {
|
|
@@ -1807,56 +1783,16 @@
|
|
|
1807
1783
|
const y = e.offsetY;
|
|
1808
1784
|
const xp = (100 * x) / width;
|
|
1809
1785
|
const yp = (100 * y) / height;
|
|
1810
|
-
|
|
1811
|
-
let isLeft = false;
|
|
1812
|
-
let isTop = false;
|
|
1813
|
-
let isBottom = false;
|
|
1814
|
-
switch (this.options.validOverlays) {
|
|
1815
|
-
case 'all':
|
|
1816
|
-
isRight = xp > 80;
|
|
1817
|
-
isLeft = xp < 20;
|
|
1818
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1819
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1820
|
-
break;
|
|
1821
|
-
case 'vertical':
|
|
1822
|
-
isTop = yp < 50;
|
|
1823
|
-
isBottom = yp >= 50;
|
|
1824
|
-
break;
|
|
1825
|
-
case 'horizontal':
|
|
1826
|
-
isLeft = xp < 50;
|
|
1827
|
-
isRight = xp >= 50;
|
|
1828
|
-
break;
|
|
1829
|
-
}
|
|
1786
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1830
1787
|
const isSmallX = width < 100;
|
|
1831
1788
|
const isSmallY = height < 100;
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1835
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1836
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1837
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1838
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1839
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1840
|
-
if (isRight) {
|
|
1841
|
-
this._state = exports.Position.Right;
|
|
1842
|
-
}
|
|
1843
|
-
else if (isLeft) {
|
|
1844
|
-
this._state = exports.Position.Left;
|
|
1845
|
-
}
|
|
1846
|
-
else if (isTop) {
|
|
1847
|
-
this._state = exports.Position.Top;
|
|
1848
|
-
}
|
|
1849
|
-
else if (isBottom) {
|
|
1850
|
-
this._state = exports.Position.Bottom;
|
|
1851
|
-
}
|
|
1852
|
-
else {
|
|
1853
|
-
this._state = exports.Position.Center;
|
|
1854
|
-
}
|
|
1789
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1790
|
+
this.setState(quadrant);
|
|
1855
1791
|
},
|
|
1856
|
-
onDragLeave: (
|
|
1792
|
+
onDragLeave: () => {
|
|
1857
1793
|
this.removeDropTarget();
|
|
1858
1794
|
},
|
|
1859
|
-
onDragEnd: (
|
|
1795
|
+
onDragEnd: () => {
|
|
1860
1796
|
this.removeDropTarget();
|
|
1861
1797
|
},
|
|
1862
1798
|
onDrop: (e) => {
|
|
@@ -1880,9 +1816,73 @@
|
|
|
1880
1816
|
this.options.canDisplayOverlay = value;
|
|
1881
1817
|
}
|
|
1882
1818
|
dispose() {
|
|
1883
|
-
this._onDrop.dispose();
|
|
1884
1819
|
this.removeDropTarget();
|
|
1885
1820
|
}
|
|
1821
|
+
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1822
|
+
if (!this.overlay) {
|
|
1823
|
+
return;
|
|
1824
|
+
}
|
|
1825
|
+
const isLeft = quadrant === 'left';
|
|
1826
|
+
const isRight = quadrant === 'right';
|
|
1827
|
+
const isTop = quadrant === 'top';
|
|
1828
|
+
const isBottom = quadrant === 'bottom';
|
|
1829
|
+
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1830
|
+
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1831
|
+
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1832
|
+
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1833
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1834
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1835
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1836
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1837
|
+
}
|
|
1838
|
+
setState(quadrant) {
|
|
1839
|
+
switch (quadrant) {
|
|
1840
|
+
case 'top':
|
|
1841
|
+
this._state = exports.Position.Top;
|
|
1842
|
+
break;
|
|
1843
|
+
case 'left':
|
|
1844
|
+
this._state = exports.Position.Left;
|
|
1845
|
+
break;
|
|
1846
|
+
case 'bottom':
|
|
1847
|
+
this._state = exports.Position.Bottom;
|
|
1848
|
+
break;
|
|
1849
|
+
case 'right':
|
|
1850
|
+
this._state = exports.Position.Right;
|
|
1851
|
+
break;
|
|
1852
|
+
default:
|
|
1853
|
+
this._state = exports.Position.Center;
|
|
1854
|
+
break;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
calculateQuadrant(overlayType, xp, yp) {
|
|
1858
|
+
switch (overlayType) {
|
|
1859
|
+
case 'all':
|
|
1860
|
+
if (xp < 20) {
|
|
1861
|
+
return 'left';
|
|
1862
|
+
}
|
|
1863
|
+
if (xp > 80) {
|
|
1864
|
+
return 'right';
|
|
1865
|
+
}
|
|
1866
|
+
if (yp < 20) {
|
|
1867
|
+
return 'top';
|
|
1868
|
+
}
|
|
1869
|
+
if (yp > 80) {
|
|
1870
|
+
return 'bottom';
|
|
1871
|
+
}
|
|
1872
|
+
break;
|
|
1873
|
+
case 'vertical':
|
|
1874
|
+
if (yp < 50) {
|
|
1875
|
+
return 'top';
|
|
1876
|
+
}
|
|
1877
|
+
return 'bottom';
|
|
1878
|
+
case 'horizontal':
|
|
1879
|
+
if (xp < 50) {
|
|
1880
|
+
return 'left';
|
|
1881
|
+
}
|
|
1882
|
+
return 'right';
|
|
1883
|
+
}
|
|
1884
|
+
return null;
|
|
1885
|
+
}
|
|
1886
1886
|
removeDropTarget() {
|
|
1887
1887
|
if (this.target) {
|
|
1888
1888
|
this._state = undefined;
|
|
@@ -1985,6 +1985,7 @@
|
|
|
1985
1985
|
this.view.layout(this.width, this.height);
|
|
1986
1986
|
}
|
|
1987
1987
|
dispose() {
|
|
1988
|
+
this._onDidChange.dispose();
|
|
1988
1989
|
this._disposable.dispose();
|
|
1989
1990
|
}
|
|
1990
1991
|
}
|
|
@@ -2002,7 +2003,7 @@
|
|
|
2002
2003
|
this.children = [];
|
|
2003
2004
|
this._onDidChange = new Emitter();
|
|
2004
2005
|
this.onDidChange = this._onDidChange.event;
|
|
2005
|
-
this._childrenDisposable =
|
|
2006
|
+
this._childrenDisposable = Disposable.NONE;
|
|
2006
2007
|
this._orthogonalSize = orthogonalSize;
|
|
2007
2008
|
this._size = size;
|
|
2008
2009
|
this.element = document.createElement('div');
|
|
@@ -2027,7 +2028,7 @@
|
|
|
2027
2028
|
: true,
|
|
2028
2029
|
};
|
|
2029
2030
|
}),
|
|
2030
|
-
size: this.
|
|
2031
|
+
size: this.size,
|
|
2031
2032
|
};
|
|
2032
2033
|
this.children = childDescriptors.map((c) => c.node);
|
|
2033
2034
|
this.splitview = new Splitview(this.element, {
|
|
@@ -2036,7 +2037,7 @@
|
|
|
2036
2037
|
proportionalLayout,
|
|
2037
2038
|
});
|
|
2038
2039
|
}
|
|
2039
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2040
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
2040
2041
|
this._onDidChange.fire(undefined);
|
|
2041
2042
|
}));
|
|
2042
2043
|
this.setupChildrenEvents();
|
|
@@ -2188,7 +2189,7 @@
|
|
|
2188
2189
|
}
|
|
2189
2190
|
setupChildrenEvents() {
|
|
2190
2191
|
this._childrenDisposable.dispose();
|
|
2191
|
-
this._childrenDisposable = exports.Event.any(...this.children.map((c) => c.onDidChange))((
|
|
2192
|
+
this._childrenDisposable = exports.Event.any(...this.children.map((c) => c.onDidChange))(() => {
|
|
2192
2193
|
/**
|
|
2193
2194
|
* indicate a change has occured to allows any re-rendering but don't bubble
|
|
2194
2195
|
* event because that was specific to this branch
|
|
@@ -2208,6 +2209,15 @@
|
|
|
2208
2209
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2209
2210
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2210
2211
|
*--------------------------------------------------------------------------------------------*/
|
|
2212
|
+
function findLeaf(candiateNode, last) {
|
|
2213
|
+
if (candiateNode instanceof LeafNode) {
|
|
2214
|
+
return candiateNode;
|
|
2215
|
+
}
|
|
2216
|
+
if (candiateNode instanceof BranchNode) {
|
|
2217
|
+
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2218
|
+
}
|
|
2219
|
+
throw new Error('invalid node');
|
|
2220
|
+
}
|
|
2211
2221
|
function flipNode(node, size, orthogonalSize) {
|
|
2212
2222
|
if (node instanceof BranchNode) {
|
|
2213
2223
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2339,6 +2349,7 @@
|
|
|
2339
2349
|
this.disposable.dispose();
|
|
2340
2350
|
this._onDidChange.dispose();
|
|
2341
2351
|
this.root.dispose();
|
|
2352
|
+
this.element.remove();
|
|
2342
2353
|
}
|
|
2343
2354
|
clear() {
|
|
2344
2355
|
const orientation = this.root.orientation;
|
|
@@ -2346,13 +2357,13 @@
|
|
|
2346
2357
|
}
|
|
2347
2358
|
deserialize(json, deserializer) {
|
|
2348
2359
|
const orientation = json.orientation;
|
|
2349
|
-
const height = json.height;
|
|
2360
|
+
const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
|
|
2350
2361
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2351
2362
|
}
|
|
2352
2363
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2353
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2364
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2354
2365
|
}
|
|
2355
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2366
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2356
2367
|
let result;
|
|
2357
2368
|
if (node.type === 'branch') {
|
|
2358
2369
|
const serializedChildren = node.data;
|
|
@@ -2362,7 +2373,9 @@
|
|
|
2362
2373
|
visible: serializedChild.visible,
|
|
2363
2374
|
};
|
|
2364
2375
|
});
|
|
2365
|
-
|
|
2376
|
+
// HORIZONTAL => height=orthogonalsize width=size
|
|
2377
|
+
// VERTICAL => height=size width=orthogonalsize
|
|
2378
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
|
|
2366
2379
|
}
|
|
2367
2380
|
else {
|
|
2368
2381
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2423,15 +2436,6 @@
|
|
|
2423
2436
|
if (!(node instanceof LeafNode)) {
|
|
2424
2437
|
throw new Error('invalid location');
|
|
2425
2438
|
}
|
|
2426
|
-
const findLeaf = (candiateNode, last) => {
|
|
2427
|
-
if (candiateNode instanceof LeafNode) {
|
|
2428
|
-
return candiateNode;
|
|
2429
|
-
}
|
|
2430
|
-
if (candiateNode instanceof BranchNode) {
|
|
2431
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2432
|
-
}
|
|
2433
|
-
throw new Error('invalid node');
|
|
2434
|
-
};
|
|
2435
2439
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2436
2440
|
const n = path[i];
|
|
2437
2441
|
const l = location[i] || 0;
|
|
@@ -2533,9 +2537,9 @@
|
|
|
2533
2537
|
if (parent.children.length > 1) {
|
|
2534
2538
|
return node.view;
|
|
2535
2539
|
}
|
|
2540
|
+
const sibling = parent.children[0];
|
|
2536
2541
|
if (pathToParent.length === 0) {
|
|
2537
2542
|
// parent is root
|
|
2538
|
-
const sibling = parent.children[0];
|
|
2539
2543
|
if (sibling instanceof LeafNode) {
|
|
2540
2544
|
return node.view;
|
|
2541
2545
|
}
|
|
@@ -2546,10 +2550,9 @@
|
|
|
2546
2550
|
}
|
|
2547
2551
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2548
2552
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2549
|
-
const sibling = parent.children[0];
|
|
2550
2553
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2551
2554
|
parent.removeChild(0, sizing);
|
|
2552
|
-
const sizes = grandParent.children.map((
|
|
2555
|
+
const sizes = grandParent.children.map((_size, i) => grandParent.getChildSize(i));
|
|
2553
2556
|
grandParent.removeChild(parentIndex, sizing);
|
|
2554
2557
|
if (sibling instanceof BranchNode) {
|
|
2555
2558
|
sizes.splice(parentIndex, 1, ...sibling.children.map((c) => c.size));
|
|
@@ -2593,31 +2596,6 @@
|
|
|
2593
2596
|
}
|
|
2594
2597
|
}
|
|
2595
2598
|
|
|
2596
|
-
/*! *****************************************************************************
|
|
2597
|
-
Copyright (c) Microsoft Corporation.
|
|
2598
|
-
|
|
2599
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2600
|
-
purpose with or without fee is hereby granted.
|
|
2601
|
-
|
|
2602
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2603
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2604
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2605
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2606
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2607
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2608
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2609
|
-
***************************************************************************** */
|
|
2610
|
-
|
|
2611
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2612
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2613
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2614
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2615
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2616
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2617
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2618
|
-
});
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
2599
|
class ContentContainer extends CompositeDisposable {
|
|
2622
2600
|
constructor() {
|
|
2623
2601
|
super();
|
|
@@ -2629,6 +2607,7 @@
|
|
|
2629
2607
|
this._element = document.createElement('div');
|
|
2630
2608
|
this._element.className = 'content-container';
|
|
2631
2609
|
this._element.tabIndex = -1;
|
|
2610
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2632
2611
|
// for hosted containers
|
|
2633
2612
|
// 1) register a drop target on the host
|
|
2634
2613
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2672,7 +2651,7 @@
|
|
|
2672
2651
|
}
|
|
2673
2652
|
this.disposable.value = disposable;
|
|
2674
2653
|
}
|
|
2675
|
-
layout(
|
|
2654
|
+
layout(_width, _height) {
|
|
2676
2655
|
// noop
|
|
2677
2656
|
}
|
|
2678
2657
|
closePanel() {
|
|
@@ -2695,6 +2674,41 @@
|
|
|
2695
2674
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2696
2675
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2697
2676
|
|
|
2677
|
+
class DragHandler extends CompositeDisposable {
|
|
2678
|
+
constructor(el) {
|
|
2679
|
+
super();
|
|
2680
|
+
this.el = el;
|
|
2681
|
+
this.disposable = new MutableDisposable();
|
|
2682
|
+
this._onDragStart = new Emitter();
|
|
2683
|
+
this.onDragStart = this._onDragStart.event;
|
|
2684
|
+
this.iframes = [];
|
|
2685
|
+
this.configure();
|
|
2686
|
+
}
|
|
2687
|
+
configure() {
|
|
2688
|
+
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2689
|
+
this.iframes = [
|
|
2690
|
+
...getElementsByTagName('iframe'),
|
|
2691
|
+
...getElementsByTagName('webview'),
|
|
2692
|
+
];
|
|
2693
|
+
for (const iframe of this.iframes) {
|
|
2694
|
+
iframe.style.pointerEvents = 'none';
|
|
2695
|
+
}
|
|
2696
|
+
this.el.classList.add('dragged');
|
|
2697
|
+
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2698
|
+
this.disposable.value = this.getData();
|
|
2699
|
+
if (event.dataTransfer) {
|
|
2700
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2701
|
+
}
|
|
2702
|
+
}), addDisposableListener(this.el, 'dragend', () => {
|
|
2703
|
+
for (const iframe of this.iframes) {
|
|
2704
|
+
iframe.style.pointerEvents = 'auto';
|
|
2705
|
+
}
|
|
2706
|
+
this.iframes = [];
|
|
2707
|
+
this.disposable.dispose();
|
|
2708
|
+
}));
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2698
2712
|
exports.MouseEventKind = void 0;
|
|
2699
2713
|
(function (MouseEventKind) {
|
|
2700
2714
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2704,42 +2718,34 @@
|
|
|
2704
2718
|
constructor(panelId, accessor, group) {
|
|
2705
2719
|
super();
|
|
2706
2720
|
this.panelId = panelId;
|
|
2707
|
-
this.accessor = accessor;
|
|
2708
2721
|
this.group = group;
|
|
2709
2722
|
this._onChanged = new Emitter();
|
|
2710
2723
|
this.onChanged = this._onChanged.event;
|
|
2711
2724
|
this._onDropped = new Emitter();
|
|
2712
2725
|
this.onDrop = this._onDropped.event;
|
|
2713
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2714
|
-
this.iframes = [];
|
|
2715
2726
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2716
2727
|
this._element = document.createElement('div');
|
|
2717
2728
|
this._element.className = 'tab';
|
|
2718
2729
|
this._element.tabIndex = 0;
|
|
2719
2730
|
this._element.draggable = true;
|
|
2720
|
-
this.addDisposables(
|
|
2721
|
-
|
|
2722
|
-
...
|
|
2723
|
-
|
|
2724
|
-
];
|
|
2725
|
-
for (const iframe of this.iframes) {
|
|
2726
|
-
iframe.style.pointerEvents = 'none';
|
|
2731
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2732
|
+
constructor() {
|
|
2733
|
+
super(...arguments);
|
|
2734
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2727
2735
|
}
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2736
|
+
getData() {
|
|
2737
|
+
this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
|
|
2738
|
+
return {
|
|
2739
|
+
dispose: () => {
|
|
2740
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2741
|
+
},
|
|
2742
|
+
};
|
|
2735
2743
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
iframe.style.pointerEvents = 'auto';
|
|
2744
|
+
dispose() {
|
|
2745
|
+
//
|
|
2739
2746
|
}
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2747
|
+
})(this._element));
|
|
2748
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2743
2749
|
if (event.defaultPrevented) {
|
|
2744
2750
|
return;
|
|
2745
2751
|
}
|
|
@@ -2941,12 +2947,10 @@
|
|
|
2941
2947
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2942
2948
|
return;
|
|
2943
2949
|
}
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
});
|
|
2949
|
-
break;
|
|
2950
|
+
if (event.kind === exports.MouseEventKind.CLICK) {
|
|
2951
|
+
this.group.model.openPanel(panel, {
|
|
2952
|
+
skipFocus: alreadyFocused,
|
|
2953
|
+
});
|
|
2950
2954
|
}
|
|
2951
2955
|
}), tabToAdd.onDrop((event) => {
|
|
2952
2956
|
this._onDrop.fire({
|
|
@@ -2975,7 +2979,6 @@
|
|
|
2975
2979
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2976
2980
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2977
2981
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2978
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2979
2982
|
})(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
|
|
2980
2983
|
class Groupview extends CompositeDisposable {
|
|
2981
2984
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2996,15 +2999,10 @@
|
|
|
2996
2999
|
this.onMove = this._onMove.event;
|
|
2997
3000
|
this._onDidGroupChange = new Emitter();
|
|
2998
3001
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2999
|
-
this.
|
|
3000
|
-
|
|
3001
|
-
return false;
|
|
3002
|
-
}
|
|
3003
|
-
this.doClose(panel);
|
|
3004
|
-
return true;
|
|
3005
|
-
});
|
|
3002
|
+
this._onDidDrop = new Emitter();
|
|
3003
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
3006
3004
|
this.container.classList.add('groupview');
|
|
3007
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
3005
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
3008
3006
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
3009
3007
|
tabHeight: options.tabHeight,
|
|
3010
3008
|
});
|
|
@@ -3068,6 +3066,9 @@
|
|
|
3068
3066
|
get maximumWidth() {
|
|
3069
3067
|
return Number.MAX_SAFE_INTEGER;
|
|
3070
3068
|
}
|
|
3069
|
+
get hasWatermark() {
|
|
3070
|
+
return !!(this.watermark && this.container.contains(this.watermark.element));
|
|
3071
|
+
}
|
|
3071
3072
|
initialize() {
|
|
3072
3073
|
var _a, _b;
|
|
3073
3074
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
|
|
@@ -3146,10 +3147,10 @@
|
|
|
3146
3147
|
containsPanel(panel) {
|
|
3147
3148
|
return this.panels.includes(panel);
|
|
3148
3149
|
}
|
|
3149
|
-
init(
|
|
3150
|
+
init(_params) {
|
|
3150
3151
|
//noop
|
|
3151
3152
|
}
|
|
3152
|
-
update(
|
|
3153
|
+
update(_params) {
|
|
3153
3154
|
//noop
|
|
3154
3155
|
}
|
|
3155
3156
|
focus() {
|
|
@@ -3161,6 +3162,8 @@
|
|
|
3161
3162
|
options.index > this.panels.length) {
|
|
3162
3163
|
options.index = this.panels.length;
|
|
3163
3164
|
}
|
|
3165
|
+
// ensure the group is updated before we fire any events
|
|
3166
|
+
panel.updateParentGroup(this.parent, true);
|
|
3164
3167
|
if (this._activePanel === panel) {
|
|
3165
3168
|
this.accessor.doSetGroupActive(this.parent);
|
|
3166
3169
|
return;
|
|
@@ -3181,43 +3184,19 @@
|
|
|
3181
3184
|
return this._removePanel(panelToRemove);
|
|
3182
3185
|
}
|
|
3183
3186
|
closeAllPanels() {
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
const
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
if (this._activePanel && index > -1) {
|
|
3190
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3191
|
-
console.warn('active panel not tracked');
|
|
3192
|
-
}
|
|
3193
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3194
|
-
if (!canClose) {
|
|
3195
|
-
return false;
|
|
3196
|
-
}
|
|
3197
|
-
}
|
|
3198
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3199
|
-
if (i === index) {
|
|
3200
|
-
continue;
|
|
3201
|
-
}
|
|
3202
|
-
const panel = this.panels[i];
|
|
3203
|
-
this.openPanel(panel);
|
|
3204
|
-
if (panel.close) {
|
|
3205
|
-
const canClose = yield panel.close();
|
|
3206
|
-
if (!canClose) {
|
|
3207
|
-
return false;
|
|
3208
|
-
}
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
if (this.panels.length > 0) {
|
|
3212
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3213
|
-
const arrPanelCpy = [...this.panels];
|
|
3214
|
-
yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
|
|
3187
|
+
if (this.panels.length > 0) {
|
|
3188
|
+
// take a copy since we will be edting the array as we iterate through
|
|
3189
|
+
const arrPanelCpy = [...this.panels];
|
|
3190
|
+
for (const panel of arrPanelCpy) {
|
|
3191
|
+
this.doClose(panel);
|
|
3215
3192
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3193
|
+
}
|
|
3194
|
+
else {
|
|
3195
|
+
this.accessor.removeGroup(this.parent);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
closePanel(panel) {
|
|
3199
|
+
this.doClose(panel);
|
|
3221
3200
|
}
|
|
3222
3201
|
doClose(panel) {
|
|
3223
3202
|
this.accessor.removePanel(panel);
|
|
@@ -3360,8 +3339,11 @@
|
|
|
3360
3339
|
this.tabsContainer.show();
|
|
3361
3340
|
}
|
|
3362
3341
|
}
|
|
3363
|
-
canDisplayOverlay(
|
|
3342
|
+
canDisplayOverlay(event, target) {
|
|
3364
3343
|
// custom overlay handler
|
|
3344
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3345
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3346
|
+
}
|
|
3365
3347
|
return false;
|
|
3366
3348
|
}
|
|
3367
3349
|
handleDropEvent(event, position, index) {
|
|
@@ -3386,31 +3368,23 @@
|
|
|
3386
3368
|
index,
|
|
3387
3369
|
});
|
|
3388
3370
|
}
|
|
3371
|
+
else {
|
|
3372
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3373
|
+
}
|
|
3389
3374
|
}
|
|
3390
3375
|
dispose() {
|
|
3376
|
+
var _a;
|
|
3377
|
+
super.dispose();
|
|
3378
|
+
(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
3391
3379
|
for (const panel of this.panels) {
|
|
3392
3380
|
panel.dispose();
|
|
3393
3381
|
}
|
|
3394
|
-
super.dispose();
|
|
3395
3382
|
this.dropTarget.dispose();
|
|
3396
3383
|
this.tabsContainer.dispose();
|
|
3397
3384
|
this.contentContainer.dispose();
|
|
3398
3385
|
}
|
|
3399
3386
|
}
|
|
3400
3387
|
|
|
3401
|
-
exports.GroupChangeKind = void 0;
|
|
3402
|
-
(function (GroupChangeKind) {
|
|
3403
|
-
GroupChangeKind["ADD_PANEL"] = "ADD_PANEL";
|
|
3404
|
-
GroupChangeKind["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
3405
|
-
GroupChangeKind["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
3406
|
-
//
|
|
3407
|
-
GroupChangeKind["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
3408
|
-
GroupChangeKind["ADD_GROUP"] = "ADD_GROUP";
|
|
3409
|
-
GroupChangeKind["REMOVE_GROUP"] = "REMOVE_GROUP";
|
|
3410
|
-
//
|
|
3411
|
-
GroupChangeKind["LAYOUT_FROM_JSON"] = "LAYOUT_FROM_JSON";
|
|
3412
|
-
GroupChangeKind["LAYOUT"] = "LAYOUT";
|
|
3413
|
-
})(exports.GroupChangeKind || (exports.GroupChangeKind = {}));
|
|
3414
3388
|
const nextLayoutId = sequentialNumberGenerator();
|
|
3415
3389
|
function toTarget(direction) {
|
|
3416
3390
|
switch (direction) {
|
|
@@ -3433,36 +3407,26 @@
|
|
|
3433
3407
|
this._element = _element;
|
|
3434
3408
|
this._id = nextLayoutId.next();
|
|
3435
3409
|
this._groups = new Map();
|
|
3436
|
-
//
|
|
3437
|
-
this._onGridEvent = new Emitter();
|
|
3438
|
-
this.onGridEvent = this._onGridEvent.event;
|
|
3439
3410
|
this._onDidLayoutChange = new Emitter();
|
|
3440
3411
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3412
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3413
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3414
|
+
this._onDidAddGroup = new Emitter();
|
|
3415
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3416
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3417
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3418
|
+
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3441
3419
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3442
3420
|
this.element.appendChild(this.gridview.element);
|
|
3443
|
-
|
|
3444
|
-
this.layout(0, 0, true);
|
|
3421
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3445
3422
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3446
|
-
this.
|
|
3423
|
+
this._onDidLayoutChange.fire();
|
|
3447
3424
|
}));
|
|
3448
|
-
this.addDisposables((() => {
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
exports.GroupChangeKind.REMOVE_GROUP,
|
|
3454
|
-
exports.GroupChangeKind.ADD_PANEL,
|
|
3455
|
-
exports.GroupChangeKind.REMOVE_PANEL,
|
|
3456
|
-
exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3457
|
-
exports.GroupChangeKind.PANEL_ACTIVE,
|
|
3458
|
-
exports.GroupChangeKind.LAYOUT,
|
|
3459
|
-
].includes(event.kind)) {
|
|
3460
|
-
tickDelayedEvent.fire();
|
|
3461
|
-
}
|
|
3462
|
-
}), tickDelayedEvent.onEvent(() => {
|
|
3463
|
-
this._onDidLayoutChange.fire();
|
|
3464
|
-
}), tickDelayedEvent);
|
|
3465
|
-
})());
|
|
3425
|
+
this.addDisposables(exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3426
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3427
|
+
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3428
|
+
this._onDidLayoutChange.fire();
|
|
3429
|
+
}), this._bufferOnDidLayoutChange);
|
|
3466
3430
|
}
|
|
3467
3431
|
get id() {
|
|
3468
3432
|
return this._id;
|
|
@@ -3499,14 +3463,14 @@
|
|
|
3499
3463
|
}
|
|
3500
3464
|
setVisible(panel, visible) {
|
|
3501
3465
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
3502
|
-
this.
|
|
3466
|
+
this._onDidLayoutChange.fire();
|
|
3503
3467
|
}
|
|
3504
3468
|
isVisible(panel) {
|
|
3505
3469
|
return this.gridview.isViewVisible(getGridLocation(panel.element));
|
|
3506
3470
|
}
|
|
3507
3471
|
doAddGroup(group, location = [0], size) {
|
|
3508
3472
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
3509
|
-
this.
|
|
3473
|
+
this._onDidAddGroup.fire(group);
|
|
3510
3474
|
this.doSetGroupActive(group);
|
|
3511
3475
|
}
|
|
3512
3476
|
doRemoveGroup(group, options) {
|
|
@@ -3517,9 +3481,10 @@
|
|
|
3517
3481
|
const view = this.gridview.remove(group, exports.Sizing.Distribute);
|
|
3518
3482
|
if (item && !(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
3519
3483
|
item.disposable.dispose();
|
|
3484
|
+
item.value.dispose();
|
|
3520
3485
|
this._groups.delete(group.id);
|
|
3521
3486
|
}
|
|
3522
|
-
this.
|
|
3487
|
+
this._onDidRemoveGroup.fire(group);
|
|
3523
3488
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3524
3489
|
const groups = Array.from(this._groups.values());
|
|
3525
3490
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3547,9 +3512,7 @@
|
|
|
3547
3512
|
}
|
|
3548
3513
|
}
|
|
3549
3514
|
this._activeGroup = group;
|
|
3550
|
-
this.
|
|
3551
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3552
|
-
});
|
|
3515
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3553
3516
|
}
|
|
3554
3517
|
removeGroup(group) {
|
|
3555
3518
|
this.doRemoveGroup(group);
|
|
@@ -3605,7 +3568,13 @@
|
|
|
3605
3568
|
}
|
|
3606
3569
|
dispose() {
|
|
3607
3570
|
super.dispose();
|
|
3608
|
-
this.
|
|
3571
|
+
this._onDidActiveGroupChange.dispose();
|
|
3572
|
+
this._onDidAddGroup.dispose();
|
|
3573
|
+
this._onDidRemoveGroup.dispose();
|
|
3574
|
+
this._onDidLayoutChange.dispose();
|
|
3575
|
+
for (const group of this.groups) {
|
|
3576
|
+
group.dispose();
|
|
3577
|
+
}
|
|
3609
3578
|
this.gridview.dispose();
|
|
3610
3579
|
}
|
|
3611
3580
|
}
|
|
@@ -3617,15 +3586,11 @@
|
|
|
3617
3586
|
constructor(id) {
|
|
3618
3587
|
super();
|
|
3619
3588
|
this.id = id;
|
|
3620
|
-
this._state = {};
|
|
3621
3589
|
this._isFocused = false;
|
|
3622
3590
|
this._isActive = false;
|
|
3623
3591
|
this._isVisible = true;
|
|
3624
3592
|
this._width = 0;
|
|
3625
3593
|
this._height = 0;
|
|
3626
|
-
this._onDidStateChange = new Emitter();
|
|
3627
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3628
|
-
//
|
|
3629
3594
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3630
3595
|
replay: true,
|
|
3631
3596
|
});
|
|
@@ -3654,7 +3619,7 @@
|
|
|
3654
3619
|
//
|
|
3655
3620
|
this._onActiveChange = new Emitter();
|
|
3656
3621
|
this.onActiveChange = this._onActiveChange.event;
|
|
3657
|
-
this.addDisposables(this.
|
|
3622
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3658
3623
|
this._isFocused = event.isFocused;
|
|
3659
3624
|
}), this.onDidActiveChange((event) => {
|
|
3660
3625
|
this._isActive = event.isActive;
|
|
@@ -3687,21 +3652,6 @@
|
|
|
3687
3652
|
setActive() {
|
|
3688
3653
|
this._onActiveChange.fire();
|
|
3689
3654
|
}
|
|
3690
|
-
setState(key, value) {
|
|
3691
|
-
if (typeof key === 'object') {
|
|
3692
|
-
this._state = key;
|
|
3693
|
-
}
|
|
3694
|
-
else if (typeof value !== undefined) {
|
|
3695
|
-
this._state[key] = value;
|
|
3696
|
-
}
|
|
3697
|
-
this._onDidStateChange.fire(undefined);
|
|
3698
|
-
}
|
|
3699
|
-
getState() {
|
|
3700
|
-
return this._state;
|
|
3701
|
-
}
|
|
3702
|
-
getStateKey(key) {
|
|
3703
|
-
return this._state[key];
|
|
3704
|
-
}
|
|
3705
3655
|
dispose() {
|
|
3706
3656
|
super.dispose();
|
|
3707
3657
|
}
|
|
@@ -3721,6 +3671,7 @@
|
|
|
3721
3671
|
//
|
|
3722
3672
|
this._onDidSizeChange = new Emitter();
|
|
3723
3673
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3674
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3724
3675
|
}
|
|
3725
3676
|
setConstraints(value) {
|
|
3726
3677
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3734,19 +3685,19 @@
|
|
|
3734
3685
|
constructor(panel, group) {
|
|
3735
3686
|
super(panel.id);
|
|
3736
3687
|
this.panel = panel;
|
|
3737
|
-
this._onDidDirtyChange = new Emitter();
|
|
3738
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3739
3688
|
this._onDidTitleChange = new Emitter();
|
|
3740
3689
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3741
3690
|
this._titleChanged = new Emitter();
|
|
3742
3691
|
this.titleChanged = this._titleChanged.event;
|
|
3743
3692
|
this._suppressClosableChanged = new Emitter();
|
|
3744
3693
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3745
|
-
this.
|
|
3746
|
-
this.
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3694
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3695
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3696
|
+
this._onDidGroupChange = new Emitter();
|
|
3697
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3698
|
+
this.disposable = new MutableDisposable();
|
|
3699
|
+
this.group = group;
|
|
3700
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3750
3701
|
}
|
|
3751
3702
|
get title() {
|
|
3752
3703
|
return this.panel.title;
|
|
@@ -3759,7 +3710,17 @@
|
|
|
3759
3710
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3760
3711
|
}
|
|
3761
3712
|
set group(value) {
|
|
3713
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3762
3714
|
this._group = value;
|
|
3715
|
+
this._onDidGroupChange.fire();
|
|
3716
|
+
if (this._group) {
|
|
3717
|
+
this.disposable.value = this._group.api.onDidActiveChange(() => {
|
|
3718
|
+
this._onDidActiveGroupChange.fire();
|
|
3719
|
+
});
|
|
3720
|
+
if (this.isGroupActive !== isOldGroupActive) {
|
|
3721
|
+
this._onDidActiveGroupChange.fire();
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3763
3724
|
}
|
|
3764
3725
|
get group() {
|
|
3765
3726
|
return this._group;
|
|
@@ -3773,16 +3734,10 @@
|
|
|
3773
3734
|
}
|
|
3774
3735
|
return this.group.model.closePanel(this.panel);
|
|
3775
3736
|
}
|
|
3776
|
-
interceptOnCloseAction(interceptor) {
|
|
3777
|
-
this._interceptor = interceptor;
|
|
3778
|
-
}
|
|
3779
|
-
dispose() {
|
|
3780
|
-
super.dispose();
|
|
3781
|
-
}
|
|
3782
3737
|
}
|
|
3783
3738
|
|
|
3784
3739
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3785
|
-
constructor(id, containerApi) {
|
|
3740
|
+
constructor(id, accessor, containerApi) {
|
|
3786
3741
|
super();
|
|
3787
3742
|
this.id = id;
|
|
3788
3743
|
this.containerApi = containerApi;
|
|
@@ -3790,14 +3745,17 @@
|
|
|
3790
3745
|
this._suppressClosable = false;
|
|
3791
3746
|
this._title = '';
|
|
3792
3747
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3793
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3794
3748
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3795
|
-
|
|
3749
|
+
accessor.setActivePanel(this);
|
|
3796
3750
|
}), this.api.onDidTitleChange((event) => {
|
|
3797
3751
|
const title = event.title;
|
|
3798
3752
|
this.update({ params: { title } });
|
|
3799
3753
|
}));
|
|
3800
3754
|
}
|
|
3755
|
+
get params() {
|
|
3756
|
+
var _a;
|
|
3757
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
3758
|
+
}
|
|
3801
3759
|
get title() {
|
|
3802
3760
|
return this._title;
|
|
3803
3761
|
}
|
|
@@ -3816,32 +3774,18 @@
|
|
|
3816
3774
|
this._view = params.view;
|
|
3817
3775
|
this.setTitle(params.title);
|
|
3818
3776
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3819
|
-
if (params.state) {
|
|
3820
|
-
this.api.setState(params.state);
|
|
3821
|
-
}
|
|
3822
3777
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3823
3778
|
}
|
|
3824
3779
|
focus() {
|
|
3825
3780
|
this.api._onFocusEvent.fire();
|
|
3826
3781
|
}
|
|
3827
|
-
setDirty(isDirty) {
|
|
3828
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3829
|
-
}
|
|
3830
|
-
close() {
|
|
3831
|
-
if (this.api.tryClose) {
|
|
3832
|
-
return this.api.tryClose();
|
|
3833
|
-
}
|
|
3834
|
-
return Promise.resolve(true);
|
|
3835
|
-
}
|
|
3836
3782
|
toJSON() {
|
|
3837
|
-
const state = this.api.getState();
|
|
3838
3783
|
return {
|
|
3839
3784
|
id: this.id,
|
|
3840
3785
|
view: this.view.toJSON(),
|
|
3841
3786
|
params: Object.keys(this._params || {}).length > 0
|
|
3842
3787
|
? this._params
|
|
3843
3788
|
: undefined,
|
|
3844
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3845
3789
|
suppressClosable: this.suppressClosable || undefined,
|
|
3846
3790
|
title: this.title,
|
|
3847
3791
|
};
|
|
@@ -3886,18 +3830,6 @@
|
|
|
3886
3830
|
var _a;
|
|
3887
3831
|
this._group = group;
|
|
3888
3832
|
this.api.group = group;
|
|
3889
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3890
|
-
var _a;
|
|
3891
|
-
if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
|
|
3892
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3893
|
-
this.api._onDidActiveChange.fire({
|
|
3894
|
-
isActive: isGroupActive && isVisible,
|
|
3895
|
-
});
|
|
3896
|
-
this.api._onDidVisibilityChange.fire({
|
|
3897
|
-
isVisible,
|
|
3898
|
-
});
|
|
3899
|
-
}
|
|
3900
|
-
});
|
|
3901
3833
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3902
3834
|
this.api._onDidActiveChange.fire({
|
|
3903
3835
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -3972,7 +3904,7 @@
|
|
|
3972
3904
|
get id() {
|
|
3973
3905
|
return 'watermark';
|
|
3974
3906
|
}
|
|
3975
|
-
update(
|
|
3907
|
+
update(_event) {
|
|
3976
3908
|
// noop
|
|
3977
3909
|
}
|
|
3978
3910
|
focus() {
|
|
@@ -3981,17 +3913,17 @@
|
|
|
3981
3913
|
toJSON() {
|
|
3982
3914
|
return {};
|
|
3983
3915
|
}
|
|
3984
|
-
layout(
|
|
3916
|
+
layout(_width, _height) {
|
|
3985
3917
|
// noop
|
|
3986
3918
|
}
|
|
3987
3919
|
init(params) {
|
|
3988
3920
|
this.params = params;
|
|
3989
|
-
this.addDisposables(this.params.containerApi.onDidLayoutChange((
|
|
3921
|
+
this.addDisposables(this.params.containerApi.onDidLayoutChange(() => {
|
|
3990
3922
|
this.render();
|
|
3991
3923
|
}));
|
|
3992
3924
|
this.render();
|
|
3993
3925
|
}
|
|
3994
|
-
updateParentGroup(group,
|
|
3926
|
+
updateParentGroup(group, _visible) {
|
|
3995
3927
|
this.group = group;
|
|
3996
3928
|
this.render();
|
|
3997
3929
|
}
|
|
@@ -4007,15 +3939,6 @@
|
|
|
4007
3939
|
}
|
|
4008
3940
|
}
|
|
4009
3941
|
|
|
4010
|
-
function debounce(cb, wait) {
|
|
4011
|
-
let timeout;
|
|
4012
|
-
const callable = (...args) => {
|
|
4013
|
-
clearTimeout(timeout);
|
|
4014
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
4015
|
-
};
|
|
4016
|
-
return callable;
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
3942
|
class DefaultDeserializer {
|
|
4020
3943
|
constructor(layout, panelDeserializer) {
|
|
4021
3944
|
this.layout = layout;
|
|
@@ -4116,9 +4039,6 @@
|
|
|
4116
4039
|
this._isGroupActive = false;
|
|
4117
4040
|
//
|
|
4118
4041
|
this.params = {};
|
|
4119
|
-
//
|
|
4120
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4121
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4122
4042
|
this._element = document.createElement('div');
|
|
4123
4043
|
this._element.className = 'default-tab';
|
|
4124
4044
|
//
|
|
@@ -4163,10 +4083,6 @@
|
|
|
4163
4083
|
init(params) {
|
|
4164
4084
|
this.params = params;
|
|
4165
4085
|
this._content.textContent = params.title;
|
|
4166
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4167
|
-
const isDirty = event;
|
|
4168
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4169
|
-
});
|
|
4170
4086
|
if (!this.params.suppressClosable) {
|
|
4171
4087
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4172
4088
|
ev.preventDefault(); //
|
|
@@ -4182,7 +4098,7 @@
|
|
|
4182
4098
|
this._isGroupActive = group.isActive;
|
|
4183
4099
|
this.render();
|
|
4184
4100
|
}
|
|
4185
|
-
layout(
|
|
4101
|
+
layout(_width, _height) {
|
|
4186
4102
|
// noop
|
|
4187
4103
|
}
|
|
4188
4104
|
render() {
|
|
@@ -4220,6 +4136,10 @@
|
|
|
4220
4136
|
get height() {
|
|
4221
4137
|
return this._height;
|
|
4222
4138
|
}
|
|
4139
|
+
get params() {
|
|
4140
|
+
var _a;
|
|
4141
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4142
|
+
}
|
|
4223
4143
|
focus() {
|
|
4224
4144
|
this.api._onFocusEvent.fire();
|
|
4225
4145
|
}
|
|
@@ -4228,34 +4148,34 @@
|
|
|
4228
4148
|
this._height = height;
|
|
4229
4149
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4230
4150
|
if (this.part) {
|
|
4231
|
-
if (this.
|
|
4232
|
-
this.part.update(this.
|
|
4151
|
+
if (this._params) {
|
|
4152
|
+
this.part.update(this._params.params);
|
|
4233
4153
|
}
|
|
4234
4154
|
}
|
|
4235
4155
|
}
|
|
4236
4156
|
init(parameters) {
|
|
4237
|
-
this.
|
|
4157
|
+
this._params = parameters;
|
|
4238
4158
|
this.part = this.getComponent();
|
|
4239
4159
|
}
|
|
4240
4160
|
update(event) {
|
|
4241
4161
|
var _a, _b;
|
|
4242
|
-
this.
|
|
4243
|
-
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.
|
|
4162
|
+
this._params = Object.assign(Object.assign({}, this._params), { params: Object.assign(Object.assign({}, (_a = this._params) === null || _a === void 0 ? void 0 : _a.params), event.params) });
|
|
4163
|
+
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
|
|
4244
4164
|
}
|
|
4245
4165
|
toJSON() {
|
|
4246
4166
|
var _a, _b;
|
|
4247
|
-
const
|
|
4248
|
-
const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4167
|
+
const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4249
4168
|
return {
|
|
4250
4169
|
id: this.id,
|
|
4251
4170
|
component: this.component,
|
|
4252
4171
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4253
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4254
4172
|
};
|
|
4255
4173
|
}
|
|
4256
4174
|
dispose() {
|
|
4175
|
+
var _a;
|
|
4257
4176
|
super.dispose();
|
|
4258
4177
|
this.api.dispose();
|
|
4178
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
4259
4179
|
}
|
|
4260
4180
|
}
|
|
4261
4181
|
|
|
@@ -4273,12 +4193,12 @@
|
|
|
4273
4193
|
this._snap = false;
|
|
4274
4194
|
this._onDidChange = new Emitter();
|
|
4275
4195
|
this.onDidChange = this._onDidChange.event;
|
|
4276
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4196
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4277
4197
|
const { isVisible } = event;
|
|
4278
|
-
const { containerApi } = this.
|
|
4198
|
+
const { containerApi } = this._params;
|
|
4279
4199
|
containerApi.setVisible(this, isVisible);
|
|
4280
4200
|
}), this.api.onActiveChange(() => {
|
|
4281
|
-
const { containerApi } = this.
|
|
4201
|
+
const { containerApi } = this._params;
|
|
4282
4202
|
containerApi.setActive(this);
|
|
4283
4203
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4284
4204
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4393,9 +4313,6 @@
|
|
|
4393
4313
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4394
4314
|
return Object.assign(Object.assign({}, state), { minimumHeight: minimum(this.minimumHeight), maximumHeight: maximum(this.maximumHeight), minimumWidth: minimum(this.minimumWidth), maximumWidth: maximum(this.maximumWidth), snap: this.snap, priority: this.priority });
|
|
4395
4315
|
}
|
|
4396
|
-
dispose() {
|
|
4397
|
-
super.dispose();
|
|
4398
|
-
}
|
|
4399
4316
|
}
|
|
4400
4317
|
|
|
4401
4318
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4502,15 +4419,24 @@
|
|
|
4502
4419
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4503
4420
|
styles: options.styles,
|
|
4504
4421
|
});
|
|
4505
|
-
this._panels = new Map();
|
|
4506
|
-
this.dirtyPanels = new Set();
|
|
4507
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4508
4422
|
// events
|
|
4509
4423
|
this._onTabInteractionEvent = new Emitter();
|
|
4510
4424
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4511
4425
|
this._onTabContextMenu = new Emitter();
|
|
4512
4426
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4513
|
-
this.
|
|
4427
|
+
this._onDidDrop = new Emitter();
|
|
4428
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
4429
|
+
this._onDidRemovePanel = new Emitter();
|
|
4430
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4431
|
+
this._onDidAddPanel = new Emitter();
|
|
4432
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4433
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4434
|
+
this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
|
|
4435
|
+
this._onDidActivePanelChange = new Emitter();
|
|
4436
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4437
|
+
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop, exports.Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
4438
|
+
this._bufferOnDidLayoutChange.fire();
|
|
4439
|
+
}));
|
|
4514
4440
|
this._options = options;
|
|
4515
4441
|
if (!this.options.components) {
|
|
4516
4442
|
this.options.components = {};
|
|
@@ -4531,10 +4457,10 @@
|
|
|
4531
4457
|
this._api = new DockviewApi(this);
|
|
4532
4458
|
}
|
|
4533
4459
|
get totalPanels() {
|
|
4534
|
-
return this.
|
|
4460
|
+
return this.panels.length;
|
|
4535
4461
|
}
|
|
4536
4462
|
get panels() {
|
|
4537
|
-
return
|
|
4463
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4538
4464
|
}
|
|
4539
4465
|
get deserializer() {
|
|
4540
4466
|
return this._deserializer;
|
|
@@ -4564,10 +4490,6 @@
|
|
|
4564
4490
|
updateOptions(options) {
|
|
4565
4491
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4566
4492
|
this.options.orientation !== options.orientation;
|
|
4567
|
-
// TODO support style update
|
|
4568
|
-
// const hasStylesChanged =
|
|
4569
|
-
// typeof options.styles === 'object' &&
|
|
4570
|
-
// this.options.styles !== options.styles;
|
|
4571
4493
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4572
4494
|
if (hasOrientationChanged) {
|
|
4573
4495
|
this.gridview.orientation = options.orientation;
|
|
@@ -4579,8 +4501,7 @@
|
|
|
4579
4501
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4580
4502
|
}
|
|
4581
4503
|
getGroupPanel(id) {
|
|
4582
|
-
|
|
4583
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4504
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4584
4505
|
}
|
|
4585
4506
|
setActivePanel(panel) {
|
|
4586
4507
|
if (!panel.group) {
|
|
@@ -4629,24 +4550,6 @@
|
|
|
4629
4550
|
this.doSetGroupActive(next);
|
|
4630
4551
|
}
|
|
4631
4552
|
}
|
|
4632
|
-
registerPanel(panel) {
|
|
4633
|
-
if (this._panels.has(panel.id)) {
|
|
4634
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4635
|
-
}
|
|
4636
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4637
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4638
|
-
}
|
|
4639
|
-
unregisterPanel(panel) {
|
|
4640
|
-
if (!this._panels.has(panel.id)) {
|
|
4641
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4642
|
-
}
|
|
4643
|
-
const item = this._panels.get(panel.id);
|
|
4644
|
-
if (item) {
|
|
4645
|
-
item.disposable.dispose();
|
|
4646
|
-
item.value.dispose();
|
|
4647
|
-
}
|
|
4648
|
-
this._panels.delete(panel.id);
|
|
4649
|
-
}
|
|
4650
4553
|
/**
|
|
4651
4554
|
* Serialize the current state of the layout
|
|
4652
4555
|
*
|
|
@@ -4654,12 +4557,9 @@
|
|
|
4654
4557
|
*/
|
|
4655
4558
|
toJSON() {
|
|
4656
4559
|
var _a;
|
|
4657
|
-
this.syncConfigs();
|
|
4658
4560
|
const data = this.gridview.serialize();
|
|
4659
|
-
const panels =
|
|
4660
|
-
|
|
4661
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4662
|
-
}
|
|
4561
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4562
|
+
collection[panel.id] = panel.toJSON();
|
|
4663
4563
|
return collection;
|
|
4664
4564
|
}, {});
|
|
4665
4565
|
return {
|
|
@@ -4670,13 +4570,12 @@
|
|
|
4670
4570
|
};
|
|
4671
4571
|
}
|
|
4672
4572
|
fromJSON(data) {
|
|
4573
|
+
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
4574
|
+
for (const group of groups) {
|
|
4575
|
+
// remove the group will automatically remove the panels
|
|
4576
|
+
this.removeGroup(group, true);
|
|
4577
|
+
}
|
|
4673
4578
|
this.gridview.clear();
|
|
4674
|
-
this._panels.forEach((panel) => {
|
|
4675
|
-
panel.disposable.dispose();
|
|
4676
|
-
panel.value.dispose();
|
|
4677
|
-
});
|
|
4678
|
-
this._panels.clear();
|
|
4679
|
-
this._groups.clear();
|
|
4680
4579
|
if (!this.deserializer) {
|
|
4681
4580
|
throw new Error('invalid deserializer');
|
|
4682
4581
|
}
|
|
@@ -4690,9 +4589,7 @@
|
|
|
4690
4589
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4691
4590
|
createPanel: (id) => {
|
|
4692
4591
|
const panelData = panels[id];
|
|
4693
|
-
|
|
4694
|
-
this.registerPanel(panel);
|
|
4695
|
-
return panel;
|
|
4592
|
+
return this.deserializer.fromJSON(panelData);
|
|
4696
4593
|
},
|
|
4697
4594
|
}));
|
|
4698
4595
|
if (typeof activeGroup === 'string') {
|
|
@@ -4702,36 +4599,31 @@
|
|
|
4702
4599
|
}
|
|
4703
4600
|
}
|
|
4704
4601
|
this.gridview.layout(this.width, this.height);
|
|
4705
|
-
this.
|
|
4602
|
+
this._onDidLayoutfromJSON.fire();
|
|
4706
4603
|
}
|
|
4707
4604
|
closeAllGroups() {
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
if (!didCloseAll) {
|
|
4713
|
-
return false;
|
|
4714
|
-
}
|
|
4715
|
-
}
|
|
4716
|
-
return true;
|
|
4717
|
-
});
|
|
4605
|
+
for (const entry of this._groups.entries()) {
|
|
4606
|
+
const [_, group] = entry;
|
|
4607
|
+
group.value.model.closeAllPanels();
|
|
4608
|
+
}
|
|
4718
4609
|
}
|
|
4719
4610
|
fireMouseEvent(event) {
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
}
|
|
4729
|
-
break;
|
|
4611
|
+
if (event.kind === exports.MouseEventKind.CONTEXT_MENU) {
|
|
4612
|
+
if (event.tab && event.panel) {
|
|
4613
|
+
this._onTabContextMenu.fire({
|
|
4614
|
+
event: event.event,
|
|
4615
|
+
api: this._api,
|
|
4616
|
+
panel: event.panel,
|
|
4617
|
+
});
|
|
4618
|
+
}
|
|
4730
4619
|
}
|
|
4731
4620
|
}
|
|
4732
4621
|
addPanel(options) {
|
|
4733
4622
|
var _a, _b;
|
|
4734
|
-
|
|
4623
|
+
if (this.panels.find((_) => _.id === options.id)) {
|
|
4624
|
+
throw new Error(`panel with id ${options.id} already exists`);
|
|
4625
|
+
}
|
|
4626
|
+
const panel = this.createPanel(options);
|
|
4735
4627
|
let referenceGroup;
|
|
4736
4628
|
if ((_a = options.position) === null || _a === void 0 ? void 0 : _a.referencePanel) {
|
|
4737
4629
|
const referencePanel = this.getGroupPanel(options.position.referencePanel);
|
|
@@ -4759,14 +4651,20 @@
|
|
|
4759
4651
|
}
|
|
4760
4652
|
return panel;
|
|
4761
4653
|
}
|
|
4762
|
-
removePanel(panel
|
|
4763
|
-
|
|
4654
|
+
removePanel(panel, options = {
|
|
4655
|
+
removeEmptyGroup: true,
|
|
4656
|
+
skipDispose: false,
|
|
4657
|
+
}) {
|
|
4764
4658
|
const group = panel.group;
|
|
4765
4659
|
if (!group) {
|
|
4766
4660
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
4767
4661
|
}
|
|
4768
4662
|
group.model.removePanel(panel);
|
|
4769
|
-
|
|
4663
|
+
panel.dispose();
|
|
4664
|
+
const retainGroupForWatermark = this.size === 1;
|
|
4665
|
+
if (!retainGroupForWatermark &&
|
|
4666
|
+
group.model.size === 0 &&
|
|
4667
|
+
options.removeEmptyGroup) {
|
|
4770
4668
|
this.removeGroup(group);
|
|
4771
4669
|
}
|
|
4772
4670
|
}
|
|
@@ -4779,10 +4677,9 @@
|
|
|
4779
4677
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4780
4678
|
}
|
|
4781
4679
|
addEmptyGroup(options) {
|
|
4782
|
-
var _a;
|
|
4783
4680
|
const group = this.createGroup();
|
|
4784
4681
|
if (options) {
|
|
4785
|
-
const referencePanel =
|
|
4682
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4786
4683
|
if (!referencePanel) {
|
|
4787
4684
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4788
4685
|
}
|
|
@@ -4799,25 +4696,24 @@
|
|
|
4799
4696
|
this.doAddGroup(group);
|
|
4800
4697
|
}
|
|
4801
4698
|
}
|
|
4802
|
-
removeGroup(group) {
|
|
4699
|
+
removeGroup(group, skipActive = false) {
|
|
4803
4700
|
const panels = [...group.model.panels]; // reassign since group panels will mutate
|
|
4804
|
-
|
|
4805
|
-
this.removePanel(panel
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
return;
|
|
4701
|
+
for (const panel of panels) {
|
|
4702
|
+
this.removePanel(panel, {
|
|
4703
|
+
removeEmptyGroup: false,
|
|
4704
|
+
skipDispose: false,
|
|
4705
|
+
});
|
|
4810
4706
|
}
|
|
4811
|
-
super.
|
|
4707
|
+
super.doRemoveGroup(group, { skipActive });
|
|
4812
4708
|
}
|
|
4813
4709
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4814
|
-
var _a
|
|
4710
|
+
var _a;
|
|
4815
4711
|
const sourceGroup = groupId
|
|
4816
4712
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4817
4713
|
: undefined;
|
|
4818
4714
|
if (!target || target === exports.Position.Center) {
|
|
4819
4715
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4820
|
-
|
|
4716
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4821
4717
|
if (!groupItem) {
|
|
4822
4718
|
throw new Error(`No panel with id ${itemId}`);
|
|
4823
4719
|
}
|
|
@@ -4853,7 +4749,7 @@
|
|
|
4853
4749
|
}
|
|
4854
4750
|
else {
|
|
4855
4751
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4856
|
-
|
|
4752
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4857
4753
|
if (!groupItem) {
|
|
4858
4754
|
throw new Error(`No panel with id ${itemId}`);
|
|
4859
4755
|
}
|
|
@@ -4867,10 +4763,7 @@
|
|
|
4867
4763
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4868
4764
|
super.doSetGroupActive(group, skipFocus);
|
|
4869
4765
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
4870
|
-
this.
|
|
4871
|
-
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4872
|
-
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4873
|
-
});
|
|
4766
|
+
this._onDidActivePanelChange.fire((_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel);
|
|
4874
4767
|
}
|
|
4875
4768
|
}
|
|
4876
4769
|
createGroup(options) {
|
|
@@ -4892,35 +4785,27 @@
|
|
|
4892
4785
|
}
|
|
4893
4786
|
}
|
|
4894
4787
|
const view = new GroupviewPanel(this, id, options);
|
|
4788
|
+
view.init({ params: {}, containerApi: null }); // required to initialized .part and allow for correct disposal of group
|
|
4895
4789
|
if (!this._groups.has(view.id)) {
|
|
4896
4790
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4897
4791
|
const { groupId, itemId, target, index } = event;
|
|
4898
4792
|
this.moveGroupOrPanel(view, groupId, itemId, target, index);
|
|
4793
|
+
}), view.model.onDidDrop((event) => {
|
|
4794
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
|
|
4899
4795
|
}), view.model.onDidGroupChange((event) => {
|
|
4900
4796
|
switch (event.kind) {
|
|
4901
4797
|
case exports.GroupChangeKind2.ADD_PANEL:
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
});
|
|
4906
|
-
break;
|
|
4907
|
-
case exports.GroupChangeKind2.GROUP_ACTIVE:
|
|
4908
|
-
this._onGridEvent.fire({
|
|
4909
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
4910
|
-
panel: event.panel,
|
|
4911
|
-
});
|
|
4798
|
+
if (event.panel) {
|
|
4799
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4800
|
+
}
|
|
4912
4801
|
break;
|
|
4913
4802
|
case exports.GroupChangeKind2.REMOVE_PANEL:
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
});
|
|
4803
|
+
if (event.panel) {
|
|
4804
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4805
|
+
}
|
|
4918
4806
|
break;
|
|
4919
4807
|
case exports.GroupChangeKind2.PANEL_ACTIVE:
|
|
4920
|
-
this.
|
|
4921
|
-
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4922
|
-
panel: event.panel,
|
|
4923
|
-
});
|
|
4808
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4924
4809
|
break;
|
|
4925
4810
|
}
|
|
4926
4811
|
}));
|
|
@@ -4934,44 +4819,18 @@
|
|
|
4934
4819
|
}
|
|
4935
4820
|
return view;
|
|
4936
4821
|
}
|
|
4937
|
-
|
|
4938
|
-
super.dispose();
|
|
4939
|
-
this._onGridEvent.dispose();
|
|
4940
|
-
}
|
|
4941
|
-
/**
|
|
4942
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4943
|
-
*/
|
|
4944
|
-
syncConfigs() {
|
|
4945
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4946
|
-
if (dirtyPanels.length === 0) ;
|
|
4947
|
-
this.dirtyPanels.clear();
|
|
4948
|
-
const partialPanelState = dirtyPanels
|
|
4949
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4950
|
-
.filter((_) => !!_)
|
|
4951
|
-
.reduce((collection, panel) => {
|
|
4952
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4953
|
-
return collection;
|
|
4954
|
-
}, {});
|
|
4955
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4956
|
-
dirtyPanels
|
|
4957
|
-
.filter((p) => this._panels.has(p.id))
|
|
4958
|
-
.forEach((panel) => {
|
|
4959
|
-
panel.setDirty(false);
|
|
4960
|
-
});
|
|
4961
|
-
}
|
|
4962
|
-
_addPanel(options) {
|
|
4822
|
+
createPanel(options) {
|
|
4963
4823
|
const view = new DefaultGroupPanelView({
|
|
4964
4824
|
content: this.createContentComponent(options.id, options.component),
|
|
4965
4825
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4966
4826
|
});
|
|
4967
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4827
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4968
4828
|
panel.init({
|
|
4969
4829
|
view,
|
|
4970
4830
|
title: options.title || options.id,
|
|
4971
4831
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4972
4832
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4973
4833
|
});
|
|
4974
|
-
this.registerPanel(panel);
|
|
4975
4834
|
return panel;
|
|
4976
4835
|
}
|
|
4977
4836
|
createContentComponent(id, componentName) {
|
|
@@ -4991,10 +4850,12 @@
|
|
|
4991
4850
|
var _a;
|
|
4992
4851
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4993
4852
|
}
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
this.
|
|
4853
|
+
dispose() {
|
|
4854
|
+
super.dispose();
|
|
4855
|
+
this._onDidActivePanelChange.dispose();
|
|
4856
|
+
this._onDidAddPanel.dispose();
|
|
4857
|
+
this._onDidRemovePanel.dispose();
|
|
4858
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4998
4859
|
}
|
|
4999
4860
|
}
|
|
5000
4861
|
|
|
@@ -5005,6 +4866,8 @@
|
|
|
5005
4866
|
orientation: options.orientation,
|
|
5006
4867
|
styles: options.styles,
|
|
5007
4868
|
});
|
|
4869
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4870
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5008
4871
|
this._options = options;
|
|
5009
4872
|
if (!this.options.components) {
|
|
5010
4873
|
this.options.components = {};
|
|
@@ -5057,7 +4920,7 @@
|
|
|
5057
4920
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
5058
4921
|
}
|
|
5059
4922
|
setActive(panel) {
|
|
5060
|
-
this._groups.forEach((value,
|
|
4923
|
+
this._groups.forEach((value, _key) => {
|
|
5061
4924
|
value.value.setActive(panel === value.value);
|
|
5062
4925
|
});
|
|
5063
4926
|
}
|
|
@@ -5070,8 +4933,12 @@
|
|
|
5070
4933
|
}
|
|
5071
4934
|
fromJSON(serializedGridview, deferComponentLayout) {
|
|
5072
4935
|
const { grid, activePanel } = serializedGridview;
|
|
4936
|
+
const groups = Array.from(this._groups.values()); // reassign since group panels will mutate
|
|
4937
|
+
for (const group of groups) {
|
|
4938
|
+
group.disposable.dispose();
|
|
4939
|
+
this.doRemoveGroup(group.value, { skipActive: true });
|
|
4940
|
+
}
|
|
5073
4941
|
this.gridview.clear();
|
|
5074
|
-
this._groups.clear();
|
|
5075
4942
|
const queue = [];
|
|
5076
4943
|
this.gridview.deserialize(grid, {
|
|
5077
4944
|
fromJSON: (node) => {
|
|
@@ -5112,7 +4979,7 @@
|
|
|
5112
4979
|
this.doSetGroupActive(panel);
|
|
5113
4980
|
}
|
|
5114
4981
|
}
|
|
5115
|
-
this.
|
|
4982
|
+
this._onDidLayoutfromJSON.fire();
|
|
5116
4983
|
}
|
|
5117
4984
|
movePanel(panel, options) {
|
|
5118
4985
|
var _a;
|
|
@@ -5168,7 +5035,6 @@
|
|
|
5168
5035
|
});
|
|
5169
5036
|
this.registerPanel(view);
|
|
5170
5037
|
this.doAddGroup(view, relativeLocation, options.size);
|
|
5171
|
-
return { api: view.api };
|
|
5172
5038
|
}
|
|
5173
5039
|
registerPanel(panel) {
|
|
5174
5040
|
const disposable = new CompositeDisposable(panel.api.onDidFocusChange((event) => {
|
|
@@ -5219,14 +5085,10 @@
|
|
|
5219
5085
|
}
|
|
5220
5086
|
removeGroup(group) {
|
|
5221
5087
|
super.removeGroup(group);
|
|
5222
|
-
const panel = this._groups.get(group.id);
|
|
5223
|
-
if (panel) {
|
|
5224
|
-
panel.disposable.dispose();
|
|
5225
|
-
this._groups.delete(group.id);
|
|
5226
|
-
}
|
|
5227
5088
|
}
|
|
5228
5089
|
dispose() {
|
|
5229
5090
|
super.dispose();
|
|
5091
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5230
5092
|
}
|
|
5231
5093
|
}
|
|
5232
5094
|
|
|
@@ -5253,7 +5115,7 @@
|
|
|
5253
5115
|
options.frameworkComponents = {};
|
|
5254
5116
|
}
|
|
5255
5117
|
this.splitview = new Splitview(this.element, options);
|
|
5256
|
-
this.addDisposables(this._disposable);
|
|
5118
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5257
5119
|
}
|
|
5258
5120
|
get options() {
|
|
5259
5121
|
return this._options;
|
|
@@ -5329,7 +5191,11 @@
|
|
|
5329
5191
|
}
|
|
5330
5192
|
removePanel(panel, sizing) {
|
|
5331
5193
|
const disposable = this.panels.get(panel.id);
|
|
5332
|
-
|
|
5194
|
+
if (!disposable) {
|
|
5195
|
+
throw new Error(`unknown splitview panel ${panel.id}`);
|
|
5196
|
+
}
|
|
5197
|
+
disposable.disposable.dispose();
|
|
5198
|
+
disposable.value.dispose();
|
|
5333
5199
|
this.panels.delete(panel.id);
|
|
5334
5200
|
const index = this.getPanels().findIndex((_) => _ === panel);
|
|
5335
5201
|
this.splitview.removeView(index, sizing);
|
|
@@ -5388,7 +5254,7 @@
|
|
|
5388
5254
|
}
|
|
5389
5255
|
this.setActive(view, true);
|
|
5390
5256
|
});
|
|
5391
|
-
this.panels.set(view.id, disposable);
|
|
5257
|
+
this.panels.set(view.id, { disposable, value: view });
|
|
5392
5258
|
}
|
|
5393
5259
|
toJSON() {
|
|
5394
5260
|
var _a;
|
|
@@ -5412,6 +5278,11 @@
|
|
|
5412
5278
|
}
|
|
5413
5279
|
fromJSON(serializedSplitview, deferComponentLayout = false) {
|
|
5414
5280
|
const { views, orientation, size, activeView } = serializedSplitview;
|
|
5281
|
+
for (const [_, value] of this.panels.entries()) {
|
|
5282
|
+
value.disposable.dispose();
|
|
5283
|
+
value.value.dispose();
|
|
5284
|
+
}
|
|
5285
|
+
this.panels.clear();
|
|
5415
5286
|
this.splitview.dispose();
|
|
5416
5287
|
const queue = [];
|
|
5417
5288
|
this.splitview = new Splitview(this.element, {
|
|
@@ -5467,49 +5338,16 @@
|
|
|
5467
5338
|
}
|
|
5468
5339
|
}
|
|
5469
5340
|
dispose() {
|
|
5470
|
-
|
|
5471
|
-
value.dispose();
|
|
5472
|
-
|
|
5341
|
+
for (const [_, value] of this.panels.entries()) {
|
|
5342
|
+
value.disposable.dispose();
|
|
5343
|
+
value.value.dispose();
|
|
5344
|
+
}
|
|
5473
5345
|
this.panels.clear();
|
|
5346
|
+
this.splitview.dispose();
|
|
5474
5347
|
super.dispose();
|
|
5475
5348
|
}
|
|
5476
5349
|
}
|
|
5477
5350
|
|
|
5478
|
-
class DragHandler extends CompositeDisposable {
|
|
5479
|
-
constructor(el) {
|
|
5480
|
-
super();
|
|
5481
|
-
this.el = el;
|
|
5482
|
-
this.iframes = [];
|
|
5483
|
-
this._onDragStart = new Emitter();
|
|
5484
|
-
this.onDragStart = this._onDragStart.event;
|
|
5485
|
-
this.configure();
|
|
5486
|
-
}
|
|
5487
|
-
configure() {
|
|
5488
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5489
|
-
var _a;
|
|
5490
|
-
this.iframes = [
|
|
5491
|
-
...getElementsByTagName('iframe'),
|
|
5492
|
-
...getElementsByTagName('webview'),
|
|
5493
|
-
];
|
|
5494
|
-
for (const iframe of this.iframes) {
|
|
5495
|
-
iframe.style.pointerEvents = 'none';
|
|
5496
|
-
}
|
|
5497
|
-
this.el.classList.add('dragged');
|
|
5498
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5499
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5500
|
-
this.disposable = this.getData();
|
|
5501
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5502
|
-
var _a;
|
|
5503
|
-
for (const iframe of this.iframes) {
|
|
5504
|
-
iframe.style.pointerEvents = 'auto';
|
|
5505
|
-
}
|
|
5506
|
-
this.iframes = [];
|
|
5507
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5508
|
-
this.disposable = undefined;
|
|
5509
|
-
}));
|
|
5510
|
-
}
|
|
5511
|
-
}
|
|
5512
|
-
|
|
5513
5351
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5514
5352
|
//
|
|
5515
5353
|
constructor(id) {
|
|
@@ -5524,6 +5362,7 @@
|
|
|
5524
5362
|
//
|
|
5525
5363
|
this._onDidSizeChange = new Emitter();
|
|
5526
5364
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5365
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5527
5366
|
}
|
|
5528
5367
|
setConstraints(value) {
|
|
5529
5368
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5531,11 +5370,6 @@
|
|
|
5531
5370
|
setSize(event) {
|
|
5532
5371
|
this._onDidSizeChange.fire(event);
|
|
5533
5372
|
}
|
|
5534
|
-
dispose() {
|
|
5535
|
-
super.dispose();
|
|
5536
|
-
this._onDidConstraintsChange.dispose();
|
|
5537
|
-
this._onDidSizeChange.dispose();
|
|
5538
|
-
}
|
|
5539
5373
|
}
|
|
5540
5374
|
|
|
5541
5375
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5549,6 +5383,7 @@
|
|
|
5549
5383
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5550
5384
|
this._onMouseLeave = new Emitter({});
|
|
5551
5385
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5386
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5552
5387
|
}
|
|
5553
5388
|
set pane(pane) {
|
|
5554
5389
|
this._pane = pane;
|
|
@@ -5717,7 +5552,7 @@
|
|
|
5717
5552
|
}
|
|
5718
5553
|
}
|
|
5719
5554
|
toJSON() {
|
|
5720
|
-
const params = this.
|
|
5555
|
+
const params = this._params;
|
|
5721
5556
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5722
5557
|
}
|
|
5723
5558
|
renderOnce() {
|
|
@@ -5777,7 +5612,7 @@
|
|
|
5777
5612
|
})(this.header);
|
|
5778
5613
|
this.target = new Droptarget(this.element, {
|
|
5779
5614
|
validOverlays: 'vertical',
|
|
5780
|
-
canDisplayOverlay: (
|
|
5615
|
+
canDisplayOverlay: () => {
|
|
5781
5616
|
const data = getPaneData();
|
|
5782
5617
|
if (!data) {
|
|
5783
5618
|
return true;
|
|
@@ -5786,36 +5621,39 @@
|
|
|
5786
5621
|
},
|
|
5787
5622
|
});
|
|
5788
5623
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5789
|
-
|
|
5790
|
-
if (!data) {
|
|
5791
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5792
|
-
return;
|
|
5793
|
-
}
|
|
5794
|
-
const containerApi = this.params
|
|
5795
|
-
.containerApi;
|
|
5796
|
-
const panelId = data.paneId;
|
|
5797
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5798
|
-
if (!existingPanel) {
|
|
5799
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5800
|
-
return;
|
|
5801
|
-
}
|
|
5802
|
-
const allPanels = containerApi.getPanels();
|
|
5803
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5804
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5805
|
-
if (event.position === exports.Position.Left ||
|
|
5806
|
-
event.position === exports.Position.Top) {
|
|
5807
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5808
|
-
}
|
|
5809
|
-
if (event.position === exports.Position.Right ||
|
|
5810
|
-
event.position === exports.Position.Bottom) {
|
|
5811
|
-
if (fromIndex > toIndex) {
|
|
5812
|
-
toIndex++;
|
|
5813
|
-
}
|
|
5814
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5815
|
-
}
|
|
5816
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5624
|
+
this.onDrop(event);
|
|
5817
5625
|
}));
|
|
5818
5626
|
}
|
|
5627
|
+
onDrop(event) {
|
|
5628
|
+
const data = getPaneData();
|
|
5629
|
+
if (!data) {
|
|
5630
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5631
|
+
return;
|
|
5632
|
+
}
|
|
5633
|
+
const containerApi = this._params
|
|
5634
|
+
.containerApi;
|
|
5635
|
+
const panelId = data.paneId;
|
|
5636
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
5637
|
+
if (!existingPanel) {
|
|
5638
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5639
|
+
return;
|
|
5640
|
+
}
|
|
5641
|
+
const allPanels = containerApi.getPanels();
|
|
5642
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5643
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5644
|
+
if (event.position === exports.Position.Left ||
|
|
5645
|
+
event.position === exports.Position.Top) {
|
|
5646
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
5647
|
+
}
|
|
5648
|
+
if (event.position === exports.Position.Right ||
|
|
5649
|
+
event.position === exports.Position.Bottom) {
|
|
5650
|
+
if (fromIndex > toIndex) {
|
|
5651
|
+
toIndex++;
|
|
5652
|
+
}
|
|
5653
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5654
|
+
}
|
|
5655
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
5656
|
+
}
|
|
5819
5657
|
}
|
|
5820
5658
|
|
|
5821
5659
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5845,7 +5683,7 @@
|
|
|
5845
5683
|
this._expander.textContent = e.isExpanded ? '<' : '>';
|
|
5846
5684
|
});
|
|
5847
5685
|
}
|
|
5848
|
-
update(
|
|
5686
|
+
update(_params) {
|
|
5849
5687
|
//
|
|
5850
5688
|
}
|
|
5851
5689
|
dispose() {
|
|
@@ -5871,6 +5709,7 @@
|
|
|
5871
5709
|
super();
|
|
5872
5710
|
this.element = element;
|
|
5873
5711
|
this._disposable = new MutableDisposable();
|
|
5712
|
+
this._viewDisposables = new Map();
|
|
5874
5713
|
this._onDidLayoutChange = new Emitter();
|
|
5875
5714
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5876
5715
|
this._onDidDrop = new Emitter();
|
|
@@ -5879,6 +5718,7 @@
|
|
|
5879
5718
|
this.onDidAddView = this._onDidAddView.event;
|
|
5880
5719
|
this._onDidRemoveView = new Emitter();
|
|
5881
5720
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5721
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5882
5722
|
this._options = options;
|
|
5883
5723
|
if (!options.components) {
|
|
5884
5724
|
options.components = {};
|
|
@@ -5954,9 +5794,7 @@
|
|
|
5954
5794
|
isExpanded: !!options.isExpanded,
|
|
5955
5795
|
disableDnd: !!this.options.disableDnd,
|
|
5956
5796
|
});
|
|
5957
|
-
|
|
5958
|
-
this._onDidDrop.fire(event);
|
|
5959
|
-
}));
|
|
5797
|
+
this.doAddPanel(view);
|
|
5960
5798
|
const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
|
|
5961
5799
|
const index = typeof options.index === 'number' ? options.index : undefined;
|
|
5962
5800
|
view.init({
|
|
@@ -5969,7 +5807,7 @@
|
|
|
5969
5807
|
});
|
|
5970
5808
|
this.paneview.addPane(view, size, index);
|
|
5971
5809
|
view.orientation = this.paneview.orientation;
|
|
5972
|
-
return
|
|
5810
|
+
return view;
|
|
5973
5811
|
}
|
|
5974
5812
|
getPanels() {
|
|
5975
5813
|
return this.paneview.getPanes();
|
|
@@ -5978,6 +5816,7 @@
|
|
|
5978
5816
|
const views = this.getPanels();
|
|
5979
5817
|
const index = views.findIndex((_) => _ === panel);
|
|
5980
5818
|
this.paneview.removePane(index);
|
|
5819
|
+
this.doRemovePanel(panel);
|
|
5981
5820
|
}
|
|
5982
5821
|
movePanel(from, to) {
|
|
5983
5822
|
this.paneview.moveView(from, to);
|
|
@@ -6027,6 +5866,10 @@
|
|
|
6027
5866
|
fromJSON(serializedPaneview, deferComponentLayout) {
|
|
6028
5867
|
const { views, size } = serializedPaneview;
|
|
6029
5868
|
const queue = [];
|
|
5869
|
+
for (const [_, value] of this._viewDisposables.entries()) {
|
|
5870
|
+
value.dispose();
|
|
5871
|
+
}
|
|
5872
|
+
this._viewDisposables.clear();
|
|
6030
5873
|
this.paneview.dispose();
|
|
6031
5874
|
this.paneview = new Paneview(this.element, {
|
|
6032
5875
|
orientation: exports.Orientation.VERTICAL,
|
|
@@ -6062,9 +5905,7 @@
|
|
|
6062
5905
|
isExpanded: !!view.expanded,
|
|
6063
5906
|
disableDnd: !!this.options.disableDnd,
|
|
6064
5907
|
});
|
|
6065
|
-
|
|
6066
|
-
this._onDidDrop.fire(event);
|
|
6067
|
-
});
|
|
5908
|
+
this.doAddPanel(panel);
|
|
6068
5909
|
queue.push(() => {
|
|
6069
5910
|
panel.init({
|
|
6070
5911
|
params: data.params || {},
|
|
@@ -6094,6 +5935,27 @@
|
|
|
6094
5935
|
queue.forEach((f) => f());
|
|
6095
5936
|
}
|
|
6096
5937
|
}
|
|
5938
|
+
doAddPanel(panel) {
|
|
5939
|
+
const disposable = panel.onDidDrop((event) => {
|
|
5940
|
+
this._onDidDrop.fire(event);
|
|
5941
|
+
});
|
|
5942
|
+
this._viewDisposables.set(panel.id, disposable);
|
|
5943
|
+
}
|
|
5944
|
+
doRemovePanel(panel) {
|
|
5945
|
+
const disposable = this._viewDisposables.get(panel.id);
|
|
5946
|
+
if (disposable) {
|
|
5947
|
+
disposable.dispose();
|
|
5948
|
+
this._viewDisposables.delete(panel.id);
|
|
5949
|
+
}
|
|
5950
|
+
}
|
|
5951
|
+
dispose() {
|
|
5952
|
+
super.dispose();
|
|
5953
|
+
for (const [_, value] of this._viewDisposables.entries()) {
|
|
5954
|
+
value.dispose();
|
|
5955
|
+
}
|
|
5956
|
+
this._viewDisposables.clear();
|
|
5957
|
+
this.paneview.dispose();
|
|
5958
|
+
}
|
|
6097
5959
|
}
|
|
6098
5960
|
|
|
6099
5961
|
class SplitviewPanel extends BasePanelView {
|
|
@@ -6106,12 +5968,14 @@
|
|
|
6106
5968
|
this._snap = false;
|
|
6107
5969
|
this._onDidChange = new Emitter();
|
|
6108
5970
|
this.onDidChange = this._onDidChange.event;
|
|
6109
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5971
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6110
5972
|
const { isVisible } = event;
|
|
6111
|
-
const { containerApi } = this
|
|
5973
|
+
const { containerApi } = this
|
|
5974
|
+
._params;
|
|
6112
5975
|
containerApi.setVisible(this, isVisible);
|
|
6113
5976
|
}), this.api.onActiveChange(() => {
|
|
6114
|
-
const { containerApi } = this
|
|
5977
|
+
const { containerApi } = this
|
|
5978
|
+
._params;
|
|
6115
5979
|
containerApi.setActive(this);
|
|
6116
5980
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6117
5981
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6254,14 +6118,13 @@
|
|
|
6254
6118
|
if (this.disposed) {
|
|
6255
6119
|
throw new Error('invalid operation: resource is already disposed');
|
|
6256
6120
|
}
|
|
6257
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6258
6121
|
if (typeof this.component !== 'function') {
|
|
6259
6122
|
/**
|
|
6260
6123
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6261
6124
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6262
6125
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6263
6126
|
*/
|
|
6264
|
-
throw new Error('
|
|
6127
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6265
6128
|
}
|
|
6266
6129
|
const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
|
|
6267
6130
|
component: this
|
|
@@ -6319,22 +6182,14 @@
|
|
|
6319
6182
|
this.id = id;
|
|
6320
6183
|
this.component = component;
|
|
6321
6184
|
this.reactPortalStore = reactPortalStore;
|
|
6322
|
-
// private hostedContainer: HostedContainer;
|
|
6323
6185
|
this._onDidFocus = new Emitter();
|
|
6324
6186
|
this.onDidFocus = this._onDidFocus.event;
|
|
6325
6187
|
this._onDidBlur = new Emitter();
|
|
6326
6188
|
this.onDidBlur = this._onDidBlur.event;
|
|
6327
6189
|
this._element = document.createElement('div');
|
|
6328
|
-
this._element.
|
|
6329
|
-
this._element.style.width = '100%';
|
|
6330
|
-
// this.hostedContainer = new HostedContainer({
|
|
6331
|
-
// id,
|
|
6332
|
-
// });
|
|
6333
|
-
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6334
|
-
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6190
|
+
this._element.className = 'dockview-react-part';
|
|
6335
6191
|
this._actionsElement = document.createElement('div');
|
|
6336
|
-
this._actionsElement.
|
|
6337
|
-
this._actionsElement.style.width = '100%';
|
|
6192
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6338
6193
|
}
|
|
6339
6194
|
get element() {
|
|
6340
6195
|
return this._element;
|
|
@@ -6367,23 +6222,20 @@
|
|
|
6367
6222
|
var _a;
|
|
6368
6223
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
6369
6224
|
}
|
|
6370
|
-
updateParentGroup(group,
|
|
6225
|
+
updateParentGroup(group, _isPanelVisible) {
|
|
6371
6226
|
this._group = group;
|
|
6372
6227
|
}
|
|
6373
|
-
layout(
|
|
6228
|
+
layout(_width, _height) {
|
|
6374
6229
|
// noop
|
|
6375
|
-
// this.hostedContainer.layout(
|
|
6376
|
-
// this.element
|
|
6377
|
-
// // { width, height }
|
|
6378
|
-
// );
|
|
6379
6230
|
}
|
|
6380
6231
|
close() {
|
|
6381
6232
|
return Promise.resolve(true);
|
|
6382
6233
|
}
|
|
6383
6234
|
dispose() {
|
|
6384
6235
|
var _a, _b;
|
|
6236
|
+
this._onDidFocus.dispose();
|
|
6237
|
+
this._onDidBlur.dispose();
|
|
6385
6238
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6386
|
-
// this.hostedContainer?.dispose();
|
|
6387
6239
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
6388
6240
|
}
|
|
6389
6241
|
}
|
|
@@ -6394,6 +6246,7 @@
|
|
|
6394
6246
|
this.component = component;
|
|
6395
6247
|
this.reactPortalStore = reactPortalStore;
|
|
6396
6248
|
this._element = document.createElement('div');
|
|
6249
|
+
this._element.className = 'dockview-react-part';
|
|
6397
6250
|
}
|
|
6398
6251
|
get element() {
|
|
6399
6252
|
return this._element;
|
|
@@ -6417,10 +6270,10 @@
|
|
|
6417
6270
|
id: this.id,
|
|
6418
6271
|
};
|
|
6419
6272
|
}
|
|
6420
|
-
layout(
|
|
6273
|
+
layout(_width, _height) {
|
|
6421
6274
|
// noop - retrieval from api
|
|
6422
6275
|
}
|
|
6423
|
-
updateParentGroup(
|
|
6276
|
+
updateParentGroup(_group, _isPanelVisible) {
|
|
6424
6277
|
// noop - retrieval from api
|
|
6425
6278
|
}
|
|
6426
6279
|
dispose() {
|
|
@@ -6438,7 +6291,6 @@
|
|
|
6438
6291
|
const panelId = panelData.id;
|
|
6439
6292
|
const params = panelData.params;
|
|
6440
6293
|
const title = panelData.title;
|
|
6441
|
-
const state = panelData.state;
|
|
6442
6294
|
const suppressClosable = panelData.suppressClosable;
|
|
6443
6295
|
const viewData = panelData.view;
|
|
6444
6296
|
const view = new DefaultGroupPanelView({
|
|
@@ -6447,13 +6299,12 @@
|
|
|
6447
6299
|
? createComponent(viewData.tab.id, viewData.tab.id, this.layout.options.tabComponents, this.layout.options.frameworkTabComponents, (_c = this.layout.options.frameworkComponentFactory) === null || _c === void 0 ? void 0 : _c.tab)
|
|
6448
6300
|
: new DefaultTab(),
|
|
6449
6301
|
});
|
|
6450
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6302
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6451
6303
|
panel.init({
|
|
6452
6304
|
view,
|
|
6453
6305
|
title,
|
|
6454
6306
|
suppressClosable,
|
|
6455
6307
|
params: params || {},
|
|
6456
|
-
state: state || {},
|
|
6457
6308
|
});
|
|
6458
6309
|
return panel;
|
|
6459
6310
|
}
|
|
@@ -6468,8 +6319,7 @@
|
|
|
6468
6319
|
value: undefined,
|
|
6469
6320
|
};
|
|
6470
6321
|
this._element = document.createElement('div');
|
|
6471
|
-
this._element.
|
|
6472
|
-
this._element.style.width = '100%';
|
|
6322
|
+
this._element.className = 'dockview-react-part';
|
|
6473
6323
|
}
|
|
6474
6324
|
get element() {
|
|
6475
6325
|
return this._element;
|
|
@@ -6502,10 +6352,10 @@
|
|
|
6502
6352
|
id: this.id,
|
|
6503
6353
|
};
|
|
6504
6354
|
}
|
|
6505
|
-
layout(
|
|
6355
|
+
layout(_width, _height) {
|
|
6506
6356
|
// noop - retrieval from api
|
|
6507
6357
|
}
|
|
6508
|
-
updateParentGroup(group,
|
|
6358
|
+
updateParentGroup(group, _isPanelVisible) {
|
|
6509
6359
|
// noop - retrieval from api
|
|
6510
6360
|
this._groupRef.value = group;
|
|
6511
6361
|
}
|
|
@@ -6539,21 +6389,21 @@
|
|
|
6539
6389
|
var _a;
|
|
6540
6390
|
const factory = {
|
|
6541
6391
|
content: {
|
|
6542
|
-
createComponent: (
|
|
6392
|
+
createComponent: (_id, componentId, component) => {
|
|
6543
6393
|
return new ReactPanelContentPart(componentId, component, {
|
|
6544
6394
|
addPortal,
|
|
6545
6395
|
});
|
|
6546
6396
|
},
|
|
6547
6397
|
},
|
|
6548
6398
|
tab: {
|
|
6549
|
-
createComponent: (
|
|
6399
|
+
createComponent: (_id, componentId, component) => {
|
|
6550
6400
|
return new ReactPanelHeaderPart(componentId, component, {
|
|
6551
6401
|
addPortal,
|
|
6552
6402
|
});
|
|
6553
6403
|
},
|
|
6554
6404
|
},
|
|
6555
6405
|
watermark: {
|
|
6556
|
-
createComponent: (
|
|
6406
|
+
createComponent: (_id, componentId, component) => {
|
|
6557
6407
|
return new ReactWatermarkPart(componentId, component, {
|
|
6558
6408
|
addPortal,
|
|
6559
6409
|
});
|
|
@@ -6567,7 +6417,6 @@
|
|
|
6567
6417
|
frameworkTabComponents: props.tabComponents,
|
|
6568
6418
|
tabHeight: props.tabHeight,
|
|
6569
6419
|
debug: props.debug,
|
|
6570
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6571
6420
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6572
6421
|
styles: props.hideBorders
|
|
6573
6422
|
? { separatorBorder: 'transparent' }
|
|
@@ -6583,8 +6432,24 @@
|
|
|
6583
6432
|
dockviewRef.current = dockview;
|
|
6584
6433
|
return () => {
|
|
6585
6434
|
dockview.dispose();
|
|
6435
|
+
element.remove();
|
|
6586
6436
|
};
|
|
6587
6437
|
}, []);
|
|
6438
|
+
React__namespace.useEffect(() => {
|
|
6439
|
+
if (!dockviewRef.current) {
|
|
6440
|
+
return () => {
|
|
6441
|
+
// noop
|
|
6442
|
+
};
|
|
6443
|
+
}
|
|
6444
|
+
const disposable = dockviewRef.current.onDidDrop((event) => {
|
|
6445
|
+
if (props.onDidDrop) {
|
|
6446
|
+
props.onDidDrop(event);
|
|
6447
|
+
}
|
|
6448
|
+
});
|
|
6449
|
+
return () => {
|
|
6450
|
+
disposable.dispose();
|
|
6451
|
+
};
|
|
6452
|
+
}, [props.onDidDrop]);
|
|
6588
6453
|
React__namespace.useEffect(() => {
|
|
6589
6454
|
if (!dockviewRef.current) {
|
|
6590
6455
|
return;
|
|
@@ -6593,6 +6458,22 @@
|
|
|
6593
6458
|
frameworkComponents: props.components,
|
|
6594
6459
|
});
|
|
6595
6460
|
}, [props.components]);
|
|
6461
|
+
React__namespace.useEffect(() => {
|
|
6462
|
+
if (!dockviewRef.current) {
|
|
6463
|
+
return;
|
|
6464
|
+
}
|
|
6465
|
+
dockviewRef.current.updateOptions({
|
|
6466
|
+
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6467
|
+
});
|
|
6468
|
+
}, [props.watermarkComponent]);
|
|
6469
|
+
React__namespace.useEffect(() => {
|
|
6470
|
+
if (!dockviewRef.current) {
|
|
6471
|
+
return;
|
|
6472
|
+
}
|
|
6473
|
+
dockviewRef.current.updateOptions({
|
|
6474
|
+
showDndOverlay: props.showDndOverlay,
|
|
6475
|
+
});
|
|
6476
|
+
}, [props.showDndOverlay]);
|
|
6596
6477
|
React__namespace.useEffect(() => {
|
|
6597
6478
|
if (!dockviewRef.current) {
|
|
6598
6479
|
return;
|
|
@@ -6681,9 +6562,9 @@
|
|
|
6681
6562
|
getComponent() {
|
|
6682
6563
|
var _a;
|
|
6683
6564
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6684
|
-
params: ((_a = this.
|
|
6565
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6685
6566
|
api: this.api,
|
|
6686
|
-
containerApi: this.
|
|
6567
|
+
containerApi: this._params
|
|
6687
6568
|
.containerApi,
|
|
6688
6569
|
});
|
|
6689
6570
|
}
|
|
@@ -6720,7 +6601,9 @@
|
|
|
6720
6601
|
});
|
|
6721
6602
|
},
|
|
6722
6603
|
},
|
|
6723
|
-
proportionalLayout: props.proportionalLayout
|
|
6604
|
+
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
6605
|
+
? props.proportionalLayout
|
|
6606
|
+
: true,
|
|
6724
6607
|
styles: props.hideBorders
|
|
6725
6608
|
? { separatorBorder: 'transparent' }
|
|
6726
6609
|
: undefined,
|
|
@@ -6756,9 +6639,9 @@
|
|
|
6756
6639
|
getComponent() {
|
|
6757
6640
|
var _a;
|
|
6758
6641
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6759
|
-
params: ((_a = this.
|
|
6642
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6760
6643
|
api: this.api,
|
|
6761
|
-
containerApi: this.
|
|
6644
|
+
containerApi: this._params
|
|
6762
6645
|
.containerApi,
|
|
6763
6646
|
});
|
|
6764
6647
|
}
|
|
@@ -6788,7 +6671,9 @@
|
|
|
6788
6671
|
var _a;
|
|
6789
6672
|
const element = document.createElement('div');
|
|
6790
6673
|
const gridview = new GridviewComponent(element, {
|
|
6791
|
-
proportionalLayout:
|
|
6674
|
+
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
6675
|
+
? props.proportionalLayout
|
|
6676
|
+
: true,
|
|
6792
6677
|
orientation: props.orientation,
|
|
6793
6678
|
frameworkComponents: props.components,
|
|
6794
6679
|
frameworkComponentFactory: {
|
|
@@ -6811,6 +6696,7 @@
|
|
|
6811
6696
|
gridviewRef.current = gridview;
|
|
6812
6697
|
return () => {
|
|
6813
6698
|
gridview.dispose();
|
|
6699
|
+
element.remove();
|
|
6814
6700
|
};
|
|
6815
6701
|
}, []);
|
|
6816
6702
|
React__namespace.useEffect(() => {
|
|
@@ -6881,7 +6767,7 @@
|
|
|
6881
6767
|
};
|
|
6882
6768
|
}, [props.disableAutoResizing]);
|
|
6883
6769
|
React__namespace.useEffect(() => {
|
|
6884
|
-
const createComponent = (id,
|
|
6770
|
+
const createComponent = (id, _componentId, component) => new PanePanelSection(id, component, {
|
|
6885
6771
|
addPortal,
|
|
6886
6772
|
});
|
|
6887
6773
|
const paneview = new PaneviewComponent(domRef.current, {
|
|
@@ -6947,14 +6833,11 @@
|
|
|
6947
6833
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
6948
6834
|
|
|
6949
6835
|
exports.BaseGrid = BaseGrid;
|
|
6950
|
-
exports.CompositeDisposable = CompositeDisposable;
|
|
6951
6836
|
exports.ContentContainer = ContentContainer;
|
|
6952
|
-
exports.DATA_KEY = DATA_KEY;
|
|
6953
6837
|
exports.DockviewApi = DockviewApi;
|
|
6954
6838
|
exports.DockviewComponent = DockviewComponent;
|
|
6955
6839
|
exports.DockviewComponents = DockviewComponents;
|
|
6956
6840
|
exports.DockviewReact = DockviewReact;
|
|
6957
|
-
exports.Emitter = Emitter;
|
|
6958
6841
|
exports.Gridview = Gridview;
|
|
6959
6842
|
exports.GridviewApi = GridviewApi;
|
|
6960
6843
|
exports.GridviewComponent = GridviewComponent;
|
|
@@ -6962,7 +6845,6 @@
|
|
|
6962
6845
|
exports.GridviewReact = GridviewReact;
|
|
6963
6846
|
exports.Groupview = Groupview;
|
|
6964
6847
|
exports.LocalSelectionTransfer = LocalSelectionTransfer;
|
|
6965
|
-
exports.MutableDisposable = MutableDisposable;
|
|
6966
6848
|
exports.PaneFramework = PaneFramework;
|
|
6967
6849
|
exports.PaneTransfer = PaneTransfer;
|
|
6968
6850
|
exports.PanelTransfer = PanelTransfer;
|
|
@@ -6981,10 +6863,6 @@
|
|
|
6981
6863
|
exports.SplitviewPanel = SplitviewPanel;
|
|
6982
6864
|
exports.SplitviewReact = SplitviewReact;
|
|
6983
6865
|
exports.Tab = Tab$1;
|
|
6984
|
-
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6985
|
-
exports.addDisposableListener = addDisposableListener;
|
|
6986
|
-
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6987
|
-
exports.extractData = extractData;
|
|
6988
6866
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6989
6867
|
exports.getGridLocation = getGridLocation;
|
|
6990
6868
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6992,11 +6870,8 @@
|
|
|
6992
6870
|
exports.getPanelData = getPanelData;
|
|
6993
6871
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6994
6872
|
exports.indexInParent = indexInParent;
|
|
6995
|
-
exports.isCustomDragEvent = isCustomDragEvent;
|
|
6996
6873
|
exports.isGridBranchNode = isGridBranchNode;
|
|
6997
|
-
exports.isPanelTransferEvent = isPanelTransferEvent;
|
|
6998
6874
|
exports.isReactElement = isReactElement;
|
|
6999
|
-
exports.isTabDragEvent = isTabDragEvent;
|
|
7000
6875
|
exports.orthogonal = orthogonal;
|
|
7001
6876
|
exports.toTarget = toTarget;
|
|
7002
6877
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|