dockview 1.10.2 → 1.12.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 +119 -107
- 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 +118 -106
- package/dist/dockview.amd.noStyle.js.map +1 -1
- package/dist/dockview.cjs.js +119 -107
- package/dist/dockview.cjs.js.map +1 -1
- package/dist/dockview.esm.js +59 -27
- 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 +119 -107
- 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 +118 -106
- 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
package/dist/dockview.noStyle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.12.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -10,26 +10,6 @@
|
|
|
10
10
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dockview = {}, global.React, global.ReactDOM));
|
|
11
11
|
})(this, (function (exports, React, ReactDOM) { 'use strict';
|
|
12
12
|
|
|
13
|
-
function _interopNamespaceDefault(e) {
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n.default = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
31
|
-
var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
|
|
32
|
-
|
|
33
13
|
class TransferObject {
|
|
34
14
|
}
|
|
35
15
|
class PanelTransfer extends TransferObject {
|
|
@@ -3567,7 +3547,7 @@
|
|
|
3567
3547
|
this.panel = panel;
|
|
3568
3548
|
let container;
|
|
3569
3549
|
switch (panel.api.renderer) {
|
|
3570
|
-
case '
|
|
3550
|
+
case 'onlyWhenVisible':
|
|
3571
3551
|
this.group.renderContainer.detatch(panel);
|
|
3572
3552
|
if (this.panel) {
|
|
3573
3553
|
if (doRender) {
|
|
@@ -3613,7 +3593,7 @@
|
|
|
3613
3593
|
closePanel() {
|
|
3614
3594
|
var _a;
|
|
3615
3595
|
if (this.panel) {
|
|
3616
|
-
if (this.panel.api.renderer === '
|
|
3596
|
+
if (this.panel.api.renderer === 'onlyWhenVisible') {
|
|
3617
3597
|
(_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
|
|
3618
3598
|
}
|
|
3619
3599
|
}
|
|
@@ -4002,6 +3982,10 @@
|
|
|
4002
3982
|
}), this.voidContainer.onWillShowOverlay((event) => {
|
|
4003
3983
|
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4004
3984
|
kind: 'header_space',
|
|
3985
|
+
panel: this.group.activePanel,
|
|
3986
|
+
api: this.accessor.api,
|
|
3987
|
+
group: this.group,
|
|
3988
|
+
getData: getPanelData,
|
|
4005
3989
|
}));
|
|
4006
3990
|
}), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
|
|
4007
3991
|
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
@@ -4099,7 +4083,13 @@
|
|
|
4099
4083
|
index: this.tabs.findIndex((x) => x.value === tab),
|
|
4100
4084
|
});
|
|
4101
4085
|
}), tab.onWillShowOverlay((event) => {
|
|
4102
|
-
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4086
|
+
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4087
|
+
kind: 'tab',
|
|
4088
|
+
panel: this.group.activePanel,
|
|
4089
|
+
api: this.accessor.api,
|
|
4090
|
+
group: this.group,
|
|
4091
|
+
getData: getPanelData,
|
|
4092
|
+
}));
|
|
4103
4093
|
}));
|
|
4104
4094
|
const value = { value: tab, disposable };
|
|
4105
4095
|
this.addTab(value, index);
|
|
@@ -4152,7 +4142,7 @@
|
|
|
4152
4142
|
}
|
|
4153
4143
|
class WillShowOverlayLocationEvent {
|
|
4154
4144
|
get kind() {
|
|
4155
|
-
return this.
|
|
4145
|
+
return this.options.kind;
|
|
4156
4146
|
}
|
|
4157
4147
|
get nativeEvent() {
|
|
4158
4148
|
return this.event.nativeEvent;
|
|
@@ -4163,12 +4153,24 @@
|
|
|
4163
4153
|
get defaultPrevented() {
|
|
4164
4154
|
return this.event.defaultPrevented;
|
|
4165
4155
|
}
|
|
4156
|
+
get panel() {
|
|
4157
|
+
return this.options.panel;
|
|
4158
|
+
}
|
|
4159
|
+
get api() {
|
|
4160
|
+
return this.options.api;
|
|
4161
|
+
}
|
|
4162
|
+
get group() {
|
|
4163
|
+
return this.options.group;
|
|
4164
|
+
}
|
|
4166
4165
|
preventDefault() {
|
|
4167
4166
|
this.event.preventDefault();
|
|
4168
4167
|
}
|
|
4168
|
+
getData() {
|
|
4169
|
+
return this.options.getData();
|
|
4170
|
+
}
|
|
4169
4171
|
constructor(event, options) {
|
|
4170
4172
|
this.event = event;
|
|
4171
|
-
this.
|
|
4173
|
+
this.options = options;
|
|
4172
4174
|
}
|
|
4173
4175
|
}
|
|
4174
4176
|
class DockviewGroupPanelModel extends CompositeDisposable {
|
|
@@ -4307,6 +4309,10 @@
|
|
|
4307
4309
|
}), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
|
|
4308
4310
|
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4309
4311
|
kind: 'content',
|
|
4312
|
+
panel: this.activePanel,
|
|
4313
|
+
api: this._api,
|
|
4314
|
+
group: this.groupPanel,
|
|
4315
|
+
getData: getPanelData,
|
|
4310
4316
|
}));
|
|
4311
4317
|
}), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
|
|
4312
4318
|
}
|
|
@@ -6124,27 +6130,18 @@
|
|
|
6124
6130
|
//
|
|
6125
6131
|
this.params = {};
|
|
6126
6132
|
this._element = document.createElement('div');
|
|
6127
|
-
this._element.className = 'default-tab';
|
|
6133
|
+
this._element.className = 'dv-default-tab';
|
|
6128
6134
|
//
|
|
6129
6135
|
this._content = document.createElement('div');
|
|
6130
|
-
this._content.className = 'tab-content';
|
|
6131
|
-
//
|
|
6132
|
-
this._actionContainer = document.createElement('div');
|
|
6133
|
-
this._actionContainer.className = 'action-container';
|
|
6134
|
-
//
|
|
6135
|
-
this._list = document.createElement('ul');
|
|
6136
|
-
this._list.className = 'tab-list';
|
|
6137
|
-
//
|
|
6136
|
+
this._content.className = 'dv-default-tab-content';
|
|
6138
6137
|
this.action = document.createElement('div');
|
|
6139
|
-
this.action.className = 'tab-action';
|
|
6138
|
+
this.action.className = 'dv-default-tab-action';
|
|
6140
6139
|
this.action.appendChild(createCloseButton());
|
|
6141
6140
|
//
|
|
6142
6141
|
this._element.appendChild(this._content);
|
|
6143
|
-
this._element.appendChild(this.
|
|
6144
|
-
this._actionContainer.appendChild(this._list);
|
|
6145
|
-
this._list.appendChild(this.action);
|
|
6142
|
+
this._element.appendChild(this.action);
|
|
6146
6143
|
//
|
|
6147
|
-
this.addDisposables(addDisposableListener(this.
|
|
6144
|
+
this.addDisposables(addDisposableListener(this.action, 'mousedown', (ev) => {
|
|
6148
6145
|
ev.preventDefault();
|
|
6149
6146
|
}));
|
|
6150
6147
|
this.render();
|
|
@@ -6961,7 +6958,10 @@
|
|
|
6961
6958
|
}
|
|
6962
6959
|
get renderer() {
|
|
6963
6960
|
var _a;
|
|
6964
|
-
return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : '
|
|
6961
|
+
return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisible';
|
|
6962
|
+
}
|
|
6963
|
+
get api() {
|
|
6964
|
+
return this._api;
|
|
6965
6965
|
}
|
|
6966
6966
|
constructor(options) {
|
|
6967
6967
|
var _a, _b;
|
|
@@ -7096,6 +7096,10 @@
|
|
|
7096
7096
|
}
|
|
7097
7097
|
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
7098
7098
|
kind: 'edge',
|
|
7099
|
+
panel: undefined,
|
|
7100
|
+
api: this._api,
|
|
7101
|
+
group: undefined,
|
|
7102
|
+
getData: getPanelData,
|
|
7099
7103
|
}));
|
|
7100
7104
|
}), this._rootDropTarget.onDrop((event) => {
|
|
7101
7105
|
var _a;
|
|
@@ -9247,9 +9251,9 @@
|
|
|
9247
9251
|
* component
|
|
9248
9252
|
*/
|
|
9249
9253
|
const ReactComponentBridge = (props, ref) => {
|
|
9250
|
-
const [_, triggerRender] =
|
|
9251
|
-
const _props =
|
|
9252
|
-
|
|
9254
|
+
const [_, triggerRender] = React.useState();
|
|
9255
|
+
const _props = React.useRef(props.componentProps);
|
|
9256
|
+
React.useImperativeHandle(ref, () => ({
|
|
9253
9257
|
update: (componentProps) => {
|
|
9254
9258
|
_props.current = Object.assign(Object.assign({}, _props.current), componentProps);
|
|
9255
9259
|
/**
|
|
@@ -9261,7 +9265,7 @@
|
|
|
9261
9265
|
triggerRender(Date.now());
|
|
9262
9266
|
},
|
|
9263
9267
|
}), []);
|
|
9264
|
-
return
|
|
9268
|
+
return React.createElement(props.component, _props.current);
|
|
9265
9269
|
};
|
|
9266
9270
|
ReactComponentBridge.displayName = 'DockviewReactJsBridge';
|
|
9267
9271
|
/**
|
|
@@ -9273,7 +9277,7 @@
|
|
|
9273
9277
|
let value = 1;
|
|
9274
9278
|
return { next: () => `dockview_react_portal_key_${(value++).toString()}` };
|
|
9275
9279
|
})();
|
|
9276
|
-
const ReactPartContext =
|
|
9280
|
+
const ReactPartContext = React.createContext({});
|
|
9277
9281
|
class ReactPart {
|
|
9278
9282
|
constructor(parent, portalStore, component, parameters, context) {
|
|
9279
9283
|
this.parent = parent;
|
|
@@ -9309,7 +9313,7 @@
|
|
|
9309
9313
|
*/
|
|
9310
9314
|
throw new Error('Dockview: Only React.memo(...), React.ForwardRef(...) and functional components are accepted as components');
|
|
9311
9315
|
}
|
|
9312
|
-
const bridgeComponent =
|
|
9316
|
+
const bridgeComponent = React.createElement(React.forwardRef(ReactComponentBridge), {
|
|
9313
9317
|
component: this
|
|
9314
9318
|
.component,
|
|
9315
9319
|
componentProps: this.parameters,
|
|
@@ -9322,9 +9326,9 @@
|
|
|
9322
9326
|
},
|
|
9323
9327
|
});
|
|
9324
9328
|
const node = this.context
|
|
9325
|
-
?
|
|
9329
|
+
? React.createElement(ReactPartContext.Provider, { value: this.context }, bridgeComponent)
|
|
9326
9330
|
: bridgeComponent;
|
|
9327
|
-
const portal =
|
|
9331
|
+
const portal = ReactDOM.createPortal(node, this.parent, uniquePortalKeyGenerator.next());
|
|
9328
9332
|
this.ref = {
|
|
9329
9333
|
portal,
|
|
9330
9334
|
disposable: this.portalStore.addPortal(portal),
|
|
@@ -9342,9 +9346,9 @@
|
|
|
9342
9346
|
* portal array
|
|
9343
9347
|
*/
|
|
9344
9348
|
const usePortalsLifecycle = () => {
|
|
9345
|
-
const [portals, setPortals] =
|
|
9346
|
-
|
|
9347
|
-
const addPortal =
|
|
9349
|
+
const [portals, setPortals] = React.useState([]);
|
|
9350
|
+
React.useDebugValue(`Portal count: ${portals.length}`);
|
|
9351
|
+
const addPortal = React.useCallback((portal) => {
|
|
9348
9352
|
setPortals((existingPortals) => [...existingPortals, portal]);
|
|
9349
9353
|
let disposed = false;
|
|
9350
9354
|
return {
|
|
@@ -9382,6 +9386,8 @@
|
|
|
9382
9386
|
this.onDidBlur = this._onDidBlur.event;
|
|
9383
9387
|
this._element = document.createElement('div');
|
|
9384
9388
|
this._element.className = 'dockview-react-part';
|
|
9389
|
+
this._element.style.height = '100%';
|
|
9390
|
+
this._element.style.width = '100%';
|
|
9385
9391
|
}
|
|
9386
9392
|
focus() {
|
|
9387
9393
|
// TODO
|
|
@@ -9418,6 +9424,8 @@
|
|
|
9418
9424
|
this.reactPortalStore = reactPortalStore;
|
|
9419
9425
|
this._element = document.createElement('div');
|
|
9420
9426
|
this._element.className = 'dockview-react-part';
|
|
9427
|
+
this._element.style.height = '100%';
|
|
9428
|
+
this._element.style.width = '100%';
|
|
9421
9429
|
}
|
|
9422
9430
|
focus() {
|
|
9423
9431
|
//noop
|
|
@@ -9452,6 +9460,8 @@
|
|
|
9452
9460
|
this.reactPortalStore = reactPortalStore;
|
|
9453
9461
|
this._element = document.createElement('div');
|
|
9454
9462
|
this._element.className = 'dockview-react-part';
|
|
9463
|
+
this._element.style.height = '100%';
|
|
9464
|
+
this._element.style.width = '100%';
|
|
9455
9465
|
}
|
|
9456
9466
|
init(parameters) {
|
|
9457
9467
|
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
@@ -9503,6 +9513,8 @@
|
|
|
9503
9513
|
this.mutableDisposable = new MutableDisposable();
|
|
9504
9514
|
this._element = document.createElement('div');
|
|
9505
9515
|
this._element.className = 'dockview-react-part';
|
|
9516
|
+
this._element.style.height = '100%';
|
|
9517
|
+
this._element.style.width = '100%';
|
|
9506
9518
|
}
|
|
9507
9519
|
focus() {
|
|
9508
9520
|
// TODO
|
|
@@ -9562,12 +9574,12 @@
|
|
|
9562
9574
|
: undefined;
|
|
9563
9575
|
}
|
|
9564
9576
|
const DEFAULT_REACT_TAB = 'props.defaultTabComponent';
|
|
9565
|
-
const DockviewReact =
|
|
9566
|
-
const domRef =
|
|
9567
|
-
const dockviewRef =
|
|
9577
|
+
const DockviewReact = React.forwardRef((props, ref) => {
|
|
9578
|
+
const domRef = React.useRef(null);
|
|
9579
|
+
const dockviewRef = React.useRef();
|
|
9568
9580
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9569
|
-
|
|
9570
|
-
|
|
9581
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
9582
|
+
React.useEffect(() => {
|
|
9571
9583
|
var _a;
|
|
9572
9584
|
if (!domRef.current) {
|
|
9573
9585
|
return () => {
|
|
@@ -9638,13 +9650,13 @@
|
|
|
9638
9650
|
dockview.dispose();
|
|
9639
9651
|
};
|
|
9640
9652
|
}, []);
|
|
9641
|
-
|
|
9653
|
+
React.useEffect(() => {
|
|
9642
9654
|
if (!dockviewRef.current) {
|
|
9643
9655
|
return;
|
|
9644
9656
|
}
|
|
9645
9657
|
dockviewRef.current.locked = !!props.locked;
|
|
9646
9658
|
}, [props.locked]);
|
|
9647
|
-
|
|
9659
|
+
React.useEffect(() => {
|
|
9648
9660
|
if (!dockviewRef.current) {
|
|
9649
9661
|
return;
|
|
9650
9662
|
}
|
|
@@ -9652,7 +9664,7 @@
|
|
|
9652
9664
|
disableDnd: props.disableDnd,
|
|
9653
9665
|
});
|
|
9654
9666
|
}, [props.disableDnd]);
|
|
9655
|
-
|
|
9667
|
+
React.useEffect(() => {
|
|
9656
9668
|
if (!dockviewRef.current) {
|
|
9657
9669
|
return () => {
|
|
9658
9670
|
// noop
|
|
@@ -9667,7 +9679,7 @@
|
|
|
9667
9679
|
disposable.dispose();
|
|
9668
9680
|
};
|
|
9669
9681
|
}, [props.onDidDrop]);
|
|
9670
|
-
|
|
9682
|
+
React.useEffect(() => {
|
|
9671
9683
|
if (!dockviewRef.current) {
|
|
9672
9684
|
return () => {
|
|
9673
9685
|
// noop
|
|
@@ -9682,7 +9694,7 @@
|
|
|
9682
9694
|
disposable.dispose();
|
|
9683
9695
|
};
|
|
9684
9696
|
}, [props.onWillDrop]);
|
|
9685
|
-
|
|
9697
|
+
React.useEffect(() => {
|
|
9686
9698
|
if (!dockviewRef.current) {
|
|
9687
9699
|
return;
|
|
9688
9700
|
}
|
|
@@ -9690,7 +9702,7 @@
|
|
|
9690
9702
|
frameworkComponents: props.components,
|
|
9691
9703
|
});
|
|
9692
9704
|
}, [props.components]);
|
|
9693
|
-
|
|
9705
|
+
React.useEffect(() => {
|
|
9694
9706
|
if (!dockviewRef.current) {
|
|
9695
9707
|
return;
|
|
9696
9708
|
}
|
|
@@ -9698,7 +9710,7 @@
|
|
|
9698
9710
|
floatingGroupBounds: props.floatingGroupBounds,
|
|
9699
9711
|
});
|
|
9700
9712
|
}, [props.floatingGroupBounds]);
|
|
9701
|
-
|
|
9713
|
+
React.useEffect(() => {
|
|
9702
9714
|
if (!dockviewRef.current) {
|
|
9703
9715
|
return;
|
|
9704
9716
|
}
|
|
@@ -9706,7 +9718,7 @@
|
|
|
9706
9718
|
watermarkFrameworkComponent: props.watermarkComponent,
|
|
9707
9719
|
});
|
|
9708
9720
|
}, [props.watermarkComponent]);
|
|
9709
|
-
|
|
9721
|
+
React.useEffect(() => {
|
|
9710
9722
|
if (!dockviewRef.current) {
|
|
9711
9723
|
return;
|
|
9712
9724
|
}
|
|
@@ -9714,7 +9726,7 @@
|
|
|
9714
9726
|
showDndOverlay: props.showDndOverlay,
|
|
9715
9727
|
});
|
|
9716
9728
|
}, [props.showDndOverlay]);
|
|
9717
|
-
|
|
9729
|
+
React.useEffect(() => {
|
|
9718
9730
|
if (!dockviewRef.current) {
|
|
9719
9731
|
return;
|
|
9720
9732
|
}
|
|
@@ -9722,7 +9734,7 @@
|
|
|
9722
9734
|
frameworkTabComponents: props.tabComponents,
|
|
9723
9735
|
});
|
|
9724
9736
|
}, [props.tabComponents]);
|
|
9725
|
-
|
|
9737
|
+
React.useEffect(() => {
|
|
9726
9738
|
if (!dockviewRef.current) {
|
|
9727
9739
|
return;
|
|
9728
9740
|
}
|
|
@@ -9730,7 +9742,7 @@
|
|
|
9730
9742
|
disableFloatingGroups: props.disableFloatingGroups,
|
|
9731
9743
|
});
|
|
9732
9744
|
}, [props.disableFloatingGroups]);
|
|
9733
|
-
|
|
9745
|
+
React.useEffect(() => {
|
|
9734
9746
|
var _a;
|
|
9735
9747
|
if (!dockviewRef.current) {
|
|
9736
9748
|
return;
|
|
@@ -9747,7 +9759,7 @@
|
|
|
9747
9759
|
frameworkTabComponents,
|
|
9748
9760
|
});
|
|
9749
9761
|
}, [props.defaultTabComponent]);
|
|
9750
|
-
|
|
9762
|
+
React.useEffect(() => {
|
|
9751
9763
|
if (!dockviewRef.current) {
|
|
9752
9764
|
return;
|
|
9753
9765
|
}
|
|
@@ -9755,7 +9767,7 @@
|
|
|
9755
9767
|
createRightHeaderActionsElement: createGroupControlElement(props.rightHeaderActionsComponent, { addPortal }),
|
|
9756
9768
|
});
|
|
9757
9769
|
}, [props.rightHeaderActionsComponent]);
|
|
9758
|
-
|
|
9770
|
+
React.useEffect(() => {
|
|
9759
9771
|
if (!dockviewRef.current) {
|
|
9760
9772
|
return;
|
|
9761
9773
|
}
|
|
@@ -9763,7 +9775,7 @@
|
|
|
9763
9775
|
createLeftHeaderActionsElement: createGroupControlElement(props.leftHeaderActionsComponent, { addPortal }),
|
|
9764
9776
|
});
|
|
9765
9777
|
}, [props.leftHeaderActionsComponent]);
|
|
9766
|
-
|
|
9778
|
+
React.useEffect(() => {
|
|
9767
9779
|
if (!dockviewRef.current) {
|
|
9768
9780
|
return;
|
|
9769
9781
|
}
|
|
@@ -9771,7 +9783,7 @@
|
|
|
9771
9783
|
rootOverlayModel: props.rootOverlayModel,
|
|
9772
9784
|
});
|
|
9773
9785
|
}, [props.rootOverlayModel]);
|
|
9774
|
-
|
|
9786
|
+
React.useEffect(() => {
|
|
9775
9787
|
if (!dockviewRef.current) {
|
|
9776
9788
|
return;
|
|
9777
9789
|
}
|
|
@@ -9779,7 +9791,7 @@
|
|
|
9779
9791
|
createPrefixHeaderActionsElement: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
9780
9792
|
});
|
|
9781
9793
|
}, [props.prefixHeaderActionsComponent]);
|
|
9782
|
-
return (
|
|
9794
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
9783
9795
|
});
|
|
9784
9796
|
DockviewReact.displayName = 'DockviewComponent';
|
|
9785
9797
|
|
|
@@ -9817,12 +9829,12 @@
|
|
|
9817
9829
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
9818
9830
|
};
|
|
9819
9831
|
|
|
9820
|
-
const CloseButton = () => (
|
|
9821
|
-
|
|
9832
|
+
const CloseButton = () => (React.createElement("svg", { height: "11", width: "11", viewBox: "0 0 28 28", "aria-hidden": 'false', focusable: false, className: "dockview-svg" },
|
|
9833
|
+
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" })));
|
|
9822
9834
|
|
|
9823
9835
|
const DockviewDefaultTab = (_a) => {
|
|
9824
9836
|
var { api, containerApi: _containerApi, params: _params, hideClose, closeActionOverride } = _a, rest = __rest(_a, ["api", "containerApi", "params", "hideClose", "closeActionOverride"]);
|
|
9825
|
-
const onClose =
|
|
9837
|
+
const onClose = React.useCallback((event) => {
|
|
9826
9838
|
event.preventDefault();
|
|
9827
9839
|
if (closeActionOverride) {
|
|
9828
9840
|
closeActionOverride();
|
|
@@ -9831,10 +9843,10 @@
|
|
|
9831
9843
|
api.close();
|
|
9832
9844
|
}
|
|
9833
9845
|
}, [api, closeActionOverride]);
|
|
9834
|
-
const onMouseDown =
|
|
9846
|
+
const onMouseDown = React.useCallback((e) => {
|
|
9835
9847
|
e.preventDefault();
|
|
9836
9848
|
}, []);
|
|
9837
|
-
const onClick =
|
|
9849
|
+
const onClick = React.useCallback((event) => {
|
|
9838
9850
|
if (event.defaultPrevented) {
|
|
9839
9851
|
return;
|
|
9840
9852
|
}
|
|
@@ -9843,10 +9855,10 @@
|
|
|
9843
9855
|
rest.onClick(event);
|
|
9844
9856
|
}
|
|
9845
9857
|
}, [api, rest.onClick]);
|
|
9846
|
-
return (
|
|
9847
|
-
|
|
9848
|
-
!hideClose && (
|
|
9849
|
-
|
|
9858
|
+
return (React.createElement("div", Object.assign({ "data-testid": "dockview-dv-default-tab" }, rest, { onClick: onClick, className: "dv-default-tab" }),
|
|
9859
|
+
React.createElement("span", { className: "dv-default-tab-content" }, api.title),
|
|
9860
|
+
!hideClose && (React.createElement("div", { className: "dv-default-tab-action", onMouseDown: onMouseDown, onClick: onClose },
|
|
9861
|
+
React.createElement(CloseButton, null)))));
|
|
9850
9862
|
};
|
|
9851
9863
|
|
|
9852
9864
|
class ReactPanelView extends SplitviewPanel {
|
|
@@ -9865,12 +9877,12 @@
|
|
|
9865
9877
|
}
|
|
9866
9878
|
}
|
|
9867
9879
|
|
|
9868
|
-
const SplitviewReact =
|
|
9869
|
-
const domRef =
|
|
9870
|
-
const splitviewRef =
|
|
9880
|
+
const SplitviewReact = React.forwardRef((props, ref) => {
|
|
9881
|
+
const domRef = React.useRef(null);
|
|
9882
|
+
const splitviewRef = React.useRef();
|
|
9871
9883
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9872
|
-
|
|
9873
|
-
|
|
9884
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
9885
|
+
React.useEffect(() => {
|
|
9874
9886
|
var _a;
|
|
9875
9887
|
const splitview = new SplitviewComponent({
|
|
9876
9888
|
parentElement: domRef.current,
|
|
@@ -9901,7 +9913,7 @@
|
|
|
9901
9913
|
splitview.dispose();
|
|
9902
9914
|
};
|
|
9903
9915
|
}, []);
|
|
9904
|
-
|
|
9916
|
+
React.useEffect(() => {
|
|
9905
9917
|
if (!splitviewRef.current) {
|
|
9906
9918
|
return;
|
|
9907
9919
|
}
|
|
@@ -9909,7 +9921,7 @@
|
|
|
9909
9921
|
frameworkComponents: props.components,
|
|
9910
9922
|
});
|
|
9911
9923
|
}, [props.components]);
|
|
9912
|
-
return (
|
|
9924
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
9913
9925
|
});
|
|
9914
9926
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
9915
9927
|
|
|
@@ -9931,12 +9943,12 @@
|
|
|
9931
9943
|
}
|
|
9932
9944
|
}
|
|
9933
9945
|
|
|
9934
|
-
const GridviewReact =
|
|
9935
|
-
const domRef =
|
|
9936
|
-
const gridviewRef =
|
|
9946
|
+
const GridviewReact = React.forwardRef((props, ref) => {
|
|
9947
|
+
const domRef = React.useRef(null);
|
|
9948
|
+
const gridviewRef = React.useRef();
|
|
9937
9949
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
9938
|
-
|
|
9939
|
-
|
|
9950
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
9951
|
+
React.useEffect(() => {
|
|
9940
9952
|
var _a;
|
|
9941
9953
|
if (!domRef.current) {
|
|
9942
9954
|
return () => {
|
|
@@ -9972,7 +9984,7 @@
|
|
|
9972
9984
|
gridview.dispose();
|
|
9973
9985
|
};
|
|
9974
9986
|
}, []);
|
|
9975
|
-
|
|
9987
|
+
React.useEffect(() => {
|
|
9976
9988
|
if (!gridviewRef.current) {
|
|
9977
9989
|
return;
|
|
9978
9990
|
}
|
|
@@ -9980,7 +9992,7 @@
|
|
|
9980
9992
|
frameworkComponents: props.components,
|
|
9981
9993
|
});
|
|
9982
9994
|
}, [props.components]);
|
|
9983
|
-
return (
|
|
9995
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
9984
9996
|
});
|
|
9985
9997
|
GridviewReact.displayName = 'GridviewComponent';
|
|
9986
9998
|
|
|
@@ -10019,12 +10031,12 @@
|
|
|
10019
10031
|
}
|
|
10020
10032
|
}
|
|
10021
10033
|
|
|
10022
|
-
const PaneviewReact =
|
|
10023
|
-
const domRef =
|
|
10024
|
-
const paneviewRef =
|
|
10034
|
+
const PaneviewReact = React.forwardRef((props, ref) => {
|
|
10035
|
+
const domRef = React.useRef(null);
|
|
10036
|
+
const paneviewRef = React.useRef();
|
|
10025
10037
|
const [portals, addPortal] = usePortalsLifecycle();
|
|
10026
|
-
|
|
10027
|
-
|
|
10038
|
+
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
10039
|
+
React.useEffect(() => {
|
|
10028
10040
|
const createComponent = (id, _componentId, component) => new PanePanelSection(id, component, {
|
|
10029
10041
|
addPortal,
|
|
10030
10042
|
});
|
|
@@ -10057,7 +10069,7 @@
|
|
|
10057
10069
|
paneview.dispose();
|
|
10058
10070
|
};
|
|
10059
10071
|
}, []);
|
|
10060
|
-
|
|
10072
|
+
React.useEffect(() => {
|
|
10061
10073
|
if (!paneviewRef.current) {
|
|
10062
10074
|
return;
|
|
10063
10075
|
}
|
|
@@ -10065,7 +10077,7 @@
|
|
|
10065
10077
|
frameworkComponents: props.components,
|
|
10066
10078
|
});
|
|
10067
10079
|
}, [props.components]);
|
|
10068
|
-
|
|
10080
|
+
React.useEffect(() => {
|
|
10069
10081
|
if (!paneviewRef.current) {
|
|
10070
10082
|
return;
|
|
10071
10083
|
}
|
|
@@ -10073,7 +10085,7 @@
|
|
|
10073
10085
|
headerframeworkComponents: props.headerComponents,
|
|
10074
10086
|
});
|
|
10075
10087
|
}, [props.headerComponents]);
|
|
10076
|
-
|
|
10088
|
+
React.useEffect(() => {
|
|
10077
10089
|
if (!paneviewRef.current) {
|
|
10078
10090
|
return () => {
|
|
10079
10091
|
//
|
|
@@ -10089,7 +10101,7 @@
|
|
|
10089
10101
|
disposable.dispose();
|
|
10090
10102
|
};
|
|
10091
10103
|
}, [props.onDidDrop]);
|
|
10092
|
-
|
|
10104
|
+
React.useEffect(() => {
|
|
10093
10105
|
if (!paneviewRef.current) {
|
|
10094
10106
|
return;
|
|
10095
10107
|
}
|
|
@@ -10097,7 +10109,7 @@
|
|
|
10097
10109
|
showDndOverlay: props.showDndOverlay,
|
|
10098
10110
|
});
|
|
10099
10111
|
}, [props.showDndOverlay]);
|
|
10100
|
-
return (
|
|
10112
|
+
return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10101
10113
|
});
|
|
10102
10114
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
10103
10115
|
|