UNPKG

1.18 kBTypeScriptView Raw
1import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2import { Subscription } from 'rxjs';
3import { DataSource } from '../../lib/data-source/data-source';
4export declare class PagerComponent implements OnChanges {
5 source: DataSource;
6 perPageSelect: any[];
7 changePage: EventEmitter<any>;
8 currentPerPage: any;
9 protected pages: Array<any>;
10 protected page: number;
11 protected count: number;
12 protected perPage: number;
13 protected dataChangedSub: Subscription;
14 ngOnChanges(changes: SimpleChanges): void;
15 /**
16 * We change the page here depending on the action performed against data source
17 * if a new element was added to the end of the table - then change the page to the last
18 * if a new element was added to the beginning of the table - then to the first page
19 * @param changes
20 */
21 processPageChange(changes: any): void;
22 shouldShow(): boolean;
23 paginate(page: number): boolean;
24 next(): boolean;
25 prev(): boolean;
26 getPage(): number;
27 getPages(): Array<any>;
28 getLast(): number;
29 isPageOutOfBounce(): boolean;
30 initPages(): void;
31 onChangePerPage(event: any): void;
32}