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
|
@@ -1413,6 +1413,8 @@ function MonkeyEcxCoreService(params) {
|
|
|
1413
1413
|
propertyDescriptor.value = function (...args) {
|
|
1414
1414
|
var _a, _b, _c, _d;
|
|
1415
1415
|
const context = this;
|
|
1416
|
+
console.log('context');
|
|
1417
|
+
console.log(context);
|
|
1416
1418
|
if (hasMonkeyEcxServiceAndHandlingProperties(context)) {
|
|
1417
1419
|
(_b = (_a = context === null || context === void 0 ? void 0 : context.monkeyecxService) === null || _a === void 0 ? void 0 : _a.monkeyecxHandlingService) === null || _b === void 0 ? void 0 : _b.clearAll();
|
|
1418
1420
|
(_d = (_c = context === null || context === void 0 ? void 0 : context.monkeyecxService) === null || _c === void 0 ? void 0 : _c.monkeyecxHandlingService) === null || _d === void 0 ? void 0 : _d.setMonkeyEcxServiceCredentials(params);
|
|
@@ -1781,7 +1783,7 @@ class MonkeyEcxCommonsService {
|
|
|
1781
1783
|
}
|
|
1782
1784
|
if ((_a = this.otherArgs) === null || _a === void 0 ? void 0 : _a.router) {
|
|
1783
1785
|
const { clearOnChangeRoute } = ((_c = (_b = this.otherArgs) === null || _b === void 0 ? void 0 : _b.schedule) === null || _c === void 0 ? void 0 : _c.options) || {
|
|
1784
|
-
clearOnChangeRoute: false
|
|
1786
|
+
clearOnChangeRoute: false,
|
|
1785
1787
|
};
|
|
1786
1788
|
this.otherArgs.router.events
|
|
1787
1789
|
.pipe(filter((event) => {
|
|
@@ -1834,14 +1836,14 @@ class MonkeyEcxCommonsService {
|
|
|
1834
1836
|
403: 'forbidden',
|
|
1835
1837
|
404: 'not-found',
|
|
1836
1838
|
500: 'service-problems',
|
|
1837
|
-
503: 'service-problems'
|
|
1839
|
+
503: 'service-problems',
|
|
1838
1840
|
};
|
|
1839
1841
|
if (!router) {
|
|
1840
1842
|
console.error('Router must be declared');
|
|
1841
1843
|
}
|
|
1842
1844
|
else {
|
|
1843
1845
|
router === null || router === void 0 ? void 0 : router.navigate([`/app/pages/${routes[statusCode]}`.toLowerCase()], {
|
|
1844
|
-
skipLocationChange: true
|
|
1846
|
+
skipLocationChange: true,
|
|
1845
1847
|
});
|
|
1846
1848
|
}
|
|
1847
1849
|
}
|
|
@@ -1890,9 +1892,9 @@ class MonkeyEcxCommonsService {
|
|
|
1890
1892
|
}
|
|
1891
1893
|
resolve(route, state, otherArgs) {
|
|
1892
1894
|
var _a, _b, _c;
|
|
1893
|
-
this.__data = null;
|
|
1894
|
-
this.__page = null;
|
|
1895
|
-
this.__requestPaged = null;
|
|
1895
|
+
//this.__data = null;
|
|
1896
|
+
//this.__page = null;
|
|
1897
|
+
//this.__requestPaged = null;
|
|
1896
1898
|
this.flagValidator = true;
|
|
1897
1899
|
if (this.tokenStorage) {
|
|
1898
1900
|
this.__tokenCredentials = this.tokenStorage.getToken();
|
|
@@ -1912,15 +1914,15 @@ class MonkeyEcxCommonsService {
|
|
|
1912
1914
|
this.setPage({
|
|
1913
1915
|
page: {
|
|
1914
1916
|
number: 0,
|
|
1915
|
-
size: 10
|
|
1916
|
-
}
|
|
1917
|
+
size: 10,
|
|
1918
|
+
},
|
|
1917
1919
|
});
|
|
1918
1920
|
}
|
|
1919
1921
|
if (otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.callbackPagination) {
|
|
1920
1922
|
this.__onDoPagination$.subscribe(() => {
|
|
1921
1923
|
if (!this.__onLoadingInProgress$.value) {
|
|
1922
1924
|
const hasMorePages = this.setPage({
|
|
1923
|
-
page: Object.assign({}, this.__page)
|
|
1925
|
+
page: Object.assign({}, this.__page),
|
|
1924
1926
|
}).nextPage();
|
|
1925
1927
|
if (hasMorePages && (otherArgs === null || otherArgs === void 0 ? void 0 : otherArgs.callbackPagination)) {
|
|
1926
1928
|
otherArgs.callbackPagination();
|
|
@@ -1962,7 +1964,7 @@ class MonkeyEcxCommonsService {
|
|
|
1962
1964
|
getHTTPHeaderApplicationPDF() {
|
|
1963
1965
|
return {
|
|
1964
1966
|
observe: 'response',
|
|
1965
|
-
responseType: 'blob'
|
|
1967
|
+
responseType: 'blob',
|
|
1966
1968
|
};
|
|
1967
1969
|
}
|
|
1968
1970
|
genericMethod(link, data, callback) {
|
|
@@ -1990,9 +1992,7 @@ class MonkeyEcxCommonsService {
|
|
|
1990
1992
|
});
|
|
1991
1993
|
}
|
|
1992
1994
|
geti18n(translateService, keys) {
|
|
1993
|
-
translateService
|
|
1994
|
-
.getStreamOnTranslationChange(keys)
|
|
1995
|
-
.subscribe((translations) => {
|
|
1995
|
+
translateService.getStreamOnTranslationChange(keys).subscribe((translations) => {
|
|
1996
1996
|
this.__i18n = translations;
|
|
1997
1997
|
this.__oni18nDataChanged$.next(null);
|
|
1998
1998
|
});
|
|
@@ -2001,8 +2001,8 @@ class MonkeyEcxCommonsService {
|
|
|
2001
2001
|
__decorate([
|
|
2002
2002
|
MonkeyEcxCoreService({
|
|
2003
2003
|
requestInProgress: {
|
|
2004
|
-
showProgress: true
|
|
2005
|
-
}
|
|
2004
|
+
showProgress: true,
|
|
2005
|
+
},
|
|
2006
2006
|
})
|
|
2007
2007
|
], MonkeyEcxCommonsService.prototype, "genericMethod", null);
|
|
2008
2008
|
|
|
@@ -2529,10 +2529,6 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
2529
2529
|
const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, internalValidations } = this;
|
|
2530
2530
|
const url = `${environment.urlAssets}`;
|
|
2531
2531
|
(_a = monkeyecxService === null || monkeyecxService === void 0 ? void 0 : monkeyecxService.get(`${url}/${monkeyecxCode.toLowerCase()}/white-label.json`)) === null || _a === void 0 ? void 0 : _a.subscribe((config) => {
|
|
2532
|
-
console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@');
|
|
2533
|
-
console.log(config);
|
|
2534
|
-
console.log(`${url}/${monkeyecxCode.toLowerCase()}/monkey-style-guide-settings.json`);
|
|
2535
|
-
console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@');
|
|
2536
2532
|
monkeyecxi18nConfigService.apply(config, environment);
|
|
2537
2533
|
monkeyecxLogsConfigService.apply(config, configBoostrap, environment, identifyCode);
|
|
2538
2534
|
monkeyEcxFeatureToggleService.apply(configSubject$, environment);
|
|
@@ -2628,11 +2624,15 @@ class MonkeyEcxTokenStorageService {
|
|
|
2628
2624
|
token$.next(token);
|
|
2629
2625
|
}
|
|
2630
2626
|
getAllTokens() {
|
|
2631
|
-
|
|
2627
|
+
var _a;
|
|
2628
|
+
const { token, config } = this;
|
|
2632
2629
|
const handledToken = Object.assign({}, token);
|
|
2633
2630
|
Object.entries(token || {}).forEach(([key, value]) => {
|
|
2634
2631
|
handledToken[key] = localStorage.getItem(key);
|
|
2635
2632
|
});
|
|
2633
|
+
if (config === null || config === void 0 ? void 0 : config.program) {
|
|
2634
|
+
handledToken.program = (_a = config === null || config === void 0 ? void 0 : config.program) === null || _a === void 0 ? void 0 : _a.token;
|
|
2635
|
+
}
|
|
2636
2636
|
return handledToken;
|
|
2637
2637
|
}
|
|
2638
2638
|
setAllMe(me) {
|
|
@@ -3143,7 +3143,6 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
|
|
|
3143
3143
|
showMessage(message, error, mkc) {
|
|
3144
3144
|
var _a;
|
|
3145
3145
|
const { snackbarService } = this;
|
|
3146
|
-
console.log('==================');
|
|
3147
3146
|
if (!this.isHttpCodeIgnoreMessage(mkc, error.status)) {
|
|
3148
3147
|
snackbarService.show({
|
|
3149
3148
|
title: (_a = this.__i18n) === null || _a === void 0 ? void 0 : _a.TITLE,
|
|
@@ -3266,10 +3265,12 @@ class MonkeyEcxErrorHandlingService {
|
|
|
3266
3265
|
const handlingService = injector.get(MonkeyEcxHandlingService);
|
|
3267
3266
|
const httpErrorHandlingService = injector.get(MonkeyEcxHttpErrorHandlingService);
|
|
3268
3267
|
const othersErrorsHandlingService = injector.get(MonkeyEcxOthersErrorsHandlingService);
|
|
3269
|
-
console.log('error');
|
|
3268
|
+
console.log('======error');
|
|
3270
3269
|
console.log(error);
|
|
3271
3270
|
if (error instanceof HttpErrorResponse) {
|
|
3272
3271
|
const sCredentials = (handlingService === null || handlingService === void 0 ? void 0 : handlingService.getMonkeyEcxServiceCredentials()) || {};
|
|
3272
|
+
console.log('sCredentials');
|
|
3273
|
+
console.log(sCredentials);
|
|
3273
3274
|
if (MonkeyEcxUtils.persistNullEmptyUndefined(type) && type === 'refresh_token') {
|
|
3274
3275
|
httpErrorHandlingService.handleErrorRefreshToken(error, sCredentials);
|
|
3275
3276
|
}
|