UNPKG

ng2-pagination

Version:
65 lines (64 loc) 2.63 kB
"use strict"; var core_1 = require('@angular/core'); var template_1 = require('./template'); /** * The default pagination controls component. Actually just a default implementation of a custom template. */ var PaginationControlsComponent = (function () { function PaginationControlsComponent() { this.maxSize = 7; this.previousLabel = 'Previous'; this.nextLabel = 'Next'; this.screenReaderPaginationLabel = 'Pagination'; this.screenReaderPageLabel = 'page'; this.screenReaderCurrentLabel = "You're on page"; this.pageChange = new core_1.EventEmitter(); this._directionLinks = true; this._autoHide = false; } Object.defineProperty(PaginationControlsComponent.prototype, "directionLinks", { get: function () { return this._directionLinks; }, set: function (value) { this._directionLinks = !!value && value !== 'false'; }, enumerable: true, configurable: true }); Object.defineProperty(PaginationControlsComponent.prototype, "autoHide", { get: function () { return this._autoHide; }, set: function (value) { this._autoHide = !!value && value !== 'false'; }, enumerable: true, configurable: true }); PaginationControlsComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'pagination-controls', template: template_1.DEFAULT_TEMPLATE, styles: [template_1.DEFAULT_STYLES], changeDetection: core_1.ChangeDetectionStrategy.OnPush, encapsulation: core_1.ViewEncapsulation.None },] }, ]; /** @nocollapse */ PaginationControlsComponent.ctorParameters = function () { return []; }; PaginationControlsComponent.propDecorators = { 'id': [{ type: core_1.Input },], 'maxSize': [{ type: core_1.Input },], 'directionLinks': [{ type: core_1.Input },], 'autoHide': [{ type: core_1.Input },], 'previousLabel': [{ type: core_1.Input },], 'nextLabel': [{ type: core_1.Input },], 'screenReaderPaginationLabel': [{ type: core_1.Input },], 'screenReaderPageLabel': [{ type: core_1.Input },], 'screenReaderCurrentLabel': [{ type: core_1.Input },], 'pageChange': [{ type: core_1.Output },], }; return PaginationControlsComponent; }()); exports.PaginationControlsComponent = PaginationControlsComponent;