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
|
*/
|
|
@@ -5021,7 +5021,7 @@ class Tab extends CompositeDisposable {
|
|
|
5021
5021
|
this._element = document.createElement('div');
|
|
5022
5022
|
this._element.className = 'dv-tab';
|
|
5023
5023
|
this._element.tabIndex = 0;
|
|
5024
|
-
this._element.draggable =
|
|
5024
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5025
5025
|
toggleClass(this.element, 'dv-inactive-tab', true);
|
|
5026
5026
|
const dragHandler = new TabDragHandler(this._element, this.accessor, this.group, this.panel);
|
|
5027
5027
|
this.dropTarget = new Droptarget(this._element, {
|
|
@@ -5069,6 +5069,9 @@ class Tab extends CompositeDisposable {
|
|
|
5069
5069
|
this.content = part;
|
|
5070
5070
|
this._element.appendChild(this.content.element);
|
|
5071
5071
|
}
|
|
5072
|
+
updateDragAndDropState() {
|
|
5073
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5074
|
+
}
|
|
5072
5075
|
dispose() {
|
|
5073
5076
|
super.dispose();
|
|
5074
5077
|
}
|
|
@@ -5140,7 +5143,7 @@ class VoidContainer extends CompositeDisposable {
|
|
|
5140
5143
|
this.onDragStart = this._onDragStart.event;
|
|
5141
5144
|
this._element = document.createElement('div');
|
|
5142
5145
|
this._element.className = 'dv-void-container';
|
|
5143
|
-
this._element.draggable =
|
|
5146
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5144
5147
|
this.addDisposables(this._onDrop, this._onDragStart, addDisposableListener(this._element, 'pointerdown', () => {
|
|
5145
5148
|
this.accessor.doSetGroupActive(this.group);
|
|
5146
5149
|
}));
|
|
@@ -5163,6 +5166,9 @@ class VoidContainer extends CompositeDisposable {
|
|
|
5163
5166
|
this._onDrop.fire(event);
|
|
5164
5167
|
}), this.dropTarget);
|
|
5165
5168
|
}
|
|
5169
|
+
updateDragAndDropState() {
|
|
5170
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5171
|
+
}
|
|
5166
5172
|
}
|
|
5167
5173
|
|
|
5168
5174
|
class Scrollbar extends CompositeDisposable {
|
|
@@ -5423,6 +5429,11 @@ class Tabs extends CompositeDisposable {
|
|
|
5423
5429
|
.map((x) => x.value.panel.id);
|
|
5424
5430
|
this._onOverflowTabsChange.fire({ tabs, reset: options.reset });
|
|
5425
5431
|
}
|
|
5432
|
+
updateDragAndDropState() {
|
|
5433
|
+
for (const tab of this._tabs) {
|
|
5434
|
+
tab.value.updateDragAndDropState();
|
|
5435
|
+
}
|
|
5436
|
+
}
|
|
5426
5437
|
}
|
|
5427
5438
|
|
|
5428
5439
|
const createSvgElementFromPath = (params) => {
|
|
@@ -5695,6 +5706,10 @@ class TabsContainer extends CompositeDisposable {
|
|
|
5695
5706
|
});
|
|
5696
5707
|
}));
|
|
5697
5708
|
}
|
|
5709
|
+
updateDragAndDropState() {
|
|
5710
|
+
this.tabs.updateDragAndDropState();
|
|
5711
|
+
this.voidContainer.updateDragAndDropState();
|
|
5712
|
+
}
|
|
5698
5713
|
}
|
|
5699
5714
|
|
|
5700
5715
|
class DockviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
@@ -6400,6 +6415,9 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
6400
6415
|
}));
|
|
6401
6416
|
}
|
|
6402
6417
|
}
|
|
6418
|
+
updateDragAndDropState() {
|
|
6419
|
+
this.tabsContainer.updateDragAndDropState();
|
|
6420
|
+
}
|
|
6403
6421
|
dispose() {
|
|
6404
6422
|
var _a, _b, _c;
|
|
6405
6423
|
super.dispose();
|
|
@@ -8872,7 +8890,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
8872
8890
|
}
|
|
8873
8891
|
}
|
|
8874
8892
|
this.updateDropTargetModel(options);
|
|
8893
|
+
const oldDisableDnd = this.options.disableDnd;
|
|
8875
8894
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
8895
|
+
const newDisableDnd = this.options.disableDnd;
|
|
8896
|
+
if (oldDisableDnd !== newDisableDnd) {
|
|
8897
|
+
this.updateDragAndDropState();
|
|
8898
|
+
}
|
|
8876
8899
|
if ('theme' in options) {
|
|
8877
8900
|
this.updateTheme();
|
|
8878
8901
|
}
|
|
@@ -8887,6 +8910,12 @@ class DockviewComponent extends BaseGrid {
|
|
|
8887
8910
|
}
|
|
8888
8911
|
}
|
|
8889
8912
|
}
|
|
8913
|
+
updateDragAndDropState() {
|
|
8914
|
+
// Update draggable state for all tabs and void containers
|
|
8915
|
+
for (const group of this.groups) {
|
|
8916
|
+
group.model.updateDragAndDropState();
|
|
8917
|
+
}
|
|
8918
|
+
}
|
|
8890
8919
|
focus() {
|
|
8891
8920
|
var _a;
|
|
8892
8921
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|