UNPKG

1.34 kBTypeScriptView Raw
1export interface ConfigModel {
2 align?: boolean;
3 boundaryLinks: boolean;
4 directionLinks: boolean;
5 firstText: string;
6 itemsPerPage: number;
7 lastText: string;
8 maxSize: number;
9 nextText: string;
10 pageBtnClass: string;
11 previousText: string;
12 rotate: boolean;
13}
14/**
15 * Contain information about the page
16 */
17export interface PagesModel {
18 /** Text, which is displayed in the link */
19 text: string;
20 /** Page number */
21 number: number;
22 /** If `true`, then this is the current page */
23 active: boolean;
24}
25export interface PagerModel {
26 itemsPerPage: number;
27 previousText: string;
28 nextText: string;
29 pageBtnClass: string;
30 align: boolean;
31}
32/**
33 * A context for the
34 * * `customPageTemplate`
35 * * `customNextTemplate`
36 * * `customPreviousTemplate`
37 * * `customFirstTemplate`
38 * * `customLastTemplate`
39 * inputs for link templates in case you want to override one
40 */
41export interface PaginationLinkContext {
42 /** The currently selected page number */
43 currentPage: number;
44 /** If `true`, the current link is disabled */
45 disabled: boolean;
46}
47/**
48 * A context for the `pageTemplate` inputs for link template
49 */
50export interface PaginationNumberLinkContext extends PaginationLinkContext {
51 /** Contain the page information */
52 $implicit: PagesModel;
53}