dockview 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/dockview/defaultTab.d.ts +1 -1
- package/dist/cjs/dockview/defaultTab.js +11 -31
- package/dist/cjs/dockview/dockview.d.ts +1 -1
- package/dist/cjs/dockview/dockview.js +27 -47
- package/dist/cjs/dockview/headerActionsRenderer.d.ts +1 -1
- package/dist/cjs/dockview/headerActionsRenderer.js +2 -0
- package/dist/cjs/dockview/reactContentPart.d.ts +1 -1
- package/dist/cjs/dockview/reactContentPart.js +2 -0
- package/dist/cjs/dockview/reactHeaderPart.d.ts +1 -1
- package/dist/cjs/dockview/reactHeaderPart.js +2 -0
- package/dist/cjs/dockview/reactWatermarkPart.d.ts +1 -1
- package/dist/cjs/dockview/reactWatermarkPart.js +2 -0
- package/dist/cjs/gridview/gridview.d.ts +1 -1
- package/dist/cjs/gridview/gridview.js +13 -33
- package/dist/cjs/paneview/paneview.d.ts +1 -1
- package/dist/cjs/paneview/paneview.js +16 -36
- package/dist/cjs/paneview/view.d.ts +1 -1
- package/dist/cjs/react.d.ts +1 -1
- package/dist/cjs/react.js +16 -36
- package/dist/cjs/splitview/splitview.d.ts +1 -1
- package/dist/cjs/splitview/splitview.js +13 -33
- package/dist/cjs/svg.d.ts +1 -1
- package/dist/cjs/svg.js +7 -27
- package/dist/dockview.amd.js +125 -123
- package/dist/dockview.amd.js.map +1 -1
- package/dist/dockview.amd.min.js +2 -2
- package/dist/dockview.amd.min.js.map +1 -1
- package/dist/dockview.amd.min.noStyle.js +2 -2
- package/dist/dockview.amd.min.noStyle.js.map +1 -1
- package/dist/dockview.amd.noStyle.js +124 -122
- package/dist/dockview.amd.noStyle.js.map +1 -1
- package/dist/dockview.cjs.js +125 -123
- package/dist/dockview.cjs.js.map +1 -1
- package/dist/dockview.esm.js +65 -43
- package/dist/dockview.esm.js.map +1 -1
- package/dist/dockview.esm.min.js +2 -2
- package/dist/dockview.esm.min.js.map +1 -1
- package/dist/dockview.js +125 -123
- package/dist/dockview.js.map +1 -1
- package/dist/dockview.min.js +2 -2
- package/dist/dockview.min.js.map +1 -1
- package/dist/dockview.min.noStyle.js +2 -2
- package/dist/dockview.min.noStyle.js.map +1 -1
- package/dist/dockview.noStyle.js +124 -122
- package/dist/dockview.noStyle.js.map +1 -1
- package/dist/esm/dockview/defaultTab.d.ts +1 -1
- package/dist/esm/dockview/defaultTab.js +4 -4
- package/dist/esm/dockview/dockview.d.ts +1 -1
- package/dist/esm/dockview/dockview.js +1 -1
- package/dist/esm/dockview/headerActionsRenderer.d.ts +1 -1
- package/dist/esm/dockview/headerActionsRenderer.js +2 -0
- package/dist/esm/dockview/reactContentPart.d.ts +1 -1
- package/dist/esm/dockview/reactContentPart.js +2 -0
- package/dist/esm/dockview/reactHeaderPart.d.ts +1 -1
- package/dist/esm/dockview/reactHeaderPart.js +2 -0
- package/dist/esm/dockview/reactWatermarkPart.d.ts +1 -1
- package/dist/esm/dockview/reactWatermarkPart.js +2 -0
- package/dist/esm/gridview/gridview.d.ts +1 -1
- package/dist/esm/gridview/gridview.js +1 -1
- package/dist/esm/paneview/paneview.d.ts +1 -1
- package/dist/esm/paneview/paneview.js +1 -1
- package/dist/esm/paneview/view.d.ts +1 -1
- package/dist/esm/react.d.ts +1 -1
- package/dist/esm/react.js +2 -2
- package/dist/esm/splitview/splitview.d.ts +1 -1
- package/dist/esm/splitview/splitview.js +1 -1
- package/dist/esm/svg.d.ts +1 -1
- package/dist/esm/svg.js +1 -1
- package/dist/styles/dockview.css +849 -8
- package/package.json +3 -3
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.11.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) { 'use strict';
|
|
8
8
|
|
|
9
|
-
function _interopNamespaceDefault(e) {
|
|
10
|
-
var n = Object.create(null);
|
|
11
|
-
if (e) {
|
|
12
|
-
Object.keys(e).forEach(function (k) {
|
|
13
|
-
if (k !== 'default') {
|
|
14
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return e[k]; }
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
n.default = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
27
|
-
var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
|
|
28
|
-
|
|
29
9
|
class TransferObject {
|
|
30
10
|
}
|
|
31
11
|
class PanelTransfer extends TransferObject {
|
|
@@ -4255,6 +4235,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4255
4235
|
this._width = 0;
|
|
4256
4236
|
this._height = 0;
|
|
4257
4237
|
this._panels = [];
|
|
4238
|
+
this._panelDisposables = new Map();
|
|
4258
4239
|
this._onMove = new Emitter();
|
|
4259
4240
|
this.onMove = this._onMove.event;
|
|
4260
4241
|
this._onDidDrop = new Emitter();
|
|
@@ -4269,6 +4250,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4269
4250
|
this.onGroupDragStart = this._onGroupDragStart.event;
|
|
4270
4251
|
this._onDidAddPanel = new Emitter();
|
|
4271
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;
|
|
4272
4257
|
this._onDidRemovePanel = new Emitter();
|
|
4273
4258
|
this.onDidRemovePanel = this._onDidRemovePanel.event;
|
|
4274
4259
|
this._onDidActivePanelChange = new Emitter();
|
|
@@ -4557,6 +4542,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4557
4542
|
if (this.mostRecentlyUsed.includes(panel)) {
|
|
4558
4543
|
this.mostRecentlyUsed.splice(this.mostRecentlyUsed.indexOf(panel), 1);
|
|
4559
4544
|
}
|
|
4545
|
+
const disposable = this._panelDisposables.get(panel.id);
|
|
4546
|
+
if (disposable) {
|
|
4547
|
+
disposable.dispose();
|
|
4548
|
+
this._panelDisposables.delete(panel.id);
|
|
4549
|
+
}
|
|
4560
4550
|
this._onDidRemovePanel.fire({ panel });
|
|
4561
4551
|
}
|
|
4562
4552
|
doAddPanel(panel, index = this.panels.length, options = { skipSetActive: false }) {
|
|
@@ -4574,6 +4564,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4574
4564
|
}
|
|
4575
4565
|
this.updateMru(panel);
|
|
4576
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))));
|
|
4577
4568
|
this._onDidAddPanel.fire({ panel });
|
|
4578
4569
|
}
|
|
4579
4570
|
doSetActivePanel(panel) {
|
|
@@ -4997,14 +4988,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
4997
4988
|
get height() {
|
|
4998
4989
|
return this._height;
|
|
4999
4990
|
}
|
|
5000
|
-
constructor(id) {
|
|
4991
|
+
constructor(id, component) {
|
|
5001
4992
|
super();
|
|
5002
4993
|
this.id = id;
|
|
4994
|
+
this.component = component;
|
|
5003
4995
|
this._isFocused = false;
|
|
5004
4996
|
this._isActive = false;
|
|
5005
4997
|
this._isVisible = true;
|
|
5006
4998
|
this._width = 0;
|
|
5007
4999
|
this._height = 0;
|
|
5000
|
+
this._parameters = {};
|
|
5008
5001
|
this.panelUpdatesDisposable = new MutableDisposable();
|
|
5009
5002
|
this._onDidDimensionChange = new Emitter();
|
|
5010
5003
|
this.onDidDimensionsChange = this._onDidDimensionChange.event;
|
|
@@ -5022,8 +5015,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5022
5015
|
this.onDidActiveChange = this._onDidActiveChange.event;
|
|
5023
5016
|
this._onActiveChange = new Emitter();
|
|
5024
5017
|
this.onActiveChange = this._onActiveChange.event;
|
|
5025
|
-
this.
|
|
5026
|
-
this.
|
|
5018
|
+
this._onDidParametersChange = new Emitter();
|
|
5019
|
+
this.onDidParametersChange = this._onDidParametersChange.event;
|
|
5027
5020
|
this.addDisposables(this.onDidFocusChange((event) => {
|
|
5028
5021
|
this._isFocused = event.isFocused;
|
|
5029
5022
|
}), this.onDidActiveChange((event) => {
|
|
@@ -5033,10 +5026,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5033
5026
|
}), this.onDidDimensionsChange((event) => {
|
|
5034
5027
|
this._width = event.width;
|
|
5035
5028
|
this._height = event.height;
|
|
5036
|
-
}), 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;
|
|
5037
5033
|
}
|
|
5038
5034
|
initialize(panel) {
|
|
5039
|
-
this.panelUpdatesDisposable.value = this.
|
|
5035
|
+
this.panelUpdatesDisposable.value = this._onDidParametersChange.event((parameters) => {
|
|
5036
|
+
this._parameters = parameters;
|
|
5040
5037
|
panel.update({
|
|
5041
5038
|
params: parameters,
|
|
5042
5039
|
});
|
|
@@ -5049,14 +5046,14 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5049
5046
|
this._onActiveChange.fire();
|
|
5050
5047
|
}
|
|
5051
5048
|
updateParameters(parameters) {
|
|
5052
|
-
this.
|
|
5049
|
+
this._onDidParametersChange.fire(parameters);
|
|
5053
5050
|
}
|
|
5054
5051
|
}
|
|
5055
5052
|
|
|
5056
5053
|
class SplitviewPanelApiImpl extends PanelApiImpl {
|
|
5057
5054
|
//
|
|
5058
|
-
constructor(id) {
|
|
5059
|
-
super(id);
|
|
5055
|
+
constructor(id, component) {
|
|
5056
|
+
super(id, component);
|
|
5060
5057
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5061
5058
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5062
5059
|
//
|
|
@@ -5081,8 +5078,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5081
5078
|
set pane(pane) {
|
|
5082
5079
|
this._pane = pane;
|
|
5083
5080
|
}
|
|
5084
|
-
constructor(id) {
|
|
5085
|
-
super(id);
|
|
5081
|
+
constructor(id, component) {
|
|
5082
|
+
super(id, component);
|
|
5086
5083
|
this._onDidExpansionChange = new Emitter({
|
|
5087
5084
|
replay: true,
|
|
5088
5085
|
});
|
|
@@ -5241,7 +5238,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5241
5238
|
this.header.style.display = value ? '' : 'none';
|
|
5242
5239
|
}
|
|
5243
5240
|
constructor(id, component, headerComponent, orientation, isExpanded, isHeaderVisible) {
|
|
5244
|
-
super(id, component, new PaneviewPanelApiImpl(id));
|
|
5241
|
+
super(id, component, new PaneviewPanelApiImpl(id, component));
|
|
5245
5242
|
this.headerComponent = headerComponent;
|
|
5246
5243
|
this._onDidChangeExpansionState = new Emitter({ replay: true });
|
|
5247
5244
|
this.onDidChangeExpansionState = this._onDidChangeExpansionState.event;
|
|
@@ -5472,8 +5469,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5472
5469
|
}
|
|
5473
5470
|
|
|
5474
5471
|
class GridviewPanelApiImpl extends PanelApiImpl {
|
|
5475
|
-
constructor(id, panel) {
|
|
5476
|
-
super(id);
|
|
5472
|
+
constructor(id, component, panel) {
|
|
5473
|
+
super(id, component);
|
|
5477
5474
|
this._onDidConstraintsChangeInternal = new Emitter();
|
|
5478
5475
|
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
|
|
5479
5476
|
this._onDidConstraintsChange = new Emitter();
|
|
@@ -5544,7 +5541,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5544
5541
|
return this.api.isActive;
|
|
5545
5542
|
}
|
|
5546
5543
|
constructor(id, component, options, api) {
|
|
5547
|
-
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));
|
|
5548
5545
|
this._evaluatedMinimumWidth = 0;
|
|
5549
5546
|
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
5550
5547
|
this._evaluatedMinimumHeight = 0;
|
|
@@ -5652,7 +5649,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5652
5649
|
return this._group.model.location;
|
|
5653
5650
|
}
|
|
5654
5651
|
constructor(id, accessor) {
|
|
5655
|
-
super(id);
|
|
5652
|
+
super(id, '__dockviewgroup__');
|
|
5656
5653
|
this.accessor = accessor;
|
|
5657
5654
|
this._onDidLocationChange = new Emitter();
|
|
5658
5655
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
@@ -5826,8 +5823,11 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5826
5823
|
get group() {
|
|
5827
5824
|
return this._group;
|
|
5828
5825
|
}
|
|
5829
|
-
|
|
5830
|
-
|
|
5826
|
+
get tabComponent() {
|
|
5827
|
+
return this._tabComponent;
|
|
5828
|
+
}
|
|
5829
|
+
constructor(panel, group, accessor, component, tabComponent) {
|
|
5830
|
+
super(panel.id, component);
|
|
5831
5831
|
this.panel = panel;
|
|
5832
5832
|
this.accessor = accessor;
|
|
5833
5833
|
this._onDidTitleChange = new Emitter();
|
|
@@ -5841,6 +5841,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5841
5841
|
this._onDidLocationChange = new Emitter();
|
|
5842
5842
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
5843
5843
|
this.groupEventsDisposable = new MutableDisposable();
|
|
5844
|
+
this._tabComponent = tabComponent;
|
|
5844
5845
|
this.initialize(panel);
|
|
5845
5846
|
this._group = group;
|
|
5846
5847
|
this.setupGroupEventListeners();
|
|
@@ -5923,7 +5924,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5923
5924
|
var _a;
|
|
5924
5925
|
return (_a = this._renderer) !== null && _a !== void 0 ? _a : this.accessor.renderer;
|
|
5925
5926
|
}
|
|
5926
|
-
constructor(id, accessor, containerApi, group, view, options) {
|
|
5927
|
+
constructor(id, component, tabComponent, accessor, containerApi, group, view, options) {
|
|
5927
5928
|
super();
|
|
5928
5929
|
this.id = id;
|
|
5929
5930
|
this.accessor = accessor;
|
|
@@ -5931,7 +5932,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5931
5932
|
this.view = view;
|
|
5932
5933
|
this._renderer = options.renderer;
|
|
5933
5934
|
this._group = group;
|
|
5934
|
-
this.api = new DockviewPanelApiImpl(this, this._group, accessor);
|
|
5935
|
+
this.api = new DockviewPanelApiImpl(this, this._group, accessor, component, tabComponent);
|
|
5935
5936
|
this.addDisposables(this.api.onActiveChange(() => {
|
|
5936
5937
|
accessor.setActivePanel(this);
|
|
5937
5938
|
}), this.api.onDidSizeChange((event) => {
|
|
@@ -6099,27 +6100,18 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6099
6100
|
//
|
|
6100
6101
|
this.params = {};
|
|
6101
6102
|
this._element = document.createElement('div');
|
|
6102
|
-
this._element.className = 'default-tab';
|
|
6103
|
+
this._element.className = 'dv-default-tab';
|
|
6103
6104
|
//
|
|
6104
6105
|
this._content = document.createElement('div');
|
|
6105
|
-
this._content.className = 'tab-content';
|
|
6106
|
-
//
|
|
6107
|
-
this._actionContainer = document.createElement('div');
|
|
6108
|
-
this._actionContainer.className = 'action-container';
|
|
6109
|
-
//
|
|
6110
|
-
this._list = document.createElement('ul');
|
|
6111
|
-
this._list.className = 'tab-list';
|
|
6112
|
-
//
|
|
6106
|
+
this._content.className = 'dv-default-tab-content';
|
|
6113
6107
|
this.action = document.createElement('div');
|
|
6114
|
-
this.action.className = 'tab-action';
|
|
6108
|
+
this.action.className = 'dv-default-tab-action';
|
|
6115
6109
|
this.action.appendChild(createCloseButton());
|
|
6116
6110
|
//
|
|
6117
6111
|
this._element.appendChild(this._content);
|
|
6118
|
-
this._element.appendChild(this.
|
|
6119
|
-
this._actionContainer.appendChild(this._list);
|
|
6120
|
-
this._list.appendChild(this.action);
|
|
6112
|
+
this._element.appendChild(this.action);
|
|
6121
6113
|
//
|
|
6122
|
-
this.addDisposables(addDisposableListener(this.
|
|
6114
|
+
this.addDisposables(addDisposableListener(this.action, 'mousedown', (ev) => {
|
|
6123
6115
|
ev.preventDefault();
|
|
6124
6116
|
}));
|
|
6125
6117
|
this.render();
|
|
@@ -6226,7 +6218,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
6226
6218
|
? (_b = viewData.tab) === null || _b === void 0 ? void 0 : _b.id
|
|
6227
6219
|
: panelData.tabComponent;
|
|
6228
6220
|
const view = new DockviewPanelModel(this.accessor, panelId, contentComponent, tabComponent);
|
|
6229
|
-
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, {
|
|
6230
6222
|
renderer: panelData.renderer,
|
|
6231
6223
|
});
|
|
6232
6224
|
panel.init({
|
|
@@ -8213,6 +8205,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8213
8205
|
if (this._onDidActivePanelChange.value !== event.panel) {
|
|
8214
8206
|
this._onDidActivePanelChange.fire(event.panel);
|
|
8215
8207
|
}
|
|
8208
|
+
}), exports.DockviewEvent.any(view.model.onDidPanelTitleChange, view.model.onDidPanelParametersChange)(() => {
|
|
8209
|
+
this._bufferOnDidLayoutChange.fire();
|
|
8216
8210
|
}));
|
|
8217
8211
|
this._groups.set(view.id, { value: view, disposable });
|
|
8218
8212
|
}
|
|
@@ -8225,7 +8219,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8225
8219
|
const contentComponent = options.component;
|
|
8226
8220
|
const tabComponent = (_a = options.tabComponent) !== null && _a !== void 0 ? _a : this.options.defaultTabComponent;
|
|
8227
8221
|
const view = new DockviewPanelModel(this, options.id, contentComponent, tabComponent);
|
|
8228
|
-
const panel = new DockviewPanel(options.id, this, this._api, group, view, { renderer: options.renderer });
|
|
8222
|
+
const panel = new DockviewPanel(options.id, contentComponent, tabComponent, this, this._api, group, view, { renderer: options.renderer });
|
|
8229
8223
|
panel.init({
|
|
8230
8224
|
title: (_b = options.title) !== null && _b !== void 0 ? _b : options.id,
|
|
8231
8225
|
params: (_c = options === null || options === void 0 ? void 0 : options.params) !== null && _c !== void 0 ? _c : {},
|
|
@@ -9140,7 +9134,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9140
9134
|
return this._snap;
|
|
9141
9135
|
}
|
|
9142
9136
|
constructor(id, componentName) {
|
|
9143
|
-
super(id, componentName, new SplitviewPanelApiImpl(id));
|
|
9137
|
+
super(id, componentName, new SplitviewPanelApiImpl(id, componentName));
|
|
9144
9138
|
this._evaluatedMinimumSize = 0;
|
|
9145
9139
|
this._evaluatedMaximumSize = Number.POSITIVE_INFINITY;
|
|
9146
9140
|
this._minimumSize = 0;
|
|
@@ -9220,9 +9214,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9220
9214
|
* component
|
|
9221
9215
|
*/
|
|
9222
9216
|
const ReactComponentBridge = (props, ref) => {
|
|
9223
|
-
const [_, triggerRender] =
|
|
9224
|
-
const _props =
|
|
9225
|
-
|
|
9217
|
+
const [_, triggerRender] = React.useState();
|
|
9218
|
+
const _props = React.useRef(props.componentProps);
|
|
9219
|
+
React.useImperativeHandle(ref, () => ({
|
|
9226
9220
|
update: (componentProps) => {
|
|
9227
9221
|
_props.current = Object.assign(Object.assign({}, _props.current), componentProps);
|
|
9228
9222
|
/**
|
|
@@ -9234,7 +9228,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9234
9228
|
triggerRender(Date.now());
|
|
9235
9229
|
},
|
|
9236
9230
|
}), []);
|
|
9237
|
-
return
|
|
9231
|
+
return React.createElement(props.component, _props.current);
|
|
9238
9232
|
};
|
|
9239
9233
|
ReactComponentBridge.displayName = 'DockviewReactJsBridge';
|
|
9240
9234
|
/**
|
|
@@ -9246,7 +9240,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9246
9240
|
let value = 1;
|
|
9247
9241
|
return { next: () => `dockview_react_portal_key_${(value++).toString()}` };
|
|
9248
9242
|
})();
|
|
9249
|
-
const ReactPartContext =
|
|
9243
|
+
const ReactPartContext = React.createContext({});
|
|
9250
9244
|
class ReactPart {
|
|
9251
9245
|
constructor(parent, portalStore, component, parameters, context) {
|
|
9252
9246
|
this.parent = parent;
|
|
@@ -9282,7 +9276,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9282
9276
|
*/
|
|
9283
9277
|
throw new Error('Dockview: Only React.memo(...), React.ForwardRef(...) and functional components are accepted as components');
|
|
9284
9278
|
}
|
|
9285
|
-
const bridgeComponent =
|
|
9279
|
+
const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {
|
|
9286
9280
|
component: this
|
|
9287
9281
|
.component,
|
|
9288
9282
|
componentProps: this.parameters,
|
|
@@ -9295,9 +9289,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9295
9289
|
},
|
|
9296
9290
|
});
|
|
9297
9291
|
const node = this.context
|
|
9298
|
-
?
|
|
9292
|
+
? React.createElement(ReactPartContext.Provider, { value: this.context }, bridgeComponent)
|
|
9299
9293
|
: bridgeComponent;
|
|
9300
|
-
const portal =
|
|
9294
|
+
const portal = ReactDOM.createPortal(node, this.parent, uniquePortalKeyGenerator.next());
|
|
9301
9295
|
this.ref = {
|
|
9302
9296
|
portal,
|
|
9303
9297
|
disposable: this.portalStore.addPortal(portal),
|
|
@@ -9315,9 +9309,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9315
9309
|
* portal array
|
|
9316
9310
|
*/
|
|
9317
9311
|
const usePortalsLifecycle = () => {
|
|
9318
|
-
const [portals, setPortals] =
|
|
9319
|
-
|
|
9320
|
-
const addPortal =
|
|
9312
|
+
const [portals, setPortals] = React.useState([]);
|
|
9313
|
+
React.useDebugValue(`Portal count: ${portals.length}`);
|
|
9314
|
+
const addPortal = React.useCallback((portal) => {
|
|
9321
9315
|
setPortals((existingPortals) => [...existingPortals, portal]);
|
|
9322
9316
|
let disposed = false;
|
|
9323
9317
|
return {
|
|
@@ -9355,6 +9349,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9355
9349
|
this.onDidBlur = this._onDidBlur.event;
|
|
9356
9350
|
this._element = document.createElement('div');
|
|
9357
9351
|
this._element.className = 'dockview-react-part';
|
|
9352
|
+
this._element.style.height = '100%';
|
|
9353
|
+
this._element.style.width = '100%';
|
|
9358
9354
|
}
|
|
9359
9355
|
focus() {
|
|
9360
9356
|
// TODO
|
|
@@ -9391,6 +9387,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9391
9387
|
this.reactPortalStore = reactPortalStore;
|
|
9392
9388
|
this._element = document.createElement('div');
|
|
9393
9389
|
this._element.className = 'dockview-react-part';
|
|
9390
|
+
this._element.style.height = '100%';
|
|
9391
|
+
this._element.style.width = '100%';
|
|
9394
9392
|
}
|
|
9395
9393
|
focus() {
|
|
9396
9394
|
//noop
|
|
@@ -9425,6 +9423,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9425
9423
|
this.reactPortalStore = reactPortalStore;
|
|
9426
9424
|
this._element = document.createElement('div');
|
|
9427
9425
|
this._element.className = 'dockview-react-part';
|
|
9426
|
+
this._element.style.height = '100%';
|
|
9427
|
+
this._element.style.width = '100%';
|
|
9428
9428
|
}
|
|
9429
9429
|
init(parameters) {
|
|
9430
9430
|
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
@@ -9476,6 +9476,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9476
9476
|
this.mutableDisposable = new MutableDisposable();
|
|
9477
9477
|
this._element = document.createElement('div');
|
|
9478
9478
|
this._element.className = 'dockview-react-part';
|
|
9479
|
+
this._element.style.height = '100%';
|
|
9480
|
+
this._element.style.width = '100%';
|
|
9479
9481
|
}
|
|
9480
9482
|
focus() {
|
|
9481
9483
|
// TODO
|
|
@@ -9535,12 +9537,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9535
9537
|
: undefined;
|
|
9536
9538
|
}
|
|
9537
9539
|
const DEFAULT_REACT_TAB = 'props.defaultTabComponent';
|
|
9538
|
-
const DockviewReact =
|
|
9539
|
-
const domRef =
|
|
9540
|
-
const dockviewRef =
|
|
9540
|
+
const DockviewReact = React.forwardRef((props, ref) => {
|
|
9541
|
+
const domRef = React.useRef(null);
|
|
9542
|
+
const dockviewRef = React.useRef();
|
|
9541
9543
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
9545
|
+
React.useEffect(() => {
|
|
9544
9546
|
var _a;
|
|
9545
9547
|
if (!domRef.current) {
|
|
9546
9548
|
return () => {
|
|
@@ -9611,13 +9613,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9611
9613
|
dockview.dispose();
|
|
9612
9614
|
};
|
|
9613
9615
|
}, []);
|
|
9614
|
-
|
|
9616
|
+
React.useEffect(() => {
|
|
9615
9617
|
if (!dockviewRef.current) {
|
|
9616
9618
|
return;
|
|
9617
9619
|
}
|
|
9618
9620
|
dockviewRef.current.locked = !!props.locked;
|
|
9619
9621
|
}, [props.locked]);
|
|
9620
|
-
|
|
9622
|
+
React.useEffect(() => {
|
|
9621
9623
|
if (!dockviewRef.current) {
|
|
9622
9624
|
return;
|
|
9623
9625
|
}
|
|
@@ -9625,7 +9627,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9625
9627
|
disableDnd: props.disableDnd,
|
|
9626
9628
|
});
|
|
9627
9629
|
}, [props.disableDnd]);
|
|
9628
|
-
|
|
9630
|
+
React.useEffect(() => {
|
|
9629
9631
|
if (!dockviewRef.current) {
|
|
9630
9632
|
return () => {
|
|
9631
9633
|
// noop
|
|
@@ -9640,7 +9642,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9640
9642
|
disposable.dispose();
|
|
9641
9643
|
};
|
|
9642
9644
|
}, [props.onDidDrop]);
|
|
9643
|
-
|
|
9645
|
+
React.useEffect(() => {
|
|
9644
9646
|
if (!dockviewRef.current) {
|
|
9645
9647
|
return () => {
|
|
9646
9648
|
// noop
|
|
@@ -9655,7 +9657,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9655
9657
|
disposable.dispose();
|
|
9656
9658
|
};
|
|
9657
9659
|
}, [props.onWillDrop]);
|
|
9658
|
-
|
|
9660
|
+
React.useEffect(() => {
|
|
9659
9661
|
if (!dockviewRef.current) {
|
|
9660
9662
|
return;
|
|
9661
9663
|
}
|
|
@@ -9663,7 +9665,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9663
9665
|
frameworkComponents: props.components,
|
|
9664
9666
|
});
|
|
9665
9667
|
}, [props.components]);
|
|
9666
|
-
|
|
9668
|
+
React.useEffect(() => {
|
|
9667
9669
|
if (!dockviewRef.current) {
|
|
9668
9670
|
return;
|
|
9669
9671
|
}
|
|
@@ -9671,7 +9673,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9671
9673
|
floatingGroupBounds: props.floatingGroupBounds,
|
|
9672
9674
|
});
|
|
9673
9675
|
}, [props.floatingGroupBounds]);
|
|
9674
|
-
|
|
9676
|
+
React.useEffect(() => {
|
|
9675
9677
|
if (!dockviewRef.current) {
|
|
9676
9678
|
return;
|
|
9677
9679
|
}
|
|
@@ -9679,7 +9681,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9679
9681
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
9680
9682
|
});
|
|
9681
9683
|
}, [props.watermarkComponent]);
|
|
9682
|
-
|
|
9684
|
+
React.useEffect(() => {
|
|
9683
9685
|
if (!dockviewRef.current) {
|
|
9684
9686
|
return;
|
|
9685
9687
|
}
|
|
@@ -9687,7 +9689,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9687
9689
|
showDndOverlay: props.showDndOverlay,
|
|
9688
9690
|
});
|
|
9689
9691
|
}, [props.showDndOverlay]);
|
|
9690
|
-
|
|
9692
|
+
React.useEffect(() => {
|
|
9691
9693
|
if (!dockviewRef.current) {
|
|
9692
9694
|
return;
|
|
9693
9695
|
}
|
|
@@ -9695,7 +9697,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9695
9697
|
frameworkTabComponents: props.tabComponents,
|
|
9696
9698
|
});
|
|
9697
9699
|
}, [props.tabComponents]);
|
|
9698
|
-
|
|
9700
|
+
React.useEffect(() => {
|
|
9699
9701
|
if (!dockviewRef.current) {
|
|
9700
9702
|
return;
|
|
9701
9703
|
}
|
|
@@ -9703,7 +9705,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9703
9705
|
disableFloatingGroups: props.disableFloatingGroups,
|
|
9704
9706
|
});
|
|
9705
9707
|
}, [props.disableFloatingGroups]);
|
|
9706
|
-
|
|
9708
|
+
React.useEffect(() => {
|
|
9707
9709
|
var _a;
|
|
9708
9710
|
if (!dockviewRef.current) {
|
|
9709
9711
|
return;
|
|
@@ -9720,7 +9722,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9720
9722
|
frameworkTabComponents,
|
|
9721
9723
|
});
|
|
9722
9724
|
}, [props.defaultTabComponent]);
|
|
9723
|
-
|
|
9725
|
+
React.useEffect(() => {
|
|
9724
9726
|
if (!dockviewRef.current) {
|
|
9725
9727
|
return;
|
|
9726
9728
|
}
|
|
@@ -9728,7 +9730,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9728
9730
|
createRightHeaderActionsElement: createGroupControlElement(props.rightHeaderActionsComponent, { addPortal }),
|
|
9729
9731
|
});
|
|
9730
9732
|
}, [props.rightHeaderActionsComponent]);
|
|
9731
|
-
|
|
9733
|
+
React.useEffect(() => {
|
|
9732
9734
|
if (!dockviewRef.current) {
|
|
9733
9735
|
return;
|
|
9734
9736
|
}
|
|
@@ -9736,7 +9738,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9736
9738
|
createLeftHeaderActionsElement: createGroupControlElement(props.leftHeaderActionsComponent, { addPortal }),
|
|
9737
9739
|
});
|
|
9738
9740
|
}, [props.leftHeaderActionsComponent]);
|
|
9739
|
-
|
|
9741
|
+
React.useEffect(() => {
|
|
9740
9742
|
if (!dockviewRef.current) {
|
|
9741
9743
|
return;
|
|
9742
9744
|
}
|
|
@@ -9744,7 +9746,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9744
9746
|
rootOverlayModel: props.rootOverlayModel,
|
|
9745
9747
|
});
|
|
9746
9748
|
}, [props.rootOverlayModel]);
|
|
9747
|
-
|
|
9749
|
+
React.useEffect(() => {
|
|
9748
9750
|
if (!dockviewRef.current) {
|
|
9749
9751
|
return;
|
|
9750
9752
|
}
|
|
@@ -9752,7 +9754,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9752
9754
|
createPrefixHeaderActionsElement: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
9753
9755
|
});
|
|
9754
9756
|
}, [props.prefixHeaderActionsComponent]);
|
|
9755
|
-
return (
|
|
9757
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
9756
9758
|
});
|
|
9757
9759
|
DockviewReact.displayName = 'DockviewComponent';
|
|
9758
9760
|
|
|
@@ -9790,12 +9792,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9790
9792
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
9791
9793
|
};
|
|
9792
9794
|
|
|
9793
|
-
const CloseButton = () => (
|
|
9794
|
-
|
|
9795
|
+
const CloseButton = () => (React.createElement("svg", { height: "11", width: "11", viewBox: "0 0 28 28", "aria-hidden": 'false', focusable: false, className: "dockview-svg" },
|
|
9796
|
+
React.createElement("path", { d: "M2.1 27.3L0 25.2L11.55 13.65L0 2.1L2.1 0L13.65 11.55L25.2 0L27.3 2.1L15.75 13.65L27.3 25.2L25.2 27.3L13.65 15.75L2.1 27.3Z" })));
|
|
9795
9797
|
|
|
9796
9798
|
const DockviewDefaultTab = (_a) => {
|
|
9797
9799
|
var { api, containerApi: _containerApi, params: _params, hideClose, closeActionOverride } = _a, rest = __rest(_a, ["api", "containerApi", "params", "hideClose", "closeActionOverride"]);
|
|
9798
|
-
const onClose =
|
|
9800
|
+
const onClose = React.useCallback((event) => {
|
|
9799
9801
|
event.preventDefault();
|
|
9800
9802
|
if (closeActionOverride) {
|
|
9801
9803
|
closeActionOverride();
|
|
@@ -9804,10 +9806,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9804
9806
|
api.close();
|
|
9805
9807
|
}
|
|
9806
9808
|
}, [api, closeActionOverride]);
|
|
9807
|
-
const onMouseDown =
|
|
9809
|
+
const onMouseDown = React.useCallback((e) => {
|
|
9808
9810
|
e.preventDefault();
|
|
9809
9811
|
}, []);
|
|
9810
|
-
const onClick =
|
|
9812
|
+
const onClick = React.useCallback((event) => {
|
|
9811
9813
|
if (event.defaultPrevented) {
|
|
9812
9814
|
return;
|
|
9813
9815
|
}
|
|
@@ -9816,10 +9818,10 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9816
9818
|
rest.onClick(event);
|
|
9817
9819
|
}
|
|
9818
9820
|
}, [api, rest.onClick]);
|
|
9819
|
-
return (
|
|
9820
|
-
|
|
9821
|
-
!hideClose && (
|
|
9822
|
-
|
|
9821
|
+
return (React.createElement("div", Object.assign({ "data-testid": "dockview-dv-default-tab" }, rest, { onClick: onClick, className: "dv-default-tab" }),
|
|
9822
|
+
React.createElement("span", { className: "dv-default-tab-content" }, api.title),
|
|
9823
|
+
!hideClose && (React.createElement("div", { className: "dv-default-tab-action", onMouseDown: onMouseDown, onClick: onClose },
|
|
9824
|
+
React.createElement(CloseButton, null)))));
|
|
9823
9825
|
};
|
|
9824
9826
|
|
|
9825
9827
|
class ReactPanelView extends SplitviewPanel {
|
|
@@ -9838,12 +9840,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9838
9840
|
}
|
|
9839
9841
|
}
|
|
9840
9842
|
|
|
9841
|
-
const SplitviewReact =
|
|
9842
|
-
const domRef =
|
|
9843
|
-
const splitviewRef =
|
|
9843
|
+
const SplitviewReact = React.forwardRef((props, ref) => {
|
|
9844
|
+
const domRef = React.useRef(null);
|
|
9845
|
+
const splitviewRef = React.useRef();
|
|
9844
9846
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
9848
|
+
React.useEffect(() => {
|
|
9847
9849
|
var _a;
|
|
9848
9850
|
const splitview = new SplitviewComponent({
|
|
9849
9851
|
parentElement: domRef.current,
|
|
@@ -9874,7 +9876,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9874
9876
|
splitview.dispose();
|
|
9875
9877
|
};
|
|
9876
9878
|
}, []);
|
|
9877
|
-
|
|
9879
|
+
React.useEffect(() => {
|
|
9878
9880
|
if (!splitviewRef.current) {
|
|
9879
9881
|
return;
|
|
9880
9882
|
}
|
|
@@ -9882,7 +9884,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9882
9884
|
frameworkComponents: props.components,
|
|
9883
9885
|
});
|
|
9884
9886
|
}, [props.components]);
|
|
9885
|
-
return (
|
|
9887
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
9886
9888
|
});
|
|
9887
9889
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
9888
9890
|
|
|
@@ -9904,12 +9906,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9904
9906
|
}
|
|
9905
9907
|
}
|
|
9906
9908
|
|
|
9907
|
-
const GridviewReact =
|
|
9908
|
-
const domRef =
|
|
9909
|
-
const gridviewRef =
|
|
9909
|
+
const GridviewReact = React.forwardRef((props, ref) => {
|
|
9910
|
+
const domRef = React.useRef(null);
|
|
9911
|
+
const gridviewRef = React.useRef();
|
|
9910
9912
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
9914
|
+
React.useEffect(() => {
|
|
9913
9915
|
var _a;
|
|
9914
9916
|
if (!domRef.current) {
|
|
9915
9917
|
return () => {
|
|
@@ -9945,7 +9947,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9945
9947
|
gridview.dispose();
|
|
9946
9948
|
};
|
|
9947
9949
|
}, []);
|
|
9948
|
-
|
|
9950
|
+
React.useEffect(() => {
|
|
9949
9951
|
if (!gridviewRef.current) {
|
|
9950
9952
|
return;
|
|
9951
9953
|
}
|
|
@@ -9953,7 +9955,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9953
9955
|
frameworkComponents: props.components,
|
|
9954
9956
|
});
|
|
9955
9957
|
}, [props.components]);
|
|
9956
|
-
return (
|
|
9958
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
9957
9959
|
});
|
|
9958
9960
|
GridviewReact.displayName = 'GridviewComponent';
|
|
9959
9961
|
|
|
@@ -9992,12 +9994,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
9992
9994
|
}
|
|
9993
9995
|
}
|
|
9994
9996
|
|
|
9995
|
-
const PaneviewReact =
|
|
9996
|
-
const domRef =
|
|
9997
|
-
const paneviewRef =
|
|
9997
|
+
const PaneviewReact = React.forwardRef((props, ref) => {
|
|
9998
|
+
const domRef = React.useRef(null);
|
|
9999
|
+
const paneviewRef = React.useRef();
|
|
9998
10000
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
10002
|
+
React.useEffect(() => {
|
|
10001
10003
|
const createComponent = (id, _componentId, component) => new PanePanelSection(id, component, {
|
|
10002
10004
|
addPortal,
|
|
10003
10005
|
});
|
|
@@ -10030,7 +10032,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
10030
10032
|
paneview.dispose();
|
|
10031
10033
|
};
|
|
10032
10034
|
}, []);
|
|
10033
|
-
|
|
10035
|
+
React.useEffect(() => {
|
|
10034
10036
|
if (!paneviewRef.current) {
|
|
10035
10037
|
return;
|
|
10036
10038
|
}
|
|
@@ -10038,7 +10040,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
10038
10040
|
frameworkComponents: props.components,
|
|
10039
10041
|
});
|
|
10040
10042
|
}, [props.components]);
|
|
10041
|
-
|
|
10043
|
+
React.useEffect(() => {
|
|
10042
10044
|
if (!paneviewRef.current) {
|
|
10043
10045
|
return;
|
|
10044
10046
|
}
|
|
@@ -10046,7 +10048,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
10046
10048
|
headerframeworkComponents: props.headerComponents,
|
|
10047
10049
|
});
|
|
10048
10050
|
}, [props.headerComponents]);
|
|
10049
|
-
|
|
10051
|
+
React.useEffect(() => {
|
|
10050
10052
|
if (!paneviewRef.current) {
|
|
10051
10053
|
return () => {
|
|
10052
10054
|
//
|
|
@@ -10062,7 +10064,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
10062
10064
|
disposable.dispose();
|
|
10063
10065
|
};
|
|
10064
10066
|
}, [props.onDidDrop]);
|
|
10065
|
-
|
|
10067
|
+
React.useEffect(() => {
|
|
10066
10068
|
if (!paneviewRef.current) {
|
|
10067
10069
|
return;
|
|
10068
10070
|
}
|
|
@@ -10070,7 +10072,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
10070
10072
|
showDndOverlay: props.showDndOverlay,
|
|
10071
10073
|
});
|
|
10072
10074
|
}, [props.showDndOverlay]);
|
|
10073
|
-
return (
|
|
10075
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10074
10076
|
});
|
|
10075
10077
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
10076
10078
|
|