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
|
@@ -58,7 +58,7 @@ export class TabsContainer extends CompositeDisposable {
|
|
|
58
58
|
this._element.appendChild(this.leftActionsContainer);
|
|
59
59
|
this._element.appendChild(this.voidContainer.element);
|
|
60
60
|
this._element.appendChild(this.rightActionsContainer);
|
|
61
|
-
this.addDisposables(accessor.onDidOptionsChange(() => {
|
|
61
|
+
this.addDisposables(this.tabs.onDrop((e) => this._onDrop.fire(e)), this.tabs.onWillShowOverlay((e) => this._onWillShowOverlay.fire(e)), accessor.onDidOptionsChange(() => {
|
|
62
62
|
this.tabs.showTabsOverflowControl =
|
|
63
63
|
!accessor.options.disableTabsOverflowList;
|
|
64
64
|
}), this.tabs.onOverflowTabsChange((event) => {
|
|
@@ -128,13 +128,48 @@ export class DockviewComponent extends BaseGrid {
|
|
|
128
128
|
this._onDidActiveGroupChange = new Emitter();
|
|
129
129
|
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
130
130
|
this._moving = false;
|
|
131
|
+
this._options = options;
|
|
131
132
|
this.popupService = new PopupService(this.element);
|
|
132
|
-
this.updateDropTargetModel(options);
|
|
133
133
|
this._themeClassnames = new Classnames(this.element);
|
|
134
|
+
this._api = new DockviewApi(this);
|
|
134
135
|
this.rootDropTargetContainer = new DropTargetAnchorContainer(this.element, { disabled: true });
|
|
135
136
|
this.overlayRenderContainer = new OverlayRenderContainer(this.gridview.element, this);
|
|
137
|
+
this._rootDropTarget = new Droptarget(this.element, {
|
|
138
|
+
className: 'dv-drop-target-edge',
|
|
139
|
+
canDisplayOverlay: (event, position) => {
|
|
140
|
+
const data = getPanelData();
|
|
141
|
+
if (data) {
|
|
142
|
+
if (data.viewId !== this.id) {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
if (position === 'center') {
|
|
146
|
+
// center drop target is only allowed if there are no panels in the grid
|
|
147
|
+
// floating panels are allowed
|
|
148
|
+
return this.gridview.length === 0;
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
if (position === 'center' && this.gridview.length !== 0) {
|
|
153
|
+
/**
|
|
154
|
+
* for external events only show the four-corner drag overlays, disable
|
|
155
|
+
* the center position so that external drag events can fall through to the group
|
|
156
|
+
* and panel drop target handlers
|
|
157
|
+
*/
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
|
|
161
|
+
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
162
|
+
return firedEvent.isAccepted;
|
|
163
|
+
},
|
|
164
|
+
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
165
|
+
overlayModel: (_c = options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
166
|
+
getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
167
|
+
});
|
|
168
|
+
this.updateDropTargetModel(options);
|
|
136
169
|
toggleClass(this.gridview.element, 'dv-dockview', true);
|
|
137
170
|
toggleClass(this.element, 'dv-debug', !!options.debug);
|
|
171
|
+
this.updateTheme();
|
|
172
|
+
this.updateWatermark();
|
|
138
173
|
if (options.debug) {
|
|
139
174
|
this.addDisposables(new StrictEventsSequencing(this));
|
|
140
175
|
}
|
|
@@ -170,41 +205,7 @@ export class DockviewComponent extends BaseGrid {
|
|
|
170
205
|
for (const group of [...this._popoutGroups]) {
|
|
171
206
|
group.disposable.dispose();
|
|
172
207
|
}
|
|
173
|
-
}))
|
|
174
|
-
this._options = options;
|
|
175
|
-
this.updateTheme();
|
|
176
|
-
this._rootDropTarget = new Droptarget(this.element, {
|
|
177
|
-
className: 'dv-drop-target-edge',
|
|
178
|
-
canDisplayOverlay: (event, position) => {
|
|
179
|
-
const data = getPanelData();
|
|
180
|
-
if (data) {
|
|
181
|
-
if (data.viewId !== this.id) {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
if (position === 'center') {
|
|
185
|
-
// center drop target is only allowed if there are no panels in the grid
|
|
186
|
-
// floating panels are allowed
|
|
187
|
-
return this.gridview.length === 0;
|
|
188
|
-
}
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
if (position === 'center' && this.gridview.length !== 0) {
|
|
192
|
-
/**
|
|
193
|
-
* for external events only show the four-corner drag overlays, disable
|
|
194
|
-
* the center position so that external drag events can fall through to the group
|
|
195
|
-
* and panel drop target handlers
|
|
196
|
-
*/
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
const firedEvent = new DockviewUnhandledDragOverEvent(event, 'edge', position, getPanelData);
|
|
200
|
-
this._onUnhandledDragOverEvent.fire(firedEvent);
|
|
201
|
-
return firedEvent.isAccepted;
|
|
202
|
-
},
|
|
203
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
204
|
-
overlayModel: (_c = this.options.rootOverlayModel) !== null && _c !== void 0 ? _c : DEFAULT_ROOT_OVERLAY_MODEL,
|
|
205
|
-
getOverrideTarget: () => { var _a; return (_a = this.rootDropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
206
|
-
});
|
|
207
|
-
this.addDisposables(this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
208
|
+
}), this._rootDropTarget, this._rootDropTarget.onWillShowOverlay((event) => {
|
|
208
209
|
if (this.gridview.length > 0 && event.position === 'center') {
|
|
209
210
|
// option only available when no panels in primary grid
|
|
210
211
|
return;
|
|
@@ -255,8 +256,6 @@ export class DockviewComponent extends BaseGrid {
|
|
|
255
256
|
}));
|
|
256
257
|
}
|
|
257
258
|
}), this._rootDropTarget);
|
|
258
|
-
this._api = new DockviewApi(this);
|
|
259
|
-
this.updateWatermark();
|
|
260
259
|
}
|
|
261
260
|
setVisible(panel, visible) {
|
|
262
261
|
switch (panel.api.location.type) {
|
package/dist/styles/dockview.css
CHANGED
|
@@ -248,10 +248,10 @@
|
|
|
248
248
|
opacity: 0;
|
|
249
249
|
transition: none;
|
|
250
250
|
}
|
|
251
|
-
.dockview-theme-dracula .dv-groupview.dv-active-group > .dv-tabs-and-actions-container
|
|
251
|
+
.dockview-theme-dracula .dv-groupview.dv-active-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-active-tab {
|
|
252
252
|
position: relative;
|
|
253
253
|
}
|
|
254
|
-
.dockview-theme-dracula .dv-groupview.dv-active-group > .dv-tabs-and-actions-container
|
|
254
|
+
.dockview-theme-dracula .dv-groupview.dv-active-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-active-tab::after {
|
|
255
255
|
position: absolute;
|
|
256
256
|
left: 0px;
|
|
257
257
|
top: 0px;
|
|
@@ -261,10 +261,10 @@
|
|
|
261
261
|
background-color: #94527e;
|
|
262
262
|
z-index: 999;
|
|
263
263
|
}
|
|
264
|
-
.dockview-theme-dracula .dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container
|
|
264
|
+
.dockview-theme-dracula .dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-active-tab {
|
|
265
265
|
position: relative;
|
|
266
266
|
}
|
|
267
|
-
.dockview-theme-dracula .dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container
|
|
267
|
+
.dockview-theme-dracula .dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-active-tab::after {
|
|
268
268
|
position: absolute;
|
|
269
269
|
left: 0px;
|
|
270
270
|
bottom: 0px;
|
|
@@ -646,19 +646,19 @@
|
|
|
646
646
|
position: relative;
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
-
.dv-groupview.dv-active-group > .dv-tabs-and-actions-container
|
|
649
|
+
.dv-groupview.dv-active-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-active-tab {
|
|
650
650
|
background-color: var(--dv-activegroup-visiblepanel-tab-background-color);
|
|
651
651
|
color: var(--dv-activegroup-visiblepanel-tab-color);
|
|
652
652
|
}
|
|
653
|
-
.dv-groupview.dv-active-group > .dv-tabs-and-actions-container
|
|
653
|
+
.dv-groupview.dv-active-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-inactive-tab {
|
|
654
654
|
background-color: var(--dv-activegroup-hiddenpanel-tab-background-color);
|
|
655
655
|
color: var(--dv-activegroup-hiddenpanel-tab-color);
|
|
656
656
|
}
|
|
657
|
-
.dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container
|
|
657
|
+
.dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-active-tab {
|
|
658
658
|
background-color: var(--dv-inactivegroup-visiblepanel-tab-background-color);
|
|
659
659
|
color: var(--dv-inactivegroup-visiblepanel-tab-color);
|
|
660
660
|
}
|
|
661
|
-
.dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container
|
|
661
|
+
.dv-groupview.dv-inactive-group > .dv-tabs-and-actions-container .dv-tabs-container > .dv-tab.dv-inactive-tab {
|
|
662
662
|
background-color: var(--dv-inactivegroup-hiddenpanel-tab-background-color);
|
|
663
663
|
color: var(--dv-inactivegroup-hiddenpanel-tab-color);
|
|
664
664
|
}
|