dockview-core 4.4.1 → 4.6.0

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 (56) hide show
  1. package/dist/cjs/api/component.api.d.ts +2 -1
  2. package/dist/cjs/api/dockviewGroupPanelApi.d.ts +4 -0
  3. package/dist/cjs/api/dockviewGroupPanelApi.js +4 -3
  4. package/dist/cjs/api/dockviewPanelApi.js +1 -0
  5. package/dist/cjs/dockview/components/titlebar/tabs.d.ts +1 -1
  6. package/dist/cjs/dockview/components/titlebar/tabs.js +2 -2
  7. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +1 -1
  8. package/dist/cjs/dockview/components/titlebar/tabsContainer.js +6 -3
  9. package/dist/cjs/dockview/components/titlebar/voidContainer.js +3 -0
  10. package/dist/cjs/dockview/dockviewComponent.d.ts +4 -1
  11. package/dist/cjs/dockview/dockviewComponent.js +91 -7
  12. package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +3 -24
  13. package/dist/cjs/dockview/dockviewGroupPanelModel.js +3 -65
  14. package/dist/cjs/dockview/events.d.ts +28 -0
  15. package/dist/cjs/dockview/events.js +66 -0
  16. package/dist/cjs/dockview/options.d.ts +2 -1
  17. package/dist/dockview-core.amd.js +141 -49
  18. package/dist/dockview-core.amd.js.map +1 -1
  19. package/dist/dockview-core.amd.min.js +2 -2
  20. package/dist/dockview-core.amd.min.js.map +1 -1
  21. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  22. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  23. package/dist/dockview-core.amd.noStyle.js +140 -48
  24. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  25. package/dist/dockview-core.cjs.js +141 -49
  26. package/dist/dockview-core.cjs.js.map +1 -1
  27. package/dist/dockview-core.esm.js +142 -49
  28. package/dist/dockview-core.esm.js.map +1 -1
  29. package/dist/dockview-core.esm.min.js +2 -2
  30. package/dist/dockview-core.esm.min.js.map +1 -1
  31. package/dist/dockview-core.js +141 -49
  32. package/dist/dockview-core.js.map +1 -1
  33. package/dist/dockview-core.min.js +2 -2
  34. package/dist/dockview-core.min.js.map +1 -1
  35. package/dist/dockview-core.min.noStyle.js +2 -2
  36. package/dist/dockview-core.min.noStyle.js.map +1 -1
  37. package/dist/dockview-core.noStyle.js +140 -48
  38. package/dist/dockview-core.noStyle.js.map +1 -1
  39. package/dist/esm/api/component.api.d.ts +2 -1
  40. package/dist/esm/api/dockviewGroupPanelApi.d.ts +4 -0
  41. package/dist/esm/api/dockviewGroupPanelApi.js +4 -3
  42. package/dist/esm/api/dockviewPanelApi.js +1 -0
  43. package/dist/esm/dockview/components/titlebar/tabs.d.ts +1 -1
  44. package/dist/esm/dockview/components/titlebar/tabs.js +1 -1
  45. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +1 -1
  46. package/dist/esm/dockview/components/titlebar/tabsContainer.js +5 -2
  47. package/dist/esm/dockview/components/titlebar/voidContainer.js +3 -0
  48. package/dist/esm/dockview/dockviewComponent.d.ts +4 -1
  49. package/dist/esm/dockview/dockviewComponent.js +96 -10
  50. package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +3 -24
  51. package/dist/esm/dockview/dockviewGroupPanelModel.js +1 -33
  52. package/dist/esm/dockview/events.d.ts +28 -0
  53. package/dist/esm/dockview/events.js +33 -0
  54. package/dist/esm/dockview/options.d.ts +2 -1
  55. package/dist/styles/dockview.css +5 -0
  56. package/package.json +4 -5
@@ -15,7 +15,8 @@ import { IDockviewPanel } from '../dockview/dockviewPanel';
15
15
  import { PaneviewDidDropEvent } from '../paneview/draggablePaneviewPanel';
16
16
  import { GroupDragEvent, TabDragEvent } from '../dockview/components/titlebar/tabsContainer';
17
17
  import { Box } from '../types';
18
- import { DockviewDidDropEvent, DockviewWillDropEvent, WillShowOverlayLocationEvent } from '../dockview/dockviewGroupPanelModel';
18
+ import { DockviewDidDropEvent, DockviewWillDropEvent } from '../dockview/dockviewGroupPanelModel';
19
+ import { WillShowOverlayLocationEvent } from '../dockview/events';
19
20
  import { PaneviewComponentOptions, PaneviewDndOverlayEvent } from '../paneview/options';
20
21
  import { SplitviewComponentOptions } from '../splitview/options';
21
22
  import { GridviewComponentOptions } from '../gridview/options';
@@ -11,6 +11,10 @@ export interface DockviewGroupMoveParams {
11
11
  * The index to place the panel within a group, only applicable if the placement is within an existing group
12
12
  */
13
13
  index?: number;
14
+ /**
15
+ * Whether to skip setting the group as active after moving
16
+ */
17
+ skipSetActive?: boolean;
14
18
  }
15
19
  export interface DockviewGroupPanelApi extends GridviewPanelApi {
16
20
  readonly onDidLocationChange: Event<DockviewGroupPanelFloatingChangeEvent>;
@@ -54,23 +54,24 @@ var DockviewGroupPanelApiImpl = /** @class */ (function (_super) {
54
54
  : window;
55
55
  };
56
56
  DockviewGroupPanelApiImpl.prototype.moveTo = function (options) {
57
- var _a, _b, _c;
57
+ var _a, _b, _c, _d;
58
58
  if (!this._group) {
59
59
  throw new Error(NOT_INITIALIZED_MESSAGE);
60
60
  }
61
61
  var group = (_a = options.group) !== null && _a !== void 0 ? _a : this.accessor.addGroup({
62
62
  direction: (0, droptarget_1.positionToDirection)((_b = options.position) !== null && _b !== void 0 ? _b : 'right'),
63
- skipSetActive: true,
63
+ skipSetActive: (_c = options.skipSetActive) !== null && _c !== void 0 ? _c : false,
64
64
  });
65
65
  this.accessor.moveGroupOrPanel({
66
66
  from: { groupId: this._group.id },
67
67
  to: {
68
68
  group: group,
69
69
  position: options.group
70
- ? (_c = options.position) !== null && _c !== void 0 ? _c : 'center'
70
+ ? (_d = options.position) !== null && _d !== void 0 ? _d : 'center'
71
71
  : 'center',
72
72
  index: options.index,
73
73
  },
74
+ skipSetActive: options.skipSetActive,
74
75
  });
75
76
  };
76
77
  DockviewGroupPanelApiImpl.prototype.maximize = function () {
@@ -110,6 +110,7 @@ var DockviewPanelApiImpl = /** @class */ (function (_super) {
110
110
  : 'center',
111
111
  index: options.index,
112
112
  },
113
+ skipSetActive: options.skipSetActive,
113
114
  });
114
115
  };
115
116
  DockviewPanelApiImpl.prototype.setTitle = function (title) {
@@ -2,7 +2,7 @@ import { Event } from '../../../events';
2
2
  import { CompositeDisposable } from '../../../lifecycle';
3
3
  import { DockviewComponent } from '../../dockviewComponent';
4
4
  import { DockviewGroupPanel } from '../../dockviewGroupPanel';
5
- import { WillShowOverlayLocationEvent } from '../../dockviewGroupPanelModel';
5
+ import { WillShowOverlayLocationEvent } from '../../events';
6
6
  import { IDockviewPanel } from '../../dockviewPanel';
7
7
  import { Tab } from '../tab/tab';
8
8
  import { TabDragEvent, TabDropIndexEvent } from './tabsContainer';
@@ -57,7 +57,7 @@ var dom_1 = require("../../../dom");
57
57
  var events_1 = require("../../../events");
58
58
  var lifecycle_1 = require("../../../lifecycle");
59
59
  var scrollbar_1 = require("../../../scrollbar");
60
- var dockviewGroupPanelModel_1 = require("../../dockviewGroupPanelModel");
60
+ var events_2 = require("../../events");
61
61
  var tab_1 = require("../tab/tab");
62
62
  var Tabs = /** @class */ (function (_super) {
63
63
  __extends(Tabs, _super);
@@ -246,7 +246,7 @@ var Tabs = /** @class */ (function (_super) {
246
246
  index: _this._tabs.findIndex(function (x) { return x.value === tab; }),
247
247
  });
248
248
  }), tab.onWillShowOverlay(function (event) {
249
- _this._onWillShowOverlay.fire(new dockviewGroupPanelModel_1.WillShowOverlayLocationEvent(event, {
249
+ _this._onWillShowOverlay.fire(new events_2.WillShowOverlayLocationEvent(event, {
250
250
  kind: 'tab',
251
251
  panel: _this.group.activePanel,
252
252
  api: _this.accessor.api,
@@ -4,7 +4,7 @@ import { Tab } from '../tab/tab';
4
4
  import { DockviewGroupPanel } from '../../dockviewGroupPanel';
5
5
  import { IDockviewPanel } from '../../dockviewPanel';
6
6
  import { DockviewComponent } from '../../dockviewComponent';
7
- import { WillShowOverlayLocationEvent } from '../../dockviewGroupPanelModel';
7
+ import { WillShowOverlayLocationEvent } from '../../events';
8
8
  export interface TabDropIndexEvent {
9
9
  readonly event: DragEvent;
10
10
  readonly index: number;
@@ -31,7 +31,7 @@ var lifecycle_1 = require("../../../lifecycle");
31
31
  var events_1 = require("../../../events");
32
32
  var voidContainer_1 = require("./voidContainer");
33
33
  var dom_1 = require("../../../dom");
34
- var dockviewGroupPanelModel_1 = require("../../dockviewGroupPanelModel");
34
+ var events_2 = require("../../events");
35
35
  var dataTransfer_1 = require("../../../dnd/dataTransfer");
36
36
  var tabs_1 = require("./tabs");
37
37
  var tabOverflowControl_1 = require("./tabOverflowControl");
@@ -85,7 +85,7 @@ var TabsContainer = /** @class */ (function (_super) {
85
85
  index: _this.tabs.size,
86
86
  });
87
87
  }), _this.voidContainer.onWillShowOverlay(function (event) {
88
- _this._onWillShowOverlay.fire(new dockviewGroupPanelModel_1.WillShowOverlayLocationEvent(event, {
88
+ _this._onWillShowOverlay.fire(new events_2.WillShowOverlayLocationEvent(event, {
89
89
  kind: 'header_space',
90
90
  panel: _this.group.activePanel,
91
91
  api: _this.accessor.api,
@@ -264,8 +264,11 @@ var TabsContainer = /** @class */ (function (_super) {
264
264
  (0, dom_1.toggleClass)(wrapper, 'dv-tab', true);
265
265
  (0, dom_1.toggleClass)(wrapper, 'dv-active-tab', panelObject.api.isActive);
266
266
  (0, dom_1.toggleClass)(wrapper, 'dv-inactive-tab', !panelObject.api.isActive);
267
- wrapper.addEventListener('pointerdown', function () {
267
+ wrapper.addEventListener('click', function (event) {
268
268
  _this.accessor.popupService.close();
269
+ if (event.defaultPrevented) {
270
+ return;
271
+ }
269
272
  tab.element.scrollIntoView();
270
273
  tab.panel.api.setActive();
271
274
  });
@@ -21,6 +21,7 @@ var droptarget_1 = require("../../../dnd/droptarget");
21
21
  var groupDragHandler_1 = require("../../../dnd/groupDragHandler");
22
22
  var events_1 = require("../../../events");
23
23
  var lifecycle_1 = require("../../../lifecycle");
24
+ var dom_1 = require("../../../dom");
24
25
  var VoidContainer = /** @class */ (function (_super) {
25
26
  __extends(VoidContainer, _super);
26
27
  function VoidContainer(accessor, group) {
@@ -34,6 +35,7 @@ var VoidContainer = /** @class */ (function (_super) {
34
35
  _this._element = document.createElement('div');
35
36
  _this._element.className = 'dv-void-container';
36
37
  _this._element.draggable = !_this.accessor.options.disableDnd;
38
+ (0, dom_1.toggleClass)(_this._element, 'dv-draggable', !_this.accessor.options.disableDnd);
37
39
  _this.addDisposables(_this._onDrop, _this._onDragStart, (0, events_1.addDisposableListener)(_this._element, 'pointerdown', function () {
38
40
  _this.accessor.doSetGroupActive(_this.group);
39
41
  }));
@@ -66,6 +68,7 @@ var VoidContainer = /** @class */ (function (_super) {
66
68
  });
67
69
  VoidContainer.prototype.updateDragAndDropState = function () {
68
70
  this._element.draggable = !this.accessor.options.disableDnd;
71
+ (0, dom_1.toggleClass)(this._element, 'dv-draggable', !this.accessor.options.disableDnd);
69
72
  };
70
73
  return VoidContainer;
71
74
  }(lifecycle_1.CompositeDisposable));
@@ -7,7 +7,8 @@ import { AddGroupOptions, AddPanelOptions, DockviewComponentOptions, DockviewDnd
7
7
  import { BaseGrid, IBaseGrid } from '../gridview/baseComponentGridview';
8
8
  import { DockviewApi } from '../api/component.api';
9
9
  import { Orientation } from '../splitview/splitview';
10
- import { GroupOptions, GroupPanelViewState, DockviewDidDropEvent, DockviewWillDropEvent, WillShowOverlayLocationEvent } from './dockviewGroupPanelModel';
10
+ import { GroupOptions, GroupPanelViewState, DockviewDidDropEvent, DockviewWillDropEvent } from './dockviewGroupPanelModel';
11
+ import { WillShowOverlayLocationEvent } from './events';
11
12
  import { DockviewGroupPanel } from './dockviewGroupPanel';
12
13
  import { Parameters } from '../panel/types';
13
14
  import { DockviewFloatingGroupPanel } from './dockviewFloatingGroupPanel';
@@ -80,6 +81,7 @@ type MoveGroupOptions = {
80
81
  group: DockviewGroupPanel;
81
82
  position: Position;
82
83
  };
84
+ skipSetActive?: boolean;
83
85
  };
84
86
  type MoveGroupOrPanelOptions = {
85
87
  from: {
@@ -91,6 +93,7 @@ type MoveGroupOrPanelOptions = {
91
93
  position: Position;
92
94
  index?: number;
93
95
  };
96
+ skipSetActive?: boolean;
94
97
  };
95
98
  export interface FloatingGroupOptions {
96
99
  x?: number;
@@ -77,6 +77,7 @@ var baseComponentGridview_1 = require("../gridview/baseComponentGridview");
77
77
  var component_api_1 = require("../api/component.api");
78
78
  var splitview_1 = require("../splitview/splitview");
79
79
  var dockviewGroupPanelModel_1 = require("./dockviewGroupPanelModel");
80
+ var events_2 = require("./events");
80
81
  var dockviewGroupPanel_1 = require("./dockviewGroupPanel");
81
82
  var dockviewPanelModel_1 = require("./dockviewPanelModel");
82
83
  var dataTransfer_1 = require("../dnd/dataTransfer");
@@ -270,7 +271,7 @@ var DockviewComponent = /** @class */ (function (_super) {
270
271
  // option only available when no panels in primary grid
271
272
  return;
272
273
  }
273
- _this._onWillShowOverlay.fire(new dockviewGroupPanelModel_1.WillShowOverlayLocationEvent(event, {
274
+ _this._onWillShowOverlay.fire(new events_2.WillShowOverlayLocationEvent(event, {
274
275
  kind: 'edge',
275
276
  panel: undefined,
276
277
  api: _this._api,
@@ -1630,6 +1631,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1630
1631
  group: destinationGroup,
1631
1632
  position: destinationTarget,
1632
1633
  },
1634
+ skipSetActive: options.skipSetActive,
1633
1635
  });
1634
1636
  return;
1635
1637
  }
@@ -1651,12 +1653,16 @@ var DockviewComponent = /** @class */ (function (_super) {
1651
1653
  this.doRemoveGroup(sourceGroup, { skipActive: true });
1652
1654
  }
1653
1655
  this.movingLock(function () {
1656
+ var _a;
1654
1657
  return destinationGroup.model.openPanel(removedPanel_1, {
1655
1658
  index: destinationIndex,
1659
+ skipSetActive: (_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false,
1656
1660
  skipSetGroupActive: true,
1657
1661
  });
1658
1662
  });
1659
- this.doSetGroupAndPanelActive(destinationGroup);
1663
+ if (!options.skipSetActive) {
1664
+ this.doSetGroupAndPanelActive(destinationGroup);
1665
+ }
1660
1666
  this._onDidMovePanel.fire({
1661
1667
  panel: removedPanel_1,
1662
1668
  from: sourceGroup,
@@ -1769,7 +1775,8 @@ var DockviewComponent = /** @class */ (function (_super) {
1769
1775
  var to = options.to.group;
1770
1776
  var target = options.to.position;
1771
1777
  if (target === 'center') {
1772
- var activePanel_1 = from.activePanel;
1778
+ var activePanel = from.activePanel;
1779
+ var targetActivePanel = to.activePanel;
1773
1780
  var panels_2 = this.movingLock(function () {
1774
1781
  return __spreadArray([], __read(from.panels), false).map(function (p) {
1775
1782
  return from.model.removePanel(p.id, {
@@ -1786,7 +1793,7 @@ var DockviewComponent = /** @class */ (function (_super) {
1786
1793
  for (var panels_3 = __values(panels_2), panels_3_1 = panels_3.next(); !panels_3_1.done; panels_3_1 = panels_3.next()) {
1787
1794
  var panel = panels_3_1.value;
1788
1795
  to.model.openPanel(panel, {
1789
- skipSetActive: panel !== activePanel_1,
1796
+ skipSetActive: true, // Always skip setting panels active during move
1790
1797
  skipSetGroupActive: true,
1791
1798
  });
1792
1799
  }
@@ -1799,7 +1806,18 @@ var DockviewComponent = /** @class */ (function (_super) {
1799
1806
  finally { if (e_17) throw e_17.error; }
1800
1807
  }
1801
1808
  });
1802
- this.doSetGroupAndPanelActive(to);
1809
+ if (!options.skipSetActive) {
1810
+ // Make the moved panel (from the source group) active
1811
+ if (activePanel) {
1812
+ this.doSetGroupAndPanelActive(to);
1813
+ }
1814
+ }
1815
+ else if (targetActivePanel) {
1816
+ // Ensure the target group's original active panel remains active
1817
+ to.model.openPanel(targetActivePanel, {
1818
+ skipSetGroupActive: true
1819
+ });
1820
+ }
1803
1821
  }
1804
1822
  else {
1805
1823
  switch (from.api.location.type) {
@@ -1819,12 +1837,39 @@ var DockviewComponent = /** @class */ (function (_super) {
1819
1837
  if (!selectedPopoutGroup) {
1820
1838
  throw new Error('failed to find popout group');
1821
1839
  }
1822
- selectedPopoutGroup.disposable.dispose();
1840
+ // Remove from popout groups list to prevent automatic restoration
1841
+ var index = this._popoutGroups.indexOf(selectedPopoutGroup);
1842
+ if (index >= 0) {
1843
+ this._popoutGroups.splice(index, 1);
1844
+ }
1845
+ // Clean up the reference group (ghost) if it exists and is hidden
1846
+ if (selectedPopoutGroup.referenceGroup) {
1847
+ var referenceGroup = this.getPanel(selectedPopoutGroup.referenceGroup);
1848
+ if (referenceGroup && !referenceGroup.api.isVisible) {
1849
+ this.doRemoveGroup(referenceGroup, { skipActive: true });
1850
+ }
1851
+ }
1852
+ // Manually dispose the window without triggering restoration
1853
+ selectedPopoutGroup.window.dispose();
1854
+ // Update group's location and containers for target
1855
+ if (to.api.location.type === 'grid') {
1856
+ from.model.renderContainer = this.overlayRenderContainer;
1857
+ from.model.dropTargetContainer = this.rootDropTargetContainer;
1858
+ from.model.location = { type: 'grid' };
1859
+ }
1860
+ else if (to.api.location.type === 'floating') {
1861
+ from.model.renderContainer = this.overlayRenderContainer;
1862
+ from.model.dropTargetContainer = this.rootDropTargetContainer;
1863
+ from.model.location = { type: 'floating' };
1864
+ }
1865
+ break;
1823
1866
  }
1824
1867
  }
1825
- if (from.api.location.type !== 'popout') {
1868
+ // For moves to grid locations
1869
+ if (to.api.location.type === 'grid') {
1826
1870
  var referenceLocation = (0, gridview_1.getGridLocation)(to.element);
1827
1871
  var dropLocation = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, referenceLocation, target);
1872
+ // Add to grid for all moves targeting grid location
1828
1873
  var size = void 0;
1829
1874
  switch (this.gridview.orientation) {
1830
1875
  case splitview_1.Orientation.VERTICAL:
@@ -1842,10 +1887,49 @@ var DockviewComponent = /** @class */ (function (_super) {
1842
1887
  }
1843
1888
  this.gridview.addView(from, size, dropLocation);
1844
1889
  }
1890
+ else if (to.api.location.type === 'floating') {
1891
+ // For moves to floating locations, add as floating group
1892
+ // Get the position/size from the target floating group
1893
+ var targetFloatingGroup = this._floatingGroups.find(function (x) { return x.group === to; });
1894
+ if (targetFloatingGroup) {
1895
+ var box = targetFloatingGroup.overlay.toJSON();
1896
+ // Calculate position based on available properties
1897
+ var left = void 0, top_1;
1898
+ if ('left' in box) {
1899
+ left = box.left + 50;
1900
+ }
1901
+ else if ('right' in box) {
1902
+ left = Math.max(0, box.right - box.width - 50);
1903
+ }
1904
+ else {
1905
+ left = 50; // Default fallback
1906
+ }
1907
+ if ('top' in box) {
1908
+ top_1 = box.top + 50;
1909
+ }
1910
+ else if ('bottom' in box) {
1911
+ top_1 = Math.max(0, box.bottom - box.height - 50);
1912
+ }
1913
+ else {
1914
+ top_1 = 50; // Default fallback
1915
+ }
1916
+ this.addFloatingGroup(from, {
1917
+ height: box.height,
1918
+ width: box.width,
1919
+ position: {
1920
+ left: left,
1921
+ top: top_1,
1922
+ },
1923
+ });
1924
+ }
1925
+ }
1845
1926
  }
1846
1927
  from.panels.forEach(function (panel) {
1847
1928
  _this._onDidMovePanel.fire({ panel: panel, from: from });
1848
1929
  });
1930
+ if (!options.skipSetActive) {
1931
+ this.doSetGroupAndPanelActive(from);
1932
+ }
1849
1933
  };
1850
1934
  DockviewComponent.prototype.doSetGroupActive = function (group) {
1851
1935
  _super.prototype.doSetGroupActive.call(this, group);
@@ -1,8 +1,9 @@
1
1
  import { DockviewApi } from '../api/component.api';
2
2
  import { PanelTransfer } from '../dnd/dataTransfer';
3
- import { Position, WillShowOverlayEvent } from '../dnd/droptarget';
3
+ import { Position } from '../dnd/droptarget';
4
4
  import { DockviewComponent } from './dockviewComponent';
5
- import { DockviewEvent, Event, IDockviewEvent } from '../events';
5
+ import { DockviewEvent, Event } from '../events';
6
+ import { DockviewGroupDropLocation, WillShowOverlayLocationEvent } from './events';
6
7
  import { IViewSize } from '../gridview/gridview';
7
8
  import { CompositeDisposable } from '../lifecycle';
8
9
  import { IPanel, PanelInitParameters, PanelUpdateEvent, Parameters } from '../panel/types';
@@ -75,7 +76,6 @@ export interface IHeader {
75
76
  hidden: boolean;
76
77
  }
77
78
  export type DockviewGroupPanelLocked = boolean | 'no-drop-target';
78
- export type DockviewGroupDropLocation = 'tab' | 'header_space' | 'content' | 'edge';
79
79
  export interface IDockviewGroupPanelModel extends IPanel {
80
80
  readonly isActive: boolean;
81
81
  readonly size: number;
@@ -123,27 +123,6 @@ export type DockviewGroupLocation = {
123
123
  getWindow: () => Window;
124
124
  popoutUrl?: string;
125
125
  };
126
- export interface WillShowOverlayLocationEventOptions {
127
- readonly kind: DockviewGroupDropLocation;
128
- readonly panel: IDockviewPanel | undefined;
129
- readonly api: DockviewApi;
130
- readonly group: DockviewGroupPanel | undefined;
131
- getData: () => PanelTransfer | undefined;
132
- }
133
- export declare class WillShowOverlayLocationEvent implements IDockviewEvent {
134
- private readonly event;
135
- readonly options: WillShowOverlayLocationEventOptions;
136
- get kind(): DockviewGroupDropLocation;
137
- get nativeEvent(): DragEvent;
138
- get position(): Position;
139
- get defaultPrevented(): boolean;
140
- get panel(): IDockviewPanel | undefined;
141
- get api(): DockviewApi;
142
- get group(): DockviewGroupPanel | undefined;
143
- preventDefault(): void;
144
- getData(): PanelTransfer | undefined;
145
- constructor(event: WillShowOverlayEvent, options: WillShowOverlayLocationEventOptions);
146
- }
147
126
  export declare class DockviewGroupPanelModel extends CompositeDisposable implements IDockviewGroupPanelModel {
148
127
  private readonly container;
149
128
  private readonly accessor;
@@ -51,11 +51,12 @@ var __values = (this && this.__values) || function(o) {
51
51
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
52
52
  };
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
- exports.DockviewGroupPanelModel = exports.WillShowOverlayLocationEvent = exports.DockviewWillDropEvent = exports.DockviewDidDropEvent = void 0;
54
+ exports.DockviewGroupPanelModel = exports.DockviewWillDropEvent = exports.DockviewDidDropEvent = void 0;
55
55
  var component_api_1 = require("../api/component.api");
56
56
  var dataTransfer_1 = require("../dnd/dataTransfer");
57
57
  var dom_1 = require("../dom");
58
58
  var events_1 = require("../events");
59
+ var events_2 = require("./events");
59
60
  var lifecycle_1 = require("../lifecycle");
60
61
  var content_1 = require("./components/panel/content");
61
62
  var tabsContainer_1 = require("./components/titlebar/tabsContainer");
@@ -125,69 +126,6 @@ var DockviewWillDropEvent = /** @class */ (function (_super) {
125
126
  return DockviewWillDropEvent;
126
127
  }(DockviewDidDropEvent));
127
128
  exports.DockviewWillDropEvent = DockviewWillDropEvent;
128
- var WillShowOverlayLocationEvent = /** @class */ (function () {
129
- function WillShowOverlayLocationEvent(event, options) {
130
- this.event = event;
131
- this.options = options;
132
- }
133
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "kind", {
134
- get: function () {
135
- return this.options.kind;
136
- },
137
- enumerable: false,
138
- configurable: true
139
- });
140
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "nativeEvent", {
141
- get: function () {
142
- return this.event.nativeEvent;
143
- },
144
- enumerable: false,
145
- configurable: true
146
- });
147
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "position", {
148
- get: function () {
149
- return this.event.position;
150
- },
151
- enumerable: false,
152
- configurable: true
153
- });
154
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "defaultPrevented", {
155
- get: function () {
156
- return this.event.defaultPrevented;
157
- },
158
- enumerable: false,
159
- configurable: true
160
- });
161
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "panel", {
162
- get: function () {
163
- return this.options.panel;
164
- },
165
- enumerable: false,
166
- configurable: true
167
- });
168
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "api", {
169
- get: function () {
170
- return this.options.api;
171
- },
172
- enumerable: false,
173
- configurable: true
174
- });
175
- Object.defineProperty(WillShowOverlayLocationEvent.prototype, "group", {
176
- get: function () {
177
- return this.options.group;
178
- },
179
- enumerable: false,
180
- configurable: true
181
- });
182
- WillShowOverlayLocationEvent.prototype.preventDefault = function () {
183
- this.event.preventDefault();
184
- };
185
- WillShowOverlayLocationEvent.prototype.getData = function () {
186
- return this.options.getData();
187
- };
188
- return WillShowOverlayLocationEvent;
189
- }());
190
- exports.WillShowOverlayLocationEvent = WillShowOverlayLocationEvent;
191
129
  var DockviewGroupPanelModel = /** @class */ (function (_super) {
192
130
  __extends(DockviewGroupPanelModel, _super);
193
131
  function DockviewGroupPanelModel(container, accessor, id, options, groupPanel) {
@@ -256,7 +194,7 @@ var DockviewGroupPanelModel = /** @class */ (function (_super) {
256
194
  }), _this.tabsContainer.onWillShowOverlay(function (event) {
257
195
  _this._onWillShowOverlay.fire(event);
258
196
  }), _this.contentContainer.dropTarget.onWillShowOverlay(function (event) {
259
- _this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
197
+ _this._onWillShowOverlay.fire(new events_2.WillShowOverlayLocationEvent(event, {
260
198
  kind: 'content',
261
199
  panel: _this.activePanel,
262
200
  api: _this._api,
@@ -0,0 +1,28 @@
1
+ import { Position, WillShowOverlayEvent } from '../dnd/droptarget';
2
+ import { PanelTransfer } from '../dnd/dataTransfer';
3
+ import { DockviewApi } from '../api/component.api';
4
+ import { IDockviewPanel } from './dockviewPanel';
5
+ import { DockviewGroupPanel } from './dockviewGroupPanel';
6
+ import { IDockviewEvent } from '../events';
7
+ export type DockviewGroupDropLocation = 'tab' | 'header_space' | 'content' | 'edge';
8
+ export interface WillShowOverlayLocationEventOptions {
9
+ readonly kind: DockviewGroupDropLocation;
10
+ readonly panel: IDockviewPanel | undefined;
11
+ readonly api: DockviewApi;
12
+ readonly group: DockviewGroupPanel | undefined;
13
+ getData: () => PanelTransfer | undefined;
14
+ }
15
+ export declare class WillShowOverlayLocationEvent implements IDockviewEvent {
16
+ private readonly event;
17
+ readonly options: WillShowOverlayLocationEventOptions;
18
+ get kind(): DockviewGroupDropLocation;
19
+ get nativeEvent(): DragEvent;
20
+ get position(): Position;
21
+ get defaultPrevented(): boolean;
22
+ get panel(): IDockviewPanel | undefined;
23
+ get api(): DockviewApi;
24
+ get group(): DockviewGroupPanel | undefined;
25
+ preventDefault(): void;
26
+ getData(): PanelTransfer | undefined;
27
+ constructor(event: WillShowOverlayEvent, options: WillShowOverlayLocationEventOptions);
28
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WillShowOverlayLocationEvent = void 0;
4
+ var WillShowOverlayLocationEvent = /** @class */ (function () {
5
+ function WillShowOverlayLocationEvent(event, options) {
6
+ this.event = event;
7
+ this.options = options;
8
+ }
9
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "kind", {
10
+ get: function () {
11
+ return this.options.kind;
12
+ },
13
+ enumerable: false,
14
+ configurable: true
15
+ });
16
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "nativeEvent", {
17
+ get: function () {
18
+ return this.event.nativeEvent;
19
+ },
20
+ enumerable: false,
21
+ configurable: true
22
+ });
23
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "position", {
24
+ get: function () {
25
+ return this.event.position;
26
+ },
27
+ enumerable: false,
28
+ configurable: true
29
+ });
30
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "defaultPrevented", {
31
+ get: function () {
32
+ return this.event.defaultPrevented;
33
+ },
34
+ enumerable: false,
35
+ configurable: true
36
+ });
37
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "panel", {
38
+ get: function () {
39
+ return this.options.panel;
40
+ },
41
+ enumerable: false,
42
+ configurable: true
43
+ });
44
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "api", {
45
+ get: function () {
46
+ return this.options.api;
47
+ },
48
+ enumerable: false,
49
+ configurable: true
50
+ });
51
+ Object.defineProperty(WillShowOverlayLocationEvent.prototype, "group", {
52
+ get: function () {
53
+ return this.options.group;
54
+ },
55
+ enumerable: false,
56
+ configurable: true
57
+ });
58
+ WillShowOverlayLocationEvent.prototype.preventDefault = function () {
59
+ this.event.preventDefault();
60
+ };
61
+ WillShowOverlayLocationEvent.prototype.getData = function () {
62
+ return this.options.getData();
63
+ };
64
+ return WillShowOverlayLocationEvent;
65
+ }());
66
+ exports.WillShowOverlayLocationEvent = WillShowOverlayLocationEvent;
@@ -7,7 +7,8 @@ import { DockviewGroupPanel } from './dockviewGroupPanel';
7
7
  import { PanelTransfer } from '../dnd/dataTransfer';
8
8
  import { IDisposable } from '../lifecycle';
9
9
  import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
10
- import { DockviewGroupDropLocation, GroupOptions } from './dockviewGroupPanelModel';
10
+ import { GroupOptions } from './dockviewGroupPanelModel';
11
+ import { DockviewGroupDropLocation } from './events';
11
12
  import { IDockviewPanel } from './dockviewPanel';
12
13
  import { DockviewPanelRenderer } from '../overlay/overlayRenderContainer';
13
14
  import { IGroupHeaderProps } from './framework';