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.amd.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
|
*/
|
|
@@ -54,9 +54,79 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
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}";
|
|
57
|
+
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}";
|
|
58
58
|
styleInject(css_248z);
|
|
59
59
|
|
|
60
|
+
class TransferObject {
|
|
61
|
+
constructor() {
|
|
62
|
+
//
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
class PanelTransfer extends TransferObject {
|
|
66
|
+
constructor(viewId, groupId, panelId) {
|
|
67
|
+
super();
|
|
68
|
+
this.viewId = viewId;
|
|
69
|
+
this.groupId = groupId;
|
|
70
|
+
this.panelId = panelId;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
class PaneTransfer extends TransferObject {
|
|
74
|
+
constructor(viewId, paneId) {
|
|
75
|
+
super();
|
|
76
|
+
this.viewId = viewId;
|
|
77
|
+
this.paneId = paneId;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
82
|
+
*/
|
|
83
|
+
class LocalSelectionTransfer {
|
|
84
|
+
constructor() {
|
|
85
|
+
// protect against external instantiation
|
|
86
|
+
}
|
|
87
|
+
static getInstance() {
|
|
88
|
+
return LocalSelectionTransfer.INSTANCE;
|
|
89
|
+
}
|
|
90
|
+
hasData(proto) {
|
|
91
|
+
return proto && proto === this.proto;
|
|
92
|
+
}
|
|
93
|
+
clearData(proto) {
|
|
94
|
+
if (this.hasData(proto)) {
|
|
95
|
+
this.proto = undefined;
|
|
96
|
+
this.data = undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
getData(proto) {
|
|
100
|
+
if (this.hasData(proto)) {
|
|
101
|
+
return this.data;
|
|
102
|
+
}
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
setData(data, proto) {
|
|
106
|
+
if (proto) {
|
|
107
|
+
this.data = data;
|
|
108
|
+
this.proto = proto;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
113
|
+
function getPanelData() {
|
|
114
|
+
const panelTransfer = LocalSelectionTransfer.getInstance();
|
|
115
|
+
const isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
116
|
+
if (!isPanelEvent) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
120
|
+
}
|
|
121
|
+
function getPaneData() {
|
|
122
|
+
const paneTransfer = LocalSelectionTransfer.getInstance();
|
|
123
|
+
const isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
124
|
+
if (!isPanelEvent) {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
128
|
+
}
|
|
129
|
+
|
|
60
130
|
exports.Event = void 0;
|
|
61
131
|
(function (Event) {
|
|
62
132
|
Event.any = (...children) => {
|
|
@@ -87,7 +157,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
87
157
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
|
|
88
158
|
listener(this._last);
|
|
89
159
|
}
|
|
90
|
-
this._listeners.length === 0;
|
|
91
160
|
this._listeners.push(listener);
|
|
92
161
|
return {
|
|
93
162
|
dispose: () => {
|
|
@@ -103,9 +172,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
103
172
|
}
|
|
104
173
|
fire(e) {
|
|
105
174
|
this._last = e;
|
|
106
|
-
this._listeners
|
|
175
|
+
for (const listener of this._listeners) {
|
|
107
176
|
listener(e);
|
|
108
|
-
}
|
|
177
|
+
}
|
|
109
178
|
}
|
|
110
179
|
dispose() {
|
|
111
180
|
this._listeners = [];
|
|
@@ -147,164 +216,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
147
216
|
}
|
|
148
217
|
}
|
|
149
218
|
|
|
150
|
-
exports.Disposable = void 0;
|
|
151
|
-
(function (Disposable) {
|
|
152
|
-
Disposable.NONE = {
|
|
153
|
-
dispose: () => {
|
|
154
|
-
// noop
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
})(exports.Disposable || (exports.Disposable = {}));
|
|
158
|
-
class CompositeDisposable {
|
|
159
|
-
constructor(...args) {
|
|
160
|
-
this.disposables = args;
|
|
161
|
-
}
|
|
162
|
-
static from(...args) {
|
|
163
|
-
return new CompositeDisposable(...args);
|
|
164
|
-
}
|
|
165
|
-
addDisposables(...args) {
|
|
166
|
-
args === null || args === void 0 ? void 0 : args.forEach((arg) => this.disposables.push(arg));
|
|
167
|
-
}
|
|
168
|
-
dispose() {
|
|
169
|
-
this.disposables.forEach((arg) => arg.dispose());
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
class MutableDisposable {
|
|
173
|
-
constructor() {
|
|
174
|
-
this._disposable = exports.Disposable.NONE;
|
|
175
|
-
}
|
|
176
|
-
set value(disposable) {
|
|
177
|
-
if (this._disposable) {
|
|
178
|
-
this._disposable.dispose();
|
|
179
|
-
}
|
|
180
|
-
this._disposable = disposable;
|
|
181
|
-
}
|
|
182
|
-
dispose() {
|
|
183
|
-
if (this._disposable) {
|
|
184
|
-
this._disposable.dispose();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function tryParseJSON(text, reviver) {
|
|
190
|
-
try {
|
|
191
|
-
return JSON.parse(text, reviver);
|
|
192
|
-
}
|
|
193
|
-
catch (err) {
|
|
194
|
-
console.warn('failed to parse JSON');
|
|
195
|
-
return undefined;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
class TransferObject {
|
|
200
|
-
constructor() {
|
|
201
|
-
//
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
class PanelTransfer extends TransferObject {
|
|
205
|
-
constructor(viewId, groupId, panelId) {
|
|
206
|
-
super();
|
|
207
|
-
this.viewId = viewId;
|
|
208
|
-
this.groupId = groupId;
|
|
209
|
-
this.panelId = panelId;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
class PaneTransfer extends TransferObject {
|
|
213
|
-
constructor(viewId, paneId) {
|
|
214
|
-
super();
|
|
215
|
-
this.viewId = viewId;
|
|
216
|
-
this.paneId = paneId;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
const DATA_KEY = 'splitview/transfer';
|
|
220
|
-
const isPanelTransferEvent = (event) => {
|
|
221
|
-
if (!event.dataTransfer) {
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
225
|
-
};
|
|
226
|
-
exports.DragType = void 0;
|
|
227
|
-
(function (DragType) {
|
|
228
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
229
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
230
|
-
})(exports.DragType || (exports.DragType = {}));
|
|
231
|
-
/**
|
|
232
|
-
* Determine whether this data belong to that of an event that was started by
|
|
233
|
-
* dragging a tab component
|
|
234
|
-
*/
|
|
235
|
-
const isTabDragEvent = (data) => {
|
|
236
|
-
return data.type === exports.DragType.DOCKVIEW_TAB;
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* Determine whether this data belong to that of an event that was started by
|
|
240
|
-
* a custom drag-enable component
|
|
241
|
-
*/
|
|
242
|
-
const isCustomDragEvent = (data) => {
|
|
243
|
-
return data.type === exports.DragType.EXTERNAL;
|
|
244
|
-
};
|
|
245
|
-
const extractData = (event) => {
|
|
246
|
-
if (!event.dataTransfer) {
|
|
247
|
-
return null;
|
|
248
|
-
}
|
|
249
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
250
|
-
if (!data) {
|
|
251
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
252
|
-
}
|
|
253
|
-
if (typeof data.type !== 'string') {
|
|
254
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
255
|
-
}
|
|
256
|
-
return data;
|
|
257
|
-
};
|
|
258
|
-
/**
|
|
259
|
-
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
260
|
-
*/
|
|
261
|
-
class LocalSelectionTransfer {
|
|
262
|
-
constructor() {
|
|
263
|
-
// protect against external instantiation
|
|
264
|
-
}
|
|
265
|
-
static getInstance() {
|
|
266
|
-
return LocalSelectionTransfer.INSTANCE;
|
|
267
|
-
}
|
|
268
|
-
hasData(proto) {
|
|
269
|
-
return proto && proto === this.proto;
|
|
270
|
-
}
|
|
271
|
-
clearData(proto) {
|
|
272
|
-
if (this.hasData(proto)) {
|
|
273
|
-
this.proto = undefined;
|
|
274
|
-
this.data = undefined;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
getData(proto) {
|
|
278
|
-
if (this.hasData(proto)) {
|
|
279
|
-
return this.data;
|
|
280
|
-
}
|
|
281
|
-
return undefined;
|
|
282
|
-
}
|
|
283
|
-
setData(data, proto) {
|
|
284
|
-
if (proto) {
|
|
285
|
-
this.data = data;
|
|
286
|
-
this.proto = proto;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
291
|
-
function getPanelData() {
|
|
292
|
-
const panelTransfer = LocalSelectionTransfer.getInstance();
|
|
293
|
-
const isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
294
|
-
if (!isPanelEvent) {
|
|
295
|
-
return undefined;
|
|
296
|
-
}
|
|
297
|
-
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
298
|
-
}
|
|
299
|
-
function getPaneData() {
|
|
300
|
-
const paneTransfer = LocalSelectionTransfer.getInstance();
|
|
301
|
-
const isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
302
|
-
if (!isPanelEvent) {
|
|
303
|
-
return undefined;
|
|
304
|
-
}
|
|
305
|
-
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
306
|
-
}
|
|
307
|
-
|
|
308
219
|
class SplitviewApi {
|
|
309
220
|
constructor(component) {
|
|
310
221
|
this.component = component;
|
|
@@ -324,6 +235,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
324
235
|
get length() {
|
|
325
236
|
return this.component.length;
|
|
326
237
|
}
|
|
238
|
+
get orientation() {
|
|
239
|
+
return this.component.orientation;
|
|
240
|
+
}
|
|
327
241
|
get onDidLayoutChange() {
|
|
328
242
|
return this.component.onDidLayoutChange;
|
|
329
243
|
}
|
|
@@ -333,9 +247,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
333
247
|
get onDidRemoveView() {
|
|
334
248
|
return this.component.onDidRemoveView;
|
|
335
249
|
}
|
|
336
|
-
get orientation() {
|
|
337
|
-
return this.component.orientation;
|
|
338
|
-
}
|
|
339
250
|
updateOptions(options) {
|
|
340
251
|
this.component.updateOptions(options);
|
|
341
252
|
}
|
|
@@ -380,18 +291,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
380
291
|
constructor(component) {
|
|
381
292
|
this.component = component;
|
|
382
293
|
}
|
|
383
|
-
get width() {
|
|
384
|
-
return this.component.width;
|
|
385
|
-
}
|
|
386
|
-
get height() {
|
|
387
|
-
return this.component.height;
|
|
388
|
-
}
|
|
389
294
|
get minimumSize() {
|
|
390
295
|
return this.component.minimumSize;
|
|
391
296
|
}
|
|
392
297
|
get maximumSize() {
|
|
393
298
|
return this.component.maximumSize;
|
|
394
299
|
}
|
|
300
|
+
get height() {
|
|
301
|
+
return this.component.height;
|
|
302
|
+
}
|
|
303
|
+
get width() {
|
|
304
|
+
return this.component.width;
|
|
305
|
+
}
|
|
395
306
|
get onDidLayoutChange() {
|
|
396
307
|
return this.component.onDidLayoutChange;
|
|
397
308
|
}
|
|
@@ -431,7 +342,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
431
342
|
this.component.layout(width, height);
|
|
432
343
|
}
|
|
433
344
|
addPanel(options) {
|
|
434
|
-
|
|
345
|
+
this.component.addPanel(options);
|
|
435
346
|
}
|
|
436
347
|
resizeToFit() {
|
|
437
348
|
this.component.resizeToFit();
|
|
@@ -447,12 +358,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
447
358
|
constructor(component) {
|
|
448
359
|
this.component = component;
|
|
449
360
|
}
|
|
450
|
-
get width() {
|
|
451
|
-
return this.component.width;
|
|
452
|
-
}
|
|
453
|
-
get height() {
|
|
454
|
-
return this.component.height;
|
|
455
|
-
}
|
|
456
361
|
get minimumHeight() {
|
|
457
362
|
return this.component.minimumHeight;
|
|
458
363
|
}
|
|
@@ -465,12 +370,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
465
370
|
get maximumWidth() {
|
|
466
371
|
return this.component.maximumWidth;
|
|
467
372
|
}
|
|
468
|
-
get
|
|
469
|
-
return this.component.
|
|
373
|
+
get width() {
|
|
374
|
+
return this.component.width;
|
|
375
|
+
}
|
|
376
|
+
get height() {
|
|
377
|
+
return this.component.height;
|
|
470
378
|
}
|
|
471
379
|
get onDidLayoutChange() {
|
|
472
380
|
return this.component.onDidLayoutChange;
|
|
473
381
|
}
|
|
382
|
+
get onDidAddGroup() {
|
|
383
|
+
return this.component.onDidAddGroup;
|
|
384
|
+
}
|
|
385
|
+
get onDidRemoveGroup() {
|
|
386
|
+
return this.component.onDidRemoveGroup;
|
|
387
|
+
}
|
|
388
|
+
get onDidActiveGroupChange() {
|
|
389
|
+
return this.component.onDidActiveGroupChange;
|
|
390
|
+
}
|
|
391
|
+
get onDidLayoutFromJSON() {
|
|
392
|
+
return this.component.onDidLayoutFromJSON;
|
|
393
|
+
}
|
|
474
394
|
get panels() {
|
|
475
395
|
return this.component.groups;
|
|
476
396
|
}
|
|
@@ -545,8 +465,26 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
545
465
|
get totalPanels() {
|
|
546
466
|
return this.component.totalPanels;
|
|
547
467
|
}
|
|
548
|
-
get
|
|
549
|
-
return this.component.
|
|
468
|
+
get onDidActiveGroupChange() {
|
|
469
|
+
return this.component.onDidActiveGroupChange;
|
|
470
|
+
}
|
|
471
|
+
get onDidAddGroup() {
|
|
472
|
+
return this.component.onDidAddGroup;
|
|
473
|
+
}
|
|
474
|
+
get onDidRemoveGroup() {
|
|
475
|
+
return this.component.onDidRemoveGroup;
|
|
476
|
+
}
|
|
477
|
+
get onDidActivePanelChange() {
|
|
478
|
+
return this.component.onDidActivePanelChange;
|
|
479
|
+
}
|
|
480
|
+
get onDidAddPanel() {
|
|
481
|
+
return this.component.onDidAddPanel;
|
|
482
|
+
}
|
|
483
|
+
get onDidRemovePanel() {
|
|
484
|
+
return this.component.onDidRemovePanel;
|
|
485
|
+
}
|
|
486
|
+
get onDidLayoutfromJSON() {
|
|
487
|
+
return this.component.onDidLayoutfromJSON;
|
|
550
488
|
}
|
|
551
489
|
get onDidLayoutChange() {
|
|
552
490
|
return this.component.onDidLayoutChange;
|
|
@@ -575,18 +513,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
575
513
|
getPanel(id) {
|
|
576
514
|
return this.component.getGroupPanel(id);
|
|
577
515
|
}
|
|
578
|
-
setActivePanel(panel) {
|
|
579
|
-
this.component.setActivePanel(panel);
|
|
580
|
-
}
|
|
581
516
|
layout(width, height, force = false) {
|
|
582
517
|
this.component.layout(width, height, force);
|
|
583
518
|
}
|
|
584
519
|
addPanel(options) {
|
|
585
520
|
return this.component.addPanel(options);
|
|
586
521
|
}
|
|
587
|
-
removePanel(panel) {
|
|
588
|
-
this.component.removePanel(panel);
|
|
589
|
-
}
|
|
590
522
|
addEmptyGroup(options) {
|
|
591
523
|
this.component.addEmptyGroup(options);
|
|
592
524
|
}
|
|
@@ -616,6 +548,46 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
616
548
|
}
|
|
617
549
|
}
|
|
618
550
|
|
|
551
|
+
var Disposable;
|
|
552
|
+
(function (Disposable) {
|
|
553
|
+
Disposable.NONE = {
|
|
554
|
+
dispose: () => {
|
|
555
|
+
// noop
|
|
556
|
+
},
|
|
557
|
+
};
|
|
558
|
+
})(Disposable || (Disposable = {}));
|
|
559
|
+
class CompositeDisposable {
|
|
560
|
+
constructor(...args) {
|
|
561
|
+
this.disposables = args;
|
|
562
|
+
}
|
|
563
|
+
static from(...args) {
|
|
564
|
+
return new CompositeDisposable(...args);
|
|
565
|
+
}
|
|
566
|
+
addDisposables(...args) {
|
|
567
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
568
|
+
}
|
|
569
|
+
dispose() {
|
|
570
|
+
this.disposables.forEach((arg) => arg.dispose());
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
class MutableDisposable {
|
|
574
|
+
constructor() {
|
|
575
|
+
this._disposable = Disposable.NONE;
|
|
576
|
+
}
|
|
577
|
+
set value(disposable) {
|
|
578
|
+
if (this._disposable) {
|
|
579
|
+
this._disposable.dispose();
|
|
580
|
+
}
|
|
581
|
+
this._disposable = disposable;
|
|
582
|
+
}
|
|
583
|
+
dispose() {
|
|
584
|
+
if (this._disposable) {
|
|
585
|
+
this._disposable.dispose();
|
|
586
|
+
this._disposable = Disposable.NONE;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
619
591
|
function watchElementResize(element, cb) {
|
|
620
592
|
const observer = new ResizeObserver((entires) => {
|
|
621
593
|
const firstEntry = entires[0];
|
|
@@ -1561,13 +1533,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1561
1533
|
this._onDidSashEnd.dispose();
|
|
1562
1534
|
this._onDidAddView.dispose();
|
|
1563
1535
|
this._onDidRemoveView.dispose();
|
|
1564
|
-
this.element.remove();
|
|
1565
1536
|
for (let i = 0; i < this.element.children.length; i++) {
|
|
1566
1537
|
if (this.element.children.item(i) === this.element) {
|
|
1567
1538
|
this.element.removeChild(this.element);
|
|
1568
1539
|
break;
|
|
1569
1540
|
}
|
|
1570
1541
|
}
|
|
1542
|
+
this.element.remove();
|
|
1571
1543
|
}
|
|
1572
1544
|
}
|
|
1573
1545
|
|
|
@@ -1590,7 +1562,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1590
1562
|
});
|
|
1591
1563
|
// if we've added views from the descriptor we need to
|
|
1592
1564
|
// add the panes to our Pane array and setup animation
|
|
1593
|
-
this.getPanes().forEach((pane
|
|
1565
|
+
this.getPanes().forEach((pane) => {
|
|
1594
1566
|
const disposable = new CompositeDisposable(pane.onDidChangeExpansionState(() => {
|
|
1595
1567
|
this.setupAnimation();
|
|
1596
1568
|
this._onDidChange.fire(undefined);
|
|
@@ -1606,7 +1578,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1606
1578
|
this.paneItems.push(paneItem);
|
|
1607
1579
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1608
1580
|
});
|
|
1609
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1581
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1610
1582
|
this._onDidChange.fire(undefined);
|
|
1611
1583
|
}), this.splitview.onDidAddView(() => {
|
|
1612
1584
|
this._onDidChange.fire();
|
|
@@ -1658,17 +1630,20 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1658
1630
|
getPanes() {
|
|
1659
1631
|
return this.splitview.getViews();
|
|
1660
1632
|
}
|
|
1661
|
-
removePane(index) {
|
|
1633
|
+
removePane(index, options = { skipDispose: false }) {
|
|
1662
1634
|
const paneItem = this.paneItems.splice(index, 1)[0];
|
|
1663
1635
|
this.splitview.removeView(index);
|
|
1664
|
-
|
|
1636
|
+
if (!options.skipDispose) {
|
|
1637
|
+
paneItem.disposable.dispose();
|
|
1638
|
+
paneItem.pane.dispose();
|
|
1639
|
+
}
|
|
1665
1640
|
return paneItem;
|
|
1666
1641
|
}
|
|
1667
1642
|
moveView(from, to) {
|
|
1668
1643
|
if (from === to) {
|
|
1669
1644
|
return;
|
|
1670
1645
|
}
|
|
1671
|
-
const view = this.removePane(from);
|
|
1646
|
+
const view = this.removePane(from, { skipDispose: true });
|
|
1672
1647
|
this.skipAnimation = true;
|
|
1673
1648
|
try {
|
|
1674
1649
|
this.addPane(view.pane, view.pane.size, to, false);
|
|
@@ -1696,15 +1671,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1696
1671
|
}
|
|
1697
1672
|
dispose() {
|
|
1698
1673
|
super.dispose();
|
|
1699
|
-
this.splitview.dispose();
|
|
1700
1674
|
if (this.animationTimer) {
|
|
1701
1675
|
clearTimeout(this.animationTimer);
|
|
1702
1676
|
this.animationTimer = undefined;
|
|
1703
1677
|
}
|
|
1704
1678
|
this.paneItems.forEach((paneItem) => {
|
|
1705
1679
|
paneItem.disposable.dispose();
|
|
1680
|
+
paneItem.pane.dispose();
|
|
1706
1681
|
});
|
|
1707
1682
|
this.paneItems = [];
|
|
1683
|
+
this.splitview.dispose();
|
|
1708
1684
|
this.element.remove();
|
|
1709
1685
|
}
|
|
1710
1686
|
}
|
|
@@ -1767,8 +1743,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1767
1743
|
this.options = options;
|
|
1768
1744
|
this._onDrop = new Emitter();
|
|
1769
1745
|
this.onDrop = this._onDrop.event;
|
|
1770
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1771
|
-
onDragEnter: (
|
|
1746
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1747
|
+
onDragEnter: () => undefined,
|
|
1772
1748
|
onDragOver: (e) => {
|
|
1773
1749
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
1774
1750
|
if (!this.options.canDisplayOverlay) {
|
|
@@ -1803,56 +1779,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1803
1779
|
const y = e.offsetY;
|
|
1804
1780
|
const xp = (100 * x) / width;
|
|
1805
1781
|
const yp = (100 * y) / height;
|
|
1806
|
-
|
|
1807
|
-
let isLeft = false;
|
|
1808
|
-
let isTop = false;
|
|
1809
|
-
let isBottom = false;
|
|
1810
|
-
switch (this.options.validOverlays) {
|
|
1811
|
-
case 'all':
|
|
1812
|
-
isRight = xp > 80;
|
|
1813
|
-
isLeft = xp < 20;
|
|
1814
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1815
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1816
|
-
break;
|
|
1817
|
-
case 'vertical':
|
|
1818
|
-
isTop = yp < 50;
|
|
1819
|
-
isBottom = yp >= 50;
|
|
1820
|
-
break;
|
|
1821
|
-
case 'horizontal':
|
|
1822
|
-
isLeft = xp < 50;
|
|
1823
|
-
isRight = xp >= 50;
|
|
1824
|
-
break;
|
|
1825
|
-
}
|
|
1782
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1826
1783
|
const isSmallX = width < 100;
|
|
1827
1784
|
const isSmallY = height < 100;
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1831
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1832
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1833
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1834
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1835
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1836
|
-
if (isRight) {
|
|
1837
|
-
this._state = exports.Position.Right;
|
|
1838
|
-
}
|
|
1839
|
-
else if (isLeft) {
|
|
1840
|
-
this._state = exports.Position.Left;
|
|
1841
|
-
}
|
|
1842
|
-
else if (isTop) {
|
|
1843
|
-
this._state = exports.Position.Top;
|
|
1844
|
-
}
|
|
1845
|
-
else if (isBottom) {
|
|
1846
|
-
this._state = exports.Position.Bottom;
|
|
1847
|
-
}
|
|
1848
|
-
else {
|
|
1849
|
-
this._state = exports.Position.Center;
|
|
1850
|
-
}
|
|
1785
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1786
|
+
this.setState(quadrant);
|
|
1851
1787
|
},
|
|
1852
|
-
onDragLeave: (
|
|
1788
|
+
onDragLeave: () => {
|
|
1853
1789
|
this.removeDropTarget();
|
|
1854
1790
|
},
|
|
1855
|
-
onDragEnd: (
|
|
1791
|
+
onDragEnd: () => {
|
|
1856
1792
|
this.removeDropTarget();
|
|
1857
1793
|
},
|
|
1858
1794
|
onDrop: (e) => {
|
|
@@ -1876,9 +1812,73 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1876
1812
|
this.options.canDisplayOverlay = value;
|
|
1877
1813
|
}
|
|
1878
1814
|
dispose() {
|
|
1879
|
-
this._onDrop.dispose();
|
|
1880
1815
|
this.removeDropTarget();
|
|
1881
1816
|
}
|
|
1817
|
+
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1818
|
+
if (!this.overlay) {
|
|
1819
|
+
return;
|
|
1820
|
+
}
|
|
1821
|
+
const isLeft = quadrant === 'left';
|
|
1822
|
+
const isRight = quadrant === 'right';
|
|
1823
|
+
const isTop = quadrant === 'top';
|
|
1824
|
+
const isBottom = quadrant === 'bottom';
|
|
1825
|
+
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1826
|
+
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1827
|
+
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1828
|
+
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1829
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1830
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1831
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1832
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1833
|
+
}
|
|
1834
|
+
setState(quadrant) {
|
|
1835
|
+
switch (quadrant) {
|
|
1836
|
+
case 'top':
|
|
1837
|
+
this._state = exports.Position.Top;
|
|
1838
|
+
break;
|
|
1839
|
+
case 'left':
|
|
1840
|
+
this._state = exports.Position.Left;
|
|
1841
|
+
break;
|
|
1842
|
+
case 'bottom':
|
|
1843
|
+
this._state = exports.Position.Bottom;
|
|
1844
|
+
break;
|
|
1845
|
+
case 'right':
|
|
1846
|
+
this._state = exports.Position.Right;
|
|
1847
|
+
break;
|
|
1848
|
+
default:
|
|
1849
|
+
this._state = exports.Position.Center;
|
|
1850
|
+
break;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
calculateQuadrant(overlayType, xp, yp) {
|
|
1854
|
+
switch (overlayType) {
|
|
1855
|
+
case 'all':
|
|
1856
|
+
if (xp < 20) {
|
|
1857
|
+
return 'left';
|
|
1858
|
+
}
|
|
1859
|
+
if (xp > 80) {
|
|
1860
|
+
return 'right';
|
|
1861
|
+
}
|
|
1862
|
+
if (yp < 20) {
|
|
1863
|
+
return 'top';
|
|
1864
|
+
}
|
|
1865
|
+
if (yp > 80) {
|
|
1866
|
+
return 'bottom';
|
|
1867
|
+
}
|
|
1868
|
+
break;
|
|
1869
|
+
case 'vertical':
|
|
1870
|
+
if (yp < 50) {
|
|
1871
|
+
return 'top';
|
|
1872
|
+
}
|
|
1873
|
+
return 'bottom';
|
|
1874
|
+
case 'horizontal':
|
|
1875
|
+
if (xp < 50) {
|
|
1876
|
+
return 'left';
|
|
1877
|
+
}
|
|
1878
|
+
return 'right';
|
|
1879
|
+
}
|
|
1880
|
+
return null;
|
|
1881
|
+
}
|
|
1882
1882
|
removeDropTarget() {
|
|
1883
1883
|
if (this.target) {
|
|
1884
1884
|
this._state = undefined;
|
|
@@ -1981,6 +1981,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1981
1981
|
this.view.layout(this.width, this.height);
|
|
1982
1982
|
}
|
|
1983
1983
|
dispose() {
|
|
1984
|
+
this._onDidChange.dispose();
|
|
1984
1985
|
this._disposable.dispose();
|
|
1985
1986
|
}
|
|
1986
1987
|
}
|
|
@@ -1998,7 +1999,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1998
1999
|
this.children = [];
|
|
1999
2000
|
this._onDidChange = new Emitter();
|
|
2000
2001
|
this.onDidChange = this._onDidChange.event;
|
|
2001
|
-
this._childrenDisposable =
|
|
2002
|
+
this._childrenDisposable = Disposable.NONE;
|
|
2002
2003
|
this._orthogonalSize = orthogonalSize;
|
|
2003
2004
|
this._size = size;
|
|
2004
2005
|
this.element = document.createElement('div');
|
|
@@ -2023,7 +2024,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2023
2024
|
: true,
|
|
2024
2025
|
};
|
|
2025
2026
|
}),
|
|
2026
|
-
size: this.
|
|
2027
|
+
size: this.size,
|
|
2027
2028
|
};
|
|
2028
2029
|
this.children = childDescriptors.map((c) => c.node);
|
|
2029
2030
|
this.splitview = new Splitview(this.element, {
|
|
@@ -2032,7 +2033,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2032
2033
|
proportionalLayout,
|
|
2033
2034
|
});
|
|
2034
2035
|
}
|
|
2035
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2036
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
2036
2037
|
this._onDidChange.fire(undefined);
|
|
2037
2038
|
}));
|
|
2038
2039
|
this.setupChildrenEvents();
|
|
@@ -2184,7 +2185,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2184
2185
|
}
|
|
2185
2186
|
setupChildrenEvents() {
|
|
2186
2187
|
this._childrenDisposable.dispose();
|
|
2187
|
-
this._childrenDisposable = exports.Event.any(...this.children.map((c) => c.onDidChange))((
|
|
2188
|
+
this._childrenDisposable = exports.Event.any(...this.children.map((c) => c.onDidChange))(() => {
|
|
2188
2189
|
/**
|
|
2189
2190
|
* indicate a change has occured to allows any re-rendering but don't bubble
|
|
2190
2191
|
* event because that was specific to this branch
|
|
@@ -2204,6 +2205,15 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2204
2205
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2205
2206
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2206
2207
|
*--------------------------------------------------------------------------------------------*/
|
|
2208
|
+
function findLeaf(candiateNode, last) {
|
|
2209
|
+
if (candiateNode instanceof LeafNode) {
|
|
2210
|
+
return candiateNode;
|
|
2211
|
+
}
|
|
2212
|
+
if (candiateNode instanceof BranchNode) {
|
|
2213
|
+
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2214
|
+
}
|
|
2215
|
+
throw new Error('invalid node');
|
|
2216
|
+
}
|
|
2207
2217
|
function flipNode(node, size, orthogonalSize) {
|
|
2208
2218
|
if (node instanceof BranchNode) {
|
|
2209
2219
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2335,6 +2345,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2335
2345
|
this.disposable.dispose();
|
|
2336
2346
|
this._onDidChange.dispose();
|
|
2337
2347
|
this.root.dispose();
|
|
2348
|
+
this.element.remove();
|
|
2338
2349
|
}
|
|
2339
2350
|
clear() {
|
|
2340
2351
|
const orientation = this.root.orientation;
|
|
@@ -2342,13 +2353,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2342
2353
|
}
|
|
2343
2354
|
deserialize(json, deserializer) {
|
|
2344
2355
|
const orientation = json.orientation;
|
|
2345
|
-
const height = json.height;
|
|
2356
|
+
const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
|
|
2346
2357
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2347
2358
|
}
|
|
2348
2359
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2349
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2360
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2350
2361
|
}
|
|
2351
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2362
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2352
2363
|
let result;
|
|
2353
2364
|
if (node.type === 'branch') {
|
|
2354
2365
|
const serializedChildren = node.data;
|
|
@@ -2358,7 +2369,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2358
2369
|
visible: serializedChild.visible,
|
|
2359
2370
|
};
|
|
2360
2371
|
});
|
|
2361
|
-
|
|
2372
|
+
// HORIZONTAL => height=orthogonalsize width=size
|
|
2373
|
+
// VERTICAL => height=size width=orthogonalsize
|
|
2374
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
|
|
2362
2375
|
}
|
|
2363
2376
|
else {
|
|
2364
2377
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2419,15 +2432,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2419
2432
|
if (!(node instanceof LeafNode)) {
|
|
2420
2433
|
throw new Error('invalid location');
|
|
2421
2434
|
}
|
|
2422
|
-
const findLeaf = (candiateNode, last) => {
|
|
2423
|
-
if (candiateNode instanceof LeafNode) {
|
|
2424
|
-
return candiateNode;
|
|
2425
|
-
}
|
|
2426
|
-
if (candiateNode instanceof BranchNode) {
|
|
2427
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2428
|
-
}
|
|
2429
|
-
throw new Error('invalid node');
|
|
2430
|
-
};
|
|
2431
2435
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2432
2436
|
const n = path[i];
|
|
2433
2437
|
const l = location[i] || 0;
|
|
@@ -2529,9 +2533,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2529
2533
|
if (parent.children.length > 1) {
|
|
2530
2534
|
return node.view;
|
|
2531
2535
|
}
|
|
2536
|
+
const sibling = parent.children[0];
|
|
2532
2537
|
if (pathToParent.length === 0) {
|
|
2533
2538
|
// parent is root
|
|
2534
|
-
const sibling = parent.children[0];
|
|
2535
2539
|
if (sibling instanceof LeafNode) {
|
|
2536
2540
|
return node.view;
|
|
2537
2541
|
}
|
|
@@ -2542,10 +2546,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2542
2546
|
}
|
|
2543
2547
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2544
2548
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2545
|
-
const sibling = parent.children[0];
|
|
2546
2549
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2547
2550
|
parent.removeChild(0, sizing);
|
|
2548
|
-
const sizes = grandParent.children.map((
|
|
2551
|
+
const sizes = grandParent.children.map((_size, i) => grandParent.getChildSize(i));
|
|
2549
2552
|
grandParent.removeChild(parentIndex, sizing);
|
|
2550
2553
|
if (sibling instanceof BranchNode) {
|
|
2551
2554
|
sizes.splice(parentIndex, 1, ...sibling.children.map((c) => c.size));
|
|
@@ -2589,31 +2592,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2589
2592
|
}
|
|
2590
2593
|
}
|
|
2591
2594
|
|
|
2592
|
-
/*! *****************************************************************************
|
|
2593
|
-
Copyright (c) Microsoft Corporation.
|
|
2594
|
-
|
|
2595
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2596
|
-
purpose with or without fee is hereby granted.
|
|
2597
|
-
|
|
2598
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2599
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2600
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2601
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2602
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2603
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2604
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2605
|
-
***************************************************************************** */
|
|
2606
|
-
|
|
2607
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2608
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2609
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2610
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2611
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2612
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2613
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2614
|
-
});
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
2595
|
class ContentContainer extends CompositeDisposable {
|
|
2618
2596
|
constructor() {
|
|
2619
2597
|
super();
|
|
@@ -2625,6 +2603,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2625
2603
|
this._element = document.createElement('div');
|
|
2626
2604
|
this._element.className = 'content-container';
|
|
2627
2605
|
this._element.tabIndex = -1;
|
|
2606
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2628
2607
|
// for hosted containers
|
|
2629
2608
|
// 1) register a drop target on the host
|
|
2630
2609
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2668,7 +2647,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2668
2647
|
}
|
|
2669
2648
|
this.disposable.value = disposable;
|
|
2670
2649
|
}
|
|
2671
|
-
layout(
|
|
2650
|
+
layout(_width, _height) {
|
|
2672
2651
|
// noop
|
|
2673
2652
|
}
|
|
2674
2653
|
closePanel() {
|
|
@@ -2691,6 +2670,41 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2691
2670
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2692
2671
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2693
2672
|
|
|
2673
|
+
class DragHandler extends CompositeDisposable {
|
|
2674
|
+
constructor(el) {
|
|
2675
|
+
super();
|
|
2676
|
+
this.el = el;
|
|
2677
|
+
this.disposable = new MutableDisposable();
|
|
2678
|
+
this._onDragStart = new Emitter();
|
|
2679
|
+
this.onDragStart = this._onDragStart.event;
|
|
2680
|
+
this.iframes = [];
|
|
2681
|
+
this.configure();
|
|
2682
|
+
}
|
|
2683
|
+
configure() {
|
|
2684
|
+
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2685
|
+
this.iframes = [
|
|
2686
|
+
...getElementsByTagName('iframe'),
|
|
2687
|
+
...getElementsByTagName('webview'),
|
|
2688
|
+
];
|
|
2689
|
+
for (const iframe of this.iframes) {
|
|
2690
|
+
iframe.style.pointerEvents = 'none';
|
|
2691
|
+
}
|
|
2692
|
+
this.el.classList.add('dragged');
|
|
2693
|
+
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2694
|
+
this.disposable.value = this.getData();
|
|
2695
|
+
if (event.dataTransfer) {
|
|
2696
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2697
|
+
}
|
|
2698
|
+
}), addDisposableListener(this.el, 'dragend', () => {
|
|
2699
|
+
for (const iframe of this.iframes) {
|
|
2700
|
+
iframe.style.pointerEvents = 'auto';
|
|
2701
|
+
}
|
|
2702
|
+
this.iframes = [];
|
|
2703
|
+
this.disposable.dispose();
|
|
2704
|
+
}));
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2694
2708
|
exports.MouseEventKind = void 0;
|
|
2695
2709
|
(function (MouseEventKind) {
|
|
2696
2710
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2700,42 +2714,34 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2700
2714
|
constructor(panelId, accessor, group) {
|
|
2701
2715
|
super();
|
|
2702
2716
|
this.panelId = panelId;
|
|
2703
|
-
this.accessor = accessor;
|
|
2704
2717
|
this.group = group;
|
|
2705
2718
|
this._onChanged = new Emitter();
|
|
2706
2719
|
this.onChanged = this._onChanged.event;
|
|
2707
2720
|
this._onDropped = new Emitter();
|
|
2708
2721
|
this.onDrop = this._onDropped.event;
|
|
2709
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2710
|
-
this.iframes = [];
|
|
2711
2722
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2712
2723
|
this._element = document.createElement('div');
|
|
2713
2724
|
this._element.className = 'tab';
|
|
2714
2725
|
this._element.tabIndex = 0;
|
|
2715
2726
|
this._element.draggable = true;
|
|
2716
|
-
this.addDisposables(
|
|
2717
|
-
|
|
2718
|
-
...
|
|
2719
|
-
|
|
2720
|
-
];
|
|
2721
|
-
for (const iframe of this.iframes) {
|
|
2722
|
-
iframe.style.pointerEvents = 'none';
|
|
2727
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2728
|
+
constructor() {
|
|
2729
|
+
super(...arguments);
|
|
2730
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2723
2731
|
}
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2732
|
+
getData() {
|
|
2733
|
+
this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
|
|
2734
|
+
return {
|
|
2735
|
+
dispose: () => {
|
|
2736
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2737
|
+
},
|
|
2738
|
+
};
|
|
2731
2739
|
}
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
iframe.style.pointerEvents = 'auto';
|
|
2740
|
+
dispose() {
|
|
2741
|
+
//
|
|
2735
2742
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2743
|
+
})(this._element));
|
|
2744
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2739
2745
|
if (event.defaultPrevented) {
|
|
2740
2746
|
return;
|
|
2741
2747
|
}
|
|
@@ -2937,12 +2943,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2937
2943
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2938
2944
|
return;
|
|
2939
2945
|
}
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
});
|
|
2945
|
-
break;
|
|
2946
|
+
if (event.kind === exports.MouseEventKind.CLICK) {
|
|
2947
|
+
this.group.model.openPanel(panel, {
|
|
2948
|
+
skipFocus: alreadyFocused,
|
|
2949
|
+
});
|
|
2946
2950
|
}
|
|
2947
2951
|
}), tabToAdd.onDrop((event) => {
|
|
2948
2952
|
this._onDrop.fire({
|
|
@@ -2971,7 +2975,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2971
2975
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2972
2976
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2973
2977
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2974
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2975
2978
|
})(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
|
|
2976
2979
|
class Groupview extends CompositeDisposable {
|
|
2977
2980
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2992,15 +2995,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2992
2995
|
this.onMove = this._onMove.event;
|
|
2993
2996
|
this._onDidGroupChange = new Emitter();
|
|
2994
2997
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2995
|
-
this.
|
|
2996
|
-
|
|
2997
|
-
return false;
|
|
2998
|
-
}
|
|
2999
|
-
this.doClose(panel);
|
|
3000
|
-
return true;
|
|
3001
|
-
});
|
|
2998
|
+
this._onDidDrop = new Emitter();
|
|
2999
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
3002
3000
|
this.container.classList.add('groupview');
|
|
3003
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
3001
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
3004
3002
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
3005
3003
|
tabHeight: options.tabHeight,
|
|
3006
3004
|
});
|
|
@@ -3064,6 +3062,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3064
3062
|
get maximumWidth() {
|
|
3065
3063
|
return Number.MAX_SAFE_INTEGER;
|
|
3066
3064
|
}
|
|
3065
|
+
get hasWatermark() {
|
|
3066
|
+
return !!(this.watermark && this.container.contains(this.watermark.element));
|
|
3067
|
+
}
|
|
3067
3068
|
initialize() {
|
|
3068
3069
|
var _a, _b;
|
|
3069
3070
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
|
|
@@ -3142,10 +3143,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3142
3143
|
containsPanel(panel) {
|
|
3143
3144
|
return this.panels.includes(panel);
|
|
3144
3145
|
}
|
|
3145
|
-
init(
|
|
3146
|
+
init(_params) {
|
|
3146
3147
|
//noop
|
|
3147
3148
|
}
|
|
3148
|
-
update(
|
|
3149
|
+
update(_params) {
|
|
3149
3150
|
//noop
|
|
3150
3151
|
}
|
|
3151
3152
|
focus() {
|
|
@@ -3157,6 +3158,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3157
3158
|
options.index > this.panels.length) {
|
|
3158
3159
|
options.index = this.panels.length;
|
|
3159
3160
|
}
|
|
3161
|
+
// ensure the group is updated before we fire any events
|
|
3162
|
+
panel.updateParentGroup(this.parent, true);
|
|
3160
3163
|
if (this._activePanel === panel) {
|
|
3161
3164
|
this.accessor.doSetGroupActive(this.parent);
|
|
3162
3165
|
return;
|
|
@@ -3177,43 +3180,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3177
3180
|
return this._removePanel(panelToRemove);
|
|
3178
3181
|
}
|
|
3179
3182
|
closeAllPanels() {
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
const
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
if (this._activePanel && index > -1) {
|
|
3186
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3187
|
-
console.warn('active panel not tracked');
|
|
3188
|
-
}
|
|
3189
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3190
|
-
if (!canClose) {
|
|
3191
|
-
return false;
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3195
|
-
if (i === index) {
|
|
3196
|
-
continue;
|
|
3197
|
-
}
|
|
3198
|
-
const panel = this.panels[i];
|
|
3199
|
-
this.openPanel(panel);
|
|
3200
|
-
if (panel.close) {
|
|
3201
|
-
const canClose = yield panel.close();
|
|
3202
|
-
if (!canClose) {
|
|
3203
|
-
return false;
|
|
3204
|
-
}
|
|
3205
|
-
}
|
|
3206
|
-
}
|
|
3207
|
-
if (this.panels.length > 0) {
|
|
3208
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3209
|
-
const arrPanelCpy = [...this.panels];
|
|
3210
|
-
yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
|
|
3183
|
+
if (this.panels.length > 0) {
|
|
3184
|
+
// take a copy since we will be edting the array as we iterate through
|
|
3185
|
+
const arrPanelCpy = [...this.panels];
|
|
3186
|
+
for (const panel of arrPanelCpy) {
|
|
3187
|
+
this.doClose(panel);
|
|
3211
3188
|
}
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3189
|
+
}
|
|
3190
|
+
else {
|
|
3191
|
+
this.accessor.removeGroup(this.parent);
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
closePanel(panel) {
|
|
3195
|
+
this.doClose(panel);
|
|
3217
3196
|
}
|
|
3218
3197
|
doClose(panel) {
|
|
3219
3198
|
this.accessor.removePanel(panel);
|
|
@@ -3356,8 +3335,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3356
3335
|
this.tabsContainer.show();
|
|
3357
3336
|
}
|
|
3358
3337
|
}
|
|
3359
|
-
canDisplayOverlay(
|
|
3338
|
+
canDisplayOverlay(event, target) {
|
|
3360
3339
|
// custom overlay handler
|
|
3340
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3341
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3342
|
+
}
|
|
3361
3343
|
return false;
|
|
3362
3344
|
}
|
|
3363
3345
|
handleDropEvent(event, position, index) {
|
|
@@ -3382,31 +3364,23 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3382
3364
|
index,
|
|
3383
3365
|
});
|
|
3384
3366
|
}
|
|
3367
|
+
else {
|
|
3368
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3369
|
+
}
|
|
3385
3370
|
}
|
|
3386
3371
|
dispose() {
|
|
3372
|
+
var _a;
|
|
3373
|
+
super.dispose();
|
|
3374
|
+
(_a = this.watermark) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
3387
3375
|
for (const panel of this.panels) {
|
|
3388
3376
|
panel.dispose();
|
|
3389
3377
|
}
|
|
3390
|
-
super.dispose();
|
|
3391
3378
|
this.dropTarget.dispose();
|
|
3392
3379
|
this.tabsContainer.dispose();
|
|
3393
3380
|
this.contentContainer.dispose();
|
|
3394
3381
|
}
|
|
3395
3382
|
}
|
|
3396
3383
|
|
|
3397
|
-
exports.GroupChangeKind = void 0;
|
|
3398
|
-
(function (GroupChangeKind) {
|
|
3399
|
-
GroupChangeKind["ADD_PANEL"] = "ADD_PANEL";
|
|
3400
|
-
GroupChangeKind["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
3401
|
-
GroupChangeKind["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
3402
|
-
//
|
|
3403
|
-
GroupChangeKind["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
3404
|
-
GroupChangeKind["ADD_GROUP"] = "ADD_GROUP";
|
|
3405
|
-
GroupChangeKind["REMOVE_GROUP"] = "REMOVE_GROUP";
|
|
3406
|
-
//
|
|
3407
|
-
GroupChangeKind["LAYOUT_FROM_JSON"] = "LAYOUT_FROM_JSON";
|
|
3408
|
-
GroupChangeKind["LAYOUT"] = "LAYOUT";
|
|
3409
|
-
})(exports.GroupChangeKind || (exports.GroupChangeKind = {}));
|
|
3410
3384
|
const nextLayoutId = sequentialNumberGenerator();
|
|
3411
3385
|
function toTarget(direction) {
|
|
3412
3386
|
switch (direction) {
|
|
@@ -3429,36 +3403,26 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3429
3403
|
this._element = _element;
|
|
3430
3404
|
this._id = nextLayoutId.next();
|
|
3431
3405
|
this._groups = new Map();
|
|
3432
|
-
//
|
|
3433
|
-
this._onGridEvent = new Emitter();
|
|
3434
|
-
this.onGridEvent = this._onGridEvent.event;
|
|
3435
3406
|
this._onDidLayoutChange = new Emitter();
|
|
3436
3407
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3408
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3409
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3410
|
+
this._onDidAddGroup = new Emitter();
|
|
3411
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3412
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3413
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3414
|
+
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3437
3415
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3438
3416
|
this.element.appendChild(this.gridview.element);
|
|
3439
|
-
|
|
3440
|
-
this.layout(0, 0, true);
|
|
3417
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3441
3418
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3442
|
-
this.
|
|
3419
|
+
this._onDidLayoutChange.fire();
|
|
3443
3420
|
}));
|
|
3444
|
-
this.addDisposables((() => {
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
exports.GroupChangeKind.REMOVE_GROUP,
|
|
3450
|
-
exports.GroupChangeKind.ADD_PANEL,
|
|
3451
|
-
exports.GroupChangeKind.REMOVE_PANEL,
|
|
3452
|
-
exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3453
|
-
exports.GroupChangeKind.PANEL_ACTIVE,
|
|
3454
|
-
exports.GroupChangeKind.LAYOUT,
|
|
3455
|
-
].includes(event.kind)) {
|
|
3456
|
-
tickDelayedEvent.fire();
|
|
3457
|
-
}
|
|
3458
|
-
}), tickDelayedEvent.onEvent(() => {
|
|
3459
|
-
this._onDidLayoutChange.fire();
|
|
3460
|
-
}), tickDelayedEvent);
|
|
3461
|
-
})());
|
|
3421
|
+
this.addDisposables(exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3422
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3423
|
+
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3424
|
+
this._onDidLayoutChange.fire();
|
|
3425
|
+
}), this._bufferOnDidLayoutChange);
|
|
3462
3426
|
}
|
|
3463
3427
|
get id() {
|
|
3464
3428
|
return this._id;
|
|
@@ -3495,14 +3459,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3495
3459
|
}
|
|
3496
3460
|
setVisible(panel, visible) {
|
|
3497
3461
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
3498
|
-
this.
|
|
3462
|
+
this._onDidLayoutChange.fire();
|
|
3499
3463
|
}
|
|
3500
3464
|
isVisible(panel) {
|
|
3501
3465
|
return this.gridview.isViewVisible(getGridLocation(panel.element));
|
|
3502
3466
|
}
|
|
3503
3467
|
doAddGroup(group, location = [0], size) {
|
|
3504
3468
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
3505
|
-
this.
|
|
3469
|
+
this._onDidAddGroup.fire(group);
|
|
3506
3470
|
this.doSetGroupActive(group);
|
|
3507
3471
|
}
|
|
3508
3472
|
doRemoveGroup(group, options) {
|
|
@@ -3513,9 +3477,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3513
3477
|
const view = this.gridview.remove(group, exports.Sizing.Distribute);
|
|
3514
3478
|
if (item && !(options === null || options === void 0 ? void 0 : options.skipDispose)) {
|
|
3515
3479
|
item.disposable.dispose();
|
|
3480
|
+
item.value.dispose();
|
|
3516
3481
|
this._groups.delete(group.id);
|
|
3517
3482
|
}
|
|
3518
|
-
this.
|
|
3483
|
+
this._onDidRemoveGroup.fire(group);
|
|
3519
3484
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3520
3485
|
const groups = Array.from(this._groups.values());
|
|
3521
3486
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3543,9 +3508,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3543
3508
|
}
|
|
3544
3509
|
}
|
|
3545
3510
|
this._activeGroup = group;
|
|
3546
|
-
this.
|
|
3547
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3548
|
-
});
|
|
3511
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3549
3512
|
}
|
|
3550
3513
|
removeGroup(group) {
|
|
3551
3514
|
this.doRemoveGroup(group);
|
|
@@ -3601,7 +3564,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3601
3564
|
}
|
|
3602
3565
|
dispose() {
|
|
3603
3566
|
super.dispose();
|
|
3604
|
-
this.
|
|
3567
|
+
this._onDidActiveGroupChange.dispose();
|
|
3568
|
+
this._onDidAddGroup.dispose();
|
|
3569
|
+
this._onDidRemoveGroup.dispose();
|
|
3570
|
+
this._onDidLayoutChange.dispose();
|
|
3571
|
+
for (const group of this.groups) {
|
|
3572
|
+
group.dispose();
|
|
3573
|
+
}
|
|
3605
3574
|
this.gridview.dispose();
|
|
3606
3575
|
}
|
|
3607
3576
|
}
|
|
@@ -3613,15 +3582,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3613
3582
|
constructor(id) {
|
|
3614
3583
|
super();
|
|
3615
3584
|
this.id = id;
|
|
3616
|
-
this._state = {};
|
|
3617
3585
|
this._isFocused = false;
|
|
3618
3586
|
this._isActive = false;
|
|
3619
3587
|
this._isVisible = true;
|
|
3620
3588
|
this._width = 0;
|
|
3621
3589
|
this._height = 0;
|
|
3622
|
-
this._onDidStateChange = new Emitter();
|
|
3623
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3624
|
-
//
|
|
3625
3590
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3626
3591
|
replay: true,
|
|
3627
3592
|
});
|
|
@@ -3650,7 +3615,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3650
3615
|
//
|
|
3651
3616
|
this._onActiveChange = new Emitter();
|
|
3652
3617
|
this.onActiveChange = this._onActiveChange.event;
|
|
3653
|
-
this.addDisposables(this.
|
|
3618
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3654
3619
|
this._isFocused = event.isFocused;
|
|
3655
3620
|
}), this.onDidActiveChange((event) => {
|
|
3656
3621
|
this._isActive = event.isActive;
|
|
@@ -3683,21 +3648,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3683
3648
|
setActive() {
|
|
3684
3649
|
this._onActiveChange.fire();
|
|
3685
3650
|
}
|
|
3686
|
-
setState(key, value) {
|
|
3687
|
-
if (typeof key === 'object') {
|
|
3688
|
-
this._state = key;
|
|
3689
|
-
}
|
|
3690
|
-
else if (typeof value !== undefined) {
|
|
3691
|
-
this._state[key] = value;
|
|
3692
|
-
}
|
|
3693
|
-
this._onDidStateChange.fire(undefined);
|
|
3694
|
-
}
|
|
3695
|
-
getState() {
|
|
3696
|
-
return this._state;
|
|
3697
|
-
}
|
|
3698
|
-
getStateKey(key) {
|
|
3699
|
-
return this._state[key];
|
|
3700
|
-
}
|
|
3701
3651
|
dispose() {
|
|
3702
3652
|
super.dispose();
|
|
3703
3653
|
}
|
|
@@ -3717,6 +3667,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3717
3667
|
//
|
|
3718
3668
|
this._onDidSizeChange = new Emitter();
|
|
3719
3669
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3670
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3720
3671
|
}
|
|
3721
3672
|
setConstraints(value) {
|
|
3722
3673
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3730,19 +3681,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3730
3681
|
constructor(panel, group) {
|
|
3731
3682
|
super(panel.id);
|
|
3732
3683
|
this.panel = panel;
|
|
3733
|
-
this._onDidDirtyChange = new Emitter();
|
|
3734
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3735
3684
|
this._onDidTitleChange = new Emitter();
|
|
3736
3685
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3737
3686
|
this._titleChanged = new Emitter();
|
|
3738
3687
|
this.titleChanged = this._titleChanged.event;
|
|
3739
3688
|
this._suppressClosableChanged = new Emitter();
|
|
3740
3689
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3741
|
-
this.
|
|
3742
|
-
this.
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3690
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3691
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3692
|
+
this._onDidGroupChange = new Emitter();
|
|
3693
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3694
|
+
this.disposable = new MutableDisposable();
|
|
3695
|
+
this.group = group;
|
|
3696
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3746
3697
|
}
|
|
3747
3698
|
get title() {
|
|
3748
3699
|
return this.panel.title;
|
|
@@ -3755,7 +3706,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3755
3706
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3756
3707
|
}
|
|
3757
3708
|
set group(value) {
|
|
3709
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3758
3710
|
this._group = value;
|
|
3711
|
+
this._onDidGroupChange.fire();
|
|
3712
|
+
if (this._group) {
|
|
3713
|
+
this.disposable.value = this._group.api.onDidActiveChange(() => {
|
|
3714
|
+
this._onDidActiveGroupChange.fire();
|
|
3715
|
+
});
|
|
3716
|
+
if (this.isGroupActive !== isOldGroupActive) {
|
|
3717
|
+
this._onDidActiveGroupChange.fire();
|
|
3718
|
+
}
|
|
3719
|
+
}
|
|
3759
3720
|
}
|
|
3760
3721
|
get group() {
|
|
3761
3722
|
return this._group;
|
|
@@ -3769,16 +3730,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3769
3730
|
}
|
|
3770
3731
|
return this.group.model.closePanel(this.panel);
|
|
3771
3732
|
}
|
|
3772
|
-
interceptOnCloseAction(interceptor) {
|
|
3773
|
-
this._interceptor = interceptor;
|
|
3774
|
-
}
|
|
3775
|
-
dispose() {
|
|
3776
|
-
super.dispose();
|
|
3777
|
-
}
|
|
3778
3733
|
}
|
|
3779
3734
|
|
|
3780
3735
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3781
|
-
constructor(id, containerApi) {
|
|
3736
|
+
constructor(id, accessor, containerApi) {
|
|
3782
3737
|
super();
|
|
3783
3738
|
this.id = id;
|
|
3784
3739
|
this.containerApi = containerApi;
|
|
@@ -3786,14 +3741,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3786
3741
|
this._suppressClosable = false;
|
|
3787
3742
|
this._title = '';
|
|
3788
3743
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3789
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3790
3744
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3791
|
-
|
|
3745
|
+
accessor.setActivePanel(this);
|
|
3792
3746
|
}), this.api.onDidTitleChange((event) => {
|
|
3793
3747
|
const title = event.title;
|
|
3794
3748
|
this.update({ params: { title } });
|
|
3795
3749
|
}));
|
|
3796
3750
|
}
|
|
3751
|
+
get params() {
|
|
3752
|
+
var _a;
|
|
3753
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
3754
|
+
}
|
|
3797
3755
|
get title() {
|
|
3798
3756
|
return this._title;
|
|
3799
3757
|
}
|
|
@@ -3812,32 +3770,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3812
3770
|
this._view = params.view;
|
|
3813
3771
|
this.setTitle(params.title);
|
|
3814
3772
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3815
|
-
if (params.state) {
|
|
3816
|
-
this.api.setState(params.state);
|
|
3817
|
-
}
|
|
3818
3773
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3819
3774
|
}
|
|
3820
3775
|
focus() {
|
|
3821
3776
|
this.api._onFocusEvent.fire();
|
|
3822
3777
|
}
|
|
3823
|
-
setDirty(isDirty) {
|
|
3824
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3825
|
-
}
|
|
3826
|
-
close() {
|
|
3827
|
-
if (this.api.tryClose) {
|
|
3828
|
-
return this.api.tryClose();
|
|
3829
|
-
}
|
|
3830
|
-
return Promise.resolve(true);
|
|
3831
|
-
}
|
|
3832
3778
|
toJSON() {
|
|
3833
|
-
const state = this.api.getState();
|
|
3834
3779
|
return {
|
|
3835
3780
|
id: this.id,
|
|
3836
3781
|
view: this.view.toJSON(),
|
|
3837
3782
|
params: Object.keys(this._params || {}).length > 0
|
|
3838
3783
|
? this._params
|
|
3839
3784
|
: undefined,
|
|
3840
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3841
3785
|
suppressClosable: this.suppressClosable || undefined,
|
|
3842
3786
|
title: this.title,
|
|
3843
3787
|
};
|
|
@@ -3882,18 +3826,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3882
3826
|
var _a;
|
|
3883
3827
|
this._group = group;
|
|
3884
3828
|
this.api.group = group;
|
|
3885
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3886
|
-
var _a;
|
|
3887
|
-
if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
|
|
3888
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3889
|
-
this.api._onDidActiveChange.fire({
|
|
3890
|
-
isActive: isGroupActive && isVisible,
|
|
3891
|
-
});
|
|
3892
|
-
this.api._onDidVisibilityChange.fire({
|
|
3893
|
-
isVisible,
|
|
3894
|
-
});
|
|
3895
|
-
}
|
|
3896
|
-
});
|
|
3897
3829
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3898
3830
|
this.api._onDidActiveChange.fire({
|
|
3899
3831
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -3968,7 +3900,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3968
3900
|
get id() {
|
|
3969
3901
|
return 'watermark';
|
|
3970
3902
|
}
|
|
3971
|
-
update(
|
|
3903
|
+
update(_event) {
|
|
3972
3904
|
// noop
|
|
3973
3905
|
}
|
|
3974
3906
|
focus() {
|
|
@@ -3977,17 +3909,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3977
3909
|
toJSON() {
|
|
3978
3910
|
return {};
|
|
3979
3911
|
}
|
|
3980
|
-
layout(
|
|
3912
|
+
layout(_width, _height) {
|
|
3981
3913
|
// noop
|
|
3982
3914
|
}
|
|
3983
3915
|
init(params) {
|
|
3984
3916
|
this.params = params;
|
|
3985
|
-
this.addDisposables(this.params.containerApi.onDidLayoutChange((
|
|
3917
|
+
this.addDisposables(this.params.containerApi.onDidLayoutChange(() => {
|
|
3986
3918
|
this.render();
|
|
3987
3919
|
}));
|
|
3988
3920
|
this.render();
|
|
3989
3921
|
}
|
|
3990
|
-
updateParentGroup(group,
|
|
3922
|
+
updateParentGroup(group, _visible) {
|
|
3991
3923
|
this.group = group;
|
|
3992
3924
|
this.render();
|
|
3993
3925
|
}
|
|
@@ -4003,15 +3935,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4003
3935
|
}
|
|
4004
3936
|
}
|
|
4005
3937
|
|
|
4006
|
-
function debounce(cb, wait) {
|
|
4007
|
-
let timeout;
|
|
4008
|
-
const callable = (...args) => {
|
|
4009
|
-
clearTimeout(timeout);
|
|
4010
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
4011
|
-
};
|
|
4012
|
-
return callable;
|
|
4013
|
-
}
|
|
4014
|
-
|
|
4015
3938
|
class DefaultDeserializer {
|
|
4016
3939
|
constructor(layout, panelDeserializer) {
|
|
4017
3940
|
this.layout = layout;
|
|
@@ -4112,9 +4035,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4112
4035
|
this._isGroupActive = false;
|
|
4113
4036
|
//
|
|
4114
4037
|
this.params = {};
|
|
4115
|
-
//
|
|
4116
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4117
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4118
4038
|
this._element = document.createElement('div');
|
|
4119
4039
|
this._element.className = 'default-tab';
|
|
4120
4040
|
//
|
|
@@ -4159,10 +4079,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4159
4079
|
init(params) {
|
|
4160
4080
|
this.params = params;
|
|
4161
4081
|
this._content.textContent = params.title;
|
|
4162
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4163
|
-
const isDirty = event;
|
|
4164
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4165
|
-
});
|
|
4166
4082
|
if (!this.params.suppressClosable) {
|
|
4167
4083
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4168
4084
|
ev.preventDefault(); //
|
|
@@ -4178,7 +4094,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4178
4094
|
this._isGroupActive = group.isActive;
|
|
4179
4095
|
this.render();
|
|
4180
4096
|
}
|
|
4181
|
-
layout(
|
|
4097
|
+
layout(_width, _height) {
|
|
4182
4098
|
// noop
|
|
4183
4099
|
}
|
|
4184
4100
|
render() {
|
|
@@ -4216,6 +4132,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4216
4132
|
get height() {
|
|
4217
4133
|
return this._height;
|
|
4218
4134
|
}
|
|
4135
|
+
get params() {
|
|
4136
|
+
var _a;
|
|
4137
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4138
|
+
}
|
|
4219
4139
|
focus() {
|
|
4220
4140
|
this.api._onFocusEvent.fire();
|
|
4221
4141
|
}
|
|
@@ -4224,34 +4144,34 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4224
4144
|
this._height = height;
|
|
4225
4145
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4226
4146
|
if (this.part) {
|
|
4227
|
-
if (this.
|
|
4228
|
-
this.part.update(this.
|
|
4147
|
+
if (this._params) {
|
|
4148
|
+
this.part.update(this._params.params);
|
|
4229
4149
|
}
|
|
4230
4150
|
}
|
|
4231
4151
|
}
|
|
4232
4152
|
init(parameters) {
|
|
4233
|
-
this.
|
|
4153
|
+
this._params = parameters;
|
|
4234
4154
|
this.part = this.getComponent();
|
|
4235
4155
|
}
|
|
4236
4156
|
update(event) {
|
|
4237
4157
|
var _a, _b;
|
|
4238
|
-
this.
|
|
4239
|
-
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.
|
|
4158
|
+
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) });
|
|
4159
|
+
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
|
|
4240
4160
|
}
|
|
4241
4161
|
toJSON() {
|
|
4242
4162
|
var _a, _b;
|
|
4243
|
-
const
|
|
4244
|
-
const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4163
|
+
const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4245
4164
|
return {
|
|
4246
4165
|
id: this.id,
|
|
4247
4166
|
component: this.component,
|
|
4248
4167
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4249
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4250
4168
|
};
|
|
4251
4169
|
}
|
|
4252
4170
|
dispose() {
|
|
4171
|
+
var _a;
|
|
4253
4172
|
super.dispose();
|
|
4254
4173
|
this.api.dispose();
|
|
4174
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
4255
4175
|
}
|
|
4256
4176
|
}
|
|
4257
4177
|
|
|
@@ -4269,12 +4189,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4269
4189
|
this._snap = false;
|
|
4270
4190
|
this._onDidChange = new Emitter();
|
|
4271
4191
|
this.onDidChange = this._onDidChange.event;
|
|
4272
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4192
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4273
4193
|
const { isVisible } = event;
|
|
4274
|
-
const { containerApi } = this.
|
|
4194
|
+
const { containerApi } = this._params;
|
|
4275
4195
|
containerApi.setVisible(this, isVisible);
|
|
4276
4196
|
}), this.api.onActiveChange(() => {
|
|
4277
|
-
const { containerApi } = this.
|
|
4197
|
+
const { containerApi } = this._params;
|
|
4278
4198
|
containerApi.setActive(this);
|
|
4279
4199
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4280
4200
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4389,9 +4309,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4389
4309
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4390
4310
|
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 });
|
|
4391
4311
|
}
|
|
4392
|
-
dispose() {
|
|
4393
|
-
super.dispose();
|
|
4394
|
-
}
|
|
4395
4312
|
}
|
|
4396
4313
|
|
|
4397
4314
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4498,15 +4415,24 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4498
4415
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4499
4416
|
styles: options.styles,
|
|
4500
4417
|
});
|
|
4501
|
-
this._panels = new Map();
|
|
4502
|
-
this.dirtyPanels = new Set();
|
|
4503
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4504
4418
|
// events
|
|
4505
4419
|
this._onTabInteractionEvent = new Emitter();
|
|
4506
4420
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4507
4421
|
this._onTabContextMenu = new Emitter();
|
|
4508
4422
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4509
|
-
this.
|
|
4423
|
+
this._onDidDrop = new Emitter();
|
|
4424
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
4425
|
+
this._onDidRemovePanel = new Emitter();
|
|
4426
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4427
|
+
this._onDidAddPanel = new Emitter();
|
|
4428
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4429
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4430
|
+
this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
|
|
4431
|
+
this._onDidActivePanelChange = new Emitter();
|
|
4432
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4433
|
+
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop, exports.Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
4434
|
+
this._bufferOnDidLayoutChange.fire();
|
|
4435
|
+
}));
|
|
4510
4436
|
this._options = options;
|
|
4511
4437
|
if (!this.options.components) {
|
|
4512
4438
|
this.options.components = {};
|
|
@@ -4527,10 +4453,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4527
4453
|
this._api = new DockviewApi(this);
|
|
4528
4454
|
}
|
|
4529
4455
|
get totalPanels() {
|
|
4530
|
-
return this.
|
|
4456
|
+
return this.panels.length;
|
|
4531
4457
|
}
|
|
4532
4458
|
get panels() {
|
|
4533
|
-
return
|
|
4459
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4534
4460
|
}
|
|
4535
4461
|
get deserializer() {
|
|
4536
4462
|
return this._deserializer;
|
|
@@ -4560,10 +4486,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4560
4486
|
updateOptions(options) {
|
|
4561
4487
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4562
4488
|
this.options.orientation !== options.orientation;
|
|
4563
|
-
// TODO support style update
|
|
4564
|
-
// const hasStylesChanged =
|
|
4565
|
-
// typeof options.styles === 'object' &&
|
|
4566
|
-
// this.options.styles !== options.styles;
|
|
4567
4489
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4568
4490
|
if (hasOrientationChanged) {
|
|
4569
4491
|
this.gridview.orientation = options.orientation;
|
|
@@ -4575,8 +4497,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4575
4497
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4576
4498
|
}
|
|
4577
4499
|
getGroupPanel(id) {
|
|
4578
|
-
|
|
4579
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4500
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4580
4501
|
}
|
|
4581
4502
|
setActivePanel(panel) {
|
|
4582
4503
|
if (!panel.group) {
|
|
@@ -4625,24 +4546,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4625
4546
|
this.doSetGroupActive(next);
|
|
4626
4547
|
}
|
|
4627
4548
|
}
|
|
4628
|
-
registerPanel(panel) {
|
|
4629
|
-
if (this._panels.has(panel.id)) {
|
|
4630
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4631
|
-
}
|
|
4632
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4633
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4634
|
-
}
|
|
4635
|
-
unregisterPanel(panel) {
|
|
4636
|
-
if (!this._panels.has(panel.id)) {
|
|
4637
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4638
|
-
}
|
|
4639
|
-
const item = this._panels.get(panel.id);
|
|
4640
|
-
if (item) {
|
|
4641
|
-
item.disposable.dispose();
|
|
4642
|
-
item.value.dispose();
|
|
4643
|
-
}
|
|
4644
|
-
this._panels.delete(panel.id);
|
|
4645
|
-
}
|
|
4646
4549
|
/**
|
|
4647
4550
|
* Serialize the current state of the layout
|
|
4648
4551
|
*
|
|
@@ -4650,12 +4553,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4650
4553
|
*/
|
|
4651
4554
|
toJSON() {
|
|
4652
4555
|
var _a;
|
|
4653
|
-
this.syncConfigs();
|
|
4654
4556
|
const data = this.gridview.serialize();
|
|
4655
|
-
const panels =
|
|
4656
|
-
|
|
4657
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4658
|
-
}
|
|
4557
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4558
|
+
collection[panel.id] = panel.toJSON();
|
|
4659
4559
|
return collection;
|
|
4660
4560
|
}, {});
|
|
4661
4561
|
return {
|
|
@@ -4666,13 +4566,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4666
4566
|
};
|
|
4667
4567
|
}
|
|
4668
4568
|
fromJSON(data) {
|
|
4569
|
+
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
4570
|
+
for (const group of groups) {
|
|
4571
|
+
// remove the group will automatically remove the panels
|
|
4572
|
+
this.removeGroup(group, true);
|
|
4573
|
+
}
|
|
4669
4574
|
this.gridview.clear();
|
|
4670
|
-
this._panels.forEach((panel) => {
|
|
4671
|
-
panel.disposable.dispose();
|
|
4672
|
-
panel.value.dispose();
|
|
4673
|
-
});
|
|
4674
|
-
this._panels.clear();
|
|
4675
|
-
this._groups.clear();
|
|
4676
4575
|
if (!this.deserializer) {
|
|
4677
4576
|
throw new Error('invalid deserializer');
|
|
4678
4577
|
}
|
|
@@ -4686,9 +4585,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4686
4585
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4687
4586
|
createPanel: (id) => {
|
|
4688
4587
|
const panelData = panels[id];
|
|
4689
|
-
|
|
4690
|
-
this.registerPanel(panel);
|
|
4691
|
-
return panel;
|
|
4588
|
+
return this.deserializer.fromJSON(panelData);
|
|
4692
4589
|
},
|
|
4693
4590
|
}));
|
|
4694
4591
|
if (typeof activeGroup === 'string') {
|
|
@@ -4698,36 +4595,31 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4698
4595
|
}
|
|
4699
4596
|
}
|
|
4700
4597
|
this.gridview.layout(this.width, this.height);
|
|
4701
|
-
this.
|
|
4598
|
+
this._onDidLayoutfromJSON.fire();
|
|
4702
4599
|
}
|
|
4703
4600
|
closeAllGroups() {
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
if (!didCloseAll) {
|
|
4709
|
-
return false;
|
|
4710
|
-
}
|
|
4711
|
-
}
|
|
4712
|
-
return true;
|
|
4713
|
-
});
|
|
4601
|
+
for (const entry of this._groups.entries()) {
|
|
4602
|
+
const [_, group] = entry;
|
|
4603
|
+
group.value.model.closeAllPanels();
|
|
4604
|
+
}
|
|
4714
4605
|
}
|
|
4715
4606
|
fireMouseEvent(event) {
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
}
|
|
4725
|
-
break;
|
|
4607
|
+
if (event.kind === exports.MouseEventKind.CONTEXT_MENU) {
|
|
4608
|
+
if (event.tab && event.panel) {
|
|
4609
|
+
this._onTabContextMenu.fire({
|
|
4610
|
+
event: event.event,
|
|
4611
|
+
api: this._api,
|
|
4612
|
+
panel: event.panel,
|
|
4613
|
+
});
|
|
4614
|
+
}
|
|
4726
4615
|
}
|
|
4727
4616
|
}
|
|
4728
4617
|
addPanel(options) {
|
|
4729
4618
|
var _a, _b;
|
|
4730
|
-
|
|
4619
|
+
if (this.panels.find((_) => _.id === options.id)) {
|
|
4620
|
+
throw new Error(`panel with id ${options.id} already exists`);
|
|
4621
|
+
}
|
|
4622
|
+
const panel = this.createPanel(options);
|
|
4731
4623
|
let referenceGroup;
|
|
4732
4624
|
if ((_a = options.position) === null || _a === void 0 ? void 0 : _a.referencePanel) {
|
|
4733
4625
|
const referencePanel = this.getGroupPanel(options.position.referencePanel);
|
|
@@ -4755,14 +4647,20 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4755
4647
|
}
|
|
4756
4648
|
return panel;
|
|
4757
4649
|
}
|
|
4758
|
-
removePanel(panel
|
|
4759
|
-
|
|
4650
|
+
removePanel(panel, options = {
|
|
4651
|
+
removeEmptyGroup: true,
|
|
4652
|
+
skipDispose: false,
|
|
4653
|
+
}) {
|
|
4760
4654
|
const group = panel.group;
|
|
4761
4655
|
if (!group) {
|
|
4762
4656
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
4763
4657
|
}
|
|
4764
4658
|
group.model.removePanel(panel);
|
|
4765
|
-
|
|
4659
|
+
panel.dispose();
|
|
4660
|
+
const retainGroupForWatermark = this.size === 1;
|
|
4661
|
+
if (!retainGroupForWatermark &&
|
|
4662
|
+
group.model.size === 0 &&
|
|
4663
|
+
options.removeEmptyGroup) {
|
|
4766
4664
|
this.removeGroup(group);
|
|
4767
4665
|
}
|
|
4768
4666
|
}
|
|
@@ -4775,10 +4673,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4775
4673
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4776
4674
|
}
|
|
4777
4675
|
addEmptyGroup(options) {
|
|
4778
|
-
var _a;
|
|
4779
4676
|
const group = this.createGroup();
|
|
4780
4677
|
if (options) {
|
|
4781
|
-
const referencePanel =
|
|
4678
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4782
4679
|
if (!referencePanel) {
|
|
4783
4680
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4784
4681
|
}
|
|
@@ -4795,25 +4692,24 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4795
4692
|
this.doAddGroup(group);
|
|
4796
4693
|
}
|
|
4797
4694
|
}
|
|
4798
|
-
removeGroup(group) {
|
|
4695
|
+
removeGroup(group, skipActive = false) {
|
|
4799
4696
|
const panels = [...group.model.panels]; // reassign since group panels will mutate
|
|
4800
|
-
|
|
4801
|
-
this.removePanel(panel
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
return;
|
|
4697
|
+
for (const panel of panels) {
|
|
4698
|
+
this.removePanel(panel, {
|
|
4699
|
+
removeEmptyGroup: false,
|
|
4700
|
+
skipDispose: false,
|
|
4701
|
+
});
|
|
4806
4702
|
}
|
|
4807
|
-
super.
|
|
4703
|
+
super.doRemoveGroup(group, { skipActive });
|
|
4808
4704
|
}
|
|
4809
4705
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4810
|
-
var _a
|
|
4706
|
+
var _a;
|
|
4811
4707
|
const sourceGroup = groupId
|
|
4812
4708
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4813
4709
|
: undefined;
|
|
4814
4710
|
if (!target || target === exports.Position.Center) {
|
|
4815
4711
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4816
|
-
|
|
4712
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4817
4713
|
if (!groupItem) {
|
|
4818
4714
|
throw new Error(`No panel with id ${itemId}`);
|
|
4819
4715
|
}
|
|
@@ -4849,7 +4745,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4849
4745
|
}
|
|
4850
4746
|
else {
|
|
4851
4747
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4852
|
-
|
|
4748
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4853
4749
|
if (!groupItem) {
|
|
4854
4750
|
throw new Error(`No panel with id ${itemId}`);
|
|
4855
4751
|
}
|
|
@@ -4863,10 +4759,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4863
4759
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4864
4760
|
super.doSetGroupActive(group, skipFocus);
|
|
4865
4761
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
4866
|
-
this.
|
|
4867
|
-
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4868
|
-
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4869
|
-
});
|
|
4762
|
+
this._onDidActivePanelChange.fire((_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel);
|
|
4870
4763
|
}
|
|
4871
4764
|
}
|
|
4872
4765
|
createGroup(options) {
|
|
@@ -4888,35 +4781,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4888
4781
|
}
|
|
4889
4782
|
}
|
|
4890
4783
|
const view = new GroupviewPanel(this, id, options);
|
|
4784
|
+
view.init({ params: {}, containerApi: null }); // required to initialized .part and allow for correct disposal of group
|
|
4891
4785
|
if (!this._groups.has(view.id)) {
|
|
4892
4786
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4893
4787
|
const { groupId, itemId, target, index } = event;
|
|
4894
4788
|
this.moveGroupOrPanel(view, groupId, itemId, target, index);
|
|
4789
|
+
}), view.model.onDidDrop((event) => {
|
|
4790
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
|
|
4895
4791
|
}), view.model.onDidGroupChange((event) => {
|
|
4896
4792
|
switch (event.kind) {
|
|
4897
4793
|
case exports.GroupChangeKind2.ADD_PANEL:
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
});
|
|
4902
|
-
break;
|
|
4903
|
-
case exports.GroupChangeKind2.GROUP_ACTIVE:
|
|
4904
|
-
this._onGridEvent.fire({
|
|
4905
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
4906
|
-
panel: event.panel,
|
|
4907
|
-
});
|
|
4794
|
+
if (event.panel) {
|
|
4795
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4796
|
+
}
|
|
4908
4797
|
break;
|
|
4909
4798
|
case exports.GroupChangeKind2.REMOVE_PANEL:
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
});
|
|
4799
|
+
if (event.panel) {
|
|
4800
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4801
|
+
}
|
|
4914
4802
|
break;
|
|
4915
4803
|
case exports.GroupChangeKind2.PANEL_ACTIVE:
|
|
4916
|
-
this.
|
|
4917
|
-
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4918
|
-
panel: event.panel,
|
|
4919
|
-
});
|
|
4804
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4920
4805
|
break;
|
|
4921
4806
|
}
|
|
4922
4807
|
}));
|
|
@@ -4930,44 +4815,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4930
4815
|
}
|
|
4931
4816
|
return view;
|
|
4932
4817
|
}
|
|
4933
|
-
|
|
4934
|
-
super.dispose();
|
|
4935
|
-
this._onGridEvent.dispose();
|
|
4936
|
-
}
|
|
4937
|
-
/**
|
|
4938
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4939
|
-
*/
|
|
4940
|
-
syncConfigs() {
|
|
4941
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4942
|
-
if (dirtyPanels.length === 0) ;
|
|
4943
|
-
this.dirtyPanels.clear();
|
|
4944
|
-
const partialPanelState = dirtyPanels
|
|
4945
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4946
|
-
.filter((_) => !!_)
|
|
4947
|
-
.reduce((collection, panel) => {
|
|
4948
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4949
|
-
return collection;
|
|
4950
|
-
}, {});
|
|
4951
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4952
|
-
dirtyPanels
|
|
4953
|
-
.filter((p) => this._panels.has(p.id))
|
|
4954
|
-
.forEach((panel) => {
|
|
4955
|
-
panel.setDirty(false);
|
|
4956
|
-
});
|
|
4957
|
-
}
|
|
4958
|
-
_addPanel(options) {
|
|
4818
|
+
createPanel(options) {
|
|
4959
4819
|
const view = new DefaultGroupPanelView({
|
|
4960
4820
|
content: this.createContentComponent(options.id, options.component),
|
|
4961
4821
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4962
4822
|
});
|
|
4963
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4823
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4964
4824
|
panel.init({
|
|
4965
4825
|
view,
|
|
4966
4826
|
title: options.title || options.id,
|
|
4967
4827
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4968
4828
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4969
4829
|
});
|
|
4970
|
-
this.registerPanel(panel);
|
|
4971
4830
|
return panel;
|
|
4972
4831
|
}
|
|
4973
4832
|
createContentComponent(id, componentName) {
|
|
@@ -4987,10 +4846,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4987
4846
|
var _a;
|
|
4988
4847
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4989
4848
|
}
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
this.
|
|
4849
|
+
dispose() {
|
|
4850
|
+
super.dispose();
|
|
4851
|
+
this._onDidActivePanelChange.dispose();
|
|
4852
|
+
this._onDidAddPanel.dispose();
|
|
4853
|
+
this._onDidRemovePanel.dispose();
|
|
4854
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4994
4855
|
}
|
|
4995
4856
|
}
|
|
4996
4857
|
|
|
@@ -5001,6 +4862,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5001
4862
|
orientation: options.orientation,
|
|
5002
4863
|
styles: options.styles,
|
|
5003
4864
|
});
|
|
4865
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4866
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5004
4867
|
this._options = options;
|
|
5005
4868
|
if (!this.options.components) {
|
|
5006
4869
|
this.options.components = {};
|
|
@@ -5053,7 +4916,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5053
4916
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
5054
4917
|
}
|
|
5055
4918
|
setActive(panel) {
|
|
5056
|
-
this._groups.forEach((value,
|
|
4919
|
+
this._groups.forEach((value, _key) => {
|
|
5057
4920
|
value.value.setActive(panel === value.value);
|
|
5058
4921
|
});
|
|
5059
4922
|
}
|
|
@@ -5066,8 +4929,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5066
4929
|
}
|
|
5067
4930
|
fromJSON(serializedGridview, deferComponentLayout) {
|
|
5068
4931
|
const { grid, activePanel } = serializedGridview;
|
|
4932
|
+
const groups = Array.from(this._groups.values()); // reassign since group panels will mutate
|
|
4933
|
+
for (const group of groups) {
|
|
4934
|
+
group.disposable.dispose();
|
|
4935
|
+
this.doRemoveGroup(group.value, { skipActive: true });
|
|
4936
|
+
}
|
|
5069
4937
|
this.gridview.clear();
|
|
5070
|
-
this._groups.clear();
|
|
5071
4938
|
const queue = [];
|
|
5072
4939
|
this.gridview.deserialize(grid, {
|
|
5073
4940
|
fromJSON: (node) => {
|
|
@@ -5108,7 +4975,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5108
4975
|
this.doSetGroupActive(panel);
|
|
5109
4976
|
}
|
|
5110
4977
|
}
|
|
5111
|
-
this.
|
|
4978
|
+
this._onDidLayoutfromJSON.fire();
|
|
5112
4979
|
}
|
|
5113
4980
|
movePanel(panel, options) {
|
|
5114
4981
|
var _a;
|
|
@@ -5164,7 +5031,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5164
5031
|
});
|
|
5165
5032
|
this.registerPanel(view);
|
|
5166
5033
|
this.doAddGroup(view, relativeLocation, options.size);
|
|
5167
|
-
return { api: view.api };
|
|
5168
5034
|
}
|
|
5169
5035
|
registerPanel(panel) {
|
|
5170
5036
|
const disposable = new CompositeDisposable(panel.api.onDidFocusChange((event) => {
|
|
@@ -5215,14 +5081,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5215
5081
|
}
|
|
5216
5082
|
removeGroup(group) {
|
|
5217
5083
|
super.removeGroup(group);
|
|
5218
|
-
const panel = this._groups.get(group.id);
|
|
5219
|
-
if (panel) {
|
|
5220
|
-
panel.disposable.dispose();
|
|
5221
|
-
this._groups.delete(group.id);
|
|
5222
|
-
}
|
|
5223
5084
|
}
|
|
5224
5085
|
dispose() {
|
|
5225
5086
|
super.dispose();
|
|
5087
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5226
5088
|
}
|
|
5227
5089
|
}
|
|
5228
5090
|
|
|
@@ -5249,7 +5111,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5249
5111
|
options.frameworkComponents = {};
|
|
5250
5112
|
}
|
|
5251
5113
|
this.splitview = new Splitview(this.element, options);
|
|
5252
|
-
this.addDisposables(this._disposable);
|
|
5114
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5253
5115
|
}
|
|
5254
5116
|
get options() {
|
|
5255
5117
|
return this._options;
|
|
@@ -5325,7 +5187,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5325
5187
|
}
|
|
5326
5188
|
removePanel(panel, sizing) {
|
|
5327
5189
|
const disposable = this.panels.get(panel.id);
|
|
5328
|
-
|
|
5190
|
+
if (!disposable) {
|
|
5191
|
+
throw new Error(`unknown splitview panel ${panel.id}`);
|
|
5192
|
+
}
|
|
5193
|
+
disposable.disposable.dispose();
|
|
5194
|
+
disposable.value.dispose();
|
|
5329
5195
|
this.panels.delete(panel.id);
|
|
5330
5196
|
const index = this.getPanels().findIndex((_) => _ === panel);
|
|
5331
5197
|
this.splitview.removeView(index, sizing);
|
|
@@ -5384,7 +5250,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5384
5250
|
}
|
|
5385
5251
|
this.setActive(view, true);
|
|
5386
5252
|
});
|
|
5387
|
-
this.panels.set(view.id, disposable);
|
|
5253
|
+
this.panels.set(view.id, { disposable, value: view });
|
|
5388
5254
|
}
|
|
5389
5255
|
toJSON() {
|
|
5390
5256
|
var _a;
|
|
@@ -5408,6 +5274,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5408
5274
|
}
|
|
5409
5275
|
fromJSON(serializedSplitview, deferComponentLayout = false) {
|
|
5410
5276
|
const { views, orientation, size, activeView } = serializedSplitview;
|
|
5277
|
+
for (const [_, value] of this.panels.entries()) {
|
|
5278
|
+
value.disposable.dispose();
|
|
5279
|
+
value.value.dispose();
|
|
5280
|
+
}
|
|
5281
|
+
this.panels.clear();
|
|
5411
5282
|
this.splitview.dispose();
|
|
5412
5283
|
const queue = [];
|
|
5413
5284
|
this.splitview = new Splitview(this.element, {
|
|
@@ -5463,49 +5334,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5463
5334
|
}
|
|
5464
5335
|
}
|
|
5465
5336
|
dispose() {
|
|
5466
|
-
|
|
5467
|
-
value.dispose();
|
|
5468
|
-
|
|
5337
|
+
for (const [_, value] of this.panels.entries()) {
|
|
5338
|
+
value.disposable.dispose();
|
|
5339
|
+
value.value.dispose();
|
|
5340
|
+
}
|
|
5469
5341
|
this.panels.clear();
|
|
5342
|
+
this.splitview.dispose();
|
|
5470
5343
|
super.dispose();
|
|
5471
5344
|
}
|
|
5472
5345
|
}
|
|
5473
5346
|
|
|
5474
|
-
class DragHandler extends CompositeDisposable {
|
|
5475
|
-
constructor(el) {
|
|
5476
|
-
super();
|
|
5477
|
-
this.el = el;
|
|
5478
|
-
this.iframes = [];
|
|
5479
|
-
this._onDragStart = new Emitter();
|
|
5480
|
-
this.onDragStart = this._onDragStart.event;
|
|
5481
|
-
this.configure();
|
|
5482
|
-
}
|
|
5483
|
-
configure() {
|
|
5484
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5485
|
-
var _a;
|
|
5486
|
-
this.iframes = [
|
|
5487
|
-
...getElementsByTagName('iframe'),
|
|
5488
|
-
...getElementsByTagName('webview'),
|
|
5489
|
-
];
|
|
5490
|
-
for (const iframe of this.iframes) {
|
|
5491
|
-
iframe.style.pointerEvents = 'none';
|
|
5492
|
-
}
|
|
5493
|
-
this.el.classList.add('dragged');
|
|
5494
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5495
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5496
|
-
this.disposable = this.getData();
|
|
5497
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5498
|
-
var _a;
|
|
5499
|
-
for (const iframe of this.iframes) {
|
|
5500
|
-
iframe.style.pointerEvents = 'auto';
|
|
5501
|
-
}
|
|
5502
|
-
this.iframes = [];
|
|
5503
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5504
|
-
this.disposable = undefined;
|
|
5505
|
-
}));
|
|
5506
|
-
}
|
|
5507
|
-
}
|
|
5508
|
-
|
|
5509
5347
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5510
5348
|
//
|
|
5511
5349
|
constructor(id) {
|
|
@@ -5520,6 +5358,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5520
5358
|
//
|
|
5521
5359
|
this._onDidSizeChange = new Emitter();
|
|
5522
5360
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5361
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5523
5362
|
}
|
|
5524
5363
|
setConstraints(value) {
|
|
5525
5364
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5527,11 +5366,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5527
5366
|
setSize(event) {
|
|
5528
5367
|
this._onDidSizeChange.fire(event);
|
|
5529
5368
|
}
|
|
5530
|
-
dispose() {
|
|
5531
|
-
super.dispose();
|
|
5532
|
-
this._onDidConstraintsChange.dispose();
|
|
5533
|
-
this._onDidSizeChange.dispose();
|
|
5534
|
-
}
|
|
5535
5369
|
}
|
|
5536
5370
|
|
|
5537
5371
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5545,6 +5379,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5545
5379
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5546
5380
|
this._onMouseLeave = new Emitter({});
|
|
5547
5381
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5382
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5548
5383
|
}
|
|
5549
5384
|
set pane(pane) {
|
|
5550
5385
|
this._pane = pane;
|
|
@@ -5713,7 +5548,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5713
5548
|
}
|
|
5714
5549
|
}
|
|
5715
5550
|
toJSON() {
|
|
5716
|
-
const params = this.
|
|
5551
|
+
const params = this._params;
|
|
5717
5552
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5718
5553
|
}
|
|
5719
5554
|
renderOnce() {
|
|
@@ -5773,7 +5608,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5773
5608
|
})(this.header);
|
|
5774
5609
|
this.target = new Droptarget(this.element, {
|
|
5775
5610
|
validOverlays: 'vertical',
|
|
5776
|
-
canDisplayOverlay: (
|
|
5611
|
+
canDisplayOverlay: () => {
|
|
5777
5612
|
const data = getPaneData();
|
|
5778
5613
|
if (!data) {
|
|
5779
5614
|
return true;
|
|
@@ -5782,36 +5617,39 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5782
5617
|
},
|
|
5783
5618
|
});
|
|
5784
5619
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5785
|
-
|
|
5786
|
-
if (!data) {
|
|
5787
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5788
|
-
return;
|
|
5789
|
-
}
|
|
5790
|
-
const containerApi = this.params
|
|
5791
|
-
.containerApi;
|
|
5792
|
-
const panelId = data.paneId;
|
|
5793
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5794
|
-
if (!existingPanel) {
|
|
5795
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5796
|
-
return;
|
|
5797
|
-
}
|
|
5798
|
-
const allPanels = containerApi.getPanels();
|
|
5799
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5800
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5801
|
-
if (event.position === exports.Position.Left ||
|
|
5802
|
-
event.position === exports.Position.Top) {
|
|
5803
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5804
|
-
}
|
|
5805
|
-
if (event.position === exports.Position.Right ||
|
|
5806
|
-
event.position === exports.Position.Bottom) {
|
|
5807
|
-
if (fromIndex > toIndex) {
|
|
5808
|
-
toIndex++;
|
|
5809
|
-
}
|
|
5810
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5811
|
-
}
|
|
5812
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5620
|
+
this.onDrop(event);
|
|
5813
5621
|
}));
|
|
5814
5622
|
}
|
|
5623
|
+
onDrop(event) {
|
|
5624
|
+
const data = getPaneData();
|
|
5625
|
+
if (!data) {
|
|
5626
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5627
|
+
return;
|
|
5628
|
+
}
|
|
5629
|
+
const containerApi = this._params
|
|
5630
|
+
.containerApi;
|
|
5631
|
+
const panelId = data.paneId;
|
|
5632
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
5633
|
+
if (!existingPanel) {
|
|
5634
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5635
|
+
return;
|
|
5636
|
+
}
|
|
5637
|
+
const allPanels = containerApi.getPanels();
|
|
5638
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5639
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5640
|
+
if (event.position === exports.Position.Left ||
|
|
5641
|
+
event.position === exports.Position.Top) {
|
|
5642
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
5643
|
+
}
|
|
5644
|
+
if (event.position === exports.Position.Right ||
|
|
5645
|
+
event.position === exports.Position.Bottom) {
|
|
5646
|
+
if (fromIndex > toIndex) {
|
|
5647
|
+
toIndex++;
|
|
5648
|
+
}
|
|
5649
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5650
|
+
}
|
|
5651
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
5652
|
+
}
|
|
5815
5653
|
}
|
|
5816
5654
|
|
|
5817
5655
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5841,7 +5679,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5841
5679
|
this._expander.textContent = e.isExpanded ? '<' : '>';
|
|
5842
5680
|
});
|
|
5843
5681
|
}
|
|
5844
|
-
update(
|
|
5682
|
+
update(_params) {
|
|
5845
5683
|
//
|
|
5846
5684
|
}
|
|
5847
5685
|
dispose() {
|
|
@@ -5867,6 +5705,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5867
5705
|
super();
|
|
5868
5706
|
this.element = element;
|
|
5869
5707
|
this._disposable = new MutableDisposable();
|
|
5708
|
+
this._viewDisposables = new Map();
|
|
5870
5709
|
this._onDidLayoutChange = new Emitter();
|
|
5871
5710
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5872
5711
|
this._onDidDrop = new Emitter();
|
|
@@ -5875,6 +5714,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5875
5714
|
this.onDidAddView = this._onDidAddView.event;
|
|
5876
5715
|
this._onDidRemoveView = new Emitter();
|
|
5877
5716
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5717
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5878
5718
|
this._options = options;
|
|
5879
5719
|
if (!options.components) {
|
|
5880
5720
|
options.components = {};
|
|
@@ -5950,9 +5790,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5950
5790
|
isExpanded: !!options.isExpanded,
|
|
5951
5791
|
disableDnd: !!this.options.disableDnd,
|
|
5952
5792
|
});
|
|
5953
|
-
|
|
5954
|
-
this._onDidDrop.fire(event);
|
|
5955
|
-
}));
|
|
5793
|
+
this.doAddPanel(view);
|
|
5956
5794
|
const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
|
|
5957
5795
|
const index = typeof options.index === 'number' ? options.index : undefined;
|
|
5958
5796
|
view.init({
|
|
@@ -5965,7 +5803,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5965
5803
|
});
|
|
5966
5804
|
this.paneview.addPane(view, size, index);
|
|
5967
5805
|
view.orientation = this.paneview.orientation;
|
|
5968
|
-
return
|
|
5806
|
+
return view;
|
|
5969
5807
|
}
|
|
5970
5808
|
getPanels() {
|
|
5971
5809
|
return this.paneview.getPanes();
|
|
@@ -5974,6 +5812,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5974
5812
|
const views = this.getPanels();
|
|
5975
5813
|
const index = views.findIndex((_) => _ === panel);
|
|
5976
5814
|
this.paneview.removePane(index);
|
|
5815
|
+
this.doRemovePanel(panel);
|
|
5977
5816
|
}
|
|
5978
5817
|
movePanel(from, to) {
|
|
5979
5818
|
this.paneview.moveView(from, to);
|
|
@@ -6023,6 +5862,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6023
5862
|
fromJSON(serializedPaneview, deferComponentLayout) {
|
|
6024
5863
|
const { views, size } = serializedPaneview;
|
|
6025
5864
|
const queue = [];
|
|
5865
|
+
for (const [_, value] of this._viewDisposables.entries()) {
|
|
5866
|
+
value.dispose();
|
|
5867
|
+
}
|
|
5868
|
+
this._viewDisposables.clear();
|
|
6026
5869
|
this.paneview.dispose();
|
|
6027
5870
|
this.paneview = new Paneview(this.element, {
|
|
6028
5871
|
orientation: exports.Orientation.VERTICAL,
|
|
@@ -6058,9 +5901,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6058
5901
|
isExpanded: !!view.expanded,
|
|
6059
5902
|
disableDnd: !!this.options.disableDnd,
|
|
6060
5903
|
});
|
|
6061
|
-
|
|
6062
|
-
this._onDidDrop.fire(event);
|
|
6063
|
-
});
|
|
5904
|
+
this.doAddPanel(panel);
|
|
6064
5905
|
queue.push(() => {
|
|
6065
5906
|
panel.init({
|
|
6066
5907
|
params: data.params || {},
|
|
@@ -6090,6 +5931,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6090
5931
|
queue.forEach((f) => f());
|
|
6091
5932
|
}
|
|
6092
5933
|
}
|
|
5934
|
+
doAddPanel(panel) {
|
|
5935
|
+
const disposable = panel.onDidDrop((event) => {
|
|
5936
|
+
this._onDidDrop.fire(event);
|
|
5937
|
+
});
|
|
5938
|
+
this._viewDisposables.set(panel.id, disposable);
|
|
5939
|
+
}
|
|
5940
|
+
doRemovePanel(panel) {
|
|
5941
|
+
const disposable = this._viewDisposables.get(panel.id);
|
|
5942
|
+
if (disposable) {
|
|
5943
|
+
disposable.dispose();
|
|
5944
|
+
this._viewDisposables.delete(panel.id);
|
|
5945
|
+
}
|
|
5946
|
+
}
|
|
5947
|
+
dispose() {
|
|
5948
|
+
super.dispose();
|
|
5949
|
+
for (const [_, value] of this._viewDisposables.entries()) {
|
|
5950
|
+
value.dispose();
|
|
5951
|
+
}
|
|
5952
|
+
this._viewDisposables.clear();
|
|
5953
|
+
this.paneview.dispose();
|
|
5954
|
+
}
|
|
6093
5955
|
}
|
|
6094
5956
|
|
|
6095
5957
|
class SplitviewPanel extends BasePanelView {
|
|
@@ -6102,12 +5964,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6102
5964
|
this._snap = false;
|
|
6103
5965
|
this._onDidChange = new Emitter();
|
|
6104
5966
|
this.onDidChange = this._onDidChange.event;
|
|
6105
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5967
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6106
5968
|
const { isVisible } = event;
|
|
6107
|
-
const { containerApi } = this
|
|
5969
|
+
const { containerApi } = this
|
|
5970
|
+
._params;
|
|
6108
5971
|
containerApi.setVisible(this, isVisible);
|
|
6109
5972
|
}), this.api.onActiveChange(() => {
|
|
6110
|
-
const { containerApi } = this
|
|
5973
|
+
const { containerApi } = this
|
|
5974
|
+
._params;
|
|
6111
5975
|
containerApi.setActive(this);
|
|
6112
5976
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6113
5977
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6250,14 +6114,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6250
6114
|
if (this.disposed) {
|
|
6251
6115
|
throw new Error('invalid operation: resource is already disposed');
|
|
6252
6116
|
}
|
|
6253
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6254
6117
|
if (typeof this.component !== 'function') {
|
|
6255
6118
|
/**
|
|
6256
6119
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6257
6120
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6258
6121
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6259
6122
|
*/
|
|
6260
|
-
throw new Error('
|
|
6123
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6261
6124
|
}
|
|
6262
6125
|
const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
|
|
6263
6126
|
component: this
|
|
@@ -6315,22 +6178,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6315
6178
|
this.id = id;
|
|
6316
6179
|
this.component = component;
|
|
6317
6180
|
this.reactPortalStore = reactPortalStore;
|
|
6318
|
-
// private hostedContainer: HostedContainer;
|
|
6319
6181
|
this._onDidFocus = new Emitter();
|
|
6320
6182
|
this.onDidFocus = this._onDidFocus.event;
|
|
6321
6183
|
this._onDidBlur = new Emitter();
|
|
6322
6184
|
this.onDidBlur = this._onDidBlur.event;
|
|
6323
6185
|
this._element = document.createElement('div');
|
|
6324
|
-
this._element.
|
|
6325
|
-
this._element.style.width = '100%';
|
|
6326
|
-
// this.hostedContainer = new HostedContainer({
|
|
6327
|
-
// id,
|
|
6328
|
-
// });
|
|
6329
|
-
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6330
|
-
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6186
|
+
this._element.className = 'dockview-react-part';
|
|
6331
6187
|
this._actionsElement = document.createElement('div');
|
|
6332
|
-
this._actionsElement.
|
|
6333
|
-
this._actionsElement.style.width = '100%';
|
|
6188
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6334
6189
|
}
|
|
6335
6190
|
get element() {
|
|
6336
6191
|
return this._element;
|
|
@@ -6363,23 +6218,20 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6363
6218
|
var _a;
|
|
6364
6219
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
6365
6220
|
}
|
|
6366
|
-
updateParentGroup(group,
|
|
6221
|
+
updateParentGroup(group, _isPanelVisible) {
|
|
6367
6222
|
this._group = group;
|
|
6368
6223
|
}
|
|
6369
|
-
layout(
|
|
6224
|
+
layout(_width, _height) {
|
|
6370
6225
|
// noop
|
|
6371
|
-
// this.hostedContainer.layout(
|
|
6372
|
-
// this.element
|
|
6373
|
-
// // { width, height }
|
|
6374
|
-
// );
|
|
6375
6226
|
}
|
|
6376
6227
|
close() {
|
|
6377
6228
|
return Promise.resolve(true);
|
|
6378
6229
|
}
|
|
6379
6230
|
dispose() {
|
|
6380
6231
|
var _a, _b;
|
|
6232
|
+
this._onDidFocus.dispose();
|
|
6233
|
+
this._onDidBlur.dispose();
|
|
6381
6234
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6382
|
-
// this.hostedContainer?.dispose();
|
|
6383
6235
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
6384
6236
|
}
|
|
6385
6237
|
}
|
|
@@ -6390,6 +6242,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6390
6242
|
this.component = component;
|
|
6391
6243
|
this.reactPortalStore = reactPortalStore;
|
|
6392
6244
|
this._element = document.createElement('div');
|
|
6245
|
+
this._element.className = 'dockview-react-part';
|
|
6393
6246
|
}
|
|
6394
6247
|
get element() {
|
|
6395
6248
|
return this._element;
|
|
@@ -6413,10 +6266,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6413
6266
|
id: this.id,
|
|
6414
6267
|
};
|
|
6415
6268
|
}
|
|
6416
|
-
layout(
|
|
6269
|
+
layout(_width, _height) {
|
|
6417
6270
|
// noop - retrieval from api
|
|
6418
6271
|
}
|
|
6419
|
-
updateParentGroup(
|
|
6272
|
+
updateParentGroup(_group, _isPanelVisible) {
|
|
6420
6273
|
// noop - retrieval from api
|
|
6421
6274
|
}
|
|
6422
6275
|
dispose() {
|
|
@@ -6434,7 +6287,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6434
6287
|
const panelId = panelData.id;
|
|
6435
6288
|
const params = panelData.params;
|
|
6436
6289
|
const title = panelData.title;
|
|
6437
|
-
const state = panelData.state;
|
|
6438
6290
|
const suppressClosable = panelData.suppressClosable;
|
|
6439
6291
|
const viewData = panelData.view;
|
|
6440
6292
|
const view = new DefaultGroupPanelView({
|
|
@@ -6443,13 +6295,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6443
6295
|
? 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)
|
|
6444
6296
|
: new DefaultTab(),
|
|
6445
6297
|
});
|
|
6446
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6298
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6447
6299
|
panel.init({
|
|
6448
6300
|
view,
|
|
6449
6301
|
title,
|
|
6450
6302
|
suppressClosable,
|
|
6451
6303
|
params: params || {},
|
|
6452
|
-
state: state || {},
|
|
6453
6304
|
});
|
|
6454
6305
|
return panel;
|
|
6455
6306
|
}
|
|
@@ -6464,8 +6315,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6464
6315
|
value: undefined,
|
|
6465
6316
|
};
|
|
6466
6317
|
this._element = document.createElement('div');
|
|
6467
|
-
this._element.
|
|
6468
|
-
this._element.style.width = '100%';
|
|
6318
|
+
this._element.className = 'dockview-react-part';
|
|
6469
6319
|
}
|
|
6470
6320
|
get element() {
|
|
6471
6321
|
return this._element;
|
|
@@ -6498,10 +6348,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6498
6348
|
id: this.id,
|
|
6499
6349
|
};
|
|
6500
6350
|
}
|
|
6501
|
-
layout(
|
|
6351
|
+
layout(_width, _height) {
|
|
6502
6352
|
// noop - retrieval from api
|
|
6503
6353
|
}
|
|
6504
|
-
updateParentGroup(group,
|
|
6354
|
+
updateParentGroup(group, _isPanelVisible) {
|
|
6505
6355
|
// noop - retrieval from api
|
|
6506
6356
|
this._groupRef.value = group;
|
|
6507
6357
|
}
|
|
@@ -6535,21 +6385,21 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6535
6385
|
var _a;
|
|
6536
6386
|
const factory = {
|
|
6537
6387
|
content: {
|
|
6538
|
-
createComponent: (
|
|
6388
|
+
createComponent: (_id, componentId, component) => {
|
|
6539
6389
|
return new ReactPanelContentPart(componentId, component, {
|
|
6540
6390
|
addPortal,
|
|
6541
6391
|
});
|
|
6542
6392
|
},
|
|
6543
6393
|
},
|
|
6544
6394
|
tab: {
|
|
6545
|
-
createComponent: (
|
|
6395
|
+
createComponent: (_id, componentId, component) => {
|
|
6546
6396
|
return new ReactPanelHeaderPart(componentId, component, {
|
|
6547
6397
|
addPortal,
|
|
6548
6398
|
});
|
|
6549
6399
|
},
|
|
6550
6400
|
},
|
|
6551
6401
|
watermark: {
|
|
6552
|
-
createComponent: (
|
|
6402
|
+
createComponent: (_id, componentId, component) => {
|
|
6553
6403
|
return new ReactWatermarkPart(componentId, component, {
|
|
6554
6404
|
addPortal,
|
|
6555
6405
|
});
|
|
@@ -6563,7 +6413,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6563
6413
|
frameworkTabComponents: props.tabComponents,
|
|
6564
6414
|
tabHeight: props.tabHeight,
|
|
6565
6415
|
debug: props.debug,
|
|
6566
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6567
6416
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6568
6417
|
styles: props.hideBorders
|
|
6569
6418
|
? { separatorBorder: 'transparent' }
|
|
@@ -6579,8 +6428,24 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6579
6428
|
dockviewRef.current = dockview;
|
|
6580
6429
|
return () => {
|
|
6581
6430
|
dockview.dispose();
|
|
6431
|
+
element.remove();
|
|
6582
6432
|
};
|
|
6583
6433
|
}, []);
|
|
6434
|
+
React__namespace.useEffect(() => {
|
|
6435
|
+
if (!dockviewRef.current) {
|
|
6436
|
+
return () => {
|
|
6437
|
+
// noop
|
|
6438
|
+
};
|
|
6439
|
+
}
|
|
6440
|
+
const disposable = dockviewRef.current.onDidDrop((event) => {
|
|
6441
|
+
if (props.onDidDrop) {
|
|
6442
|
+
props.onDidDrop(event);
|
|
6443
|
+
}
|
|
6444
|
+
});
|
|
6445
|
+
return () => {
|
|
6446
|
+
disposable.dispose();
|
|
6447
|
+
};
|
|
6448
|
+
}, [props.onDidDrop]);
|
|
6584
6449
|
React__namespace.useEffect(() => {
|
|
6585
6450
|
if (!dockviewRef.current) {
|
|
6586
6451
|
return;
|
|
@@ -6589,6 +6454,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6589
6454
|
frameworkComponents: props.components,
|
|
6590
6455
|
});
|
|
6591
6456
|
}, [props.components]);
|
|
6457
|
+
React__namespace.useEffect(() => {
|
|
6458
|
+
if (!dockviewRef.current) {
|
|
6459
|
+
return;
|
|
6460
|
+
}
|
|
6461
|
+
dockviewRef.current.updateOptions({
|
|
6462
|
+
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6463
|
+
});
|
|
6464
|
+
}, [props.watermarkComponent]);
|
|
6465
|
+
React__namespace.useEffect(() => {
|
|
6466
|
+
if (!dockviewRef.current) {
|
|
6467
|
+
return;
|
|
6468
|
+
}
|
|
6469
|
+
dockviewRef.current.updateOptions({
|
|
6470
|
+
showDndOverlay: props.showDndOverlay,
|
|
6471
|
+
});
|
|
6472
|
+
}, [props.showDndOverlay]);
|
|
6592
6473
|
React__namespace.useEffect(() => {
|
|
6593
6474
|
if (!dockviewRef.current) {
|
|
6594
6475
|
return;
|
|
@@ -6677,9 +6558,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6677
6558
|
getComponent() {
|
|
6678
6559
|
var _a;
|
|
6679
6560
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6680
|
-
params: ((_a = this.
|
|
6561
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6681
6562
|
api: this.api,
|
|
6682
|
-
containerApi: this.
|
|
6563
|
+
containerApi: this._params
|
|
6683
6564
|
.containerApi,
|
|
6684
6565
|
});
|
|
6685
6566
|
}
|
|
@@ -6716,7 +6597,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6716
6597
|
});
|
|
6717
6598
|
},
|
|
6718
6599
|
},
|
|
6719
|
-
proportionalLayout: props.proportionalLayout
|
|
6600
|
+
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
6601
|
+
? props.proportionalLayout
|
|
6602
|
+
: true,
|
|
6720
6603
|
styles: props.hideBorders
|
|
6721
6604
|
? { separatorBorder: 'transparent' }
|
|
6722
6605
|
: undefined,
|
|
@@ -6752,9 +6635,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6752
6635
|
getComponent() {
|
|
6753
6636
|
var _a;
|
|
6754
6637
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6755
|
-
params: ((_a = this.
|
|
6638
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6756
6639
|
api: this.api,
|
|
6757
|
-
containerApi: this.
|
|
6640
|
+
containerApi: this._params
|
|
6758
6641
|
.containerApi,
|
|
6759
6642
|
});
|
|
6760
6643
|
}
|
|
@@ -6784,7 +6667,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6784
6667
|
var _a;
|
|
6785
6668
|
const element = document.createElement('div');
|
|
6786
6669
|
const gridview = new GridviewComponent(element, {
|
|
6787
|
-
proportionalLayout:
|
|
6670
|
+
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
6671
|
+
? props.proportionalLayout
|
|
6672
|
+
: true,
|
|
6788
6673
|
orientation: props.orientation,
|
|
6789
6674
|
frameworkComponents: props.components,
|
|
6790
6675
|
frameworkComponentFactory: {
|
|
@@ -6807,6 +6692,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6807
6692
|
gridviewRef.current = gridview;
|
|
6808
6693
|
return () => {
|
|
6809
6694
|
gridview.dispose();
|
|
6695
|
+
element.remove();
|
|
6810
6696
|
};
|
|
6811
6697
|
}, []);
|
|
6812
6698
|
React__namespace.useEffect(() => {
|
|
@@ -6877,7 +6763,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6877
6763
|
};
|
|
6878
6764
|
}, [props.disableAutoResizing]);
|
|
6879
6765
|
React__namespace.useEffect(() => {
|
|
6880
|
-
const createComponent = (id,
|
|
6766
|
+
const createComponent = (id, _componentId, component) => new PanePanelSection(id, component, {
|
|
6881
6767
|
addPortal,
|
|
6882
6768
|
});
|
|
6883
6769
|
const paneview = new PaneviewComponent(domRef.current, {
|
|
@@ -6943,14 +6829,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6943
6829
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
6944
6830
|
|
|
6945
6831
|
exports.BaseGrid = BaseGrid;
|
|
6946
|
-
exports.CompositeDisposable = CompositeDisposable;
|
|
6947
6832
|
exports.ContentContainer = ContentContainer;
|
|
6948
|
-
exports.DATA_KEY = DATA_KEY;
|
|
6949
6833
|
exports.DockviewApi = DockviewApi;
|
|
6950
6834
|
exports.DockviewComponent = DockviewComponent;
|
|
6951
6835
|
exports.DockviewComponents = DockviewComponents;
|
|
6952
6836
|
exports.DockviewReact = DockviewReact;
|
|
6953
|
-
exports.Emitter = Emitter;
|
|
6954
6837
|
exports.Gridview = Gridview;
|
|
6955
6838
|
exports.GridviewApi = GridviewApi;
|
|
6956
6839
|
exports.GridviewComponent = GridviewComponent;
|
|
@@ -6958,7 +6841,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6958
6841
|
exports.GridviewReact = GridviewReact;
|
|
6959
6842
|
exports.Groupview = Groupview;
|
|
6960
6843
|
exports.LocalSelectionTransfer = LocalSelectionTransfer;
|
|
6961
|
-
exports.MutableDisposable = MutableDisposable;
|
|
6962
6844
|
exports.PaneFramework = PaneFramework;
|
|
6963
6845
|
exports.PaneTransfer = PaneTransfer;
|
|
6964
6846
|
exports.PanelTransfer = PanelTransfer;
|
|
@@ -6977,10 +6859,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6977
6859
|
exports.SplitviewPanel = SplitviewPanel;
|
|
6978
6860
|
exports.SplitviewReact = SplitviewReact;
|
|
6979
6861
|
exports.Tab = Tab$1;
|
|
6980
|
-
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6981
|
-
exports.addDisposableListener = addDisposableListener;
|
|
6982
|
-
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6983
|
-
exports.extractData = extractData;
|
|
6984
6862
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6985
6863
|
exports.getGridLocation = getGridLocation;
|
|
6986
6864
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6988,11 +6866,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6988
6866
|
exports.getPanelData = getPanelData;
|
|
6989
6867
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6990
6868
|
exports.indexInParent = indexInParent;
|
|
6991
|
-
exports.isCustomDragEvent = isCustomDragEvent;
|
|
6992
6869
|
exports.isGridBranchNode = isGridBranchNode;
|
|
6993
|
-
exports.isPanelTransferEvent = isPanelTransferEvent;
|
|
6994
6870
|
exports.isReactElement = isReactElement;
|
|
6995
|
-
exports.isTabDragEvent = isTabDragEvent;
|
|
6996
6871
|
exports.orthogonal = orthogonal;
|
|
6997
6872
|
exports.toTarget = toTarget;
|
|
6998
6873
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|