@kiwiproject/kiwi-js 0.6.1 → 0.7.0
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.
|
@@ -44,6 +44,10 @@ export declare class KiwiPage {
|
|
|
44
44
|
* Allows adjustment for instance where pagination starts with one instead of zero.
|
|
45
45
|
*/
|
|
46
46
|
pagingStartsWith: number;
|
|
47
|
+
/**
|
|
48
|
+
* Optional extra supplementary data related to the page
|
|
49
|
+
*/
|
|
50
|
+
supplementaryData: object;
|
|
47
51
|
constructor(content: object[], size: number, number: number, numberOfElements: number, totalPages: number, totalElements: number, sort: KiwiSort);
|
|
48
52
|
static of(pageNum: number, limit: number, total: number, contentList: object[]): KiwiPage;
|
|
49
53
|
addKiwiSort(sort: KiwiSort): this;
|
|
@@ -52,4 +56,5 @@ export declare class KiwiPage {
|
|
|
52
56
|
isFirst(): boolean;
|
|
53
57
|
isLast(): boolean;
|
|
54
58
|
isSorted(): boolean;
|
|
59
|
+
addSupplementaryData(supplementaryData: object): this;
|
|
55
60
|
}
|
package/dist/search/kiwi-page.js
CHANGED
|
@@ -17,6 +17,10 @@ class KiwiPage {
|
|
|
17
17
|
* Allows adjustment for instance where pagination starts with one instead of zero.
|
|
18
18
|
*/
|
|
19
19
|
this.pagingStartsWith = 0;
|
|
20
|
+
/**
|
|
21
|
+
* Optional extra supplementary data related to the page
|
|
22
|
+
*/
|
|
23
|
+
this.supplementaryData = {};
|
|
20
24
|
this.content = content;
|
|
21
25
|
this.size = size;
|
|
22
26
|
this.number = number;
|
|
@@ -54,5 +58,9 @@ class KiwiPage {
|
|
|
54
58
|
isSorted() {
|
|
55
59
|
return this.sort !== undefined && this.sort !== null;
|
|
56
60
|
}
|
|
61
|
+
addSupplementaryData(supplementaryData) {
|
|
62
|
+
this.supplementaryData = supplementaryData;
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
exports.KiwiPage = KiwiPage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiwiproject/kiwi-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "KiwiJS is a utility library. It contains a variety of utilities that we have built over time and find useful. Most of these utilities are ports from the Java Kiwi library.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"testPathIgnorePatterns": ["<rootDir>/__tests__/__utils__", "<rootDir>/node_modules/"]
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"express": "
|
|
17
|
+
"express": "4.18.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@babel/core": "
|
|
21
|
-
"@babel/preset-env": "
|
|
22
|
-
"@babel/preset-typescript": "
|
|
23
|
-
"@jest/globals": "
|
|
24
|
-
"babel-jest": "
|
|
25
|
-
"jest": "
|
|
20
|
+
"@babel/core": "7.22.6",
|
|
21
|
+
"@babel/preset-env": "7.22.6",
|
|
22
|
+
"@babel/preset-typescript": "7.22.5",
|
|
23
|
+
"@jest/globals": "29.6.0",
|
|
24
|
+
"babel-jest": "29.6.0",
|
|
25
|
+
"jest": "29.6.0"
|
|
26
26
|
}
|
|
27
27
|
}
|