import { EventEmitter } from "../../stencil-public-runtime"; import { A11yComponent, ThemeableComponent } from "../../common"; import { DuetTheme } from "../../common-types"; import { DuetLangObject } from "../../utils/language-utils"; import { DuetBreakpoints } from "../../utils/token-utils"; export type DuetPaginationPageEvent = { originalEvent?: Event; component: "duet-pagination"; current: number; take: number; from: number; to: number; type: "page" | "jump"; }; export type DuetPaginationVariation = "default" | "compact"; /** * @part navigation-arrow - this part enables style overrides for the navigation-arrow * @part navigation-jump - this part enables style overrides for the navigation-jump * @part navigation-overlay - this part enables style overrides for the navigation-overlay * @part navigation-section - this part enables style overrides for the navigation-section */ export declare class DuetPagination implements ThemeableComponent, A11yComponent { private listId; private nativeNav; private mq; processedPageLinks: string[]; numbersStore: string; matchesCompactBreakpoint: boolean; /** * Reference to host HTML element. */ element: HTMLElement; /** * State() variables * @internal */ totalPages: number; /** * State() variables * @internal */ internalSectionIndex: number; /** * Theme of the pagination. */ theme: DuetTheme; /** * Makes the controls of pagination component disabled. */ disabled: boolean; /** * Variation of the paginator (compact and default supported) */ variation: DuetPaginationVariation; /** * Described By id */ accessibleDescribedBy: string; /** * Details of the component */ accessibleDetails: string; /** * String of id's that indicate alternative labels elements */ accessibleLabelledBy: string; /** * Aria description the button */ accessibleDescription: string; /** * Default pagination labels */ accessibleLabelsDefaults: DuetLangObject; /** * Default pagination labels */ accessibleLabels: Record; /** * The size of the take, when paginating. */ take: number; /** * Amount of visible page numbers to show */ visibleItems: number; /** * The total size of the paginating data */ total: number; watchPropTotalHandler(): boolean; /** * Breakpoint at which the pagination should be rendered as compact with a select element */ compactBreakpoint: DuetBreakpoints | "none"; /** * Used to indicate which dom element with ID this element controls */ ariaControls: string; /** * The current page */ current: number; /** * Array of urls that are used to create page links */ pageLinks: string[] | string; watchStateHandler(newValue: number, oldValue: number): Promise; /** * Emitted a page selection has been made */ duetPageChange: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; private firstRenderDone; componentDidLoad(): void; componentWillRender(): void; componentDidRender(): void; handleMediaQueryChange: (mq: MediaQueryListEvent | MediaQueryList) => void; connectedCallback(): void; disconnectedCallback(): void; /** * Private methods. */ private refresh; private actionChain; private emitPageEvent; private calculatePageTake; private onMouseHandler; private onKeyboardDown; private getEnteredNumber; private setFocus; private pageClickHandler; private selectClickHandler; private sectionClickHandler; private jumpToStart; private jumpToEnd; private renderPageButton; private renderPageNumbers; private renderSelect; private shouldDisplayNavigation; /** * render() function * Always the last one in the class. */ render(): any; }