UNPKG

1.24 kBTypeScriptView Raw
1import { NgZone } from '@angular/core';
2import { FocusTrap, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';
3import * as i0 from "@angular/core";
4/**
5 * Overrides angular cdk focus trap to keep restore functionality inside trap.
6 * */
7export declare class NbFocusTrap extends FocusTrap {
8 protected element: HTMLElement;
9 protected checker: InteractivityChecker;
10 protected ngZone: NgZone;
11 protected document: Document;
12 protected previouslyFocusedElement: HTMLElement;
13 constructor(element: HTMLElement, checker: InteractivityChecker, ngZone: NgZone, document: Document, deferAnchors: any);
14 restoreFocus(): void;
15 blurPreviouslyFocusedElement(): void;
16 protected savePreviouslyFocusedElement(): void;
17}
18export declare class NbFocusTrapFactoryService extends FocusTrapFactory {
19 protected checker: InteractivityChecker;
20 protected ngZone: NgZone;
21 private document;
22 constructor(checker: InteractivityChecker, ngZone: NgZone, document: any);
23 create(element: HTMLElement, deferCaptureElements?: boolean): NbFocusTrap;
24 static ɵfac: i0.ɵɵFactoryDeclaration<NbFocusTrapFactoryService, never>;
25 static ɵprov: i0.ɵɵInjectableDeclaration<NbFocusTrapFactoryService>;
26}