dockview-core 1.16.1 → 1.17.1
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/dnd/groupDragHandler.js +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.js +2 -2
- package/dist/cjs/dockview/components/tab/tab.js +1 -1
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +2 -2
- package/dist/cjs/dockview/components/watermark/watermark.d.ts +0 -7
- package/dist/cjs/dockview/components/watermark/watermark.js +3 -18
- package/dist/cjs/dockview/deserializer.js +4 -0
- package/dist/cjs/dockview/dockviewComponent.d.ts +2 -0
- package/dist/cjs/dockview/dockviewComponent.js +76 -58
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +4 -0
- package/dist/cjs/dockview/dockviewGroupPanel.js +49 -2
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +4 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +0 -1
- package/dist/cjs/dockview/dockviewPanel.d.ts +14 -1
- package/dist/cjs/dockview/dockviewPanel.js +36 -0
- package/dist/cjs/dockview/options.d.ts +16 -9
- package/dist/cjs/dockview/types.d.ts +5 -2
- package/dist/cjs/dom.d.ts +7 -0
- package/dist/cjs/dom.js +63 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +2 -3
- package/dist/cjs/gridview/baseComponentGridview.js +28 -51
- package/dist/cjs/gridview/gridviewComponent.js +1 -2
- package/dist/cjs/gridview/gridviewPanel.d.ts +6 -0
- package/dist/cjs/overlay/overlay.js +8 -8
- package/dist/cjs/paneview/paneviewComponent.d.ts +1 -1
- package/dist/cjs/paneview/paneviewComponent.js +25 -63
- package/dist/cjs/splitview/splitviewComponent.d.ts +1 -1
- package/dist/cjs/splitview/splitviewComponent.js +29 -69
- package/dist/dockview-core.amd.js +221 -136
- 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 +220 -135
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +221 -136
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +221 -136
- 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 +221 -136
- 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 +220 -135
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dnd/groupDragHandler.js +1 -1
- package/dist/esm/dockview/components/tab/defaultTab.js +2 -2
- package/dist/esm/dockview/components/tab/tab.js +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +2 -2
- package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -7
- package/dist/esm/dockview/components/watermark/watermark.js +3 -18
- package/dist/esm/dockview/deserializer.js +4 -0
- package/dist/esm/dockview/dockviewComponent.d.ts +2 -0
- package/dist/esm/dockview/dockviewComponent.js +75 -54
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +4 -0
- package/dist/esm/dockview/dockviewGroupPanel.js +33 -2
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +4 -0
- package/dist/esm/dockview/dockviewGroupPanelModel.js +0 -1
- package/dist/esm/dockview/dockviewPanel.d.ts +14 -1
- package/dist/esm/dockview/dockviewPanel.js +20 -0
- package/dist/esm/dockview/options.d.ts +16 -9
- package/dist/esm/dockview/types.d.ts +5 -2
- package/dist/esm/dom.d.ts +7 -0
- package/dist/esm/dom.js +36 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +2 -3
- package/dist/esm/gridview/baseComponentGridview.js +26 -17
- package/dist/esm/gridview/gridviewComponent.js +1 -2
- package/dist/esm/gridview/gridviewPanel.d.ts +6 -0
- package/dist/esm/overlay/overlay.js +8 -8
- package/dist/esm/paneview/paneviewComponent.d.ts +1 -1
- package/dist/esm/paneview/paneviewComponent.js +8 -14
- package/dist/esm/splitview/splitviewComponent.d.ts +1 -1
- package/dist/esm/splitview/splitviewComponent.js +10 -18
- package/dist/styles/dockview.css +1 -1
- package/package.json +1 -1
package/dist/esm/dom.d.ts
CHANGED
|
@@ -30,3 +30,10 @@ export declare function addTestId(element: HTMLElement, id: string): void;
|
|
|
30
30
|
export declare function disableIframePointEvents(): {
|
|
31
31
|
release: () => void;
|
|
32
32
|
};
|
|
33
|
+
export declare function getDockviewTheme(element: HTMLElement): string | undefined;
|
|
34
|
+
export declare class Classnames {
|
|
35
|
+
private readonly element;
|
|
36
|
+
private _classNames;
|
|
37
|
+
constructor(element: HTMLElement);
|
|
38
|
+
setClassNames(classNames: string): void;
|
|
39
|
+
}
|
package/dist/esm/dom.js
CHANGED
|
@@ -202,3 +202,39 @@ export function disableIframePointEvents() {
|
|
|
202
202
|
},
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
+
export function getDockviewTheme(element) {
|
|
206
|
+
function toClassList(element) {
|
|
207
|
+
const list = [];
|
|
208
|
+
for (let i = 0; i < element.classList.length; i++) {
|
|
209
|
+
list.push(element.classList.item(i));
|
|
210
|
+
}
|
|
211
|
+
return list;
|
|
212
|
+
}
|
|
213
|
+
let theme = undefined;
|
|
214
|
+
let parent = element;
|
|
215
|
+
while (parent !== null) {
|
|
216
|
+
theme = toClassList(parent).find((cls) => cls.startsWith('dockview-theme-'));
|
|
217
|
+
if (typeof theme === 'string') {
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
parent = parent.parentElement;
|
|
221
|
+
}
|
|
222
|
+
return theme;
|
|
223
|
+
}
|
|
224
|
+
export class Classnames {
|
|
225
|
+
constructor(element) {
|
|
226
|
+
this.element = element;
|
|
227
|
+
this._classNames = [];
|
|
228
|
+
}
|
|
229
|
+
setClassNames(classNames) {
|
|
230
|
+
for (const className of this._classNames) {
|
|
231
|
+
toggleClass(this.element, className, false);
|
|
232
|
+
}
|
|
233
|
+
this._classNames = classNames
|
|
234
|
+
.split(' ')
|
|
235
|
+
.filter((v) => v.trim().length > 0);
|
|
236
|
+
for (const className of this._classNames) {
|
|
237
|
+
toggleClass(this.element, className, true);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -12,7 +12,6 @@ export interface BaseGridOptions {
|
|
|
12
12
|
readonly proportionalLayout: boolean;
|
|
13
13
|
readonly orientation: Orientation;
|
|
14
14
|
readonly styles?: ISplitviewStyles;
|
|
15
|
-
readonly parentElement: HTMLElement;
|
|
16
15
|
readonly disableAutoResizing?: boolean;
|
|
17
16
|
readonly locked?: boolean;
|
|
18
17
|
readonly margin?: number;
|
|
@@ -63,7 +62,7 @@ export declare abstract class BaseGrid<T extends IGridPanelView> extends Resizab
|
|
|
63
62
|
readonly onDidLayoutChange: Event<void>;
|
|
64
63
|
private readonly _onDidViewVisibilityChangeMicroTaskQueue;
|
|
65
64
|
readonly onDidViewVisibilityChangeMicroTaskQueue: Event<void>;
|
|
66
|
-
private
|
|
65
|
+
private readonly _classNames;
|
|
67
66
|
get id(): string;
|
|
68
67
|
get size(): number;
|
|
69
68
|
get groups(): T[];
|
|
@@ -76,7 +75,7 @@ export declare abstract class BaseGrid<T extends IGridPanelView> extends Resizab
|
|
|
76
75
|
get activeGroup(): T | undefined;
|
|
77
76
|
get locked(): boolean;
|
|
78
77
|
set locked(value: boolean);
|
|
79
|
-
constructor(options: BaseGridOptions);
|
|
78
|
+
constructor(parentElement: HTMLElement, options: BaseGridOptions);
|
|
80
79
|
abstract toJSON(): object;
|
|
81
80
|
abstract fromJSON(data: any): void;
|
|
82
81
|
abstract clear(): void;
|
|
@@ -4,7 +4,7 @@ import { Disposable } from '../lifecycle';
|
|
|
4
4
|
import { sequentialNumberGenerator } from '../math';
|
|
5
5
|
import { Sizing } from '../splitview/splitview';
|
|
6
6
|
import { Resizable } from '../resizable';
|
|
7
|
-
import {
|
|
7
|
+
import { Classnames } from '../dom';
|
|
8
8
|
const nextLayoutId = sequentialNumberGenerator();
|
|
9
9
|
export function toTarget(direction) {
|
|
10
10
|
switch (direction) {
|
|
@@ -58,8 +58,8 @@ export class BaseGrid extends Resizable {
|
|
|
58
58
|
set locked(value) {
|
|
59
59
|
this.gridview.locked = value;
|
|
60
60
|
}
|
|
61
|
-
constructor(options) {
|
|
62
|
-
var _a
|
|
61
|
+
constructor(parentElement, options) {
|
|
62
|
+
var _a;
|
|
63
63
|
super(document.createElement('div'), options.disableAutoResizing);
|
|
64
64
|
this._id = nextLayoutId.next();
|
|
65
65
|
this._groups = new Map();
|
|
@@ -73,14 +73,11 @@ export class BaseGrid extends Resizable {
|
|
|
73
73
|
this.onDidLayoutChange = this._bufferOnDidLayoutChange.onEvent;
|
|
74
74
|
this._onDidViewVisibilityChangeMicroTaskQueue = new AsapEvent();
|
|
75
75
|
this.onDidViewVisibilityChangeMicroTaskQueue = this._onDidViewVisibilityChangeMicroTaskQueue.onEvent;
|
|
76
|
-
this.classNames = [];
|
|
77
76
|
this.element.style.height = '100%';
|
|
78
77
|
this.element.style.width = '100%';
|
|
79
|
-
this.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
options.parentElement.appendChild(this.element);
|
|
78
|
+
this._classNames = new Classnames(this.element);
|
|
79
|
+
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
80
|
+
parentElement.appendChild(this.element);
|
|
84
81
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
85
82
|
this.gridview.locked = !!options.locked;
|
|
86
83
|
this.element.appendChild(this.gridview.element);
|
|
@@ -104,15 +101,27 @@ export class BaseGrid extends Resizable {
|
|
|
104
101
|
return this.gridview.isViewVisible(getGridLocation(panel.element));
|
|
105
102
|
}
|
|
106
103
|
updateOptions(options) {
|
|
107
|
-
var _a, _b;
|
|
104
|
+
var _a, _b, _c, _d;
|
|
105
|
+
if (typeof options.proportionalLayout === 'boolean') {
|
|
106
|
+
// this.gridview.proportionalLayout = options.proportionalLayout; // not supported
|
|
107
|
+
}
|
|
108
|
+
if (options.orientation) {
|
|
109
|
+
this.gridview.orientation = options.orientation;
|
|
110
|
+
}
|
|
111
|
+
if ('styles' in options) {
|
|
112
|
+
// this.gridview.styles = options.styles; // not supported
|
|
113
|
+
}
|
|
114
|
+
if ('disableResizing' in options) {
|
|
115
|
+
this.disableResizing = (_a = options.disableAutoResizing) !== null && _a !== void 0 ? _a : false;
|
|
116
|
+
}
|
|
117
|
+
if ('locked' in options) {
|
|
118
|
+
this.locked = (_b = options.locked) !== null && _b !== void 0 ? _b : false;
|
|
119
|
+
}
|
|
120
|
+
if ('margin' in options) {
|
|
121
|
+
this.gridview.margin = (_c = options.margin) !== null && _c !== void 0 ? _c : 0;
|
|
122
|
+
}
|
|
108
123
|
if ('className' in options) {
|
|
109
|
-
|
|
110
|
-
toggleClass(this.element, className, false);
|
|
111
|
-
}
|
|
112
|
-
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
113
|
-
for (const className of this.classNames) {
|
|
114
|
-
toggleClass(this.element, className, true);
|
|
115
|
-
}
|
|
124
|
+
this._classNames.setClassNames((_d = options.className) !== null && _d !== void 0 ? _d : '');
|
|
116
125
|
}
|
|
117
126
|
}
|
|
118
127
|
maximizeGroup(panel) {
|
|
@@ -21,8 +21,7 @@ export class GridviewComponent extends BaseGrid {
|
|
|
21
21
|
this._deserializer = value;
|
|
22
22
|
}
|
|
23
23
|
constructor(parentElement, options) {
|
|
24
|
-
super({
|
|
25
|
-
parentElement: parentElement,
|
|
24
|
+
super(parentElement, {
|
|
26
25
|
proportionalLayout: options.proportionalLayout,
|
|
27
26
|
orientation: options.orientation,
|
|
28
27
|
styles: options.styles,
|
|
@@ -6,6 +6,12 @@ import { LayoutPriority } from '../splitview/splitview';
|
|
|
6
6
|
import { Event } from '../events';
|
|
7
7
|
import { IViewSize } from './gridview';
|
|
8
8
|
import { BaseGrid, IGridPanelView } from './baseComponentGridview';
|
|
9
|
+
export interface Contraints {
|
|
10
|
+
minimumWidth?: number;
|
|
11
|
+
maximumWidth?: number;
|
|
12
|
+
minimumHeight?: number;
|
|
13
|
+
maximumHeight?: number;
|
|
14
|
+
}
|
|
9
15
|
export interface GridviewInitParameters extends PanelInitParameters {
|
|
10
16
|
minimumWidth?: number;
|
|
11
17
|
maximumWidth?: number;
|
|
@@ -154,7 +154,7 @@ export class Overlay extends CompositeDisposable {
|
|
|
154
154
|
dispose: () => {
|
|
155
155
|
iframes.release();
|
|
156
156
|
},
|
|
157
|
-
}, addDisposableWindowListener(window, '
|
|
157
|
+
}, addDisposableWindowListener(window, 'pointermove', (e) => {
|
|
158
158
|
const containerRect = this.options.container.getBoundingClientRect();
|
|
159
159
|
const x = e.clientX - containerRect.left;
|
|
160
160
|
const y = e.clientY - containerRect.top;
|
|
@@ -191,13 +191,13 @@ export class Overlay extends CompositeDisposable {
|
|
|
191
191
|
bounds.right = right;
|
|
192
192
|
}
|
|
193
193
|
this.setBounds(bounds);
|
|
194
|
-
}), addDisposableWindowListener(window, '
|
|
194
|
+
}), addDisposableWindowListener(window, 'pointerup', () => {
|
|
195
195
|
toggleClass(this._element, 'dv-resize-container-dragging', false);
|
|
196
196
|
move.dispose();
|
|
197
197
|
this._onDidChangeEnd.fire();
|
|
198
198
|
}));
|
|
199
199
|
};
|
|
200
|
-
this.addDisposables(move, addDisposableListener(dragTarget, '
|
|
200
|
+
this.addDisposables(move, addDisposableListener(dragTarget, 'pointerdown', (event) => {
|
|
201
201
|
if (event.defaultPrevented) {
|
|
202
202
|
event.preventDefault();
|
|
203
203
|
return;
|
|
@@ -208,7 +208,7 @@ export class Overlay extends CompositeDisposable {
|
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
210
|
track();
|
|
211
|
-
}), addDisposableListener(this.options.content, '
|
|
211
|
+
}), addDisposableListener(this.options.content, 'pointerdown', (event) => {
|
|
212
212
|
if (event.defaultPrevented) {
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
@@ -220,7 +220,7 @@ export class Overlay extends CompositeDisposable {
|
|
|
220
220
|
if (event.shiftKey) {
|
|
221
221
|
track();
|
|
222
222
|
}
|
|
223
|
-
}), addDisposableListener(this.options.content, '
|
|
223
|
+
}), addDisposableListener(this.options.content, 'pointerdown', () => {
|
|
224
224
|
arialLevelTracker.push(this._element);
|
|
225
225
|
}, true));
|
|
226
226
|
if (options.inDragMode) {
|
|
@@ -232,11 +232,11 @@ export class Overlay extends CompositeDisposable {
|
|
|
232
232
|
resizeHandleElement.className = `dv-resize-handle-${direction}`;
|
|
233
233
|
this._element.appendChild(resizeHandleElement);
|
|
234
234
|
const move = new MutableDisposable();
|
|
235
|
-
this.addDisposables(move, addDisposableListener(resizeHandleElement, '
|
|
235
|
+
this.addDisposables(move, addDisposableListener(resizeHandleElement, 'pointerdown', (e) => {
|
|
236
236
|
e.preventDefault();
|
|
237
237
|
let startPosition = null;
|
|
238
238
|
const iframes = disableIframePointEvents();
|
|
239
|
-
move.value = new CompositeDisposable(addDisposableWindowListener(window, '
|
|
239
|
+
move.value = new CompositeDisposable(addDisposableWindowListener(window, 'pointermove', (e) => {
|
|
240
240
|
const containerRect = this.options.container.getBoundingClientRect();
|
|
241
241
|
const overlayRect = this._element.getBoundingClientRect();
|
|
242
242
|
const y = e.clientY - containerRect.top;
|
|
@@ -360,7 +360,7 @@ export class Overlay extends CompositeDisposable {
|
|
|
360
360
|
dispose: () => {
|
|
361
361
|
iframes.release();
|
|
362
362
|
},
|
|
363
|
-
}, addDisposableWindowListener(window, '
|
|
363
|
+
}, addDisposableWindowListener(window, 'pointerup', () => {
|
|
364
364
|
move.dispose();
|
|
365
365
|
this._onDidChangeEnd.fire();
|
|
366
366
|
}));
|
|
@@ -103,7 +103,7 @@ export declare class PaneviewComponent extends Resizable implements IPaneviewCom
|
|
|
103
103
|
readonly onDidAddView: Event<PaneviewPanel>;
|
|
104
104
|
private readonly _onDidRemoveView;
|
|
105
105
|
readonly onDidRemoveView: Event<PaneviewPanel>;
|
|
106
|
-
private
|
|
106
|
+
private readonly _classNames;
|
|
107
107
|
get id(): string;
|
|
108
108
|
get panels(): PaneviewPanel[];
|
|
109
109
|
set paneview(value: Paneview);
|
|
@@ -8,7 +8,7 @@ import { DraggablePaneviewPanel, } from './draggablePaneviewPanel';
|
|
|
8
8
|
import { DefaultHeader } from './defaultPaneviewHeader';
|
|
9
9
|
import { sequentialNumberGenerator } from '../math';
|
|
10
10
|
import { Resizable } from '../resizable';
|
|
11
|
-
import {
|
|
11
|
+
import { Classnames } from '../dom';
|
|
12
12
|
const nextLayoutId = sequentialNumberGenerator();
|
|
13
13
|
export class PaneFramework extends DraggablePaneviewPanel {
|
|
14
14
|
constructor(options) {
|
|
@@ -58,7 +58,7 @@ export class PaneviewComponent extends Resizable {
|
|
|
58
58
|
return this._options;
|
|
59
59
|
}
|
|
60
60
|
constructor(parentElement, options) {
|
|
61
|
-
var _a
|
|
61
|
+
var _a;
|
|
62
62
|
super(parentElement, options.disableAutoResizing);
|
|
63
63
|
this._id = nextLayoutId.next();
|
|
64
64
|
this._disposable = new MutableDisposable();
|
|
@@ -73,12 +73,9 @@ export class PaneviewComponent extends Resizable {
|
|
|
73
73
|
this.onDidAddView = this._onDidAddView.event;
|
|
74
74
|
this._onDidRemoveView = new Emitter();
|
|
75
75
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
76
|
-
this.classNames = [];
|
|
77
76
|
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
78
|
-
this.
|
|
79
|
-
|
|
80
|
-
toggleClass(this.element, className, true);
|
|
81
|
-
}
|
|
77
|
+
this._classNames = new Classnames(this.element);
|
|
78
|
+
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
82
79
|
this._options = options;
|
|
83
80
|
if (!options.components) {
|
|
84
81
|
options.components = {};
|
|
@@ -102,13 +99,10 @@ export class PaneviewComponent extends Resizable {
|
|
|
102
99
|
updateOptions(options) {
|
|
103
100
|
var _a, _b;
|
|
104
101
|
if ('className' in options) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.
|
|
109
|
-
for (const className of this.classNames) {
|
|
110
|
-
toggleClass(this.element, className, true);
|
|
111
|
-
}
|
|
102
|
+
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
103
|
+
}
|
|
104
|
+
if ('disableResizing' in options) {
|
|
105
|
+
this.disableResizing = (_b = options.disableAutoResizing) !== null && _b !== void 0 ? _b : false;
|
|
112
106
|
}
|
|
113
107
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
114
108
|
}
|
|
@@ -72,7 +72,7 @@ export declare class SplitviewComponent extends Resizable implements ISplitviewC
|
|
|
72
72
|
readonly onDidRemoveView: Event<IView>;
|
|
73
73
|
private readonly _onDidLayoutChange;
|
|
74
74
|
readonly onDidLayoutChange: Event<void>;
|
|
75
|
-
private
|
|
75
|
+
private readonly _classNames;
|
|
76
76
|
get panels(): SplitviewPanel[];
|
|
77
77
|
get options(): SplitviewComponentOptions;
|
|
78
78
|
get length(): number;
|
|
@@ -3,7 +3,7 @@ import { Orientation, Sizing, Splitview, } from './splitview';
|
|
|
3
3
|
import { Emitter } from '../events';
|
|
4
4
|
import { createComponent } from '../panel/componentFactory';
|
|
5
5
|
import { Resizable } from '../resizable';
|
|
6
|
-
import {
|
|
6
|
+
import { Classnames } from '../dom';
|
|
7
7
|
/**
|
|
8
8
|
* A high-level implementation of splitview that works using 'panels'
|
|
9
9
|
*/
|
|
@@ -46,7 +46,7 @@ export class SplitviewComponent extends Resizable {
|
|
|
46
46
|
: this.splitview.orthogonalSize;
|
|
47
47
|
}
|
|
48
48
|
constructor(parentElement, options) {
|
|
49
|
-
var _a
|
|
49
|
+
var _a;
|
|
50
50
|
super(parentElement, options.disableAutoResizing);
|
|
51
51
|
this._splitviewChangeDisposable = new MutableDisposable();
|
|
52
52
|
this._panels = new Map();
|
|
@@ -58,11 +58,8 @@ export class SplitviewComponent extends Resizable {
|
|
|
58
58
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
59
59
|
this._onDidLayoutChange = new Emitter();
|
|
60
60
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
for (const className of this.classNames) {
|
|
64
|
-
toggleClass(this.element, className, true);
|
|
65
|
-
}
|
|
61
|
+
this._classNames = new Classnames(this.element);
|
|
62
|
+
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
66
63
|
this._options = options;
|
|
67
64
|
if (!options.components) {
|
|
68
65
|
options.components = {};
|
|
@@ -76,20 +73,15 @@ export class SplitviewComponent extends Resizable {
|
|
|
76
73
|
updateOptions(options) {
|
|
77
74
|
var _a, _b;
|
|
78
75
|
if ('className' in options) {
|
|
79
|
-
|
|
80
|
-
toggleClass(this.element, className, false);
|
|
81
|
-
}
|
|
82
|
-
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
83
|
-
for (const className of this.classNames) {
|
|
84
|
-
toggleClass(this.element, className, true);
|
|
85
|
-
}
|
|
76
|
+
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
86
77
|
}
|
|
87
|
-
|
|
88
|
-
this.options.
|
|
89
|
-
|
|
90
|
-
if (
|
|
78
|
+
if ('disableResizing' in options) {
|
|
79
|
+
this.disableResizing = (_b = options.disableAutoResizing) !== null && _b !== void 0 ? _b : false;
|
|
80
|
+
}
|
|
81
|
+
if (typeof options.orientation === 'string') {
|
|
91
82
|
this.splitview.orientation = options.orientation;
|
|
92
83
|
}
|
|
84
|
+
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
93
85
|
this.splitview.layout(this.splitview.size, this.splitview.orthogonalSize);
|
|
94
86
|
}
|
|
95
87
|
focus() {
|
package/dist/styles/dockview.css
CHANGED
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
--dv-group-view-background-color: #ebeced;
|
|
201
201
|
--dv-tabs-and-actions-container-background-color: #fcfcfc;
|
|
202
202
|
--dv-activegroup-visiblepanel-tab-background-color: #f0f1f2;
|
|
203
|
-
--dv-activegroup-hiddenpanel-tab-background-color:
|
|
203
|
+
--dv-activegroup-hiddenpanel-tab-background-color: #fcfcfc;
|
|
204
204
|
--dv-inactivegroup-visiblepanel-tab-background-color: #f0f1f2;
|
|
205
205
|
--dv-inactivegroup-hiddenpanel-tab-background-color: #fcfcfc;
|
|
206
206
|
--dv-tab-divider-color: transparent;
|