ng2-pagination
Advanced tools
Comparing version 0.0.1-alpha.8 to 0.0.1-alpha.9
@@ -13,2 +13,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var pagination_service_1 = require("./pagination-service"); | ||
var DEFAULT_TEMPLATE = "\n <ul class=\"pagination\" role=\"navigation\" aria-label=\"Pagination\" *ngIf=\"!autoHide || pages.length === 0\">\n\n <li class=\"pagination-previous\" [class.disabled]=\"isFirstPage()\" *ngIf=\"directionLinks\">\n <a *ngIf=\"1 < getCurrent()\" (click)=\"setCurrent(getCurrent() - 1)\" aria-label=\"Next page\">\n Previous <span class=\"show-for-sr\">page</span>\n </a>\n <span *ngIf=\"isFirstPage()\">Previous <span class=\"show-for-sr\">page</span></span>\n </li>\n\n <li [class.current]=\"getCurrent() === page.value\" *ngFor=\"#page of pages\">\n <a (click)=\"setCurrent(page.value)\" *ngIf=\"getCurrent() !== page.value\">\n <span class=\"show-for-sr\">Page</span>\n <span>{{ page.label }}</span>\n </a>\n <div *ngIf=\"getCurrent() === page.value\">\n <span class=\"show-for-sr\">You're on page</span>\n <span>{{ page.label }}</span>\n </div>\n </li>\n\n <li class=\"pagination-next\" [class.disabled]=\"isLastPage()\" *ngIf=\"directionLinks\">\n <a *ngIf=\"!isLastPage()\" (click)=\"setCurrent(getCurrent() + 1)\" aria-label=\"Next page\">\n Next <span class=\"show-for-sr\">page</span>\n </a>\n <span *ngIf=\"isLastPage()\">Next <span class=\"show-for-sr\">page</span></span>\n </li>\n\n </ul>\n "; | ||
function getTemplate() { | ||
return pagination_service_1.PaginationService.template || DEFAULT_TEMPLATE; | ||
} | ||
var PaginationControlsCmp = (function () { | ||
@@ -66,2 +70,4 @@ function PaginationControlsCmp(service) { | ||
PaginationControlsCmp.prototype.createPageArray = function (currentPage, itemsPerPage, totalItems, paginationRange) { | ||
// paginationRange could be a string if passed from attribute, so cast to number. | ||
paginationRange = +paginationRange; | ||
var pages = []; | ||
@@ -144,3 +150,3 @@ var totalPages = Math.ceil(totalItems / itemsPerPage); | ||
selector: 'pagination-controls', | ||
template: "\n <ul class=\"pagination\" role=\"navigation\" aria-label=\"Pagination\" *ngIf=\"!autoHide || pages.length === 0\">\n\n <li class=\"pagination-previous\" [class.disabled]=\"isFirstPage()\" *ngIf=\"directionLinks\">\n <a *ngIf=\"1 < getCurrent()\" (click)=\"setCurrent(getCurrent() - 1)\" aria-label=\"Next page\">\n Previous <span class=\"show-for-sr\">page</span>\n </a>\n <span *ngIf=\"isFirstPage()\">Previous <span class=\"show-for-sr\">page</span></span>\n </li>\n\n <li [class.current]=\"getCurrent() === page.value\" *ngFor=\"#page of pages\">\n <a (click)=\"setCurrent(page.value)\" *ngIf=\"getCurrent() !== page.value\">\n <span class=\"show-for-sr\">Page</span>\n <span>{{ page.label }}</span>\n </a>\n <div *ngIf=\"getCurrent() === page.value\">\n <span class=\"show-for-sr\">You're on page</span>\n <span>{{ page.label }}</span>\n </div>\n </li>\n\n <li class=\"pagination-next\" [class.disabled]=\"isLastPage()\" *ngIf=\"directionLinks\">\n <a *ngIf=\"getCurrent() < pages.length\" (click)=\"setCurrent(getCurrent() + 1)\" aria-label=\"Next page\">\n Next <span class=\"show-for-sr\">page</span>\n </a>\n <span *ngIf=\"isLastPage()\">Next <span class=\"show-for-sr\">page</span></span>\n </li>\n\n </ul>\n ", | ||
template: getTemplate(), | ||
directives: [common_1.CORE_DIRECTIVES] | ||
@@ -147,0 +153,0 @@ }), |
@@ -31,2 +31,4 @@ import { EventEmitter } from 'angular2/core'; | ||
defaultId: string; | ||
static templateUrl: string; | ||
static template: string; | ||
register(instance: IPaginationInstance): void; | ||
@@ -33,0 +35,0 @@ /** |
{ | ||
"name": "ng2-pagination", | ||
"version": "0.0.1-alpha.8", | ||
"version": "0.0.1-alpha.9", | ||
"description": "Pagination for Angular2", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
43846
957