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
|
*/
|
|
@@ -4265,6 +4265,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4265
4265
|
this._width = 0;
|
|
4266
4266
|
this._height = 0;
|
|
4267
4267
|
this._panels = [];
|
|
4268
|
+
this._panelDisposables = new Map();
|
|
4268
4269
|
this._onMove = new Emitter();
|
|
4269
4270
|
this.onMove = this._onMove.event;
|
|
4270
4271
|
this._onDidDrop = new Emitter();
|
|
@@ -4279,6 +4280,10 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4279
4280
|
this.onGroupDragStart = this._onGroupDragStart.event;
|
|
4280
4281
|
this._onDidAddPanel = new Emitter();
|
|
4281
4282
|
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4283
|
+
this._onDidPanelTitleChange = new Emitter();
|
|
4284
|
+
this.onDidPanelTitleChange = this._onDidPanelTitleChange.event;
|
|
4285
|
+
this._onDidPanelParametersChange = new Emitter();
|
|
4286
|
+
this.onDidPanelParametersChange = this._onDidPanelParametersChange.event;
|
|
4282
4287
|
this._onDidRemovePanel = new Emitter();
|
|
4283
4288
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4284
4289
|
this._onDidActivePanelChange = new Emitter();
|
|
@@ -4567,6 +4572,11 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4567
4572
|
if (this.mostRecentlyUsed.includes(panel)) {
|
|
4568
4573
|
this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
|
|
4569
4574
|
}
|
|
4575
|
+
const disposable = this._panelDisposables.get(panel.id);
|
|
4576
|
+
if (disposable) {
|
|
4577
|
+
disposable.dispose();
|
|
4578
|
+
this._panelDisposables.delete(panel.id);
|
|
4579
|
+
}
|
|
4570
4580
|
this._onDidRemovePanel.fire({ panel });
|
|
4571
4581
|
}
|
|
4572
4582
|
doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
|
|
@@ -4584,6 +4594,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4584
4594
|
}
|
|
4585
4595
|
this.updateMru(panel);
|
|
4586
4596
|
this.panels.splice(index, 0, panel);
|
|
4597
|
+
this._panelDisposables.set(panel.id, new CompositeDisposable(panel.api.onDidTitleChange((event) => this._onDidPanelTitleChange.fire(event)), panel.api.onDidParametersChange((event) => this._onDidPanelParametersChange.fire(event))));
|
|
4587
4598
|
this._onDidAddPanel.fire({ panel });
|
|
4588
4599
|
}
|
|
4589
4600
|
doSetActivePanel(panel) {
|
|
@@ -5007,14 +5018,16 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5007
5018
|
get height() {
|
|
5008
5019
|
return this._height;
|
|
5009
5020
|
}
|
|
5010
|
-
constructor(id) {
|
|
5021
|
+
constructor(id, component) {
|
|
5011
5022
|
super();
|
|
5012
5023
|
this.id = id;
|
|
5024
|
+
this.component = component;
|
|
5013
5025
|
this._isFocused = false;
|
|
5014
5026
|
this._isActive = false;
|
|
5015
5027
|
this._isVisible = true;
|
|
5016
5028
|
this._width = 0;
|
|
5017
5029
|
this._height = 0;
|
|
5030
|
+
this._parameters = {};
|
|
5018
5031
|
this.panelUpdatesDisposable = new MutableDisposable();
|
|
5019
5032
|
this._onDidDimensionChange = new Emitter();
|
|
5020
5033
|
this.onDidDimensionsChange = this._onDidDimensionChange.event;
|
|
@@ -5032,8 +5045,8 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5032
5045
|
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
5033
5046
|
this._onActiveChange = new Emitter();
|
|
5034
5047
|
this.onActiveChange = this._onActiveChange.event;
|
|
5035
|
-
this.
|
|
5036
|
-
this.
|
|
5048
|
+
this._onDidParametersChange = new Emitter();
|
|
5049
|
+
this.onDidParametersChange = this._onDidParametersChange.event;
|
|
5037
5050
|
this.addDisposables(this.onDidFocusChange((event) => {
|
|
5038
5051
|
this._isFocused = event.isFocused;
|
|
5039
5052
|
}), this.onDidActiveChange((event) => {
|
|
@@ -5043,10 +5056,14 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5043
5056
|
}), this.onDidDimensionsChange((event) => {
|
|
5044
5057
|
this._width = event.width;
|
|
5045
5058
|
this._height = event.height;
|
|
5046
|
-
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this.
|
|
5059
|
+
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onWillFocus, this._onWillVisibilityChange, this._onDidParametersChange);
|
|
5060
|
+
}
|
|
5061
|
+
getParameters() {
|
|
5062
|
+
return this._parameters;
|
|
5047
5063
|
}
|
|
5048
5064
|
initialize(panel) {
|
|
5049
|
-
this.panelUpdatesDisposable.value = this.
|
|
5065
|
+
this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
|
|
5066
|
+
this._parameters = parameters;
|
|
5050
5067
|
panel.update({
|
|
5051
5068
|
params: parameters,
|
|
5052
5069
|
});
|
|
@@ -5059,14 +5076,14 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5059
5076
|
this._onActiveChange.fire();
|
|
5060
5077
|
}
|
|
5061
5078
|
updateParameters(parameters) {
|
|
5062
|
-
this.
|
|
5079
|
+
this._onDidParametersChange.fire(parameters);
|
|
5063
5080
|
}
|
|
5064
5081
|
}
|
|
5065
5082
|
|
|
5066
5083
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5067
5084
|
//
|
|
5068
|
-
constructor(id) {
|
|
5069
|
-
super(id);
|
|
5085
|
+
constructor(id, component) {
|
|
5086
|
+
super(id, component);
|
|
5070
5087
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5071
5088
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5072
5089
|
//
|
|
@@ -5091,8 +5108,8 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5091
5108
|
set pane(pane) {
|
|
5092
5109
|
this._pane = pane;
|
|
5093
5110
|
}
|
|
5094
|
-
constructor(id) {
|
|
5095
|
-
super(id);
|
|
5111
|
+
constructor(id, component) {
|
|
5112
|
+
super(id, component);
|
|
5096
5113
|
this._onDidExpansionChange = new Emitter({
|
|
5097
5114
|
replay: true,
|
|
5098
5115
|
});
|
|
@@ -5251,7 +5268,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5251
5268
|
this.header.style.display = value ? '' : 'none';
|
|
5252
5269
|
}
|
|
5253
5270
|
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5254
|
-
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5271
|
+
super(id, component, new PaneviewPanelApiImpl(id, component));
|
|
5255
5272
|
this.headerComponent = headerComponent;
|
|
5256
5273
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5257
5274
|
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
@@ -5482,8 +5499,8 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5482
5499
|
}
|
|
5483
5500
|
|
|
5484
5501
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
5485
|
-
constructor(id, panel) {
|
|
5486
|
-
super(id);
|
|
5502
|
+
constructor(id, component, panel) {
|
|
5503
|
+
super(id, component);
|
|
5487
5504
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5488
5505
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5489
5506
|
this._onDidConstraintsChange = new Emitter();
|
|
@@ -5554,7 +5571,7 @@ class GridviewPanel extends BasePanelView {
|
|
|
5554
5571
|
return this.api.isActive;
|
|
5555
5572
|
}
|
|
5556
5573
|
constructor(id, component, options, api) {
|
|
5557
|
-
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
5574
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
|
|
5558
5575
|
this._evaluatedMinimumWidth = 0;
|
|
5559
5576
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
5560
5577
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -5662,7 +5679,7 @@ class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
5662
5679
|
return this._group.model.location;
|
|
5663
5680
|
}
|
|
5664
5681
|
constructor(id, accessor) {
|
|
5665
|
-
super(id);
|
|
5682
|
+
super(id, '__dockviewgroup__');
|
|
5666
5683
|
this.accessor = accessor;
|
|
5667
5684
|
this._onDidLocationChange = new Emitter();
|
|
5668
5685
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
@@ -5836,8 +5853,11 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
5836
5853
|
get group() {
|
|
5837
5854
|
return this._group;
|
|
5838
5855
|
}
|
|
5839
|
-
|
|
5840
|
-
|
|
5856
|
+
get tabComponent() {
|
|
5857
|
+
return this._tabComponent;
|
|
5858
|
+
}
|
|
5859
|
+
constructor(panel, group, accessor, component, tabComponent) {
|
|
5860
|
+
super(panel.id, component);
|
|
5841
5861
|
this.panel = panel;
|
|
5842
5862
|
this.accessor = accessor;
|
|
5843
5863
|
this._onDidTitleChange = new Emitter();
|
|
@@ -5851,6 +5871,7 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
5851
5871
|
this._onDidLocationChange = new Emitter();
|
|
5852
5872
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5853
5873
|
this.groupEventsDisposable = new MutableDisposable();
|
|
5874
|
+
this._tabComponent = tabComponent;
|
|
5854
5875
|
this.initialize(panel);
|
|
5855
5876
|
this._group = group;
|
|
5856
5877
|
this.setupGroupEventListeners();
|
|
@@ -5933,7 +5954,7 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
5933
5954
|
var _a;
|
|
5934
5955
|
return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
|
|
5935
5956
|
}
|
|
5936
|
-
constructor(id, accessor, containerApi, group, view, options) {
|
|
5957
|
+
constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
|
|
5937
5958
|
super();
|
|
5938
5959
|
this.id = id;
|
|
5939
5960
|
this.accessor = accessor;
|
|
@@ -5941,7 +5962,7 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
5941
5962
|
this.view = view;
|
|
5942
5963
|
this._renderer = options.renderer;
|
|
5943
5964
|
this._group = group;
|
|
5944
|
-
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
5965
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
|
|
5945
5966
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
5946
5967
|
accessor.setActivePanel(this);
|
|
5947
5968
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -6236,7 +6257,7 @@ class DefaultDockviewDeserialzier {
|
|
|
6236
6257
|
? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
|
|
6237
6258
|
: panelData.tabComponent;
|
|
6238
6259
|
const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
|
|
6239
|
-
const panel = new DockviewPanel(panelId, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6260
|
+
const panel = new DockviewPanel(panelId, contentComponent, tabComponent, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6240
6261
|
renderer: panelData.renderer,
|
|
6241
6262
|
});
|
|
6242
6263
|
panel.init({
|
|
@@ -8246,6 +8267,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
8246
8267
|
if (this._onDidActivePanelChange.value !== event.panel) {
|
|
8247
8268
|
this._onDidActivePanelChange.fire(event.panel);
|
|
8248
8269
|
}
|
|
8270
|
+
}), exports.DockviewEvent.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
|
|
8271
|
+
this._bufferOnDidLayoutChange.fire();
|
|
8249
8272
|
}));
|
|
8250
8273
|
this._groups.set(view.id, { value: view, disposable });
|
|
8251
8274
|
}
|
|
@@ -8258,7 +8281,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
8258
8281
|
const contentComponent = options.component;
|
|
8259
8282
|
const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
|
|
8260
8283
|
const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
|
|
8261
|
-
const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
|
|
8284
|
+
const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
|
|
8262
8285
|
panel.init({
|
|
8263
8286
|
title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
|
|
8264
8287
|
params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
|
|
@@ -9173,7 +9196,7 @@ class SplitviewPanel extends BasePanelView {
|
|
|
9173
9196
|
return this._snap;
|
|
9174
9197
|
}
|
|
9175
9198
|
constructor(id, componentName) {
|
|
9176
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
9199
|
+
super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
|
|
9177
9200
|
this._evaluatedMinimumSize = 0;
|
|
9178
9201
|
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
9179
9202
|
this._minimumSize = 0;
|