monkey-front-core 0.0.307 → 0.0.308

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.
@@ -2680,7 +2680,7 @@ class MonkeyEcxCommonsService {
2680
2680
  this.__onZipCodeDataChanged$ = new BehaviorSubject(null);
2681
2681
  this.__oni18nDataChanged$ = new BehaviorSubject(null);
2682
2682
  this.__onDoSearch$ = new BehaviorSubject({});
2683
- this.__tokenCredentials = undefined;
2683
+ this.__tokenCredentials = null;
2684
2684
  this.__schedule = null;
2685
2685
  this.__callbackPagination = () => {
2686
2686
  // eslint-disable-next-line no-console
@@ -3656,25 +3656,33 @@ class MonkeyEcxTokenStorageService {
3656
3656
  token$.next(token);
3657
3657
  }
3658
3658
  async getAllTokens() {
3659
- const { store, monkeyecxConfigService } = this;
3660
- const username = localStorage.getItem('username');
3661
- let data = {
3662
- username: username || '',
3663
- program: ''
3664
- };
3665
- if (username) {
3666
- data = await store.select(select({ username })).pipe(take(1)).toPromise();
3667
- delete data?.me;
3659
+ try {
3660
+ const { store, monkeyecxConfigService } = this;
3661
+ const username = localStorage.getItem('username');
3662
+ let data = {
3663
+ username: username || '',
3664
+ program: ''
3665
+ };
3666
+ if (username) {
3667
+ data = await store.select(select({ username })).pipe(take(1)).toPromise();
3668
+ delete data?.me;
3669
+ }
3670
+ const config = await monkeyecxConfigService.config()
3671
+ .pipe(first((val) => {
3672
+ return !!val && JSON.stringify(val) !== '{}';
3673
+ }))
3674
+ .toPromise();
3675
+ if (data && !data?.program && config?.program) {
3676
+ data.program = config?.program?.token;
3677
+ }
3678
+ return data;
3668
3679
  }
3669
- const config = await monkeyecxConfigService.config()
3670
- .pipe(first((val) => {
3671
- return !!val && JSON.stringify(val) !== '{}';
3672
- }))
3673
- .toPromise();
3674
- if (data && !data?.program && config?.program) {
3675
- data.program = config?.program?.token;
3680
+ catch (e) {
3681
+ console.log('=======');
3682
+ console.log(e);
3683
+ console.log('=======');
3676
3684
  }
3677
- return data;
3685
+ return null;
3678
3686
  }
3679
3687
  setAllMe(me) {
3680
3688
  const { me$, store } = this;
@@ -3795,7 +3803,7 @@ class MonkeyEcxSecurityDirective {
3795
3803
  this.cdr = cdr;
3796
3804
  this.roles = [];
3797
3805
  this.byExclusion = false;
3798
- this.tokenCredentials = undefined;
3806
+ this.tokenCredentials = null;
3799
3807
  // not to do
3800
3808
  }
3801
3809
  getRole() {