@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
71 lines (70 loc) • 2.33 kB
TypeScript
import { EventEmitter, VNode } from "../../stencil-public-runtime";
import { LoadableComponent } from "../../utils/loadable";
import { LocalizedComponent, NumberingSystem } from "../../utils/locale";
import { T9nComponent } from "../../utils/t9n";
import { Scale } from "../interfaces";
import { PaginationMessages } from "./assets/pagination/t9n";
export interface PaginationDetail {
start: number;
totalItems: number;
startItem: number;
}
export declare class Pagination implements LocalizedComponent, LocalizedComponent, LoadableComponent, T9nComponent {
/**
* When `true`, number values are displayed with a group separator corresponding to the language and country format.
*/
groupSeparator: boolean;
/**
* Use this property to override individual strings used by the component.
*/
messageOverrides: Partial<PaginationMessages>;
onMessagesChange(): void;
/** Specifies the number of items per page. */
pageSize: number;
/**
* Specifies the Unicode numeral system used by the component for localization.
*/
numberingSystem: NumberingSystem;
/** Specifies the starting item number. */
startItem: number;
/** Specifies the total number of items. */
totalItems: number;
/** Specifies the size of the component. */
scale: Scale;
el: HTMLCalcitePaginationElement;
defaultMessages: PaginationMessages;
effectiveLocale: string;
effectiveLocaleChange(): void;
effectiveLocaleWatcher(): void;
/**
* Made into a prop for testing purposes only
*
* @internal
*/
messages: PaginationMessages;
/**
* Emits when the selected page changes.
*/
calcitePaginationChange: EventEmitter<void>;
connectedCallback(): void;
componentWillLoad(): Promise<void>;
componentDidLoad(): void;
disconnectedCallback(): void;
/** Sets focus on the component's first focusable element. */
setFocus(): Promise<void>;
/** Go to the next page of results. */
nextPage(): Promise<void>;
/** Go to the previous page of results. */
previousPage(): Promise<void>;
private getLastStart;
private previousClicked;
private nextClicked;
private showLeftEllipsis;
private showRightEllipsis;
private emitUpdate;
renderPages(): VNode[];
renderPage(start: number): VNode;
renderLeftEllipsis(): VNode;
renderRightEllipsis(): VNode;
render(): VNode;
}