dockview-angular 4.10.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.10.0
3
+ * @version 4.11.0
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -6795,11 +6795,16 @@ class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
6795
6795
  }
6796
6796
  }
6797
6797
 
6798
+ // GridConstraintChangeEvent2 is not exported, so we'll type it manually
6798
6799
  const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
6799
6800
  const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
6800
6801
  class DockviewGroupPanel extends GridviewPanel {
6801
6802
  get minimumWidth() {
6802
6803
  var _a;
6804
+ // Check for explicitly set group constraint first
6805
+ if (typeof this._explicitConstraints.minimumWidth === 'number') {
6806
+ return this._explicitConstraints.minimumWidth;
6807
+ }
6803
6808
  const activePanelMinimumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumWidth;
6804
6809
  if (typeof activePanelMinimumWidth === 'number') {
6805
6810
  return activePanelMinimumWidth;
@@ -6808,6 +6813,10 @@ class DockviewGroupPanel extends GridviewPanel {
6808
6813
  }
6809
6814
  get minimumHeight() {
6810
6815
  var _a;
6816
+ // Check for explicitly set group constraint first
6817
+ if (typeof this._explicitConstraints.minimumHeight === 'number') {
6818
+ return this._explicitConstraints.minimumHeight;
6819
+ }
6811
6820
  const activePanelMinimumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.minimumHeight;
6812
6821
  if (typeof activePanelMinimumHeight === 'number') {
6813
6822
  return activePanelMinimumHeight;
@@ -6816,6 +6825,10 @@ class DockviewGroupPanel extends GridviewPanel {
6816
6825
  }
6817
6826
  get maximumWidth() {
6818
6827
  var _a;
6828
+ // Check for explicitly set group constraint first
6829
+ if (typeof this._explicitConstraints.maximumWidth === 'number') {
6830
+ return this._explicitConstraints.maximumWidth;
6831
+ }
6819
6832
  const activePanelMaximumWidth = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumWidth;
6820
6833
  if (typeof activePanelMaximumWidth === 'number') {
6821
6834
  return activePanelMaximumWidth;
@@ -6824,6 +6837,10 @@ class DockviewGroupPanel extends GridviewPanel {
6824
6837
  }
6825
6838
  get maximumHeight() {
6826
6839
  var _a;
6840
+ // Check for explicitly set group constraint first
6841
+ if (typeof this._explicitConstraints.maximumHeight === 'number') {
6842
+ return this._explicitConstraints.maximumHeight;
6843
+ }
6827
6844
  const activePanelMaximumHeight = (_a = this.activePanel) === null || _a === void 0 ? void 0 : _a.maximumHeight;
6828
6845
  if (typeof activePanelMaximumHeight === 'number') {
6829
6846
  return activePanelMaximumHeight;
@@ -6855,14 +6872,39 @@ class DockviewGroupPanel extends GridviewPanel {
6855
6872
  var _a, _b, _c, _d, _e, _f;
6856
6873
  super(id, 'groupview_default', {
6857
6874
  minimumHeight: (_b = (_a = options.constraints) === null || _a === void 0 ? void 0 : _a.minimumHeight) !== null && _b !== void 0 ? _b : MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT,
6858
- minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.maximumHeight) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6875
+ minimumWidth: (_d = (_c = options.constraints) === null || _c === void 0 ? void 0 : _c.minimumWidth) !== null && _d !== void 0 ? _d : MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH,
6859
6876
  maximumHeight: (_e = options.constraints) === null || _e === void 0 ? void 0 : _e.maximumHeight,
6860
6877
  maximumWidth: (_f = options.constraints) === null || _f === void 0 ? void 0 : _f.maximumWidth,
6861
6878
  }, new DockviewGroupPanelApiImpl(id, accessor));
6879
+ // Track explicitly set constraints to override panel constraints
6880
+ this._explicitConstraints = {};
6862
6881
  this.api.initialize(this); // cannot use 'this' after after 'super' call
6863
6882
  this._model = new DockviewGroupPanelModel(this.element, accessor, id, options, this);
6864
6883
  this.addDisposables(this.model.onDidActivePanelChange((event) => {
6865
6884
  this.api._onDidActivePanelChange.fire(event);
6885
+ }), this.api.onDidConstraintsChangeInternal((event) => {
6886
+ // Track explicitly set constraints to override panel constraints
6887
+ // Extract numeric values from functions or values
6888
+ if (event.minimumWidth !== undefined) {
6889
+ this._explicitConstraints.minimumWidth = typeof event.minimumWidth === 'function'
6890
+ ? event.minimumWidth()
6891
+ : event.minimumWidth;
6892
+ }
6893
+ if (event.minimumHeight !== undefined) {
6894
+ this._explicitConstraints.minimumHeight = typeof event.minimumHeight === 'function'
6895
+ ? event.minimumHeight()
6896
+ : event.minimumHeight;
6897
+ }
6898
+ if (event.maximumWidth !== undefined) {
6899
+ this._explicitConstraints.maximumWidth = typeof event.maximumWidth === 'function'
6900
+ ? event.maximumWidth()
6901
+ : event.maximumWidth;
6902
+ }
6903
+ if (event.maximumHeight !== undefined) {
6904
+ this._explicitConstraints.maximumHeight = typeof event.maximumHeight === 'function'
6905
+ ? event.maximumHeight()
6906
+ : event.maximumHeight;
6907
+ }
6866
6908
  }));
6867
6909
  }
6868
6910
  focus() {