1 | import { NgModule, Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
---|
2 | import { CommonModule } from '@angular/common';
|
---|
3 | import { FormsModule } from '@angular/forms';
|
---|
4 | import { DropdownModule } from 'primeng/dropdown';
|
---|
5 | import { RippleModule } from 'primeng/ripple';
|
---|
6 | import { SharedModule } from 'primeng/api';
|
---|
7 | import { InputNumberModule } from 'primeng/inputnumber';
|
---|
8 | import * as i0 from "@angular/core";
|
---|
9 | import * as i1 from "primeng/dropdown";
|
---|
10 | import * as i2 from "primeng/inputnumber";
|
---|
11 | import * as i3 from "@angular/common";
|
---|
12 | import * as i4 from "primeng/ripple";
|
---|
13 | import * as i5 from "@angular/forms";
|
---|
14 | import * as i6 from "primeng/api";
|
---|
15 | export class Paginator {
|
---|
16 | constructor(cd) {
|
---|
17 | this.cd = cd;
|
---|
18 | this.pageLinkSize = 5;
|
---|
19 | this.onPageChange = new EventEmitter();
|
---|
20 | this.alwaysShow = true;
|
---|
21 | this.dropdownScrollHeight = '200px';
|
---|
22 | this.currentPageReportTemplate = '{currentPage} of {totalPages}';
|
---|
23 | this.showFirstLastIcon = true;
|
---|
24 | this.totalRecords = 0;
|
---|
25 | this.rows = 0;
|
---|
26 | this.showPageLinks = true;
|
---|
27 | this._first = 0;
|
---|
28 | this._page = 0;
|
---|
29 | }
|
---|
30 | ngOnInit() {
|
---|
31 | this.updatePaginatorState();
|
---|
32 | }
|
---|
33 | ngOnChanges(simpleChange) {
|
---|
34 | if (simpleChange.totalRecords) {
|
---|
35 | this.updatePageLinks();
|
---|
36 | this.updatePaginatorState();
|
---|
37 | this.updateFirst();
|
---|
38 | this.updateRowsPerPageOptions();
|
---|
39 | }
|
---|
40 | if (simpleChange.first) {
|
---|
41 | this._first = simpleChange.first.currentValue;
|
---|
42 | this.updatePageLinks();
|
---|
43 | this.updatePaginatorState();
|
---|
44 | }
|
---|
45 | if (simpleChange.rows) {
|
---|
46 | this.updatePageLinks();
|
---|
47 | this.updatePaginatorState();
|
---|
48 | }
|
---|
49 | if (simpleChange.rowsPerPageOptions) {
|
---|
50 | this.updateRowsPerPageOptions();
|
---|
51 | }
|
---|
52 | }
|
---|
53 | get first() {
|
---|
54 | return this._first;
|
---|
55 | }
|
---|
56 | set first(val) {
|
---|
57 | this._first = val;
|
---|
58 | }
|
---|
59 | updateRowsPerPageOptions() {
|
---|
60 | if (this.rowsPerPageOptions) {
|
---|
61 | this.rowsPerPageItems = [];
|
---|
62 | for (let opt of this.rowsPerPageOptions) {
|
---|
63 | if (typeof opt == 'object' && opt['showAll']) {
|
---|
64 | this.rowsPerPageItems.unshift({ label: opt['showAll'], value: this.totalRecords });
|
---|
65 | }
|
---|
66 | else {
|
---|
67 | this.rowsPerPageItems.push({ label: String(opt), value: opt });
|
---|
68 | }
|
---|
69 | }
|
---|
70 | }
|
---|
71 | }
|
---|
72 | isFirstPage() {
|
---|
73 | return this.getPage() === 0;
|
---|
74 | }
|
---|
75 | isLastPage() {
|
---|
76 | return this.getPage() === this.getPageCount() - 1;
|
---|
77 | }
|
---|
78 | getPageCount() {
|
---|
79 | return Math.ceil(this.totalRecords / this.rows);
|
---|
80 | }
|
---|
81 | calculatePageLinkBoundaries() {
|
---|
82 | let numberOfPages = this.getPageCount(), visiblePages = Math.min(this.pageLinkSize, numberOfPages);
|
---|
83 | //calculate range, keep current in middle if necessary
|
---|
84 | let start = Math.max(0, Math.ceil(this.getPage() - ((visiblePages) / 2))), end = Math.min(numberOfPages - 1, start + visiblePages - 1);
|
---|
85 | //check when approaching to last page
|
---|
86 | var delta = this.pageLinkSize - (end - start + 1);
|
---|
87 | start = Math.max(0, start - delta);
|
---|
88 | return [start, end];
|
---|
89 | }
|
---|
90 | updatePageLinks() {
|
---|
91 | this.pageLinks = [];
|
---|
92 | let boundaries = this.calculatePageLinkBoundaries(), start = boundaries[0], end = boundaries[1];
|
---|
93 | for (let i = start; i <= end; i++) {
|
---|
94 | this.pageLinks.push(i + 1);
|
---|
95 | }
|
---|
96 | if (this.showJumpToPageDropdown) {
|
---|
97 | this.pageItems = [];
|
---|
98 | for (let i = 0; i < this.getPageCount(); i++) {
|
---|
99 | this.pageItems.push({ label: String(i + 1), value: i });
|
---|
100 | }
|
---|
101 | }
|
---|
102 | }
|
---|
103 | changePage(p) {
|
---|
104 | var pc = this.getPageCount();
|
---|
105 | if (p >= 0 && p < pc) {
|
---|
106 | this._first = this.rows * p;
|
---|
107 | var state = {
|
---|
108 | page: p,
|
---|
109 | first: this.first,
|
---|
110 | rows: this.rows,
|
---|
111 | pageCount: pc
|
---|
112 | };
|
---|
113 | this.updatePageLinks();
|
---|
114 | this.onPageChange.emit(state);
|
---|
115 | this.updatePaginatorState();
|
---|
116 | }
|
---|
117 | }
|
---|
118 | updateFirst() {
|
---|
119 | const page = this.getPage();
|
---|
120 | if (page > 0 && this.totalRecords && (this.first >= this.totalRecords)) {
|
---|
121 | Promise.resolve(null).then(() => this.changePage(page - 1));
|
---|
122 | }
|
---|
123 | }
|
---|
124 | getPage() {
|
---|
125 | return Math.floor(this.first / this.rows);
|
---|
126 | }
|
---|
127 | changePageToFirst(event) {
|
---|
128 | if (!this.isFirstPage()) {
|
---|
129 | this.changePage(0);
|
---|
130 | }
|
---|
131 | event.preventDefault();
|
---|
132 | }
|
---|
133 | changePageToPrev(event) {
|
---|
134 | this.changePage(this.getPage() - 1);
|
---|
135 | event.preventDefault();
|
---|
136 | }
|
---|
137 | changePageToNext(event) {
|
---|
138 | this.changePage(this.getPage() + 1);
|
---|
139 | event.preventDefault();
|
---|
140 | }
|
---|
141 | changePageToLast(event) {
|
---|
142 | if (!this.isLastPage()) {
|
---|
143 | this.changePage(this.getPageCount() - 1);
|
---|
144 | }
|
---|
145 | event.preventDefault();
|
---|
146 | }
|
---|
147 | onPageLinkClick(event, page) {
|
---|
148 | this.changePage(page);
|
---|
149 | event.preventDefault();
|
---|
150 | }
|
---|
151 | onRppChange(event) {
|
---|
152 | this.changePage(this.getPage());
|
---|
153 | }
|
---|
154 | onPageDropdownChange(event) {
|
---|
155 | this.changePage(event.value);
|
---|
156 | }
|
---|
157 | updatePaginatorState() {
|
---|
158 | this.paginatorState = {
|
---|
159 | page: this.getPage(),
|
---|
160 | pageCount: this.getPageCount(),
|
---|
161 | rows: this.rows,
|
---|
162 | first: this.first,
|
---|
163 | totalRecords: this.totalRecords
|
---|
164 | };
|
---|
165 | }
|
---|
166 | empty() {
|
---|
167 | return this.getPageCount() === 0;
|
---|
168 | }
|
---|
169 | currentPage() {
|
---|
170 | return this.getPageCount() > 0 ? this.getPage() + 1 : 0;
|
---|
171 | }
|
---|
172 | get currentPageReport() {
|
---|
173 | return this.currentPageReportTemplate
|
---|
174 | .replace("{currentPage}", String(this.currentPage()))
|
---|
175 | .replace("{totalPages}", String(this.getPageCount()))
|
---|
176 | .replace("{first}", String((this.totalRecords > 0) ? this._first + 1 : 0))
|
---|
177 | .replace("{last}", String(Math.min(this._first + this.rows, this.totalRecords)))
|
---|
178 | .replace("{rows}", String(this.rows))
|
---|
179 | .replace("{totalRecords}", String(this.totalRecords));
|
---|
180 | }
|
---|
181 | }
|
---|
182 | Paginator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Paginator, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
183 | Paginator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Paginator, selector: "p-paginator", inputs: { pageLinkSize: "pageLinkSize", style: "style", styleClass: "styleClass", alwaysShow: "alwaysShow", templateLeft: "templateLeft", templateRight: "templateRight", dropdownAppendTo: "dropdownAppendTo", dropdownScrollHeight: "dropdownScrollHeight", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: "showCurrentPageReport", showFirstLastIcon: "showFirstLastIcon", totalRecords: "totalRecords", rows: "rows", rowsPerPageOptions: "rowsPerPageOptions", showJumpToPageDropdown: "showJumpToPageDropdown", showJumpToPageInput: "showJumpToPageInput", showPageLinks: "showPageLinks", dropdownItemTemplate: "dropdownItemTemplate", first: "first" }, outputs: { onPageChange: "onPageChange" }, host: { classAttribute: "p-element" }, usesOnChanges: true, ngImport: i0, template: `
|
---|
184 | <div [class]="styleClass" [ngStyle]="style" [ngClass]="'p-paginator p-component'" *ngIf="alwaysShow ? true : (pageLinks && pageLinks.length > 1)">
|
---|
185 | <div class="p-paginator-left-content" *ngIf="templateLeft">
|
---|
186 | <ng-container *ngTemplateOutlet="templateLeft; context: {$implicit: paginatorState}"></ng-container>
|
---|
187 | </div>
|
---|
188 | <span class="p-paginator-current" *ngIf="showCurrentPageReport">{{currentPageReport}}</span>
|
---|
189 | <button *ngIf="showFirstLastIcon" type="button" [disabled]="isFirstPage() || empty()" (click)="changePageToFirst($event)" pRipple
|
---|
190 | class="p-paginator-first p-paginator-element p-link" [ngClass]="{'p-disabled':isFirstPage() || empty()}">
|
---|
191 | <span class="p-paginator-icon pi pi-angle-double-left"></span>
|
---|
192 | </button>
|
---|
193 | <button type="button" [disabled]="isFirstPage() || empty()" (click)="changePageToPrev($event)" pRipple
|
---|
194 | class="p-paginator-prev p-paginator-element p-link" [ngClass]="{'p-disabled':isFirstPage() || empty()}">
|
---|
195 | <span class="p-paginator-icon pi pi-angle-left"></span>
|
---|
196 | </button>
|
---|
197 | <span class="p-paginator-pages" *ngIf="showPageLinks">
|
---|
198 | <button type="button" *ngFor="let pageLink of pageLinks" class="p-paginator-page p-paginator-element p-link" [ngClass]="{'p-highlight': (pageLink-1 == getPage())}"
|
---|
199 | (click)="onPageLinkClick($event, pageLink - 1)" pRipple>{{pageLink}}</button>
|
---|
200 | </span>
|
---|
201 | <p-dropdown [options]="pageItems" [ngModel]="getPage()" *ngIf="showJumpToPageDropdown" [disabled]="empty()" styleClass="p-paginator-page-options"
|
---|
202 | (onChange)="onPageDropdownChange($event)" [appendTo]="dropdownAppendTo" [scrollHeight]="dropdownScrollHeight">
|
---|
203 | <ng-template pTemplate="selectedItem">{{currentPageReport}}</ng-template>
|
---|
204 | </p-dropdown>
|
---|
205 | <button type="button" [disabled]="isLastPage() || empty()" (click)="changePageToNext($event)" pRipple
|
---|
206 | class="p-paginator-next p-paginator-element p-link" [ngClass]="{'p-disabled':isLastPage() || empty()}">
|
---|
207 | <span class="p-paginator-icon pi pi-angle-right"></span>
|
---|
208 | </button>
|
---|
209 | <button *ngIf="showFirstLastIcon" type="button" [disabled]="isLastPage() || empty()" (click)="changePageToLast($event)" pRipple
|
---|
210 | class="p-paginator-last p-paginator-element p-link" [ngClass]="{'p-disabled':isLastPage() || empty()}">
|
---|
211 | <span class="p-paginator-icon pi pi-angle-double-right"></span>
|
---|
212 | </button>
|
---|
213 | <p-inputNumber *ngIf="showJumpToPageInput" [ngModel]="currentPage()" class="p-paginator-page-input" [disabled]="empty()" (ngModelChange)="changePage($event - 1)"></p-inputNumber>
|
---|
214 | <p-dropdown [options]="rowsPerPageItems" [(ngModel)]="rows" *ngIf="rowsPerPageOptions" styleClass="p-paginator-rpp-options" [disabled]="empty()"
|
---|
215 | (onChange)="onRppChange($event)" [appendTo]="dropdownAppendTo" [scrollHeight]="dropdownScrollHeight">
|
---|
216 | <ng-container *ngIf="dropdownItemTemplate">
|
---|
217 | <ng-template let-item pTemplate="item">
|
---|
218 | <ng-container *ngTemplateOutlet="dropdownItemTemplate; context: {$implicit: item}">
|
---|
219 | </ng-container>
|
---|
220 | </ng-template>
|
---|
221 | </ng-container>
|
---|
222 | </p-dropdown>
|
---|
223 | <div class="p-paginator-right-content" *ngIf="templateRight">
|
---|
224 | <ng-container *ngTemplateOutlet="templateRight; context: {$implicit: paginatorState}"></ng-container>
|
---|
225 | </div>
|
---|
226 | </div>
|
---|
227 | `, isInline: true, styles: [".p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}\n"], components: [{ type: i1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.Ripple, selector: "[pRipple]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
228 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Paginator, decorators: [{
|
---|
229 | type: Component,
|
---|
230 | args: [{ selector: 'p-paginator', template: `
|
---|
231 | <div [class]="styleClass" [ngStyle]="style" [ngClass]="'p-paginator p-component'" *ngIf="alwaysShow ? true : (pageLinks && pageLinks.length > 1)">
|
---|
232 | <div class="p-paginator-left-content" *ngIf="templateLeft">
|
---|
233 | <ng-container *ngTemplateOutlet="templateLeft; context: {$implicit: paginatorState}"></ng-container>
|
---|
234 | </div>
|
---|
235 | <span class="p-paginator-current" *ngIf="showCurrentPageReport">{{currentPageReport}}</span>
|
---|
236 | <button *ngIf="showFirstLastIcon" type="button" [disabled]="isFirstPage() || empty()" (click)="changePageToFirst($event)" pRipple
|
---|
237 | class="p-paginator-first p-paginator-element p-link" [ngClass]="{'p-disabled':isFirstPage() || empty()}">
|
---|
238 | <span class="p-paginator-icon pi pi-angle-double-left"></span>
|
---|
239 | </button>
|
---|
240 | <button type="button" [disabled]="isFirstPage() || empty()" (click)="changePageToPrev($event)" pRipple
|
---|
241 | class="p-paginator-prev p-paginator-element p-link" [ngClass]="{'p-disabled':isFirstPage() || empty()}">
|
---|
242 | <span class="p-paginator-icon pi pi-angle-left"></span>
|
---|
243 | </button>
|
---|
244 | <span class="p-paginator-pages" *ngIf="showPageLinks">
|
---|
245 | <button type="button" *ngFor="let pageLink of pageLinks" class="p-paginator-page p-paginator-element p-link" [ngClass]="{'p-highlight': (pageLink-1 == getPage())}"
|
---|
246 | (click)="onPageLinkClick($event, pageLink - 1)" pRipple>{{pageLink}}</button>
|
---|
247 | </span>
|
---|
248 | <p-dropdown [options]="pageItems" [ngModel]="getPage()" *ngIf="showJumpToPageDropdown" [disabled]="empty()" styleClass="p-paginator-page-options"
|
---|
249 | (onChange)="onPageDropdownChange($event)" [appendTo]="dropdownAppendTo" [scrollHeight]="dropdownScrollHeight">
|
---|
250 | <ng-template pTemplate="selectedItem">{{currentPageReport}}</ng-template>
|
---|
251 | </p-dropdown>
|
---|
252 | <button type="button" [disabled]="isLastPage() || empty()" (click)="changePageToNext($event)" pRipple
|
---|
253 | class="p-paginator-next p-paginator-element p-link" [ngClass]="{'p-disabled':isLastPage() || empty()}">
|
---|
254 | <span class="p-paginator-icon pi pi-angle-right"></span>
|
---|
255 | </button>
|
---|
256 | <button *ngIf="showFirstLastIcon" type="button" [disabled]="isLastPage() || empty()" (click)="changePageToLast($event)" pRipple
|
---|
257 | class="p-paginator-last p-paginator-element p-link" [ngClass]="{'p-disabled':isLastPage() || empty()}">
|
---|
258 | <span class="p-paginator-icon pi pi-angle-double-right"></span>
|
---|
259 | </button>
|
---|
260 | <p-inputNumber *ngIf="showJumpToPageInput" [ngModel]="currentPage()" class="p-paginator-page-input" [disabled]="empty()" (ngModelChange)="changePage($event - 1)"></p-inputNumber>
|
---|
261 | <p-dropdown [options]="rowsPerPageItems" [(ngModel)]="rows" *ngIf="rowsPerPageOptions" styleClass="p-paginator-rpp-options" [disabled]="empty()"
|
---|
262 | (onChange)="onRppChange($event)" [appendTo]="dropdownAppendTo" [scrollHeight]="dropdownScrollHeight">
|
---|
263 | <ng-container *ngIf="dropdownItemTemplate">
|
---|
264 | <ng-template let-item pTemplate="item">
|
---|
265 | <ng-container *ngTemplateOutlet="dropdownItemTemplate; context: {$implicit: item}">
|
---|
266 | </ng-container>
|
---|
267 | </ng-template>
|
---|
268 | </ng-container>
|
---|
269 | </p-dropdown>
|
---|
270 | <div class="p-paginator-right-content" *ngIf="templateRight">
|
---|
271 | <ng-container *ngTemplateOutlet="templateRight; context: {$implicit: paginatorState}"></ng-container>
|
---|
272 | </div>
|
---|
273 | </div>
|
---|
274 | `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
275 | 'class': 'p-element'
|
---|
276 | }, styles: [".p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}\n"] }]
|
---|
277 | }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { pageLinkSize: [{
|
---|
278 | type: Input
|
---|
279 | }], onPageChange: [{
|
---|
280 | type: Output
|
---|
281 | }], style: [{
|
---|
282 | type: Input
|
---|
283 | }], styleClass: [{
|
---|
284 | type: Input
|
---|
285 | }], alwaysShow: [{
|
---|
286 | type: Input
|
---|
287 | }], templateLeft: [{
|
---|
288 | type: Input
|
---|
289 | }], templateRight: [{
|
---|
290 | type: Input
|
---|
291 | }], dropdownAppendTo: [{
|
---|
292 | type: Input
|
---|
293 | }], dropdownScrollHeight: [{
|
---|
294 | type: Input
|
---|
295 | }], currentPageReportTemplate: [{
|
---|
296 | type: Input
|
---|
297 | }], showCurrentPageReport: [{
|
---|
298 | type: Input
|
---|
299 | }], showFirstLastIcon: [{
|
---|
300 | type: Input
|
---|
301 | }], totalRecords: [{
|
---|
302 | type: Input
|
---|
303 | }], rows: [{
|
---|
304 | type: Input
|
---|
305 | }], rowsPerPageOptions: [{
|
---|
306 | type: Input
|
---|
307 | }], showJumpToPageDropdown: [{
|
---|
308 | type: Input
|
---|
309 | }], showJumpToPageInput: [{
|
---|
310 | type: Input
|
---|
311 | }], showPageLinks: [{
|
---|
312 | type: Input
|
---|
313 | }], dropdownItemTemplate: [{
|
---|
314 | type: Input
|
---|
315 | }], first: [{
|
---|
316 | type: Input
|
---|
317 | }] } });
|
---|
318 | export class PaginatorModule {
|
---|
319 | }
|
---|
320 | PaginatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PaginatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
321 | PaginatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PaginatorModule, declarations: [Paginator], imports: [CommonModule, DropdownModule, InputNumberModule, FormsModule, SharedModule, RippleModule], exports: [Paginator, DropdownModule, InputNumberModule, FormsModule, SharedModule] });
|
---|
322 | PaginatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PaginatorModule, imports: [[CommonModule, DropdownModule, InputNumberModule, FormsModule, SharedModule, RippleModule], DropdownModule, InputNumberModule, FormsModule, SharedModule] });
|
---|
323 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PaginatorModule, decorators: [{
|
---|
324 | type: NgModule,
|
---|
325 | args: [{
|
---|
326 | imports: [CommonModule, DropdownModule, InputNumberModule, FormsModule, SharedModule, RippleModule],
|
---|
327 | exports: [Paginator, DropdownModule, InputNumberModule, FormsModule, SharedModule],
|
---|
328 | declarations: [Paginator]
|
---|
329 | }]
|
---|
330 | }] });
|
---|
331 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5hdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNv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