monkey-front-core 0.0.54 → 0.0.55

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.
@@ -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, data } = config;
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