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
  */
@@ -6791,11 +6791,16 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6791
6791
  }
6792
6792
  }
6793
6793
 
6794
+ // GridConstraintChangeEvent2 is not exported, so we'll type it manually
6794
6795
  const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
6795
6796
  const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
6796
6797
  class DockviewGroupPanel extends GridviewPanel {
6797
6798
  get minimumWidth() {
6798
6799
  var _a;
6800
+ // Check for explicitly set group constraint first
6801
+ if (typeof this._explicitConstraints.minimumWidth === 'number') {
6802
+ return this._explicitConstraints.minimumWidth;
6803
+ }
6799
6804
  const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
6800
6805
  if (typeof activePanelMinimumWidth === 'number') {
6801
6806
  return activePanelMinimumWidth;
@@ -6804,6 +6809,10 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6804
6809
  }
6805
6810
  get minimumHeight() {
6806
6811
  var _a;
6812
+ // Check for explicitly set group constraint first
6813
+ if (typeof this._explicitConstraints.minimumHeight === 'number') {
6814
+ return this._explicitConstraints.minimumHeight;
6815
+ }
6807
6816
  const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
6808
6817
  if (typeof activePanelMinimumHeight === 'number') {
6809
6818
  return activePanelMinimumHeight;
@@ -6812,6 +6821,10 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6812
6821
  }
6813
6822
  get maximumWidth() {
6814
6823
  var _a;
6824
+ // Check for explicitly set group constraint first
6825
+ if (typeof this._explicitConstraints.maximumWidth === 'number') {
6826
+ return this._explicitConstraints.maximumWidth;
6827
+ }
6815
6828
  const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
6816
6829
  if (typeof activePanelMaximumWidth === 'number') {
6817
6830
  return activePanelMaximumWidth;
@@ -6820,6 +6833,10 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6820
6833
  }
6821
6834
  get maximumHeight() {
6822
6835
  var _a;
6836
+ // Check for explicitly set group constraint first
6837
+ if (typeof this._explicitConstraints.maximumHeight === 'number') {
6838
+ return this._explicitConstraints.maximumHeight;
6839
+ }
6823
6840
  const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
6824
6841
  if (typeof activePanelMaximumHeight === 'number') {
6825
6842
  return activePanelMaximumHeight;
@@ -6851,14 +6868,39 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
6851
6868
  var _a, _b, _c, _d, _e, _f;
6852
6869
  super(id, 'groupview_default', {
6853
6870
  minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
6854
- minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.maximumHeight) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6871
+ minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6855
6872
  maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
6856
6873
  maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
6857
6874
  }, new DockviewGroupPanelApiImpl(id, accessor));
6875
+ // Track explicitly set constraints to override panel constraints
6876
+ this._explicitConstraints = {};
6858
6877
  this.api.initialize(this); // cannot use 'this' after after 'super' call
6859
6878
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
6860
6879
  this.addDisposables(this.model.onDidActivePanelChange((event) => {
6861
6880
  this.api._onDidActivePanelChange.fire(event);
6881
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6882
+ // Track explicitly set constraints to override panel constraints
6883
+ // Extract numeric values from functions or values
6884
+ if (event.minimumWidth !== undefined) {
6885
+ this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
6886
+ ? event.minimumWidth()
6887
+ : event.minimumWidth;
6888
+ }
6889
+ if (event.minimumHeight !== undefined) {
6890
+ this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
6891
+ ? event.minimumHeight()
6892
+ : event.minimumHeight;
6893
+ }
6894
+ if (event.maximumWidth !== undefined) {
6895
+ this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
6896
+ ? event.maximumWidth()
6897
+ : event.maximumWidth;
6898
+ }
6899
+ if (event.maximumHeight !== undefined) {
6900
+ this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
6901
+ ? event.maximumHeight()
6902
+ : event.maximumHeight;
6903
+ }
6862
6904
  }));
6863
6905
  }
6864
6906
  focus() {
@@ -10303,8 +10345,8 @@ define(['exports', '@angular/core', '@angular/common', 'rxjs'], (function (expor
10303
10345
  accessor: this,
10304
10346
  isVisible: true,
10305
10347
  });
10306
- this.registerPanel(view);
10307
10348
  this.doAddGroup(view, relativeLocation, options.size);
10349
+ this.registerPanel(view);
10308
10350
  this.doSetGroupActive(view);
10309
10351
  return view;
10310
10352
  }