UNPKG

right-angled

Version:

Lightweight and easy to use angular data grids. Integrates with your markup and styles rather than generating its own.

136 lines 4.91 kB
import { Pager } from '../../core/pager'; import { ListResponse } from '../../core/list-response'; import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; /** * Implements {@link Pager} contract and represents behavior of list with pages. * @note This type is configured to use with {@link FiltersService}. */ export declare class RTPagedPager implements Pager { /** * Global settings for properties such as default values and constraints for pager properties. * * These settings are static and their values are copied to the properties of the same name for each instance of {@link RTPagedPager} type. * * So, changing of this settings will affect all instances of {@link RTPagedPager} type that will be created after such changes. * If you want to change settings of concrete object you can use it the same name properties. */ static settings: { /** * @see {@link RTPagedPager.defaultPageSize} */ defaultPageSize: number; /** * @see {@link RTPagedPager.maxPageSize} */ maxPageSize: number; /** * @see {@link RTPagedPager.minPageSize} */ minPageSize: number; }; /** * @inheritdoc */ appendedOnLoad: boolean; /** * This is both initial value and value which will be applied to {@link pageSize} property on {@link reset} method execution. */ defaultPageSize: number; /** * The biggest value that can be applied to {@link pageSize} property. */ maxPageSize: number; /** * The smallest value that can be applied to {@link pageSize} property. */ minPageSize: number; /** * @inheritdoc */ totalCount: number; /** * @inheritdoc */ loadedCount: number; /** * Number of record in remote data source from which data was loaded at last request. * * For example, it will be equal to 21 when loads second page of list with page size of 20. */ displayFrom: number; /** * Number of record in remote data source to which data was loaded at last request. * * For example, it will be equal to 40 when loads second page of list with page size of 20. Or it will be equal to total count of available records if records count is less than 40. */ displayTo: number; pageNumber$: Observable<number>; pageSize$: Observable<number>; /** * Total pages count computed as {@link totalCount} / {@link pageSize}. * Used to check correctness of values applied to {@link pageNumber}. */ get pageCount(): number; /** * Specifies number of the page that must be loaded on next request. * * @note This property is ready to use with {@link FiltersService} since it has {@link filter} annotation. * @see {@link PagedListRequest.pageNumber} */ get pageNumber(): number; /** * Executes several checks. For example, it doesn't accept values bigger than {@link pageCount}. */ set pageNumber(value: number); /** * Specifies size of page that must be loaded on next request. * * @note This property is ready to use with {@link FiltersService} since it has {@link filter} annotation. * @see {@link PagedListRequest.pageSize} */ get pageSize(): number; /** * Executes several checks. For example, it doesn't accept values bigger than {@link maxPageSize}. */ set pageSize(value: number); /** * @inheritdoc */ processResponse(response: ListResponse<any> | any[]): void; /** * Returns `true` if it's possible to move pager to the previous page (e.g. currently pager is not on the first page). */ get canMoveBackward(): boolean; /** * Returns `true` if it's possible to move pager to the next page (e.g. currently pager is not on the last page). */ get canMoveForward(): boolean; /** * Sets {@link pageNumber} property to `1` if it's possible. * @returns `true` if {@link pageNumber} value was changed. */ tryMoveToFirstPage(): boolean; /** * Decrements {@link pageNumber} if it's possible. * @returns `true` if {@link pageNumber} value was changed. */ tryMoveToPreviousPage(): boolean; /** * Increments {@link pageNumber} if it's possible. * @returns `true` if {@link pageNumber} value was changed. */ tryMoveToNextPage(): boolean; /** * Sets {@link pageNumber} property to value of {@link pageCount} property if it's possible. * @returns `true` if {@link pageNumber} value was changed. */ tryMoveToLastPage(): boolean; /** * @inheritdoc */ reset(): void; static ɵfac: i0.ɵɵFactoryDeclaration<RTPagedPager, never>; static ɵprov: i0.ɵɵInjectableDeclaration<RTPagedPager>; } //# sourceMappingURL=paged-pager.d.ts.map