dockview-core 4.9.0 → 4.11.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/dockviewPanelApi.d.ts +1 -1
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +1 -0
- package/dist/cjs/dockview/dockviewGroupPanel.js +43 -1
- package/dist/cjs/gridview/gridviewComponent.js +1 -1
- package/dist/dockview-core.amd.js +45 -3
- 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 +45 -3
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +45 -3
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +45 -3
- 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 +45 -3
- 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 +45 -3
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/dockviewPanelApi.d.ts +1 -1
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +1 -0
- package/dist/esm/dockview/dockviewGroupPanel.js +43 -1
- package/dist/esm/gridview/gridviewComponent.js +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ export interface ActiveGroupEvent {
|
|
|
18
18
|
export interface GroupChangedEvent {
|
|
19
19
|
}
|
|
20
20
|
export type DockviewPanelMoveParams = DockviewGroupMoveParams;
|
|
21
|
-
export interface DockviewPanelApi extends Omit<GridviewPanelApi, 'setVisible' | 'onDidConstraintsChange'
|
|
21
|
+
export interface DockviewPanelApi extends Omit<GridviewPanelApi, 'setVisible' | 'onDidConstraintsChange'> {
|
|
22
22
|
/**
|
|
23
23
|
* The id of the tab component renderer
|
|
24
24
|
*
|
|
@@ -14,6 +14,7 @@ export interface IDockviewGroupPanel extends IGridviewPanel<DockviewGroupPanelAp
|
|
|
14
14
|
export type IDockviewGroupPanelPublic = IDockviewGroupPanel;
|
|
15
15
|
export declare class DockviewGroupPanel extends GridviewPanel<DockviewGroupPanelApiImpl> implements IDockviewGroupPanel {
|
|
16
16
|
private readonly _model;
|
|
17
|
+
private _explicitConstraints;
|
|
17
18
|
get minimumWidth(): number;
|
|
18
19
|
get minimumHeight(): number;
|
|
19
20
|
get maximumWidth(): number;
|
|
@@ -19,6 +19,7 @@ exports.DockviewGroupPanel = void 0;
|
|
|
19
19
|
var dockviewGroupPanelModel_1 = require("./dockviewGroupPanelModel");
|
|
20
20
|
var gridviewPanel_1 = require("../gridview/gridviewPanel");
|
|
21
21
|
var dockviewGroupPanelApi_1 = require("../api/dockviewGroupPanelApi");
|
|
22
|
+
// GridConstraintChangeEvent2 is not exported, so we'll type it manually
|
|
22
23
|
var MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
|
|
23
24
|
var MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
|
|
24
25
|
var DockviewGroupPanel = /** @class */ (function (_super) {
|
|
@@ -27,20 +28,49 @@ var DockviewGroupPanel = /** @class */ (function (_super) {
|
|
|
27
28
|
var _a, _b, _c, _d, _e, _f;
|
|
28
29
|
var _this = _super.call(this, id, 'groupview_default', {
|
|
29
30
|
minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
|
|
30
|
-
minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.
|
|
31
|
+
minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
|
|
31
32
|
maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
|
|
32
33
|
maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
|
|
33
34
|
}, new dockviewGroupPanelApi_1.DockviewGroupPanelApiImpl(id, accessor)) || this;
|
|
35
|
+
// Track explicitly set constraints to override panel constraints
|
|
36
|
+
_this._explicitConstraints = {};
|
|
34
37
|
_this.api.initialize(_this); // cannot use 'this' after after 'super' call
|
|
35
38
|
_this._model = new dockviewGroupPanelModel_1.DockviewGroupPanelModel(_this.element, accessor, id, options, _this);
|
|
36
39
|
_this.addDisposables(_this.model.onDidActivePanelChange(function (event) {
|
|
37
40
|
_this.api._onDidActivePanelChange.fire(event);
|
|
41
|
+
}), _this.api.onDidConstraintsChangeInternal(function (event) {
|
|
42
|
+
// Track explicitly set constraints to override panel constraints
|
|
43
|
+
// Extract numeric values from functions or values
|
|
44
|
+
if (event.minimumWidth !== undefined) {
|
|
45
|
+
_this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
|
|
46
|
+
? event.minimumWidth()
|
|
47
|
+
: event.minimumWidth;
|
|
48
|
+
}
|
|
49
|
+
if (event.minimumHeight !== undefined) {
|
|
50
|
+
_this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
|
|
51
|
+
? event.minimumHeight()
|
|
52
|
+
: event.minimumHeight;
|
|
53
|
+
}
|
|
54
|
+
if (event.maximumWidth !== undefined) {
|
|
55
|
+
_this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
|
|
56
|
+
? event.maximumWidth()
|
|
57
|
+
: event.maximumWidth;
|
|
58
|
+
}
|
|
59
|
+
if (event.maximumHeight !== undefined) {
|
|
60
|
+
_this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
|
|
61
|
+
? event.maximumHeight()
|
|
62
|
+
: event.maximumHeight;
|
|
63
|
+
}
|
|
38
64
|
}));
|
|
39
65
|
return _this;
|
|
40
66
|
}
|
|
41
67
|
Object.defineProperty(DockviewGroupPanel.prototype, "minimumWidth", {
|
|
42
68
|
get: function () {
|
|
43
69
|
var _a;
|
|
70
|
+
// Check for explicitly set group constraint first
|
|
71
|
+
if (typeof this._explicitConstraints.minimumWidth === 'number') {
|
|
72
|
+
return this._explicitConstraints.minimumWidth;
|
|
73
|
+
}
|
|
44
74
|
var activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
|
|
45
75
|
if (typeof activePanelMinimumWidth === 'number') {
|
|
46
76
|
return activePanelMinimumWidth;
|
|
@@ -53,6 +83,10 @@ var DockviewGroupPanel = /** @class */ (function (_super) {
|
|
|
53
83
|
Object.defineProperty(DockviewGroupPanel.prototype, "minimumHeight", {
|
|
54
84
|
get: function () {
|
|
55
85
|
var _a;
|
|
86
|
+
// Check for explicitly set group constraint first
|
|
87
|
+
if (typeof this._explicitConstraints.minimumHeight === 'number') {
|
|
88
|
+
return this._explicitConstraints.minimumHeight;
|
|
89
|
+
}
|
|
56
90
|
var activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
|
|
57
91
|
if (typeof activePanelMinimumHeight === 'number') {
|
|
58
92
|
return activePanelMinimumHeight;
|
|
@@ -65,6 +99,10 @@ var DockviewGroupPanel = /** @class */ (function (_super) {
|
|
|
65
99
|
Object.defineProperty(DockviewGroupPanel.prototype, "maximumWidth", {
|
|
66
100
|
get: function () {
|
|
67
101
|
var _a;
|
|
102
|
+
// Check for explicitly set group constraint first
|
|
103
|
+
if (typeof this._explicitConstraints.maximumWidth === 'number') {
|
|
104
|
+
return this._explicitConstraints.maximumWidth;
|
|
105
|
+
}
|
|
68
106
|
var activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
|
|
69
107
|
if (typeof activePanelMaximumWidth === 'number') {
|
|
70
108
|
return activePanelMaximumWidth;
|
|
@@ -77,6 +115,10 @@ var DockviewGroupPanel = /** @class */ (function (_super) {
|
|
|
77
115
|
Object.defineProperty(DockviewGroupPanel.prototype, "maximumHeight", {
|
|
78
116
|
get: function () {
|
|
79
117
|
var _a;
|
|
118
|
+
// Check for explicitly set group constraint first
|
|
119
|
+
if (typeof this._explicitConstraints.maximumHeight === 'number') {
|
|
120
|
+
return this._explicitConstraints.maximumHeight;
|
|
121
|
+
}
|
|
80
122
|
var activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
|
|
81
123
|
if (typeof activePanelMaximumHeight === 'number') {
|
|
82
124
|
return activePanelMaximumHeight;
|
|
@@ -303,8 +303,8 @@ var GridviewComponent = /** @class */ (function (_super) {
|
|
|
303
303
|
accessor: this,
|
|
304
304
|
isVisible: true,
|
|
305
305
|
});
|
|
306
|
-
this.registerPanel(view);
|
|
307
306
|
this.doAddGroup(view, relativeLocation, options.size);
|
|
307
|
+
this.registerPanel(view);
|
|
308
308
|
this.doSetGroupActive(view);
|
|
309
309
|
return view;
|
|
310
310
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 4.
|
|
3
|
+
* @version 4.11.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -6791,11 +6791,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6791
6791
|
}
|
|
6792
6792
|
}
|
|
6793
6793
|
|
|
6794
|
+
// GridConstraintChangeEvent2 is not exported, so we'll type it manually
|
|
6794
6795
|
const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
|
|
6795
6796
|
const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
|
|
6796
6797
|
class DockviewGroupPanel extends GridviewPanel {
|
|
6797
6798
|
get minimumWidth() {
|
|
6798
6799
|
var _a;
|
|
6800
|
+
// Check for explicitly set group constraint first
|
|
6801
|
+
if (typeof this._explicitConstraints.minimumWidth === 'number') {
|
|
6802
|
+
return this._explicitConstraints.minimumWidth;
|
|
6803
|
+
}
|
|
6799
6804
|
const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
|
|
6800
6805
|
if (typeof activePanelMinimumWidth === 'number') {
|
|
6801
6806
|
return activePanelMinimumWidth;
|
|
@@ -6804,6 +6809,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6804
6809
|
}
|
|
6805
6810
|
get minimumHeight() {
|
|
6806
6811
|
var _a;
|
|
6812
|
+
// Check for explicitly set group constraint first
|
|
6813
|
+
if (typeof this._explicitConstraints.minimumHeight === 'number') {
|
|
6814
|
+
return this._explicitConstraints.minimumHeight;
|
|
6815
|
+
}
|
|
6807
6816
|
const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
|
|
6808
6817
|
if (typeof activePanelMinimumHeight === 'number') {
|
|
6809
6818
|
return activePanelMinimumHeight;
|
|
@@ -6812,6 +6821,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6812
6821
|
}
|
|
6813
6822
|
get maximumWidth() {
|
|
6814
6823
|
var _a;
|
|
6824
|
+
// Check for explicitly set group constraint first
|
|
6825
|
+
if (typeof this._explicitConstraints.maximumWidth === 'number') {
|
|
6826
|
+
return this._explicitConstraints.maximumWidth;
|
|
6827
|
+
}
|
|
6815
6828
|
const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
|
|
6816
6829
|
if (typeof activePanelMaximumWidth === 'number') {
|
|
6817
6830
|
return activePanelMaximumWidth;
|
|
@@ -6820,6 +6833,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6820
6833
|
}
|
|
6821
6834
|
get maximumHeight() {
|
|
6822
6835
|
var _a;
|
|
6836
|
+
// Check for explicitly set group constraint first
|
|
6837
|
+
if (typeof this._explicitConstraints.maximumHeight === 'number') {
|
|
6838
|
+
return this._explicitConstraints.maximumHeight;
|
|
6839
|
+
}
|
|
6823
6840
|
const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
|
|
6824
6841
|
if (typeof activePanelMaximumHeight === 'number') {
|
|
6825
6842
|
return activePanelMaximumHeight;
|
|
@@ -6851,14 +6868,39 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6851
6868
|
var _a, _b, _c, _d, _e, _f;
|
|
6852
6869
|
super(id, 'groupview_default', {
|
|
6853
6870
|
minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
|
|
6854
|
-
minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.
|
|
6871
|
+
minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
|
|
6855
6872
|
maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
|
|
6856
6873
|
maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
|
|
6857
6874
|
}, new DockviewGroupPanelApiImpl(id, accessor));
|
|
6875
|
+
// Track explicitly set constraints to override panel constraints
|
|
6876
|
+
this._explicitConstraints = {};
|
|
6858
6877
|
this.api.initialize(this); // cannot use 'this' after after 'super' call
|
|
6859
6878
|
this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
|
|
6860
6879
|
this.addDisposables(this.model.onDidActivePanelChange((event) => {
|
|
6861
6880
|
this.api._onDidActivePanelChange.fire(event);
|
|
6881
|
+
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
6882
|
+
// Track explicitly set constraints to override panel constraints
|
|
6883
|
+
// Extract numeric values from functions or values
|
|
6884
|
+
if (event.minimumWidth !== undefined) {
|
|
6885
|
+
this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
|
|
6886
|
+
? event.minimumWidth()
|
|
6887
|
+
: event.minimumWidth;
|
|
6888
|
+
}
|
|
6889
|
+
if (event.minimumHeight !== undefined) {
|
|
6890
|
+
this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
|
|
6891
|
+
? event.minimumHeight()
|
|
6892
|
+
: event.minimumHeight;
|
|
6893
|
+
}
|
|
6894
|
+
if (event.maximumWidth !== undefined) {
|
|
6895
|
+
this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
|
|
6896
|
+
? event.maximumWidth()
|
|
6897
|
+
: event.maximumWidth;
|
|
6898
|
+
}
|
|
6899
|
+
if (event.maximumHeight !== undefined) {
|
|
6900
|
+
this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
|
|
6901
|
+
? event.maximumHeight()
|
|
6902
|
+
: event.maximumHeight;
|
|
6903
|
+
}
|
|
6862
6904
|
}));
|
|
6863
6905
|
}
|
|
6864
6906
|
focus() {
|
|
@@ -10326,8 +10368,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
10326
10368
|
accessor: this,
|
|
10327
10369
|
isVisible: true,
|
|
10328
10370
|
});
|
|
10329
|
-
this.registerPanel(view);
|
|
10330
10371
|
this.doAddGroup(view, relativeLocation, options.size);
|
|
10372
|
+
this.registerPanel(view);
|
|
10331
10373
|
this.doSetGroupActive(view);
|
|
10332
10374
|
return view;
|
|
10333
10375
|
}
|