dockview-core 6.5.0 → 6.6.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/dockview/dockviewComponent.js +144 -96
- package/dist/dockview-core.js +28 -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 +28 -1
- package/dist/esm/dockview/dockviewComponent.js +27 -0
- package/dist/package/main.cjs.js +28 -1
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +28 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 6.
|
|
3
|
+
* @version 6.6.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -15260,6 +15260,16 @@ class DockviewComponent extends BaseGrid {
|
|
|
15260
15260
|
}
|
|
15261
15261
|
fromJSON(data, options) {
|
|
15262
15262
|
var _a, _b, _c;
|
|
15263
|
+
// Cancel any popout-restoration timers queued by a previous fromJSON
|
|
15264
|
+
// that haven't fired yet. Each cleanup also disposes the orphan group
|
|
15265
|
+
// that was registered in _groups synchronously but never parented
|
|
15266
|
+
// into a popout window — otherwise the upcoming clear() would call
|
|
15267
|
+
// gridview.remove() on an unparented element and throw
|
|
15268
|
+
// "Invalid grid element". See issue #1304.
|
|
15269
|
+
for (const cleanup of [...this._popoutRestorationCleanups]) {
|
|
15270
|
+
cleanup();
|
|
15271
|
+
}
|
|
15272
|
+
this._popoutRestorationCleanups.clear();
|
|
15263
15273
|
const existingPanels = new Map();
|
|
15264
15274
|
let tempGroup;
|
|
15265
15275
|
if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
|
|
@@ -15450,6 +15460,23 @@ class DockviewComponent extends BaseGrid {
|
|
|
15450
15460
|
const cleanup = () => {
|
|
15451
15461
|
this._popoutRestorationCleanups.delete(cleanup);
|
|
15452
15462
|
clearTimeout(handle);
|
|
15463
|
+
// The group was registered in _groups synchronously
|
|
15464
|
+
// but the timer that would parent it into the popout
|
|
15465
|
+
// window never ran. Dispose the orphan here so the
|
|
15466
|
+
// next clear() doesn't trip over an unparented
|
|
15467
|
+
// element. See issue #1304.
|
|
15468
|
+
if (!this.isDisposed &&
|
|
15469
|
+
this._groups.has(group.id) &&
|
|
15470
|
+
group.element.parentElement === null) {
|
|
15471
|
+
for (const panel of [...group.panels]) {
|
|
15472
|
+
this.removePanel(panel, {
|
|
15473
|
+
removeEmptyGroup: false,
|
|
15474
|
+
});
|
|
15475
|
+
}
|
|
15476
|
+
group.dispose();
|
|
15477
|
+
this._groups.delete(group.id);
|
|
15478
|
+
this._onDidRemoveGroup.fire(group);
|
|
15479
|
+
}
|
|
15453
15480
|
resolve();
|
|
15454
15481
|
};
|
|
15455
15482
|
const handle = setTimeout(() => {
|