monkey-front-core 0.0.133 → 0.0.136
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/esm2020/lib/core/interfaces/monkeyecx-token-credentials.mjs +1 -1
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +3 -3
- package/esm2020/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.mjs +11 -6
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +2 -1
- package/fesm2015/monkey-front-core.mjs +13 -7
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +13 -7
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/monkeyecx-token-credentials.d.ts +1 -0
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +1 -1
- package/lib/core/services/request-paged/monkeyecx-request-request-paged-handling.d.ts +2 -1
- package/monkey-front-core-0.0.136.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-core-0.0.133.tgz +0 -0
|
@@ -1742,12 +1742,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
1742
1742
|
}] } });
|
|
1743
1743
|
|
|
1744
1744
|
class MonkeyEcxRequestPagedHandling {
|
|
1745
|
-
constructor(
|
|
1746
|
-
this.
|
|
1747
|
-
this.
|
|
1745
|
+
constructor(url, pagedParams, links, samePage = false) {
|
|
1746
|
+
this.samePage = false;
|
|
1747
|
+
this.url = url;
|
|
1748
|
+
this.pagedParams = pagedParams || {
|
|
1748
1749
|
page: {},
|
|
1749
1750
|
};
|
|
1750
|
-
this.links =
|
|
1751
|
+
this.links = links;
|
|
1752
|
+
this.samePage = samePage;
|
|
1751
1753
|
}
|
|
1752
1754
|
handlePagedValuesFromApi(url = '') {
|
|
1753
1755
|
if (url.search('\\?') < 0)
|
|
@@ -1768,7 +1770,10 @@ class MonkeyEcxRequestPagedHandling {
|
|
|
1768
1770
|
return `${!hasInitialQueryParams ? '?' : '&'}page=${number || 0}&size=${size || 20}`;
|
|
1769
1771
|
}
|
|
1770
1772
|
getRequestWithPagedParams() {
|
|
1771
|
-
const { url, links } = this;
|
|
1773
|
+
const { url, links, samePage } = this;
|
|
1774
|
+
if (samePage && links.self) {
|
|
1775
|
+
return links.self.href;
|
|
1776
|
+
}
|
|
1772
1777
|
if (links && links.next) {
|
|
1773
1778
|
return links.next.href;
|
|
1774
1779
|
}
|
|
@@ -1944,9 +1949,9 @@ class MonkeyEcxCommonsService {
|
|
|
1944
1949
|
const { _embedded } = data;
|
|
1945
1950
|
return _embedded ? _embedded[field] : null;
|
|
1946
1951
|
}
|
|
1947
|
-
getNormalizedUrl(url) {
|
|
1952
|
+
getNormalizedUrl(url, samePage = false) {
|
|
1948
1953
|
const { __requestPaged, __links } = this;
|
|
1949
|
-
return new MonkeyEcxRequestPagedHandling(url, __requestPaged || {}, __links).getRequestWithPagedParams();
|
|
1954
|
+
return new MonkeyEcxRequestPagedHandling(url, __requestPaged || {}, __links, samePage).getRequestWithPagedParams();
|
|
1950
1955
|
}
|
|
1951
1956
|
clear(clearData) {
|
|
1952
1957
|
if (clearData) {
|
|
@@ -2706,6 +2711,7 @@ class MonkeyEcxTokenStorageService {
|
|
|
2706
2711
|
programType: '',
|
|
2707
2712
|
accessType: '',
|
|
2708
2713
|
role: '',
|
|
2714
|
+
ownerGovernmentId: '',
|
|
2709
2715
|
_clearIgnore: {
|
|
2710
2716
|
ignore: ['username', 'program', 'accessType'],
|
|
2711
2717
|
},
|