import * as React from 'react'; import { StandardProps } from '../../common'; import { PaginationBarSizeChangedEvent, PaginationBarPageChangedEvent } from '../PaginationBar'; export interface PaginationChangeEvent { /** * The current page index. */ value: number; } export interface PaginationSizeChangeEvent { /** * The current item size per page. */ value: number; } export interface PaginationState { current: number; size: number; } export interface PaginationRenderEvent { /** * The current page index. */ current: number; /** * The minimum index for the entry to be in the current page. */ min: number; /** * The maximum index for the entry to be in the current page. */ max: number; /** * The total number of entries. */ count: number; /** * The rendered entries. */ content: React.ReactNode; /** * Callback for emitting an items per page change. */ sizeChanged(e: PaginationBarSizeChangedEvent): void; /** * Callback for emitting a change of the current page index. */ pageChanged(e: PaginationBarPageChangedEvent): void; } export interface PaginationProps extends StandardProps { /** * The initial, i.e., default, page index used in managed mode. */ defaultValue?: number; /** * The current page index leading to controlled mode. */ value?: number; /** * The maximum number of entries per page. By default set to 20. * @default 20 */ size?: number | Array; /** * The optional host element to be used. */ host?: string | React.ComponentClass | React.StatelessComponent; /** * Event fired when the selected page changes. */ onChange?(e: PaginationChangeEvent): void; /** * Event fired when the size per page changes. */ onSizeChanged?(e: PaginationSizeChangeEvent): void; /** * The optional footer info label override, e.g., for localization. */ label?: string; /** * Optional function to compute the items info label. * @param start The inclusive start number of entries. * @param end The inclusive end number of entries. * @param total The total number of pages. */ itemsInfo?(start: number, end: number, total: number): React.ReactChild; /** * Optional function to compute the pages info label. * @param start The inclusive start number of entries. * @param end The inclusive end number of entries. */ pagesInfo?(start: number, end: number): React.ReactChild; /** * Callback to override the rendering of the pagination. */ render?(e: PaginationRenderEvent): React.ReactNode; /** * The content of the component. Will be cropped if pagination applies. */ children?: React.ReactNode; } /** * The Pagination component allows generic pagination of arbitrary components. */ export declare class Pagination extends React.Component { constructor(props: PaginationProps); static getDerivedStateFromProps(props: PaginationProps, state: PaginationState): PaginationState | { current: number; }; private handlePageChange; private handleSizeChange; private getDim; render(): React.ReactNode; static inner: { readonly PaginationLayout: React.SFC & { inner: { readonly RootContainer: any; }; }; }; }