@ngneat/hotkeys
Version:
A declarative library for handling hotkeys in Angular applications
25 lines (24 loc) • 1.77 kB
TypeScript
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { Hotkey, Options as ServiceOptions } from './hotkeys.service';
import * as i0 from "@angular/core";
type Options = Omit<ServiceOptions, 'group' | 'element' | 'description'>;
export declare class HotkeysDirective implements OnChanges, OnDestroy {
private hotkeysService;
private elementRef;
private subscription;
hotkeys: import("@angular/core").InputSignal<string>;
isSequence: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>;
isGlobal: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>;
hotkeysGroup: import("@angular/core").InputSignal<string>;
hotkeysOptions: import("@angular/core").InputSignal<Partial<Options>>;
hotkeysDescription: import("@angular/core").InputSignal<string>;
hotkey: EventEmitter<Hotkey | KeyboardEvent>;
private _hotkey;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
private deleteHotkeys;
private setHotkeys;
static ɵfac: i0.ɵɵFactoryDeclaration<HotkeysDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<HotkeysDirective, "[hotkeys]", never, { "hotkeys": { "alias": "hotkeys"; "required": false; "isSignal": true; }; "isSequence": { "alias": "isSequence"; "required": false; "isSignal": true; }; "isGlobal": { "alias": "isGlobal"; "required": false; "isSignal": true; }; "hotkeysGroup": { "alias": "hotkeysGroup"; "required": false; "isSignal": true; }; "hotkeysOptions": { "alias": "hotkeysOptions"; "required": false; "isSignal": true; }; "hotkeysDescription": { "alias": "hotkeysDescription"; "required": false; "isSignal": true; }; }, { "hotkey": "hotkey"; }, never, never, true, never>;
}
export {};