@processpuzzle/auth 0.1.1 → 0.1.2

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, computed, Injectable, InjectionToken, makeEnvironmentProviders, inject } from '@angular/core';
2
+ import { signal, computed, Injectable, InjectionToken, makeEnvironmentProviders } from '@angular/core';
3
3
  import { RUNTIME_CONFIGURATION } from '@processpuzzle/util';
4
4
  import { v4 } from 'uuid';
5
5
  import Keycloak from 'keycloak-js';
@@ -28,10 +28,10 @@ class AuthService {
28
28
  throwError(message) {
29
29
  throw new Error(message);
30
30
  }
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
32
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuthService, providedIn: 'root' });
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
32
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AuthService, providedIn: 'root' });
33
33
  }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuthService, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AuthService, decorators: [{
35
35
  type: Injectable,
36
36
  args: [{
37
37
  providedIn: 'root',
@@ -189,14 +189,13 @@ function provideFirebaseAuthService(baseConfig, authConfig) {
189
189
 
190
190
  const AUTHENTICATION_CONFIGURATION = new InjectionToken('AUTHENTICATION_CONFIGURATION');
191
191
  const AUTHENTICATION_SERVICE = new InjectionToken('AUTHENTICATION_SERVICE');
192
- function provideAuthenticationService() {
192
+ function provideAuthenticationService(runtimeConfig) {
193
193
  return makeEnvironmentProviders([
194
194
  {
195
195
  provide: AUTHENTICATION_SERVICE,
196
196
  useFactory: () => {
197
- const runtimeConfig = inject(RUNTIME_CONFIGURATION);
198
- const baseConfig = runtimeConfig['BASE_CONFIGURATION'];
199
- const authConfig = runtimeConfig['AUTHENTICATION_CONFIGURATION'];
197
+ const baseConfig = runtimeConfig.BASE_CONFIGURATION;
198
+ const authConfig = runtimeConfig.AUTHENTICATION_CONFIGURATION;
200
199
  if (authConfig.AUTHENTICATION_PROVIDER === 'keycloak' && authConfig.AUTH_SERVICE_CONFIG) {
201
200
  return new KeycloakAuthService(authConfig.AUTH_SERVICE_CONFIG);
202
201
  }
@@ -1 +1 @@
1
- {"version":3,"file":"processpuzzle-auth-domain.mjs","sources":["../../../../libs/auth/domain/auth-matcher.ts","../../../../libs/auth/domain/service/auth.service.ts","../../../../libs/auth/domain/user/user.ts","../../../../libs/auth/domain/service/keycloak-auth.service.ts","../../../../libs/auth/domain/service/firebase-auth.service.ts","../../../../libs/auth/domain/service/provide-firebase-auth-service.ts","../../../../libs/auth/domain/service/provide-authentication.service.ts","../../../../libs/auth/domain/processpuzzle-auth-domain.ts"],"sourcesContent":["import { UrlSegment } from '@angular/router';\n\n// Custom matcher function to match any URL containing 'auth'\nexport function authMatcher(segments: UrlSegment[]) {\n const hasAuth = segments.some((segment) => segment.path === 'auth');\n if (hasAuth) {\n // Find the index of 'auth' segment\n const authIndex = segments.findIndex((segment) => segment.path === 'auth');\n // Return consumed segments up to and including 'auth'\n return {\n consumed: segments.slice(0, authIndex + 1),\n posParams: {},\n };\n }\n return null;\n}\n","import { computed, Injectable, signal, Signal, WritableSignal } from '@angular/core';\nimport { User } from '../user/user';\n\n@Injectable({\n providedIn: 'root',\n})\nexport abstract class AuthService {\n protected _user: WritableSignal<User | undefined> = signal<User | undefined>(undefined);\n protected readonly user: Signal<User | undefined> = this._user.asReadonly();\n isAuthenticated: Signal<boolean | undefined> = computed(() => (this.user ? !!this.user() : undefined));\n\n abstract authenticate(): Promise<boolean>;\n\n abstract login(redirectUrl?: string, email?: string, password?: string): Promise<User | undefined>;\n\n abstract logout(redirectUrl?: string): Promise<void>;\n\n abstract getCurrentUser(): User | undefined;\n\n // region protected, private helper methods\n protected throwError(message: string) {\n throw new Error(message);\n }\n // endregion\n}\n","import { BaseEntity } from '@processpuzzle/base-entity';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport class User implements BaseEntity {\n readonly id: string;\n private _email: string | null | undefined;\n private _password: string | null | undefined;\n private _firstName: string | undefined;\n private _lastName: string | undefined;\n private _photoUrl: string | undefined;\n\n constructor(email?: string | null, id?: string, firstName?: string | null, lastName?: string | null, photoUrl?: string | null) {\n this._email = email;\n this.id = id ?? uuidv4();\n this.firstName = firstName ?? '';\n this.lastName = lastName ?? '';\n this.photoUrl = photoUrl ?? '';\n }\n\n // region properties\n public get email(): string | null | undefined {\n return this._email;\n }\n\n public set email(email: string) {\n this._email = email;\n }\n\n public get firstName(): string | undefined {\n return this._firstName;\n }\n\n public set firstName(firstName: string) {\n this._firstName = firstName;\n }\n\n public get lastName(): string | undefined {\n return this._lastName;\n }\n\n public set lastName(lastName: string) {\n this._lastName = lastName;\n }\n\n public get password(): string | null | undefined {\n return this._password;\n }\n\n public set password(password: string) {\n this._password = password;\n }\n\n public get photoUrl(): string | undefined {\n return this._photoUrl;\n }\n\n public set photoUrl(url: string) {\n this._photoUrl = url;\n }\n\n // endregion\n}\n","import { AuthService } from './auth.service';\nimport { User } from '../user/user';\nimport Keycloak from 'keycloak-js';\nimport { KeycloakAuthConfig } from './keycloak-auth.config';\n\nexport class KeycloakAuthService extends AuthService {\n readonly keycloak: Keycloak;\n private initPromise: Promise<void> | null = null;\n\n constructor(protected config: KeycloakAuthConfig) {\n super();\n this.keycloak = new Keycloak({\n clientId: config.clientId,\n realm: config.realm,\n url: config.authServerUrl,\n });\n }\n\n // region public accessors and mutators\n override async authenticate(): Promise<boolean> {\n await this.ensureInitialized();\n return !!this.getCurrentUser();\n }\n\n async login(redirectUrl?: string): Promise<User> {\n await this.ensureInitialized();\n if (this.isAuthenticated()) return this.user() as User;\n else {\n await this.keycloak.login({ redirectUri: globalThis.location.origin + '/' + redirectUrl });\n return this.getCurrentUser() as User;\n }\n }\n\n override async logout(redirectUrl?: string): Promise<void> {\n await this.keycloak.logout({ redirectUri: globalThis.location.origin + '/' + redirectUrl });\n this._user.set(undefined);\n }\n\n override getCurrentUser(): User | undefined {\n return this.user();\n }\n\n getUsername(): string {\n return this.keycloak.profile?.username || '';\n }\n\n getUserRoles(): string[] {\n return this.keycloak.realmAccess?.roles || [];\n }\n // endregion\n\n // region protected, private helper methods\n private ensureInitialized(): Promise<void> {\n this.initPromise ??= this.initKeycloak();\n return this.initPromise;\n }\n\n private async initKeycloak() {\n await this.keycloak.init({\n onLoad: 'check-sso',\n silentCheckSsoRedirectUri: 'http://localhost:4200/assets/auth/silent-check-sso.html',\n });\n\n // Check if authenticated using the keycloak-js instance directly\n if (this.keycloak.authenticated) {\n const profile = await this.keycloak.loadUserProfile();\n\n // Map to your User domain model\n const user = new User(profile.email || '', profile.id || '', profile.firstName || '', profile.lastName || '');\n\n this._user.set(user);\n } else {\n this._user.set(undefined);\n }\n }\n // endregion\n}\n","import { AuthService } from './auth.service';\nimport { Auth, signInWithEmailAndPassword } from '@angular/fire/auth';\nimport { User } from '../user/user';\n\nexport class FirebaseAuthService extends AuthService {\n private readonly auth: Auth;\n\n constructor(auth: Auth) {\n super();\n this.auth = auth;\n }\n\n // region public accessors and mutator methods\n override authenticate(): Promise<boolean> {\n return Promise.resolve(this.auth.currentUser !== null);\n }\n\n public async login(redirectUrl?: string, email?: string, password?: string): Promise<User | undefined> {\n if (email != null && password != null) {\n const userCredential = await signInWithEmailAndPassword(this.auth, email, password);\n const user = new User(userCredential.user.email, userCredential.user.uid, userCredential.user.displayName);\n this._user.set(user);\n return user;\n } else return undefined;\n }\n\n override logout(): Promise<void> {\n return this.auth.signOut();\n }\n\n getCurrentUser(): User | undefined {\n const currentUser = this.auth.currentUser;\n return new User(currentUser?.email, currentUser?.uid, currentUser?.displayName);\n }\n // endregion\n}\n","import { connectAuthEmulator, getAuth } from '@angular/fire/auth';\nimport { FirebaseAuthService } from './firebase-auth.service';\nimport { BaseConfiguration } from '@processpuzzle/util';\nimport { AuthenticationConfiguration } from './provide-authentication.service';\n\nexport function provideFirebaseAuthService(baseConfig: BaseConfiguration, authConfig: AuthenticationConfiguration): FirebaseAuthService {\n const auth = getAuth();\n const pipelineStage = baseConfig.PIPELINE_STAGE ?? 'ci';\n if ((pipelineStage === 'dev' || pipelineStage === 'ci') && authConfig.AUTHENTICATION_SERVICE_ROOT) {\n connectAuthEmulator(auth, authConfig.AUTHENTICATION_SERVICE_ROOT);\n }\n return new FirebaseAuthService(auth);\n}\n","import { EnvironmentProviders, inject, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport { KeycloakAuthConfig } from './keycloak-auth.config';\nimport { AuthService } from './auth.service';\nimport { FirebaseAuthConfig } from './firebase-auth.config';\nimport { BaseConfiguration, RUNTIME_CONFIGURATION } from '@processpuzzle/util';\nimport { KeycloakAuthService } from './keycloak-auth.service';\nimport { provideFirebaseAuthService } from './provide-firebase-auth-service';\n\nexport const AUTHENTICATION_CONFIGURATION = new InjectionToken<AuthenticationConfiguration>('AUTHENTICATION_CONFIGURATION');\nexport const AUTHENTICATION_SERVICE = new InjectionToken<AuthService>('AUTHENTICATION_SERVICE');\n\nexport interface AuthenticationConfiguration {\n readonly AUTHENTICATION_PROVIDER?: 'local-auth' | 'firebase-auth' | 'oauth2' | 'keycloak';\n readonly AUTHENTICATION_SERVICE_ROOT?: string;\n readonly AUTH_SERVICE_CONFIG?: KeycloakAuthConfig | FirebaseAuthConfig;\n}\n\nexport function provideAuthenticationService(): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: AUTHENTICATION_SERVICE,\n useFactory: () => {\n const runtimeConfig = inject(RUNTIME_CONFIGURATION);\n const baseConfig: BaseConfiguration = runtimeConfig['BASE_CONFIGURATION' as keyof typeof runtimeConfig];\n const authConfig: AuthenticationConfiguration = runtimeConfig['AUTHENTICATION_CONFIGURATION' as keyof typeof runtimeConfig];\n if (authConfig.AUTHENTICATION_PROVIDER === 'keycloak' && authConfig.AUTH_SERVICE_CONFIG) {\n return new KeycloakAuthService(authConfig.AUTH_SERVICE_CONFIG as KeycloakAuthConfig);\n } else if (authConfig.AUTHENTICATION_PROVIDER === 'firebase-auth') {\n return provideFirebaseAuthService(baseConfig, authConfig);\n } else {\n throw new Error('No AUTHENTICATION_PROVIDER or AUTH_SERVICE_CONFIG configured. Verify your RUNTIME_CONFIGURATION.');\n }\n },\n deps: [RUNTIME_CONFIGURATION],\n },\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uuidv4"],"mappings":";;;;;;;AAEA;AACM,SAAU,WAAW,CAAC,QAAsB,EAAA;AAChD,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;IACnE,IAAI,OAAO,EAAE;;AAEX,QAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;;QAE1E,OAAO;YACL,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC;AAC1C,YAAA,SAAS,EAAE,EAAE;SACd;IACH;AACA,IAAA,OAAO,IAAI;AACb;;MCTsB,WAAW,CAAA;AACrB,IAAA,KAAK,GAAqC,MAAM,CAAmB,SAAS,4EAAC;AACpE,IAAA,IAAI,GAA6B,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;IAC3E,eAAe,GAAgC,QAAQ,CAAC,OAAO,IAAI,CAAC,IAAI,GAAG,CAAC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qBAAO;AACL,oBAAA,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC;gBACrH;YACF,CAAC;YACD,IAAI,EAAE,CAAC,qBAAqB,CAAC;AAC9B,SAAA;AACF,KAAA,CAAC;AACJ;;ACpCA;;AAEG;;;;"}
1
+ {"version":3,"file":"processpuzzle-auth-domain.mjs","sources":["../../../../libs/auth/domain/auth-matcher.ts","../../../../libs/auth/domain/service/auth.service.ts","../../../../libs/auth/domain/user/user.ts","../../../../libs/auth/domain/service/keycloak-auth.service.ts","../../../../libs/auth/domain/service/firebase-auth.service.ts","../../../../libs/auth/domain/service/provide-firebase-auth-service.ts","../../../../libs/auth/domain/service/provide-authentication.service.ts","../../../../libs/auth/domain/processpuzzle-auth-domain.ts"],"sourcesContent":["import { UrlSegment } from '@angular/router';\n\n// Custom matcher function to match any URL containing 'auth'\nexport function authMatcher(segments: UrlSegment[]) {\n const hasAuth = segments.some((segment) => segment.path === 'auth');\n if (hasAuth) {\n // Find the index of 'auth' segment\n const authIndex = segments.findIndex((segment) => segment.path === 'auth');\n // Return consumed segments up to and including 'auth'\n return {\n consumed: segments.slice(0, authIndex + 1),\n posParams: {},\n };\n }\n return null;\n}\n","import { computed, Injectable, signal, Signal, WritableSignal } from '@angular/core';\nimport { User } from '../user/user';\n\n@Injectable({\n providedIn: 'root',\n})\nexport abstract class AuthService {\n protected _user: WritableSignal<User | undefined> = signal<User | undefined>(undefined);\n protected readonly user: Signal<User | undefined> = this._user.asReadonly();\n isAuthenticated: Signal<boolean | undefined> = computed(() => (this.user ? !!this.user() : undefined));\n\n abstract authenticate(): Promise<boolean>;\n\n abstract login(redirectUrl?: string, email?: string, password?: string): Promise<User | undefined>;\n\n abstract logout(redirectUrl?: string): Promise<void>;\n\n abstract getCurrentUser(): User | undefined;\n\n // region protected, private helper methods\n protected throwError(message: string) {\n throw new Error(message);\n }\n // endregion\n}\n","import { BaseEntity } from '@processpuzzle/base-entity';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport class User implements BaseEntity {\n readonly id: string;\n private _email: string | null | undefined;\n private _password: string | null | undefined;\n private _firstName: string | undefined;\n private _lastName: string | undefined;\n private _photoUrl: string | undefined;\n\n constructor(email?: string | null, id?: string, firstName?: string | null, lastName?: string | null, photoUrl?: string | null) {\n this._email = email;\n this.id = id ?? uuidv4();\n this.firstName = firstName ?? '';\n this.lastName = lastName ?? '';\n this.photoUrl = photoUrl ?? '';\n }\n\n // region properties\n public get email(): string | null | undefined {\n return this._email;\n }\n\n public set email(email: string) {\n this._email = email;\n }\n\n public get firstName(): string | undefined {\n return this._firstName;\n }\n\n public set firstName(firstName: string) {\n this._firstName = firstName;\n }\n\n public get lastName(): string | undefined {\n return this._lastName;\n }\n\n public set lastName(lastName: string) {\n this._lastName = lastName;\n }\n\n public get password(): string | null | undefined {\n return this._password;\n }\n\n public set password(password: string) {\n this._password = password;\n }\n\n public get photoUrl(): string | undefined {\n return this._photoUrl;\n }\n\n public set photoUrl(url: string) {\n this._photoUrl = url;\n }\n\n // endregion\n}\n","import { AuthService } from './auth.service';\nimport { User } from '../user/user';\nimport Keycloak from 'keycloak-js';\nimport { KeycloakAuthConfig } from './keycloak-auth.config';\n\nexport class KeycloakAuthService extends AuthService {\n readonly keycloak: Keycloak;\n private initPromise: Promise<void> | null = null;\n\n constructor(protected config: KeycloakAuthConfig) {\n super();\n this.keycloak = new Keycloak({\n clientId: config.clientId,\n realm: config.realm,\n url: config.authServerUrl,\n });\n }\n\n // region public accessors and mutators\n override async authenticate(): Promise<boolean> {\n await this.ensureInitialized();\n return !!this.getCurrentUser();\n }\n\n async login(redirectUrl?: string): Promise<User> {\n await this.ensureInitialized();\n if (this.isAuthenticated()) return this.user() as User;\n else {\n await this.keycloak.login({ redirectUri: globalThis.location.origin + '/' + redirectUrl });\n return this.getCurrentUser() as User;\n }\n }\n\n override async logout(redirectUrl?: string): Promise<void> {\n await this.keycloak.logout({ redirectUri: globalThis.location.origin + '/' + redirectUrl });\n this._user.set(undefined);\n }\n\n override getCurrentUser(): User | undefined {\n return this.user();\n }\n\n getUsername(): string {\n return this.keycloak.profile?.username || '';\n }\n\n getUserRoles(): string[] {\n return this.keycloak.realmAccess?.roles || [];\n }\n // endregion\n\n // region protected, private helper methods\n private ensureInitialized(): Promise<void> {\n this.initPromise ??= this.initKeycloak();\n return this.initPromise;\n }\n\n private async initKeycloak() {\n await this.keycloak.init({\n onLoad: 'check-sso',\n silentCheckSsoRedirectUri: 'http://localhost:4200/assets/auth/silent-check-sso.html',\n });\n\n // Check if authenticated using the keycloak-js instance directly\n if (this.keycloak.authenticated) {\n const profile = await this.keycloak.loadUserProfile();\n\n // Map to your User domain model\n const user = new User(profile.email || '', profile.id || '', profile.firstName || '', profile.lastName || '');\n\n this._user.set(user);\n } else {\n this._user.set(undefined);\n }\n }\n // endregion\n}\n","import { AuthService } from './auth.service';\nimport { Auth, signInWithEmailAndPassword } from '@angular/fire/auth';\nimport { User } from '../user/user';\n\nexport class FirebaseAuthService extends AuthService {\n private readonly auth: Auth;\n\n constructor(auth: Auth) {\n super();\n this.auth = auth;\n }\n\n // region public accessors and mutator methods\n override authenticate(): Promise<boolean> {\n return Promise.resolve(this.auth.currentUser !== null);\n }\n\n public async login(redirectUrl?: string, email?: string, password?: string): Promise<User | undefined> {\n if (email != null && password != null) {\n const userCredential = await signInWithEmailAndPassword(this.auth, email, password);\n const user = new User(userCredential.user.email, userCredential.user.uid, userCredential.user.displayName);\n this._user.set(user);\n return user;\n } else return undefined;\n }\n\n override logout(): Promise<void> {\n return this.auth.signOut();\n }\n\n getCurrentUser(): User | undefined {\n const currentUser = this.auth.currentUser;\n return new User(currentUser?.email, currentUser?.uid, currentUser?.displayName);\n }\n // endregion\n}\n","import { connectAuthEmulator, getAuth } from '@angular/fire/auth';\nimport { FirebaseAuthService } from './firebase-auth.service';\nimport { BaseConfiguration } from '@processpuzzle/util';\nimport { AuthenticationConfiguration } from './provide-authentication.service';\n\nexport function provideFirebaseAuthService(baseConfig: BaseConfiguration, authConfig: AuthenticationConfiguration): FirebaseAuthService {\n const auth = getAuth();\n const pipelineStage = baseConfig.PIPELINE_STAGE ?? 'ci';\n if ((pipelineStage === 'dev' || pipelineStage === 'ci') && authConfig.AUTHENTICATION_SERVICE_ROOT) {\n connectAuthEmulator(auth, authConfig.AUTHENTICATION_SERVICE_ROOT);\n }\n return new FirebaseAuthService(auth);\n}\n","import { EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport { KeycloakAuthConfig } from './keycloak-auth.config';\nimport { AuthService } from './auth.service';\nimport { FirebaseAuthConfig } from './firebase-auth.config';\nimport { BaseConfiguration, RUNTIME_CONFIGURATION } from '@processpuzzle/util';\nimport { KeycloakAuthService } from './keycloak-auth.service';\nimport { provideFirebaseAuthService } from './provide-firebase-auth-service';\n\nexport const AUTHENTICATION_CONFIGURATION = new InjectionToken<AuthenticationConfiguration>('AUTHENTICATION_CONFIGURATION');\nexport const AUTHENTICATION_SERVICE = new InjectionToken<AuthService>('AUTHENTICATION_SERVICE');\n\nexport interface AuthenticationConfiguration {\n readonly AUTHENTICATION_PROVIDER?: 'local-auth' | 'firebase-auth' | 'oauth2' | 'keycloak';\n readonly AUTHENTICATION_SERVICE_ROOT?: string;\n readonly AUTH_SERVICE_CONFIG?: KeycloakAuthConfig | FirebaseAuthConfig;\n}\n\nexport function provideAuthenticationService(runtimeConfig: { BASE_CONFIGURATION: BaseConfiguration; AUTHENTICATION_CONFIGURATION: AuthenticationConfiguration }): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: AUTHENTICATION_SERVICE,\n useFactory: () => {\n const baseConfig: BaseConfiguration = runtimeConfig.BASE_CONFIGURATION;\n const authConfig: AuthenticationConfiguration = runtimeConfig.AUTHENTICATION_CONFIGURATION;\n if (authConfig.AUTHENTICATION_PROVIDER === 'keycloak' && authConfig.AUTH_SERVICE_CONFIG) {\n return new KeycloakAuthService(authConfig.AUTH_SERVICE_CONFIG as KeycloakAuthConfig);\n } else if (authConfig.AUTHENTICATION_PROVIDER === 'firebase-auth') {\n return provideFirebaseAuthService(baseConfig, authConfig);\n } else {\n throw new Error('No AUTHENTICATION_PROVIDER or AUTH_SERVICE_CONFIG configured. Verify your RUNTIME_CONFIGURATION.');\n }\n },\n deps: [RUNTIME_CONFIGURATION],\n },\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uuidv4"],"mappings":";;;;;;;AAEA;AACM,SAAU,WAAW,CAAC,QAAsB,EAAA;AAChD,IAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;IACnE,IAAI,OAAO,EAAE;;AAEX,QAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC;;QAE1E,OAAO;YACL,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC;AAC1C,YAAA,SAAS,EAAE,EAAE;SACd;IACH;AACA,IAAA,OAAO,IAAI;AACb;;MCTsB,WAAW,CAAA;AACrB,IAAA,KAAK,GAAqC,MAAM,CAAmB,SAAS,4EAAC;AACpE,IAAA,IAAI,GAA6B,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;IAC3E,eAAe,GAAgC,QAAQ,CAAC,OAAO,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;;AAW5F,IAAA,UAAU,CAAC,OAAe,EAAA;AAClC,QAAA,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC;IAC1B;uGAhBoB,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAA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AAC,cAAc,IAAI,IAAI;AACvD,IAAA,IAAI,CAAC,aAAa,KAAK,KAAK,IAAI,aAAa,KAAK,IAAI,KAAK,UAAU,CAAC,2BAA2B,EAAE;AACjG,QAAA,mBAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACnE;AACA,IAAA,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC;AACtC;;MCJa,4BAA4B,GAAG,IAAI,cAAc,CAA8B,8BAA8B;MAC7G,sBAAsB,GAAG,IAAI,cAAc,CAAc,wBAAwB;AAQxF,SAAU,4BAA4B,CAAC,aAAmH,EAAA;AAC9J,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;YAC/B,UAAU,EAAE,MAAK;AACf,gBAAA,MAAM,UAAU,GAAsB,aAAa,CAAC,kBAAkB;AACtE,gBAAA,MAAM,UAAU,GAAgC,aAAa,CAAC,4BAA4B;gBAC1F,IAAI,UAAU,CAAC,uBAAuB,KAAK,UAAU,IAAI,UAAU,CAAC,mBAAmB,EAAE;AACvF,oBAAA,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,mBAAyC,CAAC;gBACtF;AAAO,qBAAA,IAAI,UAAU,CAAC,uBAAuB,KAAK,eAAe,EAAE;AACjE,oBAAA,OAAO,0BAA0B,CAAC,UAAU,EAAE,UAAU,CAAC;gBAC3D;qBAAO;AACL,oBAAA,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC;gBACrH;YACF,CAAC;YACD,IAAI,EAAE,CAAC,qBAAqB,CAAC;AAC9B,SAAA;AACF,KAAA,CAAC;AACJ;;ACnCA;;AAEG;;;;"}
@@ -129,19 +129,19 @@ class LoginComponent {
129
129
  return 'An error occurred during sign in';
130
130
  }
131
131
  }
132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
133
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: LoginComponent, isStandalone: true, selector: "pp-login", providers: [], ngImport: i0, template: "<div class=\"login-container\">\n <ng-container *transloco=\"let t;\">\n <h2>{{t('auth.login_form.title')}}</h2>\n\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Login Form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.login_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" placeholder=\"Enter your email\">\n @if (loginForm.get('email')?.hasError('required')) {\n <mat-error>{{t('auth.login_form.email_err_required')}}</mat-error>\n }\n @if (loginForm.get('email')?.hasError('email')) {\n <mat-error>{{t('auth.login_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.login_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\">\n <button mat-icon-button matSuffix type=\"button\" (click)=\"hidePassword = !hidePassword\" aria-label=\"Toggle Password Visibility\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (loginForm.get('password')?.hasError('required')) {\n <mat-error>{{t('auth.login_form.password_err_required')}}</mat-error>\n }\n </mat-form-field>\n\n <div class=\"actions\">\n <button mat-raised-button color=\"secondary\" routerLink=\"/auth/register\">{{t('auth.login_form.create_account_button')}}</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"loginForm.invalid || isLoading()\">{{ isLoading() ? t('auth.login_form.signing_in_button') : t('auth.login_form.sign_in_button') }}</button>\n </div>\n </form>\n\n <mat-divider class=\"divider\">OR</mat-divider>\n\n <button mat-stroked-button (click)=\"signInWithGoogle()\" [disabled]=\"isLoading()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 48 48\">\n <path fill=\"#FFC107\" d=\"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\ts5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24s8.955,20,20,20\ts20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z\"/>\n <path fill=\"#FF3D00\" d=\"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039\tl5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z\"/>\n <path fill=\"#4CAF50\" d=\"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z\"/>\n <path fill=\"#1976D2\" d=\"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z\"/>\n </svg>\n {{t('auth.login_form.google_button')}}\n </button>\n @if (errorMessage()) {\n <div class=\"error-message\">{{ errorMessage() }}</div>\n }\n </ng-container>\n</div>\n", styles: [".login-container{max-width:400px;margin:2rem auto;padding:2rem;border-radius:8px;box-shadow:0 2px 4px #0000001a}h2{text-align:center;margin-bottom:2rem}form{display:flex;flex-direction:column;gap:1rem}mat-form-field{width:100%}.actions{display:flex;justify-content:center;margin-top:1rem;gap:10px}.divider{margin:2rem 0;text-align:center}button[mat-stroked-button]{width:100%;margin-top:1rem;display:flex;align-items:center;justify-content:center;gap:.5rem}.google-icon{width:18px;height:18px}.error-message{color:red;text-align:center;margin-top:1rem}.mat-form-field-suffix{visibility:visible!important;opacity:1!important;display:flex!important}.mat-form-field-suffix button{z-index:10}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
133
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: LoginComponent, isStandalone: true, selector: "pp-login", providers: [], ngImport: i0, template: "<div class=\"login-container\">\n <ng-container *transloco=\"let t;\">\n <h2>{{t('auth.login_form.title')}}</h2>\n\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Login Form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.login_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" placeholder=\"Enter your email\">\n @if (loginForm.get('email')?.hasError('required')) {\n <mat-error>{{t('auth.login_form.email_err_required')}}</mat-error>\n }\n @if (loginForm.get('email')?.hasError('email')) {\n <mat-error>{{t('auth.login_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.login_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\">\n <button mat-icon-button matSuffix type=\"button\" (click)=\"hidePassword = !hidePassword\" aria-label=\"Toggle Password Visibility\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (loginForm.get('password')?.hasError('required')) {\n <mat-error>{{t('auth.login_form.password_err_required')}}</mat-error>\n }\n </mat-form-field>\n\n <div class=\"actions\">\n <button mat-raised-button color=\"secondary\" routerLink=\"/auth/register\">{{t('auth.login_form.create_account_button')}}</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"loginForm.invalid || isLoading()\">{{ isLoading() ? t('auth.login_form.signing_in_button') : t('auth.login_form.sign_in_button') }}</button>\n </div>\n </form>\n\n <mat-divider class=\"divider\">OR</mat-divider>\n\n <button mat-stroked-button (click)=\"signInWithGoogle()\" [disabled]=\"isLoading()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 48 48\">\n <path fill=\"#FFC107\" d=\"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\ts5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24s8.955,20,20,20\ts20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z\"/>\n <path fill=\"#FF3D00\" d=\"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039\tl5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z\"/>\n <path fill=\"#4CAF50\" d=\"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z\"/>\n <path fill=\"#1976D2\" d=\"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z\"/>\n </svg>\n {{t('auth.login_form.google_button')}}\n </button>\n @if (errorMessage()) {\n <div class=\"error-message\">{{ errorMessage() }}</div>\n }\n </ng-container>\n</div>\n", styles: [".login-container{max-width:400px;margin:2rem auto;padding:2rem;border-radius:8px;box-shadow:0 2px 4px #0000001a}h2{text-align:center;margin-bottom:2rem}form{display:flex;flex-direction:column;gap:1rem}mat-form-field{width:100%}.actions{display:flex;justify-content:center;margin-top:1rem;gap:10px}.divider{margin:2rem 0;text-align:center}button[mat-stroked-button]{width:100%;margin-top:1rem;display:flex;align-items:center;justify-content:center;gap:.5rem}.google-icon{width:18px;height:18px}.error-message{color:red;text-align:center;margin-top:1rem}.mat-form-field-suffix{visibility:visible!important;opacity:1!important;display:flex!important}.mat-form-field-suffix button{z-index:10}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
134
134
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LoginComponent, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LoginComponent, decorators: [{
136
136
  type: Component,
137
137
  args: [{ selector: 'pp-login', imports: [MatButton, MatDivider, MatError, MatFormField, MatIcon, MatIconButton, MatInput, MatLabel, MatSuffix, ReactiveFormsModule, RouterLink, TranslocoDirective], providers: [], template: "<div class=\"login-container\">\n <ng-container *transloco=\"let t;\">\n <h2>{{t('auth.login_form.title')}}</h2>\n\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Login Form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.login_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" placeholder=\"Enter your email\">\n @if (loginForm.get('email')?.hasError('required')) {\n <mat-error>{{t('auth.login_form.email_err_required')}}</mat-error>\n }\n @if (loginForm.get('email')?.hasError('email')) {\n <mat-error>{{t('auth.login_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.login_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\">\n <button mat-icon-button matSuffix type=\"button\" (click)=\"hidePassword = !hidePassword\" aria-label=\"Toggle Password Visibility\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (loginForm.get('password')?.hasError('required')) {\n <mat-error>{{t('auth.login_form.password_err_required')}}</mat-error>\n }\n </mat-form-field>\n\n <div class=\"actions\">\n <button mat-raised-button color=\"secondary\" routerLink=\"/auth/register\">{{t('auth.login_form.create_account_button')}}</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"loginForm.invalid || isLoading()\">{{ isLoading() ? t('auth.login_form.signing_in_button') : t('auth.login_form.sign_in_button') }}</button>\n </div>\n </form>\n\n <mat-divider class=\"divider\">OR</mat-divider>\n\n <button mat-stroked-button (click)=\"signInWithGoogle()\" [disabled]=\"isLoading()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 48 48\">\n <path fill=\"#FFC107\" d=\"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\ts5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24s8.955,20,20,20\ts20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z\"/>\n <path fill=\"#FF3D00\" d=\"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039\tl5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z\"/>\n <path fill=\"#4CAF50\" d=\"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z\"/>\n <path fill=\"#1976D2\" d=\"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z\"/>\n </svg>\n {{t('auth.login_form.google_button')}}\n </button>\n @if (errorMessage()) {\n <div class=\"error-message\">{{ errorMessage() }}</div>\n }\n </ng-container>\n</div>\n", styles: [".login-container{max-width:400px;margin:2rem auto;padding:2rem;border-radius:8px;box-shadow:0 2px 4px #0000001a}h2{text-align:center;margin-bottom:2rem}form{display:flex;flex-direction:column;gap:1rem}mat-form-field{width:100%}.actions{display:flex;justify-content:center;margin-top:1rem;gap:10px}.divider{margin:2rem 0;text-align:center}button[mat-stroked-button]{width:100%;margin-top:1rem;display:flex;align-items:center;justify-content:center;gap:.5rem}.google-icon{width:18px;height:18px}.error-message{color:red;text-align:center;margin-top:1rem}.mat-form-field-suffix{visibility:visible!important;opacity:1!important;display:flex!important}.mat-form-field-suffix button{z-index:10}\n"] }]
138
138
  }] });
139
139
 
140
140
  class MyProfileComponent {
141
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MyProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
142
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: MyProfileComponent, isStandalone: true, selector: "pp-my-profile", providers: [provideTranslocoScope('auth')], ngImport: i0, template: "<h1>My profile</h1>\n", styles: [""] });
141
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MyProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
142
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: MyProfileComponent, isStandalone: true, selector: "pp-my-profile", providers: [provideTranslocoScope('auth')], ngImport: i0, template: "<h1>My profile</h1>\n", styles: [""] });
143
143
  }
144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MyProfileComponent, decorators: [{
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: MyProfileComponent, decorators: [{
145
145
  type: Component,
146
146
  args: [{ selector: 'pp-my-profile', imports: [], providers: [provideTranslocoScope('auth')], template: "<h1>My profile</h1>\n" }]
147
147
  }] });
@@ -210,10 +210,10 @@ class RegistrationComponent {
210
210
  return 'An error occurred during registration. Please try again.';
211
211
  }
212
212
  }
213
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RegistrationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
214
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: RegistrationComponent, isStandalone: true, selector: "pp-registration", providers: [provideTranslocoScope({ scope: 'auth' })], ngImport: i0, template: "<div class=\"registration-container\">\n <ng-container *transloco=\"let t;\">\n <h1>{{t('auth.registration_form.title')}}</h1>\n\n <form [formGroup]=\"registerForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Registration Form\">\n @if (isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" [placeholder]=\"t('auth.registration_form.email_placeholder')\">\n @if (registerForm.get('email')?.errors?.['required']) {\n <mat-error>{{t('auth.registration_form.email_err_required')}}</mat-error>\n }\n @if (registerForm.get('email')?.errors?.['email']) {\n <mat-error>{{t('auth.registration_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" [placeholder]=\"t('auth.registration_form.password_placeholder')\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hidePassword = !hidePassword\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (registerForm.get('password')?.errors?.['required']) {\n <mat-error>{{t('auth.registration_form.password_err_required')}}</mat-error>\n }\n @if (registerForm.get('password')?.errors?.['minlength']) {\n <mat-error>{{t('auth.registration_form.password_err_min_length')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.password_confirm_label')}}</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" [placeholder]=\"t('auth.registration_form.password_confirm_placeholder')\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hideConfirmPassword = !hideConfirmPassword\">\n <mat-icon>{{hideConfirmPassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (registerForm.errors?.['passwordMismatch']) {\n <mat-error>{{t('auth.registration_form.password_confirm_err_mismatch')}}</mat-error>\n }\n </mat-form-field>\n\n <div class=\"form-actions\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"registerForm.invalid || isLoading()\">{{t('auth.registration_form.create_button')}}</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">{{t('auth.registration_form.sign_in_button')}}</button>\n </div>\n\n @if (errorMessage() !== '') {\n <mat-error class=\"server-error\">{{ errorMessage() }}</mat-error>\n }\n </form>\n </ng-container>\n</div>\n", styles: [".registration-container{max-width:400px;margin:2rem auto;padding:2rem}form{display:flex;flex-direction:column;gap:1rem}.form-actions{display:flex;flex-direction:column;gap:.5rem;margin-top:1rem}.server-error{margin-top:1rem;text-align:center}h1{text-align:center;margin-bottom:2rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
213
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RegistrationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
214
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: RegistrationComponent, isStandalone: true, selector: "pp-registration", providers: [provideTranslocoScope({ scope: 'auth' })], ngImport: i0, template: "<div class=\"registration-container\">\n <ng-container *transloco=\"let t;\">\n <h1>{{t('auth.registration_form.title')}}</h1>\n\n <form [formGroup]=\"registerForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Registration Form\">\n @if (isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" [placeholder]=\"t('auth.registration_form.email_placeholder')\">\n @if (registerForm.get('email')?.errors?.['required']) {\n <mat-error>{{t('auth.registration_form.email_err_required')}}</mat-error>\n }\n @if (registerForm.get('email')?.errors?.['email']) {\n <mat-error>{{t('auth.registration_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" [placeholder]=\"t('auth.registration_form.password_placeholder')\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hidePassword = !hidePassword\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (registerForm.get('password')?.errors?.['required']) {\n <mat-error>{{t('auth.registration_form.password_err_required')}}</mat-error>\n }\n @if (registerForm.get('password')?.errors?.['minlength']) {\n <mat-error>{{t('auth.registration_form.password_err_min_length')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.password_confirm_label')}}</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" [placeholder]=\"t('auth.registration_form.password_confirm_placeholder')\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hideConfirmPassword = !hideConfirmPassword\">\n <mat-icon>{{hideConfirmPassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (registerForm.errors?.['passwordMismatch']) {\n <mat-error>{{t('auth.registration_form.password_confirm_err_mismatch')}}</mat-error>\n }\n </mat-form-field>\n\n <div class=\"form-actions\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"registerForm.invalid || isLoading()\">{{t('auth.registration_form.create_button')}}</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">{{t('auth.registration_form.sign_in_button')}}</button>\n </div>\n\n @if (errorMessage() !== '') {\n <mat-error class=\"server-error\">{{ errorMessage() }}</mat-error>\n }\n </form>\n </ng-container>\n</div>\n", styles: [".registration-container{max-width:400px;margin:2rem auto;padding:2rem}form{display:flex;flex-direction:column;gap:1rem}.form-actions{display:flex;flex-direction:column;gap:.5rem;margin-top:1rem}.server-error{margin-top:1rem;text-align:center}h1{text-align:center;margin-bottom:2rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
215
215
  }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: RegistrationComponent, decorators: [{
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: RegistrationComponent, decorators: [{
217
217
  type: Component,
218
218
  args: [{ selector: 'pp-registration', imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError, TranslocoDirective], providers: [provideTranslocoScope({ scope: 'auth' })], template: "<div class=\"registration-container\">\n <ng-container *transloco=\"let t;\">\n <h1>{{t('auth.registration_form.title')}}</h1>\n\n <form [formGroup]=\"registerForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Registration Form\">\n @if (isLoading()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" [placeholder]=\"t('auth.registration_form.email_placeholder')\">\n @if (registerForm.get('email')?.errors?.['required']) {\n <mat-error>{{t('auth.registration_form.email_err_required')}}</mat-error>\n }\n @if (registerForm.get('email')?.errors?.['email']) {\n <mat-error>{{t('auth.registration_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" [placeholder]=\"t('auth.registration_form.password_placeholder')\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hidePassword = !hidePassword\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (registerForm.get('password')?.errors?.['required']) {\n <mat-error>{{t('auth.registration_form.password_err_required')}}</mat-error>\n }\n @if (registerForm.get('password')?.errors?.['minlength']) {\n <mat-error>{{t('auth.registration_form.password_err_min_length')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('auth.registration_form.password_confirm_label')}}</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" [placeholder]=\"t('auth.registration_form.password_confirm_placeholder')\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hideConfirmPassword = !hideConfirmPassword\">\n <mat-icon>{{hideConfirmPassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n @if (registerForm.errors?.['passwordMismatch']) {\n <mat-error>{{t('auth.registration_form.password_confirm_err_mismatch')}}</mat-error>\n }\n </mat-form-field>\n\n <div class=\"form-actions\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"registerForm.invalid || isLoading()\">{{t('auth.registration_form.create_button')}}</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">{{t('auth.registration_form.sign_in_button')}}</button>\n </div>\n\n @if (errorMessage() !== '') {\n <mat-error class=\"server-error\">{{ errorMessage() }}</mat-error>\n }\n </form>\n </ng-container>\n</div>\n", styles: [".registration-container{max-width:400px;margin:2rem auto;padding:2rem}form{display:flex;flex-direction:column;gap:1rem}.form-actions{display:flex;flex-direction:column;gap:.5rem;margin-top:1rem}.server-error{margin-top:1rem;text-align:center}h1{text-align:center;margin-bottom:2rem}\n"] }]
219
219
  }], ctorParameters: () => [] });
@@ -239,8 +239,8 @@ class LogoutComponent {
239
239
  this.isLoading.set(false);
240
240
  }
241
241
  }
242
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
243
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: LogoutComponent, isStandalone: true, selector: "pp-logout", providers: [provideTranslocoScope('auth')], ngImport: i0, template: `
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
243
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: LogoutComponent, isStandalone: true, selector: "pp-logout", providers: [provideTranslocoScope('auth')], ngImport: i0, template: `
244
244
  <div class="logout-dialog">
245
245
  <ng-container *transloco="let t">
246
246
  <h2 mat-dialog-title>{{ t('auth.logout_dialog.title') }}</h2>
@@ -253,7 +253,7 @@ class LogoutComponent {
253
253
  </div>
254
254
  `, isInline: true, styles: ["mat-dialog-actions{gap:.5rem}mat-dialog-content{margin:1rem 0}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
255
255
  }
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LogoutComponent, decorators: [{
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LogoutComponent, decorators: [{
257
257
  type: Component,
258
258
  args: [{ selector: 'pp-logout', template: `
259
259
  <div class="logout-dialog">
@@ -291,8 +291,8 @@ class AuthButtonComponent {
291
291
  authService = inject(AUTHENTICATION_SERVICE);
292
292
  isAuthenticated = computed(() => this.authService.isAuthenticated(), ...(ngDevMode ? [{ debugName: "isAuthenticated" }] : /* istanbul ignore next */ []));
293
293
  routes = authRoutes.filter((item) => item.title !== null && item.title !== undefined);
294
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuthButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
295
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: AuthButtonComponent, isStandalone: true, selector: "pp-auth-button", providers: [provideTranslocoScope('auth')], ngImport: i0, template: `
294
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AuthButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
295
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: AuthButtonComponent, isStandalone: true, selector: "pp-auth-button", providers: [provideTranslocoScope('auth')], ngImport: i0, template: `
296
296
  <div class="auth-button">
297
297
  <ng-container *transloco="let t">
298
298
  <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Auth Button">
@@ -312,7 +312,7 @@ class AuthButtonComponent {
312
312
  </div>
313
313
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: SubstringPipe, name: "substring" }] });
314
314
  }
315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AuthButtonComponent, decorators: [{
315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: AuthButtonComponent, decorators: [{
316
316
  type: Component,
317
317
  args: [{ selector: 'pp-auth-button', template: `
318
318
  <div class="auth-button">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processpuzzle/auth",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,24 +11,26 @@
11
11
  },
12
12
  "homepage": "https://github.com/ZsZs/processpuzzle#readme",
13
13
  "peerDependencies": {
14
- "@angular/common": "~21.2.4",
15
- "@angular/core": "~21.2.4",
16
- "@angular/forms": "~21.2.4",
17
- "@angular/router": "~21.2.4",
18
- "@angular/material": "^21.2.2",
19
- "@angular/cdk": "^21.2.2",
14
+ "@angular/cdk": "^21.2.3",
15
+ "@angular/common": "~21.2.5",
16
+ "@angular/core": "~21.2.5",
20
17
  "@angular/fire": "^20.0.1",
18
+ "@angular/forms": "~21.2.5",
19
+ "@angular/material": "^21.2.3",
20
+ "@angular/platform-browser": "~21.2.5",
21
+ "@angular/router": "~21.2.5",
21
22
  "@jsverse/transloco": "8.2.1",
22
23
  "@ngrx/component-store": "^21.0.1",
23
24
  "@ngrx/operators": "^21.0.1",
24
25
  "@ngrx/signals": "^21.0.1",
25
- "@processpuzzle/base-entity": "^0.2.4",
26
+ "@processpuzzle/base-entity": "^0.3.6",
27
+ "@processpuzzle/test-util": "^0.2.4",
26
28
  "@processpuzzle/util": "^0.2.4",
27
- "@processpuzzle/widgets": "^0.2.4",
29
+ "@processpuzzle/widgets": "^0.2.3",
28
30
  "angular-auth-oidc-client": "^21.0.1",
29
31
  "firebase-admin": "^13.7.0",
30
32
  "keycloak-js": "^26.2.3",
31
- "ngx-logger": "^5.0.12",
33
+ "ngx-logging-kit": "^21.0.1",
32
34
  "rxjs": "~7.8.2",
33
35
  "uuid": "^13.0.0"
34
36
  },
@@ -2,6 +2,7 @@ import { UrlSegment } from '@angular/router';
2
2
  import * as i0 from '@angular/core';
3
3
  import { WritableSignal, Signal, InjectionToken, EnvironmentProviders } from '@angular/core';
4
4
  import { BaseEntity } from '@processpuzzle/base-entity';
5
+ import { BaseConfiguration } from '@processpuzzle/util';
5
6
 
6
7
  declare function authMatcher(segments: UrlSegment[]): {
7
8
  consumed: UrlSegment[];
@@ -58,7 +59,10 @@ interface AuthenticationConfiguration {
58
59
  readonly AUTHENTICATION_SERVICE_ROOT?: string;
59
60
  readonly AUTH_SERVICE_CONFIG?: KeycloakAuthConfig | FirebaseAuthConfig;
60
61
  }
61
- declare function provideAuthenticationService(): EnvironmentProviders;
62
+ declare function provideAuthenticationService(runtimeConfig: {
63
+ BASE_CONFIGURATION: BaseConfiguration;
64
+ AUTHENTICATION_CONFIGURATION: AuthenticationConfiguration;
65
+ }): EnvironmentProviders;
62
66
 
63
67
  export { AUTHENTICATION_CONFIGURATION, AUTHENTICATION_SERVICE, AuthService, User, authMatcher, provideAuthenticationService };
64
68
  export type { AuthenticationConfiguration, FirebaseAuthConfig, KeycloakAuthConfig };