angular-toolbox 1.2.2 → 1.3.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.
- package/README.md +1 -1
- package/esm2022/lib/component/index.mjs +2 -1
- package/esm2022/lib/component/layout/border-layout/border-layout.component.mjs +125 -0
- package/esm2022/lib/component/layout/border-layout/util/border-layout-bounds-manager.mjs +211 -0
- package/esm2022/lib/component/layout/border-layout/util/border-layout-renderer.mjs +212 -0
- package/esm2022/lib/component/layout/border-layout/util/resize-method.mjs +9 -0
- package/esm2022/lib/component/layout/border-layout-container/border-layout-container.component.mjs +143 -0
- package/esm2022/lib/component/layout/index.mjs +3 -0
- package/esm2022/lib/core/impl/version/version.impl.mjs +3 -4
- package/esm2022/lib/model/business/ui/index.mjs +2 -1
- package/esm2022/lib/model/business/ui/layout/index.mjs +5 -0
- package/esm2022/lib/model/business/ui/layout/layout-constraints.mjs +9 -0
- package/esm2022/lib/model/business/ui/layout/layout-drag-event-type.enum.mjs +26 -0
- package/esm2022/lib/model/business/ui/layout/layout-drag.event.mjs +23 -0
- package/esm2022/lib/model/business/ui/layout/layout-region.mjs +35 -0
- package/esm2022/lib/model/business/ui/window/window-init.mjs +1 -1
- package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +4 -4
- package/esm2022/lib/util/index.mjs +2 -1
- package/esm2022/lib/util/version.util.mjs +44 -0
- package/esm2022/lib/util/window/window-features-builder.mjs +13 -1
- package/fesm2022/angular-toolbox.mjs +2524 -1703
- package/fesm2022/angular-toolbox.mjs.map +1 -1
- package/lib/component/index.d.ts +1 -0
- package/lib/component/layout/border-layout/border-layout.component.d.ts +79 -0
- package/lib/component/layout/border-layout/util/border-layout-bounds-manager.d.ts +131 -0
- package/lib/component/layout/border-layout/util/border-layout-renderer.d.ts +87 -0
- package/lib/component/layout/border-layout/util/resize-method.d.ts +13 -0
- package/lib/component/layout/border-layout-container/border-layout-container.component.d.ts +104 -0
- package/lib/component/layout/index.d.ts +2 -0
- package/lib/model/business/ui/index.d.ts +1 -0
- package/lib/model/business/ui/layout/index.d.ts +4 -0
- package/lib/model/business/ui/layout/layout-constraints.d.ts +33 -0
- package/lib/model/business/ui/layout/layout-drag-event-type.enum.d.ts +24 -0
- package/lib/model/business/ui/layout/layout-drag.event.d.ts +32 -0
- package/lib/model/business/ui/layout/layout-region.d.ts +36 -0
- package/lib/model/business/ui/window/window-init.d.ts +5 -0
- package/lib/util/index.d.ts +1 -0
- package/lib/util/version.util.d.ts +30 -0
- package/lib/util/window/window-features-builder.d.ts +4 -0
- package/package.json +1 -1
package/lib/component/index.d.ts
CHANGED
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
import { AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
9
|
+
import { LayoutDragEvent, LayoutRegion, LayoutRegionType, SubscriptionService } from '../../../model';
|
|
10
|
+
import { BorderLayoutRenderer } from './util/border-layout-renderer';
|
|
11
|
+
import { IdentifiableComponent } from '../../../core';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
/**
|
|
14
|
+
* A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
|
|
15
|
+
* Each region is defined by a `BorderLayoutContainer` instance, and is identified by a corresponding constant: `NORTH`, `SOUTH`, `EAST`, `WEST`, and `CENTER`.
|
|
16
|
+
*/
|
|
17
|
+
export declare class BorderLayout extends IdentifiableComponent implements AfterViewInit, OnDestroy {
|
|
18
|
+
private subscribeSvc;
|
|
19
|
+
/**
|
|
20
|
+
* Emits events each time the user starts dragging a region handle.
|
|
21
|
+
*/
|
|
22
|
+
readonly dragStart: EventEmitter<LayoutDragEvent>;
|
|
23
|
+
/**
|
|
24
|
+
* Emits events each time the user stops dragging a region handle.
|
|
25
|
+
*/
|
|
26
|
+
readonly dragStop: EventEmitter<LayoutDragEvent>;
|
|
27
|
+
/**
|
|
28
|
+
* Emits events each time the user is dragging a region handle.
|
|
29
|
+
*/
|
|
30
|
+
readonly dragging: EventEmitter<LayoutDragEvent>;
|
|
31
|
+
/**
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
private onResize;
|
|
35
|
+
/**
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
private layoutContainer;
|
|
39
|
+
/**
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
private renderer;
|
|
43
|
+
/**
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
private set __containers__(value);
|
|
47
|
+
/**
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
constructor(subscribeSvc: SubscriptionService);
|
|
51
|
+
/**
|
|
52
|
+
* @private
|
|
53
|
+
* For test purpose only.
|
|
54
|
+
*/
|
|
55
|
+
getRenderer(): BorderLayoutRenderer;
|
|
56
|
+
/**
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
ngOnDestroy(): void;
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
ngAfterViewInit(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Forces the container to be redrawn.
|
|
66
|
+
*/
|
|
67
|
+
paint(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Resizes the specified region.
|
|
70
|
+
*
|
|
71
|
+
* @param region The region to resize.
|
|
72
|
+
* @param size The new size of the region to resize.
|
|
73
|
+
*
|
|
74
|
+
* @returns `true` whether the specified region has been resized; `false` otherwise.
|
|
75
|
+
*/
|
|
76
|
+
resizeRegion(region: LayoutRegion | LayoutRegionType, size: number): void;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BorderLayout, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BorderLayout, "atx-border-layout", never, {}, { "dragStart": "dragStart"; "dragStop": "dragStop"; "dragging": "dragging"; }, ["__containers__"], ["*"], true, never>;
|
|
79
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
import { BorderLayoutContainer } from '../../border-layout-container/border-layout-container.component';
|
|
9
|
+
import { Destroyable, LayoutRegion } from '../../../../model';
|
|
10
|
+
import { ResizeMethod } from './resize-method';
|
|
11
|
+
/**
|
|
12
|
+
* @private
|
|
13
|
+
* A utility class that computes the size of all border layout containers.
|
|
14
|
+
*/
|
|
15
|
+
export declare class BorderLayoutBoundsManager implements Destroyable {
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* The container top position when the user starts to drag the handle.
|
|
19
|
+
*/
|
|
20
|
+
private topPos;
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
* The container left position when the user starts to drag the handle.
|
|
24
|
+
*/
|
|
25
|
+
private leftPos;
|
|
26
|
+
/**
|
|
27
|
+
* @private
|
|
28
|
+
* The bounds of the center container.
|
|
29
|
+
*/
|
|
30
|
+
private bounds;
|
|
31
|
+
/**
|
|
32
|
+
* Makes this object elligible for garbage collection.
|
|
33
|
+
*/
|
|
34
|
+
destroy(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Returns a rectangle that represents the bounds currently computed by this object.
|
|
37
|
+
*
|
|
38
|
+
* @returns The bounds currently computed by this object.
|
|
39
|
+
*/
|
|
40
|
+
getBounds(): DOMRect;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the top-left hand corner position before each bounds computaion.
|
|
43
|
+
*
|
|
44
|
+
* @param x The x position of the main container, in pixels, before computaion.
|
|
45
|
+
* @param y The y position of the main container, in pixels, before computaion.
|
|
46
|
+
*/
|
|
47
|
+
setOrigin(x: number, y: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* @private
|
|
50
|
+
* For test purpose only.
|
|
51
|
+
*/
|
|
52
|
+
getOrigin(): any;
|
|
53
|
+
/**
|
|
54
|
+
* Computes the size of a "north" container.
|
|
55
|
+
*
|
|
56
|
+
* @param event The mouse event that triggered the computation of the container size.
|
|
57
|
+
* @param width The width of the main container.
|
|
58
|
+
* @param height The height of the main container.
|
|
59
|
+
* @param minSize The minimum size of the container for which to compute the size.
|
|
60
|
+
* @param maxSize The maximum size of the container for which to compute the size.
|
|
61
|
+
*
|
|
62
|
+
* @returns The size of a "north" container.
|
|
63
|
+
*/
|
|
64
|
+
northResize(event: MouseEvent, width: number, height: number, minSize: number | undefined, maxSize: number | undefined): number;
|
|
65
|
+
/**
|
|
66
|
+
* @private
|
|
67
|
+
*/
|
|
68
|
+
private setY;
|
|
69
|
+
/**
|
|
70
|
+
* Computes the size of a "south" container.
|
|
71
|
+
*
|
|
72
|
+
* @param event The mouse event that triggered the computation of the container size.
|
|
73
|
+
* @param width The width of the main container.
|
|
74
|
+
* @param height The height of the main container.
|
|
75
|
+
* @param minSize The minimum size of the container for which to compute the size.
|
|
76
|
+
* @param maxSize The maximum size of the container for which to compute the size.
|
|
77
|
+
*
|
|
78
|
+
* @returns The size of a "south" container.
|
|
79
|
+
*/
|
|
80
|
+
southResize(event: MouseEvent, width: number, height: number, minSize: number | undefined, maxSize: number | undefined): number;
|
|
81
|
+
/**
|
|
82
|
+
* @private
|
|
83
|
+
*/
|
|
84
|
+
private setHeight;
|
|
85
|
+
/**
|
|
86
|
+
* Computes the size of a "west" container.
|
|
87
|
+
*
|
|
88
|
+
* @param event The mouse event that triggered the computation of the container size.
|
|
89
|
+
* @param width The width of the main container.
|
|
90
|
+
* @param height The height of the main container.
|
|
91
|
+
* @param minSize The minimum size of the container for which to compute the size.
|
|
92
|
+
* @param maxSize The maximum size of the container for which to compute the size.
|
|
93
|
+
*
|
|
94
|
+
* @returns The size of a "west" container.
|
|
95
|
+
*/
|
|
96
|
+
westResize(event: MouseEvent, width: number, height: number, minSize: number | undefined, maxSize: number | undefined): number;
|
|
97
|
+
/**
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
private setX;
|
|
101
|
+
/**
|
|
102
|
+
* Computes the size of a "east" container.
|
|
103
|
+
*
|
|
104
|
+
* @param event The mouse event that triggered the computation of the container size.
|
|
105
|
+
* @param width The width of the main container.
|
|
106
|
+
* @param height The height of the main container.
|
|
107
|
+
* @param minSize The minimum size of the container for which to compute the size.
|
|
108
|
+
* @param maxSize The maximum size of the container for which to compute the size.
|
|
109
|
+
*
|
|
110
|
+
* @returns The size of a "east" container.
|
|
111
|
+
*/
|
|
112
|
+
eastResize(event: MouseEvent, width: number, height: number, minSize: number | undefined, maxSize: number | undefined): number;
|
|
113
|
+
/**
|
|
114
|
+
* @private
|
|
115
|
+
*/
|
|
116
|
+
private setWidth;
|
|
117
|
+
/**
|
|
118
|
+
* Invoked after each `BorderLayoutContainer` registration to initialize the center container bounds.
|
|
119
|
+
*
|
|
120
|
+
* @param container A `BorderLayoutContainer` instance added to the main container.
|
|
121
|
+
*/
|
|
122
|
+
initBounds(container: BorderLayoutContainer): void;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the method used to compute the size of a container, depending on the specified region.
|
|
125
|
+
*
|
|
126
|
+
* @param region The region associated with the container for which to compute the size.
|
|
127
|
+
*
|
|
128
|
+
* @returns The method used to compute the size of a container.
|
|
129
|
+
*/
|
|
130
|
+
getResizeMethod(region: LayoutRegion): ResizeMethod;
|
|
131
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
import { EventEmitter, QueryList } from '@angular/core';
|
|
9
|
+
import { BorderLayoutContainer } from '../../border-layout-container/border-layout-container.component';
|
|
10
|
+
import { Destroyable, LayoutDragEvent, LayoutRegion, SubscriptionService } from '../../../../model';
|
|
11
|
+
import { IdentifiableComponent } from '../../../../core';
|
|
12
|
+
import { BorderLayoutBoundsManager } from './border-layout-bounds-manager';
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
* A controller object responsible for handling user actions on a `BorderLayout` container.
|
|
16
|
+
*/
|
|
17
|
+
export declare class BorderLayoutRenderer extends IdentifiableComponent implements Destroyable {
|
|
18
|
+
private subscribeSvc;
|
|
19
|
+
/**
|
|
20
|
+
* Emits events each time the user starts, or stops dragging handle.
|
|
21
|
+
*/
|
|
22
|
+
readonly userAction: EventEmitter<LayoutDragEvent>;
|
|
23
|
+
/**
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private lytContainerElm;
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
private containerList;
|
|
31
|
+
/**
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
private boundsManager;
|
|
35
|
+
/**
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
constructor(subscribeSvc: SubscriptionService);
|
|
39
|
+
/**
|
|
40
|
+
* Add the list `BorderLayoutContainer` objects associated with the main container to this controller.
|
|
41
|
+
*
|
|
42
|
+
* @param containers the list `BorderLayoutContainer` objects associated with the main container.
|
|
43
|
+
*/
|
|
44
|
+
addContainers(containers: QueryList<BorderLayoutContainer>): void;
|
|
45
|
+
/**
|
|
46
|
+
* Sets the reference to the HTML container associated with the main container.
|
|
47
|
+
*
|
|
48
|
+
* @param lytContainer The reference to the HTML container associated with the main container.
|
|
49
|
+
*/
|
|
50
|
+
setLayoutContainer(lytContainer: HTMLDivElement): void;
|
|
51
|
+
/**
|
|
52
|
+
* @private
|
|
53
|
+
* For test purpose only.
|
|
54
|
+
* Returns the reference to the internal `BorderLayoutBoundsManager` instance.
|
|
55
|
+
*/
|
|
56
|
+
getBoundsManager(): BorderLayoutBoundsManager;
|
|
57
|
+
/**
|
|
58
|
+
* Makes this object elligible for garbage collection.
|
|
59
|
+
*/
|
|
60
|
+
destroy(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Forces the layout of all `BorderLayoutContainer` objects associated with the main container.
|
|
63
|
+
*/
|
|
64
|
+
paint(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Resizes the specified region of the associated container.
|
|
67
|
+
*
|
|
68
|
+
* @param region The region to resize.
|
|
69
|
+
* @param size The new size of the region to resize.
|
|
70
|
+
*
|
|
71
|
+
* @returns `true` whether the specified region has been resized; `false` otherwise.
|
|
72
|
+
*/
|
|
73
|
+
resizeRegion(region: LayoutRegion, size: number): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
private resizeEnter;
|
|
78
|
+
/**
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private fireEvent;
|
|
82
|
+
/**
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private render;
|
|
86
|
+
private checkLytContainer;
|
|
87
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
* @private
|
|
10
|
+
* A convenient type that describes methods used to compute the size of a `BorderlayoutContainer` object,
|
|
11
|
+
* depending on its region.
|
|
12
|
+
*/
|
|
13
|
+
export type ResizeMethod = (event: MouseEvent, width: number, height: number, minSize: number | undefined, maxSize: number | undefined) => number;
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
9
|
+
import { LayoutConstraints, LayoutRegion } from '../../../model';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* A container that defines the region of a `BorderLayout` component instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare class BorderLayoutContainer {
|
|
15
|
+
private elRef;
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* Indicates to the parent `BorderLayout` instance that the user starts to resize this container.
|
|
19
|
+
*/
|
|
20
|
+
readonly resizeStart: EventEmitter<BorderLayoutContainer>;
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
selected: Boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the CSS class associated with the region constraint of the `BorderLayoutContainer` object.
|
|
27
|
+
*/
|
|
28
|
+
get class(): string;
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
protected region: LayoutRegion;
|
|
33
|
+
/**
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
protected resizable: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
private atxConstraints;
|
|
41
|
+
/**
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
private size;
|
|
45
|
+
/**
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
private readonly style;
|
|
49
|
+
/**
|
|
50
|
+
* Gets or sets the constraints for this `BorderLayoutContainer` object.
|
|
51
|
+
*/
|
|
52
|
+
get constraints(): LayoutConstraints;
|
|
53
|
+
set constraints(constraints: LayoutConstraints);
|
|
54
|
+
/**
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
constructor(elRef: ElementRef);
|
|
58
|
+
/**
|
|
59
|
+
* Sets the size of this container depending on the specified region.
|
|
60
|
+
*
|
|
61
|
+
* @param size The new size for this container, in pixels.
|
|
62
|
+
*/
|
|
63
|
+
setSize(size: number | undefined): void;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the size of the container, in pixels.
|
|
66
|
+
*
|
|
67
|
+
* @returns The size of the container.
|
|
68
|
+
*/
|
|
69
|
+
getSize(): number;
|
|
70
|
+
/**
|
|
71
|
+
* Sets the left-hand side position of this container.
|
|
72
|
+
*
|
|
73
|
+
* @param position The left-hand side position of this container, in pixels.
|
|
74
|
+
*/
|
|
75
|
+
setLeftPos(position: number): void;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the right-hand side position of this container.
|
|
78
|
+
*
|
|
79
|
+
* @param position The right-hand side position of this container, in pixels.
|
|
80
|
+
*/
|
|
81
|
+
setRightPos(position: number): void;
|
|
82
|
+
/**
|
|
83
|
+
* Sets the top position of this container.
|
|
84
|
+
*
|
|
85
|
+
* @param position The top position of this container, in pixels.
|
|
86
|
+
*/
|
|
87
|
+
setTopPos(position: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the bottom position of this container.
|
|
90
|
+
*
|
|
91
|
+
* @param position The bottom position of this container, in pixels.
|
|
92
|
+
*/
|
|
93
|
+
setBottomPos(position: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
protected resizetart(): void;
|
|
98
|
+
/**
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
private initHandle;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BorderLayoutContainer, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BorderLayoutContainer, "atx-border-layout-container", never, { "constraints": { "alias": "constraints"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import { LayoutRegion, LayoutRegionType } from "./layout-region";
|
|
9
|
+
/**
|
|
10
|
+
* Defines the layout constraints of a `BorderLayoutContainer` object.
|
|
11
|
+
*/
|
|
12
|
+
export interface LayoutConstraints {
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the region of the `BorderLayoutContainer` object.
|
|
15
|
+
*/
|
|
16
|
+
region: LayoutRegion | LayoutRegionType;
|
|
17
|
+
/**
|
|
18
|
+
* Indicates whether the `BorderLayoutContainer` object is resizable (`true`), or not (`false`).
|
|
19
|
+
*/
|
|
20
|
+
resizable?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the default size of the `BorderLayoutContainer` object.
|
|
23
|
+
*/
|
|
24
|
+
size?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Defines the minimum size of the `BorderLayoutContainer` object.
|
|
27
|
+
*/
|
|
28
|
+
minSize?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the maximum size of the `BorderLayoutContainer` object.
|
|
31
|
+
*/
|
|
32
|
+
maxSize?: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Defines the type of a `LayoutDragEvent` instance.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum LayoutDragEventType {
|
|
12
|
+
/**
|
|
13
|
+
* Indicates that the dragging process is starting.
|
|
14
|
+
*/
|
|
15
|
+
DRAG_START = "dragstart",
|
|
16
|
+
/**
|
|
17
|
+
* Indicates that the dragging process stopped.
|
|
18
|
+
*/
|
|
19
|
+
DRAG_STOP = "dragstop",
|
|
20
|
+
/**
|
|
21
|
+
* Indicates that the user is dragging the container handle.
|
|
22
|
+
*/
|
|
23
|
+
DRAGGING = "dragging"
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { BorderLayout, BorderLayoutContainer, LayoutDragEventType } from "projects/angular-toolbox/src/public-api";
|
|
9
|
+
/**
|
|
10
|
+
* The `LayoutDragEvent` class is an event that represents a drag interaction with a `BorderLayoutContainer`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class LayoutDragEvent {
|
|
13
|
+
/**
|
|
14
|
+
* The reference to the container that triggered this event.
|
|
15
|
+
*/
|
|
16
|
+
readonly target: BorderLayoutContainer;
|
|
17
|
+
/**
|
|
18
|
+
* The reference to the layout that contains the target container.
|
|
19
|
+
*/
|
|
20
|
+
layout: BorderLayout;
|
|
21
|
+
/**
|
|
22
|
+
* The type of this event; a `LayoutDragEventType` constant.
|
|
23
|
+
*/
|
|
24
|
+
readonly type: LayoutDragEventType;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new `LayoutDragEvent` instance.
|
|
27
|
+
*
|
|
28
|
+
* @param target The container that triggered this event.
|
|
29
|
+
* @param type The type of this event.
|
|
30
|
+
*/
|
|
31
|
+
constructor(target: BorderLayoutContainer, type: LayoutDragEventType);
|
|
32
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
export type LayoutRegionType = "north" | "south" | "west" | "west" | "east" | "center";
|
|
12
|
+
/**
|
|
13
|
+
* The list of layout constraints that defines the regions of a `BorderLayout` container.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum LayoutRegion {
|
|
16
|
+
/**
|
|
17
|
+
* The north layout constraint (top of container).
|
|
18
|
+
*/
|
|
19
|
+
NORTH = "north",
|
|
20
|
+
/**
|
|
21
|
+
* The south layout constraint (bottom of container).
|
|
22
|
+
*/
|
|
23
|
+
SOUTH = "south",
|
|
24
|
+
/**
|
|
25
|
+
* The west layout constraint (left side of container).
|
|
26
|
+
*/
|
|
27
|
+
WEST = "west",
|
|
28
|
+
/**
|
|
29
|
+
* The east layout constraint (right side of container).
|
|
30
|
+
*/
|
|
31
|
+
EAST = "east",
|
|
32
|
+
/**
|
|
33
|
+
* The center layout constraint (middle of container).
|
|
34
|
+
*/
|
|
35
|
+
CENTER = "center"
|
|
36
|
+
}
|
|
@@ -67,4 +67,9 @@ export interface WindowInit {
|
|
|
67
67
|
* Specifies whether the menu bar is activated (`WindowFeatureState.YES`), or not (`WindowFeatureState.NO`).
|
|
68
68
|
*/
|
|
69
69
|
menubar?: WindowFeatureState;
|
|
70
|
+
/**
|
|
71
|
+
* Indicates whether the winbdow is centered (`true`), or not (`false`).
|
|
72
|
+
* If `true`, the `top` and `left` properties are ignored.
|
|
73
|
+
*/
|
|
74
|
+
center?: boolean;
|
|
70
75
|
}
|
package/lib/util/index.d.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import { Version } from "../model";
|
|
9
|
+
/**
|
|
10
|
+
* A convenient utility class for working with `Version` objects.
|
|
11
|
+
*/
|
|
12
|
+
export declare class VersionUtil {
|
|
13
|
+
/**
|
|
14
|
+
* Returns a string that represents the specified `Version` object.
|
|
15
|
+
*
|
|
16
|
+
* @param version The `Version` object for which to get a string representation.
|
|
17
|
+
*
|
|
18
|
+
* @returns A string that represents the specified `Version` object.
|
|
19
|
+
*/
|
|
20
|
+
static stringify(version: Version): string;
|
|
21
|
+
/**
|
|
22
|
+
* Compares the given `Version` objects.
|
|
23
|
+
*
|
|
24
|
+
* @param v1 The first object to compare.
|
|
25
|
+
* @param v2 The second object to compare.
|
|
26
|
+
*
|
|
27
|
+
* @returns `true` whether both `Version` objects are equal; `false` otherwise.
|
|
28
|
+
*/
|
|
29
|
+
static equal(v1: Version, v2: Version): boolean;
|
|
30
|
+
}
|
|
@@ -19,6 +19,10 @@ export declare class BrowserWindowFeaturesBuilder {
|
|
|
19
19
|
* @returns A string that represents the features parameter of the `Window.open()` method.
|
|
20
20
|
*/
|
|
21
21
|
static build(init?: WindowInit): string;
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
static setCenterPos(init: WindowInit): void;
|
|
22
26
|
/**
|
|
23
27
|
* @private
|
|
24
28
|
*/
|