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
|
*/
|
|
@@ -881,7 +881,7 @@ class Splitview {
|
|
|
881
881
|
this._margin = value;
|
|
882
882
|
}
|
|
883
883
|
constructor(container, options) {
|
|
884
|
-
var _a;
|
|
884
|
+
var _a, _b;
|
|
885
885
|
this.container = container;
|
|
886
886
|
this.viewItems = [];
|
|
887
887
|
this.sashes = [];
|
|
@@ -979,9 +979,9 @@ class Splitview {
|
|
|
979
979
|
//
|
|
980
980
|
return delta;
|
|
981
981
|
};
|
|
982
|
-
this._orientation = options.orientation;
|
|
982
|
+
this._orientation = (_a = options.orientation) !== null && _a !== void 0 ? _a : Orientation.VERTICAL;
|
|
983
983
|
this.element = this.createContainer();
|
|
984
|
-
this.margin = (
|
|
984
|
+
this.margin = (_b = options.margin) !== null && _b !== void 0 ? _b : 0;
|
|
985
985
|
this.proportionalLayout =
|
|
986
986
|
options.proportionalLayout === undefined
|
|
987
987
|
? true
|
|
@@ -2800,9 +2800,9 @@ class BaseGrid extends Resizable {
|
|
|
2800
2800
|
set locked(value) {
|
|
2801
2801
|
this.gridview.locked = value;
|
|
2802
2802
|
}
|
|
2803
|
-
constructor(
|
|
2803
|
+
constructor(container, options) {
|
|
2804
2804
|
var _a;
|
|
2805
|
-
super(
|
|
2805
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
2806
2806
|
this._id = nextLayoutId$1.next();
|
|
2807
2807
|
this._groups = new Map();
|
|
2808
2808
|
this._onDidRemove = new Emitter();
|
|
@@ -2821,6 +2821,8 @@ class BaseGrid extends Resizable {
|
|
|
2821
2821
|
this.element.style.width = '100%';
|
|
2822
2822
|
this._classNames = new Classnames(this.element);
|
|
2823
2823
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
2824
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
2825
|
+
container.appendChild(this.element);
|
|
2824
2826
|
this.gridview = new Gridview(!!options.proportionalLayout, options.styles, options.orientation, options.locked, options.margin);
|
|
2825
2827
|
this.gridview.locked = !!options.locked;
|
|
2826
2828
|
this.element.appendChild(this.gridview.element);
|
|
@@ -7517,9 +7519,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
7517
7519
|
get floatingGroups() {
|
|
7518
7520
|
return this._floatingGroups;
|
|
7519
7521
|
}
|
|
7520
|
-
constructor(
|
|
7522
|
+
constructor(container, options) {
|
|
7521
7523
|
var _a;
|
|
7522
|
-
super(
|
|
7524
|
+
super(container, {
|
|
7523
7525
|
proportionalLayout: true,
|
|
7524
7526
|
orientation: Orientation.HORIZONTAL,
|
|
7525
7527
|
styles: options.hideBorders
|
|
@@ -7875,6 +7877,16 @@ class DockviewComponent extends BaseGrid {
|
|
|
7875
7877
|
group.model.renderContainer =
|
|
7876
7878
|
this.overlayRenderContainer;
|
|
7877
7879
|
returnedGroup = group;
|
|
7880
|
+
const alreadyRemoved = !this._popoutGroups.find((p) => p.popoutGroup === group);
|
|
7881
|
+
if (alreadyRemoved) {
|
|
7882
|
+
/**
|
|
7883
|
+
* If this popout group was explicitly removed then we shouldn't run the additional
|
|
7884
|
+
* steps. To tell if the running of this disposable is the result of this popout group
|
|
7885
|
+
* being explicitly removed we can check if this popout group is still referenced in
|
|
7886
|
+
* the `this._popoutGroups` list.
|
|
7887
|
+
*/
|
|
7888
|
+
return;
|
|
7889
|
+
}
|
|
7878
7890
|
if (floatingBox) {
|
|
7879
7891
|
this.addFloatingGroup(group, {
|
|
7880
7892
|
height: floatingBox.height,
|
|
@@ -9051,9 +9063,9 @@ class GridviewComponent extends BaseGrid {
|
|
|
9051
9063
|
set deserializer(value) {
|
|
9052
9064
|
this._deserializer = value;
|
|
9053
9065
|
}
|
|
9054
|
-
constructor(
|
|
9066
|
+
constructor(container, options) {
|
|
9055
9067
|
var _a;
|
|
9056
|
-
super(
|
|
9068
|
+
super(container, {
|
|
9057
9069
|
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
9058
9070
|
orientation: options.orientation,
|
|
9059
9071
|
styles: options.hideBorders
|
|
@@ -9342,9 +9354,9 @@ class SplitviewComponent extends Resizable {
|
|
|
9342
9354
|
? this.splitview.size
|
|
9343
9355
|
: this.splitview.orthogonalSize;
|
|
9344
9356
|
}
|
|
9345
|
-
constructor(
|
|
9357
|
+
constructor(container, options) {
|
|
9346
9358
|
var _a;
|
|
9347
|
-
super(
|
|
9359
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
9348
9360
|
this._splitviewChangeDisposable = new MutableDisposable();
|
|
9349
9361
|
this._panels = new Map();
|
|
9350
9362
|
this._onDidLayoutfromJSON = new Emitter();
|
|
@@ -9355,8 +9367,12 @@ class SplitviewComponent extends Resizable {
|
|
|
9355
9367
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9356
9368
|
this._onDidLayoutChange = new Emitter();
|
|
9357
9369
|
this.onDidLayoutChange = this._onDidLayoutChange.event;
|
|
9370
|
+
this.element.style.height = '100%';
|
|
9371
|
+
this.element.style.width = '100%';
|
|
9358
9372
|
this._classNames = new Classnames(this.element);
|
|
9359
9373
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9374
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
9375
|
+
container.appendChild(this.element);
|
|
9360
9376
|
this._options = options;
|
|
9361
9377
|
this.splitview = new Splitview(this.element, options);
|
|
9362
9378
|
this.addDisposables(this._onDidAddView, this._onDidLayoutfromJSON, this._onDidRemoveView, this._onDidLayoutChange);
|
|
@@ -9666,9 +9682,9 @@ class PaneviewComponent extends Resizable {
|
|
|
9666
9682
|
get options() {
|
|
9667
9683
|
return this._options;
|
|
9668
9684
|
}
|
|
9669
|
-
constructor(
|
|
9685
|
+
constructor(container, options) {
|
|
9670
9686
|
var _a;
|
|
9671
|
-
super(
|
|
9687
|
+
super(document.createElement('div'), options.disableAutoResizing);
|
|
9672
9688
|
this._id = nextLayoutId.next();
|
|
9673
9689
|
this._disposable = new MutableDisposable();
|
|
9674
9690
|
this._viewDisposables = new Map();
|
|
@@ -9684,9 +9700,13 @@ class PaneviewComponent extends Resizable {
|
|
|
9684
9700
|
this.onDidRemoveView = this._onDidRemoveView.event;
|
|
9685
9701
|
this._onUnhandledDragOverEvent = new Emitter();
|
|
9686
9702
|
this.onUnhandledDragOverEvent = this._onUnhandledDragOverEvent.event;
|
|
9703
|
+
this.element.style.height = '100%';
|
|
9704
|
+
this.element.style.width = '100%';
|
|
9687
9705
|
this.addDisposables(this._onDidLayoutChange, this._onDidLayoutfromJSON, this._onDidDrop, this._onDidAddView, this._onDidRemoveView, this._onUnhandledDragOverEvent);
|
|
9688
9706
|
this._classNames = new Classnames(this.element);
|
|
9689
9707
|
this._classNames.setClassNames((_a = options.className) !== null && _a !== void 0 ? _a : '');
|
|
9708
|
+
// the container is owned by the third-party, do not modify/delete it
|
|
9709
|
+
container.appendChild(this.element);
|
|
9690
9710
|
this._options = options;
|
|
9691
9711
|
this.paneview = new Paneview(this.element, {
|
|
9692
9712
|
// only allow paneview in the vertical orientation for now
|
|
@@ -10506,7 +10526,7 @@ const DockviewReact = React.forwardRef((props, ref) => {
|
|
|
10506
10526
|
createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
10507
10527
|
});
|
|
10508
10528
|
}, [props.prefixHeaderActionsComponent]);
|
|
10509
|
-
return (React.createElement("div", {
|
|
10529
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10510
10530
|
});
|
|
10511
10531
|
DockviewReact.displayName = 'DockviewComponent';
|
|
10512
10532
|
|
|
@@ -10643,7 +10663,7 @@ const SplitviewReact = React.forwardRef((props, ref) => {
|
|
|
10643
10663
|
},
|
|
10644
10664
|
});
|
|
10645
10665
|
}, [props.components]);
|
|
10646
|
-
return (React.createElement("div", {
|
|
10666
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10647
10667
|
});
|
|
10648
10668
|
SplitviewReact.displayName = 'SplitviewComponent';
|
|
10649
10669
|
|
|
@@ -10726,7 +10746,7 @@ const GridviewReact = React.forwardRef((props, ref) => {
|
|
|
10726
10746
|
},
|
|
10727
10747
|
});
|
|
10728
10748
|
}, [props.components]);
|
|
10729
|
-
return (React.createElement("div", {
|
|
10749
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10730
10750
|
});
|
|
10731
10751
|
GridviewReact.displayName = 'GridviewComponent';
|
|
10732
10752
|
|
|
@@ -10858,7 +10878,7 @@ const PaneviewReact = React.forwardRef((props, ref) => {
|
|
|
10858
10878
|
disposable.dispose();
|
|
10859
10879
|
};
|
|
10860
10880
|
}, [props.onDidDrop]);
|
|
10861
|
-
return (React.createElement("div", {
|
|
10881
|
+
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
10862
10882
|
});
|
|
10863
10883
|
PaneviewReact.displayName = 'PaneviewComponent';
|
|
10864
10884
|
|