dockview 1.0.1 → 1.1.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 +32 -17
- package/dist/cjs/api/component.api.js +155 -28
- 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 +3 -3
- package/dist/cjs/dnd/abstractDragHandler.js +15 -14
- 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 +4 -5
- package/dist/cjs/dnd/droptarget.js +70 -46
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -8
- package/dist/cjs/dockview/components/tab/defaultTab.js.map +1 -1
- package/dist/cjs/dockview/defaultGroupPanelView.js +3 -1
- package/dist/cjs/dockview/defaultGroupPanelView.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +27 -19
- package/dist/cjs/dockview/dockviewComponent.js +67 -178
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +2 -5
- package/dist/cjs/dockview/dockviewGroupPanel.js +2 -31
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +2 -1
- package/dist/cjs/events.d.ts +7 -0
- package/dist/cjs/events.js +47 -5
- package/dist/cjs/events.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/cjs/gridview/baseComponentGridview.js +20 -15
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/basePanelView.d.ts +5 -8
- package/dist/cjs/gridview/basePanelView.js +14 -8
- package/dist/cjs/gridview/basePanelView.js.map +1 -1
- package/dist/cjs/gridview/branchNode.js +1 -1
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.js +19 -18
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts +4 -0
- package/dist/cjs/gridview/gridviewComponent.js +5 -0
- 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 +1 -0
- package/dist/cjs/gridview/leafNode.js.map +1 -1
- package/dist/cjs/groupview/groupPanel.d.ts +0 -7
- package/dist/cjs/groupview/groupview.d.ts +15 -8
- package/dist/cjs/groupview/groupview.js +38 -125
- 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.js +1 -0
- 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 +6 -8
- package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/index.d.ts +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/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 +1 -1
- package/dist/cjs/paneview/paneview.js +2 -5
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +6 -5
- package/dist/cjs/paneview/paneviewComponent.js +11 -16
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/paneview/paneviewPanel.d.ts +5 -1
- package/dist/cjs/paneview/paneviewPanel.js +14 -2
- 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/dockview.d.ts +9 -9
- package/dist/cjs/react/dockview/dockview.js +14 -1
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/dockview/reactContentPart.js +4 -4
- package/dist/cjs/react/dockview/reactContentPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactHeaderPart.js +1 -0
- package/dist/cjs/react/dockview/reactHeaderPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactWatermarkPart.d.ts +1 -2
- package/dist/cjs/react/dockview/reactWatermarkPart.js +1 -2
- package/dist/cjs/react/dockview/reactWatermarkPart.js.map +1 -1
- 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.map +1 -1
- package/dist/cjs/react/react.js +1 -2
- package/dist/cjs/react/react.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 +9 -6
- package/dist/cjs/splitview/splitviewComponent.js +11 -1
- 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 +480 -567
- package/dist/dockview.amd.min.js +2 -16
- package/dist/dockview.amd.min.noStyle.js +2 -16
- package/dist/dockview.amd.noStyle.js +479 -566
- package/dist/dockview.cjs.js +480 -567
- package/dist/dockview.esm.js +480 -563
- package/dist/dockview.esm.min.js +2 -16
- package/dist/dockview.js +480 -567
- package/dist/dockview.min.js +2 -16
- package/dist/dockview.min.noStyle.js +2 -16
- package/dist/dockview.noStyle.js +479 -566
- package/dist/esm/api/component.api.d.ts +32 -17
- package/dist/esm/api/component.api.js +71 -20
- 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 +3 -3
- package/dist/esm/dnd/abstractDragHandler.js +9 -8
- 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 +4 -5
- package/dist/esm/dnd/droptarget.js +70 -46
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/esm/dockview/components/tab/defaultTab.js +1 -9
- package/dist/esm/dockview/defaultGroupPanelView.js +3 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +27 -19
- package/dist/esm/dockview/dockviewComponent.js +54 -118
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +2 -5
- package/dist/esm/dockview/dockviewGroupPanel.js +2 -30
- package/dist/esm/dockview/options.d.ts +2 -1
- package/dist/esm/events.d.ts +7 -0
- package/dist/esm/events.js +20 -3
- package/dist/esm/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/esm/gridview/baseComponentGridview.js +21 -16
- package/dist/esm/gridview/basePanelView.d.ts +5 -8
- package/dist/esm/gridview/basePanelView.js +10 -8
- package/dist/esm/gridview/branchNode.js +1 -1
- package/dist/esm/gridview/gridview.js +16 -16
- package/dist/esm/gridview/gridviewComponent.d.ts +4 -0
- package/dist/esm/gridview/gridviewComponent.js +5 -0
- 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 +0 -7
- package/dist/esm/groupview/groupview.d.ts +15 -8
- package/dist/esm/groupview/groupview.js +24 -58
- package/dist/esm/groupview/groupviewPanel.d.ts +5 -2
- package/dist/esm/groupview/panel/content.js +1 -0
- package/dist/esm/groupview/tab.d.ts +10 -13
- package/dist/esm/groupview/tab.js +17 -24
- package/dist/esm/groupview/titlebar/tabsContainer.js +6 -8
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/lifecycle.js +2 -1
- package/dist/esm/panel/types.d.ts +0 -2
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +32 -29
- package/dist/esm/paneview/paneview.d.ts +1 -1
- package/dist/esm/paneview/paneview.js +2 -5
- package/dist/esm/paneview/paneviewComponent.d.ts +6 -5
- package/dist/esm/paneview/paneviewComponent.js +11 -8
- package/dist/esm/paneview/paneviewPanel.d.ts +5 -1
- package/dist/esm/paneview/paneviewPanel.js +10 -2
- 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 +15 -2
- package/dist/esm/react/dockview/reactContentPart.js +4 -4
- package/dist/esm/react/dockview/reactHeaderPart.js +1 -0
- package/dist/esm/react/dockview/reactWatermarkPart.d.ts +1 -2
- package/dist/esm/react/dockview/reactWatermarkPart.js +1 -2
- package/dist/esm/react/gridview/view.js +2 -2
- package/dist/esm/react/index.d.ts +1 -0
- package/dist/esm/react/react.js +1 -2
- 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 +9 -6
- package/dist/esm/splitview/splitviewComponent.js +10 -2
- package/dist/esm/splitview/splitviewPanel.d.ts +1 -6
- package/dist/esm/splitview/splitviewPanel.js +5 -3
- package/dist/styles/dockview.css +5 -9
- package/package.json +4 -4
- 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.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.0
|
|
3
|
+
* @version 1.1.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -34,7 +34,7 @@ function styleInject(css, ref) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
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}";
|
|
37
|
+
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 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.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}";
|
|
38
38
|
styleInject(css_248z);
|
|
39
39
|
|
|
40
40
|
var Event;
|
|
@@ -67,7 +67,6 @@ class Emitter {
|
|
|
67
67
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
|
|
68
68
|
listener(this._last);
|
|
69
69
|
}
|
|
70
|
-
this._listeners.length === 0;
|
|
71
70
|
this._listeners.push(listener);
|
|
72
71
|
return {
|
|
73
72
|
dispose: () => {
|
|
@@ -83,9 +82,9 @@ class Emitter {
|
|
|
83
82
|
}
|
|
84
83
|
fire(e) {
|
|
85
84
|
this._last = e;
|
|
86
|
-
this._listeners
|
|
85
|
+
for (const listener of this._listeners) {
|
|
87
86
|
listener(e);
|
|
88
|
-
}
|
|
87
|
+
}
|
|
89
88
|
}
|
|
90
89
|
dispose() {
|
|
91
90
|
this._listeners = [];
|
|
@@ -107,6 +106,24 @@ function addDisposableListener(element, type, listener, options) {
|
|
|
107
106
|
element.removeEventListener(type, listener);
|
|
108
107
|
},
|
|
109
108
|
};
|
|
109
|
+
}
|
|
110
|
+
class TickDelayedEvent {
|
|
111
|
+
constructor() {
|
|
112
|
+
this._onFired = new Emitter();
|
|
113
|
+
this.onEvent = this._onFired.event;
|
|
114
|
+
}
|
|
115
|
+
fire() {
|
|
116
|
+
if (this.timer) {
|
|
117
|
+
clearTimeout(this.timer);
|
|
118
|
+
}
|
|
119
|
+
this.timer = setTimeout(() => {
|
|
120
|
+
this._onFired.fire();
|
|
121
|
+
clearTimeout(this.timer);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
dispose() {
|
|
125
|
+
this._onFired.dispose();
|
|
126
|
+
}
|
|
110
127
|
}
|
|
111
128
|
|
|
112
129
|
var Disposable;
|
|
@@ -125,7 +142,7 @@ class CompositeDisposable {
|
|
|
125
142
|
return new CompositeDisposable(...args);
|
|
126
143
|
}
|
|
127
144
|
addDisposables(...args) {
|
|
128
|
-
args
|
|
145
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
129
146
|
}
|
|
130
147
|
dispose() {
|
|
131
148
|
this.disposables.forEach((arg) => arg.dispose());
|
|
@@ -144,20 +161,11 @@ class MutableDisposable {
|
|
|
144
161
|
dispose() {
|
|
145
162
|
if (this._disposable) {
|
|
146
163
|
this._disposable.dispose();
|
|
164
|
+
this._disposable = Disposable.NONE;
|
|
147
165
|
}
|
|
148
166
|
}
|
|
149
167
|
}
|
|
150
168
|
|
|
151
|
-
function tryParseJSON(text, reviver) {
|
|
152
|
-
try {
|
|
153
|
-
return JSON.parse(text, reviver);
|
|
154
|
-
}
|
|
155
|
-
catch (err) {
|
|
156
|
-
console.warn('failed to parse JSON');
|
|
157
|
-
return undefined;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
169
|
class TransferObject {
|
|
162
170
|
constructor() {
|
|
163
171
|
//
|
|
@@ -178,45 +186,6 @@ class PaneTransfer extends TransferObject {
|
|
|
178
186
|
this.paneId = paneId;
|
|
179
187
|
}
|
|
180
188
|
}
|
|
181
|
-
const DATA_KEY = 'splitview/transfer';
|
|
182
|
-
const isPanelTransferEvent = (event) => {
|
|
183
|
-
if (!event.dataTransfer) {
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
187
|
-
};
|
|
188
|
-
var DragType;
|
|
189
|
-
(function (DragType) {
|
|
190
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
191
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
192
|
-
})(DragType || (DragType = {}));
|
|
193
|
-
/**
|
|
194
|
-
* Determine whether this data belong to that of an event that was started by
|
|
195
|
-
* dragging a tab component
|
|
196
|
-
*/
|
|
197
|
-
const isTabDragEvent = (data) => {
|
|
198
|
-
return data.type === DragType.DOCKVIEW_TAB;
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* Determine whether this data belong to that of an event that was started by
|
|
202
|
-
* a custom drag-enable component
|
|
203
|
-
*/
|
|
204
|
-
const isCustomDragEvent = (data) => {
|
|
205
|
-
return data.type === DragType.EXTERNAL;
|
|
206
|
-
};
|
|
207
|
-
const extractData = (event) => {
|
|
208
|
-
if (!event.dataTransfer) {
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
212
|
-
if (!data) {
|
|
213
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
214
|
-
}
|
|
215
|
-
if (typeof data.type !== 'string') {
|
|
216
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
217
|
-
}
|
|
218
|
-
return data;
|
|
219
|
-
};
|
|
220
189
|
/**
|
|
221
190
|
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
222
191
|
*/
|
|
@@ -286,11 +255,17 @@ class SplitviewApi {
|
|
|
286
255
|
get length() {
|
|
287
256
|
return this.component.length;
|
|
288
257
|
}
|
|
258
|
+
get orientation() {
|
|
259
|
+
return this.component.orientation;
|
|
260
|
+
}
|
|
289
261
|
get onDidLayoutChange() {
|
|
290
262
|
return this.component.onDidLayoutChange;
|
|
291
263
|
}
|
|
292
|
-
get
|
|
293
|
-
return this.component.
|
|
264
|
+
get onDidAddView() {
|
|
265
|
+
return this.component.onDidAddView;
|
|
266
|
+
}
|
|
267
|
+
get onDidRemoveView() {
|
|
268
|
+
return this.component.onDidRemoveView;
|
|
294
269
|
}
|
|
295
270
|
updateOptions(options) {
|
|
296
271
|
this.component.updateOptions(options);
|
|
@@ -336,21 +311,38 @@ class PaneviewApi {
|
|
|
336
311
|
constructor(component) {
|
|
337
312
|
this.component = component;
|
|
338
313
|
}
|
|
339
|
-
get width() {
|
|
340
|
-
return this.component.width;
|
|
341
|
-
}
|
|
342
|
-
get height() {
|
|
343
|
-
return this.component.height;
|
|
344
|
-
}
|
|
345
314
|
get minimumSize() {
|
|
346
315
|
return this.component.minimumSize;
|
|
347
316
|
}
|
|
348
317
|
get maximumSize() {
|
|
349
318
|
return this.component.maximumSize;
|
|
350
319
|
}
|
|
320
|
+
get height() {
|
|
321
|
+
return this.component.height;
|
|
322
|
+
}
|
|
323
|
+
get width() {
|
|
324
|
+
return this.component.width;
|
|
325
|
+
}
|
|
351
326
|
get onDidLayoutChange() {
|
|
352
327
|
return this.component.onDidLayoutChange;
|
|
353
328
|
}
|
|
329
|
+
get onDidAddView() {
|
|
330
|
+
return this.component.onDidAddView;
|
|
331
|
+
}
|
|
332
|
+
get onDidRemoveView() {
|
|
333
|
+
return this.component.onDidRemoveView;
|
|
334
|
+
}
|
|
335
|
+
get onDidDrop() {
|
|
336
|
+
const emitter = new Emitter();
|
|
337
|
+
const disposable = this.component.onDidDrop((e) => {
|
|
338
|
+
emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
|
|
339
|
+
});
|
|
340
|
+
emitter.dispose = () => {
|
|
341
|
+
disposable.dispose();
|
|
342
|
+
emitter.dispose();
|
|
343
|
+
};
|
|
344
|
+
return emitter.event;
|
|
345
|
+
}
|
|
354
346
|
getPanels() {
|
|
355
347
|
return this.component.getPanels();
|
|
356
348
|
}
|
|
@@ -386,12 +378,6 @@ class GridviewApi {
|
|
|
386
378
|
constructor(component) {
|
|
387
379
|
this.component = component;
|
|
388
380
|
}
|
|
389
|
-
get width() {
|
|
390
|
-
return this.component.width;
|
|
391
|
-
}
|
|
392
|
-
get height() {
|
|
393
|
-
return this.component.height;
|
|
394
|
-
}
|
|
395
381
|
get minimumHeight() {
|
|
396
382
|
return this.component.minimumHeight;
|
|
397
383
|
}
|
|
@@ -404,12 +390,30 @@ class GridviewApi {
|
|
|
404
390
|
get maximumWidth() {
|
|
405
391
|
return this.component.maximumWidth;
|
|
406
392
|
}
|
|
393
|
+
get width() {
|
|
394
|
+
return this.component.width;
|
|
395
|
+
}
|
|
396
|
+
get height() {
|
|
397
|
+
return this.component.height;
|
|
398
|
+
}
|
|
407
399
|
get onGridEvent() {
|
|
408
400
|
return this.component.onGridEvent;
|
|
409
401
|
}
|
|
410
402
|
get onDidLayoutChange() {
|
|
411
403
|
return this.component.onDidLayoutChange;
|
|
412
404
|
}
|
|
405
|
+
get onDidAddGroup() {
|
|
406
|
+
return this.component.onDidAddGroup;
|
|
407
|
+
}
|
|
408
|
+
get onDidRemoveGroup() {
|
|
409
|
+
return this.component.onDidRemoveGroup;
|
|
410
|
+
}
|
|
411
|
+
get onDidActiveGroupChange() {
|
|
412
|
+
return this.component.onDidActiveGroupChange;
|
|
413
|
+
}
|
|
414
|
+
get onDidLayoutFromJSON() {
|
|
415
|
+
return this.component.onDidLayoutFromJSON;
|
|
416
|
+
}
|
|
413
417
|
get panels() {
|
|
414
418
|
return this.component.groups;
|
|
415
419
|
}
|
|
@@ -487,6 +491,27 @@ class DockviewApi {
|
|
|
487
491
|
get onGridEvent() {
|
|
488
492
|
return this.component.onGridEvent;
|
|
489
493
|
}
|
|
494
|
+
get onDidActiveGroupChange() {
|
|
495
|
+
return this.component.onDidActiveGroupChange;
|
|
496
|
+
}
|
|
497
|
+
get onDidAddGroup() {
|
|
498
|
+
return this.component.onDidAddGroup;
|
|
499
|
+
}
|
|
500
|
+
get onDidRemoveGroup() {
|
|
501
|
+
return this.component.onDidRemoveGroup;
|
|
502
|
+
}
|
|
503
|
+
get onDidActivePanelChange() {
|
|
504
|
+
return this.component.onDidActivePanelChange;
|
|
505
|
+
}
|
|
506
|
+
get onDidAddPanel() {
|
|
507
|
+
return this.component.onDidAddPanel;
|
|
508
|
+
}
|
|
509
|
+
get onDidRemovePanel() {
|
|
510
|
+
return this.component.onDidRemovePanel;
|
|
511
|
+
}
|
|
512
|
+
get onDidLayoutfromJSON() {
|
|
513
|
+
return this.component.onDidLayoutfromJSON;
|
|
514
|
+
}
|
|
490
515
|
get onDidLayoutChange() {
|
|
491
516
|
return this.component.onDidLayoutChange;
|
|
492
517
|
}
|
|
@@ -514,18 +539,12 @@ class DockviewApi {
|
|
|
514
539
|
getPanel(id) {
|
|
515
540
|
return this.component.getGroupPanel(id);
|
|
516
541
|
}
|
|
517
|
-
setActivePanel(panel) {
|
|
518
|
-
this.component.setActivePanel(panel);
|
|
519
|
-
}
|
|
520
542
|
layout(width, height, force = false) {
|
|
521
543
|
this.component.layout(width, height, force);
|
|
522
544
|
}
|
|
523
545
|
addPanel(options) {
|
|
524
546
|
return this.component.addPanel(options);
|
|
525
547
|
}
|
|
526
|
-
removePanel(panel) {
|
|
527
|
-
this.component.removePanel(panel);
|
|
528
|
-
}
|
|
529
548
|
addEmptyGroup(options) {
|
|
530
549
|
this.component.addEmptyGroup(options);
|
|
531
550
|
}
|
|
@@ -873,7 +892,7 @@ class Splitview {
|
|
|
873
892
|
this._onDidAddView = new Emitter();
|
|
874
893
|
this.onDidAddView = this._onDidAddView.event;
|
|
875
894
|
this._onDidRemoveView = new Emitter();
|
|
876
|
-
this.onDidRemoveView = this.
|
|
895
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
877
896
|
this._startSnappingEnabled = true;
|
|
878
897
|
this._endSnappingEnabled = true;
|
|
879
898
|
this.resize = (index, delta, sizes = this.views.map((x) => x.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) => {
|
|
@@ -1515,9 +1534,9 @@ class Paneview extends CompositeDisposable {
|
|
|
1515
1534
|
var _a;
|
|
1516
1535
|
super();
|
|
1517
1536
|
this.paneItems = [];
|
|
1537
|
+
this.skipAnimation = false;
|
|
1518
1538
|
this._onDidChange = new Emitter();
|
|
1519
1539
|
this.onDidChange = this._onDidChange.event;
|
|
1520
|
-
this.skipAnimation = false;
|
|
1521
1540
|
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : Orientation.VERTICAL;
|
|
1522
1541
|
this.element = document.createElement('div');
|
|
1523
1542
|
this.element.className = 'pane-container';
|
|
@@ -1545,7 +1564,7 @@ class Paneview extends CompositeDisposable {
|
|
|
1545
1564
|
this.paneItems.push(paneItem);
|
|
1546
1565
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1547
1566
|
});
|
|
1548
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1567
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1549
1568
|
this._onDidChange.fire(undefined);
|
|
1550
1569
|
}), this.splitview.onDidAddView(() => {
|
|
1551
1570
|
this._onDidChange.fire();
|
|
@@ -1617,9 +1636,6 @@ class Paneview extends CompositeDisposable {
|
|
|
1617
1636
|
}
|
|
1618
1637
|
}
|
|
1619
1638
|
layout(size, orthogonalSize) {
|
|
1620
|
-
// for (const paneItem of this.paneItems) {
|
|
1621
|
-
// paneItem.pane.orthogonalSize = orthogonalSize;
|
|
1622
|
-
// }
|
|
1623
1639
|
this.splitview.layout(size, orthogonalSize);
|
|
1624
1640
|
}
|
|
1625
1641
|
setupAnimation() {
|
|
@@ -1709,7 +1725,7 @@ class Droptarget extends CompositeDisposable {
|
|
|
1709
1725
|
this.options = options;
|
|
1710
1726
|
this._onDrop = new Emitter();
|
|
1711
1727
|
this.onDrop = this._onDrop.event;
|
|
1712
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1728
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1713
1729
|
onDragEnter: (e) => undefined,
|
|
1714
1730
|
onDragOver: (e) => {
|
|
1715
1731
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
@@ -1745,51 +1761,11 @@ class Droptarget extends CompositeDisposable {
|
|
|
1745
1761
|
const y = e.offsetY;
|
|
1746
1762
|
const xp = (100 * x) / width;
|
|
1747
1763
|
const yp = (100 * y) / height;
|
|
1748
|
-
|
|
1749
|
-
let isLeft = false;
|
|
1750
|
-
let isTop = false;
|
|
1751
|
-
let isBottom = false;
|
|
1752
|
-
switch (this.options.validOverlays) {
|
|
1753
|
-
case 'all':
|
|
1754
|
-
isRight = xp > 80;
|
|
1755
|
-
isLeft = xp < 20;
|
|
1756
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1757
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1758
|
-
break;
|
|
1759
|
-
case 'vertical':
|
|
1760
|
-
isTop = yp < 50;
|
|
1761
|
-
isBottom = yp >= 50;
|
|
1762
|
-
break;
|
|
1763
|
-
case 'horizontal':
|
|
1764
|
-
isLeft = xp < 50;
|
|
1765
|
-
isRight = xp >= 50;
|
|
1766
|
-
break;
|
|
1767
|
-
}
|
|
1764
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1768
1765
|
const isSmallX = width < 100;
|
|
1769
1766
|
const isSmallY = height < 100;
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1773
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1774
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1775
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1776
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1777
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1778
|
-
if (isRight) {
|
|
1779
|
-
this._state = Position.Right;
|
|
1780
|
-
}
|
|
1781
|
-
else if (isLeft) {
|
|
1782
|
-
this._state = Position.Left;
|
|
1783
|
-
}
|
|
1784
|
-
else if (isTop) {
|
|
1785
|
-
this._state = Position.Top;
|
|
1786
|
-
}
|
|
1787
|
-
else if (isBottom) {
|
|
1788
|
-
this._state = Position.Bottom;
|
|
1789
|
-
}
|
|
1790
|
-
else {
|
|
1791
|
-
this._state = Position.Center;
|
|
1792
|
-
}
|
|
1767
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1768
|
+
this.setState(quadrant);
|
|
1793
1769
|
},
|
|
1794
1770
|
onDragLeave: (e) => {
|
|
1795
1771
|
this.removeDropTarget();
|
|
@@ -1803,7 +1779,7 @@ class Droptarget extends CompositeDisposable {
|
|
|
1803
1779
|
const state = this._state;
|
|
1804
1780
|
this.removeDropTarget();
|
|
1805
1781
|
if (state) {
|
|
1806
|
-
this._onDrop.fire({ position: state,
|
|
1782
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
1807
1783
|
}
|
|
1808
1784
|
},
|
|
1809
1785
|
}));
|
|
@@ -1818,9 +1794,73 @@ class Droptarget extends CompositeDisposable {
|
|
|
1818
1794
|
this.options.canDisplayOverlay = value;
|
|
1819
1795
|
}
|
|
1820
1796
|
dispose() {
|
|
1821
|
-
this._onDrop.dispose();
|
|
1822
1797
|
this.removeDropTarget();
|
|
1823
1798
|
}
|
|
1799
|
+
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1800
|
+
if (!this.overlay) {
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
const isLeft = quadrant === 'left';
|
|
1804
|
+
const isRight = quadrant === 'right';
|
|
1805
|
+
const isTop = quadrant === 'top';
|
|
1806
|
+
const isBottom = quadrant === 'bottom';
|
|
1807
|
+
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1808
|
+
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1809
|
+
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1810
|
+
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1811
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1812
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1813
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1814
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1815
|
+
}
|
|
1816
|
+
setState(quadrant) {
|
|
1817
|
+
switch (quadrant) {
|
|
1818
|
+
case 'top':
|
|
1819
|
+
this._state = Position.Top;
|
|
1820
|
+
break;
|
|
1821
|
+
case 'left':
|
|
1822
|
+
this._state = Position.Left;
|
|
1823
|
+
break;
|
|
1824
|
+
case 'bottom':
|
|
1825
|
+
this._state = Position.Bottom;
|
|
1826
|
+
break;
|
|
1827
|
+
case 'right':
|
|
1828
|
+
this._state = Position.Right;
|
|
1829
|
+
break;
|
|
1830
|
+
default:
|
|
1831
|
+
this._state = Position.Center;
|
|
1832
|
+
break;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
calculateQuadrant(overlayType, xp, yp) {
|
|
1836
|
+
switch (overlayType) {
|
|
1837
|
+
case 'all':
|
|
1838
|
+
if (xp < 20) {
|
|
1839
|
+
return 'left';
|
|
1840
|
+
}
|
|
1841
|
+
if (xp > 80) {
|
|
1842
|
+
return 'right';
|
|
1843
|
+
}
|
|
1844
|
+
if (yp < 20) {
|
|
1845
|
+
return 'top';
|
|
1846
|
+
}
|
|
1847
|
+
if (yp > 80) {
|
|
1848
|
+
return 'bottom';
|
|
1849
|
+
}
|
|
1850
|
+
break;
|
|
1851
|
+
case 'vertical':
|
|
1852
|
+
if (yp < 50) {
|
|
1853
|
+
return 'top';
|
|
1854
|
+
}
|
|
1855
|
+
return 'bottom';
|
|
1856
|
+
case 'horizontal':
|
|
1857
|
+
if (xp < 50) {
|
|
1858
|
+
return 'left';
|
|
1859
|
+
}
|
|
1860
|
+
return 'right';
|
|
1861
|
+
}
|
|
1862
|
+
return null;
|
|
1863
|
+
}
|
|
1824
1864
|
removeDropTarget() {
|
|
1825
1865
|
if (this.target) {
|
|
1826
1866
|
this._state = undefined;
|
|
@@ -1923,6 +1963,7 @@ class LeafNode {
|
|
|
1923
1963
|
this.view.layout(this.width, this.height);
|
|
1924
1964
|
}
|
|
1925
1965
|
dispose() {
|
|
1966
|
+
this._onDidChange.dispose();
|
|
1926
1967
|
this._disposable.dispose();
|
|
1927
1968
|
}
|
|
1928
1969
|
}
|
|
@@ -1974,7 +2015,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
1974
2015
|
proportionalLayout,
|
|
1975
2016
|
});
|
|
1976
2017
|
}
|
|
1977
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2018
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1978
2019
|
this._onDidChange.fire(undefined);
|
|
1979
2020
|
}));
|
|
1980
2021
|
this.setupChildrenEvents();
|
|
@@ -2146,6 +2187,15 @@ class BranchNode extends CompositeDisposable {
|
|
|
2146
2187
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2147
2188
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2148
2189
|
*--------------------------------------------------------------------------------------------*/
|
|
2190
|
+
function findLeaf(candiateNode, last) {
|
|
2191
|
+
if (candiateNode instanceof LeafNode) {
|
|
2192
|
+
return candiateNode;
|
|
2193
|
+
}
|
|
2194
|
+
if (candiateNode instanceof BranchNode) {
|
|
2195
|
+
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2196
|
+
}
|
|
2197
|
+
throw new Error('invalid node');
|
|
2198
|
+
}
|
|
2149
2199
|
function flipNode(node, size, orthogonalSize) {
|
|
2150
2200
|
if (node instanceof BranchNode) {
|
|
2151
2201
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2284,13 +2334,13 @@ class Gridview {
|
|
|
2284
2334
|
}
|
|
2285
2335
|
deserialize(json, deserializer) {
|
|
2286
2336
|
const orientation = json.orientation;
|
|
2287
|
-
const height = json.height;
|
|
2337
|
+
const height = orientation === Orientation.VERTICAL ? json.height : json.width;
|
|
2288
2338
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2289
2339
|
}
|
|
2290
2340
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2291
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2341
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2292
2342
|
}
|
|
2293
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2343
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2294
2344
|
let result;
|
|
2295
2345
|
if (node.type === 'branch') {
|
|
2296
2346
|
const serializedChildren = node.data;
|
|
@@ -2300,7 +2350,9 @@ class Gridview {
|
|
|
2300
2350
|
visible: serializedChild.visible,
|
|
2301
2351
|
};
|
|
2302
2352
|
});
|
|
2303
|
-
|
|
2353
|
+
// HORIZONTAL => height=orthogonalsize width=size
|
|
2354
|
+
// VERTICAL => height=size width=orthogonalsize
|
|
2355
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
|
|
2304
2356
|
}
|
|
2305
2357
|
else {
|
|
2306
2358
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2361,15 +2413,6 @@ class Gridview {
|
|
|
2361
2413
|
if (!(node instanceof LeafNode)) {
|
|
2362
2414
|
throw new Error('invalid location');
|
|
2363
2415
|
}
|
|
2364
|
-
const findLeaf = (candiateNode, last) => {
|
|
2365
|
-
if (candiateNode instanceof LeafNode) {
|
|
2366
|
-
return candiateNode;
|
|
2367
|
-
}
|
|
2368
|
-
if (candiateNode instanceof BranchNode) {
|
|
2369
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2370
|
-
}
|
|
2371
|
-
throw new Error('invalid node');
|
|
2372
|
-
};
|
|
2373
2416
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2374
2417
|
const n = path[i];
|
|
2375
2418
|
const l = location[i] || 0;
|
|
@@ -2466,15 +2509,14 @@ class Gridview {
|
|
|
2466
2509
|
}
|
|
2467
2510
|
parent.removeChild(index, sizing);
|
|
2468
2511
|
if (parent.children.length === 0) {
|
|
2469
|
-
// throw new Error('Invalid grid state');
|
|
2470
2512
|
return node.view;
|
|
2471
2513
|
}
|
|
2472
2514
|
if (parent.children.length > 1) {
|
|
2473
2515
|
return node.view;
|
|
2474
2516
|
}
|
|
2517
|
+
const sibling = parent.children[0];
|
|
2475
2518
|
if (pathToParent.length === 0) {
|
|
2476
2519
|
// parent is root
|
|
2477
|
-
const sibling = parent.children[0];
|
|
2478
2520
|
if (sibling instanceof LeafNode) {
|
|
2479
2521
|
return node.view;
|
|
2480
2522
|
}
|
|
@@ -2485,7 +2527,6 @@ class Gridview {
|
|
|
2485
2527
|
}
|
|
2486
2528
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2487
2529
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2488
|
-
const sibling = parent.children[0];
|
|
2489
2530
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2490
2531
|
parent.removeChild(0, sizing);
|
|
2491
2532
|
const sizes = grandParent.children.map((size, i) => grandParent.getChildSize(i));
|
|
@@ -2532,31 +2573,6 @@ class Gridview {
|
|
|
2532
2573
|
}
|
|
2533
2574
|
}
|
|
2534
2575
|
|
|
2535
|
-
/*! *****************************************************************************
|
|
2536
|
-
Copyright (c) Microsoft Corporation.
|
|
2537
|
-
|
|
2538
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2539
|
-
purpose with or without fee is hereby granted.
|
|
2540
|
-
|
|
2541
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2542
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2543
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2544
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2545
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2546
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2547
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2548
|
-
***************************************************************************** */
|
|
2549
|
-
|
|
2550
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2551
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2552
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2553
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2554
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2555
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2556
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2557
|
-
});
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
2576
|
class ContentContainer extends CompositeDisposable {
|
|
2561
2577
|
constructor() {
|
|
2562
2578
|
super();
|
|
@@ -2568,6 +2584,7 @@ class ContentContainer extends CompositeDisposable {
|
|
|
2568
2584
|
this._element = document.createElement('div');
|
|
2569
2585
|
this._element.className = 'content-container';
|
|
2570
2586
|
this._element.tabIndex = -1;
|
|
2587
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2571
2588
|
// for hosted containers
|
|
2572
2589
|
// 1) register a drop target on the host
|
|
2573
2590
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2634,6 +2651,41 @@ var DockviewDropTargets;
|
|
|
2634
2651
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2635
2652
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2636
2653
|
|
|
2654
|
+
class DragHandler extends CompositeDisposable {
|
|
2655
|
+
constructor(el) {
|
|
2656
|
+
super();
|
|
2657
|
+
this.el = el;
|
|
2658
|
+
this.disposable = new MutableDisposable();
|
|
2659
|
+
this._onDragStart = new Emitter();
|
|
2660
|
+
this.onDragStart = this._onDragStart.event;
|
|
2661
|
+
this.iframes = [];
|
|
2662
|
+
this.configure();
|
|
2663
|
+
}
|
|
2664
|
+
configure() {
|
|
2665
|
+
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2666
|
+
this.iframes = [
|
|
2667
|
+
...getElementsByTagName('iframe'),
|
|
2668
|
+
...getElementsByTagName('webview'),
|
|
2669
|
+
];
|
|
2670
|
+
for (const iframe of this.iframes) {
|
|
2671
|
+
iframe.style.pointerEvents = 'none';
|
|
2672
|
+
}
|
|
2673
|
+
this.el.classList.add('dragged');
|
|
2674
|
+
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2675
|
+
this.disposable.value = this.getData();
|
|
2676
|
+
if (event.dataTransfer) {
|
|
2677
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2678
|
+
}
|
|
2679
|
+
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
2680
|
+
for (const iframe of this.iframes) {
|
|
2681
|
+
iframe.style.pointerEvents = 'auto';
|
|
2682
|
+
}
|
|
2683
|
+
this.iframes = [];
|
|
2684
|
+
this.disposable.dispose();
|
|
2685
|
+
}));
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2637
2689
|
var MouseEventKind;
|
|
2638
2690
|
(function (MouseEventKind) {
|
|
2639
2691
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2643,42 +2695,34 @@ class Tab$1 extends CompositeDisposable {
|
|
|
2643
2695
|
constructor(panelId, accessor, group) {
|
|
2644
2696
|
super();
|
|
2645
2697
|
this.panelId = panelId;
|
|
2646
|
-
this.accessor = accessor;
|
|
2647
2698
|
this.group = group;
|
|
2648
2699
|
this._onChanged = new Emitter();
|
|
2649
2700
|
this.onChanged = this._onChanged.event;
|
|
2650
2701
|
this._onDropped = new Emitter();
|
|
2651
2702
|
this.onDrop = this._onDropped.event;
|
|
2652
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2653
|
-
this.iframes = [];
|
|
2654
2703
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2655
2704
|
this._element = document.createElement('div');
|
|
2656
2705
|
this._element.className = 'tab';
|
|
2657
2706
|
this._element.tabIndex = 0;
|
|
2658
2707
|
this._element.draggable = true;
|
|
2659
|
-
this.addDisposables(
|
|
2660
|
-
|
|
2661
|
-
...
|
|
2662
|
-
|
|
2663
|
-
];
|
|
2664
|
-
for (const iframe of this.iframes) {
|
|
2665
|
-
iframe.style.pointerEvents = 'none';
|
|
2708
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2709
|
+
constructor() {
|
|
2710
|
+
super(...arguments);
|
|
2711
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2666
2712
|
}
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2713
|
+
getData() {
|
|
2714
|
+
this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
|
|
2715
|
+
return {
|
|
2716
|
+
dispose: () => {
|
|
2717
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2718
|
+
},
|
|
2719
|
+
};
|
|
2674
2720
|
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
iframe.style.pointerEvents = 'auto';
|
|
2721
|
+
dispose() {
|
|
2722
|
+
//
|
|
2678
2723
|
}
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2724
|
+
})(this._element));
|
|
2725
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2682
2726
|
if (event.defaultPrevented) {
|
|
2683
2727
|
return;
|
|
2684
2728
|
}
|
|
@@ -2767,7 +2811,7 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2767
2811
|
});
|
|
2768
2812
|
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
2769
2813
|
this._onDrop.fire({
|
|
2770
|
-
event: event.
|
|
2814
|
+
event: event.nativeEvent,
|
|
2771
2815
|
index: this.tabs.length,
|
|
2772
2816
|
});
|
|
2773
2817
|
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
@@ -2880,16 +2924,14 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2880
2924
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2881
2925
|
return;
|
|
2882
2926
|
}
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
});
|
|
2888
|
-
break;
|
|
2927
|
+
if (event.kind === MouseEventKind.CLICK) {
|
|
2928
|
+
this.group.model.openPanel(panel, {
|
|
2929
|
+
skipFocus: alreadyFocused,
|
|
2930
|
+
});
|
|
2889
2931
|
}
|
|
2890
2932
|
}), tabToAdd.onDrop((event) => {
|
|
2891
2933
|
this._onDrop.fire({
|
|
2892
|
-
event: event.
|
|
2934
|
+
event: event.nativeEvent,
|
|
2893
2935
|
index: this.tabs.findIndex((x) => x.value === tabToAdd),
|
|
2894
2936
|
});
|
|
2895
2937
|
}));
|
|
@@ -2914,7 +2956,6 @@ var GroupChangeKind2;
|
|
|
2914
2956
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2915
2957
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2916
2958
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2917
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2918
2959
|
})(GroupChangeKind2 || (GroupChangeKind2 = {}));
|
|
2919
2960
|
class Groupview extends CompositeDisposable {
|
|
2920
2961
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2935,15 +2976,10 @@ class Groupview extends CompositeDisposable {
|
|
|
2935
2976
|
this.onMove = this._onMove.event;
|
|
2936
2977
|
this._onDidGroupChange = new Emitter();
|
|
2937
2978
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2938
|
-
this.
|
|
2939
|
-
|
|
2940
|
-
return false;
|
|
2941
|
-
}
|
|
2942
|
-
this.doClose(panel);
|
|
2943
|
-
return true;
|
|
2944
|
-
});
|
|
2979
|
+
this._onDidDrop = new Emitter();
|
|
2980
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
2945
2981
|
this.container.classList.add('groupview');
|
|
2946
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
2982
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
2947
2983
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
2948
2984
|
tabHeight: options.tabHeight,
|
|
2949
2985
|
});
|
|
@@ -2965,9 +3001,9 @@ class Groupview extends CompositeDisposable {
|
|
|
2965
3001
|
}), this.contentContainer.onDidFocus(() => {
|
|
2966
3002
|
this.accessor.doSetGroupActive(this.parent, true);
|
|
2967
3003
|
}), this.contentContainer.onDidBlur(() => {
|
|
2968
|
-
//
|
|
3004
|
+
// noop
|
|
2969
3005
|
}), this.dropTarget.onDrop((event) => {
|
|
2970
|
-
this.handleDropEvent(event.
|
|
3006
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
2971
3007
|
}));
|
|
2972
3008
|
}
|
|
2973
3009
|
get element() {
|
|
@@ -3100,6 +3136,8 @@ class Groupview extends CompositeDisposable {
|
|
|
3100
3136
|
options.index > this.panels.length) {
|
|
3101
3137
|
options.index = this.panels.length;
|
|
3102
3138
|
}
|
|
3139
|
+
// ensure the group is updated before we fire any events
|
|
3140
|
+
panel.updateParentGroup(this.parent, true);
|
|
3103
3141
|
if (this._activePanel === panel) {
|
|
3104
3142
|
this.accessor.doSetGroupActive(this.parent);
|
|
3105
3143
|
return;
|
|
@@ -3120,43 +3158,19 @@ class Groupview extends CompositeDisposable {
|
|
|
3120
3158
|
return this._removePanel(panelToRemove);
|
|
3121
3159
|
}
|
|
3122
3160
|
closeAllPanels() {
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
if (this._activePanel && index > -1) {
|
|
3129
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3130
|
-
console.warn('active panel not tracked');
|
|
3131
|
-
}
|
|
3132
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3133
|
-
if (!canClose) {
|
|
3134
|
-
return false;
|
|
3135
|
-
}
|
|
3136
|
-
}
|
|
3137
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3138
|
-
if (i === index) {
|
|
3139
|
-
continue;
|
|
3140
|
-
}
|
|
3141
|
-
const panel = this.panels[i];
|
|
3142
|
-
this.openPanel(panel);
|
|
3143
|
-
if (panel.close) {
|
|
3144
|
-
const canClose = yield panel.close();
|
|
3145
|
-
if (!canClose) {
|
|
3146
|
-
return false;
|
|
3147
|
-
}
|
|
3148
|
-
}
|
|
3149
|
-
}
|
|
3150
|
-
if (this.panels.length > 0) {
|
|
3151
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3152
|
-
const arrPanelCpy = [...this.panels];
|
|
3153
|
-
yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
|
|
3161
|
+
if (this.panels.length > 0) {
|
|
3162
|
+
// take a copy since we will be edting the array as we iterate through
|
|
3163
|
+
const arrPanelCpy = [...this.panels];
|
|
3164
|
+
for (const panel of arrPanelCpy) {
|
|
3165
|
+
this.doClose(panel);
|
|
3154
3166
|
}
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3167
|
+
}
|
|
3168
|
+
else {
|
|
3169
|
+
this.accessor.removeGroup(this.parent);
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
closePanel(panel) {
|
|
3173
|
+
this.doClose(panel);
|
|
3160
3174
|
}
|
|
3161
3175
|
doClose(panel) {
|
|
3162
3176
|
this.accessor.removePanel(panel);
|
|
@@ -3299,8 +3313,11 @@ class Groupview extends CompositeDisposable {
|
|
|
3299
3313
|
this.tabsContainer.show();
|
|
3300
3314
|
}
|
|
3301
3315
|
}
|
|
3302
|
-
canDisplayOverlay(
|
|
3316
|
+
canDisplayOverlay(event, target) {
|
|
3303
3317
|
// custom overlay handler
|
|
3318
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3319
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3320
|
+
}
|
|
3304
3321
|
return false;
|
|
3305
3322
|
}
|
|
3306
3323
|
handleDropEvent(event, position, index) {
|
|
@@ -3325,6 +3342,9 @@ class Groupview extends CompositeDisposable {
|
|
|
3325
3342
|
index,
|
|
3326
3343
|
});
|
|
3327
3344
|
}
|
|
3345
|
+
else {
|
|
3346
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3347
|
+
}
|
|
3328
3348
|
}
|
|
3329
3349
|
dispose() {
|
|
3330
3350
|
for (const panel of this.panels) {
|
|
@@ -3377,19 +3397,21 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3377
3397
|
this.onGridEvent = this._onGridEvent.event;
|
|
3378
3398
|
this._onDidLayoutChange = new Emitter();
|
|
3379
3399
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3400
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3401
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3402
|
+
this._onDidAddGroup = new Emitter();
|
|
3403
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3404
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3405
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3380
3406
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3381
3407
|
this.element.appendChild(this.gridview.element);
|
|
3382
|
-
|
|
3383
|
-
this.layout(0, 0, true);
|
|
3408
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3384
3409
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3385
3410
|
this._onGridEvent.fire({ kind: GroupChangeKind.LAYOUT });
|
|
3386
3411
|
}));
|
|
3387
3412
|
this.addDisposables((() => {
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
*/
|
|
3391
|
-
let timer;
|
|
3392
|
-
return this.onGridEvent((event) => {
|
|
3413
|
+
const tickDelayedEvent = new TickDelayedEvent();
|
|
3414
|
+
return new CompositeDisposable(this.onGridEvent((event) => {
|
|
3393
3415
|
if ([
|
|
3394
3416
|
GroupChangeKind.ADD_GROUP,
|
|
3395
3417
|
GroupChangeKind.REMOVE_GROUP,
|
|
@@ -3399,15 +3421,11 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3399
3421
|
GroupChangeKind.PANEL_ACTIVE,
|
|
3400
3422
|
GroupChangeKind.LAYOUT,
|
|
3401
3423
|
].includes(event.kind)) {
|
|
3402
|
-
|
|
3403
|
-
clearTimeout(timer);
|
|
3404
|
-
}
|
|
3405
|
-
timer = setTimeout(() => {
|
|
3406
|
-
this._onDidLayoutChange.fire();
|
|
3407
|
-
clearTimeout(timer);
|
|
3408
|
-
});
|
|
3424
|
+
tickDelayedEvent.fire();
|
|
3409
3425
|
}
|
|
3410
|
-
})
|
|
3426
|
+
}), tickDelayedEvent.onEvent(() => {
|
|
3427
|
+
this._onDidLayoutChange.fire();
|
|
3428
|
+
}), tickDelayedEvent);
|
|
3411
3429
|
})());
|
|
3412
3430
|
}
|
|
3413
3431
|
get id() {
|
|
@@ -3453,6 +3471,7 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3453
3471
|
doAddGroup(group, location = [0], size) {
|
|
3454
3472
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : Sizing.Distribute, location);
|
|
3455
3473
|
this._onGridEvent.fire({ kind: GroupChangeKind.ADD_GROUP });
|
|
3474
|
+
this._onDidAddGroup.fire(group);
|
|
3456
3475
|
this.doSetGroupActive(group);
|
|
3457
3476
|
}
|
|
3458
3477
|
doRemoveGroup(group, options) {
|
|
@@ -3466,6 +3485,7 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3466
3485
|
this._groups.delete(group.id);
|
|
3467
3486
|
}
|
|
3468
3487
|
this._onGridEvent.fire({ kind: GroupChangeKind.REMOVE_GROUP });
|
|
3488
|
+
this._onDidRemoveGroup.fire(group);
|
|
3469
3489
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3470
3490
|
const groups = Array.from(this._groups.values());
|
|
3471
3491
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3496,6 +3516,7 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3496
3516
|
this._onGridEvent.fire({
|
|
3497
3517
|
kind: GroupChangeKind.GROUP_ACTIVE,
|
|
3498
3518
|
});
|
|
3519
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3499
3520
|
}
|
|
3500
3521
|
removeGroup(group) {
|
|
3501
3522
|
this.doRemoveGroup(group);
|
|
@@ -3552,6 +3573,10 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3552
3573
|
dispose() {
|
|
3553
3574
|
super.dispose();
|
|
3554
3575
|
this._onGridEvent.dispose();
|
|
3576
|
+
this._onDidActiveGroupChange.dispose();
|
|
3577
|
+
this._onDidAddGroup.dispose();
|
|
3578
|
+
this._onDidRemoveGroup.dispose();
|
|
3579
|
+
this._onDidLayoutChange.dispose();
|
|
3555
3580
|
this.gridview.dispose();
|
|
3556
3581
|
}
|
|
3557
3582
|
}
|
|
@@ -3563,15 +3588,11 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3563
3588
|
constructor(id) {
|
|
3564
3589
|
super();
|
|
3565
3590
|
this.id = id;
|
|
3566
|
-
this._state = {};
|
|
3567
3591
|
this._isFocused = false;
|
|
3568
3592
|
this._isActive = false;
|
|
3569
3593
|
this._isVisible = true;
|
|
3570
3594
|
this._width = 0;
|
|
3571
3595
|
this._height = 0;
|
|
3572
|
-
this._onDidStateChange = new Emitter();
|
|
3573
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3574
|
-
//
|
|
3575
3596
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3576
3597
|
replay: true,
|
|
3577
3598
|
});
|
|
@@ -3600,7 +3621,7 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3600
3621
|
//
|
|
3601
3622
|
this._onActiveChange = new Emitter();
|
|
3602
3623
|
this.onActiveChange = this._onActiveChange.event;
|
|
3603
|
-
this.addDisposables(this.
|
|
3624
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3604
3625
|
this._isFocused = event.isFocused;
|
|
3605
3626
|
}), this.onDidActiveChange((event) => {
|
|
3606
3627
|
this._isActive = event.isActive;
|
|
@@ -3633,21 +3654,6 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3633
3654
|
setActive() {
|
|
3634
3655
|
this._onActiveChange.fire();
|
|
3635
3656
|
}
|
|
3636
|
-
setState(key, value) {
|
|
3637
|
-
if (typeof key === 'object') {
|
|
3638
|
-
this._state = key;
|
|
3639
|
-
}
|
|
3640
|
-
else if (typeof value !== undefined) {
|
|
3641
|
-
this._state[key] = value;
|
|
3642
|
-
}
|
|
3643
|
-
this._onDidStateChange.fire(undefined);
|
|
3644
|
-
}
|
|
3645
|
-
getState() {
|
|
3646
|
-
return this._state;
|
|
3647
|
-
}
|
|
3648
|
-
getStateKey(key) {
|
|
3649
|
-
return this._state[key];
|
|
3650
|
-
}
|
|
3651
3657
|
dispose() {
|
|
3652
3658
|
super.dispose();
|
|
3653
3659
|
}
|
|
@@ -3667,6 +3673,7 @@ class GridviewPanelApiImpl extends PanelApiImpl {
|
|
|
3667
3673
|
//
|
|
3668
3674
|
this._onDidSizeChange = new Emitter();
|
|
3669
3675
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3676
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3670
3677
|
}
|
|
3671
3678
|
setConstraints(value) {
|
|
3672
3679
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3680,19 +3687,19 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3680
3687
|
constructor(panel, group) {
|
|
3681
3688
|
super(panel.id);
|
|
3682
3689
|
this.panel = panel;
|
|
3683
|
-
this._onDidDirtyChange = new Emitter();
|
|
3684
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3685
3690
|
this._onDidTitleChange = new Emitter();
|
|
3686
3691
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3687
3692
|
this._titleChanged = new Emitter();
|
|
3688
3693
|
this.titleChanged = this._titleChanged.event;
|
|
3689
3694
|
this._suppressClosableChanged = new Emitter();
|
|
3690
3695
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3691
|
-
this.
|
|
3692
|
-
this.
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3697
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3698
|
+
this._onDidGroupChange = new Emitter();
|
|
3699
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3700
|
+
this.disposable = new MutableDisposable();
|
|
3701
|
+
this.group = group;
|
|
3702
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3696
3703
|
}
|
|
3697
3704
|
get title() {
|
|
3698
3705
|
return this.panel.title;
|
|
@@ -3705,7 +3712,17 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3705
3712
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3706
3713
|
}
|
|
3707
3714
|
set group(value) {
|
|
3715
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3708
3716
|
this._group = value;
|
|
3717
|
+
this._onDidGroupChange.fire();
|
|
3718
|
+
if (this._group) {
|
|
3719
|
+
this.disposable.value = this._group.api.onDidActiveChange(() => {
|
|
3720
|
+
this._onDidActiveGroupChange.fire();
|
|
3721
|
+
});
|
|
3722
|
+
if (this.isGroupActive !== isOldGroupActive) {
|
|
3723
|
+
this._onDidActiveGroupChange.fire();
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3709
3726
|
}
|
|
3710
3727
|
get group() {
|
|
3711
3728
|
return this._group;
|
|
@@ -3719,16 +3736,10 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3719
3736
|
}
|
|
3720
3737
|
return this.group.model.closePanel(this.panel);
|
|
3721
3738
|
}
|
|
3722
|
-
interceptOnCloseAction(interceptor) {
|
|
3723
|
-
this._interceptor = interceptor;
|
|
3724
|
-
}
|
|
3725
|
-
dispose() {
|
|
3726
|
-
super.dispose();
|
|
3727
|
-
}
|
|
3728
3739
|
}
|
|
3729
3740
|
|
|
3730
3741
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3731
|
-
constructor(id, containerApi) {
|
|
3742
|
+
constructor(id, accessor, containerApi) {
|
|
3732
3743
|
super();
|
|
3733
3744
|
this.id = id;
|
|
3734
3745
|
this.containerApi = containerApi;
|
|
@@ -3736,9 +3747,8 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3736
3747
|
this._suppressClosable = false;
|
|
3737
3748
|
this._title = '';
|
|
3738
3749
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3739
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3740
3750
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3741
|
-
|
|
3751
|
+
accessor.setActivePanel(this);
|
|
3742
3752
|
}), this.api.onDidTitleChange((event) => {
|
|
3743
3753
|
const title = event.title;
|
|
3744
3754
|
this.update({ params: { title } });
|
|
@@ -3762,32 +3772,18 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3762
3772
|
this._view = params.view;
|
|
3763
3773
|
this.setTitle(params.title);
|
|
3764
3774
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3765
|
-
if (params.state) {
|
|
3766
|
-
this.api.setState(params.state);
|
|
3767
|
-
}
|
|
3768
3775
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3769
3776
|
}
|
|
3770
3777
|
focus() {
|
|
3771
3778
|
this.api._onFocusEvent.fire();
|
|
3772
3779
|
}
|
|
3773
|
-
setDirty(isDirty) {
|
|
3774
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3775
|
-
}
|
|
3776
|
-
close() {
|
|
3777
|
-
if (this.api.tryClose) {
|
|
3778
|
-
return this.api.tryClose();
|
|
3779
|
-
}
|
|
3780
|
-
return Promise.resolve(true);
|
|
3781
|
-
}
|
|
3782
3780
|
toJSON() {
|
|
3783
|
-
const state = this.api.getState();
|
|
3784
3781
|
return {
|
|
3785
3782
|
id: this.id,
|
|
3786
3783
|
view: this.view.toJSON(),
|
|
3787
3784
|
params: Object.keys(this._params || {}).length > 0
|
|
3788
3785
|
? this._params
|
|
3789
3786
|
: undefined,
|
|
3790
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3791
3787
|
suppressClosable: this.suppressClosable || undefined,
|
|
3792
3788
|
title: this.title,
|
|
3793
3789
|
};
|
|
@@ -3832,18 +3828,6 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3832
3828
|
var _a;
|
|
3833
3829
|
this._group = group;
|
|
3834
3830
|
this.api.group = group;
|
|
3835
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3836
|
-
var _a;
|
|
3837
|
-
if (ev.kind === GroupChangeKind2.GROUP_ACTIVE) {
|
|
3838
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3839
|
-
this.api._onDidActiveChange.fire({
|
|
3840
|
-
isActive: isGroupActive && isVisible,
|
|
3841
|
-
});
|
|
3842
|
-
this.api._onDidVisibilityChange.fire({
|
|
3843
|
-
isVisible,
|
|
3844
|
-
});
|
|
3845
|
-
}
|
|
3846
|
-
});
|
|
3847
3831
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3848
3832
|
this.api._onDidActiveChange.fire({
|
|
3849
3833
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -3953,15 +3937,6 @@ class Watermark extends CompositeDisposable {
|
|
|
3953
3937
|
}
|
|
3954
3938
|
}
|
|
3955
3939
|
|
|
3956
|
-
function debounce(cb, wait) {
|
|
3957
|
-
let timeout;
|
|
3958
|
-
const callable = (...args) => {
|
|
3959
|
-
clearTimeout(timeout);
|
|
3960
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
3961
|
-
};
|
|
3962
|
-
return callable;
|
|
3963
|
-
}
|
|
3964
|
-
|
|
3965
3940
|
class DefaultDeserializer {
|
|
3966
3941
|
constructor(layout, panelDeserializer) {
|
|
3967
3942
|
this.layout = layout;
|
|
@@ -4062,9 +4037,6 @@ class DefaultTab extends CompositeDisposable {
|
|
|
4062
4037
|
this._isGroupActive = false;
|
|
4063
4038
|
//
|
|
4064
4039
|
this.params = {};
|
|
4065
|
-
//
|
|
4066
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4067
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4068
4040
|
this._element = document.createElement('div');
|
|
4069
4041
|
this._element.className = 'default-tab';
|
|
4070
4042
|
//
|
|
@@ -4109,10 +4081,6 @@ class DefaultTab extends CompositeDisposable {
|
|
|
4109
4081
|
init(params) {
|
|
4110
4082
|
this.params = params;
|
|
4111
4083
|
this._content.textContent = params.title;
|
|
4112
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4113
|
-
const isDirty = event;
|
|
4114
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4115
|
-
});
|
|
4116
4084
|
if (!this.params.suppressClosable) {
|
|
4117
4085
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4118
4086
|
ev.preventDefault(); //
|
|
@@ -4166,6 +4134,10 @@ class BasePanelView extends CompositeDisposable {
|
|
|
4166
4134
|
get height() {
|
|
4167
4135
|
return this._height;
|
|
4168
4136
|
}
|
|
4137
|
+
get params() {
|
|
4138
|
+
var _a;
|
|
4139
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4140
|
+
}
|
|
4169
4141
|
focus() {
|
|
4170
4142
|
this.api._onFocusEvent.fire();
|
|
4171
4143
|
}
|
|
@@ -4174,29 +4146,27 @@ class BasePanelView extends CompositeDisposable {
|
|
|
4174
4146
|
this._height = height;
|
|
4175
4147
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4176
4148
|
if (this.part) {
|
|
4177
|
-
if (this.
|
|
4178
|
-
this.part.update(this.
|
|
4149
|
+
if (this._params) {
|
|
4150
|
+
this.part.update(this._params.params);
|
|
4179
4151
|
}
|
|
4180
4152
|
}
|
|
4181
4153
|
}
|
|
4182
4154
|
init(parameters) {
|
|
4183
|
-
this.
|
|
4155
|
+
this._params = parameters;
|
|
4184
4156
|
this.part = this.getComponent();
|
|
4185
4157
|
}
|
|
4186
4158
|
update(event) {
|
|
4187
4159
|
var _a, _b;
|
|
4188
|
-
this.
|
|
4189
|
-
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.
|
|
4160
|
+
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) });
|
|
4161
|
+
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
|
|
4190
4162
|
}
|
|
4191
4163
|
toJSON() {
|
|
4192
4164
|
var _a, _b;
|
|
4193
|
-
const
|
|
4194
|
-
const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4165
|
+
const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4195
4166
|
return {
|
|
4196
4167
|
id: this.id,
|
|
4197
4168
|
component: this.component,
|
|
4198
4169
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4199
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4200
4170
|
};
|
|
4201
4171
|
}
|
|
4202
4172
|
dispose() {
|
|
@@ -4219,12 +4189,12 @@ class GridviewPanel extends BasePanelView {
|
|
|
4219
4189
|
this._snap = false;
|
|
4220
4190
|
this._onDidChange = new Emitter();
|
|
4221
4191
|
this.onDidChange = this._onDidChange.event;
|
|
4222
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4192
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4223
4193
|
const { isVisible } = event;
|
|
4224
|
-
const { containerApi } = this.
|
|
4194
|
+
const { containerApi } = this._params;
|
|
4225
4195
|
containerApi.setVisible(this, isVisible);
|
|
4226
4196
|
}), this.api.onActiveChange(() => {
|
|
4227
|
-
const { containerApi } = this.
|
|
4197
|
+
const { containerApi } = this._params;
|
|
4228
4198
|
containerApi.setActive(this);
|
|
4229
4199
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4230
4200
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4339,9 +4309,6 @@ class GridviewPanel extends BasePanelView {
|
|
|
4339
4309
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4340
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 });
|
|
4341
4311
|
}
|
|
4342
|
-
dispose() {
|
|
4343
|
-
super.dispose();
|
|
4344
|
-
}
|
|
4345
4312
|
}
|
|
4346
4313
|
|
|
4347
4314
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4413,7 +4380,9 @@ class DefaultGroupPanelView {
|
|
|
4413
4380
|
this.tab.init(params);
|
|
4414
4381
|
}
|
|
4415
4382
|
updateParentGroup(group, isPanelVisible) {
|
|
4416
|
-
|
|
4383
|
+
var _a;
|
|
4384
|
+
this._content.updateParentGroup(group, isPanelVisible);
|
|
4385
|
+
(_a = this._tab) === null || _a === void 0 ? void 0 : _a.updateParentGroup(group, isPanelVisible);
|
|
4417
4386
|
}
|
|
4418
4387
|
layout(width, height) {
|
|
4419
4388
|
this.content.layout(width, height);
|
|
@@ -4446,15 +4415,22 @@ class DockviewComponent extends BaseGrid {
|
|
|
4446
4415
|
orientation: options.orientation || Orientation.HORIZONTAL,
|
|
4447
4416
|
styles: options.styles,
|
|
4448
4417
|
});
|
|
4449
|
-
this._panels = new Map();
|
|
4450
|
-
this.dirtyPanels = new Set();
|
|
4451
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4452
4418
|
// events
|
|
4453
4419
|
this._onTabInteractionEvent = new Emitter();
|
|
4454
4420
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4455
4421
|
this._onTabContextMenu = new Emitter();
|
|
4456
4422
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4457
|
-
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);
|
|
4458
4434
|
this._options = options;
|
|
4459
4435
|
if (!this.options.components) {
|
|
4460
4436
|
this.options.components = {};
|
|
@@ -4475,10 +4451,10 @@ class DockviewComponent extends BaseGrid {
|
|
|
4475
4451
|
this._api = new DockviewApi(this);
|
|
4476
4452
|
}
|
|
4477
4453
|
get totalPanels() {
|
|
4478
|
-
return this.
|
|
4454
|
+
return this.panels.length;
|
|
4479
4455
|
}
|
|
4480
4456
|
get panels() {
|
|
4481
|
-
return
|
|
4457
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4482
4458
|
}
|
|
4483
4459
|
get deserializer() {
|
|
4484
4460
|
return this._deserializer;
|
|
@@ -4508,10 +4484,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4508
4484
|
updateOptions(options) {
|
|
4509
4485
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4510
4486
|
this.options.orientation !== options.orientation;
|
|
4511
|
-
// TODO support style update
|
|
4512
|
-
// const hasStylesChanged =
|
|
4513
|
-
// typeof options.styles === 'object' &&
|
|
4514
|
-
// this.options.styles !== options.styles;
|
|
4515
4487
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4516
4488
|
if (hasOrientationChanged) {
|
|
4517
4489
|
this.gridview.orientation = options.orientation;
|
|
@@ -4523,8 +4495,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4523
4495
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4524
4496
|
}
|
|
4525
4497
|
getGroupPanel(id) {
|
|
4526
|
-
|
|
4527
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4498
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4528
4499
|
}
|
|
4529
4500
|
setActivePanel(panel) {
|
|
4530
4501
|
if (!panel.group) {
|
|
@@ -4573,24 +4544,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4573
4544
|
this.doSetGroupActive(next);
|
|
4574
4545
|
}
|
|
4575
4546
|
}
|
|
4576
|
-
registerPanel(panel) {
|
|
4577
|
-
if (this._panels.has(panel.id)) {
|
|
4578
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4579
|
-
}
|
|
4580
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4581
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4582
|
-
}
|
|
4583
|
-
unregisterPanel(panel) {
|
|
4584
|
-
if (!this._panels.has(panel.id)) {
|
|
4585
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4586
|
-
}
|
|
4587
|
-
const item = this._panels.get(panel.id);
|
|
4588
|
-
if (item) {
|
|
4589
|
-
item.disposable.dispose();
|
|
4590
|
-
item.value.dispose();
|
|
4591
|
-
}
|
|
4592
|
-
this._panels.delete(panel.id);
|
|
4593
|
-
}
|
|
4594
4547
|
/**
|
|
4595
4548
|
* Serialize the current state of the layout
|
|
4596
4549
|
*
|
|
@@ -4598,12 +4551,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4598
4551
|
*/
|
|
4599
4552
|
toJSON() {
|
|
4600
4553
|
var _a;
|
|
4601
|
-
this.syncConfigs();
|
|
4602
4554
|
const data = this.gridview.serialize();
|
|
4603
|
-
const panels =
|
|
4604
|
-
|
|
4605
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4606
|
-
}
|
|
4555
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4556
|
+
collection[panel.id] = panel.toJSON();
|
|
4607
4557
|
return collection;
|
|
4608
4558
|
}, {});
|
|
4609
4559
|
return {
|
|
@@ -4615,11 +4565,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4615
4565
|
}
|
|
4616
4566
|
fromJSON(data) {
|
|
4617
4567
|
this.gridview.clear();
|
|
4618
|
-
this.
|
|
4619
|
-
panel.
|
|
4620
|
-
panel.value.dispose();
|
|
4568
|
+
this.panels.forEach((panel) => {
|
|
4569
|
+
panel.dispose();
|
|
4621
4570
|
});
|
|
4622
|
-
this._panels.clear();
|
|
4623
4571
|
this._groups.clear();
|
|
4624
4572
|
if (!this.deserializer) {
|
|
4625
4573
|
throw new Error('invalid deserializer');
|
|
@@ -4634,9 +4582,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4634
4582
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4635
4583
|
createPanel: (id) => {
|
|
4636
4584
|
const panelData = panels[id];
|
|
4637
|
-
|
|
4638
|
-
this.registerPanel(panel);
|
|
4639
|
-
return panel;
|
|
4585
|
+
return this.deserializer.fromJSON(panelData);
|
|
4640
4586
|
},
|
|
4641
4587
|
}));
|
|
4642
4588
|
if (typeof activeGroup === 'string') {
|
|
@@ -4647,30 +4593,23 @@ class DockviewComponent extends BaseGrid {
|
|
|
4647
4593
|
}
|
|
4648
4594
|
this.gridview.layout(this.width, this.height);
|
|
4649
4595
|
this._onGridEvent.fire({ kind: GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4596
|
+
this._onDidLayoutfromJSON.fire();
|
|
4650
4597
|
}
|
|
4651
4598
|
closeAllGroups() {
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
if (!didCloseAll) {
|
|
4657
|
-
return false;
|
|
4658
|
-
}
|
|
4659
|
-
}
|
|
4660
|
-
return true;
|
|
4661
|
-
});
|
|
4599
|
+
for (const entry of this._groups.entries()) {
|
|
4600
|
+
const [_, group] = entry;
|
|
4601
|
+
group.value.model.closeAllPanels();
|
|
4602
|
+
}
|
|
4662
4603
|
}
|
|
4663
4604
|
fireMouseEvent(event) {
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
}
|
|
4673
|
-
break;
|
|
4605
|
+
if (event.kind === MouseEventKind.CONTEXT_MENU) {
|
|
4606
|
+
if (event.tab && event.panel) {
|
|
4607
|
+
this._onTabContextMenu.fire({
|
|
4608
|
+
event: event.event,
|
|
4609
|
+
api: this._api,
|
|
4610
|
+
panel: event.panel,
|
|
4611
|
+
});
|
|
4612
|
+
}
|
|
4674
4613
|
}
|
|
4675
4614
|
}
|
|
4676
4615
|
addPanel(options) {
|
|
@@ -4704,7 +4643,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4704
4643
|
return panel;
|
|
4705
4644
|
}
|
|
4706
4645
|
removePanel(panel) {
|
|
4707
|
-
this.unregisterPanel(panel);
|
|
4708
4646
|
const group = panel.group;
|
|
4709
4647
|
if (!group) {
|
|
4710
4648
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
@@ -4723,10 +4661,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4723
4661
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4724
4662
|
}
|
|
4725
4663
|
addEmptyGroup(options) {
|
|
4726
|
-
var _a;
|
|
4727
4664
|
const group = this.createGroup();
|
|
4728
4665
|
if (options) {
|
|
4729
|
-
const referencePanel =
|
|
4666
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4730
4667
|
if (!referencePanel) {
|
|
4731
4668
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4732
4669
|
}
|
|
@@ -4755,13 +4692,13 @@ class DockviewComponent extends BaseGrid {
|
|
|
4755
4692
|
super.removeGroup(group);
|
|
4756
4693
|
}
|
|
4757
4694
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4758
|
-
var _a
|
|
4695
|
+
var _a;
|
|
4759
4696
|
const sourceGroup = groupId
|
|
4760
4697
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4761
4698
|
: undefined;
|
|
4762
4699
|
if (!target || target === Position.Center) {
|
|
4763
4700
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4764
|
-
|
|
4701
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4765
4702
|
if (!groupItem) {
|
|
4766
4703
|
throw new Error(`No panel with id ${itemId}`);
|
|
4767
4704
|
}
|
|
@@ -4797,7 +4734,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4797
4734
|
}
|
|
4798
4735
|
else {
|
|
4799
4736
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4800
|
-
|
|
4737
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4801
4738
|
if (!groupItem) {
|
|
4802
4739
|
throw new Error(`No panel with id ${itemId}`);
|
|
4803
4740
|
}
|
|
@@ -4807,7 +4744,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4807
4744
|
}
|
|
4808
4745
|
}
|
|
4809
4746
|
doSetGroupActive(group, skipFocus) {
|
|
4810
|
-
var _a, _b;
|
|
4747
|
+
var _a, _b, _c;
|
|
4811
4748
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4812
4749
|
super.doSetGroupActive(group, skipFocus);
|
|
4813
4750
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
@@ -4815,6 +4752,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4815
4752
|
kind: GroupChangeKind.PANEL_ACTIVE,
|
|
4816
4753
|
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4817
4754
|
});
|
|
4755
|
+
this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
|
|
4818
4756
|
}
|
|
4819
4757
|
}
|
|
4820
4758
|
createGroup(options) {
|
|
@@ -4840,6 +4778,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
4840
4778
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4841
4779
|
const { groupId, itemId, target, index } = event;
|
|
4842
4780
|
this.moveGroupOrPanel(view, groupId, itemId, target, index);
|
|
4781
|
+
}), view.model.onDidDrop((event) => {
|
|
4782
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
|
|
4843
4783
|
}), view.model.onDidGroupChange((event) => {
|
|
4844
4784
|
switch (event.kind) {
|
|
4845
4785
|
case GroupChangeKind2.ADD_PANEL:
|
|
@@ -4847,24 +4787,25 @@ class DockviewComponent extends BaseGrid {
|
|
|
4847
4787
|
kind: GroupChangeKind.ADD_PANEL,
|
|
4848
4788
|
panel: event.panel,
|
|
4849
4789
|
});
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
kind: GroupChangeKind.GROUP_ACTIVE,
|
|
4854
|
-
panel: event.panel,
|
|
4855
|
-
});
|
|
4790
|
+
if (event.panel) {
|
|
4791
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4792
|
+
}
|
|
4856
4793
|
break;
|
|
4857
4794
|
case GroupChangeKind2.REMOVE_PANEL:
|
|
4858
4795
|
this._onGridEvent.fire({
|
|
4859
4796
|
kind: GroupChangeKind.REMOVE_PANEL,
|
|
4860
4797
|
panel: event.panel,
|
|
4861
4798
|
});
|
|
4799
|
+
if (event.panel) {
|
|
4800
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4801
|
+
}
|
|
4862
4802
|
break;
|
|
4863
4803
|
case GroupChangeKind2.PANEL_ACTIVE:
|
|
4864
4804
|
this._onGridEvent.fire({
|
|
4865
4805
|
kind: GroupChangeKind.PANEL_ACTIVE,
|
|
4866
4806
|
panel: event.panel,
|
|
4867
4807
|
});
|
|
4808
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4868
4809
|
break;
|
|
4869
4810
|
}
|
|
4870
4811
|
}));
|
|
@@ -4878,44 +4819,18 @@ class DockviewComponent extends BaseGrid {
|
|
|
4878
4819
|
}
|
|
4879
4820
|
return view;
|
|
4880
4821
|
}
|
|
4881
|
-
dispose() {
|
|
4882
|
-
super.dispose();
|
|
4883
|
-
this._onGridEvent.dispose();
|
|
4884
|
-
}
|
|
4885
|
-
/**
|
|
4886
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4887
|
-
*/
|
|
4888
|
-
syncConfigs() {
|
|
4889
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4890
|
-
if (dirtyPanels.length === 0) ;
|
|
4891
|
-
this.dirtyPanels.clear();
|
|
4892
|
-
const partialPanelState = dirtyPanels
|
|
4893
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4894
|
-
.filter((_) => !!_)
|
|
4895
|
-
.reduce((collection, panel) => {
|
|
4896
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4897
|
-
return collection;
|
|
4898
|
-
}, {});
|
|
4899
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4900
|
-
dirtyPanels
|
|
4901
|
-
.filter((p) => this._panels.has(p.id))
|
|
4902
|
-
.forEach((panel) => {
|
|
4903
|
-
panel.setDirty(false);
|
|
4904
|
-
});
|
|
4905
|
-
}
|
|
4906
4822
|
_addPanel(options) {
|
|
4907
4823
|
const view = new DefaultGroupPanelView({
|
|
4908
4824
|
content: this.createContentComponent(options.id, options.component),
|
|
4909
4825
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4910
4826
|
});
|
|
4911
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4827
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4912
4828
|
panel.init({
|
|
4913
4829
|
view,
|
|
4914
4830
|
title: options.title || options.id,
|
|
4915
4831
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4916
4832
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4917
4833
|
});
|
|
4918
|
-
this.registerPanel(panel);
|
|
4919
4834
|
return panel;
|
|
4920
4835
|
}
|
|
4921
4836
|
createContentComponent(id, componentName) {
|
|
@@ -4935,10 +4850,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
4935
4850
|
var _a;
|
|
4936
4851
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4937
4852
|
}
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
this.
|
|
4853
|
+
dispose() {
|
|
4854
|
+
super.dispose();
|
|
4855
|
+
this._onDidActivePanelChange.dispose();
|
|
4856
|
+
this._onDidAddPanel.dispose();
|
|
4857
|
+
this._onDidRemovePanel.dispose();
|
|
4858
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4942
4859
|
}
|
|
4943
4860
|
}
|
|
4944
4861
|
|
|
@@ -4949,6 +4866,8 @@ class GridviewComponent extends BaseGrid {
|
|
|
4949
4866
|
orientation: options.orientation,
|
|
4950
4867
|
styles: options.styles,
|
|
4951
4868
|
});
|
|
4869
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4870
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
4952
4871
|
this._options = options;
|
|
4953
4872
|
if (!this.options.components) {
|
|
4954
4873
|
this.options.components = {};
|
|
@@ -5057,6 +4976,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
5057
4976
|
}
|
|
5058
4977
|
}
|
|
5059
4978
|
this._onGridEvent.fire({ kind: GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4979
|
+
this._onDidLayoutfromJSON.fire();
|
|
5060
4980
|
}
|
|
5061
4981
|
movePanel(panel, options) {
|
|
5062
4982
|
var _a;
|
|
@@ -5171,6 +5091,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
5171
5091
|
}
|
|
5172
5092
|
dispose() {
|
|
5173
5093
|
super.dispose();
|
|
5094
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5174
5095
|
}
|
|
5175
5096
|
}
|
|
5176
5097
|
|
|
@@ -5183,6 +5104,10 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5183
5104
|
this.element = element;
|
|
5184
5105
|
this._disposable = new MutableDisposable();
|
|
5185
5106
|
this.panels = new Map();
|
|
5107
|
+
this._onDidAddView = new Emitter();
|
|
5108
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5109
|
+
this._onDidRemoveView = new Emitter();
|
|
5110
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5186
5111
|
this._onDidLayoutChange = new Emitter();
|
|
5187
5112
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5188
5113
|
this._options = options;
|
|
@@ -5193,7 +5118,7 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5193
5118
|
options.frameworkComponents = {};
|
|
5194
5119
|
}
|
|
5195
5120
|
this.splitview = new Splitview(this.element, options);
|
|
5196
|
-
this.addDisposables(this._disposable);
|
|
5121
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5197
5122
|
}
|
|
5198
5123
|
get options() {
|
|
5199
5124
|
return this._options;
|
|
@@ -5208,7 +5133,7 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5208
5133
|
this._splitview = value;
|
|
5209
5134
|
this._disposable.value = new CompositeDisposable(this._splitview.onDidSashEnd(() => {
|
|
5210
5135
|
this._onDidLayoutChange.fire(undefined);
|
|
5211
|
-
}));
|
|
5136
|
+
}), this._splitview.onDidAddView((e) => this._onDidAddView.fire(e)), this._splitview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
|
|
5212
5137
|
}
|
|
5213
5138
|
get minimumSize() {
|
|
5214
5139
|
return this.splitview.minimumSize;
|
|
@@ -5382,6 +5307,10 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5382
5307
|
});
|
|
5383
5308
|
panel.orientation = orientation;
|
|
5384
5309
|
this.doAddView(panel);
|
|
5310
|
+
setTimeout(() => {
|
|
5311
|
+
// the original onDidAddView events are missed since they are fired before we can subcribe to them
|
|
5312
|
+
this._onDidAddView.fire(panel);
|
|
5313
|
+
}, 0);
|
|
5385
5314
|
return { size: view.size, view: panel };
|
|
5386
5315
|
}),
|
|
5387
5316
|
},
|
|
@@ -5411,41 +5340,6 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5411
5340
|
}
|
|
5412
5341
|
}
|
|
5413
5342
|
|
|
5414
|
-
class DragHandler extends CompositeDisposable {
|
|
5415
|
-
constructor(el) {
|
|
5416
|
-
super();
|
|
5417
|
-
this.el = el;
|
|
5418
|
-
this.iframes = [];
|
|
5419
|
-
this._onDragStart = new Emitter();
|
|
5420
|
-
this.onDragStart = this._onDragStart.event;
|
|
5421
|
-
this.configure();
|
|
5422
|
-
}
|
|
5423
|
-
configure() {
|
|
5424
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5425
|
-
var _a;
|
|
5426
|
-
this.iframes = [
|
|
5427
|
-
...getElementsByTagName('iframe'),
|
|
5428
|
-
...getElementsByTagName('webview'),
|
|
5429
|
-
];
|
|
5430
|
-
for (const iframe of this.iframes) {
|
|
5431
|
-
iframe.style.pointerEvents = 'none';
|
|
5432
|
-
}
|
|
5433
|
-
this.el.classList.add('dragged');
|
|
5434
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5435
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5436
|
-
this.disposable = this.getData();
|
|
5437
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5438
|
-
var _a;
|
|
5439
|
-
for (const iframe of this.iframes) {
|
|
5440
|
-
iframe.style.pointerEvents = 'auto';
|
|
5441
|
-
}
|
|
5442
|
-
this.iframes = [];
|
|
5443
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5444
|
-
this.disposable = undefined;
|
|
5445
|
-
}));
|
|
5446
|
-
}
|
|
5447
|
-
}
|
|
5448
|
-
|
|
5449
5343
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5450
5344
|
//
|
|
5451
5345
|
constructor(id) {
|
|
@@ -5460,6 +5354,7 @@ class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
|
5460
5354
|
//
|
|
5461
5355
|
this._onDidSizeChange = new Emitter();
|
|
5462
5356
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5357
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5463
5358
|
}
|
|
5464
5359
|
setConstraints(value) {
|
|
5465
5360
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5467,11 +5362,6 @@ class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
|
5467
5362
|
setSize(event) {
|
|
5468
5363
|
this._onDidSizeChange.fire(event);
|
|
5469
5364
|
}
|
|
5470
|
-
dispose() {
|
|
5471
|
-
super.dispose();
|
|
5472
|
-
this._onDidConstraintsChange.dispose();
|
|
5473
|
-
this._onDidSizeChange.dispose();
|
|
5474
|
-
}
|
|
5475
5365
|
}
|
|
5476
5366
|
|
|
5477
5367
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5485,6 +5375,7 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5485
5375
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5486
5376
|
this._onMouseLeave = new Emitter({});
|
|
5487
5377
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5378
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5488
5379
|
}
|
|
5489
5380
|
set pane(pane) {
|
|
5490
5381
|
this._pane = pane;
|
|
@@ -5500,7 +5391,7 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5500
5391
|
}
|
|
5501
5392
|
|
|
5502
5393
|
class PaneviewPanel extends BasePanelView {
|
|
5503
|
-
constructor(id, component, headerComponent, orientation, isExpanded) {
|
|
5394
|
+
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5504
5395
|
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5505
5396
|
this.headerComponent = headerComponent;
|
|
5506
5397
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
@@ -5516,6 +5407,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5516
5407
|
this.expandedSize = 0;
|
|
5517
5408
|
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
5518
5409
|
this._isExpanded = isExpanded;
|
|
5410
|
+
this._headerVisible = isHeaderVisible;
|
|
5519
5411
|
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
5520
5412
|
this._orientation = orientation;
|
|
5521
5413
|
this.element.classList.add('pane');
|
|
@@ -5583,6 +5475,13 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5583
5475
|
this._maximumBodySize =
|
|
5584
5476
|
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
5585
5477
|
}
|
|
5478
|
+
get headerVisible() {
|
|
5479
|
+
return this._headerVisible;
|
|
5480
|
+
}
|
|
5481
|
+
set headerVisible(value) {
|
|
5482
|
+
this._headerVisible = value;
|
|
5483
|
+
this.header.style.display = value ? '' : 'none';
|
|
5484
|
+
}
|
|
5586
5485
|
setVisible(isVisible) {
|
|
5587
5486
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
5588
5487
|
}
|
|
@@ -5645,7 +5544,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5645
5544
|
}
|
|
5646
5545
|
}
|
|
5647
5546
|
toJSON() {
|
|
5648
|
-
const params = this.
|
|
5547
|
+
const params = this._params;
|
|
5649
5548
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5650
5549
|
}
|
|
5651
5550
|
renderOnce() {
|
|
@@ -5680,7 +5579,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5680
5579
|
|
|
5681
5580
|
class DraggablePaneviewPanel extends PaneviewPanel {
|
|
5682
5581
|
constructor(id, component, headerComponent, orientation, isExpanded, disableDnd) {
|
|
5683
|
-
super(id, component, headerComponent, orientation, isExpanded);
|
|
5582
|
+
super(id, component, headerComponent, orientation, isExpanded, true);
|
|
5684
5583
|
this._onDidDrop = new Emitter();
|
|
5685
5584
|
this.onDidDrop = this._onDidDrop.event;
|
|
5686
5585
|
if (!disableDnd) {
|
|
@@ -5714,36 +5613,39 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5714
5613
|
},
|
|
5715
5614
|
});
|
|
5716
5615
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5717
|
-
|
|
5718
|
-
if (!data) {
|
|
5719
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5720
|
-
return;
|
|
5721
|
-
}
|
|
5722
|
-
const containerApi = this.params
|
|
5723
|
-
.containerApi;
|
|
5724
|
-
const panelId = data.paneId;
|
|
5725
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5726
|
-
if (!existingPanel) {
|
|
5727
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5728
|
-
return;
|
|
5729
|
-
}
|
|
5730
|
-
const allPanels = containerApi.getPanels();
|
|
5731
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5732
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5733
|
-
if (event.position === Position.Left ||
|
|
5734
|
-
event.position === Position.Top) {
|
|
5735
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5736
|
-
}
|
|
5737
|
-
if (event.position === Position.Right ||
|
|
5738
|
-
event.position === Position.Bottom) {
|
|
5739
|
-
if (fromIndex > toIndex) {
|
|
5740
|
-
toIndex++;
|
|
5741
|
-
}
|
|
5742
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5743
|
-
}
|
|
5744
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5616
|
+
this.onDrop(event);
|
|
5745
5617
|
}));
|
|
5746
5618
|
}
|
|
5619
|
+
onDrop(event) {
|
|
5620
|
+
const data = getPaneData();
|
|
5621
|
+
if (!data) {
|
|
5622
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5623
|
+
return;
|
|
5624
|
+
}
|
|
5625
|
+
const containerApi = this._params
|
|
5626
|
+
.containerApi;
|
|
5627
|
+
const panelId = data.paneId;
|
|
5628
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
5629
|
+
if (!existingPanel) {
|
|
5630
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5631
|
+
return;
|
|
5632
|
+
}
|
|
5633
|
+
const allPanels = containerApi.getPanels();
|
|
5634
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5635
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5636
|
+
if (event.position === Position.Left ||
|
|
5637
|
+
event.position === Position.Top) {
|
|
5638
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
5639
|
+
}
|
|
5640
|
+
if (event.position === Position.Right ||
|
|
5641
|
+
event.position === Position.Bottom) {
|
|
5642
|
+
if (fromIndex > toIndex) {
|
|
5643
|
+
toIndex++;
|
|
5644
|
+
}
|
|
5645
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5646
|
+
}
|
|
5647
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
5648
|
+
}
|
|
5747
5649
|
}
|
|
5748
5650
|
|
|
5749
5651
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5803,6 +5705,11 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5803
5705
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5804
5706
|
this._onDidDrop = new Emitter();
|
|
5805
5707
|
this.onDidDrop = this._onDidDrop.event;
|
|
5708
|
+
this._onDidAddView = new Emitter();
|
|
5709
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5710
|
+
this._onDidRemoveView = new Emitter();
|
|
5711
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5712
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5806
5713
|
this._options = options;
|
|
5807
5714
|
if (!options.components) {
|
|
5808
5715
|
options.components = {};
|
|
@@ -5816,17 +5723,11 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5816
5723
|
});
|
|
5817
5724
|
this.addDisposables(this._disposable);
|
|
5818
5725
|
}
|
|
5819
|
-
get onDidAddView() {
|
|
5820
|
-
return this._paneview.onDidAddView;
|
|
5821
|
-
}
|
|
5822
|
-
get onDidRemoveView() {
|
|
5823
|
-
return this._paneview.onDidRemoveView;
|
|
5824
|
-
}
|
|
5825
5726
|
set paneview(value) {
|
|
5826
5727
|
this._paneview = value;
|
|
5827
|
-
this._disposable.value = new CompositeDisposable(this.
|
|
5728
|
+
this._disposable.value = new CompositeDisposable(this._paneview.onDidChange(() => {
|
|
5828
5729
|
this._onDidLayoutChange.fire(undefined);
|
|
5829
|
-
}));
|
|
5730
|
+
}), this._paneview.onDidAddView((e) => this._onDidAddView.fire(e)), this._paneview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
|
|
5830
5731
|
}
|
|
5831
5732
|
get paneview() {
|
|
5832
5733
|
return this._paneview;
|
|
@@ -6006,6 +5907,10 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
6006
5907
|
});
|
|
6007
5908
|
panel.orientation = this.paneview.orientation;
|
|
6008
5909
|
});
|
|
5910
|
+
setTimeout(() => {
|
|
5911
|
+
// the original onDidAddView events are missed since they are fired before we can subcribe to them
|
|
5912
|
+
this._onDidAddView.fire(panel);
|
|
5913
|
+
}, 0);
|
|
6009
5914
|
return { size: view.size, view: panel };
|
|
6010
5915
|
}),
|
|
6011
5916
|
},
|
|
@@ -6032,12 +5937,14 @@ class SplitviewPanel extends BasePanelView {
|
|
|
6032
5937
|
this._snap = false;
|
|
6033
5938
|
this._onDidChange = new Emitter();
|
|
6034
5939
|
this.onDidChange = this._onDidChange.event;
|
|
6035
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5940
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6036
5941
|
const { isVisible } = event;
|
|
6037
|
-
const { containerApi } = this
|
|
5942
|
+
const { containerApi } = this
|
|
5943
|
+
._params;
|
|
6038
5944
|
containerApi.setVisible(this, isVisible);
|
|
6039
5945
|
}), this.api.onActiveChange(() => {
|
|
6040
|
-
const { containerApi } = this
|
|
5946
|
+
const { containerApi } = this
|
|
5947
|
+
._params;
|
|
6041
5948
|
containerApi.setActive(this);
|
|
6042
5949
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6043
5950
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6180,14 +6087,13 @@ class ReactPart {
|
|
|
6180
6087
|
if (this.disposed) {
|
|
6181
6088
|
throw new Error('invalid operation: resource is already disposed');
|
|
6182
6089
|
}
|
|
6183
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6184
6090
|
if (typeof this.component !== 'function') {
|
|
6185
6091
|
/**
|
|
6186
6092
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6187
6093
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6188
6094
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6189
6095
|
*/
|
|
6190
|
-
throw new Error('
|
|
6096
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6191
6097
|
}
|
|
6192
6098
|
const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {
|
|
6193
6099
|
component: this
|
|
@@ -6251,16 +6157,14 @@ class ReactPanelContentPart {
|
|
|
6251
6157
|
this._onDidBlur = new Emitter();
|
|
6252
6158
|
this.onDidBlur = this._onDidBlur.event;
|
|
6253
6159
|
this._element = document.createElement('div');
|
|
6254
|
-
this._element.
|
|
6255
|
-
this._element.style.width = '100%';
|
|
6160
|
+
this._element.className = 'dockview-react-part';
|
|
6256
6161
|
// this.hostedContainer = new HostedContainer({
|
|
6257
6162
|
// id,
|
|
6258
6163
|
// });
|
|
6259
6164
|
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6260
6165
|
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6261
6166
|
this._actionsElement = document.createElement('div');
|
|
6262
|
-
this._actionsElement.
|
|
6263
|
-
this._actionsElement.style.width = '100%';
|
|
6167
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6264
6168
|
}
|
|
6265
6169
|
get element() {
|
|
6266
6170
|
return this._element;
|
|
@@ -6308,6 +6212,8 @@ class ReactPanelContentPart {
|
|
|
6308
6212
|
}
|
|
6309
6213
|
dispose() {
|
|
6310
6214
|
var _a, _b;
|
|
6215
|
+
this._onDidFocus.dispose();
|
|
6216
|
+
this._onDidBlur.dispose();
|
|
6311
6217
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6312
6218
|
// this.hostedContainer?.dispose();
|
|
6313
6219
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
@@ -6320,6 +6226,7 @@ class ReactPanelHeaderPart {
|
|
|
6320
6226
|
this.component = component;
|
|
6321
6227
|
this.reactPortalStore = reactPortalStore;
|
|
6322
6228
|
this._element = document.createElement('div');
|
|
6229
|
+
this._element.className = 'dockview-react-part';
|
|
6323
6230
|
}
|
|
6324
6231
|
get element() {
|
|
6325
6232
|
return this._element;
|
|
@@ -6364,7 +6271,6 @@ class ReactPanelDeserialzier {
|
|
|
6364
6271
|
const panelId = panelData.id;
|
|
6365
6272
|
const params = panelData.params;
|
|
6366
6273
|
const title = panelData.title;
|
|
6367
|
-
const state = panelData.state;
|
|
6368
6274
|
const suppressClosable = panelData.suppressClosable;
|
|
6369
6275
|
const viewData = panelData.view;
|
|
6370
6276
|
const view = new DefaultGroupPanelView({
|
|
@@ -6373,13 +6279,12 @@ class ReactPanelDeserialzier {
|
|
|
6373
6279
|
? 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)
|
|
6374
6280
|
: new DefaultTab(),
|
|
6375
6281
|
});
|
|
6376
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6282
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6377
6283
|
panel.init({
|
|
6378
6284
|
view,
|
|
6379
6285
|
title,
|
|
6380
6286
|
suppressClosable,
|
|
6381
6287
|
params: params || {},
|
|
6382
|
-
state: state || {},
|
|
6383
6288
|
});
|
|
6384
6289
|
return panel;
|
|
6385
6290
|
}
|
|
@@ -6394,8 +6299,7 @@ class ReactWatermarkPart {
|
|
|
6394
6299
|
value: undefined,
|
|
6395
6300
|
};
|
|
6396
6301
|
this._element = document.createElement('div');
|
|
6397
|
-
this._element.
|
|
6398
|
-
this._element.style.width = '100%';
|
|
6302
|
+
this._element.className = 'dockview-react-part';
|
|
6399
6303
|
}
|
|
6400
6304
|
get element() {
|
|
6401
6305
|
return this._element;
|
|
@@ -6493,12 +6397,16 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
6493
6397
|
frameworkTabComponents: props.tabComponents,
|
|
6494
6398
|
tabHeight: props.tabHeight,
|
|
6495
6399
|
debug: props.debug,
|
|
6496
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6497
6400
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6498
6401
|
styles: props.hideBorders
|
|
6499
6402
|
? { separatorBorder: 'transparent' }
|
|
6500
6403
|
: undefined,
|
|
6501
6404
|
});
|
|
6405
|
+
const disposable = dockview.onDidDrop((event) => {
|
|
6406
|
+
if (props.onDidDrop) {
|
|
6407
|
+
props.onDidDrop(event);
|
|
6408
|
+
}
|
|
6409
|
+
});
|
|
6502
6410
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6503
6411
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
6504
6412
|
const { clientWidth, clientHeight } = domRef.current;
|
|
@@ -6508,6 +6416,7 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
6508
6416
|
}
|
|
6509
6417
|
dockviewRef.current = dockview;
|
|
6510
6418
|
return () => {
|
|
6419
|
+
disposable.dispose();
|
|
6511
6420
|
dockview.dispose();
|
|
6512
6421
|
};
|
|
6513
6422
|
}, []);
|
|
@@ -6519,6 +6428,14 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
6519
6428
|
frameworkComponents: props.components,
|
|
6520
6429
|
});
|
|
6521
6430
|
}, [props.components]);
|
|
6431
|
+
React.useEffect(() => {
|
|
6432
|
+
if (!dockviewRef.current) {
|
|
6433
|
+
return;
|
|
6434
|
+
}
|
|
6435
|
+
dockviewRef.current.updateOptions({
|
|
6436
|
+
showDndOverlay: props.showDndOverlay,
|
|
6437
|
+
});
|
|
6438
|
+
}, [props.showDndOverlay]);
|
|
6522
6439
|
React.useEffect(() => {
|
|
6523
6440
|
if (!dockviewRef.current) {
|
|
6524
6441
|
return;
|
|
@@ -6607,9 +6524,9 @@ class ReactPanelView extends SplitviewPanel {
|
|
|
6607
6524
|
getComponent() {
|
|
6608
6525
|
var _a;
|
|
6609
6526
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6610
|
-
params: ((_a = this.
|
|
6527
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6611
6528
|
api: this.api,
|
|
6612
|
-
containerApi: this.
|
|
6529
|
+
containerApi: this._params
|
|
6613
6530
|
.containerApi,
|
|
6614
6531
|
});
|
|
6615
6532
|
}
|
|
@@ -6682,9 +6599,9 @@ class ReactGridPanelView extends GridviewPanel {
|
|
|
6682
6599
|
getComponent() {
|
|
6683
6600
|
var _a;
|
|
6684
6601
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6685
|
-
params: ((_a = this.
|
|
6602
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6686
6603
|
api: this.api,
|
|
6687
|
-
containerApi: this.
|
|
6604
|
+
containerApi: this._params
|
|
6688
6605
|
.containerApi,
|
|
6689
6606
|
});
|
|
6690
6607
|
}
|
|
@@ -6872,4 +6789,4 @@ const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
6872
6789
|
});
|
|
6873
6790
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
6874
6791
|
|
|
6875
|
-
export { BaseGrid, CompositeDisposable, ContentContainer,
|
|
6792
|
+
export { BaseGrid, CompositeDisposable, ContentContainer, Disposable, DockviewApi, DockviewComponent, DockviewComponents, DockviewReact, Emitter, Event, Gridview, GridviewApi, GridviewComponent, GridviewPanel, GridviewReact, GroupChangeKind, GroupChangeKind2, Groupview, LayoutPriority, LocalSelectionTransfer, MouseEventKind, MutableDisposable, Orientation, PaneFramework, PaneTransfer, PanelTransfer, Paneview, PaneviewApi, PaneviewComponent, PaneviewPanel, PaneviewReact, Position, ReactPanelContentPart, ReactPanelHeaderPart, ReactPart, ReactPartContext, SashState, Sizing, Splitview, SplitviewApi, SplitviewComponent, SplitviewPanel, SplitviewReact, Tab$1 as Tab, TickDelayedEvent, addDisposableListener, addDisposableWindowListener, getDirectionOrientation, getGridLocation, getLocationOrientation, getPaneData, getPanelData, getRelativeLocation, indexInParent, isGridBranchNode, isReactElement, orthogonal, toTarget, usePortalsLifecycle };
|