dockview 1.5.2 → 1.6.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/dist/cjs/api/component.api.d.ts +3 -2
- package/dist/cjs/api/component.api.js +9 -2
- package/dist/cjs/api/component.api.js.map +1 -1
- package/dist/cjs/api/{groupPanelApi.d.ts → dockviewPanelApi.d.ts} +2 -2
- package/dist/cjs/api/{groupPanelApi.js → dockviewPanelApi.js} +4 -6
- package/dist/cjs/api/dockviewPanelApi.js.map +1 -0
- package/dist/cjs/api/gridviewPanelApi.d.ts +4 -3
- package/dist/cjs/api/gridviewPanelApi.js +4 -4
- package/dist/cjs/api/gridviewPanelApi.js.map +1 -1
- package/dist/cjs/api/panelApi.d.ts +7 -0
- package/dist/cjs/api/panelApi.js +17 -1
- package/dist/cjs/api/panelApi.js.map +1 -1
- package/dist/cjs/array.d.ts +1 -1
- package/dist/cjs/dnd/abstractDragHandler.d.ts +2 -2
- package/dist/cjs/dnd/abstractDragHandler.js +3 -3
- package/dist/cjs/dnd/abstractDragHandler.js.map +1 -1
- package/dist/cjs/dnd/dataTransfer.d.ts +2 -2
- package/dist/cjs/dnd/dataTransfer.js.map +1 -1
- package/dist/cjs/dnd/dnd.d.ts +1 -1
- package/dist/cjs/dnd/dnd.js +7 -12
- package/dist/cjs/dnd/dnd.js.map +1 -1
- package/dist/cjs/dnd/droptarget.d.ts +20 -15
- package/dist/cjs/dnd/droptarget.js +152 -74
- package/dist/cjs/dnd/droptarget.js.map +1 -1
- package/dist/cjs/dnd/ghost.d.ts +1 -0
- package/dist/cjs/dnd/ghost.js +15 -0
- package/dist/cjs/dnd/ghost.js.map +1 -0
- package/dist/cjs/dnd/groupDragHandler.d.ts +11 -0
- package/dist/cjs/dnd/groupDragHandler.js +62 -0
- package/dist/cjs/dnd/groupDragHandler.js.map +1 -0
- package/dist/cjs/dockview/defaultGroupPanelView.d.ts +1 -1
- package/dist/cjs/dockview/deserializer.d.ts +2 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +15 -7
- package/dist/cjs/dockview/dockviewComponent.js +215 -34
- package/dist/cjs/dockview/dockviewComponent.js.map +1 -1
- package/dist/{esm/dockview/dockviewGroupPanel.d.ts → cjs/dockview/dockviewPanel.d.ts} +16 -5
- package/dist/cjs/dockview/{dockviewGroupPanel.js → dockviewPanel.js} +25 -21
- package/dist/cjs/dockview/dockviewPanel.js.map +1 -0
- package/dist/cjs/dockview/options.d.ts +32 -10
- package/dist/cjs/dockview/options.js +29 -0
- package/dist/cjs/dockview/options.js.map +1 -1
- package/dist/cjs/dockview/validation.d.ts +2 -0
- package/dist/cjs/dockview/validation.js +135 -0
- package/dist/cjs/dockview/validation.js.map +1 -0
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +5 -6
- package/dist/cjs/gridview/baseComponentGridview.js.map +1 -1
- package/dist/cjs/gridview/basePanelView.d.ts +2 -2
- package/dist/cjs/gridview/gridview.d.ts +9 -3
- package/dist/cjs/gridview/gridview.js +38 -7
- package/dist/cjs/gridview/gridview.js.map +1 -1
- package/dist/cjs/gridview/gridviewComponent.d.ts +2 -2
- package/dist/cjs/gridview/gridviewComponent.js +2 -3
- package/dist/cjs/gridview/gridviewComponent.js.map +1 -1
- package/dist/cjs/gridview/gridviewPanel.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.js +1 -2
- package/dist/cjs/gridview/gridviewPanel.js.map +1 -1
- package/dist/cjs/gridview/types.d.ts +1 -1
- package/dist/cjs/groupview/dnd.d.ts +2 -1
- package/dist/cjs/groupview/dnd.js +1 -0
- package/dist/cjs/groupview/dnd.js.map +1 -1
- package/dist/cjs/groupview/groupview.d.ts +6 -6
- package/dist/cjs/groupview/groupview.js +43 -25
- package/dist/cjs/groupview/groupview.js.map +1 -1
- package/dist/cjs/groupview/groupviewPanel.d.ts +3 -3
- package/dist/cjs/groupview/panel/content.d.ts +1 -1
- package/dist/cjs/groupview/tab.d.ts +2 -12
- package/dist/cjs/groupview/tab.js +13 -9
- package/dist/cjs/groupview/tab.js.map +1 -1
- package/dist/cjs/groupview/titlebar/tabsContainer.d.ts +5 -8
- package/dist/cjs/groupview/titlebar/tabsContainer.js +23 -30
- package/dist/cjs/groupview/titlebar/tabsContainer.js.map +1 -1
- package/dist/cjs/groupview/titlebar/voidContainer.d.ts +15 -0
- package/dist/cjs/groupview/titlebar/voidContainer.js +74 -0
- package/dist/cjs/groupview/titlebar/voidContainer.js.map +1 -0
- package/dist/cjs/groupview/types.d.ts +18 -2
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/paneview/draggablePaneviewPanel.js +6 -5
- package/dist/cjs/paneview/draggablePaneviewPanel.js.map +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +2 -2
- package/dist/cjs/paneview/paneviewComponent.js.map +1 -1
- package/dist/cjs/paneview/paneviewPanel.js +1 -0
- package/dist/cjs/paneview/paneviewPanel.js.map +1 -1
- package/dist/cjs/react/deserializer.d.ts +2 -1
- package/dist/cjs/react/deserializer.js +2 -2
- package/dist/cjs/react/deserializer.js.map +1 -1
- package/dist/cjs/react/dockview/defaultTab.d.ts +1 -1
- package/dist/cjs/react/dockview/dockview.d.ts +5 -4
- package/dist/cjs/react/dockview/dockview.js +1 -0
- package/dist/cjs/react/dockview/dockview.js.map +1 -1
- package/dist/cjs/react/dockview/groupControlsRenderer.d.ts +1 -1
- package/dist/cjs/react/gridview/view.js +2 -1
- package/dist/cjs/react/gridview/view.js.map +1 -1
- package/dist/cjs/react/react.d.ts +1 -1
- package/dist/cjs/splitview/core/splitview.d.ts +4 -4
- package/dist/cjs/splitview/splitviewComponent.d.ts +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +2 -2
- package/dist/cjs/splitview/splitviewComponent.js.map +1 -1
- package/dist/cjs/splitview/splitviewPanel.js +1 -0
- package/dist/cjs/splitview/splitviewPanel.js.map +1 -1
- package/dist/cjs/types.d.ts +2 -1
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/dockview.amd.js +1411 -987
- package/dist/dockview.amd.min.js +2 -2
- package/dist/dockview.amd.min.noStyle.js +2 -2
- package/dist/dockview.amd.noStyle.js +1410 -986
- package/dist/dockview.cjs.js +1394 -970
- package/dist/dockview.esm.js +1385 -964
- package/dist/dockview.esm.min.js +2 -2
- package/dist/dockview.js +1411 -987
- package/dist/dockview.min.js +2 -2
- package/dist/dockview.min.noStyle.js +2 -2
- package/dist/dockview.noStyle.js +1410 -986
- package/dist/esm/actionbar/actionsContainer.js +3 -3
- package/dist/esm/api/component.api.d.ts +3 -2
- package/dist/esm/api/component.api.js +16 -13
- package/dist/esm/api/{groupPanelApi.d.ts → dockviewPanelApi.d.ts} +2 -2
- package/dist/esm/api/{groupPanelApi.js → dockviewPanelApi.js} +16 -18
- package/dist/esm/api/gridviewPanelApi.d.ts +4 -3
- package/dist/esm/api/gridviewPanelApi.js +4 -4
- package/dist/esm/api/panelApi.d.ts +7 -0
- package/dist/esm/api/panelApi.js +33 -17
- package/dist/esm/api/paneviewPanelApi.js +3 -3
- package/dist/esm/array.d.ts +1 -1
- package/dist/esm/dnd/abstractDragHandler.d.ts +2 -2
- package/dist/esm/dnd/abstractDragHandler.js +3 -3
- package/dist/esm/dnd/dataTransfer.d.ts +2 -2
- package/dist/esm/dnd/dnd.d.ts +1 -1
- package/dist/esm/dnd/dnd.js +7 -12
- package/dist/esm/dnd/droptarget.d.ts +20 -15
- package/dist/esm/dnd/droptarget.js +149 -67
- package/dist/esm/dnd/ghost.d.ts +1 -0
- package/dist/esm/dnd/ghost.js +10 -0
- package/dist/esm/dnd/groupDragHandler.d.ts +11 -0
- package/dist/esm/dnd/groupDragHandler.js +38 -0
- package/dist/esm/dockview/components/tab/defaultTab.js +6 -6
- package/dist/esm/dockview/components/watermark/watermark.js +3 -3
- package/dist/esm/dockview/defaultGroupPanelView.d.ts +1 -1
- package/dist/esm/dockview/defaultGroupPanelView.js +5 -5
- package/dist/esm/dockview/deserializer.d.ts +2 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +15 -7
- package/dist/esm/dockview/dockviewComponent.js +229 -65
- package/dist/{cjs/dockview/dockviewGroupPanel.d.ts → esm/dockview/dockviewPanel.d.ts} +16 -5
- package/dist/esm/dockview/{dockviewGroupPanel.js → dockviewPanel.js} +19 -15
- package/dist/esm/dockview/options.d.ts +32 -10
- package/dist/esm/dockview/options.js +24 -1
- package/dist/esm/dockview/validation.d.ts +2 -0
- package/dist/esm/dockview/validation.js +86 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +31 -32
- package/dist/esm/gridview/basePanelView.d.ts +2 -2
- package/dist/esm/gridview/basePanelView.js +13 -13
- package/dist/esm/gridview/branchNode.js +47 -47
- package/dist/esm/gridview/gridview.d.ts +9 -3
- package/dist/esm/gridview/gridview.js +41 -15
- package/dist/esm/gridview/gridviewComponent.d.ts +2 -2
- package/dist/esm/gridview/gridviewComponent.js +17 -18
- package/dist/esm/gridview/gridviewPanel.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.js +45 -45
- package/dist/esm/gridview/leafNode.js +23 -23
- package/dist/esm/gridview/types.d.ts +1 -1
- package/dist/esm/groupview/dnd.d.ts +2 -1
- package/dist/esm/groupview/dnd.js +1 -0
- package/dist/esm/groupview/groupview.d.ts +6 -6
- package/dist/esm/groupview/groupview.js +90 -72
- package/dist/esm/groupview/groupviewPanel.d.ts +3 -3
- package/dist/esm/groupview/groupviewPanel.js +4 -4
- package/dist/esm/groupview/panel/content.d.ts +1 -1
- package/dist/esm/groupview/panel/content.js +3 -3
- package/dist/esm/groupview/tab.d.ts +2 -12
- package/dist/esm/groupview/tab.js +15 -11
- package/dist/esm/groupview/titlebar/tabsContainer.d.ts +5 -8
- package/dist/esm/groupview/titlebar/tabsContainer.js +54 -61
- package/dist/esm/groupview/titlebar/voidContainer.d.ts +15 -0
- package/dist/esm/groupview/titlebar/voidContainer.js +47 -0
- package/dist/esm/groupview/types.d.ts +18 -2
- package/dist/esm/hostedContainer.js +3 -3
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/lifecycle.js +3 -3
- package/dist/esm/paneview/defaultPaneviewHeader.js +3 -3
- package/dist/esm/paneview/draggablePaneviewPanel.js +7 -6
- package/dist/esm/paneview/paneview.js +21 -21
- package/dist/esm/paneview/paneviewComponent.js +30 -30
- package/dist/esm/paneview/paneviewPanel.js +45 -44
- package/dist/esm/react/deserializer.d.ts +2 -1
- package/dist/esm/react/deserializer.js +2 -2
- package/dist/esm/react/dockview/defaultTab.d.ts +1 -1
- package/dist/esm/react/dockview/dockview.d.ts +5 -4
- package/dist/esm/react/dockview/dockview.js +1 -0
- package/dist/esm/react/dockview/groupControlsRenderer.d.ts +1 -1
- package/dist/esm/react/dockview/groupControlsRenderer.js +8 -8
- package/dist/esm/react/dockview/reactContentPart.js +3 -3
- package/dist/esm/react/dockview/reactHeaderPart.js +3 -3
- package/dist/esm/react/dockview/reactWatermarkPart.js +3 -3
- package/dist/esm/react/dockview/v2/reactContentRenderer.js +9 -9
- package/dist/esm/react/dockview/v2/webviewContentRenderer.js +3 -3
- package/dist/esm/react/gridview/view.js +2 -1
- package/dist/esm/react/paneview/view.js +3 -3
- package/dist/esm/react/react.d.ts +1 -1
- package/dist/esm/splitview/core/splitview.d.ts +4 -4
- package/dist/esm/splitview/core/splitview.js +59 -59
- package/dist/esm/splitview/core/viewItem.js +15 -15
- package/dist/esm/splitview/splitviewComponent.d.ts +1 -1
- package/dist/esm/splitview/splitviewComponent.js +23 -23
- package/dist/esm/splitview/splitviewPanel.js +31 -30
- package/dist/esm/types.d.ts +2 -1
- package/dist/esm/types.js +3 -1
- package/dist/styles/dockview.css +23 -26
- package/package.json +12 -16
- package/dist/cjs/api/groupPanelApi.js.map +0 -1
- package/dist/cjs/dockview/dockviewGroupPanel.js.map +0 -1
- package/dist/cjs/groupview/groupPanel.d.ts +0 -32
- package/dist/cjs/groupview/groupPanel.js +0 -3
- package/dist/cjs/groupview/groupPanel.js.map +0 -1
- package/dist/esm/groupview/groupPanel.d.ts +0 -32
- package/dist/esm/groupview/groupPanel.js +0 -1
package/dist/dockview.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.6.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -34,7 +34,7 @@ function styleInject(css, ref) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
var css_248z = ".dockview-svg {\n display: inline-block;\n fill: currentcolor;\n line-height: 1;\n stroke: currentcolor;\n stroke-width: 0;\n}\n.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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\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-tabs-and-actions-container-background-color: #2d2d30;\n --dv-tabs-and-actions-container-height: 20px;\n --dv-tabs-and-actions-container-font-size: 11px;\n --dv-activegroup-visiblepanel-tab-background-color: #007acc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #3f3f46;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: white;\n --dv-inactivegroup-visiblepanel-tab-color: white;\n --dv-inactivegroup-hiddenpanel-tab-color: white;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-activegroup-hiddenpanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n}\n\n.dockview-theme-abyss {\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #000c18;\n --dv-tabs-and-actions-container-background-color: #1c1c2a;\n --dv-activegroup-visiblepanel-tab-background-color: #000c18;\n --dv-activegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #000c18;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-tab-divider-color: #2b2b4a;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.25);\n --dv-separator-border: #2b2b4a;\n --dv-paneview-header-border-color: #2b2b4a;\n --dv-paneview-active-outline-color: #596f99;\n}\n\n.dockview-theme-dracula {\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #282a36;\n --dv-tabs-and-actions-container-background-color: #191a21;\n --dv-activegroup-visiblepanel-tab-background-color: #282a36;\n --dv-activegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #282a36;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-tab-divider-color: #191a21;\n --dv-activegroup-visiblepanel-tab-color: rgb(248, 248, 242);\n --dv-activegroup-hiddenpanel-tab-color: rgb(98, 114, 164);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(248, 248, 242, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(98, 114, 164, 0.5);\n --dv-separator-border: #bd93f9;\n --dv-paneview-header-border-color: #bd93f9;\n --dv-paneview-active-outline-color: #6272a4;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n top: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #94527e;\n z-index: 999;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n bottom: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #5e3d5a;\n z-index: 999;\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 .close-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.actions-bar .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\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 box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition: top 70ms ease-out, left 70ms ease-out, width 70ms ease-out, height 70ms ease-out, opacity 0.15s ease-out;\n will-change: transform;\n pointer-events: none;\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.left {\n transform: translateX(-25%) scaleX(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.right {\n transform: translateX(25%) scaleX(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.top {\n transform: translateY(-25%) scaleY(0.5);\n}\n.drop-target > .drop-target-dropzone > .drop-target-selection.bottom {\n transform: translateY(25%) scaleY(0.5);\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.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n 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.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n 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 cursor: pointer;\n}\n.pane-container .view .default-header .dockview-pane-header-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.pane-container .view .default-header > span {\n padding-left: 8px;\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.tab .dockview-react-tab {\n display: flex;\n padding: 0px 8px;\n align-items: center;\n height: 100%;\n}\n.tab .dockview-react-tab .dockview-react-tab-title {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .dockview-react-tab .dockview-react-tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .dockview-react-tab .dockview-react-tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tab.inactive-tab:not(:hover) .dockview-react-tab-action {\n visibility: hidden;\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: 0px 8px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\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 .tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .default-tab .action-container .tab-list .tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}";
|
|
37
|
+
var css_248z = ".dockview-svg {\n display: inline-block;\n fill: currentcolor;\n line-height: 1;\n stroke: currentcolor;\n stroke-width: 0;\n}\n.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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\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-tabs-and-actions-container-background-color: #2d2d30;\n --dv-tabs-and-actions-container-height: 20px;\n --dv-tabs-and-actions-container-font-size: 11px;\n --dv-activegroup-visiblepanel-tab-background-color: #007acc;\n --dv-inactivegroup-visiblepanel-tab-background-color: #3f3f46;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: white;\n --dv-inactivegroup-visiblepanel-tab-color: white;\n --dv-inactivegroup-hiddenpanel-tab-color: white;\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-activegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.active-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-activegroup-hiddenpanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container {\n box-sizing: content-box;\n border-bottom: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.active-tab {\n border-top: 2px solid var(--dv-inactivegroup-visiblepanel-tab-background-color);\n}\n.dockview-theme-vs .groupview.inactive-group > .tabs-and-actions-container .tab.inactive-tab {\n border-top: 2px solid var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n}\n\n.dockview-theme-abyss {\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #000c18;\n --dv-tabs-and-actions-container-background-color: #1c1c2a;\n --dv-activegroup-visiblepanel-tab-background-color: #000c18;\n --dv-activegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #000c18;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #10192c;\n --dv-tab-divider-color: #2b2b4a;\n --dv-activegroup-visiblepanel-tab-color: white;\n --dv-activegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(255, 255, 255, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(255, 255, 255, 0.25);\n --dv-separator-border: #2b2b4a;\n --dv-paneview-header-border-color: #2b2b4a;\n --dv-paneview-active-outline-color: #596f99;\n}\n\n.dockview-theme-dracula {\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-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-icon-hover-background-color: rgba(90, 93, 94, 0.31);\n --dv-group-view-background-color: #282a36;\n --dv-tabs-and-actions-container-background-color: #191a21;\n --dv-activegroup-visiblepanel-tab-background-color: #282a36;\n --dv-activegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-inactivegroup-visiblepanel-tab-background-color: #282a36;\n --dv-inactivegroup-hiddenpanel-tab-background-color: #21222c;\n --dv-tab-divider-color: #191a21;\n --dv-activegroup-visiblepanel-tab-color: rgb(248, 248, 242);\n --dv-activegroup-hiddenpanel-tab-color: rgb(98, 114, 164);\n --dv-inactivegroup-visiblepanel-tab-color: rgba(248, 248, 242, 0.5);\n --dv-inactivegroup-hiddenpanel-tab-color: rgba(98, 114, 164, 0.5);\n --dv-separator-border: #bd93f9;\n --dv-paneview-header-border-color: #bd93f9;\n --dv-paneview-active-outline-color: #6272a4;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.active-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n top: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #94527e;\n z-index: 999;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab {\n position: relative;\n}\n.dockview-theme-dracula .groupview.inactive-group > .tabs-and-actions-container > .tabs-container > .tab.active-tab::after {\n position: absolute;\n left: 0px;\n bottom: 0px;\n content: \"\";\n width: 100%;\n height: 1px;\n background-color: #5e3d5a;\n z-index: 999;\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 .close-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n color: var(--dv-activegroup-hiddenpanel-tab-color);\n}\n.actions-bar .actions-container .close-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\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 box-sizing: border-box;\n height: 100%;\n width: 100%;\n background-color: var(--dv-drag-over-background-color);\n transition: top 70ms ease-out, left 70ms ease-out, width 70ms ease-out, height 70ms ease-out, opacity 0.15s ease-out;\n will-change: transform;\n pointer-events: none;\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.dv-dockview {\n position: relative;\n background-color: var(--dv-group-view-background-color);\n}\n.dv-dockview .dv-watermark-container {\n position: absolute;\n top: 0px;\n left: 0px;\n height: 100%;\n width: 100%;\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.inactive-tab {\n background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);\n 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.inactive-tab {\n background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);\n 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.dv-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 cursor: pointer;\n}\n.pane-container .view .default-header .dockview-pane-header-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.pane-container .view .default-header > span {\n padding-left: 8px;\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.dv-single-tab.dv-full-width-single-tab .tabs-container {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .tabs-container .tab {\n flex-grow: 1;\n}\n.tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .void-container {\n flex-grow: 0;\n}\n.tabs-and-actions-container .void-container {\n display: flex;\n flex-grow: 1;\n cursor: grab;\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.tab .dockview-react-tab {\n display: flex;\n padding: 0px 8px;\n align-items: center;\n height: 100%;\n}\n.tab .dockview-react-tab .dockview-react-tab-title {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .dockview-react-tab .dockview-react-tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .dockview-react-tab .dockview-react-tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.tab.inactive-tab:not(:hover) .dockview-react-tab-action {\n visibility: hidden;\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.dv-dragged {\n transform: translate3d(0px, 0px, 0px); /* 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.dv-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: 0px 8px;\n white-space: nowrap;\n text-overflow: elipsis;\n}\n.tab .default-tab .tab-content {\n padding: 0px 8px;\n flex-grow: 1;\n}\n.tab .default-tab .action-container {\n text-align: right;\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 .tab-action {\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n.tab .default-tab .action-container .tab-list .tab-action:hover {\n border-radius: 2px;\n background-color: var(--dv-icon-hover-background-color);\n}\n.watermark {\n display: flex;\n width: 100%;\n}\n.watermark.has-actions .watermark-title .actions-bar {\n display: none;\n}\n.watermark .watermark-title {\n height: 35px;\n width: 100%;\n display: flex;\n}\n.watermark .watermark-content {\n flex-grow: 1;\n}";
|
|
38
38
|
styleInject(css_248z);
|
|
39
39
|
|
|
40
40
|
class TransferObject {
|
|
@@ -205,12 +205,12 @@ var Disposable;
|
|
|
205
205
|
};
|
|
206
206
|
})(Disposable || (Disposable = {}));
|
|
207
207
|
class CompositeDisposable {
|
|
208
|
-
constructor(...args) {
|
|
209
|
-
this.disposables = args;
|
|
210
|
-
}
|
|
211
208
|
static from(...args) {
|
|
212
209
|
return new CompositeDisposable(...args);
|
|
213
210
|
}
|
|
211
|
+
constructor(...args) {
|
|
212
|
+
this.disposables = args;
|
|
213
|
+
}
|
|
214
214
|
addDisposables(...args) {
|
|
215
215
|
args.forEach((arg) => this.disposables.push(arg));
|
|
216
216
|
}
|
|
@@ -428,21 +428,6 @@ function firstIndex(array, fn) {
|
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
class ViewItem {
|
|
431
|
-
constructor(container, view, size, disposable) {
|
|
432
|
-
this.container = container;
|
|
433
|
-
this.view = view;
|
|
434
|
-
this.disposable = disposable;
|
|
435
|
-
this._cachedVisibleSize = undefined;
|
|
436
|
-
if (typeof size === 'number') {
|
|
437
|
-
this._size = size;
|
|
438
|
-
this._cachedVisibleSize = undefined;
|
|
439
|
-
container.classList.add('visible');
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
this._size = 0;
|
|
443
|
-
this._cachedVisibleSize = size.cachedVisibleSize;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
431
|
set size(size) {
|
|
447
432
|
this._size = size;
|
|
448
433
|
}
|
|
@@ -495,6 +480,21 @@ class ViewItem {
|
|
|
495
480
|
set enabled(enabled) {
|
|
496
481
|
this.container.style.pointerEvents = enabled ? '' : 'none';
|
|
497
482
|
}
|
|
483
|
+
constructor(container, view, size, disposable) {
|
|
484
|
+
this.container = container;
|
|
485
|
+
this.view = view;
|
|
486
|
+
this.disposable = disposable;
|
|
487
|
+
this._cachedVisibleSize = undefined;
|
|
488
|
+
if (typeof size === 'number') {
|
|
489
|
+
this._size = size;
|
|
490
|
+
this._cachedVisibleSize = undefined;
|
|
491
|
+
container.classList.add('visible');
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
this._size = 0;
|
|
495
|
+
this._cachedVisibleSize = size.cachedVisibleSize;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
498
|
// layout(offset: number, layoutContext: TLayoutContext | undefined): void {
|
|
499
499
|
// this.layoutContainer(offset);
|
|
500
500
|
// this.view.layout(this.size, offset, layoutContext);
|
|
@@ -541,6 +541,65 @@ var Sizing;
|
|
|
541
541
|
Sizing.Invisible = Invisible;
|
|
542
542
|
})(Sizing || (Sizing = {}));
|
|
543
543
|
class Splitview {
|
|
544
|
+
get size() {
|
|
545
|
+
return this._size;
|
|
546
|
+
}
|
|
547
|
+
set size(value) {
|
|
548
|
+
this._size = value;
|
|
549
|
+
}
|
|
550
|
+
get orthogonalSize() {
|
|
551
|
+
return this._orthogonalSize;
|
|
552
|
+
}
|
|
553
|
+
set orthogonalSize(value) {
|
|
554
|
+
this._orthogonalSize = value;
|
|
555
|
+
}
|
|
556
|
+
get length() {
|
|
557
|
+
return this.views.length;
|
|
558
|
+
}
|
|
559
|
+
get proportions() {
|
|
560
|
+
return this._proportions ? [...this._proportions] : undefined;
|
|
561
|
+
}
|
|
562
|
+
get orientation() {
|
|
563
|
+
return this._orientation;
|
|
564
|
+
}
|
|
565
|
+
set orientation(value) {
|
|
566
|
+
this._orientation = value;
|
|
567
|
+
const tmp = this.size;
|
|
568
|
+
this.size = this.orthogonalSize;
|
|
569
|
+
this.orthogonalSize = tmp;
|
|
570
|
+
removeClasses(this.element, 'horizontal', 'vertical');
|
|
571
|
+
this.element.classList.add(this.orientation == Orientation.HORIZONTAL
|
|
572
|
+
? 'horizontal'
|
|
573
|
+
: 'vertical');
|
|
574
|
+
}
|
|
575
|
+
get minimumSize() {
|
|
576
|
+
return this.views.reduce((r, item) => r + item.minimumSize, 0);
|
|
577
|
+
}
|
|
578
|
+
get maximumSize() {
|
|
579
|
+
return this.length === 0
|
|
580
|
+
? Number.POSITIVE_INFINITY
|
|
581
|
+
: this.views.reduce((r, item) => r + item.maximumSize, 0);
|
|
582
|
+
}
|
|
583
|
+
get startSnappingEnabled() {
|
|
584
|
+
return this._startSnappingEnabled;
|
|
585
|
+
}
|
|
586
|
+
set startSnappingEnabled(startSnappingEnabled) {
|
|
587
|
+
if (this._startSnappingEnabled === startSnappingEnabled) {
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
this._startSnappingEnabled = startSnappingEnabled;
|
|
591
|
+
this.updateSashEnablement();
|
|
592
|
+
}
|
|
593
|
+
get endSnappingEnabled() {
|
|
594
|
+
return this._endSnappingEnabled;
|
|
595
|
+
}
|
|
596
|
+
set endSnappingEnabled(endSnappingEnabled) {
|
|
597
|
+
if (this._endSnappingEnabled === endSnappingEnabled) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
this._endSnappingEnabled = endSnappingEnabled;
|
|
601
|
+
this.updateSashEnablement();
|
|
602
|
+
}
|
|
544
603
|
constructor(container, options) {
|
|
545
604
|
this.container = container;
|
|
546
605
|
this.views = [];
|
|
@@ -670,65 +729,6 @@ class Splitview {
|
|
|
670
729
|
this.saveProportions();
|
|
671
730
|
}
|
|
672
731
|
}
|
|
673
|
-
get size() {
|
|
674
|
-
return this._size;
|
|
675
|
-
}
|
|
676
|
-
set size(value) {
|
|
677
|
-
this._size = value;
|
|
678
|
-
}
|
|
679
|
-
get orthogonalSize() {
|
|
680
|
-
return this._orthogonalSize;
|
|
681
|
-
}
|
|
682
|
-
set orthogonalSize(value) {
|
|
683
|
-
this._orthogonalSize = value;
|
|
684
|
-
}
|
|
685
|
-
get length() {
|
|
686
|
-
return this.views.length;
|
|
687
|
-
}
|
|
688
|
-
get proportions() {
|
|
689
|
-
return this._proportions ? [...this._proportions] : undefined;
|
|
690
|
-
}
|
|
691
|
-
get orientation() {
|
|
692
|
-
return this._orientation;
|
|
693
|
-
}
|
|
694
|
-
set orientation(value) {
|
|
695
|
-
this._orientation = value;
|
|
696
|
-
const tmp = this.size;
|
|
697
|
-
this.size = this.orthogonalSize;
|
|
698
|
-
this.orthogonalSize = tmp;
|
|
699
|
-
removeClasses(this.element, 'horizontal', 'vertical');
|
|
700
|
-
this.element.classList.add(this.orientation == Orientation.HORIZONTAL
|
|
701
|
-
? 'horizontal'
|
|
702
|
-
: 'vertical');
|
|
703
|
-
}
|
|
704
|
-
get minimumSize() {
|
|
705
|
-
return this.views.reduce((r, item) => r + item.minimumSize, 0);
|
|
706
|
-
}
|
|
707
|
-
get maximumSize() {
|
|
708
|
-
return this.length === 0
|
|
709
|
-
? Number.POSITIVE_INFINITY
|
|
710
|
-
: this.views.reduce((r, item) => r + item.maximumSize, 0);
|
|
711
|
-
}
|
|
712
|
-
get startSnappingEnabled() {
|
|
713
|
-
return this._startSnappingEnabled;
|
|
714
|
-
}
|
|
715
|
-
set startSnappingEnabled(startSnappingEnabled) {
|
|
716
|
-
if (this._startSnappingEnabled === startSnappingEnabled) {
|
|
717
|
-
return;
|
|
718
|
-
}
|
|
719
|
-
this._startSnappingEnabled = startSnappingEnabled;
|
|
720
|
-
this.updateSashEnablement();
|
|
721
|
-
}
|
|
722
|
-
get endSnappingEnabled() {
|
|
723
|
-
return this._endSnappingEnabled;
|
|
724
|
-
}
|
|
725
|
-
set endSnappingEnabled(endSnappingEnabled) {
|
|
726
|
-
if (this._endSnappingEnabled === endSnappingEnabled) {
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
729
|
-
this._endSnappingEnabled = endSnappingEnabled;
|
|
730
|
-
this.updateSashEnablement();
|
|
731
|
-
}
|
|
732
732
|
style(styles) {
|
|
733
733
|
if ((styles === null || styles === void 0 ? void 0 : styles.separatorBorder) === 'transparent') {
|
|
734
734
|
removeClasses(this.element, 'separator-border');
|
|
@@ -1192,6 +1192,27 @@ class Splitview {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
class Paneview extends CompositeDisposable {
|
|
1195
|
+
get onDidAddView() {
|
|
1196
|
+
return this.splitview.onDidAddView;
|
|
1197
|
+
}
|
|
1198
|
+
get onDidRemoveView() {
|
|
1199
|
+
return this.splitview.onDidRemoveView;
|
|
1200
|
+
}
|
|
1201
|
+
get minimumSize() {
|
|
1202
|
+
return this.splitview.minimumSize;
|
|
1203
|
+
}
|
|
1204
|
+
get maximumSize() {
|
|
1205
|
+
return this.splitview.maximumSize;
|
|
1206
|
+
}
|
|
1207
|
+
get orientation() {
|
|
1208
|
+
return this.splitview.orientation;
|
|
1209
|
+
}
|
|
1210
|
+
get size() {
|
|
1211
|
+
return this.splitview.size;
|
|
1212
|
+
}
|
|
1213
|
+
get orthogonalSize() {
|
|
1214
|
+
return this.splitview.orthogonalSize;
|
|
1215
|
+
}
|
|
1195
1216
|
constructor(container, options) {
|
|
1196
1217
|
var _a;
|
|
1197
1218
|
super();
|
|
@@ -1234,27 +1255,6 @@ class Paneview extends CompositeDisposable {
|
|
|
1234
1255
|
this._onDidChange.fire();
|
|
1235
1256
|
}));
|
|
1236
1257
|
}
|
|
1237
|
-
get onDidAddView() {
|
|
1238
|
-
return this.splitview.onDidAddView;
|
|
1239
|
-
}
|
|
1240
|
-
get onDidRemoveView() {
|
|
1241
|
-
return this.splitview.onDidRemoveView;
|
|
1242
|
-
}
|
|
1243
|
-
get minimumSize() {
|
|
1244
|
-
return this.splitview.minimumSize;
|
|
1245
|
-
}
|
|
1246
|
-
get maximumSize() {
|
|
1247
|
-
return this.splitview.maximumSize;
|
|
1248
|
-
}
|
|
1249
|
-
get orientation() {
|
|
1250
|
-
return this.splitview.orientation;
|
|
1251
|
-
}
|
|
1252
|
-
get size() {
|
|
1253
|
-
return this.splitview.size;
|
|
1254
|
-
}
|
|
1255
|
-
get orthogonalSize() {
|
|
1256
|
-
return this.splitview.orthogonalSize;
|
|
1257
|
-
}
|
|
1258
1258
|
addPane(pane, size, index = this.splitview.length, skipLayout = false) {
|
|
1259
1259
|
const disposable = pane.onDidChangeExpansionState(() => {
|
|
1260
1260
|
this.setupAnimation();
|
|
@@ -1333,243 +1333,16 @@ class Paneview extends CompositeDisposable {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
// when the element has child elements where the events are fired
|
|
1344
|
-
// repeadedly.
|
|
1345
|
-
this.counter = 0;
|
|
1346
|
-
this.registerListeners();
|
|
1336
|
+
/*---------------------------------------------------------------------------------------------
|
|
1337
|
+
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
1338
|
+
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
1339
|
+
*--------------------------------------------------------------------------------------------*/
|
|
1340
|
+
class LeafNode {
|
|
1341
|
+
get minimumWidth() {
|
|
1342
|
+
return this.view.minimumWidth;
|
|
1347
1343
|
}
|
|
1348
|
-
|
|
1349
|
-
this.
|
|
1350
|
-
this.counter++;
|
|
1351
|
-
this.callbacks.onDragEnter(e);
|
|
1352
|
-
}));
|
|
1353
|
-
this.addDisposables(addDisposableListener(this.element, 'dragover', (e) => {
|
|
1354
|
-
e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
|
|
1355
|
-
if (this.callbacks.onDragOver) {
|
|
1356
|
-
this.callbacks.onDragOver(e);
|
|
1357
|
-
}
|
|
1358
|
-
}));
|
|
1359
|
-
this.addDisposables(addDisposableListener(this.element, 'dragleave', (e) => {
|
|
1360
|
-
this.counter--;
|
|
1361
|
-
if (this.counter === 0) {
|
|
1362
|
-
this.callbacks.onDragLeave(e);
|
|
1363
|
-
}
|
|
1364
|
-
}));
|
|
1365
|
-
this.addDisposables(addDisposableListener(this.element, 'dragend', (e) => {
|
|
1366
|
-
this.counter = 0;
|
|
1367
|
-
this.callbacks.onDragEnd(e);
|
|
1368
|
-
}));
|
|
1369
|
-
this.addDisposables(addDisposableListener(this.element, 'drop', (e) => {
|
|
1370
|
-
this.counter = 0;
|
|
1371
|
-
this.callbacks.onDrop(e);
|
|
1372
|
-
}));
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
var Position;
|
|
1377
|
-
(function (Position) {
|
|
1378
|
-
Position["Top"] = "Top";
|
|
1379
|
-
Position["Left"] = "Left";
|
|
1380
|
-
Position["Bottom"] = "Bottom";
|
|
1381
|
-
Position["Right"] = "Right";
|
|
1382
|
-
Position["Center"] = "Center";
|
|
1383
|
-
})(Position || (Position = {}));
|
|
1384
|
-
function isBooleanValue(canDisplayOverlay) {
|
|
1385
|
-
return typeof canDisplayOverlay === 'boolean';
|
|
1386
|
-
}
|
|
1387
|
-
class Droptarget extends CompositeDisposable {
|
|
1388
|
-
constructor(element, options) {
|
|
1389
|
-
super();
|
|
1390
|
-
this.element = element;
|
|
1391
|
-
this.options = options;
|
|
1392
|
-
this._onDrop = new Emitter();
|
|
1393
|
-
this.onDrop = this._onDrop.event;
|
|
1394
|
-
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1395
|
-
onDragEnter: () => undefined,
|
|
1396
|
-
onDragOver: (e) => {
|
|
1397
|
-
const width = this.element.clientWidth;
|
|
1398
|
-
const height = this.element.clientHeight;
|
|
1399
|
-
if (width === 0 || height === 0) {
|
|
1400
|
-
return; // avoid div!0
|
|
1401
|
-
}
|
|
1402
|
-
const x = e.offsetX;
|
|
1403
|
-
const y = e.offsetY;
|
|
1404
|
-
const xp = (100 * x) / width;
|
|
1405
|
-
const yp = (100 * y) / height;
|
|
1406
|
-
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1407
|
-
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
1408
|
-
if (!this.options.canDisplayOverlay) {
|
|
1409
|
-
return;
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
1413
|
-
return;
|
|
1414
|
-
}
|
|
1415
|
-
if (!this.target) {
|
|
1416
|
-
this.target = document.createElement('div');
|
|
1417
|
-
this.target.className = 'drop-target-dropzone';
|
|
1418
|
-
this.overlay = document.createElement('div');
|
|
1419
|
-
this.overlay.className = 'drop-target-selection';
|
|
1420
|
-
this._state = Position.Center;
|
|
1421
|
-
this.target.appendChild(this.overlay);
|
|
1422
|
-
this.element.classList.add('drop-target');
|
|
1423
|
-
this.element.append(this.target);
|
|
1424
|
-
}
|
|
1425
|
-
if (this.options.validOverlays === 'none') {
|
|
1426
|
-
return;
|
|
1427
|
-
}
|
|
1428
|
-
if (!this.target || !this.overlay) {
|
|
1429
|
-
return;
|
|
1430
|
-
}
|
|
1431
|
-
const isSmallX = width < 100;
|
|
1432
|
-
const isSmallY = height < 100;
|
|
1433
|
-
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1434
|
-
this.setState(quadrant);
|
|
1435
|
-
},
|
|
1436
|
-
onDragLeave: () => {
|
|
1437
|
-
this.removeDropTarget();
|
|
1438
|
-
},
|
|
1439
|
-
onDragEnd: () => {
|
|
1440
|
-
this.removeDropTarget();
|
|
1441
|
-
},
|
|
1442
|
-
onDrop: (e) => {
|
|
1443
|
-
e.preventDefault();
|
|
1444
|
-
e.stopPropagation();
|
|
1445
|
-
const state = this._state;
|
|
1446
|
-
this.removeDropTarget();
|
|
1447
|
-
if (state) {
|
|
1448
|
-
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
}));
|
|
1452
|
-
}
|
|
1453
|
-
get state() {
|
|
1454
|
-
return this._state;
|
|
1455
|
-
}
|
|
1456
|
-
set validOverlays(value) {
|
|
1457
|
-
this.options.validOverlays = value;
|
|
1458
|
-
}
|
|
1459
|
-
set canDisplayOverlay(value) {
|
|
1460
|
-
this.options.canDisplayOverlay = value;
|
|
1461
|
-
}
|
|
1462
|
-
dispose() {
|
|
1463
|
-
this.removeDropTarget();
|
|
1464
|
-
}
|
|
1465
|
-
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1466
|
-
if (!this.overlay) {
|
|
1467
|
-
return;
|
|
1468
|
-
}
|
|
1469
|
-
const isLeft = quadrant === 'left';
|
|
1470
|
-
const isRight = quadrant === 'right';
|
|
1471
|
-
const isTop = quadrant === 'top';
|
|
1472
|
-
const isBottom = quadrant === 'bottom';
|
|
1473
|
-
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1474
|
-
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1475
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1476
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1477
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1478
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1479
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1480
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1481
|
-
}
|
|
1482
|
-
setState(quadrant) {
|
|
1483
|
-
switch (quadrant) {
|
|
1484
|
-
case 'top':
|
|
1485
|
-
this._state = Position.Top;
|
|
1486
|
-
break;
|
|
1487
|
-
case 'left':
|
|
1488
|
-
this._state = Position.Left;
|
|
1489
|
-
break;
|
|
1490
|
-
case 'bottom':
|
|
1491
|
-
this._state = Position.Bottom;
|
|
1492
|
-
break;
|
|
1493
|
-
case 'right':
|
|
1494
|
-
this._state = Position.Right;
|
|
1495
|
-
break;
|
|
1496
|
-
default:
|
|
1497
|
-
this._state = Position.Center;
|
|
1498
|
-
break;
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
calculateQuadrant(overlayType, xp, yp) {
|
|
1502
|
-
switch (overlayType) {
|
|
1503
|
-
case 'all':
|
|
1504
|
-
if (xp < 20) {
|
|
1505
|
-
return 'left';
|
|
1506
|
-
}
|
|
1507
|
-
if (xp > 80) {
|
|
1508
|
-
return 'right';
|
|
1509
|
-
}
|
|
1510
|
-
if (yp < 20) {
|
|
1511
|
-
return 'top';
|
|
1512
|
-
}
|
|
1513
|
-
if (yp > 80) {
|
|
1514
|
-
return 'bottom';
|
|
1515
|
-
}
|
|
1516
|
-
break;
|
|
1517
|
-
case 'vertical':
|
|
1518
|
-
if (yp < 50) {
|
|
1519
|
-
return 'top';
|
|
1520
|
-
}
|
|
1521
|
-
return 'bottom';
|
|
1522
|
-
case 'horizontal':
|
|
1523
|
-
if (xp < 50) {
|
|
1524
|
-
return 'left';
|
|
1525
|
-
}
|
|
1526
|
-
return 'right';
|
|
1527
|
-
}
|
|
1528
|
-
return null;
|
|
1529
|
-
}
|
|
1530
|
-
removeDropTarget() {
|
|
1531
|
-
if (this.target) {
|
|
1532
|
-
this._state = undefined;
|
|
1533
|
-
this.element.removeChild(this.target);
|
|
1534
|
-
this.target = undefined;
|
|
1535
|
-
this.element.classList.remove('drop-target');
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
/*---------------------------------------------------------------------------------------------
|
|
1541
|
-
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
1542
|
-
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
1543
|
-
*--------------------------------------------------------------------------------------------*/
|
|
1544
|
-
class LeafNode {
|
|
1545
|
-
constructor(view, orientation, orthogonalSize, size = 0) {
|
|
1546
|
-
this.view = view;
|
|
1547
|
-
this.orientation = orientation;
|
|
1548
|
-
this._onDidChange = new Emitter();
|
|
1549
|
-
this.onDidChange = this._onDidChange.event;
|
|
1550
|
-
this._orthogonalSize = orthogonalSize;
|
|
1551
|
-
this._size = size;
|
|
1552
|
-
this._disposable = this.view.onDidChange((event) => {
|
|
1553
|
-
if (event) {
|
|
1554
|
-
this._onDidChange.fire({
|
|
1555
|
-
size: this.orientation === Orientation.VERTICAL
|
|
1556
|
-
? event.width
|
|
1557
|
-
: event.height,
|
|
1558
|
-
orthogonalSize: this.orientation === Orientation.VERTICAL
|
|
1559
|
-
? event.height
|
|
1560
|
-
: event.width,
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
else {
|
|
1564
|
-
this._onDidChange.fire({});
|
|
1565
|
-
}
|
|
1566
|
-
});
|
|
1567
|
-
}
|
|
1568
|
-
get minimumWidth() {
|
|
1569
|
-
return this.view.minimumWidth;
|
|
1570
|
-
}
|
|
1571
|
-
get maximumWidth() {
|
|
1572
|
-
return this.view.maximumWidth;
|
|
1344
|
+
get maximumWidth() {
|
|
1345
|
+
return this.view.maximumWidth;
|
|
1573
1346
|
}
|
|
1574
1347
|
get minimumHeight() {
|
|
1575
1348
|
return this.view.minimumHeight;
|
|
@@ -1622,6 +1395,29 @@ class LeafNode {
|
|
|
1622
1395
|
? this.size
|
|
1623
1396
|
: this.orthogonalSize;
|
|
1624
1397
|
}
|
|
1398
|
+
constructor(view, orientation, orthogonalSize, size = 0) {
|
|
1399
|
+
this.view = view;
|
|
1400
|
+
this.orientation = orientation;
|
|
1401
|
+
this._onDidChange = new Emitter();
|
|
1402
|
+
this.onDidChange = this._onDidChange.event;
|
|
1403
|
+
this._orthogonalSize = orthogonalSize;
|
|
1404
|
+
this._size = size;
|
|
1405
|
+
this._disposable = this.view.onDidChange((event) => {
|
|
1406
|
+
if (event) {
|
|
1407
|
+
this._onDidChange.fire({
|
|
1408
|
+
size: this.orientation === Orientation.VERTICAL
|
|
1409
|
+
? event.width
|
|
1410
|
+
: event.height,
|
|
1411
|
+
orthogonalSize: this.orientation === Orientation.VERTICAL
|
|
1412
|
+
? event.height
|
|
1413
|
+
: event.width,
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
else {
|
|
1417
|
+
this._onDidChange.fire({});
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1625
1421
|
setVisible(visible) {
|
|
1626
1422
|
if (this.view.setVisible) {
|
|
1627
1423
|
this.view.setVisible(visible);
|
|
@@ -1644,53 +1440,6 @@ class LeafNode {
|
|
|
1644
1440
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
1645
1441
|
*--------------------------------------------------------------------------------------------*/
|
|
1646
1442
|
class BranchNode extends CompositeDisposable {
|
|
1647
|
-
constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
|
|
1648
|
-
super();
|
|
1649
|
-
this.orientation = orientation;
|
|
1650
|
-
this.proportionalLayout = proportionalLayout;
|
|
1651
|
-
this.styles = styles;
|
|
1652
|
-
this.children = [];
|
|
1653
|
-
this._onDidChange = new Emitter();
|
|
1654
|
-
this.onDidChange = this._onDidChange.event;
|
|
1655
|
-
this._childrenDisposable = Disposable.NONE;
|
|
1656
|
-
this._orthogonalSize = orthogonalSize;
|
|
1657
|
-
this._size = size;
|
|
1658
|
-
this.element = document.createElement('div');
|
|
1659
|
-
this.element.className = 'branch-node';
|
|
1660
|
-
if (!childDescriptors) {
|
|
1661
|
-
this.splitview = new Splitview(this.element, {
|
|
1662
|
-
orientation: this.orientation,
|
|
1663
|
-
proportionalLayout,
|
|
1664
|
-
styles,
|
|
1665
|
-
});
|
|
1666
|
-
this.splitview.layout(this.size, this.orthogonalSize);
|
|
1667
|
-
}
|
|
1668
|
-
else {
|
|
1669
|
-
const descriptor = {
|
|
1670
|
-
views: childDescriptors.map((childDescriptor) => {
|
|
1671
|
-
return {
|
|
1672
|
-
view: childDescriptor.node,
|
|
1673
|
-
size: childDescriptor.node.size,
|
|
1674
|
-
visible: childDescriptor.node instanceof LeafNode &&
|
|
1675
|
-
childDescriptor.visible !== undefined
|
|
1676
|
-
? childDescriptor.visible
|
|
1677
|
-
: true,
|
|
1678
|
-
};
|
|
1679
|
-
}),
|
|
1680
|
-
size: this.size,
|
|
1681
|
-
};
|
|
1682
|
-
this.children = childDescriptors.map((c) => c.node);
|
|
1683
|
-
this.splitview = new Splitview(this.element, {
|
|
1684
|
-
orientation: this.orientation,
|
|
1685
|
-
descriptor,
|
|
1686
|
-
proportionalLayout,
|
|
1687
|
-
});
|
|
1688
|
-
}
|
|
1689
|
-
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1690
|
-
this._onDidChange.fire({});
|
|
1691
|
-
}));
|
|
1692
|
-
this.setupChildrenEvents();
|
|
1693
|
-
}
|
|
1694
1443
|
get width() {
|
|
1695
1444
|
return this.orientation === Orientation.HORIZONTAL
|
|
1696
1445
|
? this.size
|
|
@@ -1756,6 +1505,53 @@ class BranchNode extends CompositeDisposable {
|
|
|
1756
1505
|
}
|
|
1757
1506
|
return LayoutPriority.Normal;
|
|
1758
1507
|
}
|
|
1508
|
+
constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
|
|
1509
|
+
super();
|
|
1510
|
+
this.orientation = orientation;
|
|
1511
|
+
this.proportionalLayout = proportionalLayout;
|
|
1512
|
+
this.styles = styles;
|
|
1513
|
+
this.children = [];
|
|
1514
|
+
this._onDidChange = new Emitter();
|
|
1515
|
+
this.onDidChange = this._onDidChange.event;
|
|
1516
|
+
this._childrenDisposable = Disposable.NONE;
|
|
1517
|
+
this._orthogonalSize = orthogonalSize;
|
|
1518
|
+
this._size = size;
|
|
1519
|
+
this.element = document.createElement('div');
|
|
1520
|
+
this.element.className = 'branch-node';
|
|
1521
|
+
if (!childDescriptors) {
|
|
1522
|
+
this.splitview = new Splitview(this.element, {
|
|
1523
|
+
orientation: this.orientation,
|
|
1524
|
+
proportionalLayout,
|
|
1525
|
+
styles,
|
|
1526
|
+
});
|
|
1527
|
+
this.splitview.layout(this.size, this.orthogonalSize);
|
|
1528
|
+
}
|
|
1529
|
+
else {
|
|
1530
|
+
const descriptor = {
|
|
1531
|
+
views: childDescriptors.map((childDescriptor) => {
|
|
1532
|
+
return {
|
|
1533
|
+
view: childDescriptor.node,
|
|
1534
|
+
size: childDescriptor.node.size,
|
|
1535
|
+
visible: childDescriptor.node instanceof LeafNode &&
|
|
1536
|
+
childDescriptor.visible !== undefined
|
|
1537
|
+
? childDescriptor.visible
|
|
1538
|
+
: true,
|
|
1539
|
+
};
|
|
1540
|
+
}),
|
|
1541
|
+
size: this.size,
|
|
1542
|
+
};
|
|
1543
|
+
this.children = childDescriptors.map((c) => c.node);
|
|
1544
|
+
this.splitview = new Splitview(this.element, {
|
|
1545
|
+
orientation: this.orientation,
|
|
1546
|
+
descriptor,
|
|
1547
|
+
proportionalLayout,
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1551
|
+
this._onDidChange.fire({});
|
|
1552
|
+
}));
|
|
1553
|
+
this.setupChildrenEvents();
|
|
1554
|
+
}
|
|
1759
1555
|
setVisible(visible) {
|
|
1760
1556
|
for (const child of this.children) {
|
|
1761
1557
|
child.setVisible(visible);
|
|
@@ -1927,20 +1723,18 @@ function getRelativeLocation(rootOrientation, location, direction) {
|
|
|
1927
1723
|
if (orientation === directionOrientation) {
|
|
1928
1724
|
const [rest, _index] = tail(location);
|
|
1929
1725
|
let index = _index;
|
|
1930
|
-
if (direction ===
|
|
1726
|
+
if (direction === 'right' || direction === 'bottom') {
|
|
1931
1727
|
index += 1;
|
|
1932
1728
|
}
|
|
1933
1729
|
return [...rest, index];
|
|
1934
1730
|
}
|
|
1935
1731
|
else {
|
|
1936
|
-
const index = direction ===
|
|
1937
|
-
? 1
|
|
1938
|
-
: 0;
|
|
1732
|
+
const index = direction === 'right' || direction === 'bottom' ? 1 : 0;
|
|
1939
1733
|
return [...location, index];
|
|
1940
1734
|
}
|
|
1941
1735
|
}
|
|
1942
1736
|
function getDirectionOrientation(direction) {
|
|
1943
|
-
return direction ===
|
|
1737
|
+
return direction === 'top' || direction === 'bottom'
|
|
1944
1738
|
? Orientation.VERTICAL
|
|
1945
1739
|
: Orientation.HORIZONTAL;
|
|
1946
1740
|
}
|
|
@@ -1975,15 +1769,8 @@ const serializeBranchNode = (node, orientation) => {
|
|
|
1975
1769
|
};
|
|
1976
1770
|
};
|
|
1977
1771
|
class Gridview {
|
|
1978
|
-
|
|
1979
|
-
this.
|
|
1980
|
-
this.styles = styles;
|
|
1981
|
-
this.disposable = new MutableDisposable();
|
|
1982
|
-
this._onDidChange = new Emitter();
|
|
1983
|
-
this.onDidChange = this._onDidChange.event;
|
|
1984
|
-
this.element = document.createElement('div');
|
|
1985
|
-
this.element.className = 'grid-view';
|
|
1986
|
-
this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
|
|
1772
|
+
get length() {
|
|
1773
|
+
return this._root ? this._root.children.length : 0;
|
|
1987
1774
|
}
|
|
1988
1775
|
serialize() {
|
|
1989
1776
|
const root = serializeBranchNode(this.getView(), this.orientation);
|
|
@@ -2057,6 +1844,32 @@ class Gridview {
|
|
|
2057
1844
|
this._onDidChange.fire(e);
|
|
2058
1845
|
});
|
|
2059
1846
|
}
|
|
1847
|
+
/**
|
|
1848
|
+
* If the root is orientated as a VERTICAL node then nest the existing root within a new HORIZIONTAL root node
|
|
1849
|
+
* If the root is orientated as a HORIZONTAL node then nest the existing root within a new VERITCAL root node
|
|
1850
|
+
*/
|
|
1851
|
+
insertOrthogonalSplitviewAtRoot() {
|
|
1852
|
+
if (!this._root) {
|
|
1853
|
+
return;
|
|
1854
|
+
}
|
|
1855
|
+
const oldRoot = this.root;
|
|
1856
|
+
oldRoot.element.remove();
|
|
1857
|
+
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
1858
|
+
if (oldRoot.children.length === 1) {
|
|
1859
|
+
// can remove one level of redundant branching if there is only a single child
|
|
1860
|
+
const childReference = oldRoot.children[0];
|
|
1861
|
+
oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
|
|
1862
|
+
oldRoot.dispose();
|
|
1863
|
+
this._root.addChild(childReference, Sizing.Distribute, 0);
|
|
1864
|
+
}
|
|
1865
|
+
else {
|
|
1866
|
+
this._root.addChild(oldRoot, Sizing.Distribute, 0);
|
|
1867
|
+
}
|
|
1868
|
+
this.element.appendChild(this._root.element);
|
|
1869
|
+
this.disposable.value = this._root.onDidChange((e) => {
|
|
1870
|
+
this._onDidChange.fire(e);
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
2060
1873
|
next(location) {
|
|
2061
1874
|
return this.progmaticSelect(location);
|
|
2062
1875
|
}
|
|
@@ -2115,6 +1928,16 @@ class Gridview {
|
|
|
2115
1928
|
get maximumHeight() {
|
|
2116
1929
|
return this.root.maximumHeight;
|
|
2117
1930
|
}
|
|
1931
|
+
constructor(proportionalLayout, styles, orientation) {
|
|
1932
|
+
this.proportionalLayout = proportionalLayout;
|
|
1933
|
+
this.styles = styles;
|
|
1934
|
+
this.disposable = new MutableDisposable();
|
|
1935
|
+
this._onDidChange = new Emitter();
|
|
1936
|
+
this.onDidChange = this._onDidChange.event;
|
|
1937
|
+
this.element = document.createElement('div');
|
|
1938
|
+
this.element.className = 'grid-view';
|
|
1939
|
+
this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
|
|
1940
|
+
}
|
|
2118
1941
|
isViewVisible(location) {
|
|
2119
1942
|
const [rest, index] = tail(location);
|
|
2120
1943
|
const [, parent] = this.getNode(rest);
|
|
@@ -2246,9 +2069,6 @@ class Gridview {
|
|
|
2246
2069
|
}
|
|
2247
2070
|
|
|
2248
2071
|
class SplitviewApi {
|
|
2249
|
-
constructor(component) {
|
|
2250
|
-
this.component = component;
|
|
2251
|
-
}
|
|
2252
2072
|
get minimumSize() {
|
|
2253
2073
|
return this.component.minimumSize;
|
|
2254
2074
|
}
|
|
@@ -2282,6 +2102,9 @@ class SplitviewApi {
|
|
|
2282
2102
|
get onDidRemoveView() {
|
|
2283
2103
|
return this.component.onDidRemoveView;
|
|
2284
2104
|
}
|
|
2105
|
+
constructor(component) {
|
|
2106
|
+
this.component = component;
|
|
2107
|
+
}
|
|
2285
2108
|
updateOptions(options) {
|
|
2286
2109
|
this.component.updateOptions(options);
|
|
2287
2110
|
}
|
|
@@ -2314,9 +2137,6 @@ class SplitviewApi {
|
|
|
2314
2137
|
}
|
|
2315
2138
|
}
|
|
2316
2139
|
class PaneviewApi {
|
|
2317
|
-
constructor(component) {
|
|
2318
|
-
this.component = component;
|
|
2319
|
-
}
|
|
2320
2140
|
get minimumSize() {
|
|
2321
2141
|
return this.component.minimumSize;
|
|
2322
2142
|
}
|
|
@@ -2355,6 +2175,9 @@ class PaneviewApi {
|
|
|
2355
2175
|
};
|
|
2356
2176
|
return emitter.event;
|
|
2357
2177
|
}
|
|
2178
|
+
constructor(component) {
|
|
2179
|
+
this.component = component;
|
|
2180
|
+
}
|
|
2358
2181
|
removePanel(panel) {
|
|
2359
2182
|
this.component.removePanel(panel);
|
|
2360
2183
|
}
|
|
@@ -2384,9 +2207,6 @@ class PaneviewApi {
|
|
|
2384
2207
|
}
|
|
2385
2208
|
}
|
|
2386
2209
|
class GridviewApi {
|
|
2387
|
-
constructor(component) {
|
|
2388
|
-
this.component = component;
|
|
2389
|
-
}
|
|
2390
2210
|
get minimumHeight() {
|
|
2391
2211
|
return this.component.minimumHeight;
|
|
2392
2212
|
}
|
|
@@ -2429,6 +2249,9 @@ class GridviewApi {
|
|
|
2429
2249
|
set orientation(value) {
|
|
2430
2250
|
this.component.updateOptions({ orientation: value });
|
|
2431
2251
|
}
|
|
2252
|
+
constructor(component) {
|
|
2253
|
+
this.component = component;
|
|
2254
|
+
}
|
|
2432
2255
|
focus() {
|
|
2433
2256
|
this.component.focus();
|
|
2434
2257
|
}
|
|
@@ -2458,8 +2281,8 @@ class GridviewApi {
|
|
|
2458
2281
|
}
|
|
2459
2282
|
}
|
|
2460
2283
|
class DockviewApi {
|
|
2461
|
-
|
|
2462
|
-
this.component
|
|
2284
|
+
get id() {
|
|
2285
|
+
return this.component.id;
|
|
2463
2286
|
}
|
|
2464
2287
|
get width() {
|
|
2465
2288
|
return this.component.width;
|
|
@@ -2524,6 +2347,9 @@ class DockviewApi {
|
|
|
2524
2347
|
get activeGroup() {
|
|
2525
2348
|
return this.component.activeGroup;
|
|
2526
2349
|
}
|
|
2350
|
+
constructor(component) {
|
|
2351
|
+
this.component = component;
|
|
2352
|
+
}
|
|
2527
2353
|
getTabHeight() {
|
|
2528
2354
|
return this.component.tabHeight;
|
|
2529
2355
|
}
|
|
@@ -2542,36 +2368,322 @@ class DockviewApi {
|
|
|
2542
2368
|
addPanel(options) {
|
|
2543
2369
|
return this.component.addPanel(options);
|
|
2544
2370
|
}
|
|
2545
|
-
|
|
2546
|
-
this.component.
|
|
2371
|
+
addGroup(options) {
|
|
2372
|
+
return this.component.addGroup(options);
|
|
2547
2373
|
}
|
|
2548
2374
|
moveToNext(options) {
|
|
2549
2375
|
this.component.moveToNext(options);
|
|
2550
2376
|
}
|
|
2551
|
-
moveToPrevious(options) {
|
|
2552
|
-
this.component.moveToPrevious(options);
|
|
2377
|
+
moveToPrevious(options) {
|
|
2378
|
+
this.component.moveToPrevious(options);
|
|
2379
|
+
}
|
|
2380
|
+
closeAllGroups() {
|
|
2381
|
+
return this.component.closeAllGroups();
|
|
2382
|
+
}
|
|
2383
|
+
removeGroup(group) {
|
|
2384
|
+
this.component.removeGroup(group);
|
|
2385
|
+
}
|
|
2386
|
+
getGroup(id) {
|
|
2387
|
+
return this.component.getPanel(id);
|
|
2388
|
+
}
|
|
2389
|
+
fromJSON(data) {
|
|
2390
|
+
this.component.fromJSON(data);
|
|
2391
|
+
}
|
|
2392
|
+
toJSON() {
|
|
2393
|
+
return this.component.toJSON();
|
|
2394
|
+
}
|
|
2395
|
+
clear() {
|
|
2396
|
+
this.component.clear();
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
class DragAndDropObserver extends CompositeDisposable {
|
|
2401
|
+
constructor(element, callbacks) {
|
|
2402
|
+
super();
|
|
2403
|
+
this.element = element;
|
|
2404
|
+
this.callbacks = callbacks;
|
|
2405
|
+
this.target = null;
|
|
2406
|
+
this.registerListeners();
|
|
2407
|
+
}
|
|
2408
|
+
registerListeners() {
|
|
2409
|
+
this.addDisposables(addDisposableListener(this.element, 'dragenter', (e) => {
|
|
2410
|
+
this.target = e.target;
|
|
2411
|
+
this.callbacks.onDragEnter(e);
|
|
2412
|
+
}, true));
|
|
2413
|
+
this.addDisposables(addDisposableListener(this.element, 'dragover', (e) => {
|
|
2414
|
+
e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
|
|
2415
|
+
if (this.callbacks.onDragOver) {
|
|
2416
|
+
this.callbacks.onDragOver(e);
|
|
2417
|
+
}
|
|
2418
|
+
}, true));
|
|
2419
|
+
this.addDisposables(addDisposableListener(this.element, 'dragleave', (e) => {
|
|
2420
|
+
if (this.target === e.target) {
|
|
2421
|
+
this.target = null;
|
|
2422
|
+
this.callbacks.onDragLeave(e);
|
|
2423
|
+
}
|
|
2424
|
+
}));
|
|
2425
|
+
this.addDisposables(addDisposableListener(this.element, 'dragend', (e) => {
|
|
2426
|
+
this.target = null;
|
|
2427
|
+
this.callbacks.onDragEnd(e);
|
|
2428
|
+
}));
|
|
2429
|
+
this.addDisposables(addDisposableListener(this.element, 'drop', (e) => {
|
|
2430
|
+
this.callbacks.onDrop(e);
|
|
2431
|
+
}));
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
function isBooleanValue(value) {
|
|
2436
|
+
return typeof value === 'boolean';
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
function numberOrFallback(maybeNumber, fallback) {
|
|
2440
|
+
return typeof maybeNumber === 'number' ? maybeNumber : fallback;
|
|
2441
|
+
}
|
|
2442
|
+
function directionToPosition(direction) {
|
|
2443
|
+
switch (direction) {
|
|
2444
|
+
case 'above':
|
|
2445
|
+
return 'top';
|
|
2446
|
+
case 'below':
|
|
2447
|
+
return 'bottom';
|
|
2448
|
+
case 'left':
|
|
2449
|
+
return 'left';
|
|
2450
|
+
case 'right':
|
|
2451
|
+
return 'right';
|
|
2452
|
+
case 'within':
|
|
2453
|
+
return 'center';
|
|
2454
|
+
default:
|
|
2455
|
+
throw new Error(`invalid direction '${direction}'`);
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
function positionToDirection(position) {
|
|
2459
|
+
switch (position) {
|
|
2460
|
+
case 'top':
|
|
2461
|
+
return 'above';
|
|
2462
|
+
case 'bottom':
|
|
2463
|
+
return 'below';
|
|
2464
|
+
case 'left':
|
|
2465
|
+
return 'left';
|
|
2466
|
+
case 'right':
|
|
2467
|
+
return 'right';
|
|
2468
|
+
case 'center':
|
|
2469
|
+
return 'within';
|
|
2470
|
+
default:
|
|
2471
|
+
throw new Error(`invalid position '${position}'`);
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
class Droptarget extends CompositeDisposable {
|
|
2475
|
+
get state() {
|
|
2476
|
+
return this._state;
|
|
2477
|
+
}
|
|
2478
|
+
constructor(element, options) {
|
|
2479
|
+
super();
|
|
2480
|
+
this.element = element;
|
|
2481
|
+
this.options = options;
|
|
2482
|
+
this._onDrop = new Emitter();
|
|
2483
|
+
this.onDrop = this._onDrop.event;
|
|
2484
|
+
// use a set to take advantage of #<set>.has
|
|
2485
|
+
const acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
2486
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
2487
|
+
onDragEnter: () => undefined,
|
|
2488
|
+
onDragOver: (e) => {
|
|
2489
|
+
const width = this.element.clientWidth;
|
|
2490
|
+
const height = this.element.clientHeight;
|
|
2491
|
+
if (width === 0 || height === 0) {
|
|
2492
|
+
return; // avoid div!0
|
|
2493
|
+
}
|
|
2494
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
2495
|
+
const x = e.clientX - rect.left;
|
|
2496
|
+
const y = e.clientY - rect.top;
|
|
2497
|
+
const quadrant = this.calculateQuadrant(acceptedTargetZonesSet, x, y, width, height);
|
|
2498
|
+
if (quadrant === null) {
|
|
2499
|
+
// no drop target should be displayed
|
|
2500
|
+
this.removeDropTarget();
|
|
2501
|
+
return;
|
|
2502
|
+
}
|
|
2503
|
+
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
2504
|
+
if (!this.options.canDisplayOverlay) {
|
|
2505
|
+
return;
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
2509
|
+
return;
|
|
2510
|
+
}
|
|
2511
|
+
if (!this.target) {
|
|
2512
|
+
this.target = document.createElement('div');
|
|
2513
|
+
this.target.className = 'drop-target-dropzone';
|
|
2514
|
+
this.overlay = document.createElement('div');
|
|
2515
|
+
this.overlay.className = 'drop-target-selection';
|
|
2516
|
+
this._state = 'center';
|
|
2517
|
+
this.target.appendChild(this.overlay);
|
|
2518
|
+
this.element.classList.add('drop-target');
|
|
2519
|
+
this.element.append(this.target);
|
|
2520
|
+
}
|
|
2521
|
+
if (this.options.acceptedTargetZones.length === 0) {
|
|
2522
|
+
return;
|
|
2523
|
+
}
|
|
2524
|
+
if (!this.target || !this.overlay) {
|
|
2525
|
+
return;
|
|
2526
|
+
}
|
|
2527
|
+
this.toggleClasses(quadrant, width, height);
|
|
2528
|
+
this.setState(quadrant);
|
|
2529
|
+
},
|
|
2530
|
+
onDragLeave: () => {
|
|
2531
|
+
this.removeDropTarget();
|
|
2532
|
+
},
|
|
2533
|
+
onDragEnd: () => {
|
|
2534
|
+
this.removeDropTarget();
|
|
2535
|
+
},
|
|
2536
|
+
onDrop: (e) => {
|
|
2537
|
+
e.preventDefault();
|
|
2538
|
+
e.stopPropagation();
|
|
2539
|
+
const state = this._state;
|
|
2540
|
+
this.removeDropTarget();
|
|
2541
|
+
if (state) {
|
|
2542
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
2543
|
+
}
|
|
2544
|
+
},
|
|
2545
|
+
}));
|
|
2546
|
+
}
|
|
2547
|
+
dispose() {
|
|
2548
|
+
this.removeDropTarget();
|
|
2549
|
+
}
|
|
2550
|
+
toggleClasses(quadrant, width, height) {
|
|
2551
|
+
var _a, _b, _c, _d;
|
|
2552
|
+
if (!this.overlay) {
|
|
2553
|
+
return;
|
|
2554
|
+
}
|
|
2555
|
+
const isSmallX = width < 100;
|
|
2556
|
+
const isSmallY = height < 100;
|
|
2557
|
+
const isLeft = quadrant === 'left';
|
|
2558
|
+
const isRight = quadrant === 'right';
|
|
2559
|
+
const isTop = quadrant === 'top';
|
|
2560
|
+
const isBottom = quadrant === 'bottom';
|
|
2561
|
+
const rightClass = !isSmallX && isRight;
|
|
2562
|
+
const leftClass = !isSmallX && isLeft;
|
|
2563
|
+
const topClass = !isSmallY && isTop;
|
|
2564
|
+
const bottomClass = !isSmallY && isBottom;
|
|
2565
|
+
let size = 0.5;
|
|
2566
|
+
if (((_b = (_a = this.options.overlayModel) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.type) === 'percentage') {
|
|
2567
|
+
size = clamp(this.options.overlayModel.size.value, 0, 100) / 100;
|
|
2568
|
+
}
|
|
2569
|
+
if (((_d = (_c = this.options.overlayModel) === null || _c === void 0 ? void 0 : _c.size) === null || _d === void 0 ? void 0 : _d.type) === 'pixels') {
|
|
2570
|
+
if (rightClass || leftClass) {
|
|
2571
|
+
size =
|
|
2572
|
+
clamp(0, this.options.overlayModel.size.value, width) /
|
|
2573
|
+
width;
|
|
2574
|
+
}
|
|
2575
|
+
if (topClass || bottomClass) {
|
|
2576
|
+
size =
|
|
2577
|
+
clamp(0, this.options.overlayModel.size.value, height) /
|
|
2578
|
+
height;
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
const translate = (1 - size) / 2;
|
|
2582
|
+
const scale = size;
|
|
2583
|
+
let transform;
|
|
2584
|
+
if (rightClass) {
|
|
2585
|
+
transform = `translateX(${100 * translate}%) scaleX(${scale})`;
|
|
2586
|
+
}
|
|
2587
|
+
else if (leftClass) {
|
|
2588
|
+
transform = `translateX(-${100 * translate}%) scaleX(${scale})`;
|
|
2589
|
+
}
|
|
2590
|
+
else if (topClass) {
|
|
2591
|
+
transform = `translateY(-${100 * translate}%) scaleY(${scale})`;
|
|
2592
|
+
}
|
|
2593
|
+
else if (bottomClass) {
|
|
2594
|
+
transform = `translateY(${100 * translate}%) scaleY(${scale})`;
|
|
2595
|
+
}
|
|
2596
|
+
else {
|
|
2597
|
+
transform = '';
|
|
2598
|
+
}
|
|
2599
|
+
this.overlay.style.transform = transform;
|
|
2600
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
2601
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
2602
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
2603
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
2604
|
+
}
|
|
2605
|
+
setState(quadrant) {
|
|
2606
|
+
switch (quadrant) {
|
|
2607
|
+
case 'top':
|
|
2608
|
+
this._state = 'top';
|
|
2609
|
+
break;
|
|
2610
|
+
case 'left':
|
|
2611
|
+
this._state = 'left';
|
|
2612
|
+
break;
|
|
2613
|
+
case 'bottom':
|
|
2614
|
+
this._state = 'bottom';
|
|
2615
|
+
break;
|
|
2616
|
+
case 'right':
|
|
2617
|
+
this._state = 'right';
|
|
2618
|
+
break;
|
|
2619
|
+
case 'center':
|
|
2620
|
+
this._state = 'center';
|
|
2621
|
+
break;
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
calculateQuadrant(overlayType, x, y, width, height) {
|
|
2625
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2626
|
+
const isPercentage = ((_a = this.options.overlayModel) === null || _a === void 0 ? void 0 : _a.activationSize) === undefined ||
|
|
2627
|
+
((_c = (_b = this.options.overlayModel) === null || _b === void 0 ? void 0 : _b.activationSize) === null || _c === void 0 ? void 0 : _c.type) === 'percentage';
|
|
2628
|
+
const value = numberOrFallback((_f = (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.overlayModel) === null || _e === void 0 ? void 0 : _e.activationSize) === null || _f === void 0 ? void 0 : _f.value, 20);
|
|
2629
|
+
if (isPercentage) {
|
|
2630
|
+
return calculateQuadrantAsPercentage(overlayType, x, y, width, height, value);
|
|
2631
|
+
}
|
|
2632
|
+
return calculateQuadrantAsPixels(overlayType, x, y, width, height, value);
|
|
2633
|
+
}
|
|
2634
|
+
removeDropTarget() {
|
|
2635
|
+
if (this.target) {
|
|
2636
|
+
this._state = undefined;
|
|
2637
|
+
this.element.removeChild(this.target);
|
|
2638
|
+
this.target = undefined;
|
|
2639
|
+
this.overlay = undefined;
|
|
2640
|
+
this.element.classList.remove('drop-target');
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
2645
|
+
const xp = (100 * x) / width;
|
|
2646
|
+
const yp = (100 * y) / height;
|
|
2647
|
+
if (overlayType.has('left') && xp < threshold) {
|
|
2648
|
+
return 'left';
|
|
2649
|
+
}
|
|
2650
|
+
if (overlayType.has('right') && xp > 100 - threshold) {
|
|
2651
|
+
return 'right';
|
|
2652
|
+
}
|
|
2653
|
+
if (overlayType.has('top') && yp < threshold) {
|
|
2654
|
+
return 'top';
|
|
2655
|
+
}
|
|
2656
|
+
if (overlayType.has('bottom') && yp > 100 - threshold) {
|
|
2657
|
+
return 'bottom';
|
|
2553
2658
|
}
|
|
2554
|
-
|
|
2555
|
-
return
|
|
2659
|
+
if (!overlayType.has('center')) {
|
|
2660
|
+
return null;
|
|
2556
2661
|
}
|
|
2557
|
-
|
|
2558
|
-
|
|
2662
|
+
return 'center';
|
|
2663
|
+
}
|
|
2664
|
+
function calculateQuadrantAsPixels(overlayType, x, y, width, height, threshold) {
|
|
2665
|
+
if (overlayType.has('left') && x < threshold) {
|
|
2666
|
+
return 'left';
|
|
2559
2667
|
}
|
|
2560
|
-
|
|
2561
|
-
return
|
|
2668
|
+
if (overlayType.has('right') && x > width - threshold) {
|
|
2669
|
+
return 'right';
|
|
2562
2670
|
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2671
|
+
if (overlayType.has('top') && y < threshold) {
|
|
2672
|
+
return 'top';
|
|
2565
2673
|
}
|
|
2566
|
-
|
|
2567
|
-
return
|
|
2674
|
+
if (overlayType.has('bottom') && y > height - threshold) {
|
|
2675
|
+
return 'bottom';
|
|
2568
2676
|
}
|
|
2569
|
-
|
|
2570
|
-
|
|
2677
|
+
if (!overlayType.has('center')) {
|
|
2678
|
+
return null;
|
|
2571
2679
|
}
|
|
2680
|
+
return 'center';
|
|
2572
2681
|
}
|
|
2573
2682
|
|
|
2574
2683
|
class ContentContainer extends CompositeDisposable {
|
|
2684
|
+
get element() {
|
|
2685
|
+
return this._element;
|
|
2686
|
+
}
|
|
2575
2687
|
constructor() {
|
|
2576
2688
|
super();
|
|
2577
2689
|
this.disposable = new MutableDisposable();
|
|
@@ -2589,9 +2701,6 @@ class ContentContainer extends CompositeDisposable {
|
|
|
2589
2701
|
// 3) register dragEnd events
|
|
2590
2702
|
// 4) register mouseMove events (if no buttons are present we take this as a dragEnd event)
|
|
2591
2703
|
}
|
|
2592
|
-
get element() {
|
|
2593
|
-
return this._element;
|
|
2594
|
-
}
|
|
2595
2704
|
show() {
|
|
2596
2705
|
this.element.style.display = '';
|
|
2597
2706
|
}
|
|
@@ -2647,6 +2756,7 @@ var DockviewDropTargets;
|
|
|
2647
2756
|
DockviewDropTargets[DockviewDropTargets["Tab"] = 0] = "Tab";
|
|
2648
2757
|
DockviewDropTargets[DockviewDropTargets["Panel"] = 1] = "Panel";
|
|
2649
2758
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2759
|
+
DockviewDropTargets[DockviewDropTargets["Edge"] = 3] = "Edge";
|
|
2650
2760
|
})(DockviewDropTargets || (DockviewDropTargets = {}));
|
|
2651
2761
|
|
|
2652
2762
|
class DragHandler extends CompositeDisposable {
|
|
@@ -2668,9 +2778,9 @@ class DragHandler extends CompositeDisposable {
|
|
|
2668
2778
|
for (const iframe of this.iframes) {
|
|
2669
2779
|
iframe.style.pointerEvents = 'none';
|
|
2670
2780
|
}
|
|
2671
|
-
this.el.classList.add('dragged');
|
|
2672
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2673
|
-
this.disposable.value = this.getData();
|
|
2781
|
+
this.el.classList.add('dv-dragged');
|
|
2782
|
+
setTimeout(() => this.el.classList.remove('dv-dragged'), 0);
|
|
2783
|
+
this.disposable.value = this.getData(event.dataTransfer);
|
|
2674
2784
|
if (event.dataTransfer) {
|
|
2675
2785
|
event.dataTransfer.effectAllowed = 'move';
|
|
2676
2786
|
}
|
|
@@ -2684,11 +2794,10 @@ class DragHandler extends CompositeDisposable {
|
|
|
2684
2794
|
}
|
|
2685
2795
|
}
|
|
2686
2796
|
|
|
2687
|
-
var MouseEventKind;
|
|
2688
|
-
(function (MouseEventKind) {
|
|
2689
|
-
MouseEventKind["CLICK"] = "CLICK";
|
|
2690
|
-
})(MouseEventKind || (MouseEventKind = {}));
|
|
2691
2797
|
class Tab extends CompositeDisposable {
|
|
2798
|
+
get element() {
|
|
2799
|
+
return this._element;
|
|
2800
|
+
}
|
|
2692
2801
|
constructor(panelId, accessor, group) {
|
|
2693
2802
|
super();
|
|
2694
2803
|
this.panelId = panelId;
|
|
@@ -2732,25 +2841,30 @@ class Tab extends CompositeDisposable {
|
|
|
2732
2841
|
* on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
|
|
2733
2842
|
*/
|
|
2734
2843
|
event.stopPropagation();
|
|
2735
|
-
this._onChanged.fire(
|
|
2844
|
+
this._onChanged.fire(event);
|
|
2736
2845
|
}));
|
|
2737
2846
|
this.droptarget = new Droptarget(this._element, {
|
|
2738
|
-
|
|
2739
|
-
canDisplayOverlay: (event) => {
|
|
2847
|
+
acceptedTargetZones: ['center'],
|
|
2848
|
+
canDisplayOverlay: (event, position) => {
|
|
2849
|
+
if (this.group.locked) {
|
|
2850
|
+
return false;
|
|
2851
|
+
}
|
|
2740
2852
|
const data = getPanelData();
|
|
2741
2853
|
if (data && this.accessor.id === data.viewId) {
|
|
2854
|
+
if (data.panelId === null &&
|
|
2855
|
+
data.groupId === this.group.id) {
|
|
2856
|
+
// don't allow group move to drop on self
|
|
2857
|
+
return false;
|
|
2858
|
+
}
|
|
2742
2859
|
return this.panelId !== data.panelId;
|
|
2743
2860
|
}
|
|
2744
|
-
return this.group.model.canDisplayOverlay(event, DockviewDropTargets.Tab);
|
|
2861
|
+
return this.group.model.canDisplayOverlay(event, position, DockviewDropTargets.Tab);
|
|
2745
2862
|
},
|
|
2746
2863
|
});
|
|
2747
2864
|
this.addDisposables(this.droptarget.onDrop((event) => {
|
|
2748
2865
|
this._onDropped.fire(event);
|
|
2749
2866
|
}));
|
|
2750
2867
|
}
|
|
2751
|
-
get element() {
|
|
2752
|
-
return this._element;
|
|
2753
|
-
}
|
|
2754
2868
|
setActive(isActive) {
|
|
2755
2869
|
toggleClass(this.element, 'active-tab', isActive);
|
|
2756
2870
|
toggleClass(this.element, 'inactive-tab', !isActive);
|
|
@@ -2768,56 +2882,94 @@ class Tab extends CompositeDisposable {
|
|
|
2768
2882
|
}
|
|
2769
2883
|
}
|
|
2770
2884
|
|
|
2771
|
-
|
|
2772
|
-
|
|
2885
|
+
function addGhostImage(dataTransfer, ghostElement) {
|
|
2886
|
+
// class dockview provides to force ghost image to be drawn on a different layer and prevent weird rendering issues
|
|
2887
|
+
addClasses(ghostElement, 'dv-dragged');
|
|
2888
|
+
document.body.appendChild(ghostElement);
|
|
2889
|
+
dataTransfer.setDragImage(ghostElement, 0, 0);
|
|
2890
|
+
setTimeout(() => {
|
|
2891
|
+
ghostElement.remove();
|
|
2892
|
+
}, 0);
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
class GroupDragHandler extends DragHandler {
|
|
2896
|
+
constructor(element, accessorId, group) {
|
|
2897
|
+
super(element);
|
|
2898
|
+
this.accessorId = accessorId;
|
|
2899
|
+
this.group = group;
|
|
2900
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2901
|
+
}
|
|
2902
|
+
getData(dataTransfer) {
|
|
2903
|
+
this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
|
|
2904
|
+
const style = window.getComputedStyle(this.el);
|
|
2905
|
+
const bgColor = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-background-color');
|
|
2906
|
+
const color = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-color');
|
|
2907
|
+
if (dataTransfer) {
|
|
2908
|
+
const ghostElement = document.createElement('div');
|
|
2909
|
+
ghostElement.style.backgroundColor = bgColor;
|
|
2910
|
+
ghostElement.style.color = color;
|
|
2911
|
+
ghostElement.style.padding = '2px 8px';
|
|
2912
|
+
ghostElement.style.height = '24px';
|
|
2913
|
+
ghostElement.style.fontSize = '11px';
|
|
2914
|
+
ghostElement.style.lineHeight = '20px';
|
|
2915
|
+
ghostElement.style.borderRadius = '12px';
|
|
2916
|
+
ghostElement.style.position = 'absolute';
|
|
2917
|
+
ghostElement.textContent = `Multiple Panels (${this.group.size})`;
|
|
2918
|
+
addGhostImage(dataTransfer, ghostElement);
|
|
2919
|
+
}
|
|
2920
|
+
return {
|
|
2921
|
+
dispose: () => {
|
|
2922
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2923
|
+
},
|
|
2924
|
+
};
|
|
2925
|
+
}
|
|
2926
|
+
dispose() {
|
|
2927
|
+
//
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
class VoidContainer extends CompositeDisposable {
|
|
2932
|
+
get element() {
|
|
2933
|
+
return this._element;
|
|
2934
|
+
}
|
|
2935
|
+
constructor(accessor, group) {
|
|
2773
2936
|
super();
|
|
2774
2937
|
this.accessor = accessor;
|
|
2775
2938
|
this.group = group;
|
|
2776
|
-
this.tabs = [];
|
|
2777
|
-
this.selectedIndex = -1;
|
|
2778
|
-
this._hidden = false;
|
|
2779
2939
|
this._onDrop = new Emitter();
|
|
2780
2940
|
this.onDrop = this._onDrop.event;
|
|
2781
|
-
this.addDisposables(this._onDrop);
|
|
2782
2941
|
this._element = document.createElement('div');
|
|
2783
|
-
this._element.className = '
|
|
2784
|
-
this.
|
|
2785
|
-
this.
|
|
2786
|
-
this.
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
this.
|
|
2790
|
-
this.
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
this._element.appendChild(this.actionContainer);
|
|
2794
|
-
this.voidDropTarget = new Droptarget(this.voidContainer, {
|
|
2795
|
-
validOverlays: 'none',
|
|
2796
|
-
canDisplayOverlay: (event) => {
|
|
2942
|
+
this._element.className = 'void-container';
|
|
2943
|
+
this._element.tabIndex = 0;
|
|
2944
|
+
this._element.draggable = true;
|
|
2945
|
+
this.addDisposables(this._onDrop, addDisposableListener(this._element, 'click', () => {
|
|
2946
|
+
this.accessor.doSetGroupActive(this.group);
|
|
2947
|
+
}));
|
|
2948
|
+
const handler = new GroupDragHandler(this._element, accessor.id, group);
|
|
2949
|
+
this.voidDropTarget = new Droptarget(this._element, {
|
|
2950
|
+
acceptedTargetZones: ['center'],
|
|
2951
|
+
canDisplayOverlay: (event, position) => {
|
|
2797
2952
|
var _a;
|
|
2798
2953
|
const data = getPanelData();
|
|
2799
2954
|
if (data && this.accessor.id === data.viewId) {
|
|
2955
|
+
if (data.panelId === null &&
|
|
2956
|
+
data.groupId === this.group.id) {
|
|
2957
|
+
// don't allow group move to drop on self
|
|
2958
|
+
return false;
|
|
2959
|
+
}
|
|
2800
2960
|
// don't show the overlay if the tab being dragged is the last panel of this group
|
|
2801
|
-
return ((_a = last(this.
|
|
2961
|
+
return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
|
|
2802
2962
|
}
|
|
2803
|
-
return group.model.canDisplayOverlay(event, DockviewDropTargets.Panel);
|
|
2963
|
+
return group.model.canDisplayOverlay(event, position, DockviewDropTargets.Panel);
|
|
2804
2964
|
},
|
|
2805
2965
|
});
|
|
2806
|
-
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
2807
|
-
this._onDrop.fire(
|
|
2808
|
-
|
|
2809
|
-
index: this.tabs.length,
|
|
2810
|
-
});
|
|
2811
|
-
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
2812
|
-
if (event.defaultPrevented) {
|
|
2813
|
-
return;
|
|
2814
|
-
}
|
|
2815
|
-
const isLeftClick = event.button === 0;
|
|
2816
|
-
if (isLeftClick) {
|
|
2817
|
-
this.accessor.doSetGroupActive(this.group);
|
|
2818
|
-
}
|
|
2819
|
-
}));
|
|
2966
|
+
this.addDisposables(handler, this.voidDropTarget.onDrop((event) => {
|
|
2967
|
+
this._onDrop.fire(event);
|
|
2968
|
+
}), this.voidDropTarget);
|
|
2820
2969
|
}
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
class TabsContainer extends CompositeDisposable {
|
|
2821
2973
|
get panels() {
|
|
2822
2974
|
return this.tabs.map((_) => _.value.panelId);
|
|
2823
2975
|
}
|
|
@@ -2878,6 +3030,52 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2878
3030
|
indexOf(id) {
|
|
2879
3031
|
return this.tabs.findIndex((tab) => tab.value.panelId === id);
|
|
2880
3032
|
}
|
|
3033
|
+
constructor(accessor, group) {
|
|
3034
|
+
super();
|
|
3035
|
+
this.accessor = accessor;
|
|
3036
|
+
this.group = group;
|
|
3037
|
+
this.tabs = [];
|
|
3038
|
+
this.selectedIndex = -1;
|
|
3039
|
+
this._hidden = false;
|
|
3040
|
+
this._onDrop = new Emitter();
|
|
3041
|
+
this.onDrop = this._onDrop.event;
|
|
3042
|
+
this.addDisposables(this._onDrop);
|
|
3043
|
+
this._element = document.createElement('div');
|
|
3044
|
+
this._element.className = 'tabs-and-actions-container';
|
|
3045
|
+
this.height = accessor.options.tabHeight;
|
|
3046
|
+
toggleClass(this._element, 'dv-full-width-single-tab', this.accessor.options.singleTabMode === 'fullwidth');
|
|
3047
|
+
this.addDisposables(this.accessor.onDidAddPanel((e) => {
|
|
3048
|
+
if (e.api.group === this.group) {
|
|
3049
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3050
|
+
}
|
|
3051
|
+
}), this.accessor.onDidRemovePanel((e) => {
|
|
3052
|
+
if (e.api.group === this.group) {
|
|
3053
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3054
|
+
}
|
|
3055
|
+
}));
|
|
3056
|
+
this.actionContainer = document.createElement('div');
|
|
3057
|
+
this.actionContainer.className = 'action-container';
|
|
3058
|
+
this.tabContainer = document.createElement('div');
|
|
3059
|
+
this.tabContainer.className = 'tabs-container';
|
|
3060
|
+
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3061
|
+
this._element.appendChild(this.tabContainer);
|
|
3062
|
+
this._element.appendChild(this.voidContainer.element);
|
|
3063
|
+
this._element.appendChild(this.actionContainer);
|
|
3064
|
+
this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
|
|
3065
|
+
this._onDrop.fire({
|
|
3066
|
+
event: event.nativeEvent,
|
|
3067
|
+
index: this.tabs.length,
|
|
3068
|
+
});
|
|
3069
|
+
}), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
3070
|
+
if (event.defaultPrevented) {
|
|
3071
|
+
return;
|
|
3072
|
+
}
|
|
3073
|
+
const isLeftClick = event.button === 0;
|
|
3074
|
+
if (isLeftClick) {
|
|
3075
|
+
this.accessor.doSetGroupActive(this.group);
|
|
3076
|
+
}
|
|
3077
|
+
}));
|
|
3078
|
+
}
|
|
2881
3079
|
setActive(_isGroupActive) {
|
|
2882
3080
|
// noop
|
|
2883
3081
|
}
|
|
@@ -2922,15 +3120,13 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2922
3120
|
var _a;
|
|
2923
3121
|
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
2924
3122
|
this.group.model.isContentFocused;
|
|
2925
|
-
const isLeftClick = event.
|
|
2926
|
-
if (!isLeftClick || event.
|
|
3123
|
+
const isLeftClick = event.button === 0;
|
|
3124
|
+
if (!isLeftClick || event.defaultPrevented) {
|
|
2927
3125
|
return;
|
|
2928
3126
|
}
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
});
|
|
2933
|
-
}
|
|
3127
|
+
this.group.model.openPanel(panel, {
|
|
3128
|
+
skipFocus: alreadyFocused,
|
|
3129
|
+
});
|
|
2934
3130
|
}), tabToAdd.onDrop((event) => {
|
|
2935
3131
|
this._onDrop.fire({
|
|
2936
3132
|
event: event.nativeEvent,
|
|
@@ -2953,63 +3149,6 @@ class TabsContainer extends CompositeDisposable {
|
|
|
2953
3149
|
}
|
|
2954
3150
|
|
|
2955
3151
|
class Groupview extends CompositeDisposable {
|
|
2956
|
-
constructor(container, accessor, id, options, parent) {
|
|
2957
|
-
super();
|
|
2958
|
-
this.container = container;
|
|
2959
|
-
this.accessor = accessor;
|
|
2960
|
-
this.id = id;
|
|
2961
|
-
this.options = options;
|
|
2962
|
-
this.parent = parent;
|
|
2963
|
-
this._isGroupActive = false;
|
|
2964
|
-
this._locked = false;
|
|
2965
|
-
this.mostRecentlyUsed = [];
|
|
2966
|
-
this._onDidChange = new Emitter();
|
|
2967
|
-
this.onDidChange = this._onDidChange.event;
|
|
2968
|
-
this._width = 0;
|
|
2969
|
-
this._height = 0;
|
|
2970
|
-
this._panels = [];
|
|
2971
|
-
this._onMove = new Emitter();
|
|
2972
|
-
this.onMove = this._onMove.event;
|
|
2973
|
-
this._onDidDrop = new Emitter();
|
|
2974
|
-
this.onDidDrop = this._onDidDrop.event;
|
|
2975
|
-
this._onDidAddPanel = new Emitter();
|
|
2976
|
-
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
2977
|
-
this._onDidRemovePanel = new Emitter();
|
|
2978
|
-
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
2979
|
-
this._onDidActivePanelChange = new Emitter();
|
|
2980
|
-
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
2981
|
-
this.container.classList.add('groupview');
|
|
2982
|
-
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
2983
|
-
tabHeight: options.tabHeight,
|
|
2984
|
-
});
|
|
2985
|
-
this.contentContainer = new ContentContainer();
|
|
2986
|
-
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
2987
|
-
validOverlays: 'all',
|
|
2988
|
-
canDisplayOverlay: (event, quadrant) => {
|
|
2989
|
-
if (this.locked && !quadrant) {
|
|
2990
|
-
return false;
|
|
2991
|
-
}
|
|
2992
|
-
const data = getPanelData();
|
|
2993
|
-
if (data && data.viewId === this.accessor.id) {
|
|
2994
|
-
const groupHasOnePanelAndIsActiveDragElement = this._panels.length === 1 && data.groupId === this.id;
|
|
2995
|
-
return !groupHasOnePanelAndIsActiveDragElement;
|
|
2996
|
-
}
|
|
2997
|
-
return this.canDisplayOverlay(event, DockviewDropTargets.Panel);
|
|
2998
|
-
},
|
|
2999
|
-
});
|
|
3000
|
-
container.append(this.tabsContainer.element, this.contentContainer.element);
|
|
3001
|
-
this.header.hidden = !!options.hideHeader;
|
|
3002
|
-
this.locked = !!options.locked;
|
|
3003
|
-
this.addDisposables(this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this.tabsContainer.onDrop((event) => {
|
|
3004
|
-
this.handleDropEvent(event.event, Position.Center, event.index);
|
|
3005
|
-
}), this.contentContainer.onDidFocus(() => {
|
|
3006
|
-
this.accessor.doSetGroupActive(this.parent, true);
|
|
3007
|
-
}), this.contentContainer.onDidBlur(() => {
|
|
3008
|
-
// noop
|
|
3009
|
-
}), this.dropTarget.onDrop((event) => {
|
|
3010
|
-
this.handleDropEvent(event.nativeEvent, event.position);
|
|
3011
|
-
}));
|
|
3012
|
-
}
|
|
3013
3152
|
get element() {
|
|
3014
3153
|
throw new Error('not supported');
|
|
3015
3154
|
}
|
|
@@ -3021,6 +3160,7 @@ class Groupview extends CompositeDisposable {
|
|
|
3021
3160
|
}
|
|
3022
3161
|
set locked(value) {
|
|
3023
3162
|
this._locked = value;
|
|
3163
|
+
toggleClass(this.container, 'locked-groupview', value);
|
|
3024
3164
|
}
|
|
3025
3165
|
get isActive() {
|
|
3026
3166
|
return this._isGroupActive;
|
|
@@ -3058,6 +3198,71 @@ class Groupview extends CompositeDisposable {
|
|
|
3058
3198
|
}
|
|
3059
3199
|
return isAncestor(document.activeElement, this.contentContainer.element);
|
|
3060
3200
|
}
|
|
3201
|
+
constructor(container, accessor, id, options, groupPanel) {
|
|
3202
|
+
super();
|
|
3203
|
+
this.container = container;
|
|
3204
|
+
this.accessor = accessor;
|
|
3205
|
+
this.id = id;
|
|
3206
|
+
this.options = options;
|
|
3207
|
+
this.groupPanel = groupPanel;
|
|
3208
|
+
this._isGroupActive = false;
|
|
3209
|
+
this._locked = false;
|
|
3210
|
+
this.mostRecentlyUsed = [];
|
|
3211
|
+
this._onDidChange = new Emitter();
|
|
3212
|
+
this.onDidChange = this._onDidChange.event;
|
|
3213
|
+
this._width = 0;
|
|
3214
|
+
this._height = 0;
|
|
3215
|
+
this._panels = [];
|
|
3216
|
+
this._onMove = new Emitter();
|
|
3217
|
+
this.onMove = this._onMove.event;
|
|
3218
|
+
this._onDidDrop = new Emitter();
|
|
3219
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
3220
|
+
this._onDidAddPanel = new Emitter();
|
|
3221
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
3222
|
+
this._onDidRemovePanel = new Emitter();
|
|
3223
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3224
|
+
this._onDidActivePanelChange = new Emitter();
|
|
3225
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3226
|
+
this.container.classList.add('groupview');
|
|
3227
|
+
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
3228
|
+
this.contentContainer = new ContentContainer();
|
|
3229
|
+
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
3230
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
3231
|
+
canDisplayOverlay: (event, position) => {
|
|
3232
|
+
if (this.locked && position === 'center') {
|
|
3233
|
+
return false;
|
|
3234
|
+
}
|
|
3235
|
+
const data = getPanelData();
|
|
3236
|
+
if (data && data.viewId === this.accessor.id) {
|
|
3237
|
+
if (data.groupId === this.id) {
|
|
3238
|
+
if (position === 'center') {
|
|
3239
|
+
// don't allow to drop on self for center position
|
|
3240
|
+
return false;
|
|
3241
|
+
}
|
|
3242
|
+
if (data.panelId === null) {
|
|
3243
|
+
// don't allow group move to drop anywhere on self
|
|
3244
|
+
return false;
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
const groupHasOnePanelAndIsActiveDragElement = this._panels.length === 1 && data.groupId === this.id;
|
|
3248
|
+
return !groupHasOnePanelAndIsActiveDragElement;
|
|
3249
|
+
}
|
|
3250
|
+
return this.canDisplayOverlay(event, position, DockviewDropTargets.Panel);
|
|
3251
|
+
},
|
|
3252
|
+
});
|
|
3253
|
+
container.append(this.tabsContainer.element, this.contentContainer.element);
|
|
3254
|
+
this.header.hidden = !!options.hideHeader;
|
|
3255
|
+
this.locked = !!options.locked;
|
|
3256
|
+
this.addDisposables(this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this.tabsContainer.onDrop((event) => {
|
|
3257
|
+
this.handleDropEvent(event.event, 'center', event.index);
|
|
3258
|
+
}), this.contentContainer.onDidFocus(() => {
|
|
3259
|
+
this.accessor.doSetGroupActive(this.groupPanel, true);
|
|
3260
|
+
}), this.contentContainer.onDidBlur(() => {
|
|
3261
|
+
// noop
|
|
3262
|
+
}), this.dropTarget.onDrop((event) => {
|
|
3263
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
3264
|
+
}));
|
|
3265
|
+
}
|
|
3061
3266
|
initialize() {
|
|
3062
3267
|
var _a, _b;
|
|
3063
3268
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
|
|
@@ -3073,11 +3278,11 @@ class Groupview extends CompositeDisposable {
|
|
|
3073
3278
|
this.setActive(this.isActive, true, true);
|
|
3074
3279
|
this.updateContainer();
|
|
3075
3280
|
if (this.accessor.options.createGroupControlElement) {
|
|
3076
|
-
this._control = this.accessor.options.createGroupControlElement(this.
|
|
3281
|
+
this._control = this.accessor.options.createGroupControlElement(this.groupPanel);
|
|
3077
3282
|
this.addDisposables(this._control);
|
|
3078
3283
|
this._control.init({
|
|
3079
3284
|
containerApi: new DockviewApi(this.accessor),
|
|
3080
|
-
api: this.
|
|
3285
|
+
api: this.groupPanel.api,
|
|
3081
3286
|
});
|
|
3082
3287
|
this.tabsContainer.setActionElement(this._control.element);
|
|
3083
3288
|
}
|
|
@@ -3164,10 +3369,10 @@ class Groupview extends CompositeDisposable {
|
|
|
3164
3369
|
const skipSetPanelActive = !!options.skipSetPanelActive;
|
|
3165
3370
|
const skipSetGroupActive = !!options.skipSetGroupActive;
|
|
3166
3371
|
// ensure the group is updated before we fire any events
|
|
3167
|
-
panel.updateParentGroup(this.
|
|
3372
|
+
panel.updateParentGroup(this.groupPanel, true);
|
|
3168
3373
|
if (this._activePanel === panel) {
|
|
3169
3374
|
if (!skipSetGroupActive) {
|
|
3170
|
-
this.accessor.doSetGroupActive(this.
|
|
3375
|
+
this.accessor.doSetGroupActive(this.groupPanel);
|
|
3171
3376
|
}
|
|
3172
3377
|
return;
|
|
3173
3378
|
}
|
|
@@ -3176,7 +3381,7 @@ class Groupview extends CompositeDisposable {
|
|
|
3176
3381
|
this.doSetActivePanel(panel);
|
|
3177
3382
|
}
|
|
3178
3383
|
if (!skipSetGroupActive) {
|
|
3179
|
-
this.accessor.doSetGroupActive(this.
|
|
3384
|
+
this.accessor.doSetGroupActive(this.groupPanel, !!options.skipFocus);
|
|
3180
3385
|
}
|
|
3181
3386
|
this.updateContainer();
|
|
3182
3387
|
}
|
|
@@ -3199,7 +3404,7 @@ class Groupview extends CompositeDisposable {
|
|
|
3199
3404
|
}
|
|
3200
3405
|
}
|
|
3201
3406
|
else {
|
|
3202
|
-
this.accessor.removeGroup(this.
|
|
3407
|
+
this.accessor.removeGroup(this.groupPanel);
|
|
3203
3408
|
}
|
|
3204
3409
|
}
|
|
3205
3410
|
closePanel(panel) {
|
|
@@ -3304,7 +3509,7 @@ class Groupview extends CompositeDisposable {
|
|
|
3304
3509
|
}
|
|
3305
3510
|
updateContainer() {
|
|
3306
3511
|
toggleClass(this.container, 'empty', this.isEmpty);
|
|
3307
|
-
this.panels.forEach((panel) => panel.updateParentGroup(this.
|
|
3512
|
+
this.panels.forEach((panel) => panel.updateParentGroup(this.groupPanel, this.isActive));
|
|
3308
3513
|
if (this.isEmpty && !this.watermark) {
|
|
3309
3514
|
const watermark = this.accessor.createWatermarkComponent();
|
|
3310
3515
|
watermark.init({
|
|
@@ -3316,29 +3521,28 @@ class Groupview extends CompositeDisposable {
|
|
|
3316
3521
|
this.watermark = watermark;
|
|
3317
3522
|
addDisposableListener(this.watermark.element, 'click', () => {
|
|
3318
3523
|
if (!this.isActive) {
|
|
3319
|
-
this.accessor.doSetGroupActive(this.
|
|
3524
|
+
this.accessor.doSetGroupActive(this.groupPanel);
|
|
3320
3525
|
}
|
|
3321
3526
|
});
|
|
3322
|
-
this.contentContainer.hide();
|
|
3323
3527
|
this.tabsContainer.hide();
|
|
3324
|
-
this.
|
|
3325
|
-
this.watermark.updateParentGroup(this.
|
|
3528
|
+
this.contentContainer.element.appendChild(this.watermark.element);
|
|
3529
|
+
this.watermark.updateParentGroup(this.groupPanel, true);
|
|
3326
3530
|
}
|
|
3327
3531
|
if (!this.isEmpty && this.watermark) {
|
|
3328
3532
|
this.watermark.element.remove();
|
|
3329
3533
|
this.watermark.dispose();
|
|
3330
3534
|
this.watermark = undefined;
|
|
3331
|
-
this.contentContainer.show();
|
|
3332
3535
|
this.tabsContainer.show();
|
|
3333
3536
|
}
|
|
3334
3537
|
}
|
|
3335
|
-
canDisplayOverlay(event, target) {
|
|
3538
|
+
canDisplayOverlay(event, position, target) {
|
|
3336
3539
|
// custom overlay handler
|
|
3337
3540
|
if (this.accessor.options.showDndOverlay) {
|
|
3338
3541
|
return this.accessor.options.showDndOverlay({
|
|
3339
3542
|
nativeEvent: event,
|
|
3340
3543
|
target,
|
|
3341
3544
|
group: this.accessor.getPanel(this.id),
|
|
3545
|
+
position,
|
|
3342
3546
|
getData: getPanelData,
|
|
3343
3547
|
});
|
|
3344
3548
|
}
|
|
@@ -3346,7 +3550,17 @@ class Groupview extends CompositeDisposable {
|
|
|
3346
3550
|
}
|
|
3347
3551
|
handleDropEvent(event, position, index) {
|
|
3348
3552
|
const data = getPanelData();
|
|
3349
|
-
if (data) {
|
|
3553
|
+
if (data && data.viewId === this.accessor.id) {
|
|
3554
|
+
if (data.panelId === null) {
|
|
3555
|
+
// this is a group move dnd event
|
|
3556
|
+
const { groupId } = data;
|
|
3557
|
+
this._onMove.fire({
|
|
3558
|
+
target: position,
|
|
3559
|
+
groupId: groupId,
|
|
3560
|
+
index,
|
|
3561
|
+
});
|
|
3562
|
+
return;
|
|
3563
|
+
}
|
|
3350
3564
|
const fromSameGroup = this.tabsContainer.indexOf(data.panelId) !== -1;
|
|
3351
3565
|
if (fromSameGroup && this.tabsContainer.size === 1) {
|
|
3352
3566
|
return;
|
|
@@ -3389,48 +3603,22 @@ class Groupview extends CompositeDisposable {
|
|
|
3389
3603
|
}
|
|
3390
3604
|
|
|
3391
3605
|
const nextLayoutId$1 = sequentialNumberGenerator();
|
|
3392
|
-
function toTarget(direction) {
|
|
3393
|
-
switch (direction) {
|
|
3394
|
-
case 'left':
|
|
3395
|
-
return
|
|
3396
|
-
case 'right':
|
|
3397
|
-
return
|
|
3398
|
-
case 'above':
|
|
3399
|
-
return
|
|
3400
|
-
case 'below':
|
|
3401
|
-
return
|
|
3402
|
-
case 'within':
|
|
3403
|
-
default:
|
|
3404
|
-
return
|
|
3405
|
-
}
|
|
3406
|
-
}
|
|
3407
|
-
class BaseGrid extends CompositeDisposable {
|
|
3408
|
-
constructor(_element, options) {
|
|
3409
|
-
super();
|
|
3410
|
-
this._element = _element;
|
|
3411
|
-
this._id = nextLayoutId$1.next();
|
|
3412
|
-
this._groups = new Map();
|
|
3413
|
-
this._onDidLayoutChange = new Emitter();
|
|
3414
|
-
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3415
|
-
this._onDidRemoveGroup = new Emitter();
|
|
3416
|
-
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3417
|
-
this._onDidAddGroup = new Emitter();
|
|
3418
|
-
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3419
|
-
this._onDidActiveGroupChange = new Emitter();
|
|
3420
|
-
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3421
|
-
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3422
|
-
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3423
|
-
this.element.appendChild(this.gridview.element);
|
|
3424
|
-
this.layout(0, 0, true); // set some elements height/widths
|
|
3425
|
-
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3426
|
-
this._bufferOnDidLayoutChange.fire();
|
|
3427
|
-
}));
|
|
3428
|
-
this.addDisposables(Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3429
|
-
this._bufferOnDidLayoutChange.fire();
|
|
3430
|
-
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3431
|
-
this._onDidLayoutChange.fire();
|
|
3432
|
-
}), this._bufferOnDidLayoutChange);
|
|
3606
|
+
function toTarget(direction) {
|
|
3607
|
+
switch (direction) {
|
|
3608
|
+
case 'left':
|
|
3609
|
+
return 'left';
|
|
3610
|
+
case 'right':
|
|
3611
|
+
return 'right';
|
|
3612
|
+
case 'above':
|
|
3613
|
+
return 'top';
|
|
3614
|
+
case 'below':
|
|
3615
|
+
return 'bottom';
|
|
3616
|
+
case 'within':
|
|
3617
|
+
default:
|
|
3618
|
+
return 'center';
|
|
3433
3619
|
}
|
|
3620
|
+
}
|
|
3621
|
+
class BaseGrid extends CompositeDisposable {
|
|
3434
3622
|
get id() {
|
|
3435
3623
|
return this._id;
|
|
3436
3624
|
}
|
|
@@ -3464,6 +3652,32 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3464
3652
|
get activeGroup() {
|
|
3465
3653
|
return this._activeGroup;
|
|
3466
3654
|
}
|
|
3655
|
+
constructor(_element, options) {
|
|
3656
|
+
super();
|
|
3657
|
+
this._element = _element;
|
|
3658
|
+
this._id = nextLayoutId$1.next();
|
|
3659
|
+
this._groups = new Map();
|
|
3660
|
+
this._onDidLayoutChange = new Emitter();
|
|
3661
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3662
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3663
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3664
|
+
this._onDidAddGroup = new Emitter();
|
|
3665
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3666
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3667
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3668
|
+
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3669
|
+
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3670
|
+
this.element.appendChild(this.gridview.element);
|
|
3671
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3672
|
+
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3673
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3674
|
+
}));
|
|
3675
|
+
this.addDisposables(Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3676
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3677
|
+
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3678
|
+
this._onDidLayoutChange.fire();
|
|
3679
|
+
}), this._bufferOnDidLayoutChange);
|
|
3680
|
+
}
|
|
3467
3681
|
setVisible(panel, visible) {
|
|
3468
3682
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
3469
3683
|
this._onDidLayoutChange.fire();
|
|
@@ -3572,10 +3786,51 @@ class BaseGrid extends CompositeDisposable {
|
|
|
3572
3786
|
}
|
|
3573
3787
|
}
|
|
3574
3788
|
|
|
3789
|
+
function isPanelOptionsWithPanel(data) {
|
|
3790
|
+
if (data.referencePanel) {
|
|
3791
|
+
return true;
|
|
3792
|
+
}
|
|
3793
|
+
return false;
|
|
3794
|
+
}
|
|
3795
|
+
function isPanelOptionsWithGroup(data) {
|
|
3796
|
+
if (data.referenceGroup) {
|
|
3797
|
+
return true;
|
|
3798
|
+
}
|
|
3799
|
+
return false;
|
|
3800
|
+
}
|
|
3801
|
+
function isGroupOptionsWithPanel(data) {
|
|
3802
|
+
if (data.referencePanel) {
|
|
3803
|
+
return true;
|
|
3804
|
+
}
|
|
3805
|
+
return false;
|
|
3806
|
+
}
|
|
3807
|
+
function isGroupOptionsWithGroup(data) {
|
|
3808
|
+
if (data.referenceGroup) {
|
|
3809
|
+
return true;
|
|
3810
|
+
}
|
|
3811
|
+
return false;
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3575
3814
|
/**
|
|
3576
3815
|
* A core api implementation that should be used across all panel-like objects
|
|
3577
3816
|
*/
|
|
3578
3817
|
class PanelApiImpl extends CompositeDisposable {
|
|
3818
|
+
//
|
|
3819
|
+
get isFocused() {
|
|
3820
|
+
return this._isFocused;
|
|
3821
|
+
}
|
|
3822
|
+
get isActive() {
|
|
3823
|
+
return this._isActive;
|
|
3824
|
+
}
|
|
3825
|
+
get isVisible() {
|
|
3826
|
+
return this._isVisible;
|
|
3827
|
+
}
|
|
3828
|
+
get width() {
|
|
3829
|
+
return this._width;
|
|
3830
|
+
}
|
|
3831
|
+
get height() {
|
|
3832
|
+
return this._height;
|
|
3833
|
+
}
|
|
3579
3834
|
constructor(id) {
|
|
3580
3835
|
super();
|
|
3581
3836
|
this.id = id;
|
|
@@ -3584,6 +3839,7 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3584
3839
|
this._isVisible = true;
|
|
3585
3840
|
this._width = 0;
|
|
3586
3841
|
this._height = 0;
|
|
3842
|
+
this.panelUpdatesDisposable = new MutableDisposable();
|
|
3587
3843
|
this._onDidDimensionChange = new Emitter({
|
|
3588
3844
|
replay: true,
|
|
3589
3845
|
});
|
|
@@ -3612,7 +3868,10 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3612
3868
|
//
|
|
3613
3869
|
this._onActiveChange = new Emitter();
|
|
3614
3870
|
this.onActiveChange = this._onActiveChange.event;
|
|
3615
|
-
|
|
3871
|
+
//
|
|
3872
|
+
this._onUpdateParameters = new Emitter();
|
|
3873
|
+
this.onUpdateParameters = this._onUpdateParameters.event;
|
|
3874
|
+
this.addDisposables(this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this._onUpdateParameters, this.onDidFocusChange((event) => {
|
|
3616
3875
|
this._isFocused = event.isFocused;
|
|
3617
3876
|
}), this.onDidActiveChange((event) => {
|
|
3618
3877
|
this._isActive = event.isActive;
|
|
@@ -3623,21 +3882,14 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3623
3882
|
this._height = event.height;
|
|
3624
3883
|
}));
|
|
3625
3884
|
}
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
return this._isVisible;
|
|
3635
|
-
}
|
|
3636
|
-
get width() {
|
|
3637
|
-
return this._width;
|
|
3638
|
-
}
|
|
3639
|
-
get height() {
|
|
3640
|
-
return this._height;
|
|
3885
|
+
initialize(panel) {
|
|
3886
|
+
this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
|
|
3887
|
+
panel.update({
|
|
3888
|
+
params: {
|
|
3889
|
+
params: parameters,
|
|
3890
|
+
},
|
|
3891
|
+
});
|
|
3892
|
+
});
|
|
3641
3893
|
}
|
|
3642
3894
|
setVisible(isVisible) {
|
|
3643
3895
|
this._onVisibilityChange.fire({ isVisible });
|
|
@@ -3645,26 +3897,29 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
3645
3897
|
setActive() {
|
|
3646
3898
|
this._onActiveChange.fire();
|
|
3647
3899
|
}
|
|
3900
|
+
updateParameters(parameters) {
|
|
3901
|
+
this._onUpdateParameters.fire(parameters);
|
|
3902
|
+
}
|
|
3648
3903
|
dispose() {
|
|
3649
3904
|
super.dispose();
|
|
3650
3905
|
}
|
|
3651
3906
|
}
|
|
3652
3907
|
|
|
3653
3908
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
3654
|
-
|
|
3655
|
-
constructor(id) {
|
|
3909
|
+
constructor(id, panel) {
|
|
3656
3910
|
super(id);
|
|
3657
3911
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
3658
3912
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
3659
|
-
//
|
|
3660
3913
|
this._onDidConstraintsChange = new Emitter({
|
|
3661
3914
|
replay: true,
|
|
3662
3915
|
});
|
|
3663
3916
|
this.onDidConstraintsChange = this._onDidConstraintsChange.event;
|
|
3664
|
-
//
|
|
3665
3917
|
this._onDidSizeChange = new Emitter();
|
|
3666
3918
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3667
3919
|
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3920
|
+
if (panel) {
|
|
3921
|
+
this.initialize(panel);
|
|
3922
|
+
}
|
|
3668
3923
|
}
|
|
3669
3924
|
setConstraints(value) {
|
|
3670
3925
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3675,19 +3930,6 @@ class GridviewPanelApiImpl extends PanelApiImpl {
|
|
|
3675
3930
|
}
|
|
3676
3931
|
|
|
3677
3932
|
class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
3678
|
-
constructor(panel, group) {
|
|
3679
|
-
super(panel.id);
|
|
3680
|
-
this.panel = panel;
|
|
3681
|
-
this._onDidTitleChange = new Emitter();
|
|
3682
|
-
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3683
|
-
this._onDidActiveGroupChange = new Emitter();
|
|
3684
|
-
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3685
|
-
this._onDidGroupChange = new Emitter();
|
|
3686
|
-
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3687
|
-
this.disposable = new MutableDisposable();
|
|
3688
|
-
this._group = group;
|
|
3689
|
-
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3690
|
-
}
|
|
3691
3933
|
get title() {
|
|
3692
3934
|
return this.panel.title;
|
|
3693
3935
|
}
|
|
@@ -3711,30 +3953,29 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
3711
3953
|
get group() {
|
|
3712
3954
|
return this._group;
|
|
3713
3955
|
}
|
|
3956
|
+
constructor(panel, group) {
|
|
3957
|
+
super(panel.id);
|
|
3958
|
+
this.panel = panel;
|
|
3959
|
+
this._onDidTitleChange = new Emitter();
|
|
3960
|
+
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3961
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3962
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3963
|
+
this._onDidGroupChange = new Emitter();
|
|
3964
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3965
|
+
this.disposable = new MutableDisposable();
|
|
3966
|
+
this.initialize(panel);
|
|
3967
|
+
this._group = group;
|
|
3968
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3969
|
+
}
|
|
3714
3970
|
setTitle(title) {
|
|
3715
|
-
this.
|
|
3971
|
+
this.panel.update({ params: { title } });
|
|
3716
3972
|
}
|
|
3717
3973
|
close() {
|
|
3718
|
-
|
|
3719
|
-
throw new Error(`panel ${this.id} has no group`);
|
|
3720
|
-
}
|
|
3721
|
-
return this.group.model.closePanel(this.panel);
|
|
3974
|
+
this.group.model.closePanel(this.panel);
|
|
3722
3975
|
}
|
|
3723
3976
|
}
|
|
3724
3977
|
|
|
3725
|
-
class
|
|
3726
|
-
constructor(id, accessor, containerApi, group) {
|
|
3727
|
-
super();
|
|
3728
|
-
this.id = id;
|
|
3729
|
-
this.containerApi = containerApi;
|
|
3730
|
-
this.mutableDisposable = new MutableDisposable();
|
|
3731
|
-
this._title = '';
|
|
3732
|
-
this._group = group;
|
|
3733
|
-
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3734
|
-
this.addDisposables(this.api.onActiveChange(() => {
|
|
3735
|
-
accessor.setActivePanel(this);
|
|
3736
|
-
}));
|
|
3737
|
-
}
|
|
3978
|
+
class DockviewPanel extends CompositeDisposable {
|
|
3738
3979
|
get params() {
|
|
3739
3980
|
return this._params;
|
|
3740
3981
|
}
|
|
@@ -3747,6 +3988,22 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3747
3988
|
get view() {
|
|
3748
3989
|
return this._view;
|
|
3749
3990
|
}
|
|
3991
|
+
constructor(id, accessor, containerApi, group) {
|
|
3992
|
+
super();
|
|
3993
|
+
this.id = id;
|
|
3994
|
+
this.containerApi = containerApi;
|
|
3995
|
+
this.mutableDisposable = new MutableDisposable();
|
|
3996
|
+
this._title = '';
|
|
3997
|
+
this._group = group;
|
|
3998
|
+
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3999
|
+
this.addDisposables(this.api.onActiveChange(() => {
|
|
4000
|
+
accessor.setActivePanel(this);
|
|
4001
|
+
}), this.api.onDidSizeChange((event) => {
|
|
4002
|
+
// forward the resize event to the group since if you want to resize a panel
|
|
4003
|
+
// you are actually just resizing the panels parent which is the group
|
|
4004
|
+
this.group.api.setSize(event);
|
|
4005
|
+
}));
|
|
4006
|
+
}
|
|
3750
4007
|
init(params) {
|
|
3751
4008
|
var _a;
|
|
3752
4009
|
this._params = params.params;
|
|
@@ -3829,6 +4086,9 @@ class DockviewGroupPanel extends CompositeDisposable {
|
|
|
3829
4086
|
}
|
|
3830
4087
|
|
|
3831
4088
|
class ActionContainer {
|
|
4089
|
+
get element() {
|
|
4090
|
+
return this._element;
|
|
4091
|
+
}
|
|
3832
4092
|
constructor() {
|
|
3833
4093
|
this._element = document.createElement('div');
|
|
3834
4094
|
this._element.className = 'actions-bar';
|
|
@@ -3836,9 +4096,6 @@ class ActionContainer {
|
|
|
3836
4096
|
this._list.className = 'actions-container';
|
|
3837
4097
|
this._element.appendChild(this._list);
|
|
3838
4098
|
}
|
|
3839
|
-
get element() {
|
|
3840
|
-
return this._element;
|
|
3841
|
-
}
|
|
3842
4099
|
add(element) {
|
|
3843
4100
|
const listItem = document.createElement('li');
|
|
3844
4101
|
listItem.className = 'action-item';
|
|
@@ -3879,6 +4136,9 @@ const createChevronRightButton = () => createSvgElementFromPath({
|
|
|
3879
4136
|
});
|
|
3880
4137
|
|
|
3881
4138
|
class Watermark extends CompositeDisposable {
|
|
4139
|
+
get id() {
|
|
4140
|
+
return 'watermark';
|
|
4141
|
+
}
|
|
3882
4142
|
constructor() {
|
|
3883
4143
|
super();
|
|
3884
4144
|
this._element = document.createElement('div');
|
|
@@ -3906,9 +4166,6 @@ class Watermark extends CompositeDisposable {
|
|
|
3906
4166
|
}
|
|
3907
4167
|
}));
|
|
3908
4168
|
}
|
|
3909
|
-
get id() {
|
|
3910
|
-
return 'watermark';
|
|
3911
|
-
}
|
|
3912
4169
|
update(_event) {
|
|
3913
4170
|
// noop
|
|
3914
4171
|
}
|
|
@@ -3971,6 +4228,12 @@ function createComponent(id, componentName, components = {}, frameworkComponents
|
|
|
3971
4228
|
|
|
3972
4229
|
const DEFAULT_TAB_IDENTIFIER = '__default__tab__';
|
|
3973
4230
|
class DefaultTab extends CompositeDisposable {
|
|
4231
|
+
get element() {
|
|
4232
|
+
return this._element;
|
|
4233
|
+
}
|
|
4234
|
+
get id() {
|
|
4235
|
+
return DEFAULT_TAB_IDENTIFIER;
|
|
4236
|
+
}
|
|
3974
4237
|
constructor() {
|
|
3975
4238
|
super();
|
|
3976
4239
|
this._isPanelVisible = false;
|
|
@@ -4003,12 +4266,6 @@ class DefaultTab extends CompositeDisposable {
|
|
|
4003
4266
|
}));
|
|
4004
4267
|
this.render();
|
|
4005
4268
|
}
|
|
4006
|
-
get element() {
|
|
4007
|
-
return this._element;
|
|
4008
|
-
}
|
|
4009
|
-
get id() {
|
|
4010
|
-
return DEFAULT_TAB_IDENTIFIER;
|
|
4011
|
-
}
|
|
4012
4269
|
update(event) {
|
|
4013
4270
|
this.params = Object.assign(Object.assign({}, this.params), event.params);
|
|
4014
4271
|
this.render();
|
|
@@ -4047,6 +4304,19 @@ class DefaultTab extends CompositeDisposable {
|
|
|
4047
4304
|
}
|
|
4048
4305
|
|
|
4049
4306
|
class BasePanelView extends CompositeDisposable {
|
|
4307
|
+
get element() {
|
|
4308
|
+
return this._element;
|
|
4309
|
+
}
|
|
4310
|
+
get width() {
|
|
4311
|
+
return this._width;
|
|
4312
|
+
}
|
|
4313
|
+
get height() {
|
|
4314
|
+
return this._height;
|
|
4315
|
+
}
|
|
4316
|
+
get params() {
|
|
4317
|
+
var _a;
|
|
4318
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4319
|
+
}
|
|
4050
4320
|
constructor(id, component, api) {
|
|
4051
4321
|
super();
|
|
4052
4322
|
this.id = id;
|
|
@@ -4067,19 +4337,6 @@ class BasePanelView extends CompositeDisposable {
|
|
|
4067
4337
|
this.api._onDidChangeFocus.fire({ isFocused: false });
|
|
4068
4338
|
}));
|
|
4069
4339
|
}
|
|
4070
|
-
get element() {
|
|
4071
|
-
return this._element;
|
|
4072
|
-
}
|
|
4073
|
-
get width() {
|
|
4074
|
-
return this._width;
|
|
4075
|
-
}
|
|
4076
|
-
get height() {
|
|
4077
|
-
return this._height;
|
|
4078
|
-
}
|
|
4079
|
-
get params() {
|
|
4080
|
-
var _a;
|
|
4081
|
-
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4082
|
-
}
|
|
4083
4340
|
focus() {
|
|
4084
4341
|
this.api._onFocusEvent.fire();
|
|
4085
4342
|
}
|
|
@@ -4120,50 +4377,6 @@ class BasePanelView extends CompositeDisposable {
|
|
|
4120
4377
|
}
|
|
4121
4378
|
|
|
4122
4379
|
class GridviewPanel extends BasePanelView {
|
|
4123
|
-
constructor(id, component, api = new GridviewPanelApiImpl(id)) {
|
|
4124
|
-
super(id, component, api);
|
|
4125
|
-
this._evaluatedMinimumWidth = 0;
|
|
4126
|
-
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4127
|
-
this._evaluatedMinimumHeight = 0;
|
|
4128
|
-
this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4129
|
-
this._minimumWidth = 0;
|
|
4130
|
-
this._minimumHeight = 0;
|
|
4131
|
-
this._maximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4132
|
-
this._maximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4133
|
-
this._snap = false;
|
|
4134
|
-
this._onDidChange = new Emitter();
|
|
4135
|
-
this.onDidChange = this._onDidChange.event;
|
|
4136
|
-
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4137
|
-
const { isVisible } = event;
|
|
4138
|
-
const { accessor } = this._params;
|
|
4139
|
-
accessor.setVisible(this, isVisible);
|
|
4140
|
-
}), this.api.onActiveChange(() => {
|
|
4141
|
-
const { accessor } = this._params;
|
|
4142
|
-
accessor.setActive(this);
|
|
4143
|
-
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4144
|
-
if (typeof event.minimumWidth === 'number' ||
|
|
4145
|
-
typeof event.minimumWidth === 'function') {
|
|
4146
|
-
this._minimumWidth = event.minimumWidth;
|
|
4147
|
-
}
|
|
4148
|
-
if (typeof event.minimumHeight === 'number' ||
|
|
4149
|
-
typeof event.minimumHeight === 'function') {
|
|
4150
|
-
this._minimumHeight = event.minimumHeight;
|
|
4151
|
-
}
|
|
4152
|
-
if (typeof event.maximumWidth === 'number' ||
|
|
4153
|
-
typeof event.maximumWidth === 'function') {
|
|
4154
|
-
this._maximumWidth = event.maximumWidth;
|
|
4155
|
-
}
|
|
4156
|
-
if (typeof event.maximumHeight === 'number' ||
|
|
4157
|
-
typeof event.maximumHeight === 'function') {
|
|
4158
|
-
this._maximumHeight = event.maximumHeight;
|
|
4159
|
-
}
|
|
4160
|
-
}), this.api.onDidSizeChange((event) => {
|
|
4161
|
-
this._onDidChange.fire({
|
|
4162
|
-
height: event.height,
|
|
4163
|
-
width: event.width,
|
|
4164
|
-
});
|
|
4165
|
-
}));
|
|
4166
|
-
}
|
|
4167
4380
|
get priority() {
|
|
4168
4381
|
return this._priority;
|
|
4169
4382
|
}
|
|
@@ -4213,6 +4426,51 @@ class GridviewPanel extends BasePanelView {
|
|
|
4213
4426
|
get isActive() {
|
|
4214
4427
|
return this.api.isActive;
|
|
4215
4428
|
}
|
|
4429
|
+
constructor(id, component, api) {
|
|
4430
|
+
super(id, component, api);
|
|
4431
|
+
this._evaluatedMinimumWidth = 0;
|
|
4432
|
+
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4433
|
+
this._evaluatedMinimumHeight = 0;
|
|
4434
|
+
this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4435
|
+
this._minimumWidth = 0;
|
|
4436
|
+
this._minimumHeight = 0;
|
|
4437
|
+
this._maximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4438
|
+
this._maximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4439
|
+
this._snap = false;
|
|
4440
|
+
this._onDidChange = new Emitter();
|
|
4441
|
+
this.onDidChange = this._onDidChange.event;
|
|
4442
|
+
this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
|
|
4443
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4444
|
+
const { isVisible } = event;
|
|
4445
|
+
const { accessor } = this._params;
|
|
4446
|
+
accessor.setVisible(this, isVisible);
|
|
4447
|
+
}), this.api.onActiveChange(() => {
|
|
4448
|
+
const { accessor } = this._params;
|
|
4449
|
+
accessor.setActive(this);
|
|
4450
|
+
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4451
|
+
if (typeof event.minimumWidth === 'number' ||
|
|
4452
|
+
typeof event.minimumWidth === 'function') {
|
|
4453
|
+
this._minimumWidth = event.minimumWidth;
|
|
4454
|
+
}
|
|
4455
|
+
if (typeof event.minimumHeight === 'number' ||
|
|
4456
|
+
typeof event.minimumHeight === 'function') {
|
|
4457
|
+
this._minimumHeight = event.minimumHeight;
|
|
4458
|
+
}
|
|
4459
|
+
if (typeof event.maximumWidth === 'number' ||
|
|
4460
|
+
typeof event.maximumWidth === 'function') {
|
|
4461
|
+
this._maximumWidth = event.maximumWidth;
|
|
4462
|
+
}
|
|
4463
|
+
if (typeof event.maximumHeight === 'number' ||
|
|
4464
|
+
typeof event.maximumHeight === 'function') {
|
|
4465
|
+
this._maximumHeight = event.maximumHeight;
|
|
4466
|
+
}
|
|
4467
|
+
}), this.api.onDidSizeChange((event) => {
|
|
4468
|
+
this._onDidChange.fire({
|
|
4469
|
+
height: event.height,
|
|
4470
|
+
width: event.width,
|
|
4471
|
+
});
|
|
4472
|
+
}));
|
|
4473
|
+
}
|
|
4216
4474
|
setVisible(isVisible) {
|
|
4217
4475
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
4218
4476
|
}
|
|
@@ -4258,10 +4516,6 @@ class GridviewPanel extends BasePanelView {
|
|
|
4258
4516
|
class GroupviewApi extends GridviewPanelApiImpl {
|
|
4259
4517
|
}
|
|
4260
4518
|
class GroupPanel extends GridviewPanel {
|
|
4261
|
-
constructor(accessor, id, options) {
|
|
4262
|
-
super(id, 'groupview_default', new GroupviewApi(id));
|
|
4263
|
-
this._model = new Groupview(this.element, accessor, id, options, this);
|
|
4264
|
-
}
|
|
4265
4519
|
get panels() {
|
|
4266
4520
|
return this._model.panels;
|
|
4267
4521
|
}
|
|
@@ -4295,6 +4549,10 @@ class GroupPanel extends GridviewPanel {
|
|
|
4295
4549
|
get header() {
|
|
4296
4550
|
return this._model.header;
|
|
4297
4551
|
}
|
|
4552
|
+
constructor(accessor, id, options) {
|
|
4553
|
+
super(id, 'groupview_default', new GroupviewApi(id));
|
|
4554
|
+
this._model = new Groupview(this.element, accessor, id, options, this);
|
|
4555
|
+
}
|
|
4298
4556
|
initialize() {
|
|
4299
4557
|
this._model.initialize();
|
|
4300
4558
|
}
|
|
@@ -4315,17 +4573,17 @@ class GroupPanel extends GridviewPanel {
|
|
|
4315
4573
|
}
|
|
4316
4574
|
|
|
4317
4575
|
class DefaultGroupPanelView {
|
|
4318
|
-
constructor(renderers) {
|
|
4319
|
-
var _a;
|
|
4320
|
-
this._content = renderers.content;
|
|
4321
|
-
this._tab = (_a = renderers.tab) !== null && _a !== void 0 ? _a : new DefaultTab();
|
|
4322
|
-
}
|
|
4323
4576
|
get content() {
|
|
4324
4577
|
return this._content;
|
|
4325
4578
|
}
|
|
4326
4579
|
get tab() {
|
|
4327
4580
|
return this._tab;
|
|
4328
4581
|
}
|
|
4582
|
+
constructor(renderers) {
|
|
4583
|
+
var _a;
|
|
4584
|
+
this._content = renderers.content;
|
|
4585
|
+
this._tab = (_a = renderers.tab) !== null && _a !== void 0 ? _a : new DefaultTab();
|
|
4586
|
+
}
|
|
4329
4587
|
init(params) {
|
|
4330
4588
|
this.content.init(Object.assign(Object.assign({}, params), { tab: this.tab }));
|
|
4331
4589
|
this.tab.init(params);
|
|
@@ -4358,14 +4616,49 @@ class DefaultGroupPanelView {
|
|
|
4358
4616
|
}
|
|
4359
4617
|
}
|
|
4360
4618
|
|
|
4361
|
-
const nextGroupId = sequentialNumberGenerator();
|
|
4362
4619
|
class DockviewComponent extends BaseGrid {
|
|
4620
|
+
get orientation() {
|
|
4621
|
+
return this.gridview.orientation;
|
|
4622
|
+
}
|
|
4623
|
+
get totalPanels() {
|
|
4624
|
+
return this.panels.length;
|
|
4625
|
+
}
|
|
4626
|
+
get panels() {
|
|
4627
|
+
return this.groups.flatMap((group) => group.panels);
|
|
4628
|
+
}
|
|
4629
|
+
get deserializer() {
|
|
4630
|
+
return this._deserializer;
|
|
4631
|
+
}
|
|
4632
|
+
set deserializer(value) {
|
|
4633
|
+
this._deserializer = value;
|
|
4634
|
+
}
|
|
4635
|
+
get options() {
|
|
4636
|
+
return this._options;
|
|
4637
|
+
}
|
|
4638
|
+
get activePanel() {
|
|
4639
|
+
const activeGroup = this.activeGroup;
|
|
4640
|
+
if (!activeGroup) {
|
|
4641
|
+
return undefined;
|
|
4642
|
+
}
|
|
4643
|
+
return activeGroup.activePanel;
|
|
4644
|
+
}
|
|
4645
|
+
set tabHeight(height) {
|
|
4646
|
+
this.options.tabHeight = height;
|
|
4647
|
+
this._groups.forEach((value) => {
|
|
4648
|
+
value.value.model.header.height = height;
|
|
4649
|
+
});
|
|
4650
|
+
}
|
|
4651
|
+
get tabHeight() {
|
|
4652
|
+
return this.options.tabHeight;
|
|
4653
|
+
}
|
|
4363
4654
|
constructor(element, options) {
|
|
4364
4655
|
super(element, {
|
|
4365
4656
|
proportionalLayout: true,
|
|
4366
4657
|
orientation: options.orientation || Orientation.HORIZONTAL,
|
|
4367
4658
|
styles: options.styles,
|
|
4368
4659
|
});
|
|
4660
|
+
this.nextGroupId = sequentialNumberGenerator();
|
|
4661
|
+
this.watermark = null;
|
|
4369
4662
|
this._onDidDrop = new Emitter();
|
|
4370
4663
|
this.onDidDrop = this._onDidDrop.event;
|
|
4371
4664
|
this._onDidRemovePanel = new Emitter();
|
|
@@ -4376,7 +4669,10 @@ class DockviewComponent extends BaseGrid {
|
|
|
4376
4669
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
4377
4670
|
this._onDidActivePanelChange = new Emitter();
|
|
4378
4671
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4379
|
-
this.
|
|
4672
|
+
this.element.classList.add('dv-dockview');
|
|
4673
|
+
this.addDisposables(this._onDidDrop, Event.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
|
|
4674
|
+
this.updateWatermark();
|
|
4675
|
+
}), Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
4380
4676
|
this._bufferOnDidLayoutChange.fire();
|
|
4381
4677
|
}));
|
|
4382
4678
|
this._options = options;
|
|
@@ -4396,38 +4692,72 @@ class DockviewComponent extends BaseGrid {
|
|
|
4396
4692
|
!this.options.watermarkFrameworkComponent) {
|
|
4397
4693
|
this.options.watermarkComponent = Watermark;
|
|
4398
4694
|
}
|
|
4695
|
+
const dropTarget = new Droptarget(this.element, {
|
|
4696
|
+
canDisplayOverlay: (event, position) => {
|
|
4697
|
+
const data = getPanelData();
|
|
4698
|
+
if (data) {
|
|
4699
|
+
if (data.viewId !== this.id) {
|
|
4700
|
+
return false;
|
|
4701
|
+
}
|
|
4702
|
+
return true;
|
|
4703
|
+
}
|
|
4704
|
+
if (this.options.showDndOverlay) {
|
|
4705
|
+
return this.options.showDndOverlay({
|
|
4706
|
+
nativeEvent: event,
|
|
4707
|
+
position: position,
|
|
4708
|
+
target: DockviewDropTargets.Edge,
|
|
4709
|
+
getData: getPanelData,
|
|
4710
|
+
});
|
|
4711
|
+
}
|
|
4712
|
+
return false;
|
|
4713
|
+
},
|
|
4714
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
|
|
4715
|
+
overlayModel: {
|
|
4716
|
+
activationSize: { type: 'pixels', value: 10 },
|
|
4717
|
+
size: { type: 'pixels', value: 20 },
|
|
4718
|
+
},
|
|
4719
|
+
});
|
|
4720
|
+
this.addDisposables(dropTarget, dropTarget.onDrop((event) => {
|
|
4721
|
+
const data = getPanelData();
|
|
4722
|
+
if (data) {
|
|
4723
|
+
this.moveGroupOrPanel(this.orthogonalize(event.position), data.groupId, data.panelId || undefined, 'center');
|
|
4724
|
+
}
|
|
4725
|
+
else {
|
|
4726
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api, group: null, getData: getPanelData }));
|
|
4727
|
+
}
|
|
4728
|
+
}));
|
|
4399
4729
|
this._api = new DockviewApi(this);
|
|
4730
|
+
this.updateWatermark();
|
|
4400
4731
|
}
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4732
|
+
orthogonalize(position) {
|
|
4733
|
+
switch (position) {
|
|
4734
|
+
case 'top':
|
|
4735
|
+
case 'bottom':
|
|
4736
|
+
if (this.gridview.orientation === Orientation.HORIZONTAL) {
|
|
4737
|
+
// we need to add to a vertical splitview but the current root is a horizontal splitview.
|
|
4738
|
+
// insert a vertical splitview at the root level and add the existing view as a child
|
|
4739
|
+
this.gridview.insertOrthogonalSplitviewAtRoot();
|
|
4740
|
+
}
|
|
4741
|
+
break;
|
|
4742
|
+
case 'left':
|
|
4743
|
+
case 'right':
|
|
4744
|
+
if (this.gridview.orientation === Orientation.VERTICAL) {
|
|
4745
|
+
// we need to add to a horizontal splitview but the current root is a vertical splitview.
|
|
4746
|
+
// insert a horiziontal splitview at the root level and add the existing view as a child
|
|
4747
|
+
this.gridview.insertOrthogonalSplitviewAtRoot();
|
|
4748
|
+
}
|
|
4749
|
+
break;
|
|
4750
|
+
}
|
|
4751
|
+
switch (position) {
|
|
4752
|
+
case 'top':
|
|
4753
|
+
case 'left':
|
|
4754
|
+
return this.createGroupAtLocation([0]); // insert into first position
|
|
4755
|
+
case 'bottom':
|
|
4756
|
+
case 'right':
|
|
4757
|
+
return this.createGroupAtLocation([this.gridview.length]); // insert into last position
|
|
4758
|
+
default:
|
|
4759
|
+
throw new Error(`unsupported position ${position}`);
|
|
4420
4760
|
}
|
|
4421
|
-
return activeGroup.activePanel;
|
|
4422
|
-
}
|
|
4423
|
-
set tabHeight(height) {
|
|
4424
|
-
this.options.tabHeight = height;
|
|
4425
|
-
this._groups.forEach((value) => {
|
|
4426
|
-
value.value.model.header.height = height;
|
|
4427
|
-
});
|
|
4428
|
-
}
|
|
4429
|
-
get tabHeight() {
|
|
4430
|
-
return this.options.tabHeight;
|
|
4431
4761
|
}
|
|
4432
4762
|
updateOptions(options) {
|
|
4433
4763
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
@@ -4477,8 +4807,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4477
4807
|
options.group = this.activeGroup;
|
|
4478
4808
|
}
|
|
4479
4809
|
if (options.includePanel && options.group) {
|
|
4480
|
-
if (options.group.activePanel !==
|
|
4481
|
-
options.group.panels[0]) {
|
|
4810
|
+
if (options.group.activePanel !== options.group.panels[0]) {
|
|
4482
4811
|
options.group.model.moveToPrevious({ suppressRoll: true });
|
|
4483
4812
|
return;
|
|
4484
4813
|
}
|
|
@@ -4511,14 +4840,14 @@ class DockviewComponent extends BaseGrid {
|
|
|
4511
4840
|
fromJSON(data) {
|
|
4512
4841
|
this.clear();
|
|
4513
4842
|
if (!this.deserializer) {
|
|
4514
|
-
throw new Error('
|
|
4843
|
+
throw new Error('no deserializer provided');
|
|
4515
4844
|
}
|
|
4516
4845
|
const { grid, panels, options, activeGroup } = data;
|
|
4517
4846
|
if (typeof (options === null || options === void 0 ? void 0 : options.tabHeight) === 'number') {
|
|
4518
4847
|
this.tabHeight = options.tabHeight;
|
|
4519
4848
|
}
|
|
4520
|
-
if (!
|
|
4521
|
-
throw new Error('
|
|
4849
|
+
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
4850
|
+
throw new Error('root must be of type branch');
|
|
4522
4851
|
}
|
|
4523
4852
|
this.gridview.deserialize(grid, {
|
|
4524
4853
|
fromJSON: (node) => {
|
|
@@ -4531,19 +4860,20 @@ class DockviewComponent extends BaseGrid {
|
|
|
4531
4860
|
this._onDidAddGroup.fire(group);
|
|
4532
4861
|
for (const child of views) {
|
|
4533
4862
|
const panel = this.deserializer.fromJSON(panels[child], group);
|
|
4534
|
-
const isActive = typeof activeView === 'string' &&
|
|
4863
|
+
const isActive = typeof activeView === 'string' &&
|
|
4864
|
+
activeView === panel.id;
|
|
4535
4865
|
group.model.openPanel(panel, {
|
|
4536
4866
|
skipSetPanelActive: !isActive,
|
|
4537
|
-
skipSetGroupActive: true
|
|
4867
|
+
skipSetGroupActive: true,
|
|
4538
4868
|
});
|
|
4539
4869
|
}
|
|
4540
4870
|
if (!group.activePanel && group.panels.length > 0) {
|
|
4541
4871
|
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
4542
|
-
skipSetGroupActive: true
|
|
4872
|
+
skipSetGroupActive: true,
|
|
4543
4873
|
});
|
|
4544
4874
|
}
|
|
4545
4875
|
return group;
|
|
4546
|
-
}
|
|
4876
|
+
},
|
|
4547
4877
|
});
|
|
4548
4878
|
if (typeof activeGroup === 'string') {
|
|
4549
4879
|
const panel = this.getPanel(activeGroup);
|
|
@@ -4582,12 +4912,31 @@ class DockviewComponent extends BaseGrid {
|
|
|
4582
4912
|
throw new Error(`panel with id ${options.id} already exists`);
|
|
4583
4913
|
}
|
|
4584
4914
|
let referenceGroup;
|
|
4585
|
-
if (
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4915
|
+
if (options.position) {
|
|
4916
|
+
if (isPanelOptionsWithPanel(options.position)) {
|
|
4917
|
+
const referencePanel = typeof options.position.referencePanel === 'string'
|
|
4918
|
+
? this.getGroupPanel(options.position.referencePanel)
|
|
4919
|
+
: options.position.referencePanel;
|
|
4920
|
+
if (!referencePanel) {
|
|
4921
|
+
throw new Error(`referencePanel ${options.position.referencePanel} does not exist`);
|
|
4922
|
+
}
|
|
4923
|
+
referenceGroup = this.findGroup(referencePanel);
|
|
4924
|
+
}
|
|
4925
|
+
else if (isPanelOptionsWithGroup(options.position)) {
|
|
4926
|
+
referenceGroup =
|
|
4927
|
+
typeof options.position.referenceGroup === 'string'
|
|
4928
|
+
? (_a = this._groups.get(options.position.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
4929
|
+
: options.position.referenceGroup;
|
|
4930
|
+
if (!referenceGroup) {
|
|
4931
|
+
throw new Error(`referencePanel ${options.position.referenceGroup} does not exist`);
|
|
4932
|
+
}
|
|
4933
|
+
}
|
|
4934
|
+
else {
|
|
4935
|
+
const group = this.orthogonalize(directionToPosition(options.position.direction));
|
|
4936
|
+
const panel = this.createPanel(options, group);
|
|
4937
|
+
group.model.openPanel(panel);
|
|
4938
|
+
return panel;
|
|
4589
4939
|
}
|
|
4590
|
-
referenceGroup = this.findGroup(referencePanel);
|
|
4591
4940
|
}
|
|
4592
4941
|
else {
|
|
4593
4942
|
referenceGroup = this.activeGroup;
|
|
@@ -4595,7 +4944,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4595
4944
|
let panel;
|
|
4596
4945
|
if (referenceGroup) {
|
|
4597
4946
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
4598
|
-
if (target ===
|
|
4947
|
+
if (target === 'center') {
|
|
4599
4948
|
panel = this.createPanel(options, referenceGroup);
|
|
4600
4949
|
referenceGroup.model.openPanel(panel);
|
|
4601
4950
|
}
|
|
@@ -4624,10 +4973,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4624
4973
|
}
|
|
4625
4974
|
group.model.removePanel(panel);
|
|
4626
4975
|
panel.dispose();
|
|
4627
|
-
|
|
4628
|
-
if (!retainGroupForWatermark &&
|
|
4629
|
-
group.size === 0 &&
|
|
4630
|
-
options.removeEmptyGroup) {
|
|
4976
|
+
if (group.size === 0 && options.removeEmptyGroup) {
|
|
4631
4977
|
this.removeGroup(group);
|
|
4632
4978
|
}
|
|
4633
4979
|
}
|
|
@@ -4639,24 +4985,67 @@ class DockviewComponent extends BaseGrid {
|
|
|
4639
4985
|
? { 'watermark-name': this.options.watermarkFrameworkComponent }
|
|
4640
4986
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4641
4987
|
}
|
|
4642
|
-
|
|
4988
|
+
updateWatermark() {
|
|
4989
|
+
if (this.groups.length === 0) {
|
|
4990
|
+
if (!this.watermark) {
|
|
4991
|
+
this.watermark = this.createWatermarkComponent();
|
|
4992
|
+
this.watermark.init({
|
|
4993
|
+
containerApi: new DockviewApi(this),
|
|
4994
|
+
params: {},
|
|
4995
|
+
title: '',
|
|
4996
|
+
api: null,
|
|
4997
|
+
});
|
|
4998
|
+
const watermarkContainer = document.createElement('div');
|
|
4999
|
+
watermarkContainer.className = 'dv-watermark-container';
|
|
5000
|
+
watermarkContainer.appendChild(this.watermark.element);
|
|
5001
|
+
this.element.appendChild(watermarkContainer);
|
|
5002
|
+
}
|
|
5003
|
+
}
|
|
5004
|
+
else if (this.watermark) {
|
|
5005
|
+
this.watermark.element.parentElement.remove();
|
|
5006
|
+
this.watermark.dispose();
|
|
5007
|
+
this.watermark = null;
|
|
5008
|
+
}
|
|
5009
|
+
}
|
|
5010
|
+
addGroup(options) {
|
|
5011
|
+
var _a;
|
|
4643
5012
|
const group = this.createGroup();
|
|
4644
5013
|
if (options) {
|
|
4645
|
-
|
|
4646
|
-
if (
|
|
4647
|
-
|
|
5014
|
+
let referenceGroup;
|
|
5015
|
+
if (isGroupOptionsWithPanel(options)) {
|
|
5016
|
+
const referencePanel = typeof options.referencePanel === 'string'
|
|
5017
|
+
? this.panels.find((panel) => panel.id === options.referencePanel)
|
|
5018
|
+
: options.referencePanel;
|
|
5019
|
+
if (!referencePanel) {
|
|
5020
|
+
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
5021
|
+
}
|
|
5022
|
+
referenceGroup = this.findGroup(referencePanel);
|
|
5023
|
+
if (!referenceGroup) {
|
|
5024
|
+
throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
|
|
5025
|
+
}
|
|
4648
5026
|
}
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
5027
|
+
else if (isGroupOptionsWithGroup(options)) {
|
|
5028
|
+
referenceGroup =
|
|
5029
|
+
typeof options.referenceGroup === 'string'
|
|
5030
|
+
? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
5031
|
+
: options.referenceGroup;
|
|
5032
|
+
if (!referenceGroup) {
|
|
5033
|
+
throw new Error(`reference group ${options.referenceGroup} does not exist`);
|
|
5034
|
+
}
|
|
5035
|
+
}
|
|
5036
|
+
else {
|
|
5037
|
+
const group = this.orthogonalize(directionToPosition(options.direction));
|
|
5038
|
+
return group;
|
|
4652
5039
|
}
|
|
4653
5040
|
const target = toTarget(options.direction || 'within');
|
|
4654
5041
|
const location = getGridLocation(referenceGroup.element);
|
|
4655
5042
|
const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
4656
5043
|
this.doAddGroup(group, relativeLocation);
|
|
5044
|
+
return group;
|
|
4657
5045
|
}
|
|
4658
5046
|
else {
|
|
4659
5047
|
this.doAddGroup(group);
|
|
5048
|
+
return group;
|
|
4660
5049
|
}
|
|
4661
5050
|
}
|
|
4662
5051
|
removeGroup(group, skipActive = false) {
|
|
@@ -4674,7 +5063,13 @@ class DockviewComponent extends BaseGrid {
|
|
|
4674
5063
|
const sourceGroup = groupId
|
|
4675
5064
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4676
5065
|
: undefined;
|
|
4677
|
-
if (
|
|
5066
|
+
if (itemId === undefined) {
|
|
5067
|
+
if (sourceGroup) {
|
|
5068
|
+
this.moveGroup(sourceGroup, referenceGroup, target);
|
|
5069
|
+
}
|
|
5070
|
+
return;
|
|
5071
|
+
}
|
|
5072
|
+
if (!target || target === 'center') {
|
|
4678
5073
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4679
5074
|
this.panels.find((panel) => panel.id === itemId);
|
|
4680
5075
|
if (!groupItem) {
|
|
@@ -4722,6 +5117,28 @@ class DockviewComponent extends BaseGrid {
|
|
|
4722
5117
|
}
|
|
4723
5118
|
}
|
|
4724
5119
|
}
|
|
5120
|
+
moveGroup(sourceGroup, referenceGroup, target) {
|
|
5121
|
+
if (sourceGroup) {
|
|
5122
|
+
if (!target || target === 'center') {
|
|
5123
|
+
const activePanel = sourceGroup.activePanel;
|
|
5124
|
+
const panels = [...sourceGroup.panels].map((p) => sourceGroup.model.removePanel(p.id));
|
|
5125
|
+
if ((sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.size) === 0) {
|
|
5126
|
+
this.doRemoveGroup(sourceGroup);
|
|
5127
|
+
}
|
|
5128
|
+
for (const panel of panels) {
|
|
5129
|
+
referenceGroup.model.openPanel(panel, {
|
|
5130
|
+
skipSetPanelActive: panel !== activePanel,
|
|
5131
|
+
});
|
|
5132
|
+
}
|
|
5133
|
+
}
|
|
5134
|
+
else {
|
|
5135
|
+
this.gridview.removeView(getGridLocation(sourceGroup.element));
|
|
5136
|
+
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
5137
|
+
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
5138
|
+
this.gridview.addView(sourceGroup, Sizing.Distribute, dropLocation);
|
|
5139
|
+
}
|
|
5140
|
+
}
|
|
5141
|
+
}
|
|
4725
5142
|
doSetGroupActive(group, skipFocus) {
|
|
4726
5143
|
var _a, _b;
|
|
4727
5144
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
@@ -4743,9 +5160,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
4743
5160
|
id = undefined;
|
|
4744
5161
|
}
|
|
4745
5162
|
if (!id) {
|
|
4746
|
-
id = nextGroupId.next();
|
|
5163
|
+
id = this.nextGroupId.next();
|
|
4747
5164
|
while (this._groups.has(id)) {
|
|
4748
|
-
id = nextGroupId.next();
|
|
5165
|
+
id = this.nextGroupId.next();
|
|
4749
5166
|
}
|
|
4750
5167
|
}
|
|
4751
5168
|
const view = new GroupPanel(this, id, options);
|
|
@@ -4778,7 +5195,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
4778
5195
|
content: this.createContentComponent(options.id, options.component),
|
|
4779
5196
|
tab: this.createTabComponent(options.id, options.tabComponent || this.options.defaultTabComponent),
|
|
4780
5197
|
});
|
|
4781
|
-
const panel = new
|
|
5198
|
+
const panel = new DockviewPanel(options.id, this, this._api, group);
|
|
4782
5199
|
panel.init({
|
|
4783
5200
|
view,
|
|
4784
5201
|
title: options.title || options.id,
|
|
@@ -4813,6 +5230,21 @@ class DockviewComponent extends BaseGrid {
|
|
|
4813
5230
|
}
|
|
4814
5231
|
|
|
4815
5232
|
class GridviewComponent extends BaseGrid {
|
|
5233
|
+
get orientation() {
|
|
5234
|
+
return this.gridview.orientation;
|
|
5235
|
+
}
|
|
5236
|
+
set orientation(value) {
|
|
5237
|
+
this.gridview.orientation = value;
|
|
5238
|
+
}
|
|
5239
|
+
get options() {
|
|
5240
|
+
return this._options;
|
|
5241
|
+
}
|
|
5242
|
+
get deserializer() {
|
|
5243
|
+
return this._deserializer;
|
|
5244
|
+
}
|
|
5245
|
+
set deserializer(value) {
|
|
5246
|
+
this._deserializer = value;
|
|
5247
|
+
}
|
|
4816
5248
|
constructor(element, options) {
|
|
4817
5249
|
super(element, {
|
|
4818
5250
|
proportionalLayout: options.proportionalLayout,
|
|
@@ -4829,21 +5261,6 @@ class GridviewComponent extends BaseGrid {
|
|
|
4829
5261
|
this.options.frameworkComponents = {};
|
|
4830
5262
|
}
|
|
4831
5263
|
}
|
|
4832
|
-
get orientation() {
|
|
4833
|
-
return this.gridview.orientation;
|
|
4834
|
-
}
|
|
4835
|
-
set orientation(value) {
|
|
4836
|
-
this.gridview.orientation = value;
|
|
4837
|
-
}
|
|
4838
|
-
get options() {
|
|
4839
|
-
return this._options;
|
|
4840
|
-
}
|
|
4841
|
-
get deserializer() {
|
|
4842
|
-
return this._deserializer;
|
|
4843
|
-
}
|
|
4844
|
-
set deserializer(value) {
|
|
4845
|
-
this._deserializer = value;
|
|
4846
|
-
}
|
|
4847
5264
|
updateOptions(options) {
|
|
4848
5265
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4849
5266
|
this.gridview.orientation !== options.orientation;
|
|
@@ -4941,7 +5358,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
4941
5358
|
throw new Error(`reference group ${options.reference} does not exist`);
|
|
4942
5359
|
}
|
|
4943
5360
|
const target = toTarget(options.direction);
|
|
4944
|
-
if (target ===
|
|
5361
|
+
if (target === 'center') {
|
|
4945
5362
|
throw new Error(`${target} not supported as an option`);
|
|
4946
5363
|
}
|
|
4947
5364
|
else {
|
|
@@ -4959,7 +5376,7 @@ class GridviewComponent extends BaseGrid {
|
|
|
4959
5376
|
throw new Error(`reference group ${options.position.referencePanel} does not exist`);
|
|
4960
5377
|
}
|
|
4961
5378
|
const target = toTarget(options.position.direction);
|
|
4962
|
-
if (target ===
|
|
5379
|
+
if (target === 'center') {
|
|
4963
5380
|
throw new Error(`${target} not supported as an option`);
|
|
4964
5381
|
}
|
|
4965
5382
|
else {
|
|
@@ -5048,29 +5465,6 @@ class GridviewComponent extends BaseGrid {
|
|
|
5048
5465
|
* A high-level implementation of splitview that works using 'panels'
|
|
5049
5466
|
*/
|
|
5050
5467
|
class SplitviewComponent extends CompositeDisposable {
|
|
5051
|
-
constructor(element, options) {
|
|
5052
|
-
super();
|
|
5053
|
-
this.element = element;
|
|
5054
|
-
this._disposable = new MutableDisposable();
|
|
5055
|
-
this._panels = new Map();
|
|
5056
|
-
this._onDidLayoutfromJSON = new Emitter();
|
|
5057
|
-
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5058
|
-
this._onDidAddView = new Emitter();
|
|
5059
|
-
this.onDidAddView = this._onDidAddView.event;
|
|
5060
|
-
this._onDidRemoveView = new Emitter();
|
|
5061
|
-
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5062
|
-
this._onDidLayoutChange = new Emitter();
|
|
5063
|
-
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5064
|
-
this._options = options;
|
|
5065
|
-
if (!options.components) {
|
|
5066
|
-
options.components = {};
|
|
5067
|
-
}
|
|
5068
|
-
if (!options.frameworkComponents) {
|
|
5069
|
-
options.frameworkComponents = {};
|
|
5070
|
-
}
|
|
5071
|
-
this.splitview = new Splitview(this.element, options);
|
|
5072
|
-
this.addDisposables(this._disposable, this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5073
|
-
}
|
|
5074
5468
|
get panels() {
|
|
5075
5469
|
return this.splitview.getViews();
|
|
5076
5470
|
}
|
|
@@ -5108,6 +5502,29 @@ class SplitviewComponent extends CompositeDisposable {
|
|
|
5108
5502
|
? this.splitview.size
|
|
5109
5503
|
: this.splitview.orthogonalSize;
|
|
5110
5504
|
}
|
|
5505
|
+
constructor(element, options) {
|
|
5506
|
+
super();
|
|
5507
|
+
this.element = element;
|
|
5508
|
+
this._disposable = new MutableDisposable();
|
|
5509
|
+
this._panels = new Map();
|
|
5510
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
5511
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5512
|
+
this._onDidAddView = new Emitter();
|
|
5513
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5514
|
+
this._onDidRemoveView = new Emitter();
|
|
5515
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5516
|
+
this._onDidLayoutChange = new Emitter();
|
|
5517
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5518
|
+
this._options = options;
|
|
5519
|
+
if (!options.components) {
|
|
5520
|
+
options.components = {};
|
|
5521
|
+
}
|
|
5522
|
+
if (!options.frameworkComponents) {
|
|
5523
|
+
options.frameworkComponents = {};
|
|
5524
|
+
}
|
|
5525
|
+
this.splitview = new Splitview(this.element, options);
|
|
5526
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5527
|
+
}
|
|
5111
5528
|
updateOptions(options) {
|
|
5112
5529
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
5113
5530
|
this.options.orientation !== options.orientation;
|
|
@@ -5315,6 +5732,9 @@ class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
|
5315
5732
|
}
|
|
5316
5733
|
|
|
5317
5734
|
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
5735
|
+
set pane(pane) {
|
|
5736
|
+
this._pane = pane;
|
|
5737
|
+
}
|
|
5318
5738
|
constructor(id) {
|
|
5319
5739
|
super(id);
|
|
5320
5740
|
this._onDidExpansionChange = new Emitter({
|
|
@@ -5327,9 +5747,6 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5327
5747
|
this.onMouseLeave = this._onMouseLeave.event;
|
|
5328
5748
|
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5329
5749
|
}
|
|
5330
|
-
set pane(pane) {
|
|
5331
|
-
this._pane = pane;
|
|
5332
|
-
}
|
|
5333
5750
|
setExpanded(isExpanded) {
|
|
5334
5751
|
var _a;
|
|
5335
5752
|
(_a = this._pane) === null || _a === void 0 ? void 0 : _a.setExpanded(isExpanded);
|
|
@@ -5341,50 +5758,6 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5341
5758
|
}
|
|
5342
5759
|
|
|
5343
5760
|
class PaneviewPanel extends BasePanelView {
|
|
5344
|
-
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5345
|
-
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5346
|
-
this.headerComponent = headerComponent;
|
|
5347
|
-
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5348
|
-
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
5349
|
-
this._onDidChange = new Emitter();
|
|
5350
|
-
this.onDidChange = this._onDidChange.event;
|
|
5351
|
-
this.headerSize = 22;
|
|
5352
|
-
this._orthogonalSize = 0;
|
|
5353
|
-
this._size = 0;
|
|
5354
|
-
this._minimumBodySize = 100;
|
|
5355
|
-
this._maximumBodySize = Number.POSITIVE_INFINITY;
|
|
5356
|
-
this._isExpanded = false;
|
|
5357
|
-
this.expandedSize = 0;
|
|
5358
|
-
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
5359
|
-
this._isExpanded = isExpanded;
|
|
5360
|
-
this._headerVisible = isHeaderVisible;
|
|
5361
|
-
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
5362
|
-
this._orientation = orientation;
|
|
5363
|
-
this.element.classList.add('pane');
|
|
5364
|
-
this.addDisposables(this.api.onDidSizeChange((event) => {
|
|
5365
|
-
this._onDidChange.fire({ size: event.size });
|
|
5366
|
-
}), addDisposableListener(this.element, 'mouseenter', (ev) => {
|
|
5367
|
-
this.api._onMouseEnter.fire(ev);
|
|
5368
|
-
}), addDisposableListener(this.element, 'mouseleave', (ev) => {
|
|
5369
|
-
this.api._onMouseLeave.fire(ev);
|
|
5370
|
-
}));
|
|
5371
|
-
this.addDisposables(this._onDidChangeExpansionState, this.onDidChangeExpansionState((isPanelExpanded) => {
|
|
5372
|
-
this.api._onDidExpansionChange.fire({
|
|
5373
|
-
isExpanded: isPanelExpanded,
|
|
5374
|
-
});
|
|
5375
|
-
}), this.api.onDidFocusChange((e) => {
|
|
5376
|
-
if (!this.header) {
|
|
5377
|
-
return;
|
|
5378
|
-
}
|
|
5379
|
-
if (e.isFocused) {
|
|
5380
|
-
addClasses(this.header, 'focused');
|
|
5381
|
-
}
|
|
5382
|
-
else {
|
|
5383
|
-
removeClasses(this.header, 'focused');
|
|
5384
|
-
}
|
|
5385
|
-
}));
|
|
5386
|
-
this.renderOnce();
|
|
5387
|
-
}
|
|
5388
5761
|
set orientation(value) {
|
|
5389
5762
|
this._orientation = value;
|
|
5390
5763
|
}
|
|
@@ -5432,6 +5805,51 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5432
5805
|
this._headerVisible = value;
|
|
5433
5806
|
this.header.style.display = value ? '' : 'none';
|
|
5434
5807
|
}
|
|
5808
|
+
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5809
|
+
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5810
|
+
this.headerComponent = headerComponent;
|
|
5811
|
+
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5812
|
+
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
5813
|
+
this._onDidChange = new Emitter();
|
|
5814
|
+
this.onDidChange = this._onDidChange.event;
|
|
5815
|
+
this.headerSize = 22;
|
|
5816
|
+
this._orthogonalSize = 0;
|
|
5817
|
+
this._size = 0;
|
|
5818
|
+
this._minimumBodySize = 100;
|
|
5819
|
+
this._maximumBodySize = Number.POSITIVE_INFINITY;
|
|
5820
|
+
this._isExpanded = false;
|
|
5821
|
+
this.expandedSize = 0;
|
|
5822
|
+
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
5823
|
+
this.api.initialize(this);
|
|
5824
|
+
this._isExpanded = isExpanded;
|
|
5825
|
+
this._headerVisible = isHeaderVisible;
|
|
5826
|
+
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
5827
|
+
this._orientation = orientation;
|
|
5828
|
+
this.element.classList.add('pane');
|
|
5829
|
+
this.addDisposables(this.api.onDidSizeChange((event) => {
|
|
5830
|
+
this._onDidChange.fire({ size: event.size });
|
|
5831
|
+
}), addDisposableListener(this.element, 'mouseenter', (ev) => {
|
|
5832
|
+
this.api._onMouseEnter.fire(ev);
|
|
5833
|
+
}), addDisposableListener(this.element, 'mouseleave', (ev) => {
|
|
5834
|
+
this.api._onMouseLeave.fire(ev);
|
|
5835
|
+
}));
|
|
5836
|
+
this.addDisposables(this._onDidChangeExpansionState, this.onDidChangeExpansionState((isPanelExpanded) => {
|
|
5837
|
+
this.api._onDidExpansionChange.fire({
|
|
5838
|
+
isExpanded: isPanelExpanded,
|
|
5839
|
+
});
|
|
5840
|
+
}), this.api.onDidFocusChange((e) => {
|
|
5841
|
+
if (!this.header) {
|
|
5842
|
+
return;
|
|
5843
|
+
}
|
|
5844
|
+
if (e.isFocused) {
|
|
5845
|
+
addClasses(this.header, 'focused');
|
|
5846
|
+
}
|
|
5847
|
+
else {
|
|
5848
|
+
removeClasses(this.header, 'focused');
|
|
5849
|
+
}
|
|
5850
|
+
}));
|
|
5851
|
+
this.renderOnce();
|
|
5852
|
+
}
|
|
5435
5853
|
setVisible(isVisible) {
|
|
5436
5854
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
5437
5855
|
}
|
|
@@ -5555,7 +5973,10 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5555
5973
|
}
|
|
5556
5974
|
})(this.header);
|
|
5557
5975
|
this.target = new Droptarget(this.element, {
|
|
5558
|
-
|
|
5976
|
+
acceptedTargetZones: ['top', 'bottom'],
|
|
5977
|
+
overlayModel: {
|
|
5978
|
+
activationSize: { type: 'percentage', value: 50 },
|
|
5979
|
+
},
|
|
5559
5980
|
canDisplayOverlay: (event) => {
|
|
5560
5981
|
const data = getPaneData();
|
|
5561
5982
|
if (data) {
|
|
@@ -5598,12 +6019,10 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5598
6019
|
const allPanels = containerApi.panels;
|
|
5599
6020
|
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5600
6021
|
let toIndex = containerApi.panels.indexOf(this);
|
|
5601
|
-
if (event.position ===
|
|
5602
|
-
event.position === Position.Top) {
|
|
6022
|
+
if (event.position === 'left' || event.position === 'top') {
|
|
5603
6023
|
toIndex = Math.max(0, toIndex - 1);
|
|
5604
6024
|
}
|
|
5605
|
-
if (event.position ===
|
|
5606
|
-
event.position === Position.Bottom) {
|
|
6025
|
+
if (event.position === 'right' || event.position === 'bottom') {
|
|
5607
6026
|
if (fromIndex > toIndex) {
|
|
5608
6027
|
toIndex++;
|
|
5609
6028
|
}
|
|
@@ -5614,6 +6033,9 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5614
6033
|
}
|
|
5615
6034
|
|
|
5616
6035
|
class DefaultHeader extends CompositeDisposable {
|
|
6036
|
+
get element() {
|
|
6037
|
+
return this._element;
|
|
6038
|
+
}
|
|
5617
6039
|
constructor() {
|
|
5618
6040
|
super();
|
|
5619
6041
|
this._expandedIcon = createExpandMoreButton();
|
|
@@ -5632,9 +6054,6 @@ class DefaultHeader extends CompositeDisposable {
|
|
|
5632
6054
|
(_a = this.apiRef.api) === null || _a === void 0 ? void 0 : _a.setExpanded(!this.apiRef.api.isExpanded);
|
|
5633
6055
|
}));
|
|
5634
6056
|
}
|
|
5635
|
-
get element() {
|
|
5636
|
-
return this._element;
|
|
5637
|
-
}
|
|
5638
6057
|
init(params) {
|
|
5639
6058
|
this.apiRef.api = params.api;
|
|
5640
6059
|
this._content.textContent = params.title;
|
|
@@ -5687,36 +6106,6 @@ class PaneFramework extends DraggablePaneviewPanel {
|
|
|
5687
6106
|
}
|
|
5688
6107
|
}
|
|
5689
6108
|
class PaneviewComponent extends CompositeDisposable {
|
|
5690
|
-
constructor(element, options) {
|
|
5691
|
-
super();
|
|
5692
|
-
this.element = element;
|
|
5693
|
-
this._id = nextLayoutId.next();
|
|
5694
|
-
this._disposable = new MutableDisposable();
|
|
5695
|
-
this._viewDisposables = new Map();
|
|
5696
|
-
this._onDidLayoutfromJSON = new Emitter();
|
|
5697
|
-
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5698
|
-
this._onDidLayoutChange = new Emitter();
|
|
5699
|
-
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5700
|
-
this._onDidDrop = new Emitter();
|
|
5701
|
-
this.onDidDrop = this._onDidDrop.event;
|
|
5702
|
-
this._onDidAddView = new Emitter();
|
|
5703
|
-
this.onDidAddView = this._onDidAddView.event;
|
|
5704
|
-
this._onDidRemoveView = new Emitter();
|
|
5705
|
-
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5706
|
-
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5707
|
-
this._options = options;
|
|
5708
|
-
if (!options.components) {
|
|
5709
|
-
options.components = {};
|
|
5710
|
-
}
|
|
5711
|
-
if (!options.frameworkComponents) {
|
|
5712
|
-
options.frameworkComponents = {};
|
|
5713
|
-
}
|
|
5714
|
-
this.paneview = new Paneview(this.element, {
|
|
5715
|
-
// only allow paneview in the vertical orientation for now
|
|
5716
|
-
orientation: Orientation.VERTICAL,
|
|
5717
|
-
});
|
|
5718
|
-
this.addDisposables(this._disposable);
|
|
5719
|
-
}
|
|
5720
6109
|
get id() {
|
|
5721
6110
|
return this._id;
|
|
5722
6111
|
}
|
|
@@ -5751,6 +6140,36 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5751
6140
|
get options() {
|
|
5752
6141
|
return this._options;
|
|
5753
6142
|
}
|
|
6143
|
+
constructor(element, options) {
|
|
6144
|
+
super();
|
|
6145
|
+
this.element = element;
|
|
6146
|
+
this._id = nextLayoutId.next();
|
|
6147
|
+
this._disposable = new MutableDisposable();
|
|
6148
|
+
this._viewDisposables = new Map();
|
|
6149
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
6150
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
6151
|
+
this._onDidLayoutChange = new Emitter();
|
|
6152
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
6153
|
+
this._onDidDrop = new Emitter();
|
|
6154
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
6155
|
+
this._onDidAddView = new Emitter();
|
|
6156
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
6157
|
+
this._onDidRemoveView = new Emitter();
|
|
6158
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
6159
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
6160
|
+
this._options = options;
|
|
6161
|
+
if (!options.components) {
|
|
6162
|
+
options.components = {};
|
|
6163
|
+
}
|
|
6164
|
+
if (!options.frameworkComponents) {
|
|
6165
|
+
options.frameworkComponents = {};
|
|
6166
|
+
}
|
|
6167
|
+
this.paneview = new Paneview(this.element, {
|
|
6168
|
+
// only allow paneview in the vertical orientation for now
|
|
6169
|
+
orientation: Orientation.VERTICAL,
|
|
6170
|
+
});
|
|
6171
|
+
this.addDisposables(this._disposable);
|
|
6172
|
+
}
|
|
5754
6173
|
focus() {
|
|
5755
6174
|
//
|
|
5756
6175
|
}
|
|
@@ -5936,36 +6355,6 @@ class PaneviewComponent extends CompositeDisposable {
|
|
|
5936
6355
|
}
|
|
5937
6356
|
|
|
5938
6357
|
class SplitviewPanel extends BasePanelView {
|
|
5939
|
-
constructor(id, componentName) {
|
|
5940
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
5941
|
-
this._evaluatedMinimumSize = 0;
|
|
5942
|
-
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
5943
|
-
this._minimumSize = 0;
|
|
5944
|
-
this._maximumSize = Number.POSITIVE_INFINITY;
|
|
5945
|
-
this._snap = false;
|
|
5946
|
-
this._onDidChange = new Emitter();
|
|
5947
|
-
this.onDidChange = this._onDidChange.event;
|
|
5948
|
-
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
5949
|
-
const { isVisible } = event;
|
|
5950
|
-
const { accessor } = this._params;
|
|
5951
|
-
accessor.setVisible(this, isVisible);
|
|
5952
|
-
}), this.api.onActiveChange(() => {
|
|
5953
|
-
const { accessor } = this._params;
|
|
5954
|
-
accessor.setActive(this);
|
|
5955
|
-
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
5956
|
-
if (typeof event.minimumSize === 'number' ||
|
|
5957
|
-
typeof event.minimumSize === 'function') {
|
|
5958
|
-
this._minimumSize = event.minimumSize;
|
|
5959
|
-
}
|
|
5960
|
-
if (typeof event.maximumSize === 'number' ||
|
|
5961
|
-
typeof event.maximumSize === 'function') {
|
|
5962
|
-
this._maximumSize = event.maximumSize;
|
|
5963
|
-
}
|
|
5964
|
-
this.updateConstraints();
|
|
5965
|
-
}), this.api.onDidSizeChange((event) => {
|
|
5966
|
-
this._onDidChange.fire({ size: event.size });
|
|
5967
|
-
}));
|
|
5968
|
-
}
|
|
5969
6358
|
get priority() {
|
|
5970
6359
|
return this._priority;
|
|
5971
6360
|
}
|
|
@@ -5998,6 +6387,37 @@ class SplitviewPanel extends BasePanelView {
|
|
|
5998
6387
|
get snap() {
|
|
5999
6388
|
return this._snap;
|
|
6000
6389
|
}
|
|
6390
|
+
constructor(id, componentName) {
|
|
6391
|
+
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
6392
|
+
this._evaluatedMinimumSize = 0;
|
|
6393
|
+
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
6394
|
+
this._minimumSize = 0;
|
|
6395
|
+
this._maximumSize = Number.POSITIVE_INFINITY;
|
|
6396
|
+
this._snap = false;
|
|
6397
|
+
this._onDidChange = new Emitter();
|
|
6398
|
+
this.onDidChange = this._onDidChange.event;
|
|
6399
|
+
this.api.initialize(this);
|
|
6400
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6401
|
+
const { isVisible } = event;
|
|
6402
|
+
const { accessor } = this._params;
|
|
6403
|
+
accessor.setVisible(this, isVisible);
|
|
6404
|
+
}), this.api.onActiveChange(() => {
|
|
6405
|
+
const { accessor } = this._params;
|
|
6406
|
+
accessor.setActive(this);
|
|
6407
|
+
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6408
|
+
if (typeof event.minimumSize === 'number' ||
|
|
6409
|
+
typeof event.minimumSize === 'function') {
|
|
6410
|
+
this._minimumSize = event.minimumSize;
|
|
6411
|
+
}
|
|
6412
|
+
if (typeof event.maximumSize === 'number' ||
|
|
6413
|
+
typeof event.maximumSize === 'function') {
|
|
6414
|
+
this._maximumSize = event.maximumSize;
|
|
6415
|
+
}
|
|
6416
|
+
this.updateConstraints();
|
|
6417
|
+
}), this.api.onDidSizeChange((event) => {
|
|
6418
|
+
this._onDidChange.fire({ size: event.size });
|
|
6419
|
+
}));
|
|
6420
|
+
}
|
|
6001
6421
|
setVisible(isVisible) {
|
|
6002
6422
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
6003
6423
|
}
|
|
@@ -6163,6 +6583,9 @@ function isReactElement(element) {
|
|
|
6163
6583
|
}
|
|
6164
6584
|
|
|
6165
6585
|
class ReactPanelContentPart {
|
|
6586
|
+
get element() {
|
|
6587
|
+
return this._element;
|
|
6588
|
+
}
|
|
6166
6589
|
constructor(id, component, reactPortalStore) {
|
|
6167
6590
|
this.id = id;
|
|
6168
6591
|
this.component = component;
|
|
@@ -6174,9 +6597,6 @@ class ReactPanelContentPart {
|
|
|
6174
6597
|
this._element = document.createElement('div');
|
|
6175
6598
|
this._element.className = 'dockview-react-part';
|
|
6176
6599
|
}
|
|
6177
|
-
get element() {
|
|
6178
|
-
return this._element;
|
|
6179
|
-
}
|
|
6180
6600
|
focus() {
|
|
6181
6601
|
// TODO
|
|
6182
6602
|
}
|
|
@@ -6211,6 +6631,9 @@ class ReactPanelContentPart {
|
|
|
6211
6631
|
}
|
|
6212
6632
|
|
|
6213
6633
|
class ReactPanelHeaderPart {
|
|
6634
|
+
get element() {
|
|
6635
|
+
return this._element;
|
|
6636
|
+
}
|
|
6214
6637
|
constructor(id, component, reactPortalStore) {
|
|
6215
6638
|
this.id = id;
|
|
6216
6639
|
this.component = component;
|
|
@@ -6218,9 +6641,6 @@ class ReactPanelHeaderPart {
|
|
|
6218
6641
|
this._element = document.createElement('div');
|
|
6219
6642
|
this._element.className = 'dockview-react-part';
|
|
6220
6643
|
}
|
|
6221
|
-
get element() {
|
|
6222
|
-
return this._element;
|
|
6223
|
-
}
|
|
6224
6644
|
focus() {
|
|
6225
6645
|
//noop
|
|
6226
6646
|
}
|
|
@@ -6279,7 +6699,7 @@ class ReactPanelDeserialzier {
|
|
|
6279
6699
|
content: createComponent(viewData.content.id, viewData.content.id, this.layout.options.components, this.layout.options.frameworkComponents, (_d = this.layout.options.frameworkComponentFactory) === null || _d === void 0 ? void 0 : _d.content),
|
|
6280
6700
|
tab,
|
|
6281
6701
|
});
|
|
6282
|
-
const panel = new
|
|
6702
|
+
const panel = new DockviewPanel(panelId, this.layout, new DockviewApi(this.layout), group);
|
|
6283
6703
|
panel.init({
|
|
6284
6704
|
view,
|
|
6285
6705
|
title,
|
|
@@ -6290,6 +6710,9 @@ class ReactPanelDeserialzier {
|
|
|
6290
6710
|
}
|
|
6291
6711
|
|
|
6292
6712
|
class ReactWatermarkPart {
|
|
6713
|
+
get element() {
|
|
6714
|
+
return this._element;
|
|
6715
|
+
}
|
|
6293
6716
|
constructor(id, component, reactPortalStore) {
|
|
6294
6717
|
this.id = id;
|
|
6295
6718
|
this.component = component;
|
|
@@ -6300,9 +6723,6 @@ class ReactWatermarkPart {
|
|
|
6300
6723
|
this._element = document.createElement('div');
|
|
6301
6724
|
this._element.className = 'dockview-react-part';
|
|
6302
6725
|
}
|
|
6303
|
-
get element() {
|
|
6304
|
-
return this._element;
|
|
6305
|
-
}
|
|
6306
6726
|
init(parameters) {
|
|
6307
6727
|
this.parameters = parameters;
|
|
6308
6728
|
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
@@ -6345,14 +6765,6 @@ class ReactWatermarkPart {
|
|
|
6345
6765
|
}
|
|
6346
6766
|
|
|
6347
6767
|
class ReactGroupControlsRendererPart {
|
|
6348
|
-
constructor(component, reactPortalStore, _group) {
|
|
6349
|
-
this.component = component;
|
|
6350
|
-
this.reactPortalStore = reactPortalStore;
|
|
6351
|
-
this._group = _group;
|
|
6352
|
-
this.mutableDisposable = new MutableDisposable();
|
|
6353
|
-
this._element = document.createElement('div');
|
|
6354
|
-
this._element.className = 'dockview-react-part';
|
|
6355
|
-
}
|
|
6356
6768
|
get element() {
|
|
6357
6769
|
return this._element;
|
|
6358
6770
|
}
|
|
@@ -6362,6 +6774,14 @@ class ReactGroupControlsRendererPart {
|
|
|
6362
6774
|
get group() {
|
|
6363
6775
|
return this._group;
|
|
6364
6776
|
}
|
|
6777
|
+
constructor(component, reactPortalStore, _group) {
|
|
6778
|
+
this.component = component;
|
|
6779
|
+
this.reactPortalStore = reactPortalStore;
|
|
6780
|
+
this._group = _group;
|
|
6781
|
+
this.mutableDisposable = new MutableDisposable();
|
|
6782
|
+
this._element = document.createElement('div');
|
|
6783
|
+
this._element.className = 'dockview-react-part';
|
|
6784
|
+
}
|
|
6365
6785
|
focus() {
|
|
6366
6786
|
// TODO
|
|
6367
6787
|
}
|
|
@@ -6476,6 +6896,7 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
6476
6896
|
: undefined,
|
|
6477
6897
|
showDndOverlay: props.showDndOverlay,
|
|
6478
6898
|
createGroupControlElement: createGroupControlElement(props.groupControlComponent, { addPortal }),
|
|
6899
|
+
singleTabMode: props.singleTabMode,
|
|
6479
6900
|
});
|
|
6480
6901
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6481
6902
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
@@ -6688,7 +7109,7 @@ SplitviewReact.displayName = 'SplitviewComponent';
|
|
|
6688
7109
|
|
|
6689
7110
|
class ReactGridPanelView extends GridviewPanel {
|
|
6690
7111
|
constructor(id, component, reactComponent, reactPortalStore) {
|
|
6691
|
-
super(id, component);
|
|
7112
|
+
super(id, component, new GridviewPanelApiImpl(id));
|
|
6692
7113
|
this.reactComponent = reactComponent;
|
|
6693
7114
|
this.reactPortalStore = reactPortalStore;
|
|
6694
7115
|
}
|
|
@@ -6767,6 +7188,9 @@ const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
6767
7188
|
GridviewReact.displayName = 'GridviewComponent';
|
|
6768
7189
|
|
|
6769
7190
|
class PanePanelSection {
|
|
7191
|
+
get element() {
|
|
7192
|
+
return this._element;
|
|
7193
|
+
}
|
|
6770
7194
|
constructor(id, component, reactPortalStore) {
|
|
6771
7195
|
this.id = id;
|
|
6772
7196
|
this.component = component;
|
|
@@ -6775,9 +7199,6 @@ class PanePanelSection {
|
|
|
6775
7199
|
this._element.style.height = '100%';
|
|
6776
7200
|
this._element.style.width = '100%';
|
|
6777
7201
|
}
|
|
6778
|
-
get element() {
|
|
6779
|
-
return this._element;
|
|
6780
|
-
}
|
|
6781
7202
|
init(parameters) {
|
|
6782
7203
|
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
6783
7204
|
params: parameters.params,
|
|
@@ -6896,4 +7317,4 @@ const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
6896
7317
|
});
|
|
6897
7318
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
6898
7319
|
|
|
6899
|
-
export { BaseGrid, ContentContainer, DockviewApi, DockviewComponent, DockviewDefaultTab, DockviewDropTargets, DockviewReact, Event, Gridview, GridviewApi, GridviewComponent, GridviewPanel, GridviewReact, Groupview, LayoutPriority, LocalSelectionTransfer,
|
|
7320
|
+
export { BaseGrid, ContentContainer, DockviewApi, DockviewComponent, DockviewDefaultTab, DockviewDropTargets, DockviewReact, Event, Gridview, GridviewApi, GridviewComponent, GridviewPanel, GridviewReact, Groupview, LayoutPriority, LocalSelectionTransfer, Orientation, PaneFramework, PaneTransfer, PanelTransfer, Paneview, PaneviewApi, PaneviewComponent, PaneviewPanel, PaneviewReact, ReactPart, ReactPartContext, SashState, Sizing, Splitview, SplitviewApi, SplitviewComponent, SplitviewPanel, SplitviewReact, Tab, directionToPosition, getDirectionOrientation, getGridLocation, getLocationOrientation, getPaneData, getPanelData, getRelativeLocation, indexInParent, isGridBranchNode, isGroupOptionsWithGroup, isGroupOptionsWithPanel, isPanelOptionsWithGroup, isPanelOptionsWithPanel, isReactElement, orthogonal, positionToDirection, toTarget, usePortalsLifecycle };
|