dockview-react 3.0.0 → 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.
- package/dist/dockview-react.amd.js +37 -18
- package/dist/dockview-react.amd.js.map +1 -1
- package/dist/dockview-react.amd.min.js +2 -2
- package/dist/dockview-react.amd.min.js.map +1 -1
- package/dist/dockview-react.amd.min.noStyle.js +2 -2
- package/dist/dockview-react.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-react.amd.noStyle.js +37 -18
- package/dist/dockview-react.amd.noStyle.js.map +1 -1
- package/dist/dockview-react.cjs.js +37 -18
- package/dist/dockview-react.cjs.js.map +1 -1
- package/dist/dockview-react.esm.js +37 -18
- package/dist/dockview-react.esm.js.map +1 -1
- package/dist/dockview-react.esm.min.js +2 -2
- package/dist/dockview-react.esm.min.js.map +1 -1
- package/dist/dockview-react.js +37 -18
- package/dist/dockview-react.js.map +1 -1
- package/dist/dockview-react.min.js +2 -2
- package/dist/dockview-react.min.js.map +1 -1
- package/dist/dockview-react.min.noStyle.js +2 -2
- package/dist/dockview-react.min.noStyle.js.map +1 -1
- package/dist/dockview-react.noStyle.js +37 -18
- package/dist/dockview-react.noStyle.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-react
|
|
3
|
-
* @version 3.0.
|
|
3
|
+
* @version 3.0.2
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -883,7 +883,7 @@ class Splitview {
|
|
|
883
883
|
this._margin = value;
|
|
884
884
|
}
|
|
885
885
|
constructor(container, options) {
|
|
886
|
-
var _a;
|
|
886
|
+
var _a, _b;
|
|
887
887
|
this.container = container;
|
|
888
888
|
this.viewItems = [];
|
|
889
889
|
this.sashes = [];
|
|
@@ -981,9 +981,9 @@ class Splitview {
|
|
|
981
981
|
//
|
|
982
982
|
return delta;
|
|
983
983
|
};
|
|
984
|
-
this._orientation = options.orientation;
|
|
984
|
+
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : exports.Orientation.VERTICAL;
|
|
985
985
|
this.element = this.createContainer();
|
|
986
|
-
this.margin = (
|
|
986
|
+
this.margin = (_b = options.margin) !== null && _b !== void 0 ? _b : 0;
|
|
987
987
|
this.proportionalLayout =
|
|
988
988
|
options.proportionalLayout === undefined
|
|
989
989
|
? true
|
|
@@ -2802,7 +2802,7 @@ class BaseGrid extends Resizable {
|
|
|
2802
2802
|
set locked(value) {
|
|
2803
2803
|
this.gridview.locked = value;
|
|
2804
2804
|
}
|
|
2805
|
-
constructor(
|
|
2805
|
+
constructor(container, options) {
|
|
2806
2806
|
var _a;
|
|
2807
2807
|
super(document.createElement('div'), options.disableAutoResizing);
|
|
2808
2808
|
this._id = nextLayoutId$1.next();
|
|
@@ -2823,7 +2823,8 @@ class BaseGrid extends Resizable {
|
|
|
2823
2823
|
this.element.style.width = '100%';
|
|
2824
2824
|
this._classNames = new Classnames(this.element);
|
|
2825
2825
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
2826
|
-
|
|
2826
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
2827
|
+
container.appendChild(this.element);
|
|
2827
2828
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
2828
2829
|
this.gridview.locked = !!options.locked;
|
|
2829
2830
|
this.element.appendChild(this.gridview.element);
|
|
@@ -7520,9 +7521,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
7520
7521
|
get floatingGroups() {
|
|
7521
7522
|
return this._floatingGroups;
|
|
7522
7523
|
}
|
|
7523
|
-
constructor(
|
|
7524
|
+
constructor(container, options) {
|
|
7524
7525
|
var _a;
|
|
7525
|
-
super(
|
|
7526
|
+
super(container, {
|
|
7526
7527
|
proportionalLayout: true,
|
|
7527
7528
|
orientation: exports.Orientation.HORIZONTAL,
|
|
7528
7529
|
styles: options.hideBorders
|
|
@@ -7878,6 +7879,16 @@ class DockviewComponent extends BaseGrid {
|
|
|
7878
7879
|
group.model.renderContainer =
|
|
7879
7880
|
this.overlayRenderContainer;
|
|
7880
7881
|
returnedGroup = group;
|
|
7882
|
+
const alreadyRemoved = !this._popoutGroups.find((p) => p.popoutGroup === group);
|
|
7883
|
+
if (alreadyRemoved) {
|
|
7884
|
+
/**
|
|
7885
|
+
* If this popout group was explicitly removed then we shouldn't run the additional
|
|
7886
|
+
* steps. To tell if the running of this disposable is the result of this popout group
|
|
7887
|
+
* being explicitly removed we can check if this popout group is still referenced in
|
|
7888
|
+
* the `this._popoutGroups` list.
|
|
7889
|
+
*/
|
|
7890
|
+
return;
|
|
7891
|
+
}
|
|
7881
7892
|
if (floatingBox) {
|
|
7882
7893
|
this.addFloatingGroup(group, {
|
|
7883
7894
|
height: floatingBox.height,
|
|
@@ -9054,9 +9065,9 @@ class GridviewComponent extends BaseGrid {
|
|
|
9054
9065
|
set deserializer(value) {
|
|
9055
9066
|
this._deserializer = value;
|
|
9056
9067
|
}
|
|
9057
|
-
constructor(
|
|
9068
|
+
constructor(container, options) {
|
|
9058
9069
|
var _a;
|
|
9059
|
-
super(
|
|
9070
|
+
super(container, {
|
|
9060
9071
|
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9061
9072
|
orientation: options.orientation,
|
|
9062
9073
|
styles: options.hideBorders
|
|
@@ -9345,9 +9356,9 @@ class SplitviewComponent extends Resizable {
|
|
|
9345
9356
|
? this.splitview.size
|
|
9346
9357
|
: this.splitview.orthogonalSize;
|
|
9347
9358
|
}
|
|
9348
|
-
constructor(
|
|
9359
|
+
constructor(container, options) {
|
|
9349
9360
|
var _a;
|
|
9350
|
-
super(
|
|
9361
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
9351
9362
|
this._splitviewChangeDisposable = new MutableDisposable();
|
|
9352
9363
|
this._panels = new Map();
|
|
9353
9364
|
this._onDidLayoutfromJSON = new Emitter();
|
|
@@ -9358,8 +9369,12 @@ class SplitviewComponent extends Resizable {
|
|
|
9358
9369
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9359
9370
|
this._onDidLayoutChange = new Emitter();
|
|
9360
9371
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
9372
|
+
this.element.style.height = '100%';
|
|
9373
|
+
this.element.style.width = '100%';
|
|
9361
9374
|
this._classNames = new Classnames(this.element);
|
|
9362
9375
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9376
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
9377
|
+
container.appendChild(this.element);
|
|
9363
9378
|
this._options = options;
|
|
9364
9379
|
this.splitview = new Splitview(this.element, options);
|
|
9365
9380
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
@@ -9669,9 +9684,9 @@ class PaneviewComponent extends Resizable {
|
|
|
9669
9684
|
get options() {
|
|
9670
9685
|
return this._options;
|
|
9671
9686
|
}
|
|
9672
|
-
constructor(
|
|
9687
|
+
constructor(container, options) {
|
|
9673
9688
|
var _a;
|
|
9674
|
-
super(
|
|
9689
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
9675
9690
|
this._id = nextLayoutId.next();
|
|
9676
9691
|
this._disposable = new MutableDisposable();
|
|
9677
9692
|
this._viewDisposables = new Map();
|
|
@@ -9687,9 +9702,13 @@ class PaneviewComponent extends Resizable {
|
|
|
9687
9702
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9688
9703
|
this._onUnhandledDragOverEvent = new Emitter();
|
|
9689
9704
|
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
9705
|
+
this.element.style.height = '100%';
|
|
9706
|
+
this.element.style.width = '100%';
|
|
9690
9707
|
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
9691
9708
|
this._classNames = new Classnames(this.element);
|
|
9692
9709
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9710
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
9711
|
+
container.appendChild(this.element);
|
|
9693
9712
|
this._options = options;
|
|
9694
9713
|
this.paneview = new Paneview(this.element, {
|
|
9695
9714
|
// only allow paneview in the vertical orientation for now
|
|
@@ -10509,7 +10528,7 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
10509
10528
|
createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
10510
10529
|
});
|
|
10511
10530
|
}, [props.prefixHeaderActionsComponent]);
|
|
10512
|
-
return (React.createElement("div", {
|
|
10531
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10513
10532
|
});
|
|
10514
10533
|
DockviewReact.displayName = 'DockviewComponent';
|
|
10515
10534
|
|
|
@@ -10646,7 +10665,7 @@ const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
10646
10665
|
},
|
|
10647
10666
|
});
|
|
10648
10667
|
}, [props.components]);
|
|
10649
|
-
return (React.createElement("div", {
|
|
10668
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10650
10669
|
});
|
|
10651
10670
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
10652
10671
|
|
|
@@ -10729,7 +10748,7 @@ const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
10729
10748
|
},
|
|
10730
10749
|
});
|
|
10731
10750
|
}, [props.components]);
|
|
10732
|
-
return (React.createElement("div", {
|
|
10751
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10733
10752
|
});
|
|
10734
10753
|
GridviewReact.displayName = 'GridviewComponent';
|
|
10735
10754
|
|
|
@@ -10861,7 +10880,7 @@ const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
10861
10880
|
disposable.dispose();
|
|
10862
10881
|
};
|
|
10863
10882
|
}, [props.onDidDrop]);
|
|
10864
|
-
return (React.createElement("div", {
|
|
10883
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10865
10884
|
});
|
|
10866
10885
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
10867
10886
|
|