UNPKG

@hmcts/media-viewer

Version:
30 lines 1.34 kB
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import * as i0 from "@angular/core"; export type KeyboardNavOrientation = 'horizontal' | 'vertical'; export declare class KeyboardNavDirective implements OnInit, OnDestroy { private elementRef; orientation: KeyboardNavOrientation; itemFocused: EventEmitter<HTMLElement>; itemActivated: EventEmitter<HTMLElement>; private focusableItems; private currentFocusIndex; private mutationObserver; private isUsingArrowKeys; constructor(elementRef: ElementRef<HTMLElement>); ngOnInit(): void; ngOnDestroy(): void; private setupMutationObserver; private updateFocusableItems; private isVisible; private applyArrowKeyTabindex; onKeyDown(event: KeyboardEvent): void; private focusNext; private focusPrevious; private focusFirst; private focusLast; private focusItemAtIndex; private activateItem; static ɵfac: i0.ɵɵFactoryDeclaration<KeyboardNavDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<KeyboardNavDirective, "[mvKeyboardNav]", never, { "orientation": { "alias": "mvKeyboardNav"; "required": false; }; }, { "itemFocused": "itemFocused"; "itemActivated": "itemActivated"; }, never, never, false, never>; } //# sourceMappingURL=keyboard-nav.directive.d.ts.map