1 | "use strict";
|
2 | var core_1 = require('@angular/core');
|
3 | var template_1 = require('./template');
|
4 |
|
5 |
|
6 |
|
7 | var PaginationControlsComponent = (function () {
|
8 | function PaginationControlsComponent() {
|
9 | this.maxSize = 7;
|
10 | this.previousLabel = 'Previous';
|
11 | this.nextLabel = 'Next';
|
12 | this.screenReaderPaginationLabel = 'Pagination';
|
13 | this.screenReaderPageLabel = 'page';
|
14 | this.screenReaderCurrentLabel = "You're on page";
|
15 | this.pageChange = new core_1.EventEmitter();
|
16 | this._directionLinks = true;
|
17 | this._autoHide = false;
|
18 | }
|
19 | Object.defineProperty(PaginationControlsComponent.prototype, "directionLinks", {
|
20 | get: function () {
|
21 | return this._directionLinks;
|
22 | },
|
23 | set: function (value) {
|
24 | this._directionLinks = !!value && value !== 'false';
|
25 | },
|
26 | enumerable: true,
|
27 | configurable: true
|
28 | });
|
29 | Object.defineProperty(PaginationControlsComponent.prototype, "autoHide", {
|
30 | get: function () {
|
31 | return this._autoHide;
|
32 | },
|
33 | set: function (value) {
|
34 | this._autoHide = !!value && value !== 'false';
|
35 | },
|
36 | enumerable: true,
|
37 | configurable: true
|
38 | });
|
39 | PaginationControlsComponent.decorators = [
|
40 | { type: core_1.Component, args: [{
|
41 | selector: 'pagination-controls',
|
42 | template: template_1.DEFAULT_TEMPLATE,
|
43 | styles: [template_1.DEFAULT_STYLES],
|
44 | changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
45 | encapsulation: core_1.ViewEncapsulation.None
|
46 | },] },
|
47 | ];
|
48 |
|
49 | PaginationControlsComponent.ctorParameters = function () { return []; };
|
50 | PaginationControlsComponent.propDecorators = {
|
51 | 'id': [{ type: core_1.Input },],
|
52 | 'maxSize': [{ type: core_1.Input },],
|
53 | 'directionLinks': [{ type: core_1.Input },],
|
54 | 'autoHide': [{ type: core_1.Input },],
|
55 | 'previousLabel': [{ type: core_1.Input },],
|
56 | 'nextLabel': [{ type: core_1.Input },],
|
57 | 'screenReaderPaginationLabel': [{ type: core_1.Input },],
|
58 | 'screenReaderPageLabel': [{ type: core_1.Input },],
|
59 | 'screenReaderCurrentLabel': [{ type: core_1.Input },],
|
60 | 'pageChange': [{ type: core_1.Output },],
|
61 | };
|
62 | return PaginationControlsComponent;
|
63 | }());
|
64 | exports.PaginationControlsComponent = PaginationControlsComponent;
|