@dealpos-npm/ng-dealpos-library 21.0.21 → 21.0.23
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DecimalPipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { output, input,
|
|
3
|
+
import { output, input, signal, computed, Component } from '@angular/core';
|
|
4
4
|
|
|
5
5
|
class InfinitePaginationComponent {
|
|
6
6
|
/**
|
|
@@ -35,7 +35,7 @@ class InfinitePaginationComponent {
|
|
|
35
35
|
/**
|
|
36
36
|
* Number of items per page (page size). Default is 20.
|
|
37
37
|
*/
|
|
38
|
-
this.pageSize = 20;
|
|
38
|
+
this.pageSize = input(20, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
39
39
|
/**
|
|
40
40
|
* The total number of current rows.
|
|
41
41
|
*/
|
|
@@ -48,7 +48,59 @@ class InfinitePaginationComponent {
|
|
|
48
48
|
* Indicates whether to show all data or not.
|
|
49
49
|
*/
|
|
50
50
|
this.goToLast = input(false, ...(ngDevMode ? [{ debugName: "goToLast" }] : []));
|
|
51
|
-
this._detectedPageSize = 0;
|
|
51
|
+
this._detectedPageSize = signal(0, ...(ngDevMode ? [{ debugName: "_detectedPageSize" }] : []));
|
|
52
|
+
/**
|
|
53
|
+
* Start record number for current page.
|
|
54
|
+
* If `goToLast` is true and `totalData` is available, start is 1.
|
|
55
|
+
*/
|
|
56
|
+
this.startRecord = computed(() => {
|
|
57
|
+
const totalCurrent = this.getNumber(this.totalCurrentRow(), 0);
|
|
58
|
+
if (!totalCurrent || totalCurrent <= 0)
|
|
59
|
+
return 0;
|
|
60
|
+
if (this.getBool(this.goToLast()))
|
|
61
|
+
return this.getNumber(this.totalData(), 0) > 0 ? 1 : 0;
|
|
62
|
+
const pageNum = Math.max(1, this.getNumber(this.pageNumber(), 1));
|
|
63
|
+
const declaredPageSize = Math.max(1, this.getNumber(this.pageSize(), 20));
|
|
64
|
+
if (!this._detectedPageSize() && pageNum === 1 && totalCurrent > declaredPageSize) {
|
|
65
|
+
this._detectedPageSize.set(totalCurrent);
|
|
66
|
+
}
|
|
67
|
+
const pageSize = this._detectedPageSize() && (this._detectedPageSize() ?? 0) > declaredPageSize
|
|
68
|
+
? this._detectedPageSize()
|
|
69
|
+
: declaredPageSize;
|
|
70
|
+
return (Math.max(0, pageNum - 1) * (pageSize ?? 0)) + 1;
|
|
71
|
+
}, ...(ngDevMode ? [{ debugName: "startRecord" }] : []));
|
|
72
|
+
/**
|
|
73
|
+
* End record number for current page.
|
|
74
|
+
*/
|
|
75
|
+
this.endRecord = computed(() => {
|
|
76
|
+
const totalCurrent = this.getNumber(this.totalCurrentRow(), 0);
|
|
77
|
+
if (!totalCurrent || totalCurrent <= 0)
|
|
78
|
+
return 0;
|
|
79
|
+
if (this.getBool(this.goToLast()))
|
|
80
|
+
return this.getNumber(this.totalData(), 0) > 0 ? this.getNumber(this.totalData(), 0) : totalCurrent;
|
|
81
|
+
const pageNum = Math.max(1, this.getNumber(this.pageNumber(), 1));
|
|
82
|
+
const declaredPageSize = Math.max(1, this.getNumber(this.pageSize(), 20));
|
|
83
|
+
const pageSize = this._detectedPageSize() && (this._detectedPageSize() ?? 0) > declaredPageSize
|
|
84
|
+
? this._detectedPageSize()
|
|
85
|
+
: declaredPageSize;
|
|
86
|
+
const offset = (pageNum - 1) * (pageSize ?? 0);
|
|
87
|
+
let pageRowCount = 0;
|
|
88
|
+
if (totalCurrent <= (pageSize ?? 0)) {
|
|
89
|
+
pageRowCount = totalCurrent;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
pageRowCount = Math.max(0, totalCurrent - offset);
|
|
93
|
+
pageRowCount = Math.min(pageRowCount, pageSize ?? 0);
|
|
94
|
+
if (pageRowCount === 0) {
|
|
95
|
+
pageRowCount = Math.min(pageSize ?? 0, totalCurrent);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
let end = offset + pageRowCount;
|
|
99
|
+
const totalDataVal = this.getNumber(this.totalData(), 0);
|
|
100
|
+
if (totalDataVal > 0)
|
|
101
|
+
end = Math.min(end, totalDataVal);
|
|
102
|
+
return end;
|
|
103
|
+
}, ...(ngDevMode ? [{ debugName: "endRecord" }] : []));
|
|
52
104
|
// Component initialized
|
|
53
105
|
}
|
|
54
106
|
getNumber(value, fallback = 0) {
|
|
@@ -73,58 +125,6 @@ class InfinitePaginationComponent {
|
|
|
73
125
|
return false;
|
|
74
126
|
}
|
|
75
127
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Start record number for current page.
|
|
78
|
-
* If `goToLast` is true and `totalData` is available, start is 1.
|
|
79
|
-
*/
|
|
80
|
-
get startRecord() {
|
|
81
|
-
const totalCurrent = this.getNumber(this.totalCurrentRow, 0);
|
|
82
|
-
if (!totalCurrent || totalCurrent <= 0)
|
|
83
|
-
return 0;
|
|
84
|
-
if (this.getBool(this.goToLast))
|
|
85
|
-
return this.getNumber(this.totalData, 0) > 0 ? 1 : 0;
|
|
86
|
-
const pageNum = Math.max(1, this.getNumber(this.pageNumber, 1));
|
|
87
|
-
const declaredPageSize = Math.max(1, this.getNumber(this.pageSize, 20));
|
|
88
|
-
if (!this._detectedPageSize && pageNum === 1 && totalCurrent > declaredPageSize) {
|
|
89
|
-
this._detectedPageSize = totalCurrent;
|
|
90
|
-
}
|
|
91
|
-
const pageSize = this._detectedPageSize && this._detectedPageSize > declaredPageSize
|
|
92
|
-
? this._detectedPageSize
|
|
93
|
-
: declaredPageSize;
|
|
94
|
-
return (Math.max(0, pageNum - 1) * pageSize) + 1;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* End record number for current page.
|
|
98
|
-
*/
|
|
99
|
-
get endRecord() {
|
|
100
|
-
const totalCurrent = this.getNumber(this.totalCurrentRow, 0);
|
|
101
|
-
if (!totalCurrent || totalCurrent <= 0)
|
|
102
|
-
return 0;
|
|
103
|
-
if (this.getBool(this.goToLast))
|
|
104
|
-
return this.getNumber(this.totalData, 0) > 0 ? this.getNumber(this.totalData, 0) : totalCurrent;
|
|
105
|
-
const pageNum = Math.max(1, this.getNumber(this.pageNumber, 1));
|
|
106
|
-
const declaredPageSize = Math.max(1, this.getNumber(this.pageSize, 20));
|
|
107
|
-
const pageSize = this._detectedPageSize && this._detectedPageSize > declaredPageSize
|
|
108
|
-
? this._detectedPageSize
|
|
109
|
-
: declaredPageSize;
|
|
110
|
-
const offset = (pageNum - 1) * pageSize;
|
|
111
|
-
let pageRowCount = 0;
|
|
112
|
-
if (totalCurrent <= pageSize) {
|
|
113
|
-
pageRowCount = totalCurrent;
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
pageRowCount = Math.max(0, totalCurrent - offset);
|
|
117
|
-
pageRowCount = Math.min(pageRowCount, pageSize);
|
|
118
|
-
if (pageRowCount === 0) {
|
|
119
|
-
pageRowCount = Math.min(pageSize, totalCurrent);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
let end = offset + pageRowCount;
|
|
123
|
-
const totalDataVal = this.getNumber(this.totalData, 0);
|
|
124
|
-
if (totalDataVal > 0)
|
|
125
|
-
end = Math.min(end, totalDataVal);
|
|
126
|
-
return end;
|
|
127
|
-
}
|
|
128
128
|
/**
|
|
129
129
|
* Triggers the event to fetch the total data.
|
|
130
130
|
*/
|
|
@@ -145,14 +145,12 @@ class InfinitePaginationComponent {
|
|
|
145
145
|
this.concatAllData.emit();
|
|
146
146
|
}
|
|
147
147
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InfinitePaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InfinitePaginationComponent, isStandalone: true, selector: "infinite-pagination", inputs: { nextPageDisabled: { classPropertyName: "nextPageDisabled", publicName: "nextPageDisabled", isSignal: true, isRequired: false, transformFunction: null }, pageNumber: { classPropertyName: "pageNumber", publicName: "pageNumber", isSignal: true, isRequired: false, transformFunction: null }, totalData: { classPropertyName: "totalData", publicName: "totalData", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal:
|
|
148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InfinitePaginationComponent, isStandalone: true, selector: "infinite-pagination", inputs: { nextPageDisabled: { classPropertyName: "nextPageDisabled", publicName: "nextPageDisabled", isSignal: true, isRequired: false, transformFunction: null }, pageNumber: { classPropertyName: "pageNumber", publicName: "pageNumber", isSignal: true, isRequired: false, transformFunction: null }, totalData: { classPropertyName: "totalData", publicName: "totalData", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, totalCurrentRow: { classPropertyName: "totalCurrentRow", publicName: "totalCurrentRow", isSignal: true, isRequired: false, transformFunction: null }, isFetchTotalData: { classPropertyName: "isFetchTotalData", publicName: "isFetchTotalData", isSignal: true, isRequired: false, transformFunction: null }, goToLast: { classPropertyName: "goToLast", publicName: "goToLast", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fetchTotalData: "fetchTotalData", nextPage: "nextPage", concatAllData: "concatAllData" }, ngImport: i0, template: "<div class=\"d-flex justify-content-between mt-5\">\r\n <div class=\"me-auto d-sm-block collapse mt-3\">\r\n <div class=\"fw-bold fst-italic hidden-xxs\">\r\n Showing {{ startRecord() | number }} - {{ endRecord() | number }} of\r\n\r\n <ng-container>\r\n @if (!isFetchTotalData()) {\r\n <span style=\"cursor: pointer\" (click)=\"onFetchTotalData()\">\r\n <i\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Retrieve rows count\"\r\n class=\"border p-3\"\r\n >?</i\r\n >\r\n </span>\r\n }\r\n </ng-container>\r\n @if (isFetchTotalData()) {\r\n <ng-container>\r\n <span>{{ totalData() | number }}</span>\r\n </ng-container>\r\n } records ~ {{ pageNumber() | number }} Page\r\n </div>\r\n </div>\r\n\r\n @if (!nextPageDisabled() && !goToLast()) {\r\n <div class=\"btn-group\">\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onNextPage()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load next page\"\r\n >\r\n <i class=\"fa-solid fa-arrow-right\"></i> Next\r\n </a>\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onConcatAllData()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load all products\"\r\n >\r\n <i class=\"fa-solid fa-share\"></i> Show All\r\n </a>\r\n </div>\r\n }\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "pipe", type: DecimalPipe, name: "number" }] }); }
|
|
149
149
|
}
|
|
150
150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InfinitePaginationComponent, decorators: [{
|
|
151
151
|
type: Component,
|
|
152
|
-
args: [{ selector: 'infinite-pagination', imports: [DecimalPipe], template: "<div class=\"d-flex justify-content-between mt-5\">\r\n <div class=\"me-auto d-sm-block collapse mt-3\">\r\n <div class=\"fw-bold fst-italic hidden-xxs\">\r\n Showing {{ startRecord | number }} - {{ endRecord | number }} of\r\n\r\n <ng-container>\r\n @if (!isFetchTotalData()) {\r\n <span style=\"cursor: pointer\" (click)=\"onFetchTotalData()\">\r\n <i\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Retrieve rows count\"\r\n class=\"border p-3\"\r\n >?</i\r\n >\r\n </span>\r\n }\r\n </ng-container>\r\n @if (isFetchTotalData()) {\r\n <ng-container>\r\n <span>{{ totalData() | number }}</span>\r\n </ng-container>\r\n } records ~ {{ pageNumber() | number }} Page\r\n </div>\r\n </div>\r\n\r\n @if (!nextPageDisabled() && !goToLast()) {\r\n <div class=\"btn-group\">\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onNextPage()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load next page\"\r\n >\r\n <i class=\"fa-solid fa-arrow-right\"></i> Next\r\n </a>\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onConcatAllData()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load all products\"\r\n >\r\n <i class=\"fa-solid fa-share\"></i> Show All\r\n </a>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
153
|
-
}], ctorParameters: () => [], propDecorators: { fetchTotalData: [{ type: i0.Output, args: ["fetchTotalData"] }], nextPage: [{ type: i0.Output, args: ["nextPage"] }], concatAllData: [{ type: i0.Output, args: ["concatAllData"] }], nextPageDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPageDisabled", required: false }] }], pageNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageNumber", required: false }] }], totalData: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalData", required: false }] }], pageSize: [{
|
|
154
|
-
type: Input
|
|
155
|
-
}], totalCurrentRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalCurrentRow", required: false }] }], isFetchTotalData: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFetchTotalData", required: false }] }], goToLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "goToLast", required: false }] }] } });
|
|
152
|
+
args: [{ selector: 'infinite-pagination', imports: [DecimalPipe], template: "<div class=\"d-flex justify-content-between mt-5\">\r\n <div class=\"me-auto d-sm-block collapse mt-3\">\r\n <div class=\"fw-bold fst-italic hidden-xxs\">\r\n Showing {{ startRecord() | number }} - {{ endRecord() | number }} of\r\n\r\n <ng-container>\r\n @if (!isFetchTotalData()) {\r\n <span style=\"cursor: pointer\" (click)=\"onFetchTotalData()\">\r\n <i\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Retrieve rows count\"\r\n class=\"border p-3\"\r\n >?</i\r\n >\r\n </span>\r\n }\r\n </ng-container>\r\n @if (isFetchTotalData()) {\r\n <ng-container>\r\n <span>{{ totalData() | number }}</span>\r\n </ng-container>\r\n } records ~ {{ pageNumber() | number }} Page\r\n </div>\r\n </div>\r\n\r\n @if (!nextPageDisabled() && !goToLast()) {\r\n <div class=\"btn-group\">\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onNextPage()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load next page\"\r\n >\r\n <i class=\"fa-solid fa-arrow-right\"></i> Next\r\n </a>\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onConcatAllData()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load all products\"\r\n >\r\n <i class=\"fa-solid fa-share\"></i> Show All\r\n </a>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
153
|
+
}], ctorParameters: () => [], propDecorators: { fetchTotalData: [{ type: i0.Output, args: ["fetchTotalData"] }], nextPage: [{ type: i0.Output, args: ["nextPage"] }], concatAllData: [{ type: i0.Output, args: ["concatAllData"] }], nextPageDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPageDisabled", required: false }] }], pageNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageNumber", required: false }] }], totalData: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalData", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], totalCurrentRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalCurrentRow", required: false }] }], isFetchTotalData: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFetchTotalData", required: false }] }], goToLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "goToLast", required: false }] }] } });
|
|
156
154
|
|
|
157
155
|
/**
|
|
158
156
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dealpos-npm-ng-dealpos-library-components-infinite-pagination.mjs","sources":["../../../projects/dealpos-npm/ng-dealpos-library/components/infinite-pagination/src/infinite-pagination.component.ts","../../../projects/dealpos-npm/ng-dealpos-library/components/infinite-pagination/src/infinite-pagination.component.html","../../../projects/dealpos-npm/ng-dealpos-library/components/infinite-pagination/dealpos-npm-ng-dealpos-library-components-infinite-pagination.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\r\nimport { Component, Input, input, output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'infinite-pagination',\r\n templateUrl: './infinite-pagination.component.html',\r\n styleUrls: ['./infinite-pagination.component.scss'],\r\n imports: [DecimalPipe],\r\n})\r\nexport class InfinitePaginationComponent {\r\n /**\r\n * Event emitter for fetching total data.\r\n * Emits a void event when the total data needs to be fetched.\r\n */\r\n readonly fetchTotalData = output<void>();\r\n /**\r\n * Emits an event when the next page is requested.\r\n */\r\n readonly nextPage = output<void>();\r\n /**\r\n * Event emitter for concatenating all data.\r\n */\r\n readonly concatAllData = output<void>();\r\n\r\n /**\r\n * Indicates whether the next page button is disabled.\r\n */\r\n readonly nextPageDisabled = input(false);\r\n /**\r\n * The current page number for the infinite pagination component.\r\n */\r\n readonly pageNumber = input(1);\r\n /**\r\n * The total number of data items.\r\n */\r\n readonly totalData = input(0);\r\n /**\r\n * Number of items per page (page size). Default is 20.\r\n */\r\n @Input() pageSize = 20;\r\n /**\r\n * The total number of current rows.\r\n */\r\n readonly totalCurrentRow = input(0);\r\n /**\r\n * Indicates whether to fetch total data or not.\r\n */\r\n readonly isFetchTotalData = input(false);\r\n /**\r\n * Indicates whether to show all data or not.\r\n */\r\n readonly goToLast = input(false);\r\n /**\r\n * Indicates whether the total data is being fetched.\r\n */\r\n\r\n constructor() {\r\n // Component initialized\r\n }\r\n\r\n private _detectedPageSize = 0;\r\n\r\n private getNumber(value: any, fallback = 0): number {\r\n try {\r\n if (typeof value === 'function') {\r\n const v = value();\r\n return typeof v === 'number' ? v : Number(v) || fallback;\r\n }\r\n return typeof value === 'number' ? value : Number(value) || fallback;\r\n } catch {\r\n return fallback;\r\n }\r\n }\r\n\r\n private getBool(value: any): boolean {\r\n try {\r\n if (typeof value === 'function') return !!value();\r\n return !!value;\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Start record number for current page.\r\n * If `goToLast` is true and `totalData` is available, start is 1.\r\n */\r\n public get startRecord(): number {\r\n const totalCurrent = this.getNumber(this.totalCurrentRow, 0);\r\n if (!totalCurrent || totalCurrent <= 0) return 0;\r\n if (this.getBool(this.goToLast)) return this.getNumber(this.totalData, 0) > 0 ? 1 : 0;\r\n\r\n const pageNum = Math.max(1, this.getNumber(this.pageNumber, 1));\r\n const declaredPageSize = Math.max(1, this.getNumber(this.pageSize, 20));\r\n\r\n if (!this._detectedPageSize && pageNum === 1 && totalCurrent > declaredPageSize) {\r\n this._detectedPageSize = totalCurrent;\r\n }\r\n\r\n const pageSize = this._detectedPageSize && this._detectedPageSize > declaredPageSize\r\n ? this._detectedPageSize\r\n : declaredPageSize;\r\n\r\n return (Math.max(0, pageNum - 1) * pageSize) + 1;\r\n }\r\n\r\n /**\r\n * End record number for current page.\r\n */\r\n public get endRecord(): number {\r\n const totalCurrent = this.getNumber(this.totalCurrentRow, 0);\r\n if (!totalCurrent || totalCurrent <= 0) return 0;\r\n if (this.getBool(this.goToLast)) return this.getNumber(this.totalData, 0) > 0 ? this.getNumber(this.totalData, 0) : totalCurrent;\r\n\r\n const pageNum = Math.max(1, this.getNumber(this.pageNumber, 1));\r\n const declaredPageSize = Math.max(1, this.getNumber(this.pageSize, 20));\r\n\r\n const pageSize = this._detectedPageSize && this._detectedPageSize > declaredPageSize\r\n ? this._detectedPageSize\r\n : declaredPageSize;\r\n\r\n const offset = (pageNum - 1) * pageSize;\r\n\r\n let pageRowCount = 0;\r\n\r\n if (totalCurrent <= pageSize) {\r\n pageRowCount = totalCurrent;\r\n } else {\r\n pageRowCount = Math.max(0, totalCurrent - offset);\r\n pageRowCount = Math.min(pageRowCount, pageSize);\r\n if (pageRowCount === 0) {\r\n pageRowCount = Math.min(pageSize, totalCurrent);\r\n }\r\n }\r\n\r\n let end = offset + pageRowCount;\r\n const totalDataVal = this.getNumber(this.totalData, 0);\r\n if (totalDataVal > 0) end = Math.min(end, totalDataVal);\r\n return end;\r\n }\r\n /**\r\n * Triggers the event to fetch the total data.\r\n */\r\n public onFetchTotalData() {\r\n this.fetchTotalData.emit();\r\n }\r\n\r\n /**\r\n * Handles the event when the next page button is clicked.\r\n * Emits the `nextPage` event.\r\n */\r\n public onNextPage() {\r\n this.nextPage.emit();\r\n }\r\n\r\n /**\r\n * Emits an event to concatenate all data and sets the `showAllData` flag to true.\r\n */\r\n public onConcatAllData() {\r\n this.concatAllData.emit();\r\n }\r\n}\r\n","<div class=\"d-flex justify-content-between mt-5\">\r\n <div class=\"me-auto d-sm-block collapse mt-3\">\r\n <div class=\"fw-bold fst-italic hidden-xxs\">\r\n Showing {{ startRecord | number }} - {{ endRecord | number }} of\r\n\r\n <ng-container>\r\n @if (!isFetchTotalData()) {\r\n <span style=\"cursor: pointer\" (click)=\"onFetchTotalData()\">\r\n <i\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Retrieve rows count\"\r\n class=\"border p-3\"\r\n >?</i\r\n >\r\n </span>\r\n }\r\n </ng-container>\r\n @if (isFetchTotalData()) {\r\n <ng-container>\r\n <span>{{ totalData() | number }}</span>\r\n </ng-container>\r\n } records ~ {{ pageNumber() | number }} Page\r\n </div>\r\n </div>\r\n\r\n @if (!nextPageDisabled() && !goToLast()) {\r\n <div class=\"btn-group\">\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onNextPage()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load next page\"\r\n >\r\n <i class=\"fa-solid fa-arrow-right\"></i> Next\r\n </a>\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onConcatAllData()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load all products\"\r\n >\r\n <i class=\"fa-solid fa-share\"></i> Show All\r\n </a>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MASa,2BAA2B,CAAA;AA2CtC;;AAEG;AAEH,IAAA,WAAA,GAAA;AA9CA;;;AAGG;QACM,IAAA,CAAA,cAAc,GAAG,MAAM,EAAQ;AACxC;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAQ;AAClC;;AAEG;QACM,IAAA,CAAA,aAAa,GAAG,MAAM,EAAQ;AAEvC;;AAEG;AACM,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,4DAAC;AACxC;;AAEG;AACM,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,CAAC,sDAAC;AAC9B;;AAEG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,CAAC,qDAAC;AAC7B;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,EAAE;AACtB;;AAEG;AACM,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,CAAC,2DAAC;AACnC;;AAEG;AACM,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,4DAAC;AACxC;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,oDAAC;QASxB,IAAA,CAAA,iBAAiB,GAAG,CAAC;;IAF7B;AAIQ,IAAA,SAAS,CAAC,KAAU,EAAE,QAAQ,GAAG,CAAC,EAAA;AACxC,QAAA,IAAI;AACF,YAAA,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;AAC/B,gBAAA,MAAM,CAAC,GAAG,KAAK,EAAE;AACjB,gBAAA,OAAO,OA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GtB,CAAC,WAAW,CAAC,EAAA,QAAA,EAAA,y/CAAA,EAAA;;sBAgCrB;;;AEvCH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"dealpos-npm-ng-dealpos-library-components-infinite-pagination.mjs","sources":["../../../projects/dealpos-npm/ng-dealpos-library/components/infinite-pagination/src/infinite-pagination.component.ts","../../../projects/dealpos-npm/ng-dealpos-library/components/infinite-pagination/src/infinite-pagination.component.html","../../../projects/dealpos-npm/ng-dealpos-library/components/infinite-pagination/dealpos-npm-ng-dealpos-library-components-infinite-pagination.ts"],"sourcesContent":["import { DecimalPipe } from '@angular/common';\r\nimport { Component, computed, input, output, signal } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'infinite-pagination',\r\n templateUrl: './infinite-pagination.component.html',\r\n styleUrls: ['./infinite-pagination.component.scss'],\r\n imports: [DecimalPipe],\r\n})\r\nexport class InfinitePaginationComponent {\r\n /**\r\n * Event emitter for fetching total data.\r\n * Emits a void event when the total data needs to be fetched.\r\n */\r\n readonly fetchTotalData = output<void>();\r\n /**\r\n * Emits an event when the next page is requested.\r\n */\r\n readonly nextPage = output<void>();\r\n /**\r\n * Event emitter for concatenating all data.\r\n */\r\n readonly concatAllData = output<void>();\r\n\r\n /**\r\n * Indicates whether the next page button is disabled.\r\n */\r\n readonly nextPageDisabled = input(false);\r\n /**\r\n * The current page number for the infinite pagination component.\r\n */\r\n readonly pageNumber = input(1);\r\n /**\r\n * The total number of data items.\r\n */\r\n readonly totalData = input(0);\r\n /**\r\n * Number of items per page (page size). Default is 20.\r\n */\r\n readonly pageSize = input(20);\r\n /**\r\n * The total number of current rows.\r\n */\r\n readonly totalCurrentRow = input(0);\r\n /**\r\n * Indicates whether to fetch total data or not.\r\n */\r\n readonly isFetchTotalData = input(false);\r\n /**\r\n * Indicates whether to show all data or not.\r\n */\r\n readonly goToLast = input(false);\r\n /**\r\n * Indicates whether the total data is being fetched.\r\n */\r\n\r\n constructor() {\r\n // Component initialized\r\n }\r\n\r\n private _detectedPageSize = signal<number | null>(0);\r\n\r\n private getNumber(value: any, fallback = 0): number {\r\n try {\r\n if (typeof value === 'function') {\r\n const v = value();\r\n return typeof v === 'number' ? v : Number(v) || fallback;\r\n }\r\n return typeof value === 'number' ? value : Number(value) || fallback;\r\n } catch {\r\n return fallback;\r\n }\r\n }\r\n\r\n private getBool(value: any): boolean {\r\n try {\r\n if (typeof value === 'function') return !!value();\r\n return !!value;\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Start record number for current page.\r\n * If `goToLast` is true and `totalData` is available, start is 1.\r\n */\r\n public startRecord = computed(() => {\r\n const totalCurrent = this.getNumber(this.totalCurrentRow(), 0);\r\n if (!totalCurrent || totalCurrent <= 0) return 0;\r\n if (this.getBool(this.goToLast())) return this.getNumber(this.totalData(), 0) > 0 ? 1 : 0;\r\n\r\n const pageNum = Math.max(1, this.getNumber(this.pageNumber(), 1));\r\n const declaredPageSize = Math.max(1, this.getNumber(this.pageSize(), 20));\r\n\r\n if (!this._detectedPageSize() && pageNum === 1 && totalCurrent > declaredPageSize) {\r\n this._detectedPageSize.set(totalCurrent);\r\n }\r\n\r\n const pageSize = this._detectedPageSize() && (this._detectedPageSize() ?? 0) > declaredPageSize\r\n ? this._detectedPageSize()\r\n : declaredPageSize;\r\n\r\n return (Math.max(0, pageNum - 1) * (pageSize ?? 0)) + 1;\r\n });\r\n\r\n /**\r\n * End record number for current page.\r\n */\r\n public endRecord = computed(() => {\r\n const totalCurrent = this.getNumber(this.totalCurrentRow(), 0);\r\n if (!totalCurrent || totalCurrent <= 0) return 0;\r\n if (this.getBool(this.goToLast())) return this.getNumber(this.totalData(), 0) > 0 ? this.getNumber(this.totalData(), 0) : totalCurrent;\r\n\r\n const pageNum = Math.max(1, this.getNumber(this.pageNumber(), 1));\r\n const declaredPageSize = Math.max(1, this.getNumber(this.pageSize(), 20));\r\n\r\n const pageSize = this._detectedPageSize() && (this._detectedPageSize() ?? 0) > declaredPageSize\r\n ? this._detectedPageSize()\r\n : declaredPageSize;\r\n\r\n const offset = (pageNum - 1) * (pageSize ?? 0);\r\n\r\n let pageRowCount = 0;\r\n\r\n if (totalCurrent <= (pageSize ?? 0)) {\r\n pageRowCount = totalCurrent;\r\n } else {\r\n pageRowCount = Math.max(0, totalCurrent - offset);\r\n pageRowCount = Math.min(pageRowCount, pageSize ?? 0);\r\n if (pageRowCount === 0) {\r\n pageRowCount = Math.min(pageSize ?? 0, totalCurrent);\r\n }\r\n }\r\n\r\n let end = offset + pageRowCount;\r\n const totalDataVal = this.getNumber(this.totalData(), 0);\r\n if (totalDataVal > 0) end = Math.min(end, totalDataVal);\r\n return end;\r\n });\r\n /**\r\n * Triggers the event to fetch the total data.\r\n */\r\n public onFetchTotalData() {\r\n this.fetchTotalData.emit();\r\n }\r\n\r\n /**\r\n * Handles the event when the next page button is clicked.\r\n * Emits the `nextPage` event.\r\n */\r\n public onNextPage() {\r\n this.nextPage.emit();\r\n }\r\n\r\n /**\r\n * Emits an event to concatenate all data and sets the `showAllData` flag to true.\r\n */\r\n public onConcatAllData() {\r\n this.concatAllData.emit();\r\n }\r\n}\r\n","<div class=\"d-flex justify-content-between mt-5\">\r\n <div class=\"me-auto d-sm-block collapse mt-3\">\r\n <div class=\"fw-bold fst-italic hidden-xxs\">\r\n Showing {{ startRecord() | number }} - {{ endRecord() | number }} of\r\n\r\n <ng-container>\r\n @if (!isFetchTotalData()) {\r\n <span style=\"cursor: pointer\" (click)=\"onFetchTotalData()\">\r\n <i\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Retrieve rows count\"\r\n class=\"border p-3\"\r\n >?</i\r\n >\r\n </span>\r\n }\r\n </ng-container>\r\n @if (isFetchTotalData()) {\r\n <ng-container>\r\n <span>{{ totalData() | number }}</span>\r\n </ng-container>\r\n } records ~ {{ pageNumber() | number }} Page\r\n </div>\r\n </div>\r\n\r\n @if (!nextPageDisabled() && !goToLast()) {\r\n <div class=\"btn-group\">\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onNextPage()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load next page\"\r\n >\r\n <i class=\"fa-solid fa-arrow-right\"></i> Next\r\n </a>\r\n <a\r\n role=\"button\"\r\n class=\"btn btn-outline-secondary btn-sm text-primary\"\r\n (click)=\"onConcatAllData()\"\r\n matTooltipPosition=\"above\"\r\n matTooltip=\"Load all products\"\r\n >\r\n <i class=\"fa-solid fa-share\"></i> Show All\r\n </a>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MASa,2BAA2B,CAAA;AA2CtC;;AAEG;AAEH,IAAA,WAAA,GAAA;AA9CA;;;AAGG;QACM,IAAA,CAAA,cAAc,GAAG,MAAM,EAAQ;AACxC;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAQ;AAClC;;AAEG;QACM,IAAA,CAAA,aAAa,GAAG,MAAM,EAAQ;AAEvC;;AAEG;AACM,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,4DAAC;AACxC;;AAEG;AACM,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,CAAC,sDAAC;AAC9B;;AAEG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,CAAC,qDAAC;AAC7B;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,EAAE,oDAAC;AAC7B;;AAEG;AACM,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,CAAC,2DAAC;AACnC;;AAEG;AACM,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,4DAAC;AACxC;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,oDAAC;AASxB,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAgB,CAAC,6DAA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AA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTxC,6/CAgDA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EDzCY,WAAW,EAAA,IAAA,EAAA,QAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAEV,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;+BACE,qBAAqB,EAAA,OAAA,EAGtB,CAAC,WAAW,CAAC,EAAA,QAAA,EAAA,6/CAAA,EAAA;;;AEPxB;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dealpos-npm/ng-dealpos-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.23",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^21.0.5",
|
|
6
6
|
"@angular/core": "^21.0.5",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"autonumeric": "^4.10.9",
|
|
25
25
|
"moment": "^2.30.1",
|
|
26
26
|
"ngx-toastr": "^19.1.0",
|
|
27
|
-
"primeng": "^
|
|
27
|
+
"primeng": "^21.2.0",
|
|
28
28
|
"primeicons": "^7.0.0",
|
|
29
29
|
"papaparse": "^5.5.3",
|
|
30
|
-
"simple-keyboard": "^3.8.
|
|
30
|
+
"simple-keyboard": "^3.8.93"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"tslib": "^2.3.0"
|
|
@@ -29,7 +29,7 @@ declare class InfinitePaginationComponent {
|
|
|
29
29
|
/**
|
|
30
30
|
* Number of items per page (page size). Default is 20.
|
|
31
31
|
*/
|
|
32
|
-
pageSize: number
|
|
32
|
+
readonly pageSize: _angular_core.InputSignal<number>;
|
|
33
33
|
/**
|
|
34
34
|
* The total number of current rows.
|
|
35
35
|
*/
|
|
@@ -53,11 +53,11 @@ declare class InfinitePaginationComponent {
|
|
|
53
53
|
* Start record number for current page.
|
|
54
54
|
* If `goToLast` is true and `totalData` is available, start is 1.
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
startRecord: _angular_core.Signal<number>;
|
|
57
57
|
/**
|
|
58
58
|
* End record number for current page.
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
endRecord: _angular_core.Signal<number>;
|
|
61
61
|
/**
|
|
62
62
|
* Triggers the event to fetch the total data.
|
|
63
63
|
*/
|
|
@@ -72,7 +72,7 @@ declare class InfinitePaginationComponent {
|
|
|
72
72
|
*/
|
|
73
73
|
onConcatAllData(): void;
|
|
74
74
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InfinitePaginationComponent, never>;
|
|
75
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InfinitePaginationComponent, "infinite-pagination", never, { "nextPageDisabled": { "alias": "nextPageDisabled"; "required": false; "isSignal": true; }; "pageNumber": { "alias": "pageNumber"; "required": false; "isSignal": true; }; "totalData": { "alias": "totalData"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalCurrentRow": { "alias": "totalCurrentRow"; "required": false; "isSignal": true; }; "isFetchTotalData": { "alias": "isFetchTotalData"; "required": false; "isSignal": true; }; "goToLast": { "alias": "goToLast"; "required": false; "isSignal": true; }; }, { "fetchTotalData": "fetchTotalData"; "nextPage": "nextPage"; "concatAllData": "concatAllData"; }, never, never, true, never>;
|
|
75
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InfinitePaginationComponent, "infinite-pagination", never, { "nextPageDisabled": { "alias": "nextPageDisabled"; "required": false; "isSignal": true; }; "pageNumber": { "alias": "pageNumber"; "required": false; "isSignal": true; }; "totalData": { "alias": "totalData"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "totalCurrentRow": { "alias": "totalCurrentRow"; "required": false; "isSignal": true; }; "isFetchTotalData": { "alias": "isFetchTotalData"; "required": false; "isSignal": true; }; "goToLast": { "alias": "goToLast"; "required": false; "isSignal": true; }; }, { "fetchTotalData": "fetchTotalData"; "nextPage": "nextPage"; "concatAllData": "concatAllData"; }, never, never, true, never>;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export { InfinitePaginationComponent };
|