@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
31 lines (30 loc) • 1.4 kB
TypeScript
import { RendererFactory2 } from '@angular/core';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
export declare class ManagedFocusContainerService {
readonly rendererFactory: RendererFactory2;
private _containers;
private readonly _renderer;
constructor();
/**
* Create or get an existing object which manages the tabindex of descendants.
* @param element The element containing focusable descendants.
* @param component The component requesting the managed focus container.
*/
register(element: HTMLElement, component: unknown): void;
/**
* Remove the container object. This will call `unregister` on the container if `component` is the last reference
* to it.
* @param element The element containing focusable descendants.
* @param component The component requesting the managed focus container.
*/
unregister(element: HTMLElement, component: unknown): void;
/**
* Get an observable which can be used to determine when the element or one of its descendants has focus.
* @param element The element containing focusable descendants.
*/
hasFocus(element: HTMLElement): Observable<boolean>;
private getContainer;
static ɵfac: i0.ɵɵFactoryDeclaration<ManagedFocusContainerService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ManagedFocusContainerService>;
}