interface.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { NzSafeAny } from 'ng-zorro-antd/core/types';
  6. export type TransferDirection = 'left' | 'right';
  7. export interface TransferItem {
  8. title: string;
  9. direction?: TransferDirection;
  10. disabled?: boolean;
  11. checked?: boolean;
  12. hide?: boolean;
  13. [key: string]: NzSafeAny;
  14. }
  15. export interface TransferCanMove {
  16. direction: TransferDirection;
  17. list: TransferItem[];
  18. }
  19. export interface TransferChange {
  20. from: TransferDirection;
  21. to: TransferDirection;
  22. list: TransferItem[];
  23. }
  24. export interface TransferSearchChange {
  25. direction: TransferDirection;
  26. value: string;
  27. }
  28. export interface TransferSelectChange {
  29. direction: TransferDirection;
  30. checked: boolean;
  31. list: TransferItem[];
  32. item?: TransferItem;
  33. }
  34. export interface TransferStat {
  35. checkAll: boolean;
  36. checkHalf: boolean;
  37. checkCount: number;
  38. shownCount: number;
  39. availableCount: number;
  40. }
  41. export interface RenderListContext {
  42. $implicit: TransferItem[];
  43. direction: TransferDirection;
  44. disabled: boolean;
  45. onItemSelectAll: (x: boolean) => void;
  46. onItemSelect: (x: TransferItem) => void;
  47. stat: TransferStat;
  48. }