dockview-core 2.1.3 → 3.0.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 (81) hide show
  1. package/dist/cjs/api/component.api.d.ts +4 -3
  2. package/dist/cjs/api/component.api.js +8 -22
  3. package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +2 -1
  4. package/dist/cjs/dockview/components/titlebar/tabsContainer.js +30 -33
  5. package/dist/cjs/dockview/dockviewComponent.d.ts +0 -1
  6. package/dist/cjs/dockview/dockviewComponent.js +8 -13
  7. package/dist/cjs/dockview/options.d.ts +4 -8
  8. package/dist/cjs/dockview/options.js +28 -20
  9. package/dist/cjs/events.d.ts +9 -0
  10. package/dist/cjs/events.js +18 -1
  11. package/dist/cjs/gridview/gridviewComponent.js +15 -24
  12. package/dist/cjs/gridview/options.d.ts +10 -12
  13. package/dist/cjs/gridview/options.js +15 -0
  14. package/dist/cjs/index.d.ts +4 -4
  15. package/dist/cjs/index.js +8 -1
  16. package/dist/cjs/paneview/defaultPaneviewHeader.d.ts +2 -2
  17. package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +6 -2
  18. package/dist/cjs/paneview/draggablePaneviewPanel.js +8 -9
  19. package/dist/cjs/paneview/options.d.ts +25 -21
  20. package/dist/cjs/paneview/options.js +42 -0
  21. package/dist/cjs/paneview/paneviewComponent.d.ts +12 -15
  22. package/dist/cjs/paneview/paneviewComponent.js +30 -40
  23. package/dist/cjs/paneview/paneviewPanel.d.ts +3 -8
  24. package/dist/cjs/splitview/options.d.ts +7 -9
  25. package/dist/cjs/splitview/options.js +17 -0
  26. package/dist/cjs/splitview/splitview.d.ts +5 -5
  27. package/dist/cjs/splitview/splitviewComponent.js +10 -21
  28. package/dist/dockview-core.amd.js +168 -172
  29. package/dist/dockview-core.amd.js.map +1 -1
  30. package/dist/dockview-core.amd.min.js +2 -2
  31. package/dist/dockview-core.amd.min.js.map +1 -1
  32. package/dist/dockview-core.amd.min.noStyle.js +2 -2
  33. package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
  34. package/dist/dockview-core.amd.noStyle.js +168 -172
  35. package/dist/dockview-core.amd.noStyle.js.map +1 -1
  36. package/dist/dockview-core.cjs.js +168 -172
  37. package/dist/dockview-core.cjs.js.map +1 -1
  38. package/dist/dockview-core.esm.js +164 -172
  39. package/dist/dockview-core.esm.js.map +1 -1
  40. package/dist/dockview-core.esm.min.js +2 -2
  41. package/dist/dockview-core.esm.min.js.map +1 -1
  42. package/dist/dockview-core.js +168 -172
  43. package/dist/dockview-core.js.map +1 -1
  44. package/dist/dockview-core.min.js +2 -2
  45. package/dist/dockview-core.min.js.map +1 -1
  46. package/dist/dockview-core.min.noStyle.js +2 -2
  47. package/dist/dockview-core.min.noStyle.js.map +1 -1
  48. package/dist/dockview-core.noStyle.js +168 -172
  49. package/dist/dockview-core.noStyle.js.map +1 -1
  50. package/dist/esm/api/component.api.d.ts +4 -3
  51. package/dist/esm/api/component.api.js +4 -10
  52. package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +2 -1
  53. package/dist/esm/dockview/components/titlebar/tabsContainer.js +20 -23
  54. package/dist/esm/dockview/dockviewComponent.d.ts +0 -1
  55. package/dist/esm/dockview/dockviewComponent.js +8 -13
  56. package/dist/esm/dockview/options.d.ts +4 -8
  57. package/dist/esm/dockview/options.js +4 -9
  58. package/dist/esm/events.d.ts +9 -0
  59. package/dist/esm/events.js +11 -0
  60. package/dist/esm/gridview/gridviewComponent.js +15 -24
  61. package/dist/esm/gridview/options.d.ts +10 -12
  62. package/dist/esm/gridview/options.js +14 -1
  63. package/dist/esm/index.d.ts +4 -4
  64. package/dist/esm/index.js +3 -0
  65. package/dist/esm/paneview/defaultPaneviewHeader.d.ts +2 -2
  66. package/dist/esm/paneview/draggablePaneviewPanel.d.ts +6 -2
  67. package/dist/esm/paneview/draggablePaneviewPanel.js +8 -9
  68. package/dist/esm/paneview/options.d.ts +25 -21
  69. package/dist/esm/paneview/options.js +22 -1
  70. package/dist/esm/paneview/paneviewComponent.d.ts +12 -15
  71. package/dist/esm/paneview/paneviewComponent.js +30 -40
  72. package/dist/esm/paneview/paneviewPanel.d.ts +3 -8
  73. package/dist/esm/splitview/options.d.ts +7 -9
  74. package/dist/esm/splitview/options.js +16 -1
  75. package/dist/esm/splitview/splitview.d.ts +5 -5
  76. package/dist/esm/splitview/splitviewComponent.js +10 -21
  77. package/package.json +1 -1
  78. package/dist/cjs/panel/componentFactory.d.ts +0 -11
  79. package/dist/cjs/panel/componentFactory.js +0 -30
  80. package/dist/esm/panel/componentFactory.d.ts +0 -11
  81. package/dist/esm/panel/componentFactory.js +0 -24
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 2.1.3
3
+ * @version 3.0.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -103,6 +103,17 @@
103
103
  this._defaultPrevented = true;
104
104
  }
105
105
  }
106
+ class AcceptableEvent {
107
+ constructor() {
108
+ this._isAccepted = false;
109
+ }
110
+ get isAccepted() {
111
+ return this._isAccepted;
112
+ }
113
+ accept() {
114
+ this._isAccepted = true;
115
+ }
116
+ }
106
117
  class LeakageMonitor {
107
118
  constructor() {
108
119
  this.events = new Map();
@@ -1494,6 +1505,23 @@
1494
1505
  }
1495
1506
  }
1496
1507
 
1508
+ const PROPERTY_KEYS_SPLITVIEW = (() => {
1509
+ /**
1510
+ * by readong the keys from an empty value object TypeScript will error
1511
+ * when we add or remove new properties to `DockviewOptions`
1512
+ */
1513
+ const properties = {
1514
+ orientation: undefined,
1515
+ descriptor: undefined,
1516
+ proportionalLayout: undefined,
1517
+ styles: undefined,
1518
+ margin: undefined,
1519
+ disableAutoResizing: undefined,
1520
+ className: undefined,
1521
+ };
1522
+ return Object.keys(properties);
1523
+ })();
1524
+
1497
1525
  class Paneview extends CompositeDisposable {
1498
1526
  get onDidAddView() {
1499
1527
  return this.splitview.onDidAddView;
@@ -2623,6 +2651,21 @@
2623
2651
  }
2624
2652
  }
2625
2653
 
2654
+ const PROPERTY_KEYS_GRIDVIEW = (() => {
2655
+ /**
2656
+ * by readong the keys from an empty value object TypeScript will error
2657
+ * when we add or remove new properties to `DockviewOptions`
2658
+ */
2659
+ const properties = {
2660
+ disableAutoResizing: undefined,
2661
+ proportionalLayout: undefined,
2662
+ orientation: undefined,
2663
+ hideBorders: undefined,
2664
+ className: undefined,
2665
+ };
2666
+ return Object.keys(properties);
2667
+ })();
2668
+
2626
2669
  class Resizable extends CompositeDisposable {
2627
2670
  get element() {
2628
2671
  return this._element;
@@ -3100,15 +3143,10 @@
3100
3143
  * Invoked when a Drag'n'Drop event occurs that the component was unable to handle. Exposed for custom Drag'n'Drop functionality.
3101
3144
  */
3102
3145
  get onDidDrop() {
3103
- const emitter = new Emitter();
3104
- const disposable = this.component.onDidDrop((e) => {
3105
- emitter.fire(Object.assign(Object.assign({}, e), { api: this }));
3106
- });
3107
- emitter.dispose = () => {
3108
- disposable.dispose();
3109
- emitter.dispose();
3110
- };
3111
- return emitter.event;
3146
+ return this.component.onDidDrop;
3147
+ }
3148
+ get onUnhandledDragOverEvent() {
3149
+ return this.component.onUnhandledDragOverEvent;
3112
3150
  }
3113
3151
  constructor(component) {
3114
3152
  this.component = component;
@@ -4035,6 +4073,28 @@
4035
4073
  return 'center';
4036
4074
  }
4037
4075
 
4076
+ const PROPERTY_KEYS_PANEVIEW = (() => {
4077
+ /**
4078
+ * by readong the keys from an empty value object TypeScript will error
4079
+ * when we add or remove new properties to `DockviewOptions`
4080
+ */
4081
+ const properties = {
4082
+ disableAutoResizing: undefined,
4083
+ disableDnd: undefined,
4084
+ className: undefined,
4085
+ };
4086
+ return Object.keys(properties);
4087
+ })();
4088
+ class PaneviewUnhandledDragOverEvent extends AcceptableEvent {
4089
+ constructor(nativeEvent, position, getData, panel) {
4090
+ super();
4091
+ this.nativeEvent = nativeEvent;
4092
+ this.position = position;
4093
+ this.getData = getData;
4094
+ this.panel = panel;
4095
+ }
4096
+ }
4097
+
4038
4098
  class WillFocusEvent extends DockviewEvent {
4039
4099
  constructor() {
4040
4100
  super();
@@ -4458,6 +4518,9 @@
4458
4518
  this.accessor = accessor;
4459
4519
  this._onDidDrop = new Emitter();
4460
4520
  this.onDidDrop = this._onDidDrop.event;
4521
+ this._onUnhandledDragOverEvent = new Emitter();
4522
+ this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
4523
+ this.addDisposables(this._onDidDrop, this._onUnhandledDragOverEvent);
4461
4524
  if (!disableDnd) {
4462
4525
  this.initDragFeatures();
4463
4526
  }
@@ -4484,7 +4547,7 @@
4484
4547
  overlayModel: {
4485
4548
  activationSize: { type: 'percentage', value: 50 },
4486
4549
  },
4487
- canDisplayOverlay: (event) => {
4550
+ canDisplayOverlay: (event, position) => {
4488
4551
  const data = getPaneData();
4489
4552
  if (data) {
4490
4553
  if (data.paneId !== this.id &&
@@ -4492,14 +4555,9 @@
4492
4555
  return true;
4493
4556
  }
4494
4557
  }
4495
- if (this.accessor.options.showDndOverlay) {
4496
- return this.accessor.options.showDndOverlay({
4497
- nativeEvent: event,
4498
- getData: getPaneData,
4499
- panel: this,
4500
- });
4501
- }
4502
- return false;
4558
+ const firedEvent = new PaneviewUnhandledDragOverEvent(event, position, getPaneData, this);
4559
+ this._onUnhandledDragOverEvent.fire(firedEvent);
4560
+ return firedEvent.isAccepted;
4503
4561
  },
4504
4562
  });
4505
4563
  this.addDisposables(this._onDidDrop, this.handler, this.target, this.target.onDrop((event) => {
@@ -4954,15 +5012,7 @@
4954
5012
  this._element.appendChild(this.leftActionsContainer);
4955
5013
  this._element.appendChild(this.voidContainer.element);
4956
5014
  this._element.appendChild(this.rightActionsContainer);
4957
- this.addDisposables(this.accessor.onDidAddPanel((e) => {
4958
- if (e.api.group === this.group) {
4959
- toggleClass(this._element, 'dv-single-tab', this.size === 1);
4960
- }
4961
- }), this.accessor.onDidRemovePanel((e) => {
4962
- if (e.api.group === this.group) {
4963
- toggleClass(this._element, 'dv-single-tab', this.size === 1);
4964
- }
4965
- }), this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
5015
+ this.addDisposables(this._onWillShowOverlay, this._onDrop, this._onTabDragStart, this._onGroupDragStart, this.voidContainer, this.voidContainer.onDragStart((event) => {
4966
5016
  this._onGroupDragStart.fire({
4967
5017
  nativeEvent: event,
4968
5018
  group: this.group,
@@ -5007,20 +5057,6 @@
5007
5057
  setActive(_isGroupActive) {
5008
5058
  // noop
5009
5059
  }
5010
- addTab(tab, index = this.tabs.length) {
5011
- if (index < 0 || index > this.tabs.length) {
5012
- throw new Error('invalid location');
5013
- }
5014
- this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
5015
- this.tabs = [
5016
- ...this.tabs.slice(0, index),
5017
- tab,
5018
- ...this.tabs.slice(index),
5019
- ];
5020
- if (this.selectedIndex < 0) {
5021
- this.selectedIndex = index;
5022
- }
5023
- }
5024
5060
  delete(id) {
5025
5061
  const index = this.tabs.findIndex((tab) => tab.value.panel.id === id);
5026
5062
  const tabToRemove = this.tabs.splice(index, 1)[0];
@@ -5028,6 +5064,7 @@
5028
5064
  disposable.dispose();
5029
5065
  value.dispose();
5030
5066
  value.element.remove();
5067
+ this.updateClassnames();
5031
5068
  }
5032
5069
  setActivePanel(panel) {
5033
5070
  this.tabs.forEach((tab) => {
@@ -5096,25 +5133,37 @@
5096
5133
  }
5097
5134
  this.tabs = [];
5098
5135
  }
5136
+ addTab(tab, index = this.tabs.length) {
5137
+ if (index < 0 || index > this.tabs.length) {
5138
+ throw new Error('invalid location');
5139
+ }
5140
+ this.tabContainer.insertBefore(tab.value.element, this.tabContainer.children[index]);
5141
+ this.tabs = [
5142
+ ...this.tabs.slice(0, index),
5143
+ tab,
5144
+ ...this.tabs.slice(index),
5145
+ ];
5146
+ if (this.selectedIndex < 0) {
5147
+ this.selectedIndex = index;
5148
+ }
5149
+ this.updateClassnames();
5150
+ }
5151
+ updateClassnames() {
5152
+ toggleClass(this._element, 'dv-single-tab', this.size === 1);
5153
+ }
5099
5154
  }
5100
5155
 
5101
- class DockviewUnhandledDragOverEvent {
5102
- get isAccepted() {
5103
- return this._isAccepted;
5104
- }
5156
+ class DockviewUnhandledDragOverEvent extends AcceptableEvent {
5105
5157
  constructor(nativeEvent, target, position, getData, group) {
5158
+ super();
5106
5159
  this.nativeEvent = nativeEvent;
5107
5160
  this.target = target;
5108
5161
  this.position = position;
5109
5162
  this.getData = getData;
5110
5163
  this.group = group;
5111
- this._isAccepted = false;
5112
- }
5113
- accept() {
5114
- this._isAccepted = true;
5115
5164
  }
5116
5165
  }
5117
- const PROPERTY_KEYS = (() => {
5166
+ const PROPERTY_KEYS_DOCKVIEW = (() => {
5118
5167
  /**
5119
5168
  * by readong the keys from an empty value object TypeScript will error
5120
5169
  * when we add or remove new properties to `DockviewOptions`
@@ -7637,10 +7686,6 @@
7637
7686
  this._api = new DockviewApi(this);
7638
7687
  this.updateWatermark();
7639
7688
  }
7640
- dispose() {
7641
- this.clear(); // explicitly clear the layout before cleaning up
7642
- super.dispose();
7643
- }
7644
7689
  setVisible(panel, visible) {
7645
7690
  switch (panel.api.location.type) {
7646
7691
  case 'grid':
@@ -7824,30 +7869,29 @@
7824
7869
  }
7825
7870
  }
7826
7871
  else if (this.getPanel(group.id)) {
7827
- const removedGroup = group;
7872
+ group.model.renderContainer =
7873
+ this.overlayRenderContainer;
7874
+ returnedGroup = group;
7828
7875
  if (floatingBox) {
7829
- this.addFloatingGroup(removedGroup, {
7876
+ this.addFloatingGroup(group, {
7830
7877
  height: floatingBox.height,
7831
7878
  width: floatingBox.width,
7832
7879
  position: floatingBox,
7833
7880
  });
7834
7881
  }
7835
7882
  else {
7836
- this.doRemoveGroup(removedGroup, {
7883
+ this.doRemoveGroup(group, {
7837
7884
  skipDispose: true,
7838
7885
  skipActive: true,
7839
7886
  skipPopoutReturn: true,
7840
7887
  });
7841
- removedGroup.model.renderContainer =
7842
- this.overlayRenderContainer;
7843
- removedGroup.model.location = { type: 'grid' };
7844
- returnedGroup = removedGroup;
7888
+ group.model.location = { type: 'grid' };
7845
7889
  this.movingLock(() => {
7846
7890
  // suppress group add events since the group already exists
7847
- this.doAddGroup(removedGroup, [0]);
7891
+ this.doAddGroup(group, [0]);
7848
7892
  });
7849
7893
  }
7850
- this.doSetGroupAndPanelActive(removedGroup);
7894
+ this.doSetGroupAndPanelActive(group);
7851
7895
  }
7852
7896
  }));
7853
7897
  this._popoutGroups.push(value);
@@ -8988,31 +9032,6 @@
8988
9032
  }
8989
9033
  }
8990
9034
 
8991
- function createComponent(id, componentName, components = {}, frameworkComponents = {}, createFrameworkComponent, fallback) {
8992
- const Component = typeof componentName === 'string'
8993
- ? components[componentName]
8994
- : undefined;
8995
- const FrameworkComponent = typeof componentName === 'string'
8996
- ? frameworkComponents[componentName]
8997
- : undefined;
8998
- if (Component && FrameworkComponent) {
8999
- throw new Error(`Cannot create '${id}'. component '${componentName}' registered as both a component and frameworkComponent`);
9000
- }
9001
- if (FrameworkComponent) {
9002
- if (!createFrameworkComponent) {
9003
- throw new Error(`Cannot create '${id}' for framework component '${componentName}'. you must register a frameworkPanelWrapper to use framework components`);
9004
- }
9005
- return createFrameworkComponent.createComponent(id, componentName, FrameworkComponent);
9006
- }
9007
- if (!Component) {
9008
- if (fallback) {
9009
- return fallback();
9010
- }
9011
- throw new Error(`Cannot create '${id}', no component '${componentName}' provided`);
9012
- }
9013
- return new Component(id, componentName);
9014
- }
9015
-
9016
9035
  class GridviewComponent extends BaseGrid {
9017
9036
  get orientation() {
9018
9037
  return this.gridview.orientation;
@@ -9030,10 +9049,13 @@
9030
9049
  this._deserializer = value;
9031
9050
  }
9032
9051
  constructor(parentElement, options) {
9052
+ var _a;
9033
9053
  super(parentElement, {
9034
- proportionalLayout: options.proportionalLayout,
9054
+ proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
9035
9055
  orientation: options.orientation,
9036
- styles: options.styles,
9056
+ styles: options.hideBorders
9057
+ ? { separatorBorder: 'transparent' }
9058
+ : undefined,
9037
9059
  disableAutoResizing: options.disableAutoResizing,
9038
9060
  className: options.className,
9039
9061
  });
@@ -9053,12 +9075,6 @@
9053
9075
  }), this.onDidActiveChange((event) => {
9054
9076
  this._onDidActiveGroupChange.fire(event);
9055
9077
  }));
9056
- if (!this.options.components) {
9057
- this.options.components = {};
9058
- }
9059
- if (!this.options.frameworkComponents) {
9060
- this.options.frameworkComponents = {};
9061
- }
9062
9078
  }
9063
9079
  updateOptions(options) {
9064
9080
  super.updateOptions(options);
@@ -9108,14 +9124,11 @@
9108
9124
  const height = this.height;
9109
9125
  this.gridview.deserialize(grid, {
9110
9126
  fromJSON: (node) => {
9111
- var _a, _b;
9112
9127
  const { data } = node;
9113
- const view = createComponent(data.id, data.component, (_a = this.options.components) !== null && _a !== void 0 ? _a : {}, (_b = this.options.frameworkComponents) !== null && _b !== void 0 ? _b : {}, this.options.frameworkComponentFactory
9114
- ? {
9115
- createComponent: this.options.frameworkComponentFactory
9116
- .createComponent,
9117
- }
9118
- : undefined);
9128
+ const view = this.options.createComponent({
9129
+ id: data.id,
9130
+ name: data.component,
9131
+ });
9119
9132
  queue.push(() => view.init({
9120
9133
  params: data.params,
9121
9134
  minimumWidth: data.minimumWidth,
@@ -9193,7 +9206,7 @@
9193
9206
  this.doAddGroup(removedPanel, relativeLocation, options.size);
9194
9207
  }
9195
9208
  addPanel(options) {
9196
- var _a, _b, _c, _d, _e, _f;
9209
+ var _a, _b, _c, _d;
9197
9210
  let relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
9198
9211
  if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
9199
9212
  const referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
@@ -9209,14 +9222,12 @@
9209
9222
  relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
9210
9223
  }
9211
9224
  }
9212
- const view = createComponent(options.id, options.component, (_d = this.options.components) !== null && _d !== void 0 ? _d : {}, (_e = this.options.frameworkComponents) !== null && _e !== void 0 ? _e : {}, this.options.frameworkComponentFactory
9213
- ? {
9214
- createComponent: this.options.frameworkComponentFactory
9215
- .createComponent,
9216
- }
9217
- : undefined);
9225
+ const view = this.options.createComponent({
9226
+ id: options.id,
9227
+ name: options.component,
9228
+ });
9218
9229
  view.init({
9219
- params: (_f = options.params) !== null && _f !== void 0 ? _f : {},
9230
+ params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
9220
9231
  minimumWidth: options.minimumWidth,
9221
9232
  maximumWidth: options.maximumWidth,
9222
9233
  minimumHeight: options.minimumHeight,
@@ -9344,12 +9355,6 @@
9344
9355
  this._classNames = new Classnames(this.element);
9345
9356
  this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
9346
9357
  this._options = options;
9347
- if (!options.components) {
9348
- options.components = {};
9349
- }
9350
- if (!options.frameworkComponents) {
9351
- options.frameworkComponents = {};
9352
- }
9353
9358
  this.splitview = new Splitview(this.element, options);
9354
9359
  this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
9355
9360
  }
@@ -9412,18 +9417,17 @@
9412
9417
  return this.panels.find((view) => view.id === id);
9413
9418
  }
9414
9419
  addPanel(options) {
9415
- var _a, _b, _c;
9420
+ var _a;
9416
9421
  if (this._panels.has(options.id)) {
9417
9422
  throw new Error(`panel ${options.id} already exists`);
9418
9423
  }
9419
- const view = createComponent(options.id, options.component, (_a = this.options.components) !== null && _a !== void 0 ? _a : {}, (_b = this.options.frameworkComponents) !== null && _b !== void 0 ? _b : {}, this.options.frameworkWrapper
9420
- ? {
9421
- createComponent: this.options.frameworkWrapper.createComponent,
9422
- }
9423
- : undefined);
9424
+ const view = this.options.createComponent({
9425
+ id: options.id,
9426
+ name: options.component,
9427
+ });
9424
9428
  view.orientation = this.splitview.orientation;
9425
9429
  view.init({
9426
- params: (_c = options.params) !== null && _c !== void 0 ? _c : {},
9430
+ params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
9427
9431
  minimumSize: options.minimumSize,
9428
9432
  maximumSize: options.maximumSize,
9429
9433
  snap: options.snap,
@@ -9485,17 +9489,14 @@
9485
9489
  descriptor: {
9486
9490
  size,
9487
9491
  views: views.map((view) => {
9488
- var _a, _b;
9489
9492
  const data = view.data;
9490
9493
  if (this._panels.has(data.id)) {
9491
9494
  throw new Error(`panel ${data.id} already exists`);
9492
9495
  }
9493
- const panel = createComponent(data.id, data.component, (_a = this.options.components) !== null && _a !== void 0 ? _a : {}, (_b = this.options.frameworkComponents) !== null && _b !== void 0 ? _b : {}, this.options.frameworkWrapper
9494
- ? {
9495
- createComponent: this.options.frameworkWrapper
9496
- .createComponent,
9497
- }
9498
- : undefined);
9496
+ const panel = this.options.createComponent({
9497
+ id: data.id,
9498
+ name: data.component,
9499
+ });
9499
9500
  queue.push(() => {
9500
9501
  var _a;
9501
9502
  panel.init({
@@ -9678,16 +9679,12 @@
9678
9679
  this.onDidAddView = this._onDidAddView.event;
9679
9680
  this._onDidRemoveView = new Emitter();
9680
9681
  this.onDidRemoveView = this._onDidRemoveView.event;
9681
- this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView);
9682
+ this._onUnhandledDragOverEvent = new Emitter();
9683
+ this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
9684
+ this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
9682
9685
  this._classNames = new Classnames(this.element);
9683
9686
  this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
9684
9687
  this._options = options;
9685
- if (!options.components) {
9686
- options.components = {};
9687
- }
9688
- if (!options.frameworkComponents) {
9689
- options.frameworkComponents = {};
9690
- }
9691
9688
  this.paneview = new Paneview(this.element, {
9692
9689
  // only allow paneview in the vertical orientation for now
9693
9690
  orientation: exports.Orientation.VERTICAL,
@@ -9712,22 +9709,19 @@
9712
9709
  this._options = Object.assign(Object.assign({}, this.options), options);
9713
9710
  }
9714
9711
  addPanel(options) {
9715
- var _a, _b, _c, _d;
9716
- const body = createComponent(options.id, options.component, (_a = this.options.components) !== null && _a !== void 0 ? _a : {}, (_b = this.options.frameworkComponents) !== null && _b !== void 0 ? _b : {}, this.options.frameworkWrapper
9717
- ? {
9718
- createComponent: this.options.frameworkWrapper.body.createComponent,
9719
- }
9720
- : undefined);
9712
+ var _a;
9713
+ const body = this.options.createComponent({
9714
+ id: options.id,
9715
+ name: options.component,
9716
+ });
9721
9717
  let header;
9722
- if (options.headerComponent) {
9723
- header = createComponent(options.id, options.headerComponent, (_c = this.options.headerComponents) !== null && _c !== void 0 ? _c : {}, this.options.headerframeworkComponents, this.options.frameworkWrapper
9724
- ? {
9725
- createComponent: this.options.frameworkWrapper.header
9726
- .createComponent,
9727
- }
9728
- : undefined);
9718
+ if (options.headerComponent && this.options.createHeaderComponent) {
9719
+ header = this.options.createHeaderComponent({
9720
+ id: options.id,
9721
+ name: options.headerComponent,
9722
+ });
9729
9723
  }
9730
- else {
9724
+ if (!header) {
9731
9725
  header = new DefaultHeader();
9732
9726
  }
9733
9727
  const view = new PaneFramework({
@@ -9745,7 +9739,7 @@
9745
9739
  const size = typeof options.size === 'number' ? options.size : exports.Sizing.Distribute;
9746
9740
  const index = typeof options.index === 'number' ? options.index : undefined;
9747
9741
  view.init({
9748
- params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
9742
+ params: (_a = options.params) !== null && _a !== void 0 ? _a : {},
9749
9743
  minimumBodySize: options.minimumBodySize,
9750
9744
  maximumBodySize: options.maximumBodySize,
9751
9745
  isExpanded: options.isExpanded,
@@ -9810,24 +9804,20 @@
9810
9804
  descriptor: {
9811
9805
  size,
9812
9806
  views: views.map((view) => {
9813
- var _a, _b, _c, _d;
9814
9807
  const data = view.data;
9815
- const body = createComponent(data.id, data.component, (_a = this.options.components) !== null && _a !== void 0 ? _a : {}, (_b = this.options.frameworkComponents) !== null && _b !== void 0 ? _b : {}, this.options.frameworkWrapper
9816
- ? {
9817
- createComponent: this.options.frameworkWrapper.body
9818
- .createComponent,
9819
- }
9820
- : undefined);
9808
+ const body = this.options.createComponent({
9809
+ id: data.id,
9810
+ name: data.component,
9811
+ });
9821
9812
  let header;
9822
- if (data.headerComponent) {
9823
- header = createComponent(data.id, data.headerComponent, (_c = this.options.headerComponents) !== null && _c !== void 0 ? _c : {}, (_d = this.options.headerframeworkComponents) !== null && _d !== void 0 ? _d : {}, this.options.frameworkWrapper
9824
- ? {
9825
- createComponent: this.options.frameworkWrapper.header
9826
- .createComponent,
9827
- }
9828
- : undefined);
9813
+ if (data.headerComponent &&
9814
+ this.options.createHeaderComponent) {
9815
+ header = this.options.createHeaderComponent({
9816
+ id: data.id,
9817
+ name: data.headerComponent,
9818
+ });
9829
9819
  }
9830
- else {
9820
+ if (!header) {
9831
9821
  header = new DefaultHeader();
9832
9822
  }
9833
9823
  const panel = new PaneFramework({
@@ -9875,9 +9865,11 @@
9875
9865
  this.paneview.dispose();
9876
9866
  }
9877
9867
  doAddPanel(panel) {
9878
- const disposable = panel.onDidDrop((event) => {
9868
+ const disposable = new CompositeDisposable(panel.onDidDrop((event) => {
9879
9869
  this._onDidDrop.fire(event);
9880
- });
9870
+ }), panel.onUnhandledDragOverEvent((event) => {
9871
+ this._onUnhandledDragOverEvent.fire(event);
9872
+ }));
9881
9873
  this._viewDisposables.set(panel.id, disposable);
9882
9874
  }
9883
9875
  doRemovePanel(panel) {
@@ -10039,7 +10031,10 @@
10039
10031
  exports.GridviewApi = GridviewApi;
10040
10032
  exports.GridviewComponent = GridviewComponent;
10041
10033
  exports.GridviewPanel = GridviewPanel;
10042
- exports.PROPERTY_KEYS = PROPERTY_KEYS;
10034
+ exports.PROPERTY_KEYS_DOCKVIEW = PROPERTY_KEYS_DOCKVIEW;
10035
+ exports.PROPERTY_KEYS_GRIDVIEW = PROPERTY_KEYS_GRIDVIEW;
10036
+ exports.PROPERTY_KEYS_PANEVIEW = PROPERTY_KEYS_PANEVIEW;
10037
+ exports.PROPERTY_KEYS_SPLITVIEW = PROPERTY_KEYS_SPLITVIEW;
10043
10038
  exports.PaneFramework = PaneFramework;
10044
10039
  exports.PaneTransfer = PaneTransfer;
10045
10040
  exports.PanelTransfer = PanelTransfer;
@@ -10047,6 +10042,7 @@
10047
10042
  exports.PaneviewApi = PaneviewApi;
10048
10043
  exports.PaneviewComponent = PaneviewComponent;
10049
10044
  exports.PaneviewPanel = PaneviewPanel;
10045
+ exports.PaneviewUnhandledDragOverEvent = PaneviewUnhandledDragOverEvent;
10050
10046
  exports.Splitview = Splitview;
10051
10047
  exports.SplitviewApi = SplitviewApi;
10052
10048
  exports.SplitviewComponent = SplitviewComponent;