dockview 1.0.3 → 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 +28 -19
- package/dist/cjs/api/component.api.js +104 -33
- 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 +3 -0
- package/dist/cjs/dnd/droptarget.js +69 -45
- 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/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.js +25 -4
- package/dist/cjs/events.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/cjs/gridview/baseComponentGridview.js +14 -2
- 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 -17
- 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 +36 -123
- 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 +4 -6
- 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 +31 -28
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
- package/dist/cjs/paneview/paneview.js +1 -1
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +0 -3
- package/dist/cjs/paneview/paneviewComponent.js +1 -0
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/paneview/paneviewPanel.js +1 -1
- package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
- package/dist/cjs/react/deserializer.js +1 -3
- package/dist/cjs/react/deserializer.js.map +1 -1
- package/dist/cjs/react/dockview/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/splitviewComponent.d.ts +0 -3
- package/dist/cjs/splitview/splitviewComponent.js +1 -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 +394 -532
- package/dist/dockview.amd.min.js +2 -16
- package/dist/dockview.amd.min.noStyle.js +2 -16
- package/dist/dockview.amd.noStyle.js +393 -531
- package/dist/dockview.cjs.js +394 -532
- package/dist/dockview.esm.js +395 -528
- package/dist/dockview.esm.min.js +2 -16
- package/dist/dockview.js +394 -532
- package/dist/dockview.min.js +2 -16
- package/dist/dockview.min.noStyle.js +2 -16
- package/dist/dockview.noStyle.js +393 -531
- package/dist/esm/api/component.api.d.ts +28 -19
- package/dist/esm/api/component.api.js +48 -21
- 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 +3 -0
- package/dist/esm/dnd/droptarget.js +69 -45
- 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/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.js +2 -3
- package/dist/esm/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/esm/gridview/baseComponentGridview.js +14 -2
- 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 -15
- 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 +22 -56
- 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 +4 -6
- 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 +31 -28
- package/dist/esm/paneview/paneview.js +1 -1
- package/dist/esm/paneview/paneviewComponent.d.ts +0 -3
- package/dist/esm/paneview/paneviewComponent.js +1 -0
- package/dist/esm/paneview/paneviewPanel.js +1 -1
- package/dist/esm/react/deserializer.js +1 -3
- package/dist/esm/react/dockview/dockview.d.ts +9 -9
- package/dist/esm/react/dockview/dockview.js +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/splitviewComponent.d.ts +0 -3
- package/dist/esm/splitview/splitviewComponent.js +1 -1
- 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 +2 -2
- package/dist/cjs/functions.d.ts +0 -1
- package/dist/cjs/functions.js +0 -42
- package/dist/cjs/functions.js.map +0 -1
- package/dist/cjs/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/cjs/groupview/panel/hostedPanel.js +0 -57
- package/dist/cjs/groupview/panel/hostedPanel.js.map +0 -1
- package/dist/cjs/json.d.ts +0 -1
- package/dist/cjs/json.js +0 -14
- package/dist/cjs/json.js.map +0 -1
- package/dist/esm/functions.d.ts +0 -1
- package/dist/esm/functions.js +0 -8
- package/dist/esm/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/esm/groupview/panel/hostedPanel.js +0 -43
- package/dist/esm/json.d.ts +0 -1
- package/dist/esm/json.js +0 -9
package/dist/dockview.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.0
|
|
3
|
+
* @version 1.1.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
var css_248z = ".dockview-theme-dark {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n pointer-events: none;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {\n width: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translate(100%, 0%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translate(0%, 100%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n height: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n overflow: hidden;\n outline: none;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n}\n.pane-container .view .default-header > span {\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n}\n.split-view-container .sash-container .sash:active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab.dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action:not(.dirty) {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.tab .default-tab .action-container .tab-list .tab-action.dirty:not(:hover) {\n display: block;\n -webkit-mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}";
|
|
61
|
+
var css_248z = ".dockview-theme-dark {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n 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}";
|
|
62
62
|
styleInject(css_248z);
|
|
63
63
|
|
|
64
64
|
exports.Event = void 0;
|
|
@@ -91,7 +91,6 @@
|
|
|
91
91
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
|
|
92
92
|
listener(this._last);
|
|
93
93
|
}
|
|
94
|
-
this._listeners.length === 0;
|
|
95
94
|
this._listeners.push(listener);
|
|
96
95
|
return {
|
|
97
96
|
dispose: () => {
|
|
@@ -107,9 +106,9 @@
|
|
|
107
106
|
}
|
|
108
107
|
fire(e) {
|
|
109
108
|
this._last = e;
|
|
110
|
-
this._listeners
|
|
109
|
+
for (const listener of this._listeners) {
|
|
111
110
|
listener(e);
|
|
112
|
-
}
|
|
111
|
+
}
|
|
113
112
|
}
|
|
114
113
|
dispose() {
|
|
115
114
|
this._listeners = [];
|
|
@@ -167,7 +166,7 @@
|
|
|
167
166
|
return new CompositeDisposable(...args);
|
|
168
167
|
}
|
|
169
168
|
addDisposables(...args) {
|
|
170
|
-
args
|
|
169
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
171
170
|
}
|
|
172
171
|
dispose() {
|
|
173
172
|
this.disposables.forEach((arg) => arg.dispose());
|
|
@@ -186,20 +185,11 @@
|
|
|
186
185
|
dispose() {
|
|
187
186
|
if (this._disposable) {
|
|
188
187
|
this._disposable.dispose();
|
|
188
|
+
this._disposable = exports.Disposable.NONE;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
function tryParseJSON(text, reviver) {
|
|
194
|
-
try {
|
|
195
|
-
return JSON.parse(text, reviver);
|
|
196
|
-
}
|
|
197
|
-
catch (err) {
|
|
198
|
-
console.warn('failed to parse JSON');
|
|
199
|
-
return undefined;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
193
|
class TransferObject {
|
|
204
194
|
constructor() {
|
|
205
195
|
//
|
|
@@ -220,45 +210,6 @@
|
|
|
220
210
|
this.paneId = paneId;
|
|
221
211
|
}
|
|
222
212
|
}
|
|
223
|
-
const DATA_KEY = 'splitview/transfer';
|
|
224
|
-
const isPanelTransferEvent = (event) => {
|
|
225
|
-
if (!event.dataTransfer) {
|
|
226
|
-
return false;
|
|
227
|
-
}
|
|
228
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
229
|
-
};
|
|
230
|
-
exports.DragType = void 0;
|
|
231
|
-
(function (DragType) {
|
|
232
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
233
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
234
|
-
})(exports.DragType || (exports.DragType = {}));
|
|
235
|
-
/**
|
|
236
|
-
* Determine whether this data belong to that of an event that was started by
|
|
237
|
-
* dragging a tab component
|
|
238
|
-
*/
|
|
239
|
-
const isTabDragEvent = (data) => {
|
|
240
|
-
return data.type === exports.DragType.DOCKVIEW_TAB;
|
|
241
|
-
};
|
|
242
|
-
/**
|
|
243
|
-
* Determine whether this data belong to that of an event that was started by
|
|
244
|
-
* a custom drag-enable component
|
|
245
|
-
*/
|
|
246
|
-
const isCustomDragEvent = (data) => {
|
|
247
|
-
return data.type === exports.DragType.EXTERNAL;
|
|
248
|
-
};
|
|
249
|
-
const extractData = (event) => {
|
|
250
|
-
if (!event.dataTransfer) {
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
254
|
-
if (!data) {
|
|
255
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
256
|
-
}
|
|
257
|
-
if (typeof data.type !== 'string') {
|
|
258
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
259
|
-
}
|
|
260
|
-
return data;
|
|
261
|
-
};
|
|
262
213
|
/**
|
|
263
214
|
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
264
215
|
*/
|
|
@@ -328,6 +279,9 @@
|
|
|
328
279
|
get length() {
|
|
329
280
|
return this.component.length;
|
|
330
281
|
}
|
|
282
|
+
get orientation() {
|
|
283
|
+
return this.component.orientation;
|
|
284
|
+
}
|
|
331
285
|
get onDidLayoutChange() {
|
|
332
286
|
return this.component.onDidLayoutChange;
|
|
333
287
|
}
|
|
@@ -337,9 +291,6 @@
|
|
|
337
291
|
get onDidRemoveView() {
|
|
338
292
|
return this.component.onDidRemoveView;
|
|
339
293
|
}
|
|
340
|
-
get orientation() {
|
|
341
|
-
return this.component.orientation;
|
|
342
|
-
}
|
|
343
294
|
updateOptions(options) {
|
|
344
295
|
this.component.updateOptions(options);
|
|
345
296
|
}
|
|
@@ -384,18 +335,18 @@
|
|
|
384
335
|
constructor(component) {
|
|
385
336
|
this.component = component;
|
|
386
337
|
}
|
|
387
|
-
get width() {
|
|
388
|
-
return this.component.width;
|
|
389
|
-
}
|
|
390
|
-
get height() {
|
|
391
|
-
return this.component.height;
|
|
392
|
-
}
|
|
393
338
|
get minimumSize() {
|
|
394
339
|
return this.component.minimumSize;
|
|
395
340
|
}
|
|
396
341
|
get maximumSize() {
|
|
397
342
|
return this.component.maximumSize;
|
|
398
343
|
}
|
|
344
|
+
get height() {
|
|
345
|
+
return this.component.height;
|
|
346
|
+
}
|
|
347
|
+
get width() {
|
|
348
|
+
return this.component.width;
|
|
349
|
+
}
|
|
399
350
|
get onDidLayoutChange() {
|
|
400
351
|
return this.component.onDidLayoutChange;
|
|
401
352
|
}
|
|
@@ -451,12 +402,6 @@
|
|
|
451
402
|
constructor(component) {
|
|
452
403
|
this.component = component;
|
|
453
404
|
}
|
|
454
|
-
get width() {
|
|
455
|
-
return this.component.width;
|
|
456
|
-
}
|
|
457
|
-
get height() {
|
|
458
|
-
return this.component.height;
|
|
459
|
-
}
|
|
460
405
|
get minimumHeight() {
|
|
461
406
|
return this.component.minimumHeight;
|
|
462
407
|
}
|
|
@@ -469,12 +414,30 @@
|
|
|
469
414
|
get maximumWidth() {
|
|
470
415
|
return this.component.maximumWidth;
|
|
471
416
|
}
|
|
417
|
+
get width() {
|
|
418
|
+
return this.component.width;
|
|
419
|
+
}
|
|
420
|
+
get height() {
|
|
421
|
+
return this.component.height;
|
|
422
|
+
}
|
|
472
423
|
get onGridEvent() {
|
|
473
424
|
return this.component.onGridEvent;
|
|
474
425
|
}
|
|
475
426
|
get onDidLayoutChange() {
|
|
476
427
|
return this.component.onDidLayoutChange;
|
|
477
428
|
}
|
|
429
|
+
get onDidAddGroup() {
|
|
430
|
+
return this.component.onDidAddGroup;
|
|
431
|
+
}
|
|
432
|
+
get onDidRemoveGroup() {
|
|
433
|
+
return this.component.onDidRemoveGroup;
|
|
434
|
+
}
|
|
435
|
+
get onDidActiveGroupChange() {
|
|
436
|
+
return this.component.onDidActiveGroupChange;
|
|
437
|
+
}
|
|
438
|
+
get onDidLayoutFromJSON() {
|
|
439
|
+
return this.component.onDidLayoutFromJSON;
|
|
440
|
+
}
|
|
478
441
|
get panels() {
|
|
479
442
|
return this.component.groups;
|
|
480
443
|
}
|
|
@@ -552,6 +515,27 @@
|
|
|
552
515
|
get onGridEvent() {
|
|
553
516
|
return this.component.onGridEvent;
|
|
554
517
|
}
|
|
518
|
+
get onDidActiveGroupChange() {
|
|
519
|
+
return this.component.onDidActiveGroupChange;
|
|
520
|
+
}
|
|
521
|
+
get onDidAddGroup() {
|
|
522
|
+
return this.component.onDidAddGroup;
|
|
523
|
+
}
|
|
524
|
+
get onDidRemoveGroup() {
|
|
525
|
+
return this.component.onDidRemoveGroup;
|
|
526
|
+
}
|
|
527
|
+
get onDidActivePanelChange() {
|
|
528
|
+
return this.component.onDidActivePanelChange;
|
|
529
|
+
}
|
|
530
|
+
get onDidAddPanel() {
|
|
531
|
+
return this.component.onDidAddPanel;
|
|
532
|
+
}
|
|
533
|
+
get onDidRemovePanel() {
|
|
534
|
+
return this.component.onDidRemovePanel;
|
|
535
|
+
}
|
|
536
|
+
get onDidLayoutfromJSON() {
|
|
537
|
+
return this.component.onDidLayoutfromJSON;
|
|
538
|
+
}
|
|
555
539
|
get onDidLayoutChange() {
|
|
556
540
|
return this.component.onDidLayoutChange;
|
|
557
541
|
}
|
|
@@ -579,18 +563,12 @@
|
|
|
579
563
|
getPanel(id) {
|
|
580
564
|
return this.component.getGroupPanel(id);
|
|
581
565
|
}
|
|
582
|
-
setActivePanel(panel) {
|
|
583
|
-
this.component.setActivePanel(panel);
|
|
584
|
-
}
|
|
585
566
|
layout(width, height, force = false) {
|
|
586
567
|
this.component.layout(width, height, force);
|
|
587
568
|
}
|
|
588
569
|
addPanel(options) {
|
|
589
570
|
return this.component.addPanel(options);
|
|
590
571
|
}
|
|
591
|
-
removePanel(panel) {
|
|
592
|
-
this.component.removePanel(panel);
|
|
593
|
-
}
|
|
594
572
|
addEmptyGroup(options) {
|
|
595
573
|
this.component.addEmptyGroup(options);
|
|
596
574
|
}
|
|
@@ -1610,7 +1588,7 @@
|
|
|
1610
1588
|
this.paneItems.push(paneItem);
|
|
1611
1589
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1612
1590
|
});
|
|
1613
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1591
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1614
1592
|
this._onDidChange.fire(undefined);
|
|
1615
1593
|
}), this.splitview.onDidAddView(() => {
|
|
1616
1594
|
this._onDidChange.fire();
|
|
@@ -1771,7 +1749,7 @@
|
|
|
1771
1749
|
this.options = options;
|
|
1772
1750
|
this._onDrop = new Emitter();
|
|
1773
1751
|
this.onDrop = this._onDrop.event;
|
|
1774
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1752
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1775
1753
|
onDragEnter: (e) => undefined,
|
|
1776
1754
|
onDragOver: (e) => {
|
|
1777
1755
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
@@ -1807,51 +1785,11 @@
|
|
|
1807
1785
|
const y = e.offsetY;
|
|
1808
1786
|
const xp = (100 * x) / width;
|
|
1809
1787
|
const yp = (100 * y) / height;
|
|
1810
|
-
|
|
1811
|
-
let isLeft = false;
|
|
1812
|
-
let isTop = false;
|
|
1813
|
-
let isBottom = false;
|
|
1814
|
-
switch (this.options.validOverlays) {
|
|
1815
|
-
case 'all':
|
|
1816
|
-
isRight = xp > 80;
|
|
1817
|
-
isLeft = xp < 20;
|
|
1818
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1819
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1820
|
-
break;
|
|
1821
|
-
case 'vertical':
|
|
1822
|
-
isTop = yp < 50;
|
|
1823
|
-
isBottom = yp >= 50;
|
|
1824
|
-
break;
|
|
1825
|
-
case 'horizontal':
|
|
1826
|
-
isLeft = xp < 50;
|
|
1827
|
-
isRight = xp >= 50;
|
|
1828
|
-
break;
|
|
1829
|
-
}
|
|
1788
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1830
1789
|
const isSmallX = width < 100;
|
|
1831
1790
|
const isSmallY = height < 100;
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1835
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1836
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1837
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1838
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1839
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1840
|
-
if (isRight) {
|
|
1841
|
-
this._state = exports.Position.Right;
|
|
1842
|
-
}
|
|
1843
|
-
else if (isLeft) {
|
|
1844
|
-
this._state = exports.Position.Left;
|
|
1845
|
-
}
|
|
1846
|
-
else if (isTop) {
|
|
1847
|
-
this._state = exports.Position.Top;
|
|
1848
|
-
}
|
|
1849
|
-
else if (isBottom) {
|
|
1850
|
-
this._state = exports.Position.Bottom;
|
|
1851
|
-
}
|
|
1852
|
-
else {
|
|
1853
|
-
this._state = exports.Position.Center;
|
|
1854
|
-
}
|
|
1791
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1792
|
+
this.setState(quadrant);
|
|
1855
1793
|
},
|
|
1856
1794
|
onDragLeave: (e) => {
|
|
1857
1795
|
this.removeDropTarget();
|
|
@@ -1880,9 +1818,73 @@
|
|
|
1880
1818
|
this.options.canDisplayOverlay = value;
|
|
1881
1819
|
}
|
|
1882
1820
|
dispose() {
|
|
1883
|
-
this._onDrop.dispose();
|
|
1884
1821
|
this.removeDropTarget();
|
|
1885
1822
|
}
|
|
1823
|
+
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1824
|
+
if (!this.overlay) {
|
|
1825
|
+
return;
|
|
1826
|
+
}
|
|
1827
|
+
const isLeft = quadrant === 'left';
|
|
1828
|
+
const isRight = quadrant === 'right';
|
|
1829
|
+
const isTop = quadrant === 'top';
|
|
1830
|
+
const isBottom = quadrant === 'bottom';
|
|
1831
|
+
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1832
|
+
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1833
|
+
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1834
|
+
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1835
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1836
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1837
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1838
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1839
|
+
}
|
|
1840
|
+
setState(quadrant) {
|
|
1841
|
+
switch (quadrant) {
|
|
1842
|
+
case 'top':
|
|
1843
|
+
this._state = exports.Position.Top;
|
|
1844
|
+
break;
|
|
1845
|
+
case 'left':
|
|
1846
|
+
this._state = exports.Position.Left;
|
|
1847
|
+
break;
|
|
1848
|
+
case 'bottom':
|
|
1849
|
+
this._state = exports.Position.Bottom;
|
|
1850
|
+
break;
|
|
1851
|
+
case 'right':
|
|
1852
|
+
this._state = exports.Position.Right;
|
|
1853
|
+
break;
|
|
1854
|
+
default:
|
|
1855
|
+
this._state = exports.Position.Center;
|
|
1856
|
+
break;
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
calculateQuadrant(overlayType, xp, yp) {
|
|
1860
|
+
switch (overlayType) {
|
|
1861
|
+
case 'all':
|
|
1862
|
+
if (xp < 20) {
|
|
1863
|
+
return 'left';
|
|
1864
|
+
}
|
|
1865
|
+
if (xp > 80) {
|
|
1866
|
+
return 'right';
|
|
1867
|
+
}
|
|
1868
|
+
if (yp < 20) {
|
|
1869
|
+
return 'top';
|
|
1870
|
+
}
|
|
1871
|
+
if (yp > 80) {
|
|
1872
|
+
return 'bottom';
|
|
1873
|
+
}
|
|
1874
|
+
break;
|
|
1875
|
+
case 'vertical':
|
|
1876
|
+
if (yp < 50) {
|
|
1877
|
+
return 'top';
|
|
1878
|
+
}
|
|
1879
|
+
return 'bottom';
|
|
1880
|
+
case 'horizontal':
|
|
1881
|
+
if (xp < 50) {
|
|
1882
|
+
return 'left';
|
|
1883
|
+
}
|
|
1884
|
+
return 'right';
|
|
1885
|
+
}
|
|
1886
|
+
return null;
|
|
1887
|
+
}
|
|
1886
1888
|
removeDropTarget() {
|
|
1887
1889
|
if (this.target) {
|
|
1888
1890
|
this._state = undefined;
|
|
@@ -1985,6 +1987,7 @@
|
|
|
1985
1987
|
this.view.layout(this.width, this.height);
|
|
1986
1988
|
}
|
|
1987
1989
|
dispose() {
|
|
1990
|
+
this._onDidChange.dispose();
|
|
1988
1991
|
this._disposable.dispose();
|
|
1989
1992
|
}
|
|
1990
1993
|
}
|
|
@@ -2036,7 +2039,7 @@
|
|
|
2036
2039
|
proportionalLayout,
|
|
2037
2040
|
});
|
|
2038
2041
|
}
|
|
2039
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2042
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
2040
2043
|
this._onDidChange.fire(undefined);
|
|
2041
2044
|
}));
|
|
2042
2045
|
this.setupChildrenEvents();
|
|
@@ -2208,6 +2211,15 @@
|
|
|
2208
2211
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2209
2212
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2210
2213
|
*--------------------------------------------------------------------------------------------*/
|
|
2214
|
+
function findLeaf(candiateNode, last) {
|
|
2215
|
+
if (candiateNode instanceof LeafNode) {
|
|
2216
|
+
return candiateNode;
|
|
2217
|
+
}
|
|
2218
|
+
if (candiateNode instanceof BranchNode) {
|
|
2219
|
+
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2220
|
+
}
|
|
2221
|
+
throw new Error('invalid node');
|
|
2222
|
+
}
|
|
2211
2223
|
function flipNode(node, size, orthogonalSize) {
|
|
2212
2224
|
if (node instanceof BranchNode) {
|
|
2213
2225
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2346,13 +2358,13 @@
|
|
|
2346
2358
|
}
|
|
2347
2359
|
deserialize(json, deserializer) {
|
|
2348
2360
|
const orientation = json.orientation;
|
|
2349
|
-
const height = json.height;
|
|
2361
|
+
const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
|
|
2350
2362
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2351
2363
|
}
|
|
2352
2364
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2353
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2365
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2354
2366
|
}
|
|
2355
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2367
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2356
2368
|
let result;
|
|
2357
2369
|
if (node.type === 'branch') {
|
|
2358
2370
|
const serializedChildren = node.data;
|
|
@@ -2362,7 +2374,9 @@
|
|
|
2362
2374
|
visible: serializedChild.visible,
|
|
2363
2375
|
};
|
|
2364
2376
|
});
|
|
2365
|
-
|
|
2377
|
+
// HORIZONTAL => height=orthogonalsize width=size
|
|
2378
|
+
// VERTICAL => height=size width=orthogonalsize
|
|
2379
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
|
|
2366
2380
|
}
|
|
2367
2381
|
else {
|
|
2368
2382
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2423,15 +2437,6 @@
|
|
|
2423
2437
|
if (!(node instanceof LeafNode)) {
|
|
2424
2438
|
throw new Error('invalid location');
|
|
2425
2439
|
}
|
|
2426
|
-
const findLeaf = (candiateNode, last) => {
|
|
2427
|
-
if (candiateNode instanceof LeafNode) {
|
|
2428
|
-
return candiateNode;
|
|
2429
|
-
}
|
|
2430
|
-
if (candiateNode instanceof BranchNode) {
|
|
2431
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2432
|
-
}
|
|
2433
|
-
throw new Error('invalid node');
|
|
2434
|
-
};
|
|
2435
2440
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2436
2441
|
const n = path[i];
|
|
2437
2442
|
const l = location[i] || 0;
|
|
@@ -2533,9 +2538,9 @@
|
|
|
2533
2538
|
if (parent.children.length > 1) {
|
|
2534
2539
|
return node.view;
|
|
2535
2540
|
}
|
|
2541
|
+
const sibling = parent.children[0];
|
|
2536
2542
|
if (pathToParent.length === 0) {
|
|
2537
2543
|
// parent is root
|
|
2538
|
-
const sibling = parent.children[0];
|
|
2539
2544
|
if (sibling instanceof LeafNode) {
|
|
2540
2545
|
return node.view;
|
|
2541
2546
|
}
|
|
@@ -2546,7 +2551,6 @@
|
|
|
2546
2551
|
}
|
|
2547
2552
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2548
2553
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2549
|
-
const sibling = parent.children[0];
|
|
2550
2554
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2551
2555
|
parent.removeChild(0, sizing);
|
|
2552
2556
|
const sizes = grandParent.children.map((size, i) => grandParent.getChildSize(i));
|
|
@@ -2593,31 +2597,6 @@
|
|
|
2593
2597
|
}
|
|
2594
2598
|
}
|
|
2595
2599
|
|
|
2596
|
-
/*! *****************************************************************************
|
|
2597
|
-
Copyright (c) Microsoft Corporation.
|
|
2598
|
-
|
|
2599
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2600
|
-
purpose with or without fee is hereby granted.
|
|
2601
|
-
|
|
2602
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2603
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2604
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2605
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2606
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2607
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2608
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2609
|
-
***************************************************************************** */
|
|
2610
|
-
|
|
2611
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2612
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2613
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2614
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2615
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2616
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2617
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2618
|
-
});
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
2600
|
class ContentContainer extends CompositeDisposable {
|
|
2622
2601
|
constructor() {
|
|
2623
2602
|
super();
|
|
@@ -2629,6 +2608,7 @@
|
|
|
2629
2608
|
this._element = document.createElement('div');
|
|
2630
2609
|
this._element.className = 'content-container';
|
|
2631
2610
|
this._element.tabIndex = -1;
|
|
2611
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2632
2612
|
// for hosted containers
|
|
2633
2613
|
// 1) register a drop target on the host
|
|
2634
2614
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2695,6 +2675,41 @@
|
|
|
2695
2675
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2696
2676
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2697
2677
|
|
|
2678
|
+
class DragHandler extends CompositeDisposable {
|
|
2679
|
+
constructor(el) {
|
|
2680
|
+
super();
|
|
2681
|
+
this.el = el;
|
|
2682
|
+
this.disposable = new MutableDisposable();
|
|
2683
|
+
this._onDragStart = new Emitter();
|
|
2684
|
+
this.onDragStart = this._onDragStart.event;
|
|
2685
|
+
this.iframes = [];
|
|
2686
|
+
this.configure();
|
|
2687
|
+
}
|
|
2688
|
+
configure() {
|
|
2689
|
+
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2690
|
+
this.iframes = [
|
|
2691
|
+
...getElementsByTagName('iframe'),
|
|
2692
|
+
...getElementsByTagName('webview'),
|
|
2693
|
+
];
|
|
2694
|
+
for (const iframe of this.iframes) {
|
|
2695
|
+
iframe.style.pointerEvents = 'none';
|
|
2696
|
+
}
|
|
2697
|
+
this.el.classList.add('dragged');
|
|
2698
|
+
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2699
|
+
this.disposable.value = this.getData();
|
|
2700
|
+
if (event.dataTransfer) {
|
|
2701
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2702
|
+
}
|
|
2703
|
+
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
2704
|
+
for (const iframe of this.iframes) {
|
|
2705
|
+
iframe.style.pointerEvents = 'auto';
|
|
2706
|
+
}
|
|
2707
|
+
this.iframes = [];
|
|
2708
|
+
this.disposable.dispose();
|
|
2709
|
+
}));
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2698
2713
|
exports.MouseEventKind = void 0;
|
|
2699
2714
|
(function (MouseEventKind) {
|
|
2700
2715
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2704,42 +2719,34 @@
|
|
|
2704
2719
|
constructor(panelId, accessor, group) {
|
|
2705
2720
|
super();
|
|
2706
2721
|
this.panelId = panelId;
|
|
2707
|
-
this.accessor = accessor;
|
|
2708
2722
|
this.group = group;
|
|
2709
2723
|
this._onChanged = new Emitter();
|
|
2710
2724
|
this.onChanged = this._onChanged.event;
|
|
2711
2725
|
this._onDropped = new Emitter();
|
|
2712
2726
|
this.onDrop = this._onDropped.event;
|
|
2713
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2714
|
-
this.iframes = [];
|
|
2715
2727
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2716
2728
|
this._element = document.createElement('div');
|
|
2717
2729
|
this._element.className = 'tab';
|
|
2718
2730
|
this._element.tabIndex = 0;
|
|
2719
2731
|
this._element.draggable = true;
|
|
2720
|
-
this.addDisposables(
|
|
2721
|
-
|
|
2722
|
-
...
|
|
2723
|
-
|
|
2724
|
-
];
|
|
2725
|
-
for (const iframe of this.iframes) {
|
|
2726
|
-
iframe.style.pointerEvents = 'none';
|
|
2732
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2733
|
+
constructor() {
|
|
2734
|
+
super(...arguments);
|
|
2735
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2727
2736
|
}
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2737
|
+
getData() {
|
|
2738
|
+
this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
|
|
2739
|
+
return {
|
|
2740
|
+
dispose: () => {
|
|
2741
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2742
|
+
},
|
|
2743
|
+
};
|
|
2735
2744
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
iframe.style.pointerEvents = 'auto';
|
|
2745
|
+
dispose() {
|
|
2746
|
+
//
|
|
2739
2747
|
}
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2748
|
+
})(this._element));
|
|
2749
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2743
2750
|
if (event.defaultPrevented) {
|
|
2744
2751
|
return;
|
|
2745
2752
|
}
|
|
@@ -2941,12 +2948,10 @@
|
|
|
2941
2948
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2942
2949
|
return;
|
|
2943
2950
|
}
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
});
|
|
2949
|
-
break;
|
|
2951
|
+
if (event.kind === exports.MouseEventKind.CLICK) {
|
|
2952
|
+
this.group.model.openPanel(panel, {
|
|
2953
|
+
skipFocus: alreadyFocused,
|
|
2954
|
+
});
|
|
2950
2955
|
}
|
|
2951
2956
|
}), tabToAdd.onDrop((event) => {
|
|
2952
2957
|
this._onDrop.fire({
|
|
@@ -2975,7 +2980,6 @@
|
|
|
2975
2980
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2976
2981
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2977
2982
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2978
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2979
2983
|
})(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
|
|
2980
2984
|
class Groupview extends CompositeDisposable {
|
|
2981
2985
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2996,15 +3000,10 @@
|
|
|
2996
3000
|
this.onMove = this._onMove.event;
|
|
2997
3001
|
this._onDidGroupChange = new Emitter();
|
|
2998
3002
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2999
|
-
this.
|
|
3000
|
-
|
|
3001
|
-
return false;
|
|
3002
|
-
}
|
|
3003
|
-
this.doClose(panel);
|
|
3004
|
-
return true;
|
|
3005
|
-
});
|
|
3003
|
+
this._onDidDrop = new Emitter();
|
|
3004
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
3006
3005
|
this.container.classList.add('groupview');
|
|
3007
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
3006
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
3008
3007
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
3009
3008
|
tabHeight: options.tabHeight,
|
|
3010
3009
|
});
|
|
@@ -3161,6 +3160,8 @@
|
|
|
3161
3160
|
options.index > this.panels.length) {
|
|
3162
3161
|
options.index = this.panels.length;
|
|
3163
3162
|
}
|
|
3163
|
+
// ensure the group is updated before we fire any events
|
|
3164
|
+
panel.updateParentGroup(this.parent, true);
|
|
3164
3165
|
if (this._activePanel === panel) {
|
|
3165
3166
|
this.accessor.doSetGroupActive(this.parent);
|
|
3166
3167
|
return;
|
|
@@ -3181,43 +3182,19 @@
|
|
|
3181
3182
|
return this._removePanel(panelToRemove);
|
|
3182
3183
|
}
|
|
3183
3184
|
closeAllPanels() {
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
const
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
if (this._activePanel && index > -1) {
|
|
3190
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3191
|
-
console.warn('active panel not tracked');
|
|
3192
|
-
}
|
|
3193
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3194
|
-
if (!canClose) {
|
|
3195
|
-
return false;
|
|
3196
|
-
}
|
|
3197
|
-
}
|
|
3198
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3199
|
-
if (i === index) {
|
|
3200
|
-
continue;
|
|
3201
|
-
}
|
|
3202
|
-
const panel = this.panels[i];
|
|
3203
|
-
this.openPanel(panel);
|
|
3204
|
-
if (panel.close) {
|
|
3205
|
-
const canClose = yield panel.close();
|
|
3206
|
-
if (!canClose) {
|
|
3207
|
-
return false;
|
|
3208
|
-
}
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
if (this.panels.length > 0) {
|
|
3212
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3213
|
-
const arrPanelCpy = [...this.panels];
|
|
3214
|
-
yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
|
|
3185
|
+
if (this.panels.length > 0) {
|
|
3186
|
+
// take a copy since we will be edting the array as we iterate through
|
|
3187
|
+
const arrPanelCpy = [...this.panels];
|
|
3188
|
+
for (const panel of arrPanelCpy) {
|
|
3189
|
+
this.doClose(panel);
|
|
3215
3190
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3191
|
+
}
|
|
3192
|
+
else {
|
|
3193
|
+
this.accessor.removeGroup(this.parent);
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
closePanel(panel) {
|
|
3197
|
+
this.doClose(panel);
|
|
3221
3198
|
}
|
|
3222
3199
|
doClose(panel) {
|
|
3223
3200
|
this.accessor.removePanel(panel);
|
|
@@ -3360,8 +3337,11 @@
|
|
|
3360
3337
|
this.tabsContainer.show();
|
|
3361
3338
|
}
|
|
3362
3339
|
}
|
|
3363
|
-
canDisplayOverlay(
|
|
3340
|
+
canDisplayOverlay(event, target) {
|
|
3364
3341
|
// custom overlay handler
|
|
3342
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3343
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3344
|
+
}
|
|
3365
3345
|
return false;
|
|
3366
3346
|
}
|
|
3367
3347
|
handleDropEvent(event, position, index) {
|
|
@@ -3386,6 +3366,9 @@
|
|
|
3386
3366
|
index,
|
|
3387
3367
|
});
|
|
3388
3368
|
}
|
|
3369
|
+
else {
|
|
3370
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3371
|
+
}
|
|
3389
3372
|
}
|
|
3390
3373
|
dispose() {
|
|
3391
3374
|
for (const panel of this.panels) {
|
|
@@ -3438,10 +3421,15 @@
|
|
|
3438
3421
|
this.onGridEvent = this._onGridEvent.event;
|
|
3439
3422
|
this._onDidLayoutChange = new Emitter();
|
|
3440
3423
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3424
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3425
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3426
|
+
this._onDidAddGroup = new Emitter();
|
|
3427
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3428
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3429
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3441
3430
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3442
3431
|
this.element.appendChild(this.gridview.element);
|
|
3443
|
-
|
|
3444
|
-
this.layout(0, 0, true);
|
|
3432
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3445
3433
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3446
3434
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT });
|
|
3447
3435
|
}));
|
|
@@ -3507,6 +3495,7 @@
|
|
|
3507
3495
|
doAddGroup(group, location = [0], size) {
|
|
3508
3496
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
3509
3497
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.ADD_GROUP });
|
|
3498
|
+
this._onDidAddGroup.fire(group);
|
|
3510
3499
|
this.doSetGroupActive(group);
|
|
3511
3500
|
}
|
|
3512
3501
|
doRemoveGroup(group, options) {
|
|
@@ -3520,6 +3509,7 @@
|
|
|
3520
3509
|
this._groups.delete(group.id);
|
|
3521
3510
|
}
|
|
3522
3511
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.REMOVE_GROUP });
|
|
3512
|
+
this._onDidRemoveGroup.fire(group);
|
|
3523
3513
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3524
3514
|
const groups = Array.from(this._groups.values());
|
|
3525
3515
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3550,6 +3540,7 @@
|
|
|
3550
3540
|
this._onGridEvent.fire({
|
|
3551
3541
|
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3552
3542
|
});
|
|
3543
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3553
3544
|
}
|
|
3554
3545
|
removeGroup(group) {
|
|
3555
3546
|
this.doRemoveGroup(group);
|
|
@@ -3606,6 +3597,10 @@
|
|
|
3606
3597
|
dispose() {
|
|
3607
3598
|
super.dispose();
|
|
3608
3599
|
this._onGridEvent.dispose();
|
|
3600
|
+
this._onDidActiveGroupChange.dispose();
|
|
3601
|
+
this._onDidAddGroup.dispose();
|
|
3602
|
+
this._onDidRemoveGroup.dispose();
|
|
3603
|
+
this._onDidLayoutChange.dispose();
|
|
3609
3604
|
this.gridview.dispose();
|
|
3610
3605
|
}
|
|
3611
3606
|
}
|
|
@@ -3617,15 +3612,11 @@
|
|
|
3617
3612
|
constructor(id) {
|
|
3618
3613
|
super();
|
|
3619
3614
|
this.id = id;
|
|
3620
|
-
this._state = {};
|
|
3621
3615
|
this._isFocused = false;
|
|
3622
3616
|
this._isActive = false;
|
|
3623
3617
|
this._isVisible = true;
|
|
3624
3618
|
this._width = 0;
|
|
3625
3619
|
this._height = 0;
|
|
3626
|
-
this._onDidStateChange = new Emitter();
|
|
3627
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3628
|
-
//
|
|
3629
3620
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3630
3621
|
replay: true,
|
|
3631
3622
|
});
|
|
@@ -3654,7 +3645,7 @@
|
|
|
3654
3645
|
//
|
|
3655
3646
|
this._onActiveChange = new Emitter();
|
|
3656
3647
|
this.onActiveChange = this._onActiveChange.event;
|
|
3657
|
-
this.addDisposables(this.
|
|
3648
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3658
3649
|
this._isFocused = event.isFocused;
|
|
3659
3650
|
}), this.onDidActiveChange((event) => {
|
|
3660
3651
|
this._isActive = event.isActive;
|
|
@@ -3687,21 +3678,6 @@
|
|
|
3687
3678
|
setActive() {
|
|
3688
3679
|
this._onActiveChange.fire();
|
|
3689
3680
|
}
|
|
3690
|
-
setState(key, value) {
|
|
3691
|
-
if (typeof key === 'object') {
|
|
3692
|
-
this._state = key;
|
|
3693
|
-
}
|
|
3694
|
-
else if (typeof value !== undefined) {
|
|
3695
|
-
this._state[key] = value;
|
|
3696
|
-
}
|
|
3697
|
-
this._onDidStateChange.fire(undefined);
|
|
3698
|
-
}
|
|
3699
|
-
getState() {
|
|
3700
|
-
return this._state;
|
|
3701
|
-
}
|
|
3702
|
-
getStateKey(key) {
|
|
3703
|
-
return this._state[key];
|
|
3704
|
-
}
|
|
3705
3681
|
dispose() {
|
|
3706
3682
|
super.dispose();
|
|
3707
3683
|
}
|
|
@@ -3721,6 +3697,7 @@
|
|
|
3721
3697
|
//
|
|
3722
3698
|
this._onDidSizeChange = new Emitter();
|
|
3723
3699
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3700
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3724
3701
|
}
|
|
3725
3702
|
setConstraints(value) {
|
|
3726
3703
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3734,19 +3711,19 @@
|
|
|
3734
3711
|
constructor(panel, group) {
|
|
3735
3712
|
super(panel.id);
|
|
3736
3713
|
this.panel = panel;
|
|
3737
|
-
this._onDidDirtyChange = new Emitter();
|
|
3738
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3739
3714
|
this._onDidTitleChange = new Emitter();
|
|
3740
3715
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3741
3716
|
this._titleChanged = new Emitter();
|
|
3742
3717
|
this.titleChanged = this._titleChanged.event;
|
|
3743
3718
|
this._suppressClosableChanged = new Emitter();
|
|
3744
3719
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3745
|
-
this.
|
|
3746
|
-
this.
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3720
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3721
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3722
|
+
this._onDidGroupChange = new Emitter();
|
|
3723
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3724
|
+
this.disposable = new MutableDisposable();
|
|
3725
|
+
this.group = group;
|
|
3726
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3750
3727
|
}
|
|
3751
3728
|
get title() {
|
|
3752
3729
|
return this.panel.title;
|
|
@@ -3759,7 +3736,17 @@
|
|
|
3759
3736
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3760
3737
|
}
|
|
3761
3738
|
set group(value) {
|
|
3739
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3762
3740
|
this._group = value;
|
|
3741
|
+
this._onDidGroupChange.fire();
|
|
3742
|
+
if (this._group) {
|
|
3743
|
+
this.disposable.value = this._group.api.onDidActiveChange(() => {
|
|
3744
|
+
this._onDidActiveGroupChange.fire();
|
|
3745
|
+
});
|
|
3746
|
+
if (this.isGroupActive !== isOldGroupActive) {
|
|
3747
|
+
this._onDidActiveGroupChange.fire();
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3763
3750
|
}
|
|
3764
3751
|
get group() {
|
|
3765
3752
|
return this._group;
|
|
@@ -3773,16 +3760,10 @@
|
|
|
3773
3760
|
}
|
|
3774
3761
|
return this.group.model.closePanel(this.panel);
|
|
3775
3762
|
}
|
|
3776
|
-
interceptOnCloseAction(interceptor) {
|
|
3777
|
-
this._interceptor = interceptor;
|
|
3778
|
-
}
|
|
3779
|
-
dispose() {
|
|
3780
|
-
super.dispose();
|
|
3781
|
-
}
|
|
3782
3763
|
}
|
|
3783
3764
|
|
|
3784
3765
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3785
|
-
constructor(id, containerApi) {
|
|
3766
|
+
constructor(id, accessor, containerApi) {
|
|
3786
3767
|
super();
|
|
3787
3768
|
this.id = id;
|
|
3788
3769
|
this.containerApi = containerApi;
|
|
@@ -3790,9 +3771,8 @@
|
|
|
3790
3771
|
this._suppressClosable = false;
|
|
3791
3772
|
this._title = '';
|
|
3792
3773
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3793
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3794
3774
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3795
|
-
|
|
3775
|
+
accessor.setActivePanel(this);
|
|
3796
3776
|
}), this.api.onDidTitleChange((event) => {
|
|
3797
3777
|
const title = event.title;
|
|
3798
3778
|
this.update({ params: { title } });
|
|
@@ -3816,32 +3796,18 @@
|
|
|
3816
3796
|
this._view = params.view;
|
|
3817
3797
|
this.setTitle(params.title);
|
|
3818
3798
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3819
|
-
if (params.state) {
|
|
3820
|
-
this.api.setState(params.state);
|
|
3821
|
-
}
|
|
3822
3799
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3823
3800
|
}
|
|
3824
3801
|
focus() {
|
|
3825
3802
|
this.api._onFocusEvent.fire();
|
|
3826
3803
|
}
|
|
3827
|
-
setDirty(isDirty) {
|
|
3828
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3829
|
-
}
|
|
3830
|
-
close() {
|
|
3831
|
-
if (this.api.tryClose) {
|
|
3832
|
-
return this.api.tryClose();
|
|
3833
|
-
}
|
|
3834
|
-
return Promise.resolve(true);
|
|
3835
|
-
}
|
|
3836
3804
|
toJSON() {
|
|
3837
|
-
const state = this.api.getState();
|
|
3838
3805
|
return {
|
|
3839
3806
|
id: this.id,
|
|
3840
3807
|
view: this.view.toJSON(),
|
|
3841
3808
|
params: Object.keys(this._params || {}).length > 0
|
|
3842
3809
|
? this._params
|
|
3843
3810
|
: undefined,
|
|
3844
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3845
3811
|
suppressClosable: this.suppressClosable || undefined,
|
|
3846
3812
|
title: this.title,
|
|
3847
3813
|
};
|
|
@@ -3886,18 +3852,6 @@
|
|
|
3886
3852
|
var _a;
|
|
3887
3853
|
this._group = group;
|
|
3888
3854
|
this.api.group = group;
|
|
3889
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3890
|
-
var _a;
|
|
3891
|
-
if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
|
|
3892
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3893
|
-
this.api._onDidActiveChange.fire({
|
|
3894
|
-
isActive: isGroupActive && isVisible,
|
|
3895
|
-
});
|
|
3896
|
-
this.api._onDidVisibilityChange.fire({
|
|
3897
|
-
isVisible,
|
|
3898
|
-
});
|
|
3899
|
-
}
|
|
3900
|
-
});
|
|
3901
3855
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3902
3856
|
this.api._onDidActiveChange.fire({
|
|
3903
3857
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -4007,15 +3961,6 @@
|
|
|
4007
3961
|
}
|
|
4008
3962
|
}
|
|
4009
3963
|
|
|
4010
|
-
function debounce(cb, wait) {
|
|
4011
|
-
let timeout;
|
|
4012
|
-
const callable = (...args) => {
|
|
4013
|
-
clearTimeout(timeout);
|
|
4014
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
4015
|
-
};
|
|
4016
|
-
return callable;
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
3964
|
class DefaultDeserializer {
|
|
4020
3965
|
constructor(layout, panelDeserializer) {
|
|
4021
3966
|
this.layout = layout;
|
|
@@ -4116,9 +4061,6 @@
|
|
|
4116
4061
|
this._isGroupActive = false;
|
|
4117
4062
|
//
|
|
4118
4063
|
this.params = {};
|
|
4119
|
-
//
|
|
4120
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4121
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4122
4064
|
this._element = document.createElement('div');
|
|
4123
4065
|
this._element.className = 'default-tab';
|
|
4124
4066
|
//
|
|
@@ -4163,10 +4105,6 @@
|
|
|
4163
4105
|
init(params) {
|
|
4164
4106
|
this.params = params;
|
|
4165
4107
|
this._content.textContent = params.title;
|
|
4166
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4167
|
-
const isDirty = event;
|
|
4168
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4169
|
-
});
|
|
4170
4108
|
if (!this.params.suppressClosable) {
|
|
4171
4109
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4172
4110
|
ev.preventDefault(); //
|
|
@@ -4220,6 +4158,10 @@
|
|
|
4220
4158
|
get height() {
|
|
4221
4159
|
return this._height;
|
|
4222
4160
|
}
|
|
4161
|
+
get params() {
|
|
4162
|
+
var _a;
|
|
4163
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4164
|
+
}
|
|
4223
4165
|
focus() {
|
|
4224
4166
|
this.api._onFocusEvent.fire();
|
|
4225
4167
|
}
|
|
@@ -4228,29 +4170,27 @@
|
|
|
4228
4170
|
this._height = height;
|
|
4229
4171
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4230
4172
|
if (this.part) {
|
|
4231
|
-
if (this.
|
|
4232
|
-
this.part.update(this.
|
|
4173
|
+
if (this._params) {
|
|
4174
|
+
this.part.update(this._params.params);
|
|
4233
4175
|
}
|
|
4234
4176
|
}
|
|
4235
4177
|
}
|
|
4236
4178
|
init(parameters) {
|
|
4237
|
-
this.
|
|
4179
|
+
this._params = parameters;
|
|
4238
4180
|
this.part = this.getComponent();
|
|
4239
4181
|
}
|
|
4240
4182
|
update(event) {
|
|
4241
4183
|
var _a, _b;
|
|
4242
|
-
this.
|
|
4243
|
-
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.
|
|
4184
|
+
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) });
|
|
4185
|
+
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
|
|
4244
4186
|
}
|
|
4245
4187
|
toJSON() {
|
|
4246
4188
|
var _a, _b;
|
|
4247
|
-
const
|
|
4248
|
-
const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4189
|
+
const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4249
4190
|
return {
|
|
4250
4191
|
id: this.id,
|
|
4251
4192
|
component: this.component,
|
|
4252
4193
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4253
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4254
4194
|
};
|
|
4255
4195
|
}
|
|
4256
4196
|
dispose() {
|
|
@@ -4273,12 +4213,12 @@
|
|
|
4273
4213
|
this._snap = false;
|
|
4274
4214
|
this._onDidChange = new Emitter();
|
|
4275
4215
|
this.onDidChange = this._onDidChange.event;
|
|
4276
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4216
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4277
4217
|
const { isVisible } = event;
|
|
4278
|
-
const { containerApi } = this.
|
|
4218
|
+
const { containerApi } = this._params;
|
|
4279
4219
|
containerApi.setVisible(this, isVisible);
|
|
4280
4220
|
}), this.api.onActiveChange(() => {
|
|
4281
|
-
const { containerApi } = this.
|
|
4221
|
+
const { containerApi } = this._params;
|
|
4282
4222
|
containerApi.setActive(this);
|
|
4283
4223
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4284
4224
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4393,9 +4333,6 @@
|
|
|
4393
4333
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4394
4334
|
return Object.assign(Object.assign({}, state), { minimumHeight: minimum(this.minimumHeight), maximumHeight: maximum(this.maximumHeight), minimumWidth: minimum(this.minimumWidth), maximumWidth: maximum(this.maximumWidth), snap: this.snap, priority: this.priority });
|
|
4395
4335
|
}
|
|
4396
|
-
dispose() {
|
|
4397
|
-
super.dispose();
|
|
4398
|
-
}
|
|
4399
4336
|
}
|
|
4400
4337
|
|
|
4401
4338
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4502,15 +4439,22 @@
|
|
|
4502
4439
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4503
4440
|
styles: options.styles,
|
|
4504
4441
|
});
|
|
4505
|
-
this._panels = new Map();
|
|
4506
|
-
this.dirtyPanels = new Set();
|
|
4507
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4508
4442
|
// events
|
|
4509
4443
|
this._onTabInteractionEvent = new Emitter();
|
|
4510
4444
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4511
4445
|
this._onTabContextMenu = new Emitter();
|
|
4512
4446
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4513
|
-
this.
|
|
4447
|
+
this._onDidDrop = new Emitter();
|
|
4448
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
4449
|
+
this._onDidRemovePanel = new Emitter();
|
|
4450
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4451
|
+
this._onDidAddPanel = new Emitter();
|
|
4452
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4453
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4454
|
+
this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
|
|
4455
|
+
this._onDidActivePanelChange = new Emitter();
|
|
4456
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4457
|
+
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop);
|
|
4514
4458
|
this._options = options;
|
|
4515
4459
|
if (!this.options.components) {
|
|
4516
4460
|
this.options.components = {};
|
|
@@ -4531,10 +4475,10 @@
|
|
|
4531
4475
|
this._api = new DockviewApi(this);
|
|
4532
4476
|
}
|
|
4533
4477
|
get totalPanels() {
|
|
4534
|
-
return this.
|
|
4478
|
+
return this.panels.length;
|
|
4535
4479
|
}
|
|
4536
4480
|
get panels() {
|
|
4537
|
-
return
|
|
4481
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4538
4482
|
}
|
|
4539
4483
|
get deserializer() {
|
|
4540
4484
|
return this._deserializer;
|
|
@@ -4564,10 +4508,6 @@
|
|
|
4564
4508
|
updateOptions(options) {
|
|
4565
4509
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4566
4510
|
this.options.orientation !== options.orientation;
|
|
4567
|
-
// TODO support style update
|
|
4568
|
-
// const hasStylesChanged =
|
|
4569
|
-
// typeof options.styles === 'object' &&
|
|
4570
|
-
// this.options.styles !== options.styles;
|
|
4571
4511
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4572
4512
|
if (hasOrientationChanged) {
|
|
4573
4513
|
this.gridview.orientation = options.orientation;
|
|
@@ -4579,8 +4519,7 @@
|
|
|
4579
4519
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4580
4520
|
}
|
|
4581
4521
|
getGroupPanel(id) {
|
|
4582
|
-
|
|
4583
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4522
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4584
4523
|
}
|
|
4585
4524
|
setActivePanel(panel) {
|
|
4586
4525
|
if (!panel.group) {
|
|
@@ -4629,24 +4568,6 @@
|
|
|
4629
4568
|
this.doSetGroupActive(next);
|
|
4630
4569
|
}
|
|
4631
4570
|
}
|
|
4632
|
-
registerPanel(panel) {
|
|
4633
|
-
if (this._panels.has(panel.id)) {
|
|
4634
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4635
|
-
}
|
|
4636
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4637
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4638
|
-
}
|
|
4639
|
-
unregisterPanel(panel) {
|
|
4640
|
-
if (!this._panels.has(panel.id)) {
|
|
4641
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4642
|
-
}
|
|
4643
|
-
const item = this._panels.get(panel.id);
|
|
4644
|
-
if (item) {
|
|
4645
|
-
item.disposable.dispose();
|
|
4646
|
-
item.value.dispose();
|
|
4647
|
-
}
|
|
4648
|
-
this._panels.delete(panel.id);
|
|
4649
|
-
}
|
|
4650
4571
|
/**
|
|
4651
4572
|
* Serialize the current state of the layout
|
|
4652
4573
|
*
|
|
@@ -4654,12 +4575,9 @@
|
|
|
4654
4575
|
*/
|
|
4655
4576
|
toJSON() {
|
|
4656
4577
|
var _a;
|
|
4657
|
-
this.syncConfigs();
|
|
4658
4578
|
const data = this.gridview.serialize();
|
|
4659
|
-
const panels =
|
|
4660
|
-
|
|
4661
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4662
|
-
}
|
|
4579
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4580
|
+
collection[panel.id] = panel.toJSON();
|
|
4663
4581
|
return collection;
|
|
4664
4582
|
}, {});
|
|
4665
4583
|
return {
|
|
@@ -4671,11 +4589,9 @@
|
|
|
4671
4589
|
}
|
|
4672
4590
|
fromJSON(data) {
|
|
4673
4591
|
this.gridview.clear();
|
|
4674
|
-
this.
|
|
4675
|
-
panel.
|
|
4676
|
-
panel.value.dispose();
|
|
4592
|
+
this.panels.forEach((panel) => {
|
|
4593
|
+
panel.dispose();
|
|
4677
4594
|
});
|
|
4678
|
-
this._panels.clear();
|
|
4679
4595
|
this._groups.clear();
|
|
4680
4596
|
if (!this.deserializer) {
|
|
4681
4597
|
throw new Error('invalid deserializer');
|
|
@@ -4690,9 +4606,7 @@
|
|
|
4690
4606
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4691
4607
|
createPanel: (id) => {
|
|
4692
4608
|
const panelData = panels[id];
|
|
4693
|
-
|
|
4694
|
-
this.registerPanel(panel);
|
|
4695
|
-
return panel;
|
|
4609
|
+
return this.deserializer.fromJSON(panelData);
|
|
4696
4610
|
},
|
|
4697
4611
|
}));
|
|
4698
4612
|
if (typeof activeGroup === 'string') {
|
|
@@ -4703,30 +4617,23 @@
|
|
|
4703
4617
|
}
|
|
4704
4618
|
this.gridview.layout(this.width, this.height);
|
|
4705
4619
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4620
|
+
this._onDidLayoutfromJSON.fire();
|
|
4706
4621
|
}
|
|
4707
4622
|
closeAllGroups() {
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
if (!didCloseAll) {
|
|
4713
|
-
return false;
|
|
4714
|
-
}
|
|
4715
|
-
}
|
|
4716
|
-
return true;
|
|
4717
|
-
});
|
|
4623
|
+
for (const entry of this._groups.entries()) {
|
|
4624
|
+
const [_, group] = entry;
|
|
4625
|
+
group.value.model.closeAllPanels();
|
|
4626
|
+
}
|
|
4718
4627
|
}
|
|
4719
4628
|
fireMouseEvent(event) {
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
}
|
|
4729
|
-
break;
|
|
4629
|
+
if (event.kind === exports.MouseEventKind.CONTEXT_MENU) {
|
|
4630
|
+
if (event.tab && event.panel) {
|
|
4631
|
+
this._onTabContextMenu.fire({
|
|
4632
|
+
event: event.event,
|
|
4633
|
+
api: this._api,
|
|
4634
|
+
panel: event.panel,
|
|
4635
|
+
});
|
|
4636
|
+
}
|
|
4730
4637
|
}
|
|
4731
4638
|
}
|
|
4732
4639
|
addPanel(options) {
|
|
@@ -4760,7 +4667,6 @@
|
|
|
4760
4667
|
return panel;
|
|
4761
4668
|
}
|
|
4762
4669
|
removePanel(panel) {
|
|
4763
|
-
this.unregisterPanel(panel);
|
|
4764
4670
|
const group = panel.group;
|
|
4765
4671
|
if (!group) {
|
|
4766
4672
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
@@ -4779,10 +4685,9 @@
|
|
|
4779
4685
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4780
4686
|
}
|
|
4781
4687
|
addEmptyGroup(options) {
|
|
4782
|
-
var _a;
|
|
4783
4688
|
const group = this.createGroup();
|
|
4784
4689
|
if (options) {
|
|
4785
|
-
const referencePanel =
|
|
4690
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4786
4691
|
if (!referencePanel) {
|
|
4787
4692
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4788
4693
|
}
|
|
@@ -4811,13 +4716,13 @@
|
|
|
4811
4716
|
super.removeGroup(group);
|
|
4812
4717
|
}
|
|
4813
4718
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4814
|
-
var _a
|
|
4719
|
+
var _a;
|
|
4815
4720
|
const sourceGroup = groupId
|
|
4816
4721
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4817
4722
|
: undefined;
|
|
4818
4723
|
if (!target || target === exports.Position.Center) {
|
|
4819
4724
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4820
|
-
|
|
4725
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4821
4726
|
if (!groupItem) {
|
|
4822
4727
|
throw new Error(`No panel with id ${itemId}`);
|
|
4823
4728
|
}
|
|
@@ -4853,7 +4758,7 @@
|
|
|
4853
4758
|
}
|
|
4854
4759
|
else {
|
|
4855
4760
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4856
|
-
|
|
4761
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4857
4762
|
if (!groupItem) {
|
|
4858
4763
|
throw new Error(`No panel with id ${itemId}`);
|
|
4859
4764
|
}
|
|
@@ -4863,7 +4768,7 @@
|
|
|
4863
4768
|
}
|
|
4864
4769
|
}
|
|
4865
4770
|
doSetGroupActive(group, skipFocus) {
|
|
4866
|
-
var _a, _b;
|
|
4771
|
+
var _a, _b, _c;
|
|
4867
4772
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4868
4773
|
super.doSetGroupActive(group, skipFocus);
|
|
4869
4774
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
@@ -4871,6 +4776,7 @@
|
|
|
4871
4776
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4872
4777
|
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4873
4778
|
});
|
|
4779
|
+
this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
|
|
4874
4780
|
}
|
|
4875
4781
|
}
|
|
4876
4782
|
createGroup(options) {
|
|
@@ -4896,6 +4802,8 @@
|
|
|
4896
4802
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4897
4803
|
const { groupId, itemId, target, index } = event;
|
|
4898
4804
|
this.moveGroupOrPanel(view, groupId, itemId, target, index);
|
|
4805
|
+
}), view.model.onDidDrop((event) => {
|
|
4806
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
|
|
4899
4807
|
}), view.model.onDidGroupChange((event) => {
|
|
4900
4808
|
switch (event.kind) {
|
|
4901
4809
|
case exports.GroupChangeKind2.ADD_PANEL:
|
|
@@ -4903,24 +4811,25 @@
|
|
|
4903
4811
|
kind: exports.GroupChangeKind.ADD_PANEL,
|
|
4904
4812
|
panel: event.panel,
|
|
4905
4813
|
});
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
4910
|
-
panel: event.panel,
|
|
4911
|
-
});
|
|
4814
|
+
if (event.panel) {
|
|
4815
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4816
|
+
}
|
|
4912
4817
|
break;
|
|
4913
4818
|
case exports.GroupChangeKind2.REMOVE_PANEL:
|
|
4914
4819
|
this._onGridEvent.fire({
|
|
4915
4820
|
kind: exports.GroupChangeKind.REMOVE_PANEL,
|
|
4916
4821
|
panel: event.panel,
|
|
4917
4822
|
});
|
|
4823
|
+
if (event.panel) {
|
|
4824
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4825
|
+
}
|
|
4918
4826
|
break;
|
|
4919
4827
|
case exports.GroupChangeKind2.PANEL_ACTIVE:
|
|
4920
4828
|
this._onGridEvent.fire({
|
|
4921
4829
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4922
4830
|
panel: event.panel,
|
|
4923
4831
|
});
|
|
4832
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4924
4833
|
break;
|
|
4925
4834
|
}
|
|
4926
4835
|
}));
|
|
@@ -4934,44 +4843,18 @@
|
|
|
4934
4843
|
}
|
|
4935
4844
|
return view;
|
|
4936
4845
|
}
|
|
4937
|
-
dispose() {
|
|
4938
|
-
super.dispose();
|
|
4939
|
-
this._onGridEvent.dispose();
|
|
4940
|
-
}
|
|
4941
|
-
/**
|
|
4942
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4943
|
-
*/
|
|
4944
|
-
syncConfigs() {
|
|
4945
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4946
|
-
if (dirtyPanels.length === 0) ;
|
|
4947
|
-
this.dirtyPanels.clear();
|
|
4948
|
-
const partialPanelState = dirtyPanels
|
|
4949
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4950
|
-
.filter((_) => !!_)
|
|
4951
|
-
.reduce((collection, panel) => {
|
|
4952
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4953
|
-
return collection;
|
|
4954
|
-
}, {});
|
|
4955
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4956
|
-
dirtyPanels
|
|
4957
|
-
.filter((p) => this._panels.has(p.id))
|
|
4958
|
-
.forEach((panel) => {
|
|
4959
|
-
panel.setDirty(false);
|
|
4960
|
-
});
|
|
4961
|
-
}
|
|
4962
4846
|
_addPanel(options) {
|
|
4963
4847
|
const view = new DefaultGroupPanelView({
|
|
4964
4848
|
content: this.createContentComponent(options.id, options.component),
|
|
4965
4849
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4966
4850
|
});
|
|
4967
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4851
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4968
4852
|
panel.init({
|
|
4969
4853
|
view,
|
|
4970
4854
|
title: options.title || options.id,
|
|
4971
4855
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4972
4856
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4973
4857
|
});
|
|
4974
|
-
this.registerPanel(panel);
|
|
4975
4858
|
return panel;
|
|
4976
4859
|
}
|
|
4977
4860
|
createContentComponent(id, componentName) {
|
|
@@ -4991,10 +4874,12 @@
|
|
|
4991
4874
|
var _a;
|
|
4992
4875
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4993
4876
|
}
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
this.
|
|
4877
|
+
dispose() {
|
|
4878
|
+
super.dispose();
|
|
4879
|
+
this._onDidActivePanelChange.dispose();
|
|
4880
|
+
this._onDidAddPanel.dispose();
|
|
4881
|
+
this._onDidRemovePanel.dispose();
|
|
4882
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4998
4883
|
}
|
|
4999
4884
|
}
|
|
5000
4885
|
|
|
@@ -5005,6 +4890,8 @@
|
|
|
5005
4890
|
orientation: options.orientation,
|
|
5006
4891
|
styles: options.styles,
|
|
5007
4892
|
});
|
|
4893
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4894
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5008
4895
|
this._options = options;
|
|
5009
4896
|
if (!this.options.components) {
|
|
5010
4897
|
this.options.components = {};
|
|
@@ -5113,6 +5000,7 @@
|
|
|
5113
5000
|
}
|
|
5114
5001
|
}
|
|
5115
5002
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
5003
|
+
this._onDidLayoutfromJSON.fire();
|
|
5116
5004
|
}
|
|
5117
5005
|
movePanel(panel, options) {
|
|
5118
5006
|
var _a;
|
|
@@ -5227,6 +5115,7 @@
|
|
|
5227
5115
|
}
|
|
5228
5116
|
dispose() {
|
|
5229
5117
|
super.dispose();
|
|
5118
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5230
5119
|
}
|
|
5231
5120
|
}
|
|
5232
5121
|
|
|
@@ -5253,7 +5142,7 @@
|
|
|
5253
5142
|
options.frameworkComponents = {};
|
|
5254
5143
|
}
|
|
5255
5144
|
this.splitview = new Splitview(this.element, options);
|
|
5256
|
-
this.addDisposables(this._disposable);
|
|
5145
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5257
5146
|
}
|
|
5258
5147
|
get options() {
|
|
5259
5148
|
return this._options;
|
|
@@ -5475,41 +5364,6 @@
|
|
|
5475
5364
|
}
|
|
5476
5365
|
}
|
|
5477
5366
|
|
|
5478
|
-
class DragHandler extends CompositeDisposable {
|
|
5479
|
-
constructor(el) {
|
|
5480
|
-
super();
|
|
5481
|
-
this.el = el;
|
|
5482
|
-
this.iframes = [];
|
|
5483
|
-
this._onDragStart = new Emitter();
|
|
5484
|
-
this.onDragStart = this._onDragStart.event;
|
|
5485
|
-
this.configure();
|
|
5486
|
-
}
|
|
5487
|
-
configure() {
|
|
5488
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5489
|
-
var _a;
|
|
5490
|
-
this.iframes = [
|
|
5491
|
-
...getElementsByTagName('iframe'),
|
|
5492
|
-
...getElementsByTagName('webview'),
|
|
5493
|
-
];
|
|
5494
|
-
for (const iframe of this.iframes) {
|
|
5495
|
-
iframe.style.pointerEvents = 'none';
|
|
5496
|
-
}
|
|
5497
|
-
this.el.classList.add('dragged');
|
|
5498
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5499
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5500
|
-
this.disposable = this.getData();
|
|
5501
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5502
|
-
var _a;
|
|
5503
|
-
for (const iframe of this.iframes) {
|
|
5504
|
-
iframe.style.pointerEvents = 'auto';
|
|
5505
|
-
}
|
|
5506
|
-
this.iframes = [];
|
|
5507
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5508
|
-
this.disposable = undefined;
|
|
5509
|
-
}));
|
|
5510
|
-
}
|
|
5511
|
-
}
|
|
5512
|
-
|
|
5513
5367
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5514
5368
|
//
|
|
5515
5369
|
constructor(id) {
|
|
@@ -5524,6 +5378,7 @@
|
|
|
5524
5378
|
//
|
|
5525
5379
|
this._onDidSizeChange = new Emitter();
|
|
5526
5380
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5381
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5527
5382
|
}
|
|
5528
5383
|
setConstraints(value) {
|
|
5529
5384
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5531,11 +5386,6 @@
|
|
|
5531
5386
|
setSize(event) {
|
|
5532
5387
|
this._onDidSizeChange.fire(event);
|
|
5533
5388
|
}
|
|
5534
|
-
dispose() {
|
|
5535
|
-
super.dispose();
|
|
5536
|
-
this._onDidConstraintsChange.dispose();
|
|
5537
|
-
this._onDidSizeChange.dispose();
|
|
5538
|
-
}
|
|
5539
5389
|
}
|
|
5540
5390
|
|
|
5541
5391
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5549,6 +5399,7 @@
|
|
|
5549
5399
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5550
5400
|
this._onMouseLeave = new Emitter({});
|
|
5551
5401
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5402
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5552
5403
|
}
|
|
5553
5404
|
set pane(pane) {
|
|
5554
5405
|
this._pane = pane;
|
|
@@ -5717,7 +5568,7 @@
|
|
|
5717
5568
|
}
|
|
5718
5569
|
}
|
|
5719
5570
|
toJSON() {
|
|
5720
|
-
const params = this.
|
|
5571
|
+
const params = this._params;
|
|
5721
5572
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5722
5573
|
}
|
|
5723
5574
|
renderOnce() {
|
|
@@ -5786,36 +5637,39 @@
|
|
|
5786
5637
|
},
|
|
5787
5638
|
});
|
|
5788
5639
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5789
|
-
|
|
5790
|
-
if (!data) {
|
|
5791
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5792
|
-
return;
|
|
5793
|
-
}
|
|
5794
|
-
const containerApi = this.params
|
|
5795
|
-
.containerApi;
|
|
5796
|
-
const panelId = data.paneId;
|
|
5797
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5798
|
-
if (!existingPanel) {
|
|
5799
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5800
|
-
return;
|
|
5801
|
-
}
|
|
5802
|
-
const allPanels = containerApi.getPanels();
|
|
5803
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5804
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5805
|
-
if (event.position === exports.Position.Left ||
|
|
5806
|
-
event.position === exports.Position.Top) {
|
|
5807
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5808
|
-
}
|
|
5809
|
-
if (event.position === exports.Position.Right ||
|
|
5810
|
-
event.position === exports.Position.Bottom) {
|
|
5811
|
-
if (fromIndex > toIndex) {
|
|
5812
|
-
toIndex++;
|
|
5813
|
-
}
|
|
5814
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5815
|
-
}
|
|
5816
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5640
|
+
this.onDrop(event);
|
|
5817
5641
|
}));
|
|
5818
5642
|
}
|
|
5643
|
+
onDrop(event) {
|
|
5644
|
+
const data = getPaneData();
|
|
5645
|
+
if (!data) {
|
|
5646
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5647
|
+
return;
|
|
5648
|
+
}
|
|
5649
|
+
const containerApi = this._params
|
|
5650
|
+
.containerApi;
|
|
5651
|
+
const panelId = data.paneId;
|
|
5652
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
5653
|
+
if (!existingPanel) {
|
|
5654
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5655
|
+
return;
|
|
5656
|
+
}
|
|
5657
|
+
const allPanels = containerApi.getPanels();
|
|
5658
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5659
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5660
|
+
if (event.position === exports.Position.Left ||
|
|
5661
|
+
event.position === exports.Position.Top) {
|
|
5662
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
5663
|
+
}
|
|
5664
|
+
if (event.position === exports.Position.Right ||
|
|
5665
|
+
event.position === exports.Position.Bottom) {
|
|
5666
|
+
if (fromIndex > toIndex) {
|
|
5667
|
+
toIndex++;
|
|
5668
|
+
}
|
|
5669
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5670
|
+
}
|
|
5671
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
5672
|
+
}
|
|
5819
5673
|
}
|
|
5820
5674
|
|
|
5821
5675
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5879,6 +5733,7 @@
|
|
|
5879
5733
|
this.onDidAddView = this._onDidAddView.event;
|
|
5880
5734
|
this._onDidRemoveView = new Emitter();
|
|
5881
5735
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5736
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5882
5737
|
this._options = options;
|
|
5883
5738
|
if (!options.components) {
|
|
5884
5739
|
options.components = {};
|
|
@@ -6106,12 +5961,14 @@
|
|
|
6106
5961
|
this._snap = false;
|
|
6107
5962
|
this._onDidChange = new Emitter();
|
|
6108
5963
|
this.onDidChange = this._onDidChange.event;
|
|
6109
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5964
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6110
5965
|
const { isVisible } = event;
|
|
6111
|
-
const { containerApi } = this
|
|
5966
|
+
const { containerApi } = this
|
|
5967
|
+
._params;
|
|
6112
5968
|
containerApi.setVisible(this, isVisible);
|
|
6113
5969
|
}), this.api.onActiveChange(() => {
|
|
6114
|
-
const { containerApi } = this
|
|
5970
|
+
const { containerApi } = this
|
|
5971
|
+
._params;
|
|
6115
5972
|
containerApi.setActive(this);
|
|
6116
5973
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6117
5974
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6254,14 +6111,13 @@
|
|
|
6254
6111
|
if (this.disposed) {
|
|
6255
6112
|
throw new Error('invalid operation: resource is already disposed');
|
|
6256
6113
|
}
|
|
6257
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6258
6114
|
if (typeof this.component !== 'function') {
|
|
6259
6115
|
/**
|
|
6260
6116
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6261
6117
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6262
6118
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6263
6119
|
*/
|
|
6264
|
-
throw new Error('
|
|
6120
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6265
6121
|
}
|
|
6266
6122
|
const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
|
|
6267
6123
|
component: this
|
|
@@ -6325,16 +6181,14 @@
|
|
|
6325
6181
|
this._onDidBlur = new Emitter();
|
|
6326
6182
|
this.onDidBlur = this._onDidBlur.event;
|
|
6327
6183
|
this._element = document.createElement('div');
|
|
6328
|
-
this._element.
|
|
6329
|
-
this._element.style.width = '100%';
|
|
6184
|
+
this._element.className = 'dockview-react-part';
|
|
6330
6185
|
// this.hostedContainer = new HostedContainer({
|
|
6331
6186
|
// id,
|
|
6332
6187
|
// });
|
|
6333
6188
|
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6334
6189
|
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6335
6190
|
this._actionsElement = document.createElement('div');
|
|
6336
|
-
this._actionsElement.
|
|
6337
|
-
this._actionsElement.style.width = '100%';
|
|
6191
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6338
6192
|
}
|
|
6339
6193
|
get element() {
|
|
6340
6194
|
return this._element;
|
|
@@ -6382,6 +6236,8 @@
|
|
|
6382
6236
|
}
|
|
6383
6237
|
dispose() {
|
|
6384
6238
|
var _a, _b;
|
|
6239
|
+
this._onDidFocus.dispose();
|
|
6240
|
+
this._onDidBlur.dispose();
|
|
6385
6241
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6386
6242
|
// this.hostedContainer?.dispose();
|
|
6387
6243
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
@@ -6394,6 +6250,7 @@
|
|
|
6394
6250
|
this.component = component;
|
|
6395
6251
|
this.reactPortalStore = reactPortalStore;
|
|
6396
6252
|
this._element = document.createElement('div');
|
|
6253
|
+
this._element.className = 'dockview-react-part';
|
|
6397
6254
|
}
|
|
6398
6255
|
get element() {
|
|
6399
6256
|
return this._element;
|
|
@@ -6438,7 +6295,6 @@
|
|
|
6438
6295
|
const panelId = panelData.id;
|
|
6439
6296
|
const params = panelData.params;
|
|
6440
6297
|
const title = panelData.title;
|
|
6441
|
-
const state = panelData.state;
|
|
6442
6298
|
const suppressClosable = panelData.suppressClosable;
|
|
6443
6299
|
const viewData = panelData.view;
|
|
6444
6300
|
const view = new DefaultGroupPanelView({
|
|
@@ -6447,13 +6303,12 @@
|
|
|
6447
6303
|
? createComponent(viewData.tab.id, viewData.tab.id, this.layout.options.tabComponents, this.layout.options.frameworkTabComponents, (_c = this.layout.options.frameworkComponentFactory) === null || _c === void 0 ? void 0 : _c.tab)
|
|
6448
6304
|
: new DefaultTab(),
|
|
6449
6305
|
});
|
|
6450
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6306
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6451
6307
|
panel.init({
|
|
6452
6308
|
view,
|
|
6453
6309
|
title,
|
|
6454
6310
|
suppressClosable,
|
|
6455
6311
|
params: params || {},
|
|
6456
|
-
state: state || {},
|
|
6457
6312
|
});
|
|
6458
6313
|
return panel;
|
|
6459
6314
|
}
|
|
@@ -6468,8 +6323,7 @@
|
|
|
6468
6323
|
value: undefined,
|
|
6469
6324
|
};
|
|
6470
6325
|
this._element = document.createElement('div');
|
|
6471
|
-
this._element.
|
|
6472
|
-
this._element.style.width = '100%';
|
|
6326
|
+
this._element.className = 'dockview-react-part';
|
|
6473
6327
|
}
|
|
6474
6328
|
get element() {
|
|
6475
6329
|
return this._element;
|
|
@@ -6567,12 +6421,16 @@
|
|
|
6567
6421
|
frameworkTabComponents: props.tabComponents,
|
|
6568
6422
|
tabHeight: props.tabHeight,
|
|
6569
6423
|
debug: props.debug,
|
|
6570
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6571
6424
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6572
6425
|
styles: props.hideBorders
|
|
6573
6426
|
? { separatorBorder: 'transparent' }
|
|
6574
6427
|
: undefined,
|
|
6575
6428
|
});
|
|
6429
|
+
const disposable = dockview.onDidDrop((event) => {
|
|
6430
|
+
if (props.onDidDrop) {
|
|
6431
|
+
props.onDidDrop(event);
|
|
6432
|
+
}
|
|
6433
|
+
});
|
|
6576
6434
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6577
6435
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
6578
6436
|
const { clientWidth, clientHeight } = domRef.current;
|
|
@@ -6582,6 +6440,7 @@
|
|
|
6582
6440
|
}
|
|
6583
6441
|
dockviewRef.current = dockview;
|
|
6584
6442
|
return () => {
|
|
6443
|
+
disposable.dispose();
|
|
6585
6444
|
dockview.dispose();
|
|
6586
6445
|
};
|
|
6587
6446
|
}, []);
|
|
@@ -6593,6 +6452,14 @@
|
|
|
6593
6452
|
frameworkComponents: props.components,
|
|
6594
6453
|
});
|
|
6595
6454
|
}, [props.components]);
|
|
6455
|
+
React__namespace.useEffect(() => {
|
|
6456
|
+
if (!dockviewRef.current) {
|
|
6457
|
+
return;
|
|
6458
|
+
}
|
|
6459
|
+
dockviewRef.current.updateOptions({
|
|
6460
|
+
showDndOverlay: props.showDndOverlay,
|
|
6461
|
+
});
|
|
6462
|
+
}, [props.showDndOverlay]);
|
|
6596
6463
|
React__namespace.useEffect(() => {
|
|
6597
6464
|
if (!dockviewRef.current) {
|
|
6598
6465
|
return;
|
|
@@ -6681,9 +6548,9 @@
|
|
|
6681
6548
|
getComponent() {
|
|
6682
6549
|
var _a;
|
|
6683
6550
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6684
|
-
params: ((_a = this.
|
|
6551
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6685
6552
|
api: this.api,
|
|
6686
|
-
containerApi: this.
|
|
6553
|
+
containerApi: this._params
|
|
6687
6554
|
.containerApi,
|
|
6688
6555
|
});
|
|
6689
6556
|
}
|
|
@@ -6756,9 +6623,9 @@
|
|
|
6756
6623
|
getComponent() {
|
|
6757
6624
|
var _a;
|
|
6758
6625
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6759
|
-
params: ((_a = this.
|
|
6626
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6760
6627
|
api: this.api,
|
|
6761
|
-
containerApi: this.
|
|
6628
|
+
containerApi: this._params
|
|
6762
6629
|
.containerApi,
|
|
6763
6630
|
});
|
|
6764
6631
|
}
|
|
@@ -6949,7 +6816,6 @@
|
|
|
6949
6816
|
exports.BaseGrid = BaseGrid;
|
|
6950
6817
|
exports.CompositeDisposable = CompositeDisposable;
|
|
6951
6818
|
exports.ContentContainer = ContentContainer;
|
|
6952
|
-
exports.DATA_KEY = DATA_KEY;
|
|
6953
6819
|
exports.DockviewApi = DockviewApi;
|
|
6954
6820
|
exports.DockviewComponent = DockviewComponent;
|
|
6955
6821
|
exports.DockviewComponents = DockviewComponents;
|
|
@@ -6984,7 +6850,6 @@
|
|
|
6984
6850
|
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6985
6851
|
exports.addDisposableListener = addDisposableListener;
|
|
6986
6852
|
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6987
|
-
exports.extractData = extractData;
|
|
6988
6853
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6989
6854
|
exports.getGridLocation = getGridLocation;
|
|
6990
6855
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6992,11 +6857,8 @@
|
|
|
6992
6857
|
exports.getPanelData = getPanelData;
|
|
6993
6858
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6994
6859
|
exports.indexInParent = indexInParent;
|
|
6995
|
-
exports.isCustomDragEvent = isCustomDragEvent;
|
|
6996
6860
|
exports.isGridBranchNode = isGridBranchNode;
|
|
6997
|
-
exports.isPanelTransferEvent = isPanelTransferEvent;
|
|
6998
6861
|
exports.isReactElement = isReactElement;
|
|
6999
|
-
exports.isTabDragEvent = isTabDragEvent;
|
|
7000
6862
|
exports.orthogonal = orthogonal;
|
|
7001
6863
|
exports.toTarget = toTarget;
|
|
7002
6864
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|