monkey-front-core 0.0.37 → 0.0.41
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/decorators/monkeyecx-decorators.mjs +3 -1
- package/esm2020/lib/core/interfaces/index.mjs +2 -1
- package/esm2020/lib/core/interfaces/monkeyecx-support-options.mjs +2 -0
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +19 -21
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +1 -5
- package/esm2020/lib/core/services/error/monkeyecx-error-handling.service.mjs +4 -2
- package/esm2020/lib/core/services/error/monkeyecx-http-error-handling.service.mjs +1 -2
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +5 -2
- package/fesm2015/monkey-front-core.mjs +23 -22
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +26 -26
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/index.d.ts +1 -0
- package/lib/core/interfaces/monkeyecx-support-options.d.ts +4 -0
- package/monkey-front-core-0.0.41.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.37.tgz +0 -0
|
@@ -1401,6 +1401,8 @@ function MonkeyEcxCoreService(params) {
|
|
|
1401
1401
|
const method = propertyDescriptor.value;
|
|
1402
1402
|
propertyDescriptor.value = function (...args) {
|
|
1403
1403
|
const context = this;
|
|
1404
|
+
console.log('context');
|
|
1405
|
+
console.log(context);
|
|
1404
1406
|
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1405
1407
|
context?.monkeyecxService?.monkeyecxHandlingService?.clearAll();
|
|
1406
1408
|
context?.monkeyecxService?.monkeyecxHandlingService?.setMonkeyEcxServiceCredentials(params);
|
|
@@ -1767,7 +1769,7 @@ class MonkeyEcxCommonsService {
|
|
|
1767
1769
|
}
|
|
1768
1770
|
if (this.otherArgs?.router) {
|
|
1769
1771
|
const { clearOnChangeRoute } = this.otherArgs?.schedule?.options || {
|
|
1770
|
-
clearOnChangeRoute: false
|
|
1772
|
+
clearOnChangeRoute: false,
|
|
1771
1773
|
};
|
|
1772
1774
|
this.otherArgs.router.events
|
|
1773
1775
|
.pipe(filter((event) => {
|
|
@@ -1819,21 +1821,21 @@ class MonkeyEcxCommonsService {
|
|
|
1819
1821
|
403: 'forbidden',
|
|
1820
1822
|
404: 'not-found',
|
|
1821
1823
|
500: 'service-problems',
|
|
1822
|
-
503: 'service-problems'
|
|
1824
|
+
503: 'service-problems',
|
|
1823
1825
|
};
|
|
1824
1826
|
if (!router) {
|
|
1825
1827
|
console.error('Router must be declared');
|
|
1826
1828
|
}
|
|
1827
1829
|
else {
|
|
1828
1830
|
router?.navigate([`/app/pages/${routes[statusCode]}`.toLowerCase()], {
|
|
1829
|
-
skipLocationChange: true
|
|
1831
|
+
skipLocationChange: true,
|
|
1830
1832
|
});
|
|
1831
1833
|
}
|
|
1832
1834
|
}
|
|
1833
1835
|
setPage(requestPaged) {
|
|
1834
1836
|
this.__requestPaged = {
|
|
1835
1837
|
...this.__requestPaged,
|
|
1836
|
-
...requestPaged
|
|
1838
|
+
...requestPaged,
|
|
1837
1839
|
};
|
|
1838
1840
|
return this;
|
|
1839
1841
|
}
|
|
@@ -1847,8 +1849,8 @@ class MonkeyEcxCommonsService {
|
|
|
1847
1849
|
...this.__requestPaged,
|
|
1848
1850
|
page: {
|
|
1849
1851
|
...page,
|
|
1850
|
-
number: number + 1
|
|
1851
|
-
}
|
|
1852
|
+
number: number + 1,
|
|
1853
|
+
},
|
|
1852
1854
|
};
|
|
1853
1855
|
return true;
|
|
1854
1856
|
}
|
|
@@ -1882,9 +1884,9 @@ class MonkeyEcxCommonsService {
|
|
|
1882
1884
|
this.flagValidator = false;
|
|
1883
1885
|
}
|
|
1884
1886
|
resolve(route, state, otherArgs) {
|
|
1885
|
-
this.__data = null;
|
|
1886
|
-
this.__page = null;
|
|
1887
|
-
this.__requestPaged = null;
|
|
1887
|
+
//this.__data = null;
|
|
1888
|
+
//this.__page = null;
|
|
1889
|
+
//this.__requestPaged = null;
|
|
1888
1890
|
this.flagValidator = true;
|
|
1889
1891
|
if (this.tokenStorage) {
|
|
1890
1892
|
this.__tokenCredentials = this.tokenStorage.getToken();
|
|
@@ -1904,8 +1906,8 @@ class MonkeyEcxCommonsService {
|
|
|
1904
1906
|
this.setPage({
|
|
1905
1907
|
page: {
|
|
1906
1908
|
number: 0,
|
|
1907
|
-
size: 10
|
|
1908
|
-
}
|
|
1909
|
+
size: 10,
|
|
1910
|
+
},
|
|
1909
1911
|
});
|
|
1910
1912
|
}
|
|
1911
1913
|
if (otherArgs?.callbackPagination) {
|
|
@@ -1913,8 +1915,8 @@ class MonkeyEcxCommonsService {
|
|
|
1913
1915
|
if (!this.__onLoadingInProgress$.value) {
|
|
1914
1916
|
const hasMorePages = this.setPage({
|
|
1915
1917
|
page: {
|
|
1916
|
-
...this.__page
|
|
1917
|
-
}
|
|
1918
|
+
...this.__page,
|
|
1919
|
+
},
|
|
1918
1920
|
}).nextPage();
|
|
1919
1921
|
if (hasMorePages && otherArgs?.callbackPagination) {
|
|
1920
1922
|
otherArgs.callbackPagination();
|
|
@@ -1956,7 +1958,7 @@ class MonkeyEcxCommonsService {
|
|
|
1956
1958
|
getHTTPHeaderApplicationPDF() {
|
|
1957
1959
|
return {
|
|
1958
1960
|
observe: 'response',
|
|
1959
|
-
responseType: 'blob'
|
|
1961
|
+
responseType: 'blob',
|
|
1960
1962
|
};
|
|
1961
1963
|
}
|
|
1962
1964
|
genericMethod(link, data, callback) {
|
|
@@ -1983,9 +1985,7 @@ class MonkeyEcxCommonsService {
|
|
|
1983
1985
|
});
|
|
1984
1986
|
}
|
|
1985
1987
|
geti18n(translateService, keys) {
|
|
1986
|
-
translateService
|
|
1987
|
-
.getStreamOnTranslationChange(keys)
|
|
1988
|
-
.subscribe((translations) => {
|
|
1988
|
+
translateService.getStreamOnTranslationChange(keys).subscribe((translations) => {
|
|
1989
1989
|
this.__i18n = translations;
|
|
1990
1990
|
this.__oni18nDataChanged$.next(null);
|
|
1991
1991
|
});
|
|
@@ -1994,8 +1994,8 @@ class MonkeyEcxCommonsService {
|
|
|
1994
1994
|
__decorate([
|
|
1995
1995
|
MonkeyEcxCoreService({
|
|
1996
1996
|
requestInProgress: {
|
|
1997
|
-
showProgress: true
|
|
1998
|
-
}
|
|
1997
|
+
showProgress: true,
|
|
1998
|
+
},
|
|
1999
1999
|
})
|
|
2000
2000
|
], MonkeyEcxCommonsService.prototype, "genericMethod", null);
|
|
2001
2001
|
|
|
@@ -2518,10 +2518,6 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
2518
2518
|
const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, internalValidations } = this;
|
|
2519
2519
|
const url = `${environment.urlAssets}`;
|
|
2520
2520
|
monkeyecxService?.get(`${url}/${monkeyecxCode.toLowerCase()}/white-label.json`)?.subscribe((config) => {
|
|
2521
|
-
console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@');
|
|
2522
|
-
console.log(config);
|
|
2523
|
-
console.log(`${url}/${monkeyecxCode.toLowerCase()}/monkey-style-guide-settings.json`);
|
|
2524
|
-
console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@');
|
|
2525
2521
|
monkeyecxi18nConfigService.apply(config, environment);
|
|
2526
2522
|
monkeyecxLogsConfigService.apply(config, configBoostrap, environment, identifyCode);
|
|
2527
2523
|
monkeyEcxFeatureToggleService.apply(configSubject$, environment);
|
|
@@ -2616,13 +2612,16 @@ class MonkeyEcxTokenStorageService {
|
|
|
2616
2612
|
token$.next(token);
|
|
2617
2613
|
}
|
|
2618
2614
|
getAllTokens() {
|
|
2619
|
-
const { token } = this;
|
|
2615
|
+
const { token, config } = this;
|
|
2620
2616
|
const handledToken = {
|
|
2621
2617
|
...token
|
|
2622
2618
|
};
|
|
2623
2619
|
Object.entries(token || {}).forEach(([key, value]) => {
|
|
2624
2620
|
handledToken[key] = localStorage.getItem(key);
|
|
2625
2621
|
});
|
|
2622
|
+
if (config?.program) {
|
|
2623
|
+
handledToken.program = config?.program?.token;
|
|
2624
|
+
}
|
|
2626
2625
|
return handledToken;
|
|
2627
2626
|
}
|
|
2628
2627
|
setAllMe(me) {
|
|
@@ -3131,7 +3130,6 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
|
|
|
3131
3130
|
}
|
|
3132
3131
|
showMessage(message, error, mkc) {
|
|
3133
3132
|
const { snackbarService } = this;
|
|
3134
|
-
console.log('==================');
|
|
3135
3133
|
if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
3136
3134
|
snackbarService.show({
|
|
3137
3135
|
title: this.__i18n?.TITLE,
|
|
@@ -3252,10 +3250,12 @@ class MonkeyEcxErrorHandlingService {
|
|
|
3252
3250
|
const handlingService = injector.get(MonkeyEcxHandlingService);
|
|
3253
3251
|
const httpErrorHandlingService = injector.get(MonkeyEcxHttpErrorHandlingService);
|
|
3254
3252
|
const othersErrorsHandlingService = injector.get(MonkeyEcxOthersErrorsHandlingService);
|
|
3255
|
-
console.log('error');
|
|
3253
|
+
console.log('======error');
|
|
3256
3254
|
console.log(error);
|
|
3257
3255
|
if (error instanceof HttpErrorResponse) {
|
|
3258
3256
|
const sCredentials = handlingService?.getMonkeyEcxServiceCredentials() || {};
|
|
3257
|
+
console.log('sCredentials');
|
|
3258
|
+
console.log(sCredentials);
|
|
3259
3259
|
if (MonkeyEcxUtils.persistNullEmptyUndefined(type) && type === 'refresh_token') {
|
|
3260
3260
|
httpErrorHandlingService.handleErrorRefreshToken(error, sCredentials);
|
|
3261
3261
|
}
|