UNPKG

1.24 kBTypeScriptView Raw
1import { QueryList, ElementRef, AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
2import * as i0 from "@angular/core";
3/**
4 * List pager directive
5 *
6 * Directive allows you to determine page of currently viewing items.
7 *
8 */
9export declare class NbListPageTrackerDirective implements AfterViewInit, OnDestroy {
10 private destroy$;
11 private observer;
12 private currentPage;
13 /**
14 * Items per page.
15 */
16 pageSize: number;
17 /**
18 * Page to start counting with.
19 */
20 startPage: number;
21 /**
22 * Emits when another page become visible.
23 */
24 pageChange: EventEmitter<number>;
25 listItems: QueryList<ElementRef>;
26 constructor();
27 ngAfterViewInit(): void;
28 ngOnDestroy(): void;
29 private observeItems;
30 private checkForPageChange;
31 private findMostVisiblePage;
32 private elementIndex;
33 static ɵfac: i0.ɵɵFactoryDeclaration<NbListPageTrackerDirective, never>;
34 static ɵdir: i0.ɵɵDirectiveDeclaration<NbListPageTrackerDirective, "[nbListPageTracker]", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "startPage": { "alias": "startPage"; "required": false; }; }, { "pageChange": "pageChange"; }, ["listItems"], never, false, never>;
35}