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.cjs.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
|
*/
|
|
@@ -59,7 +59,7 @@ function styleInject(css, ref) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
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}";
|
|
62
|
+
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}";
|
|
63
63
|
styleInject(css_248z);
|
|
64
64
|
|
|
65
65
|
exports.Event = void 0;
|
|
@@ -92,7 +92,6 @@ class Emitter {
|
|
|
92
92
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
|
|
93
93
|
listener(this._last);
|
|
94
94
|
}
|
|
95
|
-
this._listeners.length === 0;
|
|
96
95
|
this._listeners.push(listener);
|
|
97
96
|
return {
|
|
98
97
|
dispose: () => {
|
|
@@ -108,9 +107,9 @@ class Emitter {
|
|
|
108
107
|
}
|
|
109
108
|
fire(e) {
|
|
110
109
|
this._last = e;
|
|
111
|
-
this._listeners
|
|
110
|
+
for (const listener of this._listeners) {
|
|
112
111
|
listener(e);
|
|
113
|
-
}
|
|
112
|
+
}
|
|
114
113
|
}
|
|
115
114
|
dispose() {
|
|
116
115
|
this._listeners = [];
|
|
@@ -132,6 +131,24 @@ function addDisposableListener(element, type, listener, options) {
|
|
|
132
131
|
element.removeEventListener(type, listener);
|
|
133
132
|
},
|
|
134
133
|
};
|
|
134
|
+
}
|
|
135
|
+
class TickDelayedEvent {
|
|
136
|
+
constructor() {
|
|
137
|
+
this._onFired = new Emitter();
|
|
138
|
+
this.onEvent = this._onFired.event;
|
|
139
|
+
}
|
|
140
|
+
fire() {
|
|
141
|
+
if (this.timer) {
|
|
142
|
+
clearTimeout(this.timer);
|
|
143
|
+
}
|
|
144
|
+
this.timer = setTimeout(() => {
|
|
145
|
+
this._onFired.fire();
|
|
146
|
+
clearTimeout(this.timer);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
dispose() {
|
|
150
|
+
this._onFired.dispose();
|
|
151
|
+
}
|
|
135
152
|
}
|
|
136
153
|
|
|
137
154
|
exports.Disposable = void 0;
|
|
@@ -150,7 +167,7 @@ class CompositeDisposable {
|
|
|
150
167
|
return new CompositeDisposable(...args);
|
|
151
168
|
}
|
|
152
169
|
addDisposables(...args) {
|
|
153
|
-
args
|
|
170
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
154
171
|
}
|
|
155
172
|
dispose() {
|
|
156
173
|
this.disposables.forEach((arg) => arg.dispose());
|
|
@@ -169,20 +186,11 @@ class MutableDisposable {
|
|
|
169
186
|
dispose() {
|
|
170
187
|
if (this._disposable) {
|
|
171
188
|
this._disposable.dispose();
|
|
189
|
+
this._disposable = exports.Disposable.NONE;
|
|
172
190
|
}
|
|
173
191
|
}
|
|
174
192
|
}
|
|
175
193
|
|
|
176
|
-
function tryParseJSON(text, reviver) {
|
|
177
|
-
try {
|
|
178
|
-
return JSON.parse(text, reviver);
|
|
179
|
-
}
|
|
180
|
-
catch (err) {
|
|
181
|
-
console.warn('failed to parse JSON');
|
|
182
|
-
return undefined;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
194
|
class TransferObject {
|
|
187
195
|
constructor() {
|
|
188
196
|
//
|
|
@@ -203,45 +211,6 @@ class PaneTransfer extends TransferObject {
|
|
|
203
211
|
this.paneId = paneId;
|
|
204
212
|
}
|
|
205
213
|
}
|
|
206
|
-
const DATA_KEY = 'splitview/transfer';
|
|
207
|
-
const isPanelTransferEvent = (event) => {
|
|
208
|
-
if (!event.dataTransfer) {
|
|
209
|
-
return false;
|
|
210
|
-
}
|
|
211
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
212
|
-
};
|
|
213
|
-
exports.DragType = void 0;
|
|
214
|
-
(function (DragType) {
|
|
215
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
216
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
217
|
-
})(exports.DragType || (exports.DragType = {}));
|
|
218
|
-
/**
|
|
219
|
-
* Determine whether this data belong to that of an event that was started by
|
|
220
|
-
* dragging a tab component
|
|
221
|
-
*/
|
|
222
|
-
const isTabDragEvent = (data) => {
|
|
223
|
-
return data.type === exports.DragType.DOCKVIEW_TAB;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* Determine whether this data belong to that of an event that was started by
|
|
227
|
-
* a custom drag-enable component
|
|
228
|
-
*/
|
|
229
|
-
const isCustomDragEvent = (data) => {
|
|
230
|
-
return data.type === exports.DragType.EXTERNAL;
|
|
231
|
-
};
|
|
232
|
-
const extractData = (event) => {
|
|
233
|
-
if (!event.dataTransfer) {
|
|
234
|
-
return null;
|
|
235
|
-
}
|
|
236
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
237
|
-
if (!data) {
|
|
238
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
239
|
-
}
|
|
240
|
-
if (typeof data.type !== 'string') {
|
|
241
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
242
|
-
}
|
|
243
|
-
return data;
|
|
244
|
-
};
|
|
245
214
|
/**
|
|
246
215
|
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
247
216
|
*/
|
|
@@ -311,11 +280,17 @@ class SplitviewApi {
|
|
|
311
280
|
get length() {
|
|
312
281
|
return this.component.length;
|
|
313
282
|
}
|
|
283
|
+
get orientation() {
|
|
284
|
+
return this.component.orientation;
|
|
285
|
+
}
|
|
314
286
|
get onDidLayoutChange() {
|
|
315
287
|
return this.component.onDidLayoutChange;
|
|
316
288
|
}
|
|
317
|
-
get
|
|
318
|
-
return this.component.
|
|
289
|
+
get onDidAddView() {
|
|
290
|
+
return this.component.onDidAddView;
|
|
291
|
+
}
|
|
292
|
+
get onDidRemoveView() {
|
|
293
|
+
return this.component.onDidRemoveView;
|
|
319
294
|
}
|
|
320
295
|
updateOptions(options) {
|
|
321
296
|
this.component.updateOptions(options);
|
|
@@ -361,21 +336,38 @@ class PaneviewApi {
|
|
|
361
336
|
constructor(component) {
|
|
362
337
|
this.component = component;
|
|
363
338
|
}
|
|
364
|
-
get width() {
|
|
365
|
-
return this.component.width;
|
|
366
|
-
}
|
|
367
|
-
get height() {
|
|
368
|
-
return this.component.height;
|
|
369
|
-
}
|
|
370
339
|
get minimumSize() {
|
|
371
340
|
return this.component.minimumSize;
|
|
372
341
|
}
|
|
373
342
|
get maximumSize() {
|
|
374
343
|
return this.component.maximumSize;
|
|
375
344
|
}
|
|
345
|
+
get height() {
|
|
346
|
+
return this.component.height;
|
|
347
|
+
}
|
|
348
|
+
get width() {
|
|
349
|
+
return this.component.width;
|
|
350
|
+
}
|
|
376
351
|
get onDidLayoutChange() {
|
|
377
352
|
return this.component.onDidLayoutChange;
|
|
378
353
|
}
|
|
354
|
+
get onDidAddView() {
|
|
355
|
+
return this.component.onDidAddView;
|
|
356
|
+
}
|
|
357
|
+
get onDidRemoveView() {
|
|
358
|
+
return this.component.onDidRemoveView;
|
|
359
|
+
}
|
|
360
|
+
get onDidDrop() {
|
|
361
|
+
const emitter = new Emitter();
|
|
362
|
+
const disposable = this.component.onDidDrop((e) => {
|
|
363
|
+
emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
|
|
364
|
+
});
|
|
365
|
+
emitter.dispose = () => {
|
|
366
|
+
disposable.dispose();
|
|
367
|
+
emitter.dispose();
|
|
368
|
+
};
|
|
369
|
+
return emitter.event;
|
|
370
|
+
}
|
|
379
371
|
getPanels() {
|
|
380
372
|
return this.component.getPanels();
|
|
381
373
|
}
|
|
@@ -411,12 +403,6 @@ class GridviewApi {
|
|
|
411
403
|
constructor(component) {
|
|
412
404
|
this.component = component;
|
|
413
405
|
}
|
|
414
|
-
get width() {
|
|
415
|
-
return this.component.width;
|
|
416
|
-
}
|
|
417
|
-
get height() {
|
|
418
|
-
return this.component.height;
|
|
419
|
-
}
|
|
420
406
|
get minimumHeight() {
|
|
421
407
|
return this.component.minimumHeight;
|
|
422
408
|
}
|
|
@@ -429,12 +415,30 @@ class GridviewApi {
|
|
|
429
415
|
get maximumWidth() {
|
|
430
416
|
return this.component.maximumWidth;
|
|
431
417
|
}
|
|
418
|
+
get width() {
|
|
419
|
+
return this.component.width;
|
|
420
|
+
}
|
|
421
|
+
get height() {
|
|
422
|
+
return this.component.height;
|
|
423
|
+
}
|
|
432
424
|
get onGridEvent() {
|
|
433
425
|
return this.component.onGridEvent;
|
|
434
426
|
}
|
|
435
427
|
get onDidLayoutChange() {
|
|
436
428
|
return this.component.onDidLayoutChange;
|
|
437
429
|
}
|
|
430
|
+
get onDidAddGroup() {
|
|
431
|
+
return this.component.onDidAddGroup;
|
|
432
|
+
}
|
|
433
|
+
get onDidRemoveGroup() {
|
|
434
|
+
return this.component.onDidRemoveGroup;
|
|
435
|
+
}
|
|
436
|
+
get onDidActiveGroupChange() {
|
|
437
|
+
return this.component.onDidActiveGroupChange;
|
|
438
|
+
}
|
|
439
|
+
get onDidLayoutFromJSON() {
|
|
440
|
+
return this.component.onDidLayoutFromJSON;
|
|
441
|
+
}
|
|
438
442
|
get panels() {
|
|
439
443
|
return this.component.groups;
|
|
440
444
|
}
|
|
@@ -512,6 +516,27 @@ class DockviewApi {
|
|
|
512
516
|
get onGridEvent() {
|
|
513
517
|
return this.component.onGridEvent;
|
|
514
518
|
}
|
|
519
|
+
get onDidActiveGroupChange() {
|
|
520
|
+
return this.component.onDidActiveGroupChange;
|
|
521
|
+
}
|
|
522
|
+
get onDidAddGroup() {
|
|
523
|
+
return this.component.onDidAddGroup;
|
|
524
|
+
}
|
|
525
|
+
get onDidRemoveGroup() {
|
|
526
|
+
return this.component.onDidRemoveGroup;
|
|
527
|
+
}
|
|
528
|
+
get onDidActivePanelChange() {
|
|
529
|
+
return this.component.onDidActivePanelChange;
|
|
530
|
+
}
|
|
531
|
+
get onDidAddPanel() {
|
|
532
|
+
return this.component.onDidAddPanel;
|
|
533
|
+
}
|
|
534
|
+
get onDidRemovePanel() {
|
|
535
|
+
return this.component.onDidRemovePanel;
|
|
536
|
+
}
|
|
537
|
+
get onDidLayoutfromJSON() {
|
|
538
|
+
return this.component.onDidLayoutfromJSON;
|
|
539
|
+
}
|
|
515
540
|
get onDidLayoutChange() {
|
|
516
541
|
return this.component.onDidLayoutChange;
|
|
517
542
|
}
|
|
@@ -539,18 +564,12 @@ class DockviewApi {
|
|
|
539
564
|
getPanel(id) {
|
|
540
565
|
return this.component.getGroupPanel(id);
|
|
541
566
|
}
|
|
542
|
-
setActivePanel(panel) {
|
|
543
|
-
this.component.setActivePanel(panel);
|
|
544
|
-
}
|
|
545
567
|
layout(width, height, force = false) {
|
|
546
568
|
this.component.layout(width, height, force);
|
|
547
569
|
}
|
|
548
570
|
addPanel(options) {
|
|
549
571
|
return this.component.addPanel(options);
|
|
550
572
|
}
|
|
551
|
-
removePanel(panel) {
|
|
552
|
-
this.component.removePanel(panel);
|
|
553
|
-
}
|
|
554
573
|
addEmptyGroup(options) {
|
|
555
574
|
this.component.addEmptyGroup(options);
|
|
556
575
|
}
|
|
@@ -898,7 +917,7 @@ class Splitview {
|
|
|
898
917
|
this._onDidAddView = new Emitter();
|
|
899
918
|
this.onDidAddView = this._onDidAddView.event;
|
|
900
919
|
this._onDidRemoveView = new Emitter();
|
|
901
|
-
this.onDidRemoveView = this.
|
|
920
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
902
921
|
this._startSnappingEnabled = true;
|
|
903
922
|
this._endSnappingEnabled = true;
|
|
904
923
|
this.resize = (index, delta, sizes = this.views.map((x) => x.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) => {
|
|
@@ -1540,9 +1559,9 @@ class Paneview extends CompositeDisposable {
|
|
|
1540
1559
|
var _a;
|
|
1541
1560
|
super();
|
|
1542
1561
|
this.paneItems = [];
|
|
1562
|
+
this.skipAnimation = false;
|
|
1543
1563
|
this._onDidChange = new Emitter();
|
|
1544
1564
|
this.onDidChange = this._onDidChange.event;
|
|
1545
|
-
this.skipAnimation = false;
|
|
1546
1565
|
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.VERTICAL;
|
|
1547
1566
|
this.element = document.createElement('div');
|
|
1548
1567
|
this.element.className = 'pane-container';
|
|
@@ -1570,7 +1589,7 @@ class Paneview extends CompositeDisposable {
|
|
|
1570
1589
|
this.paneItems.push(paneItem);
|
|
1571
1590
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1572
1591
|
});
|
|
1573
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1592
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1574
1593
|
this._onDidChange.fire(undefined);
|
|
1575
1594
|
}), this.splitview.onDidAddView(() => {
|
|
1576
1595
|
this._onDidChange.fire();
|
|
@@ -1642,9 +1661,6 @@ class Paneview extends CompositeDisposable {
|
|
|
1642
1661
|
}
|
|
1643
1662
|
}
|
|
1644
1663
|
layout(size, orthogonalSize) {
|
|
1645
|
-
// for (const paneItem of this.paneItems) {
|
|
1646
|
-
// paneItem.pane.orthogonalSize = orthogonalSize;
|
|
1647
|
-
// }
|
|
1648
1664
|
this.splitview.layout(size, orthogonalSize);
|
|
1649
1665
|
}
|
|
1650
1666
|
setupAnimation() {
|
|
@@ -1734,7 +1750,7 @@ class Droptarget extends CompositeDisposable {
|
|
|
1734
1750
|
this.options = options;
|
|
1735
1751
|
this._onDrop = new Emitter();
|
|
1736
1752
|
this.onDrop = this._onDrop.event;
|
|
1737
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1753
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1738
1754
|
onDragEnter: (e) => undefined,
|
|
1739
1755
|
onDragOver: (e) => {
|
|
1740
1756
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
@@ -1770,51 +1786,11 @@ class Droptarget extends CompositeDisposable {
|
|
|
1770
1786
|
const y = e.offsetY;
|
|
1771
1787
|
const xp = (100 * x) / width;
|
|
1772
1788
|
const yp = (100 * y) / height;
|
|
1773
|
-
|
|
1774
|
-
let isLeft = false;
|
|
1775
|
-
let isTop = false;
|
|
1776
|
-
let isBottom = false;
|
|
1777
|
-
switch (this.options.validOverlays) {
|
|
1778
|
-
case 'all':
|
|
1779
|
-
isRight = xp > 80;
|
|
1780
|
-
isLeft = xp < 20;
|
|
1781
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1782
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1783
|
-
break;
|
|
1784
|
-
case 'vertical':
|
|
1785
|
-
isTop = yp < 50;
|
|
1786
|
-
isBottom = yp >= 50;
|
|
1787
|
-
break;
|
|
1788
|
-
case 'horizontal':
|
|
1789
|
-
isLeft = xp < 50;
|
|
1790
|
-
isRight = xp >= 50;
|
|
1791
|
-
break;
|
|
1792
|
-
}
|
|
1789
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1793
1790
|
const isSmallX = width < 100;
|
|
1794
1791
|
const isSmallY = height < 100;
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1798
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1799
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1800
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1801
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1802
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1803
|
-
if (isRight) {
|
|
1804
|
-
this._state = exports.Position.Right;
|
|
1805
|
-
}
|
|
1806
|
-
else if (isLeft) {
|
|
1807
|
-
this._state = exports.Position.Left;
|
|
1808
|
-
}
|
|
1809
|
-
else if (isTop) {
|
|
1810
|
-
this._state = exports.Position.Top;
|
|
1811
|
-
}
|
|
1812
|
-
else if (isBottom) {
|
|
1813
|
-
this._state = exports.Position.Bottom;
|
|
1814
|
-
}
|
|
1815
|
-
else {
|
|
1816
|
-
this._state = exports.Position.Center;
|
|
1817
|
-
}
|
|
1792
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1793
|
+
this.setState(quadrant);
|
|
1818
1794
|
},
|
|
1819
1795
|
onDragLeave: (e) => {
|
|
1820
1796
|
this.removeDropTarget();
|
|
@@ -1828,7 +1804,7 @@ class Droptarget extends CompositeDisposable {
|
|
|
1828
1804
|
const state = this._state;
|
|
1829
1805
|
this.removeDropTarget();
|
|
1830
1806
|
if (state) {
|
|
1831
|
-
this._onDrop.fire({ position: state,
|
|
1807
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
1832
1808
|
}
|
|
1833
1809
|
},
|
|
1834
1810
|
}));
|
|
@@ -1843,9 +1819,73 @@ class Droptarget extends CompositeDisposable {
|
|
|
1843
1819
|
this.options.canDisplayOverlay = value;
|
|
1844
1820
|
}
|
|
1845
1821
|
dispose() {
|
|
1846
|
-
this._onDrop.dispose();
|
|
1847
1822
|
this.removeDropTarget();
|
|
1848
1823
|
}
|
|
1824
|
+
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1825
|
+
if (!this.overlay) {
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1828
|
+
const isLeft = quadrant === 'left';
|
|
1829
|
+
const isRight = quadrant === 'right';
|
|
1830
|
+
const isTop = quadrant === 'top';
|
|
1831
|
+
const isBottom = quadrant === 'bottom';
|
|
1832
|
+
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1833
|
+
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1834
|
+
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1835
|
+
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1836
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1837
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1838
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1839
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1840
|
+
}
|
|
1841
|
+
setState(quadrant) {
|
|
1842
|
+
switch (quadrant) {
|
|
1843
|
+
case 'top':
|
|
1844
|
+
this._state = exports.Position.Top;
|
|
1845
|
+
break;
|
|
1846
|
+
case 'left':
|
|
1847
|
+
this._state = exports.Position.Left;
|
|
1848
|
+
break;
|
|
1849
|
+
case 'bottom':
|
|
1850
|
+
this._state = exports.Position.Bottom;
|
|
1851
|
+
break;
|
|
1852
|
+
case 'right':
|
|
1853
|
+
this._state = exports.Position.Right;
|
|
1854
|
+
break;
|
|
1855
|
+
default:
|
|
1856
|
+
this._state = exports.Position.Center;
|
|
1857
|
+
break;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
calculateQuadrant(overlayType, xp, yp) {
|
|
1861
|
+
switch (overlayType) {
|
|
1862
|
+
case 'all':
|
|
1863
|
+
if (xp < 20) {
|
|
1864
|
+
return 'left';
|
|
1865
|
+
}
|
|
1866
|
+
if (xp > 80) {
|
|
1867
|
+
return 'right';
|
|
1868
|
+
}
|
|
1869
|
+
if (yp < 20) {
|
|
1870
|
+
return 'top';
|
|
1871
|
+
}
|
|
1872
|
+
if (yp > 80) {
|
|
1873
|
+
return 'bottom';
|
|
1874
|
+
}
|
|
1875
|
+
break;
|
|
1876
|
+
case 'vertical':
|
|
1877
|
+
if (yp < 50) {
|
|
1878
|
+
return 'top';
|
|
1879
|
+
}
|
|
1880
|
+
return 'bottom';
|
|
1881
|
+
case 'horizontal':
|
|
1882
|
+
if (xp < 50) {
|
|
1883
|
+
return 'left';
|
|
1884
|
+
}
|
|
1885
|
+
return 'right';
|
|
1886
|
+
}
|
|
1887
|
+
return null;
|
|
1888
|
+
}
|
|
1849
1889
|
removeDropTarget() {
|
|
1850
1890
|
if (this.target) {
|
|
1851
1891
|
this._state = undefined;
|
|
@@ -1948,6 +1988,7 @@ class LeafNode {
|
|
|
1948
1988
|
this.view.layout(this.width, this.height);
|
|
1949
1989
|
}
|
|
1950
1990
|
dispose() {
|
|
1991
|
+
this._onDidChange.dispose();
|
|
1951
1992
|
this._disposable.dispose();
|
|
1952
1993
|
}
|
|
1953
1994
|
}
|
|
@@ -1999,7 +2040,7 @@ class BranchNode extends CompositeDisposable {
|
|
|
1999
2040
|
proportionalLayout,
|
|
2000
2041
|
});
|
|
2001
2042
|
}
|
|
2002
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2043
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
2003
2044
|
this._onDidChange.fire(undefined);
|
|
2004
2045
|
}));
|
|
2005
2046
|
this.setupChildrenEvents();
|
|
@@ -2171,6 +2212,15 @@ class BranchNode extends CompositeDisposable {
|
|
|
2171
2212
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2172
2213
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2173
2214
|
*--------------------------------------------------------------------------------------------*/
|
|
2215
|
+
function findLeaf(candiateNode, last) {
|
|
2216
|
+
if (candiateNode instanceof LeafNode) {
|
|
2217
|
+
return candiateNode;
|
|
2218
|
+
}
|
|
2219
|
+
if (candiateNode instanceof BranchNode) {
|
|
2220
|
+
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2221
|
+
}
|
|
2222
|
+
throw new Error('invalid node');
|
|
2223
|
+
}
|
|
2174
2224
|
function flipNode(node, size, orthogonalSize) {
|
|
2175
2225
|
if (node instanceof BranchNode) {
|
|
2176
2226
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2309,13 +2359,13 @@ class Gridview {
|
|
|
2309
2359
|
}
|
|
2310
2360
|
deserialize(json, deserializer) {
|
|
2311
2361
|
const orientation = json.orientation;
|
|
2312
|
-
const height = json.height;
|
|
2362
|
+
const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
|
|
2313
2363
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2314
2364
|
}
|
|
2315
2365
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2316
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2366
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2317
2367
|
}
|
|
2318
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2368
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2319
2369
|
let result;
|
|
2320
2370
|
if (node.type === 'branch') {
|
|
2321
2371
|
const serializedChildren = node.data;
|
|
@@ -2325,7 +2375,9 @@ class Gridview {
|
|
|
2325
2375
|
visible: serializedChild.visible,
|
|
2326
2376
|
};
|
|
2327
2377
|
});
|
|
2328
|
-
|
|
2378
|
+
// HORIZONTAL => height=orthogonalsize width=size
|
|
2379
|
+
// VERTICAL => height=size width=orthogonalsize
|
|
2380
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
|
|
2329
2381
|
}
|
|
2330
2382
|
else {
|
|
2331
2383
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2386,15 +2438,6 @@ class Gridview {
|
|
|
2386
2438
|
if (!(node instanceof LeafNode)) {
|
|
2387
2439
|
throw new Error('invalid location');
|
|
2388
2440
|
}
|
|
2389
|
-
const findLeaf = (candiateNode, last) => {
|
|
2390
|
-
if (candiateNode instanceof LeafNode) {
|
|
2391
|
-
return candiateNode;
|
|
2392
|
-
}
|
|
2393
|
-
if (candiateNode instanceof BranchNode) {
|
|
2394
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2395
|
-
}
|
|
2396
|
-
throw new Error('invalid node');
|
|
2397
|
-
};
|
|
2398
2441
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2399
2442
|
const n = path[i];
|
|
2400
2443
|
const l = location[i] || 0;
|
|
@@ -2491,15 +2534,14 @@ class Gridview {
|
|
|
2491
2534
|
}
|
|
2492
2535
|
parent.removeChild(index, sizing);
|
|
2493
2536
|
if (parent.children.length === 0) {
|
|
2494
|
-
// throw new Error('Invalid grid state');
|
|
2495
2537
|
return node.view;
|
|
2496
2538
|
}
|
|
2497
2539
|
if (parent.children.length > 1) {
|
|
2498
2540
|
return node.view;
|
|
2499
2541
|
}
|
|
2542
|
+
const sibling = parent.children[0];
|
|
2500
2543
|
if (pathToParent.length === 0) {
|
|
2501
2544
|
// parent is root
|
|
2502
|
-
const sibling = parent.children[0];
|
|
2503
2545
|
if (sibling instanceof LeafNode) {
|
|
2504
2546
|
return node.view;
|
|
2505
2547
|
}
|
|
@@ -2510,7 +2552,6 @@ class Gridview {
|
|
|
2510
2552
|
}
|
|
2511
2553
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2512
2554
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2513
|
-
const sibling = parent.children[0];
|
|
2514
2555
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2515
2556
|
parent.removeChild(0, sizing);
|
|
2516
2557
|
const sizes = grandParent.children.map((size, i) => grandParent.getChildSize(i));
|
|
@@ -2557,31 +2598,6 @@ class Gridview {
|
|
|
2557
2598
|
}
|
|
2558
2599
|
}
|
|
2559
2600
|
|
|
2560
|
-
/*! *****************************************************************************
|
|
2561
|
-
Copyright (c) Microsoft Corporation.
|
|
2562
|
-
|
|
2563
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2564
|
-
purpose with or without fee is hereby granted.
|
|
2565
|
-
|
|
2566
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2567
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2568
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2569
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2570
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2571
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2572
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2573
|
-
***************************************************************************** */
|
|
2574
|
-
|
|
2575
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2576
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2577
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2578
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2579
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2580
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2581
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2582
|
-
});
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
2601
|
class ContentContainer extends CompositeDisposable {
|
|
2586
2602
|
constructor() {
|
|
2587
2603
|
super();
|
|
@@ -2593,6 +2609,7 @@ class ContentContainer extends CompositeDisposable {
|
|
|
2593
2609
|
this._element = document.createElement('div');
|
|
2594
2610
|
this._element.className = 'content-container';
|
|
2595
2611
|
this._element.tabIndex = -1;
|
|
2612
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2596
2613
|
// for hosted containers
|
|
2597
2614
|
// 1) register a drop target on the host
|
|
2598
2615
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2659,6 +2676,41 @@ var DockviewDropTargets;
|
|
|
2659
2676
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2660
2677
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2661
2678
|
|
|
2679
|
+
class DragHandler extends CompositeDisposable {
|
|
2680
|
+
constructor(el) {
|
|
2681
|
+
super();
|
|
2682
|
+
this.el = el;
|
|
2683
|
+
this.disposable = new MutableDisposable();
|
|
2684
|
+
this._onDragStart = new Emitter();
|
|
2685
|
+
this.onDragStart = this._onDragStart.event;
|
|
2686
|
+
this.iframes = [];
|
|
2687
|
+
this.configure();
|
|
2688
|
+
}
|
|
2689
|
+
configure() {
|
|
2690
|
+
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2691
|
+
this.iframes = [
|
|
2692
|
+
...getElementsByTagName('iframe'),
|
|
2693
|
+
...getElementsByTagName('webview'),
|
|
2694
|
+
];
|
|
2695
|
+
for (const iframe of this.iframes) {
|
|
2696
|
+
iframe.style.pointerEvents = 'none';
|
|
2697
|
+
}
|
|
2698
|
+
this.el.classList.add('dragged');
|
|
2699
|
+
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2700
|
+
this.disposable.value = this.getData();
|
|
2701
|
+
if (event.dataTransfer) {
|
|
2702
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2703
|
+
}
|
|
2704
|
+
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
2705
|
+
for (const iframe of this.iframes) {
|
|
2706
|
+
iframe.style.pointerEvents = 'auto';
|
|
2707
|
+
}
|
|
2708
|
+
this.iframes = [];
|
|
2709
|
+
this.disposable.dispose();
|
|
2710
|
+
}));
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2662
2714
|
exports.MouseEventKind = void 0;
|
|
2663
2715
|
(function (MouseEventKind) {
|
|
2664
2716
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2668,42 +2720,34 @@ class Tab$1 extends CompositeDisposable {
|
|
|
2668
2720
|
constructor(panelId, accessor, group) {
|
|
2669
2721
|
super();
|
|
2670
2722
|
this.panelId = panelId;
|
|
2671
|
-
this.accessor = accessor;
|
|
2672
2723
|
this.group = group;
|
|
2673
2724
|
this._onChanged = new Emitter();
|
|
2674
2725
|
this.onChanged = this._onChanged.event;
|
|
2675
2726
|
this._onDropped = new Emitter();
|
|
2676
2727
|
this.onDrop = this._onDropped.event;
|
|
2677
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2678
|
-
this.iframes = [];
|
|
2679
2728
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2680
2729
|
this._element = document.createElement('div');
|
|
2681
2730
|
this._element.className = 'tab';
|
|
2682
2731
|
this._element.tabIndex = 0;
|
|
2683
2732
|
this._element.draggable = true;
|
|
2684
|
-
this.addDisposables(
|
|
2685
|
-
|
|
2686
|
-
...
|
|
2687
|
-
|
|
2688
|
-
];
|
|
2689
|
-
for (const iframe of this.iframes) {
|
|
2690
|
-
iframe.style.pointerEvents = 'none';
|
|
2733
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2734
|
+
constructor() {
|
|
2735
|
+
super(...arguments);
|
|
2736
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2691
2737
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2738
|
+
getData() {
|
|
2739
|
+
this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
|
|
2740
|
+
return {
|
|
2741
|
+
dispose: () => {
|
|
2742
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2743
|
+
},
|
|
2744
|
+
};
|
|
2699
2745
|
}
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
iframe.style.pointerEvents = 'auto';
|
|
2746
|
+
dispose() {
|
|
2747
|
+
//
|
|
2703
2748
|
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2749
|
+
})(this._element));
|
|
2750
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2707
2751
|
if (event.defaultPrevented) {
|
|
2708
2752
|
return;
|
|
2709
2753
|
}
|
|
@@ -2792,7 +2836,7 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2792
2836
|
});
|
|
2793
2837
|
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
2794
2838
|
this._onDrop.fire({
|
|
2795
|
-
event: event.
|
|
2839
|
+
event: event.nativeEvent,
|
|
2796
2840
|
index: this.tabs.length,
|
|
2797
2841
|
});
|
|
2798
2842
|
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
@@ -2905,16 +2949,14 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2905
2949
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2906
2950
|
return;
|
|
2907
2951
|
}
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
});
|
|
2913
|
-
break;
|
|
2952
|
+
if (event.kind === exports.MouseEventKind.CLICK) {
|
|
2953
|
+
this.group.model.openPanel(panel, {
|
|
2954
|
+
skipFocus: alreadyFocused,
|
|
2955
|
+
});
|
|
2914
2956
|
}
|
|
2915
2957
|
}), tabToAdd.onDrop((event) => {
|
|
2916
2958
|
this._onDrop.fire({
|
|
2917
|
-
event: event.
|
|
2959
|
+
event: event.nativeEvent,
|
|
2918
2960
|
index: this.tabs.findIndex((x) => x.value === tabToAdd),
|
|
2919
2961
|
});
|
|
2920
2962
|
}));
|
|
@@ -2939,7 +2981,6 @@ exports.GroupChangeKind2 = void 0;
|
|
|
2939
2981
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2940
2982
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2941
2983
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2942
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2943
2984
|
})(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
|
|
2944
2985
|
class Groupview extends CompositeDisposable {
|
|
2945
2986
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2960,15 +3001,10 @@ class Groupview extends CompositeDisposable {
|
|
|
2960
3001
|
this.onMove = this._onMove.event;
|
|
2961
3002
|
this._onDidGroupChange = new Emitter();
|
|
2962
3003
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2963
|
-
this.
|
|
2964
|
-
|
|
2965
|
-
return false;
|
|
2966
|
-
}
|
|
2967
|
-
this.doClose(panel);
|
|
2968
|
-
return true;
|
|
2969
|
-
});
|
|
3004
|
+
this._onDidDrop = new Emitter();
|
|
3005
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
2970
3006
|
this.container.classList.add('groupview');
|
|
2971
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
3007
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
2972
3008
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
2973
3009
|
tabHeight: options.tabHeight,
|
|
2974
3010
|
});
|
|
@@ -2990,9 +3026,9 @@ class Groupview extends CompositeDisposable {
|
|
|
2990
3026
|
}), this.contentContainer.onDidFocus(() => {
|
|
2991
3027
|
this.accessor.doSetGroupActive(this.parent, true);
|
|
2992
3028
|
}), this.contentContainer.onDidBlur(() => {
|
|
2993
|
-
//
|
|
3029
|
+
// noop
|
|
2994
3030
|
}), this.dropTarget.onDrop((event) => {
|
|
2995
|
-
this.handleDropEvent(event.
|
|
3031
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
2996
3032
|
}));
|
|
2997
3033
|
}
|
|
2998
3034
|
get element() {
|
|
@@ -3125,6 +3161,8 @@ class Groupview extends CompositeDisposable {
|
|
|
3125
3161
|
options.index > this.panels.length) {
|
|
3126
3162
|
options.index = this.panels.length;
|
|
3127
3163
|
}
|
|
3164
|
+
// ensure the group is updated before we fire any events
|
|
3165
|
+
panel.updateParentGroup(this.parent, true);
|
|
3128
3166
|
if (this._activePanel === panel) {
|
|
3129
3167
|
this.accessor.doSetGroupActive(this.parent);
|
|
3130
3168
|
return;
|
|
@@ -3145,43 +3183,19 @@ class Groupview extends CompositeDisposable {
|
|
|
3145
3183
|
return this._removePanel(panelToRemove);
|
|
3146
3184
|
}
|
|
3147
3185
|
closeAllPanels() {
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
if (this._activePanel && index > -1) {
|
|
3154
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3155
|
-
console.warn('active panel not tracked');
|
|
3156
|
-
}
|
|
3157
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3158
|
-
if (!canClose) {
|
|
3159
|
-
return false;
|
|
3160
|
-
}
|
|
3161
|
-
}
|
|
3162
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3163
|
-
if (i === index) {
|
|
3164
|
-
continue;
|
|
3165
|
-
}
|
|
3166
|
-
const panel = this.panels[i];
|
|
3167
|
-
this.openPanel(panel);
|
|
3168
|
-
if (panel.close) {
|
|
3169
|
-
const canClose = yield panel.close();
|
|
3170
|
-
if (!canClose) {
|
|
3171
|
-
return false;
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
|
-
}
|
|
3175
|
-
if (this.panels.length > 0) {
|
|
3176
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3177
|
-
const arrPanelCpy = [...this.panels];
|
|
3178
|
-
yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
|
|
3186
|
+
if (this.panels.length > 0) {
|
|
3187
|
+
// take a copy since we will be edting the array as we iterate through
|
|
3188
|
+
const arrPanelCpy = [...this.panels];
|
|
3189
|
+
for (const panel of arrPanelCpy) {
|
|
3190
|
+
this.doClose(panel);
|
|
3179
3191
|
}
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3192
|
+
}
|
|
3193
|
+
else {
|
|
3194
|
+
this.accessor.removeGroup(this.parent);
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
closePanel(panel) {
|
|
3198
|
+
this.doClose(panel);
|
|
3185
3199
|
}
|
|
3186
3200
|
doClose(panel) {
|
|
3187
3201
|
this.accessor.removePanel(panel);
|
|
@@ -3324,8 +3338,11 @@ class Groupview extends CompositeDisposable {
|
|
|
3324
3338
|
this.tabsContainer.show();
|
|
3325
3339
|
}
|
|
3326
3340
|
}
|
|
3327
|
-
canDisplayOverlay(
|
|
3341
|
+
canDisplayOverlay(event, target) {
|
|
3328
3342
|
// custom overlay handler
|
|
3343
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3344
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3345
|
+
}
|
|
3329
3346
|
return false;
|
|
3330
3347
|
}
|
|
3331
3348
|
handleDropEvent(event, position, index) {
|
|
@@ -3350,6 +3367,9 @@ class Groupview extends CompositeDisposable {
|
|
|
3350
3367
|
index,
|
|
3351
3368
|
});
|
|
3352
3369
|
}
|
|
3370
|
+
else {
|
|
3371
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3372
|
+
}
|
|
3353
3373
|
}
|
|
3354
3374
|
dispose() {
|
|
3355
3375
|
for (const panel of this.panels) {
|
|
@@ -3402,19 +3422,21 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3402
3422
|
this.onGridEvent = this._onGridEvent.event;
|
|
3403
3423
|
this._onDidLayoutChange = new Emitter();
|
|
3404
3424
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3425
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3426
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3427
|
+
this._onDidAddGroup = new Emitter();
|
|
3428
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3429
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3430
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3405
3431
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3406
3432
|
this.element.appendChild(this.gridview.element);
|
|
3407
|
-
|
|
3408
|
-
this.layout(0, 0, true);
|
|
3433
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3409
3434
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3410
3435
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT });
|
|
3411
3436
|
}));
|
|
3412
3437
|
this.addDisposables((() => {
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
*/
|
|
3416
|
-
let timer;
|
|
3417
|
-
return this.onGridEvent((event) => {
|
|
3438
|
+
const tickDelayedEvent = new TickDelayedEvent();
|
|
3439
|
+
return new CompositeDisposable(this.onGridEvent((event) => {
|
|
3418
3440
|
if ([
|
|
3419
3441
|
exports.GroupChangeKind.ADD_GROUP,
|
|
3420
3442
|
exports.GroupChangeKind.REMOVE_GROUP,
|
|
@@ -3424,15 +3446,11 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3424
3446
|
exports.GroupChangeKind.PANEL_ACTIVE,
|
|
3425
3447
|
exports.GroupChangeKind.LAYOUT,
|
|
3426
3448
|
].includes(event.kind)) {
|
|
3427
|
-
|
|
3428
|
-
clearTimeout(timer);
|
|
3429
|
-
}
|
|
3430
|
-
timer = setTimeout(() => {
|
|
3431
|
-
this._onDidLayoutChange.fire();
|
|
3432
|
-
clearTimeout(timer);
|
|
3433
|
-
});
|
|
3449
|
+
tickDelayedEvent.fire();
|
|
3434
3450
|
}
|
|
3435
|
-
})
|
|
3451
|
+
}), tickDelayedEvent.onEvent(() => {
|
|
3452
|
+
this._onDidLayoutChange.fire();
|
|
3453
|
+
}), tickDelayedEvent);
|
|
3436
3454
|
})());
|
|
3437
3455
|
}
|
|
3438
3456
|
get id() {
|
|
@@ -3478,6 +3496,7 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3478
3496
|
doAddGroup(group, location = [0], size) {
|
|
3479
3497
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
3480
3498
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.ADD_GROUP });
|
|
3499
|
+
this._onDidAddGroup.fire(group);
|
|
3481
3500
|
this.doSetGroupActive(group);
|
|
3482
3501
|
}
|
|
3483
3502
|
doRemoveGroup(group, options) {
|
|
@@ -3491,6 +3510,7 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3491
3510
|
this._groups.delete(group.id);
|
|
3492
3511
|
}
|
|
3493
3512
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.REMOVE_GROUP });
|
|
3513
|
+
this._onDidRemoveGroup.fire(group);
|
|
3494
3514
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3495
3515
|
const groups = Array.from(this._groups.values());
|
|
3496
3516
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3521,6 +3541,7 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3521
3541
|
this._onGridEvent.fire({
|
|
3522
3542
|
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3523
3543
|
});
|
|
3544
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3524
3545
|
}
|
|
3525
3546
|
removeGroup(group) {
|
|
3526
3547
|
this.doRemoveGroup(group);
|
|
@@ -3577,6 +3598,10 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3577
3598
|
dispose() {
|
|
3578
3599
|
super.dispose();
|
|
3579
3600
|
this._onGridEvent.dispose();
|
|
3601
|
+
this._onDidActiveGroupChange.dispose();
|
|
3602
|
+
this._onDidAddGroup.dispose();
|
|
3603
|
+
this._onDidRemoveGroup.dispose();
|
|
3604
|
+
this._onDidLayoutChange.dispose();
|
|
3580
3605
|
this.gridview.dispose();
|
|
3581
3606
|
}
|
|
3582
3607
|
}
|
|
@@ -3588,15 +3613,11 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3588
3613
|
constructor(id) {
|
|
3589
3614
|
super();
|
|
3590
3615
|
this.id = id;
|
|
3591
|
-
this._state = {};
|
|
3592
3616
|
this._isFocused = false;
|
|
3593
3617
|
this._isActive = false;
|
|
3594
3618
|
this._isVisible = true;
|
|
3595
3619
|
this._width = 0;
|
|
3596
3620
|
this._height = 0;
|
|
3597
|
-
this._onDidStateChange = new Emitter();
|
|
3598
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3599
|
-
//
|
|
3600
3621
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3601
3622
|
replay: true,
|
|
3602
3623
|
});
|
|
@@ -3625,7 +3646,7 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3625
3646
|
//
|
|
3626
3647
|
this._onActiveChange = new Emitter();
|
|
3627
3648
|
this.onActiveChange = this._onActiveChange.event;
|
|
3628
|
-
this.addDisposables(this.
|
|
3649
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3629
3650
|
this._isFocused = event.isFocused;
|
|
3630
3651
|
}), this.onDidActiveChange((event) => {
|
|
3631
3652
|
this._isActive = event.isActive;
|
|
@@ -3658,21 +3679,6 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3658
3679
|
setActive() {
|
|
3659
3680
|
this._onActiveChange.fire();
|
|
3660
3681
|
}
|
|
3661
|
-
setState(key, value) {
|
|
3662
|
-
if (typeof key === 'object') {
|
|
3663
|
-
this._state = key;
|
|
3664
|
-
}
|
|
3665
|
-
else if (typeof value !== undefined) {
|
|
3666
|
-
this._state[key] = value;
|
|
3667
|
-
}
|
|
3668
|
-
this._onDidStateChange.fire(undefined);
|
|
3669
|
-
}
|
|
3670
|
-
getState() {
|
|
3671
|
-
return this._state;
|
|
3672
|
-
}
|
|
3673
|
-
getStateKey(key) {
|
|
3674
|
-
return this._state[key];
|
|
3675
|
-
}
|
|
3676
3682
|
dispose() {
|
|
3677
3683
|
super.dispose();
|
|
3678
3684
|
}
|
|
@@ -3692,6 +3698,7 @@ class GridviewPanelApiImpl extends PanelApiImpl {
|
|
|
3692
3698
|
//
|
|
3693
3699
|
this._onDidSizeChange = new Emitter();
|
|
3694
3700
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3701
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3695
3702
|
}
|
|
3696
3703
|
setConstraints(value) {
|
|
3697
3704
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3705,19 +3712,19 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3705
3712
|
constructor(panel, group) {
|
|
3706
3713
|
super(panel.id);
|
|
3707
3714
|
this.panel = panel;
|
|
3708
|
-
this._onDidDirtyChange = new Emitter();
|
|
3709
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3710
3715
|
this._onDidTitleChange = new Emitter();
|
|
3711
3716
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3712
3717
|
this._titleChanged = new Emitter();
|
|
3713
3718
|
this.titleChanged = this._titleChanged.event;
|
|
3714
3719
|
this._suppressClosableChanged = new Emitter();
|
|
3715
3720
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3716
|
-
this.
|
|
3717
|
-
this.
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3722
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3723
|
+
this._onDidGroupChange = new Emitter();
|
|
3724
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3725
|
+
this.disposable = new MutableDisposable();
|
|
3726
|
+
this.group = group;
|
|
3727
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3721
3728
|
}
|
|
3722
3729
|
get title() {
|
|
3723
3730
|
return this.panel.title;
|
|
@@ -3730,7 +3737,17 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3730
3737
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3731
3738
|
}
|
|
3732
3739
|
set group(value) {
|
|
3740
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3733
3741
|
this._group = value;
|
|
3742
|
+
this._onDidGroupChange.fire();
|
|
3743
|
+
if (this._group) {
|
|
3744
|
+
this.disposable.value = this._group.api.onDidActiveChange(() => {
|
|
3745
|
+
this._onDidActiveGroupChange.fire();
|
|
3746
|
+
});
|
|
3747
|
+
if (this.isGroupActive !== isOldGroupActive) {
|
|
3748
|
+
this._onDidActiveGroupChange.fire();
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3734
3751
|
}
|
|
3735
3752
|
get group() {
|
|
3736
3753
|
return this._group;
|
|
@@ -3744,16 +3761,10 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3744
3761
|
}
|
|
3745
3762
|
return this.group.model.closePanel(this.panel);
|
|
3746
3763
|
}
|
|
3747
|
-
interceptOnCloseAction(interceptor) {
|
|
3748
|
-
this._interceptor = interceptor;
|
|
3749
|
-
}
|
|
3750
|
-
dispose() {
|
|
3751
|
-
super.dispose();
|
|
3752
|
-
}
|
|
3753
3764
|
}
|
|
3754
3765
|
|
|
3755
3766
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3756
|
-
constructor(id, containerApi) {
|
|
3767
|
+
constructor(id, accessor, containerApi) {
|
|
3757
3768
|
super();
|
|
3758
3769
|
this.id = id;
|
|
3759
3770
|
this.containerApi = containerApi;
|
|
@@ -3761,9 +3772,8 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3761
3772
|
this._suppressClosable = false;
|
|
3762
3773
|
this._title = '';
|
|
3763
3774
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3764
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3765
3775
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3766
|
-
|
|
3776
|
+
accessor.setActivePanel(this);
|
|
3767
3777
|
}), this.api.onDidTitleChange((event) => {
|
|
3768
3778
|
const title = event.title;
|
|
3769
3779
|
this.update({ params: { title } });
|
|
@@ -3787,32 +3797,18 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3787
3797
|
this._view = params.view;
|
|
3788
3798
|
this.setTitle(params.title);
|
|
3789
3799
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3790
|
-
if (params.state) {
|
|
3791
|
-
this.api.setState(params.state);
|
|
3792
|
-
}
|
|
3793
3800
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3794
3801
|
}
|
|
3795
3802
|
focus() {
|
|
3796
3803
|
this.api._onFocusEvent.fire();
|
|
3797
3804
|
}
|
|
3798
|
-
setDirty(isDirty) {
|
|
3799
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3800
|
-
}
|
|
3801
|
-
close() {
|
|
3802
|
-
if (this.api.tryClose) {
|
|
3803
|
-
return this.api.tryClose();
|
|
3804
|
-
}
|
|
3805
|
-
return Promise.resolve(true);
|
|
3806
|
-
}
|
|
3807
3805
|
toJSON() {
|
|
3808
|
-
const state = this.api.getState();
|
|
3809
3806
|
return {
|
|
3810
3807
|
id: this.id,
|
|
3811
3808
|
view: this.view.toJSON(),
|
|
3812
3809
|
params: Object.keys(this._params || {}).length > 0
|
|
3813
3810
|
? this._params
|
|
3814
3811
|
: undefined,
|
|
3815
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3816
3812
|
suppressClosable: this.suppressClosable || undefined,
|
|
3817
3813
|
title: this.title,
|
|
3818
3814
|
};
|
|
@@ -3857,18 +3853,6 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3857
3853
|
var _a;
|
|
3858
3854
|
this._group = group;
|
|
3859
3855
|
this.api.group = group;
|
|
3860
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3861
|
-
var _a;
|
|
3862
|
-
if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
|
|
3863
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3864
|
-
this.api._onDidActiveChange.fire({
|
|
3865
|
-
isActive: isGroupActive && isVisible,
|
|
3866
|
-
});
|
|
3867
|
-
this.api._onDidVisibilityChange.fire({
|
|
3868
|
-
isVisible,
|
|
3869
|
-
});
|
|
3870
|
-
}
|
|
3871
|
-
});
|
|
3872
3856
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3873
3857
|
this.api._onDidActiveChange.fire({
|
|
3874
3858
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -3978,15 +3962,6 @@ class Watermark extends CompositeDisposable {
|
|
|
3978
3962
|
}
|
|
3979
3963
|
}
|
|
3980
3964
|
|
|
3981
|
-
function debounce(cb, wait) {
|
|
3982
|
-
let timeout;
|
|
3983
|
-
const callable = (...args) => {
|
|
3984
|
-
clearTimeout(timeout);
|
|
3985
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
3986
|
-
};
|
|
3987
|
-
return callable;
|
|
3988
|
-
}
|
|
3989
|
-
|
|
3990
3965
|
class DefaultDeserializer {
|
|
3991
3966
|
constructor(layout, panelDeserializer) {
|
|
3992
3967
|
this.layout = layout;
|
|
@@ -4087,9 +4062,6 @@ class DefaultTab extends CompositeDisposable {
|
|
|
4087
4062
|
this._isGroupActive = false;
|
|
4088
4063
|
//
|
|
4089
4064
|
this.params = {};
|
|
4090
|
-
//
|
|
4091
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4092
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4093
4065
|
this._element = document.createElement('div');
|
|
4094
4066
|
this._element.className = 'default-tab';
|
|
4095
4067
|
//
|
|
@@ -4134,10 +4106,6 @@ class DefaultTab extends CompositeDisposable {
|
|
|
4134
4106
|
init(params) {
|
|
4135
4107
|
this.params = params;
|
|
4136
4108
|
this._content.textContent = params.title;
|
|
4137
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4138
|
-
const isDirty = event;
|
|
4139
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4140
|
-
});
|
|
4141
4109
|
if (!this.params.suppressClosable) {
|
|
4142
4110
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4143
4111
|
ev.preventDefault(); //
|
|
@@ -4191,6 +4159,10 @@ class BasePanelView extends CompositeDisposable {
|
|
|
4191
4159
|
get height() {
|
|
4192
4160
|
return this._height;
|
|
4193
4161
|
}
|
|
4162
|
+
get params() {
|
|
4163
|
+
var _a;
|
|
4164
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4165
|
+
}
|
|
4194
4166
|
focus() {
|
|
4195
4167
|
this.api._onFocusEvent.fire();
|
|
4196
4168
|
}
|
|
@@ -4199,29 +4171,27 @@ class BasePanelView extends CompositeDisposable {
|
|
|
4199
4171
|
this._height = height;
|
|
4200
4172
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4201
4173
|
if (this.part) {
|
|
4202
|
-
if (this.
|
|
4203
|
-
this.part.update(this.
|
|
4174
|
+
if (this._params) {
|
|
4175
|
+
this.part.update(this._params.params);
|
|
4204
4176
|
}
|
|
4205
4177
|
}
|
|
4206
4178
|
}
|
|
4207
4179
|
init(parameters) {
|
|
4208
|
-
this.
|
|
4180
|
+
this._params = parameters;
|
|
4209
4181
|
this.part = this.getComponent();
|
|
4210
4182
|
}
|
|
4211
4183
|
update(event) {
|
|
4212
4184
|
var _a, _b;
|
|
4213
|
-
this.
|
|
4214
|
-
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.
|
|
4185
|
+
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) });
|
|
4186
|
+
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
|
|
4215
4187
|
}
|
|
4216
4188
|
toJSON() {
|
|
4217
4189
|
var _a, _b;
|
|
4218
|
-
const
|
|
4219
|
-
const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4190
|
+
const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4220
4191
|
return {
|
|
4221
4192
|
id: this.id,
|
|
4222
4193
|
component: this.component,
|
|
4223
4194
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4224
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4225
4195
|
};
|
|
4226
4196
|
}
|
|
4227
4197
|
dispose() {
|
|
@@ -4244,12 +4214,12 @@ class GridviewPanel extends BasePanelView {
|
|
|
4244
4214
|
this._snap = false;
|
|
4245
4215
|
this._onDidChange = new Emitter();
|
|
4246
4216
|
this.onDidChange = this._onDidChange.event;
|
|
4247
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4217
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4248
4218
|
const { isVisible } = event;
|
|
4249
|
-
const { containerApi } = this.
|
|
4219
|
+
const { containerApi } = this._params;
|
|
4250
4220
|
containerApi.setVisible(this, isVisible);
|
|
4251
4221
|
}), this.api.onActiveChange(() => {
|
|
4252
|
-
const { containerApi } = this.
|
|
4222
|
+
const { containerApi } = this._params;
|
|
4253
4223
|
containerApi.setActive(this);
|
|
4254
4224
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4255
4225
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4364,9 +4334,6 @@ class GridviewPanel extends BasePanelView {
|
|
|
4364
4334
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4365
4335
|
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 });
|
|
4366
4336
|
}
|
|
4367
|
-
dispose() {
|
|
4368
|
-
super.dispose();
|
|
4369
|
-
}
|
|
4370
4337
|
}
|
|
4371
4338
|
|
|
4372
4339
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4438,7 +4405,9 @@ class DefaultGroupPanelView {
|
|
|
4438
4405
|
this.tab.init(params);
|
|
4439
4406
|
}
|
|
4440
4407
|
updateParentGroup(group, isPanelVisible) {
|
|
4441
|
-
|
|
4408
|
+
var _a;
|
|
4409
|
+
this._content.updateParentGroup(group, isPanelVisible);
|
|
4410
|
+
(_a = this._tab) === null || _a === void 0 ? void 0 : _a.updateParentGroup(group, isPanelVisible);
|
|
4442
4411
|
}
|
|
4443
4412
|
layout(width, height) {
|
|
4444
4413
|
this.content.layout(width, height);
|
|
@@ -4471,15 +4440,22 @@ class DockviewComponent extends BaseGrid {
|
|
|
4471
4440
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4472
4441
|
styles: options.styles,
|
|
4473
4442
|
});
|
|
4474
|
-
this._panels = new Map();
|
|
4475
|
-
this.dirtyPanels = new Set();
|
|
4476
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4477
4443
|
// events
|
|
4478
4444
|
this._onTabInteractionEvent = new Emitter();
|
|
4479
4445
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4480
4446
|
this._onTabContextMenu = new Emitter();
|
|
4481
4447
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4482
|
-
this.
|
|
4448
|
+
this._onDidDrop = new Emitter();
|
|
4449
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
4450
|
+
this._onDidRemovePanel = new Emitter();
|
|
4451
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4452
|
+
this._onDidAddPanel = new Emitter();
|
|
4453
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4454
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4455
|
+
this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
|
|
4456
|
+
this._onDidActivePanelChange = new Emitter();
|
|
4457
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4458
|
+
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop);
|
|
4483
4459
|
this._options = options;
|
|
4484
4460
|
if (!this.options.components) {
|
|
4485
4461
|
this.options.components = {};
|
|
@@ -4500,10 +4476,10 @@ class DockviewComponent extends BaseGrid {
|
|
|
4500
4476
|
this._api = new DockviewApi(this);
|
|
4501
4477
|
}
|
|
4502
4478
|
get totalPanels() {
|
|
4503
|
-
return this.
|
|
4479
|
+
return this.panels.length;
|
|
4504
4480
|
}
|
|
4505
4481
|
get panels() {
|
|
4506
|
-
return
|
|
4482
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4507
4483
|
}
|
|
4508
4484
|
get deserializer() {
|
|
4509
4485
|
return this._deserializer;
|
|
@@ -4533,10 +4509,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4533
4509
|
updateOptions(options) {
|
|
4534
4510
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4535
4511
|
this.options.orientation !== options.orientation;
|
|
4536
|
-
// TODO support style update
|
|
4537
|
-
// const hasStylesChanged =
|
|
4538
|
-
// typeof options.styles === 'object' &&
|
|
4539
|
-
// this.options.styles !== options.styles;
|
|
4540
4512
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4541
4513
|
if (hasOrientationChanged) {
|
|
4542
4514
|
this.gridview.orientation = options.orientation;
|
|
@@ -4548,8 +4520,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4548
4520
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4549
4521
|
}
|
|
4550
4522
|
getGroupPanel(id) {
|
|
4551
|
-
|
|
4552
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4523
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4553
4524
|
}
|
|
4554
4525
|
setActivePanel(panel) {
|
|
4555
4526
|
if (!panel.group) {
|
|
@@ -4598,24 +4569,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4598
4569
|
this.doSetGroupActive(next);
|
|
4599
4570
|
}
|
|
4600
4571
|
}
|
|
4601
|
-
registerPanel(panel) {
|
|
4602
|
-
if (this._panels.has(panel.id)) {
|
|
4603
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4604
|
-
}
|
|
4605
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4606
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4607
|
-
}
|
|
4608
|
-
unregisterPanel(panel) {
|
|
4609
|
-
if (!this._panels.has(panel.id)) {
|
|
4610
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4611
|
-
}
|
|
4612
|
-
const item = this._panels.get(panel.id);
|
|
4613
|
-
if (item) {
|
|
4614
|
-
item.disposable.dispose();
|
|
4615
|
-
item.value.dispose();
|
|
4616
|
-
}
|
|
4617
|
-
this._panels.delete(panel.id);
|
|
4618
|
-
}
|
|
4619
4572
|
/**
|
|
4620
4573
|
* Serialize the current state of the layout
|
|
4621
4574
|
*
|
|
@@ -4623,12 +4576,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4623
4576
|
*/
|
|
4624
4577
|
toJSON() {
|
|
4625
4578
|
var _a;
|
|
4626
|
-
this.syncConfigs();
|
|
4627
4579
|
const data = this.gridview.serialize();
|
|
4628
|
-
const panels =
|
|
4629
|
-
|
|
4630
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4631
|
-
}
|
|
4580
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4581
|
+
collection[panel.id] = panel.toJSON();
|
|
4632
4582
|
return collection;
|
|
4633
4583
|
}, {});
|
|
4634
4584
|
return {
|
|
@@ -4640,11 +4590,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4640
4590
|
}
|
|
4641
4591
|
fromJSON(data) {
|
|
4642
4592
|
this.gridview.clear();
|
|
4643
|
-
this.
|
|
4644
|
-
panel.
|
|
4645
|
-
panel.value.dispose();
|
|
4593
|
+
this.panels.forEach((panel) => {
|
|
4594
|
+
panel.dispose();
|
|
4646
4595
|
});
|
|
4647
|
-
this._panels.clear();
|
|
4648
4596
|
this._groups.clear();
|
|
4649
4597
|
if (!this.deserializer) {
|
|
4650
4598
|
throw new Error('invalid deserializer');
|
|
@@ -4659,9 +4607,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4659
4607
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4660
4608
|
createPanel: (id) => {
|
|
4661
4609
|
const panelData = panels[id];
|
|
4662
|
-
|
|
4663
|
-
this.registerPanel(panel);
|
|
4664
|
-
return panel;
|
|
4610
|
+
return this.deserializer.fromJSON(panelData);
|
|
4665
4611
|
},
|
|
4666
4612
|
}));
|
|
4667
4613
|
if (typeof activeGroup === 'string') {
|
|
@@ -4672,30 +4618,23 @@ class DockviewComponent extends BaseGrid {
|
|
|
4672
4618
|
}
|
|
4673
4619
|
this.gridview.layout(this.width, this.height);
|
|
4674
4620
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4621
|
+
this._onDidLayoutfromJSON.fire();
|
|
4675
4622
|
}
|
|
4676
4623
|
closeAllGroups() {
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
if (!didCloseAll) {
|
|
4682
|
-
return false;
|
|
4683
|
-
}
|
|
4684
|
-
}
|
|
4685
|
-
return true;
|
|
4686
|
-
});
|
|
4624
|
+
for (const entry of this._groups.entries()) {
|
|
4625
|
+
const [_, group] = entry;
|
|
4626
|
+
group.value.model.closeAllPanels();
|
|
4627
|
+
}
|
|
4687
4628
|
}
|
|
4688
4629
|
fireMouseEvent(event) {
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
}
|
|
4698
|
-
break;
|
|
4630
|
+
if (event.kind === exports.MouseEventKind.CONTEXT_MENU) {
|
|
4631
|
+
if (event.tab && event.panel) {
|
|
4632
|
+
this._onTabContextMenu.fire({
|
|
4633
|
+
event: event.event,
|
|
4634
|
+
api: this._api,
|
|
4635
|
+
panel: event.panel,
|
|
4636
|
+
});
|
|
4637
|
+
}
|
|
4699
4638
|
}
|
|
4700
4639
|
}
|
|
4701
4640
|
addPanel(options) {
|
|
@@ -4729,7 +4668,6 @@ class DockviewComponent extends BaseGrid {
|
|
|
4729
4668
|
return panel;
|
|
4730
4669
|
}
|
|
4731
4670
|
removePanel(panel) {
|
|
4732
|
-
this.unregisterPanel(panel);
|
|
4733
4671
|
const group = panel.group;
|
|
4734
4672
|
if (!group) {
|
|
4735
4673
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
@@ -4748,10 +4686,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4748
4686
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4749
4687
|
}
|
|
4750
4688
|
addEmptyGroup(options) {
|
|
4751
|
-
var _a;
|
|
4752
4689
|
const group = this.createGroup();
|
|
4753
4690
|
if (options) {
|
|
4754
|
-
const referencePanel =
|
|
4691
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4755
4692
|
if (!referencePanel) {
|
|
4756
4693
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4757
4694
|
}
|
|
@@ -4780,13 +4717,13 @@ class DockviewComponent extends BaseGrid {
|
|
|
4780
4717
|
super.removeGroup(group);
|
|
4781
4718
|
}
|
|
4782
4719
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4783
|
-
var _a
|
|
4720
|
+
var _a;
|
|
4784
4721
|
const sourceGroup = groupId
|
|
4785
4722
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4786
4723
|
: undefined;
|
|
4787
4724
|
if (!target || target === exports.Position.Center) {
|
|
4788
4725
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4789
|
-
|
|
4726
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4790
4727
|
if (!groupItem) {
|
|
4791
4728
|
throw new Error(`No panel with id ${itemId}`);
|
|
4792
4729
|
}
|
|
@@ -4822,7 +4759,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4822
4759
|
}
|
|
4823
4760
|
else {
|
|
4824
4761
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4825
|
-
|
|
4762
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4826
4763
|
if (!groupItem) {
|
|
4827
4764
|
throw new Error(`No panel with id ${itemId}`);
|
|
4828
4765
|
}
|
|
@@ -4832,7 +4769,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4832
4769
|
}
|
|
4833
4770
|
}
|
|
4834
4771
|
doSetGroupActive(group, skipFocus) {
|
|
4835
|
-
var _a, _b;
|
|
4772
|
+
var _a, _b, _c;
|
|
4836
4773
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4837
4774
|
super.doSetGroupActive(group, skipFocus);
|
|
4838
4775
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
@@ -4840,6 +4777,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4840
4777
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4841
4778
|
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4842
4779
|
});
|
|
4780
|
+
this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
|
|
4843
4781
|
}
|
|
4844
4782
|
}
|
|
4845
4783
|
createGroup(options) {
|
|
@@ -4865,6 +4803,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
4865
4803
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4866
4804
|
const { groupId, itemId, target, index } = event;
|
|
4867
4805
|
this.moveGroupOrPanel(view, groupId, itemId, target, index);
|
|
4806
|
+
}), view.model.onDidDrop((event) => {
|
|
4807
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
|
|
4868
4808
|
}), view.model.onDidGroupChange((event) => {
|
|
4869
4809
|
switch (event.kind) {
|
|
4870
4810
|
case exports.GroupChangeKind2.ADD_PANEL:
|
|
@@ -4872,24 +4812,25 @@ class DockviewComponent extends BaseGrid {
|
|
|
4872
4812
|
kind: exports.GroupChangeKind.ADD_PANEL,
|
|
4873
4813
|
panel: event.panel,
|
|
4874
4814
|
});
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
4879
|
-
panel: event.panel,
|
|
4880
|
-
});
|
|
4815
|
+
if (event.panel) {
|
|
4816
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4817
|
+
}
|
|
4881
4818
|
break;
|
|
4882
4819
|
case exports.GroupChangeKind2.REMOVE_PANEL:
|
|
4883
4820
|
this._onGridEvent.fire({
|
|
4884
4821
|
kind: exports.GroupChangeKind.REMOVE_PANEL,
|
|
4885
4822
|
panel: event.panel,
|
|
4886
4823
|
});
|
|
4824
|
+
if (event.panel) {
|
|
4825
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4826
|
+
}
|
|
4887
4827
|
break;
|
|
4888
4828
|
case exports.GroupChangeKind2.PANEL_ACTIVE:
|
|
4889
4829
|
this._onGridEvent.fire({
|
|
4890
4830
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4891
4831
|
panel: event.panel,
|
|
4892
4832
|
});
|
|
4833
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4893
4834
|
break;
|
|
4894
4835
|
}
|
|
4895
4836
|
}));
|
|
@@ -4903,44 +4844,18 @@ class DockviewComponent extends BaseGrid {
|
|
|
4903
4844
|
}
|
|
4904
4845
|
return view;
|
|
4905
4846
|
}
|
|
4906
|
-
dispose() {
|
|
4907
|
-
super.dispose();
|
|
4908
|
-
this._onGridEvent.dispose();
|
|
4909
|
-
}
|
|
4910
|
-
/**
|
|
4911
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4912
|
-
*/
|
|
4913
|
-
syncConfigs() {
|
|
4914
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4915
|
-
if (dirtyPanels.length === 0) ;
|
|
4916
|
-
this.dirtyPanels.clear();
|
|
4917
|
-
const partialPanelState = dirtyPanels
|
|
4918
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4919
|
-
.filter((_) => !!_)
|
|
4920
|
-
.reduce((collection, panel) => {
|
|
4921
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4922
|
-
return collection;
|
|
4923
|
-
}, {});
|
|
4924
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4925
|
-
dirtyPanels
|
|
4926
|
-
.filter((p) => this._panels.has(p.id))
|
|
4927
|
-
.forEach((panel) => {
|
|
4928
|
-
panel.setDirty(false);
|
|
4929
|
-
});
|
|
4930
|
-
}
|
|
4931
4847
|
_addPanel(options) {
|
|
4932
4848
|
const view = new DefaultGroupPanelView({
|
|
4933
4849
|
content: this.createContentComponent(options.id, options.component),
|
|
4934
4850
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4935
4851
|
});
|
|
4936
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4852
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4937
4853
|
panel.init({
|
|
4938
4854
|
view,
|
|
4939
4855
|
title: options.title || options.id,
|
|
4940
4856
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4941
4857
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4942
4858
|
});
|
|
4943
|
-
this.registerPanel(panel);
|
|
4944
4859
|
return panel;
|
|
4945
4860
|
}
|
|
4946
4861
|
createContentComponent(id, componentName) {
|
|
@@ -4960,10 +4875,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
4960
4875
|
var _a;
|
|
4961
4876
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4962
4877
|
}
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
this.
|
|
4878
|
+
dispose() {
|
|
4879
|
+
super.dispose();
|
|
4880
|
+
this._onDidActivePanelChange.dispose();
|
|
4881
|
+
this._onDidAddPanel.dispose();
|
|
4882
|
+
this._onDidRemovePanel.dispose();
|
|
4883
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4967
4884
|
}
|
|
4968
4885
|
}
|
|
4969
4886
|
|
|
@@ -4974,6 +4891,8 @@ class GridviewComponent extends BaseGrid {
|
|
|
4974
4891
|
orientation: options.orientation,
|
|
4975
4892
|
styles: options.styles,
|
|
4976
4893
|
});
|
|
4894
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4895
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
4977
4896
|
this._options = options;
|
|
4978
4897
|
if (!this.options.components) {
|
|
4979
4898
|
this.options.components = {};
|
|
@@ -5082,6 +5001,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
5082
5001
|
}
|
|
5083
5002
|
}
|
|
5084
5003
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
5004
|
+
this._onDidLayoutfromJSON.fire();
|
|
5085
5005
|
}
|
|
5086
5006
|
movePanel(panel, options) {
|
|
5087
5007
|
var _a;
|
|
@@ -5196,6 +5116,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
5196
5116
|
}
|
|
5197
5117
|
dispose() {
|
|
5198
5118
|
super.dispose();
|
|
5119
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5199
5120
|
}
|
|
5200
5121
|
}
|
|
5201
5122
|
|
|
@@ -5208,6 +5129,10 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5208
5129
|
this.element = element;
|
|
5209
5130
|
this._disposable = new MutableDisposable();
|
|
5210
5131
|
this.panels = new Map();
|
|
5132
|
+
this._onDidAddView = new Emitter();
|
|
5133
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5134
|
+
this._onDidRemoveView = new Emitter();
|
|
5135
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5211
5136
|
this._onDidLayoutChange = new Emitter();
|
|
5212
5137
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5213
5138
|
this._options = options;
|
|
@@ -5218,7 +5143,7 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5218
5143
|
options.frameworkComponents = {};
|
|
5219
5144
|
}
|
|
5220
5145
|
this.splitview = new Splitview(this.element, options);
|
|
5221
|
-
this.addDisposables(this._disposable);
|
|
5146
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5222
5147
|
}
|
|
5223
5148
|
get options() {
|
|
5224
5149
|
return this._options;
|
|
@@ -5233,7 +5158,7 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5233
5158
|
this._splitview = value;
|
|
5234
5159
|
this._disposable.value = new CompositeDisposable(this._splitview.onDidSashEnd(() => {
|
|
5235
5160
|
this._onDidLayoutChange.fire(undefined);
|
|
5236
|
-
}));
|
|
5161
|
+
}), this._splitview.onDidAddView((e) => this._onDidAddView.fire(e)), this._splitview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
|
|
5237
5162
|
}
|
|
5238
5163
|
get minimumSize() {
|
|
5239
5164
|
return this.splitview.minimumSize;
|
|
@@ -5407,6 +5332,10 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5407
5332
|
});
|
|
5408
5333
|
panel.orientation = orientation;
|
|
5409
5334
|
this.doAddView(panel);
|
|
5335
|
+
setTimeout(() => {
|
|
5336
|
+
// the original onDidAddView events are missed since they are fired before we can subcribe to them
|
|
5337
|
+
this._onDidAddView.fire(panel);
|
|
5338
|
+
}, 0);
|
|
5410
5339
|
return { size: view.size, view: panel };
|
|
5411
5340
|
}),
|
|
5412
5341
|
},
|
|
@@ -5436,41 +5365,6 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5436
5365
|
}
|
|
5437
5366
|
}
|
|
5438
5367
|
|
|
5439
|
-
class DragHandler extends CompositeDisposable {
|
|
5440
|
-
constructor(el) {
|
|
5441
|
-
super();
|
|
5442
|
-
this.el = el;
|
|
5443
|
-
this.iframes = [];
|
|
5444
|
-
this._onDragStart = new Emitter();
|
|
5445
|
-
this.onDragStart = this._onDragStart.event;
|
|
5446
|
-
this.configure();
|
|
5447
|
-
}
|
|
5448
|
-
configure() {
|
|
5449
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5450
|
-
var _a;
|
|
5451
|
-
this.iframes = [
|
|
5452
|
-
...getElementsByTagName('iframe'),
|
|
5453
|
-
...getElementsByTagName('webview'),
|
|
5454
|
-
];
|
|
5455
|
-
for (const iframe of this.iframes) {
|
|
5456
|
-
iframe.style.pointerEvents = 'none';
|
|
5457
|
-
}
|
|
5458
|
-
this.el.classList.add('dragged');
|
|
5459
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5460
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5461
|
-
this.disposable = this.getData();
|
|
5462
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5463
|
-
var _a;
|
|
5464
|
-
for (const iframe of this.iframes) {
|
|
5465
|
-
iframe.style.pointerEvents = 'auto';
|
|
5466
|
-
}
|
|
5467
|
-
this.iframes = [];
|
|
5468
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5469
|
-
this.disposable = undefined;
|
|
5470
|
-
}));
|
|
5471
|
-
}
|
|
5472
|
-
}
|
|
5473
|
-
|
|
5474
5368
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5475
5369
|
//
|
|
5476
5370
|
constructor(id) {
|
|
@@ -5485,6 +5379,7 @@ class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
|
5485
5379
|
//
|
|
5486
5380
|
this._onDidSizeChange = new Emitter();
|
|
5487
5381
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5382
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5488
5383
|
}
|
|
5489
5384
|
setConstraints(value) {
|
|
5490
5385
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5492,11 +5387,6 @@ class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
|
5492
5387
|
setSize(event) {
|
|
5493
5388
|
this._onDidSizeChange.fire(event);
|
|
5494
5389
|
}
|
|
5495
|
-
dispose() {
|
|
5496
|
-
super.dispose();
|
|
5497
|
-
this._onDidConstraintsChange.dispose();
|
|
5498
|
-
this._onDidSizeChange.dispose();
|
|
5499
|
-
}
|
|
5500
5390
|
}
|
|
5501
5391
|
|
|
5502
5392
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5510,6 +5400,7 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5510
5400
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5511
5401
|
this._onMouseLeave = new Emitter({});
|
|
5512
5402
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5403
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5513
5404
|
}
|
|
5514
5405
|
set pane(pane) {
|
|
5515
5406
|
this._pane = pane;
|
|
@@ -5525,7 +5416,7 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5525
5416
|
}
|
|
5526
5417
|
|
|
5527
5418
|
class PaneviewPanel extends BasePanelView {
|
|
5528
|
-
constructor(id, component, headerComponent, orientation, isExpanded) {
|
|
5419
|
+
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5529
5420
|
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5530
5421
|
this.headerComponent = headerComponent;
|
|
5531
5422
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
@@ -5541,6 +5432,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5541
5432
|
this.expandedSize = 0;
|
|
5542
5433
|
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
5543
5434
|
this._isExpanded = isExpanded;
|
|
5435
|
+
this._headerVisible = isHeaderVisible;
|
|
5544
5436
|
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
5545
5437
|
this._orientation = orientation;
|
|
5546
5438
|
this.element.classList.add('pane');
|
|
@@ -5608,6 +5500,13 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5608
5500
|
this._maximumBodySize =
|
|
5609
5501
|
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
5610
5502
|
}
|
|
5503
|
+
get headerVisible() {
|
|
5504
|
+
return this._headerVisible;
|
|
5505
|
+
}
|
|
5506
|
+
set headerVisible(value) {
|
|
5507
|
+
this._headerVisible = value;
|
|
5508
|
+
this.header.style.display = value ? '' : 'none';
|
|
5509
|
+
}
|
|
5611
5510
|
setVisible(isVisible) {
|
|
5612
5511
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
5613
5512
|
}
|
|
@@ -5670,7 +5569,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5670
5569
|
}
|
|
5671
5570
|
}
|
|
5672
5571
|
toJSON() {
|
|
5673
|
-
const params = this.
|
|
5572
|
+
const params = this._params;
|
|
5674
5573
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5675
5574
|
}
|
|
5676
5575
|
renderOnce() {
|
|
@@ -5705,7 +5604,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5705
5604
|
|
|
5706
5605
|
class DraggablePaneviewPanel extends PaneviewPanel {
|
|
5707
5606
|
constructor(id, component, headerComponent, orientation, isExpanded, disableDnd) {
|
|
5708
|
-
super(id, component, headerComponent, orientation, isExpanded);
|
|
5607
|
+
super(id, component, headerComponent, orientation, isExpanded, true);
|
|
5709
5608
|
this._onDidDrop = new Emitter();
|
|
5710
5609
|
this.onDidDrop = this._onDidDrop.event;
|
|
5711
5610
|
if (!disableDnd) {
|
|
@@ -5739,36 +5638,39 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5739
5638
|
},
|
|
5740
5639
|
});
|
|
5741
5640
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5742
|
-
|
|
5743
|
-
if (!data) {
|
|
5744
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5745
|
-
return;
|
|
5746
|
-
}
|
|
5747
|
-
const containerApi = this.params
|
|
5748
|
-
.containerApi;
|
|
5749
|
-
const panelId = data.paneId;
|
|
5750
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5751
|
-
if (!existingPanel) {
|
|
5752
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5753
|
-
return;
|
|
5754
|
-
}
|
|
5755
|
-
const allPanels = containerApi.getPanels();
|
|
5756
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5757
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5758
|
-
if (event.position === exports.Position.Left ||
|
|
5759
|
-
event.position === exports.Position.Top) {
|
|
5760
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5761
|
-
}
|
|
5762
|
-
if (event.position === exports.Position.Right ||
|
|
5763
|
-
event.position === exports.Position.Bottom) {
|
|
5764
|
-
if (fromIndex > toIndex) {
|
|
5765
|
-
toIndex++;
|
|
5766
|
-
}
|
|
5767
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5768
|
-
}
|
|
5769
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5641
|
+
this.onDrop(event);
|
|
5770
5642
|
}));
|
|
5771
5643
|
}
|
|
5644
|
+
onDrop(event) {
|
|
5645
|
+
const data = getPaneData();
|
|
5646
|
+
if (!data) {
|
|
5647
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5648
|
+
return;
|
|
5649
|
+
}
|
|
5650
|
+
const containerApi = this._params
|
|
5651
|
+
.containerApi;
|
|
5652
|
+
const panelId = data.paneId;
|
|
5653
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
5654
|
+
if (!existingPanel) {
|
|
5655
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5656
|
+
return;
|
|
5657
|
+
}
|
|
5658
|
+
const allPanels = containerApi.getPanels();
|
|
5659
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5660
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5661
|
+
if (event.position === exports.Position.Left ||
|
|
5662
|
+
event.position === exports.Position.Top) {
|
|
5663
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
5664
|
+
}
|
|
5665
|
+
if (event.position === exports.Position.Right ||
|
|
5666
|
+
event.position === exports.Position.Bottom) {
|
|
5667
|
+
if (fromIndex > toIndex) {
|
|
5668
|
+
toIndex++;
|
|
5669
|
+
}
|
|
5670
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5671
|
+
}
|
|
5672
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
5673
|
+
}
|
|
5772
5674
|
}
|
|
5773
5675
|
|
|
5774
5676
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5828,6 +5730,11 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5828
5730
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5829
5731
|
this._onDidDrop = new Emitter();
|
|
5830
5732
|
this.onDidDrop = this._onDidDrop.event;
|
|
5733
|
+
this._onDidAddView = new Emitter();
|
|
5734
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5735
|
+
this._onDidRemoveView = new Emitter();
|
|
5736
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5737
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5831
5738
|
this._options = options;
|
|
5832
5739
|
if (!options.components) {
|
|
5833
5740
|
options.components = {};
|
|
@@ -5841,17 +5748,11 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5841
5748
|
});
|
|
5842
5749
|
this.addDisposables(this._disposable);
|
|
5843
5750
|
}
|
|
5844
|
-
get onDidAddView() {
|
|
5845
|
-
return this._paneview.onDidAddView;
|
|
5846
|
-
}
|
|
5847
|
-
get onDidRemoveView() {
|
|
5848
|
-
return this._paneview.onDidRemoveView;
|
|
5849
|
-
}
|
|
5850
5751
|
set paneview(value) {
|
|
5851
5752
|
this._paneview = value;
|
|
5852
|
-
this._disposable.value = new CompositeDisposable(this.
|
|
5753
|
+
this._disposable.value = new CompositeDisposable(this._paneview.onDidChange(() => {
|
|
5853
5754
|
this._onDidLayoutChange.fire(undefined);
|
|
5854
|
-
}));
|
|
5755
|
+
}), this._paneview.onDidAddView((e) => this._onDidAddView.fire(e)), this._paneview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
|
|
5855
5756
|
}
|
|
5856
5757
|
get paneview() {
|
|
5857
5758
|
return this._paneview;
|
|
@@ -6031,6 +5932,10 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
6031
5932
|
});
|
|
6032
5933
|
panel.orientation = this.paneview.orientation;
|
|
6033
5934
|
});
|
|
5935
|
+
setTimeout(() => {
|
|
5936
|
+
// the original onDidAddView events are missed since they are fired before we can subcribe to them
|
|
5937
|
+
this._onDidAddView.fire(panel);
|
|
5938
|
+
}, 0);
|
|
6034
5939
|
return { size: view.size, view: panel };
|
|
6035
5940
|
}),
|
|
6036
5941
|
},
|
|
@@ -6057,12 +5962,14 @@ class SplitviewPanel extends BasePanelView {
|
|
|
6057
5962
|
this._snap = false;
|
|
6058
5963
|
this._onDidChange = new Emitter();
|
|
6059
5964
|
this.onDidChange = this._onDidChange.event;
|
|
6060
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5965
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6061
5966
|
const { isVisible } = event;
|
|
6062
|
-
const { containerApi } = this
|
|
5967
|
+
const { containerApi } = this
|
|
5968
|
+
._params;
|
|
6063
5969
|
containerApi.setVisible(this, isVisible);
|
|
6064
5970
|
}), this.api.onActiveChange(() => {
|
|
6065
|
-
const { containerApi } = this
|
|
5971
|
+
const { containerApi } = this
|
|
5972
|
+
._params;
|
|
6066
5973
|
containerApi.setActive(this);
|
|
6067
5974
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6068
5975
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6205,14 +6112,13 @@ class ReactPart {
|
|
|
6205
6112
|
if (this.disposed) {
|
|
6206
6113
|
throw new Error('invalid operation: resource is already disposed');
|
|
6207
6114
|
}
|
|
6208
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6209
6115
|
if (typeof this.component !== 'function') {
|
|
6210
6116
|
/**
|
|
6211
6117
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6212
6118
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6213
6119
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6214
6120
|
*/
|
|
6215
|
-
throw new Error('
|
|
6121
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6216
6122
|
}
|
|
6217
6123
|
const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
|
|
6218
6124
|
component: this
|
|
@@ -6276,16 +6182,14 @@ class ReactPanelContentPart {
|
|
|
6276
6182
|
this._onDidBlur = new Emitter();
|
|
6277
6183
|
this.onDidBlur = this._onDidBlur.event;
|
|
6278
6184
|
this._element = document.createElement('div');
|
|
6279
|
-
this._element.
|
|
6280
|
-
this._element.style.width = '100%';
|
|
6185
|
+
this._element.className = 'dockview-react-part';
|
|
6281
6186
|
// this.hostedContainer = new HostedContainer({
|
|
6282
6187
|
// id,
|
|
6283
6188
|
// });
|
|
6284
6189
|
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6285
6190
|
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6286
6191
|
this._actionsElement = document.createElement('div');
|
|
6287
|
-
this._actionsElement.
|
|
6288
|
-
this._actionsElement.style.width = '100%';
|
|
6192
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6289
6193
|
}
|
|
6290
6194
|
get element() {
|
|
6291
6195
|
return this._element;
|
|
@@ -6333,6 +6237,8 @@ class ReactPanelContentPart {
|
|
|
6333
6237
|
}
|
|
6334
6238
|
dispose() {
|
|
6335
6239
|
var _a, _b;
|
|
6240
|
+
this._onDidFocus.dispose();
|
|
6241
|
+
this._onDidBlur.dispose();
|
|
6336
6242
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6337
6243
|
// this.hostedContainer?.dispose();
|
|
6338
6244
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
@@ -6345,6 +6251,7 @@ class ReactPanelHeaderPart {
|
|
|
6345
6251
|
this.component = component;
|
|
6346
6252
|
this.reactPortalStore = reactPortalStore;
|
|
6347
6253
|
this._element = document.createElement('div');
|
|
6254
|
+
this._element.className = 'dockview-react-part';
|
|
6348
6255
|
}
|
|
6349
6256
|
get element() {
|
|
6350
6257
|
return this._element;
|
|
@@ -6389,7 +6296,6 @@ class ReactPanelDeserialzier {
|
|
|
6389
6296
|
const panelId = panelData.id;
|
|
6390
6297
|
const params = panelData.params;
|
|
6391
6298
|
const title = panelData.title;
|
|
6392
|
-
const state = panelData.state;
|
|
6393
6299
|
const suppressClosable = panelData.suppressClosable;
|
|
6394
6300
|
const viewData = panelData.view;
|
|
6395
6301
|
const view = new DefaultGroupPanelView({
|
|
@@ -6398,13 +6304,12 @@ class ReactPanelDeserialzier {
|
|
|
6398
6304
|
? 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)
|
|
6399
6305
|
: new DefaultTab(),
|
|
6400
6306
|
});
|
|
6401
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6307
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6402
6308
|
panel.init({
|
|
6403
6309
|
view,
|
|
6404
6310
|
title,
|
|
6405
6311
|
suppressClosable,
|
|
6406
6312
|
params: params || {},
|
|
6407
|
-
state: state || {},
|
|
6408
6313
|
});
|
|
6409
6314
|
return panel;
|
|
6410
6315
|
}
|
|
@@ -6419,8 +6324,7 @@ class ReactWatermarkPart {
|
|
|
6419
6324
|
value: undefined,
|
|
6420
6325
|
};
|
|
6421
6326
|
this._element = document.createElement('div');
|
|
6422
|
-
this._element.
|
|
6423
|
-
this._element.style.width = '100%';
|
|
6327
|
+
this._element.className = 'dockview-react-part';
|
|
6424
6328
|
}
|
|
6425
6329
|
get element() {
|
|
6426
6330
|
return this._element;
|
|
@@ -6518,12 +6422,16 @@ const DockviewReact = React__namespace.forwardRef((props, ref) => {
|
|
|
6518
6422
|
frameworkTabComponents: props.tabComponents,
|
|
6519
6423
|
tabHeight: props.tabHeight,
|
|
6520
6424
|
debug: props.debug,
|
|
6521
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6522
6425
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6523
6426
|
styles: props.hideBorders
|
|
6524
6427
|
? { separatorBorder: 'transparent' }
|
|
6525
6428
|
: undefined,
|
|
6526
6429
|
});
|
|
6430
|
+
const disposable = dockview.onDidDrop((event) => {
|
|
6431
|
+
if (props.onDidDrop) {
|
|
6432
|
+
props.onDidDrop(event);
|
|
6433
|
+
}
|
|
6434
|
+
});
|
|
6527
6435
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6528
6436
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
6529
6437
|
const { clientWidth, clientHeight } = domRef.current;
|
|
@@ -6533,6 +6441,7 @@ const DockviewReact = React__namespace.forwardRef((props, ref) => {
|
|
|
6533
6441
|
}
|
|
6534
6442
|
dockviewRef.current = dockview;
|
|
6535
6443
|
return () => {
|
|
6444
|
+
disposable.dispose();
|
|
6536
6445
|
dockview.dispose();
|
|
6537
6446
|
};
|
|
6538
6447
|
}, []);
|
|
@@ -6544,6 +6453,14 @@ const DockviewReact = React__namespace.forwardRef((props, ref) => {
|
|
|
6544
6453
|
frameworkComponents: props.components,
|
|
6545
6454
|
});
|
|
6546
6455
|
}, [props.components]);
|
|
6456
|
+
React__namespace.useEffect(() => {
|
|
6457
|
+
if (!dockviewRef.current) {
|
|
6458
|
+
return;
|
|
6459
|
+
}
|
|
6460
|
+
dockviewRef.current.updateOptions({
|
|
6461
|
+
showDndOverlay: props.showDndOverlay,
|
|
6462
|
+
});
|
|
6463
|
+
}, [props.showDndOverlay]);
|
|
6547
6464
|
React__namespace.useEffect(() => {
|
|
6548
6465
|
if (!dockviewRef.current) {
|
|
6549
6466
|
return;
|
|
@@ -6632,9 +6549,9 @@ class ReactPanelView extends SplitviewPanel {
|
|
|
6632
6549
|
getComponent() {
|
|
6633
6550
|
var _a;
|
|
6634
6551
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6635
|
-
params: ((_a = this.
|
|
6552
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6636
6553
|
api: this.api,
|
|
6637
|
-
containerApi: this.
|
|
6554
|
+
containerApi: this._params
|
|
6638
6555
|
.containerApi,
|
|
6639
6556
|
});
|
|
6640
6557
|
}
|
|
@@ -6707,9 +6624,9 @@ class ReactGridPanelView extends GridviewPanel {
|
|
|
6707
6624
|
getComponent() {
|
|
6708
6625
|
var _a;
|
|
6709
6626
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6710
|
-
params: ((_a = this.
|
|
6627
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6711
6628
|
api: this.api,
|
|
6712
|
-
containerApi: this.
|
|
6629
|
+
containerApi: this._params
|
|
6713
6630
|
.containerApi,
|
|
6714
6631
|
});
|
|
6715
6632
|
}
|
|
@@ -6900,7 +6817,6 @@ PaneviewReact.displayName = 'PaneviewComponent';
|
|
|
6900
6817
|
exports.BaseGrid = BaseGrid;
|
|
6901
6818
|
exports.CompositeDisposable = CompositeDisposable;
|
|
6902
6819
|
exports.ContentContainer = ContentContainer;
|
|
6903
|
-
exports.DATA_KEY = DATA_KEY;
|
|
6904
6820
|
exports.DockviewApi = DockviewApi;
|
|
6905
6821
|
exports.DockviewComponent = DockviewComponent;
|
|
6906
6822
|
exports.DockviewComponents = DockviewComponents;
|
|
@@ -6932,9 +6848,9 @@ exports.SplitviewComponent = SplitviewComponent;
|
|
|
6932
6848
|
exports.SplitviewPanel = SplitviewPanel;
|
|
6933
6849
|
exports.SplitviewReact = SplitviewReact;
|
|
6934
6850
|
exports.Tab = Tab$1;
|
|
6851
|
+
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6935
6852
|
exports.addDisposableListener = addDisposableListener;
|
|
6936
6853
|
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6937
|
-
exports.extractData = extractData;
|
|
6938
6854
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6939
6855
|
exports.getGridLocation = getGridLocation;
|
|
6940
6856
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6942,11 +6858,8 @@ exports.getPaneData = getPaneData;
|
|
|
6942
6858
|
exports.getPanelData = getPanelData;
|
|
6943
6859
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6944
6860
|
exports.indexInParent = indexInParent;
|
|
6945
|
-
exports.isCustomDragEvent = isCustomDragEvent;
|
|
6946
6861
|
exports.isGridBranchNode = isGridBranchNode;
|
|
6947
|
-
exports.isPanelTransferEvent = isPanelTransferEvent;
|
|
6948
6862
|
exports.isReactElement = isReactElement;
|
|
6949
|
-
exports.isTabDragEvent = isTabDragEvent;
|
|
6950
6863
|
exports.orthogonal = orthogonal;
|
|
6951
6864
|
exports.toTarget = toTarget;
|
|
6952
6865
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|