UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

23 lines (22 loc) 951 B
import { ElementRef, Renderer2 } from '@angular/core'; import { FocusIndicatorOriginService } from './focus-indicator-origin.service'; /** * When working with component host elements * we cannot apply directives, eg. FocusIndicatorOriginDirective * however we may still want the functionality to be applied to * the host element. This class allows the host element to become * a focus indicator origin */ export declare class FocusIndicatorOrigin { private readonly _focusIndicatorOrigin; /** Store all event handlers */ private readonly _handlers; /** Click events can be trigged by both mouse and keyboard so we want to ensure we emit the correct origin */ private _isMouseEvent; constructor(_focusIndicatorOrigin: FocusIndicatorOriginService, elementRef: ElementRef, renderer: Renderer2); /** Remove all event handlers */ destroy(): void; onMouseDown(): void; onClick(): void; onKeydown(): void; }