dockview-core 1.10.1 → 1.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/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/components/tab/defaultTab.d.ts +0 -2
- package/dist/cjs/dockview/components/tab/defaultTab.js +5 -14
- 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 +52 -38
- 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 +51 -37
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +52 -38
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +52 -38
- 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 +52 -38
- 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 +51 -37
- 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/components/tab/defaultTab.d.ts +0 -2
- package/dist/esm/dockview/components/tab/defaultTab.js +5 -14
- 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/dist/styles/dockview.css +8 -18
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.11.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -4235,6 +4235,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4235
4235
|
this._width = 0;
|
|
4236
4236
|
this._height = 0;
|
|
4237
4237
|
this._panels = [];
|
|
4238
|
+
this._panelDisposables = new Map();
|
|
4238
4239
|
this._onMove = new Emitter();
|
|
4239
4240
|
this.onMove = this._onMove.event;
|
|
4240
4241
|
this._onDidDrop = new Emitter();
|
|
@@ -4249,6 +4250,10 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4249
4250
|
this.onGroupDragStart = this._onGroupDragStart.event;
|
|
4250
4251
|
this._onDidAddPanel = new Emitter();
|
|
4251
4252
|
this.onDidAddPanel = this._onDidAddPanel.event;
|
|
4253
|
+
this._onDidPanelTitleChange = new Emitter();
|
|
4254
|
+
this.onDidPanelTitleChange = this._onDidPanelTitleChange.event;
|
|
4255
|
+
this._onDidPanelParametersChange = new Emitter();
|
|
4256
|
+
this.onDidPanelParametersChange = this._onDidPanelParametersChange.event;
|
|
4252
4257
|
this._onDidRemovePanel = new Emitter();
|
|
4253
4258
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4254
4259
|
this._onDidActivePanelChange = new Emitter();
|
|
@@ -4537,6 +4542,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4537
4542
|
if (this.mostRecentlyUsed.includes(panel)) {
|
|
4538
4543
|
this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
|
|
4539
4544
|
}
|
|
4545
|
+
const disposable = this._panelDisposables.get(panel.id);
|
|
4546
|
+
if (disposable) {
|
|
4547
|
+
disposable.dispose();
|
|
4548
|
+
this._panelDisposables.delete(panel.id);
|
|
4549
|
+
}
|
|
4540
4550
|
this._onDidRemovePanel.fire({ panel });
|
|
4541
4551
|
}
|
|
4542
4552
|
doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
|
|
@@ -4554,6 +4564,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4554
4564
|
}
|
|
4555
4565
|
this.updateMru(panel);
|
|
4556
4566
|
this.panels.splice(index, 0, panel);
|
|
4567
|
+
this._panelDisposables.set(panel.id, new CompositeDisposable(panel.api.onDidTitleChange((event) => this._onDidPanelTitleChange.fire(event)), panel.api.onDidParametersChange((event) => this._onDidPanelParametersChange.fire(event))));
|
|
4557
4568
|
this._onDidAddPanel.fire({ panel });
|
|
4558
4569
|
}
|
|
4559
4570
|
doSetActivePanel(panel) {
|
|
@@ -4977,14 +4988,16 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
4977
4988
|
get height() {
|
|
4978
4989
|
return this._height;
|
|
4979
4990
|
}
|
|
4980
|
-
constructor(id) {
|
|
4991
|
+
constructor(id, component) {
|
|
4981
4992
|
super();
|
|
4982
4993
|
this.id = id;
|
|
4994
|
+
this.component = component;
|
|
4983
4995
|
this._isFocused = false;
|
|
4984
4996
|
this._isActive = false;
|
|
4985
4997
|
this._isVisible = true;
|
|
4986
4998
|
this._width = 0;
|
|
4987
4999
|
this._height = 0;
|
|
5000
|
+
this._parameters = {};
|
|
4988
5001
|
this.panelUpdatesDisposable = new MutableDisposable();
|
|
4989
5002
|
this._onDidDimensionChange = new Emitter();
|
|
4990
5003
|
this.onDidDimensionsChange = this._onDidDimensionChange.event;
|
|
@@ -5002,8 +5015,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5002
5015
|
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
5003
5016
|
this._onActiveChange = new Emitter();
|
|
5004
5017
|
this.onActiveChange = this._onActiveChange.event;
|
|
5005
|
-
this.
|
|
5006
|
-
this.
|
|
5018
|
+
this._onDidParametersChange = new Emitter();
|
|
5019
|
+
this.onDidParametersChange = this._onDidParametersChange.event;
|
|
5007
5020
|
this.addDisposables(this.onDidFocusChange((event) => {
|
|
5008
5021
|
this._isFocused = event.isFocused;
|
|
5009
5022
|
}), this.onDidActiveChange((event) => {
|
|
@@ -5013,10 +5026,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5013
5026
|
}), this.onDidDimensionsChange((event) => {
|
|
5014
5027
|
this._width = event.width;
|
|
5015
5028
|
this._height = event.height;
|
|
5016
|
-
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this.
|
|
5029
|
+
}), this.panelUpdatesDisposable, this._onDidDimensionChange, this._onDidChangeFocus, this._onDidVisibilityChange, this._onDidActiveChange, this._onWillFocus, this._onActiveChange, this._onWillFocus, this._onWillVisibilityChange, this._onDidParametersChange);
|
|
5030
|
+
}
|
|
5031
|
+
getParameters() {
|
|
5032
|
+
return this._parameters;
|
|
5017
5033
|
}
|
|
5018
5034
|
initialize(panel) {
|
|
5019
|
-
this.panelUpdatesDisposable.value = this.
|
|
5035
|
+
this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
|
|
5036
|
+
this._parameters = parameters;
|
|
5020
5037
|
panel.update({
|
|
5021
5038
|
params: parameters,
|
|
5022
5039
|
});
|
|
@@ -5029,14 +5046,14 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5029
5046
|
this._onActiveChange.fire();
|
|
5030
5047
|
}
|
|
5031
5048
|
updateParameters(parameters) {
|
|
5032
|
-
this.
|
|
5049
|
+
this._onDidParametersChange.fire(parameters);
|
|
5033
5050
|
}
|
|
5034
5051
|
}
|
|
5035
5052
|
|
|
5036
5053
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5037
5054
|
//
|
|
5038
|
-
constructor(id) {
|
|
5039
|
-
super(id);
|
|
5055
|
+
constructor(id, component) {
|
|
5056
|
+
super(id, component);
|
|
5040
5057
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5041
5058
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5042
5059
|
//
|
|
@@ -5061,8 +5078,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5061
5078
|
set pane(pane) {
|
|
5062
5079
|
this._pane = pane;
|
|
5063
5080
|
}
|
|
5064
|
-
constructor(id) {
|
|
5065
|
-
super(id);
|
|
5081
|
+
constructor(id, component) {
|
|
5082
|
+
super(id, component);
|
|
5066
5083
|
this._onDidExpansionChange = new Emitter({
|
|
5067
5084
|
replay: true,
|
|
5068
5085
|
});
|
|
@@ -5221,7 +5238,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5221
5238
|
this.header.style.display = value ? '' : 'none';
|
|
5222
5239
|
}
|
|
5223
5240
|
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5224
|
-
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5241
|
+
super(id, component, new PaneviewPanelApiImpl(id, component));
|
|
5225
5242
|
this.headerComponent = headerComponent;
|
|
5226
5243
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5227
5244
|
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
@@ -5452,8 +5469,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5452
5469
|
}
|
|
5453
5470
|
|
|
5454
5471
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
5455
|
-
constructor(id, panel) {
|
|
5456
|
-
super(id);
|
|
5472
|
+
constructor(id, component, panel) {
|
|
5473
|
+
super(id, component);
|
|
5457
5474
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5458
5475
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5459
5476
|
this._onDidConstraintsChange = new Emitter();
|
|
@@ -5524,7 +5541,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5524
5541
|
return this.api.isActive;
|
|
5525
5542
|
}
|
|
5526
5543
|
constructor(id, component, options, api) {
|
|
5527
|
-
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id));
|
|
5544
|
+
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
|
|
5528
5545
|
this._evaluatedMinimumWidth = 0;
|
|
5529
5546
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
5530
5547
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -5632,7 +5649,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5632
5649
|
return this._group.model.location;
|
|
5633
5650
|
}
|
|
5634
5651
|
constructor(id, accessor) {
|
|
5635
|
-
super(id);
|
|
5652
|
+
super(id, '__dockviewgroup__');
|
|
5636
5653
|
this.accessor = accessor;
|
|
5637
5654
|
this._onDidLocationChange = new Emitter();
|
|
5638
5655
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
@@ -5806,8 +5823,11 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5806
5823
|
get group() {
|
|
5807
5824
|
return this._group;
|
|
5808
5825
|
}
|
|
5809
|
-
|
|
5810
|
-
|
|
5826
|
+
get tabComponent() {
|
|
5827
|
+
return this._tabComponent;
|
|
5828
|
+
}
|
|
5829
|
+
constructor(panel, group, accessor, component, tabComponent) {
|
|
5830
|
+
super(panel.id, component);
|
|
5811
5831
|
this.panel = panel;
|
|
5812
5832
|
this.accessor = accessor;
|
|
5813
5833
|
this._onDidTitleChange = new Emitter();
|
|
@@ -5821,6 +5841,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5821
5841
|
this._onDidLocationChange = new Emitter();
|
|
5822
5842
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5823
5843
|
this.groupEventsDisposable = new MutableDisposable();
|
|
5844
|
+
this._tabComponent = tabComponent;
|
|
5824
5845
|
this.initialize(panel);
|
|
5825
5846
|
this._group = group;
|
|
5826
5847
|
this.setupGroupEventListeners();
|
|
@@ -5903,7 +5924,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5903
5924
|
var _a;
|
|
5904
5925
|
return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
|
|
5905
5926
|
}
|
|
5906
|
-
constructor(id, accessor, containerApi, group, view, options) {
|
|
5927
|
+
constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
|
|
5907
5928
|
super();
|
|
5908
5929
|
this.id = id;
|
|
5909
5930
|
this.accessor = accessor;
|
|
@@ -5911,7 +5932,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
5911
5932
|
this.view = view;
|
|
5912
5933
|
this._renderer = options.renderer;
|
|
5913
5934
|
this._group = group;
|
|
5914
|
-
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
5935
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
|
|
5915
5936
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
5916
5937
|
accessor.setActivePanel(this);
|
|
5917
5938
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -6079,27 +6100,18 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6079
6100
|
//
|
|
6080
6101
|
this.params = {};
|
|
6081
6102
|
this._element = document.createElement('div');
|
|
6082
|
-
this._element.className = 'default-tab';
|
|
6103
|
+
this._element.className = 'dv-default-tab';
|
|
6083
6104
|
//
|
|
6084
6105
|
this._content = document.createElement('div');
|
|
6085
|
-
this._content.className = 'tab-content';
|
|
6086
|
-
//
|
|
6087
|
-
this._actionContainer = document.createElement('div');
|
|
6088
|
-
this._actionContainer.className = 'action-container';
|
|
6089
|
-
//
|
|
6090
|
-
this._list = document.createElement('ul');
|
|
6091
|
-
this._list.className = 'tab-list';
|
|
6092
|
-
//
|
|
6106
|
+
this._content.className = 'dv-default-tab-content';
|
|
6093
6107
|
this.action = document.createElement('div');
|
|
6094
|
-
this.action.className = 'tab-action';
|
|
6108
|
+
this.action.className = 'dv-default-tab-action';
|
|
6095
6109
|
this.action.appendChild(createCloseButton());
|
|
6096
6110
|
//
|
|
6097
6111
|
this._element.appendChild(this._content);
|
|
6098
|
-
this._element.appendChild(this.
|
|
6099
|
-
this._actionContainer.appendChild(this._list);
|
|
6100
|
-
this._list.appendChild(this.action);
|
|
6112
|
+
this._element.appendChild(this.action);
|
|
6101
6113
|
//
|
|
6102
|
-
this.addDisposables(addDisposableListener(this.
|
|
6114
|
+
this.addDisposables(addDisposableListener(this.action, 'mousedown', (ev) => {
|
|
6103
6115
|
ev.preventDefault();
|
|
6104
6116
|
}));
|
|
6105
6117
|
this.render();
|
|
@@ -6206,7 +6218,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
6206
6218
|
? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
|
|
6207
6219
|
: panelData.tabComponent;
|
|
6208
6220
|
const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
|
|
6209
|
-
const panel = new DockviewPanel(panelId, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6221
|
+
const panel = new DockviewPanel(panelId, contentComponent, tabComponent, this.accessor, new DockviewApi(this.accessor), group, view, {
|
|
6210
6222
|
renderer: panelData.renderer,
|
|
6211
6223
|
});
|
|
6212
6224
|
panel.init({
|
|
@@ -8216,6 +8228,8 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8216
8228
|
if (this._onDidActivePanelChange.value !== event.panel) {
|
|
8217
8229
|
this._onDidActivePanelChange.fire(event.panel);
|
|
8218
8230
|
}
|
|
8231
|
+
}), exports.DockviewEvent.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
|
|
8232
|
+
this._bufferOnDidLayoutChange.fire();
|
|
8219
8233
|
}));
|
|
8220
8234
|
this._groups.set(view.id, { value: view, disposable });
|
|
8221
8235
|
}
|
|
@@ -8228,7 +8242,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8228
8242
|
const contentComponent = options.component;
|
|
8229
8243
|
const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
|
|
8230
8244
|
const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
|
|
8231
|
-
const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
|
|
8245
|
+
const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
|
|
8232
8246
|
panel.init({
|
|
8233
8247
|
title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
|
|
8234
8248
|
params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
|
|
@@ -9143,7 +9157,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
9143
9157
|
return this._snap;
|
|
9144
9158
|
}
|
|
9145
9159
|
constructor(id, componentName) {
|
|
9146
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
9160
|
+
super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
|
|
9147
9161
|
this._evaluatedMinimumSize = 0;
|
|
9148
9162
|
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
9149
9163
|
this._minimumSize = 0;
|