@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
34 lines (33 loc) • 1.46 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
import { SankeyNodeLink } from './interfaces/node-link.interface';
import * as i0 from "@angular/core";
export declare class SankeyFocusManager<T> implements OnDestroy {
/** Store the node that can currently be tabbed to */
active$: BehaviorSubject<SankeyNodeLink<T>>;
/** Emit whenever an item should receive focus */
focused$: Subject<SankeyNodeLink<T>>;
/** Store the nodes */
private _nodes;
/** Get the current active item */
private get _active();
ngOnDestroy(): void;
/** Update the list of possible nodes */
setNodes(nodes: ReadonlyArray<SankeyNodeLink<T>>): void;
/** Set the current active item */
setActiveItem(node: SankeyNodeLink<T>): void;
/** Handle keyboard input from nodes */
onKeydown(event: KeyboardEvent): void;
private setFocusedItem;
private shiftFocusVertically;
/** Shift the focus to a node in a sibling column */
private shiftFocusHorizontally;
/** Get a list of nodes that are in a given column */
private getNodesInColumn;
/** Sort the nodes based on the Y position */
private getNodesInOrder;
/** Determine whether or not there is a not that is tabbable */
private hasActiveNode;
static ɵfac: i0.ɵɵFactoryDeclaration<SankeyFocusManager<any>, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SankeyFocusManager<any>>;
}