dockview-angular 4.11.0 → 4.13.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/lib/dockview/dockview-angular.component.js +2 -1
- package/dist/cjs/lib/dockview-angular.module.js +2 -4
- package/dist/cjs/lib/gridview/gridview-angular.component.js +2 -1
- package/dist/cjs/lib/paneview/paneview-angular.component.js +2 -1
- package/dist/cjs/lib/splitview/splitview-angular.component.js +2 -1
- package/dist/cjs/lib/utils/angular-renderer.js +11 -3
- package/dist/cjs/lib/utils/component-factory.js +1 -0
- package/dist/dockview-angular.amd.js +194 -65
- package/dist/dockview-angular.amd.js.map +1 -1
- package/dist/dockview-angular.amd.min.js +2 -2
- package/dist/dockview-angular.amd.min.js.map +1 -1
- package/dist/dockview-angular.amd.min.noStyle.js +2 -2
- package/dist/dockview-angular.amd.min.noStyle.js.map +1 -1
- package/dist/dockview-angular.amd.noStyle.js +194 -65
- package/dist/dockview-angular.amd.noStyle.js.map +1 -1
- package/dist/dockview-angular.cjs.js +194 -65
- package/dist/dockview-angular.cjs.js.map +1 -1
- package/dist/dockview-angular.esm.js +194 -66
- package/dist/dockview-angular.esm.js.map +1 -1
- package/dist/dockview-angular.esm.min.js +2 -2
- package/dist/dockview-angular.esm.min.js.map +1 -1
- package/dist/dockview-angular.js +194 -65
- package/dist/dockview-angular.js.map +1 -1
- package/dist/dockview-angular.min.js +2 -2
- package/dist/dockview-angular.min.js.map +1 -1
- package/dist/dockview-angular.min.noStyle.js +2 -2
- package/dist/dockview-angular.min.noStyle.js.map +1 -1
- package/dist/dockview-angular.noStyle.js +194 -65
- package/dist/dockview-angular.noStyle.js.map +1 -1
- package/dist/esm/lib/dockview/dockview-angular.component.js +2 -1
- package/dist/esm/lib/dockview-angular.module.js +2 -4
- package/dist/esm/lib/gridview/gridview-angular.component.js +2 -1
- package/dist/esm/lib/paneview/paneview-angular.component.js +2 -1
- package/dist/esm/lib/splitview/splitview-angular.component.js +2 -1
- package/dist/esm/lib/utils/angular-renderer.js +11 -3
- package/dist/esm/lib/utils/component-factory.js +1 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-angular
|
|
3
|
-
* @version 4.
|
|
3
|
+
* @version 4.13.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -1294,11 +1294,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
1294
1294
|
document.removeEventListener('pointermove', onPointerMove);
|
|
1295
1295
|
document.removeEventListener('pointerup', end);
|
|
1296
1296
|
document.removeEventListener('pointercancel', end);
|
|
1297
|
+
document.removeEventListener('contextmenu', end);
|
|
1297
1298
|
this._onDidSashEnd.fire(undefined);
|
|
1298
1299
|
};
|
|
1299
1300
|
document.addEventListener('pointermove', onPointerMove);
|
|
1300
1301
|
document.addEventListener('pointerup', end);
|
|
1301
1302
|
document.addEventListener('pointercancel', end);
|
|
1303
|
+
document.addEventListener('contextmenu', end);
|
|
1302
1304
|
};
|
|
1303
1305
|
sash.addEventListener('pointerdown', onPointerStart);
|
|
1304
1306
|
const sashItem = {
|
|
@@ -3781,8 +3783,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
3781
3783
|
/**
|
|
3782
3784
|
* Create a component from a serialized object.
|
|
3783
3785
|
*/
|
|
3784
|
-
fromJSON(data) {
|
|
3785
|
-
this.component.fromJSON(data);
|
|
3786
|
+
fromJSON(data, options) {
|
|
3787
|
+
this.component.fromJSON(data, options);
|
|
3786
3788
|
}
|
|
3787
3789
|
/**
|
|
3788
3790
|
* Create a serialized object of the current component.
|
|
@@ -5013,6 +5015,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5013
5015
|
}
|
|
5014
5016
|
if (doRender) {
|
|
5015
5017
|
const focusTracker = trackFocus(container);
|
|
5018
|
+
this.focusTracker = focusTracker;
|
|
5016
5019
|
const disposable = new CompositeDisposable();
|
|
5017
5020
|
disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
|
|
5018
5021
|
this.disposable.value = disposable;
|
|
@@ -5040,6 +5043,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5040
5043
|
this.disposable.dispose();
|
|
5041
5044
|
super.dispose();
|
|
5042
5045
|
}
|
|
5046
|
+
/**
|
|
5047
|
+
* Refresh the focus tracker state to handle cases where focus state
|
|
5048
|
+
* gets out of sync due to programmatic panel activation
|
|
5049
|
+
*/
|
|
5050
|
+
refreshFocusState() {
|
|
5051
|
+
var _a;
|
|
5052
|
+
if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
|
|
5053
|
+
this.focusTracker.refreshState();
|
|
5054
|
+
}
|
|
5055
|
+
}
|
|
5043
5056
|
}
|
|
5044
5057
|
|
|
5045
5058
|
function addGhostImage(dataTransfer, ghostElement, options) {
|
|
@@ -5149,7 +5162,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5149
5162
|
}
|
|
5150
5163
|
}
|
|
5151
5164
|
|
|
5152
|
-
class
|
|
5165
|
+
class DockviewWillShowOverlayLocationEvent {
|
|
5153
5166
|
get kind() {
|
|
5154
5167
|
return this.options.kind;
|
|
5155
5168
|
}
|
|
@@ -5497,7 +5510,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5497
5510
|
index: this._tabs.findIndex((x) => x.value === tab),
|
|
5498
5511
|
});
|
|
5499
5512
|
}), tab.onWillShowOverlay((event) => {
|
|
5500
|
-
this._onWillShowOverlay.fire(new
|
|
5513
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
5501
5514
|
kind: 'tab',
|
|
5502
5515
|
panel: this.group.activePanel,
|
|
5503
5516
|
api: this.accessor.api,
|
|
@@ -5661,7 +5674,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5661
5674
|
index: this.tabs.size,
|
|
5662
5675
|
});
|
|
5663
5676
|
}), this.voidContainer.onWillShowOverlay((event) => {
|
|
5664
|
-
this._onWillShowOverlay.fire(new
|
|
5677
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
5665
5678
|
kind: 'header_space',
|
|
5666
5679
|
panel: this.group.activePanel,
|
|
5667
5680
|
api: this.accessor.api,
|
|
@@ -6055,7 +6068,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6055
6068
|
}), this.tabsContainer.onWillShowOverlay((event) => {
|
|
6056
6069
|
this._onWillShowOverlay.fire(event);
|
|
6057
6070
|
}), this.contentContainer.dropTarget.onWillShowOverlay((event) => {
|
|
6058
|
-
this._onWillShowOverlay.fire(new
|
|
6071
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
6059
6072
|
kind: 'content',
|
|
6060
6073
|
panel: this.activePanel,
|
|
6061
6074
|
api: this._api,
|
|
@@ -6366,8 +6379,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6366
6379
|
this._activePanel = panel;
|
|
6367
6380
|
if (panel) {
|
|
6368
6381
|
this.tabsContainer.setActivePanel(panel);
|
|
6382
|
+
this.contentContainer.openPanel(panel);
|
|
6369
6383
|
panel.layout(this._width, this._height);
|
|
6370
6384
|
this.updateMru(panel);
|
|
6385
|
+
// Refresh focus state to handle programmatic activation without DOM focus change
|
|
6386
|
+
this.contentContainer.refreshFocusState();
|
|
6371
6387
|
this._onDidActivePanelChange.fire({
|
|
6372
6388
|
panel,
|
|
6373
6389
|
});
|
|
@@ -6728,7 +6744,19 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6728
6744
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
6729
6745
|
this._onDidActivePanelChange = new Emitter();
|
|
6730
6746
|
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
|
|
6731
|
-
this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange)
|
|
6747
|
+
this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidVisibilityChange.event((event) => {
|
|
6748
|
+
// When becoming visible, apply any pending size change
|
|
6749
|
+
if (event.isVisible && this._pendingSize) {
|
|
6750
|
+
super.setSize(this._pendingSize);
|
|
6751
|
+
this._pendingSize = undefined;
|
|
6752
|
+
}
|
|
6753
|
+
}));
|
|
6754
|
+
}
|
|
6755
|
+
setSize(event) {
|
|
6756
|
+
// Always store the requested size
|
|
6757
|
+
this._pendingSize = Object.assign({}, event);
|
|
6758
|
+
// Apply the size change immediately
|
|
6759
|
+
super.setSize(event);
|
|
6732
6760
|
}
|
|
6733
6761
|
close() {
|
|
6734
6762
|
if (!this._group) {
|
|
@@ -7197,6 +7225,18 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7197
7225
|
params: this._params,
|
|
7198
7226
|
});
|
|
7199
7227
|
}
|
|
7228
|
+
updateFromStateModel(state) {
|
|
7229
|
+
var _a, _b, _c;
|
|
7230
|
+
this._maximumHeight = state.maximumHeight;
|
|
7231
|
+
this._minimumHeight = state.minimumHeight;
|
|
7232
|
+
this._maximumWidth = state.maximumWidth;
|
|
7233
|
+
this._minimumWidth = state.minimumWidth;
|
|
7234
|
+
this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
|
|
7235
|
+
this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
|
|
7236
|
+
this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
|
|
7237
|
+
// state.contentComponent;
|
|
7238
|
+
// state.tabComponent;
|
|
7239
|
+
}
|
|
7200
7240
|
updateParentGroup(group, options) {
|
|
7201
7241
|
this._group = group;
|
|
7202
7242
|
this.api.group = this._group;
|
|
@@ -7668,13 +7708,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7668
7708
|
let right = undefined;
|
|
7669
7709
|
let width = undefined;
|
|
7670
7710
|
const moveTop = () => {
|
|
7671
|
-
|
|
7711
|
+
// When dragging top handle, constrain top position to prevent oversizing
|
|
7712
|
+
const maxTop = startPosition.originalY +
|
|
7672
7713
|
startPosition.originalHeight >
|
|
7673
7714
|
containerRect.height
|
|
7674
|
-
?
|
|
7715
|
+
? Math.max(0, containerRect.height -
|
|
7716
|
+
Overlay.MINIMUM_HEIGHT)
|
|
7675
7717
|
: Math.max(0, startPosition.originalY +
|
|
7676
7718
|
startPosition.originalHeight -
|
|
7677
|
-
Overlay.MINIMUM_HEIGHT)
|
|
7719
|
+
Overlay.MINIMUM_HEIGHT);
|
|
7720
|
+
top = clamp(y, 0, maxTop);
|
|
7678
7721
|
height =
|
|
7679
7722
|
startPosition.originalY +
|
|
7680
7723
|
startPosition.originalHeight -
|
|
@@ -7685,22 +7728,27 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7685
7728
|
top =
|
|
7686
7729
|
startPosition.originalY -
|
|
7687
7730
|
startPosition.originalHeight;
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7731
|
+
// When dragging bottom handle, constrain height to container height
|
|
7732
|
+
const minHeight = top < 0 &&
|
|
7733
|
+
typeof this.options.minimumInViewportHeight ===
|
|
7734
|
+
'number'
|
|
7691
7735
|
? -top +
|
|
7692
7736
|
this.options.minimumInViewportHeight
|
|
7693
|
-
: Overlay.MINIMUM_HEIGHT
|
|
7737
|
+
: Overlay.MINIMUM_HEIGHT;
|
|
7738
|
+
const maxHeight = containerRect.height - Math.max(0, top);
|
|
7739
|
+
height = clamp(y - top, minHeight, maxHeight);
|
|
7694
7740
|
bottom = containerRect.height - top - height;
|
|
7695
7741
|
};
|
|
7696
7742
|
const moveLeft = () => {
|
|
7697
|
-
|
|
7743
|
+
const maxLeft = startPosition.originalX +
|
|
7698
7744
|
startPosition.originalWidth >
|
|
7699
7745
|
containerRect.width
|
|
7700
|
-
?
|
|
7746
|
+
? Math.max(0, containerRect.width -
|
|
7747
|
+
Overlay.MINIMUM_WIDTH) // Prevent extending beyong right edge
|
|
7701
7748
|
: Math.max(0, startPosition.originalX +
|
|
7702
7749
|
startPosition.originalWidth -
|
|
7703
|
-
Overlay.MINIMUM_WIDTH)
|
|
7750
|
+
Overlay.MINIMUM_WIDTH);
|
|
7751
|
+
left = clamp(x, 0, maxLeft); // min is 0 (Not -Infinity) to prevent dragging beyond left edge
|
|
7704
7752
|
width =
|
|
7705
7753
|
startPosition.originalX +
|
|
7706
7754
|
startPosition.originalWidth -
|
|
@@ -7711,12 +7759,15 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7711
7759
|
left =
|
|
7712
7760
|
startPosition.originalX -
|
|
7713
7761
|
startPosition.originalWidth;
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7762
|
+
// When dragging right handle, constrain width to container width
|
|
7763
|
+
const minWidth = left < 0 &&
|
|
7764
|
+
typeof this.options.minimumInViewportWidth ===
|
|
7765
|
+
'number'
|
|
7717
7766
|
? -left +
|
|
7718
7767
|
this.options.minimumInViewportWidth
|
|
7719
|
-
: Overlay.MINIMUM_WIDTH
|
|
7768
|
+
: Overlay.MINIMUM_WIDTH;
|
|
7769
|
+
const maxWidth = containerRect.width - Math.max(0, left);
|
|
7770
|
+
width = clamp(x - left, minWidth, maxWidth);
|
|
7720
7771
|
right = containerRect.width - left - width;
|
|
7721
7772
|
};
|
|
7722
7773
|
switch (direction) {
|
|
@@ -8546,7 +8597,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
8546
8597
|
// option only available when no panels in primary grid
|
|
8547
8598
|
return;
|
|
8548
8599
|
}
|
|
8549
|
-
this._onWillShowOverlay.fire(new
|
|
8600
|
+
this._onWillShowOverlay.fire(new DockviewWillShowOverlayLocationEvent(event, {
|
|
8550
8601
|
kind: 'edge',
|
|
8551
8602
|
panel: undefined,
|
|
8552
8603
|
api: this._api,
|
|
@@ -8960,7 +9011,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
8960
9011
|
: (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
|
|
8961
9012
|
const el = group.element.querySelector('.dv-void-container');
|
|
8962
9013
|
if (!el) {
|
|
8963
|
-
throw new Error('failed to find drag handle');
|
|
9014
|
+
throw new Error('dockview: failed to find drag handle');
|
|
8964
9015
|
}
|
|
8965
9016
|
overlay.setupDrag(el, {
|
|
8966
9017
|
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
@@ -9032,7 +9083,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9032
9083
|
case 'right':
|
|
9033
9084
|
return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
|
|
9034
9085
|
default:
|
|
9035
|
-
throw new Error(`unsupported position ${position}`);
|
|
9086
|
+
throw new Error(`dockview: unsupported position ${position}`);
|
|
9036
9087
|
}
|
|
9037
9088
|
}
|
|
9038
9089
|
updateOptions(options) {
|
|
@@ -9178,15 +9229,48 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9178
9229
|
}
|
|
9179
9230
|
return result;
|
|
9180
9231
|
}
|
|
9181
|
-
fromJSON(data) {
|
|
9232
|
+
fromJSON(data, options) {
|
|
9182
9233
|
var _a, _b;
|
|
9234
|
+
const existingPanels = new Map();
|
|
9235
|
+
let tempGroup;
|
|
9236
|
+
if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
|
|
9237
|
+
/**
|
|
9238
|
+
* What are we doing here?
|
|
9239
|
+
*
|
|
9240
|
+
* 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
|
|
9241
|
+
* 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
|
|
9242
|
+
*/
|
|
9243
|
+
tempGroup = this.createGroup();
|
|
9244
|
+
this._groups.delete(tempGroup.api.id);
|
|
9245
|
+
const newPanels = Object.keys(data.panels);
|
|
9246
|
+
for (const panel of this.panels) {
|
|
9247
|
+
if (newPanels.includes(panel.api.id)) {
|
|
9248
|
+
existingPanels.set(panel.api.id, panel);
|
|
9249
|
+
}
|
|
9250
|
+
}
|
|
9251
|
+
this.movingLock(() => {
|
|
9252
|
+
Array.from(existingPanels.values()).forEach((panel) => {
|
|
9253
|
+
this.moveGroupOrPanel({
|
|
9254
|
+
from: {
|
|
9255
|
+
groupId: panel.api.group.api.id,
|
|
9256
|
+
panelId: panel.api.id,
|
|
9257
|
+
},
|
|
9258
|
+
to: {
|
|
9259
|
+
group: tempGroup,
|
|
9260
|
+
position: 'center',
|
|
9261
|
+
},
|
|
9262
|
+
keepEmptyGroups: true,
|
|
9263
|
+
});
|
|
9264
|
+
});
|
|
9265
|
+
});
|
|
9266
|
+
}
|
|
9183
9267
|
this.clear();
|
|
9184
9268
|
if (typeof data !== 'object' || data === null) {
|
|
9185
|
-
throw new Error('serialized layout must be a non-null object');
|
|
9269
|
+
throw new Error('dockview: serialized layout must be a non-null object');
|
|
9186
9270
|
}
|
|
9187
9271
|
const { grid, panels, activeGroup } = data;
|
|
9188
9272
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
9189
|
-
throw new Error('root must be of type branch');
|
|
9273
|
+
throw new Error('dockview: root must be of type branch');
|
|
9190
9274
|
}
|
|
9191
9275
|
try {
|
|
9192
9276
|
// take note of the existing dimensions
|
|
@@ -9195,7 +9279,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9195
9279
|
const createGroupFromSerializedState = (data) => {
|
|
9196
9280
|
const { id, locked, hideHeader, views, activeView } = data;
|
|
9197
9281
|
if (typeof id !== 'string') {
|
|
9198
|
-
throw new Error('group id must be of type string');
|
|
9282
|
+
throw new Error('dockview: group id must be of type string');
|
|
9199
9283
|
}
|
|
9200
9284
|
const group = this.createGroup({
|
|
9201
9285
|
id,
|
|
@@ -9210,17 +9294,38 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9210
9294
|
* In running this section first we avoid firing lots of 'add' events in the event of a failure
|
|
9211
9295
|
* due to a corruption of input data.
|
|
9212
9296
|
*/
|
|
9213
|
-
const
|
|
9214
|
-
|
|
9297
|
+
const existingPanel = existingPanels.get(child);
|
|
9298
|
+
if (tempGroup && existingPanel) {
|
|
9299
|
+
this.movingLock(() => {
|
|
9300
|
+
tempGroup.model.removePanel(existingPanel);
|
|
9301
|
+
});
|
|
9302
|
+
createdPanels.push(existingPanel);
|
|
9303
|
+
existingPanel.updateFromStateModel(panels[child]);
|
|
9304
|
+
}
|
|
9305
|
+
else {
|
|
9306
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
9307
|
+
createdPanels.push(panel);
|
|
9308
|
+
}
|
|
9215
9309
|
}
|
|
9216
9310
|
for (let i = 0; i < views.length; i++) {
|
|
9217
9311
|
const panel = createdPanels[i];
|
|
9218
9312
|
const isActive = typeof activeView === 'string' &&
|
|
9219
9313
|
activeView === panel.id;
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9314
|
+
const hasExisting = existingPanels.has(panel.api.id);
|
|
9315
|
+
if (hasExisting) {
|
|
9316
|
+
this.movingLock(() => {
|
|
9317
|
+
group.model.openPanel(panel, {
|
|
9318
|
+
skipSetActive: !isActive,
|
|
9319
|
+
skipSetGroupActive: true,
|
|
9320
|
+
});
|
|
9321
|
+
});
|
|
9322
|
+
}
|
|
9323
|
+
else {
|
|
9324
|
+
group.model.openPanel(panel, {
|
|
9325
|
+
skipSetActive: !isActive,
|
|
9326
|
+
skipSetGroupActive: true,
|
|
9327
|
+
});
|
|
9328
|
+
}
|
|
9224
9329
|
}
|
|
9225
9330
|
if (!group.activePanel && group.panels.length > 0) {
|
|
9226
9331
|
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
@@ -9259,7 +9364,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9259
9364
|
setTimeout(() => {
|
|
9260
9365
|
this.addPopoutGroup(group, {
|
|
9261
9366
|
position: position !== null && position !== void 0 ? position : undefined,
|
|
9262
|
-
overridePopoutGroup: gridReferenceGroup
|
|
9367
|
+
overridePopoutGroup: gridReferenceGroup
|
|
9368
|
+
? group
|
|
9369
|
+
: undefined,
|
|
9263
9370
|
referenceGroup: gridReferenceGroup
|
|
9264
9371
|
? this.getPanel(gridReferenceGroup)
|
|
9265
9372
|
: undefined,
|
|
@@ -9345,11 +9452,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9345
9452
|
addPanel(options) {
|
|
9346
9453
|
var _a, _b;
|
|
9347
9454
|
if (this.panels.find((_) => _.id === options.id)) {
|
|
9348
|
-
throw new Error(`panel with id ${options.id} already exists`);
|
|
9455
|
+
throw new Error(`dockview: panel with id ${options.id} already exists`);
|
|
9349
9456
|
}
|
|
9350
9457
|
let referenceGroup;
|
|
9351
9458
|
if (options.position && options.floating) {
|
|
9352
|
-
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9459
|
+
throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9353
9460
|
}
|
|
9354
9461
|
const initial = {
|
|
9355
9462
|
width: options.initialWidth,
|
|
@@ -9363,7 +9470,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9363
9470
|
: options.position.referencePanel;
|
|
9364
9471
|
index = options.position.index;
|
|
9365
9472
|
if (!referencePanel) {
|
|
9366
|
-
throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9473
|
+
throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9367
9474
|
}
|
|
9368
9475
|
referenceGroup = this.findGroup(referencePanel);
|
|
9369
9476
|
}
|
|
@@ -9374,7 +9481,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9374
9481
|
: options.position.referenceGroup;
|
|
9375
9482
|
index = options.position.index;
|
|
9376
9483
|
if (!referenceGroup) {
|
|
9377
|
-
throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9484
|
+
throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9378
9485
|
}
|
|
9379
9486
|
}
|
|
9380
9487
|
else {
|
|
@@ -9486,7 +9593,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9486
9593
|
}) {
|
|
9487
9594
|
const group = panel.group;
|
|
9488
9595
|
if (!group) {
|
|
9489
|
-
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9596
|
+
throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9490
9597
|
}
|
|
9491
9598
|
group.model.removePanel(panel, {
|
|
9492
9599
|
skipSetActiveGroup: options.skipSetActiveGroup,
|
|
@@ -9535,11 +9642,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9535
9642
|
? this.panels.find((panel) => panel.id === options.referencePanel)
|
|
9536
9643
|
: options.referencePanel;
|
|
9537
9644
|
if (!referencePanel) {
|
|
9538
|
-
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
9645
|
+
throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
|
|
9539
9646
|
}
|
|
9540
9647
|
referenceGroup = this.findGroup(referencePanel);
|
|
9541
9648
|
if (!referenceGroup) {
|
|
9542
|
-
throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9649
|
+
throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9543
9650
|
}
|
|
9544
9651
|
}
|
|
9545
9652
|
else if (isGroupOptionsWithGroup(options)) {
|
|
@@ -9548,7 +9655,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9548
9655
|
? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
9549
9656
|
: options.referenceGroup;
|
|
9550
9657
|
if (!referenceGroup) {
|
|
9551
|
-
throw new Error(`reference group ${options.referenceGroup} does not exist`);
|
|
9658
|
+
throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
|
|
9552
9659
|
}
|
|
9553
9660
|
}
|
|
9554
9661
|
else {
|
|
@@ -9616,7 +9723,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9616
9723
|
}
|
|
9617
9724
|
return floatingGroup.group;
|
|
9618
9725
|
}
|
|
9619
|
-
throw new Error('failed to find floating group');
|
|
9726
|
+
throw new Error('dockview: failed to find floating group');
|
|
9620
9727
|
}
|
|
9621
9728
|
if (group.api.location.type === 'popout') {
|
|
9622
9729
|
const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
|
|
@@ -9647,7 +9754,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9647
9754
|
this.updateWatermark();
|
|
9648
9755
|
return selectedGroup.popoutGroup;
|
|
9649
9756
|
}
|
|
9650
|
-
throw new Error('failed to find popout group');
|
|
9757
|
+
throw new Error('dockview: failed to find popout group');
|
|
9651
9758
|
}
|
|
9652
9759
|
const re = super.doRemoveGroup(group, options);
|
|
9653
9760
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
|
|
@@ -9678,7 +9785,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9678
9785
|
? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
9679
9786
|
: undefined;
|
|
9680
9787
|
if (!sourceGroup) {
|
|
9681
|
-
throw new Error(`Failed to find group id ${sourceGroupId}`);
|
|
9788
|
+
throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
|
|
9682
9789
|
}
|
|
9683
9790
|
if (sourceItemId === undefined) {
|
|
9684
9791
|
/**
|
|
@@ -9703,9 +9810,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9703
9810
|
skipSetActiveGroup: true,
|
|
9704
9811
|
}));
|
|
9705
9812
|
if (!removedPanel) {
|
|
9706
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9813
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9707
9814
|
}
|
|
9708
|
-
if (sourceGroup.model.size === 0) {
|
|
9815
|
+
if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
|
|
9709
9816
|
// remove the group and do not set a new group as active
|
|
9710
9817
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9711
9818
|
}
|
|
@@ -9715,7 +9822,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9715
9822
|
var _a;
|
|
9716
9823
|
return destinationGroup.model.openPanel(removedPanel, {
|
|
9717
9824
|
index: destinationIndex,
|
|
9718
|
-
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9825
|
+
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9826
|
+
!isDestinationGroupEmpty,
|
|
9719
9827
|
skipSetGroupActive: true,
|
|
9720
9828
|
});
|
|
9721
9829
|
});
|
|
@@ -9726,6 +9834,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9726
9834
|
panel: removedPanel,
|
|
9727
9835
|
from: sourceGroup,
|
|
9728
9836
|
});
|
|
9837
|
+
/**
|
|
9838
|
+
* Update overlay positions after DOM layout completes to prevent 0×0 dimensions.
|
|
9839
|
+
* With defaultRenderer="always" this results in panel content not showing after move operations.
|
|
9840
|
+
*/
|
|
9841
|
+
requestAnimationFrame(() => {
|
|
9842
|
+
this.overlayRenderContainer.updateAllPositions();
|
|
9843
|
+
});
|
|
9729
9844
|
}
|
|
9730
9845
|
else {
|
|
9731
9846
|
/**
|
|
@@ -9770,7 +9885,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9770
9885
|
}));
|
|
9771
9886
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9772
9887
|
const newGroup = this.createGroupAtLocation(targetLocation);
|
|
9773
|
-
this.movingLock(() => newGroup.model.openPanel(removedPanel
|
|
9888
|
+
this.movingLock(() => newGroup.model.openPanel(removedPanel, {
|
|
9889
|
+
skipSetActive: true,
|
|
9890
|
+
}));
|
|
9774
9891
|
this.doSetGroupAndPanelActive(newGroup);
|
|
9775
9892
|
this._onDidMovePanel.fire({
|
|
9776
9893
|
panel: this.getGroupPanel(sourceItemId),
|
|
@@ -9803,7 +9920,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9803
9920
|
skipSetActiveGroup: true,
|
|
9804
9921
|
}));
|
|
9805
9922
|
if (!removedPanel) {
|
|
9806
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9923
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9807
9924
|
}
|
|
9808
9925
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
9809
9926
|
const group = this.createGroupAtLocation(dropLocation);
|
|
@@ -9858,7 +9975,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9858
9975
|
case 'floating': {
|
|
9859
9976
|
const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
|
|
9860
9977
|
if (!selectedFloatingGroup) {
|
|
9861
|
-
throw new Error('failed to find floating group');
|
|
9978
|
+
throw new Error('dockview: failed to find floating group');
|
|
9862
9979
|
}
|
|
9863
9980
|
selectedFloatingGroup.dispose();
|
|
9864
9981
|
break;
|
|
@@ -9866,7 +9983,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9866
9983
|
case 'popout': {
|
|
9867
9984
|
const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
|
|
9868
9985
|
if (!selectedPopoutGroup) {
|
|
9869
|
-
throw new Error('failed to find popout group');
|
|
9986
|
+
throw new Error('dockview: failed to find popout group');
|
|
9870
9987
|
}
|
|
9871
9988
|
// Remove from popout groups list to prevent automatic restoration
|
|
9872
9989
|
const index = this._popoutGroups.indexOf(selectedPopoutGroup);
|
|
@@ -11315,12 +11432,19 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11315
11432
|
return this._element;
|
|
11316
11433
|
}
|
|
11317
11434
|
init(parameters) {
|
|
11318
|
-
|
|
11435
|
+
// If already initialized, just update the parameters
|
|
11436
|
+
if (this.componentRef) {
|
|
11437
|
+
this.update(parameters);
|
|
11438
|
+
}
|
|
11439
|
+
else {
|
|
11440
|
+
this.render(parameters);
|
|
11441
|
+
}
|
|
11319
11442
|
}
|
|
11320
11443
|
update(params) {
|
|
11321
11444
|
if (this.componentRef) {
|
|
11322
11445
|
Object.keys(params).forEach(key => {
|
|
11323
|
-
|
|
11446
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11447
|
+
if (key in this.componentRef.instance) {
|
|
11324
11448
|
this.componentRef.instance[key] = params[key];
|
|
11325
11449
|
}
|
|
11326
11450
|
});
|
|
@@ -11336,7 +11460,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11336
11460
|
});
|
|
11337
11461
|
// Set initial parameters
|
|
11338
11462
|
Object.keys(parameters).forEach(key => {
|
|
11339
|
-
|
|
11463
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11464
|
+
if (key in this.componentRef.instance) {
|
|
11340
11465
|
this.componentRef.instance[key] = parameters[key];
|
|
11341
11466
|
}
|
|
11342
11467
|
});
|
|
@@ -11507,6 +11632,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11507
11632
|
injector: this.injector,
|
|
11508
11633
|
environmentInjector: this.environmentInjector
|
|
11509
11634
|
});
|
|
11635
|
+
// Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
|
|
11510
11636
|
renderer.init({});
|
|
11511
11637
|
return renderer;
|
|
11512
11638
|
}
|
|
@@ -12564,6 +12690,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12564
12690
|
exports.DockviewAngularComponent = __decorate([
|
|
12565
12691
|
core.Component({
|
|
12566
12692
|
selector: 'dv-dockview',
|
|
12693
|
+
standalone: true,
|
|
12567
12694
|
template: '<div #dockviewContainer class="dockview-container"></div>',
|
|
12568
12695
|
styles: [`
|
|
12569
12696
|
:host {
|
|
@@ -12571,7 +12698,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12571
12698
|
width: 100%;
|
|
12572
12699
|
height: 100%;
|
|
12573
12700
|
}
|
|
12574
|
-
|
|
12701
|
+
|
|
12575
12702
|
.dockview-container {
|
|
12576
12703
|
width: 100%;
|
|
12577
12704
|
height: 100%;
|
|
@@ -12687,6 +12814,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12687
12814
|
exports.GridviewAngularComponent = __decorate([
|
|
12688
12815
|
core.Component({
|
|
12689
12816
|
selector: 'dv-gridview',
|
|
12817
|
+
standalone: true,
|
|
12690
12818
|
template: '<div #gridviewContainer class="gridview-container"></div>',
|
|
12691
12819
|
styles: [`
|
|
12692
12820
|
:host {
|
|
@@ -12694,7 +12822,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12694
12822
|
width: 100%;
|
|
12695
12823
|
height: 100%;
|
|
12696
12824
|
}
|
|
12697
|
-
|
|
12825
|
+
|
|
12698
12826
|
.gridview-container {
|
|
12699
12827
|
width: 100%;
|
|
12700
12828
|
height: 100%;
|
|
@@ -12835,6 +12963,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12835
12963
|
exports.PaneviewAngularComponent = __decorate([
|
|
12836
12964
|
core.Component({
|
|
12837
12965
|
selector: 'dv-paneview',
|
|
12966
|
+
standalone: true,
|
|
12838
12967
|
template: '<div #paneviewContainer class="paneview-container"></div>',
|
|
12839
12968
|
styles: [`
|
|
12840
12969
|
:host {
|
|
@@ -12842,7 +12971,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12842
12971
|
width: 100%;
|
|
12843
12972
|
height: 100%;
|
|
12844
12973
|
}
|
|
12845
|
-
|
|
12974
|
+
|
|
12846
12975
|
.paneview-container {
|
|
12847
12976
|
width: 100%;
|
|
12848
12977
|
height: 100%;
|
|
@@ -12958,6 +13087,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12958
13087
|
exports.SplitviewAngularComponent = __decorate([
|
|
12959
13088
|
core.Component({
|
|
12960
13089
|
selector: 'dv-splitview',
|
|
13090
|
+
standalone: true,
|
|
12961
13091
|
template: '<div #splitviewContainer class="splitview-container"></div>',
|
|
12962
13092
|
styles: [`
|
|
12963
13093
|
:host {
|
|
@@ -12965,7 +13095,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12965
13095
|
width: 100%;
|
|
12966
13096
|
height: 100%;
|
|
12967
13097
|
}
|
|
12968
|
-
|
|
13098
|
+
|
|
12969
13099
|
.splitview-container {
|
|
12970
13100
|
width: 100%;
|
|
12971
13101
|
height: 100%;
|
|
@@ -12979,15 +13109,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12979
13109
|
};
|
|
12980
13110
|
exports.DockviewAngularModule = __decorate([
|
|
12981
13111
|
core.NgModule({
|
|
12982
|
-
|
|
13112
|
+
imports: [
|
|
13113
|
+
common.CommonModule,
|
|
12983
13114
|
exports.DockviewAngularComponent,
|
|
12984
13115
|
exports.GridviewAngularComponent,
|
|
12985
13116
|
exports.PaneviewAngularComponent,
|
|
12986
13117
|
exports.SplitviewAngularComponent
|
|
12987
13118
|
],
|
|
12988
|
-
imports: [
|
|
12989
|
-
common.CommonModule
|
|
12990
|
-
],
|
|
12991
13119
|
exports: [
|
|
12992
13120
|
exports.DockviewAngularComponent,
|
|
12993
13121
|
exports.GridviewAngularComponent,
|
|
@@ -13016,6 +13144,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
13016
13144
|
exports.DockviewPanel = DockviewPanel;
|
|
13017
13145
|
exports.DockviewUnhandledDragOverEvent = DockviewUnhandledDragOverEvent;
|
|
13018
13146
|
exports.DockviewWillDropEvent = DockviewWillDropEvent;
|
|
13147
|
+
exports.DockviewWillShowOverlayLocationEvent = DockviewWillShowOverlayLocationEvent;
|
|
13019
13148
|
exports.DraggablePaneviewPanel = DraggablePaneviewPanel;
|
|
13020
13149
|
exports.Gridview = Gridview;
|
|
13021
13150
|
exports.GridviewApi = GridviewApi;
|