angular-dual-listbox
Version:
Angular dual listbox
76 lines (75 loc) • 2.52 kB
TypeScript
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;
};
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;
};
sort: boolean;
compare: compareFunction;
disabled: boolean;
source: Array<any>;
destination: Array<any>;
destinationChange: EventEmitter<any>;
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;
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;
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;
clearFilter(source: BasicList): void;
onFilter(source: BasicList): void;
private makeId;
protected makeName(item: any, separator?: string): string;
}