dockview-angular 4.10.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.
Files changed (37) hide show
  1. package/dist/cjs/lib/dockview/dockview-angular.component.js +2 -1
  2. package/dist/cjs/lib/dockview-angular.module.js +2 -4
  3. package/dist/cjs/lib/gridview/gridview-angular.component.js +2 -1
  4. package/dist/cjs/lib/paneview/paneview-angular.component.js +2 -1
  5. package/dist/cjs/lib/splitview/splitview-angular.component.js +2 -1
  6. package/dist/cjs/lib/utils/angular-renderer.js +11 -3
  7. package/dist/cjs/lib/utils/component-factory.js +1 -0
  8. package/dist/dockview-angular.amd.js +184 -46
  9. package/dist/dockview-angular.amd.js.map +1 -1
  10. package/dist/dockview-angular.amd.min.js +2 -2
  11. package/dist/dockview-angular.amd.min.js.map +1 -1
  12. package/dist/dockview-angular.amd.min.noStyle.js +2 -2
  13. package/dist/dockview-angular.amd.min.noStyle.js.map +1 -1
  14. package/dist/dockview-angular.amd.noStyle.js +184 -46
  15. package/dist/dockview-angular.amd.noStyle.js.map +1 -1
  16. package/dist/dockview-angular.cjs.js +184 -46
  17. package/dist/dockview-angular.cjs.js.map +1 -1
  18. package/dist/dockview-angular.esm.js +184 -46
  19. package/dist/dockview-angular.esm.js.map +1 -1
  20. package/dist/dockview-angular.esm.min.js +2 -2
  21. package/dist/dockview-angular.esm.min.js.map +1 -1
  22. package/dist/dockview-angular.js +184 -46
  23. package/dist/dockview-angular.js.map +1 -1
  24. package/dist/dockview-angular.min.js +2 -2
  25. package/dist/dockview-angular.min.js.map +1 -1
  26. package/dist/dockview-angular.min.noStyle.js +2 -2
  27. package/dist/dockview-angular.min.noStyle.js.map +1 -1
  28. package/dist/dockview-angular.noStyle.js +184 -46
  29. package/dist/dockview-angular.noStyle.js.map +1 -1
  30. package/dist/esm/lib/dockview/dockview-angular.component.js +2 -1
  31. package/dist/esm/lib/dockview-angular.module.js +2 -4
  32. package/dist/esm/lib/gridview/gridview-angular.component.js +2 -1
  33. package/dist/esm/lib/paneview/paneview-angular.component.js +2 -1
  34. package/dist/esm/lib/splitview/splitview-angular.component.js +2 -1
  35. package/dist/esm/lib/utils/angular-renderer.js +11 -3
  36. package/dist/esm/lib/utils/component-factory.js +1 -0
  37. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-angular
3
- * @version 4.10.0
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
  });
@@ -6793,11 +6807,16 @@ class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
6793
6807
  }
6794
6808
  }
6795
6809
 
6810
+ // GridConstraintChangeEvent2 is not exported, so we'll type it manually
6796
6811
  const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
6797
6812
  const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
6798
6813
  class DockviewGroupPanel extends GridviewPanel {
6799
6814
  get minimumWidth() {
6800
6815
  var _a;
6816
+ // Check for explicitly set group constraint first
6817
+ if (typeof this._explicitConstraints.minimumWidth === 'number') {
6818
+ return this._explicitConstraints.minimumWidth;
6819
+ }
6801
6820
  const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
6802
6821
  if (typeof activePanelMinimumWidth === 'number') {
6803
6822
  return activePanelMinimumWidth;
@@ -6806,6 +6825,10 @@ class DockviewGroupPanel extends GridviewPanel {
6806
6825
  }
6807
6826
  get minimumHeight() {
6808
6827
  var _a;
6828
+ // Check for explicitly set group constraint first
6829
+ if (typeof this._explicitConstraints.minimumHeight === 'number') {
6830
+ return this._explicitConstraints.minimumHeight;
6831
+ }
6809
6832
  const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
6810
6833
  if (typeof activePanelMinimumHeight === 'number') {
6811
6834
  return activePanelMinimumHeight;
@@ -6814,6 +6837,10 @@ class DockviewGroupPanel extends GridviewPanel {
6814
6837
  }
6815
6838
  get maximumWidth() {
6816
6839
  var _a;
6840
+ // Check for explicitly set group constraint first
6841
+ if (typeof this._explicitConstraints.maximumWidth === 'number') {
6842
+ return this._explicitConstraints.maximumWidth;
6843
+ }
6817
6844
  const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
6818
6845
  if (typeof activePanelMaximumWidth === 'number') {
6819
6846
  return activePanelMaximumWidth;
@@ -6822,6 +6849,10 @@ class DockviewGroupPanel extends GridviewPanel {
6822
6849
  }
6823
6850
  get maximumHeight() {
6824
6851
  var _a;
6852
+ // Check for explicitly set group constraint first
6853
+ if (typeof this._explicitConstraints.maximumHeight === 'number') {
6854
+ return this._explicitConstraints.maximumHeight;
6855
+ }
6825
6856
  const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
6826
6857
  if (typeof activePanelMaximumHeight === 'number') {
6827
6858
  return activePanelMaximumHeight;
@@ -6853,14 +6884,39 @@ class DockviewGroupPanel extends GridviewPanel {
6853
6884
  var _a, _b, _c, _d, _e, _f;
6854
6885
  super(id, 'groupview_default', {
6855
6886
  minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
6856
- minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.maximumHeight) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6887
+ minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6857
6888
  maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
6858
6889
  maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
6859
6890
  }, new DockviewGroupPanelApiImpl(id, accessor));
6891
+ // Track explicitly set constraints to override panel constraints
6892
+ this._explicitConstraints = {};
6860
6893
  this.api.initialize(this); // cannot use 'this' after after 'super' call
6861
6894
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
6862
6895
  this.addDisposables(this.model.onDidActivePanelChange((event) => {
6863
6896
  this.api._onDidActivePanelChange.fire(event);
6897
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6898
+ // Track explicitly set constraints to override panel constraints
6899
+ // Extract numeric values from functions or values
6900
+ if (event.minimumWidth !== undefined) {
6901
+ this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
6902
+ ? event.minimumWidth()
6903
+ : event.minimumWidth;
6904
+ }
6905
+ if (event.minimumHeight !== undefined) {
6906
+ this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
6907
+ ? event.minimumHeight()
6908
+ : event.minimumHeight;
6909
+ }
6910
+ if (event.maximumWidth !== undefined) {
6911
+ this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
6912
+ ? event.maximumWidth()
6913
+ : event.maximumWidth;
6914
+ }
6915
+ if (event.maximumHeight !== undefined) {
6916
+ this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
6917
+ ? event.maximumHeight()
6918
+ : event.maximumHeight;
6919
+ }
6864
6920
  }));
6865
6921
  }
6866
6922
  focus() {
@@ -7157,6 +7213,18 @@ class DockviewPanel extends CompositeDisposable {
7157
7213
  params: this._params,
7158
7214
  });
7159
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
+ }
7160
7228
  updateParentGroup(group, options) {
7161
7229
  this._group = group;
7162
7230
  this.api.group = this._group;
@@ -8920,7 +8988,7 @@ class DockviewComponent extends BaseGrid {
8920
8988
  : (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
8921
8989
  const el = group.element.querySelector('.dv-void-container');
8922
8990
  if (!el) {
8923
- throw new Error('failed to find drag handle');
8991
+ throw new Error('dockview: failed to find drag handle');
8924
8992
  }
8925
8993
  overlay.setupDrag(el, {
8926
8994
  inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
@@ -8992,7 +9060,7 @@ class DockviewComponent extends BaseGrid {
8992
9060
  case 'right':
8993
9061
  return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
8994
9062
  default:
8995
- throw new Error(`unsupported position ${position}`);
9063
+ throw new Error(`dockview: unsupported position ${position}`);
8996
9064
  }
8997
9065
  }
8998
9066
  updateOptions(options) {
@@ -9138,15 +9206,48 @@ class DockviewComponent extends BaseGrid {
9138
9206
  }
9139
9207
  return result;
9140
9208
  }
9141
- fromJSON(data) {
9209
+ fromJSON(data, options) {
9142
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
+ }
9143
9244
  this.clear();
9144
9245
  if (typeof data !== 'object' || data === null) {
9145
- throw new Error('serialized layout must be a non-null object');
9246
+ throw new Error('dockview: serialized layout must be a non-null object');
9146
9247
  }
9147
9248
  const { grid, panels, activeGroup } = data;
9148
9249
  if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
9149
- throw new Error('root must be of type branch');
9250
+ throw new Error('dockview: root must be of type branch');
9150
9251
  }
9151
9252
  try {
9152
9253
  // take note of the existing dimensions
@@ -9155,7 +9256,7 @@ class DockviewComponent extends BaseGrid {
9155
9256
  const createGroupFromSerializedState = (data) => {
9156
9257
  const { id, locked, hideHeader, views, activeView } = data;
9157
9258
  if (typeof id !== 'string') {
9158
- throw new Error('group id must be of type string');
9259
+ throw new Error('dockview: group id must be of type string');
9159
9260
  }
9160
9261
  const group = this.createGroup({
9161
9262
  id,
@@ -9170,17 +9271,38 @@ class DockviewComponent extends BaseGrid {
9170
9271
  * In running this section first we avoid firing lots of 'add' events in the event of a failure
9171
9272
  * due to a corruption of input data.
9172
9273
  */
9173
- const panel = this._deserializer.fromJSON(panels[child], group);
9174
- createdPanels.push(panel);
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
+ }
9175
9286
  }
9176
9287
  for (let i = 0; i < views.length; i++) {
9177
9288
  const panel = createdPanels[i];
9178
9289
  const isActive = typeof activeView === 'string' &&
9179
9290
  activeView === panel.id;
9180
- group.model.openPanel(panel, {
9181
- skipSetActive: !isActive,
9182
- skipSetGroupActive: true,
9183
- });
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
+ }
9184
9306
  }
9185
9307
  if (!group.activePanel && group.panels.length > 0) {
9186
9308
  group.model.openPanel(group.panels[group.panels.length - 1], {
@@ -9219,7 +9341,9 @@ class DockviewComponent extends BaseGrid {
9219
9341
  setTimeout(() => {
9220
9342
  this.addPopoutGroup(group, {
9221
9343
  position: position !== null && position !== void 0 ? position : undefined,
9222
- overridePopoutGroup: gridReferenceGroup ? group : undefined,
9344
+ overridePopoutGroup: gridReferenceGroup
9345
+ ? group
9346
+ : undefined,
9223
9347
  referenceGroup: gridReferenceGroup
9224
9348
  ? this.getPanel(gridReferenceGroup)
9225
9349
  : undefined,
@@ -9305,11 +9429,11 @@ class DockviewComponent extends BaseGrid {
9305
9429
  addPanel(options) {
9306
9430
  var _a, _b;
9307
9431
  if (this.panels.find((_) => _.id === options.id)) {
9308
- throw new Error(`panel with id ${options.id} already exists`);
9432
+ throw new Error(`dockview: panel with id ${options.id} already exists`);
9309
9433
  }
9310
9434
  let referenceGroup;
9311
9435
  if (options.position && options.floating) {
9312
- 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(...)');
9313
9437
  }
9314
9438
  const initial = {
9315
9439
  width: options.initialWidth,
@@ -9323,7 +9447,7 @@ class DockviewComponent extends BaseGrid {
9323
9447
  : options.position.referencePanel;
9324
9448
  index = options.position.index;
9325
9449
  if (!referencePanel) {
9326
- throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
9450
+ throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
9327
9451
  }
9328
9452
  referenceGroup = this.findGroup(referencePanel);
9329
9453
  }
@@ -9334,7 +9458,7 @@ class DockviewComponent extends BaseGrid {
9334
9458
  : options.position.referenceGroup;
9335
9459
  index = options.position.index;
9336
9460
  if (!referenceGroup) {
9337
- throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
9461
+ throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
9338
9462
  }
9339
9463
  }
9340
9464
  else {
@@ -9446,7 +9570,7 @@ class DockviewComponent extends BaseGrid {
9446
9570
  }) {
9447
9571
  const group = panel.group;
9448
9572
  if (!group) {
9449
- 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.`);
9450
9574
  }
9451
9575
  group.model.removePanel(panel, {
9452
9576
  skipSetActiveGroup: options.skipSetActiveGroup,
@@ -9495,11 +9619,11 @@ class DockviewComponent extends BaseGrid {
9495
9619
  ? this.panels.find((panel) => panel.id === options.referencePanel)
9496
9620
  : options.referencePanel;
9497
9621
  if (!referencePanel) {
9498
- throw new Error(`reference panel ${options.referencePanel} does not exist`);
9622
+ throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
9499
9623
  }
9500
9624
  referenceGroup = this.findGroup(referencePanel);
9501
9625
  if (!referenceGroup) {
9502
- 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`);
9503
9627
  }
9504
9628
  }
9505
9629
  else if (isGroupOptionsWithGroup(options)) {
@@ -9508,7 +9632,7 @@ class DockviewComponent extends BaseGrid {
9508
9632
  ? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
9509
9633
  : options.referenceGroup;
9510
9634
  if (!referenceGroup) {
9511
- throw new Error(`reference group ${options.referenceGroup} does not exist`);
9635
+ throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
9512
9636
  }
9513
9637
  }
9514
9638
  else {
@@ -9576,7 +9700,7 @@ class DockviewComponent extends BaseGrid {
9576
9700
  }
9577
9701
  return floatingGroup.group;
9578
9702
  }
9579
- throw new Error('failed to find floating group');
9703
+ throw new Error('dockview: failed to find floating group');
9580
9704
  }
9581
9705
  if (group.api.location.type === 'popout') {
9582
9706
  const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
@@ -9607,7 +9731,7 @@ class DockviewComponent extends BaseGrid {
9607
9731
  this.updateWatermark();
9608
9732
  return selectedGroup.popoutGroup;
9609
9733
  }
9610
- throw new Error('failed to find popout group');
9734
+ throw new Error('dockview: failed to find popout group');
9611
9735
  }
9612
9736
  const re = super.doRemoveGroup(group, options);
9613
9737
  if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
@@ -9638,7 +9762,7 @@ class DockviewComponent extends BaseGrid {
9638
9762
  ? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
9639
9763
  : undefined;
9640
9764
  if (!sourceGroup) {
9641
- throw new Error(`Failed to find group id ${sourceGroupId}`);
9765
+ throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
9642
9766
  }
9643
9767
  if (sourceItemId === undefined) {
9644
9768
  /**
@@ -9663,9 +9787,9 @@ class DockviewComponent extends BaseGrid {
9663
9787
  skipSetActiveGroup: true,
9664
9788
  }));
9665
9789
  if (!removedPanel) {
9666
- throw new Error(`No panel with id ${sourceItemId}`);
9790
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9667
9791
  }
9668
- if (sourceGroup.model.size === 0) {
9792
+ if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
9669
9793
  // remove the group and do not set a new group as active
9670
9794
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9671
9795
  }
@@ -9675,7 +9799,8 @@ class DockviewComponent extends BaseGrid {
9675
9799
  var _a;
9676
9800
  return destinationGroup.model.openPanel(removedPanel, {
9677
9801
  index: destinationIndex,
9678
- skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) && !isDestinationGroupEmpty,
9802
+ skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
9803
+ !isDestinationGroupEmpty,
9679
9804
  skipSetGroupActive: true,
9680
9805
  });
9681
9806
  });
@@ -9730,7 +9855,9 @@ class DockviewComponent extends BaseGrid {
9730
9855
  }));
9731
9856
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9732
9857
  const newGroup = this.createGroupAtLocation(targetLocation);
9733
- this.movingLock(() => newGroup.model.openPanel(removedPanel));
9858
+ this.movingLock(() => newGroup.model.openPanel(removedPanel, {
9859
+ skipSetActive: true,
9860
+ }));
9734
9861
  this.doSetGroupAndPanelActive(newGroup);
9735
9862
  this._onDidMovePanel.fire({
9736
9863
  panel: this.getGroupPanel(sourceItemId),
@@ -9763,7 +9890,7 @@ class DockviewComponent extends BaseGrid {
9763
9890
  skipSetActiveGroup: true,
9764
9891
  }));
9765
9892
  if (!removedPanel) {
9766
- throw new Error(`No panel with id ${sourceItemId}`);
9893
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9767
9894
  }
9768
9895
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
9769
9896
  const group = this.createGroupAtLocation(dropLocation);
@@ -9818,7 +9945,7 @@ class DockviewComponent extends BaseGrid {
9818
9945
  case 'floating': {
9819
9946
  const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
9820
9947
  if (!selectedFloatingGroup) {
9821
- throw new Error('failed to find floating group');
9948
+ throw new Error('dockview: failed to find floating group');
9822
9949
  }
9823
9950
  selectedFloatingGroup.dispose();
9824
9951
  break;
@@ -9826,7 +9953,7 @@ class DockviewComponent extends BaseGrid {
9826
9953
  case 'popout': {
9827
9954
  const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
9828
9955
  if (!selectedPopoutGroup) {
9829
- throw new Error('failed to find popout group');
9956
+ throw new Error('dockview: failed to find popout group');
9830
9957
  }
9831
9958
  // Remove from popout groups list to prevent automatic restoration
9832
9959
  const index = this._popoutGroups.indexOf(selectedPopoutGroup);
@@ -11275,12 +11402,19 @@ class AngularRenderer {
11275
11402
  return this._element;
11276
11403
  }
11277
11404
  init(parameters) {
11278
- this.render(parameters);
11405
+ // If already initialized, just update the parameters
11406
+ if (this.componentRef) {
11407
+ this.update(parameters);
11408
+ }
11409
+ else {
11410
+ this.render(parameters);
11411
+ }
11279
11412
  }
11280
11413
  update(params) {
11281
11414
  if (this.componentRef) {
11282
11415
  Object.keys(params).forEach(key => {
11283
- if (this.componentRef.instance.hasOwnProperty(key)) {
11416
+ // Use 'in' operator instead of hasOwnProperty to support getter/setter properties
11417
+ if (key in this.componentRef.instance) {
11284
11418
  this.componentRef.instance[key] = params[key];
11285
11419
  }
11286
11420
  });
@@ -11296,7 +11430,8 @@ class AngularRenderer {
11296
11430
  });
11297
11431
  // Set initial parameters
11298
11432
  Object.keys(parameters).forEach(key => {
11299
- if (this.componentRef.instance.hasOwnProperty(key)) {
11433
+ // Use 'in' operator instead of hasOwnProperty to support getter/setter properties
11434
+ if (key in this.componentRef.instance) {
11300
11435
  this.componentRef.instance[key] = parameters[key];
11301
11436
  }
11302
11437
  });
@@ -11467,6 +11602,7 @@ class AngularFrameworkComponentFactory {
11467
11602
  injector: this.injector,
11468
11603
  environmentInjector: this.environmentInjector
11469
11604
  });
11605
+ // Initialize with empty props - dockview-core will call init() again with actual IGroupHeaderProps
11470
11606
  renderer.init({});
11471
11607
  return renderer;
11472
11608
  }
@@ -12524,6 +12660,7 @@ __decorate([
12524
12660
  DockviewAngularComponent = __decorate([
12525
12661
  Component({
12526
12662
  selector: 'dv-dockview',
12663
+ standalone: true,
12527
12664
  template: '<div #dockviewContainer class="dockview-container"></div>',
12528
12665
  styles: [`
12529
12666
  :host {
@@ -12531,7 +12668,7 @@ DockviewAngularComponent = __decorate([
12531
12668
  width: 100%;
12532
12669
  height: 100%;
12533
12670
  }
12534
-
12671
+
12535
12672
  .dockview-container {
12536
12673
  width: 100%;
12537
12674
  height: 100%;
@@ -12647,6 +12784,7 @@ __decorate([
12647
12784
  GridviewAngularComponent = __decorate([
12648
12785
  Component({
12649
12786
  selector: 'dv-gridview',
12787
+ standalone: true,
12650
12788
  template: '<div #gridviewContainer class="gridview-container"></div>',
12651
12789
  styles: [`
12652
12790
  :host {
@@ -12654,7 +12792,7 @@ GridviewAngularComponent = __decorate([
12654
12792
  width: 100%;
12655
12793
  height: 100%;
12656
12794
  }
12657
-
12795
+
12658
12796
  .gridview-container {
12659
12797
  width: 100%;
12660
12798
  height: 100%;
@@ -12795,6 +12933,7 @@ __decorate([
12795
12933
  PaneviewAngularComponent = __decorate([
12796
12934
  Component({
12797
12935
  selector: 'dv-paneview',
12936
+ standalone: true,
12798
12937
  template: '<div #paneviewContainer class="paneview-container"></div>',
12799
12938
  styles: [`
12800
12939
  :host {
@@ -12802,7 +12941,7 @@ PaneviewAngularComponent = __decorate([
12802
12941
  width: 100%;
12803
12942
  height: 100%;
12804
12943
  }
12805
-
12944
+
12806
12945
  .paneview-container {
12807
12946
  width: 100%;
12808
12947
  height: 100%;
@@ -12918,6 +13057,7 @@ __decorate([
12918
13057
  SplitviewAngularComponent = __decorate([
12919
13058
  Component({
12920
13059
  selector: 'dv-splitview',
13060
+ standalone: true,
12921
13061
  template: '<div #splitviewContainer class="splitview-container"></div>',
12922
13062
  styles: [`
12923
13063
  :host {
@@ -12925,7 +13065,7 @@ SplitviewAngularComponent = __decorate([
12925
13065
  width: 100%;
12926
13066
  height: 100%;
12927
13067
  }
12928
-
13068
+
12929
13069
  .splitview-container {
12930
13070
  width: 100%;
12931
13071
  height: 100%;
@@ -12939,15 +13079,13 @@ let DockviewAngularModule = class DockviewAngularModule {
12939
13079
  };
12940
13080
  DockviewAngularModule = __decorate([
12941
13081
  NgModule({
12942
- declarations: [
13082
+ imports: [
13083
+ CommonModule,
12943
13084
  DockviewAngularComponent,
12944
13085
  GridviewAngularComponent,
12945
13086
  PaneviewAngularComponent,
12946
13087
  SplitviewAngularComponent
12947
13088
  ],
12948
- imports: [
12949
- CommonModule
12950
- ],
12951
13089
  exports: [
12952
13090
  DockviewAngularComponent,
12953
13091
  GridviewAngularComponent,