UNPKG

@cloukit/pagination

Version:

68 lines (67 loc) 2.04 kB
/*! * @license MIT * Copyright (c) 2017 Bernhard Grünewaldt - codeclou.io * https://github.com/cloukit/legal */ import { EventEmitter, OnChanges } from '@angular/core'; import { CloukitComponentTheme, CloukitStatefulAndModifierAwareElementThemeStyleDefinition, CloukitThemeService } from '@cloukit/theme'; import { PaginationButtonClickEvent, PaginationButtonType, PaginationItem } from './pagination.model'; /** * Pagination Component. * * Just use this inside your templates: * * ```html * <cloukit-pagination ...></cloukit-pagination> * ``` */ export declare class CloukitPaginationComponent implements OnChanges { private themeService; /** * Optional theme selector. Only use `theme` when you have registered a valid theme * via the `CloukitThemeService` from [`@cloukit/theme`]{@link https://cloukit.github.io/#/component/theme}. */ theme: string; /** * Number of total Pages */ total: number; /** * Current Page */ current: number; /** * External way to disable the whole pagination e.g. * during loading external data */ disabled: boolean; /** * Optional Label for the "Next" button, defaults to "Next" */ labelNext: string; /** * Optional Label for the "Previous" button, defaults to "Prev" */ labelPrev: string; /** * Event emitted, when page is clicked. */ onPageSelect: EventEmitter<number>; themeSelected: CloukitComponentTheme; PaginationButtonType: typeof PaginationButtonType; state: { pages: any[]; }; constructor(themeService: CloukitThemeService); getStyle(element: string): CloukitStatefulAndModifierAwareElementThemeStyleDefinition; /** * @overrides OnChanges * @hidden */ ngOnChanges(): void; selectPage(event: PaginationButtonClickEvent): void; previousDummyPaginationItem(): PaginationItem; nextDummyPaginationItem(): PaginationItem; isPreviousPossible(): boolean; isNextPossible(): boolean; }