dockview-core 1.15.2 → 1.16.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 +30 -6
- package/dist/cjs/api/component.api.js +42 -6
- package/dist/cjs/api/dockviewPanelApi.d.ts +1 -1
- package/dist/cjs/api/entryPoints.d.ts +9 -0
- package/dist/cjs/api/entryPoints.js +28 -0
- package/dist/cjs/dnd/abstractDragHandler.js +2 -65
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +4 -2
- package/dist/cjs/dockview/dockviewComponent.js +61 -17
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +1 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +1 -1
- package/dist/cjs/dockview/dockviewPanel.d.ts +1 -1
- package/dist/cjs/dockview/dockviewPanel.js +1 -1
- package/dist/cjs/dockview/options.d.ts +2 -2
- package/dist/cjs/dockview/options.js +1 -0
- package/dist/cjs/dockview/types.d.ts +1 -1
- package/dist/cjs/dom.d.ts +3 -0
- package/dist/cjs/dom.js +66 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +3 -2
- package/dist/cjs/gridview/baseComponentGridview.js +3 -0
- package/dist/cjs/gridview/gridviewComponent.d.ts +1 -1
- package/dist/cjs/gridview/gridviewComponent.js +3 -2
- package/dist/cjs/gridview/options.d.ts +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/{dnd → overlay}/overlay.d.ts +3 -0
- package/dist/cjs/{dnd → overlay}/overlay.js +41 -82
- package/dist/cjs/{overlayRenderContainer.d.ts → overlay/overlayRenderContainer.d.ts} +7 -5
- package/dist/cjs/{overlayRenderContainer.js → overlay/overlayRenderContainer.js} +41 -6
- package/dist/cjs/paneview/options.d.ts +1 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +5 -2
- package/dist/cjs/splitview/options.d.ts +1 -1
- package/dist/cjs/splitview/splitview.js +64 -71
- package/dist/cjs/splitview/splitviewComponent.d.ts +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +5 -2
- package/dist/dockview-core.amd.js +260 -98
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +259 -97
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +260 -98
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +257 -99
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +260 -98
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +259 -97
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/component.api.d.ts +30 -6
- package/dist/esm/api/component.api.js +42 -6
- package/dist/esm/api/dockviewPanelApi.d.ts +1 -1
- package/dist/esm/api/entryPoints.d.ts +9 -0
- package/dist/esm/api/entryPoints.js +21 -0
- package/dist/esm/dnd/abstractDragHandler.js +3 -11
- package/dist/esm/dockview/components/panel/content.js +1 -1
- package/dist/esm/dockview/components/titlebar/voidContainer.js +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +4 -2
- package/dist/esm/dockview/dockviewComponent.js +49 -13
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +1 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +1 -1
- package/dist/esm/dockview/dockviewPanel.d.ts +1 -1
- package/dist/esm/dockview/dockviewPanel.js +1 -1
- package/dist/esm/dockview/options.d.ts +2 -2
- package/dist/esm/dockview/options.js +1 -0
- package/dist/esm/dockview/types.d.ts +1 -1
- package/dist/esm/dom.d.ts +3 -0
- package/dist/esm/dom.js +20 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +3 -2
- package/dist/esm/gridview/baseComponentGridview.js +3 -0
- package/dist/esm/gridview/gridviewComponent.d.ts +1 -1
- package/dist/esm/gridview/gridviewComponent.js +3 -2
- package/dist/esm/gridview/options.d.ts +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/{dnd → overlay}/overlay.d.ts +3 -0
- package/dist/esm/{dnd → overlay}/overlay.js +36 -32
- package/dist/esm/{overlayRenderContainer.d.ts → overlay/overlayRenderContainer.d.ts} +7 -5
- package/dist/esm/{overlayRenderContainer.js → overlay/overlayRenderContainer.js} +39 -6
- package/dist/esm/paneview/options.d.ts +1 -1
- package/dist/esm/paneview/paneviewComponent.d.ts +1 -1
- package/dist/esm/paneview/paneviewComponent.js +5 -2
- package/dist/esm/splitview/options.d.ts +1 -1
- package/dist/esm/splitview/splitview.js +37 -27
- package/dist/esm/splitview/splitviewComponent.d.ts +1 -1
- package/dist/esm/splitview/splitviewComponent.js +5 -2
- package/dist/styles/dockview.css +79 -83
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FloatingGroupOptions, IDockviewComponent, MovePanelEvent, SerializedDockview } from '../dockview/dockviewComponent';
|
|
2
|
-
import { AddGroupOptions, AddPanelOptions, DockviewDndOverlayEvent, MovementOptions } from '../dockview/options';
|
|
2
|
+
import { AddGroupOptions, AddPanelOptions, DockviewComponentOptions, DockviewDndOverlayEvent, MovementOptions } from '../dockview/options';
|
|
3
3
|
import { Parameters } from '../panel/types';
|
|
4
4
|
import { Direction } from '../gridview/baseComponentGridview';
|
|
5
|
-
import { AddComponentOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
|
|
5
|
+
import { AddComponentOptions, GridviewComponentUpdateOptions, IGridviewComponent, SerializedGridviewComponent } from '../gridview/gridviewComponent';
|
|
6
6
|
import { IGridviewPanel } from '../gridview/gridviewPanel';
|
|
7
7
|
import { AddPaneviewComponentOptions, SerializedPaneview, IPaneviewComponent } from '../paneview/paneviewComponent';
|
|
8
8
|
import { IPaneviewPanel } from '../paneview/paneviewPanel';
|
|
@@ -16,6 +16,7 @@ import { PaneviewDropEvent } from '../paneview/draggablePaneviewPanel';
|
|
|
16
16
|
import { GroupDragEvent, TabDragEvent } from '../dockview/components/titlebar/tabsContainer';
|
|
17
17
|
import { Box } from '../types';
|
|
18
18
|
import { DockviewDidDropEvent, DockviewWillDropEvent, WillShowOverlayLocationEvent } from '../dockview/dockviewGroupPanelModel';
|
|
19
|
+
import { PaneviewComponentOptions } from '../paneview/options';
|
|
19
20
|
export interface CommonApi<T = any> {
|
|
20
21
|
readonly height: number;
|
|
21
22
|
readonly width: number;
|
|
@@ -26,6 +27,7 @@ export interface CommonApi<T = any> {
|
|
|
26
27
|
fromJSON(data: T): void;
|
|
27
28
|
toJSON(): T;
|
|
28
29
|
clear(): void;
|
|
30
|
+
dispose(): void;
|
|
29
31
|
}
|
|
30
32
|
export declare class SplitviewApi implements CommonApi<SerializedSplitview> {
|
|
31
33
|
private readonly component;
|
|
@@ -75,10 +77,6 @@ export declare class SplitviewApi implements CommonApi<SerializedSplitview> {
|
|
|
75
77
|
*/
|
|
76
78
|
get onDidRemoveView(): Event<IView>;
|
|
77
79
|
constructor(component: ISplitviewComponent);
|
|
78
|
-
/**
|
|
79
|
-
* Update configuratable options.
|
|
80
|
-
*/
|
|
81
|
-
updateOptions(options: SplitviewComponentUpdateOptions): void;
|
|
82
80
|
/**
|
|
83
81
|
* Removes an existing panel and optionally provide a `Sizing` method
|
|
84
82
|
* for the subsequent resize.
|
|
@@ -114,6 +112,14 @@ export declare class SplitviewApi implements CommonApi<SerializedSplitview> {
|
|
|
114
112
|
* Remove all panels and clear the component.
|
|
115
113
|
*/
|
|
116
114
|
clear(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Update configuratable options.
|
|
117
|
+
*/
|
|
118
|
+
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void;
|
|
119
|
+
/**
|
|
120
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
121
|
+
*/
|
|
122
|
+
dispose(): void;
|
|
117
123
|
}
|
|
118
124
|
export declare class PaneviewApi implements CommonApi<SerializedPaneview> {
|
|
119
125
|
private readonly component;
|
|
@@ -194,6 +200,14 @@ export declare class PaneviewApi implements CommonApi<SerializedPaneview> {
|
|
|
194
200
|
* Reset the component back to an empty and default state.
|
|
195
201
|
*/
|
|
196
202
|
clear(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Update configuratable options.
|
|
205
|
+
*/
|
|
206
|
+
updateOptions(options: Partial<PaneviewComponentOptions>): void;
|
|
207
|
+
/**
|
|
208
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
209
|
+
*/
|
|
210
|
+
dispose(): void;
|
|
197
211
|
}
|
|
198
212
|
export declare class GridviewApi implements CommonApi<SerializedGridviewComponent> {
|
|
199
213
|
private readonly component;
|
|
@@ -291,6 +305,11 @@ export declare class GridviewApi implements CommonApi<SerializedGridviewComponen
|
|
|
291
305
|
* Reset the component back to an empty and default state.
|
|
292
306
|
*/
|
|
293
307
|
clear(): void;
|
|
308
|
+
updateOptions(options: Partial<GridviewComponentUpdateOptions>): void;
|
|
309
|
+
/**
|
|
310
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
311
|
+
*/
|
|
312
|
+
dispose(): void;
|
|
294
313
|
}
|
|
295
314
|
export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
296
315
|
private readonly component;
|
|
@@ -493,4 +512,9 @@ export declare class DockviewApi implements CommonApi<SerializedDockview> {
|
|
|
493
512
|
}) => void;
|
|
494
513
|
}): Promise<void>;
|
|
495
514
|
setGap(gap: number | undefined): void;
|
|
515
|
+
updateOptions(options: Partial<DockviewComponentOptions>): void;
|
|
516
|
+
/**
|
|
517
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
518
|
+
*/
|
|
519
|
+
dispose(): void;
|
|
496
520
|
}
|
|
@@ -128,12 +128,6 @@ var SplitviewApi = /** @class */ (function () {
|
|
|
128
128
|
enumerable: false,
|
|
129
129
|
configurable: true
|
|
130
130
|
});
|
|
131
|
-
/**
|
|
132
|
-
* Update configuratable options.
|
|
133
|
-
*/
|
|
134
|
-
SplitviewApi.prototype.updateOptions = function (options) {
|
|
135
|
-
this.component.updateOptions(options);
|
|
136
|
-
};
|
|
137
131
|
/**
|
|
138
132
|
* Removes an existing panel and optionally provide a `Sizing` method
|
|
139
133
|
* for the subsequent resize.
|
|
@@ -187,6 +181,18 @@ var SplitviewApi = /** @class */ (function () {
|
|
|
187
181
|
SplitviewApi.prototype.clear = function () {
|
|
188
182
|
this.component.clear();
|
|
189
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* Update configuratable options.
|
|
186
|
+
*/
|
|
187
|
+
SplitviewApi.prototype.updateOptions = function (options) {
|
|
188
|
+
this.component.updateOptions(options);
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
192
|
+
*/
|
|
193
|
+
SplitviewApi.prototype.dispose = function () {
|
|
194
|
+
this.component.dispose();
|
|
195
|
+
};
|
|
190
196
|
return SplitviewApi;
|
|
191
197
|
}());
|
|
192
198
|
exports.SplitviewApi = SplitviewApi;
|
|
@@ -357,6 +363,18 @@ var PaneviewApi = /** @class */ (function () {
|
|
|
357
363
|
PaneviewApi.prototype.clear = function () {
|
|
358
364
|
this.component.clear();
|
|
359
365
|
};
|
|
366
|
+
/**
|
|
367
|
+
* Update configuratable options.
|
|
368
|
+
*/
|
|
369
|
+
PaneviewApi.prototype.updateOptions = function (options) {
|
|
370
|
+
this.component.updateOptions(options);
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
374
|
+
*/
|
|
375
|
+
PaneviewApi.prototype.dispose = function () {
|
|
376
|
+
this.component.dispose();
|
|
377
|
+
};
|
|
360
378
|
return PaneviewApi;
|
|
361
379
|
}());
|
|
362
380
|
exports.PaneviewApi = PaneviewApi;
|
|
@@ -552,6 +570,15 @@ var GridviewApi = /** @class */ (function () {
|
|
|
552
570
|
GridviewApi.prototype.clear = function () {
|
|
553
571
|
this.component.clear();
|
|
554
572
|
};
|
|
573
|
+
GridviewApi.prototype.updateOptions = function (options) {
|
|
574
|
+
this.component.updateOptions(options);
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
578
|
+
*/
|
|
579
|
+
GridviewApi.prototype.dispose = function () {
|
|
580
|
+
this.component.dispose();
|
|
581
|
+
};
|
|
555
582
|
return GridviewApi;
|
|
556
583
|
}());
|
|
557
584
|
exports.GridviewApi = GridviewApi;
|
|
@@ -967,6 +994,15 @@ var DockviewApi = /** @class */ (function () {
|
|
|
967
994
|
DockviewApi.prototype.setGap = function (gap) {
|
|
968
995
|
this.component.updateOptions({ gap: gap });
|
|
969
996
|
};
|
|
997
|
+
DockviewApi.prototype.updateOptions = function (options) {
|
|
998
|
+
this.component.updateOptions(options);
|
|
999
|
+
};
|
|
1000
|
+
/**
|
|
1001
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
1002
|
+
*/
|
|
1003
|
+
DockviewApi.prototype.dispose = function () {
|
|
1004
|
+
this.component.dispose();
|
|
1005
|
+
};
|
|
970
1006
|
return DockviewApi;
|
|
971
1007
|
}());
|
|
972
1008
|
exports.DockviewApi = DockviewApi;
|
|
@@ -4,7 +4,7 @@ import { DockviewGroupPanel } from '../dockview/dockviewGroupPanel';
|
|
|
4
4
|
import { DockviewPanel } from '../dockview/dockviewPanel';
|
|
5
5
|
import { DockviewComponent } from '../dockview/dockviewComponent';
|
|
6
6
|
import { Position } from '../dnd/droptarget';
|
|
7
|
-
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
|
7
|
+
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
8
8
|
import { DockviewGroupPanelFloatingChangeEvent } from './dockviewGroupPanelApi';
|
|
9
9
|
import { DockviewGroupLocation } from '../dockview/dockviewGroupPanelModel';
|
|
10
10
|
export interface TitleEvent {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DockviewApi, GridviewApi, PaneviewApi, SplitviewApi } from '../api/component.api';
|
|
2
|
+
import { DockviewComponentOptions } from '../dockview/options';
|
|
3
|
+
import { GridviewComponentOptions } from '../gridview/options';
|
|
4
|
+
import { PaneviewComponentOptions } from '../paneview/options';
|
|
5
|
+
import { SplitviewComponentOptions } from '../splitview/options';
|
|
6
|
+
export declare function createDockview(element: HTMLElement, options: DockviewComponentOptions): DockviewApi;
|
|
7
|
+
export declare function createSplitview(element: HTMLElement, options: SplitviewComponentOptions): SplitviewApi;
|
|
8
|
+
export declare function createGridview(element: HTMLElement, options: GridviewComponentOptions): GridviewApi;
|
|
9
|
+
export declare function createPaneview(element: HTMLElement, options: PaneviewComponentOptions): PaneviewApi;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPaneview = exports.createGridview = exports.createSplitview = exports.createDockview = void 0;
|
|
4
|
+
var component_api_1 = require("../api/component.api");
|
|
5
|
+
var dockviewComponent_1 = require("../dockview/dockviewComponent");
|
|
6
|
+
var gridviewComponent_1 = require("../gridview/gridviewComponent");
|
|
7
|
+
var paneviewComponent_1 = require("../paneview/paneviewComponent");
|
|
8
|
+
var splitviewComponent_1 = require("../splitview/splitviewComponent");
|
|
9
|
+
function createDockview(element, options) {
|
|
10
|
+
var component = new dockviewComponent_1.DockviewComponent(element, options);
|
|
11
|
+
return component.api;
|
|
12
|
+
}
|
|
13
|
+
exports.createDockview = createDockview;
|
|
14
|
+
function createSplitview(element, options) {
|
|
15
|
+
var component = new splitviewComponent_1.SplitviewComponent(element, options);
|
|
16
|
+
return new component_api_1.SplitviewApi(component);
|
|
17
|
+
}
|
|
18
|
+
exports.createSplitview = createSplitview;
|
|
19
|
+
function createGridview(element, options) {
|
|
20
|
+
var component = new gridviewComponent_1.GridviewComponent(element, options);
|
|
21
|
+
return new component_api_1.GridviewApi(component);
|
|
22
|
+
}
|
|
23
|
+
exports.createGridview = createGridview;
|
|
24
|
+
function createPaneview(element, options) {
|
|
25
|
+
var component = new paneviewComponent_1.PaneviewComponent(element, options);
|
|
26
|
+
return new component_api_1.PaneviewApi(component);
|
|
27
|
+
}
|
|
28
|
+
exports.createPaneview = createPaneview;
|
|
@@ -14,42 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
18
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
-
if (!m) return o;
|
|
20
|
-
var i = m.call(o), r, ar = [], e;
|
|
21
|
-
try {
|
|
22
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
-
}
|
|
24
|
-
catch (error) { e = { error: error }; }
|
|
25
|
-
finally {
|
|
26
|
-
try {
|
|
27
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
-
}
|
|
29
|
-
finally { if (e) throw e.error; }
|
|
30
|
-
}
|
|
31
|
-
return ar;
|
|
32
|
-
};
|
|
33
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
34
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
35
|
-
if (ar || !(i in from)) {
|
|
36
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
37
|
-
ar[i] = from[i];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
|
-
};
|
|
42
|
-
var __values = (this && this.__values) || function(o) {
|
|
43
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
44
|
-
if (m) return m.call(o);
|
|
45
|
-
if (o && typeof o.length === "number") return {
|
|
46
|
-
next: function () {
|
|
47
|
-
if (o && i >= o.length) o = void 0;
|
|
48
|
-
return { value: o && o[i++], done: !o };
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
52
|
-
};
|
|
53
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
18
|
exports.DragHandler = void 0;
|
|
55
19
|
var dom_1 = require("../dom");
|
|
@@ -74,43 +38,16 @@ var DragHandler = /** @class */ (function (_super) {
|
|
|
74
38
|
DragHandler.prototype.configure = function () {
|
|
75
39
|
var _this = this;
|
|
76
40
|
this.addDisposables(this._onDragStart, (0, events_1.addDisposableListener)(this.el, 'dragstart', function (event) {
|
|
77
|
-
var e_1, _a;
|
|
78
41
|
if (event.defaultPrevented || _this.isCancelled(event)) {
|
|
79
42
|
event.preventDefault();
|
|
80
43
|
return;
|
|
81
44
|
}
|
|
82
|
-
var iframes =
|
|
45
|
+
var iframes = (0, dom_1.disableIframePointEvents)();
|
|
83
46
|
_this.pointerEventsDisposable.value = {
|
|
84
47
|
dispose: function () {
|
|
85
|
-
|
|
86
|
-
try {
|
|
87
|
-
for (var iframes_2 = __values(iframes), iframes_2_1 = iframes_2.next(); !iframes_2_1.done; iframes_2_1 = iframes_2.next()) {
|
|
88
|
-
var iframe = iframes_2_1.value;
|
|
89
|
-
iframe.style.pointerEvents = 'auto';
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
93
|
-
finally {
|
|
94
|
-
try {
|
|
95
|
-
if (iframes_2_1 && !iframes_2_1.done && (_a = iframes_2.return)) _a.call(iframes_2);
|
|
96
|
-
}
|
|
97
|
-
finally { if (e_2) throw e_2.error; }
|
|
98
|
-
}
|
|
48
|
+
iframes.release();
|
|
99
49
|
},
|
|
100
50
|
};
|
|
101
|
-
try {
|
|
102
|
-
for (var iframes_1 = __values(iframes), iframes_1_1 = iframes_1.next(); !iframes_1_1.done; iframes_1_1 = iframes_1.next()) {
|
|
103
|
-
var iframe = iframes_1_1.value;
|
|
104
|
-
iframe.style.pointerEvents = 'none';
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
108
|
-
finally {
|
|
109
|
-
try {
|
|
110
|
-
if (iframes_1_1 && !iframes_1_1.done && (_a = iframes_1.return)) _a.call(iframes_1);
|
|
111
|
-
}
|
|
112
|
-
finally { if (e_1) throw e_1.error; }
|
|
113
|
-
}
|
|
114
51
|
_this.el.classList.add('dv-dragged');
|
|
115
52
|
setTimeout(function () { return _this.el.classList.remove('dv-dragged'); }, 0);
|
|
116
53
|
_this.dataDisposable.value = _this.getData(event);
|
|
@@ -36,7 +36,7 @@ var VoidContainer = /** @class */ (function (_super) {
|
|
|
36
36
|
_this._element.className = 'void-container';
|
|
37
37
|
_this._element.tabIndex = 0;
|
|
38
38
|
_this._element.draggable = true;
|
|
39
|
-
_this.addDisposables(_this._onDrop, _this._onDragStart, (0, events_1.addDisposableListener)(_this._element, '
|
|
39
|
+
_this.addDisposables(_this._onDrop, _this._onDragStart, (0, events_1.addDisposableListener)(_this._element, 'pointerdown', function () {
|
|
40
40
|
_this.accessor.doSetGroupActive(_this.group);
|
|
41
41
|
}));
|
|
42
42
|
var handler = new groupDragHandler_1.GroupDragHandler(_this._element, accessor, group);
|
|
@@ -10,9 +10,10 @@ import { Orientation } from '../splitview/splitview';
|
|
|
10
10
|
import { GroupOptions, GroupPanelViewState, DockviewDidDropEvent, DockviewWillDropEvent, WillShowOverlayLocationEvent } from './dockviewGroupPanelModel';
|
|
11
11
|
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
12
12
|
import { Parameters } from '../panel/types';
|
|
13
|
+
import { DockviewFloatingGroupPanel } from './dockviewFloatingGroupPanel';
|
|
13
14
|
import { GroupDragEvent, TabDragEvent } from './components/titlebar/tabsContainer';
|
|
14
15
|
import { AnchoredBox, AnchorPosition, Box } from '../types';
|
|
15
|
-
import { DockviewPanelRenderer, OverlayRenderContainer } from '../overlayRenderContainer';
|
|
16
|
+
import { DockviewPanelRenderer, OverlayRenderContainer } from '../overlay/overlayRenderContainer';
|
|
16
17
|
export interface PanelReference {
|
|
17
18
|
update: (event: {
|
|
18
19
|
params: {
|
|
@@ -176,7 +177,8 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
|
|
|
176
177
|
get renderer(): DockviewPanelRenderer;
|
|
177
178
|
get api(): DockviewApi;
|
|
178
179
|
get gap(): number;
|
|
179
|
-
|
|
180
|
+
get floatingGroups(): DockviewFloatingGroupPanel[];
|
|
181
|
+
constructor(parentElement: HTMLElement, options: DockviewComponentOptions);
|
|
180
182
|
addPopoutGroup(itemToPopout: DockviewPanel | DockviewGroupPanel, options?: {
|
|
181
183
|
skipRemoveGroup?: boolean;
|
|
182
184
|
position?: Box;
|
|
@@ -80,11 +80,11 @@ var dockviewGroupPanelModel_1 = require("./dockviewGroupPanelModel");
|
|
|
80
80
|
var dockviewGroupPanel_1 = require("./dockviewGroupPanel");
|
|
81
81
|
var dockviewPanelModel_1 = require("./dockviewPanelModel");
|
|
82
82
|
var dataTransfer_1 = require("../dnd/dataTransfer");
|
|
83
|
-
var overlay_1 = require("../
|
|
83
|
+
var overlay_1 = require("../overlay/overlay");
|
|
84
84
|
var dom_1 = require("../dom");
|
|
85
85
|
var dockviewFloatingGroupPanel_1 = require("./dockviewFloatingGroupPanel");
|
|
86
86
|
var constants_1 = require("../constants");
|
|
87
|
-
var overlayRenderContainer_1 = require("../overlayRenderContainer");
|
|
87
|
+
var overlayRenderContainer_1 = require("../overlay/overlayRenderContainer");
|
|
88
88
|
var popoutWindow_1 = require("../popoutWindow");
|
|
89
89
|
var DEFAULT_ROOT_OVERLAY_MODEL = {
|
|
90
90
|
activationSize: { type: 'pixels', value: 10 },
|
|
@@ -127,7 +127,7 @@ function getDockviewTheme(element) {
|
|
|
127
127
|
}
|
|
128
128
|
var DockviewComponent = /** @class */ (function (_super) {
|
|
129
129
|
__extends(DockviewComponent, _super);
|
|
130
|
-
function DockviewComponent(options) {
|
|
130
|
+
function DockviewComponent(parentElement, options) {
|
|
131
131
|
var _a;
|
|
132
132
|
var _this = _super.call(this, {
|
|
133
133
|
proportionalLayout: true,
|
|
@@ -135,10 +135,11 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
135
135
|
styles: options.hideBorders
|
|
136
136
|
? { separatorBorder: 'transparent' }
|
|
137
137
|
: undefined,
|
|
138
|
-
parentElement:
|
|
138
|
+
parentElement: parentElement,
|
|
139
139
|
disableAutoResizing: options.disableAutoResizing,
|
|
140
140
|
locked: options.locked,
|
|
141
141
|
margin: options.gap,
|
|
142
|
+
className: options.className,
|
|
142
143
|
}) || this;
|
|
143
144
|
_this.nextGroupId = (0, math_1.sequentialNumberGenerator)();
|
|
144
145
|
_this._deserializer = new deserializer_1.DefaultDockviewDeserialzier(_this);
|
|
@@ -174,10 +175,10 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
174
175
|
_this._onDidActiveGroupChange = new events_1.Emitter();
|
|
175
176
|
_this.onDidActiveGroupChange = _this._onDidActiveGroupChange.event;
|
|
176
177
|
_this._moving = false;
|
|
177
|
-
|
|
178
|
-
gready.className = 'dv-overlay-render-container';
|
|
179
|
-
|
|
180
|
-
_this.overlayRenderContainer = new overlayRenderContainer_1.OverlayRenderContainer(
|
|
178
|
+
// const gready = document.createElement('div');
|
|
179
|
+
// gready.className = 'dv-overlay-render-container';
|
|
180
|
+
// this.gridview.element.appendChild(gready);
|
|
181
|
+
_this.overlayRenderContainer = new overlayRenderContainer_1.OverlayRenderContainer(_this.gridview.element, _this);
|
|
181
182
|
(0, dom_1.toggleClass)(_this.gridview.element, 'dv-dockview', true);
|
|
182
183
|
(0, dom_1.toggleClass)(_this.element, 'dv-debug', !!options.debug);
|
|
183
184
|
_this.addDisposables(_this.overlayRenderContainer, _this._onWillDragPanel, _this._onWillDragGroup, _this._onWillShowOverlay, _this._onDidActivePanelChange, _this._onDidAddPanel, _this._onDidRemovePanel, _this._onDidLayoutFromJSON, _this._onDidDrop, _this._onWillDrop, _this._onDidMovePanel, _this._onDidAddGroup, _this._onDidRemoveGroup, _this._onDidActiveGroupChange, _this._onUnhandledDragOverEvent, _this.onDidViewVisibilityChangeMicroTaskQueue(function () {
|
|
@@ -375,6 +376,13 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
375
376
|
enumerable: false,
|
|
376
377
|
configurable: true
|
|
377
378
|
});
|
|
379
|
+
Object.defineProperty(DockviewComponent.prototype, "floatingGroups", {
|
|
380
|
+
get: function () {
|
|
381
|
+
return this._floatingGroups;
|
|
382
|
+
},
|
|
383
|
+
enumerable: false,
|
|
384
|
+
configurable: true
|
|
385
|
+
});
|
|
378
386
|
DockviewComponent.prototype.addPopoutGroup = function (itemToPopout, options) {
|
|
379
387
|
var _this = this;
|
|
380
388
|
var _a, _b, _c;
|
|
@@ -427,7 +435,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
427
435
|
}
|
|
428
436
|
var gready = document.createElement('div');
|
|
429
437
|
gready.className = 'dv-overlay-render-container';
|
|
430
|
-
var overlayRenderContainer = new overlayRenderContainer_1.OverlayRenderContainer(gready);
|
|
438
|
+
var overlayRenderContainer = new overlayRenderContainer_1.OverlayRenderContainer(gready, _this);
|
|
431
439
|
var referenceGroup = itemToPopout instanceof dockviewPanel_1.DockviewPanel
|
|
432
440
|
? itemToPopout.group
|
|
433
441
|
: itemToPopout;
|
|
@@ -587,7 +595,6 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
587
595
|
}
|
|
588
596
|
}
|
|
589
597
|
}
|
|
590
|
-
group.model.location = { type: 'floating' };
|
|
591
598
|
function getAnchoredBox() {
|
|
592
599
|
if (options === null || options === void 0 ? void 0 : options.position) {
|
|
593
600
|
var result = {};
|
|
@@ -654,10 +661,14 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
654
661
|
: false,
|
|
655
662
|
});
|
|
656
663
|
var floatingGroupPanel = new dockviewFloatingGroupPanel_1.DockviewFloatingGroupPanel(group, overlay);
|
|
657
|
-
var disposable =
|
|
664
|
+
var disposable = new lifecycle_1.CompositeDisposable(group.api.onDidActiveChange(function (event) {
|
|
665
|
+
if (event.isActive) {
|
|
666
|
+
overlay.bringToFront();
|
|
667
|
+
}
|
|
668
|
+
}), (0, dom_1.watchElementResize)(group.element, function (entry) {
|
|
658
669
|
var _a = entry.contentRect, width = _a.width, height = _a.height;
|
|
659
670
|
group.layout(width, height); // let the group know it's size is changing so it can fire events to the panel
|
|
660
|
-
});
|
|
671
|
+
}));
|
|
661
672
|
floatingGroupPanel.addDisposables(overlay.onDidChange(function () {
|
|
662
673
|
// this is either a resize or a move
|
|
663
674
|
// to inform the panels .layout(...) the group with it's current size
|
|
@@ -673,12 +684,13 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
673
684
|
}), {
|
|
674
685
|
dispose: function () {
|
|
675
686
|
disposable.dispose();
|
|
676
|
-
group.model.location = { type: 'grid' };
|
|
677
687
|
(0, array_1.remove)(_this._floatingGroups, floatingGroupPanel);
|
|
688
|
+
group.model.location = { type: 'grid' };
|
|
678
689
|
_this.updateWatermark();
|
|
679
690
|
},
|
|
680
691
|
});
|
|
681
692
|
this._floatingGroups.push(floatingGroupPanel);
|
|
693
|
+
group.model.location = { type: 'floating' };
|
|
682
694
|
if (!(options === null || options === void 0 ? void 0 : options.skipActiveGroup)) {
|
|
683
695
|
this.doSetGroupAndPanelActive(group);
|
|
684
696
|
}
|
|
@@ -959,6 +971,8 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
959
971
|
var group = createGroupFromSerializedState_1(data_1);
|
|
960
972
|
this.addFloatingGroup(group, {
|
|
961
973
|
position: position,
|
|
974
|
+
width: position.width,
|
|
975
|
+
height: position.height,
|
|
962
976
|
skipRemoveGroup: true,
|
|
963
977
|
inDragMode: false,
|
|
964
978
|
});
|
|
@@ -1401,6 +1415,7 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
1401
1415
|
this._groups.delete(group.id);
|
|
1402
1416
|
this._onDidRemoveGroup.fire(group);
|
|
1403
1417
|
}
|
|
1418
|
+
(0, array_1.remove)(this._popoutGroups, selectedGroup);
|
|
1404
1419
|
var removedGroup = selectedGroup.disposable.dispose();
|
|
1405
1420
|
if (!(options === null || options === void 0 ? void 0 : options.skipPopoutReturn) && removedGroup) {
|
|
1406
1421
|
this.doAddGroup(removedGroup, [0]);
|
|
@@ -1517,6 +1532,35 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
1517
1532
|
return;
|
|
1518
1533
|
}
|
|
1519
1534
|
}
|
|
1535
|
+
if (sourceGroup.api.location.type === 'popout') {
|
|
1536
|
+
/**
|
|
1537
|
+
* the source group is a popout group with a single panel
|
|
1538
|
+
*
|
|
1539
|
+
* 1. remove the panel from the group without triggering any events
|
|
1540
|
+
* 2. remove the popout group
|
|
1541
|
+
* 3. create a new group at the requested location and add that panel
|
|
1542
|
+
*/
|
|
1543
|
+
var popoutGroup_1 = this._popoutGroups.find(function (group) { return group.popoutGroup === sourceGroup; });
|
|
1544
|
+
var removedPanel_2 = this.movingLock(function () {
|
|
1545
|
+
return popoutGroup_1.popoutGroup.model.removePanel(popoutGroup_1.popoutGroup.panels[0], {
|
|
1546
|
+
skipSetActive: true,
|
|
1547
|
+
skipSetActiveGroup: true,
|
|
1548
|
+
});
|
|
1549
|
+
});
|
|
1550
|
+
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
1551
|
+
var newGroup_1 = this.createGroupAtLocation(targetLocation);
|
|
1552
|
+
this.movingLock(function () {
|
|
1553
|
+
return newGroup_1.model.openPanel(removedPanel_2, {
|
|
1554
|
+
skipSetActive: true,
|
|
1555
|
+
});
|
|
1556
|
+
});
|
|
1557
|
+
this.doSetGroupAndPanelActive(newGroup_1);
|
|
1558
|
+
this._onDidMovePanel.fire({
|
|
1559
|
+
panel: this.getGroupPanel(sourceItemId),
|
|
1560
|
+
from: sourceGroup,
|
|
1561
|
+
});
|
|
1562
|
+
return;
|
|
1563
|
+
}
|
|
1520
1564
|
// source group will become empty so delete the group
|
|
1521
1565
|
var targetGroup_1 = this.movingLock(function () {
|
|
1522
1566
|
return _this.doRemoveGroup(sourceGroup, {
|
|
@@ -1539,25 +1583,25 @@ var DockviewComponent = /** @class */ (function (_super) {
|
|
|
1539
1583
|
* The group we are removing from has many panels, we need to remove the panels we are moving,
|
|
1540
1584
|
* create a new group, add the panels to that new group and add the new group in an appropiate position
|
|
1541
1585
|
*/
|
|
1542
|
-
var
|
|
1586
|
+
var removedPanel_3 = this.movingLock(function () {
|
|
1543
1587
|
return sourceGroup.model.removePanel(sourceItemId, {
|
|
1544
1588
|
skipSetActive: false,
|
|
1545
1589
|
skipSetActiveGroup: true,
|
|
1546
1590
|
});
|
|
1547
1591
|
});
|
|
1548
|
-
if (!
|
|
1592
|
+
if (!removedPanel_3) {
|
|
1549
1593
|
throw new Error("No panel with id ".concat(sourceItemId));
|
|
1550
1594
|
}
|
|
1551
1595
|
var dropLocation = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
1552
1596
|
var group_2 = this.createGroupAtLocation(dropLocation);
|
|
1553
1597
|
this.movingLock(function () {
|
|
1554
|
-
return group_2.model.openPanel(
|
|
1598
|
+
return group_2.model.openPanel(removedPanel_3, {
|
|
1555
1599
|
skipSetGroupActive: true,
|
|
1556
1600
|
});
|
|
1557
1601
|
});
|
|
1558
1602
|
this.doSetGroupAndPanelActive(group_2);
|
|
1559
1603
|
this._onDidMovePanel.fire({
|
|
1560
|
-
panel:
|
|
1604
|
+
panel: removedPanel_3,
|
|
1561
1605
|
from: sourceGroup,
|
|
1562
1606
|
});
|
|
1563
1607
|
}
|
|
@@ -10,7 +10,7 @@ import { GroupDragEvent, TabDragEvent } from './components/titlebar/tabsContaine
|
|
|
10
10
|
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
|
11
11
|
import { IDockviewPanel } from './dockviewPanel';
|
|
12
12
|
import { DockviewDndOverlayEvent } from './options';
|
|
13
|
-
import { OverlayRenderContainer } from '../overlayRenderContainer';
|
|
13
|
+
import { OverlayRenderContainer } from '../overlay/overlayRenderContainer';
|
|
14
14
|
import { TitleEvent } from '../api/dockviewPanelApi';
|
|
15
15
|
interface GroupMoveEvent {
|
|
16
16
|
groupId: string;
|
|
@@ -723,7 +723,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
|
|
|
723
723
|
group: this.groupPanel,
|
|
724
724
|
});
|
|
725
725
|
this.watermark = watermark;
|
|
726
|
-
(0, events_1.addDisposableListener)(this.watermark.element, '
|
|
726
|
+
(0, events_1.addDisposableListener)(this.watermark.element, 'pointerdown', function () {
|
|
727
727
|
if (!_this.isActive) {
|
|
728
728
|
_this.accessor.doSetGroupActive(_this.groupPanel);
|
|
729
729
|
}
|
|
@@ -6,7 +6,7 @@ import { CompositeDisposable, IDisposable } from '../lifecycle';
|
|
|
6
6
|
import { IPanel, PanelUpdateEvent, Parameters } from '../panel/types';
|
|
7
7
|
import { IDockviewPanelModel } from './dockviewPanelModel';
|
|
8
8
|
import { DockviewComponent } from './dockviewComponent';
|
|
9
|
-
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
|
9
|
+
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
10
10
|
export interface IDockviewPanel extends IDisposable, IPanel {
|
|
11
11
|
readonly view: IDockviewPanelModel;
|
|
12
12
|
readonly group: DockviewGroupPanel;
|
|
@@ -58,7 +58,7 @@ var DockviewPanel = /** @class */ (function (_super) {
|
|
|
58
58
|
// forward the resize event to the group since if you want to resize a panel
|
|
59
59
|
// you are actually just resizing the panels parent which is the group
|
|
60
60
|
_this.group.api.setSize(event);
|
|
61
|
-
}), _this.api.onDidRendererChange(function (
|
|
61
|
+
}), _this.api.onDidRendererChange(function () {
|
|
62
62
|
_this.group.model.rerender(_this);
|
|
63
63
|
}));
|
|
64
64
|
return _this;
|
|
@@ -9,7 +9,7 @@ import { IDisposable } from '../lifecycle';
|
|
|
9
9
|
import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
|
|
10
10
|
import { DockviewGroupDropLocation, GroupOptions } from './dockviewGroupPanelModel';
|
|
11
11
|
import { IDockviewPanel } from './dockviewPanel';
|
|
12
|
-
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
|
12
|
+
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
13
13
|
import { IGroupHeaderProps } from './framework';
|
|
14
14
|
import { FloatingGroupOptions } from './dockviewComponent';
|
|
15
15
|
export interface IHeaderActionsRenderer extends IDisposable {
|
|
@@ -44,6 +44,7 @@ export interface DockviewOptions {
|
|
|
44
44
|
rootOverlayModel?: DroptargetOverlayModel;
|
|
45
45
|
locked?: boolean;
|
|
46
46
|
disableDnd?: boolean;
|
|
47
|
+
className?: string;
|
|
47
48
|
/**
|
|
48
49
|
* Pixel gap between groups
|
|
49
50
|
*/
|
|
@@ -71,7 +72,6 @@ export declare class DockviewUnhandledDragOverEvent implements DockviewDndOverla
|
|
|
71
72
|
}
|
|
72
73
|
export declare const PROPERTY_KEYS: (keyof DockviewOptions)[];
|
|
73
74
|
export interface DockviewFrameworkOptions {
|
|
74
|
-
parentElement: HTMLElement;
|
|
75
75
|
defaultTabComponent?: string;
|
|
76
76
|
createRightHeaderActionComponent?: (group: DockviewGroupPanel) => IHeaderActionsRenderer;
|
|
77
77
|
createLeftHeaderActionComponent?: (group: DockviewGroupPanel) => IHeaderActionsRenderer;
|
|
@@ -3,7 +3,7 @@ import { PanelInitParameters, IPanel } from '../panel/types';
|
|
|
3
3
|
import { DockviewApi } from '../api/component.api';
|
|
4
4
|
import { Optional } from '../types';
|
|
5
5
|
import { DockviewGroupPanel, IDockviewGroupPanel } from './dockviewGroupPanel';
|
|
6
|
-
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
|
6
|
+
import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
|
|
7
7
|
export interface HeaderPartInitParameters {
|
|
8
8
|
title: string;
|
|
9
9
|
}
|
package/dist/cjs/dom.d.ts
CHANGED
|
@@ -27,3 +27,6 @@ export declare function getDomNodePagePosition(domNode: Element): {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function isInDocument(element: Element): boolean;
|
|
29
29
|
export declare function addTestId(element: HTMLElement, id: string): void;
|
|
30
|
+
export declare function disableIframePointEvents(): {
|
|
31
|
+
release: () => void;
|
|
32
|
+
};
|