paginator.es5.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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. */
  8. import { Injectable, Optional, SkipSelf, NgModule, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewEncapsulation, ɵɵdefineInjectable } from '@angular/core';
  9. import { Subject } from 'rxjs';
  10. import { __extends } from 'tslib';
  11. import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
  12. import { mixinInitialized, mixinDisabled } from '@angular/material/core';
  13. import { CommonModule } from '@angular/common';
  14. import { MatButtonModule } from '@angular/material/button';
  15. import { MatSelectModule } from '@angular/material/select';
  16. import { MatTooltipModule } from '@angular/material/tooltip';
  17. /**
  18. * @fileoverview added by tsickle
  19. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  20. */
  21. /**
  22. * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and
  23. * include it in a custom provider
  24. */
  25. var MatPaginatorIntl = /** @class */ (function () {
  26. function MatPaginatorIntl() {
  27. /**
  28. * Stream to emit from when labels are changed. Use this to notify components when the labels have
  29. * changed after initialization.
  30. */
  31. this.changes = new Subject();
  32. /**
  33. * A label for the page size selector.
  34. */
  35. this.itemsPerPageLabel = 'Items per page:';
  36. /**
  37. * A label for the button that increments the current page.
  38. */
  39. this.nextPageLabel = 'Next page';
  40. /**
  41. * A label for the button that decrements the current page.
  42. */
  43. this.previousPageLabel = 'Previous page';
  44. /**
  45. * A label for the button that moves to the first page.
  46. */
  47. this.firstPageLabel = 'First page';
  48. /**
  49. * A label for the button that moves to the last page.
  50. */
  51. this.lastPageLabel = 'Last page';
  52. /**
  53. * A label for the range of items within the current page and the length of the whole list.
  54. */
  55. this.getRangeLabel = (/**
  56. * @param {?} page
  57. * @param {?} pageSize
  58. * @param {?} length
  59. * @return {?}
  60. */
  61. function (page, pageSize, length) {
  62. if (length == 0 || pageSize == 0) {
  63. return "0 of " + length;
  64. }
  65. length = Math.max(length, 0);
  66. /** @type {?} */
  67. var startIndex = page * pageSize;
  68. // If the start index exceeds the list length, do not try and fix the end index to the end.
  69. /** @type {?} */
  70. var endIndex = startIndex < length ?
  71. Math.min(startIndex + pageSize, length) :
  72. startIndex + pageSize;
  73. return startIndex + 1 + " - " + endIndex + " of " + length;
  74. });
  75. }
  76. MatPaginatorIntl.decorators = [
  77. { type: Injectable, args: [{ providedIn: 'root' },] },
  78. ];
  79. /** @nocollapse */ MatPaginatorIntl.ngInjectableDef = ɵɵdefineInjectable({ factory: function MatPaginatorIntl_Factory() { return new MatPaginatorIntl(); }, token: MatPaginatorIntl, providedIn: "root" });
  80. return MatPaginatorIntl;
  81. }());
  82. /**
  83. * \@docs-private
  84. * @param {?} parentIntl
  85. * @return {?}
  86. */
  87. function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl) {
  88. return parentIntl || new MatPaginatorIntl();
  89. }
  90. /**
  91. * \@docs-private
  92. * @type {?}
  93. */
  94. var MAT_PAGINATOR_INTL_PROVIDER = {
  95. // If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.
  96. provide: MatPaginatorIntl,
  97. deps: [[new Optional(), new SkipSelf(), MatPaginatorIntl]],
  98. useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY
  99. };
  100. /**
  101. * @fileoverview added by tsickle
  102. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  103. */
  104. /**
  105. * The default page size if there is no page size and there are no provided page size options.
  106. * @type {?}
  107. */
  108. var DEFAULT_PAGE_SIZE = 50;
  109. /**
  110. * Change event object that is emitted when the user selects a
  111. * different page size or navigates to another page.
  112. */
  113. var /**
  114. * Change event object that is emitted when the user selects a
  115. * different page size or navigates to another page.
  116. */
  117. PageEvent = /** @class */ (function () {
  118. function PageEvent() {
  119. }
  120. return PageEvent;
  121. }());
  122. // Boilerplate for applying mixins to MatPaginator.
  123. /**
  124. * \@docs-private
  125. */
  126. var
  127. // Boilerplate for applying mixins to MatPaginator.
  128. /**
  129. * \@docs-private
  130. */
  131. MatPaginatorBase = /** @class */ (function () {
  132. function MatPaginatorBase() {
  133. }
  134. return MatPaginatorBase;
  135. }());
  136. /** @type {?} */
  137. var _MatPaginatorBase = mixinDisabled(mixinInitialized(MatPaginatorBase));
  138. /**
  139. * Component to provide navigation between paged information. Displays the size of the current
  140. * page, user-selectable options to change that size, what items are being shown, and
  141. * navigational button to go to the previous or next page.
  142. */
  143. var MatPaginator = /** @class */ (function (_super) {
  144. __extends(MatPaginator, _super);
  145. function MatPaginator(_intl, _changeDetectorRef) {
  146. var _this = _super.call(this) || this;
  147. _this._intl = _intl;
  148. _this._changeDetectorRef = _changeDetectorRef;
  149. _this._pageIndex = 0;
  150. _this._length = 0;
  151. _this._pageSizeOptions = [];
  152. _this._hidePageSize = false;
  153. _this._showFirstLastButtons = false;
  154. /**
  155. * Event emitted when the paginator changes the page size or page index.
  156. */
  157. _this.page = new EventEmitter();
  158. _this._intlChanges = _intl.changes.subscribe((/**
  159. * @return {?}
  160. */
  161. function () { return _this._changeDetectorRef.markForCheck(); }));
  162. return _this;
  163. }
  164. Object.defineProperty(MatPaginator.prototype, "pageIndex", {
  165. /** The zero-based page index of the displayed list of items. Defaulted to 0. */
  166. get: /**
  167. * The zero-based page index of the displayed list of items. Defaulted to 0.
  168. * @return {?}
  169. */
  170. function () { return this._pageIndex; },
  171. set: /**
  172. * @param {?} value
  173. * @return {?}
  174. */
  175. function (value) {
  176. this._pageIndex = Math.max(coerceNumberProperty(value), 0);
  177. this._changeDetectorRef.markForCheck();
  178. },
  179. enumerable: true,
  180. configurable: true
  181. });
  182. Object.defineProperty(MatPaginator.prototype, "length", {
  183. /** The length of the total number of items that are being paginated. Defaulted to 0. */
  184. get: /**
  185. * The length of the total number of items that are being paginated. Defaulted to 0.
  186. * @return {?}
  187. */
  188. function () { return this._length; },
  189. set: /**
  190. * @param {?} value
  191. * @return {?}
  192. */
  193. function (value) {
  194. this._length = coerceNumberProperty(value);
  195. this._changeDetectorRef.markForCheck();
  196. },
  197. enumerable: true,
  198. configurable: true
  199. });
  200. Object.defineProperty(MatPaginator.prototype, "pageSize", {
  201. /** Number of items to display on a page. By default set to 50. */
  202. get: /**
  203. * Number of items to display on a page. By default set to 50.
  204. * @return {?}
  205. */
  206. function () { return this._pageSize; },
  207. set: /**
  208. * @param {?} value
  209. * @return {?}
  210. */
  211. function (value) {
  212. this._pageSize = Math.max(coerceNumberProperty(value), 0);
  213. this._updateDisplayedPageSizeOptions();
  214. },
  215. enumerable: true,
  216. configurable: true
  217. });
  218. Object.defineProperty(MatPaginator.prototype, "pageSizeOptions", {
  219. /** The set of provided page size options to display to the user. */
  220. get: /**
  221. * The set of provided page size options to display to the user.
  222. * @return {?}
  223. */
  224. function () { return this._pageSizeOptions; },
  225. set: /**
  226. * @param {?} value
  227. * @return {?}
  228. */
  229. function (value) {
  230. this._pageSizeOptions = (value || []).map((/**
  231. * @param {?} p
  232. * @return {?}
  233. */
  234. function (p) { return coerceNumberProperty(p); }));
  235. this._updateDisplayedPageSizeOptions();
  236. },
  237. enumerable: true,
  238. configurable: true
  239. });
  240. Object.defineProperty(MatPaginator.prototype, "hidePageSize", {
  241. /** Whether to hide the page size selection UI from the user. */
  242. get: /**
  243. * Whether to hide the page size selection UI from the user.
  244. * @return {?}
  245. */
  246. function () { return this._hidePageSize; },
  247. set: /**
  248. * @param {?} value
  249. * @return {?}
  250. */
  251. function (value) {
  252. this._hidePageSize = coerceBooleanProperty(value);
  253. },
  254. enumerable: true,
  255. configurable: true
  256. });
  257. Object.defineProperty(MatPaginator.prototype, "showFirstLastButtons", {
  258. /** Whether to show the first/last buttons UI to the user. */
  259. get: /**
  260. * Whether to show the first/last buttons UI to the user.
  261. * @return {?}
  262. */
  263. function () { return this._showFirstLastButtons; },
  264. set: /**
  265. * @param {?} value
  266. * @return {?}
  267. */
  268. function (value) {
  269. this._showFirstLastButtons = coerceBooleanProperty(value);
  270. },
  271. enumerable: true,
  272. configurable: true
  273. });
  274. /**
  275. * @return {?}
  276. */
  277. MatPaginator.prototype.ngOnInit = /**
  278. * @return {?}
  279. */
  280. function () {
  281. this._initialized = true;
  282. this._updateDisplayedPageSizeOptions();
  283. this._markInitialized();
  284. };
  285. /**
  286. * @return {?}
  287. */
  288. MatPaginator.prototype.ngOnDestroy = /**
  289. * @return {?}
  290. */
  291. function () {
  292. this._intlChanges.unsubscribe();
  293. };
  294. /** Advances to the next page if it exists. */
  295. /**
  296. * Advances to the next page if it exists.
  297. * @return {?}
  298. */
  299. MatPaginator.prototype.nextPage = /**
  300. * Advances to the next page if it exists.
  301. * @return {?}
  302. */
  303. function () {
  304. if (!this.hasNextPage()) {
  305. return;
  306. }
  307. /** @type {?} */
  308. var previousPageIndex = this.pageIndex;
  309. this.pageIndex++;
  310. this._emitPageEvent(previousPageIndex);
  311. };
  312. /** Move back to the previous page if it exists. */
  313. /**
  314. * Move back to the previous page if it exists.
  315. * @return {?}
  316. */
  317. MatPaginator.prototype.previousPage = /**
  318. * Move back to the previous page if it exists.
  319. * @return {?}
  320. */
  321. function () {
  322. if (!this.hasPreviousPage()) {
  323. return;
  324. }
  325. /** @type {?} */
  326. var previousPageIndex = this.pageIndex;
  327. this.pageIndex--;
  328. this._emitPageEvent(previousPageIndex);
  329. };
  330. /** Move to the first page if not already there. */
  331. /**
  332. * Move to the first page if not already there.
  333. * @return {?}
  334. */
  335. MatPaginator.prototype.firstPage = /**
  336. * Move to the first page if not already there.
  337. * @return {?}
  338. */
  339. function () {
  340. // hasPreviousPage being false implies at the start
  341. if (!this.hasPreviousPage()) {
  342. return;
  343. }
  344. /** @type {?} */
  345. var previousPageIndex = this.pageIndex;
  346. this.pageIndex = 0;
  347. this._emitPageEvent(previousPageIndex);
  348. };
  349. /** Move to the last page if not already there. */
  350. /**
  351. * Move to the last page if not already there.
  352. * @return {?}
  353. */
  354. MatPaginator.prototype.lastPage = /**
  355. * Move to the last page if not already there.
  356. * @return {?}
  357. */
  358. function () {
  359. // hasNextPage being false implies at the end
  360. if (!this.hasNextPage()) {
  361. return;
  362. }
  363. /** @type {?} */
  364. var previousPageIndex = this.pageIndex;
  365. this.pageIndex = this.getNumberOfPages() - 1;
  366. this._emitPageEvent(previousPageIndex);
  367. };
  368. /** Whether there is a previous page. */
  369. /**
  370. * Whether there is a previous page.
  371. * @return {?}
  372. */
  373. MatPaginator.prototype.hasPreviousPage = /**
  374. * Whether there is a previous page.
  375. * @return {?}
  376. */
  377. function () {
  378. return this.pageIndex >= 1 && this.pageSize != 0;
  379. };
  380. /** Whether there is a next page. */
  381. /**
  382. * Whether there is a next page.
  383. * @return {?}
  384. */
  385. MatPaginator.prototype.hasNextPage = /**
  386. * Whether there is a next page.
  387. * @return {?}
  388. */
  389. function () {
  390. /** @type {?} */
  391. var maxPageIndex = this.getNumberOfPages() - 1;
  392. return this.pageIndex < maxPageIndex && this.pageSize != 0;
  393. };
  394. /** Calculate the number of pages */
  395. /**
  396. * Calculate the number of pages
  397. * @return {?}
  398. */
  399. MatPaginator.prototype.getNumberOfPages = /**
  400. * Calculate the number of pages
  401. * @return {?}
  402. */
  403. function () {
  404. if (!this.pageSize) {
  405. return 0;
  406. }
  407. return Math.ceil(this.length / this.pageSize);
  408. };
  409. /**
  410. * Changes the page size so that the first item displayed on the page will still be
  411. * displayed using the new page size.
  412. *
  413. * For example, if the page size is 10 and on the second page (items indexed 10-19) then
  414. * switching so that the page size is 5 will set the third page as the current page so
  415. * that the 10th item will still be displayed.
  416. */
  417. /**
  418. * Changes the page size so that the first item displayed on the page will still be
  419. * displayed using the new page size.
  420. *
  421. * For example, if the page size is 10 and on the second page (items indexed 10-19) then
  422. * switching so that the page size is 5 will set the third page as the current page so
  423. * that the 10th item will still be displayed.
  424. * @param {?} pageSize
  425. * @return {?}
  426. */
  427. MatPaginator.prototype._changePageSize = /**
  428. * Changes the page size so that the first item displayed on the page will still be
  429. * displayed using the new page size.
  430. *
  431. * For example, if the page size is 10 and on the second page (items indexed 10-19) then
  432. * switching so that the page size is 5 will set the third page as the current page so
  433. * that the 10th item will still be displayed.
  434. * @param {?} pageSize
  435. * @return {?}
  436. */
  437. function (pageSize) {
  438. // Current page needs to be updated to reflect the new page size. Navigate to the page
  439. // containing the previous page's first item.
  440. /** @type {?} */
  441. var startIndex = this.pageIndex * this.pageSize;
  442. /** @type {?} */
  443. var previousPageIndex = this.pageIndex;
  444. this.pageIndex = Math.floor(startIndex / pageSize) || 0;
  445. this.pageSize = pageSize;
  446. this._emitPageEvent(previousPageIndex);
  447. };
  448. /** Checks whether the buttons for going forwards should be disabled. */
  449. /**
  450. * Checks whether the buttons for going forwards should be disabled.
  451. * @return {?}
  452. */
  453. MatPaginator.prototype._nextButtonsDisabled = /**
  454. * Checks whether the buttons for going forwards should be disabled.
  455. * @return {?}
  456. */
  457. function () {
  458. return this.disabled || !this.hasNextPage();
  459. };
  460. /** Checks whether the buttons for going backwards should be disabled. */
  461. /**
  462. * Checks whether the buttons for going backwards should be disabled.
  463. * @return {?}
  464. */
  465. MatPaginator.prototype._previousButtonsDisabled = /**
  466. * Checks whether the buttons for going backwards should be disabled.
  467. * @return {?}
  468. */
  469. function () {
  470. return this.disabled || !this.hasPreviousPage();
  471. };
  472. /**
  473. * Updates the list of page size options to display to the user. Includes making sure that
  474. * the page size is an option and that the list is sorted.
  475. */
  476. /**
  477. * Updates the list of page size options to display to the user. Includes making sure that
  478. * the page size is an option and that the list is sorted.
  479. * @private
  480. * @return {?}
  481. */
  482. MatPaginator.prototype._updateDisplayedPageSizeOptions = /**
  483. * Updates the list of page size options to display to the user. Includes making sure that
  484. * the page size is an option and that the list is sorted.
  485. * @private
  486. * @return {?}
  487. */
  488. function () {
  489. if (!this._initialized) {
  490. return;
  491. }
  492. // If no page size is provided, use the first page size option or the default page size.
  493. if (!this.pageSize) {
  494. this._pageSize = this.pageSizeOptions.length != 0 ?
  495. this.pageSizeOptions[0] :
  496. DEFAULT_PAGE_SIZE;
  497. }
  498. this._displayedPageSizeOptions = this.pageSizeOptions.slice();
  499. if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {
  500. this._displayedPageSizeOptions.push(this.pageSize);
  501. }
  502. // Sort the numbers using a number-specific sort function.
  503. this._displayedPageSizeOptions.sort((/**
  504. * @param {?} a
  505. * @param {?} b
  506. * @return {?}
  507. */
  508. function (a, b) { return a - b; }));
  509. this._changeDetectorRef.markForCheck();
  510. };
  511. /** Emits an event notifying that a change of the paginator's properties has been triggered. */
  512. /**
  513. * Emits an event notifying that a change of the paginator's properties has been triggered.
  514. * @private
  515. * @param {?} previousPageIndex
  516. * @return {?}
  517. */
  518. MatPaginator.prototype._emitPageEvent = /**
  519. * Emits an event notifying that a change of the paginator's properties has been triggered.
  520. * @private
  521. * @param {?} previousPageIndex
  522. * @return {?}
  523. */
  524. function (previousPageIndex) {
  525. this.page.emit({
  526. previousPageIndex: previousPageIndex,
  527. pageIndex: this.pageIndex,
  528. pageSize: this.pageSize,
  529. length: this.length
  530. });
  531. };
  532. MatPaginator.decorators = [
  533. { type: Component, args: [{selector: 'mat-paginator',
  534. exportAs: 'matPaginator',
  535. template: "<div class=\"mat-paginator-outer-container\"><div class=\"mat-paginator-container\"><div class=\"mat-paginator-page-size\" *ngIf=\"!hidePageSize\"><div class=\"mat-paginator-page-size-label\">{{_intl.itemsPerPageLabel}}</div><mat-form-field *ngIf=\"_displayedPageSizeOptions.length > 1\" [color]=\"color\" class=\"mat-paginator-page-size-select\"><mat-select [value]=\"pageSize\" [disabled]=\"disabled\" [aria-label]=\"_intl.itemsPerPageLabel\" (selectionChange)=\"_changePageSize($event.value)\"><mat-option *ngFor=\"let pageSizeOption of _displayedPageSizeOptions\" [value]=\"pageSizeOption\">{{pageSizeOption}}</mat-option></mat-select></mat-form-field><div *ngIf=\"_displayedPageSizeOptions.length <= 1\">{{pageSize}}</div></div><div class=\"mat-paginator-range-actions\"><div class=\"mat-paginator-range-label\">{{_intl.getRangeLabel(pageIndex, pageSize, length)}}</div><button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-first\" (click)=\"firstPage()\" [attr.aria-label]=\"_intl.firstPageLabel\" [matTooltip]=\"_intl.firstPageLabel\" [matTooltipDisabled]=\"_previousButtonsDisabled()\" [matTooltipPosition]=\"'above'\" [disabled]=\"_previousButtonsDisabled()\" *ngIf=\"showFirstLastButtons\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-previous\" (click)=\"previousPage()\" [attr.aria-label]=\"_intl.previousPageLabel\" [matTooltip]=\"_intl.previousPageLabel\" [matTooltipDisabled]=\"_previousButtonsDisabled()\" [matTooltipPosition]=\"'above'\" [disabled]=\"_previousButtonsDisabled()\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-next\" (click)=\"nextPage()\" [attr.aria-label]=\"_intl.nextPageLabel\" [matTooltip]=\"_intl.nextPageLabel\" [matTooltipDisabled]=\"_nextButtonsDisabled()\" [matTooltipPosition]=\"'above'\" [disabled]=\"_nextButtonsDisabled()\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg></button> <button mat-icon-button type=\"button\" class=\"mat-paginator-navigation-last\" (click)=\"lastPage()\" [attr.aria-label]=\"_intl.lastPageLabel\" [matTooltip]=\"_intl.lastPageLabel\" [matTooltipDisabled]=\"_nextButtonsDisabled()\" [matTooltipPosition]=\"'above'\" [disabled]=\"_nextButtonsDisabled()\" *ngIf=\"showFirstLastButtons\"><svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\"><path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/></svg></button></div></div></div>",
  536. styles: [".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}"],
  537. inputs: ['disabled'],
  538. host: {
  539. 'class': 'mat-paginator',
  540. },
  541. changeDetection: ChangeDetectionStrategy.OnPush,
  542. encapsulation: ViewEncapsulation.None,
  543. },] },
  544. ];
  545. /** @nocollapse */
  546. MatPaginator.ctorParameters = function () { return [
  547. { type: MatPaginatorIntl },
  548. { type: ChangeDetectorRef }
  549. ]; };
  550. MatPaginator.propDecorators = {
  551. color: [{ type: Input }],
  552. pageIndex: [{ type: Input }],
  553. length: [{ type: Input }],
  554. pageSize: [{ type: Input }],
  555. pageSizeOptions: [{ type: Input }],
  556. hidePageSize: [{ type: Input }],
  557. showFirstLastButtons: [{ type: Input }],
  558. page: [{ type: Output }]
  559. };
  560. return MatPaginator;
  561. }(_MatPaginatorBase));
  562. /**
  563. * @fileoverview added by tsickle
  564. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  565. */
  566. var MatPaginatorModule = /** @class */ (function () {
  567. function MatPaginatorModule() {
  568. }
  569. MatPaginatorModule.decorators = [
  570. { type: NgModule, args: [{
  571. imports: [
  572. CommonModule,
  573. MatButtonModule,
  574. MatSelectModule,
  575. MatTooltipModule,
  576. ],
  577. exports: [MatPaginator],
  578. declarations: [MatPaginator],
  579. providers: [MAT_PAGINATOR_INTL_PROVIDER],
  580. },] },
  581. ];
  582. return MatPaginatorModule;
  583. }());
  584. /**
  585. * @fileoverview added by tsickle
  586. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  587. */
  588. /**
  589. * @fileoverview added by tsickle
  590. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  591. */
  592. export { MatPaginatorModule, PageEvent, MatPaginator, MAT_PAGINATOR_INTL_PROVIDER_FACTORY, MatPaginatorIntl, MAT_PAGINATOR_INTL_PROVIDER };
  593. //# sourceMappingURL=paginator.es5.js.map