dockview-react 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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-react
3
- * @version 4.10.0
3
+ * @version 4.12.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -3782,8 +3782,8 @@ class DockviewApi {
3782
3782
  /**
3783
3783
  * Create a component from a serialized object.
3784
3784
  */
3785
- fromJSON(data) {
3786
- this.component.fromJSON(data);
3785
+ fromJSON(data, options) {
3786
+ this.component.fromJSON(data, options);
3787
3787
  }
3788
3788
  /**
3789
3789
  * Create a serialized object of the current component.
@@ -5014,6 +5014,7 @@ class ContentContainer extends CompositeDisposable {
5014
5014
  }
5015
5015
  if (doRender) {
5016
5016
  const focusTracker = trackFocus(container);
5017
+ this.focusTracker = focusTracker;
5017
5018
  const disposable = new CompositeDisposable();
5018
5019
  disposable.addDisposables(focusTracker, focusTracker.onDidFocus(() => this._onDidFocus.fire()), focusTracker.onDidBlur(() => this._onDidBlur.fire()));
5019
5020
  this.disposable.value = disposable;
@@ -5041,6 +5042,16 @@ class ContentContainer extends CompositeDisposable {
5041
5042
  this.disposable.dispose();
5042
5043
  super.dispose();
5043
5044
  }
5045
+ /**
5046
+ * Refresh the focus tracker state to handle cases where focus state
5047
+ * gets out of sync due to programmatic panel activation
5048
+ */
5049
+ refreshFocusState() {
5050
+ var _a;
5051
+ if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
5052
+ this.focusTracker.refreshState();
5053
+ }
5054
+ }
5044
5055
  }
5045
5056
 
5046
5057
  function addGhostImage(dataTransfer, ghostElement, options) {
@@ -6367,8 +6378,11 @@ class DockviewGroupPanelModel extends CompositeDisposable {
6367
6378
  this._activePanel = panel;
6368
6379
  if (panel) {
6369
6380
  this.tabsContainer.setActivePanel(panel);
6381
+ this.contentContainer.openPanel(panel);
6370
6382
  panel.layout(this._width, this._height);
6371
6383
  this.updateMru(panel);
6384
+ // Refresh focus state to handle programmatic activation without DOM focus change
6385
+ this.contentContainer.refreshFocusState();
6372
6386
  this._onDidActivePanelChange.fire({
6373
6387
  panel,
6374
6388
  });
@@ -6792,11 +6806,16 @@ class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
6792
6806
  }
6793
6807
  }
6794
6808
 
6809
+ // GridConstraintChangeEvent2 is not exported, so we'll type it manually
6795
6810
  const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
6796
6811
  const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
6797
6812
  class DockviewGroupPanel extends GridviewPanel {
6798
6813
  get minimumWidth() {
6799
6814
  var _a;
6815
+ // Check for explicitly set group constraint first
6816
+ if (typeof this._explicitConstraints.minimumWidth === 'number') {
6817
+ return this._explicitConstraints.minimumWidth;
6818
+ }
6800
6819
  const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
6801
6820
  if (typeof activePanelMinimumWidth === 'number') {
6802
6821
  return activePanelMinimumWidth;
@@ -6805,6 +6824,10 @@ class DockviewGroupPanel extends GridviewPanel {
6805
6824
  }
6806
6825
  get minimumHeight() {
6807
6826
  var _a;
6827
+ // Check for explicitly set group constraint first
6828
+ if (typeof this._explicitConstraints.minimumHeight === 'number') {
6829
+ return this._explicitConstraints.minimumHeight;
6830
+ }
6808
6831
  const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
6809
6832
  if (typeof activePanelMinimumHeight === 'number') {
6810
6833
  return activePanelMinimumHeight;
@@ -6813,6 +6836,10 @@ class DockviewGroupPanel extends GridviewPanel {
6813
6836
  }
6814
6837
  get maximumWidth() {
6815
6838
  var _a;
6839
+ // Check for explicitly set group constraint first
6840
+ if (typeof this._explicitConstraints.maximumWidth === 'number') {
6841
+ return this._explicitConstraints.maximumWidth;
6842
+ }
6816
6843
  const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
6817
6844
  if (typeof activePanelMaximumWidth === 'number') {
6818
6845
  return activePanelMaximumWidth;
@@ -6821,6 +6848,10 @@ class DockviewGroupPanel extends GridviewPanel {
6821
6848
  }
6822
6849
  get maximumHeight() {
6823
6850
  var _a;
6851
+ // Check for explicitly set group constraint first
6852
+ if (typeof this._explicitConstraints.maximumHeight === 'number') {
6853
+ return this._explicitConstraints.maximumHeight;
6854
+ }
6824
6855
  const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
6825
6856
  if (typeof activePanelMaximumHeight === 'number') {
6826
6857
  return activePanelMaximumHeight;
@@ -6852,14 +6883,39 @@ class DockviewGroupPanel extends GridviewPanel {
6852
6883
  var _a, _b, _c, _d, _e, _f;
6853
6884
  super(id, 'groupview_default', {
6854
6885
  minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
6855
- minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.maximumHeight) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6886
+ minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6856
6887
  maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
6857
6888
  maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
6858
6889
  }, new DockviewGroupPanelApiImpl(id, accessor));
6890
+ // Track explicitly set constraints to override panel constraints
6891
+ this._explicitConstraints = {};
6859
6892
  this.api.initialize(this); // cannot use 'this' after after 'super' call
6860
6893
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
6861
6894
  this.addDisposables(this.model.onDidActivePanelChange((event) => {
6862
6895
  this.api._onDidActivePanelChange.fire(event);
6896
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6897
+ // Track explicitly set constraints to override panel constraints
6898
+ // Extract numeric values from functions or values
6899
+ if (event.minimumWidth !== undefined) {
6900
+ this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
6901
+ ? event.minimumWidth()
6902
+ : event.minimumWidth;
6903
+ }
6904
+ if (event.minimumHeight !== undefined) {
6905
+ this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
6906
+ ? event.minimumHeight()
6907
+ : event.minimumHeight;
6908
+ }
6909
+ if (event.maximumWidth !== undefined) {
6910
+ this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
6911
+ ? event.maximumWidth()
6912
+ : event.maximumWidth;
6913
+ }
6914
+ if (event.maximumHeight !== undefined) {
6915
+ this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
6916
+ ? event.maximumHeight()
6917
+ : event.maximumHeight;
6918
+ }
6863
6919
  }));
6864
6920
  }
6865
6921
  focus() {
@@ -7156,6 +7212,18 @@ class DockviewPanel extends CompositeDisposable {
7156
7212
  params: this._params,
7157
7213
  });
7158
7214
  }
7215
+ updateFromStateModel(state) {
7216
+ var _a, _b, _c;
7217
+ this._maximumHeight = state.maximumHeight;
7218
+ this._minimumHeight = state.minimumHeight;
7219
+ this._maximumWidth = state.maximumWidth;
7220
+ this._minimumWidth = state.minimumWidth;
7221
+ this.update({ params: (_a = state.params) !== null && _a !== void 0 ? _a : {} });
7222
+ this.setTitle((_b = state.title) !== null && _b !== void 0 ? _b : this.id);
7223
+ this.setRenderer((_c = state.renderer) !== null && _c !== void 0 ? _c : this.accessor.renderer);
7224
+ // state.contentComponent;
7225
+ // state.tabComponent;
7226
+ }
7159
7227
  updateParentGroup(group, options) {
7160
7228
  this._group = group;
7161
7229
  this.api.group = this._group;
@@ -8919,7 +8987,7 @@ class DockviewComponent extends BaseGrid {
8919
8987
  : (_e = (_d = this.options.floatingGroupBounds) === null || _d === void 0 ? void 0 : _d.minimumHeightWithinViewport) !== null && _e !== void 0 ? _e : DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE }));
8920
8988
  const el = group.element.querySelector('.dv-void-container');
8921
8989
  if (!el) {
8922
- throw new Error('failed to find drag handle');
8990
+ throw new Error('dockview: failed to find drag handle');
8923
8991
  }
8924
8992
  overlay.setupDrag(el, {
8925
8993
  inDragMode: typeof (options === null || options === void 0 ? void 0 : options.inDragMode) === 'boolean'
@@ -8991,7 +9059,7 @@ class DockviewComponent extends BaseGrid {
8991
9059
  case 'right':
8992
9060
  return this.createGroupAtLocation([this.gridview.length], undefined, options); // insert into last position
8993
9061
  default:
8994
- throw new Error(`unsupported position ${position}`);
9062
+ throw new Error(`dockview: unsupported position ${position}`);
8995
9063
  }
8996
9064
  }
8997
9065
  updateOptions(options) {
@@ -9137,15 +9205,48 @@ class DockviewComponent extends BaseGrid {
9137
9205
  }
9138
9206
  return result;
9139
9207
  }
9140
- fromJSON(data) {
9208
+ fromJSON(data, options) {
9141
9209
  var _a, _b;
9210
+ const existingPanels = new Map();
9211
+ let tempGroup;
9212
+ if (options === null || options === void 0 ? void 0 : options.reuseExistingPanels) {
9213
+ /**
9214
+ * What are we doing here?
9215
+ *
9216
+ * 1. Create a temporary group to hold any panels that currently exist and that also exist in the new layout
9217
+ * 2. Remove that temporary group from the group mapping so that it doesn't get cleared when we clear the layout
9218
+ */
9219
+ tempGroup = this.createGroup();
9220
+ this._groups.delete(tempGroup.api.id);
9221
+ const newPanels = Object.keys(data.panels);
9222
+ for (const panel of this.panels) {
9223
+ if (newPanels.includes(panel.api.id)) {
9224
+ existingPanels.set(panel.api.id, panel);
9225
+ }
9226
+ }
9227
+ this.movingLock(() => {
9228
+ Array.from(existingPanels.values()).forEach((panel) => {
9229
+ this.moveGroupOrPanel({
9230
+ from: {
9231
+ groupId: panel.api.group.api.id,
9232
+ panelId: panel.api.id,
9233
+ },
9234
+ to: {
9235
+ group: tempGroup,
9236
+ position: 'center',
9237
+ },
9238
+ keepEmptyGroups: true,
9239
+ });
9240
+ });
9241
+ });
9242
+ }
9142
9243
  this.clear();
9143
9244
  if (typeof data !== 'object' || data === null) {
9144
- throw new Error('serialized layout must be a non-null object');
9245
+ throw new Error('dockview: serialized layout must be a non-null object');
9145
9246
  }
9146
9247
  const { grid, panels, activeGroup } = data;
9147
9248
  if (grid.root.type !== 'branch' || !Array.isArray(grid.root.data)) {
9148
- throw new Error('root must be of type branch');
9249
+ throw new Error('dockview: root must be of type branch');
9149
9250
  }
9150
9251
  try {
9151
9252
  // take note of the existing dimensions
@@ -9154,7 +9255,7 @@ class DockviewComponent extends BaseGrid {
9154
9255
  const createGroupFromSerializedState = (data) => {
9155
9256
  const { id, locked, hideHeader, views, activeView } = data;
9156
9257
  if (typeof id !== 'string') {
9157
- throw new Error('group id must be of type string');
9258
+ throw new Error('dockview: group id must be of type string');
9158
9259
  }
9159
9260
  const group = this.createGroup({
9160
9261
  id,
@@ -9169,17 +9270,38 @@ class DockviewComponent extends BaseGrid {
9169
9270
  * In running this section first we avoid firing lots of 'add' events in the event of a failure
9170
9271
  * due to a corruption of input data.
9171
9272
  */
9172
- const panel = this._deserializer.fromJSON(panels[child], group);
9173
- createdPanels.push(panel);
9273
+ const existingPanel = existingPanels.get(child);
9274
+ if (tempGroup && existingPanel) {
9275
+ this.movingLock(() => {
9276
+ tempGroup.model.removePanel(existingPanel);
9277
+ });
9278
+ createdPanels.push(existingPanel);
9279
+ existingPanel.updateFromStateModel(panels[child]);
9280
+ }
9281
+ else {
9282
+ const panel = this._deserializer.fromJSON(panels[child], group);
9283
+ createdPanels.push(panel);
9284
+ }
9174
9285
  }
9175
9286
  for (let i = 0; i < views.length; i++) {
9176
9287
  const panel = createdPanels[i];
9177
9288
  const isActive = typeof activeView === 'string' &&
9178
9289
  activeView === panel.id;
9179
- group.model.openPanel(panel, {
9180
- skipSetActive: !isActive,
9181
- skipSetGroupActive: true,
9182
- });
9290
+ const hasExisting = existingPanels.has(panel.api.id);
9291
+ if (hasExisting) {
9292
+ this.movingLock(() => {
9293
+ group.model.openPanel(panel, {
9294
+ skipSetActive: !isActive,
9295
+ skipSetGroupActive: true,
9296
+ });
9297
+ });
9298
+ }
9299
+ else {
9300
+ group.model.openPanel(panel, {
9301
+ skipSetActive: !isActive,
9302
+ skipSetGroupActive: true,
9303
+ });
9304
+ }
9183
9305
  }
9184
9306
  if (!group.activePanel && group.panels.length > 0) {
9185
9307
  group.model.openPanel(group.panels[group.panels.length - 1], {
@@ -9218,7 +9340,9 @@ class DockviewComponent extends BaseGrid {
9218
9340
  setTimeout(() => {
9219
9341
  this.addPopoutGroup(group, {
9220
9342
  position: position !== null && position !== void 0 ? position : undefined,
9221
- overridePopoutGroup: gridReferenceGroup ? group : undefined,
9343
+ overridePopoutGroup: gridReferenceGroup
9344
+ ? group
9345
+ : undefined,
9222
9346
  referenceGroup: gridReferenceGroup
9223
9347
  ? this.getPanel(gridReferenceGroup)
9224
9348
  : undefined,
@@ -9304,11 +9428,11 @@ class DockviewComponent extends BaseGrid {
9304
9428
  addPanel(options) {
9305
9429
  var _a, _b;
9306
9430
  if (this.panels.find((_) => _.id === options.id)) {
9307
- throw new Error(`panel with id ${options.id} already exists`);
9431
+ throw new Error(`dockview: panel with id ${options.id} already exists`);
9308
9432
  }
9309
9433
  let referenceGroup;
9310
9434
  if (options.position && options.floating) {
9311
- throw new Error('you can only provide one of: position, floating as arguments to .addPanel(...)');
9435
+ throw new Error('dockview: you can only provide one of: position, floating as arguments to .addPanel(...)');
9312
9436
  }
9313
9437
  const initial = {
9314
9438
  width: options.initialWidth,
@@ -9322,7 +9446,7 @@ class DockviewComponent extends BaseGrid {
9322
9446
  : options.position.referencePanel;
9323
9447
  index = options.position.index;
9324
9448
  if (!referencePanel) {
9325
- throw new Error(`referencePanel '${options.position.referencePanel}' does not exist`);
9449
+ throw new Error(`dockview: referencePanel '${options.position.referencePanel}' does not exist`);
9326
9450
  }
9327
9451
  referenceGroup = this.findGroup(referencePanel);
9328
9452
  }
@@ -9333,7 +9457,7 @@ class DockviewComponent extends BaseGrid {
9333
9457
  : options.position.referenceGroup;
9334
9458
  index = options.position.index;
9335
9459
  if (!referenceGroup) {
9336
- throw new Error(`referenceGroup '${options.position.referenceGroup}' does not exist`);
9460
+ throw new Error(`dockview: referenceGroup '${options.position.referenceGroup}' does not exist`);
9337
9461
  }
9338
9462
  }
9339
9463
  else {
@@ -9445,7 +9569,7 @@ class DockviewComponent extends BaseGrid {
9445
9569
  }) {
9446
9570
  const group = panel.group;
9447
9571
  if (!group) {
9448
- throw new Error(`cannot remove panel ${panel.id}. it's missing a group.`);
9572
+ throw new Error(`dockview: cannot remove panel ${panel.id}. it's missing a group.`);
9449
9573
  }
9450
9574
  group.model.removePanel(panel, {
9451
9575
  skipSetActiveGroup: options.skipSetActiveGroup,
@@ -9494,11 +9618,11 @@ class DockviewComponent extends BaseGrid {
9494
9618
  ? this.panels.find((panel) => panel.id === options.referencePanel)
9495
9619
  : options.referencePanel;
9496
9620
  if (!referencePanel) {
9497
- throw new Error(`reference panel ${options.referencePanel} does not exist`);
9621
+ throw new Error(`dockview: reference panel ${options.referencePanel} does not exist`);
9498
9622
  }
9499
9623
  referenceGroup = this.findGroup(referencePanel);
9500
9624
  if (!referenceGroup) {
9501
- throw new Error(`reference group for reference panel ${options.referencePanel} does not exist`);
9625
+ throw new Error(`dockview: reference group for reference panel ${options.referencePanel} does not exist`);
9502
9626
  }
9503
9627
  }
9504
9628
  else if (isGroupOptionsWithGroup(options)) {
@@ -9507,7 +9631,7 @@ class DockviewComponent extends BaseGrid {
9507
9631
  ? (_a = this._groups.get(options.referenceGroup)) === null || _a === void 0 ? void 0 : _a.value
9508
9632
  : options.referenceGroup;
9509
9633
  if (!referenceGroup) {
9510
- throw new Error(`reference group ${options.referenceGroup} does not exist`);
9634
+ throw new Error(`dockview: reference group ${options.referenceGroup} does not exist`);
9511
9635
  }
9512
9636
  }
9513
9637
  else {
@@ -9575,7 +9699,7 @@ class DockviewComponent extends BaseGrid {
9575
9699
  }
9576
9700
  return floatingGroup.group;
9577
9701
  }
9578
- throw new Error('failed to find floating group');
9702
+ throw new Error('dockview: failed to find floating group');
9579
9703
  }
9580
9704
  if (group.api.location.type === 'popout') {
9581
9705
  const selectedGroup = this._popoutGroups.find((_) => _.popoutGroup === group);
@@ -9606,7 +9730,7 @@ class DockviewComponent extends BaseGrid {
9606
9730
  this.updateWatermark();
9607
9731
  return selectedGroup.popoutGroup;
9608
9732
  }
9609
- throw new Error('failed to find popout group');
9733
+ throw new Error('dockview: failed to find popout group');
9610
9734
  }
9611
9735
  const re = super.doRemoveGroup(group, options);
9612
9736
  if (!(options === null || options === void 0 ? void 0 : options.skipActive)) {
@@ -9637,7 +9761,7 @@ class DockviewComponent extends BaseGrid {
9637
9761
  ? (_a = this._groups.get(sourceGroupId)) === null || _a === void 0 ? void 0 : _a.value
9638
9762
  : undefined;
9639
9763
  if (!sourceGroup) {
9640
- throw new Error(`Failed to find group id ${sourceGroupId}`);
9764
+ throw new Error(`dockview: Failed to find group id ${sourceGroupId}`);
9641
9765
  }
9642
9766
  if (sourceItemId === undefined) {
9643
9767
  /**
@@ -9662,9 +9786,9 @@ class DockviewComponent extends BaseGrid {
9662
9786
  skipSetActiveGroup: true,
9663
9787
  }));
9664
9788
  if (!removedPanel) {
9665
- throw new Error(`No panel with id ${sourceItemId}`);
9789
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9666
9790
  }
9667
- if (sourceGroup.model.size === 0) {
9791
+ if (!options.keepEmptyGroups && sourceGroup.model.size === 0) {
9668
9792
  // remove the group and do not set a new group as active
9669
9793
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9670
9794
  }
@@ -9674,7 +9798,8 @@ class DockviewComponent extends BaseGrid {
9674
9798
  var _a;
9675
9799
  return destinationGroup.model.openPanel(removedPanel, {
9676
9800
  index: destinationIndex,
9677
- skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) && !isDestinationGroupEmpty,
9801
+ skipSetActive: ((_a = options.skipSetActive) !== null && _a !== void 0 ? _a : false) &&
9802
+ !isDestinationGroupEmpty,
9678
9803
  skipSetGroupActive: true,
9679
9804
  });
9680
9805
  });
@@ -9729,7 +9854,9 @@ class DockviewComponent extends BaseGrid {
9729
9854
  }));
9730
9855
  this.doRemoveGroup(sourceGroup, { skipActive: true });
9731
9856
  const newGroup = this.createGroupAtLocation(targetLocation);
9732
- this.movingLock(() => newGroup.model.openPanel(removedPanel));
9857
+ this.movingLock(() => newGroup.model.openPanel(removedPanel, {
9858
+ skipSetActive: true,
9859
+ }));
9733
9860
  this.doSetGroupAndPanelActive(newGroup);
9734
9861
  this._onDidMovePanel.fire({
9735
9862
  panel: this.getGroupPanel(sourceItemId),
@@ -9762,7 +9889,7 @@ class DockviewComponent extends BaseGrid {
9762
9889
  skipSetActiveGroup: true,
9763
9890
  }));
9764
9891
  if (!removedPanel) {
9765
- throw new Error(`No panel with id ${sourceItemId}`);
9892
+ throw new Error(`dockview: No panel with id ${sourceItemId}`);
9766
9893
  }
9767
9894
  const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
9768
9895
  const group = this.createGroupAtLocation(dropLocation);
@@ -9817,7 +9944,7 @@ class DockviewComponent extends BaseGrid {
9817
9944
  case 'floating': {
9818
9945
  const selectedFloatingGroup = this._floatingGroups.find((x) => x.group === from);
9819
9946
  if (!selectedFloatingGroup) {
9820
- throw new Error('failed to find floating group');
9947
+ throw new Error('dockview: failed to find floating group');
9821
9948
  }
9822
9949
  selectedFloatingGroup.dispose();
9823
9950
  break;
@@ -9825,7 +9952,7 @@ class DockviewComponent extends BaseGrid {
9825
9952
  case 'popout': {
9826
9953
  const selectedPopoutGroup = this._popoutGroups.find((x) => x.popoutGroup === from);
9827
9954
  if (!selectedPopoutGroup) {
9828
- throw new Error('failed to find popout group');
9955
+ throw new Error('dockview: failed to find popout group');
9829
9956
  }
9830
9957
  // Remove from popout groups list to prevent automatic restoration
9831
9958
  const index = this._popoutGroups.indexOf(selectedPopoutGroup);