UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

66 lines (65 loc) • 2.53 kB
import { OnDestroy } from '@angular/core'; import * as i0 from "@angular/core"; /** * #3306 Every <ngx-extended-pdf-viewer> provides its own instance, so the dialog and button ids are * looked up in that viewer. The root instance (e.g. for custom templates) looks them up in the document. */ export declare class FocusManagementService implements OnDestroy { private readonly viewer; private previousActiveElement; private ariaLiveRegion; private keydownHandler; constructor(); ngOnDestroy(): void; private getElementById; /** * Initializes a hidden aria-live region for screen reader announcements */ private initializeAriaLiveRegion; /** * Announces a message to screen readers via aria-live region * @param message The message to announce */ announce(message: string): void; /** * Moves focus to the first focusable element within a dialog * @param dialogId The ID of the dialog element * @param announceMessage Optional message to announce when dialog opens * @param buttonId Optional ID of the button that triggered the dialog (for reliable focus return) */ moveFocusToDialog(dialogId: string, announceMessage?: string, buttonId?: string): void; /** * Sets up focus cycling so that tabbing past the last element returns to the toolbar * @param dialog The dialog element */ private setupFocusCycling; /** * Cleans up focus cycling event listeners */ private cleanupFocusCycling; /** * Gets all focusable elements within a container * @param container The container element * @returns Array of focusable elements */ private getAllFocusableElements; /** * Returns focus to the previously focused element (typically the button that opened the dialog) * @param announceMessage Optional message to announce when dialog closes */ returnFocusToPrevious(announceMessage?: string): void; /** * Finds the first focusable element within a container * @param container The container element to search within * @returns The first focusable element or null */ private findFirstFocusableElement; /** * Checks if an element is visible * @param element The element to check * @returns True if the element is visible */ private isVisible; static ɵfac: i0.ɵɵFactoryDeclaration<FocusManagementService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<FocusManagementService>; }