@open-rlb/ng-app 3.0.7 → 3.0.8

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1$3 from '@angular/common/http';
2
2
  import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, Injectable, Inject, Optional, EventEmitter, importProvidersFrom, makeStateKey, makeEnvironmentProviders, Pipe, Input, Component, PLATFORM_ID, NgModule, Directive, inject, isDevMode } from '@angular/core';
4
+ import { InjectionToken, Injectable, Inject, Optional, EventEmitter, importProvidersFrom, makeStateKey, makeEnvironmentProviders, Pipe, Input, Component, PLATFORM_ID, NgModule, Directive, inject, APP_INITIALIZER, isDevMode } from '@angular/core';
5
5
  import * as i2 from '@angular/router';
6
6
  import { NavigationEnd, RoutesRecognized, RouterModule, Router, provideRouter } from '@angular/router';
7
7
  import * as i1$4 from '@angular/service-worker';
@@ -2849,10 +2849,10 @@ class AuthEffects {
2849
2849
  return this.actions$.pipe(ofType(AuthActions.setCurrentProvider), map$1(({ currentProvider }) => AuthActionsInternal.setCurrentProvider({ currentProvider })));
2850
2850
  });
2851
2851
  this.logger = this.loggerService.for(this.constructor.name);
2852
- this.logger.log('Initialized AuthEffects');
2853
- if (authConfig) {
2854
- auth.checkAuthMultiple().subscribe();
2855
- }
2852
+ this.logger.log(`Initialized AuthEffects, auth config: ${authConfig}`);
2853
+ // if (authConfig) {
2854
+ // auth.checkAuthMultiple().subscribe();
2855
+ // }
2856
2856
  }
2857
2857
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AuthEffects, deps: [{ token: i1$8.Actions }, { token: AuthenticationService }, { token: AppLoggerService }, { token: RLB_CFG_AUTH, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2858
2858
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AuthEffects }); }
@@ -2963,6 +2963,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2963
2963
  }]
2964
2964
  }] });
2965
2965
 
2966
+ function authInitializer(authService) {
2967
+ console.warn("authInitializer!!");
2968
+ return () => authService.checkAuthMultiple();
2969
+ }
2970
+
2966
2971
  const verifyDeactivate = (component, currentRoute, currentState, nextState) => {
2967
2972
  return component.verifyDeactivate();
2968
2973
  };
@@ -3008,6 +3013,12 @@ function provideRlbConfig(env) {
3008
3013
  },
3009
3014
  multi: true,
3010
3015
  },
3016
+ {
3017
+ provide: APP_INITIALIZER,
3018
+ useFactory: authInitializer,
3019
+ deps: [AuthenticationService],
3020
+ multi: true
3021
+ },
3011
3022
  ];
3012
3023
  }
3013
3024
  function provideApp(app) {