dockview 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/dockview/reactContentPart.js +1 -1
- package/dist/cjs/dockview/reactHeaderPart.js +1 -1
- package/dist/dockview.amd.js +26 -41
- package/dist/dockview.amd.js.map +1 -1
- package/dist/dockview.amd.min.js +2 -2
- package/dist/dockview.amd.min.js.map +1 -1
- package/dist/dockview.amd.min.noStyle.js +2 -2
- package/dist/dockview.amd.min.noStyle.js.map +1 -1
- package/dist/dockview.amd.noStyle.js +26 -41
- package/dist/dockview.amd.noStyle.js.map +1 -1
- package/dist/dockview.cjs.js +26 -41
- package/dist/dockview.cjs.js.map +1 -1
- package/dist/dockview.esm.js +26 -41
- package/dist/dockview.esm.js.map +1 -1
- package/dist/dockview.esm.min.js +2 -2
- package/dist/dockview.esm.min.js.map +1 -1
- package/dist/dockview.js +26 -41
- package/dist/dockview.js.map +1 -1
- package/dist/dockview.min.js +2 -2
- package/dist/dockview.min.js.map +1 -1
- package/dist/dockview.min.noStyle.js +2 -2
- package/dist/dockview.min.noStyle.js.map +1 -1
- package/dist/dockview.noStyle.js +26 -41
- package/dist/dockview.noStyle.js.map +1 -1
- package/dist/esm/dockview/reactContentPart.js +1 -1
- package/dist/esm/dockview/reactHeaderPart.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.14.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -125,7 +125,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
125
125
|
this.value = value;
|
|
126
126
|
}
|
|
127
127
|
print() {
|
|
128
|
-
console.warn(this.value);
|
|
128
|
+
console.warn('dockview: stacktrace', this.value);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
class Listener {
|
|
@@ -190,7 +190,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
190
190
|
var _a;
|
|
191
191
|
// don't check until stack of execution is completed to allow for out-of-order disposals within the same execution block
|
|
192
192
|
for (const listener of this._listeners) {
|
|
193
|
-
console.warn((_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print());
|
|
193
|
+
console.warn('dockview: stacktrace', (_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print());
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
}
|
|
@@ -5740,8 +5740,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5740
5740
|
}
|
|
5741
5741
|
}
|
|
5742
5742
|
|
|
5743
|
-
|
|
5744
|
-
const NOT_INITIALIZED_MESSAGE = 'DockviewGroupPanelApiImpl not initialized';
|
|
5743
|
+
const NOT_INITIALIZED_MESSAGE = 'dockview: DockviewGroupPanelApiImpl not initialized';
|
|
5745
5744
|
class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
5746
5745
|
get location() {
|
|
5747
5746
|
if (!this._group) {
|
|
@@ -5814,14 +5813,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5814
5813
|
}
|
|
5815
5814
|
}
|
|
5816
5815
|
initialize(group) {
|
|
5817
|
-
this._group = group;
|
|
5818
5816
|
/**
|
|
5819
|
-
* TODO: Annoying initialization order caveat
|
|
5817
|
+
* TODO: Annoying initialization order caveat, find a better way to initialize and avoid needing null checks
|
|
5820
5818
|
*
|
|
5821
5819
|
* Due to the order on initialization we know that the model isn't defined until later in the same stack-frame of setup.
|
|
5822
5820
|
* By queuing a microtask we can ensure the setup is completed within the same stack-frame, but after everything else has
|
|
5823
5821
|
* finished ensuring the `model` is defined.
|
|
5824
5822
|
*/
|
|
5823
|
+
this._group = group;
|
|
5825
5824
|
queueMicrotask(() => {
|
|
5826
5825
|
this._mutableDisposable.value =
|
|
5827
5826
|
this._group.model.onDidActivePanelChange((event) => {
|
|
@@ -5975,12 +5974,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5975
5974
|
var _a;
|
|
5976
5975
|
let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
|
|
5977
5976
|
this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
!this.isVisible &&
|
|
5983
|
-
this.group.model.isPanelActive(this.panel)) {
|
|
5977
|
+
const hasBecomeHidden = !event.isVisible && this.isVisible;
|
|
5978
|
+
const hasBecomeVisible = event.isVisible && !this.isVisible;
|
|
5979
|
+
const isActivePanel = this.group.model.isPanelActive(this.panel);
|
|
5980
|
+
if (hasBecomeHidden || (hasBecomeVisible && isActivePanel)) {
|
|
5984
5981
|
this._onDidVisibilityChange.fire(event);
|
|
5985
5982
|
}
|
|
5986
5983
|
}), this.group.api.onDidLocationChange((event) => {
|
|
@@ -6066,12 +6063,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6066
6063
|
const didTitleChange = title !== this.title;
|
|
6067
6064
|
if (didTitleChange) {
|
|
6068
6065
|
this._title = title;
|
|
6069
|
-
this.view.update({
|
|
6070
|
-
params: {
|
|
6071
|
-
params: this._params,
|
|
6072
|
-
title: this.title,
|
|
6073
|
-
},
|
|
6074
|
-
});
|
|
6075
6066
|
this.api._onDidTitleChange.fire({ title });
|
|
6076
6067
|
}
|
|
6077
6068
|
}
|
|
@@ -6099,10 +6090,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6099
6090
|
}
|
|
6100
6091
|
// update the view with the updated props
|
|
6101
6092
|
this.view.update({
|
|
6102
|
-
params:
|
|
6103
|
-
params: this._params,
|
|
6104
|
-
title: this.title,
|
|
6105
|
-
},
|
|
6093
|
+
params: this._params,
|
|
6106
6094
|
});
|
|
6107
6095
|
}
|
|
6108
6096
|
updateParentGroup(group, options) {
|
|
@@ -7217,7 +7205,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7217
7205
|
return element.getBoundingClientRect();
|
|
7218
7206
|
}
|
|
7219
7207
|
const box = getBox();
|
|
7220
|
-
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();
|
|
7208
|
+
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();
|
|
7221
7209
|
if (itemToPopout.api.location.type === 'grid') {
|
|
7222
7210
|
itemToPopout.api.setVisible(false);
|
|
7223
7211
|
}
|
|
@@ -7333,24 +7321,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7333
7321
|
});
|
|
7334
7322
|
}
|
|
7335
7323
|
}
|
|
7336
|
-
else {
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
returnedGroup = removedGroup;
|
|
7346
|
-
}
|
|
7324
|
+
else if (this.getPanel(group.id)) {
|
|
7325
|
+
const removedGroup = this.doRemoveGroup(group, {
|
|
7326
|
+
skipDispose: true,
|
|
7327
|
+
skipActive: true,
|
|
7328
|
+
});
|
|
7329
|
+
removedGroup.model.renderContainer =
|
|
7330
|
+
this.overlayRenderContainer;
|
|
7331
|
+
removedGroup.model.location = { type: 'grid' };
|
|
7332
|
+
returnedGroup = removedGroup;
|
|
7347
7333
|
}
|
|
7348
7334
|
}));
|
|
7349
7335
|
this._popoutGroups.push(value);
|
|
7350
7336
|
this.updateWatermark();
|
|
7351
7337
|
})
|
|
7352
7338
|
.catch((err) => {
|
|
7353
|
-
console.error(err);
|
|
7339
|
+
console.error('dockview: failed to create popout window', err);
|
|
7354
7340
|
});
|
|
7355
7341
|
}
|
|
7356
7342
|
addFloatingGroup(item, coord, options) {
|
|
@@ -7393,7 +7379,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7393
7379
|
this.doRemoveGroup(item, {
|
|
7394
7380
|
skipDispose: true,
|
|
7395
7381
|
skipPopoutReturn: true,
|
|
7396
|
-
skipPopoutAssociated:
|
|
7382
|
+
skipPopoutAssociated: false,
|
|
7397
7383
|
});
|
|
7398
7384
|
}
|
|
7399
7385
|
}
|
|
@@ -7753,7 +7739,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7753
7739
|
clear() {
|
|
7754
7740
|
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
7755
7741
|
const hasActiveGroup = !!this.activeGroup;
|
|
7756
|
-
!!this.activePanel;
|
|
7757
7742
|
for (const group of groups) {
|
|
7758
7743
|
// remove the group will automatically remove the panels
|
|
7759
7744
|
this.removeGroup(group, { skipActive: true });
|
|
@@ -8259,7 +8244,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8259
8244
|
}
|
|
8260
8245
|
let id = options === null || options === void 0 ? void 0 : options.id;
|
|
8261
8246
|
if (id && this._groups.has(options.id)) {
|
|
8262
|
-
console.warn(`Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
|
|
8247
|
+
console.warn(`dockview: Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
|
|
8263
8248
|
id = undefined;
|
|
8264
8249
|
}
|
|
8265
8250
|
if (!id) {
|
|
@@ -9476,7 +9461,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9476
9461
|
}
|
|
9477
9462
|
update(event) {
|
|
9478
9463
|
var _a;
|
|
9479
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
9464
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
9480
9465
|
}
|
|
9481
9466
|
layout(_width, _height) {
|
|
9482
9467
|
// noop
|
|
@@ -9514,7 +9499,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9514
9499
|
}
|
|
9515
9500
|
update(event) {
|
|
9516
9501
|
var _a;
|
|
9517
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
9502
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
9518
9503
|
}
|
|
9519
9504
|
layout(_width, _height) {
|
|
9520
9505
|
// noop - retrieval from api
|