dockview-react 4.2.5 → 4.3.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-react
3
- * @version 4.2.5
3
+ * @version 4.3.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -3987,9 +3987,9 @@
3987
3987
  onDragOver: (e) => {
3988
3988
  var _a, _b, _c, _d, _e, _f, _g;
3989
3989
  Droptarget.ACTUAL_TARGET = this;
3990
- const overrideTraget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
3990
+ const overrideTarget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
3991
3991
  if (this._acceptedTargetZonesSet.size === 0) {
3992
- if (overrideTraget) {
3992
+ if (overrideTarget) {
3993
3993
  return;
3994
3994
  }
3995
3995
  this.removeDropTarget();
@@ -4016,7 +4016,7 @@
4016
4016
  return;
4017
4017
  }
4018
4018
  if (!this.options.canDisplayOverlay(e, quadrant)) {
4019
- if (overrideTraget) {
4019
+ if (overrideTarget) {
4020
4020
  return;
4021
4021
  }
4022
4022
  this.removeDropTarget();
@@ -4036,7 +4036,7 @@
4036
4036
  return;
4037
4037
  }
4038
4038
  this.markAsUsed(e);
4039
- if (overrideTraget) ;
4039
+ if (overrideTarget) ;
4040
4040
  else if (!this.targetElement) {
4041
4041
  this.targetElement = document.createElement('div');
4042
4042
  this.targetElement.className = 'dv-drop-target-dropzone';
@@ -5145,7 +5145,7 @@
5145
5145
  this.accessor.doSetGroupActive(this.group);
5146
5146
  }));
5147
5147
  const handler = new GroupDragHandler(this._element, accessor, group);
5148
- this.dropTraget = new Droptarget(this._element, {
5148
+ this.dropTarget = new Droptarget(this._element, {
5149
5149
  acceptedTargetZones: ['center'],
5150
5150
  canDisplayOverlay: (event, position) => {
5151
5151
  const data = getPanelData();
@@ -5156,12 +5156,12 @@
5156
5156
  },
5157
5157
  getOverrideTarget: () => { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
5158
5158
  });
5159
- this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
5159
+ this.onWillShowOverlay = this.dropTarget.onWillShowOverlay;
5160
5160
  this.addDisposables(handler, handler.onDragStart((event) => {
5161
5161
  this._onDragStart.fire(event);
5162
- }), this.dropTraget.onDrop((event) => {
5162
+ }), this.dropTarget.onDrop((event) => {
5163
5163
  this._onDrop.fire(event);
5164
- }), this.dropTraget);
5164
+ }), this.dropTarget);
5165
5165
  }
5166
5166
  }
5167
5167
 
@@ -8449,9 +8449,11 @@
8449
8449
  const gready = document.createElement('div');
8450
8450
  gready.className = 'dv-overlay-render-container';
8451
8451
  const overlayRenderContainer = new OverlayRenderContainer(gready, this);
8452
- const referenceGroup = itemToPopout instanceof DockviewPanel
8453
- ? itemToPopout.group
8454
- : itemToPopout;
8452
+ const referenceGroup = (options === null || options === void 0 ? void 0 : options.referenceGroup)
8453
+ ? options.referenceGroup
8454
+ : itemToPopout instanceof DockviewPanel
8455
+ ? itemToPopout.group
8456
+ : itemToPopout;
8455
8457
  const referenceLocation = itemToPopout.api.location.type;
8456
8458
  /**
8457
8459
  * The group that is being added doesn't already exist within the DOM, the most likely occurance
@@ -8939,7 +8941,7 @@
8939
8941
  return result;
8940
8942
  }
8941
8943
  fromJSON(data) {
8942
- var _a, _b, _c;
8944
+ var _a, _b;
8943
8945
  this.clear();
8944
8946
  if (typeof data !== 'object' || data === null) {
8945
8947
  throw new Error('serialized layout must be a non-null object');
@@ -9011,12 +9013,11 @@
9011
9013
  for (const serializedPopoutGroup of serializedPopoutGroups) {
9012
9014
  const { data, position, gridReferenceGroup, url } = serializedPopoutGroup;
9013
9015
  const group = createGroupFromSerializedState(data);
9014
- this.addPopoutGroup((_c = (gridReferenceGroup
9015
- ? this.getPanel(gridReferenceGroup)
9016
- : undefined)) !== null && _c !== void 0 ? _c : group, {
9016
+ this.addPopoutGroup(group, {
9017
9017
  position: position !== null && position !== void 0 ? position : undefined,
9018
- overridePopoutGroup: gridReferenceGroup
9019
- ? group
9018
+ overridePopoutGroup: gridReferenceGroup ? group : undefined,
9019
+ referenceGroup: gridReferenceGroup
9020
+ ? this.getPanel(gridReferenceGroup)
9020
9021
  : undefined,
9021
9022
  popoutUrl: url,
9022
9023
  });