dockview-core 1.10.1 → 1.10.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/dockviewGroupPanelApi.js +1 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts +4 -1
- package/dist/cjs/api/dockviewPanelApi.js +10 -2
- package/dist/cjs/api/gridviewPanelApi.d.ts +1 -1
- package/dist/cjs/api/gridviewPanelApi.js +2 -2
- package/dist/cjs/api/panelApi.d.ts +8 -3
- package/dist/cjs/api/panelApi.js +13 -6
- package/dist/cjs/api/paneviewPanelApi.d.ts +1 -1
- package/dist/cjs/api/paneviewPanelApi.js +2 -2
- package/dist/cjs/api/splitviewPanelApi.d.ts +1 -1
- package/dist/cjs/api/splitviewPanelApi.js +2 -2
- package/dist/cjs/dockview/deserializer.js +1 -1
- package/dist/cjs/dockview/dockviewComponent.js +3 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +7 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +16 -0
- package/dist/cjs/dockview/dockviewPanel.d.ts +1 -1
- package/dist/cjs/dockview/dockviewPanel.js +2 -2
- package/dist/cjs/gridview/gridviewPanel.js +1 -1
- package/dist/cjs/paneview/paneviewPanel.js +1 -1
- package/dist/cjs/splitview/splitviewPanel.js +1 -1
- package/dist/dockview-core.amd.js +46 -23
- 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 +46 -23
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +46 -23
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +46 -23
- 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 +46 -23
- 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 +46 -23
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/dockviewGroupPanelApi.js +1 -1
- package/dist/esm/api/dockviewPanelApi.d.ts +4 -1
- package/dist/esm/api/dockviewPanelApi.js +6 -2
- package/dist/esm/api/gridviewPanelApi.d.ts +1 -1
- package/dist/esm/api/gridviewPanelApi.js +2 -2
- package/dist/esm/api/panelApi.d.ts +8 -3
- package/dist/esm/api/panelApi.js +12 -6
- package/dist/esm/api/paneviewPanelApi.d.ts +1 -1
- package/dist/esm/api/paneviewPanelApi.js +2 -2
- package/dist/esm/api/splitviewPanelApi.d.ts +1 -1
- package/dist/esm/api/splitviewPanelApi.js +2 -2
- package/dist/esm/dockview/deserializer.js +1 -1
- package/dist/esm/dockview/dockviewComponent.js +3 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +7 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +11 -0
- package/dist/esm/dockview/dockviewPanel.d.ts +1 -1
- package/dist/esm/dockview/dockviewPanel.js +2 -2
- package/dist/esm/gridview/gridviewPanel.js +1 -1
- package/dist/esm/paneview/paneviewPanel.js +1 -1
- package/dist/esm/splitview/splitviewPanel.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.10.
|
|
3
|
+
* @version 1.10.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -4239,6 +4239,7 @@
|
|
|
4239
4239
|
this._width = 0;
|
|
4240
4240
|
this._height = 0;
|
|
4241
4241
|
this._panels = [];
|
|
4242
|
+
this._panelDisposables = new Map();
|
|
4242
4243
|
this._onMove = new Emitter();
|
|
4243
4244
|
this.onMove = this._onMove.event;
|
|
4244
4245
|
this._onDidDrop = new Emitter();
|
|
@@ -4253,6 +4254,10 @@
|
|
|
4253
4254
|
this.onGroupDragStart = this._onGroupDragStart.event;
|
|
4254
4255
|
this._onDidAddPanel = new Emitter();
|
|
4255
4256
|
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4257
|
+
this._onDidPanelTitleChange = new Emitter();
|
|
4258
|
+
this.onDidPanelTitleChange = this._onDidPanelTitleChange.event;
|
|
4259
|
+
this._onDidPanelParametersChange = new Emitter();
|
|
4260
|
+
this.onDidPanelParametersChange = this._onDidPanelParametersChange.event;
|
|
4256
4261
|
this._onDidRemovePanel = new Emitter();
|
|
4257
4262
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4258
4263
|
this._onDidActivePanelChange = new Emitter();
|
|
@@ -4541,6 +4546,11 @@
|
|
|
4541
4546
|
if (this.mostRecentlyUsed.includes(panel)) {
|
|
4542
4547
|
this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
|
|
4543
4548
|
}
|
|
4549
|
+
const disposable = this._panelDisposables.get(panel.id);
|
|
4550
|
+
if (disposable) {
|
|
4551
|
+
disposable.dispose();
|
|
4552
|
+
this._panelDisposables.delete(panel.id);
|
|
4553
|
+
}
|
|
4544
4554
|
this._onDidRemovePanel.fire({ panel });
|
|
4545
4555
|
}
|
|
4546
4556
|
doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
|
|
@@ -4558,6 +4568,7 @@
|
|
|
4558
4568
|
}
|
|
4559
4569
|
this.updateMru(panel);
|
|
4560
4570
|
this.panels.splice(index, 0, panel);
|
|
4571
|
+
this._panelDisposables.set(panel.id, new CompositeDisposable(panel.api.onDidTitleChange((event) => this._onDidPanelTitleChange.fire(event)), panel.api.onDidParametersChange((event) => this._onDidPanelParametersChange.fire(event))));
|
|
4561
4572
|
this._onDidAddPanel.fire({ panel });
|
|
4562
4573
|
}
|
|
4563
4574
|
doSetActivePanel(panel) {
|
|
@@ -4981,14 +4992,16 @@
|
|
|
4981
4992
|
get height() {
|
|
4982
4993
|
return this._height;
|
|
4983
4994
|
}
|
|
4984
|
-
constructor(id) {
|
|
4995
|
+
constructor(id, component) {
|
|
4985
4996
|
super();
|
|
4986
4997
|
this.id = id;
|
|
4998
|
+
this.component = component;
|
|
4987
4999
|
this._isFocused = false;
|
|
4988
5000
|
this._isActive = false;
|
|
4989
5001
|
this._isVisible = true;
|
|
4990
5002
|
this._width = 0;
|
|
4991
5003
|
this._height = 0;
|
|
5004
|
+
this._parameters = {};
|
|
4992
5005
|
this.panelUpdatesDisposable = new MutableDisposable();
|
|
4993
5006
|
this._onDidDimensionChange = new Emitter();
|
|
4994
5007
|
this.onDidDimensionsChange = this._onDidDimensionChange.event;
|
|
@@ -5006,8 +5019,8 @@
|
|
|
5006
5019
|
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
5007
5020
|
this._onActiveChange = new Emitter();
|
|
5008
5021
|
this.onActiveChange = this._onActiveChange.event;
|
|
5009
|
-
this.
|
|
5010
|
-
this.
|
|
5022
|
+
this._onDidParametersChange = new Emitter();
|
|
5023
|
+
this.onDidParametersChange = this._onDidParametersChange.event;
|
|
5011
5024
|
this.addDisposables(this.onDidFocusChange((event) => {
|
|
5012
5025
|
this._isFocused = event.isFocused;
|
|
5013
5026
|
}), this.onDidActiveChange((event) => {
|
|
@@ -5017,10 +5030,14 @@
|
|
|
5017
5030
|
}), this.onDidDimensionsChange((event) => {
|
|
5018
5031
|
this._width = event.width;
|
|
5019
5032
|
this._height = event.height;
|
|
5020
|
-
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this.
|
|
5033
|
+
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onWillFocus, this._onWillVisibilityChange, this._onDidParametersChange);
|
|
5034
|
+
}
|
|
5035
|
+
getParameters() {
|
|
5036
|
+
return this._parameters;
|
|
5021
5037
|
}
|
|
5022
5038
|
initialize(panel) {
|
|
5023
|
-
this.panelUpdatesDisposable.value = this.
|
|
5039
|
+
this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
|
|
5040
|
+
this._parameters = parameters;
|
|
5024
5041
|
panel.update({
|
|
5025
5042
|
params: parameters,
|
|
5026
5043
|
});
|
|
@@ -5033,14 +5050,14 @@
|
|
|
5033
5050
|
this._onActiveChange.fire();
|
|
5034
5051
|
}
|
|
5035
5052
|
updateParameters(parameters) {
|
|
5036
|
-
this.
|
|
5053
|
+
this._onDidParametersChange.fire(parameters);
|
|
5037
5054
|
}
|
|
5038
5055
|
}
|
|
5039
5056
|
|
|
5040
5057
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5041
5058
|
//
|
|
5042
|
-
constructor(id) {
|
|
5043
|
-
super(id);
|
|
5059
|
+
constructor(id, component) {
|
|
5060
|
+
super(id, component);
|
|
5044
5061
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5045
5062
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5046
5063
|
//
|
|
@@ -5065,8 +5082,8 @@
|
|
|
5065
5082
|
set pane(pane) {
|
|
5066
5083
|
this._pane = pane;
|
|
5067
5084
|
}
|
|
5068
|
-
constructor(id) {
|
|
5069
|
-
super(id);
|
|
5085
|
+
constructor(id, component) {
|
|
5086
|
+
super(id, component);
|
|
5070
5087
|
this._onDidExpansionChange = new Emitter({
|
|
5071
5088
|
replay: true,
|
|
5072
5089
|
});
|
|
@@ -5225,7 +5242,7 @@
|
|
|
5225
5242
|
this.header.style.display = value ? '' : 'none';
|
|
5226
5243
|
}
|
|
5227
5244
|
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5228
|
-
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5245
|
+
super(id, component, new PaneviewPanelApiImpl(id, component));
|
|
5229
5246
|
this.headerComponent = headerComponent;
|
|
5230
5247
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5231
5248
|
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
@@ -5456,8 +5473,8 @@
|
|
|
5456
5473
|
}
|
|
5457
5474
|
|
|
5458
5475
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
5459
|
-
constructor(id, panel) {
|
|
5460
|
-
super(id);
|
|
5476
|
+
constructor(id, component, panel) {
|
|
5477
|
+
super(id, component);
|
|
5461
5478
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5462
5479
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5463
5480
|
this._onDidConstraintsChange = new Emitter();
|
|
@@ -5528,7 +5545,7 @@
|
|
|
5528
5545
|
return this.api.isActive;
|
|
5529
5546
|
}
|
|
5530
5547
|
constructor(id, component, options, api) {
|
|
5531
|
-
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
5548
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
|
|
5532
5549
|
this._evaluatedMinimumWidth = 0;
|
|
5533
5550
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
5534
5551
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -5636,7 +5653,7 @@
|
|
|
5636
5653
|
return this._group.model.location;
|
|
5637
5654
|
}
|
|
5638
5655
|
constructor(id, accessor) {
|
|
5639
|
-
super(id);
|
|
5656
|
+
super(id, '__dockviewgroup__');
|
|
5640
5657
|
this.accessor = accessor;
|
|
5641
5658
|
this._onDidLocationChange = new Emitter();
|
|
5642
5659
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
@@ -5810,8 +5827,11 @@
|
|
|
5810
5827
|
get group() {
|
|
5811
5828
|
return this._group;
|
|
5812
5829
|
}
|
|
5813
|
-
|
|
5814
|
-
|
|
5830
|
+
get tabComponent() {
|
|
5831
|
+
return this._tabComponent;
|
|
5832
|
+
}
|
|
5833
|
+
constructor(panel, group, accessor, component, tabComponent) {
|
|
5834
|
+
super(panel.id, component);
|
|
5815
5835
|
this.panel = panel;
|
|
5816
5836
|
this.accessor = accessor;
|
|
5817
5837
|
this._onDidTitleChange = new Emitter();
|
|
@@ -5825,6 +5845,7 @@
|
|
|
5825
5845
|
this._onDidLocationChange = new Emitter();
|
|
5826
5846
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5827
5847
|
this.groupEventsDisposable = new MutableDisposable();
|
|
5848
|
+
this._tabComponent = tabComponent;
|
|
5828
5849
|
this.initialize(panel);
|
|
5829
5850
|
this._group = group;
|
|
5830
5851
|
this.setupGroupEventListeners();
|
|
@@ -5907,7 +5928,7 @@
|
|
|
5907
5928
|
var _a;
|
|
5908
5929
|
return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
|
|
5909
5930
|
}
|
|
5910
|
-
constructor(id, accessor, containerApi, group, view, options) {
|
|
5931
|
+
constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
|
|
5911
5932
|
super();
|
|
5912
5933
|
this.id = id;
|
|
5913
5934
|
this.accessor = accessor;
|
|
@@ -5915,7 +5936,7 @@
|
|
|
5915
5936
|
this.view = view;
|
|
5916
5937
|
this._renderer = options.renderer;
|
|
5917
5938
|
this._group = group;
|
|
5918
|
-
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
5939
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
|
|
5919
5940
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
5920
5941
|
accessor.setActivePanel(this);
|
|
5921
5942
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -6210,7 +6231,7 @@
|
|
|
6210
6231
|
? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
|
|
6211
6232
|
: panelData.tabComponent;
|
|
6212
6233
|
const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
|
|
6213
|
-
const panel = new DockviewPanel(panelId, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6234
|
+
const panel = new DockviewPanel(panelId, contentComponent, tabComponent, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6214
6235
|
renderer: panelData.renderer,
|
|
6215
6236
|
});
|
|
6216
6237
|
panel.init({
|
|
@@ -8220,6 +8241,8 @@
|
|
|
8220
8241
|
if (this._onDidActivePanelChange.value !== event.panel) {
|
|
8221
8242
|
this._onDidActivePanelChange.fire(event.panel);
|
|
8222
8243
|
}
|
|
8244
|
+
}), exports.DockviewEvent.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
|
|
8245
|
+
this._bufferOnDidLayoutChange.fire();
|
|
8223
8246
|
}));
|
|
8224
8247
|
this._groups.set(view.id, { value: view, disposable });
|
|
8225
8248
|
}
|
|
@@ -8232,7 +8255,7 @@
|
|
|
8232
8255
|
const contentComponent = options.component;
|
|
8233
8256
|
const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
|
|
8234
8257
|
const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
|
|
8235
|
-
const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
|
|
8258
|
+
const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
|
|
8236
8259
|
panel.init({
|
|
8237
8260
|
title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
|
|
8238
8261
|
params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
|
|
@@ -9147,7 +9170,7 @@
|
|
|
9147
9170
|
return this._snap;
|
|
9148
9171
|
}
|
|
9149
9172
|
constructor(id, componentName) {
|
|
9150
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
9173
|
+
super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
|
|
9151
9174
|
this._evaluatedMinimumSize = 0;
|
|
9152
9175
|
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
9153
9176
|
this._minimumSize = 0;
|