@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
37 lines (36 loc) • 1.93 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { ActionDirection } from '../dashboard.service';
import { DashboardWidgetComponent } from '../widget/dashboard-widget.component';
import { DashboardGrabHandleDirective } from './grab-handle.directive';
import * as i0 from "@angular/core";
export declare class DashboardGrabHandleService implements OnDestroy {
private readonly _dashboard;
/** Self-registered drag handles in the dashboard. */
private _handles;
/** Automatically unsubscribe from all observables when destroyed */
private readonly _onDestroy;
constructor();
/** Perform unsubscriptions */
ngOnDestroy(): void;
/** Register a new grab handle. */
addHandle(handle: DashboardGrabHandleDirective): void;
/** Unregister a removed grab handle. */
removeHandle(handle: DashboardGrabHandleDirective): void;
/** Make the first visual item in the list focusable */
setFirstItemFocusable(): void;
/** Set an item at a given index focused */
setItemFocus(index: number, focusElement?: boolean): void;
/** Focus the previous grab handle */
setPreviousItemFocus(handle: DashboardGrabHandleDirective): void;
/** Focus the next grab handle */
setNextItemFocus(handle: DashboardGrabHandleDirective): void;
/** Focus the grab handle on the widget above */
setSiblingItemFocus(widget: DashboardWidgetComponent, direction: ActionDirection): void;
/** Get handles in the order they appear rather than the order they are in the DOM */
getHandlesInOrder(handles?: DashboardGrabHandleDirective[]): DashboardGrabHandleDirective[];
private getHandleIndex;
/** If the current focusable handle is removed we need to make another one focusable */
private ensureFocusable;
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardGrabHandleService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DashboardGrabHandleService>;
}