import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough } from 'primeng/api'; import { InputNumberPassThrough } from 'primeng/types/inputnumber'; import { SelectPassThrough } from 'primeng/types/select'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Paginator.pt} * @group Interface */ interface PaginatorPassThroughOptions { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the content start's DOM element. */ contentStart?: PassThroughOption; /** * Used to pass attributes to the current page report's DOM element. */ current?: PassThroughOption; /** * Used to pass attributes to the first page button's DOM element. */ first?: PassThroughOption; /** * Used to pass attributes to the first page button icon's DOM element. */ firstIcon?: PassThroughOption; /** * Used to pass attributes to the previous page button's DOM element. */ prev?: PassThroughOption; /** * Used to pass attributes to the previous page button icon's DOM element. */ prevIcon?: PassThroughOption; /** * Used to pass attributes to the pages container's DOM element. */ pages?: PassThroughOption; /** * Used to pass attributes to the page button's DOM element. */ page?: PassThroughOption; /** * Used to pass attributes to the next page button's DOM element. */ next?: PassThroughOption; /** * Used to pass attributes to the next page button icon's DOM element. */ nextIcon?: PassThroughOption; /** * Used to pass attributes to the last page button's DOM element. */ last?: PassThroughOption; /** * Used to pass attributes to the last page button icon's DOM element. */ lastIcon?: PassThroughOption; /** * Used to pass attributes to the content end's DOM element. */ contentEnd?: PassThroughOption; /** * Used to pass attributes to the Select component (jump to page dropdown). */ pcJumpToPageDropdown?: SelectPassThrough; /** * Used to pass attributes to the InputNumber component (jump to page input). */ pcJumpToPageInput?: InputNumberPassThrough; /** * Used to pass attributes to the Select component (rows per page dropdown). */ pcRowPerPageDropdown?: SelectPassThrough; } /** * Defines valid pass-through options in Paginator. * @see {@link PaginatorPassThroughOptions} * * @template I Type of instance. */ type PaginatorPassThrough = PassThrough>; /** * Paginator state. * @group Interface */ interface PaginatorState { /** * Current page number. */ page?: number; /** * Index of the first record. */ first?: number; /** * Number of rows per page. */ rows?: number; /** * Total number of pages. */ pageCount?: number; /** * Total number of records. */ totalRecords?: number; } /** * Custom template context for left/right templates. * @group Interface */ interface PaginatorTemplateContext { /** * Paginator state. */ $implicit: PaginatorState; } /** * Custom template context for dropdown item templates. * @group Interface */ interface PaginatorDropdownItemTemplateContext { /** * Dropdown item instance. */ $implicit: any; } /** * Defines valid templates in PaginatorTemplates. * @group Templates */ interface PaginatorTemplates { /** * Custom dropdown trigger icon template. */ dropdownicon(): TemplateRef; /** * Custom first page link icon template. */ firstpagelinkicon(): TemplateRef; /** * Custom previous page link icon template. */ previouspagelinkicon(): TemplateRef; /** * Custom last page link icon template. */ lastpagelinkicon(): TemplateRef; /** * Custom next page link icon template. */ nextpagelinkicon(): TemplateRef; } export type { PaginatorDropdownItemTemplateContext, PaginatorPassThrough, PaginatorPassThroughOptions, PaginatorState, PaginatorTemplateContext, PaginatorTemplates };