source: trip-planner-front/node_modules/@angular/material/paginator/paginator.d.ts@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 6.6 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
9import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, InjectionToken } from '@angular/core';
10import { MatPaginatorIntl } from './paginator-intl';
11import { HasInitialized, ThemePalette, CanDisable } from '@angular/material/core';
12import { MatFormFieldAppearance } from '@angular/material/form-field';
13/**
14 * Change event object that is emitted when the user selects a
15 * different page size or navigates to another page.
16 */
17export declare class PageEvent {
18 /** The current page index. */
19 pageIndex: number;
20 /**
21 * Index of the page that was selected previously.
22 * @breaking-change 8.0.0 To be made into a required property.
23 */
24 previousPageIndex?: number;
25 /** The current page size */
26 pageSize: number;
27 /** The current total number of items being paged */
28 length: number;
29}
30/** Object that can be used to configure the default options for the paginator module. */
31export interface MatPaginatorDefaultOptions {
32 /** Number of items to display on a page. By default set to 50. */
33 pageSize?: number;
34 /** The set of provided page size options to display to the user. */
35 pageSizeOptions?: number[];
36 /** Whether to hide the page size selection UI from the user. */
37 hidePageSize?: boolean;
38 /** Whether to show the first/last buttons UI to the user. */
39 showFirstLastButtons?: boolean;
40 /** The default form-field appearance to apply to the page size options selector. */
41 formFieldAppearance?: MatFormFieldAppearance;
42}
43/** Injection token that can be used to provide the default options for the paginator module. */
44export declare const MAT_PAGINATOR_DEFAULT_OPTIONS: InjectionToken<MatPaginatorDefaultOptions>;
45/** @docs-private */
46declare const _MatPaginatorMixinBase: import("@angular/material/core/common-behaviors/constructor").Constructor<CanDisable> & import("@angular/material/core/common-behaviors/constructor").AbstractConstructor<CanDisable> & import("@angular/material/core").HasInitializedCtor & {
47 new (): {};
48};
49/**
50 * Base class with all of the `MatPaginator` functionality.
51 * @docs-private
52 */
53export declare abstract class _MatPaginatorBase<O extends {
54 pageSize?: number;
55 pageSizeOptions?: number[];
56 hidePageSize?: boolean;
57 showFirstLastButtons?: boolean;
58}> extends _MatPaginatorMixinBase implements OnInit, OnDestroy, CanDisable, HasInitialized {
59 _intl: MatPaginatorIntl;
60 private _changeDetectorRef;
61 private _initialized;
62 private _intlChanges;
63 /** Theme color to be used for the underlying form controls. */
64 color: ThemePalette;
65 /** The zero-based page index of the displayed list of items. Defaulted to 0. */
66 get pageIndex(): number;
67 set pageIndex(value: number);
68 private _pageIndex;
69 /** The length of the total number of items that are being paginated. Defaulted to 0. */
70 get length(): number;
71 set length(value: number);
72 private _length;
73 /** Number of items to display on a page. By default set to 50. */
74 get pageSize(): number;
75 set pageSize(value: number);
76 private _pageSize;
77 /** The set of provided page size options to display to the user. */
78 get pageSizeOptions(): number[];
79 set pageSizeOptions(value: number[]);
80 private _pageSizeOptions;
81 /** Whether to hide the page size selection UI from the user. */
82 get hidePageSize(): boolean;
83 set hidePageSize(value: boolean);
84 private _hidePageSize;
85 /** Whether to show the first/last buttons UI to the user. */
86 get showFirstLastButtons(): boolean;
87 set showFirstLastButtons(value: boolean);
88 private _showFirstLastButtons;
89 /** Event emitted when the paginator changes the page size or page index. */
90 readonly page: EventEmitter<PageEvent>;
91 /** Displayed set of page size options. Will be sorted and include current page size. */
92 _displayedPageSizeOptions: number[];
93 constructor(_intl: MatPaginatorIntl, _changeDetectorRef: ChangeDetectorRef, defaults?: O);
94 ngOnInit(): void;
95 ngOnDestroy(): void;
96 /** Advances to the next page if it exists. */
97 nextPage(): void;
98 /** Move back to the previous page if it exists. */
99 previousPage(): void;
100 /** Move to the first page if not already there. */
101 firstPage(): void;
102 /** Move to the last page if not already there. */
103 lastPage(): void;
104 /** Whether there is a previous page. */
105 hasPreviousPage(): boolean;
106 /** Whether there is a next page. */
107 hasNextPage(): boolean;
108 /** Calculate the number of pages */
109 getNumberOfPages(): number;
110 /**
111 * Changes the page size so that the first item displayed on the page will still be
112 * displayed using the new page size.
113 *
114 * For example, if the page size is 10 and on the second page (items indexed 10-19) then
115 * switching so that the page size is 5 will set the third page as the current page so
116 * that the 10th item will still be displayed.
117 */
118 _changePageSize(pageSize: number): void;
119 /** Checks whether the buttons for going forwards should be disabled. */
120 _nextButtonsDisabled(): boolean;
121 /** Checks whether the buttons for going backwards should be disabled. */
122 _previousButtonsDisabled(): boolean;
123 /**
124 * Updates the list of page size options to display to the user. Includes making sure that
125 * the page size is an option and that the list is sorted.
126 */
127 private _updateDisplayedPageSizeOptions;
128 /** Emits an event notifying that a change of the paginator's properties has been triggered. */
129 private _emitPageEvent;
130 static ngAcceptInputType_pageIndex: NumberInput;
131 static ngAcceptInputType_length: NumberInput;
132 static ngAcceptInputType_pageSize: NumberInput;
133 static ngAcceptInputType_hidePageSize: BooleanInput;
134 static ngAcceptInputType_showFirstLastButtons: BooleanInput;
135 static ngAcceptInputType_disabled: BooleanInput;
136}
137/**
138 * Component to provide navigation between paged information. Displays the size of the current
139 * page, user-selectable options to change that size, what items are being shown, and
140 * navigational button to go to the previous or next page.
141 */
142export declare class MatPaginator extends _MatPaginatorBase<MatPaginatorDefaultOptions> {
143 /** If set, styles the "page size" form field with the designated style. */
144 _formFieldAppearance?: MatFormFieldAppearance;
145 constructor(intl: MatPaginatorIntl, changeDetectorRef: ChangeDetectorRef, defaults?: MatPaginatorDefaultOptions);
146}
147export {};
Note: See TracBrowser for help on using the repository browser.