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.
Files changed (47) hide show
  1. package/dist/cjs/dockview/components/tab/tab.d.ts +1 -0
  2. package/dist/cjs/dockview/components/tab/tab.js +4 -1
  3. package/dist/cjs/dockview/components/titlebar/tabs.d.ts +1 -0
  4. package/dist/cjs/dockview/components/titlebar/tabs.js +16 -0
  5. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +2 -0
  6. package/dist/cjs/dockview/components/titlebar/tabsContainer.js +4 -0
  7. package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +1 -0
  8. package/dist/cjs/dockview/components/titlebar/voidContainer.js +4 -1
  9. package/dist/cjs/dockview/dockviewComponent.d.ts +1 -0
  10. package/dist/cjs/dockview/dockviewComponent.js +53 -31
  11. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +10 -8
  12. package/dist/cjs/dockview/dockviewGroupPanelModel.js +3 -0
  13. package/dist/dockview-core.amd.js +32 -3
  14. package/dist/dockview-core.amd.js.map +1 -1
  15. package/dist/dockview-core.amd.min.js +2 -2
  16. package/dist/dockview-core.amd.min.js.map +1 -1
  17. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  18. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  19. package/dist/dockview-core.amd.noStyle.js +32 -3
  20. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  21. package/dist/dockview-core.cjs.js +32 -3
  22. package/dist/dockview-core.cjs.js.map +1 -1
  23. package/dist/dockview-core.esm.js +32 -3
  24. package/dist/dockview-core.esm.js.map +1 -1
  25. package/dist/dockview-core.esm.min.js +2 -2
  26. package/dist/dockview-core.esm.min.js.map +1 -1
  27. package/dist/dockview-core.js +32 -3
  28. package/dist/dockview-core.js.map +1 -1
  29. package/dist/dockview-core.min.js +2 -2
  30. package/dist/dockview-core.min.js.map +1 -1
  31. package/dist/dockview-core.min.noStyle.js +2 -2
  32. package/dist/dockview-core.min.noStyle.js.map +1 -1
  33. package/dist/dockview-core.noStyle.js +32 -3
  34. package/dist/dockview-core.noStyle.js.map +1 -1
  35. package/dist/esm/dockview/components/tab/tab.d.ts +1 -0
  36. package/dist/esm/dockview/components/tab/tab.js +4 -1
  37. package/dist/esm/dockview/components/titlebar/tabs.d.ts +1 -0
  38. package/dist/esm/dockview/components/titlebar/tabs.js +5 -0
  39. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +2 -0
  40. package/dist/esm/dockview/components/titlebar/tabsContainer.js +4 -0
  41. package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +1 -0
  42. package/dist/esm/dockview/components/titlebar/voidContainer.js +4 -1
  43. package/dist/esm/dockview/dockviewComponent.d.ts +1 -0
  44. package/dist/esm/dockview/dockviewComponent.js +11 -0
  45. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +10 -8
  46. package/dist/esm/dockview/dockviewGroupPanelModel.js +3 -0
  47. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 4.4.0
3
+ * @version 4.4.1
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -5027,7 +5027,7 @@
5027
5027
  this._element = document.createElement('div');
5028
5028
  this._element.className = 'dv-tab';
5029
5029
  this._element.tabIndex = 0;
5030
- this._element.draggable = true;
5030
+ this._element.draggable = !this.accessor.options.disableDnd;
5031
5031
  toggleClass(this.element, 'dv-inactive-tab', true);
5032
5032
  const dragHandler = new TabDragHandler(this._element, this.accessor, this.group, this.panel);
5033
5033
  this.dropTarget = new Droptarget(this._element, {
@@ -5075,6 +5075,9 @@
5075
5075
  this.content = part;
5076
5076
  this._element.appendChild(this.content.element);
5077
5077
  }
5078
+ updateDragAndDropState() {
5079
+ this._element.draggable = !this.accessor.options.disableDnd;
5080
+ }
5078
5081
  dispose() {
5079
5082
  super.dispose();
5080
5083
  }
@@ -5146,7 +5149,7 @@
5146
5149
  this.onDragStart = this._onDragStart.event;
5147
5150
  this._element = document.createElement('div');
5148
5151
  this._element.className = 'dv-void-container';
5149
- this._element.draggable = true;
5152
+ this._element.draggable = !this.accessor.options.disableDnd;
5150
5153
  this.addDisposables(this._onDrop, this._onDragStart, addDisposableListener(this._element, 'pointerdown', () => {
5151
5154
  this.accessor.doSetGroupActive(this.group);
5152
5155
  }));
@@ -5169,6 +5172,9 @@
5169
5172
  this._onDrop.fire(event);
5170
5173
  }), this.dropTarget);
5171
5174
  }
5175
+ updateDragAndDropState() {
5176
+ this._element.draggable = !this.accessor.options.disableDnd;
5177
+ }
5172
5178
  }
5173
5179
 
5174
5180
  class Scrollbar extends CompositeDisposable {
@@ -5429,6 +5435,11 @@
5429
5435
  .map((x) => x.value.panel.id);
5430
5436
  this._onOverflowTabsChange.fire({ tabs, reset: options.reset });
5431
5437
  }
5438
+ updateDragAndDropState() {
5439
+ for (const tab of this._tabs) {
5440
+ tab.value.updateDragAndDropState();
5441
+ }
5442
+ }
5432
5443
  }
5433
5444
 
5434
5445
  const createSvgElementFromPath = (params) => {
@@ -5701,6 +5712,10 @@
5701
5712
  });
5702
5713
  }));
5703
5714
  }
5715
+ updateDragAndDropState() {
5716
+ this.tabs.updateDragAndDropState();
5717
+ this.voidContainer.updateDragAndDropState();
5718
+ }
5704
5719
  }
5705
5720
 
5706
5721
  class DockviewUnhandledDragOverEvent extends AcceptableEvent {
@@ -6406,6 +6421,9 @@
6406
6421
  }));
6407
6422
  }
6408
6423
  }
6424
+ updateDragAndDropState() {
6425
+ this.tabsContainer.updateDragAndDropState();
6426
+ }
6409
6427
  dispose() {
6410
6428
  var _a, _b, _c;
6411
6429
  super.dispose();
@@ -8878,7 +8896,12 @@
8878
8896
  }
8879
8897
  }
8880
8898
  this.updateDropTargetModel(options);
8899
+ const oldDisableDnd = this.options.disableDnd;
8881
8900
  this._options = Object.assign(Object.assign({}, this.options), options);
8901
+ const newDisableDnd = this.options.disableDnd;
8902
+ if (oldDisableDnd !== newDisableDnd) {
8903
+ this.updateDragAndDropState();
8904
+ }
8882
8905
  if ('theme' in options) {
8883
8906
  this.updateTheme();
8884
8907
  }
@@ -8893,6 +8916,12 @@
8893
8916
  }
8894
8917
  }
8895
8918
  }
8919
+ updateDragAndDropState() {
8920
+ // Update draggable state for all tabs and void containers
8921
+ for (const group of this.groups) {
8922
+ group.model.updateDragAndDropState();
8923
+ }
8924
+ }
8896
8925
  focus() {
8897
8926
  var _a;
8898
8927
  (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();