dockview-core 1.15.0 → 1.15.2
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 +1 -0
- package/dist/cjs/api/component.api.js +7 -0
- package/dist/cjs/dockview/dockviewComponent.d.ts +7 -3
- package/dist/cjs/dockview/dockviewComponent.js +18 -8
- package/dist/cjs/dockview/options.d.ts +2 -2
- package/dist/cjs/gridview/baseComponentGridview.js +1 -1
- package/dist/cjs/types.d.ts +1 -1
- package/dist/dockview-core.amd.js +19 -10
- 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 +19 -10
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +19 -10
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +19 -10
- 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 +19 -10
- 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 +19 -10
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/component.api.d.ts +1 -0
- package/dist/esm/api/component.api.js +3 -0
- package/dist/esm/dockview/dockviewComponent.d.ts +7 -3
- package/dist/esm/dockview/dockviewComponent.js +14 -8
- package/dist/esm/dockview/options.d.ts +2 -2
- package/dist/esm/gridview/baseComponentGridview.js +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.15.
|
|
3
|
+
* @version 1.15.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -2798,7 +2798,7 @@ class BaseGrid extends Resizable {
|
|
|
2798
2798
|
this.doSetGroupActive(next);
|
|
2799
2799
|
}
|
|
2800
2800
|
layout(width, height, forceResize) {
|
|
2801
|
-
const different = forceResize
|
|
2801
|
+
const different = forceResize || width !== this.width || height !== this.height;
|
|
2802
2802
|
if (!different) {
|
|
2803
2803
|
return;
|
|
2804
2804
|
}
|
|
@@ -3271,6 +3271,9 @@ class DockviewApi {
|
|
|
3271
3271
|
get totalPanels() {
|
|
3272
3272
|
return this.component.totalPanels;
|
|
3273
3273
|
}
|
|
3274
|
+
get gap() {
|
|
3275
|
+
return this.component.gap;
|
|
3276
|
+
}
|
|
3274
3277
|
/**
|
|
3275
3278
|
* Invoked when the active group changes. May be undefined if no group is active.
|
|
3276
3279
|
*/
|
|
@@ -7223,6 +7226,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
7223
7226
|
get api() {
|
|
7224
7227
|
return this._api;
|
|
7225
7228
|
}
|
|
7229
|
+
get gap() {
|
|
7230
|
+
return this.gridview.margin;
|
|
7231
|
+
}
|
|
7226
7232
|
constructor(options) {
|
|
7227
7233
|
var _a;
|
|
7228
7234
|
super({
|
|
@@ -7392,7 +7398,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
7392
7398
|
var _a, _b, _c;
|
|
7393
7399
|
if (itemToPopout instanceof DockviewPanel &&
|
|
7394
7400
|
itemToPopout.group.size === 1) {
|
|
7395
|
-
return this.addPopoutGroup(itemToPopout.group);
|
|
7401
|
+
return this.addPopoutGroup(itemToPopout.group, options);
|
|
7396
7402
|
}
|
|
7397
7403
|
const theme = getDockviewTheme(this.gridview.element);
|
|
7398
7404
|
const element = this.element;
|
|
@@ -7610,14 +7616,14 @@ class DockviewComponent extends BaseGrid {
|
|
|
7610
7616
|
else {
|
|
7611
7617
|
result.top = DEFAULT_FLOATING_GROUP_POSITION.top;
|
|
7612
7618
|
}
|
|
7613
|
-
if (
|
|
7614
|
-
result.width = Math.max(options.
|
|
7619
|
+
if (typeof options.width === 'number') {
|
|
7620
|
+
result.width = Math.max(options.width, 0);
|
|
7615
7621
|
}
|
|
7616
7622
|
else {
|
|
7617
7623
|
result.width = DEFAULT_FLOATING_GROUP_POSITION.width;
|
|
7618
7624
|
}
|
|
7619
|
-
if (
|
|
7620
|
-
result.height = Math.max(options.
|
|
7625
|
+
if (typeof options.height === 'number') {
|
|
7626
|
+
result.height = Math.max(options.height, 0);
|
|
7621
7627
|
}
|
|
7622
7628
|
else {
|
|
7623
7629
|
result.height = DEFAULT_FLOATING_GROUP_POSITION.height;
|
|
@@ -7748,7 +7754,10 @@ class DockviewComponent extends BaseGrid {
|
|
|
7748
7754
|
if (changed_rootOverlayOptions) {
|
|
7749
7755
|
this._rootDropTarget.setOverlayModel(options.rootOverlayModel);
|
|
7750
7756
|
}
|
|
7751
|
-
if (
|
|
7757
|
+
if (
|
|
7758
|
+
// if explicitly set as `undefined`
|
|
7759
|
+
'gap' in options &&
|
|
7760
|
+
options.gap === undefined) {
|
|
7752
7761
|
this.gridview.margin = 0;
|
|
7753
7762
|
}
|
|
7754
7763
|
if (typeof options.gap === 'number') {
|
|
@@ -8049,11 +8058,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
8049
8058
|
if (options.floating) {
|
|
8050
8059
|
const group = this.createGroup();
|
|
8051
8060
|
this._onDidAddGroup.fire(group);
|
|
8052
|
-
const
|
|
8061
|
+
const floatingGroupOptions = typeof options.floating === 'object' &&
|
|
8053
8062
|
options.floating !== null
|
|
8054
8063
|
? options.floating
|
|
8055
8064
|
: {};
|
|
8056
|
-
this.addFloatingGroup(group, Object.assign(Object.assign({},
|
|
8065
|
+
this.addFloatingGroup(group, Object.assign(Object.assign({}, floatingGroupOptions), { inDragMode: false, skipRemoveGroup: true, skipActiveGroup: true }));
|
|
8057
8066
|
panel = this.createPanel(options, group);
|
|
8058
8067
|
group.model.openPanel(panel, {
|
|
8059
8068
|
skipSetActive: options.inactive,
|