UNPKG

ng-zorro-antd-yj

Version:

An enterprise-class UI components based on Ant Design and Angular

386 lines 31.7 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import * as tslib_1 from "tslib"; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { isInteger } from '../core/util/check'; import { toNumber, InputBoolean, InputNumber } from '../core/util/convert'; import { NzI18nService } from '../i18n/nz-i18n.service'; var NzPaginationComponent = /** @class */ (function () { function NzPaginationComponent(i18n, cdr) { this.i18n = i18n; this.cdr = cdr; // tslint:disable-next-line:no-any this.locale = {}; this.firstIndex = 1; this.pages = []; this.$destroy = new Subject(); this.nzPageSizeChange = new EventEmitter(); this.nzPageIndexChange = new EventEmitter(); this.nzInTable = false; this.nzSize = 'default'; this.nzPageSizeOptions = [10, 20, 30, 40]; this.nzShowSizeChanger = false; this.nzHideOnSinglePage = false; this.nzShowQuickJumper = false; this.nzSimple = false; this.nzTotal = 0; this.nzPageIndex = 1; this.nzPageSize = 10; } /** * @param {?} value * @return {?} */ NzPaginationComponent.prototype.validatePageIndex = /** * @param {?} value * @return {?} */ function (value) { if (value > this.lastIndex) { return this.lastIndex; } else if (value < this.firstIndex) { return this.firstIndex; } else { return value; } }; /** * @param {?} page * @return {?} */ NzPaginationComponent.prototype.updatePageIndexValue = /** * @param {?} page * @return {?} */ function (page) { this.nzPageIndex = page; this.nzPageIndexChange.emit(this.nzPageIndex); this.buildIndexes(); }; /** * @param {?} value * @return {?} */ NzPaginationComponent.prototype.isPageIndexValid = /** * @param {?} value * @return {?} */ function (value) { return this.validatePageIndex(value) === value; }; /** * @param {?} index * @return {?} */ NzPaginationComponent.prototype.jumpPage = /** * @param {?} index * @return {?} */ function (index) { if (index !== this.nzPageIndex) { /** @type {?} */ var pageIndex = this.validatePageIndex(index); if (pageIndex !== this.nzPageIndex) { this.updatePageIndexValue(pageIndex); } } }; /** * @param {?} diff * @return {?} */ NzPaginationComponent.prototype.jumpDiff = /** * @param {?} diff * @return {?} */ function (diff) { this.jumpPage(this.nzPageIndex + diff); }; /** * @param {?} $event * @return {?} */ NzPaginationComponent.prototype.onPageSizeChange = /** * @param {?} $event * @return {?} */ function ($event) { this.nzPageSize = $event; this.nzPageSizeChange.emit($event); this.buildIndexes(); if (this.nzPageIndex > this.lastIndex) { this.updatePageIndexValue(this.lastIndex); } }; /** * @param {?} _ * @param {?} input * @param {?} clearInputValue * @return {?} */ NzPaginationComponent.prototype.handleKeyDown = /** * @param {?} _ * @param {?} input * @param {?} clearInputValue * @return {?} */ function (_, input, clearInputValue) { /** @type {?} */ var target = input; /** @type {?} */ var page = toNumber(target.value, this.nzPageIndex); if (isInteger(page) && this.isPageIndexValid(page) && page !== this.nzPageIndex) { this.updatePageIndexValue(page); } if (clearInputValue) { target.value = ''; } else { target.value = "" + this.nzPageIndex; } }; /** generate indexes list */ /** * generate indexes list * @return {?} */ NzPaginationComponent.prototype.buildIndexes = /** * generate indexes list * @return {?} */ function () { /** @type {?} */ var pages = []; if (this.lastIndex <= 9) { for (var i = 2; i <= this.lastIndex - 1; i++) { pages.push(i); } } else { /** @type {?} */ var current = +this.nzPageIndex; /** @type {?} */ var left = Math.max(2, current - 2); /** @type {?} */ var right = Math.min(current + 2, this.lastIndex - 1); if (current - 1 <= 2) { right = 5; } if (this.lastIndex - current <= 2) { left = this.lastIndex - 4; } for (var i = left; i <= right; i++) { pages.push(i); } } this.pages = pages; this.cdr.markForCheck(); }; Object.defineProperty(NzPaginationComponent.prototype, "lastIndex", { get: /** * @return {?} */ function () { return Math.ceil(this.nzTotal / this.nzPageSize); }, enumerable: true, configurable: true }); Object.defineProperty(NzPaginationComponent.prototype, "isLastIndex", { get: /** * @return {?} */ function () { return this.nzPageIndex === this.lastIndex; }, enumerable: true, configurable: true }); Object.defineProperty(NzPaginationComponent.prototype, "isFirstIndex", { get: /** * @return {?} */ function () { return this.nzPageIndex === this.firstIndex; }, enumerable: true, configurable: true }); Object.defineProperty(NzPaginationComponent.prototype, "ranges", { get: /** * @return {?} */ function () { return [(this.nzPageIndex - 1) * this.nzPageSize + 1, Math.min(this.nzPageIndex * this.nzPageSize, this.nzTotal)]; }, enumerable: true, configurable: true }); Object.defineProperty(NzPaginationComponent.prototype, "showAddOption", { get: /** * @return {?} */ function () { return this.nzPageSizeOptions.indexOf(this.nzPageSize) === -1; }, enumerable: true, configurable: true }); /** * @return {?} */ NzPaginationComponent.prototype.ngOnInit = /** * @return {?} */ function () { var _this = this; this.i18n.localeChange.pipe(takeUntil(this.$destroy)).subscribe((/** * @return {?} */ function () { _this.locale = _this.i18n.getLocaleData('Pagination'); _this.cdr.markForCheck(); })); }; /** * @return {?} */ NzPaginationComponent.prototype.ngOnDestroy = /** * @return {?} */ function () { this.$destroy.next(); this.$destroy.complete(); }; /** * @param {?} changes * @return {?} */ NzPaginationComponent.prototype.ngOnChanges = /** * @param {?} changes * @return {?} */ function (changes) { if (changes.nzTotal || changes.nzPageSize || changes.nzPageIndex) { this.buildIndexes(); } }; NzPaginationComponent.decorators = [ { type: Component, args: [{ selector: 'nz-pagination', preserveWhitespaces: false, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #renderItemTemplate let-type let-page=\"page\">\n <a class=\"ant-pagination-item-link\" *ngIf=\"type==='pre'\"><i nz-icon type=\"left\"></i></a>\n <a class=\"ant-pagination-item-link\" *ngIf=\"type==='next'\"><i nz-icon type=\"right\"></i></a>\n <a *ngIf=\"type=='page'\">{{ page }}</a>\n</ng-template>\n<ng-container *ngIf=\"nzHideOnSinglePage && (nzTotal > nzPageSize) || !nzHideOnSinglePage\">\n <ul class=\"ant-pagination\"\n [class.ant-table-pagination]=\"nzInTable\"\n [class.ant-pagination-simple]=\"nzSimple\"\n [class.mini]=\"(nzSize === 'small') && !nzSimple\">\n <ng-container *ngIf=\"nzSimple; else normalTemplate\">\n <li class=\"ant-pagination-prev\"\n [attr.title]=\"locale.prev_page\"\n [class.ant-pagination-disabled]=\"isFirstIndex\"\n (click)=\"jumpDiff(-1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'pre'}\"></ng-template>\n </li>\n <li [attr.title]=\"nzPageIndex+'/'+lastIndex\" class=\"ant-pagination-simple-pager\">\n <input #simplePagerInput [value]=\"nzPageIndex\" (keydown.enter)=\"handleKeyDown($event,simplePagerInput,false)\" size=\"3\">\n <span class=\"ant-pagination-slash\">\uFF0F</span>\n {{ lastIndex }}\n </li>\n <li class=\"ant-pagination-next\"\n [attr.title]=\"locale.next_page\"\n [class.ant-pagination-disabled]=\"isLastIndex\"\n (click)=\"jumpDiff(1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'next'}\"></ng-template>\n </li>\n </ng-container>\n <ng-template #normalTemplate>\n <li class=\"ant-pagination-total-text\" *ngIf=\"nzShowTotal\">\n <ng-template [ngTemplateOutlet]=\"nzShowTotal\" [ngTemplateOutletContext]=\"{ $implicit: nzTotal,range:ranges }\"></ng-template>\n </li>\n <li class=\"ant-pagination-prev\"\n [attr.title]=\"locale.prev_page\"\n [class.ant-pagination-disabled]=\"isFirstIndex\"\n (click)=\"jumpDiff(-1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'pre'}\"></ng-template>\n </li>\n <li class=\"ant-pagination-item\"\n [attr.title]=\"firstIndex\"\n [class.ant-pagination-item-active]=\"isFirstIndex\"\n (click)=\"jumpPage(firstIndex)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'page',page: firstIndex }\"></ng-template>\n </li>\n <li class=\"ant-pagination-jump-prev\"\n *ngIf=\"(lastIndex > 9) && (nzPageIndex - 3 > firstIndex)\"\n [attr.title]=\"locale.prev_5\"\n (click)=\"jumpDiff(-5)\">\n <a class=\"ant-pagination-item-link\">\n <div class=\"ant-pagination-item-container\">\n <i nz-icon type=\"double-left\" class=\"ant-pagination-item-link-icon\"></i>\n <span class=\"ant-pagination-item-ellipsis\">\u2022\u2022\u2022</span>\n </div>\n </a>\n </li>\n <li class=\"ant-pagination-item\"\n *ngFor=\"let page of pages\"\n [attr.title]=\"page\"\n [class.ant-pagination-item-active]=\"nzPageIndex === page\"\n (click)=\"jumpPage(page)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'page',page: page }\"></ng-template>\n </li>\n <li class=\"ant-pagination-jump-next ant-pagination-item-link-icon\"\n [attr.title]=\"locale.next_5\"\n (click)=\"jumpDiff(5)\"\n *ngIf=\"(lastIndex > 9) && (nzPageIndex + 3 < lastIndex)\">\n <a class=\"ant-pagination-item-link\">\n <div class=\"ant-pagination-item-container\">\n <i nz-icon type=\"double-right\" class=\"ant-pagination-item-link-icon\"></i>\n <span class=\"ant-pagination-item-ellipsis\">\u2022\u2022\u2022</span>\n </div>\n </a>\n </li>\n <li class=\"ant-pagination-item\"\n [attr.title]=\"lastIndex\"\n (click)=\"jumpPage(lastIndex)\"\n *ngIf=\"(lastIndex > 0) && (lastIndex !== firstIndex)\"\n [class.ant-pagination-item-active]=\"isLastIndex\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'page',page: lastIndex }\"></ng-template>\n </li>\n <li class=\"ant-pagination-next\"\n [title]=\"locale.next_page\"\n [class.ant-pagination-disabled]=\"isLastIndex\"\n (click)=\"jumpDiff(1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'next'}\"></ng-template>\n </li>\n <div class=\"ant-pagination-options\" *ngIf=\"nzShowQuickJumper || nzShowSizeChanger\">\n <nz-select class=\"ant-pagination-options-size-changer\"\n *ngIf=\"nzShowSizeChanger\"\n [nzSize]=\"nzSize\"\n [ngModel]=\"nzPageSize\"\n (ngModelChange)=\"onPageSizeChange($event)\">\n <nz-option *ngFor=\"let option of nzPageSizeOptions\"\n [nzLabel]=\"option + locale.items_per_page\"\n [nzValue]=\"option\">\n </nz-option>\n <nz-option *ngIf=\"showAddOption\"\n [nzLabel]=\"nzPageSize + locale.items_per_page\"\n [nzValue]=\"nzPageSize\">\n </nz-option>\n </nz-select>\n <div class=\"ant-pagination-options-quick-jumper\" *ngIf=\"nzShowQuickJumper\">\n {{ locale.jump_to }}\n <input #quickJumperInput (keydown.enter)=\"handleKeyDown($event,quickJumperInput,true)\">\n {{ locale.page }}\n </div>\n </div>\n </ng-template>\n </ul>\n</ng-container>" }] } ]; /** @nocollapse */ NzPaginationComponent.ctorParameters = function () { return [ { type: NzI18nService }, { type: ChangeDetectorRef } ]; }; NzPaginationComponent.propDecorators = { nzPageSizeChange: [{ type: Output }], nzPageIndexChange: [{ type: Output }], nzShowTotal: [{ type: Input }], nzInTable: [{ type: Input }], nzSize: [{ type: Input }], nzPageSizeOptions: [{ type: Input }], nzItemRender: [{ type: Input }, { type: ViewChild, args: ['renderItemTemplate',] }], nzShowSizeChanger: [{ type: Input }], nzHideOnSinglePage: [{ type: Input }], nzShowQuickJumper: [{ type: Input }], nzSimple: [{ type: Input }], nzTotal: [{ type: Input }], nzPageIndex: [{ type: Input }], nzPageSize: [{ type: Input }] }; tslib_1.__decorate([ InputBoolean(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzShowSizeChanger", void 0); tslib_1.__decorate([ InputBoolean(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzHideOnSinglePage", void 0); tslib_1.__decorate([ InputBoolean(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzShowQuickJumper", void 0); tslib_1.__decorate([ InputBoolean(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzSimple", void 0); tslib_1.__decorate([ InputNumber(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzTotal", void 0); tslib_1.__decorate([ InputNumber(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzPageIndex", void 0); tslib_1.__decorate([ InputNumber(), tslib_1.__metadata("design:type", Object) ], NzPaginationComponent.prototype, "nzPageSize", void 0); return NzPaginationComponent; }()); export { NzPaginationComponent }; if (false) { /** @type {?} */ NzPaginationComponent.prototype.locale; /** @type {?} */ NzPaginationComponent.prototype.firstIndex; /** @type {?} */ NzPaginationComponent.prototype.pages; /** * @type {?} * @private */ NzPaginationComponent.prototype.$destroy; /** @type {?} */ NzPaginationComponent.prototype.nzPageSizeChange; /** @type {?} */ NzPaginationComponent.prototype.nzPageIndexChange; /** @type {?} */ NzPaginationComponent.prototype.nzShowTotal; /** @type {?} */ NzPaginationComponent.prototype.nzInTable; /** @type {?} */ NzPaginationComponent.prototype.nzSize; /** @type {?} */ NzPaginationComponent.prototype.nzPageSizeOptions; /** @type {?} */ NzPaginationComponent.prototype.nzItemRender; /** @type {?} */ NzPaginationComponent.prototype.nzShowSizeChanger; /** @type {?} */ NzPaginationComponent.prototype.nzHideOnSinglePage; /** @type {?} */ NzPaginationComponent.prototype.nzShowQuickJumper; /** @type {?} */ NzPaginationComponent.prototype.nzSimple; /** @type {?} */ NzPaginationComponent.prototype.nzTotal; /** @type {?} */ NzPaginationComponent.prototype.nzPageIndex; /** @type {?} */ NzPaginationComponent.prototype.nzPageSize; /** * @type {?} * @private */ NzPaginationComponent.prototype.i18n; /** * @type {?} * @private */ NzPaginationComponent.prototype.cdr; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotcGFnaW5hdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy16b3Jyby1hbnRkLXlqLyIsInNvdXJjZXMiOlsicGFnaW5hdGlvbi9uei1wYWdpb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