dockview 3.0.1 → 3.0.2

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.
@@ -225,6 +225,6 @@ exports.DockviewReact = react_1.default.forwardRef(function (props, ref) {
225
225
  createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal: addPortal }),
226
226
  });
227
227
  }, [props.prefixHeaderActionsComponent]);
228
- return (react_1.default.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
228
+ return (react_1.default.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
229
229
  });
230
230
  exports.DockviewReact.displayName = 'DockviewComponent';
@@ -99,6 +99,6 @@ exports.GridviewReact = react_1.default.forwardRef(function (props, ref) {
99
99
  },
100
100
  });
101
101
  }, [props.components]);
102
- return (react_1.default.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
102
+ return (react_1.default.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
103
103
  });
104
104
  exports.GridviewReact.displayName = 'GridviewComponent';
@@ -131,6 +131,6 @@ exports.PaneviewReact = react_1.default.forwardRef(function (props, ref) {
131
131
  disposable.dispose();
132
132
  };
133
133
  }, [props.onDidDrop]);
134
- return (react_1.default.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
134
+ return (react_1.default.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
135
135
  });
136
136
  exports.PaneviewReact.displayName = 'PaneviewComponent';
@@ -99,6 +99,6 @@ exports.SplitviewReact = react_1.default.forwardRef(function (props, ref) {
99
99
  },
100
100
  });
101
101
  }, [props.components]);
102
- return (react_1.default.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
102
+ return (react_1.default.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
103
103
  });
104
104
  exports.SplitviewReact.displayName = 'SplitviewComponent';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview
3
- * @version 3.0.1
3
+ * @version 3.0.2
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -880,7 +880,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
880
880
  this._margin = value;
881
881
  }
882
882
  constructor(container, options) {
883
- var _a;
883
+ var _a, _b;
884
884
  this.container = container;
885
885
  this.viewItems = [];
886
886
  this.sashes = [];
@@ -978,9 +978,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
978
978
  //
979
979
  return delta;
980
980
  };
981
- this._orientation = options.orientation;
981
+ this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.VERTICAL;
982
982
  this.element = this.createContainer();
983
- this.margin = (_a = options.margin) !== null && _a !== void 0 ? _a : 0;
983
+ this.margin = (_b = options.margin) !== null && _b !== void 0 ? _b : 0;
984
984
  this.proportionalLayout =
985
985
  options.proportionalLayout === undefined
986
986
  ? true
@@ -2799,9 +2799,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2799
2799
  set locked(value) {
2800
2800
  this.gridview.locked = value;
2801
2801
  }
2802
- constructor(parentElement, options) {
2802
+ constructor(container, options) {
2803
2803
  var _a;
2804
- super(parentElement, options.disableAutoResizing);
2804
+ super(document.createElement('div'), options.disableAutoResizing);
2805
2805
  this._id = nextLayoutId$1.next();
2806
2806
  this._groups = new Map();
2807
2807
  this._onDidRemove = new Emitter();
@@ -2820,6 +2820,8 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
2820
2820
  this.element.style.width = '100%';
2821
2821
  this._classNames = new Classnames(this.element);
2822
2822
  this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
2823
+ // the container is owned by the third-party, do not modify/delete it
2824
+ container.appendChild(this.element);
2823
2825
  this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
2824
2826
  this.gridview.locked = !!options.locked;
2825
2827
  this.element.appendChild(this.gridview.element);
@@ -7516,9 +7518,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7516
7518
  get floatingGroups() {
7517
7519
  return this._floatingGroups;
7518
7520
  }
7519
- constructor(parentElement, options) {
7521
+ constructor(container, options) {
7520
7522
  var _a;
7521
- super(parentElement, {
7523
+ super(container, {
7522
7524
  proportionalLayout: true,
7523
7525
  orientation: exports.Orientation.HORIZONTAL,
7524
7526
  styles: options.hideBorders
@@ -7874,6 +7876,16 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
7874
7876
  group.model.renderContainer =
7875
7877
  this.overlayRenderContainer;
7876
7878
  returnedGroup = group;
7879
+ const alreadyRemoved = !this._popoutGroups.find((p) => p.popoutGroup === group);
7880
+ if (alreadyRemoved) {
7881
+ /**
7882
+ * If this popout group was explicitly removed then we shouldn't run the additional
7883
+ * steps. To tell if the running of this disposable is the result of this popout group
7884
+ * being explicitly removed we can check if this popout group is still referenced in
7885
+ * the `this._popoutGroups` list.
7886
+ */
7887
+ return;
7888
+ }
7877
7889
  if (floatingBox) {
7878
7890
  this.addFloatingGroup(group, {
7879
7891
  height: floatingBox.height,
@@ -9050,9 +9062,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9050
9062
  set deserializer(value) {
9051
9063
  this._deserializer = value;
9052
9064
  }
9053
- constructor(parentElement, options) {
9065
+ constructor(container, options) {
9054
9066
  var _a;
9055
- super(parentElement, {
9067
+ super(container, {
9056
9068
  proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
9057
9069
  orientation: options.orientation,
9058
9070
  styles: options.hideBorders
@@ -9341,9 +9353,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9341
9353
  ? this.splitview.size
9342
9354
  : this.splitview.orthogonalSize;
9343
9355
  }
9344
- constructor(parentElement, options) {
9356
+ constructor(container, options) {
9345
9357
  var _a;
9346
- super(parentElement, options.disableAutoResizing);
9358
+ super(document.createElement('div'), options.disableAutoResizing);
9347
9359
  this._splitviewChangeDisposable = new MutableDisposable();
9348
9360
  this._panels = new Map();
9349
9361
  this._onDidLayoutfromJSON = new Emitter();
@@ -9354,8 +9366,12 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9354
9366
  this.onDidRemoveView = this._onDidRemoveView.event;
9355
9367
  this._onDidLayoutChange = new Emitter();
9356
9368
  this.onDidLayoutChange = this._onDidLayoutChange.event;
9369
+ this.element.style.height = '100%';
9370
+ this.element.style.width = '100%';
9357
9371
  this._classNames = new Classnames(this.element);
9358
9372
  this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
9373
+ // the container is owned by the third-party, do not modify/delete it
9374
+ container.appendChild(this.element);
9359
9375
  this._options = options;
9360
9376
  this.splitview = new Splitview(this.element, options);
9361
9377
  this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
@@ -9665,9 +9681,9 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9665
9681
  get options() {
9666
9682
  return this._options;
9667
9683
  }
9668
- constructor(parentElement, options) {
9684
+ constructor(container, options) {
9669
9685
  var _a;
9670
- super(parentElement, options.disableAutoResizing);
9686
+ super(document.createElement('div'), options.disableAutoResizing);
9671
9687
  this._id = nextLayoutId.next();
9672
9688
  this._disposable = new MutableDisposable();
9673
9689
  this._viewDisposables = new Map();
@@ -9683,9 +9699,13 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
9683
9699
  this.onDidRemoveView = this._onDidRemoveView.event;
9684
9700
  this._onUnhandledDragOverEvent = new Emitter();
9685
9701
  this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
9702
+ this.element.style.height = '100%';
9703
+ this.element.style.width = '100%';
9686
9704
  this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
9687
9705
  this._classNames = new Classnames(this.element);
9688
9706
  this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
9707
+ // the container is owned by the third-party, do not modify/delete it
9708
+ container.appendChild(this.element);
9689
9709
  this._options = options;
9690
9710
  this.paneview = new Paneview(this.element, {
9691
9711
  // only allow paneview in the vertical orientation for now
@@ -10505,7 +10525,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
10505
10525
  createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
10506
10526
  });
10507
10527
  }, [props.prefixHeaderActionsComponent]);
10508
- return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10528
+ return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10509
10529
  });
10510
10530
  DockviewReact.displayName = 'DockviewComponent';
10511
10531
 
@@ -10665,7 +10685,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
10665
10685
  },
10666
10686
  });
10667
10687
  }, [props.components]);
10668
- return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10688
+ return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10669
10689
  });
10670
10690
  SplitviewReact.displayName = 'SplitviewComponent';
10671
10691
 
@@ -10748,7 +10768,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
10748
10768
  },
10749
10769
  });
10750
10770
  }, [props.components]);
10751
- return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10771
+ return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10752
10772
  });
10753
10773
  GridviewReact.displayName = 'GridviewComponent';
10754
10774
 
@@ -10880,7 +10900,7 @@ define(['exports', 'react', 'react-dom'], (function (exports, React, ReactDOM) {
10880
10900
  disposable.dispose();
10881
10901
  };
10882
10902
  }, [props.onDidDrop]);
10883
- return (React.createElement("div", { className: props.className, style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10903
+ return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
10884
10904
  });
10885
10905
  PaneviewReact.displayName = 'PaneviewComponent';
10886
10906