dockview-core 3.0.0 → 3.0.2
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/dockview/dockviewComponent.d.ts +1 -1
- package/dist/cjs/dockview/dockviewComponent.js +12 -2
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +3 -2
- package/dist/cjs/gridview/gridviewComponent.d.ts +1 -1
- package/dist/cjs/gridview/gridviewComponent.js +2 -2
- package/dist/cjs/paneview/paneviewComponent.d.ts +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +6 -2
- package/dist/cjs/splitview/splitview.d.ts +1 -1
- package/dist/cjs/splitview/splitview.js +3 -3
- package/dist/cjs/splitview/splitviewComponent.d.ts +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +6 -2
- package/dist/dockview-core.amd.js +33 -14
- 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 +33 -14
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +33 -14
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +33 -14
- 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 +33 -14
- 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 +33 -14
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +1 -1
- package/dist/esm/dockview/dockviewComponent.js +12 -2
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +3 -2
- package/dist/esm/gridview/gridviewComponent.d.ts +1 -1
- package/dist/esm/gridview/gridviewComponent.js +2 -2
- package/dist/esm/paneview/paneviewComponent.d.ts +1 -1
- package/dist/esm/paneview/paneviewComponent.js +6 -2
- package/dist/esm/splitview/splitview.d.ts +1 -1
- package/dist/esm/splitview/splitview.js +3 -3
- package/dist/esm/splitview/splitviewComponent.d.ts +1 -1
- package/dist/esm/splitview/splitviewComponent.js +6 -2
- package/package.json +1 -1
|
@@ -207,7 +207,7 @@ export declare class DockviewComponent extends BaseGrid<DockviewGroupPanel> impl
|
|
|
207
207
|
get api(): DockviewApi;
|
|
208
208
|
get gap(): number;
|
|
209
209
|
get floatingGroups(): DockviewFloatingGroupPanel[];
|
|
210
|
-
constructor(
|
|
210
|
+
constructor(container: HTMLElement, options: DockviewComponentOptions);
|
|
211
211
|
setVisible(panel: DockviewGroupPanel, visible: boolean): void;
|
|
212
212
|
addPopoutGroup(itemToPopout: DockviewPanel | DockviewGroupPanel, options?: DockviewPopoutGroupOptions): Promise<boolean>;
|
|
213
213
|
addFloatingGroup(item: DockviewPanel | DockviewGroupPanel, options?: FloatingGroupOptionsInternal): void;
|
|
@@ -73,9 +73,9 @@ export class DockviewComponent extends BaseGrid {
|
|
|
73
73
|
get floatingGroups() {
|
|
74
74
|
return this._floatingGroups;
|
|
75
75
|
}
|
|
76
|
-
constructor(
|
|
76
|
+
constructor(container, options) {
|
|
77
77
|
var _a;
|
|
78
|
-
super(
|
|
78
|
+
super(container, {
|
|
79
79
|
proportionalLayout: true,
|
|
80
80
|
orientation: Orientation.HORIZONTAL,
|
|
81
81
|
styles: options.hideBorders
|
|
@@ -431,6 +431,16 @@ export class DockviewComponent extends BaseGrid {
|
|
|
431
431
|
group.model.renderContainer =
|
|
432
432
|
this.overlayRenderContainer;
|
|
433
433
|
returnedGroup = group;
|
|
434
|
+
const alreadyRemoved = !this._popoutGroups.find((p) => p.popoutGroup === group);
|
|
435
|
+
if (alreadyRemoved) {
|
|
436
|
+
/**
|
|
437
|
+
* If this popout group was explicitly removed then we shouldn't run the additional
|
|
438
|
+
* steps. To tell if the running of this disposable is the result of this popout group
|
|
439
|
+
* being explicitly removed we can check if this popout group is still referenced in
|
|
440
|
+
* the `this._popoutGroups` list.
|
|
441
|
+
*/
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
434
444
|
if (floatingBox) {
|
|
435
445
|
this.addFloatingGroup(group, {
|
|
436
446
|
height: floatingBox.height,
|
|
@@ -81,7 +81,7 @@ export declare abstract class BaseGrid<T extends IGridPanelView> extends Resizab
|
|
|
81
81
|
get activeGroup(): T | undefined;
|
|
82
82
|
get locked(): boolean;
|
|
83
83
|
set locked(value: boolean);
|
|
84
|
-
constructor(
|
|
84
|
+
constructor(container: HTMLElement, options: BaseGridOptions);
|
|
85
85
|
abstract toJSON(): object;
|
|
86
86
|
abstract fromJSON(data: any): void;
|
|
87
87
|
abstract clear(): void;
|
|
@@ -58,7 +58,7 @@ export class BaseGrid extends Resizable {
|
|
|
58
58
|
set locked(value) {
|
|
59
59
|
this.gridview.locked = value;
|
|
60
60
|
}
|
|
61
|
-
constructor(
|
|
61
|
+
constructor(container, options) {
|
|
62
62
|
var _a;
|
|
63
63
|
super(document.createElement('div'), options.disableAutoResizing);
|
|
64
64
|
this._id = nextLayoutId.next();
|
|
@@ -79,7 +79,8 @@ export class BaseGrid extends Resizable {
|
|
|
79
79
|
this.element.style.width = '100%';
|
|
80
80
|
this._classNames = new Classnames(this.element);
|
|
81
81
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
82
|
-
|
|
82
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
83
|
+
container.appendChild(this.element);
|
|
83
84
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
84
85
|
this.gridview.locked = !!options.locked;
|
|
85
86
|
this.element.appendChild(this.gridview.element);
|
|
@@ -61,7 +61,7 @@ export declare class GridviewComponent extends BaseGrid<GridviewPanel> implement
|
|
|
61
61
|
get options(): GridviewComponentOptions;
|
|
62
62
|
get deserializer(): IPanelDeserializer | undefined;
|
|
63
63
|
set deserializer(value: IPanelDeserializer | undefined);
|
|
64
|
-
constructor(
|
|
64
|
+
constructor(container: HTMLElement, options: GridviewComponentOptions);
|
|
65
65
|
updateOptions(options: Partial<GridviewComponentOptions>): void;
|
|
66
66
|
removePanel(panel: GridviewPanel): void;
|
|
67
67
|
/**
|
|
@@ -19,9 +19,9 @@ export class GridviewComponent extends BaseGrid {
|
|
|
19
19
|
set deserializer(value) {
|
|
20
20
|
this._deserializer = value;
|
|
21
21
|
}
|
|
22
|
-
constructor(
|
|
22
|
+
constructor(container, options) {
|
|
23
23
|
var _a;
|
|
24
|
-
super(
|
|
24
|
+
super(container, {
|
|
25
25
|
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
26
26
|
orientation: options.orientation,
|
|
27
27
|
styles: options.hideBorders
|
|
@@ -110,7 +110,7 @@ export declare class PaneviewComponent extends Resizable implements IPaneviewCom
|
|
|
110
110
|
get height(): number;
|
|
111
111
|
get width(): number;
|
|
112
112
|
get options(): PaneviewComponentOptions;
|
|
113
|
-
constructor(
|
|
113
|
+
constructor(container: HTMLElement, options: PaneviewComponentOptions);
|
|
114
114
|
setVisible(panel: PaneviewPanel, visible: boolean): void;
|
|
115
115
|
focus(): void;
|
|
116
116
|
updateOptions(options: Partial<PaneviewComponentOptions>): void;
|
|
@@ -56,9 +56,9 @@ export class PaneviewComponent extends Resizable {
|
|
|
56
56
|
get options() {
|
|
57
57
|
return this._options;
|
|
58
58
|
}
|
|
59
|
-
constructor(
|
|
59
|
+
constructor(container, options) {
|
|
60
60
|
var _a;
|
|
61
|
-
super(
|
|
61
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
62
62
|
this._id = nextLayoutId.next();
|
|
63
63
|
this._disposable = new MutableDisposable();
|
|
64
64
|
this._viewDisposables = new Map();
|
|
@@ -74,9 +74,13 @@ export class PaneviewComponent extends Resizable {
|
|
|
74
74
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
75
75
|
this._onUnhandledDragOverEvent = new Emitter();
|
|
76
76
|
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
77
|
+
this.element.style.height = '100%';
|
|
78
|
+
this.element.style.width = '100%';
|
|
77
79
|
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
78
80
|
this._classNames = new Classnames(this.element);
|
|
79
81
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
82
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
83
|
+
container.appendChild(this.element);
|
|
80
84
|
this._options = options;
|
|
81
85
|
this.paneview = new Paneview(this.element, {
|
|
82
86
|
// only allow paneview in the vertical orientation for now
|
|
@@ -14,7 +14,7 @@ export interface ISplitviewStyles {
|
|
|
14
14
|
separatorBorder: string;
|
|
15
15
|
}
|
|
16
16
|
export interface SplitViewOptions {
|
|
17
|
-
orientation
|
|
17
|
+
orientation?: Orientation;
|
|
18
18
|
descriptor?: ISplitViewDescriptor;
|
|
19
19
|
proportionalLayout?: boolean;
|
|
20
20
|
styles?: ISplitviewStyles;
|
|
@@ -114,7 +114,7 @@ export class Splitview {
|
|
|
114
114
|
this._margin = value;
|
|
115
115
|
}
|
|
116
116
|
constructor(container, options) {
|
|
117
|
-
var _a;
|
|
117
|
+
var _a, _b;
|
|
118
118
|
this.container = container;
|
|
119
119
|
this.viewItems = [];
|
|
120
120
|
this.sashes = [];
|
|
@@ -212,9 +212,9 @@ export class Splitview {
|
|
|
212
212
|
//
|
|
213
213
|
return delta;
|
|
214
214
|
};
|
|
215
|
-
this._orientation = options.orientation;
|
|
215
|
+
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : Orientation.VERTICAL;
|
|
216
216
|
this.element = this.createContainer();
|
|
217
|
-
this.margin = (
|
|
217
|
+
this.margin = (_b = options.margin) !== null && _b !== void 0 ? _b : 0;
|
|
218
218
|
this.proportionalLayout =
|
|
219
219
|
options.proportionalLayout === undefined
|
|
220
220
|
? true
|
|
@@ -83,7 +83,7 @@ export declare class SplitviewComponent extends Resizable implements ISplitviewC
|
|
|
83
83
|
get maximumSize(): number;
|
|
84
84
|
get height(): number;
|
|
85
85
|
get width(): number;
|
|
86
|
-
constructor(
|
|
86
|
+
constructor(container: HTMLElement, options: SplitviewComponentOptions);
|
|
87
87
|
updateOptions(options: Partial<SplitviewComponentOptions>): void;
|
|
88
88
|
focus(): void;
|
|
89
89
|
movePanel(from: number, to: number): void;
|
|
@@ -44,9 +44,9 @@ export class SplitviewComponent extends Resizable {
|
|
|
44
44
|
? this.splitview.size
|
|
45
45
|
: this.splitview.orthogonalSize;
|
|
46
46
|
}
|
|
47
|
-
constructor(
|
|
47
|
+
constructor(container, options) {
|
|
48
48
|
var _a;
|
|
49
|
-
super(
|
|
49
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
50
50
|
this._splitviewChangeDisposable = new MutableDisposable();
|
|
51
51
|
this._panels = new Map();
|
|
52
52
|
this._onDidLayoutfromJSON = new Emitter();
|
|
@@ -57,8 +57,12 @@ export class SplitviewComponent extends Resizable {
|
|
|
57
57
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
58
58
|
this._onDidLayoutChange = new Emitter();
|
|
59
59
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
60
|
+
this.element.style.height = '100%';
|
|
61
|
+
this.element.style.width = '100%';
|
|
60
62
|
this._classNames = new Classnames(this.element);
|
|
61
63
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
64
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
65
|
+
container.appendChild(this.element);
|
|
62
66
|
this._options = options;
|
|
63
67
|
this.splitview = new Splitview(this.element, options);
|
|
64
68
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|