dockview-core 4.4.0 → 4.4.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/tab/tab.d.ts +1 -0
- package/dist/cjs/dockview/components/tab/tab.js +4 -1
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +1 -0
- package/dist/cjs/dockview/components/titlebar/tabs.js +16 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +2 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +4 -0
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +1 -0
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +4 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +1 -0
- package/dist/cjs/dockview/dockviewComponent.js +53 -31
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +10 -8
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +3 -0
- package/dist/dockview-core.amd.js +32 -3
- 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 +32 -3
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +32 -3
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +32 -3
- 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 +32 -3
- 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 +32 -3
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/dockview/components/tab/tab.d.ts +1 -0
- package/dist/esm/dockview/components/tab/tab.js +4 -1
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +1 -0
- package/dist/esm/dockview/components/titlebar/tabs.js +5 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +2 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +4 -0
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +1 -0
- package/dist/esm/dockview/components/titlebar/voidContainer.js +4 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +1 -0
- package/dist/esm/dockview/dockviewComponent.js +11 -0
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +10 -8
- package/dist/esm/dockview/dockviewGroupPanelModel.js +3 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 4.4.
|
|
3
|
+
* @version 4.4.1
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -5023,7 +5023,7 @@ class Tab extends CompositeDisposable {
|
|
|
5023
5023
|
this._element = document.createElement('div');
|
|
5024
5024
|
this._element.className = 'dv-tab';
|
|
5025
5025
|
this._element.tabIndex = 0;
|
|
5026
|
-
this._element.draggable =
|
|
5026
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5027
5027
|
toggleClass(this.element, 'dv-inactive-tab', true);
|
|
5028
5028
|
const dragHandler = new TabDragHandler(this._element, this.accessor, this.group, this.panel);
|
|
5029
5029
|
this.dropTarget = new Droptarget(this._element, {
|
|
@@ -5071,6 +5071,9 @@ class Tab extends CompositeDisposable {
|
|
|
5071
5071
|
this.content = part;
|
|
5072
5072
|
this._element.appendChild(this.content.element);
|
|
5073
5073
|
}
|
|
5074
|
+
updateDragAndDropState() {
|
|
5075
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5076
|
+
}
|
|
5074
5077
|
dispose() {
|
|
5075
5078
|
super.dispose();
|
|
5076
5079
|
}
|
|
@@ -5142,7 +5145,7 @@ class VoidContainer extends CompositeDisposable {
|
|
|
5142
5145
|
this.onDragStart = this._onDragStart.event;
|
|
5143
5146
|
this._element = document.createElement('div');
|
|
5144
5147
|
this._element.className = 'dv-void-container';
|
|
5145
|
-
this._element.draggable =
|
|
5148
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5146
5149
|
this.addDisposables(this._onDrop, this._onDragStart, addDisposableListener(this._element, 'pointerdown', () => {
|
|
5147
5150
|
this.accessor.doSetGroupActive(this.group);
|
|
5148
5151
|
}));
|
|
@@ -5165,6 +5168,9 @@ class VoidContainer extends CompositeDisposable {
|
|
|
5165
5168
|
this._onDrop.fire(event);
|
|
5166
5169
|
}), this.dropTarget);
|
|
5167
5170
|
}
|
|
5171
|
+
updateDragAndDropState() {
|
|
5172
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5173
|
+
}
|
|
5168
5174
|
}
|
|
5169
5175
|
|
|
5170
5176
|
class Scrollbar extends CompositeDisposable {
|
|
@@ -5425,6 +5431,11 @@ class Tabs extends CompositeDisposable {
|
|
|
5425
5431
|
.map((x) => x.value.panel.id);
|
|
5426
5432
|
this._onOverflowTabsChange.fire({ tabs, reset: options.reset });
|
|
5427
5433
|
}
|
|
5434
|
+
updateDragAndDropState() {
|
|
5435
|
+
for (const tab of this._tabs) {
|
|
5436
|
+
tab.value.updateDragAndDropState();
|
|
5437
|
+
}
|
|
5438
|
+
}
|
|
5428
5439
|
}
|
|
5429
5440
|
|
|
5430
5441
|
const createSvgElementFromPath = (params) => {
|
|
@@ -5697,6 +5708,10 @@ class TabsContainer extends CompositeDisposable {
|
|
|
5697
5708
|
});
|
|
5698
5709
|
}));
|
|
5699
5710
|
}
|
|
5711
|
+
updateDragAndDropState() {
|
|
5712
|
+
this.tabs.updateDragAndDropState();
|
|
5713
|
+
this.voidContainer.updateDragAndDropState();
|
|
5714
|
+
}
|
|
5700
5715
|
}
|
|
5701
5716
|
|
|
5702
5717
|
class DockviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
@@ -6402,6 +6417,9 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
6402
6417
|
}));
|
|
6403
6418
|
}
|
|
6404
6419
|
}
|
|
6420
|
+
updateDragAndDropState() {
|
|
6421
|
+
this.tabsContainer.updateDragAndDropState();
|
|
6422
|
+
}
|
|
6405
6423
|
dispose() {
|
|
6406
6424
|
var _a, _b, _c;
|
|
6407
6425
|
super.dispose();
|
|
@@ -8874,7 +8892,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
8874
8892
|
}
|
|
8875
8893
|
}
|
|
8876
8894
|
this.updateDropTargetModel(options);
|
|
8895
|
+
const oldDisableDnd = this.options.disableDnd;
|
|
8877
8896
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
8897
|
+
const newDisableDnd = this.options.disableDnd;
|
|
8898
|
+
if (oldDisableDnd !== newDisableDnd) {
|
|
8899
|
+
this.updateDragAndDropState();
|
|
8900
|
+
}
|
|
8878
8901
|
if ('theme' in options) {
|
|
8879
8902
|
this.updateTheme();
|
|
8880
8903
|
}
|
|
@@ -8889,6 +8912,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
8889
8912
|
}
|
|
8890
8913
|
}
|
|
8891
8914
|
}
|
|
8915
|
+
updateDragAndDropState() {
|
|
8916
|
+
// Update draggable state for all tabs and void containers
|
|
8917
|
+
for (const group of this.groups) {
|
|
8918
|
+
group.model.updateDragAndDropState();
|
|
8919
|
+
}
|
|
8920
|
+
}
|
|
8892
8921
|
focus() {
|
|
8893
8922
|
var _a;
|
|
8894
8923
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|