import { FocusMonitor } from '@angular/cdk/a11y'; import { Directionality } from '@angular/cdk/bidi'; import * as i0 from '@angular/core'; import { InjectionToken, OnInit, AfterContentInit, AfterViewInit, OnDestroy, QueryList, ElementRef, EventEmitter, ChangeDetectorRef } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from '@aposin/ng-aquila/icon'; /** * Interface for providing custom labels in a simple pagination. * With an implementation you can localize your pagination with the NX_PAGINATION_TEXTS injection token. */ interface IPaginationTexts { /** Label that should replace 'previous'. */ previous: string; /** Label that should replace 'next'. */ next: string; /** * Label that should replace 'first'. * * Optional attribute needed only for the advanced pagination. */ first?: string; /** * Label that should replace 'last'. * * Optional attribute needed only for the advanced pagination. */ last?: string; /** Label that should replace 'of'. */ ofLabel: string; /** Label that should replace the aria label. */ ariaLabel: string; } declare const DefaultPaginationTexts: { previous: string; next: string; first: string; last: string; ofLabel: string; ariaLabel: string; }; /** InjectionToken for pagination that can be used to override default locale code. */ declare const NX_PAGINATION_TEXTS: InjectionToken; /** @docs-private */ declare class NxPaginationUtils { private readonly _pagesMobile; private readonly _elipsisText; private readonly _classExpanded; getSlides(totalSlides: number): any[]; getPages(currentPage: number, totalPages: number): Page[]; getMiddleArray(currentPage: number, totalPages: number): any[]; getEndArray(currentPage: number, totalPages: number): any[]; getStartArray(currentPage: number, totalPages: number): any[]; getMobilePages(currentPage: number, totalPages: number): any[]; private createPaginationItem; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** @docs-private */ interface Page { label: string; value: any; class: string; } declare class NxPaginationComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy { private readonly _dir; private readonly paginationUtilsService; private readonly _cdr; private readonly _focusMonitor; _linkElements: QueryList; /** Preserves the current value of the _linkElements ViewChildren in case _linkElements changes. */ _linkElementsPrevious: QueryList; /** @docs-private */ paginationTexts: IPaginationTexts; /** @docs-private */ totalNumberPages: number; private _ariaLabel; /** Sets the aria label on the nav element of the pagination. Use this to override the global aria-label from PaginationTexts. */ set ariaLabel(value: string); get ariaLabel(): string; /** Sets the current page. */ set page(value: number); get page(): number; private _page; /** Number of total items over all pages. */ set count(value: number); get count(): number; private _count; /** Sets the number of items you want to show per page. */ set perPage(value: number); get perPage(): number; private _perPage; /** * Determines the type of pagination. * * Values: simple | advanced | slider, default: simple. */ set type(value: string); get type(): string; private _type; /** An event emitted when the previous page button is clicked. */ readonly goPrev: EventEmitter; /** An event emitted when the next page button is clicked */ readonly goNext: EventEmitter; /** * An event emitted when a page number is clicked. * Provides the number of the page as parameter. */ readonly goPage: EventEmitter; private readonly _destroyed; constructor(paginationTexts: IPaginationTexts | null, _dir: Directionality | null, paginationUtilsService: NxPaginationUtils, _cdr: ChangeDetectorRef, _focusMonitor: FocusMonitor); ngOnInit(): void; ngAfterContentInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** Returns the number of the first page. */ getMin(): number; /** Returns the number of the last page. */ getMax(): number; /** Returns the total number of pages */ calculateTotalPages(): number; /** Directs to the page with number n. */ onPage(n: number): void; /** Directs to the previous page. */ onPrev(): void; /** Directs to the next page. */ onNext(): void; /** Directs to the first page. */ onFirst(): void; /** Directs to the last page. */ onLast(): void; /** Returns if the current page is the last page. */ lastPage(): boolean; /** @docs-private */ getSlides(): Page[]; /** @docs-private */ getPages(): Page[]; /** @docs-private */ getMobilePages(): Page[]; /** @docs-private */ getPaginationItemClasses(page: Page): object; /** @docs-private */ getPaginationNumberClasses(page: Page): object; /** Returns true, if `nxCount` is greater than 0, else false. */ isPaginationVisible(): boolean; /** Returns true, if `nxCount` is greater than 0 and the type of pagination is 'simple', else false. */ isPaginationCompactVisible(): boolean; /** Returns true, if `nxCount` is greater than 0 and the type of pagination is 'slider', else false. */ isPaginationSliderVisible(): boolean; /** @docs-private */ isPaginationContainerVisible(): boolean; _isPaginationPreviousDisabled(): boolean; _isPaginationNextDisabled(): boolean; _isPaginationSliderPreviousDisabled(): boolean; _isPaginationSliderNextDisabled(): boolean; get _isRTL(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxPaginationModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { DefaultPaginationTexts, NX_PAGINATION_TEXTS, NxPaginationComponent, NxPaginationModule, NxPaginationUtils }; export type { IPaginationTexts, Page };