UNPKG

ng-hotkeys

Version:

ng-hotkeys for Angular 14+

56 lines (55 loc) 1.56 kB
import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from "@angular/core"; import { Shortcut } from "./ng-hotkeys.interfaces"; import { NgHotkeysService } from "./ng-hotkeys.service"; import * as i0 from "@angular/core"; /** * A directive to be used with "focusable" elements, like: * textarea, input, select. */ export declare class NgHotkeysDirective implements OnDestroy, OnChanges { private keyboard; private el; /** * clearId to remove shortcuts. */ private clearIds; /** * Shortcut inputs for the directive. * will only work when the element is in focus */ ngHotKeys: Shortcut[]; /** * @ignore * @type {boolean} * @private */ private _disabled; /** * whether to disable the shortcuts for this directive * @param value */ set disabled(value: any); /** * @ignore * @param {NgHotkeysService} keyboard * @param {ElementRef} el */ constructor(keyboard: NgHotkeysService, el: ElementRef); /** * @ignore * @param {Shortcut[]} shortcuts * @returns {any} */ private transformInput; /** * @ignore */ ngOnDestroy(): void; /** * @ignore * @param {SimpleChanges} changes */ ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgHotkeysDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NgHotkeysDirective, "[ngHotKeys]", never, { "ngHotKeys": "ngHotKeys"; "disabled": "disabled"; }, {}, never, never, false>; }