dockview-react 4.2.0 → 4.2.3
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 +44 -41
- 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 +43 -40
- package/dist/dockview-react.amd.noStyle.js.map +1 -1
- package/dist/dockview-react.cjs.js +44 -41
- package/dist/dockview-react.cjs.js.map +1 -1
- package/dist/dockview-react.esm.js +44 -41
- 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 +44 -41
- 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 +43 -40
- package/dist/dockview-react.noStyle.js.map +1 -1
- package/dist/styles/dockview.css +8 -8
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-react
|
|
3
|
-
* @version 4.2.
|
|
3
|
+
* @version 4.2.3
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -5453,7 +5453,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
5453
5453
|
this._element.appendChild(this.leftActionsContainer);
|
|
5454
5454
|
this._element.appendChild(this.voidContainer.element);
|
|
5455
5455
|
this._element.appendChild(this.rightActionsContainer);
|
|
5456
|
-
this.addDisposables(accessor.onDidOptionsChange(() => {
|
|
5456
|
+
this.addDisposables(this.tabs.onDrop((e) => this._onDrop.fire(e)), this.tabs.onWillShowOverlay((e) => this._onWillShowOverlay.fire(e)), accessor.onDidOptionsChange(() => {
|
|
5457
5457
|
this.tabs.showTabsOverflowControl =
|
|
5458
5458
|
!accessor.options.disableTabsOverflowList;
|
|
5459
5459
|
}), this.tabs.onOverflowTabsChange((event) => {
|
|
@@ -8171,13 +8171,48 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8171
8171
|
this._onDidActiveGroupChange = new Emitter();
|
|
8172
8172
|
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
8173
8173
|
this._moving = false;
|
|
8174
|
+
this._options = options;
|
|
8174
8175
|
this.popupService = new PopupService(this.element);
|
|
8175
|
-
this.updateDropTargetModel(options);
|
|
8176
8176
|
this._themeClassnames = new Classnames(this.element);
|
|
8177
|
+
this._api = new DockviewApi(this);
|
|
8177
8178
|
this.rootDropTargetContainer = new DropTargetAnchorContainer(this.element, { disabled: true });
|
|
8178
8179
|
this.overlayRenderContainer = new OverlayRenderContainer(this.gridview.element, this);
|
|
8180
|
+
this._rootDropTarget = new Droptarget(this.element, {
|
|
8181
|
+
className: 'dv-drop-target-edge',
|
|
8182
|
+
canDisplayOverlay: (event, position) => {
|
|
8183
|
+
const data = getPanelData();
|
|
8184
|
+
if (data) {
|
|
8185
|
+
if (data.viewId !== this.id) {
|
|
8186
|
+
return false;
|
|
8187
|
+
}
|
|
8188
|
+
if (position === 'center') {
|
|
8189
|
+
// center drop target is only allowed if there are no panels in the grid
|
|
8190
|
+
// floating panels are allowed
|
|
8191
|
+
return this.gridview.length === 0;
|
|
8192
|
+
}
|
|
8193
|
+
return true;
|
|
8194
|
+
}
|
|
8195
|
+
if (position === 'center' && this.gridview.length !== 0) {
|
|
8196
|
+
/**
|
|
8197
|
+
* for external events only show the four-corner drag overlays, disable
|
|
8198
|
+
* the center position so that external drag events can fall through to the group
|
|
8199
|
+
* and panel drop target handlers
|
|
8200
|
+
*/
|
|
8201
|
+
return false;
|
|
8202
|
+
}
|
|
8203
|
+
const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
|
|
8204
|
+
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
8205
|
+
return firedEvent.isAccepted;
|
|
8206
|
+
},
|
|
8207
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
8208
|
+
overlayModel: (_c = options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
8209
|
+
getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
8210
|
+
});
|
|
8211
|
+
this.updateDropTargetModel(options);
|
|
8179
8212
|
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
8180
8213
|
toggleClass(this.element, 'dv-debug', !!options.debug);
|
|
8214
|
+
this.updateTheme();
|
|
8215
|
+
this.updateWatermark();
|
|
8181
8216
|
if (options.debug) {
|
|
8182
8217
|
this.addDisposables(new StrictEventsSequencing(this));
|
|
8183
8218
|
}
|
|
@@ -8213,41 +8248,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8213
8248
|
for (const group of [...this._popoutGroups]) {
|
|
8214
8249
|
group.disposable.dispose();
|
|
8215
8250
|
}
|
|
8216
|
-
}))
|
|
8217
|
-
this._options = options;
|
|
8218
|
-
this.updateTheme();
|
|
8219
|
-
this._rootDropTarget = new Droptarget(this.element, {
|
|
8220
|
-
className: 'dv-drop-target-edge',
|
|
8221
|
-
canDisplayOverlay: (event, position) => {
|
|
8222
|
-
const data = getPanelData();
|
|
8223
|
-
if (data) {
|
|
8224
|
-
if (data.viewId !== this.id) {
|
|
8225
|
-
return false;
|
|
8226
|
-
}
|
|
8227
|
-
if (position === 'center') {
|
|
8228
|
-
// center drop target is only allowed if there are no panels in the grid
|
|
8229
|
-
// floating panels are allowed
|
|
8230
|
-
return this.gridview.length === 0;
|
|
8231
|
-
}
|
|
8232
|
-
return true;
|
|
8233
|
-
}
|
|
8234
|
-
if (position === 'center' && this.gridview.length !== 0) {
|
|
8235
|
-
/**
|
|
8236
|
-
* for external events only show the four-corner drag overlays, disable
|
|
8237
|
-
* the center position so that external drag events can fall through to the group
|
|
8238
|
-
* and panel drop target handlers
|
|
8239
|
-
*/
|
|
8240
|
-
return false;
|
|
8241
|
-
}
|
|
8242
|
-
const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
|
|
8243
|
-
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
8244
|
-
return firedEvent.isAccepted;
|
|
8245
|
-
},
|
|
8246
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
8247
|
-
overlayModel: (_c = this.options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
8248
|
-
getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
8249
|
-
});
|
|
8250
|
-
this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
8251
|
+
}), this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
8251
8252
|
if (this.gridview.length > 0 && event.position === 'center') {
|
|
8252
8253
|
// option only available when no panels in primary grid
|
|
8253
8254
|
return;
|
|
@@ -8298,8 +8299,6 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
8298
8299
|
}));
|
|
8299
8300
|
}
|
|
8300
8301
|
}), this._rootDropTarget);
|
|
8301
|
-
this._api = new DockviewApi(this);
|
|
8302
|
-
this.updateWatermark();
|
|
8303
8302
|
}
|
|
8304
8303
|
setVisible(panel, visible) {
|
|
8305
8304
|
switch (panel.api.location.type) {
|
|
@@ -11112,6 +11111,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
11112
11111
|
}
|
|
11113
11112
|
dockviewRef.current = api;
|
|
11114
11113
|
return () => {
|
|
11114
|
+
dockviewRef.current = undefined;
|
|
11115
11115
|
api.dispose();
|
|
11116
11116
|
};
|
|
11117
11117
|
}, []);
|
|
@@ -11347,6 +11347,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
11347
11347
|
}
|
|
11348
11348
|
splitviewRef.current = api;
|
|
11349
11349
|
return () => {
|
|
11350
|
+
splitviewRef.current = undefined;
|
|
11350
11351
|
api.dispose();
|
|
11351
11352
|
};
|
|
11352
11353
|
}, []);
|
|
@@ -11430,6 +11431,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
11430
11431
|
}
|
|
11431
11432
|
gridviewRef.current = api;
|
|
11432
11433
|
return () => {
|
|
11434
|
+
gridviewRef.current = undefined;
|
|
11433
11435
|
api.dispose();
|
|
11434
11436
|
};
|
|
11435
11437
|
}, []);
|
|
@@ -11535,6 +11537,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
|
|
|
11535
11537
|
}
|
|
11536
11538
|
paneviewRef.current = api;
|
|
11537
11539
|
return () => {
|
|
11540
|
+
paneviewRef.current = undefined;
|
|
11538
11541
|
api.dispose();
|
|
11539
11542
|
};
|
|
11540
11543
|
}, []);
|