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
|
@@ -36,7 +36,7 @@ var ReactPanelContentPart = /** @class */ (function () {
|
|
|
36
36
|
};
|
|
37
37
|
ReactPanelContentPart.prototype.update = function (event) {
|
|
38
38
|
var _a;
|
|
39
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
39
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
40
40
|
};
|
|
41
41
|
ReactPanelContentPart.prototype.layout = function (_width, _height) {
|
|
42
42
|
// noop
|
|
@@ -31,7 +31,7 @@ var ReactPanelHeaderPart = /** @class */ (function () {
|
|
|
31
31
|
};
|
|
32
32
|
ReactPanelHeaderPart.prototype.update = function (event) {
|
|
33
33
|
var _a;
|
|
34
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
34
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
35
35
|
};
|
|
36
36
|
ReactPanelHeaderPart.prototype.layout = function (_width, _height) {
|
|
37
37
|
// noop - retrieval from api
|
package/dist/dockview.amd.js
CHANGED
|
@@ -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
|
*/
|
|
@@ -155,7 +155,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
155
155
|
this.value = value;
|
|
156
156
|
}
|
|
157
157
|
print() {
|
|
158
|
-
console.warn(this.value);
|
|
158
|
+
console.warn('dockview: stacktrace', this.value);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
class Listener {
|
|
@@ -220,7 +220,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
220
220
|
var _a;
|
|
221
221
|
// don't check until stack of execution is completed to allow for out-of-order disposals within the same execution block
|
|
222
222
|
for (const listener of this._listeners) {
|
|
223
|
-
console.warn((_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print());
|
|
223
|
+
console.warn('dockview: stacktrace', (_a = listener.stacktrace) === null || _a === void 0 ? void 0 : _a.print());
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
}
|
|
@@ -5770,8 +5770,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5770
5770
|
}
|
|
5771
5771
|
}
|
|
5772
5772
|
|
|
5773
|
-
|
|
5774
|
-
const NOT_INITIALIZED_MESSAGE = 'DockviewGroupPanelApiImpl not initialized';
|
|
5773
|
+
const NOT_INITIALIZED_MESSAGE = 'dockview: DockviewGroupPanelApiImpl not initialized';
|
|
5775
5774
|
class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
5776
5775
|
get location() {
|
|
5777
5776
|
if (!this._group) {
|
|
@@ -5844,14 +5843,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5844
5843
|
}
|
|
5845
5844
|
}
|
|
5846
5845
|
initialize(group) {
|
|
5847
|
-
this._group = group;
|
|
5848
5846
|
/**
|
|
5849
|
-
* TODO: Annoying initialization order caveat
|
|
5847
|
+
* TODO: Annoying initialization order caveat, find a better way to initialize and avoid needing null checks
|
|
5850
5848
|
*
|
|
5851
5849
|
* Due to the order on initialization we know that the model isn't defined until later in the same stack-frame of setup.
|
|
5852
5850
|
* By queuing a microtask we can ensure the setup is completed within the same stack-frame, but after everything else has
|
|
5853
5851
|
* finished ensuring the `model` is defined.
|
|
5854
5852
|
*/
|
|
5853
|
+
this._group = group;
|
|
5855
5854
|
queueMicrotask(() => {
|
|
5856
5855
|
this._mutableDisposable.value =
|
|
5857
5856
|
this._group.model.onDidActivePanelChange((event) => {
|
|
@@ -6005,12 +6004,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6005
6004
|
var _a;
|
|
6006
6005
|
let _trackGroupActive = (_a = previousGroup === null || previousGroup === void 0 ? void 0 : previousGroup.isActive) !== null && _a !== void 0 ? _a : false; // prevent duplicate events with same state
|
|
6007
6006
|
this.groupEventsDisposable.value = new CompositeDisposable(this.group.api.onDidVisibilityChange((event) => {
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
!this.isVisible &&
|
|
6013
|
-
this.group.model.isPanelActive(this.panel)) {
|
|
6007
|
+
const hasBecomeHidden = !event.isVisible && this.isVisible;
|
|
6008
|
+
const hasBecomeVisible = event.isVisible && !this.isVisible;
|
|
6009
|
+
const isActivePanel = this.group.model.isPanelActive(this.panel);
|
|
6010
|
+
if (hasBecomeHidden || (hasBecomeVisible && isActivePanel)) {
|
|
6014
6011
|
this._onDidVisibilityChange.fire(event);
|
|
6015
6012
|
}
|
|
6016
6013
|
}), this.group.api.onDidLocationChange((event) => {
|
|
@@ -6096,12 +6093,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6096
6093
|
const didTitleChange = title !== this.title;
|
|
6097
6094
|
if (didTitleChange) {
|
|
6098
6095
|
this._title = title;
|
|
6099
|
-
this.view.update({
|
|
6100
|
-
params: {
|
|
6101
|
-
params: this._params,
|
|
6102
|
-
title: this.title,
|
|
6103
|
-
},
|
|
6104
|
-
});
|
|
6105
6096
|
this.api._onDidTitleChange.fire({ title });
|
|
6106
6097
|
}
|
|
6107
6098
|
}
|
|
@@ -6129,10 +6120,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6129
6120
|
}
|
|
6130
6121
|
// update the view with the updated props
|
|
6131
6122
|
this.view.update({
|
|
6132
|
-
params:
|
|
6133
|
-
params: this._params,
|
|
6134
|
-
title: this.title,
|
|
6135
|
-
},
|
|
6123
|
+
params: this._params,
|
|
6136
6124
|
});
|
|
6137
6125
|
}
|
|
6138
6126
|
updateParentGroup(group, options) {
|
|
@@ -7247,7 +7235,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7247
7235
|
return element.getBoundingClientRect();
|
|
7248
7236
|
}
|
|
7249
7237
|
const box = getBox();
|
|
7250
|
-
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();
|
|
7238
|
+
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();
|
|
7251
7239
|
if (itemToPopout.api.location.type === 'grid') {
|
|
7252
7240
|
itemToPopout.api.setVisible(false);
|
|
7253
7241
|
}
|
|
@@ -7363,24 +7351,22 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7363
7351
|
});
|
|
7364
7352
|
}
|
|
7365
7353
|
}
|
|
7366
|
-
else {
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
returnedGroup = removedGroup;
|
|
7376
|
-
}
|
|
7354
|
+
else if (this.getPanel(group.id)) {
|
|
7355
|
+
const removedGroup = this.doRemoveGroup(group, {
|
|
7356
|
+
skipDispose: true,
|
|
7357
|
+
skipActive: true,
|
|
7358
|
+
});
|
|
7359
|
+
removedGroup.model.renderContainer =
|
|
7360
|
+
this.overlayRenderContainer;
|
|
7361
|
+
removedGroup.model.location = { type: 'grid' };
|
|
7362
|
+
returnedGroup = removedGroup;
|
|
7377
7363
|
}
|
|
7378
7364
|
}));
|
|
7379
7365
|
this._popoutGroups.push(value);
|
|
7380
7366
|
this.updateWatermark();
|
|
7381
7367
|
})
|
|
7382
7368
|
.catch((err) => {
|
|
7383
|
-
console.error(err);
|
|
7369
|
+
console.error('dockview: failed to create popout window', err);
|
|
7384
7370
|
});
|
|
7385
7371
|
}
|
|
7386
7372
|
addFloatingGroup(item, coord, options) {
|
|
@@ -7423,7 +7409,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7423
7409
|
this.doRemoveGroup(item, {
|
|
7424
7410
|
skipDispose: true,
|
|
7425
7411
|
skipPopoutReturn: true,
|
|
7426
|
-
skipPopoutAssociated:
|
|
7412
|
+
skipPopoutAssociated: false,
|
|
7427
7413
|
});
|
|
7428
7414
|
}
|
|
7429
7415
|
}
|
|
@@ -7783,7 +7769,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
7783
7769
|
clear() {
|
|
7784
7770
|
const groups = Array.from(this._groups.values()).map((_) => _.value);
|
|
7785
7771
|
const hasActiveGroup = !!this.activeGroup;
|
|
7786
|
-
!!this.activePanel;
|
|
7787
7772
|
for (const group of groups) {
|
|
7788
7773
|
// remove the group will automatically remove the panels
|
|
7789
7774
|
this.removeGroup(group, { skipActive: true });
|
|
@@ -8289,7 +8274,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8289
8274
|
}
|
|
8290
8275
|
let id = options === null || options === void 0 ? void 0 : options.id;
|
|
8291
8276
|
if (id && this._groups.has(options.id)) {
|
|
8292
|
-
console.warn(`Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
|
|
8277
|
+
console.warn(`dockview: Duplicate group id ${options === null || options === void 0 ? void 0 : options.id}. reassigning group id to avoid errors`);
|
|
8293
8278
|
id = undefined;
|
|
8294
8279
|
}
|
|
8295
8280
|
if (!id) {
|
|
@@ -9506,7 +9491,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9506
9491
|
}
|
|
9507
9492
|
update(event) {
|
|
9508
9493
|
var _a;
|
|
9509
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
9494
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
9510
9495
|
}
|
|
9511
9496
|
layout(_width, _height) {
|
|
9512
9497
|
// noop
|
|
@@ -9544,7 +9529,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9544
9529
|
}
|
|
9545
9530
|
update(event) {
|
|
9546
9531
|
var _a;
|
|
9547
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
9532
|
+
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
9548
9533
|
}
|
|
9549
9534
|
layout(_width, _height) {
|
|
9550
9535
|
// noop - retrieval from api
|