dockview-core 1.13.1 → 1.14.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/dockviewGroupPanelApi.js +4 -5
- package/dist/cjs/api/dockviewPanelApi.js +4 -6
- package/dist/cjs/dockview/dockviewComponent.js +13 -16
- package/dist/cjs/dockview/dockviewPanel.js +1 -10
- package/dist/cjs/events.js +3 -3
- package/dist/dockview-core.amd.js +24 -39
- 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 +24 -39
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +24 -39
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +24 -39
- 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 +24 -39
- 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 +24 -39
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/dockviewGroupPanelApi.js +3 -4
- package/dist/esm/api/dockviewPanelApi.js +4 -6
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +1 -1
- package/dist/esm/dockview/dockviewComponent.js +13 -16
- package/dist/esm/dockview/dockviewPanel.js +1 -10
- package/dist/esm/events.js +3 -3
- package/package.json +1 -1
package/dist/dockview-core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.14.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
this.value = value;
|
|
160
160
|
}
|
|
161
161
|
print() {
|
|
162
|
-
console.warn(this.value);
|
|
162
|
+
console.warn('dockview: stacktrace', this.value);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
class Listener {
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
var _a;
|
|
225
225
|
// don't check until stack of execution is completed to allow for out-of-order disposals within the same execution block
|
|
226
226
|
for (const listener of this._listeners) {
|
|
227
|
-
console.warn((_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print());
|
|
227
|
+
console.warn('dockview: stacktrace', (_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print());
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
}
|
|
@@ -5774,8 +5774,7 @@
|
|
|
5774
5774
|
}
|
|
5775
5775
|
}
|
|
5776
5776
|
|
|
5777
|
-
|
|
5778
|
-
const NOT_INITIALIZED_MESSAGE = 'DockviewGroupPanelApiImpl not initialized';
|
|
5777
|
+
const NOT_INITIALIZED_MESSAGE = 'dockview: DockviewGroupPanelApiImpl not initialized';
|
|
5779
5778
|
class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
5780
5779
|
get location() {
|
|
5781
5780
|
if (!this._group) {
|
|
@@ -5848,14 +5847,14 @@
|
|
|
5848
5847
|
}
|
|
5849
5848
|
}
|
|
5850
5849
|
initialize(group) {
|
|
5851
|
-
this._group = group;
|
|
5852
5850
|
/**
|
|
5853
|
-
* TODO: Annoying initialization order caveat
|
|
5851
|
+
* TODO: Annoying initialization order caveat, find a better way to initialize and avoid needing null checks
|
|
5854
5852
|
*
|
|
5855
5853
|
* Due to the order on initialization we know that the model isn't defined until later in the same stack-frame of setup.
|
|
5856
5854
|
* By queuing a microtask we can ensure the setup is completed within the same stack-frame, but after everything else has
|
|
5857
5855
|
* finished ensuring the `model` is defined.
|
|
5858
5856
|
*/
|
|
5857
|
+
this._group = group;
|
|
5859
5858
|
queueMicrotask(() => {
|
|
5860
5859
|
this._mutableDisposable.value =
|
|
5861
5860
|
this._group.model.onDidActivePanelChange((event) => {
|
|
@@ -6009,12 +6008,10 @@
|
|
|
6009
6008
|
var _a;
|
|
6010
6009
|
let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
|
|
6011
6010
|
this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
!this.isVisible &&
|
|
6017
|
-
this.group.model.isPanelActive(this.panel)) {
|
|
6011
|
+
const hasBecomeHidden = !event.isVisible && this.isVisible;
|
|
6012
|
+
const hasBecomeVisible = event.isVisible && !this.isVisible;
|
|
6013
|
+
const isActivePanel = this.group.model.isPanelActive(this.panel);
|
|
6014
|
+
if (hasBecomeHidden || (hasBecomeVisible && isActivePanel)) {
|
|
6018
6015
|
this._onDidVisibilityChange.fire(event);
|
|
6019
6016
|
}
|
|
6020
6017
|
}), this.group.api.onDidLocationChange((event) => {
|
|
@@ -6100,12 +6097,6 @@
|
|
|
6100
6097
|
const didTitleChange = title !== this.title;
|
|
6101
6098
|
if (didTitleChange) {
|
|
6102
6099
|
this._title = title;
|
|
6103
|
-
this.view.update({
|
|
6104
|
-
params: {
|
|
6105
|
-
params: this._params,
|
|
6106
|
-
title: this.title,
|
|
6107
|
-
},
|
|
6108
|
-
});
|
|
6109
6100
|
this.api._onDidTitleChange.fire({ title });
|
|
6110
6101
|
}
|
|
6111
6102
|
}
|
|
@@ -6133,10 +6124,7 @@
|
|
|
6133
6124
|
}
|
|
6134
6125
|
// update the view with the updated props
|
|
6135
6126
|
this.view.update({
|
|
6136
|
-
params:
|
|
6137
|
-
params: this._params,
|
|
6138
|
-
title: this.title,
|
|
6139
|
-
},
|
|
6127
|
+
params: this._params,
|
|
6140
6128
|
});
|
|
6141
6129
|
}
|
|
6142
6130
|
updateParentGroup(group, options) {
|
|
@@ -7274,7 +7262,7 @@
|
|
|
7274
7262
|
return element.getBoundingClientRect();
|
|
7275
7263
|
}
|
|
7276
7264
|
const box = getBox();
|
|
7277
|
-
const groupId = (_b = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.getNextGroupId();
|
|
7265
|
+
const groupId = (_b = (_a = options === null || options === void 0 ? void 0 : options.overridePopoutGroup) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.getNextGroupId();
|
|
7278
7266
|
if (itemToPopout.api.location.type === 'grid') {
|
|
7279
7267
|
itemToPopout.api.setVisible(false);
|
|
7280
7268
|
}
|
|
@@ -7390,24 +7378,22 @@
|
|
|
7390
7378
|
});
|
|
7391
7379
|
}
|
|
7392
7380
|
}
|
|
7393
|
-
else {
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
returnedGroup = removedGroup;
|
|
7403
|
-
}
|
|
7381
|
+
else if (this.getPanel(group.id)) {
|
|
7382
|
+
const removedGroup = this.doRemoveGroup(group, {
|
|
7383
|
+
skipDispose: true,
|
|
7384
|
+
skipActive: true,
|
|
7385
|
+
});
|
|
7386
|
+
removedGroup.model.renderContainer =
|
|
7387
|
+
this.overlayRenderContainer;
|
|
7388
|
+
removedGroup.model.location = { type: 'grid' };
|
|
7389
|
+
returnedGroup = removedGroup;
|
|
7404
7390
|
}
|
|
7405
7391
|
}));
|
|
7406
7392
|
this._popoutGroups.push(value);
|
|
7407
7393
|
this.updateWatermark();
|
|
7408
7394
|
})
|
|
7409
7395
|
.catch((err) => {
|
|
7410
|
-
console.error(err);
|
|
7396
|
+
console.error('dockview: failed to create popout window', err);
|
|
7411
7397
|
});
|
|
7412
7398
|
}
|
|
7413
7399
|
addFloatingGroup(item, coord, options) {
|
|
@@ -7450,7 +7436,7 @@
|
|
|
7450
7436
|
this.doRemoveGroup(item, {
|
|
7451
7437
|
skipDispose: true,
|
|
7452
7438
|
skipPopoutReturn: true,
|
|
7453
|
-
skipPopoutAssociated:
|
|
7439
|
+
skipPopoutAssociated: false,
|
|
7454
7440
|
});
|
|
7455
7441
|
}
|
|
7456
7442
|
}
|
|
@@ -7810,7 +7796,6 @@
|
|
|
7810
7796
|
clear() {
|
|
7811
7797
|
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
7812
7798
|
const hasActiveGroup = !!this.activeGroup;
|
|
7813
|
-
!!this.activePanel;
|
|
7814
7799
|
for (const group of groups) {
|
|
7815
7800
|
// remove the group will automatically remove the panels
|
|
7816
7801
|
this.removeGroup(group, { skipActive: true });
|
|
@@ -8316,7 +8301,7 @@
|
|
|
8316
8301
|
}
|
|
8317
8302
|
let id = options === null || options === void 0 ? void 0 : options.id;
|
|
8318
8303
|
if (id && this._groups.has(options.id)) {
|
|
8319
|
-
console.warn(`Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
|
|
8304
|
+
console.warn(`dockview: Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
|
|
8320
8305
|
id = undefined;
|
|
8321
8306
|
}
|
|
8322
8307
|
if (!id) {
|