pagination.service.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { EventEmitter } from '@angular/core';
  2. import { PaginationInstance } from './pagination-instance';
  3. export declare class PaginationService {
  4. change: EventEmitter<string>;
  5. private instances;
  6. private DEFAULT_ID;
  7. defaultId(): string;
  8. register(instance: PaginationInstance): void;
  9. /**
  10. * Check each property of the instance and update any that have changed. Return
  11. * true if any changes were made, else return false.
  12. */
  13. private updateInstance;
  14. /**
  15. * Returns the current page number.
  16. */
  17. getCurrentPage(id: string): number;
  18. /**
  19. * Sets the current page number.
  20. */
  21. setCurrentPage(id: string, page: number): void;
  22. /**
  23. * Sets the value of instance.totalItems
  24. */
  25. setTotalItems(id: string, totalItems: number): void;
  26. /**
  27. * Sets the value of instance.itemsPerPage.
  28. */
  29. setItemsPerPage(id: string, itemsPerPage: number): void;
  30. /**
  31. * Returns a clone of the pagination instance object matching the id. If no
  32. * id specified, returns the instance corresponding to the default id.
  33. */
  34. getInstance(id?: string): PaginationInstance;
  35. /**
  36. * Perform a shallow clone of an object.
  37. */
  38. private clone;
  39. }