material-paginator.umd.js 25 KB

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