diff --git a/lib/jw-pagination.component.d.ts b/lib/jw-pagination.component.d.ts index 1a6d893..630173d 100644 --- a/lib/jw-pagination.component.d.ts +++ b/lib/jw-pagination.component.d.ts @@ -5,6 +5,10 @@ export declare class JwPaginationComponent implements OnInit, OnChanges { initialPage: number; pageSize: number; maxPages: number; + firstButtonLabel: string; + previousButtonLabel: string; + nextButtonLabel: string; + lastButtonLabel: string; pager: any; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; diff --git a/lib/jw-pagination.component.js b/lib/jw-pagination.component.js index 9154b57..773079a 100644 --- a/lib/jw-pagination.component.js +++ b/lib/jw-pagination.component.js @@ -1,4 +1,10 @@ "use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var paginate = require("jw-paginate"); @@ -8,6 +14,10 @@ var JwPaginationComponent = /** @class */ (function () { this.initialPage = 1; this.pageSize = 10; this.maxPages = 10; + this.firstButtonLabel = 'First'; + this.previousButtonLabel = 'Previous'; + this.nextButtonLabel = 'Next'; + this.lastButtonLabel = 'Last'; this.pager = {}; } JwPaginationComponent.prototype.ngOnInit = function () { @@ -30,21 +40,40 @@ var JwPaginationComponent = /** @class */ (function () { // call change page function in parent component this.changePage.emit(pageOfItems); }; - JwPaginationComponent.decorators = [ - { type: core_1.Component, args: [{ - moduleId: module.id, - selector: 'jw-pagination', - template: "
" - },] }, - ]; - /** @nocollapse */ - JwPaginationComponent.propDecorators = { - "items": [{ type: core_1.Input },], - "changePage": [{ type: core_1.Output },], - "initialPage": [{ type: core_1.Input },], - "pageSize": [{ type: core_1.Input },], - "maxPages": [{ type: core_1.Input },], - }; + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "items", void 0); + __decorate([ + core_1.Output() + ], JwPaginationComponent.prototype, "changePage", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "initialPage", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "pageSize", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "maxPages", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "firstButtonLabel", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "previousButtonLabel", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "nextButtonLabel", void 0); + __decorate([ + core_1.Input() + ], JwPaginationComponent.prototype, "lastButtonLabel", void 0); + JwPaginationComponent = __decorate([ + core_1.Component({ + moduleId: module.id, + selector: 'jw-pagination', + template: "