-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathpaginator.d-82b71ef4.d.ts
executable file
·199 lines (196 loc) · 9.42 KB
/
paginator.d-82b71ef4.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
import * as i0 from '@angular/core';
import { Optional, InjectionToken, OnInit, OnDestroy, EventEmitter } from '@angular/core';
import { T as ThemePalette } from './palette.d-f5ca9a2b.js';
import { Subject, Observable } from 'rxjs';
import { g as MatFormFieldAppearance } from './form-field.d-e2081e20.js';
/**
* To modify the labels and text displayed, create a new instance of MatPaginatorIntl and
* include it in a custom provider
*/
declare class MatPaginatorIntl {
/**
* Stream to emit from when labels are changed. Use this to notify components when the labels have
* changed after initialization.
*/
readonly changes: Subject<void>;
/** A label for the page size selector. */
itemsPerPageLabel: string;
/** A label for the button that increments the current page. */
nextPageLabel: string;
/** A label for the button that decrements the current page. */
previousPageLabel: string;
/** A label for the button that moves to the first page. */
firstPageLabel: string;
/** A label for the button that moves to the last page. */
lastPageLabel: string;
/** A label for the range of items within the current page and the length of the whole list. */
getRangeLabel: (page: number, pageSize: number, length: number) => string;
static ɵfac: i0.ɵɵFactoryDeclaration<MatPaginatorIntl, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<MatPaginatorIntl>;
}
/**
* @docs-private
* @deprecated No longer used, will be removed.
* @breaking-change 21.0.0
*/
declare function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl): MatPaginatorIntl;
/**
* @docs-private
* @deprecated No longer used, will be removed.
* @breaking-change 21.0.0
*/
declare const MAT_PAGINATOR_INTL_PROVIDER: {
provide: typeof MatPaginatorIntl;
deps: Optional[][];
useFactory: typeof MAT_PAGINATOR_INTL_PROVIDER_FACTORY;
};
/** Object that can used to configure the underlying `MatSelect` inside a `MatPaginator`. */
interface MatPaginatorSelectConfig {
/** Whether to center the active option over the trigger. */
disableOptionCentering?: boolean;
/** Classes to be passed to the select panel. */
panelClass?: string | string[] | Set<string> | {
[key: string]: any;
};
}
/**
* Change event object that is emitted when the user selects a
* different page size or navigates to another page.
*/
declare class PageEvent {
/** The current page index. */
pageIndex: number;
/**
* Index of the page that was selected previously.
* @breaking-change 8.0.0 To be made into a required property.
*/
previousPageIndex?: number;
/** The current page size. */
pageSize: number;
/** The current total number of items being paged. */
length: number;
}
/** Object that can be used to configure the default options for the paginator module. */
interface MatPaginatorDefaultOptions {
/** Number of items to display on a page. By default set to 50. */
pageSize?: number;
/** The set of provided page size options to display to the user. */
pageSizeOptions?: number[];
/** Whether to hide the page size selection UI from the user. */
hidePageSize?: boolean;
/** Whether to show the first/last buttons UI to the user. */
showFirstLastButtons?: boolean;
/** The default form-field appearance to apply to the page size options selector. */
formFieldAppearance?: MatFormFieldAppearance;
}
/** Injection token that can be used to provide the default options for the paginator module. */
declare const MAT_PAGINATOR_DEFAULT_OPTIONS: InjectionToken<MatPaginatorDefaultOptions>;
/**
* Component to provide navigation between paged information. Displays the size of the current
* page, user-selectable options to change that size, what items are being shown, and
* navigational button to go to the previous or next page.
*/
declare class MatPaginator implements OnInit, OnDestroy {
_intl: MatPaginatorIntl;
private _changeDetectorRef;
/** If set, styles the "page size" form field with the designated style. */
_formFieldAppearance?: MatFormFieldAppearance;
/** ID for the DOM node containing the paginator's items per page label. */
readonly _pageSizeLabelId: string;
private _intlChanges;
private _isInitialized;
private _initializedStream;
/**
* Theme color of the underlying form controls. This API is supported in M2
* themes only,it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/paginator/styling.
*
* For information on applying color variants in M3, see
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
*/
color: ThemePalette;
/** The zero-based page index of the displayed list of items. Defaulted to 0. */
get pageIndex(): number;
set pageIndex(value: number);
private _pageIndex;
/** The length of the total number of items that are being paginated. Defaulted to 0. */
get length(): number;
set length(value: number);
private _length;
/** Number of items to display on a page. By default set to 50. */
get pageSize(): number;
set pageSize(value: number);
private _pageSize;
/** The set of provided page size options to display to the user. */
get pageSizeOptions(): number[];
set pageSizeOptions(value: number[] | readonly number[]);
private _pageSizeOptions;
/** Whether to hide the page size selection UI from the user. */
hidePageSize: boolean;
/** Whether to show the first/last buttons UI to the user. */
showFirstLastButtons: boolean;
/** Used to configure the underlying `MatSelect` inside the paginator. */
selectConfig: MatPaginatorSelectConfig;
/** Whether the paginator is disabled. */
disabled: boolean;
/** Event emitted when the paginator changes the page size or page index. */
readonly page: EventEmitter<PageEvent>;
/** Displayed set of page size options. Will be sorted and include current page size. */
_displayedPageSizeOptions: number[];
/** Emits when the paginator is initialized. */
initialized: Observable<void>;
/** Inserted by Angular inject() migration for backwards compatibility */
constructor(...args: unknown[]);
ngOnInit(): void;
ngOnDestroy(): void;
/** Advances to the next page if it exists. */
nextPage(): void;
/** Move back to the previous page if it exists. */
previousPage(): void;
/** Move to the first page if not already there. */
firstPage(): void;
/** Move to the last page if not already there. */
lastPage(): void;
/** Whether there is a previous page. */
hasPreviousPage(): boolean;
/** Whether there is a next page. */
hasNextPage(): boolean;
/** Calculate the number of pages */
getNumberOfPages(): number;
/**
* Changes the page size so that the first item displayed on the page will still be
* displayed using the new page size.
*
* For example, if the page size is 10 and on the second page (items indexed 10-19) then
* switching so that the page size is 5 will set the third page as the current page so
* that the 10th item will still be displayed.
*/
_changePageSize(pageSize: number): void;
/** Checks whether the buttons for going forwards should be disabled. */
_nextButtonsDisabled(): boolean;
/** Checks whether the buttons for going backwards should be disabled. */
_previousButtonsDisabled(): boolean;
/**
* Updates the list of page size options to display to the user. Includes making sure that
* the page size is an option and that the list is sorted.
*/
private _updateDisplayedPageSizeOptions;
/** Emits an event notifying that a change of the paginator's properties has been triggered. */
private _emitPageEvent;
/** Navigates to a specific page index. */
private _navigate;
/**
* Callback invoked when one of the navigation buttons is called.
* @param targetIndex Index to which the paginator should navigate.
* @param isDisabled Whether the button is disabled.
*/
protected _buttonClicked(targetIndex: number, isDisabled: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MatPaginator, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MatPaginator, "mat-paginator", ["matPaginator"], { "color": { "alias": "color"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "length": { "alias": "length"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; }; "selectConfig": { "alias": "selectConfig"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "page": "page"; }, never, never, true, never>;
static ngAcceptInputType_pageIndex: unknown;
static ngAcceptInputType_length: unknown;
static ngAcceptInputType_pageSize: unknown;
static ngAcceptInputType_hidePageSize: unknown;
static ngAcceptInputType_showFirstLastButtons: unknown;
static ngAcceptInputType_disabled: unknown;
}
export { MatPaginator as M, PageEvent as P, type MatPaginatorSelectConfig as a, type MatPaginatorDefaultOptions as b, MAT_PAGINATOR_DEFAULT_OPTIONS as c, MatPaginatorIntl as d, MAT_PAGINATOR_INTL_PROVIDER_FACTORY as e, MAT_PAGINATOR_INTL_PROVIDER as f };