@dereekb/dbx-core 9.24.20 → 9.24.21

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.
@@ -2997,10 +2997,25 @@ class DbxAppAuthRouterService {
2997
2997
  constructor(dbxRouterService, dbxAppAuthRoutes) {
2998
2998
  this.dbxRouterService = dbxRouterService;
2999
2999
  this.dbxAppAuthRoutes = dbxAppAuthRoutes;
3000
+ this._isAuthRouterEffectsEnabled = new BehaviorSubject(true);
3001
+ this.isAuthRouterEffectsEnabled$ = this._isAuthRouterEffectsEnabled.asObservable();
3002
+ }
3003
+ ngOnDestroy() {
3004
+ this._isAuthRouterEffectsEnabled.complete();
3000
3005
  }
3001
3006
  get hasOnboardingState() {
3002
3007
  return Boolean(this.dbxAppAuthRoutes.onboardRef);
3003
3008
  }
3009
+ // MARK: Effects
3010
+ /**
3011
+ * Whether or not DbxAppAuthRouterEffects are enabled.
3012
+ */
3013
+ get isAuthRouterEffectsEnabled() {
3014
+ return this._isAuthRouterEffectsEnabled.value;
3015
+ }
3016
+ set isAuthRouterEffectsEnabled(enabled) {
3017
+ this._isAuthRouterEffectsEnabled.next(enabled);
3018
+ }
3004
3019
  // MARK: Navigate
3005
3020
  /**
3006
3021
  * Navigates to the login state.
@@ -3060,11 +3075,11 @@ class DbxAppAuthRouterEffects extends AbstractOnDbxAppContextStateEffects {
3060
3075
  /**
3061
3076
  * Effect to redirect to the login when logout occurs.
3062
3077
  */
3063
- this.redirectToLoginOnLogout = createEffect(() => this.actions$.pipe(ofType(loggedOut), exhaustMap(() => this.dbxAppAuthRouterService.goToLogin())), { dispatch: false });
3078
+ this.redirectToLoginOnLogout = createEffect(() => this.actions$.pipe(ofType(loggedOut), filter(() => this.dbxAppAuthRouterService.isAuthRouterEffectsEnabled), exhaustMap(() => this.dbxAppAuthRouterService.goToLogin())), { dispatch: false });
3064
3079
  /**
3065
3080
  * Effect to redirect to the app when login occurs.
3066
3081
  */
3067
- this.redirectToOnboardOnLogIn = createEffect(() => this.actions$.pipe(ofType(loggedIn), exhaustMap(() => this.dbxAppAuthRouterService.goToApp())), { dispatch: false });
3082
+ this.redirectToOnboardOnLogIn = createEffect(() => this.actions$.pipe(ofType(loggedIn), filter(() => this.dbxAppAuthRouterService.isAuthRouterEffectsEnabled), exhaustMap(() => this.dbxAppAuthRouterService.goToApp())), { dispatch: false });
3068
3083
  }
3069
3084
  }
3070
3085
  DbxAppAuthRouterEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxAppAuthRouterEffects, deps: [{ token: DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN, optional: true }, { token: i1$3.Actions }, { token: i1$4.Store }, { token: DbxAppAuthRouterService }], target: i0.ɵɵFactoryTarget.Injectable });