dockview-angular 4.11.0 → 4.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/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 +141 -45
- 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 +141 -45
- package/dist/dockview-angular.amd.noStyle.js.map +1 -1
- package/dist/dockview-angular.cjs.js +141 -45
- package/dist/dockview-angular.cjs.js.map +1 -1
- package/dist/dockview-angular.esm.js +141 -45
- 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 +141 -45
- 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 +141 -45
- 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 +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* dockview-angular
|
|
3
|
-
* @version 4.
|
|
3
|
+
* @version 4.12.0
|
|
4
4
|
* @link https://github.com/mathuo/dockview
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -3751,8 +3751,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
3751
3751
|
/**
|
|
3752
3752
|
* Create a component from a serialized object.
|
|
3753
3753
|
*/
|
|
3754
|
-
fromJSON(data) {
|
|
3755
|
-
this.component.fromJSON(data);
|
|
3754
|
+
fromJSON(data, options) {
|
|
3755
|
+
this.component.fromJSON(data, options);
|
|
3756
3756
|
}
|
|
3757
3757
|
/**
|
|
3758
3758
|
* Create a serialized object of the current component.
|
|
@@ -4983,6 +4983,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
4983
4983
|
}
|
|
4984
4984
|
if (doRender) {
|
|
4985
4985
|
const focusTracker = trackFocus(container);
|
|
4986
|
+
this.focusTracker = focusTracker;
|
|
4986
4987
|
const disposable = new CompositeDisposable();
|
|
4987
4988
|
disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
|
|
4988
4989
|
this.disposable.value = disposable;
|
|
@@ -5010,6 +5011,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
5010
5011
|
this.disposable.dispose();
|
|
5011
5012
|
super.dispose();
|
|
5012
5013
|
}
|
|
5014
|
+
/**
|
|
5015
|
+
* Refresh the focus tracker state to handle cases where focus state
|
|
5016
|
+
* gets out of sync due to programmatic panel activation
|
|
5017
|
+
*/
|
|
5018
|
+
refreshFocusState() {
|
|
5019
|
+
var _a;
|
|
5020
|
+
if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
|
|
5021
|
+
this.focusTracker.refreshState();
|
|
5022
|
+
}
|
|
5023
|
+
}
|
|
5013
5024
|
}
|
|
5014
5025
|
|
|
5015
5026
|
function addGhostImage(dataTransfer, ghostElement, options) {
|
|
@@ -6336,8 +6347,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
6336
6347
|
this._activePanel = panel;
|
|
6337
6348
|
if (panel) {
|
|
6338
6349
|
this.tabsContainer.setActivePanel(panel);
|
|
6350
|
+
this.contentContainer.openPanel(panel);
|
|
6339
6351
|
panel.layout(this._width, this._height);
|
|
6340
6352
|
this.updateMru(panel);
|
|
6353
|
+
// Refresh focus state to handle programmatic activation without DOM focus change
|
|
6354
|
+
this.contentContainer.refreshFocusState();
|
|
6341
6355
|
this._onDidActivePanelChange.fire({
|
|
6342
6356
|
panel,
|
|
6343
6357
|
});
|
|
@@ -7167,6 +7181,18 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
7167
7181
|
params: this._params,
|
|
7168
7182
|
});
|
|
7169
7183
|
}
|
|
7184
|
+
updateFromStateModel(state) {
|
|
7185
|
+
var _a, _b, _c;
|
|
7186
|
+
this._maximumHeight = state.maximumHeight;
|
|
7187
|
+
this._minimumHeight = state.minimumHeight;
|
|
7188
|
+
this._maximumWidth = state.maximumWidth;
|
|
7189
|
+
this._minimumWidth = state.minimumWidth;
|
|
7190
|
+
this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
|
|
7191
|
+
this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
|
|
7192
|
+
this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
|
|
7193
|
+
// state.contentComponent;
|
|
7194
|
+
// state.tabComponent;
|
|
7195
|
+
}
|
|
7170
7196
|
updateParentGroup(group, options) {
|
|
7171
7197
|
this._group = group;
|
|
7172
7198
|
this.api.group = this._group;
|
|
@@ -8930,7 +8956,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
8930
8956
|
: (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
|
|
8931
8957
|
const el = group.element.querySelector('.dv-void-container');
|
|
8932
8958
|
if (!el) {
|
|
8933
|
-
throw new Error('failed to find drag handle');
|
|
8959
|
+
throw new Error('dockview: failed to find drag handle');
|
|
8934
8960
|
}
|
|
8935
8961
|
overlay.setupDrag(el, {
|
|
8936
8962
|
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
@@ -9002,7 +9028,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9002
9028
|
case 'right':
|
|
9003
9029
|
return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
|
|
9004
9030
|
default:
|
|
9005
|
-
throw new Error(`unsupported position ${position}`);
|
|
9031
|
+
throw new Error(`dockview: unsupported position ${position}`);
|
|
9006
9032
|
}
|
|
9007
9033
|
}
|
|
9008
9034
|
updateOptions(options) {
|
|
@@ -9148,15 +9174,48 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9148
9174
|
}
|
|
9149
9175
|
return result;
|
|
9150
9176
|
}
|
|
9151
|
-
fromJSON(data) {
|
|
9177
|
+
fromJSON(data, options) {
|
|
9152
9178
|
var _a, _b;
|
|
9179
|
+
const existingPanels = new Map();
|
|
9180
|
+
let tempGroup;
|
|
9181
|
+
if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
|
|
9182
|
+
/**
|
|
9183
|
+
* What are we doing here?
|
|
9184
|
+
*
|
|
9185
|
+
* 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
|
|
9186
|
+
* 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
|
|
9187
|
+
*/
|
|
9188
|
+
tempGroup = this.createGroup();
|
|
9189
|
+
this._groups.delete(tempGroup.api.id);
|
|
9190
|
+
const newPanels = Object.keys(data.panels);
|
|
9191
|
+
for (const panel of this.panels) {
|
|
9192
|
+
if (newPanels.includes(panel.api.id)) {
|
|
9193
|
+
existingPanels.set(panel.api.id, panel);
|
|
9194
|
+
}
|
|
9195
|
+
}
|
|
9196
|
+
this.movingLock(() => {
|
|
9197
|
+
Array.from(existingPanels.values()).forEach((panel) => {
|
|
9198
|
+
this.moveGroupOrPanel({
|
|
9199
|
+
from: {
|
|
9200
|
+
groupId: panel.api.group.api.id,
|
|
9201
|
+
panelId: panel.api.id,
|
|
9202
|
+
},
|
|
9203
|
+
to: {
|
|
9204
|
+
group: tempGroup,
|
|
9205
|
+
position: 'center',
|
|
9206
|
+
},
|
|
9207
|
+
keepEmptyGroups: true,
|
|
9208
|
+
});
|
|
9209
|
+
});
|
|
9210
|
+
});
|
|
9211
|
+
}
|
|
9153
9212
|
this.clear();
|
|
9154
9213
|
if (typeof data !== 'object' || data === null) {
|
|
9155
|
-
throw new Error('serialized layout must be a non-null object');
|
|
9214
|
+
throw new Error('dockview: serialized layout must be a non-null object');
|
|
9156
9215
|
}
|
|
9157
9216
|
const { grid, panels, activeGroup } = data;
|
|
9158
9217
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
9159
|
-
throw new Error('root must be of type branch');
|
|
9218
|
+
throw new Error('dockview: root must be of type branch');
|
|
9160
9219
|
}
|
|
9161
9220
|
try {
|
|
9162
9221
|
// take note of the existing dimensions
|
|
@@ -9165,7 +9224,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9165
9224
|
const createGroupFromSerializedState = (data) => {
|
|
9166
9225
|
const { id, locked, hideHeader, views, activeView } = data;
|
|
9167
9226
|
if (typeof id !== 'string') {
|
|
9168
|
-
throw new Error('group id must be of type string');
|
|
9227
|
+
throw new Error('dockview: group id must be of type string');
|
|
9169
9228
|
}
|
|
9170
9229
|
const group = this.createGroup({
|
|
9171
9230
|
id,
|
|
@@ -9180,17 +9239,38 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9180
9239
|
* In running this section first we avoid firing lots of 'add' events in the event of a failure
|
|
9181
9240
|
* due to a corruption of input data.
|
|
9182
9241
|
*/
|
|
9183
|
-
const
|
|
9184
|
-
|
|
9242
|
+
const existingPanel = existingPanels.get(child);
|
|
9243
|
+
if (tempGroup && existingPanel) {
|
|
9244
|
+
this.movingLock(() => {
|
|
9245
|
+
tempGroup.model.removePanel(existingPanel);
|
|
9246
|
+
});
|
|
9247
|
+
createdPanels.push(existingPanel);
|
|
9248
|
+
existingPanel.updateFromStateModel(panels[child]);
|
|
9249
|
+
}
|
|
9250
|
+
else {
|
|
9251
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
9252
|
+
createdPanels.push(panel);
|
|
9253
|
+
}
|
|
9185
9254
|
}
|
|
9186
9255
|
for (let i = 0; i < views.length; i++) {
|
|
9187
9256
|
const panel = createdPanels[i];
|
|
9188
9257
|
const isActive = typeof activeView === 'string' &&
|
|
9189
9258
|
activeView === panel.id;
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9259
|
+
const hasExisting = existingPanels.has(panel.api.id);
|
|
9260
|
+
if (hasExisting) {
|
|
9261
|
+
this.movingLock(() => {
|
|
9262
|
+
group.model.openPanel(panel, {
|
|
9263
|
+
skipSetActive: !isActive,
|
|
9264
|
+
skipSetGroupActive: true,
|
|
9265
|
+
});
|
|
9266
|
+
});
|
|
9267
|
+
}
|
|
9268
|
+
else {
|
|
9269
|
+
group.model.openPanel(panel, {
|
|
9270
|
+
skipSetActive: !isActive,
|
|
9271
|
+
skipSetGroupActive: true,
|
|
9272
|
+
});
|
|
9273
|
+
}
|
|
9194
9274
|
}
|
|
9195
9275
|
if (!group.activePanel && group.panels.length > 0) {
|
|
9196
9276
|
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
@@ -9229,7 +9309,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9229
9309
|
setTimeout(() => {
|
|
9230
9310
|
this.addPopoutGroup(group, {
|
|
9231
9311
|
position: position !== null && position !== void 0 ? position : undefined,
|
|
9232
|
-
overridePopoutGroup: gridReferenceGroup
|
|
9312
|
+
overridePopoutGroup: gridReferenceGroup
|
|
9313
|
+
? group
|
|
9314
|
+
: undefined,
|
|
9233
9315
|
referenceGroup: gridReferenceGroup
|
|
9234
9316
|
? this.getPanel(gridReferenceGroup)
|
|
9235
9317
|
: undefined,
|
|
@@ -9315,11 +9397,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9315
9397
|
addPanel(options) {
|
|
9316
9398
|
var _a, _b;
|
|
9317
9399
|
if (this.panels.find((_) => _.id === options.id)) {
|
|
9318
|
-
throw new Error(`panel with id ${options.id} already exists`);
|
|
9400
|
+
throw new Error(`dockview: panel with id ${options.id} already exists`);
|
|
9319
9401
|
}
|
|
9320
9402
|
let referenceGroup;
|
|
9321
9403
|
if (options.position && options.floating) {
|
|
9322
|
-
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9404
|
+
throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9323
9405
|
}
|
|
9324
9406
|
const initial = {
|
|
9325
9407
|
width: options.initialWidth,
|
|
@@ -9333,7 +9415,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9333
9415
|
: options.position.referencePanel;
|
|
9334
9416
|
index = options.position.index;
|
|
9335
9417
|
if (!referencePanel) {
|
|
9336
|
-
throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9418
|
+
throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9337
9419
|
}
|
|
9338
9420
|
referenceGroup = this.findGroup(referencePanel);
|
|
9339
9421
|
}
|
|
@@ -9344,7 +9426,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9344
9426
|
: options.position.referenceGroup;
|
|
9345
9427
|
index = options.position.index;
|
|
9346
9428
|
if (!referenceGroup) {
|
|
9347
|
-
throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9429
|
+
throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9348
9430
|
}
|
|
9349
9431
|
}
|
|
9350
9432
|
else {
|
|
@@ -9456,7 +9538,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9456
9538
|
}) {
|
|
9457
9539
|
const group = panel.group;
|
|
9458
9540
|
if (!group) {
|
|
9459
|
-
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9541
|
+
throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9460
9542
|
}
|
|
9461
9543
|
group.model.removePanel(panel, {
|
|
9462
9544
|
skipSetActiveGroup: options.skipSetActiveGroup,
|
|
@@ -9505,11 +9587,11 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9505
9587
|
? this.panels.find((panel) => panel.id === options.referencePanel)
|
|
9506
9588
|
: options.referencePanel;
|
|
9507
9589
|
if (!referencePanel) {
|
|
9508
|
-
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
9590
|
+
throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
|
|
9509
9591
|
}
|
|
9510
9592
|
referenceGroup = this.findGroup(referencePanel);
|
|
9511
9593
|
if (!referenceGroup) {
|
|
9512
|
-
throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9594
|
+
throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9513
9595
|
}
|
|
9514
9596
|
}
|
|
9515
9597
|
else if (isGroupOptionsWithGroup(options)) {
|
|
@@ -9518,7 +9600,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9518
9600
|
? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
9519
9601
|
: options.referenceGroup;
|
|
9520
9602
|
if (!referenceGroup) {
|
|
9521
|
-
throw new Error(`reference group ${options.referenceGroup} does not exist`);
|
|
9603
|
+
throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
|
|
9522
9604
|
}
|
|
9523
9605
|
}
|
|
9524
9606
|
else {
|
|
@@ -9586,7 +9668,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9586
9668
|
}
|
|
9587
9669
|
return floatingGroup.group;
|
|
9588
9670
|
}
|
|
9589
|
-
throw new Error('failed to find floating group');
|
|
9671
|
+
throw new Error('dockview: failed to find floating group');
|
|
9590
9672
|
}
|
|
9591
9673
|
if (group.api.location.type === 'popout') {
|
|
9592
9674
|
const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
|
|
@@ -9617,7 +9699,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9617
9699
|
this.updateWatermark();
|
|
9618
9700
|
return selectedGroup.popoutGroup;
|
|
9619
9701
|
}
|
|
9620
|
-
throw new Error('failed to find popout group');
|
|
9702
|
+
throw new Error('dockview: failed to find popout group');
|
|
9621
9703
|
}
|
|
9622
9704
|
const re = super.doRemoveGroup(group, options);
|
|
9623
9705
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
|
|
@@ -9648,7 +9730,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9648
9730
|
? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
9649
9731
|
: undefined;
|
|
9650
9732
|
if (!sourceGroup) {
|
|
9651
|
-
throw new Error(`Failed to find group id ${sourceGroupId}`);
|
|
9733
|
+
throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
|
|
9652
9734
|
}
|
|
9653
9735
|
if (sourceItemId === undefined) {
|
|
9654
9736
|
/**
|
|
@@ -9673,9 +9755,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9673
9755
|
skipSetActiveGroup: true,
|
|
9674
9756
|
}));
|
|
9675
9757
|
if (!removedPanel) {
|
|
9676
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9758
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9677
9759
|
}
|
|
9678
|
-
if (sourceGroup.model.size === 0) {
|
|
9760
|
+
if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
|
|
9679
9761
|
// remove the group and do not set a new group as active
|
|
9680
9762
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9681
9763
|
}
|
|
@@ -9685,7 +9767,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9685
9767
|
var _a;
|
|
9686
9768
|
return destinationGroup.model.openPanel(removedPanel, {
|
|
9687
9769
|
index: destinationIndex,
|
|
9688
|
-
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9770
|
+
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9771
|
+
!isDestinationGroupEmpty,
|
|
9689
9772
|
skipSetGroupActive: true,
|
|
9690
9773
|
});
|
|
9691
9774
|
});
|
|
@@ -9740,7 +9823,9 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9740
9823
|
}));
|
|
9741
9824
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9742
9825
|
const newGroup = this.createGroupAtLocation(targetLocation);
|
|
9743
|
-
this.movingLock(() => newGroup.model.openPanel(removedPanel
|
|
9826
|
+
this.movingLock(() => newGroup.model.openPanel(removedPanel, {
|
|
9827
|
+
skipSetActive: true,
|
|
9828
|
+
}));
|
|
9744
9829
|
this.doSetGroupAndPanelActive(newGroup);
|
|
9745
9830
|
this._onDidMovePanel.fire({
|
|
9746
9831
|
panel: this.getGroupPanel(sourceItemId),
|
|
@@ -9773,7 +9858,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9773
9858
|
skipSetActiveGroup: true,
|
|
9774
9859
|
}));
|
|
9775
9860
|
if (!removedPanel) {
|
|
9776
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9861
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9777
9862
|
}
|
|
9778
9863
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
9779
9864
|
const group = this.createGroupAtLocation(dropLocation);
|
|
@@ -9828,7 +9913,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9828
9913
|
case 'floating': {
|
|
9829
9914
|
const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
|
|
9830
9915
|
if (!selectedFloatingGroup) {
|
|
9831
|
-
throw new Error('failed to find floating group');
|
|
9916
|
+
throw new Error('dockview: failed to find floating group');
|
|
9832
9917
|
}
|
|
9833
9918
|
selectedFloatingGroup.dispose();
|
|
9834
9919
|
break;
|
|
@@ -9836,7 +9921,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
9836
9921
|
case 'popout': {
|
|
9837
9922
|
const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
|
|
9838
9923
|
if (!selectedPopoutGroup) {
|
|
9839
|
-
throw new Error('failed to find popout group');
|
|
9924
|
+
throw new Error('dockview: failed to find popout group');
|
|
9840
9925
|
}
|
|
9841
9926
|
// Remove from popout groups list to prevent automatic restoration
|
|
9842
9927
|
const index = this._popoutGroups.indexOf(selectedPopoutGroup);
|
|
@@ -11285,12 +11370,19 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11285
11370
|
return this._element;
|
|
11286
11371
|
}
|
|
11287
11372
|
init(parameters) {
|
|
11288
|
-
|
|
11373
|
+
// If already initialized, just update the parameters
|
|
11374
|
+
if (this.componentRef) {
|
|
11375
|
+
this.update(parameters);
|
|
11376
|
+
}
|
|
11377
|
+
else {
|
|
11378
|
+
this.render(parameters);
|
|
11379
|
+
}
|
|
11289
11380
|
}
|
|
11290
11381
|
update(params) {
|
|
11291
11382
|
if (this.componentRef) {
|
|
11292
11383
|
Object.keys(params).forEach(key => {
|
|
11293
|
-
|
|
11384
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11385
|
+
if (key in this.componentRef.instance) {
|
|
11294
11386
|
this.componentRef.instance[key] = params[key];
|
|
11295
11387
|
}
|
|
11296
11388
|
});
|
|
@@ -11306,7 +11398,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11306
11398
|
});
|
|
11307
11399
|
// Set initial parameters
|
|
11308
11400
|
Object.keys(parameters).forEach(key => {
|
|
11309
|
-
|
|
11401
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11402
|
+
if (key in this.componentRef.instance) {
|
|
11310
11403
|
this.componentRef.instance[key] = parameters[key];
|
|
11311
11404
|
}
|
|
11312
11405
|
});
|
|
@@ -11477,6 +11570,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
11477
11570
|
injector: this.injector,
|
|
11478
11571
|
environmentInjector: this.environmentInjector
|
|
11479
11572
|
});
|
|
11573
|
+
// Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
|
|
11480
11574
|
renderer.init({});
|
|
11481
11575
|
return renderer;
|
|
11482
11576
|
}
|
|
@@ -12534,6 +12628,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12534
12628
|
exports.DockviewAngularComponent = __decorate([
|
|
12535
12629
|
core.Component({
|
|
12536
12630
|
selector: 'dv-dockview',
|
|
12631
|
+
standalone: true,
|
|
12537
12632
|
template: '<div #dockviewContainer class="dockview-container"></div>',
|
|
12538
12633
|
styles: [`
|
|
12539
12634
|
:host {
|
|
@@ -12541,7 +12636,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12541
12636
|
width: 100%;
|
|
12542
12637
|
height: 100%;
|
|
12543
12638
|
}
|
|
12544
|
-
|
|
12639
|
+
|
|
12545
12640
|
.dockview-container {
|
|
12546
12641
|
width: 100%;
|
|
12547
12642
|
height: 100%;
|
|
@@ -12657,6 +12752,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12657
12752
|
exports.GridviewAngularComponent = __decorate([
|
|
12658
12753
|
core.Component({
|
|
12659
12754
|
selector: 'dv-gridview',
|
|
12755
|
+
standalone: true,
|
|
12660
12756
|
template: '<div #gridviewContainer class="gridview-container"></div>',
|
|
12661
12757
|
styles: [`
|
|
12662
12758
|
:host {
|
|
@@ -12664,7 +12760,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12664
12760
|
width: 100%;
|
|
12665
12761
|
height: 100%;
|
|
12666
12762
|
}
|
|
12667
|
-
|
|
12763
|
+
|
|
12668
12764
|
.gridview-container {
|
|
12669
12765
|
width: 100%;
|
|
12670
12766
|
height: 100%;
|
|
@@ -12805,6 +12901,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12805
12901
|
exports.PaneviewAngularComponent = __decorate([
|
|
12806
12902
|
core.Component({
|
|
12807
12903
|
selector: 'dv-paneview',
|
|
12904
|
+
standalone: true,
|
|
12808
12905
|
template: '<div #paneviewContainer class="paneview-container"></div>',
|
|
12809
12906
|
styles: [`
|
|
12810
12907
|
:host {
|
|
@@ -12812,7 +12909,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12812
12909
|
width: 100%;
|
|
12813
12910
|
height: 100%;
|
|
12814
12911
|
}
|
|
12815
|
-
|
|
12912
|
+
|
|
12816
12913
|
.paneview-container {
|
|
12817
12914
|
width: 100%;
|
|
12818
12915
|
height: 100%;
|
|
@@ -12928,6 +13025,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12928
13025
|
exports.SplitviewAngularComponent = __decorate([
|
|
12929
13026
|
core.Component({
|
|
12930
13027
|
selector: 'dv-splitview',
|
|
13028
|
+
standalone: true,
|
|
12931
13029
|
template: '<div #splitviewContainer class="splitview-container"></div>',
|
|
12932
13030
|
styles: [`
|
|
12933
13031
|
:host {
|
|
@@ -12935,7 +13033,7 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12935
13033
|
width: 100%;
|
|
12936
13034
|
height: 100%;
|
|
12937
13035
|
}
|
|
12938
|
-
|
|
13036
|
+
|
|
12939
13037
|
.splitview-container {
|
|
12940
13038
|
width: 100%;
|
|
12941
13039
|
height: 100%;
|
|
@@ -12949,15 +13047,13 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
|
|
|
12949
13047
|
};
|
|
12950
13048
|
exports.DockviewAngularModule = __decorate([
|
|
12951
13049
|
core.NgModule({
|
|
12952
|
-
|
|
13050
|
+
imports: [
|
|
13051
|
+
common.CommonModule,
|
|
12953
13052
|
exports.DockviewAngularComponent,
|
|
12954
13053
|
exports.GridviewAngularComponent,
|
|
12955
13054
|
exports.PaneviewAngularComponent,
|
|
12956
13055
|
exports.SplitviewAngularComponent
|
|
12957
13056
|
],
|
|
12958
|
-
imports: [
|
|
12959
|
-
common.CommonModule
|
|
12960
|
-
],
|
|
12961
13057
|
exports: [
|
|
12962
13058
|
exports.DockviewAngularComponent,
|
|
12963
13059
|
exports.GridviewAngularComponent,
|