@datarailsshared/datarailsshared 1.6.338 → 1.6.342
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/datarailsshared-datarailsshared-1.6.342.tgz +0 -0
- package/esm2022/lib/dr-badge-status/dr-badge-status.component.mjs +9 -5
- package/esm2022/lib/drawer/drawer-config.mjs +7 -1
- package/esm2022/lib/drawer/drawer-container.component.mjs +30 -33
- package/esm2022/lib/drawer/drawer-position-strategy.mjs +94 -8
- package/esm2022/lib/drawer/drawer-ref.mjs +7 -2
- package/fesm2022/datarailsshared-datarailsshared.mjs +186 -88
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-badge-status/dr-badge-status.component.d.ts +2 -1
- package/lib/drawer/drawer-config.d.ts +9 -0
- package/lib/drawer/drawer-container.component.d.ts +4 -3
- package/lib/drawer/drawer-position-strategy.d.ts +32 -5
- package/lib/drawer/drawer-ref.d.ts +4 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.6.338.tgz +0 -0
|
@@ -6,6 +6,7 @@ export declare class DrBadgeStatusComponent {
|
|
|
6
6
|
label: string;
|
|
7
7
|
tooltip: string;
|
|
8
8
|
tooltipClass: string;
|
|
9
|
+
showBackground: boolean;
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<DrBadgeStatusComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DrBadgeStatusComponent, "dr-badge-status", never, { "theme": { "alias": "theme"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DrBadgeStatusComponent, "dr-badge-status", never, { "theme": { "alias": "theme"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; "showBackground": { "alias": "showBackground"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
12
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Direction } from '@angular/cdk/bidi';
|
|
2
|
+
import { DialogRole } from '@angular/cdk/dialog';
|
|
2
3
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
4
|
import { Injector, ViewContainerRef } from '@angular/core';
|
|
4
5
|
/** Options for where to set focus to automatically on dialog open. */
|
|
5
6
|
export type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
6
7
|
/** Possible overrides for a drawer's position. */
|
|
7
8
|
export type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
9
|
+
/** Possible drag behaviors for a bottom-positioned drawer. */
|
|
10
|
+
export type DrawerDragMode = 'dismiss' | 'resize';
|
|
8
11
|
/**
|
|
9
12
|
* Configuration used when opening a drawer.
|
|
10
13
|
*/
|
|
@@ -30,6 +33,10 @@ export declare class DrawerConfig<D = any> {
|
|
|
30
33
|
disableClose?: boolean;
|
|
31
34
|
/** Aria label to assign to the drawer element. */
|
|
32
35
|
ariaLabel?: string | null;
|
|
36
|
+
/** Aria role for the drawer container */
|
|
37
|
+
role?: DialogRole;
|
|
38
|
+
/** Whether the drawer should be treated as a modal dialog */
|
|
39
|
+
isModal?: boolean;
|
|
33
40
|
/**
|
|
34
41
|
* Whether the drawer should close when the user goes backwards/forwards in history.
|
|
35
42
|
* Note that this usually doesn't include clicking on links (unless the user is using
|
|
@@ -70,4 +77,6 @@ export declare class DrawerConfig<D = any> {
|
|
|
70
77
|
injector?: Injector;
|
|
71
78
|
/** Whether to render the drawer without default container styles and handle. */
|
|
72
79
|
unstyled?: boolean;
|
|
80
|
+
/** Drag behavior for bottom drawer. */
|
|
81
|
+
dragMode?: DrawerDragMode;
|
|
73
82
|
}
|
|
@@ -16,6 +16,8 @@ export declare class DrawerContainer extends CdkDialogContainer<DrawerConfig> im
|
|
|
16
16
|
/** The portal outlet inside of this container into which the content will be loaded. */
|
|
17
17
|
_portalOutlet: CdkPortalOutlet;
|
|
18
18
|
_handleRef?: ElementRef<HTMLDivElement>;
|
|
19
|
+
/** Emits final height (px) after resize. Available only in resize mode. */
|
|
20
|
+
afterResized: EventEmitter<number>;
|
|
19
21
|
/** The state of the drawer animations. */
|
|
20
22
|
_animationState: 'void' | 'visible' | 'hidden';
|
|
21
23
|
/** Emits whenever the state of the animation changes. */
|
|
@@ -25,7 +27,7 @@ export declare class DrawerContainer extends CdkDialogContainer<DrawerConfig> im
|
|
|
25
27
|
get _drawerPosition(): string;
|
|
26
28
|
private readonly _changeDetectorRef;
|
|
27
29
|
private readonly destroy$;
|
|
28
|
-
positionStrategy
|
|
30
|
+
positionStrategy?: DrawerPositionStrategy;
|
|
29
31
|
constructor(elementRef: ElementRef<HTMLElement>, focusTrapFactory: FocusTrapFactory, document: Document, config: DrawerConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, focusMonitor?: FocusMonitor);
|
|
30
32
|
protected _contentAttached(): void;
|
|
31
33
|
/** Begin animation of bottom sheet entrance into view. */
|
|
@@ -35,11 +37,10 @@ export declare class DrawerContainer extends CdkDialogContainer<DrawerConfig> im
|
|
|
35
37
|
ngAfterViewInit(): void;
|
|
36
38
|
private resolvePositionStrategy;
|
|
37
39
|
private setupDragListener;
|
|
38
|
-
private getContainerPosition;
|
|
39
40
|
ngOnDestroy(): void;
|
|
40
41
|
_onAnimationDone(event: AnimationEvent): void;
|
|
41
42
|
_onAnimationStart(event: AnimationEvent): void;
|
|
42
43
|
protected _captureInitialFocus(): void;
|
|
43
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<DrawerContainer, [null, null, { optional: true; }, null, null, null, null, null]>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DrawerContainer, "dr-drawer-container", never, {}, {}, never, never, true, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DrawerContainer, "dr-drawer-container", never, {}, { "afterResized": "afterResized"; }, never, never, true, never>;
|
|
45
46
|
}
|
|
@@ -1,10 +1,37 @@
|
|
|
1
|
+
import { DrawerConfig } from './drawer-config';
|
|
1
2
|
export interface DrawerPositionStrategy {
|
|
2
3
|
extractMousePosition(event: MouseEvent): number;
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
onDragStart(container: HTMLElement, overlayElement: HTMLElement): void;
|
|
5
|
+
onDragMove(currentPosition: number, container: HTMLElement, overlayElement: HTMLElement): void;
|
|
6
|
+
onDragEnd(container: HTMLElement, overlayElement: HTMLElement): {
|
|
7
|
+
shouldClose: boolean;
|
|
8
|
+
height?: number;
|
|
9
|
+
};
|
|
5
10
|
}
|
|
6
|
-
export declare class
|
|
11
|
+
export declare class BottomDismissPositionStrategy implements DrawerPositionStrategy {
|
|
12
|
+
private startMouseY;
|
|
13
|
+
private deltaY;
|
|
7
14
|
extractMousePosition(event: MouseEvent): number;
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
onDragStart(container: HTMLElement): void;
|
|
16
|
+
onDragMove(mouseY: number, container: HTMLElement): void;
|
|
17
|
+
onDragEnd(container: HTMLElement): {
|
|
18
|
+
shouldClose: boolean;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare class BottomResizePositionStrategy implements DrawerPositionStrategy {
|
|
22
|
+
private readonly config;
|
|
23
|
+
private startMouseY;
|
|
24
|
+
private startHeightPx;
|
|
25
|
+
private currentHeightPx;
|
|
26
|
+
private minHeightPx;
|
|
27
|
+
private maxHeightPx;
|
|
28
|
+
constructor(config: DrawerConfig);
|
|
29
|
+
extractMousePosition(event: MouseEvent): number;
|
|
30
|
+
onDragStart(container: HTMLElement, overlayElement: HTMLElement): void;
|
|
31
|
+
onDragMove(mouseY: number, container: HTMLElement, overlayElement: HTMLElement): void;
|
|
32
|
+
onDragEnd(container: HTMLElement, overlayElement: HTMLElement): {
|
|
33
|
+
shouldClose: boolean;
|
|
34
|
+
height: number;
|
|
35
|
+
};
|
|
36
|
+
private toPx;
|
|
10
37
|
}
|
|
@@ -34,6 +34,8 @@ export declare class DrawerRef<T = any, R = any> {
|
|
|
34
34
|
private _result;
|
|
35
35
|
/** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
|
|
36
36
|
private _closeFallbackTimeout;
|
|
37
|
+
/** Subject for notifying the user that the drawer has been resized. */
|
|
38
|
+
private readonly _afterResized$;
|
|
37
39
|
constructor(_ref: DialogRef<R, T>, config: DrawerConfig, containerInstance: DrawerContainer);
|
|
38
40
|
/**
|
|
39
41
|
* Dismisses the drawer.
|
|
@@ -46,6 +48,8 @@ export declare class DrawerRef<T = any, R = any> {
|
|
|
46
48
|
afterClosed(): Observable<R | undefined>;
|
|
47
49
|
/** Gets an observable that is notified when the drawer has opened and appeared. */
|
|
48
50
|
afterOpened(): Observable<void>;
|
|
51
|
+
/** Gets an observable that emits the final height (px) after resize. Available only in resize mode. */
|
|
52
|
+
afterResized(): Observable<number>;
|
|
49
53
|
/**
|
|
50
54
|
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
51
55
|
*/
|
package/package.json
CHANGED
|
Binary file
|