dockview-angular 4.9.0 → 4.11.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-angular
3
- * @version 4.9.0
3
+ * @version 4.11.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -6761,11 +6761,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6761
6761
  }
6762
6762
  }
6763
6763
 
6764
+ // GridConstraintChangeEvent2 is not exported, so we'll type it manually
6764
6765
  const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
6765
6766
  const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
6766
6767
  class DockviewGroupPanel extends GridviewPanel {
6767
6768
  get minimumWidth() {
6768
6769
  var _a;
6770
+ // Check for explicitly set group constraint first
6771
+ if (typeof this._explicitConstraints.minimumWidth === 'number') {
6772
+ return this._explicitConstraints.minimumWidth;
6773
+ }
6769
6774
  const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
6770
6775
  if (typeof activePanelMinimumWidth === 'number') {
6771
6776
  return activePanelMinimumWidth;
@@ -6774,6 +6779,10 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6774
6779
  }
6775
6780
  get minimumHeight() {
6776
6781
  var _a;
6782
+ // Check for explicitly set group constraint first
6783
+ if (typeof this._explicitConstraints.minimumHeight === 'number') {
6784
+ return this._explicitConstraints.minimumHeight;
6785
+ }
6777
6786
  const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
6778
6787
  if (typeof activePanelMinimumHeight === 'number') {
6779
6788
  return activePanelMinimumHeight;
@@ -6782,6 +6791,10 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6782
6791
  }
6783
6792
  get maximumWidth() {
6784
6793
  var _a;
6794
+ // Check for explicitly set group constraint first
6795
+ if (typeof this._explicitConstraints.maximumWidth === 'number') {
6796
+ return this._explicitConstraints.maximumWidth;
6797
+ }
6785
6798
  const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
6786
6799
  if (typeof activePanelMaximumWidth === 'number') {
6787
6800
  return activePanelMaximumWidth;
@@ -6790,6 +6803,10 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6790
6803
  }
6791
6804
  get maximumHeight() {
6792
6805
  var _a;
6806
+ // Check for explicitly set group constraint first
6807
+ if (typeof this._explicitConstraints.maximumHeight === 'number') {
6808
+ return this._explicitConstraints.maximumHeight;
6809
+ }
6793
6810
  const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
6794
6811
  if (typeof activePanelMaximumHeight === 'number') {
6795
6812
  return activePanelMaximumHeight;
@@ -6821,14 +6838,39 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6821
6838
  var _a, _b, _c, _d, _e, _f;
6822
6839
  super(id, 'groupview_default', {
6823
6840
  minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
6824
- minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.maximumHeight) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6841
+ minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6825
6842
  maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
6826
6843
  maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
6827
6844
  }, new DockviewGroupPanelApiImpl(id, accessor));
6845
+ // Track explicitly set constraints to override panel constraints
6846
+ this._explicitConstraints = {};
6828
6847
  this.api.initialize(this); // cannot use 'this' after after 'super' call
6829
6848
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
6830
6849
  this.addDisposables(this.model.onDidActivePanelChange((event) => {
6831
6850
  this.api._onDidActivePanelChange.fire(event);
6851
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6852
+ // Track explicitly set constraints to override panel constraints
6853
+ // Extract numeric values from functions or values
6854
+ if (event.minimumWidth !== undefined) {
6855
+ this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
6856
+ ? event.minimumWidth()
6857
+ : event.minimumWidth;
6858
+ }
6859
+ if (event.minimumHeight !== undefined) {
6860
+ this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
6861
+ ? event.minimumHeight()
6862
+ : event.minimumHeight;
6863
+ }
6864
+ if (event.maximumWidth !== undefined) {
6865
+ this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
6866
+ ? event.maximumWidth()
6867
+ : event.maximumWidth;
6868
+ }
6869
+ if (event.maximumHeight !== undefined) {
6870
+ this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
6871
+ ? event.maximumHeight()
6872
+ : event.maximumHeight;
6873
+ }
6832
6874
  }));
6833
6875
  }
6834
6876
  focus() {
@@ -10273,8 +10315,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
10273
10315
  accessor: this,
10274
10316
  isVisible: true,
10275
10317
  });
10276
- this.registerPanel(view);
10277
10318
  this.doAddGroup(view, relativeLocation, options.size);
10319
+ this.registerPanel(view);
10278
10320
  this.doSetGroupActive(view);
10279
10321
  return view;
10280
10322
  }