UNPKG

misanek-angular-dual-listbox

Version:

Angular 4+ component for a dual listbox control.

79 lines (78 loc) 2.76 kB
import { DoCheck, EventEmitter, IterableDiffers, OnChanges, SimpleChange } from '@angular/core'; import { BasicList } from './basic-list'; export declare type compareFunction = (a: any, b: any) => number; export declare class DualListComponent implements DoCheck, OnChanges { private differs; static AVAILABLE_LIST_NAME: string; static CONFIRMED_LIST_NAME: string; static LTR: string; static RTL: string; static DEFAULT_FORMAT: { add: string; remove: string; all: string; none: string; direction: string; draggable: boolean; locale: any; ctrl_click: boolean; }; id: string; key: string; display: any; height: string; filter: boolean; format: { add: string; remove: string; all: string; none: string; direction: string; draggable: boolean; locale: any; ctrl_click: boolean; }; sort: boolean; compare: compareFunction; disabled: boolean; source: Array<any>; destination: Array<any>; destinationChange: EventEmitter<{}>; available: BasicList; confirmed: BasicList; sourceDiffer: any; destinationDiffer: any; private sorter; constructor(differs: IterableDiffers); ngOnChanges(changeRecord: { [key: string]: SimpleChange; }): void; ngDoCheck(): void; buildAvailable(source: Array<any>): boolean; buildConfirmed(destination: Array<any>): boolean; updatedSource(): void; updatedDestination(): void; direction(): boolean; dragEnd(list?: BasicList): boolean; drag(event: DragEvent, item: any, list: BasicList): void; allowDrop(event: DragEvent, list: BasicList): boolean; dragLeave(): void; drop(event: DragEvent, list: BasicList): void; private trueUp(); findItemIndex(list: Array<any>, item: any, key?: any): number; private makeUnavailable(source, item); moveItem(source: BasicList, target: BasicList, item?: any, trueup?: boolean): void; isItemSelected(list: Array<any>, item: any): boolean; shiftClick(event: MouseEvent, index: number, source: BasicList, item: any): void; selectItemClick(event: MouseEvent, list: Array<any>, item: any): void; selectItem(list: Array<any>, item: any): void; selectAll(source: BasicList): void; selectNone(source: BasicList): void; isAllSelected(source: BasicList): boolean; isAnySelected(source: BasicList): boolean; private unpick(source); clearFilter(source: BasicList): void; onFilter(source: BasicList): void; private makeId(item); protected makeName(item: any, separator?: string): string; }