@agentsmith.bgd/as-lib-pagination 0.0.4 → 19.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/agentsmith.bgd-as-lib-pagination.mjs +7 -7
- package/fesm2022/agentsmith.bgd-as-lib-pagination.mjs.map +1 -1
- package/package.json +3 -5
- package/esm2022/agentsmith.bgd-as-lib-pagination.mjs +0 -5
- package/esm2022/lib/as-lib-pagination.component.mjs +0 -45
- package/esm2022/lib/as-lib-pagination.service.mjs +0 -14
- package/esm2022/public-api.mjs +0 -6
|
@@ -3,10 +3,10 @@ import { Injectable, input, output, effect, Component } from '@angular/core';
|
|
|
3
3
|
|
|
4
4
|
class AsLibPaginationService {
|
|
5
5
|
constructor() { }
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: AsLibPaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: AsLibPaginationService, providedIn: 'root' });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: AsLibPaginationService, decorators: [{
|
|
10
10
|
type: Injectable,
|
|
11
11
|
args: [{
|
|
12
12
|
providedIn: 'root'
|
|
@@ -48,12 +48,12 @@ class AsLibPaginationComponent {
|
|
|
48
48
|
console.log(`AS Pagination -> ${value}`, ...rest);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
52
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: AsLibPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.1", type: AsLibPaginationComponent, isStandalone: true, selector: "as-lib-pagination", inputs: { first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, last: { classPropertyName: "last", publicName: "last", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, enableLog: { classPropertyName: "enableLog", publicName: "enableLog", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<ul class=\"pagination {{ align() }}\">\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(0)\" class=\"page-link\"> <i class=\"fa fa-angle-double-left\"></i> </a\n ></li>\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() - 1)\" class=\"page-link\"><i class=\"fa fa-angle-left\"></i></a>\n </li>\n @for (x of arr; track x) {\n @if (x !== -1) {\n <li [class.active]=\"x === page()\" class=\"page-item d-none d-sm-block\">\n <a (click)=\"pageChange.emit(x)\" class=\"page-link\">{{ 1 + x }}</a>\n </li>\n } @else if (x === -1) {\n <li class=\"page-item disabled d-none d-sm-block\">\n <a class=\"page-link\">...</a>\n </li>\n }\n }\n\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() + 1)\" class=\"page-link\"><i class=\"fa fa-angle-right\"></i></a>\n </li>\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(totalPages() - 1)\" class=\"page-link\"> <i class=\"fa fa-angle-double-right\"></i> </a\n ></li>\n</ul>\n", styles: [".pagination.right{justify-content:flex-end}.pagination.center{justify-content:center}a.page-link{cursor:pointer}@media (max-width: 575px){ul.pagination{justify-content:center!important}}\n"] });
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: AsLibPaginationComponent, decorators: [{
|
|
55
55
|
type: Component,
|
|
56
|
-
args: [{ selector: 'as-lib-pagination',
|
|
56
|
+
args: [{ selector: 'as-lib-pagination', imports: [], template: "<ul class=\"pagination {{ align() }}\">\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(0)\" class=\"page-link\"> <i class=\"fa fa-angle-double-left\"></i> </a\n ></li>\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() - 1)\" class=\"page-link\"><i class=\"fa fa-angle-left\"></i></a>\n </li>\n @for (x of arr; track x) {\n @if (x !== -1) {\n <li [class.active]=\"x === page()\" class=\"page-item d-none d-sm-block\">\n <a (click)=\"pageChange.emit(x)\" class=\"page-link\">{{ 1 + x }}</a>\n </li>\n } @else if (x === -1) {\n <li class=\"page-item disabled d-none d-sm-block\">\n <a class=\"page-link\">...</a>\n </li>\n }\n }\n\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() + 1)\" class=\"page-link\"><i class=\"fa fa-angle-right\"></i></a>\n </li>\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(totalPages() - 1)\" class=\"page-link\"> <i class=\"fa fa-angle-double-right\"></i> </a\n ></li>\n</ul>\n", styles: [".pagination.right{justify-content:flex-end}.pagination.center{justify-content:center}a.page-link{cursor:pointer}@media (max-width: 575px){ul.pagination{justify-content:center!important}}\n"] }]
|
|
57
57
|
}], ctorParameters: () => [] });
|
|
58
58
|
|
|
59
59
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentsmith.bgd-as-lib-pagination.mjs","sources":["../../../projects/as-lib-pagination/src/lib/as-lib-pagination.service.ts","../../../projects/as-lib-pagination/src/lib/as-lib-pagination.component.ts","../../../projects/as-lib-pagination/src/lib/as-lib-pagination.component.html","../../../projects/as-lib-pagination/src/public-api.ts","../../../projects/as-lib-pagination/src/agentsmith.bgd-as-lib-pagination.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AsLibPaginationService {\n\n constructor() { }\n}\n","import { Component, effect, input, output } from '@angular/core';\n\n@Component({\n
|
|
1
|
+
{"version":3,"file":"agentsmith.bgd-as-lib-pagination.mjs","sources":["../../../projects/as-lib-pagination/src/lib/as-lib-pagination.service.ts","../../../projects/as-lib-pagination/src/lib/as-lib-pagination.component.ts","../../../projects/as-lib-pagination/src/lib/as-lib-pagination.component.html","../../../projects/as-lib-pagination/src/public-api.ts","../../../projects/as-lib-pagination/src/agentsmith.bgd-as-lib-pagination.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AsLibPaginationService {\n\n constructor() { }\n}\n","import { Component, effect, input, output } from '@angular/core';\n\n@Component({\n selector: 'as-lib-pagination',\n imports: [],\n templateUrl: './as-lib-pagination.component.html',\n styleUrl: './as-lib-pagination.component.scss'\n})\nexport class AsLibPaginationComponent {\n first = input(false);\n last = input(false);\n align = input<'' | 'justify-content-center' | 'justify-content-end'>('');\n enableLog = input(false);\n pageChange = output<number>();\n arr: number[] = [];\n totalPages = input<number>(0);\n page = input<number>(0);\n\n constructor() {\n effect(() => {\n console.log(`The count is:`, this.totalPages(), this.page());\n this.calculatePager();\n });\n }\n\n calculatePager(): void {\n this.arr = [];\n const midd = this.page() <= 4 || this.page() >= this.totalPages() - 4 ? Math.floor(this.totalPages() / 2) : 0;\n for (let num = 0; num < this.totalPages(); num++) {\n if (num < 2 || 2 >= Math.abs(this.page() - num) || 1 >= Math.abs(midd - num) || num === this.page() || num >= this.totalPages() - 2) {\n this.arr.push(num);\n } else if (this.arr[this.arr.length - 1] !== -1) {\n this.arr.push(-1);\n }\n }\n }\n\n ngOnInit() {\n this.calculatePager();\n }\n\n log(value: any, ...rest: any[]): void {\n if (this.enableLog() || localStorage.getItem('loggerEnable')) {\n console.log(`AS Pagination -> ${value}`, ...rest);\n }\n }\n}\n","<ul class=\"pagination {{ align() }}\">\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(0)\" class=\"page-link\"> <i class=\"fa fa-angle-double-left\"></i> </a\n ></li>\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() - 1)\" class=\"page-link\"><i class=\"fa fa-angle-left\"></i></a>\n </li>\n @for (x of arr; track x) {\n @if (x !== -1) {\n <li [class.active]=\"x === page()\" class=\"page-item d-none d-sm-block\">\n <a (click)=\"pageChange.emit(x)\" class=\"page-link\">{{ 1 + x }}</a>\n </li>\n } @else if (x === -1) {\n <li class=\"page-item disabled d-none d-sm-block\">\n <a class=\"page-link\">...</a>\n </li>\n }\n }\n\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() + 1)\" class=\"page-link\"><i class=\"fa fa-angle-right\"></i></a>\n </li>\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(totalPages() - 1)\" class=\"page-link\"> <i class=\"fa fa-angle-double-right\"></i> </a\n ></li>\n</ul>\n","/*\n * Public API Surface of as-lib-pagination\n */\n\nexport * from './lib/as-lib-pagination.service';\nexport * from './lib/as-lib-pagination.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"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EAAA,IAAA,EAAA,wBAAwB,q2BCRrC,8lCA0BA,EAAA,MAAA,EAAA,CAAA,8LAAA,CAAA,EAAA,CAAA;;2FDlBa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,WACpB,EAAE,EAAA,QAAA,EAAA,8lCAAA,EAAA,MAAA,EAAA,CAAA,8LAAA,CAAA,EAAA;;;AEJf;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentsmith.bgd/as-lib-pagination",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^19.1.1",
|
|
6
|
+
"@angular/core": "^19.1.1",
|
|
7
7
|
"font-awesome": "4.7.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
".": {
|
|
20
20
|
"types": "./index.d.ts",
|
|
21
|
-
"esm2022": "./esm2022/agentsmith.bgd-as-lib-pagination.mjs",
|
|
22
|
-
"esm": "./esm2022/agentsmith.bgd-as-lib-pagination.mjs",
|
|
23
21
|
"default": "./fesm2022/agentsmith.bgd-as-lib-pagination.mjs"
|
|
24
22
|
}
|
|
25
23
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdlbnRzbWl0aC5iZ2QtYXMtbGliLXBhZ2luYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9hcy1saWItcGFnaW5hdGlvbi9zcmMvYWdlbnRzbWl0aC5iZ2QtYXMtbGliLXBhZ2luYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Component, effect, input, output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class AsLibPaginationComponent {
|
|
4
|
-
first = input(false);
|
|
5
|
-
last = input(false);
|
|
6
|
-
align = input('');
|
|
7
|
-
enableLog = input(false);
|
|
8
|
-
pageChange = output();
|
|
9
|
-
arr = [];
|
|
10
|
-
totalPages = input(0);
|
|
11
|
-
page = input(0);
|
|
12
|
-
constructor() {
|
|
13
|
-
effect(() => {
|
|
14
|
-
console.log(`The count is:`, this.totalPages(), this.page());
|
|
15
|
-
this.calculatePager();
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
calculatePager() {
|
|
19
|
-
this.arr = [];
|
|
20
|
-
const midd = this.page() <= 4 || this.page() >= this.totalPages() - 4 ? Math.floor(this.totalPages() / 2) : 0;
|
|
21
|
-
for (let num = 0; num < this.totalPages(); num++) {
|
|
22
|
-
if (num < 2 || 2 >= Math.abs(this.page() - num) || 1 >= Math.abs(midd - num) || num === this.page() || num >= this.totalPages() - 2) {
|
|
23
|
-
this.arr.push(num);
|
|
24
|
-
}
|
|
25
|
-
else if (this.arr[this.arr.length - 1] !== -1) {
|
|
26
|
-
this.arr.push(-1);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
ngOnInit() {
|
|
31
|
-
this.calculatePager();
|
|
32
|
-
}
|
|
33
|
-
log(value, ...rest) {
|
|
34
|
-
if (this.enableLog() || localStorage.getItem('loggerEnable')) {
|
|
35
|
-
console.log(`AS Pagination -> ${value}`, ...rest);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AsLibPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.1", type: AsLibPaginationComponent, isStandalone: true, selector: "as-lib-pagination", inputs: { first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, last: { classPropertyName: "last", publicName: "last", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, enableLog: { classPropertyName: "enableLog", publicName: "enableLog", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<ul class=\"pagination {{ align() }}\">\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(0)\" class=\"page-link\"> <i class=\"fa fa-angle-double-left\"></i> </a\n ></li>\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() - 1)\" class=\"page-link\"><i class=\"fa fa-angle-left\"></i></a>\n </li>\n @for (x of arr; track x) {\n @if (x !== -1) {\n <li [class.active]=\"x === page()\" class=\"page-item d-none d-sm-block\">\n <a (click)=\"pageChange.emit(x)\" class=\"page-link\">{{ 1 + x }}</a>\n </li>\n } @else if (x === -1) {\n <li class=\"page-item disabled d-none d-sm-block\">\n <a class=\"page-link\">...</a>\n </li>\n }\n }\n\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() + 1)\" class=\"page-link\"><i class=\"fa fa-angle-right\"></i></a>\n </li>\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(totalPages() - 1)\" class=\"page-link\"> <i class=\"fa fa-angle-double-right\"></i> </a\n ></li>\n</ul>\n", styles: [".pagination.right{justify-content:flex-end}.pagination.center{justify-content:center}a.page-link{cursor:pointer}@media (max-width: 575px){ul.pagination{justify-content:center!important}}\n"] });
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AsLibPaginationComponent, decorators: [{
|
|
42
|
-
type: Component,
|
|
43
|
-
args: [{ selector: 'as-lib-pagination', standalone: true, imports: [], template: "<ul class=\"pagination {{ align() }}\">\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(0)\" class=\"page-link\"> <i class=\"fa fa-angle-double-left\"></i> </a\n ></li>\n <li [class.disabled]=\"first()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() - 1)\" class=\"page-link\"><i class=\"fa fa-angle-left\"></i></a>\n </li>\n @for (x of arr; track x) {\n @if (x !== -1) {\n <li [class.active]=\"x === page()\" class=\"page-item d-none d-sm-block\">\n <a (click)=\"pageChange.emit(x)\" class=\"page-link\">{{ 1 + x }}</a>\n </li>\n } @else if (x === -1) {\n <li class=\"page-item disabled d-none d-sm-block\">\n <a class=\"page-link\">...</a>\n </li>\n }\n }\n\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(page() + 1)\" class=\"page-link\"><i class=\"fa fa-angle-right\"></i></a>\n </li>\n <li [class.disabled]=\"last()\" class=\"page-item\"\n ><a (click)=\"pageChange.emit(totalPages() - 1)\" class=\"page-link\"> <i class=\"fa fa-angle-double-right\"></i> </a\n ></li>\n</ul>\n", styles: [".pagination.right{justify-content:flex-end}.pagination.center{justify-content:center}a.page-link{cursor:pointer}@media (max-width: 575px){ul.pagination{justify-content:center!important}}\n"] }]
|
|
44
|
-
}], ctorParameters: () => [] });
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXMtbGliLXBhZ2luYXRpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvYXMtbGliLXBhZ2luYXRpb24vc3JjL2xpYi9hcy1saWItcGFnaW5hdGlvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hcy1saWItcGFnaW5hdGlvbi9zcmMvbGliL2FzLWxpYi1wYWdpbmF0aW9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBU2pFLE1BQU0sT0FBTyx3QkFBd0I7SUFDbkMsS0FBSyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUNyQixJQUFJLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ3BCLEtBQUssR0FBRyxLQUFLLENBQXdELEVBQUUsQ0FBQyxDQUFDO0lBQ3pFLFNBQVMsR0FBRyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDekIsVUFBVSxHQUFHLE1BQU0sRUFBVSxDQUFDO0lBQzlCLEdBQUcsR0FBYSxFQUFFLENBQUM7SUFDbkIsVUFBVSxHQUFHLEtBQUssQ0FBUyxDQUFDLENBQUMsQ0FBQztJQUM5QixJQUFJLEdBQUcsS0FBSyxDQUFTLENBQUMsQ0FBQyxDQUFDO0lBRXhCO1FBQ0UsTUFBTSxDQUFDLEdBQUcsRUFBRTtZQUNWLE9B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";
|
|
3
|
-
export class AsLibPaginationService {
|
|
4
|
-
constructor() { }
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AsLibPaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AsLibPaginationService, providedIn: 'root' });
|
|
7
|
-
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: AsLibPaginationService, decorators: [{
|
|
9
|
-
type: Injectable,
|
|
10
|
-
args: [{
|
|
11
|
-
providedIn: 'root'
|
|
12
|
-
}]
|
|
13
|
-
}], ctorParameters: () => [] });
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXMtbGliLXBhZ2luYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FzLWxpYi1wYWdpbmF0aW9uL3NyYy9saWIvYXMtbGliLXBhZ2luYXRpb24uc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQyxNQUFNLE9BQU8sc0JBQXNCO0lBRWpDLGdCQUFnQixDQUFDO3VHQUZOLHNCQUFzQjsyR0FBdEIsc0JBQXNCLGNBRnJCLE1BQU07OzJGQUVQLHNCQUFzQjtrQkFIbEMsVUFBVTttQkFBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXG59KVxuZXhwb3J0IGNsYXNzIEFzTGliUGFnaW5hdGlvblNlcnZpY2Uge1xuXG4gIGNvbnN0cnVjdG9yKCkgeyB9XG59XG4iXX0=
|
package/esm2022/public-api.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of as-lib-pagination
|
|
3
|
-
*/
|
|
4
|
-
export * from './lib/as-lib-pagination.service';
|
|
5
|
-
export * from './lib/as-lib-pagination.component';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FzLWxpYi1wYWdpbmF0aW9uL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLG1DQUFtQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhcy1saWItcGFnaW5hdGlvblxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2FzLWxpYi1wYWdpbmF0aW9uLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYXMtbGliLXBhZ2luYXRpb24uY29tcG9uZW50JztcbiJdfQ==
|