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.amd.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
|
*/
|
|
@@ -54,7 +54,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
var css_248z = ".dockview-theme-dark {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-tab-dirty-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n pointer-events: none;\n box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left, .drop-target > .drop-target-dropzone > .drop-target-selection.right {\n width: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translate(100%, 0%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translate(0%, 100%);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top, .drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n height: 50%;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-top {\n border-top: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-bottom {\n border-bottom: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-left {\n border-left: 1px solid var(--dv-drag-over-border-color);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.small-right {\n border-right: 1px solid var(--dv-drag-over-border-color);\n}\n.custom-dragging {\n height: 24px;\n line-height: 24px;\n font-size: 11px;\n width: 100px;\n background-color: dodgerblue;\n color: ghostwhite;\n border-radius: 11px;\n position: absolute;\n padding-left: 10px;\n}\n\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);\n color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab .tab-action {\n background-color: var(--dv-inactivegroup-visiblepanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n.groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.inactive-tab .tab-action {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-color);\n}\n\n/**\n * when a tab is dragged we lose the above stylings because they are conditional on parent elements\n * therefore we also set some stylings for the dragging event\n **/\n.tab.dragging {\n background-color: var(--dv-activegroup-visiblepanel-tab-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.grid-view,\n.branch-node {\n height: 100%;\n width: 100%;\n}\n.groupview {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--dv-group-view-background-color);\n overflow: hidden;\n}\n.groupview:focus {\n outline: none;\n}\n.groupview.empty > .tabs-and-actions-container {\n display: none;\n}\n.groupview > .content-container {\n flex-grow: 1;\n overflow: hidden;\n outline: none;\n}\n.pane-container {\n height: 100%;\n width: 100%;\n}\n.pane-container.animated .view {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.pane-container .view {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n padding: 0px !important;\n}\n.pane-container .view:not(:first-child)::before {\n background-color: transparent !important;\n}\n.pane-container .view:not(:first-child) .pane > .pane-header {\n border-top: 1px solid var(--dv-paneview-header-border-color);\n}\n.pane-container .view .default-header {\n background-color: var(--dv-group-view-background-color);\n color: var(--dv-activegroup-visiblepanel-tab-color);\n display: flex;\n padding: 0px 8px;\n}\n.pane-container .view .default-header > span {\n flex-grow: 1;\n}\n.pane-container:first-of-type > .pane > .pane-header {\n border-top: none !important;\n}\n.pane-container .pane {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n}\n.pane-container .pane .pane-header {\n box-sizing: border-box;\n user-select: none;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-header.pane-draggable {\n cursor: pointer;\n}\n.pane-container .pane .pane-header:focus:before, .pane-container .pane .pane-header:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.pane-container .pane .pane-body {\n overflow-y: auto;\n overflow-x: hidden;\n flex-grow: 1;\n position: relative;\n outline: none;\n}\n.pane-container .pane .pane-body:focus:before, .pane-container .pane .pane-body:focus-within:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n content: \"\";\n pointer-events: none;\n outline: 1px solid;\n outline-width: -1px;\n outline-style: solid;\n outline-offset: -1px;\n outline-color: var(--dv-paneview-active-outline-color);\n}\n.tabs-and-actions-container {\n display: flex;\n background-color: var(--dv-tabs-and-actions-container-background-color);\n flex-shrink: 0;\n box-sizing: border-box;\n height: var(--dv-tabs-and-actions-container-height);\n font-size: var(--dv-tabs-and-actions-container-font-size);\n}\n.tabs-and-actions-container.hidden {\n display: none;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n}\n.tabs-and-actions-container .tabs-container {\n display: flex;\n overflow-x: overlay;\n overflow-y: hidden;\n scrollbar-width: thin;\n /* Track */\n /* Handle */\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar {\n height: 3px;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.tabs-and-actions-container .tabs-container::-webkit-scrollbar-thumb {\n background: var(--dv-tabs-container-scrollbar-color);\n}\n.tabs-and-actions-container .tabs-container .tab {\n -webkit-user-drag: element;\n outline: none;\n min-width: 75px;\n cursor: pointer;\n position: relative;\n box-sizing: border-box;\n}\n.tabs-and-actions-container .tabs-container .tab:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-tab-divider-color);\n width: 1px;\n height: 100%;\n}\n.split-view-container {\n position: relative;\n overflow: hidden;\n height: 100%;\n width: 100%;\n}\n.split-view-container.animation .view,\n.split-view-container.animation .sash {\n transition-duration: 0.15s;\n transition-timing-function: ease-out;\n}\n.split-view-container.horizontal {\n height: 100%;\n}\n.split-view-container.horizontal > .sash-container > .sash {\n height: 100%;\n width: 4px;\n}\n.split-view-container.horizontal > .sash-container > .sash.enabled {\n cursor: ew-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.horizontal > .sash-container > .sash.maximum {\n cursor: w-resize;\n}\n.split-view-container.horizontal > .sash-container > .sash.minimum {\n cursor: e-resize;\n}\n.split-view-container.horizontal > .view-container > .view:not(:first-child)::before {\n height: 100%;\n width: 1px;\n}\n.split-view-container.vertical {\n width: 100%;\n}\n.split-view-container.vertical > .sash-container > .sash {\n width: 100%;\n height: 4px;\n}\n.split-view-container.vertical > .sash-container > .sash.enabled {\n cursor: ns-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.disabled {\n cursor: default;\n}\n.split-view-container.vertical > .sash-container > .sash.maximum {\n cursor: n-resize;\n}\n.split-view-container.vertical > .sash-container > .sash.minimum {\n cursor: s-resize;\n}\n.split-view-container.vertical > .view-container > .view {\n width: 100%;\n}\n.split-view-container.vertical > .view-container > .view:not(:first-child)::before {\n height: 1px;\n width: 100%;\n}\n.split-view-container .sash-container {\n height: 100%;\n width: 100%;\n position: absolute;\n}\n.split-view-container .sash-container .sash {\n position: absolute;\n z-index: 99;\n outline: none;\n}\n.split-view-container .sash-container .sash:active {\n transition: background-color 0.1s ease-in-out;\n background-color: var(--dv-active-sash-color, transparent);\n}\n.split-view-container .sash-container .sash:hover {\n background-color: var(--dv-active-sash-color, transparent);\n transition: background-color 0.1s ease-in-out;\n transition-delay: 0.5s;\n}\n.split-view-container .view-container {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.split-view-container .view-container .view {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n position: absolute;\n}\n.split-view-container.separator-border .view:not(:first-child)::before {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n pointer-events: none;\n background-color: var(--dv-separator-border);\n}\n.dragged {\n transform: translate3d(0px, 0px, 0px);\n /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */\n}\n\n.tab {\n flex-shrink: 0;\n}\n.tab.dragging .tab-action {\n background-color: var(--dv-activegroup-visiblepanel-tab-color);\n}\n.tab.active-tab > .default-tab .tab-action {\n visibility: visible;\n}\n.tab.inactive-tab > .default-tab .tab-action:not(.dirty) {\n visibility: hidden;\n}\n.tab.inactive-tab > .default-tab:hover .tab-action {\n visibility: visible;\n}\n.tab .default-tab {\n position: relative;\n height: 100%;\n display: flex;\n min-width: 80px;\n align-items: center;\n padding-left: 10px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\n width: 28px;\n display: flex;\n}\n.tab .default-tab .action-container .tab-list {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.tab .default-tab .action-container .tab-list a:active:hover {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.tab .default-tab .action-container .tab-list .tab-action {\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n}\n.tab .default-tab .action-container .tab-list .tab-action.disable-close {\n display: none;\n}\n.tab .default-tab .action-container .tab-list .tab-action.dirty:not(:hover) {\n display: block;\n -webkit-mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n mask: var(--dv-tab-dirty-icon) 50% 50%/60% 60% no-repeat;\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}";
|
|
57
|
+
var css_248z = ".dockview-theme-dark {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n}\n\n.dockview-theme-light {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: white;\n --dv-tabs-and-actions-container-background-color: #f3f3f3;\n --dv-activegroup-visiblepanel-tab-background-color: white;\n --dv-activegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-inactivegroup-visiblepanel-tab-background-color: white;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #ececec;\n --dv-tab-divider-color: white;\n --dv-activegroup-visiblepanel-tab-color: rgb(51, 51, 51);\n --dv-activegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(51, 51, 51, 0.7);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(51, 51, 51, 0.35);\n --dv-separator-border: rgba(128, 128, 128, 0.35);\n --dv-paneview-header-border-color: rgb(51, 51, 51);\n}\n\n.dockview-theme-vs {\n --dv-paneview-active-outline-color: dodgerblue;\n --dv-tabs-and-actions-container-font-size: 13px;\n --dv-tabs-and-actions-container-height: 35px;\n --dv-tab-close-icon: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>');\n --dv-drag-over-background-color: rgba(83, 89, 93, 0.5);\n --dv-drag-over-border-color: white;\n --dv-tabs-container-scrollbar-color: #888;\n --dv-group-view-background-color: #1e1e1e;\n --dv-tabs-and-actions-container-background-color: #252526;\n --dv-activegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-activegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-inactivegroup-visiblepanel-tab-background-color: #1e1e1e;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #2d2d2d;\n --dv-tab-divider-color: #1e1e1e;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: #969696;\n --dv-inactivegroup-visiblepanel-tab-color: #8f8f8f;\n --dv-inactivegroup-hiddenpanel-tab-color: #626262;\n --dv-separator-border: rgb(68, 68, 68);\n --dv-paneview-header-border-color: rgba(204, 204, 204, 0.2);\n --dv-activegroup-visiblepanel-tab-background-color: dodgerblue;\n --dv-tabs-and-actions-container-height: 18px;\n --dv-tabs-and-actions-container-font-size: 11px;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.actions-bar {\n text-align: right;\n width: 28px;\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n.actions-bar .actions-container {\n display: flex;\n padding: 0px;\n margin: 0px;\n justify-content: flex-end;\n}\n.actions-bar .actions-container a:active {\n -webkit-mask-size: 100% 100% !important;\n mask-size: 100% 100% !important;\n}\n.actions-bar .actions-container .close-action {\n background-color: white;\n height: 16px;\n width: 16px;\n display: block;\n -webkit-mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n mask: var(--dv-tab-close-icon) 50% 50%/90% 90% no-repeat;\n margin-right: \"0.5em\";\n cursor: pointer;\n}\n.drop-target {\n position: relative;\n}\n.drop-target > .drop-target-dropzone {\n position: absolute;\n left: 0px;\n top: 0px;\n height: 100%;\n width: 100%;\n z-index: 10000;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection {\n position: relative;\n 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}";
|
|
58
58
|
styleInject(css_248z);
|
|
59
59
|
|
|
60
60
|
exports.Event = void 0;
|
|
@@ -87,7 +87,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
87
87
|
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) && this._last !== undefined) {
|
|
88
88
|
listener(this._last);
|
|
89
89
|
}
|
|
90
|
-
this._listeners.length === 0;
|
|
91
90
|
this._listeners.push(listener);
|
|
92
91
|
return {
|
|
93
92
|
dispose: () => {
|
|
@@ -103,9 +102,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
103
102
|
}
|
|
104
103
|
fire(e) {
|
|
105
104
|
this._last = e;
|
|
106
|
-
this._listeners
|
|
105
|
+
for (const listener of this._listeners) {
|
|
107
106
|
listener(e);
|
|
108
|
-
}
|
|
107
|
+
}
|
|
109
108
|
}
|
|
110
109
|
dispose() {
|
|
111
110
|
this._listeners = [];
|
|
@@ -163,7 +162,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
163
162
|
return new CompositeDisposable(...args);
|
|
164
163
|
}
|
|
165
164
|
addDisposables(...args) {
|
|
166
|
-
args
|
|
165
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
167
166
|
}
|
|
168
167
|
dispose() {
|
|
169
168
|
this.disposables.forEach((arg) => arg.dispose());
|
|
@@ -182,20 +181,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
182
181
|
dispose() {
|
|
183
182
|
if (this._disposable) {
|
|
184
183
|
this._disposable.dispose();
|
|
184
|
+
this._disposable = exports.Disposable.NONE;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
function tryParseJSON(text, reviver) {
|
|
190
|
-
try {
|
|
191
|
-
return JSON.parse(text, reviver);
|
|
192
|
-
}
|
|
193
|
-
catch (err) {
|
|
194
|
-
console.warn('failed to parse JSON');
|
|
195
|
-
return undefined;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
189
|
class TransferObject {
|
|
200
190
|
constructor() {
|
|
201
191
|
//
|
|
@@ -216,45 +206,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
216
206
|
this.paneId = paneId;
|
|
217
207
|
}
|
|
218
208
|
}
|
|
219
|
-
const DATA_KEY = 'splitview/transfer';
|
|
220
|
-
const isPanelTransferEvent = (event) => {
|
|
221
|
-
if (!event.dataTransfer) {
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
225
|
-
};
|
|
226
|
-
exports.DragType = void 0;
|
|
227
|
-
(function (DragType) {
|
|
228
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
229
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
230
|
-
})(exports.DragType || (exports.DragType = {}));
|
|
231
|
-
/**
|
|
232
|
-
* Determine whether this data belong to that of an event that was started by
|
|
233
|
-
* dragging a tab component
|
|
234
|
-
*/
|
|
235
|
-
const isTabDragEvent = (data) => {
|
|
236
|
-
return data.type === exports.DragType.DOCKVIEW_TAB;
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* Determine whether this data belong to that of an event that was started by
|
|
240
|
-
* a custom drag-enable component
|
|
241
|
-
*/
|
|
242
|
-
const isCustomDragEvent = (data) => {
|
|
243
|
-
return data.type === exports.DragType.EXTERNAL;
|
|
244
|
-
};
|
|
245
|
-
const extractData = (event) => {
|
|
246
|
-
if (!event.dataTransfer) {
|
|
247
|
-
return null;
|
|
248
|
-
}
|
|
249
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
250
|
-
if (!data) {
|
|
251
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
252
|
-
}
|
|
253
|
-
if (typeof data.type !== 'string') {
|
|
254
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
255
|
-
}
|
|
256
|
-
return data;
|
|
257
|
-
};
|
|
258
209
|
/**
|
|
259
210
|
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
260
211
|
*/
|
|
@@ -324,6 +275,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
324
275
|
get length() {
|
|
325
276
|
return this.component.length;
|
|
326
277
|
}
|
|
278
|
+
get orientation() {
|
|
279
|
+
return this.component.orientation;
|
|
280
|
+
}
|
|
327
281
|
get onDidLayoutChange() {
|
|
328
282
|
return this.component.onDidLayoutChange;
|
|
329
283
|
}
|
|
@@ -333,9 +287,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
333
287
|
get onDidRemoveView() {
|
|
334
288
|
return this.component.onDidRemoveView;
|
|
335
289
|
}
|
|
336
|
-
get orientation() {
|
|
337
|
-
return this.component.orientation;
|
|
338
|
-
}
|
|
339
290
|
updateOptions(options) {
|
|
340
291
|
this.component.updateOptions(options);
|
|
341
292
|
}
|
|
@@ -380,18 +331,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
380
331
|
constructor(component) {
|
|
381
332
|
this.component = component;
|
|
382
333
|
}
|
|
383
|
-
get width() {
|
|
384
|
-
return this.component.width;
|
|
385
|
-
}
|
|
386
|
-
get height() {
|
|
387
|
-
return this.component.height;
|
|
388
|
-
}
|
|
389
334
|
get minimumSize() {
|
|
390
335
|
return this.component.minimumSize;
|
|
391
336
|
}
|
|
392
337
|
get maximumSize() {
|
|
393
338
|
return this.component.maximumSize;
|
|
394
339
|
}
|
|
340
|
+
get height() {
|
|
341
|
+
return this.component.height;
|
|
342
|
+
}
|
|
343
|
+
get width() {
|
|
344
|
+
return this.component.width;
|
|
345
|
+
}
|
|
395
346
|
get onDidLayoutChange() {
|
|
396
347
|
return this.component.onDidLayoutChange;
|
|
397
348
|
}
|
|
@@ -447,12 +398,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
447
398
|
constructor(component) {
|
|
448
399
|
this.component = component;
|
|
449
400
|
}
|
|
450
|
-
get width() {
|
|
451
|
-
return this.component.width;
|
|
452
|
-
}
|
|
453
|
-
get height() {
|
|
454
|
-
return this.component.height;
|
|
455
|
-
}
|
|
456
401
|
get minimumHeight() {
|
|
457
402
|
return this.component.minimumHeight;
|
|
458
403
|
}
|
|
@@ -465,12 +410,30 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
465
410
|
get maximumWidth() {
|
|
466
411
|
return this.component.maximumWidth;
|
|
467
412
|
}
|
|
413
|
+
get width() {
|
|
414
|
+
return this.component.width;
|
|
415
|
+
}
|
|
416
|
+
get height() {
|
|
417
|
+
return this.component.height;
|
|
418
|
+
}
|
|
468
419
|
get onGridEvent() {
|
|
469
420
|
return this.component.onGridEvent;
|
|
470
421
|
}
|
|
471
422
|
get onDidLayoutChange() {
|
|
472
423
|
return this.component.onDidLayoutChange;
|
|
473
424
|
}
|
|
425
|
+
get onDidAddGroup() {
|
|
426
|
+
return this.component.onDidAddGroup;
|
|
427
|
+
}
|
|
428
|
+
get onDidRemoveGroup() {
|
|
429
|
+
return this.component.onDidRemoveGroup;
|
|
430
|
+
}
|
|
431
|
+
get onDidActiveGroupChange() {
|
|
432
|
+
return this.component.onDidActiveGroupChange;
|
|
433
|
+
}
|
|
434
|
+
get onDidLayoutFromJSON() {
|
|
435
|
+
return this.component.onDidLayoutFromJSON;
|
|
436
|
+
}
|
|
474
437
|
get panels() {
|
|
475
438
|
return this.component.groups;
|
|
476
439
|
}
|
|
@@ -548,6 +511,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
548
511
|
get onGridEvent() {
|
|
549
512
|
return this.component.onGridEvent;
|
|
550
513
|
}
|
|
514
|
+
get onDidActiveGroupChange() {
|
|
515
|
+
return this.component.onDidActiveGroupChange;
|
|
516
|
+
}
|
|
517
|
+
get onDidAddGroup() {
|
|
518
|
+
return this.component.onDidAddGroup;
|
|
519
|
+
}
|
|
520
|
+
get onDidRemoveGroup() {
|
|
521
|
+
return this.component.onDidRemoveGroup;
|
|
522
|
+
}
|
|
523
|
+
get onDidActivePanelChange() {
|
|
524
|
+
return this.component.onDidActivePanelChange;
|
|
525
|
+
}
|
|
526
|
+
get onDidAddPanel() {
|
|
527
|
+
return this.component.onDidAddPanel;
|
|
528
|
+
}
|
|
529
|
+
get onDidRemovePanel() {
|
|
530
|
+
return this.component.onDidRemovePanel;
|
|
531
|
+
}
|
|
532
|
+
get onDidLayoutfromJSON() {
|
|
533
|
+
return this.component.onDidLayoutfromJSON;
|
|
534
|
+
}
|
|
551
535
|
get onDidLayoutChange() {
|
|
552
536
|
return this.component.onDidLayoutChange;
|
|
553
537
|
}
|
|
@@ -575,18 +559,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
575
559
|
getPanel(id) {
|
|
576
560
|
return this.component.getGroupPanel(id);
|
|
577
561
|
}
|
|
578
|
-
setActivePanel(panel) {
|
|
579
|
-
this.component.setActivePanel(panel);
|
|
580
|
-
}
|
|
581
562
|
layout(width, height, force = false) {
|
|
582
563
|
this.component.layout(width, height, force);
|
|
583
564
|
}
|
|
584
565
|
addPanel(options) {
|
|
585
566
|
return this.component.addPanel(options);
|
|
586
567
|
}
|
|
587
|
-
removePanel(panel) {
|
|
588
|
-
this.component.removePanel(panel);
|
|
589
|
-
}
|
|
590
568
|
addEmptyGroup(options) {
|
|
591
569
|
this.component.addEmptyGroup(options);
|
|
592
570
|
}
|
|
@@ -1606,7 +1584,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1606
1584
|
this.paneItems.push(paneItem);
|
|
1607
1585
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1608
1586
|
});
|
|
1609
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1587
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1610
1588
|
this._onDidChange.fire(undefined);
|
|
1611
1589
|
}), this.splitview.onDidAddView(() => {
|
|
1612
1590
|
this._onDidChange.fire();
|
|
@@ -1767,7 +1745,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1767
1745
|
this.options = options;
|
|
1768
1746
|
this._onDrop = new Emitter();
|
|
1769
1747
|
this.onDrop = this._onDrop.event;
|
|
1770
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1748
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1771
1749
|
onDragEnter: (e) => undefined,
|
|
1772
1750
|
onDragOver: (e) => {
|
|
1773
1751
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
@@ -1803,51 +1781,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1803
1781
|
const y = e.offsetY;
|
|
1804
1782
|
const xp = (100 * x) / width;
|
|
1805
1783
|
const yp = (100 * y) / height;
|
|
1806
|
-
|
|
1807
|
-
let isLeft = false;
|
|
1808
|
-
let isTop = false;
|
|
1809
|
-
let isBottom = false;
|
|
1810
|
-
switch (this.options.validOverlays) {
|
|
1811
|
-
case 'all':
|
|
1812
|
-
isRight = xp > 80;
|
|
1813
|
-
isLeft = xp < 20;
|
|
1814
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1815
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1816
|
-
break;
|
|
1817
|
-
case 'vertical':
|
|
1818
|
-
isTop = yp < 50;
|
|
1819
|
-
isBottom = yp >= 50;
|
|
1820
|
-
break;
|
|
1821
|
-
case 'horizontal':
|
|
1822
|
-
isLeft = xp < 50;
|
|
1823
|
-
isRight = xp >= 50;
|
|
1824
|
-
break;
|
|
1825
|
-
}
|
|
1784
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1826
1785
|
const isSmallX = width < 100;
|
|
1827
1786
|
const isSmallY = height < 100;
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1831
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1832
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1833
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1834
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1835
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1836
|
-
if (isRight) {
|
|
1837
|
-
this._state = exports.Position.Right;
|
|
1838
|
-
}
|
|
1839
|
-
else if (isLeft) {
|
|
1840
|
-
this._state = exports.Position.Left;
|
|
1841
|
-
}
|
|
1842
|
-
else if (isTop) {
|
|
1843
|
-
this._state = exports.Position.Top;
|
|
1844
|
-
}
|
|
1845
|
-
else if (isBottom) {
|
|
1846
|
-
this._state = exports.Position.Bottom;
|
|
1847
|
-
}
|
|
1848
|
-
else {
|
|
1849
|
-
this._state = exports.Position.Center;
|
|
1850
|
-
}
|
|
1787
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1788
|
+
this.setState(quadrant);
|
|
1851
1789
|
},
|
|
1852
1790
|
onDragLeave: (e) => {
|
|
1853
1791
|
this.removeDropTarget();
|
|
@@ -1876,9 +1814,73 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1876
1814
|
this.options.canDisplayOverlay = value;
|
|
1877
1815
|
}
|
|
1878
1816
|
dispose() {
|
|
1879
|
-
this._onDrop.dispose();
|
|
1880
1817
|
this.removeDropTarget();
|
|
1881
1818
|
}
|
|
1819
|
+
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1820
|
+
if (!this.overlay) {
|
|
1821
|
+
return;
|
|
1822
|
+
}
|
|
1823
|
+
const isLeft = quadrant === 'left';
|
|
1824
|
+
const isRight = quadrant === 'right';
|
|
1825
|
+
const isTop = quadrant === 'top';
|
|
1826
|
+
const isBottom = quadrant === 'bottom';
|
|
1827
|
+
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1828
|
+
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1829
|
+
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1830
|
+
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1831
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1832
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1833
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1834
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1835
|
+
}
|
|
1836
|
+
setState(quadrant) {
|
|
1837
|
+
switch (quadrant) {
|
|
1838
|
+
case 'top':
|
|
1839
|
+
this._state = exports.Position.Top;
|
|
1840
|
+
break;
|
|
1841
|
+
case 'left':
|
|
1842
|
+
this._state = exports.Position.Left;
|
|
1843
|
+
break;
|
|
1844
|
+
case 'bottom':
|
|
1845
|
+
this._state = exports.Position.Bottom;
|
|
1846
|
+
break;
|
|
1847
|
+
case 'right':
|
|
1848
|
+
this._state = exports.Position.Right;
|
|
1849
|
+
break;
|
|
1850
|
+
default:
|
|
1851
|
+
this._state = exports.Position.Center;
|
|
1852
|
+
break;
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
calculateQuadrant(overlayType, xp, yp) {
|
|
1856
|
+
switch (overlayType) {
|
|
1857
|
+
case 'all':
|
|
1858
|
+
if (xp < 20) {
|
|
1859
|
+
return 'left';
|
|
1860
|
+
}
|
|
1861
|
+
if (xp > 80) {
|
|
1862
|
+
return 'right';
|
|
1863
|
+
}
|
|
1864
|
+
if (yp < 20) {
|
|
1865
|
+
return 'top';
|
|
1866
|
+
}
|
|
1867
|
+
if (yp > 80) {
|
|
1868
|
+
return 'bottom';
|
|
1869
|
+
}
|
|
1870
|
+
break;
|
|
1871
|
+
case 'vertical':
|
|
1872
|
+
if (yp < 50) {
|
|
1873
|
+
return 'top';
|
|
1874
|
+
}
|
|
1875
|
+
return 'bottom';
|
|
1876
|
+
case 'horizontal':
|
|
1877
|
+
if (xp < 50) {
|
|
1878
|
+
return 'left';
|
|
1879
|
+
}
|
|
1880
|
+
return 'right';
|
|
1881
|
+
}
|
|
1882
|
+
return null;
|
|
1883
|
+
}
|
|
1882
1884
|
removeDropTarget() {
|
|
1883
1885
|
if (this.target) {
|
|
1884
1886
|
this._state = undefined;
|
|
@@ -1981,6 +1983,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1981
1983
|
this.view.layout(this.width, this.height);
|
|
1982
1984
|
}
|
|
1983
1985
|
dispose() {
|
|
1986
|
+
this._onDidChange.dispose();
|
|
1984
1987
|
this._disposable.dispose();
|
|
1985
1988
|
}
|
|
1986
1989
|
}
|
|
@@ -2032,7 +2035,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2032
2035
|
proportionalLayout,
|
|
2033
2036
|
});
|
|
2034
2037
|
}
|
|
2035
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2038
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
2036
2039
|
this._onDidChange.fire(undefined);
|
|
2037
2040
|
}));
|
|
2038
2041
|
this.setupChildrenEvents();
|
|
@@ -2204,6 +2207,15 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2204
2207
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2205
2208
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2206
2209
|
*--------------------------------------------------------------------------------------------*/
|
|
2210
|
+
function findLeaf(candiateNode, last) {
|
|
2211
|
+
if (candiateNode instanceof LeafNode) {
|
|
2212
|
+
return candiateNode;
|
|
2213
|
+
}
|
|
2214
|
+
if (candiateNode instanceof BranchNode) {
|
|
2215
|
+
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2216
|
+
}
|
|
2217
|
+
throw new Error('invalid node');
|
|
2218
|
+
}
|
|
2207
2219
|
function flipNode(node, size, orthogonalSize) {
|
|
2208
2220
|
if (node instanceof BranchNode) {
|
|
2209
2221
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2342,13 +2354,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2342
2354
|
}
|
|
2343
2355
|
deserialize(json, deserializer) {
|
|
2344
2356
|
const orientation = json.orientation;
|
|
2345
|
-
const height = json.height;
|
|
2357
|
+
const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
|
|
2346
2358
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2347
2359
|
}
|
|
2348
2360
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2349
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2361
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2350
2362
|
}
|
|
2351
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2363
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2352
2364
|
let result;
|
|
2353
2365
|
if (node.type === 'branch') {
|
|
2354
2366
|
const serializedChildren = node.data;
|
|
@@ -2358,7 +2370,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2358
2370
|
visible: serializedChild.visible,
|
|
2359
2371
|
};
|
|
2360
2372
|
});
|
|
2361
|
-
|
|
2373
|
+
// HORIZONTAL => height=orthogonalsize width=size
|
|
2374
|
+
// VERTICAL => height=size width=orthogonalsize
|
|
2375
|
+
result = new BranchNode(orientation, this.proportionalLayout, this.styles, isRoot ? orthogonalSize : node.size, isRoot ? node.size : orthogonalSize, children);
|
|
2362
2376
|
}
|
|
2363
2377
|
else {
|
|
2364
2378
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2419,15 +2433,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2419
2433
|
if (!(node instanceof LeafNode)) {
|
|
2420
2434
|
throw new Error('invalid location');
|
|
2421
2435
|
}
|
|
2422
|
-
const findLeaf = (candiateNode, last) => {
|
|
2423
|
-
if (candiateNode instanceof LeafNode) {
|
|
2424
|
-
return candiateNode;
|
|
2425
|
-
}
|
|
2426
|
-
if (candiateNode instanceof BranchNode) {
|
|
2427
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2428
|
-
}
|
|
2429
|
-
throw new Error('invalid node');
|
|
2430
|
-
};
|
|
2431
2436
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2432
2437
|
const n = path[i];
|
|
2433
2438
|
const l = location[i] || 0;
|
|
@@ -2529,9 +2534,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2529
2534
|
if (parent.children.length > 1) {
|
|
2530
2535
|
return node.view;
|
|
2531
2536
|
}
|
|
2537
|
+
const sibling = parent.children[0];
|
|
2532
2538
|
if (pathToParent.length === 0) {
|
|
2533
2539
|
// parent is root
|
|
2534
|
-
const sibling = parent.children[0];
|
|
2535
2540
|
if (sibling instanceof LeafNode) {
|
|
2536
2541
|
return node.view;
|
|
2537
2542
|
}
|
|
@@ -2542,7 +2547,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2542
2547
|
}
|
|
2543
2548
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2544
2549
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2545
|
-
const sibling = parent.children[0];
|
|
2546
2550
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2547
2551
|
parent.removeChild(0, sizing);
|
|
2548
2552
|
const sizes = grandParent.children.map((size, i) => grandParent.getChildSize(i));
|
|
@@ -2589,31 +2593,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2589
2593
|
}
|
|
2590
2594
|
}
|
|
2591
2595
|
|
|
2592
|
-
/*! *****************************************************************************
|
|
2593
|
-
Copyright (c) Microsoft Corporation.
|
|
2594
|
-
|
|
2595
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2596
|
-
purpose with or without fee is hereby granted.
|
|
2597
|
-
|
|
2598
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2599
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2600
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2601
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2602
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2603
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2604
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2605
|
-
***************************************************************************** */
|
|
2606
|
-
|
|
2607
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2608
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2609
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2610
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2611
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2612
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2613
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2614
|
-
});
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
2596
|
class ContentContainer extends CompositeDisposable {
|
|
2618
2597
|
constructor() {
|
|
2619
2598
|
super();
|
|
@@ -2625,6 +2604,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2625
2604
|
this._element = document.createElement('div');
|
|
2626
2605
|
this._element.className = 'content-container';
|
|
2627
2606
|
this._element.tabIndex = -1;
|
|
2607
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2628
2608
|
// for hosted containers
|
|
2629
2609
|
// 1) register a drop target on the host
|
|
2630
2610
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2691,6 +2671,41 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2691
2671
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2692
2672
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2693
2673
|
|
|
2674
|
+
class DragHandler extends CompositeDisposable {
|
|
2675
|
+
constructor(el) {
|
|
2676
|
+
super();
|
|
2677
|
+
this.el = el;
|
|
2678
|
+
this.disposable = new MutableDisposable();
|
|
2679
|
+
this._onDragStart = new Emitter();
|
|
2680
|
+
this.onDragStart = this._onDragStart.event;
|
|
2681
|
+
this.iframes = [];
|
|
2682
|
+
this.configure();
|
|
2683
|
+
}
|
|
2684
|
+
configure() {
|
|
2685
|
+
this.addDisposables(this._onDragStart, addDisposableListener(this.el, 'dragstart', (event) => {
|
|
2686
|
+
this.iframes = [
|
|
2687
|
+
...getElementsByTagName('iframe'),
|
|
2688
|
+
...getElementsByTagName('webview'),
|
|
2689
|
+
];
|
|
2690
|
+
for (const iframe of this.iframes) {
|
|
2691
|
+
iframe.style.pointerEvents = 'none';
|
|
2692
|
+
}
|
|
2693
|
+
this.el.classList.add('dragged');
|
|
2694
|
+
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2695
|
+
this.disposable.value = this.getData();
|
|
2696
|
+
if (event.dataTransfer) {
|
|
2697
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2698
|
+
}
|
|
2699
|
+
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
2700
|
+
for (const iframe of this.iframes) {
|
|
2701
|
+
iframe.style.pointerEvents = 'auto';
|
|
2702
|
+
}
|
|
2703
|
+
this.iframes = [];
|
|
2704
|
+
this.disposable.dispose();
|
|
2705
|
+
}));
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2694
2709
|
exports.MouseEventKind = void 0;
|
|
2695
2710
|
(function (MouseEventKind) {
|
|
2696
2711
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2700,42 +2715,34 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2700
2715
|
constructor(panelId, accessor, group) {
|
|
2701
2716
|
super();
|
|
2702
2717
|
this.panelId = panelId;
|
|
2703
|
-
this.accessor = accessor;
|
|
2704
2718
|
this.group = group;
|
|
2705
2719
|
this._onChanged = new Emitter();
|
|
2706
2720
|
this.onChanged = this._onChanged.event;
|
|
2707
2721
|
this._onDropped = new Emitter();
|
|
2708
2722
|
this.onDrop = this._onDropped.event;
|
|
2709
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2710
|
-
this.iframes = [];
|
|
2711
2723
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2712
2724
|
this._element = document.createElement('div');
|
|
2713
2725
|
this._element.className = 'tab';
|
|
2714
2726
|
this._element.tabIndex = 0;
|
|
2715
2727
|
this._element.draggable = true;
|
|
2716
|
-
this.addDisposables(
|
|
2717
|
-
|
|
2718
|
-
...
|
|
2719
|
-
|
|
2720
|
-
];
|
|
2721
|
-
for (const iframe of this.iframes) {
|
|
2722
|
-
iframe.style.pointerEvents = 'none';
|
|
2728
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2729
|
+
constructor() {
|
|
2730
|
+
super(...arguments);
|
|
2731
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2723
2732
|
}
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2733
|
+
getData() {
|
|
2734
|
+
this.panelTransfer.setData([new PanelTransfer(accessor.id, group.id, panelId)], PanelTransfer.prototype);
|
|
2735
|
+
return {
|
|
2736
|
+
dispose: () => {
|
|
2737
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2738
|
+
},
|
|
2739
|
+
};
|
|
2731
2740
|
}
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
iframe.style.pointerEvents = 'auto';
|
|
2741
|
+
dispose() {
|
|
2742
|
+
//
|
|
2735
2743
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2744
|
+
})(this._element));
|
|
2745
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2739
2746
|
if (event.defaultPrevented) {
|
|
2740
2747
|
return;
|
|
2741
2748
|
}
|
|
@@ -2937,12 +2944,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2937
2944
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2938
2945
|
return;
|
|
2939
2946
|
}
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
});
|
|
2945
|
-
break;
|
|
2947
|
+
if (event.kind === exports.MouseEventKind.CLICK) {
|
|
2948
|
+
this.group.model.openPanel(panel, {
|
|
2949
|
+
skipFocus: alreadyFocused,
|
|
2950
|
+
});
|
|
2946
2951
|
}
|
|
2947
2952
|
}), tabToAdd.onDrop((event) => {
|
|
2948
2953
|
this._onDrop.fire({
|
|
@@ -2971,7 +2976,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2971
2976
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2972
2977
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2973
2978
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2974
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2975
2979
|
})(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
|
|
2976
2980
|
class Groupview extends CompositeDisposable {
|
|
2977
2981
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2992,15 +2996,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2992
2996
|
this.onMove = this._onMove.event;
|
|
2993
2997
|
this._onDidGroupChange = new Emitter();
|
|
2994
2998
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2995
|
-
this.
|
|
2996
|
-
|
|
2997
|
-
return false;
|
|
2998
|
-
}
|
|
2999
|
-
this.doClose(panel);
|
|
3000
|
-
return true;
|
|
3001
|
-
});
|
|
2999
|
+
this._onDidDrop = new Emitter();
|
|
3000
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
3002
3001
|
this.container.classList.add('groupview');
|
|
3003
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
3002
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
3004
3003
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
3005
3004
|
tabHeight: options.tabHeight,
|
|
3006
3005
|
});
|
|
@@ -3157,6 +3156,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3157
3156
|
options.index > this.panels.length) {
|
|
3158
3157
|
options.index = this.panels.length;
|
|
3159
3158
|
}
|
|
3159
|
+
// ensure the group is updated before we fire any events
|
|
3160
|
+
panel.updateParentGroup(this.parent, true);
|
|
3160
3161
|
if (this._activePanel === panel) {
|
|
3161
3162
|
this.accessor.doSetGroupActive(this.parent);
|
|
3162
3163
|
return;
|
|
@@ -3177,43 +3178,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3177
3178
|
return this._removePanel(panelToRemove);
|
|
3178
3179
|
}
|
|
3179
3180
|
closeAllPanels() {
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
const
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
if (this._activePanel && index > -1) {
|
|
3186
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3187
|
-
console.warn('active panel not tracked');
|
|
3188
|
-
}
|
|
3189
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3190
|
-
if (!canClose) {
|
|
3191
|
-
return false;
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3195
|
-
if (i === index) {
|
|
3196
|
-
continue;
|
|
3197
|
-
}
|
|
3198
|
-
const panel = this.panels[i];
|
|
3199
|
-
this.openPanel(panel);
|
|
3200
|
-
if (panel.close) {
|
|
3201
|
-
const canClose = yield panel.close();
|
|
3202
|
-
if (!canClose) {
|
|
3203
|
-
return false;
|
|
3204
|
-
}
|
|
3205
|
-
}
|
|
3206
|
-
}
|
|
3207
|
-
if (this.panels.length > 0) {
|
|
3208
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3209
|
-
const arrPanelCpy = [...this.panels];
|
|
3210
|
-
yield Promise.all(arrPanelCpy.map((p) => this.doClose(p)));
|
|
3181
|
+
if (this.panels.length > 0) {
|
|
3182
|
+
// take a copy since we will be edting the array as we iterate through
|
|
3183
|
+
const arrPanelCpy = [...this.panels];
|
|
3184
|
+
for (const panel of arrPanelCpy) {
|
|
3185
|
+
this.doClose(panel);
|
|
3211
3186
|
}
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3187
|
+
}
|
|
3188
|
+
else {
|
|
3189
|
+
this.accessor.removeGroup(this.parent);
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
closePanel(panel) {
|
|
3193
|
+
this.doClose(panel);
|
|
3217
3194
|
}
|
|
3218
3195
|
doClose(panel) {
|
|
3219
3196
|
this.accessor.removePanel(panel);
|
|
@@ -3356,8 +3333,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3356
3333
|
this.tabsContainer.show();
|
|
3357
3334
|
}
|
|
3358
3335
|
}
|
|
3359
|
-
canDisplayOverlay(
|
|
3336
|
+
canDisplayOverlay(event, target) {
|
|
3360
3337
|
// custom overlay handler
|
|
3338
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3339
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3340
|
+
}
|
|
3361
3341
|
return false;
|
|
3362
3342
|
}
|
|
3363
3343
|
handleDropEvent(event, position, index) {
|
|
@@ -3382,6 +3362,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3382
3362
|
index,
|
|
3383
3363
|
});
|
|
3384
3364
|
}
|
|
3365
|
+
else {
|
|
3366
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3367
|
+
}
|
|
3385
3368
|
}
|
|
3386
3369
|
dispose() {
|
|
3387
3370
|
for (const panel of this.panels) {
|
|
@@ -3434,10 +3417,15 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3434
3417
|
this.onGridEvent = this._onGridEvent.event;
|
|
3435
3418
|
this._onDidLayoutChange = new Emitter();
|
|
3436
3419
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3420
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3421
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3422
|
+
this._onDidAddGroup = new Emitter();
|
|
3423
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3424
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3425
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3437
3426
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3438
3427
|
this.element.appendChild(this.gridview.element);
|
|
3439
|
-
|
|
3440
|
-
this.layout(0, 0, true);
|
|
3428
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3441
3429
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3442
3430
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT });
|
|
3443
3431
|
}));
|
|
@@ -3503,6 +3491,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3503
3491
|
doAddGroup(group, location = [0], size) {
|
|
3504
3492
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
3505
3493
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.ADD_GROUP });
|
|
3494
|
+
this._onDidAddGroup.fire(group);
|
|
3506
3495
|
this.doSetGroupActive(group);
|
|
3507
3496
|
}
|
|
3508
3497
|
doRemoveGroup(group, options) {
|
|
@@ -3516,6 +3505,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3516
3505
|
this._groups.delete(group.id);
|
|
3517
3506
|
}
|
|
3518
3507
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.REMOVE_GROUP });
|
|
3508
|
+
this._onDidRemoveGroup.fire(group);
|
|
3519
3509
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3520
3510
|
const groups = Array.from(this._groups.values());
|
|
3521
3511
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3546,6 +3536,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3546
3536
|
this._onGridEvent.fire({
|
|
3547
3537
|
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3548
3538
|
});
|
|
3539
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3549
3540
|
}
|
|
3550
3541
|
removeGroup(group) {
|
|
3551
3542
|
this.doRemoveGroup(group);
|
|
@@ -3602,6 +3593,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3602
3593
|
dispose() {
|
|
3603
3594
|
super.dispose();
|
|
3604
3595
|
this._onGridEvent.dispose();
|
|
3596
|
+
this._onDidActiveGroupChange.dispose();
|
|
3597
|
+
this._onDidAddGroup.dispose();
|
|
3598
|
+
this._onDidRemoveGroup.dispose();
|
|
3599
|
+
this._onDidLayoutChange.dispose();
|
|
3605
3600
|
this.gridview.dispose();
|
|
3606
3601
|
}
|
|
3607
3602
|
}
|
|
@@ -3613,15 +3608,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3613
3608
|
constructor(id) {
|
|
3614
3609
|
super();
|
|
3615
3610
|
this.id = id;
|
|
3616
|
-
this._state = {};
|
|
3617
3611
|
this._isFocused = false;
|
|
3618
3612
|
this._isActive = false;
|
|
3619
3613
|
this._isVisible = true;
|
|
3620
3614
|
this._width = 0;
|
|
3621
3615
|
this._height = 0;
|
|
3622
|
-
this._onDidStateChange = new Emitter();
|
|
3623
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3624
|
-
//
|
|
3625
3616
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3626
3617
|
replay: true,
|
|
3627
3618
|
});
|
|
@@ -3650,7 +3641,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3650
3641
|
//
|
|
3651
3642
|
this._onActiveChange = new Emitter();
|
|
3652
3643
|
this.onActiveChange = this._onActiveChange.event;
|
|
3653
|
-
this.addDisposables(this.
|
|
3644
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3654
3645
|
this._isFocused = event.isFocused;
|
|
3655
3646
|
}), this.onDidActiveChange((event) => {
|
|
3656
3647
|
this._isActive = event.isActive;
|
|
@@ -3683,21 +3674,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3683
3674
|
setActive() {
|
|
3684
3675
|
this._onActiveChange.fire();
|
|
3685
3676
|
}
|
|
3686
|
-
setState(key, value) {
|
|
3687
|
-
if (typeof key === 'object') {
|
|
3688
|
-
this._state = key;
|
|
3689
|
-
}
|
|
3690
|
-
else if (typeof value !== undefined) {
|
|
3691
|
-
this._state[key] = value;
|
|
3692
|
-
}
|
|
3693
|
-
this._onDidStateChange.fire(undefined);
|
|
3694
|
-
}
|
|
3695
|
-
getState() {
|
|
3696
|
-
return this._state;
|
|
3697
|
-
}
|
|
3698
|
-
getStateKey(key) {
|
|
3699
|
-
return this._state[key];
|
|
3700
|
-
}
|
|
3701
3677
|
dispose() {
|
|
3702
3678
|
super.dispose();
|
|
3703
3679
|
}
|
|
@@ -3717,6 +3693,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3717
3693
|
//
|
|
3718
3694
|
this._onDidSizeChange = new Emitter();
|
|
3719
3695
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3696
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3720
3697
|
}
|
|
3721
3698
|
setConstraints(value) {
|
|
3722
3699
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3730,19 +3707,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3730
3707
|
constructor(panel, group) {
|
|
3731
3708
|
super(panel.id);
|
|
3732
3709
|
this.panel = panel;
|
|
3733
|
-
this._onDidDirtyChange = new Emitter();
|
|
3734
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3735
3710
|
this._onDidTitleChange = new Emitter();
|
|
3736
3711
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3737
3712
|
this._titleChanged = new Emitter();
|
|
3738
3713
|
this.titleChanged = this._titleChanged.event;
|
|
3739
3714
|
this._suppressClosableChanged = new Emitter();
|
|
3740
3715
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3741
|
-
this.
|
|
3742
|
-
this.
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3716
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3717
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3718
|
+
this._onDidGroupChange = new Emitter();
|
|
3719
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3720
|
+
this.disposable = new MutableDisposable();
|
|
3721
|
+
this.group = group;
|
|
3722
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._titleChanged, this._suppressClosableChanged, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3746
3723
|
}
|
|
3747
3724
|
get title() {
|
|
3748
3725
|
return this.panel.title;
|
|
@@ -3755,7 +3732,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3755
3732
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3756
3733
|
}
|
|
3757
3734
|
set group(value) {
|
|
3735
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3758
3736
|
this._group = value;
|
|
3737
|
+
this._onDidGroupChange.fire();
|
|
3738
|
+
if (this._group) {
|
|
3739
|
+
this.disposable.value = this._group.api.onDidActiveChange(() => {
|
|
3740
|
+
this._onDidActiveGroupChange.fire();
|
|
3741
|
+
});
|
|
3742
|
+
if (this.isGroupActive !== isOldGroupActive) {
|
|
3743
|
+
this._onDidActiveGroupChange.fire();
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3759
3746
|
}
|
|
3760
3747
|
get group() {
|
|
3761
3748
|
return this._group;
|
|
@@ -3769,16 +3756,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3769
3756
|
}
|
|
3770
3757
|
return this.group.model.closePanel(this.panel);
|
|
3771
3758
|
}
|
|
3772
|
-
interceptOnCloseAction(interceptor) {
|
|
3773
|
-
this._interceptor = interceptor;
|
|
3774
|
-
}
|
|
3775
|
-
dispose() {
|
|
3776
|
-
super.dispose();
|
|
3777
|
-
}
|
|
3778
3759
|
}
|
|
3779
3760
|
|
|
3780
3761
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3781
|
-
constructor(id, containerApi) {
|
|
3762
|
+
constructor(id, accessor, containerApi) {
|
|
3782
3763
|
super();
|
|
3783
3764
|
this.id = id;
|
|
3784
3765
|
this.containerApi = containerApi;
|
|
@@ -3786,9 +3767,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3786
3767
|
this._suppressClosable = false;
|
|
3787
3768
|
this._title = '';
|
|
3788
3769
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3789
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3790
3770
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3791
|
-
|
|
3771
|
+
accessor.setActivePanel(this);
|
|
3792
3772
|
}), this.api.onDidTitleChange((event) => {
|
|
3793
3773
|
const title = event.title;
|
|
3794
3774
|
this.update({ params: { title } });
|
|
@@ -3812,32 +3792,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3812
3792
|
this._view = params.view;
|
|
3813
3793
|
this.setTitle(params.title);
|
|
3814
3794
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3815
|
-
if (params.state) {
|
|
3816
|
-
this.api.setState(params.state);
|
|
3817
|
-
}
|
|
3818
3795
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3819
3796
|
}
|
|
3820
3797
|
focus() {
|
|
3821
3798
|
this.api._onFocusEvent.fire();
|
|
3822
3799
|
}
|
|
3823
|
-
setDirty(isDirty) {
|
|
3824
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3825
|
-
}
|
|
3826
|
-
close() {
|
|
3827
|
-
if (this.api.tryClose) {
|
|
3828
|
-
return this.api.tryClose();
|
|
3829
|
-
}
|
|
3830
|
-
return Promise.resolve(true);
|
|
3831
|
-
}
|
|
3832
3800
|
toJSON() {
|
|
3833
|
-
const state = this.api.getState();
|
|
3834
3801
|
return {
|
|
3835
3802
|
id: this.id,
|
|
3836
3803
|
view: this.view.toJSON(),
|
|
3837
3804
|
params: Object.keys(this._params || {}).length > 0
|
|
3838
3805
|
? this._params
|
|
3839
3806
|
: undefined,
|
|
3840
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3841
3807
|
suppressClosable: this.suppressClosable || undefined,
|
|
3842
3808
|
title: this.title,
|
|
3843
3809
|
};
|
|
@@ -3882,18 +3848,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3882
3848
|
var _a;
|
|
3883
3849
|
this._group = group;
|
|
3884
3850
|
this.api.group = group;
|
|
3885
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3886
|
-
var _a;
|
|
3887
|
-
if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
|
|
3888
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3889
|
-
this.api._onDidActiveChange.fire({
|
|
3890
|
-
isActive: isGroupActive && isVisible,
|
|
3891
|
-
});
|
|
3892
|
-
this.api._onDidVisibilityChange.fire({
|
|
3893
|
-
isVisible,
|
|
3894
|
-
});
|
|
3895
|
-
}
|
|
3896
|
-
});
|
|
3897
3851
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3898
3852
|
this.api._onDidActiveChange.fire({
|
|
3899
3853
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -4003,15 +3957,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4003
3957
|
}
|
|
4004
3958
|
}
|
|
4005
3959
|
|
|
4006
|
-
function debounce(cb, wait) {
|
|
4007
|
-
let timeout;
|
|
4008
|
-
const callable = (...args) => {
|
|
4009
|
-
clearTimeout(timeout);
|
|
4010
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
4011
|
-
};
|
|
4012
|
-
return callable;
|
|
4013
|
-
}
|
|
4014
|
-
|
|
4015
3960
|
class DefaultDeserializer {
|
|
4016
3961
|
constructor(layout, panelDeserializer) {
|
|
4017
3962
|
this.layout = layout;
|
|
@@ -4112,9 +4057,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4112
4057
|
this._isGroupActive = false;
|
|
4113
4058
|
//
|
|
4114
4059
|
this.params = {};
|
|
4115
|
-
//
|
|
4116
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4117
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4118
4060
|
this._element = document.createElement('div');
|
|
4119
4061
|
this._element.className = 'default-tab';
|
|
4120
4062
|
//
|
|
@@ -4159,10 +4101,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4159
4101
|
init(params) {
|
|
4160
4102
|
this.params = params;
|
|
4161
4103
|
this._content.textContent = params.title;
|
|
4162
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4163
|
-
const isDirty = event;
|
|
4164
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4165
|
-
});
|
|
4166
4104
|
if (!this.params.suppressClosable) {
|
|
4167
4105
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4168
4106
|
ev.preventDefault(); //
|
|
@@ -4216,6 +4154,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4216
4154
|
get height() {
|
|
4217
4155
|
return this._height;
|
|
4218
4156
|
}
|
|
4157
|
+
get params() {
|
|
4158
|
+
var _a;
|
|
4159
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4160
|
+
}
|
|
4219
4161
|
focus() {
|
|
4220
4162
|
this.api._onFocusEvent.fire();
|
|
4221
4163
|
}
|
|
@@ -4224,29 +4166,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4224
4166
|
this._height = height;
|
|
4225
4167
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4226
4168
|
if (this.part) {
|
|
4227
|
-
if (this.
|
|
4228
|
-
this.part.update(this.
|
|
4169
|
+
if (this._params) {
|
|
4170
|
+
this.part.update(this._params.params);
|
|
4229
4171
|
}
|
|
4230
4172
|
}
|
|
4231
4173
|
}
|
|
4232
4174
|
init(parameters) {
|
|
4233
|
-
this.
|
|
4175
|
+
this._params = parameters;
|
|
4234
4176
|
this.part = this.getComponent();
|
|
4235
4177
|
}
|
|
4236
4178
|
update(event) {
|
|
4237
4179
|
var _a, _b;
|
|
4238
|
-
this.
|
|
4239
|
-
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this.
|
|
4180
|
+
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) });
|
|
4181
|
+
(_b = this.part) === null || _b === void 0 ? void 0 : _b.update({ params: this._params.params });
|
|
4240
4182
|
}
|
|
4241
4183
|
toJSON() {
|
|
4242
4184
|
var _a, _b;
|
|
4243
|
-
const
|
|
4244
|
-
const params = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4185
|
+
const params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
4245
4186
|
return {
|
|
4246
4187
|
id: this.id,
|
|
4247
4188
|
component: this.component,
|
|
4248
4189
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4249
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4250
4190
|
};
|
|
4251
4191
|
}
|
|
4252
4192
|
dispose() {
|
|
@@ -4269,12 +4209,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4269
4209
|
this._snap = false;
|
|
4270
4210
|
this._onDidChange = new Emitter();
|
|
4271
4211
|
this.onDidChange = this._onDidChange.event;
|
|
4272
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4212
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4273
4213
|
const { isVisible } = event;
|
|
4274
|
-
const { containerApi } = this.
|
|
4214
|
+
const { containerApi } = this._params;
|
|
4275
4215
|
containerApi.setVisible(this, isVisible);
|
|
4276
4216
|
}), this.api.onActiveChange(() => {
|
|
4277
|
-
const { containerApi } = this.
|
|
4217
|
+
const { containerApi } = this._params;
|
|
4278
4218
|
containerApi.setActive(this);
|
|
4279
4219
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4280
4220
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4389,9 +4329,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4389
4329
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4390
4330
|
return Object.assign(Object.assign({}, state), { minimumHeight: minimum(this.minimumHeight), maximumHeight: maximum(this.maximumHeight), minimumWidth: minimum(this.minimumWidth), maximumWidth: maximum(this.maximumWidth), snap: this.snap, priority: this.priority });
|
|
4391
4331
|
}
|
|
4392
|
-
dispose() {
|
|
4393
|
-
super.dispose();
|
|
4394
|
-
}
|
|
4395
4332
|
}
|
|
4396
4333
|
|
|
4397
4334
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4498,15 +4435,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4498
4435
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4499
4436
|
styles: options.styles,
|
|
4500
4437
|
});
|
|
4501
|
-
this._panels = new Map();
|
|
4502
|
-
this.dirtyPanels = new Set();
|
|
4503
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4504
4438
|
// events
|
|
4505
4439
|
this._onTabInteractionEvent = new Emitter();
|
|
4506
4440
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4507
4441
|
this._onTabContextMenu = new Emitter();
|
|
4508
4442
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4509
|
-
this.
|
|
4443
|
+
this._onDidDrop = new Emitter();
|
|
4444
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
4445
|
+
this._onDidRemovePanel = new Emitter();
|
|
4446
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4447
|
+
this._onDidAddPanel = new Emitter();
|
|
4448
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4449
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4450
|
+
this.onDidLayoutfromJSON = this._onDidLayoutfromJSON.event;
|
|
4451
|
+
this._onDidActivePanelChange = new Emitter();
|
|
4452
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4453
|
+
this.addDisposables(this._onTabInteractionEvent, this._onTabContextMenu, this._onDidDrop);
|
|
4510
4454
|
this._options = options;
|
|
4511
4455
|
if (!this.options.components) {
|
|
4512
4456
|
this.options.components = {};
|
|
@@ -4527,10 +4471,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4527
4471
|
this._api = new DockviewApi(this);
|
|
4528
4472
|
}
|
|
4529
4473
|
get totalPanels() {
|
|
4530
|
-
return this.
|
|
4474
|
+
return this.panels.length;
|
|
4531
4475
|
}
|
|
4532
4476
|
get panels() {
|
|
4533
|
-
return
|
|
4477
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4534
4478
|
}
|
|
4535
4479
|
get deserializer() {
|
|
4536
4480
|
return this._deserializer;
|
|
@@ -4560,10 +4504,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4560
4504
|
updateOptions(options) {
|
|
4561
4505
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4562
4506
|
this.options.orientation !== options.orientation;
|
|
4563
|
-
// TODO support style update
|
|
4564
|
-
// const hasStylesChanged =
|
|
4565
|
-
// typeof options.styles === 'object' &&
|
|
4566
|
-
// this.options.styles !== options.styles;
|
|
4567
4507
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4568
4508
|
if (hasOrientationChanged) {
|
|
4569
4509
|
this.gridview.orientation = options.orientation;
|
|
@@ -4575,8 +4515,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4575
4515
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4576
4516
|
}
|
|
4577
4517
|
getGroupPanel(id) {
|
|
4578
|
-
|
|
4579
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4518
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4580
4519
|
}
|
|
4581
4520
|
setActivePanel(panel) {
|
|
4582
4521
|
if (!panel.group) {
|
|
@@ -4625,24 +4564,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4625
4564
|
this.doSetGroupActive(next);
|
|
4626
4565
|
}
|
|
4627
4566
|
}
|
|
4628
|
-
registerPanel(panel) {
|
|
4629
|
-
if (this._panels.has(panel.id)) {
|
|
4630
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4631
|
-
}
|
|
4632
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4633
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4634
|
-
}
|
|
4635
|
-
unregisterPanel(panel) {
|
|
4636
|
-
if (!this._panels.has(panel.id)) {
|
|
4637
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4638
|
-
}
|
|
4639
|
-
const item = this._panels.get(panel.id);
|
|
4640
|
-
if (item) {
|
|
4641
|
-
item.disposable.dispose();
|
|
4642
|
-
item.value.dispose();
|
|
4643
|
-
}
|
|
4644
|
-
this._panels.delete(panel.id);
|
|
4645
|
-
}
|
|
4646
4567
|
/**
|
|
4647
4568
|
* Serialize the current state of the layout
|
|
4648
4569
|
*
|
|
@@ -4650,12 +4571,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4650
4571
|
*/
|
|
4651
4572
|
toJSON() {
|
|
4652
4573
|
var _a;
|
|
4653
|
-
this.syncConfigs();
|
|
4654
4574
|
const data = this.gridview.serialize();
|
|
4655
|
-
const panels =
|
|
4656
|
-
|
|
4657
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4658
|
-
}
|
|
4575
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4576
|
+
collection[panel.id] = panel.toJSON();
|
|
4659
4577
|
return collection;
|
|
4660
4578
|
}, {});
|
|
4661
4579
|
return {
|
|
@@ -4667,11 +4585,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4667
4585
|
}
|
|
4668
4586
|
fromJSON(data) {
|
|
4669
4587
|
this.gridview.clear();
|
|
4670
|
-
this.
|
|
4671
|
-
panel.
|
|
4672
|
-
panel.value.dispose();
|
|
4588
|
+
this.panels.forEach((panel) => {
|
|
4589
|
+
panel.dispose();
|
|
4673
4590
|
});
|
|
4674
|
-
this._panels.clear();
|
|
4675
4591
|
this._groups.clear();
|
|
4676
4592
|
if (!this.deserializer) {
|
|
4677
4593
|
throw new Error('invalid deserializer');
|
|
@@ -4686,9 +4602,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4686
4602
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4687
4603
|
createPanel: (id) => {
|
|
4688
4604
|
const panelData = panels[id];
|
|
4689
|
-
|
|
4690
|
-
this.registerPanel(panel);
|
|
4691
|
-
return panel;
|
|
4605
|
+
return this.deserializer.fromJSON(panelData);
|
|
4692
4606
|
},
|
|
4693
4607
|
}));
|
|
4694
4608
|
if (typeof activeGroup === 'string') {
|
|
@@ -4699,30 +4613,23 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4699
4613
|
}
|
|
4700
4614
|
this.gridview.layout(this.width, this.height);
|
|
4701
4615
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4616
|
+
this._onDidLayoutfromJSON.fire();
|
|
4702
4617
|
}
|
|
4703
4618
|
closeAllGroups() {
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
if (!didCloseAll) {
|
|
4709
|
-
return false;
|
|
4710
|
-
}
|
|
4711
|
-
}
|
|
4712
|
-
return true;
|
|
4713
|
-
});
|
|
4619
|
+
for (const entry of this._groups.entries()) {
|
|
4620
|
+
const [_, group] = entry;
|
|
4621
|
+
group.value.model.closeAllPanels();
|
|
4622
|
+
}
|
|
4714
4623
|
}
|
|
4715
4624
|
fireMouseEvent(event) {
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
}
|
|
4725
|
-
break;
|
|
4625
|
+
if (event.kind === exports.MouseEventKind.CONTEXT_MENU) {
|
|
4626
|
+
if (event.tab && event.panel) {
|
|
4627
|
+
this._onTabContextMenu.fire({
|
|
4628
|
+
event: event.event,
|
|
4629
|
+
api: this._api,
|
|
4630
|
+
panel: event.panel,
|
|
4631
|
+
});
|
|
4632
|
+
}
|
|
4726
4633
|
}
|
|
4727
4634
|
}
|
|
4728
4635
|
addPanel(options) {
|
|
@@ -4756,7 +4663,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4756
4663
|
return panel;
|
|
4757
4664
|
}
|
|
4758
4665
|
removePanel(panel) {
|
|
4759
|
-
this.unregisterPanel(panel);
|
|
4760
4666
|
const group = panel.group;
|
|
4761
4667
|
if (!group) {
|
|
4762
4668
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
@@ -4775,10 +4681,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4775
4681
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4776
4682
|
}
|
|
4777
4683
|
addEmptyGroup(options) {
|
|
4778
|
-
var _a;
|
|
4779
4684
|
const group = this.createGroup();
|
|
4780
4685
|
if (options) {
|
|
4781
|
-
const referencePanel =
|
|
4686
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4782
4687
|
if (!referencePanel) {
|
|
4783
4688
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4784
4689
|
}
|
|
@@ -4807,13 +4712,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4807
4712
|
super.removeGroup(group);
|
|
4808
4713
|
}
|
|
4809
4714
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4810
|
-
var _a
|
|
4715
|
+
var _a;
|
|
4811
4716
|
const sourceGroup = groupId
|
|
4812
4717
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4813
4718
|
: undefined;
|
|
4814
4719
|
if (!target || target === exports.Position.Center) {
|
|
4815
4720
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4816
|
-
|
|
4721
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4817
4722
|
if (!groupItem) {
|
|
4818
4723
|
throw new Error(`No panel with id ${itemId}`);
|
|
4819
4724
|
}
|
|
@@ -4849,7 +4754,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4849
4754
|
}
|
|
4850
4755
|
else {
|
|
4851
4756
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4852
|
-
|
|
4757
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4853
4758
|
if (!groupItem) {
|
|
4854
4759
|
throw new Error(`No panel with id ${itemId}`);
|
|
4855
4760
|
}
|
|
@@ -4859,7 +4764,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4859
4764
|
}
|
|
4860
4765
|
}
|
|
4861
4766
|
doSetGroupActive(group, skipFocus) {
|
|
4862
|
-
var _a, _b;
|
|
4767
|
+
var _a, _b, _c;
|
|
4863
4768
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4864
4769
|
super.doSetGroupActive(group, skipFocus);
|
|
4865
4770
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
@@ -4867,6 +4772,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4867
4772
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4868
4773
|
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4869
4774
|
});
|
|
4775
|
+
this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
|
|
4870
4776
|
}
|
|
4871
4777
|
}
|
|
4872
4778
|
createGroup(options) {
|
|
@@ -4892,6 +4798,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4892
4798
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4893
4799
|
const { groupId, itemId, target, index } = event;
|
|
4894
4800
|
this.moveGroupOrPanel(view, groupId, itemId, target, index);
|
|
4801
|
+
}), view.model.onDidDrop((event) => {
|
|
4802
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api }));
|
|
4895
4803
|
}), view.model.onDidGroupChange((event) => {
|
|
4896
4804
|
switch (event.kind) {
|
|
4897
4805
|
case exports.GroupChangeKind2.ADD_PANEL:
|
|
@@ -4899,24 +4807,25 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4899
4807
|
kind: exports.GroupChangeKind.ADD_PANEL,
|
|
4900
4808
|
panel: event.panel,
|
|
4901
4809
|
});
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
4906
|
-
panel: event.panel,
|
|
4907
|
-
});
|
|
4810
|
+
if (event.panel) {
|
|
4811
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4812
|
+
}
|
|
4908
4813
|
break;
|
|
4909
4814
|
case exports.GroupChangeKind2.REMOVE_PANEL:
|
|
4910
4815
|
this._onGridEvent.fire({
|
|
4911
4816
|
kind: exports.GroupChangeKind.REMOVE_PANEL,
|
|
4912
4817
|
panel: event.panel,
|
|
4913
4818
|
});
|
|
4819
|
+
if (event.panel) {
|
|
4820
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4821
|
+
}
|
|
4914
4822
|
break;
|
|
4915
4823
|
case exports.GroupChangeKind2.PANEL_ACTIVE:
|
|
4916
4824
|
this._onGridEvent.fire({
|
|
4917
4825
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4918
4826
|
panel: event.panel,
|
|
4919
4827
|
});
|
|
4828
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4920
4829
|
break;
|
|
4921
4830
|
}
|
|
4922
4831
|
}));
|
|
@@ -4930,44 +4839,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4930
4839
|
}
|
|
4931
4840
|
return view;
|
|
4932
4841
|
}
|
|
4933
|
-
dispose() {
|
|
4934
|
-
super.dispose();
|
|
4935
|
-
this._onGridEvent.dispose();
|
|
4936
|
-
}
|
|
4937
|
-
/**
|
|
4938
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4939
|
-
*/
|
|
4940
|
-
syncConfigs() {
|
|
4941
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4942
|
-
if (dirtyPanels.length === 0) ;
|
|
4943
|
-
this.dirtyPanels.clear();
|
|
4944
|
-
const partialPanelState = dirtyPanels
|
|
4945
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4946
|
-
.filter((_) => !!_)
|
|
4947
|
-
.reduce((collection, panel) => {
|
|
4948
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4949
|
-
return collection;
|
|
4950
|
-
}, {});
|
|
4951
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4952
|
-
dirtyPanels
|
|
4953
|
-
.filter((p) => this._panels.has(p.id))
|
|
4954
|
-
.forEach((panel) => {
|
|
4955
|
-
panel.setDirty(false);
|
|
4956
|
-
});
|
|
4957
|
-
}
|
|
4958
4842
|
_addPanel(options) {
|
|
4959
4843
|
const view = new DefaultGroupPanelView({
|
|
4960
4844
|
content: this.createContentComponent(options.id, options.component),
|
|
4961
4845
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4962
4846
|
});
|
|
4963
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4847
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4964
4848
|
panel.init({
|
|
4965
4849
|
view,
|
|
4966
4850
|
title: options.title || options.id,
|
|
4967
4851
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4968
4852
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4969
4853
|
});
|
|
4970
|
-
this.registerPanel(panel);
|
|
4971
4854
|
return panel;
|
|
4972
4855
|
}
|
|
4973
4856
|
createContentComponent(id, componentName) {
|
|
@@ -4987,10 +4870,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4987
4870
|
var _a;
|
|
4988
4871
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4989
4872
|
}
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
this.
|
|
4873
|
+
dispose() {
|
|
4874
|
+
super.dispose();
|
|
4875
|
+
this._onDidActivePanelChange.dispose();
|
|
4876
|
+
this._onDidAddPanel.dispose();
|
|
4877
|
+
this._onDidRemovePanel.dispose();
|
|
4878
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4994
4879
|
}
|
|
4995
4880
|
}
|
|
4996
4881
|
|
|
@@ -5001,6 +4886,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5001
4886
|
orientation: options.orientation,
|
|
5002
4887
|
styles: options.styles,
|
|
5003
4888
|
});
|
|
4889
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4890
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5004
4891
|
this._options = options;
|
|
5005
4892
|
if (!this.options.components) {
|
|
5006
4893
|
this.options.components = {};
|
|
@@ -5109,6 +4996,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5109
4996
|
}
|
|
5110
4997
|
}
|
|
5111
4998
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4999
|
+
this._onDidLayoutfromJSON.fire();
|
|
5112
5000
|
}
|
|
5113
5001
|
movePanel(panel, options) {
|
|
5114
5002
|
var _a;
|
|
@@ -5223,6 +5111,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5223
5111
|
}
|
|
5224
5112
|
dispose() {
|
|
5225
5113
|
super.dispose();
|
|
5114
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5226
5115
|
}
|
|
5227
5116
|
}
|
|
5228
5117
|
|
|
@@ -5249,7 +5138,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5249
5138
|
options.frameworkComponents = {};
|
|
5250
5139
|
}
|
|
5251
5140
|
this.splitview = new Splitview(this.element, options);
|
|
5252
|
-
this.addDisposables(this._disposable);
|
|
5141
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5253
5142
|
}
|
|
5254
5143
|
get options() {
|
|
5255
5144
|
return this._options;
|
|
@@ -5471,41 +5360,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5471
5360
|
}
|
|
5472
5361
|
}
|
|
5473
5362
|
|
|
5474
|
-
class DragHandler extends CompositeDisposable {
|
|
5475
|
-
constructor(el) {
|
|
5476
|
-
super();
|
|
5477
|
-
this.el = el;
|
|
5478
|
-
this.iframes = [];
|
|
5479
|
-
this._onDragStart = new Emitter();
|
|
5480
|
-
this.onDragStart = this._onDragStart.event;
|
|
5481
|
-
this.configure();
|
|
5482
|
-
}
|
|
5483
|
-
configure() {
|
|
5484
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5485
|
-
var _a;
|
|
5486
|
-
this.iframes = [
|
|
5487
|
-
...getElementsByTagName('iframe'),
|
|
5488
|
-
...getElementsByTagName('webview'),
|
|
5489
|
-
];
|
|
5490
|
-
for (const iframe of this.iframes) {
|
|
5491
|
-
iframe.style.pointerEvents = 'none';
|
|
5492
|
-
}
|
|
5493
|
-
this.el.classList.add('dragged');
|
|
5494
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5495
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5496
|
-
this.disposable = this.getData();
|
|
5497
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5498
|
-
var _a;
|
|
5499
|
-
for (const iframe of this.iframes) {
|
|
5500
|
-
iframe.style.pointerEvents = 'auto';
|
|
5501
|
-
}
|
|
5502
|
-
this.iframes = [];
|
|
5503
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5504
|
-
this.disposable = undefined;
|
|
5505
|
-
}));
|
|
5506
|
-
}
|
|
5507
|
-
}
|
|
5508
|
-
|
|
5509
5363
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5510
5364
|
//
|
|
5511
5365
|
constructor(id) {
|
|
@@ -5520,6 +5374,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5520
5374
|
//
|
|
5521
5375
|
this._onDidSizeChange = new Emitter();
|
|
5522
5376
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5377
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5523
5378
|
}
|
|
5524
5379
|
setConstraints(value) {
|
|
5525
5380
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5527,11 +5382,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5527
5382
|
setSize(event) {
|
|
5528
5383
|
this._onDidSizeChange.fire(event);
|
|
5529
5384
|
}
|
|
5530
|
-
dispose() {
|
|
5531
|
-
super.dispose();
|
|
5532
|
-
this._onDidConstraintsChange.dispose();
|
|
5533
|
-
this._onDidSizeChange.dispose();
|
|
5534
|
-
}
|
|
5535
5385
|
}
|
|
5536
5386
|
|
|
5537
5387
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5545,6 +5395,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5545
5395
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5546
5396
|
this._onMouseLeave = new Emitter({});
|
|
5547
5397
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5398
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5548
5399
|
}
|
|
5549
5400
|
set pane(pane) {
|
|
5550
5401
|
this._pane = pane;
|
|
@@ -5713,7 +5564,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5713
5564
|
}
|
|
5714
5565
|
}
|
|
5715
5566
|
toJSON() {
|
|
5716
|
-
const params = this.
|
|
5567
|
+
const params = this._params;
|
|
5717
5568
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5718
5569
|
}
|
|
5719
5570
|
renderOnce() {
|
|
@@ -5782,36 +5633,39 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5782
5633
|
},
|
|
5783
5634
|
});
|
|
5784
5635
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5785
|
-
|
|
5786
|
-
if (!data) {
|
|
5787
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5788
|
-
return;
|
|
5789
|
-
}
|
|
5790
|
-
const containerApi = this.params
|
|
5791
|
-
.containerApi;
|
|
5792
|
-
const panelId = data.paneId;
|
|
5793
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5794
|
-
if (!existingPanel) {
|
|
5795
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5796
|
-
return;
|
|
5797
|
-
}
|
|
5798
|
-
const allPanels = containerApi.getPanels();
|
|
5799
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5800
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5801
|
-
if (event.position === exports.Position.Left ||
|
|
5802
|
-
event.position === exports.Position.Top) {
|
|
5803
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5804
|
-
}
|
|
5805
|
-
if (event.position === exports.Position.Right ||
|
|
5806
|
-
event.position === exports.Position.Bottom) {
|
|
5807
|
-
if (fromIndex > toIndex) {
|
|
5808
|
-
toIndex++;
|
|
5809
|
-
}
|
|
5810
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5811
|
-
}
|
|
5812
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5636
|
+
this.onDrop(event);
|
|
5813
5637
|
}));
|
|
5814
5638
|
}
|
|
5639
|
+
onDrop(event) {
|
|
5640
|
+
const data = getPaneData();
|
|
5641
|
+
if (!data) {
|
|
5642
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5643
|
+
return;
|
|
5644
|
+
}
|
|
5645
|
+
const containerApi = this._params
|
|
5646
|
+
.containerApi;
|
|
5647
|
+
const panelId = data.paneId;
|
|
5648
|
+
const existingPanel = containerApi.getPanel(panelId);
|
|
5649
|
+
if (!existingPanel) {
|
|
5650
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5651
|
+
return;
|
|
5652
|
+
}
|
|
5653
|
+
const allPanels = containerApi.getPanels();
|
|
5654
|
+
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5655
|
+
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5656
|
+
if (event.position === exports.Position.Left ||
|
|
5657
|
+
event.position === exports.Position.Top) {
|
|
5658
|
+
toIndex = Math.max(0, toIndex - 1);
|
|
5659
|
+
}
|
|
5660
|
+
if (event.position === exports.Position.Right ||
|
|
5661
|
+
event.position === exports.Position.Bottom) {
|
|
5662
|
+
if (fromIndex > toIndex) {
|
|
5663
|
+
toIndex++;
|
|
5664
|
+
}
|
|
5665
|
+
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5666
|
+
}
|
|
5667
|
+
containerApi.movePanel(fromIndex, toIndex);
|
|
5668
|
+
}
|
|
5815
5669
|
}
|
|
5816
5670
|
|
|
5817
5671
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5875,6 +5729,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5875
5729
|
this.onDidAddView = this._onDidAddView.event;
|
|
5876
5730
|
this._onDidRemoveView = new Emitter();
|
|
5877
5731
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5732
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5878
5733
|
this._options = options;
|
|
5879
5734
|
if (!options.components) {
|
|
5880
5735
|
options.components = {};
|
|
@@ -6102,12 +5957,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6102
5957
|
this._snap = false;
|
|
6103
5958
|
this._onDidChange = new Emitter();
|
|
6104
5959
|
this.onDidChange = this._onDidChange.event;
|
|
6105
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5960
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6106
5961
|
const { isVisible } = event;
|
|
6107
|
-
const { containerApi } = this
|
|
5962
|
+
const { containerApi } = this
|
|
5963
|
+
._params;
|
|
6108
5964
|
containerApi.setVisible(this, isVisible);
|
|
6109
5965
|
}), this.api.onActiveChange(() => {
|
|
6110
|
-
const { containerApi } = this
|
|
5966
|
+
const { containerApi } = this
|
|
5967
|
+
._params;
|
|
6111
5968
|
containerApi.setActive(this);
|
|
6112
5969
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6113
5970
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6250,14 +6107,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6250
6107
|
if (this.disposed) {
|
|
6251
6108
|
throw new Error('invalid operation: resource is already disposed');
|
|
6252
6109
|
}
|
|
6253
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6254
6110
|
if (typeof this.component !== 'function') {
|
|
6255
6111
|
/**
|
|
6256
6112
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6257
6113
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6258
6114
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6259
6115
|
*/
|
|
6260
|
-
throw new Error('
|
|
6116
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6261
6117
|
}
|
|
6262
6118
|
const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
|
|
6263
6119
|
component: this
|
|
@@ -6321,16 +6177,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6321
6177
|
this._onDidBlur = new Emitter();
|
|
6322
6178
|
this.onDidBlur = this._onDidBlur.event;
|
|
6323
6179
|
this._element = document.createElement('div');
|
|
6324
|
-
this._element.
|
|
6325
|
-
this._element.style.width = '100%';
|
|
6180
|
+
this._element.className = 'dockview-react-part';
|
|
6326
6181
|
// this.hostedContainer = new HostedContainer({
|
|
6327
6182
|
// id,
|
|
6328
6183
|
// });
|
|
6329
6184
|
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6330
6185
|
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6331
6186
|
this._actionsElement = document.createElement('div');
|
|
6332
|
-
this._actionsElement.
|
|
6333
|
-
this._actionsElement.style.width = '100%';
|
|
6187
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6334
6188
|
}
|
|
6335
6189
|
get element() {
|
|
6336
6190
|
return this._element;
|
|
@@ -6378,6 +6232,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6378
6232
|
}
|
|
6379
6233
|
dispose() {
|
|
6380
6234
|
var _a, _b;
|
|
6235
|
+
this._onDidFocus.dispose();
|
|
6236
|
+
this._onDidBlur.dispose();
|
|
6381
6237
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6382
6238
|
// this.hostedContainer?.dispose();
|
|
6383
6239
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
@@ -6390,6 +6246,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6390
6246
|
this.component = component;
|
|
6391
6247
|
this.reactPortalStore = reactPortalStore;
|
|
6392
6248
|
this._element = document.createElement('div');
|
|
6249
|
+
this._element.className = 'dockview-react-part';
|
|
6393
6250
|
}
|
|
6394
6251
|
get element() {
|
|
6395
6252
|
return this._element;
|
|
@@ -6434,7 +6291,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6434
6291
|
const panelId = panelData.id;
|
|
6435
6292
|
const params = panelData.params;
|
|
6436
6293
|
const title = panelData.title;
|
|
6437
|
-
const state = panelData.state;
|
|
6438
6294
|
const suppressClosable = panelData.suppressClosable;
|
|
6439
6295
|
const viewData = panelData.view;
|
|
6440
6296
|
const view = new DefaultGroupPanelView({
|
|
@@ -6443,13 +6299,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6443
6299
|
? createComponent(viewData.tab.id, viewData.tab.id, this.layout.options.tabComponents, this.layout.options.frameworkTabComponents, (_c = this.layout.options.frameworkComponentFactory) === null || _c === void 0 ? void 0 : _c.tab)
|
|
6444
6300
|
: new DefaultTab(),
|
|
6445
6301
|
});
|
|
6446
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6302
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6447
6303
|
panel.init({
|
|
6448
6304
|
view,
|
|
6449
6305
|
title,
|
|
6450
6306
|
suppressClosable,
|
|
6451
6307
|
params: params || {},
|
|
6452
|
-
state: state || {},
|
|
6453
6308
|
});
|
|
6454
6309
|
return panel;
|
|
6455
6310
|
}
|
|
@@ -6464,8 +6319,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6464
6319
|
value: undefined,
|
|
6465
6320
|
};
|
|
6466
6321
|
this._element = document.createElement('div');
|
|
6467
|
-
this._element.
|
|
6468
|
-
this._element.style.width = '100%';
|
|
6322
|
+
this._element.className = 'dockview-react-part';
|
|
6469
6323
|
}
|
|
6470
6324
|
get element() {
|
|
6471
6325
|
return this._element;
|
|
@@ -6563,12 +6417,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6563
6417
|
frameworkTabComponents: props.tabComponents,
|
|
6564
6418
|
tabHeight: props.tabHeight,
|
|
6565
6419
|
debug: props.debug,
|
|
6566
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6567
6420
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6568
6421
|
styles: props.hideBorders
|
|
6569
6422
|
? { separatorBorder: 'transparent' }
|
|
6570
6423
|
: undefined,
|
|
6571
6424
|
});
|
|
6425
|
+
const disposable = dockview.onDidDrop((event) => {
|
|
6426
|
+
if (props.onDidDrop) {
|
|
6427
|
+
props.onDidDrop(event);
|
|
6428
|
+
}
|
|
6429
|
+
});
|
|
6572
6430
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6573
6431
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
6574
6432
|
const { clientWidth, clientHeight } = domRef.current;
|
|
@@ -6578,6 +6436,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6578
6436
|
}
|
|
6579
6437
|
dockviewRef.current = dockview;
|
|
6580
6438
|
return () => {
|
|
6439
|
+
disposable.dispose();
|
|
6581
6440
|
dockview.dispose();
|
|
6582
6441
|
};
|
|
6583
6442
|
}, []);
|
|
@@ -6589,6 +6448,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6589
6448
|
frameworkComponents: props.components,
|
|
6590
6449
|
});
|
|
6591
6450
|
}, [props.components]);
|
|
6451
|
+
React__namespace.useEffect(() => {
|
|
6452
|
+
if (!dockviewRef.current) {
|
|
6453
|
+
return;
|
|
6454
|
+
}
|
|
6455
|
+
dockviewRef.current.updateOptions({
|
|
6456
|
+
showDndOverlay: props.showDndOverlay,
|
|
6457
|
+
});
|
|
6458
|
+
}, [props.showDndOverlay]);
|
|
6592
6459
|
React__namespace.useEffect(() => {
|
|
6593
6460
|
if (!dockviewRef.current) {
|
|
6594
6461
|
return;
|
|
@@ -6677,9 +6544,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6677
6544
|
getComponent() {
|
|
6678
6545
|
var _a;
|
|
6679
6546
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6680
|
-
params: ((_a = this.
|
|
6547
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6681
6548
|
api: this.api,
|
|
6682
|
-
containerApi: this.
|
|
6549
|
+
containerApi: this._params
|
|
6683
6550
|
.containerApi,
|
|
6684
6551
|
});
|
|
6685
6552
|
}
|
|
@@ -6752,9 +6619,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6752
6619
|
getComponent() {
|
|
6753
6620
|
var _a;
|
|
6754
6621
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6755
|
-
params: ((_a = this.
|
|
6622
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6756
6623
|
api: this.api,
|
|
6757
|
-
containerApi: this.
|
|
6624
|
+
containerApi: this._params
|
|
6758
6625
|
.containerApi,
|
|
6759
6626
|
});
|
|
6760
6627
|
}
|
|
@@ -6945,7 +6812,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6945
6812
|
exports.BaseGrid = BaseGrid;
|
|
6946
6813
|
exports.CompositeDisposable = CompositeDisposable;
|
|
6947
6814
|
exports.ContentContainer = ContentContainer;
|
|
6948
|
-
exports.DATA_KEY = DATA_KEY;
|
|
6949
6815
|
exports.DockviewApi = DockviewApi;
|
|
6950
6816
|
exports.DockviewComponent = DockviewComponent;
|
|
6951
6817
|
exports.DockviewComponents = DockviewComponents;
|
|
@@ -6980,7 +6846,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6980
6846
|
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6981
6847
|
exports.addDisposableListener = addDisposableListener;
|
|
6982
6848
|
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6983
|
-
exports.extractData = extractData;
|
|
6984
6849
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6985
6850
|
exports.getGridLocation = getGridLocation;
|
|
6986
6851
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6988,11 +6853,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6988
6853
|
exports.getPanelData = getPanelData;
|
|
6989
6854
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6990
6855
|
exports.indexInParent = indexInParent;
|
|
6991
|
-
exports.isCustomDragEvent = isCustomDragEvent;
|
|
6992
6856
|
exports.isGridBranchNode = isGridBranchNode;
|
|
6993
|
-
exports.isPanelTransferEvent = isPanelTransferEvent;
|
|
6994
6857
|
exports.isReactElement = isReactElement;
|
|
6995
|
-
exports.isTabDragEvent = isTabDragEvent;
|
|
6996
6858
|
exports.orthogonal = orthogonal;
|
|
6997
6859
|
exports.toTarget = toTarget;
|
|
6998
6860
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|