dockview-core 1.15.3 → 1.16.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/api/component.api.d.ts +32 -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 +60 -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 +5 -2
- package/dist/cjs/gridview/baseComponentGridview.js +54 -3
- package/dist/cjs/gridview/gridviewComponent.d.ts +3 -4
- package/dist/cjs/gridview/gridviewComponent.js +4 -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 +2 -1
- package/dist/cjs/paneview/paneviewComponent.js +68 -19
- package/dist/cjs/splitview/options.d.ts +1 -1
- package/dist/cjs/splitview/splitview.js +64 -71
- package/dist/cjs/splitview/splitviewComponent.d.ts +5 -5
- package/dist/cjs/splitview/splitviewComponent.js +70 -21
- package/dist/dockview-core.amd.js +301 -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 +300 -97
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +301 -98
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +298 -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 +301 -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 +300 -97
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/component.api.d.ts +32 -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 +48 -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 +5 -2
- package/dist/esm/gridview/baseComponentGridview.js +19 -0
- package/dist/esm/gridview/gridviewComponent.d.ts +3 -4
- package/dist/esm/gridview/gridviewComponent.js +4 -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 +2 -1
- package/dist/esm/paneview/paneviewComponent.js +19 -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 +5 -5
- package/dist/esm/splitview/splitviewComponent.js +19 -2
- package/dist/styles/dockview.css +78 -82
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.16.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -535,6 +535,26 @@
|
|
|
535
535
|
function addTestId(element, id) {
|
|
536
536
|
element.setAttribute('data-testid', id);
|
|
537
537
|
}
|
|
538
|
+
function disableIframePointEvents() {
|
|
539
|
+
const iframes = [
|
|
540
|
+
...getElementsByTagName('iframe'),
|
|
541
|
+
...getElementsByTagName('webview'),
|
|
542
|
+
];
|
|
543
|
+
const original = new WeakMap(); // don't hold onto HTMLElement references longer than required
|
|
544
|
+
for (const iframe of iframes) {
|
|
545
|
+
original.set(iframe, iframe.style.pointerEvents);
|
|
546
|
+
iframe.style.pointerEvents = 'none';
|
|
547
|
+
}
|
|
548
|
+
return {
|
|
549
|
+
release: () => {
|
|
550
|
+
var _a;
|
|
551
|
+
for (const iframe of iframes) {
|
|
552
|
+
iframe.style.pointerEvents = (_a = original.get(iframe)) !== null && _a !== void 0 ? _a : 'auto';
|
|
553
|
+
}
|
|
554
|
+
iframes.splice(0, iframes.length); // don't hold onto HTMLElement references longer than required
|
|
555
|
+
},
|
|
556
|
+
};
|
|
557
|
+
}
|
|
538
558
|
|
|
539
559
|
function tail(arr) {
|
|
540
560
|
if (arr.length === 0) {
|
|
@@ -1057,13 +1077,7 @@
|
|
|
1057
1077
|
for (const item of this.viewItems) {
|
|
1058
1078
|
item.enabled = false;
|
|
1059
1079
|
}
|
|
1060
|
-
const iframes =
|
|
1061
|
-
...getElementsByTagName('iframe'),
|
|
1062
|
-
...getElementsByTagName('webview'),
|
|
1063
|
-
];
|
|
1064
|
-
for (const iframe of iframes) {
|
|
1065
|
-
iframe.style.pointerEvents = 'none';
|
|
1066
|
-
}
|
|
1080
|
+
const iframes = disableIframePointEvents();
|
|
1067
1081
|
const start = this._orientation === exports.Orientation.HORIZONTAL
|
|
1068
1082
|
? event.clientX
|
|
1069
1083
|
: event.clientY;
|
|
@@ -1125,9 +1139,7 @@
|
|
|
1125
1139
|
for (const item of this.viewItems) {
|
|
1126
1140
|
item.enabled = true;
|
|
1127
1141
|
}
|
|
1128
|
-
|
|
1129
|
-
iframe.style.pointerEvents = 'auto';
|
|
1130
|
-
}
|
|
1142
|
+
iframes.release();
|
|
1131
1143
|
this.saveProportions();
|
|
1132
1144
|
document.removeEventListener('pointermove', onPointerMove);
|
|
1133
1145
|
document.removeEventListener('pointerup', end);
|
|
@@ -1294,29 +1306,47 @@
|
|
|
1294
1306
|
if (this.viewItems.length === 0) {
|
|
1295
1307
|
return;
|
|
1296
1308
|
}
|
|
1297
|
-
const
|
|
1298
|
-
const
|
|
1309
|
+
const visibleViewItems = this.viewItems.filter((i) => i.visible);
|
|
1310
|
+
const sashCount = Math.max(0, visibleViewItems.length - 1);
|
|
1311
|
+
const marginReducedSize = (this.margin * sashCount) / Math.max(1, visibleViewItems.length);
|
|
1299
1312
|
let totalLeftOffset = 0;
|
|
1300
1313
|
const viewLeftOffsets = [];
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
this.sashes[i].container.style.left = `${offset}px`;
|
|
1307
|
-
this.sashes[i].container.style.top = `0px`;
|
|
1314
|
+
const sashWidth = 4; // hardcoded in css
|
|
1315
|
+
const runningVisiblePanelCount = this.viewItems.reduce((arr, viewItem, i) => {
|
|
1316
|
+
const flag = viewItem.visible ? 1 : 0;
|
|
1317
|
+
if (i === 0) {
|
|
1318
|
+
arr.push(flag);
|
|
1308
1319
|
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
this.sashes[i].container.style.top = `${offset}px`;
|
|
1320
|
+
else {
|
|
1321
|
+
arr.push(arr[i - 1] + flag);
|
|
1312
1322
|
}
|
|
1313
|
-
|
|
1323
|
+
return arr;
|
|
1324
|
+
}, []);
|
|
1325
|
+
// calculate both view and cash positions
|
|
1314
1326
|
this.viewItems.forEach((view, i) => {
|
|
1315
|
-
|
|
1316
|
-
|
|
1327
|
+
totalLeftOffset += this.viewItems[i].size;
|
|
1328
|
+
viewLeftOffsets.push(totalLeftOffset);
|
|
1329
|
+
const size = view.visible ? view.size - marginReducedSize : 0;
|
|
1330
|
+
const visiblePanelsBeforeThisView = Math.max(0, runningVisiblePanelCount[i] - 1);
|
|
1331
|
+
const offset = i === 0 || visiblePanelsBeforeThisView === 0
|
|
1317
1332
|
? 0
|
|
1318
1333
|
: viewLeftOffsets[i - 1] +
|
|
1319
|
-
(
|
|
1334
|
+
(visiblePanelsBeforeThisView / sashCount) * marginReducedSize;
|
|
1335
|
+
if (i < this.viewItems.length - 1) {
|
|
1336
|
+
// calculate sash position
|
|
1337
|
+
const newSize = view.visible
|
|
1338
|
+
? offset + size - sashWidth / 2 + this.margin / 2
|
|
1339
|
+
: offset;
|
|
1340
|
+
if (this._orientation === exports.Orientation.HORIZONTAL) {
|
|
1341
|
+
this.sashes[i].container.style.left = `${newSize}px`;
|
|
1342
|
+
this.sashes[i].container.style.top = `0px`;
|
|
1343
|
+
}
|
|
1344
|
+
if (this._orientation === exports.Orientation.VERTICAL) {
|
|
1345
|
+
this.sashes[i].container.style.left = `0px`;
|
|
1346
|
+
this.sashes[i].container.style.top = `${newSize}px`;
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
// calculate view position
|
|
1320
1350
|
if (this._orientation === exports.Orientation.HORIZONTAL) {
|
|
1321
1351
|
view.container.style.width = `${size}px`;
|
|
1322
1352
|
view.container.style.left = `${offset}px`;
|
|
@@ -2645,6 +2675,7 @@
|
|
|
2645
2675
|
this.gridview.locked = value;
|
|
2646
2676
|
}
|
|
2647
2677
|
constructor(options) {
|
|
2678
|
+
var _a, _b;
|
|
2648
2679
|
super(document.createElement('div'), options.disableAutoResizing);
|
|
2649
2680
|
this._id = nextLayoutId$1.next();
|
|
2650
2681
|
this._groups = new Map();
|
|
@@ -2658,8 +2689,13 @@
|
|
|
2658
2689
|
this.onDidLayoutChange = this._bufferOnDidLayoutChange.onEvent;
|
|
2659
2690
|
this._onDidViewVisibilityChangeMicroTaskQueue = new AsapEvent();
|
|
2660
2691
|
this.onDidViewVisibilityChangeMicroTaskQueue = this._onDidViewVisibilityChangeMicroTaskQueue.onEvent;
|
|
2692
|
+
this.classNames = [];
|
|
2661
2693
|
this.element.style.height = '100%';
|
|
2662
2694
|
this.element.style.width = '100%';
|
|
2695
|
+
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
2696
|
+
for (const className of this.classNames) {
|
|
2697
|
+
toggleClass(this.element, className, true);
|
|
2698
|
+
}
|
|
2663
2699
|
options.parentElement.appendChild(this.element);
|
|
2664
2700
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
2665
2701
|
this.gridview.locked = !!options.locked;
|
|
@@ -2683,6 +2719,18 @@
|
|
|
2683
2719
|
isVisible(panel) {
|
|
2684
2720
|
return this.gridview.isViewVisible(getGridLocation(panel.element));
|
|
2685
2721
|
}
|
|
2722
|
+
updateOptions(options) {
|
|
2723
|
+
var _a, _b;
|
|
2724
|
+
if ('className' in options) {
|
|
2725
|
+
for (const className of this.classNames) {
|
|
2726
|
+
toggleClass(this.element, className, false);
|
|
2727
|
+
}
|
|
2728
|
+
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
2729
|
+
for (const className of this.classNames) {
|
|
2730
|
+
toggleClass(this.element, className, true);
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2686
2734
|
maximizeGroup(panel) {
|
|
2687
2735
|
this.gridview.maximizeView(panel);
|
|
2688
2736
|
this.doSetGroupActive(panel);
|
|
@@ -2863,12 +2911,6 @@
|
|
|
2863
2911
|
constructor(component) {
|
|
2864
2912
|
this.component = component;
|
|
2865
2913
|
}
|
|
2866
|
-
/**
|
|
2867
|
-
* Update configuratable options.
|
|
2868
|
-
*/
|
|
2869
|
-
updateOptions(options) {
|
|
2870
|
-
this.component.updateOptions(options);
|
|
2871
|
-
}
|
|
2872
2914
|
/**
|
|
2873
2915
|
* Removes an existing panel and optionally provide a `Sizing` method
|
|
2874
2916
|
* for the subsequent resize.
|
|
@@ -2922,6 +2964,18 @@
|
|
|
2922
2964
|
clear() {
|
|
2923
2965
|
this.component.clear();
|
|
2924
2966
|
}
|
|
2967
|
+
/**
|
|
2968
|
+
* Update configuratable options.
|
|
2969
|
+
*/
|
|
2970
|
+
updateOptions(options) {
|
|
2971
|
+
this.component.updateOptions(options);
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
2975
|
+
*/
|
|
2976
|
+
dispose() {
|
|
2977
|
+
this.component.dispose();
|
|
2978
|
+
}
|
|
2925
2979
|
}
|
|
2926
2980
|
class PaneviewApi {
|
|
2927
2981
|
/**
|
|
@@ -3049,6 +3103,18 @@
|
|
|
3049
3103
|
clear() {
|
|
3050
3104
|
this.component.clear();
|
|
3051
3105
|
}
|
|
3106
|
+
/**
|
|
3107
|
+
* Update configuratable options.
|
|
3108
|
+
*/
|
|
3109
|
+
updateOptions(options) {
|
|
3110
|
+
this.component.updateOptions(options);
|
|
3111
|
+
}
|
|
3112
|
+
/**
|
|
3113
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
3114
|
+
*/
|
|
3115
|
+
dispose() {
|
|
3116
|
+
this.component.dispose();
|
|
3117
|
+
}
|
|
3052
3118
|
}
|
|
3053
3119
|
class GridviewApi {
|
|
3054
3120
|
/**
|
|
@@ -3189,6 +3255,15 @@
|
|
|
3189
3255
|
clear() {
|
|
3190
3256
|
this.component.clear();
|
|
3191
3257
|
}
|
|
3258
|
+
updateOptions(options) {
|
|
3259
|
+
this.component.updateOptions(options);
|
|
3260
|
+
}
|
|
3261
|
+
/**
|
|
3262
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
3263
|
+
*/
|
|
3264
|
+
dispose() {
|
|
3265
|
+
this.component.dispose();
|
|
3266
|
+
}
|
|
3192
3267
|
}
|
|
3193
3268
|
class DockviewApi {
|
|
3194
3269
|
/**
|
|
@@ -3481,6 +3556,15 @@
|
|
|
3481
3556
|
setGap(gap) {
|
|
3482
3557
|
this.component.updateOptions({ gap });
|
|
3483
3558
|
}
|
|
3559
|
+
updateOptions(options) {
|
|
3560
|
+
this.component.updateOptions(options);
|
|
3561
|
+
}
|
|
3562
|
+
/**
|
|
3563
|
+
* Release resources and teardown component. Do not call when using framework versions of dockview.
|
|
3564
|
+
*/
|
|
3565
|
+
dispose() {
|
|
3566
|
+
this.component.dispose();
|
|
3567
|
+
}
|
|
3484
3568
|
}
|
|
3485
3569
|
|
|
3486
3570
|
class DragHandler extends CompositeDisposable {
|
|
@@ -3503,20 +3587,12 @@
|
|
|
3503
3587
|
event.preventDefault();
|
|
3504
3588
|
return;
|
|
3505
3589
|
}
|
|
3506
|
-
const iframes =
|
|
3507
|
-
...getElementsByTagName('iframe'),
|
|
3508
|
-
...getElementsByTagName('webview'),
|
|
3509
|
-
];
|
|
3590
|
+
const iframes = disableIframePointEvents();
|
|
3510
3591
|
this.pointerEventsDisposable.value = {
|
|
3511
3592
|
dispose: () => {
|
|
3512
|
-
|
|
3513
|
-
iframe.style.pointerEvents = 'auto';
|
|
3514
|
-
}
|
|
3593
|
+
iframes.release();
|
|
3515
3594
|
},
|
|
3516
3595
|
};
|
|
3517
|
-
for (const iframe of iframes) {
|
|
3518
|
-
iframe.style.pointerEvents = 'none';
|
|
3519
|
-
}
|
|
3520
3596
|
this.el.classList.add('dv-dragged');
|
|
3521
3597
|
setTimeout(() => this.el.classList.remove('dv-dragged'), 0);
|
|
3522
3598
|
this.dataDisposable.value = this.getData(event);
|
|
@@ -4680,7 +4756,7 @@
|
|
|
4680
4756
|
this._element.className = 'void-container';
|
|
4681
4757
|
this._element.tabIndex = 0;
|
|
4682
4758
|
this._element.draggable = true;
|
|
4683
|
-
this.addDisposables(this._onDrop, this._onDragStart, addDisposableListener(this._element, '
|
|
4759
|
+
this.addDisposables(this._onDrop, this._onDragStart, addDisposableListener(this._element, 'pointerdown', () => {
|
|
4684
4760
|
this.accessor.doSetGroupActive(this.group);
|
|
4685
4761
|
}));
|
|
4686
4762
|
const handler = new GroupDragHandler(this._element, accessor, group);
|
|
@@ -4995,6 +5071,7 @@
|
|
|
4995
5071
|
locked: undefined,
|
|
4996
5072
|
disableDnd: undefined,
|
|
4997
5073
|
gap: undefined,
|
|
5074
|
+
className: undefined,
|
|
4998
5075
|
};
|
|
4999
5076
|
return Object.keys(properties);
|
|
5000
5077
|
})();
|
|
@@ -5550,7 +5627,7 @@
|
|
|
5550
5627
|
group: this.groupPanel,
|
|
5551
5628
|
});
|
|
5552
5629
|
this.watermark = watermark;
|
|
5553
|
-
addDisposableListener(this.watermark.element, '
|
|
5630
|
+
addDisposableListener(this.watermark.element, 'pointerdown', () => {
|
|
5554
5631
|
if (!this.isActive) {
|
|
5555
5632
|
this.accessor.doSetGroupActive(this.groupPanel);
|
|
5556
5633
|
}
|
|
@@ -6115,7 +6192,7 @@
|
|
|
6115
6192
|
// forward the resize event to the group since if you want to resize a panel
|
|
6116
6193
|
// you are actually just resizing the panels parent which is the group
|
|
6117
6194
|
this.group.api.setSize(event);
|
|
6118
|
-
}), this.api.onDidRendererChange((
|
|
6195
|
+
}), this.api.onDidRendererChange(() => {
|
|
6119
6196
|
this.group.model.rerender(this);
|
|
6120
6197
|
}));
|
|
6121
6198
|
}
|
|
@@ -6451,17 +6528,30 @@
|
|
|
6451
6528
|
}
|
|
6452
6529
|
}
|
|
6453
6530
|
|
|
6454
|
-
const
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6531
|
+
const DEFAULT_OVERLAY_Z_INDEX = 999;
|
|
6532
|
+
class AriaLevelTracker {
|
|
6533
|
+
constructor() {
|
|
6534
|
+
this._orderedList = [];
|
|
6535
|
+
}
|
|
6536
|
+
push(element) {
|
|
6537
|
+
this._orderedList = [
|
|
6538
|
+
...this._orderedList.filter((item) => item !== element),
|
|
6539
|
+
element,
|
|
6540
|
+
];
|
|
6541
|
+
this.update();
|
|
6542
|
+
}
|
|
6543
|
+
destroy(element) {
|
|
6544
|
+
this._orderedList = this._orderedList.filter((item) => item !== element);
|
|
6545
|
+
this.update();
|
|
6546
|
+
}
|
|
6547
|
+
update() {
|
|
6548
|
+
for (let i = 0; i < this._orderedList.length; i++) {
|
|
6549
|
+
this._orderedList[i].setAttribute('aria-level', `${i}`);
|
|
6550
|
+
this._orderedList[i].style.zIndex = `${DEFAULT_OVERLAY_Z_INDEX + i * 2}`;
|
|
6459
6551
|
}
|
|
6460
|
-
toggleClass(element, 'dv-bring-to-front', true);
|
|
6461
|
-
previous = element;
|
|
6462
6552
|
}
|
|
6463
|
-
|
|
6464
|
-
|
|
6553
|
+
}
|
|
6554
|
+
const arialLevelTracker = new AriaLevelTracker();
|
|
6465
6555
|
class Overlay extends CompositeDisposable {
|
|
6466
6556
|
set minimumInViewportWidth(value) {
|
|
6467
6557
|
this.options.minimumInViewportWidth = value;
|
|
@@ -6469,6 +6559,9 @@
|
|
|
6469
6559
|
set minimumInViewportHeight(value) {
|
|
6470
6560
|
this.options.minimumInViewportHeight = value;
|
|
6471
6561
|
}
|
|
6562
|
+
get element() {
|
|
6563
|
+
return this._element;
|
|
6564
|
+
}
|
|
6472
6565
|
constructor(options) {
|
|
6473
6566
|
super();
|
|
6474
6567
|
this.options = options;
|
|
@@ -6491,6 +6584,10 @@
|
|
|
6491
6584
|
this.options.container.appendChild(this._element);
|
|
6492
6585
|
// if input bad resize within acceptable boundaries
|
|
6493
6586
|
this.setBounds(Object.assign(Object.assign(Object.assign(Object.assign({ height: this.options.height, width: this.options.width }, ('top' in this.options && { top: this.options.top })), ('bottom' in this.options && { bottom: this.options.bottom })), ('left' in this.options && { left: this.options.left })), ('right' in this.options && { right: this.options.right })));
|
|
6587
|
+
arialLevelTracker.push(this._element);
|
|
6588
|
+
}
|
|
6589
|
+
bringToFront() {
|
|
6590
|
+
arialLevelTracker.push(this._element);
|
|
6494
6591
|
}
|
|
6495
6592
|
setBounds(bounds = {}) {
|
|
6496
6593
|
if (typeof bounds.height === 'number') {
|
|
@@ -6578,18 +6675,10 @@
|
|
|
6578
6675
|
const move = new MutableDisposable();
|
|
6579
6676
|
const track = () => {
|
|
6580
6677
|
let offset = null;
|
|
6581
|
-
const iframes =
|
|
6582
|
-
...getElementsByTagName('iframe'),
|
|
6583
|
-
...getElementsByTagName('webview'),
|
|
6584
|
-
];
|
|
6585
|
-
for (const iframe of iframes) {
|
|
6586
|
-
iframe.style.pointerEvents = 'none';
|
|
6587
|
-
}
|
|
6678
|
+
const iframes = disableIframePointEvents();
|
|
6588
6679
|
move.value = new CompositeDisposable({
|
|
6589
6680
|
dispose: () => {
|
|
6590
|
-
|
|
6591
|
-
iframe.style.pointerEvents = 'auto';
|
|
6592
|
-
}
|
|
6681
|
+
iframes.release();
|
|
6593
6682
|
},
|
|
6594
6683
|
}, addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
6595
6684
|
const containerRect = this.options.container.getBoundingClientRect();
|
|
@@ -6658,9 +6747,8 @@
|
|
|
6658
6747
|
track();
|
|
6659
6748
|
}
|
|
6660
6749
|
}), addDisposableListener(this.options.content, 'mousedown', () => {
|
|
6661
|
-
|
|
6750
|
+
arialLevelTracker.push(this._element);
|
|
6662
6751
|
}, true));
|
|
6663
|
-
bringElementToFront(this._element);
|
|
6664
6752
|
if (options.inDragMode) {
|
|
6665
6753
|
track();
|
|
6666
6754
|
}
|
|
@@ -6673,13 +6761,7 @@
|
|
|
6673
6761
|
this.addDisposables(move, addDisposableListener(resizeHandleElement, 'mousedown', (e) => {
|
|
6674
6762
|
e.preventDefault();
|
|
6675
6763
|
let startPosition = null;
|
|
6676
|
-
const iframes =
|
|
6677
|
-
...getElementsByTagName('iframe'),
|
|
6678
|
-
...getElementsByTagName('webview'),
|
|
6679
|
-
];
|
|
6680
|
-
for (const iframe of iframes) {
|
|
6681
|
-
iframe.style.pointerEvents = 'none';
|
|
6682
|
-
}
|
|
6764
|
+
const iframes = disableIframePointEvents();
|
|
6683
6765
|
move.value = new CompositeDisposable(addDisposableWindowListener(window, 'mousemove', (e) => {
|
|
6684
6766
|
const containerRect = this.options.container.getBoundingClientRect();
|
|
6685
6767
|
const overlayRect = this._element.getBoundingClientRect();
|
|
@@ -6802,9 +6884,7 @@
|
|
|
6802
6884
|
this.setBounds(bounds);
|
|
6803
6885
|
}), {
|
|
6804
6886
|
dispose: () => {
|
|
6805
|
-
|
|
6806
|
-
iframe.style.pointerEvents = 'auto';
|
|
6807
|
-
}
|
|
6887
|
+
iframes.release();
|
|
6808
6888
|
},
|
|
6809
6889
|
}, addDisposableWindowListener(window, 'mouseup', () => {
|
|
6810
6890
|
move.dispose();
|
|
@@ -6825,6 +6905,7 @@
|
|
|
6825
6905
|
return 0;
|
|
6826
6906
|
}
|
|
6827
6907
|
dispose() {
|
|
6908
|
+
arialLevelTracker.destroy(this._element);
|
|
6828
6909
|
this._element.remove();
|
|
6829
6910
|
super.dispose();
|
|
6830
6911
|
}
|
|
@@ -6853,9 +6934,10 @@
|
|
|
6853
6934
|
return element;
|
|
6854
6935
|
}
|
|
6855
6936
|
class OverlayRenderContainer extends CompositeDisposable {
|
|
6856
|
-
constructor(element) {
|
|
6937
|
+
constructor(element, accessor) {
|
|
6857
6938
|
super();
|
|
6858
6939
|
this.element = element;
|
|
6940
|
+
this.accessor = accessor;
|
|
6859
6941
|
this.map = {};
|
|
6860
6942
|
this._disposed = false;
|
|
6861
6943
|
this.addDisposables(exports.DockviewDisposable.from(() => {
|
|
@@ -6911,7 +6993,35 @@
|
|
|
6911
6993
|
}
|
|
6912
6994
|
focusContainer.style.display = panel.api.isVisible ? '' : 'none';
|
|
6913
6995
|
};
|
|
6914
|
-
const
|
|
6996
|
+
const observerDisposable = new MutableDisposable();
|
|
6997
|
+
const correctLayerPosition = () => {
|
|
6998
|
+
if (panel.api.location.type === 'floating') {
|
|
6999
|
+
queueMicrotask(() => {
|
|
7000
|
+
const floatingGroup = this.accessor.floatingGroups.find((group) => group.group === panel.api.group);
|
|
7001
|
+
if (!floatingGroup) {
|
|
7002
|
+
return;
|
|
7003
|
+
}
|
|
7004
|
+
const element = floatingGroup.overlay.element;
|
|
7005
|
+
const update = () => {
|
|
7006
|
+
const level = Number(element.getAttribute('aria-level'));
|
|
7007
|
+
focusContainer.style.zIndex = `${DEFAULT_OVERLAY_Z_INDEX + level * 2 + 1}`;
|
|
7008
|
+
};
|
|
7009
|
+
const observer = new MutationObserver(() => {
|
|
7010
|
+
update();
|
|
7011
|
+
});
|
|
7012
|
+
observerDisposable.value = exports.DockviewDisposable.from(() => observer.disconnect());
|
|
7013
|
+
observer.observe(element, {
|
|
7014
|
+
attributeFilter: ['aria-level'],
|
|
7015
|
+
attributes: true,
|
|
7016
|
+
});
|
|
7017
|
+
update();
|
|
7018
|
+
});
|
|
7019
|
+
}
|
|
7020
|
+
else {
|
|
7021
|
+
focusContainer.style.zIndex = ''; // reset the z-index, perhaps CSS will take over here
|
|
7022
|
+
}
|
|
7023
|
+
};
|
|
7024
|
+
const disposable = new CompositeDisposable(observerDisposable,
|
|
6915
7025
|
/**
|
|
6916
7026
|
* since container is positioned absoutely we must explicitly forward
|
|
6917
7027
|
* the dnd events for the expect behaviours to continue to occur in terms of dnd
|
|
@@ -6935,7 +7045,7 @@
|
|
|
6935
7045
|
onDragOver: (e) => {
|
|
6936
7046
|
referenceContainer.dropTarget.dnd.onDragOver(e);
|
|
6937
7047
|
},
|
|
6938
|
-
}), panel.api.onDidVisibilityChange((
|
|
7048
|
+
}), panel.api.onDidVisibilityChange(() => {
|
|
6939
7049
|
/**
|
|
6940
7050
|
* Control the visibility of the content, however even when not visible (display: none)
|
|
6941
7051
|
* the content is still maintained within the DOM hence DOM specific attributes
|
|
@@ -6947,6 +7057,8 @@
|
|
|
6947
7057
|
return;
|
|
6948
7058
|
}
|
|
6949
7059
|
resize();
|
|
7060
|
+
}), panel.api.onDidLocationChange(() => {
|
|
7061
|
+
correctLayerPosition();
|
|
6950
7062
|
}));
|
|
6951
7063
|
this.map[panel.api.id].destroy = exports.DockviewDisposable.from(() => {
|
|
6952
7064
|
var _a;
|
|
@@ -6955,6 +7067,7 @@
|
|
|
6955
7067
|
}
|
|
6956
7068
|
(_a = focusContainer.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(focusContainer);
|
|
6957
7069
|
});
|
|
7070
|
+
correctLayerPosition();
|
|
6958
7071
|
queueMicrotask(() => {
|
|
6959
7072
|
if (this.isDisposed) {
|
|
6960
7073
|
return;
|
|
@@ -7203,7 +7316,10 @@
|
|
|
7203
7316
|
get gap() {
|
|
7204
7317
|
return this.gridview.margin;
|
|
7205
7318
|
}
|
|
7206
|
-
|
|
7319
|
+
get floatingGroups() {
|
|
7320
|
+
return this._floatingGroups;
|
|
7321
|
+
}
|
|
7322
|
+
constructor(parentElement, options) {
|
|
7207
7323
|
var _a;
|
|
7208
7324
|
super({
|
|
7209
7325
|
proportionalLayout: true,
|
|
@@ -7211,10 +7327,11 @@
|
|
|
7211
7327
|
styles: options.hideBorders
|
|
7212
7328
|
? { separatorBorder: 'transparent' }
|
|
7213
7329
|
: undefined,
|
|
7214
|
-
parentElement:
|
|
7330
|
+
parentElement: parentElement,
|
|
7215
7331
|
disableAutoResizing: options.disableAutoResizing,
|
|
7216
7332
|
locked: options.locked,
|
|
7217
7333
|
margin: options.gap,
|
|
7334
|
+
className: options.className,
|
|
7218
7335
|
});
|
|
7219
7336
|
this.nextGroupId = sequentialNumberGenerator();
|
|
7220
7337
|
this._deserializer = new DefaultDockviewDeserialzier(this);
|
|
@@ -7250,10 +7367,10 @@
|
|
|
7250
7367
|
this._onDidActiveGroupChange = new Emitter();
|
|
7251
7368
|
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
7252
7369
|
this._moving = false;
|
|
7253
|
-
const gready = document.createElement('div');
|
|
7254
|
-
gready.className = 'dv-overlay-render-container';
|
|
7255
|
-
this.gridview.element.appendChild(gready);
|
|
7256
|
-
this.overlayRenderContainer = new OverlayRenderContainer(
|
|
7370
|
+
// const gready = document.createElement('div');
|
|
7371
|
+
// gready.className = 'dv-overlay-render-container';
|
|
7372
|
+
// this.gridview.element.appendChild(gready);
|
|
7373
|
+
this.overlayRenderContainer = new OverlayRenderContainer(this.gridview.element, this);
|
|
7257
7374
|
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
7258
7375
|
toggleClass(this.element, 'dv-debug', !!options.debug);
|
|
7259
7376
|
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(() => {
|
|
@@ -7419,7 +7536,7 @@
|
|
|
7419
7536
|
}
|
|
7420
7537
|
const gready = document.createElement('div');
|
|
7421
7538
|
gready.className = 'dv-overlay-render-container';
|
|
7422
|
-
const overlayRenderContainer = new OverlayRenderContainer(gready);
|
|
7539
|
+
const overlayRenderContainer = new OverlayRenderContainer(gready, this);
|
|
7423
7540
|
const referenceGroup = itemToPopout instanceof DockviewPanel
|
|
7424
7541
|
? itemToPopout.group
|
|
7425
7542
|
: itemToPopout;
|
|
@@ -7568,7 +7685,6 @@
|
|
|
7568
7685
|
}
|
|
7569
7686
|
}
|
|
7570
7687
|
}
|
|
7571
|
-
group.model.location = { type: 'floating' };
|
|
7572
7688
|
function getAnchoredBox() {
|
|
7573
7689
|
if (options === null || options === void 0 ? void 0 : options.position) {
|
|
7574
7690
|
const result = {};
|
|
@@ -7635,10 +7751,14 @@
|
|
|
7635
7751
|
: false,
|
|
7636
7752
|
});
|
|
7637
7753
|
const floatingGroupPanel = new DockviewFloatingGroupPanel(group, overlay);
|
|
7638
|
-
const disposable =
|
|
7754
|
+
const disposable = new CompositeDisposable(group.api.onDidActiveChange((event) => {
|
|
7755
|
+
if (event.isActive) {
|
|
7756
|
+
overlay.bringToFront();
|
|
7757
|
+
}
|
|
7758
|
+
}), watchElementResize(group.element, (entry) => {
|
|
7639
7759
|
const { width, height } = entry.contentRect;
|
|
7640
7760
|
group.layout(width, height); // let the group know it's size is changing so it can fire events to the panel
|
|
7641
|
-
});
|
|
7761
|
+
}));
|
|
7642
7762
|
floatingGroupPanel.addDisposables(overlay.onDidChange(() => {
|
|
7643
7763
|
// this is either a resize or a move
|
|
7644
7764
|
// to inform the panels .layout(...) the group with it's current size
|
|
@@ -7654,12 +7774,13 @@
|
|
|
7654
7774
|
}), {
|
|
7655
7775
|
dispose: () => {
|
|
7656
7776
|
disposable.dispose();
|
|
7657
|
-
group.model.location = { type: 'grid' };
|
|
7658
7777
|
remove(this._floatingGroups, floatingGroupPanel);
|
|
7778
|
+
group.model.location = { type: 'grid' };
|
|
7659
7779
|
this.updateWatermark();
|
|
7660
7780
|
},
|
|
7661
7781
|
});
|
|
7662
7782
|
this._floatingGroups.push(floatingGroupPanel);
|
|
7783
|
+
group.model.location = { type: 'floating' };
|
|
7663
7784
|
if (!(options === null || options === void 0 ? void 0 : options.skipActiveGroup)) {
|
|
7664
7785
|
this.doSetGroupAndPanelActive(group);
|
|
7665
7786
|
}
|
|
@@ -7698,6 +7819,7 @@
|
|
|
7698
7819
|
}
|
|
7699
7820
|
updateOptions(options) {
|
|
7700
7821
|
var _a, _b;
|
|
7822
|
+
super.updateOptions(options);
|
|
7701
7823
|
const changed_floatingGroupBounds = 'floatingGroupBounds' in options &&
|
|
7702
7824
|
options.floatingGroupBounds !== this.options.floatingGroupBounds;
|
|
7703
7825
|
const changed_rootOverlayOptions = 'rootOverlayModel' in options &&
|
|
@@ -8241,6 +8363,7 @@
|
|
|
8241
8363
|
this._groups.delete(group.id);
|
|
8242
8364
|
this._onDidRemoveGroup.fire(group);
|
|
8243
8365
|
}
|
|
8366
|
+
remove(this._popoutGroups, selectedGroup);
|
|
8244
8367
|
const removedGroup = selectedGroup.disposable.dispose();
|
|
8245
8368
|
if (!(options === null || options === void 0 ? void 0 : options.skipPopoutReturn) && removedGroup) {
|
|
8246
8369
|
this.doAddGroup(removedGroup, [0]);
|
|
@@ -8352,6 +8475,31 @@
|
|
|
8352
8475
|
return;
|
|
8353
8476
|
}
|
|
8354
8477
|
}
|
|
8478
|
+
if (sourceGroup.api.location.type === 'popout') {
|
|
8479
|
+
/**
|
|
8480
|
+
* the source group is a popout group with a single panel
|
|
8481
|
+
*
|
|
8482
|
+
* 1. remove the panel from the group without triggering any events
|
|
8483
|
+
* 2. remove the popout group
|
|
8484
|
+
* 3. create a new group at the requested location and add that panel
|
|
8485
|
+
*/
|
|
8486
|
+
const popoutGroup = this._popoutGroups.find((group) => group.popoutGroup === sourceGroup);
|
|
8487
|
+
const removedPanel = this.movingLock(() => popoutGroup.popoutGroup.model.removePanel(popoutGroup.popoutGroup.panels[0], {
|
|
8488
|
+
skipSetActive: true,
|
|
8489
|
+
skipSetActiveGroup: true,
|
|
8490
|
+
}));
|
|
8491
|
+
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
8492
|
+
const newGroup = this.createGroupAtLocation(targetLocation);
|
|
8493
|
+
this.movingLock(() => newGroup.model.openPanel(removedPanel, {
|
|
8494
|
+
skipSetActive: true,
|
|
8495
|
+
}));
|
|
8496
|
+
this.doSetGroupAndPanelActive(newGroup);
|
|
8497
|
+
this._onDidMovePanel.fire({
|
|
8498
|
+
panel: this.getGroupPanel(sourceItemId),
|
|
8499
|
+
from: sourceGroup,
|
|
8500
|
+
});
|
|
8501
|
+
return;
|
|
8502
|
+
}
|
|
8355
8503
|
// source group will become empty so delete the group
|
|
8356
8504
|
const targetGroup = this.movingLock(() => this.doRemoveGroup(sourceGroup, {
|
|
8357
8505
|
skipActive: true,
|
|
@@ -8583,13 +8731,14 @@
|
|
|
8583
8731
|
set deserializer(value) {
|
|
8584
8732
|
this._deserializer = value;
|
|
8585
8733
|
}
|
|
8586
|
-
constructor(options) {
|
|
8734
|
+
constructor(parentElement, options) {
|
|
8587
8735
|
super({
|
|
8588
|
-
parentElement:
|
|
8736
|
+
parentElement: parentElement,
|
|
8589
8737
|
proportionalLayout: options.proportionalLayout,
|
|
8590
8738
|
orientation: options.orientation,
|
|
8591
8739
|
styles: options.styles,
|
|
8592
8740
|
disableAutoResizing: options.disableAutoResizing,
|
|
8741
|
+
className: options.className,
|
|
8593
8742
|
});
|
|
8594
8743
|
this._onDidLayoutfromJSON = new Emitter();
|
|
8595
8744
|
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
@@ -8615,6 +8764,7 @@
|
|
|
8615
8764
|
}
|
|
8616
8765
|
}
|
|
8617
8766
|
updateOptions(options) {
|
|
8767
|
+
super.updateOptions(options);
|
|
8618
8768
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
8619
8769
|
this.gridview.orientation !== options.orientation;
|
|
8620
8770
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
@@ -8881,8 +9031,9 @@
|
|
|
8881
9031
|
? this.splitview.size
|
|
8882
9032
|
: this.splitview.orthogonalSize;
|
|
8883
9033
|
}
|
|
8884
|
-
constructor(options) {
|
|
8885
|
-
|
|
9034
|
+
constructor(parentElement, options) {
|
|
9035
|
+
var _a, _b;
|
|
9036
|
+
super(parentElement, options.disableAutoResizing);
|
|
8886
9037
|
this._splitviewChangeDisposable = new MutableDisposable();
|
|
8887
9038
|
this._panels = new Map();
|
|
8888
9039
|
this._onDidLayoutfromJSON = new Emitter();
|
|
@@ -8893,6 +9044,11 @@
|
|
|
8893
9044
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
8894
9045
|
this._onDidLayoutChange = new Emitter();
|
|
8895
9046
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
9047
|
+
this.classNames = [];
|
|
9048
|
+
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
9049
|
+
for (const className of this.classNames) {
|
|
9050
|
+
toggleClass(this.element, className, true);
|
|
9051
|
+
}
|
|
8896
9052
|
this._options = options;
|
|
8897
9053
|
if (!options.components) {
|
|
8898
9054
|
options.components = {};
|
|
@@ -8904,6 +9060,16 @@
|
|
|
8904
9060
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
8905
9061
|
}
|
|
8906
9062
|
updateOptions(options) {
|
|
9063
|
+
var _a, _b;
|
|
9064
|
+
if ('className' in options) {
|
|
9065
|
+
for (const className of this.classNames) {
|
|
9066
|
+
toggleClass(this.element, className, false);
|
|
9067
|
+
}
|
|
9068
|
+
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
9069
|
+
for (const className of this.classNames) {
|
|
9070
|
+
toggleClass(this.element, className, true);
|
|
9071
|
+
}
|
|
9072
|
+
}
|
|
8907
9073
|
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
8908
9074
|
this.options.orientation !== options.orientation;
|
|
8909
9075
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
@@ -9205,8 +9371,9 @@
|
|
|
9205
9371
|
get options() {
|
|
9206
9372
|
return this._options;
|
|
9207
9373
|
}
|
|
9208
|
-
constructor(options) {
|
|
9209
|
-
|
|
9374
|
+
constructor(parentElement, options) {
|
|
9375
|
+
var _a, _b;
|
|
9376
|
+
super(parentElement, options.disableAutoResizing);
|
|
9210
9377
|
this._id = nextLayoutId.next();
|
|
9211
9378
|
this._disposable = new MutableDisposable();
|
|
9212
9379
|
this._viewDisposables = new Map();
|
|
@@ -9220,7 +9387,12 @@
|
|
|
9220
9387
|
this.onDidAddView = this._onDidAddView.event;
|
|
9221
9388
|
this._onDidRemoveView = new Emitter();
|
|
9222
9389
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9390
|
+
this.classNames = [];
|
|
9223
9391
|
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
|
|
9392
|
+
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
9393
|
+
for (const className of this.classNames) {
|
|
9394
|
+
toggleClass(this.element, className, true);
|
|
9395
|
+
}
|
|
9224
9396
|
this._options = options;
|
|
9225
9397
|
if (!options.components) {
|
|
9226
9398
|
options.components = {};
|
|
@@ -9242,6 +9414,16 @@
|
|
|
9242
9414
|
//noop
|
|
9243
9415
|
}
|
|
9244
9416
|
updateOptions(options) {
|
|
9417
|
+
var _a, _b;
|
|
9418
|
+
if ('className' in options) {
|
|
9419
|
+
for (const className of this.classNames) {
|
|
9420
|
+
toggleClass(this.element, className, false);
|
|
9421
|
+
}
|
|
9422
|
+
this.classNames = (_b = (_a = options.className) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
9423
|
+
for (const className of this.classNames) {
|
|
9424
|
+
toggleClass(this.element, className, true);
|
|
9425
|
+
}
|
|
9426
|
+
}
|
|
9245
9427
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
9246
9428
|
}
|
|
9247
9429
|
addPanel(options) {
|
|
@@ -9535,6 +9717,23 @@
|
|
|
9535
9717
|
}
|
|
9536
9718
|
}
|
|
9537
9719
|
|
|
9720
|
+
function createDockview(element, options) {
|
|
9721
|
+
const component = new DockviewComponent(element, options);
|
|
9722
|
+
return component.api;
|
|
9723
|
+
}
|
|
9724
|
+
function createSplitview(element, options) {
|
|
9725
|
+
const component = new SplitviewComponent(element, options);
|
|
9726
|
+
return new SplitviewApi(component);
|
|
9727
|
+
}
|
|
9728
|
+
function createGridview(element, options) {
|
|
9729
|
+
const component = new GridviewComponent(element, options);
|
|
9730
|
+
return new GridviewApi(component);
|
|
9731
|
+
}
|
|
9732
|
+
function createPaneview(element, options) {
|
|
9733
|
+
const component = new PaneviewComponent(element, options);
|
|
9734
|
+
return new PaneviewApi(component);
|
|
9735
|
+
}
|
|
9736
|
+
|
|
9538
9737
|
exports.BaseGrid = BaseGrid;
|
|
9539
9738
|
exports.ContentContainer = ContentContainer;
|
|
9540
9739
|
exports.DefaultDockviewDeserialzier = DefaultDockviewDeserialzier;
|
|
@@ -9571,6 +9770,10 @@
|
|
|
9571
9770
|
exports.Tab = Tab;
|
|
9572
9771
|
exports.WillShowOverlayLocationEvent = WillShowOverlayLocationEvent;
|
|
9573
9772
|
exports.createComponent = createComponent;
|
|
9773
|
+
exports.createDockview = createDockview;
|
|
9774
|
+
exports.createGridview = createGridview;
|
|
9775
|
+
exports.createPaneview = createPaneview;
|
|
9776
|
+
exports.createSplitview = createSplitview;
|
|
9574
9777
|
exports.directionToPosition = directionToPosition;
|
|
9575
9778
|
exports.getDirectionOrientation = getDirectionOrientation;
|
|
9576
9779
|
exports.getGridLocation = getGridLocation;
|