dockview-core 1.10.2 → 1.12.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.
- package/dist/cjs/api/dockviewPanelApi.d.ts +6 -0
- package/dist/cjs/api/panelApi.d.ts +4 -0
- package/dist/cjs/dockview/components/panel/content.js +2 -2
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +0 -2
- package/dist/cjs/dockview/components/tab/defaultTab.js +5 -14
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +12 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +2 -0
- package/dist/cjs/dockview/dockviewComponent.js +12 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +9 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +30 -2
- package/dist/cjs/overlayRenderContainer.d.ts +1 -1
- package/dist/dockview-core.amd.js +46 -22
- package/dist/dockview-core.amd.js.map +1 -1
- package/dist/dockview-core.amd.min.js +2 -2
- package/dist/dockview-core.amd.min.js.map +1 -1
- package/dist/dockview-core.amd.min.noStyle.js +2 -2
- package/dist/dockview-core.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-core.amd.noStyle.js +45 -21
- package/dist/dockview-core.amd.noStyle.js.map +1 -1
- package/dist/dockview-core.cjs.js +46 -22
- package/dist/dockview-core.cjs.js.map +1 -1
- package/dist/dockview-core.esm.js +46 -22
- package/dist/dockview-core.esm.js.map +1 -1
- package/dist/dockview-core.esm.min.js +2 -2
- package/dist/dockview-core.esm.min.js.map +1 -1
- package/dist/dockview-core.js +46 -22
- package/dist/dockview-core.js.map +1 -1
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +45 -21
- package/dist/dockview-core.noStyle.js.map +1 -1
- package/dist/esm/api/dockviewPanelApi.d.ts +6 -0
- package/dist/esm/api/panelApi.d.ts +4 -0
- package/dist/esm/dockview/components/panel/content.js +2 -2
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -2
- package/dist/esm/dockview/components/tab/defaultTab.js +5 -14
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +12 -1
- package/dist/esm/dockview/dockviewComponent.d.ts +2 -0
- package/dist/esm/dockview/dockviewComponent.js +8 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +9 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.js +18 -2
- package/dist/esm/overlayRenderContainer.d.ts +1 -1
- package/dist/styles/dockview.css +8 -18
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-core
|
|
3
|
-
* @version 1.
|
|
3
|
+
* @version 1.12.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -3547,7 +3547,7 @@
|
|
|
3547
3547
|
this.panel = panel;
|
|
3548
3548
|
let container;
|
|
3549
3549
|
switch (panel.api.renderer) {
|
|
3550
|
-
case '
|
|
3550
|
+
case 'onlyWhenVisible':
|
|
3551
3551
|
this.group.renderContainer.detatch(panel);
|
|
3552
3552
|
if (this.panel) {
|
|
3553
3553
|
if (doRender) {
|
|
@@ -3593,7 +3593,7 @@
|
|
|
3593
3593
|
closePanel() {
|
|
3594
3594
|
var _a;
|
|
3595
3595
|
if (this.panel) {
|
|
3596
|
-
if (this.panel.api.renderer === '
|
|
3596
|
+
if (this.panel.api.renderer === 'onlyWhenVisible') {
|
|
3597
3597
|
(_a = this.panel.view.content.element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.panel.view.content.element);
|
|
3598
3598
|
}
|
|
3599
3599
|
}
|
|
@@ -3982,6 +3982,10 @@
|
|
|
3982
3982
|
}), this.voidContainer.onWillShowOverlay((event) => {
|
|
3983
3983
|
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
3984
3984
|
kind: 'header_space',
|
|
3985
|
+
panel: this.group.activePanel,
|
|
3986
|
+
api: this.accessor.api,
|
|
3987
|
+
group: this.group,
|
|
3988
|
+
getData: getPanelData,
|
|
3985
3989
|
}));
|
|
3986
3990
|
}), addDisposableListener(this.voidContainer.element, 'mousedown', (event) => {
|
|
3987
3991
|
const isFloatingGroupsEnabled = !this.accessor.options.disableFloatingGroups;
|
|
@@ -4079,7 +4083,13 @@
|
|
|
4079
4083
|
index: this.tabs.findIndex((x) => x.value === tab),
|
|
4080
4084
|
});
|
|
4081
4085
|
}), tab.onWillShowOverlay((event) => {
|
|
4082
|
-
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4086
|
+
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4087
|
+
kind: 'tab',
|
|
4088
|
+
panel: this.group.activePanel,
|
|
4089
|
+
api: this.accessor.api,
|
|
4090
|
+
group: this.group,
|
|
4091
|
+
getData: getPanelData,
|
|
4092
|
+
}));
|
|
4083
4093
|
}));
|
|
4084
4094
|
const value = { value: tab, disposable };
|
|
4085
4095
|
this.addTab(value, index);
|
|
@@ -4132,7 +4142,7 @@
|
|
|
4132
4142
|
}
|
|
4133
4143
|
class WillShowOverlayLocationEvent {
|
|
4134
4144
|
get kind() {
|
|
4135
|
-
return this.
|
|
4145
|
+
return this.options.kind;
|
|
4136
4146
|
}
|
|
4137
4147
|
get nativeEvent() {
|
|
4138
4148
|
return this.event.nativeEvent;
|
|
@@ -4143,12 +4153,24 @@
|
|
|
4143
4153
|
get defaultPrevented() {
|
|
4144
4154
|
return this.event.defaultPrevented;
|
|
4145
4155
|
}
|
|
4156
|
+
get panel() {
|
|
4157
|
+
return this.options.panel;
|
|
4158
|
+
}
|
|
4159
|
+
get api() {
|
|
4160
|
+
return this.options.api;
|
|
4161
|
+
}
|
|
4162
|
+
get group() {
|
|
4163
|
+
return this.options.group;
|
|
4164
|
+
}
|
|
4146
4165
|
preventDefault() {
|
|
4147
4166
|
this.event.preventDefault();
|
|
4148
4167
|
}
|
|
4168
|
+
getData() {
|
|
4169
|
+
return this.options.getData();
|
|
4170
|
+
}
|
|
4149
4171
|
constructor(event, options) {
|
|
4150
4172
|
this.event = event;
|
|
4151
|
-
this.
|
|
4173
|
+
this.options = options;
|
|
4152
4174
|
}
|
|
4153
4175
|
}
|
|
4154
4176
|
class DockviewGroupPanelModel extends CompositeDisposable {
|
|
@@ -4287,6 +4309,10 @@
|
|
|
4287
4309
|
}), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
|
|
4288
4310
|
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
4289
4311
|
kind: 'content',
|
|
4312
|
+
panel: this.activePanel,
|
|
4313
|
+
api: this._api,
|
|
4314
|
+
group: this.groupPanel,
|
|
4315
|
+
getData: getPanelData,
|
|
4290
4316
|
}));
|
|
4291
4317
|
}), this._onMove, this._onDidChange, this._onDidDrop, this._onWillDrop, this._onDidAddPanel, this._onDidRemovePanel, this._onDidActivePanelChange);
|
|
4292
4318
|
}
|
|
@@ -6104,27 +6130,18 @@
|
|
|
6104
6130
|
//
|
|
6105
6131
|
this.params = {};
|
|
6106
6132
|
this._element = document.createElement('div');
|
|
6107
|
-
this._element.className = 'default-tab';
|
|
6133
|
+
this._element.className = 'dv-default-tab';
|
|
6108
6134
|
//
|
|
6109
6135
|
this._content = document.createElement('div');
|
|
6110
|
-
this._content.className = 'tab-content';
|
|
6111
|
-
//
|
|
6112
|
-
this._actionContainer = document.createElement('div');
|
|
6113
|
-
this._actionContainer.className = 'action-container';
|
|
6114
|
-
//
|
|
6115
|
-
this._list = document.createElement('ul');
|
|
6116
|
-
this._list.className = 'tab-list';
|
|
6117
|
-
//
|
|
6136
|
+
this._content.className = 'dv-default-tab-content';
|
|
6118
6137
|
this.action = document.createElement('div');
|
|
6119
|
-
this.action.className = 'tab-action';
|
|
6138
|
+
this.action.className = 'dv-default-tab-action';
|
|
6120
6139
|
this.action.appendChild(createCloseButton());
|
|
6121
6140
|
//
|
|
6122
6141
|
this._element.appendChild(this._content);
|
|
6123
|
-
this._element.appendChild(this.
|
|
6124
|
-
this._actionContainer.appendChild(this._list);
|
|
6125
|
-
this._list.appendChild(this.action);
|
|
6142
|
+
this._element.appendChild(this.action);
|
|
6126
6143
|
//
|
|
6127
|
-
this.addDisposables(addDisposableListener(this.
|
|
6144
|
+
this.addDisposables(addDisposableListener(this.action, 'mousedown', (ev) => {
|
|
6128
6145
|
ev.preventDefault();
|
|
6129
6146
|
}));
|
|
6130
6147
|
this.render();
|
|
@@ -6964,7 +6981,10 @@
|
|
|
6964
6981
|
}
|
|
6965
6982
|
get renderer() {
|
|
6966
6983
|
var _a;
|
|
6967
|
-
return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : '
|
|
6984
|
+
return (_a = this.options.defaultRenderer) !== null && _a !== void 0 ? _a : 'onlyWhenVisible';
|
|
6985
|
+
}
|
|
6986
|
+
get api() {
|
|
6987
|
+
return this._api;
|
|
6968
6988
|
}
|
|
6969
6989
|
constructor(options) {
|
|
6970
6990
|
var _a, _b;
|
|
@@ -7099,6 +7119,10 @@
|
|
|
7099
7119
|
}
|
|
7100
7120
|
this._onWillShowOverlay.fire(new WillShowOverlayLocationEvent(event, {
|
|
7101
7121
|
kind: 'edge',
|
|
7122
|
+
panel: undefined,
|
|
7123
|
+
api: this._api,
|
|
7124
|
+
group: undefined,
|
|
7125
|
+
getData: getPanelData,
|
|
7102
7126
|
}));
|
|
7103
7127
|
}), this._rootDropTarget.onDrop((event) => {
|
|
7104
7128
|
var _a;
|