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.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
|
*/
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dockview = {}, global.React, global.ReactDOM));
|
|
11
11
|
})(this, (function (exports, React, ReactDOM) { 'use strict';
|
|
12
12
|
|
|
13
|
-
function
|
|
14
|
-
if (e && e.__esModule) return e;
|
|
13
|
+
function _interopNamespaceDefault(e) {
|
|
15
14
|
var n = Object.create(null);
|
|
16
15
|
if (e) {
|
|
17
16
|
Object.keys(e).forEach(function (k) {
|
|
@@ -24,12 +23,12 @@
|
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
n
|
|
26
|
+
n.default = e;
|
|
28
27
|
return Object.freeze(n);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
var React__namespace = /*#__PURE__*/
|
|
32
|
-
var ReactDOM__namespace = /*#__PURE__*/
|
|
30
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
31
|
+
var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
|
|
33
32
|
|
|
34
33
|
function styleInject(css, ref) {
|
|
35
34
|
if ( ref === void 0 ) ref = {};
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
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}";
|
|
60
|
+
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}";
|
|
62
61
|
styleInject(css_248z);
|
|
63
62
|
|
|
64
63
|
class TransferObject {
|
|
@@ -229,12 +228,12 @@
|
|
|
229
228
|
};
|
|
230
229
|
})(Disposable || (Disposable = {}));
|
|
231
230
|
class CompositeDisposable {
|
|
232
|
-
constructor(...args) {
|
|
233
|
-
this.disposables = args;
|
|
234
|
-
}
|
|
235
231
|
static from(...args) {
|
|
236
232
|
return new CompositeDisposable(...args);
|
|
237
233
|
}
|
|
234
|
+
constructor(...args) {
|
|
235
|
+
this.disposables = args;
|
|
236
|
+
}
|
|
238
237
|
addDisposables(...args) {
|
|
239
238
|
args.forEach((arg) => this.disposables.push(arg));
|
|
240
239
|
}
|
|
@@ -452,21 +451,6 @@
|
|
|
452
451
|
}
|
|
453
452
|
|
|
454
453
|
class ViewItem {
|
|
455
|
-
constructor(container, view, size, disposable) {
|
|
456
|
-
this.container = container;
|
|
457
|
-
this.view = view;
|
|
458
|
-
this.disposable = disposable;
|
|
459
|
-
this._cachedVisibleSize = undefined;
|
|
460
|
-
if (typeof size === 'number') {
|
|
461
|
-
this._size = size;
|
|
462
|
-
this._cachedVisibleSize = undefined;
|
|
463
|
-
container.classList.add('visible');
|
|
464
|
-
}
|
|
465
|
-
else {
|
|
466
|
-
this._size = 0;
|
|
467
|
-
this._cachedVisibleSize = size.cachedVisibleSize;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
454
|
set size(size) {
|
|
471
455
|
this._size = size;
|
|
472
456
|
}
|
|
@@ -519,6 +503,21 @@
|
|
|
519
503
|
set enabled(enabled) {
|
|
520
504
|
this.container.style.pointerEvents = enabled ? '' : 'none';
|
|
521
505
|
}
|
|
506
|
+
constructor(container, view, size, disposable) {
|
|
507
|
+
this.container = container;
|
|
508
|
+
this.view = view;
|
|
509
|
+
this.disposable = disposable;
|
|
510
|
+
this._cachedVisibleSize = undefined;
|
|
511
|
+
if (typeof size === 'number') {
|
|
512
|
+
this._size = size;
|
|
513
|
+
this._cachedVisibleSize = undefined;
|
|
514
|
+
container.classList.add('visible');
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
this._size = 0;
|
|
518
|
+
this._cachedVisibleSize = size.cachedVisibleSize;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
522
521
|
// layout(offset: number, layoutContext: TLayoutContext | undefined): void {
|
|
523
522
|
// this.layoutContainer(offset);
|
|
524
523
|
// this.view.layout(this.size, offset, layoutContext);
|
|
@@ -565,6 +564,65 @@
|
|
|
565
564
|
Sizing.Invisible = Invisible;
|
|
566
565
|
})(exports.Sizing || (exports.Sizing = {}));
|
|
567
566
|
class Splitview {
|
|
567
|
+
get size() {
|
|
568
|
+
return this._size;
|
|
569
|
+
}
|
|
570
|
+
set size(value) {
|
|
571
|
+
this._size = value;
|
|
572
|
+
}
|
|
573
|
+
get orthogonalSize() {
|
|
574
|
+
return this._orthogonalSize;
|
|
575
|
+
}
|
|
576
|
+
set orthogonalSize(value) {
|
|
577
|
+
this._orthogonalSize = value;
|
|
578
|
+
}
|
|
579
|
+
get length() {
|
|
580
|
+
return this.views.length;
|
|
581
|
+
}
|
|
582
|
+
get proportions() {
|
|
583
|
+
return this._proportions ? [...this._proportions] : undefined;
|
|
584
|
+
}
|
|
585
|
+
get orientation() {
|
|
586
|
+
return this._orientation;
|
|
587
|
+
}
|
|
588
|
+
set orientation(value) {
|
|
589
|
+
this._orientation = value;
|
|
590
|
+
const tmp = this.size;
|
|
591
|
+
this.size = this.orthogonalSize;
|
|
592
|
+
this.orthogonalSize = tmp;
|
|
593
|
+
removeClasses(this.element, 'horizontal', 'vertical');
|
|
594
|
+
this.element.classList.add(this.orientation == exports.Orientation.HORIZONTAL
|
|
595
|
+
? 'horizontal'
|
|
596
|
+
: 'vertical');
|
|
597
|
+
}
|
|
598
|
+
get minimumSize() {
|
|
599
|
+
return this.views.reduce((r, item) => r + item.minimumSize, 0);
|
|
600
|
+
}
|
|
601
|
+
get maximumSize() {
|
|
602
|
+
return this.length === 0
|
|
603
|
+
? Number.POSITIVE_INFINITY
|
|
604
|
+
: this.views.reduce((r, item) => r + item.maximumSize, 0);
|
|
605
|
+
}
|
|
606
|
+
get startSnappingEnabled() {
|
|
607
|
+
return this._startSnappingEnabled;
|
|
608
|
+
}
|
|
609
|
+
set startSnappingEnabled(startSnappingEnabled) {
|
|
610
|
+
if (this._startSnappingEnabled === startSnappingEnabled) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
this._startSnappingEnabled = startSnappingEnabled;
|
|
614
|
+
this.updateSashEnablement();
|
|
615
|
+
}
|
|
616
|
+
get endSnappingEnabled() {
|
|
617
|
+
return this._endSnappingEnabled;
|
|
618
|
+
}
|
|
619
|
+
set endSnappingEnabled(endSnappingEnabled) {
|
|
620
|
+
if (this._endSnappingEnabled === endSnappingEnabled) {
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
this._endSnappingEnabled = endSnappingEnabled;
|
|
624
|
+
this.updateSashEnablement();
|
|
625
|
+
}
|
|
568
626
|
constructor(container, options) {
|
|
569
627
|
this.container = container;
|
|
570
628
|
this.views = [];
|
|
@@ -694,65 +752,6 @@
|
|
|
694
752
|
this.saveProportions();
|
|
695
753
|
}
|
|
696
754
|
}
|
|
697
|
-
get size() {
|
|
698
|
-
return this._size;
|
|
699
|
-
}
|
|
700
|
-
set size(value) {
|
|
701
|
-
this._size = value;
|
|
702
|
-
}
|
|
703
|
-
get orthogonalSize() {
|
|
704
|
-
return this._orthogonalSize;
|
|
705
|
-
}
|
|
706
|
-
set orthogonalSize(value) {
|
|
707
|
-
this._orthogonalSize = value;
|
|
708
|
-
}
|
|
709
|
-
get length() {
|
|
710
|
-
return this.views.length;
|
|
711
|
-
}
|
|
712
|
-
get proportions() {
|
|
713
|
-
return this._proportions ? [...this._proportions] : undefined;
|
|
714
|
-
}
|
|
715
|
-
get orientation() {
|
|
716
|
-
return this._orientation;
|
|
717
|
-
}
|
|
718
|
-
set orientation(value) {
|
|
719
|
-
this._orientation = value;
|
|
720
|
-
const tmp = this.size;
|
|
721
|
-
this.size = this.orthogonalSize;
|
|
722
|
-
this.orthogonalSize = tmp;
|
|
723
|
-
removeClasses(this.element, 'horizontal', 'vertical');
|
|
724
|
-
this.element.classList.add(this.orientation == exports.Orientation.HORIZONTAL
|
|
725
|
-
? 'horizontal'
|
|
726
|
-
: 'vertical');
|
|
727
|
-
}
|
|
728
|
-
get minimumSize() {
|
|
729
|
-
return this.views.reduce((r, item) => r + item.minimumSize, 0);
|
|
730
|
-
}
|
|
731
|
-
get maximumSize() {
|
|
732
|
-
return this.length === 0
|
|
733
|
-
? Number.POSITIVE_INFINITY
|
|
734
|
-
: this.views.reduce((r, item) => r + item.maximumSize, 0);
|
|
735
|
-
}
|
|
736
|
-
get startSnappingEnabled() {
|
|
737
|
-
return this._startSnappingEnabled;
|
|
738
|
-
}
|
|
739
|
-
set startSnappingEnabled(startSnappingEnabled) {
|
|
740
|
-
if (this._startSnappingEnabled === startSnappingEnabled) {
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
this._startSnappingEnabled = startSnappingEnabled;
|
|
744
|
-
this.updateSashEnablement();
|
|
745
|
-
}
|
|
746
|
-
get endSnappingEnabled() {
|
|
747
|
-
return this._endSnappingEnabled;
|
|
748
|
-
}
|
|
749
|
-
set endSnappingEnabled(endSnappingEnabled) {
|
|
750
|
-
if (this._endSnappingEnabled === endSnappingEnabled) {
|
|
751
|
-
return;
|
|
752
|
-
}
|
|
753
|
-
this._endSnappingEnabled = endSnappingEnabled;
|
|
754
|
-
this.updateSashEnablement();
|
|
755
|
-
}
|
|
756
755
|
style(styles) {
|
|
757
756
|
if ((styles === null || styles === void 0 ? void 0 : styles.separatorBorder) === 'transparent') {
|
|
758
757
|
removeClasses(this.element, 'separator-border');
|
|
@@ -1216,6 +1215,27 @@
|
|
|
1216
1215
|
}
|
|
1217
1216
|
|
|
1218
1217
|
class Paneview extends CompositeDisposable {
|
|
1218
|
+
get onDidAddView() {
|
|
1219
|
+
return this.splitview.onDidAddView;
|
|
1220
|
+
}
|
|
1221
|
+
get onDidRemoveView() {
|
|
1222
|
+
return this.splitview.onDidRemoveView;
|
|
1223
|
+
}
|
|
1224
|
+
get minimumSize() {
|
|
1225
|
+
return this.splitview.minimumSize;
|
|
1226
|
+
}
|
|
1227
|
+
get maximumSize() {
|
|
1228
|
+
return this.splitview.maximumSize;
|
|
1229
|
+
}
|
|
1230
|
+
get orientation() {
|
|
1231
|
+
return this.splitview.orientation;
|
|
1232
|
+
}
|
|
1233
|
+
get size() {
|
|
1234
|
+
return this.splitview.size;
|
|
1235
|
+
}
|
|
1236
|
+
get orthogonalSize() {
|
|
1237
|
+
return this.splitview.orthogonalSize;
|
|
1238
|
+
}
|
|
1219
1239
|
constructor(container, options) {
|
|
1220
1240
|
var _a;
|
|
1221
1241
|
super();
|
|
@@ -1258,27 +1278,6 @@
|
|
|
1258
1278
|
this._onDidChange.fire();
|
|
1259
1279
|
}));
|
|
1260
1280
|
}
|
|
1261
|
-
get onDidAddView() {
|
|
1262
|
-
return this.splitview.onDidAddView;
|
|
1263
|
-
}
|
|
1264
|
-
get onDidRemoveView() {
|
|
1265
|
-
return this.splitview.onDidRemoveView;
|
|
1266
|
-
}
|
|
1267
|
-
get minimumSize() {
|
|
1268
|
-
return this.splitview.minimumSize;
|
|
1269
|
-
}
|
|
1270
|
-
get maximumSize() {
|
|
1271
|
-
return this.splitview.maximumSize;
|
|
1272
|
-
}
|
|
1273
|
-
get orientation() {
|
|
1274
|
-
return this.splitview.orientation;
|
|
1275
|
-
}
|
|
1276
|
-
get size() {
|
|
1277
|
-
return this.splitview.size;
|
|
1278
|
-
}
|
|
1279
|
-
get orthogonalSize() {
|
|
1280
|
-
return this.splitview.orthogonalSize;
|
|
1281
|
-
}
|
|
1282
1281
|
addPane(pane, size, index = this.splitview.length, skipLayout = false) {
|
|
1283
1282
|
const disposable = pane.onDidChangeExpansionState(() => {
|
|
1284
1283
|
this.setupAnimation();
|
|
@@ -1357,243 +1356,16 @@
|
|
|
1357
1356
|
}
|
|
1358
1357
|
}
|
|
1359
1358
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
// when the element has child elements where the events are fired
|
|
1368
|
-
// repeadedly.
|
|
1369
|
-
this.counter = 0;
|
|
1370
|
-
this.registerListeners();
|
|
1359
|
+
/*---------------------------------------------------------------------------------------------
|
|
1360
|
+
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
1361
|
+
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
1362
|
+
*--------------------------------------------------------------------------------------------*/
|
|
1363
|
+
class LeafNode {
|
|
1364
|
+
get minimumWidth() {
|
|
1365
|
+
return this.view.minimumWidth;
|
|
1371
1366
|
}
|
|
1372
|
-
|
|
1373
|
-
this.
|
|
1374
|
-
this.counter++;
|
|
1375
|
-
this.callbacks.onDragEnter(e);
|
|
1376
|
-
}));
|
|
1377
|
-
this.addDisposables(addDisposableListener(this.element, 'dragover', (e) => {
|
|
1378
|
-
e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
|
|
1379
|
-
if (this.callbacks.onDragOver) {
|
|
1380
|
-
this.callbacks.onDragOver(e);
|
|
1381
|
-
}
|
|
1382
|
-
}));
|
|
1383
|
-
this.addDisposables(addDisposableListener(this.element, 'dragleave', (e) => {
|
|
1384
|
-
this.counter--;
|
|
1385
|
-
if (this.counter === 0) {
|
|
1386
|
-
this.callbacks.onDragLeave(e);
|
|
1387
|
-
}
|
|
1388
|
-
}));
|
|
1389
|
-
this.addDisposables(addDisposableListener(this.element, 'dragend', (e) => {
|
|
1390
|
-
this.counter = 0;
|
|
1391
|
-
this.callbacks.onDragEnd(e);
|
|
1392
|
-
}));
|
|
1393
|
-
this.addDisposables(addDisposableListener(this.element, 'drop', (e) => {
|
|
1394
|
-
this.counter = 0;
|
|
1395
|
-
this.callbacks.onDrop(e);
|
|
1396
|
-
}));
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
exports.Position = void 0;
|
|
1401
|
-
(function (Position) {
|
|
1402
|
-
Position["Top"] = "Top";
|
|
1403
|
-
Position["Left"] = "Left";
|
|
1404
|
-
Position["Bottom"] = "Bottom";
|
|
1405
|
-
Position["Right"] = "Right";
|
|
1406
|
-
Position["Center"] = "Center";
|
|
1407
|
-
})(exports.Position || (exports.Position = {}));
|
|
1408
|
-
function isBooleanValue(canDisplayOverlay) {
|
|
1409
|
-
return typeof canDisplayOverlay === 'boolean';
|
|
1410
|
-
}
|
|
1411
|
-
class Droptarget extends CompositeDisposable {
|
|
1412
|
-
constructor(element, options) {
|
|
1413
|
-
super();
|
|
1414
|
-
this.element = element;
|
|
1415
|
-
this.options = options;
|
|
1416
|
-
this._onDrop = new Emitter();
|
|
1417
|
-
this.onDrop = this._onDrop.event;
|
|
1418
|
-
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
1419
|
-
onDragEnter: () => undefined,
|
|
1420
|
-
onDragOver: (e) => {
|
|
1421
|
-
const width = this.element.clientWidth;
|
|
1422
|
-
const height = this.element.clientHeight;
|
|
1423
|
-
if (width === 0 || height === 0) {
|
|
1424
|
-
return; // avoid div!0
|
|
1425
|
-
}
|
|
1426
|
-
const x = e.offsetX;
|
|
1427
|
-
const y = e.offsetY;
|
|
1428
|
-
const xp = (100 * x) / width;
|
|
1429
|
-
const yp = (100 * y) / height;
|
|
1430
|
-
const quadrant = this.calculateQuadrant(this.options.validOverlays, xp, yp);
|
|
1431
|
-
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
1432
|
-
if (!this.options.canDisplayOverlay) {
|
|
1433
|
-
return;
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
1437
|
-
return;
|
|
1438
|
-
}
|
|
1439
|
-
if (!this.target) {
|
|
1440
|
-
this.target = document.createElement('div');
|
|
1441
|
-
this.target.className = 'drop-target-dropzone';
|
|
1442
|
-
this.overlay = document.createElement('div');
|
|
1443
|
-
this.overlay.className = 'drop-target-selection';
|
|
1444
|
-
this._state = exports.Position.Center;
|
|
1445
|
-
this.target.appendChild(this.overlay);
|
|
1446
|
-
this.element.classList.add('drop-target');
|
|
1447
|
-
this.element.append(this.target);
|
|
1448
|
-
}
|
|
1449
|
-
if (this.options.validOverlays === 'none') {
|
|
1450
|
-
return;
|
|
1451
|
-
}
|
|
1452
|
-
if (!this.target || !this.overlay) {
|
|
1453
|
-
return;
|
|
1454
|
-
}
|
|
1455
|
-
const isSmallX = width < 100;
|
|
1456
|
-
const isSmallY = height < 100;
|
|
1457
|
-
this.toggleClasses(quadrant, isSmallX, isSmallY);
|
|
1458
|
-
this.setState(quadrant);
|
|
1459
|
-
},
|
|
1460
|
-
onDragLeave: () => {
|
|
1461
|
-
this.removeDropTarget();
|
|
1462
|
-
},
|
|
1463
|
-
onDragEnd: () => {
|
|
1464
|
-
this.removeDropTarget();
|
|
1465
|
-
},
|
|
1466
|
-
onDrop: (e) => {
|
|
1467
|
-
e.preventDefault();
|
|
1468
|
-
e.stopPropagation();
|
|
1469
|
-
const state = this._state;
|
|
1470
|
-
this.removeDropTarget();
|
|
1471
|
-
if (state) {
|
|
1472
|
-
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
1473
|
-
}
|
|
1474
|
-
},
|
|
1475
|
-
}));
|
|
1476
|
-
}
|
|
1477
|
-
get state() {
|
|
1478
|
-
return this._state;
|
|
1479
|
-
}
|
|
1480
|
-
set validOverlays(value) {
|
|
1481
|
-
this.options.validOverlays = value;
|
|
1482
|
-
}
|
|
1483
|
-
set canDisplayOverlay(value) {
|
|
1484
|
-
this.options.canDisplayOverlay = value;
|
|
1485
|
-
}
|
|
1486
|
-
dispose() {
|
|
1487
|
-
this.removeDropTarget();
|
|
1488
|
-
}
|
|
1489
|
-
toggleClasses(quadrant, isSmallX, isSmallY) {
|
|
1490
|
-
if (!this.overlay) {
|
|
1491
|
-
return;
|
|
1492
|
-
}
|
|
1493
|
-
const isLeft = quadrant === 'left';
|
|
1494
|
-
const isRight = quadrant === 'right';
|
|
1495
|
-
const isTop = quadrant === 'top';
|
|
1496
|
-
const isBottom = quadrant === 'bottom';
|
|
1497
|
-
toggleClass(this.overlay, 'right', !isSmallX && isRight);
|
|
1498
|
-
toggleClass(this.overlay, 'left', !isSmallX && isLeft);
|
|
1499
|
-
toggleClass(this.overlay, 'top', !isSmallY && isTop);
|
|
1500
|
-
toggleClass(this.overlay, 'bottom', !isSmallY && isBottom);
|
|
1501
|
-
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
1502
|
-
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
1503
|
-
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
1504
|
-
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
1505
|
-
}
|
|
1506
|
-
setState(quadrant) {
|
|
1507
|
-
switch (quadrant) {
|
|
1508
|
-
case 'top':
|
|
1509
|
-
this._state = exports.Position.Top;
|
|
1510
|
-
break;
|
|
1511
|
-
case 'left':
|
|
1512
|
-
this._state = exports.Position.Left;
|
|
1513
|
-
break;
|
|
1514
|
-
case 'bottom':
|
|
1515
|
-
this._state = exports.Position.Bottom;
|
|
1516
|
-
break;
|
|
1517
|
-
case 'right':
|
|
1518
|
-
this._state = exports.Position.Right;
|
|
1519
|
-
break;
|
|
1520
|
-
default:
|
|
1521
|
-
this._state = exports.Position.Center;
|
|
1522
|
-
break;
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
calculateQuadrant(overlayType, xp, yp) {
|
|
1526
|
-
switch (overlayType) {
|
|
1527
|
-
case 'all':
|
|
1528
|
-
if (xp < 20) {
|
|
1529
|
-
return 'left';
|
|
1530
|
-
}
|
|
1531
|
-
if (xp > 80) {
|
|
1532
|
-
return 'right';
|
|
1533
|
-
}
|
|
1534
|
-
if (yp < 20) {
|
|
1535
|
-
return 'top';
|
|
1536
|
-
}
|
|
1537
|
-
if (yp > 80) {
|
|
1538
|
-
return 'bottom';
|
|
1539
|
-
}
|
|
1540
|
-
break;
|
|
1541
|
-
case 'vertical':
|
|
1542
|
-
if (yp < 50) {
|
|
1543
|
-
return 'top';
|
|
1544
|
-
}
|
|
1545
|
-
return 'bottom';
|
|
1546
|
-
case 'horizontal':
|
|
1547
|
-
if (xp < 50) {
|
|
1548
|
-
return 'left';
|
|
1549
|
-
}
|
|
1550
|
-
return 'right';
|
|
1551
|
-
}
|
|
1552
|
-
return null;
|
|
1553
|
-
}
|
|
1554
|
-
removeDropTarget() {
|
|
1555
|
-
if (this.target) {
|
|
1556
|
-
this._state = undefined;
|
|
1557
|
-
this.element.removeChild(this.target);
|
|
1558
|
-
this.target = undefined;
|
|
1559
|
-
this.element.classList.remove('drop-target');
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
/*---------------------------------------------------------------------------------------------
|
|
1565
|
-
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
1566
|
-
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
1567
|
-
*--------------------------------------------------------------------------------------------*/
|
|
1568
|
-
class LeafNode {
|
|
1569
|
-
constructor(view, orientation, orthogonalSize, size = 0) {
|
|
1570
|
-
this.view = view;
|
|
1571
|
-
this.orientation = orientation;
|
|
1572
|
-
this._onDidChange = new Emitter();
|
|
1573
|
-
this.onDidChange = this._onDidChange.event;
|
|
1574
|
-
this._orthogonalSize = orthogonalSize;
|
|
1575
|
-
this._size = size;
|
|
1576
|
-
this._disposable = this.view.onDidChange((event) => {
|
|
1577
|
-
if (event) {
|
|
1578
|
-
this._onDidChange.fire({
|
|
1579
|
-
size: this.orientation === exports.Orientation.VERTICAL
|
|
1580
|
-
? event.width
|
|
1581
|
-
: event.height,
|
|
1582
|
-
orthogonalSize: this.orientation === exports.Orientation.VERTICAL
|
|
1583
|
-
? event.height
|
|
1584
|
-
: event.width,
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
else {
|
|
1588
|
-
this._onDidChange.fire({});
|
|
1589
|
-
}
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
get minimumWidth() {
|
|
1593
|
-
return this.view.minimumWidth;
|
|
1594
|
-
}
|
|
1595
|
-
get maximumWidth() {
|
|
1596
|
-
return this.view.maximumWidth;
|
|
1367
|
+
get maximumWidth() {
|
|
1368
|
+
return this.view.maximumWidth;
|
|
1597
1369
|
}
|
|
1598
1370
|
get minimumHeight() {
|
|
1599
1371
|
return this.view.minimumHeight;
|
|
@@ -1646,6 +1418,29 @@
|
|
|
1646
1418
|
? this.size
|
|
1647
1419
|
: this.orthogonalSize;
|
|
1648
1420
|
}
|
|
1421
|
+
constructor(view, orientation, orthogonalSize, size = 0) {
|
|
1422
|
+
this.view = view;
|
|
1423
|
+
this.orientation = orientation;
|
|
1424
|
+
this._onDidChange = new Emitter();
|
|
1425
|
+
this.onDidChange = this._onDidChange.event;
|
|
1426
|
+
this._orthogonalSize = orthogonalSize;
|
|
1427
|
+
this._size = size;
|
|
1428
|
+
this._disposable = this.view.onDidChange((event) => {
|
|
1429
|
+
if (event) {
|
|
1430
|
+
this._onDidChange.fire({
|
|
1431
|
+
size: this.orientation === exports.Orientation.VERTICAL
|
|
1432
|
+
? event.width
|
|
1433
|
+
: event.height,
|
|
1434
|
+
orthogonalSize: this.orientation === exports.Orientation.VERTICAL
|
|
1435
|
+
? event.height
|
|
1436
|
+
: event.width,
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
else {
|
|
1440
|
+
this._onDidChange.fire({});
|
|
1441
|
+
}
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1649
1444
|
setVisible(visible) {
|
|
1650
1445
|
if (this.view.setVisible) {
|
|
1651
1446
|
this.view.setVisible(visible);
|
|
@@ -1668,53 +1463,6 @@
|
|
|
1668
1463
|
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
1669
1464
|
*--------------------------------------------------------------------------------------------*/
|
|
1670
1465
|
class BranchNode extends CompositeDisposable {
|
|
1671
|
-
constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
|
|
1672
|
-
super();
|
|
1673
|
-
this.orientation = orientation;
|
|
1674
|
-
this.proportionalLayout = proportionalLayout;
|
|
1675
|
-
this.styles = styles;
|
|
1676
|
-
this.children = [];
|
|
1677
|
-
this._onDidChange = new Emitter();
|
|
1678
|
-
this.onDidChange = this._onDidChange.event;
|
|
1679
|
-
this._childrenDisposable = Disposable.NONE;
|
|
1680
|
-
this._orthogonalSize = orthogonalSize;
|
|
1681
|
-
this._size = size;
|
|
1682
|
-
this.element = document.createElement('div');
|
|
1683
|
-
this.element.className = 'branch-node';
|
|
1684
|
-
if (!childDescriptors) {
|
|
1685
|
-
this.splitview = new Splitview(this.element, {
|
|
1686
|
-
orientation: this.orientation,
|
|
1687
|
-
proportionalLayout,
|
|
1688
|
-
styles,
|
|
1689
|
-
});
|
|
1690
|
-
this.splitview.layout(this.size, this.orthogonalSize);
|
|
1691
|
-
}
|
|
1692
|
-
else {
|
|
1693
|
-
const descriptor = {
|
|
1694
|
-
views: childDescriptors.map((childDescriptor) => {
|
|
1695
|
-
return {
|
|
1696
|
-
view: childDescriptor.node,
|
|
1697
|
-
size: childDescriptor.node.size,
|
|
1698
|
-
visible: childDescriptor.node instanceof LeafNode &&
|
|
1699
|
-
childDescriptor.visible !== undefined
|
|
1700
|
-
? childDescriptor.visible
|
|
1701
|
-
: true,
|
|
1702
|
-
};
|
|
1703
|
-
}),
|
|
1704
|
-
size: this.size,
|
|
1705
|
-
};
|
|
1706
|
-
this.children = childDescriptors.map((c) => c.node);
|
|
1707
|
-
this.splitview = new Splitview(this.element, {
|
|
1708
|
-
orientation: this.orientation,
|
|
1709
|
-
descriptor,
|
|
1710
|
-
proportionalLayout,
|
|
1711
|
-
});
|
|
1712
|
-
}
|
|
1713
|
-
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1714
|
-
this._onDidChange.fire({});
|
|
1715
|
-
}));
|
|
1716
|
-
this.setupChildrenEvents();
|
|
1717
|
-
}
|
|
1718
1466
|
get width() {
|
|
1719
1467
|
return this.orientation === exports.Orientation.HORIZONTAL
|
|
1720
1468
|
? this.size
|
|
@@ -1780,6 +1528,53 @@
|
|
|
1780
1528
|
}
|
|
1781
1529
|
return exports.LayoutPriority.Normal;
|
|
1782
1530
|
}
|
|
1531
|
+
constructor(orientation, proportionalLayout, styles, size, orthogonalSize, childDescriptors) {
|
|
1532
|
+
super();
|
|
1533
|
+
this.orientation = orientation;
|
|
1534
|
+
this.proportionalLayout = proportionalLayout;
|
|
1535
|
+
this.styles = styles;
|
|
1536
|
+
this.children = [];
|
|
1537
|
+
this._onDidChange = new Emitter();
|
|
1538
|
+
this.onDidChange = this._onDidChange.event;
|
|
1539
|
+
this._childrenDisposable = Disposable.NONE;
|
|
1540
|
+
this._orthogonalSize = orthogonalSize;
|
|
1541
|
+
this._size = size;
|
|
1542
|
+
this.element = document.createElement('div');
|
|
1543
|
+
this.element.className = 'branch-node';
|
|
1544
|
+
if (!childDescriptors) {
|
|
1545
|
+
this.splitview = new Splitview(this.element, {
|
|
1546
|
+
orientation: this.orientation,
|
|
1547
|
+
proportionalLayout,
|
|
1548
|
+
styles,
|
|
1549
|
+
});
|
|
1550
|
+
this.splitview.layout(this.size, this.orthogonalSize);
|
|
1551
|
+
}
|
|
1552
|
+
else {
|
|
1553
|
+
const descriptor = {
|
|
1554
|
+
views: childDescriptors.map((childDescriptor) => {
|
|
1555
|
+
return {
|
|
1556
|
+
view: childDescriptor.node,
|
|
1557
|
+
size: childDescriptor.node.size,
|
|
1558
|
+
visible: childDescriptor.node instanceof LeafNode &&
|
|
1559
|
+
childDescriptor.visible !== undefined
|
|
1560
|
+
? childDescriptor.visible
|
|
1561
|
+
: true,
|
|
1562
|
+
};
|
|
1563
|
+
}),
|
|
1564
|
+
size: this.size,
|
|
1565
|
+
};
|
|
1566
|
+
this.children = childDescriptors.map((c) => c.node);
|
|
1567
|
+
this.splitview = new Splitview(this.element, {
|
|
1568
|
+
orientation: this.orientation,
|
|
1569
|
+
descriptor,
|
|
1570
|
+
proportionalLayout,
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
this.addDisposables(this._onDidChange, this.splitview.onDidSashEnd(() => {
|
|
1574
|
+
this._onDidChange.fire({});
|
|
1575
|
+
}));
|
|
1576
|
+
this.setupChildrenEvents();
|
|
1577
|
+
}
|
|
1783
1578
|
setVisible(visible) {
|
|
1784
1579
|
for (const child of this.children) {
|
|
1785
1580
|
child.setVisible(visible);
|
|
@@ -1951,20 +1746,18 @@
|
|
|
1951
1746
|
if (orientation === directionOrientation) {
|
|
1952
1747
|
const [rest, _index] = tail(location);
|
|
1953
1748
|
let index = _index;
|
|
1954
|
-
if (direction ===
|
|
1749
|
+
if (direction === 'right' || direction === 'bottom') {
|
|
1955
1750
|
index += 1;
|
|
1956
1751
|
}
|
|
1957
1752
|
return [...rest, index];
|
|
1958
1753
|
}
|
|
1959
1754
|
else {
|
|
1960
|
-
const index = direction ===
|
|
1961
|
-
? 1
|
|
1962
|
-
: 0;
|
|
1755
|
+
const index = direction === 'right' || direction === 'bottom' ? 1 : 0;
|
|
1963
1756
|
return [...location, index];
|
|
1964
1757
|
}
|
|
1965
1758
|
}
|
|
1966
1759
|
function getDirectionOrientation(direction) {
|
|
1967
|
-
return direction ===
|
|
1760
|
+
return direction === 'top' || direction === 'bottom'
|
|
1968
1761
|
? exports.Orientation.VERTICAL
|
|
1969
1762
|
: exports.Orientation.HORIZONTAL;
|
|
1970
1763
|
}
|
|
@@ -1999,15 +1792,8 @@
|
|
|
1999
1792
|
};
|
|
2000
1793
|
};
|
|
2001
1794
|
class Gridview {
|
|
2002
|
-
|
|
2003
|
-
this.
|
|
2004
|
-
this.styles = styles;
|
|
2005
|
-
this.disposable = new MutableDisposable();
|
|
2006
|
-
this._onDidChange = new Emitter();
|
|
2007
|
-
this.onDidChange = this._onDidChange.event;
|
|
2008
|
-
this.element = document.createElement('div');
|
|
2009
|
-
this.element.className = 'grid-view';
|
|
2010
|
-
this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
|
|
1795
|
+
get length() {
|
|
1796
|
+
return this._root ? this._root.children.length : 0;
|
|
2011
1797
|
}
|
|
2012
1798
|
serialize() {
|
|
2013
1799
|
const root = serializeBranchNode(this.getView(), this.orientation);
|
|
@@ -2081,6 +1867,32 @@
|
|
|
2081
1867
|
this._onDidChange.fire(e);
|
|
2082
1868
|
});
|
|
2083
1869
|
}
|
|
1870
|
+
/**
|
|
1871
|
+
* If the root is orientated as a VERTICAL node then nest the existing root within a new HORIZIONTAL root node
|
|
1872
|
+
* If the root is orientated as a HORIZONTAL node then nest the existing root within a new VERITCAL root node
|
|
1873
|
+
*/
|
|
1874
|
+
insertOrthogonalSplitviewAtRoot() {
|
|
1875
|
+
if (!this._root) {
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
const oldRoot = this.root;
|
|
1879
|
+
oldRoot.element.remove();
|
|
1880
|
+
this._root = new BranchNode(orthogonal(oldRoot.orientation), this.proportionalLayout, this.styles, this.root.orthogonalSize, this.root.size);
|
|
1881
|
+
if (oldRoot.children.length === 1) {
|
|
1882
|
+
// can remove one level of redundant branching if there is only a single child
|
|
1883
|
+
const childReference = oldRoot.children[0];
|
|
1884
|
+
oldRoot.removeChild(0); // remove to prevent disposal when disposing of unwanted root
|
|
1885
|
+
oldRoot.dispose();
|
|
1886
|
+
this._root.addChild(childReference, exports.Sizing.Distribute, 0);
|
|
1887
|
+
}
|
|
1888
|
+
else {
|
|
1889
|
+
this._root.addChild(oldRoot, exports.Sizing.Distribute, 0);
|
|
1890
|
+
}
|
|
1891
|
+
this.element.appendChild(this._root.element);
|
|
1892
|
+
this.disposable.value = this._root.onDidChange((e) => {
|
|
1893
|
+
this._onDidChange.fire(e);
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
2084
1896
|
next(location) {
|
|
2085
1897
|
return this.progmaticSelect(location);
|
|
2086
1898
|
}
|
|
@@ -2139,6 +1951,16 @@
|
|
|
2139
1951
|
get maximumHeight() {
|
|
2140
1952
|
return this.root.maximumHeight;
|
|
2141
1953
|
}
|
|
1954
|
+
constructor(proportionalLayout, styles, orientation) {
|
|
1955
|
+
this.proportionalLayout = proportionalLayout;
|
|
1956
|
+
this.styles = styles;
|
|
1957
|
+
this.disposable = new MutableDisposable();
|
|
1958
|
+
this._onDidChange = new Emitter();
|
|
1959
|
+
this.onDidChange = this._onDidChange.event;
|
|
1960
|
+
this.element = document.createElement('div');
|
|
1961
|
+
this.element.className = 'grid-view';
|
|
1962
|
+
this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0);
|
|
1963
|
+
}
|
|
2142
1964
|
isViewVisible(location) {
|
|
2143
1965
|
const [rest, index] = tail(location);
|
|
2144
1966
|
const [, parent] = this.getNode(rest);
|
|
@@ -2270,9 +2092,6 @@
|
|
|
2270
2092
|
}
|
|
2271
2093
|
|
|
2272
2094
|
class SplitviewApi {
|
|
2273
|
-
constructor(component) {
|
|
2274
|
-
this.component = component;
|
|
2275
|
-
}
|
|
2276
2095
|
get minimumSize() {
|
|
2277
2096
|
return this.component.minimumSize;
|
|
2278
2097
|
}
|
|
@@ -2306,6 +2125,9 @@
|
|
|
2306
2125
|
get onDidRemoveView() {
|
|
2307
2126
|
return this.component.onDidRemoveView;
|
|
2308
2127
|
}
|
|
2128
|
+
constructor(component) {
|
|
2129
|
+
this.component = component;
|
|
2130
|
+
}
|
|
2309
2131
|
updateOptions(options) {
|
|
2310
2132
|
this.component.updateOptions(options);
|
|
2311
2133
|
}
|
|
@@ -2338,9 +2160,6 @@
|
|
|
2338
2160
|
}
|
|
2339
2161
|
}
|
|
2340
2162
|
class PaneviewApi {
|
|
2341
|
-
constructor(component) {
|
|
2342
|
-
this.component = component;
|
|
2343
|
-
}
|
|
2344
2163
|
get minimumSize() {
|
|
2345
2164
|
return this.component.minimumSize;
|
|
2346
2165
|
}
|
|
@@ -2379,6 +2198,9 @@
|
|
|
2379
2198
|
};
|
|
2380
2199
|
return emitter.event;
|
|
2381
2200
|
}
|
|
2201
|
+
constructor(component) {
|
|
2202
|
+
this.component = component;
|
|
2203
|
+
}
|
|
2382
2204
|
removePanel(panel) {
|
|
2383
2205
|
this.component.removePanel(panel);
|
|
2384
2206
|
}
|
|
@@ -2408,9 +2230,6 @@
|
|
|
2408
2230
|
}
|
|
2409
2231
|
}
|
|
2410
2232
|
class GridviewApi {
|
|
2411
|
-
constructor(component) {
|
|
2412
|
-
this.component = component;
|
|
2413
|
-
}
|
|
2414
2233
|
get minimumHeight() {
|
|
2415
2234
|
return this.component.minimumHeight;
|
|
2416
2235
|
}
|
|
@@ -2453,6 +2272,9 @@
|
|
|
2453
2272
|
set orientation(value) {
|
|
2454
2273
|
this.component.updateOptions({ orientation: value });
|
|
2455
2274
|
}
|
|
2275
|
+
constructor(component) {
|
|
2276
|
+
this.component = component;
|
|
2277
|
+
}
|
|
2456
2278
|
focus() {
|
|
2457
2279
|
this.component.focus();
|
|
2458
2280
|
}
|
|
@@ -2482,8 +2304,8 @@
|
|
|
2482
2304
|
}
|
|
2483
2305
|
}
|
|
2484
2306
|
class DockviewApi {
|
|
2485
|
-
|
|
2486
|
-
this.component
|
|
2307
|
+
get id() {
|
|
2308
|
+
return this.component.id;
|
|
2487
2309
|
}
|
|
2488
2310
|
get width() {
|
|
2489
2311
|
return this.component.width;
|
|
@@ -2548,6 +2370,9 @@
|
|
|
2548
2370
|
get activeGroup() {
|
|
2549
2371
|
return this.component.activeGroup;
|
|
2550
2372
|
}
|
|
2373
|
+
constructor(component) {
|
|
2374
|
+
this.component = component;
|
|
2375
|
+
}
|
|
2551
2376
|
getTabHeight() {
|
|
2552
2377
|
return this.component.tabHeight;
|
|
2553
2378
|
}
|
|
@@ -2566,8 +2391,8 @@
|
|
|
2566
2391
|
addPanel(options) {
|
|
2567
2392
|
return this.component.addPanel(options);
|
|
2568
2393
|
}
|
|
2569
|
-
|
|
2570
|
-
this.component.
|
|
2394
|
+
addGroup(options) {
|
|
2395
|
+
return this.component.addGroup(options);
|
|
2571
2396
|
}
|
|
2572
2397
|
moveToNext(options) {
|
|
2573
2398
|
this.component.moveToNext(options);
|
|
@@ -2595,7 +2420,293 @@
|
|
|
2595
2420
|
}
|
|
2596
2421
|
}
|
|
2597
2422
|
|
|
2423
|
+
class DragAndDropObserver extends CompositeDisposable {
|
|
2424
|
+
constructor(element, callbacks) {
|
|
2425
|
+
super();
|
|
2426
|
+
this.element = element;
|
|
2427
|
+
this.callbacks = callbacks;
|
|
2428
|
+
this.target = null;
|
|
2429
|
+
this.registerListeners();
|
|
2430
|
+
}
|
|
2431
|
+
registerListeners() {
|
|
2432
|
+
this.addDisposables(addDisposableListener(this.element, 'dragenter', (e) => {
|
|
2433
|
+
this.target = e.target;
|
|
2434
|
+
this.callbacks.onDragEnter(e);
|
|
2435
|
+
}, true));
|
|
2436
|
+
this.addDisposables(addDisposableListener(this.element, 'dragover', (e) => {
|
|
2437
|
+
e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
|
|
2438
|
+
if (this.callbacks.onDragOver) {
|
|
2439
|
+
this.callbacks.onDragOver(e);
|
|
2440
|
+
}
|
|
2441
|
+
}, true));
|
|
2442
|
+
this.addDisposables(addDisposableListener(this.element, 'dragleave', (e) => {
|
|
2443
|
+
if (this.target === e.target) {
|
|
2444
|
+
this.target = null;
|
|
2445
|
+
this.callbacks.onDragLeave(e);
|
|
2446
|
+
}
|
|
2447
|
+
}));
|
|
2448
|
+
this.addDisposables(addDisposableListener(this.element, 'dragend', (e) => {
|
|
2449
|
+
this.target = null;
|
|
2450
|
+
this.callbacks.onDragEnd(e);
|
|
2451
|
+
}));
|
|
2452
|
+
this.addDisposables(addDisposableListener(this.element, 'drop', (e) => {
|
|
2453
|
+
this.callbacks.onDrop(e);
|
|
2454
|
+
}));
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
function isBooleanValue(value) {
|
|
2459
|
+
return typeof value === 'boolean';
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
function numberOrFallback(maybeNumber, fallback) {
|
|
2463
|
+
return typeof maybeNumber === 'number' ? maybeNumber : fallback;
|
|
2464
|
+
}
|
|
2465
|
+
function directionToPosition(direction) {
|
|
2466
|
+
switch (direction) {
|
|
2467
|
+
case 'above':
|
|
2468
|
+
return 'top';
|
|
2469
|
+
case 'below':
|
|
2470
|
+
return 'bottom';
|
|
2471
|
+
case 'left':
|
|
2472
|
+
return 'left';
|
|
2473
|
+
case 'right':
|
|
2474
|
+
return 'right';
|
|
2475
|
+
case 'within':
|
|
2476
|
+
return 'center';
|
|
2477
|
+
default:
|
|
2478
|
+
throw new Error(`invalid direction '${direction}'`);
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
function positionToDirection(position) {
|
|
2482
|
+
switch (position) {
|
|
2483
|
+
case 'top':
|
|
2484
|
+
return 'above';
|
|
2485
|
+
case 'bottom':
|
|
2486
|
+
return 'below';
|
|
2487
|
+
case 'left':
|
|
2488
|
+
return 'left';
|
|
2489
|
+
case 'right':
|
|
2490
|
+
return 'right';
|
|
2491
|
+
case 'center':
|
|
2492
|
+
return 'within';
|
|
2493
|
+
default:
|
|
2494
|
+
throw new Error(`invalid position '${position}'`);
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
class Droptarget extends CompositeDisposable {
|
|
2498
|
+
get state() {
|
|
2499
|
+
return this._state;
|
|
2500
|
+
}
|
|
2501
|
+
constructor(element, options) {
|
|
2502
|
+
super();
|
|
2503
|
+
this.element = element;
|
|
2504
|
+
this.options = options;
|
|
2505
|
+
this._onDrop = new Emitter();
|
|
2506
|
+
this.onDrop = this._onDrop.event;
|
|
2507
|
+
// use a set to take advantage of #<set>.has
|
|
2508
|
+
const acceptedTargetZonesSet = new Set(this.options.acceptedTargetZones);
|
|
2509
|
+
this.addDisposables(this._onDrop, new DragAndDropObserver(this.element, {
|
|
2510
|
+
onDragEnter: () => undefined,
|
|
2511
|
+
onDragOver: (e) => {
|
|
2512
|
+
const width = this.element.clientWidth;
|
|
2513
|
+
const height = this.element.clientHeight;
|
|
2514
|
+
if (width === 0 || height === 0) {
|
|
2515
|
+
return; // avoid div!0
|
|
2516
|
+
}
|
|
2517
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
2518
|
+
const x = e.clientX - rect.left;
|
|
2519
|
+
const y = e.clientY - rect.top;
|
|
2520
|
+
const quadrant = this.calculateQuadrant(acceptedTargetZonesSet, x, y, width, height);
|
|
2521
|
+
if (quadrant === null) {
|
|
2522
|
+
// no drop target should be displayed
|
|
2523
|
+
this.removeDropTarget();
|
|
2524
|
+
return;
|
|
2525
|
+
}
|
|
2526
|
+
if (isBooleanValue(this.options.canDisplayOverlay)) {
|
|
2527
|
+
if (!this.options.canDisplayOverlay) {
|
|
2528
|
+
return;
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
else if (!this.options.canDisplayOverlay(e, quadrant)) {
|
|
2532
|
+
return;
|
|
2533
|
+
}
|
|
2534
|
+
if (!this.target) {
|
|
2535
|
+
this.target = document.createElement('div');
|
|
2536
|
+
this.target.className = 'drop-target-dropzone';
|
|
2537
|
+
this.overlay = document.createElement('div');
|
|
2538
|
+
this.overlay.className = 'drop-target-selection';
|
|
2539
|
+
this._state = 'center';
|
|
2540
|
+
this.target.appendChild(this.overlay);
|
|
2541
|
+
this.element.classList.add('drop-target');
|
|
2542
|
+
this.element.append(this.target);
|
|
2543
|
+
}
|
|
2544
|
+
if (this.options.acceptedTargetZones.length === 0) {
|
|
2545
|
+
return;
|
|
2546
|
+
}
|
|
2547
|
+
if (!this.target || !this.overlay) {
|
|
2548
|
+
return;
|
|
2549
|
+
}
|
|
2550
|
+
this.toggleClasses(quadrant, width, height);
|
|
2551
|
+
this.setState(quadrant);
|
|
2552
|
+
},
|
|
2553
|
+
onDragLeave: () => {
|
|
2554
|
+
this.removeDropTarget();
|
|
2555
|
+
},
|
|
2556
|
+
onDragEnd: () => {
|
|
2557
|
+
this.removeDropTarget();
|
|
2558
|
+
},
|
|
2559
|
+
onDrop: (e) => {
|
|
2560
|
+
e.preventDefault();
|
|
2561
|
+
e.stopPropagation();
|
|
2562
|
+
const state = this._state;
|
|
2563
|
+
this.removeDropTarget();
|
|
2564
|
+
if (state) {
|
|
2565
|
+
this._onDrop.fire({ position: state, nativeEvent: e });
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2568
|
+
}));
|
|
2569
|
+
}
|
|
2570
|
+
dispose() {
|
|
2571
|
+
this.removeDropTarget();
|
|
2572
|
+
}
|
|
2573
|
+
toggleClasses(quadrant, width, height) {
|
|
2574
|
+
var _a, _b, _c, _d;
|
|
2575
|
+
if (!this.overlay) {
|
|
2576
|
+
return;
|
|
2577
|
+
}
|
|
2578
|
+
const isSmallX = width < 100;
|
|
2579
|
+
const isSmallY = height < 100;
|
|
2580
|
+
const isLeft = quadrant === 'left';
|
|
2581
|
+
const isRight = quadrant === 'right';
|
|
2582
|
+
const isTop = quadrant === 'top';
|
|
2583
|
+
const isBottom = quadrant === 'bottom';
|
|
2584
|
+
const rightClass = !isSmallX && isRight;
|
|
2585
|
+
const leftClass = !isSmallX && isLeft;
|
|
2586
|
+
const topClass = !isSmallY && isTop;
|
|
2587
|
+
const bottomClass = !isSmallY && isBottom;
|
|
2588
|
+
let size = 0.5;
|
|
2589
|
+
if (((_b = (_a = this.options.overlayModel) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.type) === 'percentage') {
|
|
2590
|
+
size = clamp(this.options.overlayModel.size.value, 0, 100) / 100;
|
|
2591
|
+
}
|
|
2592
|
+
if (((_d = (_c = this.options.overlayModel) === null || _c === void 0 ? void 0 : _c.size) === null || _d === void 0 ? void 0 : _d.type) === 'pixels') {
|
|
2593
|
+
if (rightClass || leftClass) {
|
|
2594
|
+
size =
|
|
2595
|
+
clamp(0, this.options.overlayModel.size.value, width) /
|
|
2596
|
+
width;
|
|
2597
|
+
}
|
|
2598
|
+
if (topClass || bottomClass) {
|
|
2599
|
+
size =
|
|
2600
|
+
clamp(0, this.options.overlayModel.size.value, height) /
|
|
2601
|
+
height;
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
const translate = (1 - size) / 2;
|
|
2605
|
+
const scale = size;
|
|
2606
|
+
let transform;
|
|
2607
|
+
if (rightClass) {
|
|
2608
|
+
transform = `translateX(${100 * translate}%) scaleX(${scale})`;
|
|
2609
|
+
}
|
|
2610
|
+
else if (leftClass) {
|
|
2611
|
+
transform = `translateX(-${100 * translate}%) scaleX(${scale})`;
|
|
2612
|
+
}
|
|
2613
|
+
else if (topClass) {
|
|
2614
|
+
transform = `translateY(-${100 * translate}%) scaleY(${scale})`;
|
|
2615
|
+
}
|
|
2616
|
+
else if (bottomClass) {
|
|
2617
|
+
transform = `translateY(${100 * translate}%) scaleY(${scale})`;
|
|
2618
|
+
}
|
|
2619
|
+
else {
|
|
2620
|
+
transform = '';
|
|
2621
|
+
}
|
|
2622
|
+
this.overlay.style.transform = transform;
|
|
2623
|
+
toggleClass(this.overlay, 'small-right', isSmallX && isRight);
|
|
2624
|
+
toggleClass(this.overlay, 'small-left', isSmallX && isLeft);
|
|
2625
|
+
toggleClass(this.overlay, 'small-top', isSmallY && isTop);
|
|
2626
|
+
toggleClass(this.overlay, 'small-bottom', isSmallY && isBottom);
|
|
2627
|
+
}
|
|
2628
|
+
setState(quadrant) {
|
|
2629
|
+
switch (quadrant) {
|
|
2630
|
+
case 'top':
|
|
2631
|
+
this._state = 'top';
|
|
2632
|
+
break;
|
|
2633
|
+
case 'left':
|
|
2634
|
+
this._state = 'left';
|
|
2635
|
+
break;
|
|
2636
|
+
case 'bottom':
|
|
2637
|
+
this._state = 'bottom';
|
|
2638
|
+
break;
|
|
2639
|
+
case 'right':
|
|
2640
|
+
this._state = 'right';
|
|
2641
|
+
break;
|
|
2642
|
+
case 'center':
|
|
2643
|
+
this._state = 'center';
|
|
2644
|
+
break;
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
calculateQuadrant(overlayType, x, y, width, height) {
|
|
2648
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2649
|
+
const isPercentage = ((_a = this.options.overlayModel) === null || _a === void 0 ? void 0 : _a.activationSize) === undefined ||
|
|
2650
|
+
((_c = (_b = this.options.overlayModel) === null || _b === void 0 ? void 0 : _b.activationSize) === null || _c === void 0 ? void 0 : _c.type) === 'percentage';
|
|
2651
|
+
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);
|
|
2652
|
+
if (isPercentage) {
|
|
2653
|
+
return calculateQuadrantAsPercentage(overlayType, x, y, width, height, value);
|
|
2654
|
+
}
|
|
2655
|
+
return calculateQuadrantAsPixels(overlayType, x, y, width, height, value);
|
|
2656
|
+
}
|
|
2657
|
+
removeDropTarget() {
|
|
2658
|
+
if (this.target) {
|
|
2659
|
+
this._state = undefined;
|
|
2660
|
+
this.element.removeChild(this.target);
|
|
2661
|
+
this.target = undefined;
|
|
2662
|
+
this.overlay = undefined;
|
|
2663
|
+
this.element.classList.remove('drop-target');
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
function calculateQuadrantAsPercentage(overlayType, x, y, width, height, threshold) {
|
|
2668
|
+
const xp = (100 * x) / width;
|
|
2669
|
+
const yp = (100 * y) / height;
|
|
2670
|
+
if (overlayType.has('left') && xp < threshold) {
|
|
2671
|
+
return 'left';
|
|
2672
|
+
}
|
|
2673
|
+
if (overlayType.has('right') && xp > 100 - threshold) {
|
|
2674
|
+
return 'right';
|
|
2675
|
+
}
|
|
2676
|
+
if (overlayType.has('top') && yp < threshold) {
|
|
2677
|
+
return 'top';
|
|
2678
|
+
}
|
|
2679
|
+
if (overlayType.has('bottom') && yp > 100 - threshold) {
|
|
2680
|
+
return 'bottom';
|
|
2681
|
+
}
|
|
2682
|
+
if (!overlayType.has('center')) {
|
|
2683
|
+
return null;
|
|
2684
|
+
}
|
|
2685
|
+
return 'center';
|
|
2686
|
+
}
|
|
2687
|
+
function calculateQuadrantAsPixels(overlayType, x, y, width, height, threshold) {
|
|
2688
|
+
if (overlayType.has('left') && x < threshold) {
|
|
2689
|
+
return 'left';
|
|
2690
|
+
}
|
|
2691
|
+
if (overlayType.has('right') && x > width - threshold) {
|
|
2692
|
+
return 'right';
|
|
2693
|
+
}
|
|
2694
|
+
if (overlayType.has('top') && y < threshold) {
|
|
2695
|
+
return 'top';
|
|
2696
|
+
}
|
|
2697
|
+
if (overlayType.has('bottom') && y > height - threshold) {
|
|
2698
|
+
return 'bottom';
|
|
2699
|
+
}
|
|
2700
|
+
if (!overlayType.has('center')) {
|
|
2701
|
+
return null;
|
|
2702
|
+
}
|
|
2703
|
+
return 'center';
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2598
2706
|
class ContentContainer extends CompositeDisposable {
|
|
2707
|
+
get element() {
|
|
2708
|
+
return this._element;
|
|
2709
|
+
}
|
|
2599
2710
|
constructor() {
|
|
2600
2711
|
super();
|
|
2601
2712
|
this.disposable = new MutableDisposable();
|
|
@@ -2613,9 +2724,6 @@
|
|
|
2613
2724
|
// 3) register dragEnd events
|
|
2614
2725
|
// 4) register mouseMove events (if no buttons are present we take this as a dragEnd event)
|
|
2615
2726
|
}
|
|
2616
|
-
get element() {
|
|
2617
|
-
return this._element;
|
|
2618
|
-
}
|
|
2619
2727
|
show() {
|
|
2620
2728
|
this.element.style.display = '';
|
|
2621
2729
|
}
|
|
@@ -2671,6 +2779,7 @@
|
|
|
2671
2779
|
DockviewDropTargets[DockviewDropTargets["Tab"] = 0] = "Tab";
|
|
2672
2780
|
DockviewDropTargets[DockviewDropTargets["Panel"] = 1] = "Panel";
|
|
2673
2781
|
DockviewDropTargets[DockviewDropTargets["TabContainer"] = 2] = "TabContainer";
|
|
2782
|
+
DockviewDropTargets[DockviewDropTargets["Edge"] = 3] = "Edge";
|
|
2674
2783
|
})(exports.DockviewDropTargets || (exports.DockviewDropTargets = {}));
|
|
2675
2784
|
|
|
2676
2785
|
class DragHandler extends CompositeDisposable {
|
|
@@ -2692,9 +2801,9 @@
|
|
|
2692
2801
|
for (const iframe of this.iframes) {
|
|
2693
2802
|
iframe.style.pointerEvents = 'none';
|
|
2694
2803
|
}
|
|
2695
|
-
this.el.classList.add('dragged');
|
|
2696
|
-
setTimeout(() => this.el.classList.remove('dragged'), 0);
|
|
2697
|
-
this.disposable.value = this.getData();
|
|
2804
|
+
this.el.classList.add('dv-dragged');
|
|
2805
|
+
setTimeout(() => this.el.classList.remove('dv-dragged'), 0);
|
|
2806
|
+
this.disposable.value = this.getData(event.dataTransfer);
|
|
2698
2807
|
if (event.dataTransfer) {
|
|
2699
2808
|
event.dataTransfer.effectAllowed = 'move';
|
|
2700
2809
|
}
|
|
@@ -2708,11 +2817,10 @@
|
|
|
2708
2817
|
}
|
|
2709
2818
|
}
|
|
2710
2819
|
|
|
2711
|
-
exports.MouseEventKind = void 0;
|
|
2712
|
-
(function (MouseEventKind) {
|
|
2713
|
-
MouseEventKind["CLICK"] = "CLICK";
|
|
2714
|
-
})(exports.MouseEventKind || (exports.MouseEventKind = {}));
|
|
2715
2820
|
class Tab extends CompositeDisposable {
|
|
2821
|
+
get element() {
|
|
2822
|
+
return this._element;
|
|
2823
|
+
}
|
|
2716
2824
|
constructor(panelId, accessor, group) {
|
|
2717
2825
|
super();
|
|
2718
2826
|
this.panelId = panelId;
|
|
@@ -2756,25 +2864,30 @@
|
|
|
2756
2864
|
* on the tabs-container. I cannot use event.preventDefault() since I need the on DragStart event to occur
|
|
2757
2865
|
*/
|
|
2758
2866
|
event.stopPropagation();
|
|
2759
|
-
this._onChanged.fire(
|
|
2867
|
+
this._onChanged.fire(event);
|
|
2760
2868
|
}));
|
|
2761
2869
|
this.droptarget = new Droptarget(this._element, {
|
|
2762
|
-
|
|
2763
|
-
canDisplayOverlay: (event) => {
|
|
2870
|
+
acceptedTargetZones: ['center'],
|
|
2871
|
+
canDisplayOverlay: (event, position) => {
|
|
2872
|
+
if (this.group.locked) {
|
|
2873
|
+
return false;
|
|
2874
|
+
}
|
|
2764
2875
|
const data = getPanelData();
|
|
2765
2876
|
if (data && this.accessor.id === data.viewId) {
|
|
2877
|
+
if (data.panelId === null &&
|
|
2878
|
+
data.groupId === this.group.id) {
|
|
2879
|
+
// don't allow group move to drop on self
|
|
2880
|
+
return false;
|
|
2881
|
+
}
|
|
2766
2882
|
return this.panelId !== data.panelId;
|
|
2767
2883
|
}
|
|
2768
|
-
return this.group.model.canDisplayOverlay(event, exports.DockviewDropTargets.Tab);
|
|
2884
|
+
return this.group.model.canDisplayOverlay(event, position, exports.DockviewDropTargets.Tab);
|
|
2769
2885
|
},
|
|
2770
2886
|
});
|
|
2771
2887
|
this.addDisposables(this.droptarget.onDrop((event) => {
|
|
2772
2888
|
this._onDropped.fire(event);
|
|
2773
2889
|
}));
|
|
2774
2890
|
}
|
|
2775
|
-
get element() {
|
|
2776
|
-
return this._element;
|
|
2777
|
-
}
|
|
2778
2891
|
setActive(isActive) {
|
|
2779
2892
|
toggleClass(this.element, 'active-tab', isActive);
|
|
2780
2893
|
toggleClass(this.element, 'inactive-tab', !isActive);
|
|
@@ -2792,56 +2905,94 @@
|
|
|
2792
2905
|
}
|
|
2793
2906
|
}
|
|
2794
2907
|
|
|
2795
|
-
|
|
2796
|
-
|
|
2908
|
+
function addGhostImage(dataTransfer, ghostElement) {
|
|
2909
|
+
// class dockview provides to force ghost image to be drawn on a different layer and prevent weird rendering issues
|
|
2910
|
+
addClasses(ghostElement, 'dv-dragged');
|
|
2911
|
+
document.body.appendChild(ghostElement);
|
|
2912
|
+
dataTransfer.setDragImage(ghostElement, 0, 0);
|
|
2913
|
+
setTimeout(() => {
|
|
2914
|
+
ghostElement.remove();
|
|
2915
|
+
}, 0);
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
class GroupDragHandler extends DragHandler {
|
|
2919
|
+
constructor(element, accessorId, group) {
|
|
2920
|
+
super(element);
|
|
2921
|
+
this.accessorId = accessorId;
|
|
2922
|
+
this.group = group;
|
|
2923
|
+
this.panelTransfer = LocalSelectionTransfer.getInstance();
|
|
2924
|
+
}
|
|
2925
|
+
getData(dataTransfer) {
|
|
2926
|
+
this.panelTransfer.setData([new PanelTransfer(this.accessorId, this.group.id, null)], PanelTransfer.prototype);
|
|
2927
|
+
const style = window.getComputedStyle(this.el);
|
|
2928
|
+
const bgColor = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-background-color');
|
|
2929
|
+
const color = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-color');
|
|
2930
|
+
if (dataTransfer) {
|
|
2931
|
+
const ghostElement = document.createElement('div');
|
|
2932
|
+
ghostElement.style.backgroundColor = bgColor;
|
|
2933
|
+
ghostElement.style.color = color;
|
|
2934
|
+
ghostElement.style.padding = '2px 8px';
|
|
2935
|
+
ghostElement.style.height = '24px';
|
|
2936
|
+
ghostElement.style.fontSize = '11px';
|
|
2937
|
+
ghostElement.style.lineHeight = '20px';
|
|
2938
|
+
ghostElement.style.borderRadius = '12px';
|
|
2939
|
+
ghostElement.style.position = 'absolute';
|
|
2940
|
+
ghostElement.textContent = `Multiple Panels (${this.group.size})`;
|
|
2941
|
+
addGhostImage(dataTransfer, ghostElement);
|
|
2942
|
+
}
|
|
2943
|
+
return {
|
|
2944
|
+
dispose: () => {
|
|
2945
|
+
this.panelTransfer.clearData(PanelTransfer.prototype);
|
|
2946
|
+
},
|
|
2947
|
+
};
|
|
2948
|
+
}
|
|
2949
|
+
dispose() {
|
|
2950
|
+
//
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
class VoidContainer extends CompositeDisposable {
|
|
2955
|
+
get element() {
|
|
2956
|
+
return this._element;
|
|
2957
|
+
}
|
|
2958
|
+
constructor(accessor, group) {
|
|
2797
2959
|
super();
|
|
2798
2960
|
this.accessor = accessor;
|
|
2799
2961
|
this.group = group;
|
|
2800
|
-
this.tabs = [];
|
|
2801
|
-
this.selectedIndex = -1;
|
|
2802
|
-
this._hidden = false;
|
|
2803
2962
|
this._onDrop = new Emitter();
|
|
2804
2963
|
this.onDrop = this._onDrop.event;
|
|
2805
|
-
this.addDisposables(this._onDrop);
|
|
2806
2964
|
this._element = document.createElement('div');
|
|
2807
|
-
this._element.className = '
|
|
2808
|
-
this.
|
|
2809
|
-
this.
|
|
2810
|
-
this.
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
this.
|
|
2814
|
-
this.
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
this._element.appendChild(this.actionContainer);
|
|
2818
|
-
this.voidDropTarget = new Droptarget(this.voidContainer, {
|
|
2819
|
-
validOverlays: 'none',
|
|
2820
|
-
canDisplayOverlay: (event) => {
|
|
2965
|
+
this._element.className = 'void-container';
|
|
2966
|
+
this._element.tabIndex = 0;
|
|
2967
|
+
this._element.draggable = true;
|
|
2968
|
+
this.addDisposables(this._onDrop, addDisposableListener(this._element, 'click', () => {
|
|
2969
|
+
this.accessor.doSetGroupActive(this.group);
|
|
2970
|
+
}));
|
|
2971
|
+
const handler = new GroupDragHandler(this._element, accessor.id, group);
|
|
2972
|
+
this.voidDropTarget = new Droptarget(this._element, {
|
|
2973
|
+
acceptedTargetZones: ['center'],
|
|
2974
|
+
canDisplayOverlay: (event, position) => {
|
|
2821
2975
|
var _a;
|
|
2822
2976
|
const data = getPanelData();
|
|
2823
2977
|
if (data && this.accessor.id === data.viewId) {
|
|
2978
|
+
if (data.panelId === null &&
|
|
2979
|
+
data.groupId === this.group.id) {
|
|
2980
|
+
// don't allow group move to drop on self
|
|
2981
|
+
return false;
|
|
2982
|
+
}
|
|
2824
2983
|
// don't show the overlay if the tab being dragged is the last panel of this group
|
|
2825
|
-
return ((_a = last(this.
|
|
2984
|
+
return ((_a = last(this.group.panels)) === null || _a === void 0 ? void 0 : _a.id) !== data.panelId;
|
|
2826
2985
|
}
|
|
2827
|
-
return group.model.canDisplayOverlay(event, exports.DockviewDropTargets.Panel);
|
|
2986
|
+
return group.model.canDisplayOverlay(event, position, exports.DockviewDropTargets.Panel);
|
|
2828
2987
|
},
|
|
2829
2988
|
});
|
|
2830
|
-
this.addDisposables(this.voidDropTarget.onDrop((event) => {
|
|
2831
|
-
this._onDrop.fire(
|
|
2832
|
-
|
|
2833
|
-
index: this.tabs.length,
|
|
2834
|
-
});
|
|
2835
|
-
}), this.voidDropTarget, addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
2836
|
-
if (event.defaultPrevented) {
|
|
2837
|
-
return;
|
|
2838
|
-
}
|
|
2839
|
-
const isLeftClick = event.button === 0;
|
|
2840
|
-
if (isLeftClick) {
|
|
2841
|
-
this.accessor.doSetGroupActive(this.group);
|
|
2842
|
-
}
|
|
2843
|
-
}));
|
|
2989
|
+
this.addDisposables(handler, this.voidDropTarget.onDrop((event) => {
|
|
2990
|
+
this._onDrop.fire(event);
|
|
2991
|
+
}), this.voidDropTarget);
|
|
2844
2992
|
}
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
class TabsContainer extends CompositeDisposable {
|
|
2845
2996
|
get panels() {
|
|
2846
2997
|
return this.tabs.map((_) => _.value.panelId);
|
|
2847
2998
|
}
|
|
@@ -2902,6 +3053,52 @@
|
|
|
2902
3053
|
indexOf(id) {
|
|
2903
3054
|
return this.tabs.findIndex((tab) => tab.value.panelId === id);
|
|
2904
3055
|
}
|
|
3056
|
+
constructor(accessor, group) {
|
|
3057
|
+
super();
|
|
3058
|
+
this.accessor = accessor;
|
|
3059
|
+
this.group = group;
|
|
3060
|
+
this.tabs = [];
|
|
3061
|
+
this.selectedIndex = -1;
|
|
3062
|
+
this._hidden = false;
|
|
3063
|
+
this._onDrop = new Emitter();
|
|
3064
|
+
this.onDrop = this._onDrop.event;
|
|
3065
|
+
this.addDisposables(this._onDrop);
|
|
3066
|
+
this._element = document.createElement('div');
|
|
3067
|
+
this._element.className = 'tabs-and-actions-container';
|
|
3068
|
+
this.height = accessor.options.tabHeight;
|
|
3069
|
+
toggleClass(this._element, 'dv-full-width-single-tab', this.accessor.options.singleTabMode === 'fullwidth');
|
|
3070
|
+
this.addDisposables(this.accessor.onDidAddPanel((e) => {
|
|
3071
|
+
if (e.api.group === this.group) {
|
|
3072
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3073
|
+
}
|
|
3074
|
+
}), this.accessor.onDidRemovePanel((e) => {
|
|
3075
|
+
if (e.api.group === this.group) {
|
|
3076
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
3077
|
+
}
|
|
3078
|
+
}));
|
|
3079
|
+
this.actionContainer = document.createElement('div');
|
|
3080
|
+
this.actionContainer.className = 'action-container';
|
|
3081
|
+
this.tabContainer = document.createElement('div');
|
|
3082
|
+
this.tabContainer.className = 'tabs-container';
|
|
3083
|
+
this.voidContainer = new VoidContainer(this.accessor, this.group);
|
|
3084
|
+
this._element.appendChild(this.tabContainer);
|
|
3085
|
+
this._element.appendChild(this.voidContainer.element);
|
|
3086
|
+
this._element.appendChild(this.actionContainer);
|
|
3087
|
+
this.addDisposables(this.voidContainer, this.voidContainer.onDrop((event) => {
|
|
3088
|
+
this._onDrop.fire({
|
|
3089
|
+
event: event.nativeEvent,
|
|
3090
|
+
index: this.tabs.length,
|
|
3091
|
+
});
|
|
3092
|
+
}), addDisposableListener(this.tabContainer, 'mousedown', (event) => {
|
|
3093
|
+
if (event.defaultPrevented) {
|
|
3094
|
+
return;
|
|
3095
|
+
}
|
|
3096
|
+
const isLeftClick = event.button === 0;
|
|
3097
|
+
if (isLeftClick) {
|
|
3098
|
+
this.accessor.doSetGroupActive(this.group);
|
|
3099
|
+
}
|
|
3100
|
+
}));
|
|
3101
|
+
}
|
|
2905
3102
|
setActive(_isGroupActive) {
|
|
2906
3103
|
// noop
|
|
2907
3104
|
}
|
|
@@ -2946,15 +3143,13 @@
|
|
|
2946
3143
|
var _a;
|
|
2947
3144
|
const alreadyFocused = panel.id === ((_a = this.group.model.activePanel) === null || _a === void 0 ? void 0 : _a.id) &&
|
|
2948
3145
|
this.group.model.isContentFocused;
|
|
2949
|
-
const isLeftClick = event.
|
|
2950
|
-
if (!isLeftClick || event.
|
|
3146
|
+
const isLeftClick = event.button === 0;
|
|
3147
|
+
if (!isLeftClick || event.defaultPrevented) {
|
|
2951
3148
|
return;
|
|
2952
3149
|
}
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
});
|
|
2957
|
-
}
|
|
3150
|
+
this.group.model.openPanel(panel, {
|
|
3151
|
+
skipFocus: alreadyFocused,
|
|
3152
|
+
});
|
|
2958
3153
|
}), tabToAdd.onDrop((event) => {
|
|
2959
3154
|
this._onDrop.fire({
|
|
2960
3155
|
event: event.nativeEvent,
|
|
@@ -2977,63 +3172,6 @@
|
|
|
2977
3172
|
}
|
|
2978
3173
|
|
|
2979
3174
|
class Groupview extends CompositeDisposable {
|
|
2980
|
-
constructor(container, accessor, id, options, parent) {
|
|
2981
|
-
super();
|
|
2982
|
-
this.container = container;
|
|
2983
|
-
this.accessor = accessor;
|
|
2984
|
-
this.id = id;
|
|
2985
|
-
this.options = options;
|
|
2986
|
-
this.parent = parent;
|
|
2987
|
-
this._isGroupActive = false;
|
|
2988
|
-
this._locked = false;
|
|
2989
|
-
this.mostRecentlyUsed = [];
|
|
2990
|
-
this._onDidChange = new Emitter();
|
|
2991
|
-
this.onDidChange = this._onDidChange.event;
|
|
2992
|
-
this._width = 0;
|
|
2993
|
-
this._height = 0;
|
|
2994
|
-
this._panels = [];
|
|
2995
|
-
this._onMove = new Emitter();
|
|
2996
|
-
this.onMove = this._onMove.event;
|
|
2997
|
-
this._onDidDrop = new Emitter();
|
|
2998
|
-
this.onDidDrop = this._onDidDrop.event;
|
|
2999
|
-
this._onDidAddPanel = new Emitter();
|
|
3000
|
-
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
3001
|
-
this._onDidRemovePanel = new Emitter();
|
|
3002
|
-
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3003
|
-
this._onDidActivePanelChange = new Emitter();
|
|
3004
|
-
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3005
|
-
this.container.classList.add('groupview');
|
|
3006
|
-
this.tabsContainer = new TabsContainer(this.accessor, this.parent, {
|
|
3007
|
-
tabHeight: options.tabHeight,
|
|
3008
|
-
});
|
|
3009
|
-
this.contentContainer = new ContentContainer();
|
|
3010
|
-
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
3011
|
-
validOverlays: 'all',
|
|
3012
|
-
canDisplayOverlay: (event, quadrant) => {
|
|
3013
|
-
if (this.locked && !quadrant) {
|
|
3014
|
-
return false;
|
|
3015
|
-
}
|
|
3016
|
-
const data = getPanelData();
|
|
3017
|
-
if (data && data.viewId === this.accessor.id) {
|
|
3018
|
-
const groupHasOnePanelAndIsActiveDragElement = this._panels.length === 1 && data.groupId === this.id;
|
|
3019
|
-
return !groupHasOnePanelAndIsActiveDragElement;
|
|
3020
|
-
}
|
|
3021
|
-
return this.canDisplayOverlay(event, exports.DockviewDropTargets.Panel);
|
|
3022
|
-
},
|
|
3023
|
-
});
|
|
3024
|
-
container.append(this.tabsContainer.element, this.contentContainer.element);
|
|
3025
|
-
this.header.hidden = !!options.hideHeader;
|
|
3026
|
-
this.locked = !!options.locked;
|
|
3027
|
-
this.addDisposables(this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this.tabsContainer.onDrop((event) => {
|
|
3028
|
-
this.handleDropEvent(event.event, exports.Position.Center, event.index);
|
|
3029
|
-
}), this.contentContainer.onDidFocus(() => {
|
|
3030
|
-
this.accessor.doSetGroupActive(this.parent, true);
|
|
3031
|
-
}), this.contentContainer.onDidBlur(() => {
|
|
3032
|
-
// noop
|
|
3033
|
-
}), this.dropTarget.onDrop((event) => {
|
|
3034
|
-
this.handleDropEvent(event.nativeEvent, event.position);
|
|
3035
|
-
}));
|
|
3036
|
-
}
|
|
3037
3175
|
get element() {
|
|
3038
3176
|
throw new Error('not supported');
|
|
3039
3177
|
}
|
|
@@ -3045,6 +3183,7 @@
|
|
|
3045
3183
|
}
|
|
3046
3184
|
set locked(value) {
|
|
3047
3185
|
this._locked = value;
|
|
3186
|
+
toggleClass(this.container, 'locked-groupview', value);
|
|
3048
3187
|
}
|
|
3049
3188
|
get isActive() {
|
|
3050
3189
|
return this._isGroupActive;
|
|
@@ -3082,6 +3221,71 @@
|
|
|
3082
3221
|
}
|
|
3083
3222
|
return isAncestor(document.activeElement, this.contentContainer.element);
|
|
3084
3223
|
}
|
|
3224
|
+
constructor(container, accessor, id, options, groupPanel) {
|
|
3225
|
+
super();
|
|
3226
|
+
this.container = container;
|
|
3227
|
+
this.accessor = accessor;
|
|
3228
|
+
this.id = id;
|
|
3229
|
+
this.options = options;
|
|
3230
|
+
this.groupPanel = groupPanel;
|
|
3231
|
+
this._isGroupActive = false;
|
|
3232
|
+
this._locked = false;
|
|
3233
|
+
this.mostRecentlyUsed = [];
|
|
3234
|
+
this._onDidChange = new Emitter();
|
|
3235
|
+
this.onDidChange = this._onDidChange.event;
|
|
3236
|
+
this._width = 0;
|
|
3237
|
+
this._height = 0;
|
|
3238
|
+
this._panels = [];
|
|
3239
|
+
this._onMove = new Emitter();
|
|
3240
|
+
this.onMove = this._onMove.event;
|
|
3241
|
+
this._onDidDrop = new Emitter();
|
|
3242
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
3243
|
+
this._onDidAddPanel = new Emitter();
|
|
3244
|
+
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
3245
|
+
this._onDidRemovePanel = new Emitter();
|
|
3246
|
+
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
3247
|
+
this._onDidActivePanelChange = new Emitter();
|
|
3248
|
+
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
3249
|
+
this.container.classList.add('groupview');
|
|
3250
|
+
this.tabsContainer = new TabsContainer(this.accessor, this.groupPanel);
|
|
3251
|
+
this.contentContainer = new ContentContainer();
|
|
3252
|
+
this.dropTarget = new Droptarget(this.contentContainer.element, {
|
|
3253
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
3254
|
+
canDisplayOverlay: (event, position) => {
|
|
3255
|
+
if (this.locked && position === 'center') {
|
|
3256
|
+
return false;
|
|
3257
|
+
}
|
|
3258
|
+
const data = getPanelData();
|
|
3259
|
+
if (data && data.viewId === this.accessor.id) {
|
|
3260
|
+
if (data.groupId === this.id) {
|
|
3261
|
+
if (position === 'center') {
|
|
3262
|
+
// don't allow to drop on self for center position
|
|
3263
|
+
return false;
|
|
3264
|
+
}
|
|
3265
|
+
if (data.panelId === null) {
|
|
3266
|
+
// don't allow group move to drop anywhere on self
|
|
3267
|
+
return false;
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
const groupHasOnePanelAndIsActiveDragElement = this._panels.length === 1 && data.groupId === this.id;
|
|
3271
|
+
return !groupHasOnePanelAndIsActiveDragElement;
|
|
3272
|
+
}
|
|
3273
|
+
return this.canDisplayOverlay(event, position, exports.DockviewDropTargets.Panel);
|
|
3274
|
+
},
|
|
3275
|
+
});
|
|
3276
|
+
container.append(this.tabsContainer.element, this.contentContainer.element);
|
|
3277
|
+
this.header.hidden = !!options.hideHeader;
|
|
3278
|
+
this.locked = !!options.locked;
|
|
3279
|
+
this.addDisposables(this._onMove, this._onDidChange, this._onDidDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange, this.tabsContainer.onDrop((event) => {
|
|
3280
|
+
this.handleDropEvent(event.event, 'center', event.index);
|
|
3281
|
+
}), this.contentContainer.onDidFocus(() => {
|
|
3282
|
+
this.accessor.doSetGroupActive(this.groupPanel, true);
|
|
3283
|
+
}), this.contentContainer.onDidBlur(() => {
|
|
3284
|
+
// noop
|
|
3285
|
+
}), this.dropTarget.onDrop((event) => {
|
|
3286
|
+
this.handleDropEvent(event.nativeEvent, event.position);
|
|
3287
|
+
}));
|
|
3288
|
+
}
|
|
3085
3289
|
initialize() {
|
|
3086
3290
|
var _a, _b;
|
|
3087
3291
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.panels) {
|
|
@@ -3097,11 +3301,11 @@
|
|
|
3097
3301
|
this.setActive(this.isActive, true, true);
|
|
3098
3302
|
this.updateContainer();
|
|
3099
3303
|
if (this.accessor.options.createGroupControlElement) {
|
|
3100
|
-
this._control = this.accessor.options.createGroupControlElement(this.
|
|
3304
|
+
this._control = this.accessor.options.createGroupControlElement(this.groupPanel);
|
|
3101
3305
|
this.addDisposables(this._control);
|
|
3102
3306
|
this._control.init({
|
|
3103
3307
|
containerApi: new DockviewApi(this.accessor),
|
|
3104
|
-
api: this.
|
|
3308
|
+
api: this.groupPanel.api,
|
|
3105
3309
|
});
|
|
3106
3310
|
this.tabsContainer.setActionElement(this._control.element);
|
|
3107
3311
|
}
|
|
@@ -3188,10 +3392,10 @@
|
|
|
3188
3392
|
const skipSetPanelActive = !!options.skipSetPanelActive;
|
|
3189
3393
|
const skipSetGroupActive = !!options.skipSetGroupActive;
|
|
3190
3394
|
// ensure the group is updated before we fire any events
|
|
3191
|
-
panel.updateParentGroup(this.
|
|
3395
|
+
panel.updateParentGroup(this.groupPanel, true);
|
|
3192
3396
|
if (this._activePanel === panel) {
|
|
3193
3397
|
if (!skipSetGroupActive) {
|
|
3194
|
-
this.accessor.doSetGroupActive(this.
|
|
3398
|
+
this.accessor.doSetGroupActive(this.groupPanel);
|
|
3195
3399
|
}
|
|
3196
3400
|
return;
|
|
3197
3401
|
}
|
|
@@ -3200,7 +3404,7 @@
|
|
|
3200
3404
|
this.doSetActivePanel(panel);
|
|
3201
3405
|
}
|
|
3202
3406
|
if (!skipSetGroupActive) {
|
|
3203
|
-
this.accessor.doSetGroupActive(this.
|
|
3407
|
+
this.accessor.doSetGroupActive(this.groupPanel, !!options.skipFocus);
|
|
3204
3408
|
}
|
|
3205
3409
|
this.updateContainer();
|
|
3206
3410
|
}
|
|
@@ -3223,7 +3427,7 @@
|
|
|
3223
3427
|
}
|
|
3224
3428
|
}
|
|
3225
3429
|
else {
|
|
3226
|
-
this.accessor.removeGroup(this.
|
|
3430
|
+
this.accessor.removeGroup(this.groupPanel);
|
|
3227
3431
|
}
|
|
3228
3432
|
}
|
|
3229
3433
|
closePanel(panel) {
|
|
@@ -3328,7 +3532,7 @@
|
|
|
3328
3532
|
}
|
|
3329
3533
|
updateContainer() {
|
|
3330
3534
|
toggleClass(this.container, 'empty', this.isEmpty);
|
|
3331
|
-
this.panels.forEach((panel) => panel.updateParentGroup(this.
|
|
3535
|
+
this.panels.forEach((panel) => panel.updateParentGroup(this.groupPanel, this.isActive));
|
|
3332
3536
|
if (this.isEmpty && !this.watermark) {
|
|
3333
3537
|
const watermark = this.accessor.createWatermarkComponent();
|
|
3334
3538
|
watermark.init({
|
|
@@ -3340,29 +3544,28 @@
|
|
|
3340
3544
|
this.watermark = watermark;
|
|
3341
3545
|
addDisposableListener(this.watermark.element, 'click', () => {
|
|
3342
3546
|
if (!this.isActive) {
|
|
3343
|
-
this.accessor.doSetGroupActive(this.
|
|
3547
|
+
this.accessor.doSetGroupActive(this.groupPanel);
|
|
3344
3548
|
}
|
|
3345
3549
|
});
|
|
3346
|
-
this.contentContainer.hide();
|
|
3347
3550
|
this.tabsContainer.hide();
|
|
3348
|
-
this.
|
|
3349
|
-
this.watermark.updateParentGroup(this.
|
|
3551
|
+
this.contentContainer.element.appendChild(this.watermark.element);
|
|
3552
|
+
this.watermark.updateParentGroup(this.groupPanel, true);
|
|
3350
3553
|
}
|
|
3351
3554
|
if (!this.isEmpty && this.watermark) {
|
|
3352
3555
|
this.watermark.element.remove();
|
|
3353
3556
|
this.watermark.dispose();
|
|
3354
3557
|
this.watermark = undefined;
|
|
3355
|
-
this.contentContainer.show();
|
|
3356
3558
|
this.tabsContainer.show();
|
|
3357
3559
|
}
|
|
3358
3560
|
}
|
|
3359
|
-
canDisplayOverlay(event, target) {
|
|
3561
|
+
canDisplayOverlay(event, position, target) {
|
|
3360
3562
|
// custom overlay handler
|
|
3361
3563
|
if (this.accessor.options.showDndOverlay) {
|
|
3362
3564
|
return this.accessor.options.showDndOverlay({
|
|
3363
3565
|
nativeEvent: event,
|
|
3364
3566
|
target,
|
|
3365
3567
|
group: this.accessor.getPanel(this.id),
|
|
3568
|
+
position,
|
|
3366
3569
|
getData: getPanelData,
|
|
3367
3570
|
});
|
|
3368
3571
|
}
|
|
@@ -3370,7 +3573,17 @@
|
|
|
3370
3573
|
}
|
|
3371
3574
|
handleDropEvent(event, position, index) {
|
|
3372
3575
|
const data = getPanelData();
|
|
3373
|
-
if (data) {
|
|
3576
|
+
if (data && data.viewId === this.accessor.id) {
|
|
3577
|
+
if (data.panelId === null) {
|
|
3578
|
+
// this is a group move dnd event
|
|
3579
|
+
const { groupId } = data;
|
|
3580
|
+
this._onMove.fire({
|
|
3581
|
+
target: position,
|
|
3582
|
+
groupId: groupId,
|
|
3583
|
+
index,
|
|
3584
|
+
});
|
|
3585
|
+
return;
|
|
3586
|
+
}
|
|
3374
3587
|
const fromSameGroup = this.tabsContainer.indexOf(data.panelId) !== -1;
|
|
3375
3588
|
if (fromSameGroup && this.tabsContainer.size === 1) {
|
|
3376
3589
|
return;
|
|
@@ -3416,45 +3629,19 @@
|
|
|
3416
3629
|
function toTarget(direction) {
|
|
3417
3630
|
switch (direction) {
|
|
3418
3631
|
case 'left':
|
|
3419
|
-
return
|
|
3632
|
+
return 'left';
|
|
3420
3633
|
case 'right':
|
|
3421
|
-
return
|
|
3634
|
+
return 'right';
|
|
3422
3635
|
case 'above':
|
|
3423
|
-
return
|
|
3636
|
+
return 'top';
|
|
3424
3637
|
case 'below':
|
|
3425
|
-
return
|
|
3638
|
+
return 'bottom';
|
|
3426
3639
|
case 'within':
|
|
3427
3640
|
default:
|
|
3428
|
-
return
|
|
3641
|
+
return 'center';
|
|
3429
3642
|
}
|
|
3430
3643
|
}
|
|
3431
3644
|
class BaseGrid extends CompositeDisposable {
|
|
3432
|
-
constructor(_element, options) {
|
|
3433
|
-
super();
|
|
3434
|
-
this._element = _element;
|
|
3435
|
-
this._id = nextLayoutId$1.next();
|
|
3436
|
-
this._groups = new Map();
|
|
3437
|
-
this._onDidLayoutChange = new Emitter();
|
|
3438
|
-
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3439
|
-
this._onDidRemoveGroup = new Emitter();
|
|
3440
|
-
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3441
|
-
this._onDidAddGroup = new Emitter();
|
|
3442
|
-
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3443
|
-
this._onDidActiveGroupChange = new Emitter();
|
|
3444
|
-
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3445
|
-
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3446
|
-
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3447
|
-
this.element.appendChild(this.gridview.element);
|
|
3448
|
-
this.layout(0, 0, true); // set some elements height/widths
|
|
3449
|
-
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3450
|
-
this._bufferOnDidLayoutChange.fire();
|
|
3451
|
-
}));
|
|
3452
|
-
this.addDisposables(exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3453
|
-
this._bufferOnDidLayoutChange.fire();
|
|
3454
|
-
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3455
|
-
this._onDidLayoutChange.fire();
|
|
3456
|
-
}), this._bufferOnDidLayoutChange);
|
|
3457
|
-
}
|
|
3458
3645
|
get id() {
|
|
3459
3646
|
return this._id;
|
|
3460
3647
|
}
|
|
@@ -3488,6 +3675,32 @@
|
|
|
3488
3675
|
get activeGroup() {
|
|
3489
3676
|
return this._activeGroup;
|
|
3490
3677
|
}
|
|
3678
|
+
constructor(_element, options) {
|
|
3679
|
+
super();
|
|
3680
|
+
this._element = _element;
|
|
3681
|
+
this._id = nextLayoutId$1.next();
|
|
3682
|
+
this._groups = new Map();
|
|
3683
|
+
this._onDidLayoutChange = new Emitter();
|
|
3684
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
3685
|
+
this._onDidRemoveGroup = new Emitter();
|
|
3686
|
+
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
3687
|
+
this._onDidAddGroup = new Emitter();
|
|
3688
|
+
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
3689
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3690
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3691
|
+
this._bufferOnDidLayoutChange = new TickDelayedEvent();
|
|
3692
|
+
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation);
|
|
3693
|
+
this.element.appendChild(this.gridview.element);
|
|
3694
|
+
this.layout(0, 0, true); // set some elements height/widths
|
|
3695
|
+
this.addDisposables(this.gridview.onDidChange(() => {
|
|
3696
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3697
|
+
}));
|
|
3698
|
+
this.addDisposables(exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup, this.onDidActiveGroupChange)(() => {
|
|
3699
|
+
this._bufferOnDidLayoutChange.fire();
|
|
3700
|
+
}), this._bufferOnDidLayoutChange.onEvent(() => {
|
|
3701
|
+
this._onDidLayoutChange.fire();
|
|
3702
|
+
}), this._bufferOnDidLayoutChange);
|
|
3703
|
+
}
|
|
3491
3704
|
setVisible(panel, visible) {
|
|
3492
3705
|
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
3493
3706
|
this._onDidLayoutChange.fire();
|
|
@@ -3596,10 +3809,51 @@
|
|
|
3596
3809
|
}
|
|
3597
3810
|
}
|
|
3598
3811
|
|
|
3812
|
+
function isPanelOptionsWithPanel(data) {
|
|
3813
|
+
if (data.referencePanel) {
|
|
3814
|
+
return true;
|
|
3815
|
+
}
|
|
3816
|
+
return false;
|
|
3817
|
+
}
|
|
3818
|
+
function isPanelOptionsWithGroup(data) {
|
|
3819
|
+
if (data.referenceGroup) {
|
|
3820
|
+
return true;
|
|
3821
|
+
}
|
|
3822
|
+
return false;
|
|
3823
|
+
}
|
|
3824
|
+
function isGroupOptionsWithPanel(data) {
|
|
3825
|
+
if (data.referencePanel) {
|
|
3826
|
+
return true;
|
|
3827
|
+
}
|
|
3828
|
+
return false;
|
|
3829
|
+
}
|
|
3830
|
+
function isGroupOptionsWithGroup(data) {
|
|
3831
|
+
if (data.referenceGroup) {
|
|
3832
|
+
return true;
|
|
3833
|
+
}
|
|
3834
|
+
return false;
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3599
3837
|
/**
|
|
3600
3838
|
* A core api implementation that should be used across all panel-like objects
|
|
3601
3839
|
*/
|
|
3602
3840
|
class PanelApiImpl extends CompositeDisposable {
|
|
3841
|
+
//
|
|
3842
|
+
get isFocused() {
|
|
3843
|
+
return this._isFocused;
|
|
3844
|
+
}
|
|
3845
|
+
get isActive() {
|
|
3846
|
+
return this._isActive;
|
|
3847
|
+
}
|
|
3848
|
+
get isVisible() {
|
|
3849
|
+
return this._isVisible;
|
|
3850
|
+
}
|
|
3851
|
+
get width() {
|
|
3852
|
+
return this._width;
|
|
3853
|
+
}
|
|
3854
|
+
get height() {
|
|
3855
|
+
return this._height;
|
|
3856
|
+
}
|
|
3603
3857
|
constructor(id) {
|
|
3604
3858
|
super();
|
|
3605
3859
|
this.id = id;
|
|
@@ -3608,6 +3862,7 @@
|
|
|
3608
3862
|
this._isVisible = true;
|
|
3609
3863
|
this._width = 0;
|
|
3610
3864
|
this._height = 0;
|
|
3865
|
+
this.panelUpdatesDisposable = new MutableDisposable();
|
|
3611
3866
|
this._onDidDimensionChange = new Emitter({
|
|
3612
3867
|
replay: true,
|
|
3613
3868
|
});
|
|
@@ -3636,32 +3891,28 @@
|
|
|
3636
3891
|
//
|
|
3637
3892
|
this._onActiveChange = new Emitter();
|
|
3638
3893
|
this.onActiveChange = this._onActiveChange.event;
|
|
3639
|
-
|
|
3894
|
+
//
|
|
3895
|
+
this._onUpdateParameters = new Emitter();
|
|
3896
|
+
this.onUpdateParameters = this._onUpdateParameters.event;
|
|
3897
|
+
this.addDisposables(this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onFocusEvent, this._onActiveChange, this._onVisibilityChange, this._onUpdateParameters, this.onDidFocusChange((event) => {
|
|
3640
3898
|
this._isFocused = event.isFocused;
|
|
3641
3899
|
}), this.onDidActiveChange((event) => {
|
|
3642
3900
|
this._isActive = event.isActive;
|
|
3643
3901
|
}), this.onDidVisibilityChange((event) => {
|
|
3644
3902
|
this._isVisible = event.isVisible;
|
|
3645
|
-
}), this.onDidDimensionsChange((event) => {
|
|
3646
|
-
this._width = event.width;
|
|
3647
|
-
this._height = event.height;
|
|
3648
|
-
}));
|
|
3649
|
-
}
|
|
3650
|
-
//
|
|
3651
|
-
get isFocused() {
|
|
3652
|
-
return this._isFocused;
|
|
3653
|
-
}
|
|
3654
|
-
get isActive() {
|
|
3655
|
-
return this._isActive;
|
|
3656
|
-
}
|
|
3657
|
-
get isVisible() {
|
|
3658
|
-
return this._isVisible;
|
|
3659
|
-
}
|
|
3660
|
-
get width() {
|
|
3661
|
-
return this._width;
|
|
3903
|
+
}), this.onDidDimensionsChange((event) => {
|
|
3904
|
+
this._width = event.width;
|
|
3905
|
+
this._height = event.height;
|
|
3906
|
+
}));
|
|
3662
3907
|
}
|
|
3663
|
-
|
|
3664
|
-
|
|
3908
|
+
initialize(panel) {
|
|
3909
|
+
this.panelUpdatesDisposable.value = this._onUpdateParameters.event((parameters) => {
|
|
3910
|
+
panel.update({
|
|
3911
|
+
params: {
|
|
3912
|
+
params: parameters,
|
|
3913
|
+
},
|
|
3914
|
+
});
|
|
3915
|
+
});
|
|
3665
3916
|
}
|
|
3666
3917
|
setVisible(isVisible) {
|
|
3667
3918
|
this._onVisibilityChange.fire({ isVisible });
|
|
@@ -3669,26 +3920,29 @@
|
|
|
3669
3920
|
setActive() {
|
|
3670
3921
|
this._onActiveChange.fire();
|
|
3671
3922
|
}
|
|
3923
|
+
updateParameters(parameters) {
|
|
3924
|
+
this._onUpdateParameters.fire(parameters);
|
|
3925
|
+
}
|
|
3672
3926
|
dispose() {
|
|
3673
3927
|
super.dispose();
|
|
3674
3928
|
}
|
|
3675
3929
|
}
|
|
3676
3930
|
|
|
3677
3931
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
3678
|
-
|
|
3679
|
-
constructor(id) {
|
|
3932
|
+
constructor(id, panel) {
|
|
3680
3933
|
super(id);
|
|
3681
3934
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
3682
3935
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
3683
|
-
//
|
|
3684
3936
|
this._onDidConstraintsChange = new Emitter({
|
|
3685
3937
|
replay: true,
|
|
3686
3938
|
});
|
|
3687
3939
|
this.onDidConstraintsChange = this._onDidConstraintsChange.event;
|
|
3688
|
-
//
|
|
3689
3940
|
this._onDidSizeChange = new Emitter();
|
|
3690
3941
|
this.onDidSizeChange = this._onDidSizeChange.event;
|
|
3691
3942
|
this.addDisposables(this._onDidConstraintsChangeInternal, this._onDidConstraintsChange, this._onDidSizeChange);
|
|
3943
|
+
if (panel) {
|
|
3944
|
+
this.initialize(panel);
|
|
3945
|
+
}
|
|
3692
3946
|
}
|
|
3693
3947
|
setConstraints(value) {
|
|
3694
3948
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
@@ -3699,19 +3953,6 @@
|
|
|
3699
3953
|
}
|
|
3700
3954
|
|
|
3701
3955
|
class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
3702
|
-
constructor(panel, group) {
|
|
3703
|
-
super(panel.id);
|
|
3704
|
-
this.panel = panel;
|
|
3705
|
-
this._onDidTitleChange = new Emitter();
|
|
3706
|
-
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3707
|
-
this._onDidActiveGroupChange = new Emitter();
|
|
3708
|
-
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3709
|
-
this._onDidGroupChange = new Emitter();
|
|
3710
|
-
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3711
|
-
this.disposable = new MutableDisposable();
|
|
3712
|
-
this._group = group;
|
|
3713
|
-
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3714
|
-
}
|
|
3715
3956
|
get title() {
|
|
3716
3957
|
return this.panel.title;
|
|
3717
3958
|
}
|
|
@@ -3735,30 +3976,29 @@
|
|
|
3735
3976
|
get group() {
|
|
3736
3977
|
return this._group;
|
|
3737
3978
|
}
|
|
3979
|
+
constructor(panel, group) {
|
|
3980
|
+
super(panel.id);
|
|
3981
|
+
this.panel = panel;
|
|
3982
|
+
this._onDidTitleChange = new Emitter();
|
|
3983
|
+
this.onDidTitleChange = this._onDidTitleChange.event;
|
|
3984
|
+
this._onDidActiveGroupChange = new Emitter();
|
|
3985
|
+
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
3986
|
+
this._onDidGroupChange = new Emitter();
|
|
3987
|
+
this.onDidGroupChange = this._onDidGroupChange.event;
|
|
3988
|
+
this.disposable = new MutableDisposable();
|
|
3989
|
+
this.initialize(panel);
|
|
3990
|
+
this._group = group;
|
|
3991
|
+
this.addDisposables(this.disposable, this._onDidTitleChange, this._onDidGroupChange, this._onDidActiveGroupChange);
|
|
3992
|
+
}
|
|
3738
3993
|
setTitle(title) {
|
|
3739
|
-
this.
|
|
3994
|
+
this.panel.update({ params: { title } });
|
|
3740
3995
|
}
|
|
3741
3996
|
close() {
|
|
3742
|
-
|
|
3743
|
-
throw new Error(`panel ${this.id} has no group`);
|
|
3744
|
-
}
|
|
3745
|
-
return this.group.model.closePanel(this.panel);
|
|
3997
|
+
this.group.model.closePanel(this.panel);
|
|
3746
3998
|
}
|
|
3747
3999
|
}
|
|
3748
4000
|
|
|
3749
|
-
class
|
|
3750
|
-
constructor(id, accessor, containerApi, group) {
|
|
3751
|
-
super();
|
|
3752
|
-
this.id = id;
|
|
3753
|
-
this.containerApi = containerApi;
|
|
3754
|
-
this.mutableDisposable = new MutableDisposable();
|
|
3755
|
-
this._title = '';
|
|
3756
|
-
this._group = group;
|
|
3757
|
-
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
3758
|
-
this.addDisposables(this.api.onActiveChange(() => {
|
|
3759
|
-
accessor.setActivePanel(this);
|
|
3760
|
-
}));
|
|
3761
|
-
}
|
|
4001
|
+
class DockviewPanel extends CompositeDisposable {
|
|
3762
4002
|
get params() {
|
|
3763
4003
|
return this._params;
|
|
3764
4004
|
}
|
|
@@ -3771,6 +4011,22 @@
|
|
|
3771
4011
|
get view() {
|
|
3772
4012
|
return this._view;
|
|
3773
4013
|
}
|
|
4014
|
+
constructor(id, accessor, containerApi, group) {
|
|
4015
|
+
super();
|
|
4016
|
+
this.id = id;
|
|
4017
|
+
this.containerApi = containerApi;
|
|
4018
|
+
this.mutableDisposable = new MutableDisposable();
|
|
4019
|
+
this._title = '';
|
|
4020
|
+
this._group = group;
|
|
4021
|
+
this.api = new DockviewPanelApiImpl(this, this._group);
|
|
4022
|
+
this.addDisposables(this.api.onActiveChange(() => {
|
|
4023
|
+
accessor.setActivePanel(this);
|
|
4024
|
+
}), this.api.onDidSizeChange((event) => {
|
|
4025
|
+
// forward the resize event to the group since if you want to resize a panel
|
|
4026
|
+
// you are actually just resizing the panels parent which is the group
|
|
4027
|
+
this.group.api.setSize(event);
|
|
4028
|
+
}));
|
|
4029
|
+
}
|
|
3774
4030
|
init(params) {
|
|
3775
4031
|
var _a;
|
|
3776
4032
|
this._params = params.params;
|
|
@@ -3853,6 +4109,9 @@
|
|
|
3853
4109
|
}
|
|
3854
4110
|
|
|
3855
4111
|
class ActionContainer {
|
|
4112
|
+
get element() {
|
|
4113
|
+
return this._element;
|
|
4114
|
+
}
|
|
3856
4115
|
constructor() {
|
|
3857
4116
|
this._element = document.createElement('div');
|
|
3858
4117
|
this._element.className = 'actions-bar';
|
|
@@ -3860,9 +4119,6 @@
|
|
|
3860
4119
|
this._list.className = 'actions-container';
|
|
3861
4120
|
this._element.appendChild(this._list);
|
|
3862
4121
|
}
|
|
3863
|
-
get element() {
|
|
3864
|
-
return this._element;
|
|
3865
|
-
}
|
|
3866
4122
|
add(element) {
|
|
3867
4123
|
const listItem = document.createElement('li');
|
|
3868
4124
|
listItem.className = 'action-item';
|
|
@@ -3903,6 +4159,9 @@
|
|
|
3903
4159
|
});
|
|
3904
4160
|
|
|
3905
4161
|
class Watermark extends CompositeDisposable {
|
|
4162
|
+
get id() {
|
|
4163
|
+
return 'watermark';
|
|
4164
|
+
}
|
|
3906
4165
|
constructor() {
|
|
3907
4166
|
super();
|
|
3908
4167
|
this._element = document.createElement('div');
|
|
@@ -3930,9 +4189,6 @@
|
|
|
3930
4189
|
}
|
|
3931
4190
|
}));
|
|
3932
4191
|
}
|
|
3933
|
-
get id() {
|
|
3934
|
-
return 'watermark';
|
|
3935
|
-
}
|
|
3936
4192
|
update(_event) {
|
|
3937
4193
|
// noop
|
|
3938
4194
|
}
|
|
@@ -3995,6 +4251,12 @@
|
|
|
3995
4251
|
|
|
3996
4252
|
const DEFAULT_TAB_IDENTIFIER = '__default__tab__';
|
|
3997
4253
|
class DefaultTab extends CompositeDisposable {
|
|
4254
|
+
get element() {
|
|
4255
|
+
return this._element;
|
|
4256
|
+
}
|
|
4257
|
+
get id() {
|
|
4258
|
+
return DEFAULT_TAB_IDENTIFIER;
|
|
4259
|
+
}
|
|
3998
4260
|
constructor() {
|
|
3999
4261
|
super();
|
|
4000
4262
|
this._isPanelVisible = false;
|
|
@@ -4027,12 +4289,6 @@
|
|
|
4027
4289
|
}));
|
|
4028
4290
|
this.render();
|
|
4029
4291
|
}
|
|
4030
|
-
get element() {
|
|
4031
|
-
return this._element;
|
|
4032
|
-
}
|
|
4033
|
-
get id() {
|
|
4034
|
-
return DEFAULT_TAB_IDENTIFIER;
|
|
4035
|
-
}
|
|
4036
4292
|
update(event) {
|
|
4037
4293
|
this.params = Object.assign(Object.assign({}, this.params), event.params);
|
|
4038
4294
|
this.render();
|
|
@@ -4071,6 +4327,19 @@
|
|
|
4071
4327
|
}
|
|
4072
4328
|
|
|
4073
4329
|
class BasePanelView extends CompositeDisposable {
|
|
4330
|
+
get element() {
|
|
4331
|
+
return this._element;
|
|
4332
|
+
}
|
|
4333
|
+
get width() {
|
|
4334
|
+
return this._width;
|
|
4335
|
+
}
|
|
4336
|
+
get height() {
|
|
4337
|
+
return this._height;
|
|
4338
|
+
}
|
|
4339
|
+
get params() {
|
|
4340
|
+
var _a;
|
|
4341
|
+
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4342
|
+
}
|
|
4074
4343
|
constructor(id, component, api) {
|
|
4075
4344
|
super();
|
|
4076
4345
|
this.id = id;
|
|
@@ -4091,19 +4360,6 @@
|
|
|
4091
4360
|
this.api._onDidChangeFocus.fire({ isFocused: false });
|
|
4092
4361
|
}));
|
|
4093
4362
|
}
|
|
4094
|
-
get element() {
|
|
4095
|
-
return this._element;
|
|
4096
|
-
}
|
|
4097
|
-
get width() {
|
|
4098
|
-
return this._width;
|
|
4099
|
-
}
|
|
4100
|
-
get height() {
|
|
4101
|
-
return this._height;
|
|
4102
|
-
}
|
|
4103
|
-
get params() {
|
|
4104
|
-
var _a;
|
|
4105
|
-
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
4106
|
-
}
|
|
4107
4363
|
focus() {
|
|
4108
4364
|
this.api._onFocusEvent.fire();
|
|
4109
4365
|
}
|
|
@@ -4144,50 +4400,6 @@
|
|
|
4144
4400
|
}
|
|
4145
4401
|
|
|
4146
4402
|
class GridviewPanel extends BasePanelView {
|
|
4147
|
-
constructor(id, component, api = new GridviewPanelApiImpl(id)) {
|
|
4148
|
-
super(id, component, api);
|
|
4149
|
-
this._evaluatedMinimumWidth = 0;
|
|
4150
|
-
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4151
|
-
this._evaluatedMinimumHeight = 0;
|
|
4152
|
-
this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4153
|
-
this._minimumWidth = 0;
|
|
4154
|
-
this._minimumHeight = 0;
|
|
4155
|
-
this._maximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4156
|
-
this._maximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4157
|
-
this._snap = false;
|
|
4158
|
-
this._onDidChange = new Emitter();
|
|
4159
|
-
this.onDidChange = this._onDidChange.event;
|
|
4160
|
-
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4161
|
-
const { isVisible } = event;
|
|
4162
|
-
const { accessor } = this._params;
|
|
4163
|
-
accessor.setVisible(this, isVisible);
|
|
4164
|
-
}), this.api.onActiveChange(() => {
|
|
4165
|
-
const { accessor } = this._params;
|
|
4166
|
-
accessor.setActive(this);
|
|
4167
|
-
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4168
|
-
if (typeof event.minimumWidth === 'number' ||
|
|
4169
|
-
typeof event.minimumWidth === 'function') {
|
|
4170
|
-
this._minimumWidth = event.minimumWidth;
|
|
4171
|
-
}
|
|
4172
|
-
if (typeof event.minimumHeight === 'number' ||
|
|
4173
|
-
typeof event.minimumHeight === 'function') {
|
|
4174
|
-
this._minimumHeight = event.minimumHeight;
|
|
4175
|
-
}
|
|
4176
|
-
if (typeof event.maximumWidth === 'number' ||
|
|
4177
|
-
typeof event.maximumWidth === 'function') {
|
|
4178
|
-
this._maximumWidth = event.maximumWidth;
|
|
4179
|
-
}
|
|
4180
|
-
if (typeof event.maximumHeight === 'number' ||
|
|
4181
|
-
typeof event.maximumHeight === 'function') {
|
|
4182
|
-
this._maximumHeight = event.maximumHeight;
|
|
4183
|
-
}
|
|
4184
|
-
}), this.api.onDidSizeChange((event) => {
|
|
4185
|
-
this._onDidChange.fire({
|
|
4186
|
-
height: event.height,
|
|
4187
|
-
width: event.width,
|
|
4188
|
-
});
|
|
4189
|
-
}));
|
|
4190
|
-
}
|
|
4191
4403
|
get priority() {
|
|
4192
4404
|
return this._priority;
|
|
4193
4405
|
}
|
|
@@ -4237,6 +4449,51 @@
|
|
|
4237
4449
|
get isActive() {
|
|
4238
4450
|
return this.api.isActive;
|
|
4239
4451
|
}
|
|
4452
|
+
constructor(id, component, api) {
|
|
4453
|
+
super(id, component, api);
|
|
4454
|
+
this._evaluatedMinimumWidth = 0;
|
|
4455
|
+
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4456
|
+
this._evaluatedMinimumHeight = 0;
|
|
4457
|
+
this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4458
|
+
this._minimumWidth = 0;
|
|
4459
|
+
this._minimumHeight = 0;
|
|
4460
|
+
this._maximumWidth = Number.MAX_SAFE_INTEGER;
|
|
4461
|
+
this._maximumHeight = Number.MAX_SAFE_INTEGER;
|
|
4462
|
+
this._snap = false;
|
|
4463
|
+
this._onDidChange = new Emitter();
|
|
4464
|
+
this.onDidChange = this._onDidChange.event;
|
|
4465
|
+
this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
|
|
4466
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
4467
|
+
const { isVisible } = event;
|
|
4468
|
+
const { accessor } = this._params;
|
|
4469
|
+
accessor.setVisible(this, isVisible);
|
|
4470
|
+
}), this.api.onActiveChange(() => {
|
|
4471
|
+
const { accessor } = this._params;
|
|
4472
|
+
accessor.setActive(this);
|
|
4473
|
+
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
4474
|
+
if (typeof event.minimumWidth === 'number' ||
|
|
4475
|
+
typeof event.minimumWidth === 'function') {
|
|
4476
|
+
this._minimumWidth = event.minimumWidth;
|
|
4477
|
+
}
|
|
4478
|
+
if (typeof event.minimumHeight === 'number' ||
|
|
4479
|
+
typeof event.minimumHeight === 'function') {
|
|
4480
|
+
this._minimumHeight = event.minimumHeight;
|
|
4481
|
+
}
|
|
4482
|
+
if (typeof event.maximumWidth === 'number' ||
|
|
4483
|
+
typeof event.maximumWidth === 'function') {
|
|
4484
|
+
this._maximumWidth = event.maximumWidth;
|
|
4485
|
+
}
|
|
4486
|
+
if (typeof event.maximumHeight === 'number' ||
|
|
4487
|
+
typeof event.maximumHeight === 'function') {
|
|
4488
|
+
this._maximumHeight = event.maximumHeight;
|
|
4489
|
+
}
|
|
4490
|
+
}), this.api.onDidSizeChange((event) => {
|
|
4491
|
+
this._onDidChange.fire({
|
|
4492
|
+
height: event.height,
|
|
4493
|
+
width: event.width,
|
|
4494
|
+
});
|
|
4495
|
+
}));
|
|
4496
|
+
}
|
|
4240
4497
|
setVisible(isVisible) {
|
|
4241
4498
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
4242
4499
|
}
|
|
@@ -4282,10 +4539,6 @@
|
|
|
4282
4539
|
class GroupviewApi extends GridviewPanelApiImpl {
|
|
4283
4540
|
}
|
|
4284
4541
|
class GroupPanel extends GridviewPanel {
|
|
4285
|
-
constructor(accessor, id, options) {
|
|
4286
|
-
super(id, 'groupview_default', new GroupviewApi(id));
|
|
4287
|
-
this._model = new Groupview(this.element, accessor, id, options, this);
|
|
4288
|
-
}
|
|
4289
4542
|
get panels() {
|
|
4290
4543
|
return this._model.panels;
|
|
4291
4544
|
}
|
|
@@ -4319,6 +4572,10 @@
|
|
|
4319
4572
|
get header() {
|
|
4320
4573
|
return this._model.header;
|
|
4321
4574
|
}
|
|
4575
|
+
constructor(accessor, id, options) {
|
|
4576
|
+
super(id, 'groupview_default', new GroupviewApi(id));
|
|
4577
|
+
this._model = new Groupview(this.element, accessor, id, options, this);
|
|
4578
|
+
}
|
|
4322
4579
|
initialize() {
|
|
4323
4580
|
this._model.initialize();
|
|
4324
4581
|
}
|
|
@@ -4339,17 +4596,17 @@
|
|
|
4339
4596
|
}
|
|
4340
4597
|
|
|
4341
4598
|
class DefaultGroupPanelView {
|
|
4342
|
-
constructor(renderers) {
|
|
4343
|
-
var _a;
|
|
4344
|
-
this._content = renderers.content;
|
|
4345
|
-
this._tab = (_a = renderers.tab) !== null && _a !== void 0 ? _a : new DefaultTab();
|
|
4346
|
-
}
|
|
4347
4599
|
get content() {
|
|
4348
4600
|
return this._content;
|
|
4349
4601
|
}
|
|
4350
4602
|
get tab() {
|
|
4351
4603
|
return this._tab;
|
|
4352
4604
|
}
|
|
4605
|
+
constructor(renderers) {
|
|
4606
|
+
var _a;
|
|
4607
|
+
this._content = renderers.content;
|
|
4608
|
+
this._tab = (_a = renderers.tab) !== null && _a !== void 0 ? _a : new DefaultTab();
|
|
4609
|
+
}
|
|
4353
4610
|
init(params) {
|
|
4354
4611
|
this.content.init(Object.assign(Object.assign({}, params), { tab: this.tab }));
|
|
4355
4612
|
this.tab.init(params);
|
|
@@ -4371,25 +4628,60 @@
|
|
|
4371
4628
|
if (tab && Object.keys(tab).length === 0) {
|
|
4372
4629
|
tab = undefined;
|
|
4373
4630
|
}
|
|
4374
|
-
return {
|
|
4375
|
-
content: this.content.toJSON(),
|
|
4376
|
-
tab,
|
|
4377
|
-
};
|
|
4631
|
+
return {
|
|
4632
|
+
content: this.content.toJSON(),
|
|
4633
|
+
tab,
|
|
4634
|
+
};
|
|
4635
|
+
}
|
|
4636
|
+
dispose() {
|
|
4637
|
+
this.content.dispose();
|
|
4638
|
+
this.tab.dispose();
|
|
4639
|
+
}
|
|
4640
|
+
}
|
|
4641
|
+
|
|
4642
|
+
class DockviewComponent extends BaseGrid {
|
|
4643
|
+
get orientation() {
|
|
4644
|
+
return this.gridview.orientation;
|
|
4645
|
+
}
|
|
4646
|
+
get totalPanels() {
|
|
4647
|
+
return this.panels.length;
|
|
4648
|
+
}
|
|
4649
|
+
get panels() {
|
|
4650
|
+
return this.groups.flatMap((group) => group.panels);
|
|
4651
|
+
}
|
|
4652
|
+
get deserializer() {
|
|
4653
|
+
return this._deserializer;
|
|
4654
|
+
}
|
|
4655
|
+
set deserializer(value) {
|
|
4656
|
+
this._deserializer = value;
|
|
4657
|
+
}
|
|
4658
|
+
get options() {
|
|
4659
|
+
return this._options;
|
|
4660
|
+
}
|
|
4661
|
+
get activePanel() {
|
|
4662
|
+
const activeGroup = this.activeGroup;
|
|
4663
|
+
if (!activeGroup) {
|
|
4664
|
+
return undefined;
|
|
4665
|
+
}
|
|
4666
|
+
return activeGroup.activePanel;
|
|
4378
4667
|
}
|
|
4379
|
-
|
|
4380
|
-
this.
|
|
4381
|
-
this.
|
|
4668
|
+
set tabHeight(height) {
|
|
4669
|
+
this.options.tabHeight = height;
|
|
4670
|
+
this._groups.forEach((value) => {
|
|
4671
|
+
value.value.model.header.height = height;
|
|
4672
|
+
});
|
|
4673
|
+
}
|
|
4674
|
+
get tabHeight() {
|
|
4675
|
+
return this.options.tabHeight;
|
|
4382
4676
|
}
|
|
4383
|
-
}
|
|
4384
|
-
|
|
4385
|
-
const nextGroupId = sequentialNumberGenerator();
|
|
4386
|
-
class DockviewComponent extends BaseGrid {
|
|
4387
4677
|
constructor(element, options) {
|
|
4388
4678
|
super(element, {
|
|
4389
4679
|
proportionalLayout: true,
|
|
4390
4680
|
orientation: options.orientation || exports.Orientation.HORIZONTAL,
|
|
4391
4681
|
styles: options.styles,
|
|
4392
4682
|
});
|
|
4683
|
+
this.nextGroupId = sequentialNumberGenerator();
|
|
4684
|
+
this.watermark = null;
|
|
4393
4685
|
this._onDidDrop = new Emitter();
|
|
4394
4686
|
this.onDidDrop = this._onDidDrop.event;
|
|
4395
4687
|
this._onDidRemovePanel = new Emitter();
|
|
@@ -4400,7 +4692,10 @@
|
|
|
4400
4692
|
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
|
|
4401
4693
|
this._onDidActivePanelChange = new Emitter();
|
|
4402
4694
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
4403
|
-
this.
|
|
4695
|
+
this.element.classList.add('dv-dockview');
|
|
4696
|
+
this.addDisposables(this._onDidDrop, exports.Event.any(this.onDidAddGroup, this.onDidRemoveGroup)(() => {
|
|
4697
|
+
this.updateWatermark();
|
|
4698
|
+
}), exports.Event.any(this.onDidAddPanel, this.onDidRemovePanel, this.onDidActivePanelChange)(() => {
|
|
4404
4699
|
this._bufferOnDidLayoutChange.fire();
|
|
4405
4700
|
}));
|
|
4406
4701
|
this._options = options;
|
|
@@ -4420,38 +4715,72 @@
|
|
|
4420
4715
|
!this.options.watermarkFrameworkComponent) {
|
|
4421
4716
|
this.options.watermarkComponent = Watermark;
|
|
4422
4717
|
}
|
|
4718
|
+
const dropTarget = new Droptarget(this.element, {
|
|
4719
|
+
canDisplayOverlay: (event, position) => {
|
|
4720
|
+
const data = getPanelData();
|
|
4721
|
+
if (data) {
|
|
4722
|
+
if (data.viewId !== this.id) {
|
|
4723
|
+
return false;
|
|
4724
|
+
}
|
|
4725
|
+
return true;
|
|
4726
|
+
}
|
|
4727
|
+
if (this.options.showDndOverlay) {
|
|
4728
|
+
return this.options.showDndOverlay({
|
|
4729
|
+
nativeEvent: event,
|
|
4730
|
+
position: position,
|
|
4731
|
+
target: exports.DockviewDropTargets.Edge,
|
|
4732
|
+
getData: getPanelData,
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4735
|
+
return false;
|
|
4736
|
+
},
|
|
4737
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right'],
|
|
4738
|
+
overlayModel: {
|
|
4739
|
+
activationSize: { type: 'pixels', value: 10 },
|
|
4740
|
+
size: { type: 'pixels', value: 20 },
|
|
4741
|
+
},
|
|
4742
|
+
});
|
|
4743
|
+
this.addDisposables(dropTarget, dropTarget.onDrop((event) => {
|
|
4744
|
+
const data = getPanelData();
|
|
4745
|
+
if (data) {
|
|
4746
|
+
this.moveGroupOrPanel(this.orthogonalize(event.position), data.groupId, data.panelId || undefined, 'center');
|
|
4747
|
+
}
|
|
4748
|
+
else {
|
|
4749
|
+
this._onDidDrop.fire(Object.assign(Object.assign({}, event), { api: this._api, group: null, getData: getPanelData }));
|
|
4750
|
+
}
|
|
4751
|
+
}));
|
|
4423
4752
|
this._api = new DockviewApi(this);
|
|
4753
|
+
this.updateWatermark();
|
|
4424
4754
|
}
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4755
|
+
orthogonalize(position) {
|
|
4756
|
+
switch (position) {
|
|
4757
|
+
case 'top':
|
|
4758
|
+
case 'bottom':
|
|
4759
|
+
if (this.gridview.orientation === exports.Orientation.HORIZONTAL) {
|
|
4760
|
+
// we need to add to a vertical splitview but the current root is a horizontal splitview.
|
|
4761
|
+
// insert a vertical splitview at the root level and add the existing view as a child
|
|
4762
|
+
this.gridview.insertOrthogonalSplitviewAtRoot();
|
|
4763
|
+
}
|
|
4764
|
+
break;
|
|
4765
|
+
case 'left':
|
|
4766
|
+
case 'right':
|
|
4767
|
+
if (this.gridview.orientation === exports.Orientation.VERTICAL) {
|
|
4768
|
+
// we need to add to a horizontal splitview but the current root is a vertical splitview.
|
|
4769
|
+
// insert a horiziontal splitview at the root level and add the existing view as a child
|
|
4770
|
+
this.gridview.insertOrthogonalSplitviewAtRoot();
|
|
4771
|
+
}
|
|
4772
|
+
break;
|
|
4773
|
+
}
|
|
4774
|
+
switch (position) {
|
|
4775
|
+
case 'top':
|
|
4776
|
+
case 'left':
|
|
4777
|
+
return this.createGroupAtLocation([0]); // insert into first position
|
|
4778
|
+
case 'bottom':
|
|
4779
|
+
case 'right':
|
|
4780
|
+
return this.createGroupAtLocation([this.gridview.length]); // insert into last position
|
|
4781
|
+
default:
|
|
4782
|
+
throw new Error(`unsupported position ${position}`);
|
|
4444
4783
|
}
|
|
4445
|
-
return activeGroup.activePanel;
|
|
4446
|
-
}
|
|
4447
|
-
set tabHeight(height) {
|
|
4448
|
-
this.options.tabHeight = height;
|
|
4449
|
-
this._groups.forEach((value) => {
|
|
4450
|
-
value.value.model.header.height = height;
|
|
4451
|
-
});
|
|
4452
|
-
}
|
|
4453
|
-
get tabHeight() {
|
|
4454
|
-
return this.options.tabHeight;
|
|
4455
4784
|
}
|
|
4456
4785
|
updateOptions(options) {
|
|
4457
4786
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
@@ -4501,8 +4830,7 @@
|
|
|
4501
4830
|
options.group = this.activeGroup;
|
|
4502
4831
|
}
|
|
4503
4832
|
if (options.includePanel && options.group) {
|
|
4504
|
-
if (options.group.activePanel !==
|
|
4505
|
-
options.group.panels[0]) {
|
|
4833
|
+
if (options.group.activePanel !== options.group.panels[0]) {
|
|
4506
4834
|
options.group.model.moveToPrevious({ suppressRoll: true });
|
|
4507
4835
|
return;
|
|
4508
4836
|
}
|
|
@@ -4535,14 +4863,14 @@
|
|
|
4535
4863
|
fromJSON(data) {
|
|
4536
4864
|
this.clear();
|
|
4537
4865
|
if (!this.deserializer) {
|
|
4538
|
-
throw new Error('
|
|
4866
|
+
throw new Error('no deserializer provided');
|
|
4539
4867
|
}
|
|
4540
4868
|
const { grid, panels, options, activeGroup } = data;
|
|
4541
4869
|
if (typeof (options === null || options === void 0 ? void 0 : options.tabHeight) === 'number') {
|
|
4542
4870
|
this.tabHeight = options.tabHeight;
|
|
4543
4871
|
}
|
|
4544
|
-
if (!
|
|
4545
|
-
throw new Error('
|
|
4872
|
+
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
4873
|
+
throw new Error('root must be of type branch');
|
|
4546
4874
|
}
|
|
4547
4875
|
this.gridview.deserialize(grid, {
|
|
4548
4876
|
fromJSON: (node) => {
|
|
@@ -4555,19 +4883,20 @@
|
|
|
4555
4883
|
this._onDidAddGroup.fire(group);
|
|
4556
4884
|
for (const child of views) {
|
|
4557
4885
|
const panel = this.deserializer.fromJSON(panels[child], group);
|
|
4558
|
-
const isActive = typeof activeView === 'string' &&
|
|
4886
|
+
const isActive = typeof activeView === 'string' &&
|
|
4887
|
+
activeView === panel.id;
|
|
4559
4888
|
group.model.openPanel(panel, {
|
|
4560
4889
|
skipSetPanelActive: !isActive,
|
|
4561
|
-
skipSetGroupActive: true
|
|
4890
|
+
skipSetGroupActive: true,
|
|
4562
4891
|
});
|
|
4563
4892
|
}
|
|
4564
4893
|
if (!group.activePanel && group.panels.length > 0) {
|
|
4565
4894
|
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
4566
|
-
skipSetGroupActive: true
|
|
4895
|
+
skipSetGroupActive: true,
|
|
4567
4896
|
});
|
|
4568
4897
|
}
|
|
4569
4898
|
return group;
|
|
4570
|
-
}
|
|
4899
|
+
},
|
|
4571
4900
|
});
|
|
4572
4901
|
if (typeof activeGroup === 'string') {
|
|
4573
4902
|
const panel = this.getPanel(activeGroup);
|
|
@@ -4606,12 +4935,31 @@
|
|
|
4606
4935
|
throw new Error(`panel with id ${options.id} already exists`);
|
|
4607
4936
|
}
|
|
4608
4937
|
let referenceGroup;
|
|
4609
|
-
if (
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4938
|
+
if (options.position) {
|
|
4939
|
+
if (isPanelOptionsWithPanel(options.position)) {
|
|
4940
|
+
const referencePanel = typeof options.position.referencePanel === 'string'
|
|
4941
|
+
? this.getGroupPanel(options.position.referencePanel)
|
|
4942
|
+
: options.position.referencePanel;
|
|
4943
|
+
if (!referencePanel) {
|
|
4944
|
+
throw new Error(`referencePanel ${options.position.referencePanel} does not exist`);
|
|
4945
|
+
}
|
|
4946
|
+
referenceGroup = this.findGroup(referencePanel);
|
|
4947
|
+
}
|
|
4948
|
+
else if (isPanelOptionsWithGroup(options.position)) {
|
|
4949
|
+
referenceGroup =
|
|
4950
|
+
typeof options.position.referenceGroup === 'string'
|
|
4951
|
+
? (_a = this._groups.get(options.position.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
4952
|
+
: options.position.referenceGroup;
|
|
4953
|
+
if (!referenceGroup) {
|
|
4954
|
+
throw new Error(`referencePanel ${options.position.referenceGroup} does not exist`);
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
else {
|
|
4958
|
+
const group = this.orthogonalize(directionToPosition(options.position.direction));
|
|
4959
|
+
const panel = this.createPanel(options, group);
|
|
4960
|
+
group.model.openPanel(panel);
|
|
4961
|
+
return panel;
|
|
4613
4962
|
}
|
|
4614
|
-
referenceGroup = this.findGroup(referencePanel);
|
|
4615
4963
|
}
|
|
4616
4964
|
else {
|
|
4617
4965
|
referenceGroup = this.activeGroup;
|
|
@@ -4619,7 +4967,7 @@
|
|
|
4619
4967
|
let panel;
|
|
4620
4968
|
if (referenceGroup) {
|
|
4621
4969
|
const target = toTarget(((_b = options.position) === null || _b === void 0 ? void 0 : _b.direction) || 'within');
|
|
4622
|
-
if (target ===
|
|
4970
|
+
if (target === 'center') {
|
|
4623
4971
|
panel = this.createPanel(options, referenceGroup);
|
|
4624
4972
|
referenceGroup.model.openPanel(panel);
|
|
4625
4973
|
}
|
|
@@ -4648,10 +4996,7 @@
|
|
|
4648
4996
|
}
|
|
4649
4997
|
group.model.removePanel(panel);
|
|
4650
4998
|
panel.dispose();
|
|
4651
|
-
|
|
4652
|
-
if (!retainGroupForWatermark &&
|
|
4653
|
-
group.size === 0 &&
|
|
4654
|
-
options.removeEmptyGroup) {
|
|
4999
|
+
if (group.size === 0 && options.removeEmptyGroup) {
|
|
4655
5000
|
this.removeGroup(group);
|
|
4656
5001
|
}
|
|
4657
5002
|
}
|
|
@@ -4663,24 +5008,67 @@
|
|
|
4663
5008
|
? { 'watermark-name': this.options.watermarkFrameworkComponent }
|
|
4664
5009
|
: {}, (_a = this.options.frameworkComponentFactory) === null || _a === void 0 ? void 0 : _a.watermark);
|
|
4665
5010
|
}
|
|
4666
|
-
|
|
5011
|
+
updateWatermark() {
|
|
5012
|
+
if (this.groups.length === 0) {
|
|
5013
|
+
if (!this.watermark) {
|
|
5014
|
+
this.watermark = this.createWatermarkComponent();
|
|
5015
|
+
this.watermark.init({
|
|
5016
|
+
containerApi: new DockviewApi(this),
|
|
5017
|
+
params: {},
|
|
5018
|
+
title: '',
|
|
5019
|
+
api: null,
|
|
5020
|
+
});
|
|
5021
|
+
const watermarkContainer = document.createElement('div');
|
|
5022
|
+
watermarkContainer.className = 'dv-watermark-container';
|
|
5023
|
+
watermarkContainer.appendChild(this.watermark.element);
|
|
5024
|
+
this.element.appendChild(watermarkContainer);
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
else if (this.watermark) {
|
|
5028
|
+
this.watermark.element.parentElement.remove();
|
|
5029
|
+
this.watermark.dispose();
|
|
5030
|
+
this.watermark = null;
|
|
5031
|
+
}
|
|
5032
|
+
}
|
|
5033
|
+
addGroup(options) {
|
|
5034
|
+
var _a;
|
|
4667
5035
|
const group = this.createGroup();
|
|
4668
5036
|
if (options) {
|
|
4669
|
-
|
|
4670
|
-
if (
|
|
4671
|
-
|
|
5037
|
+
let referenceGroup;
|
|
5038
|
+
if (isGroupOptionsWithPanel(options)) {
|
|
5039
|
+
const referencePanel = typeof options.referencePanel === 'string'
|
|
5040
|
+
? this.panels.find((panel) => panel.id === options.referencePanel)
|
|
5041
|
+
: options.referencePanel;
|
|
5042
|
+
if (!referencePanel) {
|
|
5043
|
+
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
5044
|
+
}
|
|
5045
|
+
referenceGroup = this.findGroup(referencePanel);
|
|
5046
|
+
if (!referenceGroup) {
|
|
5047
|
+
throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
|
|
5048
|
+
}
|
|
4672
5049
|
}
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
5050
|
+
else if (isGroupOptionsWithGroup(options)) {
|
|
5051
|
+
referenceGroup =
|
|
5052
|
+
typeof options.referenceGroup === 'string'
|
|
5053
|
+
? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
5054
|
+
: options.referenceGroup;
|
|
5055
|
+
if (!referenceGroup) {
|
|
5056
|
+
throw new Error(`reference group ${options.referenceGroup} does not exist`);
|
|
5057
|
+
}
|
|
5058
|
+
}
|
|
5059
|
+
else {
|
|
5060
|
+
const group = this.orthogonalize(directionToPosition(options.direction));
|
|
5061
|
+
return group;
|
|
4676
5062
|
}
|
|
4677
5063
|
const target = toTarget(options.direction || 'within');
|
|
4678
5064
|
const location = getGridLocation(referenceGroup.element);
|
|
4679
5065
|
const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
4680
5066
|
this.doAddGroup(group, relativeLocation);
|
|
5067
|
+
return group;
|
|
4681
5068
|
}
|
|
4682
5069
|
else {
|
|
4683
5070
|
this.doAddGroup(group);
|
|
5071
|
+
return group;
|
|
4684
5072
|
}
|
|
4685
5073
|
}
|
|
4686
5074
|
removeGroup(group, skipActive = false) {
|
|
@@ -4698,7 +5086,13 @@
|
|
|
4698
5086
|
const sourceGroup = groupId
|
|
4699
5087
|
? (_a = this._groups.get(groupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
4700
5088
|
: undefined;
|
|
4701
|
-
if (
|
|
5089
|
+
if (itemId === undefined) {
|
|
5090
|
+
if (sourceGroup) {
|
|
5091
|
+
this.moveGroup(sourceGroup, referenceGroup, target);
|
|
5092
|
+
}
|
|
5093
|
+
return;
|
|
5094
|
+
}
|
|
5095
|
+
if (!target || target === 'center') {
|
|
4702
5096
|
const groupItem = (sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.removePanel(itemId)) ||
|
|
4703
5097
|
this.panels.find((panel) => panel.id === itemId);
|
|
4704
5098
|
if (!groupItem) {
|
|
@@ -4746,6 +5140,28 @@
|
|
|
4746
5140
|
}
|
|
4747
5141
|
}
|
|
4748
5142
|
}
|
|
5143
|
+
moveGroup(sourceGroup, referenceGroup, target) {
|
|
5144
|
+
if (sourceGroup) {
|
|
5145
|
+
if (!target || target === 'center') {
|
|
5146
|
+
const activePanel = sourceGroup.activePanel;
|
|
5147
|
+
const panels = [...sourceGroup.panels].map((p) => sourceGroup.model.removePanel(p.id));
|
|
5148
|
+
if ((sourceGroup === null || sourceGroup === void 0 ? void 0 : sourceGroup.model.size) === 0) {
|
|
5149
|
+
this.doRemoveGroup(sourceGroup);
|
|
5150
|
+
}
|
|
5151
|
+
for (const panel of panels) {
|
|
5152
|
+
referenceGroup.model.openPanel(panel, {
|
|
5153
|
+
skipSetPanelActive: panel !== activePanel,
|
|
5154
|
+
});
|
|
5155
|
+
}
|
|
5156
|
+
}
|
|
5157
|
+
else {
|
|
5158
|
+
this.gridview.removeView(getGridLocation(sourceGroup.element));
|
|
5159
|
+
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
5160
|
+
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
5161
|
+
this.gridview.addView(sourceGroup, exports.Sizing.Distribute, dropLocation);
|
|
5162
|
+
}
|
|
5163
|
+
}
|
|
5164
|
+
}
|
|
4749
5165
|
doSetGroupActive(group, skipFocus) {
|
|
4750
5166
|
var _a, _b;
|
|
4751
5167
|
const isGroupAlreadyFocused = this._activeGroup === group;
|
|
@@ -4767,9 +5183,9 @@
|
|
|
4767
5183
|
id = undefined;
|
|
4768
5184
|
}
|
|
4769
5185
|
if (!id) {
|
|
4770
|
-
id = nextGroupId.next();
|
|
5186
|
+
id = this.nextGroupId.next();
|
|
4771
5187
|
while (this._groups.has(id)) {
|
|
4772
|
-
id = nextGroupId.next();
|
|
5188
|
+
id = this.nextGroupId.next();
|
|
4773
5189
|
}
|
|
4774
5190
|
}
|
|
4775
5191
|
const view = new GroupPanel(this, id, options);
|
|
@@ -4802,7 +5218,7 @@
|
|
|
4802
5218
|
content: this.createContentComponent(options.id, options.component),
|
|
4803
5219
|
tab: this.createTabComponent(options.id, options.tabComponent || this.options.defaultTabComponent),
|
|
4804
5220
|
});
|
|
4805
|
-
const panel = new
|
|
5221
|
+
const panel = new DockviewPanel(options.id, this, this._api, group);
|
|
4806
5222
|
panel.init({
|
|
4807
5223
|
view,
|
|
4808
5224
|
title: options.title || options.id,
|
|
@@ -4837,6 +5253,21 @@
|
|
|
4837
5253
|
}
|
|
4838
5254
|
|
|
4839
5255
|
class GridviewComponent extends BaseGrid {
|
|
5256
|
+
get orientation() {
|
|
5257
|
+
return this.gridview.orientation;
|
|
5258
|
+
}
|
|
5259
|
+
set orientation(value) {
|
|
5260
|
+
this.gridview.orientation = value;
|
|
5261
|
+
}
|
|
5262
|
+
get options() {
|
|
5263
|
+
return this._options;
|
|
5264
|
+
}
|
|
5265
|
+
get deserializer() {
|
|
5266
|
+
return this._deserializer;
|
|
5267
|
+
}
|
|
5268
|
+
set deserializer(value) {
|
|
5269
|
+
this._deserializer = value;
|
|
5270
|
+
}
|
|
4840
5271
|
constructor(element, options) {
|
|
4841
5272
|
super(element, {
|
|
4842
5273
|
proportionalLayout: options.proportionalLayout,
|
|
@@ -4853,21 +5284,6 @@
|
|
|
4853
5284
|
this.options.frameworkComponents = {};
|
|
4854
5285
|
}
|
|
4855
5286
|
}
|
|
4856
|
-
get orientation() {
|
|
4857
|
-
return this.gridview.orientation;
|
|
4858
|
-
}
|
|
4859
|
-
set orientation(value) {
|
|
4860
|
-
this.gridview.orientation = value;
|
|
4861
|
-
}
|
|
4862
|
-
get options() {
|
|
4863
|
-
return this._options;
|
|
4864
|
-
}
|
|
4865
|
-
get deserializer() {
|
|
4866
|
-
return this._deserializer;
|
|
4867
|
-
}
|
|
4868
|
-
set deserializer(value) {
|
|
4869
|
-
this._deserializer = value;
|
|
4870
|
-
}
|
|
4871
5287
|
updateOptions(options) {
|
|
4872
5288
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
4873
5289
|
this.gridview.orientation !== options.orientation;
|
|
@@ -4965,7 +5381,7 @@
|
|
|
4965
5381
|
throw new Error(`reference group ${options.reference} does not exist`);
|
|
4966
5382
|
}
|
|
4967
5383
|
const target = toTarget(options.direction);
|
|
4968
|
-
if (target ===
|
|
5384
|
+
if (target === 'center') {
|
|
4969
5385
|
throw new Error(`${target} not supported as an option`);
|
|
4970
5386
|
}
|
|
4971
5387
|
else {
|
|
@@ -4983,7 +5399,7 @@
|
|
|
4983
5399
|
throw new Error(`reference group ${options.position.referencePanel} does not exist`);
|
|
4984
5400
|
}
|
|
4985
5401
|
const target = toTarget(options.position.direction);
|
|
4986
|
-
if (target ===
|
|
5402
|
+
if (target === 'center') {
|
|
4987
5403
|
throw new Error(`${target} not supported as an option`);
|
|
4988
5404
|
}
|
|
4989
5405
|
else {
|
|
@@ -5072,29 +5488,6 @@
|
|
|
5072
5488
|
* A high-level implementation of splitview that works using 'panels'
|
|
5073
5489
|
*/
|
|
5074
5490
|
class SplitviewComponent extends CompositeDisposable {
|
|
5075
|
-
constructor(element, options) {
|
|
5076
|
-
super();
|
|
5077
|
-
this.element = element;
|
|
5078
|
-
this._disposable = new MutableDisposable();
|
|
5079
|
-
this._panels = new Map();
|
|
5080
|
-
this._onDidLayoutfromJSON = new Emitter();
|
|
5081
|
-
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5082
|
-
this._onDidAddView = new Emitter();
|
|
5083
|
-
this.onDidAddView = this._onDidAddView.event;
|
|
5084
|
-
this._onDidRemoveView = new Emitter();
|
|
5085
|
-
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5086
|
-
this._onDidLayoutChange = new Emitter();
|
|
5087
|
-
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5088
|
-
this._options = options;
|
|
5089
|
-
if (!options.components) {
|
|
5090
|
-
options.components = {};
|
|
5091
|
-
}
|
|
5092
|
-
if (!options.frameworkComponents) {
|
|
5093
|
-
options.frameworkComponents = {};
|
|
5094
|
-
}
|
|
5095
|
-
this.splitview = new Splitview(this.element, options);
|
|
5096
|
-
this.addDisposables(this._disposable, this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5097
|
-
}
|
|
5098
5491
|
get panels() {
|
|
5099
5492
|
return this.splitview.getViews();
|
|
5100
5493
|
}
|
|
@@ -5132,6 +5525,29 @@
|
|
|
5132
5525
|
? this.splitview.size
|
|
5133
5526
|
: this.splitview.orthogonalSize;
|
|
5134
5527
|
}
|
|
5528
|
+
constructor(element, options) {
|
|
5529
|
+
super();
|
|
5530
|
+
this.element = element;
|
|
5531
|
+
this._disposable = new MutableDisposable();
|
|
5532
|
+
this._panels = new Map();
|
|
5533
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
5534
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5535
|
+
this._onDidAddView = new Emitter();
|
|
5536
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
5537
|
+
this._onDidRemoveView = new Emitter();
|
|
5538
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5539
|
+
this._onDidLayoutChange = new Emitter();
|
|
5540
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5541
|
+
this._options = options;
|
|
5542
|
+
if (!options.components) {
|
|
5543
|
+
options.components = {};
|
|
5544
|
+
}
|
|
5545
|
+
if (!options.frameworkComponents) {
|
|
5546
|
+
options.frameworkComponents = {};
|
|
5547
|
+
}
|
|
5548
|
+
this.splitview = new Splitview(this.element, options);
|
|
5549
|
+
this.addDisposables(this._disposable, this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
5550
|
+
}
|
|
5135
5551
|
updateOptions(options) {
|
|
5136
5552
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
5137
5553
|
this.options.orientation !== options.orientation;
|
|
@@ -5333,38 +5749,85 @@
|
|
|
5333
5749
|
setConstraints(value) {
|
|
5334
5750
|
this._onDidConstraintsChangeInternal.fire(value);
|
|
5335
5751
|
}
|
|
5336
|
-
setSize(event) {
|
|
5337
|
-
this._onDidSizeChange.fire(event);
|
|
5752
|
+
setSize(event) {
|
|
5753
|
+
this._onDidSizeChange.fire(event);
|
|
5754
|
+
}
|
|
5755
|
+
}
|
|
5756
|
+
|
|
5757
|
+
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
5758
|
+
set pane(pane) {
|
|
5759
|
+
this._pane = pane;
|
|
5760
|
+
}
|
|
5761
|
+
constructor(id) {
|
|
5762
|
+
super(id);
|
|
5763
|
+
this._onDidExpansionChange = new Emitter({
|
|
5764
|
+
replay: true,
|
|
5765
|
+
});
|
|
5766
|
+
this.onDidExpansionChange = this._onDidExpansionChange.event;
|
|
5767
|
+
this._onMouseEnter = new Emitter({});
|
|
5768
|
+
this.onMouseEnter = this._onMouseEnter.event;
|
|
5769
|
+
this._onMouseLeave = new Emitter({});
|
|
5770
|
+
this.onMouseLeave = this._onMouseLeave.event;
|
|
5771
|
+
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5772
|
+
}
|
|
5773
|
+
setExpanded(isExpanded) {
|
|
5774
|
+
var _a;
|
|
5775
|
+
(_a = this._pane) === null || _a === void 0 ? void 0 : _a.setExpanded(isExpanded);
|
|
5776
|
+
}
|
|
5777
|
+
get isExpanded() {
|
|
5778
|
+
var _a;
|
|
5779
|
+
return !!((_a = this._pane) === null || _a === void 0 ? void 0 : _a.isExpanded());
|
|
5780
|
+
}
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5783
|
+
class PaneviewPanel extends BasePanelView {
|
|
5784
|
+
set orientation(value) {
|
|
5785
|
+
this._orientation = value;
|
|
5786
|
+
}
|
|
5787
|
+
get orientation() {
|
|
5788
|
+
return this._orientation;
|
|
5789
|
+
}
|
|
5790
|
+
get minimumSize() {
|
|
5791
|
+
const headerSize = this.headerSize;
|
|
5792
|
+
const expanded = this.isExpanded();
|
|
5793
|
+
const minimumBodySize = expanded ? this._minimumBodySize : 0;
|
|
5794
|
+
return headerSize + minimumBodySize;
|
|
5795
|
+
}
|
|
5796
|
+
get maximumSize() {
|
|
5797
|
+
const headerSize = this.headerSize;
|
|
5798
|
+
const expanded = this.isExpanded();
|
|
5799
|
+
const maximumBodySize = expanded ? this._maximumBodySize : 0;
|
|
5800
|
+
return headerSize + maximumBodySize;
|
|
5801
|
+
}
|
|
5802
|
+
get size() {
|
|
5803
|
+
return this._size;
|
|
5804
|
+
}
|
|
5805
|
+
get orthogonalSize() {
|
|
5806
|
+
return this._orthogonalSize;
|
|
5807
|
+
}
|
|
5808
|
+
set orthogonalSize(size) {
|
|
5809
|
+
this._orthogonalSize = size;
|
|
5810
|
+
}
|
|
5811
|
+
get minimumBodySize() {
|
|
5812
|
+
return this._minimumBodySize;
|
|
5813
|
+
}
|
|
5814
|
+
set minimumBodySize(value) {
|
|
5815
|
+
this._minimumBodySize = typeof value === 'number' ? value : 0;
|
|
5338
5816
|
}
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
5342
|
-
constructor(id) {
|
|
5343
|
-
super(id);
|
|
5344
|
-
this._onDidExpansionChange = new Emitter({
|
|
5345
|
-
replay: true,
|
|
5346
|
-
});
|
|
5347
|
-
this.onDidExpansionChange = this._onDidExpansionChange.event;
|
|
5348
|
-
this._onMouseEnter = new Emitter({});
|
|
5349
|
-
this.onMouseEnter = this._onMouseEnter.event;
|
|
5350
|
-
this._onMouseLeave = new Emitter({});
|
|
5351
|
-
this.onMouseLeave = this._onMouseLeave.event;
|
|
5352
|
-
this.addDisposables(this._onDidExpansionChange, this._onMouseEnter, this._onMouseLeave);
|
|
5817
|
+
get maximumBodySize() {
|
|
5818
|
+
return this._maximumBodySize;
|
|
5353
5819
|
}
|
|
5354
|
-
set
|
|
5355
|
-
this.
|
|
5820
|
+
set maximumBodySize(value) {
|
|
5821
|
+
this._maximumBodySize =
|
|
5822
|
+
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
5356
5823
|
}
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
(_a = this._pane) === null || _a === void 0 ? void 0 : _a.setExpanded(isExpanded);
|
|
5824
|
+
get headerVisible() {
|
|
5825
|
+
return this._headerVisible;
|
|
5360
5826
|
}
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5827
|
+
set headerVisible(value) {
|
|
5828
|
+
this._headerVisible = value;
|
|
5829
|
+
this.header.style.display = value ? '' : 'none';
|
|
5364
5830
|
}
|
|
5365
|
-
}
|
|
5366
|
-
|
|
5367
|
-
class PaneviewPanel extends BasePanelView {
|
|
5368
5831
|
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5369
5832
|
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5370
5833
|
this.headerComponent = headerComponent;
|
|
@@ -5380,6 +5843,7 @@
|
|
|
5380
5843
|
this._isExpanded = false;
|
|
5381
5844
|
this.expandedSize = 0;
|
|
5382
5845
|
this.api.pane = this; // TODO cannot use 'this' before 'super'
|
|
5846
|
+
this.api.initialize(this);
|
|
5383
5847
|
this._isExpanded = isExpanded;
|
|
5384
5848
|
this._headerVisible = isHeaderVisible;
|
|
5385
5849
|
this._onDidChangeExpansionState.fire(this.isExpanded()); // initialize value
|
|
@@ -5409,53 +5873,6 @@
|
|
|
5409
5873
|
}));
|
|
5410
5874
|
this.renderOnce();
|
|
5411
5875
|
}
|
|
5412
|
-
set orientation(value) {
|
|
5413
|
-
this._orientation = value;
|
|
5414
|
-
}
|
|
5415
|
-
get orientation() {
|
|
5416
|
-
return this._orientation;
|
|
5417
|
-
}
|
|
5418
|
-
get minimumSize() {
|
|
5419
|
-
const headerSize = this.headerSize;
|
|
5420
|
-
const expanded = this.isExpanded();
|
|
5421
|
-
const minimumBodySize = expanded ? this._minimumBodySize : 0;
|
|
5422
|
-
return headerSize + minimumBodySize;
|
|
5423
|
-
}
|
|
5424
|
-
get maximumSize() {
|
|
5425
|
-
const headerSize = this.headerSize;
|
|
5426
|
-
const expanded = this.isExpanded();
|
|
5427
|
-
const maximumBodySize = expanded ? this._maximumBodySize : 0;
|
|
5428
|
-
return headerSize + maximumBodySize;
|
|
5429
|
-
}
|
|
5430
|
-
get size() {
|
|
5431
|
-
return this._size;
|
|
5432
|
-
}
|
|
5433
|
-
get orthogonalSize() {
|
|
5434
|
-
return this._orthogonalSize;
|
|
5435
|
-
}
|
|
5436
|
-
set orthogonalSize(size) {
|
|
5437
|
-
this._orthogonalSize = size;
|
|
5438
|
-
}
|
|
5439
|
-
get minimumBodySize() {
|
|
5440
|
-
return this._minimumBodySize;
|
|
5441
|
-
}
|
|
5442
|
-
set minimumBodySize(value) {
|
|
5443
|
-
this._minimumBodySize = typeof value === 'number' ? value : 0;
|
|
5444
|
-
}
|
|
5445
|
-
get maximumBodySize() {
|
|
5446
|
-
return this._maximumBodySize;
|
|
5447
|
-
}
|
|
5448
|
-
set maximumBodySize(value) {
|
|
5449
|
-
this._maximumBodySize =
|
|
5450
|
-
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
5451
|
-
}
|
|
5452
|
-
get headerVisible() {
|
|
5453
|
-
return this._headerVisible;
|
|
5454
|
-
}
|
|
5455
|
-
set headerVisible(value) {
|
|
5456
|
-
this._headerVisible = value;
|
|
5457
|
-
this.header.style.display = value ? '' : 'none';
|
|
5458
|
-
}
|
|
5459
5876
|
setVisible(isVisible) {
|
|
5460
5877
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
5461
5878
|
}
|
|
@@ -5579,7 +5996,10 @@
|
|
|
5579
5996
|
}
|
|
5580
5997
|
})(this.header);
|
|
5581
5998
|
this.target = new Droptarget(this.element, {
|
|
5582
|
-
|
|
5999
|
+
acceptedTargetZones: ['top', 'bottom'],
|
|
6000
|
+
overlayModel: {
|
|
6001
|
+
activationSize: { type: 'percentage', value: 50 },
|
|
6002
|
+
},
|
|
5583
6003
|
canDisplayOverlay: (event) => {
|
|
5584
6004
|
const data = getPaneData();
|
|
5585
6005
|
if (data) {
|
|
@@ -5622,12 +6042,10 @@
|
|
|
5622
6042
|
const allPanels = containerApi.panels;
|
|
5623
6043
|
const fromIndex = allPanels.indexOf(existingPanel);
|
|
5624
6044
|
let toIndex = containerApi.panels.indexOf(this);
|
|
5625
|
-
if (event.position ===
|
|
5626
|
-
event.position === exports.Position.Top) {
|
|
6045
|
+
if (event.position === 'left' || event.position === 'top') {
|
|
5627
6046
|
toIndex = Math.max(0, toIndex - 1);
|
|
5628
6047
|
}
|
|
5629
|
-
if (event.position ===
|
|
5630
|
-
event.position === exports.Position.Bottom) {
|
|
6048
|
+
if (event.position === 'right' || event.position === 'bottom') {
|
|
5631
6049
|
if (fromIndex > toIndex) {
|
|
5632
6050
|
toIndex++;
|
|
5633
6051
|
}
|
|
@@ -5638,6 +6056,9 @@
|
|
|
5638
6056
|
}
|
|
5639
6057
|
|
|
5640
6058
|
class DefaultHeader extends CompositeDisposable {
|
|
6059
|
+
get element() {
|
|
6060
|
+
return this._element;
|
|
6061
|
+
}
|
|
5641
6062
|
constructor() {
|
|
5642
6063
|
super();
|
|
5643
6064
|
this._expandedIcon = createExpandMoreButton();
|
|
@@ -5656,9 +6077,6 @@
|
|
|
5656
6077
|
(_a = this.apiRef.api) === null || _a === void 0 ? void 0 : _a.setExpanded(!this.apiRef.api.isExpanded);
|
|
5657
6078
|
}));
|
|
5658
6079
|
}
|
|
5659
|
-
get element() {
|
|
5660
|
-
return this._element;
|
|
5661
|
-
}
|
|
5662
6080
|
init(params) {
|
|
5663
6081
|
this.apiRef.api = params.api;
|
|
5664
6082
|
this._content.textContent = params.title;
|
|
@@ -5711,36 +6129,6 @@
|
|
|
5711
6129
|
}
|
|
5712
6130
|
}
|
|
5713
6131
|
class PaneviewComponent extends CompositeDisposable {
|
|
5714
|
-
constructor(element, options) {
|
|
5715
|
-
super();
|
|
5716
|
-
this.element = element;
|
|
5717
|
-
this._id = nextLayoutId.next();
|
|
5718
|
-
this._disposable = new MutableDisposable();
|
|
5719
|
-
this._viewDisposables = new Map();
|
|
5720
|
-
this._onDidLayoutfromJSON = new Emitter();
|
|
5721
|
-
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
5722
|
-
this._onDidLayoutChange = new Emitter();
|
|
5723
|
-
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
5724
|
-
this._onDidDrop = new Emitter();
|
|
5725
|
-
this.onDidDrop = this._onDidDrop.event;
|
|
5726
|
-
this._onDidAddView = new Emitter();
|
|
5727
|
-
this.onDidAddView = this._onDidAddView.event;
|
|
5728
|
-
this._onDidRemoveView = new Emitter();
|
|
5729
|
-
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
5730
|
-
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
5731
|
-
this._options = options;
|
|
5732
|
-
if (!options.components) {
|
|
5733
|
-
options.components = {};
|
|
5734
|
-
}
|
|
5735
|
-
if (!options.frameworkComponents) {
|
|
5736
|
-
options.frameworkComponents = {};
|
|
5737
|
-
}
|
|
5738
|
-
this.paneview = new Paneview(this.element, {
|
|
5739
|
-
// only allow paneview in the vertical orientation for now
|
|
5740
|
-
orientation: exports.Orientation.VERTICAL,
|
|
5741
|
-
});
|
|
5742
|
-
this.addDisposables(this._disposable);
|
|
5743
|
-
}
|
|
5744
6132
|
get id() {
|
|
5745
6133
|
return this._id;
|
|
5746
6134
|
}
|
|
@@ -5775,6 +6163,36 @@
|
|
|
5775
6163
|
get options() {
|
|
5776
6164
|
return this._options;
|
|
5777
6165
|
}
|
|
6166
|
+
constructor(element, options) {
|
|
6167
|
+
super();
|
|
6168
|
+
this.element = element;
|
|
6169
|
+
this._id = nextLayoutId.next();
|
|
6170
|
+
this._disposable = new MutableDisposable();
|
|
6171
|
+
this._viewDisposables = new Map();
|
|
6172
|
+
this._onDidLayoutfromJSON = new Emitter();
|
|
6173
|
+
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
6174
|
+
this._onDidLayoutChange = new Emitter();
|
|
6175
|
+
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
6176
|
+
this._onDidDrop = new Emitter();
|
|
6177
|
+
this.onDidDrop = this._onDidDrop.event;
|
|
6178
|
+
this._onDidAddView = new Emitter();
|
|
6179
|
+
this.onDidAddView = this._onDidAddView.event;
|
|
6180
|
+
this._onDidRemoveView = new Emitter();
|
|
6181
|
+
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
6182
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
6183
|
+
this._options = options;
|
|
6184
|
+
if (!options.components) {
|
|
6185
|
+
options.components = {};
|
|
6186
|
+
}
|
|
6187
|
+
if (!options.frameworkComponents) {
|
|
6188
|
+
options.frameworkComponents = {};
|
|
6189
|
+
}
|
|
6190
|
+
this.paneview = new Paneview(this.element, {
|
|
6191
|
+
// only allow paneview in the vertical orientation for now
|
|
6192
|
+
orientation: exports.Orientation.VERTICAL,
|
|
6193
|
+
});
|
|
6194
|
+
this.addDisposables(this._disposable);
|
|
6195
|
+
}
|
|
5778
6196
|
focus() {
|
|
5779
6197
|
//
|
|
5780
6198
|
}
|
|
@@ -5960,36 +6378,6 @@
|
|
|
5960
6378
|
}
|
|
5961
6379
|
|
|
5962
6380
|
class SplitviewPanel extends BasePanelView {
|
|
5963
|
-
constructor(id, componentName) {
|
|
5964
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
5965
|
-
this._evaluatedMinimumSize = 0;
|
|
5966
|
-
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
5967
|
-
this._minimumSize = 0;
|
|
5968
|
-
this._maximumSize = Number.POSITIVE_INFINITY;
|
|
5969
|
-
this._snap = false;
|
|
5970
|
-
this._onDidChange = new Emitter();
|
|
5971
|
-
this.onDidChange = this._onDidChange.event;
|
|
5972
|
-
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
5973
|
-
const { isVisible } = event;
|
|
5974
|
-
const { accessor } = this._params;
|
|
5975
|
-
accessor.setVisible(this, isVisible);
|
|
5976
|
-
}), this.api.onActiveChange(() => {
|
|
5977
|
-
const { accessor } = this._params;
|
|
5978
|
-
accessor.setActive(this);
|
|
5979
|
-
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
5980
|
-
if (typeof event.minimumSize === 'number' ||
|
|
5981
|
-
typeof event.minimumSize === 'function') {
|
|
5982
|
-
this._minimumSize = event.minimumSize;
|
|
5983
|
-
}
|
|
5984
|
-
if (typeof event.maximumSize === 'number' ||
|
|
5985
|
-
typeof event.maximumSize === 'function') {
|
|
5986
|
-
this._maximumSize = event.maximumSize;
|
|
5987
|
-
}
|
|
5988
|
-
this.updateConstraints();
|
|
5989
|
-
}), this.api.onDidSizeChange((event) => {
|
|
5990
|
-
this._onDidChange.fire({ size: event.size });
|
|
5991
|
-
}));
|
|
5992
|
-
}
|
|
5993
6381
|
get priority() {
|
|
5994
6382
|
return this._priority;
|
|
5995
6383
|
}
|
|
@@ -6022,6 +6410,37 @@
|
|
|
6022
6410
|
get snap() {
|
|
6023
6411
|
return this._snap;
|
|
6024
6412
|
}
|
|
6413
|
+
constructor(id, componentName) {
|
|
6414
|
+
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
6415
|
+
this._evaluatedMinimumSize = 0;
|
|
6416
|
+
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
6417
|
+
this._minimumSize = 0;
|
|
6418
|
+
this._maximumSize = Number.POSITIVE_INFINITY;
|
|
6419
|
+
this._snap = false;
|
|
6420
|
+
this._onDidChange = new Emitter();
|
|
6421
|
+
this.onDidChange = this._onDidChange.event;
|
|
6422
|
+
this.api.initialize(this);
|
|
6423
|
+
this.addDisposables(this._onDidChange, this.api.onVisibilityChange((event) => {
|
|
6424
|
+
const { isVisible } = event;
|
|
6425
|
+
const { accessor } = this._params;
|
|
6426
|
+
accessor.setVisible(this, isVisible);
|
|
6427
|
+
}), this.api.onActiveChange(() => {
|
|
6428
|
+
const { accessor } = this._params;
|
|
6429
|
+
accessor.setActive(this);
|
|
6430
|
+
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6431
|
+
if (typeof event.minimumSize === 'number' ||
|
|
6432
|
+
typeof event.minimumSize === 'function') {
|
|
6433
|
+
this._minimumSize = event.minimumSize;
|
|
6434
|
+
}
|
|
6435
|
+
if (typeof event.maximumSize === 'number' ||
|
|
6436
|
+
typeof event.maximumSize === 'function') {
|
|
6437
|
+
this._maximumSize = event.maximumSize;
|
|
6438
|
+
}
|
|
6439
|
+
this.updateConstraints();
|
|
6440
|
+
}), this.api.onDidSizeChange((event) => {
|
|
6441
|
+
this._onDidChange.fire({ size: event.size });
|
|
6442
|
+
}));
|
|
6443
|
+
}
|
|
6025
6444
|
setVisible(isVisible) {
|
|
6026
6445
|
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
6027
6446
|
}
|
|
@@ -6187,6 +6606,9 @@
|
|
|
6187
6606
|
}
|
|
6188
6607
|
|
|
6189
6608
|
class ReactPanelContentPart {
|
|
6609
|
+
get element() {
|
|
6610
|
+
return this._element;
|
|
6611
|
+
}
|
|
6190
6612
|
constructor(id, component, reactPortalStore) {
|
|
6191
6613
|
this.id = id;
|
|
6192
6614
|
this.component = component;
|
|
@@ -6198,9 +6620,6 @@
|
|
|
6198
6620
|
this._element = document.createElement('div');
|
|
6199
6621
|
this._element.className = 'dockview-react-part';
|
|
6200
6622
|
}
|
|
6201
|
-
get element() {
|
|
6202
|
-
return this._element;
|
|
6203
|
-
}
|
|
6204
6623
|
focus() {
|
|
6205
6624
|
// TODO
|
|
6206
6625
|
}
|
|
@@ -6235,6 +6654,9 @@
|
|
|
6235
6654
|
}
|
|
6236
6655
|
|
|
6237
6656
|
class ReactPanelHeaderPart {
|
|
6657
|
+
get element() {
|
|
6658
|
+
return this._element;
|
|
6659
|
+
}
|
|
6238
6660
|
constructor(id, component, reactPortalStore) {
|
|
6239
6661
|
this.id = id;
|
|
6240
6662
|
this.component = component;
|
|
@@ -6242,9 +6664,6 @@
|
|
|
6242
6664
|
this._element = document.createElement('div');
|
|
6243
6665
|
this._element.className = 'dockview-react-part';
|
|
6244
6666
|
}
|
|
6245
|
-
get element() {
|
|
6246
|
-
return this._element;
|
|
6247
|
-
}
|
|
6248
6667
|
focus() {
|
|
6249
6668
|
//noop
|
|
6250
6669
|
}
|
|
@@ -6303,7 +6722,7 @@
|
|
|
6303
6722
|
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),
|
|
6304
6723
|
tab,
|
|
6305
6724
|
});
|
|
6306
|
-
const panel = new
|
|
6725
|
+
const panel = new DockviewPanel(panelId, this.layout, new DockviewApi(this.layout), group);
|
|
6307
6726
|
panel.init({
|
|
6308
6727
|
view,
|
|
6309
6728
|
title,
|
|
@@ -6314,6 +6733,9 @@
|
|
|
6314
6733
|
}
|
|
6315
6734
|
|
|
6316
6735
|
class ReactWatermarkPart {
|
|
6736
|
+
get element() {
|
|
6737
|
+
return this._element;
|
|
6738
|
+
}
|
|
6317
6739
|
constructor(id, component, reactPortalStore) {
|
|
6318
6740
|
this.id = id;
|
|
6319
6741
|
this.component = component;
|
|
@@ -6324,9 +6746,6 @@
|
|
|
6324
6746
|
this._element = document.createElement('div');
|
|
6325
6747
|
this._element.className = 'dockview-react-part';
|
|
6326
6748
|
}
|
|
6327
|
-
get element() {
|
|
6328
|
-
return this._element;
|
|
6329
|
-
}
|
|
6330
6749
|
init(parameters) {
|
|
6331
6750
|
this.parameters = parameters;
|
|
6332
6751
|
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
@@ -6369,14 +6788,6 @@
|
|
|
6369
6788
|
}
|
|
6370
6789
|
|
|
6371
6790
|
class ReactGroupControlsRendererPart {
|
|
6372
|
-
constructor(component, reactPortalStore, _group) {
|
|
6373
|
-
this.component = component;
|
|
6374
|
-
this.reactPortalStore = reactPortalStore;
|
|
6375
|
-
this._group = _group;
|
|
6376
|
-
this.mutableDisposable = new MutableDisposable();
|
|
6377
|
-
this._element = document.createElement('div');
|
|
6378
|
-
this._element.className = 'dockview-react-part';
|
|
6379
|
-
}
|
|
6380
6791
|
get element() {
|
|
6381
6792
|
return this._element;
|
|
6382
6793
|
}
|
|
@@ -6386,6 +6797,14 @@
|
|
|
6386
6797
|
get group() {
|
|
6387
6798
|
return this._group;
|
|
6388
6799
|
}
|
|
6800
|
+
constructor(component, reactPortalStore, _group) {
|
|
6801
|
+
this.component = component;
|
|
6802
|
+
this.reactPortalStore = reactPortalStore;
|
|
6803
|
+
this._group = _group;
|
|
6804
|
+
this.mutableDisposable = new MutableDisposable();
|
|
6805
|
+
this._element = document.createElement('div');
|
|
6806
|
+
this._element.className = 'dockview-react-part';
|
|
6807
|
+
}
|
|
6389
6808
|
focus() {
|
|
6390
6809
|
// TODO
|
|
6391
6810
|
}
|
|
@@ -6500,6 +6919,7 @@
|
|
|
6500
6919
|
: undefined,
|
|
6501
6920
|
showDndOverlay: props.showDndOverlay,
|
|
6502
6921
|
createGroupControlElement: createGroupControlElement(props.groupControlComponent, { addPortal }),
|
|
6922
|
+
singleTabMode: props.singleTabMode,
|
|
6503
6923
|
});
|
|
6504
6924
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(dockview.element);
|
|
6505
6925
|
dockview.deserializer = new ReactPanelDeserialzier(dockview);
|
|
@@ -6712,7 +7132,7 @@
|
|
|
6712
7132
|
|
|
6713
7133
|
class ReactGridPanelView extends GridviewPanel {
|
|
6714
7134
|
constructor(id, component, reactComponent, reactPortalStore) {
|
|
6715
|
-
super(id, component);
|
|
7135
|
+
super(id, component, new GridviewPanelApiImpl(id));
|
|
6716
7136
|
this.reactComponent = reactComponent;
|
|
6717
7137
|
this.reactPortalStore = reactPortalStore;
|
|
6718
7138
|
}
|
|
@@ -6791,6 +7211,9 @@
|
|
|
6791
7211
|
GridviewReact.displayName = 'GridviewComponent';
|
|
6792
7212
|
|
|
6793
7213
|
class PanePanelSection {
|
|
7214
|
+
get element() {
|
|
7215
|
+
return this._element;
|
|
7216
|
+
}
|
|
6794
7217
|
constructor(id, component, reactPortalStore) {
|
|
6795
7218
|
this.id = id;
|
|
6796
7219
|
this.component = component;
|
|
@@ -6799,9 +7222,6 @@
|
|
|
6799
7222
|
this._element.style.height = '100%';
|
|
6800
7223
|
this._element.style.width = '100%';
|
|
6801
7224
|
}
|
|
6802
|
-
get element() {
|
|
6803
|
-
return this._element;
|
|
6804
|
-
}
|
|
6805
7225
|
init(parameters) {
|
|
6806
7226
|
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
6807
7227
|
params: parameters.params,
|
|
@@ -6949,6 +7369,7 @@
|
|
|
6949
7369
|
exports.SplitviewPanel = SplitviewPanel;
|
|
6950
7370
|
exports.SplitviewReact = SplitviewReact;
|
|
6951
7371
|
exports.Tab = Tab;
|
|
7372
|
+
exports.directionToPosition = directionToPosition;
|
|
6952
7373
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
6953
7374
|
exports.getGridLocation = getGridLocation;
|
|
6954
7375
|
exports.getLocationOrientation = getLocationOrientation;
|
|
@@ -6957,11 +7378,14 @@
|
|
|
6957
7378
|
exports.getRelativeLocation = getRelativeLocation;
|
|
6958
7379
|
exports.indexInParent = indexInParent;
|
|
6959
7380
|
exports.isGridBranchNode = isGridBranchNode;
|
|
7381
|
+
exports.isGroupOptionsWithGroup = isGroupOptionsWithGroup;
|
|
7382
|
+
exports.isGroupOptionsWithPanel = isGroupOptionsWithPanel;
|
|
7383
|
+
exports.isPanelOptionsWithGroup = isPanelOptionsWithGroup;
|
|
7384
|
+
exports.isPanelOptionsWithPanel = isPanelOptionsWithPanel;
|
|
6960
7385
|
exports.isReactElement = isReactElement;
|
|
6961
7386
|
exports.orthogonal = orthogonal;
|
|
7387
|
+
exports.positionToDirection = positionToDirection;
|
|
6962
7388
|
exports.toTarget = toTarget;
|
|
6963
7389
|
exports.usePortalsLifecycle = usePortalsLifecycle;
|
|
6964
7390
|
|
|
6965
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6966
|
-
|
|
6967
7391
|
}));
|