angular-toolbox 1.4.3 → 1.4.5

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.
@@ -6,7 +6,8 @@
6
6
  * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
7
  */
8
8
  import { AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
9
- import { LayoutDragEvent, LayoutRegion, LayoutRegionType, SubscriptionService } from '../../../model';
9
+ import { BorderLayoutContainer } from '../border-layout-container/border-layout-container.component';
10
+ import { LayoutConstraints, LayoutDragEvent, LayoutRegion, LayoutRegionType, SubscriptionService } from '../../../model';
10
11
  import { BorderLayoutRenderer } from './util/border-layout-renderer';
11
12
  import { IdentifiableComponent } from '../../../core';
12
13
  import * as i0 from "@angular/core";
@@ -75,6 +76,21 @@ export declare class BorderLayout extends IdentifiableComponent implements After
75
76
  * @returns `true` whether the specified region has been resized; `false` otherwise.
76
77
  */
77
78
  resizeRegion(region: LayoutRegion | LayoutRegionType, size: number): void;
79
+ /**
80
+ * Changes the constraints of the region specified by the `LayoutConstraints.region` property.
81
+ *
82
+ * @param constraints The new constraints of the associated region.
83
+ */
84
+ setConstraints(constraints: LayoutConstraints): void;
85
+ /**
86
+ * Returns the `BorderLayoutContainer` component associated with the specified region.
87
+ *
88
+ * @param region The region for which to retreive the container.
89
+ *
90
+ * @returns The `BorderLayoutContainer` component associated with the specified region,
91
+ * or `undefined` whether no container has been found.
92
+ */
93
+ getBorderLayoutContainer(region: LayoutRegionType): BorderLayoutContainer | undefined;
78
94
  static ɵfac: i0.ɵɵFactoryDeclaration<BorderLayout, never>;
79
95
  static ɵcmp: i0.ɵɵComponentDeclaration<BorderLayout, "atx-border-layout", never, {}, { "dragStart": "dragStart"; "dragStop": "dragStop"; "dragging": "dragging"; }, ["__containers__"], ["*"], true, never>;
80
96
  }
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { EventEmitter, QueryList } from '@angular/core';
9
9
  import { BorderLayoutContainer } from '../../border-layout-container/border-layout-container.component';
10
- import { Destroyable, LayoutDragEvent, LayoutRegion, SubscriptionService } from '../../../../model';
10
+ import { Destroyable, LayoutConstraints, LayoutDragEvent, LayoutRegion, LayoutRegionType, SubscriptionService } from '../../../../model';
11
11
  import { IdentifiableComponent } from '../../../../core';
12
12
  import { BorderLayoutBoundsManager } from './border-layout-bounds-manager';
13
13
  /**
@@ -63,6 +63,12 @@ export declare class BorderLayoutRenderer extends IdentifiableComponent implemen
63
63
  * Returns the reference to the internal `BorderLayoutBoundsManager` instance.
64
64
  */
65
65
  getBoundsManager(): BorderLayoutBoundsManager;
66
+ /**
67
+ * Changes the constraints of the region specified by the `LayoutConstraints.region` property.
68
+ *
69
+ * @param constraints The new constraints of the associated region.
70
+ */
71
+ setConstraints(constraints: LayoutConstraints): void;
66
72
  /**
67
73
  * Makes this object elligible for garbage collection.
68
74
  */
@@ -71,6 +77,15 @@ export declare class BorderLayoutRenderer extends IdentifiableComponent implemen
71
77
  * Forces the layout of all `BorderLayoutContainer` objects associated with the main container.
72
78
  */
73
79
  paint(): void;
80
+ /**
81
+ * Returns the `BorderLayoutContainer` component associated with the specified region.
82
+ *
83
+ * @param region The region for which to retreive the container.
84
+ *
85
+ * @returns The `BorderLayoutContainer` component associated with the specified region,
86
+ * or `undefined` whether no container has been found.
87
+ */
88
+ getBorderLayoutContainer(region: LayoutRegionType): BorderLayoutContainer | undefined;
74
89
  /**
75
90
  * Resizes the specified region of the associated container.
76
91
  *
@@ -1,4 +1,5 @@
1
1
  export * from './layout-constraints';
2
2
  export * from './layout-region';
3
+ export * from './layout-region.error';
3
4
  export * from './layout-drag.event';
4
5
  export * from './layout-drag-event-type.enum';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * The `LayoutRegionError` class represents an error thrown by layout components when manipulating
10
+ * invalid regions of the container.
11
+ */
12
+ export declare class LayoutRegionError extends Error {
13
+ /**
14
+ * Creates a new `LayoutRegionError` instance.
15
+ *
16
+ * @param message A human-readable description of the error.
17
+ */
18
+ constructor(message: string);
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-toolbox",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.0.0",