monkey-front-core 0.0.54 → 0.0.58
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-auth-credentials.mjs +1 -1
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +1 -1
- package/esm2020/lib/core/services/config/monkeyecx-i18n-config.service.mjs +14 -6
- package/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +3 -2
- package/fesm2015/monkey-front-core.mjs +14 -8
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +15 -6
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/monkeyecx-auth-credentials.d.ts +1 -0
- package/lib/core/interfaces/monkeyecx-config.d.ts +1 -1
- package/monkey-front-core-0.0.58.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.54.tgz +0 -0
|
@@ -2307,6 +2307,7 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2307
2307
|
apply(params, environment, change = false) {
|
|
2308
2308
|
const { monkeyecxService, monkeyecxCookieStorageService, monkeyecxErrorConfigService } = this;
|
|
2309
2309
|
let { i18n } = params;
|
|
2310
|
+
const externali18n = params?.externali18n?.[`${i18n?.lang || 'pt-BR'}`];
|
|
2310
2311
|
const cookie = monkeyecxCookieStorageService.getCookie('monkey-app-locale');
|
|
2311
2312
|
if (cookie && !change) {
|
|
2312
2313
|
i18n = JSON.parse(atob(cookie));
|
|
@@ -2317,7 +2318,14 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
|
|
|
2317
2318
|
change = true;
|
|
2318
2319
|
}
|
|
2319
2320
|
monkeyecxService?.get(`${environment.localAssets}/i18n/${i18n?.lang}.json`)?.subscribe((config) => {
|
|
2320
|
-
const { lang
|
|
2321
|
+
const { lang } = config;
|
|
2322
|
+
let { data } = config;
|
|
2323
|
+
if (externali18n) {
|
|
2324
|
+
data = {
|
|
2325
|
+
...data,
|
|
2326
|
+
EXTERNAL: externali18n,
|
|
2327
|
+
};
|
|
2328
|
+
}
|
|
2321
2329
|
this.translateService.setTranslation(lang, data, true);
|
|
2322
2330
|
this.translateService.use(lang);
|
|
2323
2331
|
if (change)
|
|
@@ -2334,17 +2342,17 @@ MonkeyEcxi18nConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12
|
|
|
2334
2342
|
__decorate([
|
|
2335
2343
|
MonkeyEcxCoreService({
|
|
2336
2344
|
httpResponse: {
|
|
2337
|
-
httpCodeIgnore: [404]
|
|
2345
|
+
httpCodeIgnore: [404],
|
|
2338
2346
|
},
|
|
2339
2347
|
requestInProgress: {
|
|
2340
|
-
showProgress: false
|
|
2341
|
-
}
|
|
2348
|
+
showProgress: false,
|
|
2349
|
+
},
|
|
2342
2350
|
})
|
|
2343
2351
|
], MonkeyEcxi18nConfigService.prototype, "apply", null);
|
|
2344
2352
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxi18nConfigService, decorators: [{
|
|
2345
2353
|
type: Injectable,
|
|
2346
2354
|
args: [{
|
|
2347
|
-
providedIn: 'root'
|
|
2355
|
+
providedIn: 'root',
|
|
2348
2356
|
}]
|
|
2349
2357
|
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: i1$1.TranslateService }, { type: MonkeyEcxCookieStorageService }, { type: MonkeyEcxErrorConfigService }]; }, propDecorators: { apply: [] } });
|
|
2350
2358
|
|
|
@@ -2657,9 +2665,10 @@ class MonkeyEcxTokenStorageService {
|
|
|
2657
2665
|
companyType: '',
|
|
2658
2666
|
programAdmin: false,
|
|
2659
2667
|
programType: '',
|
|
2668
|
+
accessType: '',
|
|
2660
2669
|
role: '',
|
|
2661
2670
|
_clearIgnore: {
|
|
2662
|
-
ignore: ['username', 'program'],
|
|
2671
|
+
ignore: ['username', 'program', 'accessType'],
|
|
2663
2672
|
},
|
|
2664
2673
|
};
|
|
2665
2674
|
this.token$ = new BehaviorSubject(null);
|