dockview-core 4.2.0 → 4.2.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/cjs/dockview/components/titlebar/tabsContainer.js +1 -1
- package/dist/cjs/dockview/dockviewComponent.js +37 -38
- package/dist/dockview-core.amd.js +40 -41
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +39 -40
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +40 -41
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +40 -41
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +40 -41
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +39 -40
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +1 -1
- package/dist/esm/dockview/dockviewComponent.js +37 -38
- package/dist/styles/dockview.css +8 -8
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 4.2.
|
|
3
|
+
* @version 4.2.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -5453,7 +5453,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
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) => {
|
|
@@ -8194,13 +8194,48 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8194
8194
|
this._onDidActiveGroupChange = new Emitter();
|
|
8195
8195
|
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
8196
8196
|
this._moving = false;
|
|
8197
|
+
this._options = options;
|
|
8197
8198
|
this.popupService = new PopupService(this.element);
|
|
8198
|
-
this.updateDropTargetModel(options);
|
|
8199
8199
|
this._themeClassnames = new Classnames(this.element);
|
|
8200
|
+
this._api = new DockviewApi(this);
|
|
8200
8201
|
this.rootDropTargetContainer = new DropTargetAnchorContainer(this.element, { disabled: true });
|
|
8201
8202
|
this.overlayRenderContainer = new OverlayRenderContainer(this.gridview.element, this);
|
|
8203
|
+
this._rootDropTarget = new Droptarget(this.element, {
|
|
8204
|
+
className: 'dv-drop-target-edge',
|
|
8205
|
+
canDisplayOverlay: (event, position) => {
|
|
8206
|
+
const data = getPanelData();
|
|
8207
|
+
if (data) {
|
|
8208
|
+
if (data.viewId !== this.id) {
|
|
8209
|
+
return false;
|
|
8210
|
+
}
|
|
8211
|
+
if (position === 'center') {
|
|
8212
|
+
// center drop target is only allowed if there are no panels in the grid
|
|
8213
|
+
// floating panels are allowed
|
|
8214
|
+
return this.gridview.length === 0;
|
|
8215
|
+
}
|
|
8216
|
+
return true;
|
|
8217
|
+
}
|
|
8218
|
+
if (position === 'center' && this.gridview.length !== 0) {
|
|
8219
|
+
/**
|
|
8220
|
+
* for external events only show the four-corner drag overlays, disable
|
|
8221
|
+
* the center position so that external drag events can fall through to the group
|
|
8222
|
+
* and panel drop target handlers
|
|
8223
|
+
*/
|
|
8224
|
+
return false;
|
|
8225
|
+
}
|
|
8226
|
+
const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
|
|
8227
|
+
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
8228
|
+
return firedEvent.isAccepted;
|
|
8229
|
+
},
|
|
8230
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
8231
|
+
overlayModel: (_c = options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
8232
|
+
getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
8233
|
+
});
|
|
8234
|
+
this.updateDropTargetModel(options);
|
|
8202
8235
|
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
8203
8236
|
toggleClass(this.element, 'dv-debug', !!options.debug);
|
|
8237
|
+
this.updateTheme();
|
|
8238
|
+
this.updateWatermark();
|
|
8204
8239
|
if (options.debug) {
|
|
8205
8240
|
this.addDisposables(new StrictEventsSequencing(this));
|
|
8206
8241
|
}
|
|
@@ -8236,41 +8271,7 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8236
8271
|
for (const group of [...this._popoutGroups]) {
|
|
8237
8272
|
group.disposable.dispose();
|
|
8238
8273
|
}
|
|
8239
|
-
}))
|
|
8240
|
-
this._options = options;
|
|
8241
|
-
this.updateTheme();
|
|
8242
|
-
this._rootDropTarget = new Droptarget(this.element, {
|
|
8243
|
-
className: 'dv-drop-target-edge',
|
|
8244
|
-
canDisplayOverlay: (event, position) => {
|
|
8245
|
-
const data = getPanelData();
|
|
8246
|
-
if (data) {
|
|
8247
|
-
if (data.viewId !== this.id) {
|
|
8248
|
-
return false;
|
|
8249
|
-
}
|
|
8250
|
-
if (position === 'center') {
|
|
8251
|
-
// center drop target is only allowed if there are no panels in the grid
|
|
8252
|
-
// floating panels are allowed
|
|
8253
|
-
return this.gridview.length === 0;
|
|
8254
|
-
}
|
|
8255
|
-
return true;
|
|
8256
|
-
}
|
|
8257
|
-
if (position === 'center' && this.gridview.length !== 0) {
|
|
8258
|
-
/**
|
|
8259
|
-
* for external events only show the four-corner drag overlays, disable
|
|
8260
|
-
* the center position so that external drag events can fall through to the group
|
|
8261
|
-
* and panel drop target handlers
|
|
8262
|
-
*/
|
|
8263
|
-
return false;
|
|
8264
|
-
}
|
|
8265
|
-
const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
|
|
8266
|
-
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
8267
|
-
return firedEvent.isAccepted;
|
|
8268
|
-
},
|
|
8269
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
8270
|
-
overlayModel: (_c = this.options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
8271
|
-
getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
8272
|
-
});
|
|
8273
|
-
this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
8274
|
+
}), this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
8274
8275
|
if (this.gridview.length > 0 && event.position === 'center') {
|
|
8275
8276
|
// option only available when no panels in primary grid
|
|
8276
8277
|
return;
|
|
@@ -8321,8 +8322,6 @@ define(['exports'], (function (exports) { 'use strict';
|
|
|
8321
8322
|
}));
|
|
8322
8323
|
}
|
|
8323
8324
|
}), this._rootDropTarget);
|
|
8324
|
-
this._api = new DockviewApi(this);
|
|
8325
|
-
this.updateWatermark();
|
|
8326
8325
|
}
|
|
8327
8326
|
setVisible(panel, visible) {
|
|
8328
8327
|
switch (panel.api.location.type) {
|