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
|
*/
|
|
@@ -4997,7 +4997,7 @@
|
|
|
4997
4997
|
this._element = document.createElement('div');
|
|
4998
4998
|
this._element.className = 'dv-tab';
|
|
4999
4999
|
this._element.tabIndex = 0;
|
|
5000
|
-
this._element.draggable =
|
|
5000
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5001
5001
|
toggleClass(this.element, 'dv-inactive-tab', true);
|
|
5002
5002
|
const dragHandler = new TabDragHandler(this._element, this.accessor, this.group, this.panel);
|
|
5003
5003
|
this.dropTarget = new Droptarget(this._element, {
|
|
@@ -5045,6 +5045,9 @@
|
|
|
5045
5045
|
this.content = part;
|
|
5046
5046
|
this._element.appendChild(this.content.element);
|
|
5047
5047
|
}
|
|
5048
|
+
updateDragAndDropState() {
|
|
5049
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5050
|
+
}
|
|
5048
5051
|
dispose() {
|
|
5049
5052
|
super.dispose();
|
|
5050
5053
|
}
|
|
@@ -5116,7 +5119,7 @@
|
|
|
5116
5119
|
this.onDragStart = this._onDragStart.event;
|
|
5117
5120
|
this._element = document.createElement('div');
|
|
5118
5121
|
this._element.className = 'dv-void-container';
|
|
5119
|
-
this._element.draggable =
|
|
5122
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5120
5123
|
this.addDisposables(this._onDrop, this._onDragStart, addDisposableListener(this._element, 'pointerdown', () => {
|
|
5121
5124
|
this.accessor.doSetGroupActive(this.group);
|
|
5122
5125
|
}));
|
|
@@ -5139,6 +5142,9 @@
|
|
|
5139
5142
|
this._onDrop.fire(event);
|
|
5140
5143
|
}), this.dropTarget);
|
|
5141
5144
|
}
|
|
5145
|
+
updateDragAndDropState() {
|
|
5146
|
+
this._element.draggable = !this.accessor.options.disableDnd;
|
|
5147
|
+
}
|
|
5142
5148
|
}
|
|
5143
5149
|
|
|
5144
5150
|
class Scrollbar extends CompositeDisposable {
|
|
@@ -5399,6 +5405,11 @@
|
|
|
5399
5405
|
.map((x) => x.value.panel.id);
|
|
5400
5406
|
this._onOverflowTabsChange.fire({ tabs, reset: options.reset });
|
|
5401
5407
|
}
|
|
5408
|
+
updateDragAndDropState() {
|
|
5409
|
+
for (const tab of this._tabs) {
|
|
5410
|
+
tab.value.updateDragAndDropState();
|
|
5411
|
+
}
|
|
5412
|
+
}
|
|
5402
5413
|
}
|
|
5403
5414
|
|
|
5404
5415
|
const createSvgElementFromPath = (params) => {
|
|
@@ -5671,6 +5682,10 @@
|
|
|
5671
5682
|
});
|
|
5672
5683
|
}));
|
|
5673
5684
|
}
|
|
5685
|
+
updateDragAndDropState() {
|
|
5686
|
+
this.tabs.updateDragAndDropState();
|
|
5687
|
+
this.voidContainer.updateDragAndDropState();
|
|
5688
|
+
}
|
|
5674
5689
|
}
|
|
5675
5690
|
|
|
5676
5691
|
class DockviewUnhandledDragOverEvent extends AcceptableEvent {
|
|
@@ -6376,6 +6391,9 @@
|
|
|
6376
6391
|
}));
|
|
6377
6392
|
}
|
|
6378
6393
|
}
|
|
6394
|
+
updateDragAndDropState() {
|
|
6395
|
+
this.tabsContainer.updateDragAndDropState();
|
|
6396
|
+
}
|
|
6379
6397
|
dispose() {
|
|
6380
6398
|
var _a, _b, _c;
|
|
6381
6399
|
super.dispose();
|
|
@@ -8848,7 +8866,12 @@
|
|
|
8848
8866
|
}
|
|
8849
8867
|
}
|
|
8850
8868
|
this.updateDropTargetModel(options);
|
|
8869
|
+
const oldDisableDnd = this.options.disableDnd;
|
|
8851
8870
|
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
8871
|
+
const newDisableDnd = this.options.disableDnd;
|
|
8872
|
+
if (oldDisableDnd !== newDisableDnd) {
|
|
8873
|
+
this.updateDragAndDropState();
|
|
8874
|
+
}
|
|
8852
8875
|
if ('theme' in options) {
|
|
8853
8876
|
this.updateTheme();
|
|
8854
8877
|
}
|
|
@@ -8863,6 +8886,12 @@
|
|
|
8863
8886
|
}
|
|
8864
8887
|
}
|
|
8865
8888
|
}
|
|
8889
|
+
updateDragAndDropState() {
|
|
8890
|
+
// Update draggable state for all tabs and void containers
|
|
8891
|
+
for (const group of this.groups) {
|
|
8892
|
+
group.model.updateDragAndDropState();
|
|
8893
|
+
}
|
|
8894
|
+
}
|
|
8866
8895
|
focus() {
|
|
8867
8896
|
var _a;
|
|
8868
8897
|
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|