1 | import { AnimationEvent } from '@angular/animations';
|
2 | import { ConfigurableFocusTrapFactory, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
3 | import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, DomPortal, TemplatePortal } from '@angular/cdk/portal';
|
4 | import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter } from '@angular/core';
|
5 | import { CovalentSideSheetConfig } from './side-sheet.config';
|
6 | import * as i0 from "@angular/core";
|
7 | export declare function _getFocusedElementPierceShadowDom(): HTMLElement | null;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare abstract class _CovalentSideSheetContainerBase extends BasePortalOutlet {
|
13 | protected _elementRef: ElementRef;
|
14 | protected _focusTrapFactory: ConfigurableFocusTrapFactory;
|
15 | protected _changeDetectorRef: ChangeDetectorRef;
|
16 |
|
17 | _config: CovalentSideSheetConfig;
|
18 | private _focusMonitor?;
|
19 | protected _document: Document;
|
20 |
|
21 | _portalOutlet: CdkPortalOutlet;
|
22 |
|
23 | private _focusTrap;
|
24 |
|
25 | _animationStateChanged: EventEmitter<{
|
26 | state: 'opened' | 'opening' | 'closing' | 'closed';
|
27 | totalTime: number;
|
28 | }>;
|
29 |
|
30 | private _elementFocusedBeforeSideSheetWasOpened;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 | _closeInteractionType: FocusOrigin | null;
|
37 |
|
38 | _ariaLabelledBy: string | null;
|
39 |
|
40 | _id: string;
|
41 | constructor(_elementRef: ElementRef, _focusTrapFactory: ConfigurableFocusTrapFactory, _changeDetectorRef: ChangeDetectorRef, _document: any,
|
42 |
|
43 | _config: CovalentSideSheetConfig, _focusMonitor?: FocusMonitor | undefined);
|
44 | /** Starts the side-sheet exit animation. */
|
45 | abstract _startExitAnimation(): void;
|
46 | /** Initializes the side-sheet container with the attached content. */
|
47 | _initializeWithAttachedContent(): void;
|
48 | /**
|
49 | * Attach a ComponentPortal as content to this side-sheet container.
|
50 | * @param portal Portal to be attached as the side-sheet content.
|
51 | */
|
52 | attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
53 | /**
|
54 | * Attach a TemplatePortal as content to this side-sheet container.
|
55 | * @param portal Portal to be attached as the side-sheet content.
|
56 | */
|
57 | attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
58 | /**
|
59 | * Attaches a DOM portal to the side-sheet container.
|
60 | * @param portal Portal to be attached.
|
61 | * @deprecated To be turned into a method.
|
62 | */
|
63 | attachDomPortal: (portal: DomPortal) => void;
|
64 | /** Moves focus back into the side-sheet if it was moved out. */
|
65 | _recaptureFocus(): void;
|
66 | /**
|
67 | * Moves the focus inside the focus trap. When autoFocus is not set to 'side-sheet', if focus
|
68 | * cannot be moved then focus will go to the side-sheet container.
|
69 | */
|
70 | protected _trapFocus(): void;
|
71 | /** Restores focus to the element that was focused before the side-sheet opened. */
|
72 | protected _restoreFocus(): void;
|
73 | /** Sets up the focus trap. */
|
74 | private _setupFocusTrap;
|
75 | /** Captures the element that was focused before the side-sheet was opened. */
|
76 | private _capturePreviouslyFocusedElement;
|
77 | /** Focuses the side-sheet container. */
|
78 | private _focusSideSheetContainer;
|
79 | /** Returns whether focus is inside the side-sheet. */
|
80 | private _containsFocus;
|
81 | static ɵfac: i0.ɵɵFactoryDeclaration<_CovalentSideSheetContainerBase, [null, null, null, { optional: true; }, null, null]>;
|
82 | static ɵdir: i0.ɵɵDirectiveDeclaration<_CovalentSideSheetContainerBase, never, never, {}, {}, never, never, false, never>;
|
83 | }
|
84 |
|
85 |
|
86 |
|
87 |
|
88 | export declare class CovalentSideSheetContainerComponent extends _CovalentSideSheetContainerBase {
|
89 |
|
90 | _state: 'void' | 'enter' | 'exit';
|
91 | tdSideSheetContainerClass: boolean;
|
92 | tabIndex: number;
|
93 | arialModal: boolean;
|
94 | idAttr: string;
|
95 | roleAttr: import("@angular/material/dialog").DialogRole | undefined;
|
96 | arialLabelByAttr: string | null;
|
97 | arialDescribeByAttr: string | null;
|
98 | arialLabelAttr: string | null | undefined;
|
99 | get sideSheetAnimationState(): "enter" | "void" | "exit";
|
100 | onAnimateStart($event: AnimationEvent): void;
|
101 | onAnimateDone($event: AnimationEvent): void;
|
102 |
|
103 | _onAnimationDone({ toState, totalTime }: AnimationEvent): void;
|
104 |
|
105 | _onAnimationStart({ toState, totalTime }: AnimationEvent): void;
|
106 |
|
107 | _startExitAnimation(): void;
|
108 | static ɵfac: i0.ɵɵFactoryDeclaration<CovalentSideSheetContainerComponent, never>;
|
109 | static ɵcmp: i0.ɵɵComponentDeclaration<CovalentSideSheetContainerComponent, "td-side-sheet-container", never, {}, {}, never, never, false, never>;
|
110 | }
|