dockview-react 2.1.4 → 3.0.1
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/dockview-react.amd.js +288 -240
- package/dist/dockview-react.amd.js.map +1 -1
- package/dist/dockview-react.amd.min.js +2 -2
- package/dist/dockview-react.amd.min.js.map +1 -1
- package/dist/dockview-react.amd.min.noStyle.js +2 -2
- package/dist/dockview-react.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-react.amd.noStyle.js +288 -240
- package/dist/dockview-react.amd.noStyle.js.map +1 -1
- package/dist/dockview-react.cjs.js +288 -240
- package/dist/dockview-react.cjs.js.map +1 -1
- package/dist/dockview-react.esm.js +284 -240
- package/dist/dockview-react.esm.js.map +1 -1
- package/dist/dockview-react.esm.min.js +2 -2
- package/dist/dockview-react.esm.min.js.map +1 -1
- package/dist/dockview-react.js +288 -240
- package/dist/dockview-react.js.map +1 -1
- package/dist/dockview-react.min.js +2 -2
- package/dist/dockview-react.min.js.map +1 -1
- package/dist/dockview-react.min.noStyle.js +2 -2
- package/dist/dockview-react.min.noStyle.js.map +1 -1
- package/dist/dockview-react.noStyle.js +288 -240
- package/dist/dockview-react.noStyle.js.map +1 -1
- package/package.json +2 -2
package/dist/dockview-react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-react
|
|
3
|
-
* @version
|
|
3
|
+
* @version 3.0.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -133,6 +133,17 @@
|
|
|
133
133
|
this._defaultPrevented = true;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
+
class AcceptableEvent {
|
|
137
|
+
constructor() {
|
|
138
|
+
this._isAccepted = false;
|
|
139
|
+
}
|
|
140
|
+
get isAccepted() {
|
|
141
|
+
return this._isAccepted;
|
|
142
|
+
}
|
|
143
|
+
accept() {
|
|
144
|
+
this._isAccepted = true;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
136
147
|
class LeakageMonitor {
|
|
137
148
|
constructor() {
|
|
138
149
|
this.events = new Map();
|
|
@@ -1524,6 +1535,23 @@
|
|
|
1524
1535
|
}
|
|
1525
1536
|
}
|
|
1526
1537
|
|
|
1538
|
+
const PROPERTY_KEYS_SPLITVIEW = (() => {
|
|
1539
|
+
/**
|
|
1540
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
1541
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
1542
|
+
*/
|
|
1543
|
+
const properties = {
|
|
1544
|
+
orientation: undefined,
|
|
1545
|
+
descriptor: undefined,
|
|
1546
|
+
proportionalLayout: undefined,
|
|
1547
|
+
styles: undefined,
|
|
1548
|
+
margin: undefined,
|
|
1549
|
+
disableAutoResizing: undefined,
|
|
1550
|
+
className: undefined,
|
|
1551
|
+
};
|
|
1552
|
+
return Object.keys(properties);
|
|
1553
|
+
})();
|
|
1554
|
+
|
|
1527
1555
|
class Paneview extends CompositeDisposable {
|
|
1528
1556
|
get onDidAddView() {
|
|
1529
1557
|
return this.splitview.onDidAddView;
|
|
@@ -2653,6 +2681,21 @@
|
|
|
2653
2681
|
}
|
|
2654
2682
|
}
|
|
2655
2683
|
|
|
2684
|
+
const PROPERTY_KEYS_GRIDVIEW = (() => {
|
|
2685
|
+
/**
|
|
2686
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
2687
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
2688
|
+
*/
|
|
2689
|
+
const properties = {
|
|
2690
|
+
disableAutoResizing: undefined,
|
|
2691
|
+
proportionalLayout: undefined,
|
|
2692
|
+
orientation: undefined,
|
|
2693
|
+
hideBorders: undefined,
|
|
2694
|
+
className: undefined,
|
|
2695
|
+
};
|
|
2696
|
+
return Object.keys(properties);
|
|
2697
|
+
})();
|
|
2698
|
+
|
|
2656
2699
|
class Resizable extends CompositeDisposable {
|
|
2657
2700
|
get element() {
|
|
2658
2701
|
return this._element;
|
|
@@ -2762,7 +2805,7 @@
|
|
|
2762
2805
|
}
|
|
2763
2806
|
constructor(parentElement, options) {
|
|
2764
2807
|
var _a;
|
|
2765
|
-
super(
|
|
2808
|
+
super(parentElement, options.disableAutoResizing);
|
|
2766
2809
|
this._id = nextLayoutId$1.next();
|
|
2767
2810
|
this._groups = new Map();
|
|
2768
2811
|
this._onDidRemove = new Emitter();
|
|
@@ -2781,7 +2824,6 @@
|
|
|
2781
2824
|
this.element.style.width = '100%';
|
|
2782
2825
|
this._classNames = new Classnames(this.element);
|
|
2783
2826
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
2784
|
-
parentElement.appendChild(this.element);
|
|
2785
2827
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
2786
2828
|
this.gridview.locked = !!options.locked;
|
|
2787
2829
|
this.element.appendChild(this.gridview.element);
|
|
@@ -3130,15 +3172,10 @@
|
|
|
3130
3172
|
* Invoked when a Drag'n'Drop event occurs that the component was unable to handle. Exposed for custom Drag'n'Drop functionality.
|
|
3131
3173
|
*/
|
|
3132
3174
|
get onDidDrop() {
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
emitter.dispose = () => {
|
|
3138
|
-
disposable.dispose();
|
|
3139
|
-
emitter.dispose();
|
|
3140
|
-
};
|
|
3141
|
-
return emitter.event;
|
|
3175
|
+
return this.component.onDidDrop;
|
|
3176
|
+
}
|
|
3177
|
+
get onUnhandledDragOverEvent() {
|
|
3178
|
+
return this.component.onUnhandledDragOverEvent;
|
|
3142
3179
|
}
|
|
3143
3180
|
constructor(component) {
|
|
3144
3181
|
this.component = component;
|
|
@@ -4065,6 +4102,28 @@
|
|
|
4065
4102
|
return 'center';
|
|
4066
4103
|
}
|
|
4067
4104
|
|
|
4105
|
+
const PROPERTY_KEYS_PANEVIEW = (() => {
|
|
4106
|
+
/**
|
|
4107
|
+
* by readong the keys from an empty value object TypeScript will error
|
|
4108
|
+
* when we add or remove new properties to `DockviewOptions`
|
|
4109
|
+
*/
|
|
4110
|
+
const properties = {
|
|
4111
|
+
disableAutoResizing: undefined,
|
|
4112
|
+
disableDnd: undefined,
|
|
4113
|
+
className: undefined,
|
|
4114
|
+
};
|
|
4115
|
+
return Object.keys(properties);
|
|
4116
|
+
})();
|
|
4117
|
+
class PaneviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
4118
|
+
constructor(nativeEvent, position, getData, panel) {
|
|
4119
|
+
super();
|
|
4120
|
+
this.nativeEvent = nativeEvent;
|
|
4121
|
+
this.position = position;
|
|
4122
|
+
this.getData = getData;
|
|
4123
|
+
this.panel = panel;
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4068
4127
|
class WillFocusEvent extends DockviewEvent {
|
|
4069
4128
|
constructor() {
|
|
4070
4129
|
super();
|
|
@@ -4488,6 +4547,9 @@
|
|
|
4488
4547
|
this.accessor = accessor;
|
|
4489
4548
|
this._onDidDrop = new Emitter();
|
|
4490
4549
|
this.onDidDrop = this._onDidDrop.event;
|
|
4550
|
+
this._onUnhandledDragOverEvent = new Emitter();
|
|
4551
|
+
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
4552
|
+
this.addDisposables(this._onDidDrop, this._onUnhandledDragOverEvent);
|
|
4491
4553
|
if (!disableDnd) {
|
|
4492
4554
|
this.initDragFeatures();
|
|
4493
4555
|
}
|
|
@@ -4514,7 +4576,7 @@
|
|
|
4514
4576
|
overlayModel: {
|
|
4515
4577
|
activationSize: { type: 'percentage', value: 50 },
|
|
4516
4578
|
},
|
|
4517
|
-
canDisplayOverlay: (event) => {
|
|
4579
|
+
canDisplayOverlay: (event, position) => {
|
|
4518
4580
|
const data = getPaneData();
|
|
4519
4581
|
if (data) {
|
|
4520
4582
|
if (data.paneId !== this.id &&
|
|
@@ -4522,14 +4584,9 @@
|
|
|
4522
4584
|
return true;
|
|
4523
4585
|
}
|
|
4524
4586
|
}
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
getData: getPaneData,
|
|
4529
|
-
panel: this,
|
|
4530
|
-
});
|
|
4531
|
-
}
|
|
4532
|
-
return false;
|
|
4587
|
+
const firedEvent = new PaneviewUnhandledDragOverEvent(event, position, getPaneData, this);
|
|
4588
|
+
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
4589
|
+
return firedEvent.isAccepted;
|
|
4533
4590
|
},
|
|
4534
4591
|
});
|
|
4535
4592
|
this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
|
|
@@ -4984,15 +5041,7 @@
|
|
|
4984
5041
|
this._element.appendChild(this.leftActionsContainer);
|
|
4985
5042
|
this._element.appendChild(this.voidContainer.element);
|
|
4986
5043
|
this._element.appendChild(this.rightActionsContainer);
|
|
4987
|
-
this.addDisposables(this.
|
|
4988
|
-
if (e.api.group === this.group) {
|
|
4989
|
-
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
4990
|
-
}
|
|
4991
|
-
}), this.accessor.onDidRemovePanel((e) => {
|
|
4992
|
-
if (e.api.group === this.group) {
|
|
4993
|
-
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
4994
|
-
}
|
|
4995
|
-
}), this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
|
|
5044
|
+
this.addDisposables(this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
|
|
4996
5045
|
this._onGroupDragStart.fire({
|
|
4997
5046
|
nativeEvent: event,
|
|
4998
5047
|
group: this.group,
|
|
@@ -5037,20 +5086,6 @@
|
|
|
5037
5086
|
setActive(_isGroupActive) {
|
|
5038
5087
|
// noop
|
|
5039
5088
|
}
|
|
5040
|
-
addTab(tab, index = this.tabs.length) {
|
|
5041
|
-
if (index < 0 || index > this.tabs.length) {
|
|
5042
|
-
throw new Error('invalid location');
|
|
5043
|
-
}
|
|
5044
|
-
this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
|
|
5045
|
-
this.tabs = [
|
|
5046
|
-
...this.tabs.slice(0, index),
|
|
5047
|
-
tab,
|
|
5048
|
-
...this.tabs.slice(index),
|
|
5049
|
-
];
|
|
5050
|
-
if (this.selectedIndex < 0) {
|
|
5051
|
-
this.selectedIndex = index;
|
|
5052
|
-
}
|
|
5053
|
-
}
|
|
5054
5089
|
delete(id) {
|
|
5055
5090
|
const index = this.tabs.findIndex((tab) => tab.value.panel.id === id);
|
|
5056
5091
|
const tabToRemove = this.tabs.splice(index, 1)[0];
|
|
@@ -5058,6 +5093,7 @@
|
|
|
5058
5093
|
disposable.dispose();
|
|
5059
5094
|
value.dispose();
|
|
5060
5095
|
value.element.remove();
|
|
5096
|
+
this.updateClassnames();
|
|
5061
5097
|
}
|
|
5062
5098
|
setActivePanel(panel) {
|
|
5063
5099
|
this.tabs.forEach((tab) => {
|
|
@@ -5126,25 +5162,37 @@
|
|
|
5126
5162
|
}
|
|
5127
5163
|
this.tabs = [];
|
|
5128
5164
|
}
|
|
5165
|
+
addTab(tab, index = this.tabs.length) {
|
|
5166
|
+
if (index < 0 || index > this.tabs.length) {
|
|
5167
|
+
throw new Error('invalid location');
|
|
5168
|
+
}
|
|
5169
|
+
this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
|
|
5170
|
+
this.tabs = [
|
|
5171
|
+
...this.tabs.slice(0, index),
|
|
5172
|
+
tab,
|
|
5173
|
+
...this.tabs.slice(index),
|
|
5174
|
+
];
|
|
5175
|
+
if (this.selectedIndex < 0) {
|
|
5176
|
+
this.selectedIndex = index;
|
|
5177
|
+
}
|
|
5178
|
+
this.updateClassnames();
|
|
5179
|
+
}
|
|
5180
|
+
updateClassnames() {
|
|
5181
|
+
toggleClass(this._element, 'dv-single-tab', this.size === 1);
|
|
5182
|
+
}
|
|
5129
5183
|
}
|
|
5130
5184
|
|
|
5131
|
-
class DockviewUnhandledDragOverEvent {
|
|
5132
|
-
get isAccepted() {
|
|
5133
|
-
return this._isAccepted;
|
|
5134
|
-
}
|
|
5185
|
+
class DockviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
5135
5186
|
constructor(nativeEvent, target, position, getData, group) {
|
|
5187
|
+
super();
|
|
5136
5188
|
this.nativeEvent = nativeEvent;
|
|
5137
5189
|
this.target = target;
|
|
5138
5190
|
this.position = position;
|
|
5139
5191
|
this.getData = getData;
|
|
5140
5192
|
this.group = group;
|
|
5141
|
-
this._isAccepted = false;
|
|
5142
|
-
}
|
|
5143
|
-
accept() {
|
|
5144
|
-
this._isAccepted = true;
|
|
5145
5193
|
}
|
|
5146
5194
|
}
|
|
5147
|
-
const
|
|
5195
|
+
const PROPERTY_KEYS_DOCKVIEW = (() => {
|
|
5148
5196
|
/**
|
|
5149
5197
|
* by readong the keys from an empty value object TypeScript will error
|
|
5150
5198
|
* when we add or remove new properties to `DockviewOptions`
|
|
@@ -8990,31 +9038,6 @@
|
|
|
8990
9038
|
}
|
|
8991
9039
|
}
|
|
8992
9040
|
|
|
8993
|
-
function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
|
|
8994
|
-
const Component = typeof componentName === 'string'
|
|
8995
|
-
? components[componentName]
|
|
8996
|
-
: undefined;
|
|
8997
|
-
const FrameworkComponent = typeof componentName === 'string'
|
|
8998
|
-
? frameworkComponents[componentName]
|
|
8999
|
-
: undefined;
|
|
9000
|
-
if (Component && FrameworkComponent) {
|
|
9001
|
-
throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
|
|
9002
|
-
}
|
|
9003
|
-
if (FrameworkComponent) {
|
|
9004
|
-
if (!createFrameworkComponent) {
|
|
9005
|
-
throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
|
|
9006
|
-
}
|
|
9007
|
-
return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
|
|
9008
|
-
}
|
|
9009
|
-
if (!Component) {
|
|
9010
|
-
if (fallback) {
|
|
9011
|
-
return fallback();
|
|
9012
|
-
}
|
|
9013
|
-
throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
|
|
9014
|
-
}
|
|
9015
|
-
return new Component(id, componentName);
|
|
9016
|
-
}
|
|
9017
|
-
|
|
9018
9041
|
class GridviewComponent extends BaseGrid {
|
|
9019
9042
|
get orientation() {
|
|
9020
9043
|
return this.gridview.orientation;
|
|
@@ -9032,10 +9055,13 @@
|
|
|
9032
9055
|
this._deserializer = value;
|
|
9033
9056
|
}
|
|
9034
9057
|
constructor(parentElement, options) {
|
|
9058
|
+
var _a;
|
|
9035
9059
|
super(parentElement, {
|
|
9036
|
-
proportionalLayout: options.proportionalLayout,
|
|
9060
|
+
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9037
9061
|
orientation: options.orientation,
|
|
9038
|
-
styles: options.
|
|
9062
|
+
styles: options.hideBorders
|
|
9063
|
+
? { separatorBorder: 'transparent' }
|
|
9064
|
+
: undefined,
|
|
9039
9065
|
disableAutoResizing: options.disableAutoResizing,
|
|
9040
9066
|
className: options.className,
|
|
9041
9067
|
});
|
|
@@ -9055,12 +9081,6 @@
|
|
|
9055
9081
|
}), this.onDidActiveChange((event) => {
|
|
9056
9082
|
this._onDidActiveGroupChange.fire(event);
|
|
9057
9083
|
}));
|
|
9058
|
-
if (!this.options.components) {
|
|
9059
|
-
this.options.components = {};
|
|
9060
|
-
}
|
|
9061
|
-
if (!this.options.frameworkComponents) {
|
|
9062
|
-
this.options.frameworkComponents = {};
|
|
9063
|
-
}
|
|
9064
9084
|
}
|
|
9065
9085
|
updateOptions(options) {
|
|
9066
9086
|
super.updateOptions(options);
|
|
@@ -9110,14 +9130,11 @@
|
|
|
9110
9130
|
const height = this.height;
|
|
9111
9131
|
this.gridview.deserialize(grid, {
|
|
9112
9132
|
fromJSON: (node) => {
|
|
9113
|
-
var _a, _b;
|
|
9114
9133
|
const { data } = node;
|
|
9115
|
-
const view =
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
}
|
|
9120
|
-
: undefined);
|
|
9134
|
+
const view = this.options.createComponent({
|
|
9135
|
+
id: data.id,
|
|
9136
|
+
name: data.component,
|
|
9137
|
+
});
|
|
9121
9138
|
queue.push(() => view.init({
|
|
9122
9139
|
params: data.params,
|
|
9123
9140
|
minimumWidth: data.minimumWidth,
|
|
@@ -9195,7 +9212,7 @@
|
|
|
9195
9212
|
this.doAddGroup(removedPanel, relativeLocation, options.size);
|
|
9196
9213
|
}
|
|
9197
9214
|
addPanel(options) {
|
|
9198
|
-
var _a, _b, _c, _d
|
|
9215
|
+
var _a, _b, _c, _d;
|
|
9199
9216
|
let relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
|
|
9200
9217
|
if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
|
|
9201
9218
|
const referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
|
|
@@ -9211,14 +9228,12 @@
|
|
|
9211
9228
|
relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
9212
9229
|
}
|
|
9213
9230
|
}
|
|
9214
|
-
const view =
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
}
|
|
9219
|
-
: undefined);
|
|
9231
|
+
const view = this.options.createComponent({
|
|
9232
|
+
id: options.id,
|
|
9233
|
+
name: options.component,
|
|
9234
|
+
});
|
|
9220
9235
|
view.init({
|
|
9221
|
-
params: (
|
|
9236
|
+
params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
|
|
9222
9237
|
minimumWidth: options.minimumWidth,
|
|
9223
9238
|
maximumWidth: options.maximumWidth,
|
|
9224
9239
|
minimumHeight: options.minimumHeight,
|
|
@@ -9346,12 +9361,6 @@
|
|
|
9346
9361
|
this._classNames = new Classnames(this.element);
|
|
9347
9362
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9348
9363
|
this._options = options;
|
|
9349
|
-
if (!options.components) {
|
|
9350
|
-
options.components = {};
|
|
9351
|
-
}
|
|
9352
|
-
if (!options.frameworkComponents) {
|
|
9353
|
-
options.frameworkComponents = {};
|
|
9354
|
-
}
|
|
9355
9364
|
this.splitview = new Splitview(this.element, options);
|
|
9356
9365
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
9357
9366
|
}
|
|
@@ -9414,18 +9423,17 @@
|
|
|
9414
9423
|
return this.panels.find((view) => view.id === id);
|
|
9415
9424
|
}
|
|
9416
9425
|
addPanel(options) {
|
|
9417
|
-
var _a
|
|
9426
|
+
var _a;
|
|
9418
9427
|
if (this._panels.has(options.id)) {
|
|
9419
9428
|
throw new Error(`panel ${options.id} already exists`);
|
|
9420
9429
|
}
|
|
9421
|
-
const view =
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
: undefined);
|
|
9430
|
+
const view = this.options.createComponent({
|
|
9431
|
+
id: options.id,
|
|
9432
|
+
name: options.component,
|
|
9433
|
+
});
|
|
9426
9434
|
view.orientation = this.splitview.orientation;
|
|
9427
9435
|
view.init({
|
|
9428
|
-
params: (
|
|
9436
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9429
9437
|
minimumSize: options.minimumSize,
|
|
9430
9438
|
maximumSize: options.maximumSize,
|
|
9431
9439
|
snap: options.snap,
|
|
@@ -9487,17 +9495,14 @@
|
|
|
9487
9495
|
descriptor: {
|
|
9488
9496
|
size,
|
|
9489
9497
|
views: views.map((view) => {
|
|
9490
|
-
var _a, _b;
|
|
9491
9498
|
const data = view.data;
|
|
9492
9499
|
if (this._panels.has(data.id)) {
|
|
9493
9500
|
throw new Error(`panel ${data.id} already exists`);
|
|
9494
9501
|
}
|
|
9495
|
-
const panel =
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
}
|
|
9500
|
-
: undefined);
|
|
9502
|
+
const panel = this.options.createComponent({
|
|
9503
|
+
id: data.id,
|
|
9504
|
+
name: data.component,
|
|
9505
|
+
});
|
|
9501
9506
|
queue.push(() => {
|
|
9502
9507
|
var _a;
|
|
9503
9508
|
panel.init({
|
|
@@ -9680,16 +9685,12 @@
|
|
|
9680
9685
|
this.onDidAddView = this._onDidAddView.event;
|
|
9681
9686
|
this._onDidRemoveView = new Emitter();
|
|
9682
9687
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9683
|
-
this.
|
|
9688
|
+
this._onUnhandledDragOverEvent = new Emitter();
|
|
9689
|
+
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
9690
|
+
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
9684
9691
|
this._classNames = new Classnames(this.element);
|
|
9685
9692
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9686
9693
|
this._options = options;
|
|
9687
|
-
if (!options.components) {
|
|
9688
|
-
options.components = {};
|
|
9689
|
-
}
|
|
9690
|
-
if (!options.frameworkComponents) {
|
|
9691
|
-
options.frameworkComponents = {};
|
|
9692
|
-
}
|
|
9693
9694
|
this.paneview = new Paneview(this.element, {
|
|
9694
9695
|
// only allow paneview in the vertical orientation for now
|
|
9695
9696
|
orientation: exports.Orientation.VERTICAL,
|
|
@@ -9714,22 +9715,19 @@
|
|
|
9714
9715
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
9715
9716
|
}
|
|
9716
9717
|
addPanel(options) {
|
|
9717
|
-
var _a
|
|
9718
|
-
const body =
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
: undefined);
|
|
9718
|
+
var _a;
|
|
9719
|
+
const body = this.options.createComponent({
|
|
9720
|
+
id: options.id,
|
|
9721
|
+
name: options.component,
|
|
9722
|
+
});
|
|
9723
9723
|
let header;
|
|
9724
|
-
if (options.headerComponent) {
|
|
9725
|
-
header =
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
}
|
|
9730
|
-
: undefined);
|
|
9724
|
+
if (options.headerComponent && this.options.createHeaderComponent) {
|
|
9725
|
+
header = this.options.createHeaderComponent({
|
|
9726
|
+
id: options.id,
|
|
9727
|
+
name: options.headerComponent,
|
|
9728
|
+
});
|
|
9731
9729
|
}
|
|
9732
|
-
|
|
9730
|
+
if (!header) {
|
|
9733
9731
|
header = new DefaultHeader();
|
|
9734
9732
|
}
|
|
9735
9733
|
const view = new PaneFramework({
|
|
@@ -9747,7 +9745,7 @@
|
|
|
9747
9745
|
const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
|
|
9748
9746
|
const index = typeof options.index === 'number' ? options.index : undefined;
|
|
9749
9747
|
view.init({
|
|
9750
|
-
params: (
|
|
9748
|
+
params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
|
|
9751
9749
|
minimumBodySize: options.minimumBodySize,
|
|
9752
9750
|
maximumBodySize: options.maximumBodySize,
|
|
9753
9751
|
isExpanded: options.isExpanded,
|
|
@@ -9812,24 +9810,20 @@
|
|
|
9812
9810
|
descriptor: {
|
|
9813
9811
|
size,
|
|
9814
9812
|
views: views.map((view) => {
|
|
9815
|
-
var _a, _b, _c, _d;
|
|
9816
9813
|
const data = view.data;
|
|
9817
|
-
const body =
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
}
|
|
9822
|
-
: undefined);
|
|
9814
|
+
const body = this.options.createComponent({
|
|
9815
|
+
id: data.id,
|
|
9816
|
+
name: data.component,
|
|
9817
|
+
});
|
|
9823
9818
|
let header;
|
|
9824
|
-
if (data.headerComponent
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
: undefined);
|
|
9819
|
+
if (data.headerComponent &&
|
|
9820
|
+
this.options.createHeaderComponent) {
|
|
9821
|
+
header = this.options.createHeaderComponent({
|
|
9822
|
+
id: data.id,
|
|
9823
|
+
name: data.headerComponent,
|
|
9824
|
+
});
|
|
9831
9825
|
}
|
|
9832
|
-
|
|
9826
|
+
if (!header) {
|
|
9833
9827
|
header = new DefaultHeader();
|
|
9834
9828
|
}
|
|
9835
9829
|
const panel = new PaneFramework({
|
|
@@ -9877,9 +9871,11 @@
|
|
|
9877
9871
|
this.paneview.dispose();
|
|
9878
9872
|
}
|
|
9879
9873
|
doAddPanel(panel) {
|
|
9880
|
-
const disposable = panel.onDidDrop((event) => {
|
|
9874
|
+
const disposable = new CompositeDisposable(panel.onDidDrop((event) => {
|
|
9881
9875
|
this._onDidDrop.fire(event);
|
|
9882
|
-
})
|
|
9876
|
+
}), panel.onUnhandledDragOverEvent((event) => {
|
|
9877
|
+
this._onUnhandledDragOverEvent.fire(event);
|
|
9878
|
+
}));
|
|
9883
9879
|
this._viewDisposables.set(panel.id, disposable);
|
|
9884
9880
|
}
|
|
9885
9881
|
doRemovePanel(panel) {
|
|
@@ -10162,7 +10158,7 @@
|
|
|
10162
10158
|
this._onDidBlur = new Emitter();
|
|
10163
10159
|
this.onDidBlur = this._onDidBlur.event;
|
|
10164
10160
|
this._element = document.createElement('div');
|
|
10165
|
-
this._element.className = '
|
|
10161
|
+
this._element.className = 'dv-react-part';
|
|
10166
10162
|
this._element.style.height = '100%';
|
|
10167
10163
|
this._element.style.width = '100%';
|
|
10168
10164
|
}
|
|
@@ -10200,7 +10196,7 @@
|
|
|
10200
10196
|
this.component = component;
|
|
10201
10197
|
this.reactPortalStore = reactPortalStore;
|
|
10202
10198
|
this._element = document.createElement('div');
|
|
10203
|
-
this._element.className = '
|
|
10199
|
+
this._element.className = 'dv-react-part';
|
|
10204
10200
|
this._element.style.height = '100%';
|
|
10205
10201
|
this._element.style.width = '100%';
|
|
10206
10202
|
}
|
|
@@ -10236,7 +10232,7 @@
|
|
|
10236
10232
|
this.component = component;
|
|
10237
10233
|
this.reactPortalStore = reactPortalStore;
|
|
10238
10234
|
this._element = document.createElement('div');
|
|
10239
|
-
this._element.className = '
|
|
10235
|
+
this._element.className = 'dv-react-part';
|
|
10240
10236
|
this._element.style.height = '100%';
|
|
10241
10237
|
this._element.style.width = '100%';
|
|
10242
10238
|
}
|
|
@@ -10278,7 +10274,7 @@
|
|
|
10278
10274
|
this._group = _group;
|
|
10279
10275
|
this.mutableDisposable = new MutableDisposable();
|
|
10280
10276
|
this._element = document.createElement('div');
|
|
10281
|
-
this._element.className = '
|
|
10277
|
+
this._element.className = 'dv-react-part';
|
|
10282
10278
|
this._element.style.height = '100%';
|
|
10283
10279
|
this._element.style.width = '100%';
|
|
10284
10280
|
}
|
|
@@ -10337,8 +10333,8 @@
|
|
|
10337
10333
|
: undefined;
|
|
10338
10334
|
}
|
|
10339
10335
|
const DEFAULT_REACT_TAB = 'props.defaultTabComponent';
|
|
10340
|
-
function extractCoreOptions(props) {
|
|
10341
|
-
const coreOptions =
|
|
10336
|
+
function extractCoreOptions$3(props) {
|
|
10337
|
+
const coreOptions = PROPERTY_KEYS_DOCKVIEW.reduce((obj, key) => {
|
|
10342
10338
|
if (key in props) {
|
|
10343
10339
|
obj[key] = props[key];
|
|
10344
10340
|
}
|
|
@@ -10354,7 +10350,7 @@
|
|
|
10354
10350
|
const prevProps = React.useRef({});
|
|
10355
10351
|
React.useEffect(() => {
|
|
10356
10352
|
const changes = {};
|
|
10357
|
-
|
|
10353
|
+
PROPERTY_KEYS_DOCKVIEW.forEach((propKey) => {
|
|
10358
10354
|
const key = propKey;
|
|
10359
10355
|
const propValue = props[key];
|
|
10360
10356
|
if (key in props && propValue !== prevProps.current[key]) {
|
|
@@ -10365,7 +10361,7 @@
|
|
|
10365
10361
|
dockviewRef.current.updateOptions(changes);
|
|
10366
10362
|
}
|
|
10367
10363
|
prevProps.current = props;
|
|
10368
|
-
},
|
|
10364
|
+
}, PROPERTY_KEYS_DOCKVIEW.map((key) => props[key]));
|
|
10369
10365
|
React.useEffect(() => {
|
|
10370
10366
|
var _a;
|
|
10371
10367
|
if (!domRef.current) {
|
|
@@ -10401,7 +10397,7 @@
|
|
|
10401
10397
|
? DEFAULT_REACT_TAB
|
|
10402
10398
|
: undefined,
|
|
10403
10399
|
};
|
|
10404
|
-
const api = createDockview(domRef.current, Object.assign(Object.assign({}, extractCoreOptions(props)), frameworkOptions));
|
|
10400
|
+
const api = createDockview(domRef.current, Object.assign(Object.assign({}, extractCoreOptions$3(props)), frameworkOptions));
|
|
10405
10401
|
const { clientWidth, clientHeight } = domRef.current;
|
|
10406
10402
|
api.layout(clientWidth, clientHeight);
|
|
10407
10403
|
if (props.onReady) {
|
|
@@ -10589,31 +10585,47 @@
|
|
|
10589
10585
|
}
|
|
10590
10586
|
}
|
|
10591
10587
|
|
|
10588
|
+
function extractCoreOptions$2(props) {
|
|
10589
|
+
const coreOptions = PROPERTY_KEYS_SPLITVIEW.reduce((obj, key) => {
|
|
10590
|
+
if (key in props) {
|
|
10591
|
+
obj[key] = props[key];
|
|
10592
|
+
}
|
|
10593
|
+
return obj;
|
|
10594
|
+
}, {});
|
|
10595
|
+
return coreOptions;
|
|
10596
|
+
}
|
|
10592
10597
|
const SplitviewReact = React.forwardRef((props, ref) => {
|
|
10593
10598
|
const domRef = React.useRef(null);
|
|
10594
10599
|
const splitviewRef = React.useRef();
|
|
10595
10600
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
10596
10601
|
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
10602
|
+
const prevProps = React.useRef({});
|
|
10597
10603
|
React.useEffect(() => {
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
return new ReactPanelView(id, componentId, component, {
|
|
10606
|
-
addPortal,
|
|
10607
|
-
});
|
|
10608
|
-
},
|
|
10609
|
-
},
|
|
10610
|
-
proportionalLayout: typeof props.proportionalLayout === 'boolean'
|
|
10611
|
-
? props.proportionalLayout
|
|
10612
|
-
: true,
|
|
10613
|
-
styles: props.hideBorders
|
|
10614
|
-
? { separatorBorder: 'transparent' }
|
|
10615
|
-
: undefined,
|
|
10604
|
+
const changes = {};
|
|
10605
|
+
PROPERTY_KEYS_SPLITVIEW.forEach((propKey) => {
|
|
10606
|
+
const key = propKey;
|
|
10607
|
+
const propValue = props[key];
|
|
10608
|
+
if (key in props && propValue !== prevProps.current[key]) {
|
|
10609
|
+
changes[key] = propValue;
|
|
10610
|
+
}
|
|
10616
10611
|
});
|
|
10612
|
+
if (splitviewRef.current) {
|
|
10613
|
+
splitviewRef.current.updateOptions(changes);
|
|
10614
|
+
}
|
|
10615
|
+
prevProps.current = props;
|
|
10616
|
+
}, PROPERTY_KEYS_SPLITVIEW.map((key) => props[key]));
|
|
10617
|
+
React.useEffect(() => {
|
|
10618
|
+
if (!domRef.current) {
|
|
10619
|
+
return () => {
|
|
10620
|
+
// noop
|
|
10621
|
+
};
|
|
10622
|
+
}
|
|
10623
|
+
const frameworkOptions = {
|
|
10624
|
+
createComponent: (options) => {
|
|
10625
|
+
return new ReactPanelView(options.id, options.name, props.components[options.name], { addPortal });
|
|
10626
|
+
},
|
|
10627
|
+
};
|
|
10628
|
+
const api = createSplitview(domRef.current, Object.assign(Object.assign({}, extractCoreOptions$2(props)), frameworkOptions));
|
|
10617
10629
|
const { clientWidth, clientHeight } = domRef.current;
|
|
10618
10630
|
api.layout(clientWidth, clientHeight);
|
|
10619
10631
|
if (props.onReady) {
|
|
@@ -10629,7 +10641,9 @@
|
|
|
10629
10641
|
return;
|
|
10630
10642
|
}
|
|
10631
10643
|
splitviewRef.current.updateOptions({
|
|
10632
|
-
|
|
10644
|
+
createComponent: (options) => {
|
|
10645
|
+
return new ReactPanelView(options.id, options.name, props.components[options.name], { addPortal });
|
|
10646
|
+
},
|
|
10633
10647
|
});
|
|
10634
10648
|
}, [props.components]);
|
|
10635
10649
|
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
@@ -10654,36 +10668,47 @@
|
|
|
10654
10668
|
}
|
|
10655
10669
|
}
|
|
10656
10670
|
|
|
10671
|
+
function extractCoreOptions$1(props) {
|
|
10672
|
+
const coreOptions = PROPERTY_KEYS_GRIDVIEW.reduce((obj, key) => {
|
|
10673
|
+
if (key in props) {
|
|
10674
|
+
obj[key] = props[key];
|
|
10675
|
+
}
|
|
10676
|
+
return obj;
|
|
10677
|
+
}, {});
|
|
10678
|
+
return coreOptions;
|
|
10679
|
+
}
|
|
10657
10680
|
const GridviewReact = React.forwardRef((props, ref) => {
|
|
10658
10681
|
const domRef = React.useRef(null);
|
|
10659
10682
|
const gridviewRef = React.useRef();
|
|
10660
10683
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
10661
10684
|
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
10685
|
+
const prevProps = React.useRef({});
|
|
10686
|
+
React.useEffect(() => {
|
|
10687
|
+
const changes = {};
|
|
10688
|
+
PROPERTY_KEYS_GRIDVIEW.forEach((propKey) => {
|
|
10689
|
+
const key = propKey;
|
|
10690
|
+
const propValue = props[key];
|
|
10691
|
+
if (key in props && propValue !== prevProps.current[key]) {
|
|
10692
|
+
changes[key] = propValue;
|
|
10693
|
+
}
|
|
10694
|
+
});
|
|
10695
|
+
if (gridviewRef.current) {
|
|
10696
|
+
gridviewRef.current.updateOptions(changes);
|
|
10697
|
+
}
|
|
10698
|
+
prevProps.current = props;
|
|
10699
|
+
}, PROPERTY_KEYS_GRIDVIEW.map((key) => props[key]));
|
|
10662
10700
|
React.useEffect(() => {
|
|
10663
|
-
var _a;
|
|
10664
10701
|
if (!domRef.current) {
|
|
10665
10702
|
return () => {
|
|
10666
10703
|
// noop
|
|
10667
10704
|
};
|
|
10668
10705
|
}
|
|
10669
|
-
const
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
? props.proportionalLayout
|
|
10673
|
-
: true,
|
|
10674
|
-
orientation: (_a = props.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.HORIZONTAL,
|
|
10675
|
-
frameworkComponents: props.components,
|
|
10676
|
-
frameworkComponentFactory: {
|
|
10677
|
-
createComponent: (id, componentId, component) => {
|
|
10678
|
-
return new ReactGridPanelView(id, componentId, component, {
|
|
10679
|
-
addPortal,
|
|
10680
|
-
});
|
|
10681
|
-
},
|
|
10706
|
+
const frameworkOptions = {
|
|
10707
|
+
createComponent: (options) => {
|
|
10708
|
+
return new ReactGridPanelView(options.id, options.name, props.components[options.name], { addPortal });
|
|
10682
10709
|
},
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
: undefined,
|
|
10686
|
-
});
|
|
10710
|
+
};
|
|
10711
|
+
const api = createGridview(domRef.current, Object.assign(Object.assign({}, extractCoreOptions$1(props)), frameworkOptions));
|
|
10687
10712
|
const { clientWidth, clientHeight } = domRef.current;
|
|
10688
10713
|
api.layout(clientWidth, clientHeight);
|
|
10689
10714
|
if (props.onReady) {
|
|
@@ -10699,7 +10724,9 @@
|
|
|
10699
10724
|
return;
|
|
10700
10725
|
}
|
|
10701
10726
|
gridviewRef.current.updateOptions({
|
|
10702
|
-
|
|
10727
|
+
createComponent: (options) => {
|
|
10728
|
+
return new ReactGridPanelView(options.id, options.name, props.components[options.name], { addPortal });
|
|
10729
|
+
},
|
|
10703
10730
|
});
|
|
10704
10731
|
}, [props.components]);
|
|
10705
10732
|
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
@@ -10741,32 +10768,52 @@
|
|
|
10741
10768
|
}
|
|
10742
10769
|
}
|
|
10743
10770
|
|
|
10771
|
+
function extractCoreOptions(props) {
|
|
10772
|
+
const coreOptions = PROPERTY_KEYS_PANEVIEW.reduce((obj, key) => {
|
|
10773
|
+
if (key in props) {
|
|
10774
|
+
obj[key] = props[key];
|
|
10775
|
+
}
|
|
10776
|
+
return obj;
|
|
10777
|
+
}, {});
|
|
10778
|
+
return coreOptions;
|
|
10779
|
+
}
|
|
10744
10780
|
const PaneviewReact = React.forwardRef((props, ref) => {
|
|
10745
10781
|
const domRef = React.useRef(null);
|
|
10746
10782
|
const paneviewRef = React.useRef();
|
|
10747
10783
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
10748
10784
|
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
10785
|
+
const prevProps = React.useRef({});
|
|
10749
10786
|
React.useEffect(() => {
|
|
10750
|
-
const
|
|
10751
|
-
|
|
10787
|
+
const changes = {};
|
|
10788
|
+
PROPERTY_KEYS_PANEVIEW.forEach((propKey) => {
|
|
10789
|
+
const key = propKey;
|
|
10790
|
+
const propValue = props[key];
|
|
10791
|
+
if (key in props && propValue !== prevProps.current[key]) {
|
|
10792
|
+
changes[key] = propValue;
|
|
10793
|
+
}
|
|
10752
10794
|
});
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10795
|
+
if (paneviewRef.current) {
|
|
10796
|
+
paneviewRef.current.updateOptions(changes);
|
|
10797
|
+
}
|
|
10798
|
+
prevProps.current = props;
|
|
10799
|
+
}, PROPERTY_KEYS_PANEVIEW.map((key) => props[key]));
|
|
10800
|
+
React.useEffect(() => {
|
|
10801
|
+
var _a;
|
|
10802
|
+
if (!domRef.current) {
|
|
10803
|
+
return () => {
|
|
10804
|
+
// noop
|
|
10805
|
+
};
|
|
10806
|
+
}
|
|
10807
|
+
const headerComponents = (_a = props.headerComponents) !== null && _a !== void 0 ? _a : {};
|
|
10808
|
+
const frameworkOptions = {
|
|
10809
|
+
createComponent: (options) => {
|
|
10810
|
+
return new PanePanelSection(options.id, props.components[options.name], { addPortal });
|
|
10767
10811
|
},
|
|
10768
|
-
|
|
10769
|
-
|
|
10812
|
+
createHeaderComponent: (options) => {
|
|
10813
|
+
return new PanePanelSection(options.id, headerComponents[options.name], { addPortal });
|
|
10814
|
+
},
|
|
10815
|
+
};
|
|
10816
|
+
const api = createPaneview(domRef.current, Object.assign(Object.assign({}, extractCoreOptions(props)), frameworkOptions));
|
|
10770
10817
|
const { clientWidth, clientHeight } = domRef.current;
|
|
10771
10818
|
api.layout(clientWidth, clientHeight);
|
|
10772
10819
|
if (props.onReady) {
|
|
@@ -10782,41 +10829,38 @@
|
|
|
10782
10829
|
return;
|
|
10783
10830
|
}
|
|
10784
10831
|
paneviewRef.current.updateOptions({
|
|
10785
|
-
|
|
10832
|
+
createComponent: (options) => {
|
|
10833
|
+
return new PanePanelSection(options.id, props.components[options.name], { addPortal });
|
|
10834
|
+
},
|
|
10786
10835
|
});
|
|
10787
10836
|
}, [props.components]);
|
|
10788
10837
|
React.useEffect(() => {
|
|
10838
|
+
var _a;
|
|
10789
10839
|
if (!paneviewRef.current) {
|
|
10790
10840
|
return;
|
|
10791
10841
|
}
|
|
10842
|
+
const headerComponents = (_a = props.headerComponents) !== null && _a !== void 0 ? _a : {};
|
|
10792
10843
|
paneviewRef.current.updateOptions({
|
|
10793
|
-
|
|
10844
|
+
createHeaderComponent: (options) => {
|
|
10845
|
+
return new PanePanelSection(options.id, headerComponents[options.name], { addPortal });
|
|
10846
|
+
},
|
|
10794
10847
|
});
|
|
10795
10848
|
}, [props.headerComponents]);
|
|
10796
10849
|
React.useEffect(() => {
|
|
10797
10850
|
if (!paneviewRef.current) {
|
|
10798
10851
|
return () => {
|
|
10799
|
-
//
|
|
10852
|
+
// noop
|
|
10800
10853
|
};
|
|
10801
10854
|
}
|
|
10802
|
-
const
|
|
10803
|
-
const disposable = api.onDidDrop((event) => {
|
|
10855
|
+
const disposable = paneviewRef.current.onDidDrop((event) => {
|
|
10804
10856
|
if (props.onDidDrop) {
|
|
10805
|
-
props.onDidDrop(
|
|
10857
|
+
props.onDidDrop(event);
|
|
10806
10858
|
}
|
|
10807
10859
|
});
|
|
10808
10860
|
return () => {
|
|
10809
10861
|
disposable.dispose();
|
|
10810
10862
|
};
|
|
10811
10863
|
}, [props.onDidDrop]);
|
|
10812
|
-
React.useEffect(() => {
|
|
10813
|
-
if (!paneviewRef.current) {
|
|
10814
|
-
return;
|
|
10815
|
-
}
|
|
10816
|
-
paneviewRef.current.updateOptions({
|
|
10817
|
-
showDndOverlay: props.showDndOverlay,
|
|
10818
|
-
});
|
|
10819
|
-
}, [props.showDndOverlay]);
|
|
10820
10864
|
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10821
10865
|
});
|
|
10822
10866
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
@@ -10844,7 +10888,10 @@
|
|
|
10844
10888
|
exports.GridviewComponent = GridviewComponent;
|
|
10845
10889
|
exports.GridviewPanel = GridviewPanel;
|
|
10846
10890
|
exports.GridviewReact = GridviewReact;
|
|
10847
|
-
exports.
|
|
10891
|
+
exports.PROPERTY_KEYS_DOCKVIEW = PROPERTY_KEYS_DOCKVIEW;
|
|
10892
|
+
exports.PROPERTY_KEYS_GRIDVIEW = PROPERTY_KEYS_GRIDVIEW;
|
|
10893
|
+
exports.PROPERTY_KEYS_PANEVIEW = PROPERTY_KEYS_PANEVIEW;
|
|
10894
|
+
exports.PROPERTY_KEYS_SPLITVIEW = PROPERTY_KEYS_SPLITVIEW;
|
|
10848
10895
|
exports.PaneFramework = PaneFramework;
|
|
10849
10896
|
exports.PaneTransfer = PaneTransfer;
|
|
10850
10897
|
exports.PanelTransfer = PanelTransfer;
|
|
@@ -10853,6 +10900,7 @@
|
|
|
10853
10900
|
exports.PaneviewComponent = PaneviewComponent;
|
|
10854
10901
|
exports.PaneviewPanel = PaneviewPanel;
|
|
10855
10902
|
exports.PaneviewReact = PaneviewReact;
|
|
10903
|
+
exports.PaneviewUnhandledDragOverEvent = PaneviewUnhandledDragOverEvent;
|
|
10856
10904
|
exports.ReactPart = ReactPart;
|
|
10857
10905
|
exports.ReactPartContext = ReactPartContext;
|
|
10858
10906
|
exports.Splitview = Splitview;
|