dockview-react 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.
- package/dist/dockview-react.amd.js +38 -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 +38 -18
- package/dist/dockview-react.amd.noStyle.js.map +1 -1
- package/dist/dockview-react.cjs.js +38 -18
- package/dist/dockview-react.cjs.js.map +1 -1
- package/dist/dockview-react.esm.js +38 -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 +38 -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 +38 -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,9 +2802,9 @@ 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
|
-
super(
|
|
2807
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
2808
2808
|
this._id = nextLayoutId$1.next();
|
|
2809
2809
|
this._groups = new Map();
|
|
2810
2810
|
this._onDidRemove = new Emitter();
|
|
@@ -2823,6 +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
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
2827
|
+
container.appendChild(this.element);
|
|
2826
2828
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
2827
2829
|
this.gridview.locked = !!options.locked;
|
|
2828
2830
|
this.element.appendChild(this.gridview.element);
|
|
@@ -7519,9 +7521,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
7519
7521
|
get floatingGroups() {
|
|
7520
7522
|
return this._floatingGroups;
|
|
7521
7523
|
}
|
|
7522
|
-
constructor(
|
|
7524
|
+
constructor(container, options) {
|
|
7523
7525
|
var _a;
|
|
7524
|
-
super(
|
|
7526
|
+
super(container, {
|
|
7525
7527
|
proportionalLayout: true,
|
|
7526
7528
|
orientation: exports.Orientation.HORIZONTAL,
|
|
7527
7529
|
styles: options.hideBorders
|
|
@@ -7877,6 +7879,16 @@ class DockviewComponent extends BaseGrid {
|
|
|
7877
7879
|
group.model.renderContainer =
|
|
7878
7880
|
this.overlayRenderContainer;
|
|
7879
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
|
+
}
|
|
7880
7892
|
if (floatingBox) {
|
|
7881
7893
|
this.addFloatingGroup(group, {
|
|
7882
7894
|
height: floatingBox.height,
|
|
@@ -9053,9 +9065,9 @@ class GridviewComponent extends BaseGrid {
|
|
|
9053
9065
|
set deserializer(value) {
|
|
9054
9066
|
this._deserializer = value;
|
|
9055
9067
|
}
|
|
9056
|
-
constructor(
|
|
9068
|
+
constructor(container, options) {
|
|
9057
9069
|
var _a;
|
|
9058
|
-
super(
|
|
9070
|
+
super(container, {
|
|
9059
9071
|
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9060
9072
|
orientation: options.orientation,
|
|
9061
9073
|
styles: options.hideBorders
|
|
@@ -9344,9 +9356,9 @@ class SplitviewComponent extends Resizable {
|
|
|
9344
9356
|
? this.splitview.size
|
|
9345
9357
|
: this.splitview.orthogonalSize;
|
|
9346
9358
|
}
|
|
9347
|
-
constructor(
|
|
9359
|
+
constructor(container, options) {
|
|
9348
9360
|
var _a;
|
|
9349
|
-
super(
|
|
9361
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
9350
9362
|
this._splitviewChangeDisposable = new MutableDisposable();
|
|
9351
9363
|
this._panels = new Map();
|
|
9352
9364
|
this._onDidLayoutfromJSON = new Emitter();
|
|
@@ -9357,8 +9369,12 @@ class SplitviewComponent extends Resizable {
|
|
|
9357
9369
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9358
9370
|
this._onDidLayoutChange = new Emitter();
|
|
9359
9371
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
9372
|
+
this.element.style.height = '100%';
|
|
9373
|
+
this.element.style.width = '100%';
|
|
9360
9374
|
this._classNames = new Classnames(this.element);
|
|
9361
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);
|
|
9362
9378
|
this._options = options;
|
|
9363
9379
|
this.splitview = new Splitview(this.element, options);
|
|
9364
9380
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
@@ -9668,9 +9684,9 @@ class PaneviewComponent extends Resizable {
|
|
|
9668
9684
|
get options() {
|
|
9669
9685
|
return this._options;
|
|
9670
9686
|
}
|
|
9671
|
-
constructor(
|
|
9687
|
+
constructor(container, options) {
|
|
9672
9688
|
var _a;
|
|
9673
|
-
super(
|
|
9689
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
9674
9690
|
this._id = nextLayoutId.next();
|
|
9675
9691
|
this._disposable = new MutableDisposable();
|
|
9676
9692
|
this._viewDisposables = new Map();
|
|
@@ -9686,9 +9702,13 @@ class PaneviewComponent extends Resizable {
|
|
|
9686
9702
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9687
9703
|
this._onUnhandledDragOverEvent = new Emitter();
|
|
9688
9704
|
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
9705
|
+
this.element.style.height = '100%';
|
|
9706
|
+
this.element.style.width = '100%';
|
|
9689
9707
|
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
9690
9708
|
this._classNames = new Classnames(this.element);
|
|
9691
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);
|
|
9692
9712
|
this._options = options;
|
|
9693
9713
|
this.paneview = new Paneview(this.element, {
|
|
9694
9714
|
// only allow paneview in the vertical orientation for now
|
|
@@ -10508,7 +10528,7 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
10508
10528
|
createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
10509
10529
|
});
|
|
10510
10530
|
}, [props.prefixHeaderActionsComponent]);
|
|
10511
|
-
return (React.createElement("div", {
|
|
10531
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10512
10532
|
});
|
|
10513
10533
|
DockviewReact.displayName = 'DockviewComponent';
|
|
10514
10534
|
|
|
@@ -10645,7 +10665,7 @@ const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
10645
10665
|
},
|
|
10646
10666
|
});
|
|
10647
10667
|
}, [props.components]);
|
|
10648
|
-
return (React.createElement("div", {
|
|
10668
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10649
10669
|
});
|
|
10650
10670
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
10651
10671
|
|
|
@@ -10728,7 +10748,7 @@ const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
10728
10748
|
},
|
|
10729
10749
|
});
|
|
10730
10750
|
}, [props.components]);
|
|
10731
|
-
return (React.createElement("div", {
|
|
10751
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10732
10752
|
});
|
|
10733
10753
|
GridviewReact.displayName = 'GridviewComponent';
|
|
10734
10754
|
|
|
@@ -10860,7 +10880,7 @@ const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
10860
10880
|
disposable.dispose();
|
|
10861
10881
|
};
|
|
10862
10882
|
}, [props.onDidDrop]);
|
|
10863
|
-
return (React.createElement("div", {
|
|
10883
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10864
10884
|
});
|
|
10865
10885
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
10866
10886
|
|