dockview 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +243 -186
- package/dist/cjs/api/component.api.d.ts +32 -17
- package/dist/cjs/api/component.api.js +155 -28
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/api/gridviewPanelApi.js +1 -0
- package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
- package/dist/cjs/api/groupPanelApi.d.ts +11 -14
- package/dist/cjs/api/groupPanelApi.js +19 -17
- package/dist/cjs/api/groupPanelApi.js.map +1 -1
- package/dist/cjs/api/panelApi.d.ts +0 -25
- package/dist/cjs/api/panelApi.js +1 -20
- package/dist/cjs/api/panelApi.js.map +1 -1
- package/dist/cjs/api/paneviewPanelApi.js +1 -0
- package/dist/cjs/api/paneviewPanelApi.js.map +1 -1
- package/dist/cjs/api/splitviewPanelApi.d.ts +0 -1
- package/dist/cjs/api/splitviewPanelApi.js +1 -5
- package/dist/cjs/api/splitviewPanelApi.js.map +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +3 -3
- package/dist/cjs/dnd/abstractDragHandler.js +15 -14
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dnd/dataTransfer.d.ts +0 -25
- package/dist/cjs/dnd/dataTransfer.js +1 -45
- package/dist/cjs/dnd/dataTransfer.js.map +1 -1
- package/dist/cjs/dnd/dnd.d.ts +1 -14
- package/dist/cjs/dnd/dnd.js +1 -79
- package/dist/cjs/dnd/dnd.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +4 -5
- package/dist/cjs/dnd/droptarget.js +70 -46
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -8
- package/dist/cjs/dockview/components/tab/defaultTab.js.map +1 -1
- package/dist/cjs/dockview/defaultGroupPanelView.js +3 -1
- package/dist/cjs/dockview/defaultGroupPanelView.js.map +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +27 -19
- package/dist/cjs/dockview/dockviewComponent.js +67 -178
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +2 -5
- package/dist/cjs/dockview/dockviewGroupPanel.js +2 -31
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +1 -1
- package/dist/cjs/dockview/options.d.ts +2 -1
- package/dist/cjs/events.d.ts +7 -0
- package/dist/cjs/events.js +47 -5
- package/dist/cjs/events.js.map +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/cjs/gridview/baseComponentGridview.js +20 -15
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/basePanelView.d.ts +5 -8
- package/dist/cjs/gridview/basePanelView.js +14 -8
- package/dist/cjs/gridview/basePanelView.js.map +1 -1
- package/dist/cjs/gridview/branchNode.js +1 -1
- package/dist/cjs/gridview/branchNode.js.map +1 -1
- package/dist/cjs/gridview/gridview.js +19 -18
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts +4 -0
- package/dist/cjs/gridview/gridviewComponent.js +5 -0
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +0 -1
- package/dist/cjs/gridview/gridviewPanel.js +3 -6
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
- package/dist/cjs/gridview/leafNode.js +1 -0
- package/dist/cjs/gridview/leafNode.js.map +1 -1
- package/dist/cjs/groupview/groupPanel.d.ts +0 -7
- package/dist/cjs/groupview/groupview.d.ts +15 -8
- package/dist/cjs/groupview/groupview.js +38 -125
- package/dist/cjs/groupview/groupview.js.map +1 -1
- package/dist/cjs/groupview/groupviewPanel.d.ts +5 -2
- package/dist/cjs/groupview/groupviewPanel.js.map +1 -1
- package/dist/cjs/groupview/panel/content.js +1 -0
- package/dist/cjs/groupview/panel/content.js.map +1 -1
- package/dist/cjs/groupview/tab.d.ts +10 -13
- package/dist/cjs/groupview/tab.js +22 -80
- package/dist/cjs/groupview/tab.js.map +1 -1
- package/dist/cjs/groupview/titlebar/tabsContainer.js +6 -8
- package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/lifecycle.js +2 -1
- package/dist/cjs/lifecycle.js.map +1 -1
- package/dist/cjs/panel/types.d.ts +0 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +32 -29
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
- package/dist/cjs/paneview/paneview.d.ts +1 -1
- package/dist/cjs/paneview/paneview.js +2 -5
- package/dist/cjs/paneview/paneview.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +6 -5
- package/dist/cjs/paneview/paneviewComponent.js +11 -16
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/paneview/paneviewPanel.d.ts +5 -1
- package/dist/cjs/paneview/paneviewPanel.js +14 -2
- package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
- package/dist/cjs/react/deserializer.js +1 -3
- package/dist/cjs/react/deserializer.js.map +1 -1
- package/dist/cjs/react/dockview/dockview.d.ts +9 -9
- package/dist/cjs/react/dockview/dockview.js +14 -1
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/dockview/reactContentPart.js +4 -4
- package/dist/cjs/react/dockview/reactContentPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactHeaderPart.js +1 -0
- package/dist/cjs/react/dockview/reactHeaderPart.js.map +1 -1
- package/dist/cjs/react/dockview/reactWatermarkPart.d.ts +1 -2
- package/dist/cjs/react/dockview/reactWatermarkPart.js +1 -2
- package/dist/cjs/react/dockview/reactWatermarkPart.js.map +1 -1
- package/dist/cjs/react/gridview/view.js +2 -2
- package/dist/cjs/react/gridview/view.js.map +1 -1
- package/dist/cjs/react/index.d.ts +1 -0
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/react/react.js +1 -2
- package/dist/cjs/react/react.js.map +1 -1
- package/dist/cjs/react/splitview/view.js +2 -2
- package/dist/cjs/react/splitview/view.js.map +1 -1
- package/dist/cjs/splitview/core/splitview.js +1 -1
- package/dist/cjs/splitview/core/splitview.js.map +1 -1
- package/dist/cjs/splitview/splitviewComponent.d.ts +9 -6
- package/dist/cjs/splitview/splitviewComponent.js +11 -1
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/cjs/splitview/splitviewPanel.d.ts +1 -6
- package/dist/cjs/splitview/splitviewPanel.js +5 -3
- package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
- package/dist/dockview.amd.js +480 -567
- package/dist/dockview.amd.min.js +2 -16
- package/dist/dockview.amd.min.noStyle.js +2 -16
- package/dist/dockview.amd.noStyle.js +479 -566
- package/dist/dockview.cjs.js +480 -567
- package/dist/dockview.esm.js +480 -563
- package/dist/dockview.esm.min.js +2 -16
- package/dist/dockview.js +480 -567
- package/dist/dockview.min.js +2 -16
- package/dist/dockview.min.noStyle.js +2 -16
- package/dist/dockview.noStyle.js +479 -566
- package/dist/esm/api/component.api.d.ts +32 -17
- package/dist/esm/api/component.api.js +71 -20
- package/dist/esm/api/gridviewPanelApi.js +1 -0
- package/dist/esm/api/groupPanelApi.d.ts +11 -14
- package/dist/esm/api/groupPanelApi.js +18 -13
- package/dist/esm/api/panelApi.d.ts +0 -25
- package/dist/esm/api/panelApi.js +1 -20
- package/dist/esm/api/paneviewPanelApi.js +1 -0
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -1
- package/dist/esm/api/splitviewPanelApi.js +1 -5
- package/dist/esm/dnd/abstractDragHandler.d.ts +3 -3
- package/dist/esm/dnd/abstractDragHandler.js +9 -8
- package/dist/esm/dnd/dataTransfer.d.ts +0 -25
- package/dist/esm/dnd/dataTransfer.js +0 -40
- package/dist/esm/dnd/dnd.d.ts +1 -14
- package/dist/esm/dnd/dnd.js +1 -69
- package/dist/esm/dnd/droptarget.d.ts +4 -5
- package/dist/esm/dnd/droptarget.js +70 -46
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -1
- package/dist/esm/dockview/components/tab/defaultTab.js +1 -9
- package/dist/esm/dockview/defaultGroupPanelView.js +3 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +27 -19
- package/dist/esm/dockview/dockviewComponent.js +54 -118
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +2 -5
- package/dist/esm/dockview/dockviewGroupPanel.js +2 -30
- package/dist/esm/dockview/options.d.ts +2 -1
- package/dist/esm/events.d.ts +7 -0
- package/dist/esm/events.js +20 -3
- package/dist/esm/gridview/baseComponentGridview.d.ts +9 -0
- package/dist/esm/gridview/baseComponentGridview.js +21 -16
- package/dist/esm/gridview/basePanelView.d.ts +5 -8
- package/dist/esm/gridview/basePanelView.js +10 -8
- package/dist/esm/gridview/branchNode.js +1 -1
- package/dist/esm/gridview/gridview.js +16 -16
- package/dist/esm/gridview/gridviewComponent.d.ts +4 -0
- package/dist/esm/gridview/gridviewComponent.js +5 -0
- package/dist/esm/gridview/gridviewPanel.d.ts +0 -1
- package/dist/esm/gridview/gridviewPanel.js +3 -6
- package/dist/esm/gridview/leafNode.js +1 -0
- package/dist/esm/groupview/groupPanel.d.ts +0 -7
- package/dist/esm/groupview/groupview.d.ts +15 -8
- package/dist/esm/groupview/groupview.js +24 -58
- package/dist/esm/groupview/groupviewPanel.d.ts +5 -2
- package/dist/esm/groupview/panel/content.js +1 -0
- package/dist/esm/groupview/tab.d.ts +10 -13
- package/dist/esm/groupview/tab.js +17 -24
- package/dist/esm/groupview/titlebar/tabsContainer.js +6 -8
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/lifecycle.js +2 -1
- package/dist/esm/panel/types.d.ts +0 -2
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +32 -29
- package/dist/esm/paneview/paneview.d.ts +1 -1
- package/dist/esm/paneview/paneview.js +2 -5
- package/dist/esm/paneview/paneviewComponent.d.ts +6 -5
- package/dist/esm/paneview/paneviewComponent.js +11 -8
- package/dist/esm/paneview/paneviewPanel.d.ts +5 -1
- package/dist/esm/paneview/paneviewPanel.js +10 -2
- package/dist/esm/react/deserializer.js +1 -3
- package/dist/esm/react/dockview/dockview.d.ts +9 -9
- package/dist/esm/react/dockview/dockview.js +15 -2
- package/dist/esm/react/dockview/reactContentPart.js +4 -4
- package/dist/esm/react/dockview/reactHeaderPart.js +1 -0
- package/dist/esm/react/dockview/reactWatermarkPart.d.ts +1 -2
- package/dist/esm/react/dockview/reactWatermarkPart.js +1 -2
- package/dist/esm/react/gridview/view.js +2 -2
- package/dist/esm/react/index.d.ts +1 -0
- package/dist/esm/react/react.js +1 -2
- package/dist/esm/react/splitview/view.js +2 -2
- package/dist/esm/splitview/core/splitview.js +1 -1
- package/dist/esm/splitview/splitviewComponent.d.ts +9 -6
- package/dist/esm/splitview/splitviewComponent.js +10 -2
- package/dist/esm/splitview/splitviewPanel.d.ts +1 -6
- package/dist/esm/splitview/splitviewPanel.js +5 -3
- package/dist/styles/dockview.css +5 -9
- package/package.json +4 -4
- package/dist/cjs/functions.d.ts +0 -1
- package/dist/cjs/functions.js +0 -42
- package/dist/cjs/functions.js.map +0 -1
- package/dist/cjs/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/cjs/groupview/panel/hostedPanel.js +0 -57
- package/dist/cjs/groupview/panel/hostedPanel.js.map +0 -1
- package/dist/cjs/json.d.ts +0 -1
- package/dist/cjs/json.js +0 -14
- package/dist/cjs/json.js.map +0 -1
- package/dist/esm/functions.d.ts +0 -1
- package/dist/esm/functions.js +0 -8
- package/dist/esm/groupview/panel/hostedPanel.d.ts +0 -22
- package/dist/esm/groupview/panel/hostedPanel.js +0 -43
- package/dist/esm/json.d.ts +0 -1
- package/dist/esm/json.js +0 -9
package/dist/dockview.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 = [];
|
|
@@ -127,6 +126,24 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
127
126
|
element.removeEventListener(type, listener);
|
|
128
127
|
},
|
|
129
128
|
};
|
|
129
|
+
}
|
|
130
|
+
class TickDelayedEvent {
|
|
131
|
+
constructor() {
|
|
132
|
+
this._onFired = new Emitter();
|
|
133
|
+
this.onEvent = this._onFired.event;
|
|
134
|
+
}
|
|
135
|
+
fire() {
|
|
136
|
+
if (this.timer) {
|
|
137
|
+
clearTimeout(this.timer);
|
|
138
|
+
}
|
|
139
|
+
this.timer = setTimeout(() => {
|
|
140
|
+
this._onFired.fire();
|
|
141
|
+
clearTimeout(this.timer);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
dispose() {
|
|
145
|
+
this._onFired.dispose();
|
|
146
|
+
}
|
|
130
147
|
}
|
|
131
148
|
|
|
132
149
|
exports.Disposable = void 0;
|
|
@@ -145,7 +162,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
145
162
|
return new CompositeDisposable(...args);
|
|
146
163
|
}
|
|
147
164
|
addDisposables(...args) {
|
|
148
|
-
args
|
|
165
|
+
args.forEach((arg) => this.disposables.push(arg));
|
|
149
166
|
}
|
|
150
167
|
dispose() {
|
|
151
168
|
this.disposables.forEach((arg) => arg.dispose());
|
|
@@ -164,20 +181,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
164
181
|
dispose() {
|
|
165
182
|
if (this._disposable) {
|
|
166
183
|
this._disposable.dispose();
|
|
184
|
+
this._disposable = exports.Disposable.NONE;
|
|
167
185
|
}
|
|
168
186
|
}
|
|
169
187
|
}
|
|
170
188
|
|
|
171
|
-
function tryParseJSON(text, reviver) {
|
|
172
|
-
try {
|
|
173
|
-
return JSON.parse(text, reviver);
|
|
174
|
-
}
|
|
175
|
-
catch (err) {
|
|
176
|
-
console.warn('failed to parse JSON');
|
|
177
|
-
return undefined;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
189
|
class TransferObject {
|
|
182
190
|
constructor() {
|
|
183
191
|
//
|
|
@@ -198,45 +206,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
198
206
|
this.paneId = paneId;
|
|
199
207
|
}
|
|
200
208
|
}
|
|
201
|
-
const DATA_KEY = 'splitview/transfer';
|
|
202
|
-
const isPanelTransferEvent = (event) => {
|
|
203
|
-
if (!event.dataTransfer) {
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
return event.dataTransfer.types.includes(DATA_KEY);
|
|
207
|
-
};
|
|
208
|
-
exports.DragType = void 0;
|
|
209
|
-
(function (DragType) {
|
|
210
|
-
DragType["DOCKVIEW_TAB"] = "dockview_tab";
|
|
211
|
-
DragType["EXTERNAL"] = "external_group_drag";
|
|
212
|
-
})(exports.DragType || (exports.DragType = {}));
|
|
213
|
-
/**
|
|
214
|
-
* Determine whether this data belong to that of an event that was started by
|
|
215
|
-
* dragging a tab component
|
|
216
|
-
*/
|
|
217
|
-
const isTabDragEvent = (data) => {
|
|
218
|
-
return data.type === exports.DragType.DOCKVIEW_TAB;
|
|
219
|
-
};
|
|
220
|
-
/**
|
|
221
|
-
* Determine whether this data belong to that of an event that was started by
|
|
222
|
-
* a custom drag-enable component
|
|
223
|
-
*/
|
|
224
|
-
const isCustomDragEvent = (data) => {
|
|
225
|
-
return data.type === exports.DragType.EXTERNAL;
|
|
226
|
-
};
|
|
227
|
-
const extractData = (event) => {
|
|
228
|
-
if (!event.dataTransfer) {
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
const data = tryParseJSON(event.dataTransfer.getData(DATA_KEY));
|
|
232
|
-
if (!data) {
|
|
233
|
-
console.warn(`[dragEvent] ${DATA_KEY} data is missing`);
|
|
234
|
-
}
|
|
235
|
-
if (typeof data.type !== 'string') {
|
|
236
|
-
console.warn(`[dragEvent] invalid type ${data.type}`);
|
|
237
|
-
}
|
|
238
|
-
return data;
|
|
239
|
-
};
|
|
240
209
|
/**
|
|
241
210
|
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
242
211
|
*/
|
|
@@ -306,11 +275,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
306
275
|
get length() {
|
|
307
276
|
return this.component.length;
|
|
308
277
|
}
|
|
278
|
+
get orientation() {
|
|
279
|
+
return this.component.orientation;
|
|
280
|
+
}
|
|
309
281
|
get onDidLayoutChange() {
|
|
310
282
|
return this.component.onDidLayoutChange;
|
|
311
283
|
}
|
|
312
|
-
get
|
|
313
|
-
return this.component.
|
|
284
|
+
get onDidAddView() {
|
|
285
|
+
return this.component.onDidAddView;
|
|
286
|
+
}
|
|
287
|
+
get onDidRemoveView() {
|
|
288
|
+
return this.component.onDidRemoveView;
|
|
314
289
|
}
|
|
315
290
|
updateOptions(options) {
|
|
316
291
|
this.component.updateOptions(options);
|
|
@@ -356,21 +331,38 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
356
331
|
constructor(component) {
|
|
357
332
|
this.component = component;
|
|
358
333
|
}
|
|
359
|
-
get width() {
|
|
360
|
-
return this.component.width;
|
|
361
|
-
}
|
|
362
|
-
get height() {
|
|
363
|
-
return this.component.height;
|
|
364
|
-
}
|
|
365
334
|
get minimumSize() {
|
|
366
335
|
return this.component.minimumSize;
|
|
367
336
|
}
|
|
368
337
|
get maximumSize() {
|
|
369
338
|
return this.component.maximumSize;
|
|
370
339
|
}
|
|
340
|
+
get height() {
|
|
341
|
+
return this.component.height;
|
|
342
|
+
}
|
|
343
|
+
get width() {
|
|
344
|
+
return this.component.width;
|
|
345
|
+
}
|
|
371
346
|
get onDidLayoutChange() {
|
|
372
347
|
return this.component.onDidLayoutChange;
|
|
373
348
|
}
|
|
349
|
+
get onDidAddView() {
|
|
350
|
+
return this.component.onDidAddView;
|
|
351
|
+
}
|
|
352
|
+
get onDidRemoveView() {
|
|
353
|
+
return this.component.onDidRemoveView;
|
|
354
|
+
}
|
|
355
|
+
get onDidDrop() {
|
|
356
|
+
const emitter = new Emitter();
|
|
357
|
+
const disposable = this.component.onDidDrop((e) => {
|
|
358
|
+
emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
|
|
359
|
+
});
|
|
360
|
+
emitter.dispose = () => {
|
|
361
|
+
disposable.dispose();
|
|
362
|
+
emitter.dispose();
|
|
363
|
+
};
|
|
364
|
+
return emitter.event;
|
|
365
|
+
}
|
|
374
366
|
getPanels() {
|
|
375
367
|
return this.component.getPanels();
|
|
376
368
|
}
|
|
@@ -406,12 +398,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
406
398
|
constructor(component) {
|
|
407
399
|
this.component = component;
|
|
408
400
|
}
|
|
409
|
-
get width() {
|
|
410
|
-
return this.component.width;
|
|
411
|
-
}
|
|
412
|
-
get height() {
|
|
413
|
-
return this.component.height;
|
|
414
|
-
}
|
|
415
401
|
get minimumHeight() {
|
|
416
402
|
return this.component.minimumHeight;
|
|
417
403
|
}
|
|
@@ -424,12 +410,30 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
424
410
|
get maximumWidth() {
|
|
425
411
|
return this.component.maximumWidth;
|
|
426
412
|
}
|
|
413
|
+
get width() {
|
|
414
|
+
return this.component.width;
|
|
415
|
+
}
|
|
416
|
+
get height() {
|
|
417
|
+
return this.component.height;
|
|
418
|
+
}
|
|
427
419
|
get onGridEvent() {
|
|
428
420
|
return this.component.onGridEvent;
|
|
429
421
|
}
|
|
430
422
|
get onDidLayoutChange() {
|
|
431
423
|
return this.component.onDidLayoutChange;
|
|
432
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
|
+
}
|
|
433
437
|
get panels() {
|
|
434
438
|
return this.component.groups;
|
|
435
439
|
}
|
|
@@ -507,6 +511,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
507
511
|
get onGridEvent() {
|
|
508
512
|
return this.component.onGridEvent;
|
|
509
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
|
+
}
|
|
510
535
|
get onDidLayoutChange() {
|
|
511
536
|
return this.component.onDidLayoutChange;
|
|
512
537
|
}
|
|
@@ -534,18 +559,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
534
559
|
getPanel(id) {
|
|
535
560
|
return this.component.getGroupPanel(id);
|
|
536
561
|
}
|
|
537
|
-
setActivePanel(panel) {
|
|
538
|
-
this.component.setActivePanel(panel);
|
|
539
|
-
}
|
|
540
562
|
layout(width, height, force = false) {
|
|
541
563
|
this.component.layout(width, height, force);
|
|
542
564
|
}
|
|
543
565
|
addPanel(options) {
|
|
544
566
|
return this.component.addPanel(options);
|
|
545
567
|
}
|
|
546
|
-
removePanel(panel) {
|
|
547
|
-
this.component.removePanel(panel);
|
|
548
|
-
}
|
|
549
568
|
addEmptyGroup(options) {
|
|
550
569
|
this.component.addEmptyGroup(options);
|
|
551
570
|
}
|
|
@@ -893,7 +912,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
893
912
|
this._onDidAddView = new Emitter();
|
|
894
913
|
this.onDidAddView = this._onDidAddView.event;
|
|
895
914
|
this._onDidRemoveView = new Emitter();
|
|
896
|
-
this.onDidRemoveView = this.
|
|
915
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
897
916
|
this._startSnappingEnabled = true;
|
|
898
917
|
this._endSnappingEnabled = true;
|
|
899
918
|
this.resize = (index, delta, sizes = this.views.map((x) => x.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) => {
|
|
@@ -1535,9 +1554,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1535
1554
|
var _a;
|
|
1536
1555
|
super();
|
|
1537
1556
|
this.paneItems = [];
|
|
1557
|
+
this.skipAnimation = false;
|
|
1538
1558
|
this._onDidChange = new Emitter();
|
|
1539
1559
|
this.onDidChange = this._onDidChange.event;
|
|
1540
|
-
this.skipAnimation = false;
|
|
1541
1560
|
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.VERTICAL;
|
|
1542
1561
|
this.element = document.createElement('div');
|
|
1543
1562
|
this.element.className = 'pane-container';
|
|
@@ -1565,7 +1584,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1565
1584
|
this.paneItems.push(paneItem);
|
|
1566
1585
|
pane.orthogonalSize = this.splitview.orthogonalSize;
|
|
1567
1586
|
});
|
|
1568
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
1587
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1569
1588
|
this._onDidChange.fire(undefined);
|
|
1570
1589
|
}), this.splitview.onDidAddView(() => {
|
|
1571
1590
|
this._onDidChange.fire();
|
|
@@ -1637,9 +1656,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1637
1656
|
}
|
|
1638
1657
|
}
|
|
1639
1658
|
layout(size, orthogonalSize) {
|
|
1640
|
-
// for (const paneItem of this.paneItems) {
|
|
1641
|
-
// paneItem.pane.orthogonalSize = orthogonalSize;
|
|
1642
|
-
// }
|
|
1643
1659
|
this.splitview.layout(size, orthogonalSize);
|
|
1644
1660
|
}
|
|
1645
1661
|
setupAnimation() {
|
|
@@ -1729,7 +1745,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1729
1745
|
this.options = options;
|
|
1730
1746
|
this._onDrop = new Emitter();
|
|
1731
1747
|
this.onDrop = this._onDrop.event;
|
|
1732
|
-
this.addDisposables(new DragAndDropObserver(this.element, {
|
|
1748
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1733
1749
|
onDragEnter: (e) => undefined,
|
|
1734
1750
|
onDragOver: (e) => {
|
|
1735
1751
|
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
@@ -1765,51 +1781,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1765
1781
|
const y = e.offsetY;
|
|
1766
1782
|
const xp = (100 * x) / width;
|
|
1767
1783
|
const yp = (100 * y) / height;
|
|
1768
|
-
|
|
1769
|
-
let isLeft = false;
|
|
1770
|
-
let isTop = false;
|
|
1771
|
-
let isBottom = false;
|
|
1772
|
-
switch (this.options.validOverlays) {
|
|
1773
|
-
case 'all':
|
|
1774
|
-
isRight = xp > 80;
|
|
1775
|
-
isLeft = xp < 20;
|
|
1776
|
-
isTop = !isRight && !isLeft && yp < 20;
|
|
1777
|
-
isBottom = !isRight && !isLeft && yp > 80;
|
|
1778
|
-
break;
|
|
1779
|
-
case 'vertical':
|
|
1780
|
-
isTop = yp < 50;
|
|
1781
|
-
isBottom = yp >= 50;
|
|
1782
|
-
break;
|
|
1783
|
-
case 'horizontal':
|
|
1784
|
-
isLeft = xp < 50;
|
|
1785
|
-
isRight = xp >= 50;
|
|
1786
|
-
break;
|
|
1787
|
-
}
|
|
1784
|
+
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1788
1785
|
const isSmallX = width < 100;
|
|
1789
1786
|
const isSmallY = height < 100;
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1793
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1794
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1795
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1796
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1797
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1798
|
-
if (isRight) {
|
|
1799
|
-
this._state = exports.Position.Right;
|
|
1800
|
-
}
|
|
1801
|
-
else if (isLeft) {
|
|
1802
|
-
this._state = exports.Position.Left;
|
|
1803
|
-
}
|
|
1804
|
-
else if (isTop) {
|
|
1805
|
-
this._state = exports.Position.Top;
|
|
1806
|
-
}
|
|
1807
|
-
else if (isBottom) {
|
|
1808
|
-
this._state = exports.Position.Bottom;
|
|
1809
|
-
}
|
|
1810
|
-
else {
|
|
1811
|
-
this._state = exports.Position.Center;
|
|
1812
|
-
}
|
|
1787
|
+
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1788
|
+
this.setState(quadrant);
|
|
1813
1789
|
},
|
|
1814
1790
|
onDragLeave: (e) => {
|
|
1815
1791
|
this.removeDropTarget();
|
|
@@ -1823,7 +1799,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1823
1799
|
const state = this._state;
|
|
1824
1800
|
this.removeDropTarget();
|
|
1825
1801
|
if (state) {
|
|
1826
|
-
this._onDrop.fire({ position: state,
|
|
1802
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
1827
1803
|
}
|
|
1828
1804
|
},
|
|
1829
1805
|
}));
|
|
@@ -1838,9 +1814,73 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1838
1814
|
this.options.canDisplayOverlay = value;
|
|
1839
1815
|
}
|
|
1840
1816
|
dispose() {
|
|
1841
|
-
this._onDrop.dispose();
|
|
1842
1817
|
this.removeDropTarget();
|
|
1843
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
|
+
}
|
|
1844
1884
|
removeDropTarget() {
|
|
1845
1885
|
if (this.target) {
|
|
1846
1886
|
this._state = undefined;
|
|
@@ -1943,6 +1983,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1943
1983
|
this.view.layout(this.width, this.height);
|
|
1944
1984
|
}
|
|
1945
1985
|
dispose() {
|
|
1986
|
+
this._onDidChange.dispose();
|
|
1946
1987
|
this._disposable.dispose();
|
|
1947
1988
|
}
|
|
1948
1989
|
}
|
|
@@ -1994,7 +2035,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
1994
2035
|
proportionalLayout,
|
|
1995
2036
|
});
|
|
1996
2037
|
}
|
|
1997
|
-
this.addDisposables(this.splitview.onDidSashEnd(() => {
|
|
2038
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1998
2039
|
this._onDidChange.fire(undefined);
|
|
1999
2040
|
}));
|
|
2000
2041
|
this.setupChildrenEvents();
|
|
@@ -2166,6 +2207,15 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2166
2207
|
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
2167
2208
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
2168
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
|
+
}
|
|
2169
2219
|
function flipNode(node, size, orthogonalSize) {
|
|
2170
2220
|
if (node instanceof BranchNode) {
|
|
2171
2221
|
const result = new BranchNode(orthogonal(node.orientation), node.proportionalLayout, node.styles, size, orthogonalSize);
|
|
@@ -2304,13 +2354,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2304
2354
|
}
|
|
2305
2355
|
deserialize(json, deserializer) {
|
|
2306
2356
|
const orientation = json.orientation;
|
|
2307
|
-
const height = json.height;
|
|
2357
|
+
const height = orientation === exports.Orientation.VERTICAL ? json.height : json.width;
|
|
2308
2358
|
this._deserialize(json.root, orientation, deserializer, height);
|
|
2309
2359
|
}
|
|
2310
2360
|
_deserialize(root, orientation, deserializer, orthogonalSize) {
|
|
2311
|
-
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize);
|
|
2361
|
+
this.root = this._deserializeNode(root, orientation, deserializer, orthogonalSize, true);
|
|
2312
2362
|
}
|
|
2313
|
-
_deserializeNode(node, orientation, deserializer, orthogonalSize) {
|
|
2363
|
+
_deserializeNode(node, orientation, deserializer, orthogonalSize, isRoot = false) {
|
|
2314
2364
|
let result;
|
|
2315
2365
|
if (node.type === 'branch') {
|
|
2316
2366
|
const serializedChildren = node.data;
|
|
@@ -2320,7 +2370,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2320
2370
|
visible: serializedChild.visible,
|
|
2321
2371
|
};
|
|
2322
2372
|
});
|
|
2323
|
-
|
|
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);
|
|
2324
2376
|
}
|
|
2325
2377
|
else {
|
|
2326
2378
|
result = new LeafNode(deserializer.fromJSON(node), orientation, orthogonalSize, node.size);
|
|
@@ -2381,15 +2433,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2381
2433
|
if (!(node instanceof LeafNode)) {
|
|
2382
2434
|
throw new Error('invalid location');
|
|
2383
2435
|
}
|
|
2384
|
-
const findLeaf = (candiateNode, last) => {
|
|
2385
|
-
if (candiateNode instanceof LeafNode) {
|
|
2386
|
-
return candiateNode;
|
|
2387
|
-
}
|
|
2388
|
-
if (candiateNode instanceof BranchNode) {
|
|
2389
|
-
return findLeaf(candiateNode.children[last ? candiateNode.children.length - 1 : 0], last);
|
|
2390
|
-
}
|
|
2391
|
-
throw new Error('invalid node');
|
|
2392
|
-
};
|
|
2393
2436
|
for (let i = path.length - 1; i > -1; i--) {
|
|
2394
2437
|
const n = path[i];
|
|
2395
2438
|
const l = location[i] || 0;
|
|
@@ -2486,15 +2529,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2486
2529
|
}
|
|
2487
2530
|
parent.removeChild(index, sizing);
|
|
2488
2531
|
if (parent.children.length === 0) {
|
|
2489
|
-
// throw new Error('Invalid grid state');
|
|
2490
2532
|
return node.view;
|
|
2491
2533
|
}
|
|
2492
2534
|
if (parent.children.length > 1) {
|
|
2493
2535
|
return node.view;
|
|
2494
2536
|
}
|
|
2537
|
+
const sibling = parent.children[0];
|
|
2495
2538
|
if (pathToParent.length === 0) {
|
|
2496
2539
|
// parent is root
|
|
2497
|
-
const sibling = parent.children[0];
|
|
2498
2540
|
if (sibling instanceof LeafNode) {
|
|
2499
2541
|
return node.view;
|
|
2500
2542
|
}
|
|
@@ -2505,7 +2547,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2505
2547
|
}
|
|
2506
2548
|
const [grandParent, ..._] = [...pathToParent].reverse();
|
|
2507
2549
|
const [parentIndex, ...__] = [...rest].reverse();
|
|
2508
|
-
const sibling = parent.children[0];
|
|
2509
2550
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
2510
2551
|
parent.removeChild(0, sizing);
|
|
2511
2552
|
const sizes = grandParent.children.map((size, i) => grandParent.getChildSize(i));
|
|
@@ -2552,31 +2593,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2552
2593
|
}
|
|
2553
2594
|
}
|
|
2554
2595
|
|
|
2555
|
-
/*! *****************************************************************************
|
|
2556
|
-
Copyright (c) Microsoft Corporation.
|
|
2557
|
-
|
|
2558
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2559
|
-
purpose with or without fee is hereby granted.
|
|
2560
|
-
|
|
2561
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2562
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2563
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2564
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2565
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2566
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2567
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2568
|
-
***************************************************************************** */
|
|
2569
|
-
|
|
2570
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2571
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2572
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2573
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2574
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2575
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2576
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2577
|
-
});
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
2596
|
class ContentContainer extends CompositeDisposable {
|
|
2581
2597
|
constructor() {
|
|
2582
2598
|
super();
|
|
@@ -2588,6 +2604,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2588
2604
|
this._element = document.createElement('div');
|
|
2589
2605
|
this._element.className = 'content-container';
|
|
2590
2606
|
this._element.tabIndex = -1;
|
|
2607
|
+
this.addDisposables(this._onDidFocus, this._onDidBlur);
|
|
2591
2608
|
// for hosted containers
|
|
2592
2609
|
// 1) register a drop target on the host
|
|
2593
2610
|
// 2) register window dragStart events to disable pointer events
|
|
@@ -2654,6 +2671,41 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2654
2671
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2655
2672
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2656
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
|
+
|
|
2657
2709
|
exports.MouseEventKind = void 0;
|
|
2658
2710
|
(function (MouseEventKind) {
|
|
2659
2711
|
MouseEventKind["CLICK"] = "CLICK";
|
|
@@ -2663,42 +2715,34 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2663
2715
|
constructor(panelId, accessor, group) {
|
|
2664
2716
|
super();
|
|
2665
2717
|
this.panelId = panelId;
|
|
2666
|
-
this.accessor = accessor;
|
|
2667
2718
|
this.group = group;
|
|
2668
2719
|
this._onChanged = new Emitter();
|
|
2669
2720
|
this.onChanged = this._onChanged.event;
|
|
2670
2721
|
this._onDropped = new Emitter();
|
|
2671
2722
|
this.onDrop = this._onDropped.event;
|
|
2672
|
-
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2673
|
-
this.iframes = [];
|
|
2674
2723
|
this.addDisposables(this._onChanged, this._onDropped);
|
|
2675
2724
|
this._element = document.createElement('div');
|
|
2676
2725
|
this._element.className = 'tab';
|
|
2677
2726
|
this._element.tabIndex = 0;
|
|
2678
2727
|
this._element.draggable = true;
|
|
2679
|
-
this.addDisposables(
|
|
2680
|
-
|
|
2681
|
-
...
|
|
2682
|
-
|
|
2683
|
-
];
|
|
2684
|
-
for (const iframe of this.iframes) {
|
|
2685
|
-
iframe.style.pointerEvents = 'none';
|
|
2728
|
+
this.addDisposables(new (class Handler extends DragHandler {
|
|
2729
|
+
constructor() {
|
|
2730
|
+
super(...arguments);
|
|
2731
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2686
2732
|
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
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
|
+
};
|
|
2694
2740
|
}
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
iframe.style.pointerEvents = 'auto';
|
|
2741
|
+
dispose() {
|
|
2742
|
+
//
|
|
2698
2743
|
}
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
}), addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2744
|
+
})(this._element));
|
|
2745
|
+
this.addDisposables(addDisposableListener(this._element, 'mousedown', (event) => {
|
|
2702
2746
|
if (event.defaultPrevented) {
|
|
2703
2747
|
return;
|
|
2704
2748
|
}
|
|
@@ -2787,7 +2831,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2787
2831
|
});
|
|
2788
2832
|
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
2789
2833
|
this._onDrop.fire({
|
|
2790
|
-
event: event.
|
|
2834
|
+
event: event.nativeEvent,
|
|
2791
2835
|
index: this.tabs.length,
|
|
2792
2836
|
});
|
|
2793
2837
|
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
@@ -2900,16 +2944,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2900
2944
|
if (!isLeftClick || event.event.defaultPrevented) {
|
|
2901
2945
|
return;
|
|
2902
2946
|
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
});
|
|
2908
|
-
break;
|
|
2947
|
+
if (event.kind === exports.MouseEventKind.CLICK) {
|
|
2948
|
+
this.group.model.openPanel(panel, {
|
|
2949
|
+
skipFocus: alreadyFocused,
|
|
2950
|
+
});
|
|
2909
2951
|
}
|
|
2910
2952
|
}), tabToAdd.onDrop((event) => {
|
|
2911
2953
|
this._onDrop.fire({
|
|
2912
|
-
event: event.
|
|
2954
|
+
event: event.nativeEvent,
|
|
2913
2955
|
index: this.tabs.findIndex((x) => x.value === tabToAdd),
|
|
2914
2956
|
});
|
|
2915
2957
|
}));
|
|
@@ -2934,7 +2976,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2934
2976
|
GroupChangeKind2["ADD_PANEL"] = "ADD_PANEL";
|
|
2935
2977
|
GroupChangeKind2["REMOVE_PANEL"] = "REMOVE_PANEL";
|
|
2936
2978
|
GroupChangeKind2["PANEL_ACTIVE"] = "PANEL_ACTIVE";
|
|
2937
|
-
GroupChangeKind2["GROUP_ACTIVE"] = "GROUP_ACTIVE";
|
|
2938
2979
|
})(exports.GroupChangeKind2 || (exports.GroupChangeKind2 = {}));
|
|
2939
2980
|
class Groupview extends CompositeDisposable {
|
|
2940
2981
|
constructor(container, accessor, id, options, parent) {
|
|
@@ -2955,15 +2996,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2955
2996
|
this.onMove = this._onMove.event;
|
|
2956
2997
|
this._onDidGroupChange = new Emitter();
|
|
2957
2998
|
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
2958
|
-
this.
|
|
2959
|
-
|
|
2960
|
-
return false;
|
|
2961
|
-
}
|
|
2962
|
-
this.doClose(panel);
|
|
2963
|
-
return true;
|
|
2964
|
-
});
|
|
2999
|
+
this._onDidDrop = new Emitter();
|
|
3000
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
2965
3001
|
this.container.classList.add('groupview');
|
|
2966
|
-
this.addDisposables(this._onMove, this._onDidGroupChange);
|
|
3002
|
+
this.addDisposables(this._onMove, this._onDidGroupChange, this._onDidChange, this._onDidDrop);
|
|
2967
3003
|
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
2968
3004
|
tabHeight: options.tabHeight,
|
|
2969
3005
|
});
|
|
@@ -2985,9 +3021,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
2985
3021
|
}), this.contentContainer.onDidFocus(() => {
|
|
2986
3022
|
this.accessor.doSetGroupActive(this.parent, true);
|
|
2987
3023
|
}), this.contentContainer.onDidBlur(() => {
|
|
2988
|
-
//
|
|
3024
|
+
// noop
|
|
2989
3025
|
}), this.dropTarget.onDrop((event) => {
|
|
2990
|
-
this.handleDropEvent(event.
|
|
3026
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
2991
3027
|
}));
|
|
2992
3028
|
}
|
|
2993
3029
|
get element() {
|
|
@@ -3120,6 +3156,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3120
3156
|
options.index > this.panels.length) {
|
|
3121
3157
|
options.index = this.panels.length;
|
|
3122
3158
|
}
|
|
3159
|
+
// ensure the group is updated before we fire any events
|
|
3160
|
+
panel.updateParentGroup(this.parent, true);
|
|
3123
3161
|
if (this._activePanel === panel) {
|
|
3124
3162
|
this.accessor.doSetGroupActive(this.parent);
|
|
3125
3163
|
return;
|
|
@@ -3140,43 +3178,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3140
3178
|
return this._removePanel(panelToRemove);
|
|
3141
3179
|
}
|
|
3142
3180
|
closeAllPanels() {
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
const
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
if (this._activePanel && index > -1) {
|
|
3149
|
-
if (this.panels.indexOf(this._activePanel) < 0) {
|
|
3150
|
-
console.warn('active panel not tracked');
|
|
3151
|
-
}
|
|
3152
|
-
const canClose = !((_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.close) || (yield this._activePanel.close());
|
|
3153
|
-
if (!canClose) {
|
|
3154
|
-
return false;
|
|
3155
|
-
}
|
|
3156
|
-
}
|
|
3157
|
-
for (let i = 0; i < this.panels.length; i++) {
|
|
3158
|
-
if (i === index) {
|
|
3159
|
-
continue;
|
|
3160
|
-
}
|
|
3161
|
-
const panel = this.panels[i];
|
|
3162
|
-
this.openPanel(panel);
|
|
3163
|
-
if (panel.close) {
|
|
3164
|
-
const canClose = yield panel.close();
|
|
3165
|
-
if (!canClose) {
|
|
3166
|
-
return false;
|
|
3167
|
-
}
|
|
3168
|
-
}
|
|
3169
|
-
}
|
|
3170
|
-
if (this.panels.length > 0) {
|
|
3171
|
-
// take a copy since we will be edting the array as we iterate through
|
|
3172
|
-
const arrPanelCpy = [...this.panels];
|
|
3173
|
-
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);
|
|
3174
3186
|
}
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3187
|
+
}
|
|
3188
|
+
else {
|
|
3189
|
+
this.accessor.removeGroup(this.parent);
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
closePanel(panel) {
|
|
3193
|
+
this.doClose(panel);
|
|
3180
3194
|
}
|
|
3181
3195
|
doClose(panel) {
|
|
3182
3196
|
this.accessor.removePanel(panel);
|
|
@@ -3319,8 +3333,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3319
3333
|
this.tabsContainer.show();
|
|
3320
3334
|
}
|
|
3321
3335
|
}
|
|
3322
|
-
canDisplayOverlay(
|
|
3336
|
+
canDisplayOverlay(event, target) {
|
|
3323
3337
|
// custom overlay handler
|
|
3338
|
+
if (this.accessor.options.showDndOverlay) {
|
|
3339
|
+
return this.accessor.options.showDndOverlay(event, target);
|
|
3340
|
+
}
|
|
3324
3341
|
return false;
|
|
3325
3342
|
}
|
|
3326
3343
|
handleDropEvent(event, position, index) {
|
|
@@ -3345,6 +3362,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3345
3362
|
index,
|
|
3346
3363
|
});
|
|
3347
3364
|
}
|
|
3365
|
+
else {
|
|
3366
|
+
this._onDidDrop.fire({ nativeEvent: event, position, index });
|
|
3367
|
+
}
|
|
3348
3368
|
}
|
|
3349
3369
|
dispose() {
|
|
3350
3370
|
for (const panel of this.panels) {
|
|
@@ -3397,19 +3417,21 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3397
3417
|
this.onGridEvent = this._onGridEvent.event;
|
|
3398
3418
|
this._onDidLayoutChange = new Emitter();
|
|
3399
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;
|
|
3400
3426
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3401
3427
|
this.element.appendChild(this.gridview.element);
|
|
3402
|
-
|
|
3403
|
-
this.layout(0, 0, true);
|
|
3428
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3404
3429
|
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3405
3430
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT });
|
|
3406
3431
|
}));
|
|
3407
3432
|
this.addDisposables((() => {
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
*/
|
|
3411
|
-
let timer;
|
|
3412
|
-
return this.onGridEvent((event) => {
|
|
3433
|
+
const tickDelayedEvent = new TickDelayedEvent();
|
|
3434
|
+
return new CompositeDisposable(this.onGridEvent((event) => {
|
|
3413
3435
|
if ([
|
|
3414
3436
|
exports.GroupChangeKind.ADD_GROUP,
|
|
3415
3437
|
exports.GroupChangeKind.REMOVE_GROUP,
|
|
@@ -3419,15 +3441,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3419
3441
|
exports.GroupChangeKind.PANEL_ACTIVE,
|
|
3420
3442
|
exports.GroupChangeKind.LAYOUT,
|
|
3421
3443
|
].includes(event.kind)) {
|
|
3422
|
-
|
|
3423
|
-
clearTimeout(timer);
|
|
3424
|
-
}
|
|
3425
|
-
timer = setTimeout(() => {
|
|
3426
|
-
this._onDidLayoutChange.fire();
|
|
3427
|
-
clearTimeout(timer);
|
|
3428
|
-
});
|
|
3444
|
+
tickDelayedEvent.fire();
|
|
3429
3445
|
}
|
|
3430
|
-
})
|
|
3446
|
+
}), tickDelayedEvent.onEvent(() => {
|
|
3447
|
+
this._onDidLayoutChange.fire();
|
|
3448
|
+
}), tickDelayedEvent);
|
|
3431
3449
|
})());
|
|
3432
3450
|
}
|
|
3433
3451
|
get id() {
|
|
@@ -3473,6 +3491,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3473
3491
|
doAddGroup(group, location = [0], size) {
|
|
3474
3492
|
this.gridview.addView(group, size !== null && size !== void 0 ? size : exports.Sizing.Distribute, location);
|
|
3475
3493
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.ADD_GROUP });
|
|
3494
|
+
this._onDidAddGroup.fire(group);
|
|
3476
3495
|
this.doSetGroupActive(group);
|
|
3477
3496
|
}
|
|
3478
3497
|
doRemoveGroup(group, options) {
|
|
@@ -3486,6 +3505,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3486
3505
|
this._groups.delete(group.id);
|
|
3487
3506
|
}
|
|
3488
3507
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.REMOVE_GROUP });
|
|
3508
|
+
this._onDidRemoveGroup.fire(group);
|
|
3489
3509
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive) && this._activeGroup === group) {
|
|
3490
3510
|
const groups = Array.from(this._groups.values());
|
|
3491
3511
|
this.doSetGroupActive(groups.length > 0 ? groups[0].value : undefined);
|
|
@@ -3516,6 +3536,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3516
3536
|
this._onGridEvent.fire({
|
|
3517
3537
|
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
3518
3538
|
});
|
|
3539
|
+
this._onDidActiveGroupChange.fire(group);
|
|
3519
3540
|
}
|
|
3520
3541
|
removeGroup(group) {
|
|
3521
3542
|
this.doRemoveGroup(group);
|
|
@@ -3572,6 +3593,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3572
3593
|
dispose() {
|
|
3573
3594
|
super.dispose();
|
|
3574
3595
|
this._onGridEvent.dispose();
|
|
3596
|
+
this._onDidActiveGroupChange.dispose();
|
|
3597
|
+
this._onDidAddGroup.dispose();
|
|
3598
|
+
this._onDidRemoveGroup.dispose();
|
|
3599
|
+
this._onDidLayoutChange.dispose();
|
|
3575
3600
|
this.gridview.dispose();
|
|
3576
3601
|
}
|
|
3577
3602
|
}
|
|
@@ -3583,15 +3608,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3583
3608
|
constructor(id) {
|
|
3584
3609
|
super();
|
|
3585
3610
|
this.id = id;
|
|
3586
|
-
this._state = {};
|
|
3587
3611
|
this._isFocused = false;
|
|
3588
3612
|
this._isActive = false;
|
|
3589
3613
|
this._isVisible = true;
|
|
3590
3614
|
this._width = 0;
|
|
3591
3615
|
this._height = 0;
|
|
3592
|
-
this._onDidStateChange = new Emitter();
|
|
3593
|
-
this.onDidStateChange = this._onDidStateChange.event;
|
|
3594
|
-
//
|
|
3595
3616
|
this._onDidPanelDimensionChange = new Emitter({
|
|
3596
3617
|
replay: true,
|
|
3597
3618
|
});
|
|
@@ -3620,7 +3641,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3620
3641
|
//
|
|
3621
3642
|
this._onActiveChange = new Emitter();
|
|
3622
3643
|
this.onActiveChange = this._onActiveChange.event;
|
|
3623
|
-
this.addDisposables(this.
|
|
3644
|
+
this.addDisposables(this._onDidPanelDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this.onDidFocusChange((event) => {
|
|
3624
3645
|
this._isFocused = event.isFocused;
|
|
3625
3646
|
}), this.onDidActiveChange((event) => {
|
|
3626
3647
|
this._isActive = event.isActive;
|
|
@@ -3653,21 +3674,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3653
3674
|
setActive() {
|
|
3654
3675
|
this._onActiveChange.fire();
|
|
3655
3676
|
}
|
|
3656
|
-
setState(key, value) {
|
|
3657
|
-
if (typeof key === 'object') {
|
|
3658
|
-
this._state = key;
|
|
3659
|
-
}
|
|
3660
|
-
else if (typeof value !== undefined) {
|
|
3661
|
-
this._state[key] = value;
|
|
3662
|
-
}
|
|
3663
|
-
this._onDidStateChange.fire(undefined);
|
|
3664
|
-
}
|
|
3665
|
-
getState() {
|
|
3666
|
-
return this._state;
|
|
3667
|
-
}
|
|
3668
|
-
getStateKey(key) {
|
|
3669
|
-
return this._state[key];
|
|
3670
|
-
}
|
|
3671
3677
|
dispose() {
|
|
3672
3678
|
super.dispose();
|
|
3673
3679
|
}
|
|
@@ -3687,6 +3693,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3687
3693
|
//
|
|
3688
3694
|
this._onDidSizeChange = new Emitter();
|
|
3689
3695
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3696
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3690
3697
|
}
|
|
3691
3698
|
setConstraints(value) {
|
|
3692
3699
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3700,19 +3707,19 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3700
3707
|
constructor(panel, group) {
|
|
3701
3708
|
super(panel.id);
|
|
3702
3709
|
this.panel = panel;
|
|
3703
|
-
this._onDidDirtyChange = new Emitter();
|
|
3704
|
-
this.onDidDirtyChange = this._onDidDirtyChange.event;
|
|
3705
3710
|
this._onDidTitleChange = new Emitter();
|
|
3706
3711
|
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3707
3712
|
this._titleChanged = new Emitter();
|
|
3708
3713
|
this.titleChanged = this._titleChanged.event;
|
|
3709
3714
|
this._suppressClosableChanged = new Emitter();
|
|
3710
3715
|
this.suppressClosableChanged = this._suppressClosableChanged.event;
|
|
3711
|
-
this.
|
|
3712
|
-
this.
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
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);
|
|
3716
3723
|
}
|
|
3717
3724
|
get title() {
|
|
3718
3725
|
return this.panel.title;
|
|
@@ -3725,7 +3732,17 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3725
3732
|
return !!((_a = this.group) === null || _a === void 0 ? void 0 : _a.isActive);
|
|
3726
3733
|
}
|
|
3727
3734
|
set group(value) {
|
|
3735
|
+
const isOldGroupActive = this.isGroupActive;
|
|
3728
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
|
+
}
|
|
3729
3746
|
}
|
|
3730
3747
|
get group() {
|
|
3731
3748
|
return this._group;
|
|
@@ -3739,16 +3756,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3739
3756
|
}
|
|
3740
3757
|
return this.group.model.closePanel(this.panel);
|
|
3741
3758
|
}
|
|
3742
|
-
interceptOnCloseAction(interceptor) {
|
|
3743
|
-
this._interceptor = interceptor;
|
|
3744
|
-
}
|
|
3745
|
-
dispose() {
|
|
3746
|
-
super.dispose();
|
|
3747
|
-
}
|
|
3748
3759
|
}
|
|
3749
3760
|
|
|
3750
3761
|
class DockviewGroupPanel extends CompositeDisposable {
|
|
3751
|
-
constructor(id, containerApi) {
|
|
3762
|
+
constructor(id, accessor, containerApi) {
|
|
3752
3763
|
super();
|
|
3753
3764
|
this.id = id;
|
|
3754
3765
|
this.containerApi = containerApi;
|
|
@@ -3756,9 +3767,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3756
3767
|
this._suppressClosable = false;
|
|
3757
3768
|
this._title = '';
|
|
3758
3769
|
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3759
|
-
this.onDidStateChange = this.api.onDidStateChange;
|
|
3760
3770
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
3761
|
-
|
|
3771
|
+
accessor.setActivePanel(this);
|
|
3762
3772
|
}), this.api.onDidTitleChange((event) => {
|
|
3763
3773
|
const title = event.title;
|
|
3764
3774
|
this.update({ params: { title } });
|
|
@@ -3782,32 +3792,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3782
3792
|
this._view = params.view;
|
|
3783
3793
|
this.setTitle(params.title);
|
|
3784
3794
|
this.setSuppressClosable(params.suppressClosable || false);
|
|
3785
|
-
if (params.state) {
|
|
3786
|
-
this.api.setState(params.state);
|
|
3787
|
-
}
|
|
3788
3795
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.init(Object.assign(Object.assign({}, params), { api: this.api, containerApi: this.containerApi }));
|
|
3789
3796
|
}
|
|
3790
3797
|
focus() {
|
|
3791
3798
|
this.api._onFocusEvent.fire();
|
|
3792
3799
|
}
|
|
3793
|
-
setDirty(isDirty) {
|
|
3794
|
-
this.api._onDidDirtyChange.fire(isDirty);
|
|
3795
|
-
}
|
|
3796
|
-
close() {
|
|
3797
|
-
if (this.api.tryClose) {
|
|
3798
|
-
return this.api.tryClose();
|
|
3799
|
-
}
|
|
3800
|
-
return Promise.resolve(true);
|
|
3801
|
-
}
|
|
3802
3800
|
toJSON() {
|
|
3803
|
-
const state = this.api.getState();
|
|
3804
3801
|
return {
|
|
3805
3802
|
id: this.id,
|
|
3806
3803
|
view: this.view.toJSON(),
|
|
3807
3804
|
params: Object.keys(this._params || {}).length > 0
|
|
3808
3805
|
? this._params
|
|
3809
3806
|
: undefined,
|
|
3810
|
-
state: state && Object.keys(state).length > 0 ? state : undefined,
|
|
3811
3807
|
suppressClosable: this.suppressClosable || undefined,
|
|
3812
3808
|
title: this.title,
|
|
3813
3809
|
};
|
|
@@ -3852,18 +3848,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3852
3848
|
var _a;
|
|
3853
3849
|
this._group = group;
|
|
3854
3850
|
this.api.group = group;
|
|
3855
|
-
this.mutableDisposable.value = this._group.model.onDidGroupChange((ev) => {
|
|
3856
|
-
var _a;
|
|
3857
|
-
if (ev.kind === exports.GroupChangeKind2.GROUP_ACTIVE) {
|
|
3858
|
-
const isVisible = !!((_a = this._group) === null || _a === void 0 ? void 0 : _a.model.isPanelActive(this));
|
|
3859
|
-
this.api._onDidActiveChange.fire({
|
|
3860
|
-
isActive: isGroupActive && isVisible,
|
|
3861
|
-
});
|
|
3862
|
-
this.api._onDidVisibilityChange.fire({
|
|
3863
|
-
isVisible,
|
|
3864
|
-
});
|
|
3865
|
-
}
|
|
3866
|
-
});
|
|
3867
3851
|
const isPanelVisible = this._group.model.isPanelActive(this);
|
|
3868
3852
|
this.api._onDidActiveChange.fire({
|
|
3869
3853
|
isActive: isGroupActive && isPanelVisible,
|
|
@@ -3973,15 +3957,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
3973
3957
|
}
|
|
3974
3958
|
}
|
|
3975
3959
|
|
|
3976
|
-
function debounce(cb, wait) {
|
|
3977
|
-
let timeout;
|
|
3978
|
-
const callable = (...args) => {
|
|
3979
|
-
clearTimeout(timeout);
|
|
3980
|
-
timeout = setTimeout(() => cb(...args), wait);
|
|
3981
|
-
};
|
|
3982
|
-
return callable;
|
|
3983
|
-
}
|
|
3984
|
-
|
|
3985
3960
|
class DefaultDeserializer {
|
|
3986
3961
|
constructor(layout, panelDeserializer) {
|
|
3987
3962
|
this.layout = layout;
|
|
@@ -4082,9 +4057,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4082
4057
|
this._isGroupActive = false;
|
|
4083
4058
|
//
|
|
4084
4059
|
this.params = {};
|
|
4085
|
-
//
|
|
4086
|
-
this.isDirtyDisposable = new MutableDisposable();
|
|
4087
|
-
this.addDisposables(this.isDirtyDisposable);
|
|
4088
4060
|
this._element = document.createElement('div');
|
|
4089
4061
|
this._element.className = 'default-tab';
|
|
4090
4062
|
//
|
|
@@ -4129,10 +4101,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4129
4101
|
init(params) {
|
|
4130
4102
|
this.params = params;
|
|
4131
4103
|
this._content.textContent = params.title;
|
|
4132
|
-
this.isDirtyDisposable.value = this.params.api.onDidDirtyChange((event) => {
|
|
4133
|
-
const isDirty = event;
|
|
4134
|
-
toggleClass(this.action, 'dirty', isDirty);
|
|
4135
|
-
});
|
|
4136
4104
|
if (!this.params.suppressClosable) {
|
|
4137
4105
|
addDisposableListener(this.action, 'click', (ev) => {
|
|
4138
4106
|
ev.preventDefault(); //
|
|
@@ -4186,6 +4154,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4186
4154
|
get height() {
|
|
4187
4155
|
return this._height;
|
|
4188
4156
|
}
|
|
4157
|
+
get params() {
|
|
4158
|
+
var _a;
|
|
4159
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4160
|
+
}
|
|
4189
4161
|
focus() {
|
|
4190
4162
|
this.api._onFocusEvent.fire();
|
|
4191
4163
|
}
|
|
@@ -4194,29 +4166,27 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4194
4166
|
this._height = height;
|
|
4195
4167
|
this.api._onDidPanelDimensionChange.fire({ width, height });
|
|
4196
4168
|
if (this.part) {
|
|
4197
|
-
if (this.
|
|
4198
|
-
this.part.update(this.
|
|
4169
|
+
if (this._params) {
|
|
4170
|
+
this.part.update(this._params.params);
|
|
4199
4171
|
}
|
|
4200
4172
|
}
|
|
4201
4173
|
}
|
|
4202
4174
|
init(parameters) {
|
|
4203
|
-
this.
|
|
4175
|
+
this._params = parameters;
|
|
4204
4176
|
this.part = this.getComponent();
|
|
4205
4177
|
}
|
|
4206
4178
|
update(event) {
|
|
4207
4179
|
var _a, _b;
|
|
4208
|
-
this.
|
|
4209
|
-
(_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 });
|
|
4210
4182
|
}
|
|
4211
4183
|
toJSON() {
|
|
4212
4184
|
var _a, _b;
|
|
4213
|
-
const
|
|
4214
|
-
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 : {};
|
|
4215
4186
|
return {
|
|
4216
4187
|
id: this.id,
|
|
4217
4188
|
component: this.component,
|
|
4218
4189
|
params: Object.keys(params).length > 0 ? params : undefined,
|
|
4219
|
-
state: Object.keys(state).length === 0 ? undefined : state,
|
|
4220
4190
|
};
|
|
4221
4191
|
}
|
|
4222
4192
|
dispose() {
|
|
@@ -4239,12 +4209,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4239
4209
|
this._snap = false;
|
|
4240
4210
|
this._onDidChange = new Emitter();
|
|
4241
4211
|
this.onDidChange = this._onDidChange.event;
|
|
4242
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
4212
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4243
4213
|
const { isVisible } = event;
|
|
4244
|
-
const { containerApi } = this.
|
|
4214
|
+
const { containerApi } = this._params;
|
|
4245
4215
|
containerApi.setVisible(this, isVisible);
|
|
4246
4216
|
}), this.api.onActiveChange(() => {
|
|
4247
|
-
const { containerApi } = this.
|
|
4217
|
+
const { containerApi } = this._params;
|
|
4248
4218
|
containerApi.setActive(this);
|
|
4249
4219
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4250
4220
|
if (typeof event.minimumWidth === 'number' ||
|
|
@@ -4359,9 +4329,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4359
4329
|
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
4360
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 });
|
|
4361
4331
|
}
|
|
4362
|
-
dispose() {
|
|
4363
|
-
super.dispose();
|
|
4364
|
-
}
|
|
4365
4332
|
}
|
|
4366
4333
|
|
|
4367
4334
|
class GroupviewPanel extends GridviewPanel {
|
|
@@ -4433,7 +4400,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4433
4400
|
this.tab.init(params);
|
|
4434
4401
|
}
|
|
4435
4402
|
updateParentGroup(group, isPanelVisible) {
|
|
4436
|
-
|
|
4403
|
+
var _a;
|
|
4404
|
+
this._content.updateParentGroup(group, isPanelVisible);
|
|
4405
|
+
(_a = this._tab) === null || _a === void 0 ? void 0 : _a.updateParentGroup(group, isPanelVisible);
|
|
4437
4406
|
}
|
|
4438
4407
|
layout(width, height) {
|
|
4439
4408
|
this.content.layout(width, height);
|
|
@@ -4466,15 +4435,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4466
4435
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4467
4436
|
styles: options.styles,
|
|
4468
4437
|
});
|
|
4469
|
-
this._panels = new Map();
|
|
4470
|
-
this.dirtyPanels = new Set();
|
|
4471
|
-
this.debouncedDeque = debounce(this.syncConfigs.bind(this), 5000);
|
|
4472
4438
|
// events
|
|
4473
4439
|
this._onTabInteractionEvent = new Emitter();
|
|
4474
4440
|
this.onTabInteractionEvent = this._onTabInteractionEvent.event;
|
|
4475
4441
|
this._onTabContextMenu = new Emitter();
|
|
4476
4442
|
this.onTabContextMenu = this._onTabContextMenu.event;
|
|
4477
|
-
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);
|
|
4478
4454
|
this._options = options;
|
|
4479
4455
|
if (!this.options.components) {
|
|
4480
4456
|
this.options.components = {};
|
|
@@ -4495,10 +4471,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4495
4471
|
this._api = new DockviewApi(this);
|
|
4496
4472
|
}
|
|
4497
4473
|
get totalPanels() {
|
|
4498
|
-
return this.
|
|
4474
|
+
return this.panels.length;
|
|
4499
4475
|
}
|
|
4500
4476
|
get panels() {
|
|
4501
|
-
return
|
|
4477
|
+
return this.groups.flatMap((group) => group.model.panels);
|
|
4502
4478
|
}
|
|
4503
4479
|
get deserializer() {
|
|
4504
4480
|
return this._deserializer;
|
|
@@ -4528,10 +4504,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4528
4504
|
updateOptions(options) {
|
|
4529
4505
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4530
4506
|
this.options.orientation !== options.orientation;
|
|
4531
|
-
// TODO support style update
|
|
4532
|
-
// const hasStylesChanged =
|
|
4533
|
-
// typeof options.styles === 'object' &&
|
|
4534
|
-
// this.options.styles !== options.styles;
|
|
4535
4507
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
4536
4508
|
if (hasOrientationChanged) {
|
|
4537
4509
|
this.gridview.orientation = options.orientation;
|
|
@@ -4543,8 +4515,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4543
4515
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4544
4516
|
}
|
|
4545
4517
|
getGroupPanel(id) {
|
|
4546
|
-
|
|
4547
|
-
return (_a = this._panels.get(id)) === null || _a === void 0 ? void 0 : _a.value;
|
|
4518
|
+
return this.panels.find((panel) => panel.id === id);
|
|
4548
4519
|
}
|
|
4549
4520
|
setActivePanel(panel) {
|
|
4550
4521
|
if (!panel.group) {
|
|
@@ -4593,24 +4564,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4593
4564
|
this.doSetGroupActive(next);
|
|
4594
4565
|
}
|
|
4595
4566
|
}
|
|
4596
|
-
registerPanel(panel) {
|
|
4597
|
-
if (this._panels.has(panel.id)) {
|
|
4598
|
-
throw new Error(`panel ${panel.id} already exists`);
|
|
4599
|
-
}
|
|
4600
|
-
const disposable = new CompositeDisposable(panel.onDidStateChange(() => this.addDirtyPanel(panel)));
|
|
4601
|
-
this._panels.set(panel.id, { value: panel, disposable });
|
|
4602
|
-
}
|
|
4603
|
-
unregisterPanel(panel) {
|
|
4604
|
-
if (!this._panels.has(panel.id)) {
|
|
4605
|
-
throw new Error(`panel ${panel.id} doesn't exist`);
|
|
4606
|
-
}
|
|
4607
|
-
const item = this._panels.get(panel.id);
|
|
4608
|
-
if (item) {
|
|
4609
|
-
item.disposable.dispose();
|
|
4610
|
-
item.value.dispose();
|
|
4611
|
-
}
|
|
4612
|
-
this._panels.delete(panel.id);
|
|
4613
|
-
}
|
|
4614
4567
|
/**
|
|
4615
4568
|
* Serialize the current state of the layout
|
|
4616
4569
|
*
|
|
@@ -4618,12 +4571,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4618
4571
|
*/
|
|
4619
4572
|
toJSON() {
|
|
4620
4573
|
var _a;
|
|
4621
|
-
this.syncConfigs();
|
|
4622
4574
|
const data = this.gridview.serialize();
|
|
4623
|
-
const panels =
|
|
4624
|
-
|
|
4625
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4626
|
-
}
|
|
4575
|
+
const panels = this.panels.reduce((collection, panel) => {
|
|
4576
|
+
collection[panel.id] = panel.toJSON();
|
|
4627
4577
|
return collection;
|
|
4628
4578
|
}, {});
|
|
4629
4579
|
return {
|
|
@@ -4635,11 +4585,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4635
4585
|
}
|
|
4636
4586
|
fromJSON(data) {
|
|
4637
4587
|
this.gridview.clear();
|
|
4638
|
-
this.
|
|
4639
|
-
panel.
|
|
4640
|
-
panel.value.dispose();
|
|
4588
|
+
this.panels.forEach((panel) => {
|
|
4589
|
+
panel.dispose();
|
|
4641
4590
|
});
|
|
4642
|
-
this._panels.clear();
|
|
4643
4591
|
this._groups.clear();
|
|
4644
4592
|
if (!this.deserializer) {
|
|
4645
4593
|
throw new Error('invalid deserializer');
|
|
@@ -4654,9 +4602,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4654
4602
|
this.gridview.deserialize(grid, new DefaultDeserializer(this, {
|
|
4655
4603
|
createPanel: (id) => {
|
|
4656
4604
|
const panelData = panels[id];
|
|
4657
|
-
|
|
4658
|
-
this.registerPanel(panel);
|
|
4659
|
-
return panel;
|
|
4605
|
+
return this.deserializer.fromJSON(panelData);
|
|
4660
4606
|
},
|
|
4661
4607
|
}));
|
|
4662
4608
|
if (typeof activeGroup === 'string') {
|
|
@@ -4667,30 +4613,23 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4667
4613
|
}
|
|
4668
4614
|
this.gridview.layout(this.width, this.height);
|
|
4669
4615
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4616
|
+
this._onDidLayoutfromJSON.fire();
|
|
4670
4617
|
}
|
|
4671
4618
|
closeAllGroups() {
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
if (!didCloseAll) {
|
|
4677
|
-
return false;
|
|
4678
|
-
}
|
|
4679
|
-
}
|
|
4680
|
-
return true;
|
|
4681
|
-
});
|
|
4619
|
+
for (const entry of this._groups.entries()) {
|
|
4620
|
+
const [_, group] = entry;
|
|
4621
|
+
group.value.model.closeAllPanels();
|
|
4622
|
+
}
|
|
4682
4623
|
}
|
|
4683
4624
|
fireMouseEvent(event) {
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
}
|
|
4693
|
-
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
|
+
}
|
|
4694
4633
|
}
|
|
4695
4634
|
}
|
|
4696
4635
|
addPanel(options) {
|
|
@@ -4724,7 +4663,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4724
4663
|
return panel;
|
|
4725
4664
|
}
|
|
4726
4665
|
removePanel(panel) {
|
|
4727
|
-
this.unregisterPanel(panel);
|
|
4728
4666
|
const group = panel.group;
|
|
4729
4667
|
if (!group) {
|
|
4730
4668
|
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
@@ -4743,10 +4681,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4743
4681
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4744
4682
|
}
|
|
4745
4683
|
addEmptyGroup(options) {
|
|
4746
|
-
var _a;
|
|
4747
4684
|
const group = this.createGroup();
|
|
4748
4685
|
if (options) {
|
|
4749
|
-
const referencePanel =
|
|
4686
|
+
const referencePanel = this.panels.find((panel) => panel.id === options.referencePanel);
|
|
4750
4687
|
if (!referencePanel) {
|
|
4751
4688
|
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
4752
4689
|
}
|
|
@@ -4775,13 +4712,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4775
4712
|
super.removeGroup(group);
|
|
4776
4713
|
}
|
|
4777
4714
|
moveGroupOrPanel(referenceGroup, groupId, itemId, target, index) {
|
|
4778
|
-
var _a
|
|
4715
|
+
var _a;
|
|
4779
4716
|
const sourceGroup = groupId
|
|
4780
4717
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4781
4718
|
: undefined;
|
|
4782
4719
|
if (!target || target === exports.Position.Center) {
|
|
4783
4720
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4784
|
-
|
|
4721
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4785
4722
|
if (!groupItem) {
|
|
4786
4723
|
throw new Error(`No panel with id ${itemId}`);
|
|
4787
4724
|
}
|
|
@@ -4817,7 +4754,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4817
4754
|
}
|
|
4818
4755
|
else {
|
|
4819
4756
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4820
|
-
|
|
4757
|
+
this.panels.find((panel) => panel.id === itemId);
|
|
4821
4758
|
if (!groupItem) {
|
|
4822
4759
|
throw new Error(`No panel with id ${itemId}`);
|
|
4823
4760
|
}
|
|
@@ -4827,7 +4764,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4827
4764
|
}
|
|
4828
4765
|
}
|
|
4829
4766
|
doSetGroupActive(group, skipFocus) {
|
|
4830
|
-
var _a, _b;
|
|
4767
|
+
var _a, _b, _c;
|
|
4831
4768
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
4832
4769
|
super.doSetGroupActive(group, skipFocus);
|
|
4833
4770
|
if (!isGroupAlreadyFocused && ((_a = this._activeGroup) === null || _a === void 0 ? void 0 : _a.model.activePanel)) {
|
|
@@ -4835,6 +4772,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4835
4772
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4836
4773
|
panel: (_b = this._activeGroup) === null || _b === void 0 ? void 0 : _b.model.activePanel,
|
|
4837
4774
|
});
|
|
4775
|
+
this._onDidActivePanelChange.fire((_c = this._activeGroup) === null || _c === void 0 ? void 0 : _c.model.activePanel);
|
|
4838
4776
|
}
|
|
4839
4777
|
}
|
|
4840
4778
|
createGroup(options) {
|
|
@@ -4860,6 +4798,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4860
4798
|
const disposable = new CompositeDisposable(view.model.onMove((event) => {
|
|
4861
4799
|
const { groupId, itemId, target, index } = event;
|
|
4862
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 }));
|
|
4863
4803
|
}), view.model.onDidGroupChange((event) => {
|
|
4864
4804
|
switch (event.kind) {
|
|
4865
4805
|
case exports.GroupChangeKind2.ADD_PANEL:
|
|
@@ -4867,24 +4807,25 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4867
4807
|
kind: exports.GroupChangeKind.ADD_PANEL,
|
|
4868
4808
|
panel: event.panel,
|
|
4869
4809
|
});
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
kind: exports.GroupChangeKind.GROUP_ACTIVE,
|
|
4874
|
-
panel: event.panel,
|
|
4875
|
-
});
|
|
4810
|
+
if (event.panel) {
|
|
4811
|
+
this._onDidAddPanel.fire(event.panel);
|
|
4812
|
+
}
|
|
4876
4813
|
break;
|
|
4877
4814
|
case exports.GroupChangeKind2.REMOVE_PANEL:
|
|
4878
4815
|
this._onGridEvent.fire({
|
|
4879
4816
|
kind: exports.GroupChangeKind.REMOVE_PANEL,
|
|
4880
4817
|
panel: event.panel,
|
|
4881
4818
|
});
|
|
4819
|
+
if (event.panel) {
|
|
4820
|
+
this._onDidRemovePanel.fire(event.panel);
|
|
4821
|
+
}
|
|
4882
4822
|
break;
|
|
4883
4823
|
case exports.GroupChangeKind2.PANEL_ACTIVE:
|
|
4884
4824
|
this._onGridEvent.fire({
|
|
4885
4825
|
kind: exports.GroupChangeKind.PANEL_ACTIVE,
|
|
4886
4826
|
panel: event.panel,
|
|
4887
4827
|
});
|
|
4828
|
+
this._onDidActivePanelChange.fire(event.panel);
|
|
4888
4829
|
break;
|
|
4889
4830
|
}
|
|
4890
4831
|
}));
|
|
@@ -4898,44 +4839,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4898
4839
|
}
|
|
4899
4840
|
return view;
|
|
4900
4841
|
}
|
|
4901
|
-
dispose() {
|
|
4902
|
-
super.dispose();
|
|
4903
|
-
this._onGridEvent.dispose();
|
|
4904
|
-
}
|
|
4905
|
-
/**
|
|
4906
|
-
* Ensure the local copy of the layout state is up-to-date
|
|
4907
|
-
*/
|
|
4908
|
-
syncConfigs() {
|
|
4909
|
-
const dirtyPanels = Array.from(this.dirtyPanels);
|
|
4910
|
-
if (dirtyPanels.length === 0) ;
|
|
4911
|
-
this.dirtyPanels.clear();
|
|
4912
|
-
const partialPanelState = dirtyPanels
|
|
4913
|
-
.map((panel) => this._panels.get(panel.id))
|
|
4914
|
-
.filter((_) => !!_)
|
|
4915
|
-
.reduce((collection, panel) => {
|
|
4916
|
-
collection[panel.value.id] = panel.value.toJSON();
|
|
4917
|
-
return collection;
|
|
4918
|
-
}, {});
|
|
4919
|
-
this.panelState = Object.assign(Object.assign({}, this.panelState), partialPanelState);
|
|
4920
|
-
dirtyPanels
|
|
4921
|
-
.filter((p) => this._panels.has(p.id))
|
|
4922
|
-
.forEach((panel) => {
|
|
4923
|
-
panel.setDirty(false);
|
|
4924
|
-
});
|
|
4925
|
-
}
|
|
4926
4842
|
_addPanel(options) {
|
|
4927
4843
|
const view = new DefaultGroupPanelView({
|
|
4928
4844
|
content: this.createContentComponent(options.id, options.component),
|
|
4929
4845
|
tab: this.createTabComponent(options.id, options.tabComponent),
|
|
4930
4846
|
});
|
|
4931
|
-
const panel = new DockviewGroupPanel(options.id, this._api);
|
|
4847
|
+
const panel = new DockviewGroupPanel(options.id, this, this._api);
|
|
4932
4848
|
panel.init({
|
|
4933
4849
|
view,
|
|
4934
4850
|
title: options.title || options.id,
|
|
4935
4851
|
suppressClosable: options === null || options === void 0 ? void 0 : options.suppressClosable,
|
|
4936
4852
|
params: (options === null || options === void 0 ? void 0 : options.params) || {},
|
|
4937
4853
|
});
|
|
4938
|
-
this.registerPanel(panel);
|
|
4939
4854
|
return panel;
|
|
4940
4855
|
}
|
|
4941
4856
|
createContentComponent(id, componentName) {
|
|
@@ -4955,10 +4870,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4955
4870
|
var _a;
|
|
4956
4871
|
return (_a = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _a === void 0 ? void 0 : _a.value;
|
|
4957
4872
|
}
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
this.
|
|
4873
|
+
dispose() {
|
|
4874
|
+
super.dispose();
|
|
4875
|
+
this._onDidActivePanelChange.dispose();
|
|
4876
|
+
this._onDidAddPanel.dispose();
|
|
4877
|
+
this._onDidRemovePanel.dispose();
|
|
4878
|
+
this._onDidLayoutfromJSON.dispose();
|
|
4962
4879
|
}
|
|
4963
4880
|
}
|
|
4964
4881
|
|
|
@@ -4969,6 +4886,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4969
4886
|
orientation: options.orientation,
|
|
4970
4887
|
styles: options.styles,
|
|
4971
4888
|
});
|
|
4889
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
4890
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
4972
4891
|
this._options = options;
|
|
4973
4892
|
if (!this.options.components) {
|
|
4974
4893
|
this.options.components = {};
|
|
@@ -5077,6 +4996,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5077
4996
|
}
|
|
5078
4997
|
}
|
|
5079
4998
|
this._onGridEvent.fire({ kind: exports.GroupChangeKind.LAYOUT_FROM_JSON });
|
|
4999
|
+
this._onDidLayoutfromJSON.fire();
|
|
5080
5000
|
}
|
|
5081
5001
|
movePanel(panel, options) {
|
|
5082
5002
|
var _a;
|
|
@@ -5191,6 +5111,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5191
5111
|
}
|
|
5192
5112
|
dispose() {
|
|
5193
5113
|
super.dispose();
|
|
5114
|
+
this._onDidLayoutfromJSON.dispose();
|
|
5194
5115
|
}
|
|
5195
5116
|
}
|
|
5196
5117
|
|
|
@@ -5203,6 +5124,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5203
5124
|
this.element = element;
|
|
5204
5125
|
this._disposable = new MutableDisposable();
|
|
5205
5126
|
this.panels = new Map();
|
|
5127
|
+
this._onDidAddView = new Emitter();
|
|
5128
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5129
|
+
this._onDidRemoveView = new Emitter();
|
|
5130
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5206
5131
|
this._onDidLayoutChange = new Emitter();
|
|
5207
5132
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5208
5133
|
this._options = options;
|
|
@@ -5213,7 +5138,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5213
5138
|
options.frameworkComponents = {};
|
|
5214
5139
|
}
|
|
5215
5140
|
this.splitview = new Splitview(this.element, options);
|
|
5216
|
-
this.addDisposables(this._disposable);
|
|
5141
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5217
5142
|
}
|
|
5218
5143
|
get options() {
|
|
5219
5144
|
return this._options;
|
|
@@ -5228,7 +5153,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5228
5153
|
this._splitview = value;
|
|
5229
5154
|
this._disposable.value = new CompositeDisposable(this._splitview.onDidSashEnd(() => {
|
|
5230
5155
|
this._onDidLayoutChange.fire(undefined);
|
|
5231
|
-
}));
|
|
5156
|
+
}), this._splitview.onDidAddView((e) => this._onDidAddView.fire(e)), this._splitview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
|
|
5232
5157
|
}
|
|
5233
5158
|
get minimumSize() {
|
|
5234
5159
|
return this.splitview.minimumSize;
|
|
@@ -5402,6 +5327,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5402
5327
|
});
|
|
5403
5328
|
panel.orientation = orientation;
|
|
5404
5329
|
this.doAddView(panel);
|
|
5330
|
+
setTimeout(() => {
|
|
5331
|
+
// the original onDidAddView events are missed since they are fired before we can subcribe to them
|
|
5332
|
+
this._onDidAddView.fire(panel);
|
|
5333
|
+
}, 0);
|
|
5405
5334
|
return { size: view.size, view: panel };
|
|
5406
5335
|
}),
|
|
5407
5336
|
},
|
|
@@ -5431,41 +5360,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5431
5360
|
}
|
|
5432
5361
|
}
|
|
5433
5362
|
|
|
5434
|
-
class DragHandler extends CompositeDisposable {
|
|
5435
|
-
constructor(el) {
|
|
5436
|
-
super();
|
|
5437
|
-
this.el = el;
|
|
5438
|
-
this.iframes = [];
|
|
5439
|
-
this._onDragStart = new Emitter();
|
|
5440
|
-
this.onDragStart = this._onDragStart.event;
|
|
5441
|
-
this.configure();
|
|
5442
|
-
}
|
|
5443
|
-
configure() {
|
|
5444
|
-
this.addDisposables(addDisposableListener(this.el, 'dragstart', (event) => {
|
|
5445
|
-
var _a;
|
|
5446
|
-
this.iframes = [
|
|
5447
|
-
...getElementsByTagName('iframe'),
|
|
5448
|
-
...getElementsByTagName('webview'),
|
|
5449
|
-
];
|
|
5450
|
-
for (const iframe of this.iframes) {
|
|
5451
|
-
iframe.style.pointerEvents = 'none';
|
|
5452
|
-
}
|
|
5453
|
-
this.el.classList.add('dragged');
|
|
5454
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
5455
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5456
|
-
this.disposable = this.getData();
|
|
5457
|
-
}), addDisposableListener(this.el, 'dragend', (ev) => {
|
|
5458
|
-
var _a;
|
|
5459
|
-
for (const iframe of this.iframes) {
|
|
5460
|
-
iframe.style.pointerEvents = 'auto';
|
|
5461
|
-
}
|
|
5462
|
-
this.iframes = [];
|
|
5463
|
-
(_a = this.disposable) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
5464
|
-
this.disposable = undefined;
|
|
5465
|
-
}));
|
|
5466
|
-
}
|
|
5467
|
-
}
|
|
5468
|
-
|
|
5469
5363
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5470
5364
|
//
|
|
5471
5365
|
constructor(id) {
|
|
@@ -5480,6 +5374,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5480
5374
|
//
|
|
5481
5375
|
this._onDidSizeChange = new Emitter();
|
|
5482
5376
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
5377
|
+
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
5483
5378
|
}
|
|
5484
5379
|
setConstraints(value) {
|
|
5485
5380
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -5487,11 +5382,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5487
5382
|
setSize(event) {
|
|
5488
5383
|
this._onDidSizeChange.fire(event);
|
|
5489
5384
|
}
|
|
5490
|
-
dispose() {
|
|
5491
|
-
super.dispose();
|
|
5492
|
-
this._onDidConstraintsChange.dispose();
|
|
5493
|
-
this._onDidSizeChange.dispose();
|
|
5494
|
-
}
|
|
5495
5385
|
}
|
|
5496
5386
|
|
|
5497
5387
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
@@ -5505,6 +5395,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5505
5395
|
this.onMouseEnter = this._onMouseEnter.event;
|
|
5506
5396
|
this._onMouseLeave = new Emitter({});
|
|
5507
5397
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5398
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5508
5399
|
}
|
|
5509
5400
|
set pane(pane) {
|
|
5510
5401
|
this._pane = pane;
|
|
@@ -5520,7 +5411,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5520
5411
|
}
|
|
5521
5412
|
|
|
5522
5413
|
class PaneviewPanel extends BasePanelView {
|
|
5523
|
-
constructor(id, component, headerComponent, orientation, isExpanded) {
|
|
5414
|
+
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5524
5415
|
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5525
5416
|
this.headerComponent = headerComponent;
|
|
5526
5417
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
@@ -5536,6 +5427,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5536
5427
|
this.expandedSize = 0;
|
|
5537
5428
|
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
5538
5429
|
this._isExpanded = isExpanded;
|
|
5430
|
+
this._headerVisible = isHeaderVisible;
|
|
5539
5431
|
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
5540
5432
|
this._orientation = orientation;
|
|
5541
5433
|
this.element.classList.add('pane');
|
|
@@ -5603,6 +5495,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5603
5495
|
this._maximumBodySize =
|
|
5604
5496
|
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
5605
5497
|
}
|
|
5498
|
+
get headerVisible() {
|
|
5499
|
+
return this._headerVisible;
|
|
5500
|
+
}
|
|
5501
|
+
set headerVisible(value) {
|
|
5502
|
+
this._headerVisible = value;
|
|
5503
|
+
this.header.style.display = value ? '' : 'none';
|
|
5504
|
+
}
|
|
5606
5505
|
setVisible(isVisible) {
|
|
5607
5506
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
5608
5507
|
}
|
|
@@ -5665,7 +5564,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5665
5564
|
}
|
|
5666
5565
|
}
|
|
5667
5566
|
toJSON() {
|
|
5668
|
-
const params = this.
|
|
5567
|
+
const params = this._params;
|
|
5669
5568
|
return Object.assign(Object.assign({}, super.toJSON()), { headerComponent: this.headerComponent, title: params.title });
|
|
5670
5569
|
}
|
|
5671
5570
|
renderOnce() {
|
|
@@ -5700,7 +5599,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5700
5599
|
|
|
5701
5600
|
class DraggablePaneviewPanel extends PaneviewPanel {
|
|
5702
5601
|
constructor(id, component, headerComponent, orientation, isExpanded, disableDnd) {
|
|
5703
|
-
super(id, component, headerComponent, orientation, isExpanded);
|
|
5602
|
+
super(id, component, headerComponent, orientation, isExpanded, true);
|
|
5704
5603
|
this._onDidDrop = new Emitter();
|
|
5705
5604
|
this.onDidDrop = this._onDidDrop.event;
|
|
5706
5605
|
if (!disableDnd) {
|
|
@@ -5734,36 +5633,39 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5734
5633
|
},
|
|
5735
5634
|
});
|
|
5736
5635
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
5737
|
-
|
|
5738
|
-
if (!data) {
|
|
5739
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5740
|
-
return;
|
|
5741
|
-
}
|
|
5742
|
-
const containerApi = this.params
|
|
5743
|
-
.containerApi;
|
|
5744
|
-
const panelId = data.paneId;
|
|
5745
|
-
const existingPanel = containerApi.getPanel(panelId);
|
|
5746
|
-
if (!existingPanel) {
|
|
5747
|
-
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { panel: this, getData: () => getPaneData() }));
|
|
5748
|
-
return;
|
|
5749
|
-
}
|
|
5750
|
-
const allPanels = containerApi.getPanels();
|
|
5751
|
-
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5752
|
-
let toIndex = containerApi.getPanels().indexOf(this);
|
|
5753
|
-
if (event.position === exports.Position.Left ||
|
|
5754
|
-
event.position === exports.Position.Top) {
|
|
5755
|
-
toIndex = Math.max(0, toIndex - 1);
|
|
5756
|
-
}
|
|
5757
|
-
if (event.position === exports.Position.Right ||
|
|
5758
|
-
event.position === exports.Position.Bottom) {
|
|
5759
|
-
if (fromIndex > toIndex) {
|
|
5760
|
-
toIndex++;
|
|
5761
|
-
}
|
|
5762
|
-
toIndex = Math.min(allPanels.length - 1, toIndex);
|
|
5763
|
-
}
|
|
5764
|
-
containerApi.movePanel(fromIndex, toIndex);
|
|
5636
|
+
this.onDrop(event);
|
|
5765
5637
|
}));
|
|
5766
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
|
+
}
|
|
5767
5669
|
}
|
|
5768
5670
|
|
|
5769
5671
|
class DefaultHeader extends CompositeDisposable {
|
|
@@ -5823,6 +5725,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5823
5725
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5824
5726
|
this._onDidDrop = new Emitter();
|
|
5825
5727
|
this.onDidDrop = this._onDidDrop.event;
|
|
5728
|
+
this._onDidAddView = new Emitter();
|
|
5729
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5730
|
+
this._onDidRemoveView = new Emitter();
|
|
5731
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5732
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5826
5733
|
this._options = options;
|
|
5827
5734
|
if (!options.components) {
|
|
5828
5735
|
options.components = {};
|
|
@@ -5836,17 +5743,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5836
5743
|
});
|
|
5837
5744
|
this.addDisposables(this._disposable);
|
|
5838
5745
|
}
|
|
5839
|
-
get onDidAddView() {
|
|
5840
|
-
return this._paneview.onDidAddView;
|
|
5841
|
-
}
|
|
5842
|
-
get onDidRemoveView() {
|
|
5843
|
-
return this._paneview.onDidRemoveView;
|
|
5844
|
-
}
|
|
5845
5746
|
set paneview(value) {
|
|
5846
5747
|
this._paneview = value;
|
|
5847
|
-
this._disposable.value = new CompositeDisposable(this.
|
|
5748
|
+
this._disposable.value = new CompositeDisposable(this._paneview.onDidChange(() => {
|
|
5848
5749
|
this._onDidLayoutChange.fire(undefined);
|
|
5849
|
-
}));
|
|
5750
|
+
}), this._paneview.onDidAddView((e) => this._onDidAddView.fire(e)), this._paneview.onDidRemoveView((e) => this._onDidRemoveView.fire(e)));
|
|
5850
5751
|
}
|
|
5851
5752
|
get paneview() {
|
|
5852
5753
|
return this._paneview;
|
|
@@ -6026,6 +5927,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6026
5927
|
});
|
|
6027
5928
|
panel.orientation = this.paneview.orientation;
|
|
6028
5929
|
});
|
|
5930
|
+
setTimeout(() => {
|
|
5931
|
+
// the original onDidAddView events are missed since they are fired before we can subcribe to them
|
|
5932
|
+
this._onDidAddView.fire(panel);
|
|
5933
|
+
}, 0);
|
|
6029
5934
|
return { size: view.size, view: panel };
|
|
6030
5935
|
}),
|
|
6031
5936
|
},
|
|
@@ -6052,12 +5957,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6052
5957
|
this._snap = false;
|
|
6053
5958
|
this._onDidChange = new Emitter();
|
|
6054
5959
|
this.onDidChange = this._onDidChange.event;
|
|
6055
|
-
this.addDisposables(this.api.onVisibilityChange((event) => {
|
|
5960
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6056
5961
|
const { isVisible } = event;
|
|
6057
|
-
const { containerApi } = this
|
|
5962
|
+
const { containerApi } = this
|
|
5963
|
+
._params;
|
|
6058
5964
|
containerApi.setVisible(this, isVisible);
|
|
6059
5965
|
}), this.api.onActiveChange(() => {
|
|
6060
|
-
const { containerApi } = this
|
|
5966
|
+
const { containerApi } = this
|
|
5967
|
+
._params;
|
|
6061
5968
|
containerApi.setActive(this);
|
|
6062
5969
|
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6063
5970
|
if (typeof event.minimumSize === 'number' ||
|
|
@@ -6200,14 +6107,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6200
6107
|
if (this.disposed) {
|
|
6201
6108
|
throw new Error('invalid operation: resource is already disposed');
|
|
6202
6109
|
}
|
|
6203
|
-
// TODO use a better check for isReactFunctionalComponent
|
|
6204
6110
|
if (typeof this.component !== 'function') {
|
|
6205
6111
|
/**
|
|
6206
6112
|
* we know this isn't a React.FunctionComponent so throw an error here.
|
|
6207
6113
|
* if we do not intercept this the React library will throw a very obsure error
|
|
6208
6114
|
* for the same reason, at least at this point we will emit a sensible stacktrace.
|
|
6209
6115
|
*/
|
|
6210
|
-
throw new Error('
|
|
6116
|
+
throw new Error('Invalid Operation. dockview only supports React Functional Components.');
|
|
6211
6117
|
}
|
|
6212
6118
|
const bridgeComponent = React__namespace.createElement(React__namespace.forwardRef(ReactComponentBridge), {
|
|
6213
6119
|
component: this
|
|
@@ -6271,16 +6177,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6271
6177
|
this._onDidBlur = new Emitter();
|
|
6272
6178
|
this.onDidBlur = this._onDidBlur.event;
|
|
6273
6179
|
this._element = document.createElement('div');
|
|
6274
|
-
this._element.
|
|
6275
|
-
this._element.style.width = '100%';
|
|
6180
|
+
this._element.className = 'dockview-react-part';
|
|
6276
6181
|
// this.hostedContainer = new HostedContainer({
|
|
6277
6182
|
// id,
|
|
6278
6183
|
// });
|
|
6279
6184
|
// this.hostedContainer.onDidFocus(() => this._onDidFocus.fire());
|
|
6280
6185
|
// this.hostedContainer.onDidBlur(() => this._onDidBlur.fire());
|
|
6281
6186
|
this._actionsElement = document.createElement('div');
|
|
6282
|
-
this._actionsElement.
|
|
6283
|
-
this._actionsElement.style.width = '100%';
|
|
6187
|
+
this._actionsElement.className = 'dockview-react-part';
|
|
6284
6188
|
}
|
|
6285
6189
|
get element() {
|
|
6286
6190
|
return this._element;
|
|
@@ -6328,6 +6232,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6328
6232
|
}
|
|
6329
6233
|
dispose() {
|
|
6330
6234
|
var _a, _b;
|
|
6235
|
+
this._onDidFocus.dispose();
|
|
6236
|
+
this._onDidBlur.dispose();
|
|
6331
6237
|
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
6332
6238
|
// this.hostedContainer?.dispose();
|
|
6333
6239
|
(_b = this.actionsPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
@@ -6340,6 +6246,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6340
6246
|
this.component = component;
|
|
6341
6247
|
this.reactPortalStore = reactPortalStore;
|
|
6342
6248
|
this._element = document.createElement('div');
|
|
6249
|
+
this._element.className = 'dockview-react-part';
|
|
6343
6250
|
}
|
|
6344
6251
|
get element() {
|
|
6345
6252
|
return this._element;
|
|
@@ -6384,7 +6291,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6384
6291
|
const panelId = panelData.id;
|
|
6385
6292
|
const params = panelData.params;
|
|
6386
6293
|
const title = panelData.title;
|
|
6387
|
-
const state = panelData.state;
|
|
6388
6294
|
const suppressClosable = panelData.suppressClosable;
|
|
6389
6295
|
const viewData = panelData.view;
|
|
6390
6296
|
const view = new DefaultGroupPanelView({
|
|
@@ -6393,13 +6299,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6393
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)
|
|
6394
6300
|
: new DefaultTab(),
|
|
6395
6301
|
});
|
|
6396
|
-
const panel = new DockviewGroupPanel(panelId, new DockviewApi(this.layout));
|
|
6302
|
+
const panel = new DockviewGroupPanel(panelId, this.layout, new DockviewApi(this.layout));
|
|
6397
6303
|
panel.init({
|
|
6398
6304
|
view,
|
|
6399
6305
|
title,
|
|
6400
6306
|
suppressClosable,
|
|
6401
6307
|
params: params || {},
|
|
6402
|
-
state: state || {},
|
|
6403
6308
|
});
|
|
6404
6309
|
return panel;
|
|
6405
6310
|
}
|
|
@@ -6414,8 +6319,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6414
6319
|
value: undefined,
|
|
6415
6320
|
};
|
|
6416
6321
|
this._element = document.createElement('div');
|
|
6417
|
-
this._element.
|
|
6418
|
-
this._element.style.width = '100%';
|
|
6322
|
+
this._element.className = 'dockview-react-part';
|
|
6419
6323
|
}
|
|
6420
6324
|
get element() {
|
|
6421
6325
|
return this._element;
|
|
@@ -6513,12 +6417,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6513
6417
|
frameworkTabComponents: props.tabComponents,
|
|
6514
6418
|
tabHeight: props.tabHeight,
|
|
6515
6419
|
debug: props.debug,
|
|
6516
|
-
enableExternalDragEvents: props.enableExternalDragEvents,
|
|
6517
6420
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
6518
6421
|
styles: props.hideBorders
|
|
6519
6422
|
? { separatorBorder: 'transparent' }
|
|
6520
6423
|
: undefined,
|
|
6521
6424
|
});
|
|
6425
|
+
const disposable = dockview.onDidDrop((event) => {
|
|
6426
|
+
if (props.onDidDrop) {
|
|
6427
|
+
props.onDidDrop(event);
|
|
6428
|
+
}
|
|
6429
|
+
});
|
|
6522
6430
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6523
6431
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
6524
6432
|
const { clientWidth, clientHeight } = domRef.current;
|
|
@@ -6528,6 +6436,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6528
6436
|
}
|
|
6529
6437
|
dockviewRef.current = dockview;
|
|
6530
6438
|
return () => {
|
|
6439
|
+
disposable.dispose();
|
|
6531
6440
|
dockview.dispose();
|
|
6532
6441
|
};
|
|
6533
6442
|
}, []);
|
|
@@ -6539,6 +6448,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6539
6448
|
frameworkComponents: props.components,
|
|
6540
6449
|
});
|
|
6541
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]);
|
|
6542
6459
|
React__namespace.useEffect(() => {
|
|
6543
6460
|
if (!dockviewRef.current) {
|
|
6544
6461
|
return;
|
|
@@ -6627,9 +6544,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6627
6544
|
getComponent() {
|
|
6628
6545
|
var _a;
|
|
6629
6546
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6630
|
-
params: ((_a = this.
|
|
6547
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6631
6548
|
api: this.api,
|
|
6632
|
-
containerApi: this.
|
|
6549
|
+
containerApi: this._params
|
|
6633
6550
|
.containerApi,
|
|
6634
6551
|
});
|
|
6635
6552
|
}
|
|
@@ -6702,9 +6619,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6702
6619
|
getComponent() {
|
|
6703
6620
|
var _a;
|
|
6704
6621
|
return new ReactPart(this.element, this.reactPortalStore, this.reactComponent, {
|
|
6705
|
-
params: ((_a = this.
|
|
6622
|
+
params: ((_a = this._params) === null || _a === void 0 ? void 0 : _a.params) || {},
|
|
6706
6623
|
api: this.api,
|
|
6707
|
-
containerApi: this.
|
|
6624
|
+
containerApi: this._params
|
|
6708
6625
|
.containerApi,
|
|
6709
6626
|
});
|
|
6710
6627
|
}
|
|
@@ -6895,7 +6812,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6895
6812
|
exports.BaseGrid = BaseGrid;
|
|
6896
6813
|
exports.CompositeDisposable = CompositeDisposable;
|
|
6897
6814
|
exports.ContentContainer = ContentContainer;
|
|
6898
|
-
exports.DATA_KEY = DATA_KEY;
|
|
6899
6815
|
exports.DockviewApi = DockviewApi;
|
|
6900
6816
|
exports.DockviewComponent = DockviewComponent;
|
|
6901
6817
|
exports.DockviewComponents = DockviewComponents;
|
|
@@ -6927,9 +6843,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6927
6843
|
exports.SplitviewPanel = SplitviewPanel;
|
|
6928
6844
|
exports.SplitviewReact = SplitviewReact;
|
|
6929
6845
|
exports.Tab = Tab$1;
|
|
6846
|
+
exports.TickDelayedEvent = TickDelayedEvent;
|
|
6930
6847
|
exports.addDisposableListener = addDisposableListener;
|
|
6931
6848
|
exports.addDisposableWindowListener = addDisposableWindowListener;
|
|
6932
|
-
exports.extractData = extractData;
|
|
6933
6849
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6934
6850
|
exports.getGridLocation = getGridLocation;
|
|
6935
6851
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6937,11 +6853,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6937
6853
|
exports.getPanelData = getPanelData;
|
|
6938
6854
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6939
6855
|
exports.indexInParent = indexInParent;
|
|
6940
|
-
exports.isCustomDragEvent = isCustomDragEvent;
|
|
6941
6856
|
exports.isGridBranchNode = isGridBranchNode;
|
|
6942
|
-
exports.isPanelTransferEvent = isPanelTransferEvent;
|
|
6943
6857
|
exports.isReactElement = isReactElement;
|
|
6944
|
-
exports.isTabDragEvent = isTabDragEvent;
|
|
6945
6858
|
exports.orthogonal = orthogonal;
|
|
6946
6859
|
exports.toTarget = toTarget;
|
|
6947
6860
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|