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
|
*/
|
|
@@ -3783,8 +3783,8 @@ class DockviewApi {
|
|
|
3783
3783
|
/**
|
|
3784
3784
|
* Create a component from a serialized object.
|
|
3785
3785
|
*/
|
|
3786
|
-
fromJSON(data) {
|
|
3787
|
-
this.component.fromJSON(data);
|
|
3786
|
+
fromJSON(data, options) {
|
|
3787
|
+
this.component.fromJSON(data, options);
|
|
3788
3788
|
}
|
|
3789
3789
|
/**
|
|
3790
3790
|
* Create a serialized object of the current component.
|
|
@@ -5015,6 +5015,7 @@ class ContentContainer extends CompositeDisposable {
|
|
|
5015
5015
|
}
|
|
5016
5016
|
if (doRender) {
|
|
5017
5017
|
const focusTracker = trackFocus(container);
|
|
5018
|
+
this.focusTracker = focusTracker;
|
|
5018
5019
|
const disposable = new CompositeDisposable();
|
|
5019
5020
|
disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
|
|
5020
5021
|
this.disposable.value = disposable;
|
|
@@ -5042,6 +5043,16 @@ class ContentContainer extends CompositeDisposable {
|
|
|
5042
5043
|
this.disposable.dispose();
|
|
5043
5044
|
super.dispose();
|
|
5044
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
|
+
}
|
|
5045
5056
|
}
|
|
5046
5057
|
|
|
5047
5058
|
function addGhostImage(dataTransfer, ghostElement, options) {
|
|
@@ -6368,8 +6379,11 @@ class DockviewGroupPanelModel extends CompositeDisposable {
|
|
|
6368
6379
|
this._activePanel = panel;
|
|
6369
6380
|
if (panel) {
|
|
6370
6381
|
this.tabsContainer.setActivePanel(panel);
|
|
6382
|
+
this.contentContainer.openPanel(panel);
|
|
6371
6383
|
panel.layout(this._width, this._height);
|
|
6372
6384
|
this.updateMru(panel);
|
|
6385
|
+
// Refresh focus state to handle programmatic activation without DOM focus change
|
|
6386
|
+
this.contentContainer.refreshFocusState();
|
|
6373
6387
|
this._onDidActivePanelChange.fire({
|
|
6374
6388
|
panel,
|
|
6375
6389
|
});
|
|
@@ -7199,6 +7213,18 @@ class DockviewPanel extends CompositeDisposable {
|
|
|
7199
7213
|
params: this._params,
|
|
7200
7214
|
});
|
|
7201
7215
|
}
|
|
7216
|
+
updateFromStateModel(state) {
|
|
7217
|
+
var _a, _b, _c;
|
|
7218
|
+
this._maximumHeight = state.maximumHeight;
|
|
7219
|
+
this._minimumHeight = state.minimumHeight;
|
|
7220
|
+
this._maximumWidth = state.maximumWidth;
|
|
7221
|
+
this._minimumWidth = state.minimumWidth;
|
|
7222
|
+
this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
|
|
7223
|
+
this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
|
|
7224
|
+
this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
|
|
7225
|
+
// state.contentComponent;
|
|
7226
|
+
// state.tabComponent;
|
|
7227
|
+
}
|
|
7202
7228
|
updateParentGroup(group, options) {
|
|
7203
7229
|
this._group = group;
|
|
7204
7230
|
this.api.group = this._group;
|
|
@@ -8962,7 +8988,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
8962
8988
|
: (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
|
|
8963
8989
|
const el = group.element.querySelector('.dv-void-container');
|
|
8964
8990
|
if (!el) {
|
|
8965
|
-
throw new Error('failed to find drag handle');
|
|
8991
|
+
throw new Error('dockview: failed to find drag handle');
|
|
8966
8992
|
}
|
|
8967
8993
|
overlay.setupDrag(el, {
|
|
8968
8994
|
inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
|
|
@@ -9034,7 +9060,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9034
9060
|
case 'right':
|
|
9035
9061
|
return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
|
|
9036
9062
|
default:
|
|
9037
|
-
throw new Error(`unsupported position ${position}`);
|
|
9063
|
+
throw new Error(`dockview: unsupported position ${position}`);
|
|
9038
9064
|
}
|
|
9039
9065
|
}
|
|
9040
9066
|
updateOptions(options) {
|
|
@@ -9180,15 +9206,48 @@ class DockviewComponent extends BaseGrid {
|
|
|
9180
9206
|
}
|
|
9181
9207
|
return result;
|
|
9182
9208
|
}
|
|
9183
|
-
fromJSON(data) {
|
|
9209
|
+
fromJSON(data, options) {
|
|
9184
9210
|
var _a, _b;
|
|
9211
|
+
const existingPanels = new Map();
|
|
9212
|
+
let tempGroup;
|
|
9213
|
+
if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
|
|
9214
|
+
/**
|
|
9215
|
+
* What are we doing here?
|
|
9216
|
+
*
|
|
9217
|
+
* 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
|
|
9218
|
+
* 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
|
|
9219
|
+
*/
|
|
9220
|
+
tempGroup = this.createGroup();
|
|
9221
|
+
this._groups.delete(tempGroup.api.id);
|
|
9222
|
+
const newPanels = Object.keys(data.panels);
|
|
9223
|
+
for (const panel of this.panels) {
|
|
9224
|
+
if (newPanels.includes(panel.api.id)) {
|
|
9225
|
+
existingPanels.set(panel.api.id, panel);
|
|
9226
|
+
}
|
|
9227
|
+
}
|
|
9228
|
+
this.movingLock(() => {
|
|
9229
|
+
Array.from(existingPanels.values()).forEach((panel) => {
|
|
9230
|
+
this.moveGroupOrPanel({
|
|
9231
|
+
from: {
|
|
9232
|
+
groupId: panel.api.group.api.id,
|
|
9233
|
+
panelId: panel.api.id,
|
|
9234
|
+
},
|
|
9235
|
+
to: {
|
|
9236
|
+
group: tempGroup,
|
|
9237
|
+
position: 'center',
|
|
9238
|
+
},
|
|
9239
|
+
keepEmptyGroups: true,
|
|
9240
|
+
});
|
|
9241
|
+
});
|
|
9242
|
+
});
|
|
9243
|
+
}
|
|
9185
9244
|
this.clear();
|
|
9186
9245
|
if (typeof data !== 'object' || data === null) {
|
|
9187
|
-
throw new Error('serialized layout must be a non-null object');
|
|
9246
|
+
throw new Error('dockview: serialized layout must be a non-null object');
|
|
9188
9247
|
}
|
|
9189
9248
|
const { grid, panels, activeGroup } = data;
|
|
9190
9249
|
if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
|
|
9191
|
-
throw new Error('root must be of type branch');
|
|
9250
|
+
throw new Error('dockview: root must be of type branch');
|
|
9192
9251
|
}
|
|
9193
9252
|
try {
|
|
9194
9253
|
// take note of the existing dimensions
|
|
@@ -9197,7 +9256,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9197
9256
|
const createGroupFromSerializedState = (data) => {
|
|
9198
9257
|
const { id, locked, hideHeader, views, activeView } = data;
|
|
9199
9258
|
if (typeof id !== 'string') {
|
|
9200
|
-
throw new Error('group id must be of type string');
|
|
9259
|
+
throw new Error('dockview: group id must be of type string');
|
|
9201
9260
|
}
|
|
9202
9261
|
const group = this.createGroup({
|
|
9203
9262
|
id,
|
|
@@ -9212,17 +9271,38 @@ class DockviewComponent extends BaseGrid {
|
|
|
9212
9271
|
* In running this section first we avoid firing lots of 'add' events in the event of a failure
|
|
9213
9272
|
* due to a corruption of input data.
|
|
9214
9273
|
*/
|
|
9215
|
-
const
|
|
9216
|
-
|
|
9274
|
+
const existingPanel = existingPanels.get(child);
|
|
9275
|
+
if (tempGroup && existingPanel) {
|
|
9276
|
+
this.movingLock(() => {
|
|
9277
|
+
tempGroup.model.removePanel(existingPanel);
|
|
9278
|
+
});
|
|
9279
|
+
createdPanels.push(existingPanel);
|
|
9280
|
+
existingPanel.updateFromStateModel(panels[child]);
|
|
9281
|
+
}
|
|
9282
|
+
else {
|
|
9283
|
+
const panel = this._deserializer.fromJSON(panels[child], group);
|
|
9284
|
+
createdPanels.push(panel);
|
|
9285
|
+
}
|
|
9217
9286
|
}
|
|
9218
9287
|
for (let i = 0; i < views.length; i++) {
|
|
9219
9288
|
const panel = createdPanels[i];
|
|
9220
9289
|
const isActive = typeof activeView === 'string' &&
|
|
9221
9290
|
activeView === panel.id;
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9291
|
+
const hasExisting = existingPanels.has(panel.api.id);
|
|
9292
|
+
if (hasExisting) {
|
|
9293
|
+
this.movingLock(() => {
|
|
9294
|
+
group.model.openPanel(panel, {
|
|
9295
|
+
skipSetActive: !isActive,
|
|
9296
|
+
skipSetGroupActive: true,
|
|
9297
|
+
});
|
|
9298
|
+
});
|
|
9299
|
+
}
|
|
9300
|
+
else {
|
|
9301
|
+
group.model.openPanel(panel, {
|
|
9302
|
+
skipSetActive: !isActive,
|
|
9303
|
+
skipSetGroupActive: true,
|
|
9304
|
+
});
|
|
9305
|
+
}
|
|
9226
9306
|
}
|
|
9227
9307
|
if (!group.activePanel && group.panels.length > 0) {
|
|
9228
9308
|
group.model.openPanel(group.panels[group.panels.length - 1], {
|
|
@@ -9261,7 +9341,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
9261
9341
|
setTimeout(() => {
|
|
9262
9342
|
this.addPopoutGroup(group, {
|
|
9263
9343
|
position: position !== null && position !== void 0 ? position : undefined,
|
|
9264
|
-
overridePopoutGroup: gridReferenceGroup
|
|
9344
|
+
overridePopoutGroup: gridReferenceGroup
|
|
9345
|
+
? group
|
|
9346
|
+
: undefined,
|
|
9265
9347
|
referenceGroup: gridReferenceGroup
|
|
9266
9348
|
? this.getPanel(gridReferenceGroup)
|
|
9267
9349
|
: undefined,
|
|
@@ -9347,11 +9429,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
9347
9429
|
addPanel(options) {
|
|
9348
9430
|
var _a, _b;
|
|
9349
9431
|
if (this.panels.find((_) => _.id === options.id)) {
|
|
9350
|
-
throw new Error(`panel with id ${options.id} already exists`);
|
|
9432
|
+
throw new Error(`dockview: panel with id ${options.id} already exists`);
|
|
9351
9433
|
}
|
|
9352
9434
|
let referenceGroup;
|
|
9353
9435
|
if (options.position && options.floating) {
|
|
9354
|
-
throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9436
|
+
throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
|
|
9355
9437
|
}
|
|
9356
9438
|
const initial = {
|
|
9357
9439
|
width: options.initialWidth,
|
|
@@ -9365,7 +9447,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9365
9447
|
: options.position.referencePanel;
|
|
9366
9448
|
index = options.position.index;
|
|
9367
9449
|
if (!referencePanel) {
|
|
9368
|
-
throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9450
|
+
throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
|
|
9369
9451
|
}
|
|
9370
9452
|
referenceGroup = this.findGroup(referencePanel);
|
|
9371
9453
|
}
|
|
@@ -9376,7 +9458,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9376
9458
|
: options.position.referenceGroup;
|
|
9377
9459
|
index = options.position.index;
|
|
9378
9460
|
if (!referenceGroup) {
|
|
9379
|
-
throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9461
|
+
throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
|
|
9380
9462
|
}
|
|
9381
9463
|
}
|
|
9382
9464
|
else {
|
|
@@ -9488,7 +9570,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9488
9570
|
}) {
|
|
9489
9571
|
const group = panel.group;
|
|
9490
9572
|
if (!group) {
|
|
9491
|
-
throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9573
|
+
throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
|
|
9492
9574
|
}
|
|
9493
9575
|
group.model.removePanel(panel, {
|
|
9494
9576
|
skipSetActiveGroup: options.skipSetActiveGroup,
|
|
@@ -9537,11 +9619,11 @@ class DockviewComponent extends BaseGrid {
|
|
|
9537
9619
|
? this.panels.find((panel) => panel.id === options.referencePanel)
|
|
9538
9620
|
: options.referencePanel;
|
|
9539
9621
|
if (!referencePanel) {
|
|
9540
|
-
throw new Error(`reference panel ${options.referencePanel} does not exist`);
|
|
9622
|
+
throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
|
|
9541
9623
|
}
|
|
9542
9624
|
referenceGroup = this.findGroup(referencePanel);
|
|
9543
9625
|
if (!referenceGroup) {
|
|
9544
|
-
throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9626
|
+
throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
|
|
9545
9627
|
}
|
|
9546
9628
|
}
|
|
9547
9629
|
else if (isGroupOptionsWithGroup(options)) {
|
|
@@ -9550,7 +9632,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9550
9632
|
? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
|
|
9551
9633
|
: options.referenceGroup;
|
|
9552
9634
|
if (!referenceGroup) {
|
|
9553
|
-
throw new Error(`reference group ${options.referenceGroup} does not exist`);
|
|
9635
|
+
throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
|
|
9554
9636
|
}
|
|
9555
9637
|
}
|
|
9556
9638
|
else {
|
|
@@ -9618,7 +9700,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9618
9700
|
}
|
|
9619
9701
|
return floatingGroup.group;
|
|
9620
9702
|
}
|
|
9621
|
-
throw new Error('failed to find floating group');
|
|
9703
|
+
throw new Error('dockview: failed to find floating group');
|
|
9622
9704
|
}
|
|
9623
9705
|
if (group.api.location.type === 'popout') {
|
|
9624
9706
|
const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
|
|
@@ -9649,7 +9731,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9649
9731
|
this.updateWatermark();
|
|
9650
9732
|
return selectedGroup.popoutGroup;
|
|
9651
9733
|
}
|
|
9652
|
-
throw new Error('failed to find popout group');
|
|
9734
|
+
throw new Error('dockview: failed to find popout group');
|
|
9653
9735
|
}
|
|
9654
9736
|
const re = super.doRemoveGroup(group, options);
|
|
9655
9737
|
if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
|
|
@@ -9680,7 +9762,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9680
9762
|
? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
|
|
9681
9763
|
: undefined;
|
|
9682
9764
|
if (!sourceGroup) {
|
|
9683
|
-
throw new Error(`Failed to find group id ${sourceGroupId}`);
|
|
9765
|
+
throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
|
|
9684
9766
|
}
|
|
9685
9767
|
if (sourceItemId === undefined) {
|
|
9686
9768
|
/**
|
|
@@ -9705,9 +9787,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
9705
9787
|
skipSetActiveGroup: true,
|
|
9706
9788
|
}));
|
|
9707
9789
|
if (!removedPanel) {
|
|
9708
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9790
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9709
9791
|
}
|
|
9710
|
-
if (sourceGroup.model.size === 0) {
|
|
9792
|
+
if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
|
|
9711
9793
|
// remove the group and do not set a new group as active
|
|
9712
9794
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9713
9795
|
}
|
|
@@ -9717,7 +9799,8 @@ class DockviewComponent extends BaseGrid {
|
|
|
9717
9799
|
var _a;
|
|
9718
9800
|
return destinationGroup.model.openPanel(removedPanel, {
|
|
9719
9801
|
index: destinationIndex,
|
|
9720
|
-
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9802
|
+
skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
|
|
9803
|
+
!isDestinationGroupEmpty,
|
|
9721
9804
|
skipSetGroupActive: true,
|
|
9722
9805
|
});
|
|
9723
9806
|
});
|
|
@@ -9772,7 +9855,9 @@ class DockviewComponent extends BaseGrid {
|
|
|
9772
9855
|
}));
|
|
9773
9856
|
this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
9774
9857
|
const newGroup = this.createGroupAtLocation(targetLocation);
|
|
9775
|
-
this.movingLock(() => newGroup.model.openPanel(removedPanel
|
|
9858
|
+
this.movingLock(() => newGroup.model.openPanel(removedPanel, {
|
|
9859
|
+
skipSetActive: true,
|
|
9860
|
+
}));
|
|
9776
9861
|
this.doSetGroupAndPanelActive(newGroup);
|
|
9777
9862
|
this._onDidMovePanel.fire({
|
|
9778
9863
|
panel: this.getGroupPanel(sourceItemId),
|
|
@@ -9805,7 +9890,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9805
9890
|
skipSetActiveGroup: true,
|
|
9806
9891
|
}));
|
|
9807
9892
|
if (!removedPanel) {
|
|
9808
|
-
throw new Error(`No panel with id ${sourceItemId}`);
|
|
9893
|
+
throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
9809
9894
|
}
|
|
9810
9895
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
9811
9896
|
const group = this.createGroupAtLocation(dropLocation);
|
|
@@ -9860,7 +9945,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9860
9945
|
case 'floating': {
|
|
9861
9946
|
const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
|
|
9862
9947
|
if (!selectedFloatingGroup) {
|
|
9863
|
-
throw new Error('failed to find floating group');
|
|
9948
|
+
throw new Error('dockview: failed to find floating group');
|
|
9864
9949
|
}
|
|
9865
9950
|
selectedFloatingGroup.dispose();
|
|
9866
9951
|
break;
|
|
@@ -9868,7 +9953,7 @@ class DockviewComponent extends BaseGrid {
|
|
|
9868
9953
|
case 'popout': {
|
|
9869
9954
|
const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
|
|
9870
9955
|
if (!selectedPopoutGroup) {
|
|
9871
|
-
throw new Error('failed to find popout group');
|
|
9956
|
+
throw new Error('dockview: failed to find popout group');
|
|
9872
9957
|
}
|
|
9873
9958
|
// Remove from popout groups list to prevent automatic restoration
|
|
9874
9959
|
const index = this._popoutGroups.indexOf(selectedPopoutGroup);
|
|
@@ -11317,12 +11402,19 @@ class AngularRenderer {
|
|
|
11317
11402
|
return this._element;
|
|
11318
11403
|
}
|
|
11319
11404
|
init(parameters) {
|
|
11320
|
-
|
|
11405
|
+
// If already initialized, just update the parameters
|
|
11406
|
+
if (this.componentRef) {
|
|
11407
|
+
this.update(parameters);
|
|
11408
|
+
}
|
|
11409
|
+
else {
|
|
11410
|
+
this.render(parameters);
|
|
11411
|
+
}
|
|
11321
11412
|
}
|
|
11322
11413
|
update(params) {
|
|
11323
11414
|
if (this.componentRef) {
|
|
11324
11415
|
Object.keys(params).forEach(key => {
|
|
11325
|
-
|
|
11416
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11417
|
+
if (key in this.componentRef.instance) {
|
|
11326
11418
|
this.componentRef.instance[key] = params[key];
|
|
11327
11419
|
}
|
|
11328
11420
|
});
|
|
@@ -11338,7 +11430,8 @@ class AngularRenderer {
|
|
|
11338
11430
|
});
|
|
11339
11431
|
// Set initial parameters
|
|
11340
11432
|
Object.keys(parameters).forEach(key => {
|
|
11341
|
-
|
|
11433
|
+
// Use 'in' operator instead of hasOwnProperty to support getter/setter properties
|
|
11434
|
+
if (key in this.componentRef.instance) {
|
|
11342
11435
|
this.componentRef.instance[key] = parameters[key];
|
|
11343
11436
|
}
|
|
11344
11437
|
});
|
|
@@ -11509,6 +11602,7 @@ class AngularFrameworkComponentFactory {
|
|
|
11509
11602
|
injector: this.injector,
|
|
11510
11603
|
environmentInjector: this.environmentInjector
|
|
11511
11604
|
});
|
|
11605
|
+
// Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
|
|
11512
11606
|
renderer.init({});
|
|
11513
11607
|
return renderer;
|
|
11514
11608
|
}
|
|
@@ -12566,6 +12660,7 @@ __decorate([
|
|
|
12566
12660
|
DockviewAngularComponent = __decorate([
|
|
12567
12661
|
Component({
|
|
12568
12662
|
selector: 'dv-dockview',
|
|
12663
|
+
standalone: true,
|
|
12569
12664
|
template: '<div #dockviewContainer class="dockview-container"></div>',
|
|
12570
12665
|
styles: [`
|
|
12571
12666
|
:host {
|
|
@@ -12573,7 +12668,7 @@ DockviewAngularComponent = __decorate([
|
|
|
12573
12668
|
width: 100%;
|
|
12574
12669
|
height: 100%;
|
|
12575
12670
|
}
|
|
12576
|
-
|
|
12671
|
+
|
|
12577
12672
|
.dockview-container {
|
|
12578
12673
|
width: 100%;
|
|
12579
12674
|
height: 100%;
|
|
@@ -12689,6 +12784,7 @@ __decorate([
|
|
|
12689
12784
|
GridviewAngularComponent = __decorate([
|
|
12690
12785
|
Component({
|
|
12691
12786
|
selector: 'dv-gridview',
|
|
12787
|
+
standalone: true,
|
|
12692
12788
|
template: '<div #gridviewContainer class="gridview-container"></div>',
|
|
12693
12789
|
styles: [`
|
|
12694
12790
|
:host {
|
|
@@ -12696,7 +12792,7 @@ GridviewAngularComponent = __decorate([
|
|
|
12696
12792
|
width: 100%;
|
|
12697
12793
|
height: 100%;
|
|
12698
12794
|
}
|
|
12699
|
-
|
|
12795
|
+
|
|
12700
12796
|
.gridview-container {
|
|
12701
12797
|
width: 100%;
|
|
12702
12798
|
height: 100%;
|
|
@@ -12837,6 +12933,7 @@ __decorate([
|
|
|
12837
12933
|
PaneviewAngularComponent = __decorate([
|
|
12838
12934
|
Component({
|
|
12839
12935
|
selector: 'dv-paneview',
|
|
12936
|
+
standalone: true,
|
|
12840
12937
|
template: '<div #paneviewContainer class="paneview-container"></div>',
|
|
12841
12938
|
styles: [`
|
|
12842
12939
|
:host {
|
|
@@ -12844,7 +12941,7 @@ PaneviewAngularComponent = __decorate([
|
|
|
12844
12941
|
width: 100%;
|
|
12845
12942
|
height: 100%;
|
|
12846
12943
|
}
|
|
12847
|
-
|
|
12944
|
+
|
|
12848
12945
|
.paneview-container {
|
|
12849
12946
|
width: 100%;
|
|
12850
12947
|
height: 100%;
|
|
@@ -12960,6 +13057,7 @@ __decorate([
|
|
|
12960
13057
|
SplitviewAngularComponent = __decorate([
|
|
12961
13058
|
Component({
|
|
12962
13059
|
selector: 'dv-splitview',
|
|
13060
|
+
standalone: true,
|
|
12963
13061
|
template: '<div #splitviewContainer class="splitview-container"></div>',
|
|
12964
13062
|
styles: [`
|
|
12965
13063
|
:host {
|
|
@@ -12967,7 +13065,7 @@ SplitviewAngularComponent = __decorate([
|
|
|
12967
13065
|
width: 100%;
|
|
12968
13066
|
height: 100%;
|
|
12969
13067
|
}
|
|
12970
|
-
|
|
13068
|
+
|
|
12971
13069
|
.splitview-container {
|
|
12972
13070
|
width: 100%;
|
|
12973
13071
|
height: 100%;
|
|
@@ -12981,15 +13079,13 @@ let DockviewAngularModule = class DockviewAngularModule {
|
|
|
12981
13079
|
};
|
|
12982
13080
|
DockviewAngularModule = __decorate([
|
|
12983
13081
|
NgModule({
|
|
12984
|
-
|
|
13082
|
+
imports: [
|
|
13083
|
+
CommonModule,
|
|
12985
13084
|
DockviewAngularComponent,
|
|
12986
13085
|
GridviewAngularComponent,
|
|
12987
13086
|
PaneviewAngularComponent,
|
|
12988
13087
|
SplitviewAngularComponent
|
|
12989
13088
|
],
|
|
12990
|
-
imports: [
|
|
12991
|
-
CommonModule
|
|
12992
|
-
],
|
|
12993
13089
|
exports: [
|
|
12994
13090
|
DockviewAngularComponent,
|
|
12995
13091
|
GridviewAngularComponent,
|