ngx-bootstrap-pagination.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. import { Injectable, forwardRef, EventEmitter, Component, ElementRef, ChangeDetectorRef, Input, Output, NgModule } from '@angular/core';
  2. import { NG_VALUE_ACCESSOR } from '@angular/forms';
  3. import { CommonModule } from '@angular/common';
  4. /**
  5. * @fileoverview added by tsickle
  6. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7. */
  8. /**
  9. * Provides default values for Pagination and pager components
  10. */
  11. class PaginationConfig {
  12. constructor() {
  13. this.main = {
  14. maxSize: void 0,
  15. itemsPerPage: 10,
  16. boundaryLinks: false,
  17. directionLinks: true,
  18. firstText: 'First',
  19. previousText: 'Previous',
  20. nextText: 'Next',
  21. lastText: 'Last',
  22. pageBtnClass: '',
  23. rotate: true
  24. };
  25. this.pager = {
  26. itemsPerPage: 15,
  27. previousText: '« Previous',
  28. nextText: 'Next »',
  29. pageBtnClass: '',
  30. align: true
  31. };
  32. }
  33. }
  34. PaginationConfig.decorators = [
  35. { type: Injectable }
  36. ];
  37. /**
  38. * @fileoverview added by tsickle
  39. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  40. */
  41. /** @type {?} */
  42. const PAGER_CONTROL_VALUE_ACCESSOR = {
  43. provide: NG_VALUE_ACCESSOR,
  44. /* tslint:disable-next-line: no-use-before-declare */
  45. useExisting: forwardRef((/**
  46. * @return {?}
  47. */
  48. () => PagerComponent)),
  49. multi: true
  50. };
  51. class PagerComponent {
  52. /**
  53. * @param {?} elementRef
  54. * @param {?} paginationConfig
  55. * @param {?} changeDetection
  56. */
  57. constructor(elementRef, paginationConfig, changeDetection) {
  58. this.elementRef = elementRef;
  59. this.changeDetection = changeDetection;
  60. /**
  61. * fired when total pages count changes, $event:number equals to total pages count
  62. */
  63. this.numPages = new EventEmitter();
  64. /**
  65. * fired when page was changed, $event:{page, itemsPerPage} equals to
  66. * object with current page index and number of items per page
  67. */
  68. this.pageChanged = new EventEmitter();
  69. this.onChange = Function.prototype;
  70. this.onTouched = Function.prototype;
  71. this.inited = false;
  72. this._page = 1;
  73. this.elementRef = elementRef;
  74. if (!this.config) {
  75. this.configureOptions(Object.assign({}, paginationConfig.main, paginationConfig.pager));
  76. }
  77. }
  78. /**
  79. * maximum number of items per page. If value less than 1 will display all items on one page
  80. * @return {?}
  81. */
  82. get itemsPerPage() {
  83. return this._itemsPerPage;
  84. }
  85. /**
  86. * @param {?} v
  87. * @return {?}
  88. */
  89. set itemsPerPage(v) {
  90. this._itemsPerPage = v;
  91. this.totalPages = this.calculateTotalPages();
  92. }
  93. /**
  94. * total number of items in all pages
  95. * @return {?}
  96. */
  97. get totalItems() {
  98. return this._totalItems;
  99. }
  100. /**
  101. * @param {?} v
  102. * @return {?}
  103. */
  104. set totalItems(v) {
  105. this._totalItems = v;
  106. this.totalPages = this.calculateTotalPages();
  107. }
  108. /**
  109. * @return {?}
  110. */
  111. get totalPages() {
  112. return this._totalPages;
  113. }
  114. /**
  115. * @param {?} v
  116. * @return {?}
  117. */
  118. set totalPages(v) {
  119. this._totalPages = v;
  120. this.numPages.emit(v);
  121. if (this.inited) {
  122. this.selectPage(this.page);
  123. }
  124. }
  125. /**
  126. * @param {?} value
  127. * @return {?}
  128. */
  129. set page(value) {
  130. /** @type {?} */
  131. const _previous = this._page;
  132. this._page = value > this.totalPages ? this.totalPages : value || 1;
  133. this.changeDetection.markForCheck();
  134. if (_previous === this._page || typeof _previous === 'undefined') {
  135. return;
  136. }
  137. this.pageChanged.emit({
  138. page: this._page,
  139. itemsPerPage: this.itemsPerPage
  140. });
  141. }
  142. /**
  143. * @return {?}
  144. */
  145. get page() {
  146. return this._page;
  147. }
  148. /**
  149. * @param {?} config
  150. * @return {?}
  151. */
  152. configureOptions(config) {
  153. this.config = Object.assign({}, config);
  154. }
  155. /**
  156. * @return {?}
  157. */
  158. ngOnInit() {
  159. if (typeof window !== 'undefined') {
  160. this.classMap = this.elementRef.nativeElement.getAttribute('class') || '';
  161. }
  162. // watch for maxSize
  163. this.maxSize =
  164. typeof this.maxSize !== 'undefined' ? this.maxSize : this.config.maxSize;
  165. this.rotate =
  166. typeof this.rotate !== 'undefined' ? this.rotate : this.config.rotate;
  167. this.boundaryLinks =
  168. typeof this.boundaryLinks !== 'undefined'
  169. ? this.boundaryLinks
  170. : this.config.boundaryLinks;
  171. this.directionLinks =
  172. typeof this.directionLinks !== 'undefined'
  173. ? this.directionLinks
  174. : this.config.directionLinks;
  175. this.pageBtnClass =
  176. typeof this.pageBtnClass !== 'undefined'
  177. ? this.pageBtnClass
  178. : this.config.pageBtnClass;
  179. // base class
  180. this.itemsPerPage =
  181. typeof this.itemsPerPage !== 'undefined'
  182. ? this.itemsPerPage
  183. : this.config.itemsPerPage;
  184. this.totalPages = this.calculateTotalPages();
  185. // this class
  186. this.pages = this.getPages(this.page, this.totalPages);
  187. this.inited = true;
  188. }
  189. /**
  190. * @param {?} value
  191. * @return {?}
  192. */
  193. writeValue(value) {
  194. this.page = value;
  195. this.pages = this.getPages(this.page, this.totalPages);
  196. }
  197. /**
  198. * @param {?} key
  199. * @return {?}
  200. */
  201. getText(key) {
  202. // tslint:disable-next-line:no-any
  203. return ((/** @type {?} */ (this)))[`${key}Text`] || ((/** @type {?} */ (this))).config[`${key}Text`];
  204. }
  205. /**
  206. * @return {?}
  207. */
  208. noPrevious() {
  209. return this.page === 1;
  210. }
  211. /**
  212. * @return {?}
  213. */
  214. noNext() {
  215. return this.page === this.totalPages;
  216. }
  217. /**
  218. * @param {?} fn
  219. * @return {?}
  220. */
  221. registerOnChange(fn) {
  222. this.onChange = fn;
  223. }
  224. /**
  225. * @param {?} fn
  226. * @return {?}
  227. */
  228. registerOnTouched(fn) {
  229. this.onTouched = fn;
  230. }
  231. /**
  232. * @param {?} page
  233. * @param {?=} event
  234. * @return {?}
  235. */
  236. selectPage(page, event) {
  237. if (event) {
  238. event.preventDefault();
  239. }
  240. if (!this.disabled) {
  241. if (event && event.target) {
  242. // tslint:disable-next-line:no-any
  243. /** @type {?} */
  244. const target = event.target;
  245. target.blur();
  246. }
  247. this.writeValue(page);
  248. this.onChange(this.page);
  249. }
  250. }
  251. // Create page object used in template
  252. /**
  253. * @protected
  254. * @param {?} num
  255. * @param {?} text
  256. * @param {?} active
  257. * @return {?}
  258. */
  259. makePage(num, text, active) {
  260. return { text, number: num, active };
  261. }
  262. /**
  263. * @protected
  264. * @param {?} currentPage
  265. * @param {?} totalPages
  266. * @return {?}
  267. */
  268. getPages(currentPage, totalPages) {
  269. /** @type {?} */
  270. const pages = [];
  271. // Default page limits
  272. /** @type {?} */
  273. let startPage = 1;
  274. /** @type {?} */
  275. let endPage = totalPages;
  276. /** @type {?} */
  277. const isMaxSized = typeof this.maxSize !== 'undefined' && this.maxSize < totalPages;
  278. // recompute if maxSize
  279. if (isMaxSized) {
  280. if (this.rotate) {
  281. // Current page is displayed in the middle of the visible ones
  282. startPage = Math.max(currentPage - Math.floor(this.maxSize / 2), 1);
  283. endPage = startPage + this.maxSize - 1;
  284. // Adjust if limit is exceeded
  285. if (endPage > totalPages) {
  286. endPage = totalPages;
  287. startPage = endPage - this.maxSize + 1;
  288. }
  289. }
  290. else {
  291. // Visible pages are paginated with maxSize
  292. startPage =
  293. (Math.ceil(currentPage / this.maxSize) - 1) * this.maxSize + 1;
  294. // Adjust last page if limit is exceeded
  295. endPage = Math.min(startPage + this.maxSize - 1, totalPages);
  296. }
  297. }
  298. // Add page number links
  299. for (let num = startPage; num <= endPage; num++) {
  300. /** @type {?} */
  301. const page = this.makePage(num, num.toString(), num === currentPage);
  302. pages.push(page);
  303. }
  304. // Add links to move between page sets
  305. if (isMaxSized && !this.rotate) {
  306. if (startPage > 1) {
  307. /** @type {?} */
  308. const previousPageSet = this.makePage(startPage - 1, '...', false);
  309. pages.unshift(previousPageSet);
  310. }
  311. if (endPage < totalPages) {
  312. /** @type {?} */
  313. const nextPageSet = this.makePage(endPage + 1, '...', false);
  314. pages.push(nextPageSet);
  315. }
  316. }
  317. return pages;
  318. }
  319. // base class
  320. /**
  321. * @protected
  322. * @return {?}
  323. */
  324. calculateTotalPages() {
  325. /** @type {?} */
  326. const totalPages = this.itemsPerPage < 1
  327. ? 1
  328. : Math.ceil(this.totalItems / this.itemsPerPage);
  329. return Math.max(totalPages || 0, 1);
  330. }
  331. }
  332. PagerComponent.decorators = [
  333. { type: Component, args: [{
  334. selector: 'pager',
  335. template: "<ul class=\"pager\">\n <li [class.disabled]=\"noPrevious()\" [class.previous]=\"align\"\n [ngClass]=\"{'pull-right': align, 'float-right': align}\"\n class=\"{{ pageBtnClass }}\">\n <a href (click)=\"selectPage(page - 1, $event)\">{{ getText('previous') }}</a>\n </li>\n <li [class.disabled]=\"noNext()\" [class.next]=\"align\"\n [ngClass]=\"{'pull-right': align, 'float-right': align}\"\n class=\"{{ pageBtnClass }}\">\n <a href (click)=\"selectPage(page + 1, $event)\">{{ getText('next') }}</a>\n </li>\n</ul>\n",
  336. providers: [PAGER_CONTROL_VALUE_ACCESSOR]
  337. }] }
  338. ];
  339. /** @nocollapse */
  340. PagerComponent.ctorParameters = () => [
  341. { type: ElementRef },
  342. { type: PaginationConfig },
  343. { type: ChangeDetectorRef }
  344. ];
  345. PagerComponent.propDecorators = {
  346. align: [{ type: Input }],
  347. maxSize: [{ type: Input }],
  348. boundaryLinks: [{ type: Input }],
  349. directionLinks: [{ type: Input }],
  350. firstText: [{ type: Input }],
  351. previousText: [{ type: Input }],
  352. nextText: [{ type: Input }],
  353. lastText: [{ type: Input }],
  354. rotate: [{ type: Input }],
  355. pageBtnClass: [{ type: Input }],
  356. disabled: [{ type: Input }],
  357. numPages: [{ type: Output }],
  358. pageChanged: [{ type: Output }],
  359. itemsPerPage: [{ type: Input }],
  360. totalItems: [{ type: Input }]
  361. };
  362. /**
  363. * @fileoverview added by tsickle
  364. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  365. */
  366. /** @type {?} */
  367. const PAGINATION_CONTROL_VALUE_ACCESSOR = {
  368. provide: NG_VALUE_ACCESSOR,
  369. /* tslint:disable-next-line: no-use-before-declare */
  370. useExisting: forwardRef((/**
  371. * @return {?}
  372. */
  373. () => PaginationComponent)),
  374. multi: true
  375. };
  376. class PaginationComponent {
  377. /**
  378. * @param {?} elementRef
  379. * @param {?} paginationConfig
  380. * @param {?} changeDetection
  381. */
  382. constructor(elementRef, paginationConfig, changeDetection) {
  383. this.elementRef = elementRef;
  384. this.changeDetection = changeDetection;
  385. /**
  386. * fired when total pages count changes, $event:number equals to total pages count
  387. */
  388. this.numPages = new EventEmitter();
  389. /**
  390. * fired when page was changed, $event:{page, itemsPerPage} equals to object
  391. * with current page index and number of items per page
  392. */
  393. this.pageChanged = new EventEmitter();
  394. this.onChange = Function.prototype;
  395. this.onTouched = Function.prototype;
  396. this.inited = false;
  397. this._page = 1;
  398. this.elementRef = elementRef;
  399. if (!this.config) {
  400. this.configureOptions(paginationConfig.main);
  401. }
  402. }
  403. /**
  404. * maximum number of items per page. If value less than 1 will display all items on one page
  405. * @return {?}
  406. */
  407. get itemsPerPage() {
  408. return this._itemsPerPage;
  409. }
  410. /**
  411. * @param {?} v
  412. * @return {?}
  413. */
  414. set itemsPerPage(v) {
  415. this._itemsPerPage = v;
  416. this.totalPages = this.calculateTotalPages();
  417. }
  418. /**
  419. * total number of items in all pages
  420. * @return {?}
  421. */
  422. get totalItems() {
  423. return this._totalItems;
  424. }
  425. /**
  426. * @param {?} v
  427. * @return {?}
  428. */
  429. set totalItems(v) {
  430. this._totalItems = v;
  431. this.totalPages = this.calculateTotalPages();
  432. }
  433. /**
  434. * @return {?}
  435. */
  436. get totalPages() {
  437. return this._totalPages;
  438. }
  439. /**
  440. * @param {?} v
  441. * @return {?}
  442. */
  443. set totalPages(v) {
  444. this._totalPages = v;
  445. this.numPages.emit(v);
  446. if (this.inited) {
  447. this.selectPage(this.page);
  448. }
  449. }
  450. /**
  451. * @param {?} value
  452. * @return {?}
  453. */
  454. set page(value) {
  455. /** @type {?} */
  456. const _previous = this._page;
  457. this._page = value > this.totalPages ? this.totalPages : value || 1;
  458. this.changeDetection.markForCheck();
  459. if (_previous === this._page || typeof _previous === 'undefined') {
  460. return;
  461. }
  462. this.pageChanged.emit({
  463. page: this._page,
  464. itemsPerPage: this.itemsPerPage
  465. });
  466. }
  467. /**
  468. * @return {?}
  469. */
  470. get page() {
  471. return this._page;
  472. }
  473. /**
  474. * @param {?} config
  475. * @return {?}
  476. */
  477. configureOptions(config) {
  478. this.config = Object.assign({}, config);
  479. }
  480. /**
  481. * @return {?}
  482. */
  483. ngOnInit() {
  484. if (typeof window !== 'undefined') {
  485. this.classMap = this.elementRef.nativeElement.getAttribute('class') || '';
  486. }
  487. // watch for maxSize
  488. this.maxSize =
  489. typeof this.maxSize !== 'undefined' ? this.maxSize : this.config.maxSize;
  490. this.rotate =
  491. typeof this.rotate !== 'undefined' ? this.rotate : this.config.rotate;
  492. this.boundaryLinks =
  493. typeof this.boundaryLinks !== 'undefined'
  494. ? this.boundaryLinks
  495. : this.config.boundaryLinks;
  496. this.directionLinks =
  497. typeof this.directionLinks !== 'undefined'
  498. ? this.directionLinks
  499. : this.config.directionLinks;
  500. this.pageBtnClass =
  501. typeof this.pageBtnClass !== 'undefined'
  502. ? this.pageBtnClass
  503. : this.config.pageBtnClass;
  504. // base class
  505. this.itemsPerPage =
  506. typeof this.itemsPerPage !== 'undefined'
  507. ? this.itemsPerPage
  508. : this.config.itemsPerPage;
  509. this.totalPages = this.calculateTotalPages();
  510. // this class
  511. this.pages = this.getPages(this.page, this.totalPages);
  512. this.inited = true;
  513. }
  514. /**
  515. * @param {?} value
  516. * @return {?}
  517. */
  518. writeValue(value) {
  519. this.page = value;
  520. this.pages = this.getPages(this.page, this.totalPages);
  521. }
  522. /**
  523. * @param {?} key
  524. * @return {?}
  525. */
  526. getText(key) {
  527. // tslint:disable-next-line:no-any
  528. return ((/** @type {?} */ (this)))[`${key}Text`] || ((/** @type {?} */ (this))).config[`${key}Text`];
  529. }
  530. /**
  531. * @return {?}
  532. */
  533. noPrevious() {
  534. return this.page === 1;
  535. }
  536. /**
  537. * @return {?}
  538. */
  539. noNext() {
  540. return this.page === this.totalPages;
  541. }
  542. /**
  543. * @param {?} fn
  544. * @return {?}
  545. */
  546. registerOnChange(fn) {
  547. this.onChange = fn;
  548. }
  549. /**
  550. * @param {?} fn
  551. * @return {?}
  552. */
  553. registerOnTouched(fn) {
  554. this.onTouched = fn;
  555. }
  556. /**
  557. * @param {?} page
  558. * @param {?=} event
  559. * @return {?}
  560. */
  561. selectPage(page, event) {
  562. if (event) {
  563. event.preventDefault();
  564. }
  565. if (!this.disabled) {
  566. if (event && event.target) {
  567. // tslint:disable-next-line:no-any
  568. /** @type {?} */
  569. const target = event.target;
  570. target.blur();
  571. }
  572. this.writeValue(page);
  573. this.onChange(this.page);
  574. }
  575. }
  576. // Create page object used in template
  577. /**
  578. * @protected
  579. * @param {?} num
  580. * @param {?} text
  581. * @param {?} active
  582. * @return {?}
  583. */
  584. makePage(num, text, active) {
  585. return { text, number: num, active };
  586. }
  587. /**
  588. * @protected
  589. * @param {?} currentPage
  590. * @param {?} totalPages
  591. * @return {?}
  592. */
  593. getPages(currentPage, totalPages) {
  594. /** @type {?} */
  595. const pages = [];
  596. // Default page limits
  597. /** @type {?} */
  598. let startPage = 1;
  599. /** @type {?} */
  600. let endPage = totalPages;
  601. /** @type {?} */
  602. const isMaxSized = typeof this.maxSize !== 'undefined' && this.maxSize < totalPages;
  603. // recompute if maxSize
  604. if (isMaxSized) {
  605. if (this.rotate) {
  606. // Current page is displayed in the middle of the visible ones
  607. startPage = Math.max(currentPage - Math.floor(this.maxSize / 2), 1);
  608. endPage = startPage + this.maxSize - 1;
  609. // Adjust if limit is exceeded
  610. if (endPage > totalPages) {
  611. endPage = totalPages;
  612. startPage = endPage - this.maxSize + 1;
  613. }
  614. }
  615. else {
  616. // Visible pages are paginated with maxSize
  617. startPage =
  618. (Math.ceil(currentPage / this.maxSize) - 1) * this.maxSize + 1;
  619. // Adjust last page if limit is exceeded
  620. endPage = Math.min(startPage + this.maxSize - 1, totalPages);
  621. }
  622. }
  623. // Add page number links
  624. for (let num = startPage; num <= endPage; num++) {
  625. /** @type {?} */
  626. const page = this.makePage(num, num.toString(), num === currentPage);
  627. pages.push(page);
  628. }
  629. // Add links to move between page sets
  630. if (isMaxSized && !this.rotate) {
  631. if (startPage > 1) {
  632. /** @type {?} */
  633. const previousPageSet = this.makePage(startPage - 1, '...', false);
  634. pages.unshift(previousPageSet);
  635. }
  636. if (endPage < totalPages) {
  637. /** @type {?} */
  638. const nextPageSet = this.makePage(endPage + 1, '...', false);
  639. pages.push(nextPageSet);
  640. }
  641. }
  642. return pages;
  643. }
  644. // base class
  645. /**
  646. * @protected
  647. * @return {?}
  648. */
  649. calculateTotalPages() {
  650. /** @type {?} */
  651. const totalPages = this.itemsPerPage < 1
  652. ? 1
  653. : Math.ceil(this.totalItems / this.itemsPerPage);
  654. return Math.max(totalPages || 0, 1);
  655. }
  656. }
  657. PaginationComponent.decorators = [
  658. { type: Component, args: [{
  659. selector: 'pagination',
  660. template: "<ul class=\"pagination\" [ngClass]=\"classMap\">\n <li class=\"pagination-first page-item\"\n *ngIf=\"boundaryLinks\"\n [class.disabled]=\"noPrevious()||disabled\">\n <a class=\"page-link\" href (click)=\"selectPage(1, $event)\"\n [innerHTML]=\"getText('first')\"></a>\n </li>\n\n <li class=\"pagination-prev page-item\"\n *ngIf=\"directionLinks\"\n [class.disabled]=\"noPrevious()||disabled\">\n <a class=\"page-link\" href (click)=\"selectPage(page - 1, $event)\"\n [innerHTML]=\"getText('previous')\"></a>\n </li>\n\n <li *ngFor=\"let pg of pages\"\n [class.active]=\"pg.active\"\n [class.disabled]=\"disabled&&!pg.active\"\n class=\"pagination-page page-item\">\n <a class=\"page-link\" href (click)=\"selectPage(pg.number, $event)\"\n [innerHTML]=\"pg.text\"></a>\n </li>\n\n <li class=\"pagination-next page-item\"\n *ngIf=\"directionLinks\"\n [class.disabled]=\"noNext()||disabled\">\n <a class=\"page-link\" href (click)=\"selectPage(page + 1, $event)\"\n [innerHTML]=\"getText('next')\"></a></li>\n\n <li class=\"pagination-last page-item\"\n *ngIf=\"boundaryLinks\"\n [class.disabled]=\"noNext()||disabled\">\n <a class=\"page-link\" href (click)=\"selectPage(totalPages, $event)\"\n [innerHTML]=\"getText('last')\"></a></li>\n</ul>\n",
  661. providers: [PAGINATION_CONTROL_VALUE_ACCESSOR]
  662. }] }
  663. ];
  664. /** @nocollapse */
  665. PaginationComponent.ctorParameters = () => [
  666. { type: ElementRef },
  667. { type: PaginationConfig },
  668. { type: ChangeDetectorRef }
  669. ];
  670. PaginationComponent.propDecorators = {
  671. align: [{ type: Input }],
  672. maxSize: [{ type: Input }],
  673. boundaryLinks: [{ type: Input }],
  674. directionLinks: [{ type: Input }],
  675. firstText: [{ type: Input }],
  676. previousText: [{ type: Input }],
  677. nextText: [{ type: Input }],
  678. lastText: [{ type: Input }],
  679. rotate: [{ type: Input }],
  680. pageBtnClass: [{ type: Input }],
  681. disabled: [{ type: Input }],
  682. numPages: [{ type: Output }],
  683. pageChanged: [{ type: Output }],
  684. itemsPerPage: [{ type: Input }],
  685. totalItems: [{ type: Input }]
  686. };
  687. /**
  688. * @fileoverview added by tsickle
  689. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  690. */
  691. class PaginationModule {
  692. /**
  693. * @return {?}
  694. */
  695. static forRoot() {
  696. return { ngModule: PaginationModule, providers: [PaginationConfig] };
  697. }
  698. }
  699. PaginationModule.decorators = [
  700. { type: NgModule, args: [{
  701. imports: [CommonModule],
  702. declarations: [PagerComponent, PaginationComponent],
  703. exports: [PagerComponent, PaginationComponent]
  704. },] }
  705. ];
  706. export { PagerComponent, PaginationComponent, PaginationConfig, PaginationModule, PAGER_CONTROL_VALUE_ACCESSOR as ɵa, PAGINATION_CONTROL_VALUE_ACCESSOR as ɵb };
  707. //# sourceMappingURL=ngx-bootstrap-pagination.js.map