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
|
*/
|
|
@@ -4263,6 +4263,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4263
4263
|
this._width = 0;
|
|
4264
4264
|
this._height = 0;
|
|
4265
4265
|
this._panels = [];
|
|
4266
|
+
this._panelDisposables = new Map();
|
|
4266
4267
|
this._onMove = new Emitter();
|
|
4267
4268
|
this.onMove = this._onMove.event;
|
|
4268
4269
|
this._onDidDrop = new Emitter();
|
|
@@ -4277,6 +4278,10 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4277
4278
|
this.onGroupDragStart = this._onGroupDragStart.event;
|
|
4278
4279
|
this._onDidAddPanel = new Emitter();
|
|
4279
4280
|
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4281
|
+
this._onDidPanelTitleChange = new Emitter();
|
|
4282
|
+
this.onDidPanelTitleChange = this._onDidPanelTitleChange.event;
|
|
4283
|
+
this._onDidPanelParametersChange = new Emitter();
|
|
4284
|
+
this.onDidPanelParametersChange = this._onDidPanelParametersChange.event;
|
|
4280
4285
|
this._onDidRemovePanel = new Emitter();
|
|
4281
4286
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4282
4287
|
this._onDidActivePanelChange = new Emitter();
|
|
@@ -4565,6 +4570,11 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4565
4570
|
if (this.mostRecentlyUsed.includes(panel)) {
|
|
4566
4571
|
this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
|
|
4567
4572
|
}
|
|
4573
|
+
const disposable = this._panelDisposables.get(panel.id);
|
|
4574
|
+
if (disposable) {
|
|
4575
|
+
disposable.dispose();
|
|
4576
|
+
this._panelDisposables.delete(panel.id);
|
|
4577
|
+
}
|
|
4568
4578
|
this._onDidRemovePanel.fire({ panel });
|
|
4569
4579
|
}
|
|
4570
4580
|
doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
|
|
@@ -4582,6 +4592,7 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
4582
4592
|
}
|
|
4583
4593
|
this.updateMru(panel);
|
|
4584
4594
|
this.panels.splice(index, 0, panel);
|
|
4595
|
+
this._panelDisposables.set(panel.id, new CompositeDisposable(panel.api.onDidTitleChange((event) => this._onDidPanelTitleChange.fire(event)), panel.api.onDidParametersChange((event) => this._onDidPanelParametersChange.fire(event))));
|
|
4585
4596
|
this._onDidAddPanel.fire({ panel });
|
|
4586
4597
|
}
|
|
4587
4598
|
doSetActivePanel(panel) {
|
|
@@ -5005,14 +5016,16 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5005
5016
|
get height() {
|
|
5006
5017
|
return this._height;
|
|
5007
5018
|
}
|
|
5008
|
-
constructor(id) {
|
|
5019
|
+
constructor(id, component) {
|
|
5009
5020
|
super();
|
|
5010
5021
|
this.id = id;
|
|
5022
|
+
this.component = component;
|
|
5011
5023
|
this._isFocused = false;
|
|
5012
5024
|
this._isActive = false;
|
|
5013
5025
|
this._isVisible = true;
|
|
5014
5026
|
this._width = 0;
|
|
5015
5027
|
this._height = 0;
|
|
5028
|
+
this._parameters = {};
|
|
5016
5029
|
this.panelUpdatesDisposable = new MutableDisposable();
|
|
5017
5030
|
this._onDidDimensionChange = new Emitter();
|
|
5018
5031
|
this.onDidDimensionsChange = this._onDidDimensionChange.event;
|
|
@@ -5030,8 +5043,8 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5030
5043
|
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
5031
5044
|
this._onActiveChange = new Emitter();
|
|
5032
5045
|
this.onActiveChange = this._onActiveChange.event;
|
|
5033
|
-
this.
|
|
5034
|
-
this.
|
|
5046
|
+
this._onDidParametersChange = new Emitter();
|
|
5047
|
+
this.onDidParametersChange = this._onDidParametersChange.event;
|
|
5035
5048
|
this.addDisposables(this.onDidFocusChange((event) => {
|
|
5036
5049
|
this._isFocused = event.isFocused;
|
|
5037
5050
|
}), this.onDidActiveChange((event) => {
|
|
@@ -5041,10 +5054,14 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5041
5054
|
}), this.onDidDimensionsChange((event) => {
|
|
5042
5055
|
this._width = event.width;
|
|
5043
5056
|
this._height = event.height;
|
|
5044
|
-
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this.
|
|
5057
|
+
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onWillFocus, this._onWillVisibilityChange, this._onDidParametersChange);
|
|
5058
|
+
}
|
|
5059
|
+
getParameters() {
|
|
5060
|
+
return this._parameters;
|
|
5045
5061
|
}
|
|
5046
5062
|
initialize(panel) {
|
|
5047
|
-
this.panelUpdatesDisposable.value = this.
|
|
5063
|
+
this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
|
|
5064
|
+
this._parameters = parameters;
|
|
5048
5065
|
panel.update({
|
|
5049
5066
|
params: parameters,
|
|
5050
5067
|
});
|
|
@@ -5057,14 +5074,14 @@ class PanelApiImpl extends CompositeDisposable {
|
|
|
5057
5074
|
this._onActiveChange.fire();
|
|
5058
5075
|
}
|
|
5059
5076
|
updateParameters(parameters) {
|
|
5060
|
-
this.
|
|
5077
|
+
this._onDidParametersChange.fire(parameters);
|
|
5061
5078
|
}
|
|
5062
5079
|
}
|
|
5063
5080
|
|
|
5064
5081
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5065
5082
|
//
|
|
5066
|
-
constructor(id) {
|
|
5067
|
-
super(id);
|
|
5083
|
+
constructor(id, component) {
|
|
5084
|
+
super(id, component);
|
|
5068
5085
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5069
5086
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5070
5087
|
//
|
|
@@ -5089,8 +5106,8 @@ class PaneviewPanelApiImpl extends SplitviewPanelApiImpl {
|
|
|
5089
5106
|
set pane(pane) {
|
|
5090
5107
|
this._pane = pane;
|
|
5091
5108
|
}
|
|
5092
|
-
constructor(id) {
|
|
5093
|
-
super(id);
|
|
5109
|
+
constructor(id, component) {
|
|
5110
|
+
super(id, component);
|
|
5094
5111
|
this._onDidExpansionChange = new Emitter({
|
|
5095
5112
|
replay: true,
|
|
5096
5113
|
});
|
|
@@ -5249,7 +5266,7 @@ class PaneviewPanel extends BasePanelView {
|
|
|
5249
5266
|
this.header.style.display = value ? '' : 'none';
|
|
5250
5267
|
}
|
|
5251
5268
|
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5252
|
-
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5269
|
+
super(id, component, new PaneviewPanelApiImpl(id, component));
|
|
5253
5270
|
this.headerComponent = headerComponent;
|
|
5254
5271
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5255
5272
|
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
@@ -5480,8 +5497,8 @@ class DraggablePaneviewPanel extends PaneviewPanel {
|
|
|
5480
5497
|
}
|
|
5481
5498
|
|
|
5482
5499
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
5483
|
-
constructor(id, panel) {
|
|
5484
|
-
super(id);
|
|
5500
|
+
constructor(id, component, panel) {
|
|
5501
|
+
super(id, component);
|
|
5485
5502
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5486
5503
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5487
5504
|
this._onDidConstraintsChange = new Emitter();
|
|
@@ -5552,7 +5569,7 @@ class GridviewPanel extends BasePanelView {
|
|
|
5552
5569
|
return this.api.isActive;
|
|
5553
5570
|
}
|
|
5554
5571
|
constructor(id, component, options, api) {
|
|
5555
|
-
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
5572
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
|
|
5556
5573
|
this._evaluatedMinimumWidth = 0;
|
|
5557
5574
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
5558
5575
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -5660,7 +5677,7 @@ class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
5660
5677
|
return this._group.model.location;
|
|
5661
5678
|
}
|
|
5662
5679
|
constructor(id, accessor) {
|
|
5663
|
-
super(id);
|
|
5680
|
+
super(id, '__dockviewgroup__');
|
|
5664
5681
|
this.accessor = accessor;
|
|
5665
5682
|
this._onDidLocationChange = new Emitter();
|
|
5666
5683
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
@@ -5834,8 +5851,11 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
5834
5851
|
get group() {
|
|
5835
5852
|
return this._group;
|
|
5836
5853
|
}
|
|
5837
|
-
|
|
5838
|
-
|
|
5854
|
+
get tabComponent() {
|
|
5855
|
+
return this._tabComponent;
|
|
5856
|
+
}
|
|
5857
|
+
constructor(panel, group, accessor, component, tabComponent) {
|
|
5858
|
+
super(panel.id, component);
|
|
5839
5859
|
this.panel = panel;
|
|
5840
5860
|
this.accessor = accessor;
|
|
5841
5861
|
this._onDidTitleChange = new Emitter();
|
|
@@ -5849,6 +5869,7 @@ class DockviewPanelApiImpl extends GridviewPanelApiImpl {
|
|
|
5849
5869
|
this._onDidLocationChange = new Emitter();
|
|
5850
5870
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5851
5871
|
this.groupEventsDisposable = new MutableDisposable();
|
|
5872
|
+
this._tabComponent = tabComponent;
|
|
5852
5873
|
this.initialize(panel);
|
|
5853
5874
|
this._group = group;
|
|
5854
5875
|
this.setupGroupEventListeners();
|
|
@@ -5931,7 +5952,7 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
5931
5952
|
var _a;
|
|
5932
5953
|
return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
|
|
5933
5954
|
}
|
|
5934
|
-
constructor(id, accessor, containerApi, group, view, options) {
|
|
5955
|
+
constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
|
|
5935
5956
|
super();
|
|
5936
5957
|
this.id = id;
|
|
5937
5958
|
this.accessor = accessor;
|
|
@@ -5939,7 +5960,7 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
5939
5960
|
this.view = view;
|
|
5940
5961
|
this._renderer = options.renderer;
|
|
5941
5962
|
this._group = group;
|
|
5942
|
-
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
5963
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
|
|
5943
5964
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
5944
5965
|
accessor.setActivePanel(this);
|
|
5945
5966
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -6234,7 +6255,7 @@ class DefaultDockviewDeserialzier {
|
|
|
6234
6255
|
? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
|
|
6235
6256
|
: panelData.tabComponent;
|
|
6236
6257
|
const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
|
|
6237
|
-
const panel = new DockviewPanel(panelId, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6258
|
+
const panel = new DockviewPanel(panelId, contentComponent, tabComponent, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6238
6259
|
renderer: panelData.renderer,
|
|
6239
6260
|
});
|
|
6240
6261
|
panel.init({
|
|
@@ -8244,6 +8265,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
8244
8265
|
if (this._onDidActivePanelChange.value !== event.panel) {
|
|
8245
8266
|
this._onDidActivePanelChange.fire(event.panel);
|
|
8246
8267
|
}
|
|
8268
|
+
}), Event.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
|
|
8269
|
+
this._bufferOnDidLayoutChange.fire();
|
|
8247
8270
|
}));
|
|
8248
8271
|
this._groups.set(view.id, { value: view, disposable });
|
|
8249
8272
|
}
|
|
@@ -8256,7 +8279,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
8256
8279
|
const contentComponent = options.component;
|
|
8257
8280
|
const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
|
|
8258
8281
|
const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
|
|
8259
|
-
const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
|
|
8282
|
+
const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
|
|
8260
8283
|
panel.init({
|
|
8261
8284
|
title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
|
|
8262
8285
|
params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
|
|
@@ -9171,7 +9194,7 @@ class SplitviewPanel extends BasePanelView {
|
|
|
9171
9194
|
return this._snap;
|
|
9172
9195
|
}
|
|
9173
9196
|
constructor(id, componentName) {
|
|
9174
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
9197
|
+
super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
|
|
9175
9198
|
this._evaluatedMinimumSize = 0;
|
|
9176
9199
|
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
9177
9200
|
this._minimumSize = 0;
|