import * as _angular_core from '@angular/core'; import { InjectionToken, Signal, TemplateRef, WritableSignal, ModelSignal, PipeTransform } from '@angular/core'; import { isTemplateRef } from 'ngx-tethys/util'; import { ThyI18nLocale, ThyPaginationLocale } from 'ngx-tethys/i18n'; import * as i1 from '@angular/common'; import * as i2 from '@angular/forms'; import * as i3 from 'ngx-tethys/shared'; import * as i4 from 'ngx-tethys/icon'; import * as i5 from 'ngx-tethys/select'; /** * 分页的配置 * @public * @order 20 */ interface ThyPaginationConfigModel { /** * 是否显示第一页和最后一页 */ boundaryLinks?: boolean; /** * 是否显示上一页和下一页 */ directionLinks?: boolean; /** * 设置默认每页显示条数 */ pageSize?: number; /** * 设置最大显示数量,超出最大显示数后会自动进行分割显示 */ maxCount?: number; rangeCount?: number; /** * 设置是否显示快速跳转 */ showQuickJumper?: boolean; /** * 设置是否显示总页数信息 */ showTotalPageCount?: boolean; /** * 第一页按钮显示文本 */ firstText?: string; /** * 最后一页按钮显示文本 */ lastText?: string; /** * 上一页显示文本 */ previousText?: string; /** * 下一页显示文本 */ nextText?: string; /** * 第一页按钮显示图标 */ firstIcon?: string; /** * 最后一页按钮显示图标 */ lastIcon?: string; /** * 上一页显示图标 */ previousIcon?: string; /** * 下一页显示图标 */ nextIcon?: string; /** * 设置总页数显示格式 */ totalPagesFormat?: string; showSizeChanger?: boolean; pageSizeOptions?: number[]; /** * 设置后缀单位 */ unit?: string; } interface ThyPaginationChangedEvent { event: Event; page: number; pageIndex: number; } declare const DEFAULT_RANGE_COUNT = 5; declare const PaginationDefaultConfig: ThyPaginationConfigModel; interface ThyPaginationConfig { main?: ThyPaginationConfigModel; } declare const THY_PAGINATION_CONFIG: InjectionToken; /** * 分页组件,当数据量过多时,使用分页分解数据。 * @name thy-pagination * @order 10 */ declare class ThyPagination { private paginationConfig; allLocale: Signal; paginationLocale: Signal; isTemplateRef: typeof isTemplateRef; /** * 设置当前页,支持双向绑定 * @default 1 */ readonly thyPageIndex: _angular_core.InputSignalWithTransform; /** * 每页条目数量 * @default 20 */ readonly thyPageSize: _angular_core.InputSignalWithTransform; /** * 数据总数 */ readonly thyTotal: _angular_core.InputSignalWithTransform; /** * 自定义分页页码,设置自定义分页页码后将不根据 Total 和 PageSize 来自动计算页码,完全以传入的页码为准 * @type number[] */ readonly thyCustomPages: _angular_core.InputSignal; /** * 是否禁用 */ readonly thyDisabled: _angular_core.InputSignalWithTransform; /** * 是否显示快速跳转 * @default false */ readonly thyShowQuickJumper: _angular_core.InputSignalWithTransform; /** * 设置是否显示总页数信息 * @default true */ readonly thyShowTotalPageCount: _angular_core.InputSignalWithTransform; /** * 设置分页组件的大小 * @type sm | md | lg * @default md */ readonly thySize: _angular_core.InputSignal<"sm" | "md" | "lg">; /** * 设置最大显示数量,超出最大显示数后会自动进行分割显示 * @default 9 */ readonly thyMaxCount: _angular_core.InputSignalWithTransform; /** * 设置边缘显示数量 * @default 2 */ readonly thyMarginalCount: _angular_core.InputSignalWithTransform; /** * 设置中间区域显示数量 * @default 5 */ readonly thyRangeCount: _angular_core.InputSignalWithTransform; /** * 是否显示分页大小选择器 * @default false */ readonly thyShowSizeChanger: _angular_core.InputSignalWithTransform; /** * @type number[] */ readonly thyPageSizeOptions: _angular_core.InputSignal; /** * 只有一页时是否隐藏分页器 * @default false */ readonly thyHideOnSinglePage: _angular_core.InputSignalWithTransform; /** * 分页器单位 * @default 条 */ readonly thyUnit: _angular_core.InputSignal; /** * 是否显示范围和total * @default false */ readonly thyShowTotal: _angular_core.InputSignal>; /** * 页码改变的回调 */ readonly thyPageIndexChange: _angular_core.OutputEmitterRef; /** * 与Bootstrap pagination 兼容,后续版本会进行删除,参数保持与 bootstrap 一致 */ readonly thyPageChanged: _angular_core.OutputEmitterRef<{ page: number; }>; readonly thyPageSizeChanged: _angular_core.OutputEmitterRef; currentPageIndex: WritableSignal; currentPageSize: WritableSignal; selectedPageSize: ModelSignal; firstIndex: number; computedConfig: Signal; marginalCount: Signal; computedPageCount: Signal; computedPages: Signal<{ index: number; text: string; active: boolean; }[]>; computedRange: Signal<{ from: number; to: number; }>; constructor(); private setPageIndex; private makePage; private pageChange; selectPage(pageIndex: number): void; jumpPage(input: HTMLInputElement): void; onPageSizeChange(event: number): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @private */ declare class PaginationTotalCountFormat implements PipeTransform { private sanitizer; transform(count: number, format: string): any; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵpipe: _angular_core.ɵɵPipeDeclaration; } declare class PaginationPerPageFormat implements PipeTransform { transform(unit: string, locale: ThyI18nLocale): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵpipe: _angular_core.ɵɵPipeDeclaration; } declare class ThyPaginationModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { DEFAULT_RANGE_COUNT, PaginationDefaultConfig, PaginationPerPageFormat, PaginationTotalCountFormat, THY_PAGINATION_CONFIG, ThyPagination, ThyPaginationModule }; export type { ThyPaginationChangedEvent, ThyPaginationConfig, ThyPaginationConfigModel };