monkey-front-core 0.0.449 → 0.0.451

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.
@@ -380,6 +380,20 @@ class MonkeyEcxUtils {
380
380
  });
381
381
  return handled;
382
382
  }
383
+ static trimValuesToSave(obj, fields) {
384
+ let ret = obj;
385
+ const grouped = fields.join('#');
386
+ Object.entries(obj).map(([key, value]) => {
387
+ if (grouped.includes(key)) {
388
+ ret = {
389
+ ...ret,
390
+ [key]: `${value}`.trim()
391
+ };
392
+ }
393
+ return null;
394
+ });
395
+ return ret;
396
+ }
383
397
  }
384
398
 
385
399
  const moment$6 = moment_;
@@ -3308,8 +3322,6 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
3308
3322
  this.translateService.use('pt-BR');
3309
3323
  }
3310
3324
  apply(params, environment, change = false) {
3311
- console.log('change no core');
3312
- console.log(change);
3313
3325
  this.applyInternal(environment, params, change);
3314
3326
  this.applyExternal(params, environment, change);
3315
3327
  }
@@ -3317,33 +3329,23 @@ class MonkeyEcxi18nConfigService extends MonkeyEcxCommonsService {
3317
3329
  const { monkeyecxService, monkeyecxErrorConfigService, monkeyecxCookieStorageService } = this;
3318
3330
  let lang = '';
3319
3331
  let i18n = { lang: '' };
3320
- console.log('1');
3321
3332
  try {
3322
3333
  if (!change) {
3323
- console.log('2');
3324
3334
  const cookie = monkeyecxCookieStorageService.getCookie('monkey-app-locale');
3325
3335
  if (cookie) {
3326
3336
  i18n = JSON.parse(atob(cookie));
3327
3337
  }
3328
- console.log('3');
3329
3338
  }
3330
3339
  else {
3331
- console.log('4');
3332
3340
  i18n = {
3333
- lang: params.lang
3341
+ lang: params?.i18n?.lang
3334
3342
  };
3335
3343
  }
3336
3344
  }
3337
3345
  catch (e) {
3338
3346
  // not to do
3339
3347
  }
3340
- console.log('lang no core');
3341
- console.log(lang);
3342
- console.log('i18n no core');
3343
- console.log(i18n);
3344
3348
  lang = i18n?.lang || `${environment?.lang || 'pt-BR'}`;
3345
- console.log('segundo lang');
3346
- console.log(lang);
3347
3349
  try {
3348
3350
  const currenti18n = await monkeyecxService
3349
3351
  ?.get(`${environment.localAssets}/i18n/${lang}.json`)