dual-list.component.d.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import { DoCheck, EventEmitter, IterableDiffers, OnChanges, SimpleChange } from '@angular/core';
  2. import { BasicList } from './basic-list';
  3. export declare type compareFunction = (a: any, b: any) => number;
  4. export declare class DualListComponent implements DoCheck, OnChanges {
  5. private differs;
  6. static AVAILABLE_LIST_NAME: string;
  7. static CONFIRMED_LIST_NAME: string;
  8. static LTR: string;
  9. static RTL: string;
  10. static DEFAULT_FORMAT: {
  11. add: string;
  12. remove: string;
  13. all: string;
  14. none: string;
  15. direction: string;
  16. draggable: boolean;
  17. locale: any;
  18. };
  19. id: string;
  20. key: string;
  21. display: any;
  22. height: string;
  23. filter: boolean;
  24. format: {
  25. add: string;
  26. remove: string;
  27. all: string;
  28. none: string;
  29. direction: string;
  30. draggable: boolean;
  31. locale: any;
  32. };
  33. sort: boolean;
  34. compare: compareFunction;
  35. disabled: boolean;
  36. source: Array<any>;
  37. destination: Array<any>;
  38. destinationChange: EventEmitter<{}>;
  39. available: BasicList;
  40. confirmed: BasicList;
  41. sourceDiffer: any;
  42. destinationDiffer: any;
  43. private sorter;
  44. constructor(differs: IterableDiffers);
  45. ngOnChanges(changeRecord: {
  46. [key: string]: SimpleChange;
  47. }): void;
  48. ngDoCheck(): void;
  49. buildAvailable(source: Array<any>): boolean;
  50. buildConfirmed(destination: Array<any>): boolean;
  51. updatedSource(): void;
  52. updatedDestination(): void;
  53. direction(): boolean;
  54. dragEnd(list?: BasicList): boolean;
  55. drag(event: DragEvent, item: any, list: BasicList): void;
  56. allowDrop(event: DragEvent, list: BasicList): boolean;
  57. dragLeave(): void;
  58. drop(event: DragEvent, list: BasicList): void;
  59. private trueUp;
  60. findItemIndex(list: Array<any>, item: any, key?: any): number;
  61. private makeUnavailable;
  62. moveItem(source: BasicList, target: BasicList, item?: any, trueup?: boolean): void;
  63. isItemSelected(list: Array<any>, item: any): boolean;
  64. shiftClick(event: MouseEvent, index: number, source: BasicList, item: any): void;
  65. selectItem(list: Array<any>, item: any): void;
  66. selectAll(source: BasicList): void;
  67. selectNone(source: BasicList): void;
  68. isAllSelected(source: BasicList): boolean;
  69. isAnySelected(source: BasicList): boolean;
  70. private unpick;
  71. clearFilter(source: BasicList): void;
  72. onFilter(source: BasicList): void;
  73. private makeId;
  74. protected makeName(item: any, separator?: string): string;
  75. }