diff --git a/npm/ng-packs/packages/core/src/lib/handlers/oauth-configuration.handler.ts b/npm/ng-packs/packages/core/src/lib/handlers/oauth-configuration.handler.ts index 79c3d00a4d..f82e382fe7 100644 --- a/npm/ng-packs/packages/core/src/lib/handlers/oauth-configuration.handler.ts +++ b/npm/ng-packs/packages/core/src/lib/handlers/oauth-configuration.handler.ts @@ -20,7 +20,7 @@ export class OAuthConfigurationHandler { private listenToSetEnvironment() { this.environmentService - .onUpdate$(state => state) + .createOnUpdateStream(state => state) .pipe( map(environment => environment.oAuthConfig), filter(config => !compare(config, this.options.environment.oAuthConfig)), diff --git a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts index 817bd57f94..1c1bd31119 100644 --- a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts @@ -51,7 +51,7 @@ export class AuthService { }; private listenToSetEnvironment() { - this.environment.onUpdate$(state => state.oAuthConfig).subscribe(this.setStrategy); + this.environment.createOnUpdateStream(state => state.oAuthConfig).subscribe(this.setStrategy); } login(username: string, password: string): Observable { diff --git a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts index abc1bdb115..ed544fec2b 100644 --- a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts @@ -10,7 +10,9 @@ import { InternalStore } from '../utils/internal-store-utils'; export class ConfigStateService { private readonly store = new InternalStore({} as ApplicationConfiguration.Response); - readonly onUpdate$ = this.store.sliceUpdate; + get createOnUpdateStream() { + return this.store.sliceUpdate; + } setState = (state: ApplicationConfiguration.Response) => { this.store.patch(state); diff --git a/npm/ng-packs/packages/core/src/lib/services/environment.service.ts b/npm/ng-packs/packages/core/src/lib/services/environment.service.ts index 3f6c715406..5cf975ae5f 100644 --- a/npm/ng-packs/packages/core/src/lib/services/environment.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/environment.service.ts @@ -8,7 +8,7 @@ import { InternalStore } from '../utils/internal-store-utils'; export class EnvironmentService { private readonly store = new InternalStore({} as Environment); - get onUpdate$() { + get createOnUpdateStream() { return this.store.sliceUpdate; } diff --git a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts index 60cd956044..b49056f0b5 100644 --- a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts @@ -193,7 +193,6 @@ function getLocalization( return defaultValue || sourceKey; } - // [TODO]: next line should be removed in v3.2, breaking change!!! interpolateParams = interpolateParams.filter(params => params != null); if (localization) localization = interpolate(localization, interpolateParams); diff --git a/npm/ng-packs/packages/core/src/lib/services/routes.service.ts b/npm/ng-packs/packages/core/src/lib/services/routes.service.ts index 0d589ff440..3d572b457c 100644 --- a/npm/ng-packs/packages/core/src/lib/services/routes.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/routes.service.ts @@ -153,7 +153,9 @@ export abstract class AbstractNavTreeService constructor(protected injector: Injector) { super(); const configState = this.injector.get(ConfigStateService); - this.subscription = configState.onUpdate$(state => state).subscribe(() => this.refresh()); + this.subscription = configState + .createOnUpdateStream(state => state) + .subscribe(() => this.refresh()); this.permissionService = injector.get(PermissionService); } diff --git a/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts index 1af9a890ad..4f7194024e 100644 --- a/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/session-state.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; +import compare from 'just-compare'; +import { filter, take } from 'rxjs/operators'; import { ApplicationConfiguration } from '../models/application-configuration'; import { Session } from '../models/session'; import { InternalStore } from '../utils/internal-store-utils'; -import compare from 'just-compare'; import { ConfigStateService } from './config-state.service'; -import { filter, take, tap } from 'rxjs/operators'; export interface SessionDetail { openedTabCount: number; @@ -42,7 +42,6 @@ export class SessionStateService { this.configState .getDeep$('localization.currentCulture.cultureName') .pipe( - tap(console.warn), filter(cultureName => !!cultureName), take(1), )