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
  */
@@ -3957,9 +3957,9 @@
3957
3957
  onDragOver: (e) => {
3958
3958
  var _a, _b, _c, _d, _e, _f, _g;
3959
3959
  Droptarget.ACTUAL_TARGET = this;
3960
- const overrideTraget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
3960
+ const overrideTarget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
3961
3961
  if (this._acceptedTargetZonesSet.size === 0) {
3962
- if (overrideTraget) {
3962
+ if (overrideTarget) {
3963
3963
  return;
3964
3964
  }
3965
3965
  this.removeDropTarget();
@@ -3986,7 +3986,7 @@
3986
3986
  return;
3987
3987
  }
3988
3988
  if (!this.options.canDisplayOverlay(e, quadrant)) {
3989
- if (overrideTraget) {
3989
+ if (overrideTarget) {
3990
3990
  return;
3991
3991
  }
3992
3992
  this.removeDropTarget();
@@ -4006,7 +4006,7 @@
4006
4006
  return;
4007
4007
  }
4008
4008
  this.markAsUsed(e);
4009
- if (overrideTraget) ;
4009
+ if (overrideTarget) ;
4010
4010
  else if (!this.targetElement) {
4011
4011
  this.targetElement = document.createElement('div');
4012
4012
  this.targetElement.className = 'dv-drop-target-dropzone';
@@ -5115,7 +5115,7 @@
5115
5115
  this.accessor.doSetGroupActive(this.group);
5116
5116
  }));
5117
5117
  const handler = new GroupDragHandler(this._element, accessor, group);
5118
- this.dropTraget = new Droptarget(this._element, {
5118
+ this.dropTarget = new Droptarget(this._element, {
5119
5119
  acceptedTargetZones: ['center'],
5120
5120
  canDisplayOverlay: (event, position) => {
5121
5121
  const data = getPanelData();
@@ -5126,12 +5126,12 @@
5126
5126
  },
5127
5127
  getOverrideTarget: () => { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
5128
5128
  });
5129
- this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
5129
+ this.onWillShowOverlay = this.dropTarget.onWillShowOverlay;
5130
5130
  this.addDisposables(handler, handler.onDragStart((event) => {
5131
5131
  this._onDragStart.fire(event);
5132
- }), this.dropTraget.onDrop((event) => {
5132
+ }), this.dropTarget.onDrop((event) => {
5133
5133
  this._onDrop.fire(event);
5134
- }), this.dropTraget);
5134
+ }), this.dropTarget);
5135
5135
  }
5136
5136
  }
5137
5137
 
@@ -8419,9 +8419,11 @@
8419
8419
  const gready = document.createElement('div');
8420
8420
  gready.className = 'dv-overlay-render-container';
8421
8421
  const overlayRenderContainer = new OverlayRenderContainer(gready, this);
8422
- const referenceGroup = itemToPopout instanceof DockviewPanel
8423
- ? itemToPopout.group
8424
- : itemToPopout;
8422
+ const referenceGroup = (options === null || options === void 0 ? void 0 : options.referenceGroup)
8423
+ ? options.referenceGroup
8424
+ : itemToPopout instanceof DockviewPanel
8425
+ ? itemToPopout.group
8426
+ : itemToPopout;
8425
8427
  const referenceLocation = itemToPopout.api.location.type;
8426
8428
  /**
8427
8429
  * The group that is being added doesn't already exist within the DOM, the most likely occurance
@@ -8909,7 +8911,7 @@
8909
8911
  return result;
8910
8912
  }
8911
8913
  fromJSON(data) {
8912
- var _a, _b, _c;
8914
+ var _a, _b;
8913
8915
  this.clear();
8914
8916
  if (typeof data !== 'object' || data === null) {
8915
8917
  throw new Error('serialized layout must be a non-null object');
@@ -8981,12 +8983,11 @@
8981
8983
  for (const serializedPopoutGroup of serializedPopoutGroups) {
8982
8984
  const { data, position, gridReferenceGroup, url } = serializedPopoutGroup;
8983
8985
  const group = createGroupFromSerializedState(data);
8984
- this.addPopoutGroup((_c = (gridReferenceGroup
8985
- ? this.getPanel(gridReferenceGroup)
8986
- : undefined)) !== null && _c !== void 0 ? _c : group, {
8986
+ this.addPopoutGroup(group, {
8987
8987
  position: position !== null && position !== void 0 ? position : undefined,
8988
- overridePopoutGroup: gridReferenceGroup
8989
- ? group
8988
+ overridePopoutGroup: gridReferenceGroup ? group : undefined,
8989
+ referenceGroup: gridReferenceGroup
8990
+ ? this.getPanel(gridReferenceGroup)
8990
8991
  : undefined,
8991
8992
  popoutUrl: url,
8992
8993
  });