@processpuzzle/auth 0.1.0 → 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,12 +210,12 @@ 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('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('registration_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" [placeholder]=\"t('registration_form.email_placeholder')\">\n @if (registerForm.get('email')?.errors?.['required']) {\n <mat-error>{{t('registration_form.email_err_required')}}</mat-error>\n }\n @if (registerForm.get('email')?.errors?.['email']) {\n <mat-error>{{t('registration_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('registration_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" [placeholder]=\"t('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('registration_form.password_err_required')}}</mat-error>\n }\n @if (registerForm.get('password')?.errors?.['minlength']) {\n <mat-error>{{t('registration_form.password_err_min_length')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('registration_form.password_confirm_label')}}</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" [placeholder]=\"t('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('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('registration_form.create_button')}}</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">{{t('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
- 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('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('registration_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" [placeholder]=\"t('registration_form.email_placeholder')\">\n @if (registerForm.get('email')?.errors?.['required']) {\n <mat-error>{{t('registration_form.email_err_required')}}</mat-error>\n }\n @if (registerForm.get('email')?.errors?.['email']) {\n <mat-error>{{t('registration_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('registration_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" [placeholder]=\"t('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('registration_form.password_err_required')}}</mat-error>\n }\n @if (registerForm.get('password')?.errors?.['minlength']) {\n <mat-error>{{t('registration_form.password_err_min_length')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('registration_form.password_confirm_label')}}</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" [placeholder]=\"t('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('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('registration_form.create_button')}}</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">{{t('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"] }]
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: () => [] });
220
220
 
221
221
  class LogoutComponent {
@@ -239,34 +239,34 @@ 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
- <h2 mat-dialog-title>{{ t('logout_dialog.title') }}</h2>
247
- <mat-dialog-content>{{ t('logout_dialog.content') }}</mat-dialog-content>
246
+ <h2 mat-dialog-title>{{ t('auth.logout_dialog.title') }}</h2>
247
+ <mat-dialog-content>{{ t('auth.logout_dialog.content') }}</mat-dialog-content>
248
248
  <mat-dialog-actions align="end">
249
- <button mat-button (click)="onCancel()">{{ t('logout_dialog.cancel_button') }}</button>
250
- <button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">{{ t('logout_dialog.logout_button') }}</button>
249
+ <button mat-button (click)="onCancel()">{{ t('auth.logout_dialog.cancel_button') }}</button>
250
+ <button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">{{ t('auth.logout_dialog.logout_button') }}</button>
251
251
  </mat-dialog-actions>
252
252
  </ng-container>
253
253
  </div>
254
- `, isInline: true, styles: [".logout-dialog{padding:1rem}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"] }] });
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">
260
260
  <ng-container *transloco="let t">
261
- <h2 mat-dialog-title>{{ t('logout_dialog.title') }}</h2>
262
- <mat-dialog-content>{{ t('logout_dialog.content') }}</mat-dialog-content>
261
+ <h2 mat-dialog-title>{{ t('auth.logout_dialog.title') }}</h2>
262
+ <mat-dialog-content>{{ t('auth.logout_dialog.content') }}</mat-dialog-content>
263
263
  <mat-dialog-actions align="end">
264
- <button mat-button (click)="onCancel()">{{ t('logout_dialog.cancel_button') }}</button>
265
- <button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">{{ t('logout_dialog.logout_button') }}</button>
264
+ <button mat-button (click)="onCancel()">{{ t('auth.logout_dialog.cancel_button') }}</button>
265
+ <button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">{{ t('auth.logout_dialog.logout_button') }}</button>
266
266
  </mat-dialog-actions>
267
267
  </ng-container>
268
268
  </div>
269
- `, imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButton, TranslocoDirective], providers: [provideTranslocoScope('auth')], styles: [".logout-dialog{padding:1rem}mat-dialog-actions{gap:.5rem}mat-dialog-content{margin:1rem 0}\n"] }]
269
+ `, imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButton, TranslocoDirective], providers: [provideTranslocoScope('auth')], styles: ["mat-dialog-actions{gap:.5rem}mat-dialog-content{margin:1rem 0}\n"] }]
270
270
  }] });
271
271
 
272
272
  const loginResolver = async () => {
@@ -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">
@@ -1 +1 @@
1
- {"version":3,"file":"processpuzzle-auth-feature.mjs","sources":["../../../../libs/auth/feature/auth.guard.ts","../../../../libs/auth/feature/login/login.component.ts","../../../../libs/auth/feature/login/login.component.html","../../../../libs/auth/feature/my-profile/my-profile.component.ts","../../../../libs/auth/feature/my-profile/my-profile.component.html","../../../../libs/auth/feature/registration/registration.component.ts","../../../../libs/auth/feature/registration/registration.component.html","../../../../libs/auth/feature/logout/logout.component.ts","../../../../libs/auth/feature/login/login.resolver.ts","../../../../libs/auth/feature/auth.routes.ts","../../../../libs/auth/feature/auth-button/auth-button.component.ts","../../../../libs/auth/feature/processpuzzle-auth-feature.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { AUTHENTICATION_SERVICE } from '@processpuzzle/auth/domain';\n\nexport const authGuard = async (route: ActivatedRouteSnapshot) => {\n const authService = inject(AUTHENTICATION_SERVICE);\n const isLoginRoute = route.routeConfig?.path === 'login';\n const isLogoutRoute = route.routeConfig?.path === 'logout';\n const router = inject(Router);\n const snackBar = inject(MatSnackBar);\n\n await authService.authenticate();\n\n if (isLoginRoute) {\n if (authService.isAuthenticated()) {\n snackBar.open('You are already logged in', 'Close', { duration: 3000 });\n await router.navigate(['/']);\n return false;\n } else {\n return true; // If not logged in, allow access to login page\n }\n } else if (isLogoutRoute) {\n if (authService.isAuthenticated()) {\n return true; // If logged in, allow access to logout page\n } else {\n snackBar.open('You are not already logged in', 'Close', { duration: 3000 });\n await router.navigate(['/']);\n return false;\n }\n } else if (authService.isAuthenticated()) {\n // For protected routes, check if user is logged in\n return true;\n } else {\n await router.navigate(['/auth/login']);\n return false;\n }\n};\n","import { Component, inject, OnInit, signal } from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { MatError, MatFormField, MatSuffix } from '@angular/material/form-field';\nimport { MatInput, MatLabel } from '@angular/material/input';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatDivider } from '@angular/material/divider';\nimport { TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE, AuthService } from '@processpuzzle/auth/domain';\nimport { NavigateBackService } from '@processpuzzle/widgets';\n\n@Component({\n selector: 'pp-login',\n templateUrl: 'login.component.html',\n styleUrls: ['login.component.css'],\n imports: [MatButton, MatDivider, MatError, MatFormField, MatIcon, MatIconButton, MatInput, MatLabel, MatSuffix, ReactiveFormsModule, RouterLink, TranslocoDirective],\n providers: [],\n})\nexport class LoginComponent implements OnInit {\n errorMessage = signal('');\n hidePassword = true;\n isLoading = signal(false);\n loginForm!: FormGroup;\n private readonly authService: AuthService = inject(AUTHENTICATION_SERVICE);\n private readonly fb = inject(FormBuilder);\n private readonly navigateBackService = inject(NavigateBackService);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n // region public event handlers\n ngOnInit(): void {\n const user = this.route.snapshot.data['signedInUser'];\n if (!user) {\n this.loginForm = this.buildLoginForm();\n }\n }\n\n async onSubmit() {\n if (this.loginForm.invalid) return;\n this.errorMessage.set('');\n this.isLoading.set(true);\n\n try {\n const { email, password } = this.loginForm.value;\n await this.authService.login(this.navigateBackService.getRouteStack().pop(), email, password);\n await this.router.navigate(['/']);\n } catch (error: unknown) {\n const message = this.getErrorMessage((error as { code?: string; message?: string }).code || (error as { code?: string; message?: string }).message || '');\n this.errorMessage.set(message);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n protected async signInWithGoogle() {\n this.errorMessage.set('');\n this.isLoading.set(true);\n try {\n // await signInWithPopup(this.authService, new GoogleAuthProvider());\n await this.router.navigate(['/']);\n } catch (error: unknown) {\n this.errorMessage.set(this.getErrorMessage((error as { code?: string; message?: string }).code || (error as { code?: string; message?: string }).message || ''));\n } finally {\n this.isLoading.set(false);\n }\n }\n // endregion\n\n // region protected, private helper methods\n private buildLoginForm() {\n return this.fb.group({\n email: ['', [Validators.required, Validators.email]],\n password: ['', Validators.required],\n });\n }\n\n private getErrorMessage(errorCode: string): string {\n switch (errorCode) {\n case 'auth/invalid-email':\n return 'Invalid email address';\n case 'auth/user-disabled':\n return 'This account has been disabled';\n case 'auth/user-not-found':\n return 'No account found with this email';\n case 'auth/wrong-password':\n return 'Invalid password';\n case 'auth/popup-closed-by-user':\n return 'Sign-in popup was closed before completion';\n default:\n return 'An error occurred during sign in';\n }\n }\n // endregion\n}\n","<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","import { Component } from '@angular/core';\nimport { provideTranslocoScope } from '@jsverse/transloco';\n\n@Component({\n selector: 'pp-my-profile',\n templateUrl: 'my-profile.component.html',\n styles: ``,\n imports: [],\n providers: [provideTranslocoScope('auth')],\n})\nexport class MyProfileComponent {}\n","<h1>My profile</h1>\n","import { Component, inject, signal } from '@angular/core';\nimport { AbstractControl, FormBuilder, FormGroup, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { MatProgressBar } from '@angular/material/progress-bar';\nimport { MatError, MatFormField } from '@angular/material/form-field';\nimport { MatInput, MatLabel } from '@angular/material/input';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { NavigateBackService } from '@processpuzzle/widgets';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE, AuthService } from '@processpuzzle/auth/domain';\n\n@Component({\n selector: 'pp-registration',\n templateUrl: './registration.component.html',\n styleUrls: ['./registration.component.css'],\n imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError, TranslocoDirective],\n providers: [provideTranslocoScope({ scope: 'auth' })],\n})\nexport class RegistrationComponent {\n private readonly authService: AuthService = inject(AUTHENTICATION_SERVICE);\n private readonly fb = inject(FormBuilder);\n private readonly navigateBack = inject(NavigateBackService);\n private readonly snackBar = inject<MatSnackBar>(MatSnackBar);\n public registerForm: FormGroup;\n public isLoading = signal<boolean>(false);\n public errorMessage = signal<string>('');\n public hidePassword = true;\n public hideConfirmPassword = true;\n\n constructor() {\n this.registerForm = this.fb.group(\n {\n email: ['', [Validators.required, Validators.email]],\n password: ['', [Validators.required, Validators.minLength(6)]],\n confirmPassword: ['', Validators.required],\n },\n {\n validators: [this.passwordMatchValidator],\n },\n );\n }\n\n private passwordMatchValidator(): ValidatorFn {\n return (form: AbstractControl): ValidationErrors | null => {\n const password = form.get('password')?.value;\n const confirmPassword = form.get('confirmPassword')?.value;\n\n if (password !== confirmPassword) {\n return { passwordMismatch: true };\n }\n return null;\n };\n }\n\n async onSubmit(): Promise<void> {\n if (this.registerForm.invalid) return;\n\n this.isLoading.set(true);\n\n try {\n const { email, password } = this.registerForm.value;\n await this.authService.login('', email, password);\n } catch (error: unknown) {\n const errorCode = (error as { code?: string; message?: string }).code || (error as { code?: string; message?: string }).message || 'unknown';\n this.snackBar.open(this.getErrorMessage(errorCode), 'Close', {\n duration: 5000,\n panelClass: ['error-snackbar'],\n });\n } finally {\n this.isLoading.set(false);\n this.errorMessage.set('');\n this.navigateBack.goBack();\n }\n }\n\n private getErrorMessage(errorCode: string): string {\n switch (errorCode) {\n case 'auth/email-already-in-use':\n return 'This email address is already registered';\n case 'auth/invalid-email':\n return 'Please enter a valid email address';\n case 'auth/operation-not-allowed':\n return 'Email/password registration is not enabled';\n case 'auth/weak-password':\n return 'Please choose a stronger password';\n default:\n return 'An error occurred during registration. Please try again.';\n }\n }\n}\n","<div class=\"registration-container\">\n <ng-container *transloco=\"let t;\">\n <h1>{{t('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('registration_form.email_label')}}</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" [placeholder]=\"t('registration_form.email_placeholder')\">\n @if (registerForm.get('email')?.errors?.['required']) {\n <mat-error>{{t('registration_form.email_err_required')}}</mat-error>\n }\n @if (registerForm.get('email')?.errors?.['email']) {\n <mat-error>{{t('registration_form.email_err_invalid')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('registration_form.password_label')}}</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" [placeholder]=\"t('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('registration_form.password_err_required')}}</mat-error>\n }\n @if (registerForm.get('password')?.errors?.['minlength']) {\n <mat-error>{{t('registration_form.password_err_min_length')}}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{t('registration_form.password_confirm_label')}}</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" [placeholder]=\"t('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('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('registration_form.create_button')}}</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">{{t('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","import { Component, inject, signal } from '@angular/core';\nimport { MatDialogActions, MatDialogContent, MatDialogTitle } from '@angular/material/dialog';\nimport { MatButton } from '@angular/material/button';\nimport { NavigateBackService } from '@processpuzzle/widgets';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE } from '@processpuzzle/auth/domain';\n\n@Component({\n selector: 'pp-logout',\n template: `\n <div class=\"logout-dialog\">\n <ng-container *transloco=\"let t\">\n <h2 mat-dialog-title>{{ t('logout_dialog.title') }}</h2>\n <mat-dialog-content>{{ t('logout_dialog.content') }}</mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button mat-button (click)=\"onCancel()\">{{ t('logout_dialog.cancel_button') }}</button>\n <button mat-raised-button color=\"primary\" (click)=\"onLogout()\" [disabled]=\"isLoading()\">{{ t('logout_dialog.logout_button') }}</button>\n </mat-dialog-actions>\n </ng-container>\n </div>\n `,\n styles: [\n `\n .logout-dialog {\n padding: 1rem;\n }\n\n mat-dialog-actions {\n gap: 0.5rem;\n }\n\n mat-dialog-content {\n margin: 1rem 0;\n }\n `,\n ],\n imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButton, TranslocoDirective],\n providers: [provideTranslocoScope('auth')],\n})\nexport class LogoutComponent {\n private readonly authService = inject(AUTHENTICATION_SERVICE);\n private readonly navigateBackService = inject(NavigateBackService);\n protected isLoading = signal(false);\n\n onCancel() {\n this.navigateBackService.goBack();\n }\n\n async onLogout(): Promise<void> {\n try {\n this.isLoading.set(true);\n this.navigateBackService.getRouteStack().pop();\n await this.authService.logout(this.navigateBackService.getRouteStack().pop());\n this.navigateBackService.goBack();\n } catch (error) {\n console.error('Error during logout:', error);\n } finally {\n this.isLoading.set(false);\n }\n }\n}\n","import { inject } from '@angular/core';\nimport { ResolveFn } from '@angular/router';\nimport { AUTHENTICATION_CONFIGURATION, AUTHENTICATION_SERVICE, AuthenticationConfiguration, User } from '@processpuzzle/auth/domain';\nimport { NavigateBackService } from '@processpuzzle/widgets';\n\nexport const loginResolver: ResolveFn<User | undefined> = async () => {\n const authConfig: AuthenticationConfiguration = inject(AUTHENTICATION_CONFIGURATION);\n const authService = inject(AUTHENTICATION_SERVICE);\n const navigateBackService = inject(NavigateBackService);\n\n if (authConfig.AUTHENTICATION_PROVIDER === 'firebase-auth') return undefined;\n else return await authService.login(navigateBackService.getRouteStack().pop());\n};\n","import { Routes } from '@angular/router';\nimport { LoginComponent } from './login/login.component';\nimport { MyProfileComponent } from './my-profile/my-profile.component';\nimport { RegistrationComponent } from './registration/registration.component';\nimport { LogoutComponent } from './logout/logout.component';\nimport { authGuard } from './auth.guard';\nimport { loginResolver } from './login/login.resolver';\nimport { provideTranslocoScope } from '@jsverse/transloco';\n\nexport const authRoutes: Routes = [\n { path: '', redirectTo: 'login', pathMatch: 'full', providers: [provideTranslocoScope('auth')] },\n { path: 'login', component: LoginComponent, title: 'login', data: { icon: 'login', authToggle: true }, resolve: { signedInUser: loginResolver }, canActivate: [authGuard] },\n { path: 'logout', component: LogoutComponent, title: 'logout', data: { icon: 'logout', authToggle: false }, canActivate: [authGuard] },\n { path: 'register', component: RegistrationComponent, title: 'register', data: { icon: 'person_add', authToggle: true } },\n { path: 'my-profile', component: MyProfileComponent, title: 'my_profile', data: { icon: 'person', authToggle: false } },\n];\n","import { Component, computed, inject } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';\nimport { RouterLink } from '@angular/router';\nimport { authRoutes } from '../auth.routes';\nimport { SubstringPipe } from '@processpuzzle/util';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE } from '@processpuzzle/auth/domain';\n\n@Component({\n selector: 'pp-auth-button',\n template: `\n <div class=\"auth-button\">\n <ng-container *transloco=\"let t\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"Auth Button\">\n <mat-icon>person</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (item of routes; track item) {\n @if ((isAuthenticated() && !item.data?.['authToggle']) || (!isAuthenticated() && item.data?.['authToggle'])) {\n <button mat-menu-item [routerLink]=\"'auth/' + item.path\">\n <mat-icon>{{ item.data?.['icon'] }}</mat-icon>\n <span>&nbsp;{{ t('auth.button.' + item.title | substring: 0) }}</span>\n </button>\n }\n }\n </mat-menu>\n </ng-container>\n </div>\n `,\n imports: [MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe, TranslocoDirective],\n styles: [],\n providers: [provideTranslocoScope('auth')],\n})\nexport class AuthButtonComponent {\n private readonly authService = inject(AUTHENTICATION_SERVICE);\n isAuthenticated = computed(() => this.authService.isAuthenticated());\n readonly routes = authRoutes.filter((item) => item.title !== null && item.title !== undefined);\n\n // region event handling methods\n // endregion\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAKa,SAAS,GAAG,OAAO,KAA6B,KAAI;AAC/D,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,OAAO;IACxD,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,QAAQ;AAC1D,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7B,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAEpC,IAAA,MAAM,WAAW,CAAC,YAAY,EAAE;IAEhC,IAAI,YAAY,EAAE;AAChB,QAAA,IAAI,WAAW,CAAC,eAAe,EAAE,EAAE;AACjC,YAAA,QAAQ,CAAC,IAAI,CAAC,2BAA2B,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACvE,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5B,YAAA,OAAO,KAAK;QACd;aAAO;YACL,OAAO,IAAI,CAAC;QACd;IACF;SAAO,IAAI,aAAa,EAAE;AACxB,QAAA,IAAI,WAAW,CAAC,eAAe,EAAE,EAAE;YACjC,OAAO,IAAI,CAAC;QACd;aAAO;AACL,YAAA,QAAQ,CAAC,IAAI,CAAC,+BAA+B,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC3E,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CA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AAM,CAAC,CAAC,EAAA;;;ACjC5C;;AAEG;;;;"}
1
+ {"version":3,"file":"processpuzzle-auth-feature.mjs","sources":["../../../../libs/auth/feature/auth.guard.ts","../../../../libs/auth/feature/login/login.component.ts","../../../../libs/auth/feature/login/login.component.html","../../../../libs/auth/feature/my-profile/my-profile.component.ts","../../../../libs/auth/feature/my-profile/my-profile.component.html","../../../../libs/auth/feature/registration/registration.component.ts","../../../../libs/auth/feature/registration/registration.component.html","../../../../libs/auth/feature/logout/logout.component.ts","../../../../libs/auth/feature/login/login.resolver.ts","../../../../libs/auth/feature/auth.routes.ts","../../../../libs/auth/feature/auth-button/auth-button.component.ts","../../../../libs/auth/feature/processpuzzle-auth-feature.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { AUTHENTICATION_SERVICE } from '@processpuzzle/auth/domain';\n\nexport const authGuard = async (route: ActivatedRouteSnapshot) => {\n const authService = inject(AUTHENTICATION_SERVICE);\n const isLoginRoute = route.routeConfig?.path === 'login';\n const isLogoutRoute = route.routeConfig?.path === 'logout';\n const router = inject(Router);\n const snackBar = inject(MatSnackBar);\n\n await authService.authenticate();\n\n if (isLoginRoute) {\n if (authService.isAuthenticated()) {\n snackBar.open('You are already logged in', 'Close', { duration: 3000 });\n await router.navigate(['/']);\n return false;\n } else {\n return true; // If not logged in, allow access to login page\n }\n } else if (isLogoutRoute) {\n if (authService.isAuthenticated()) {\n return true; // If logged in, allow access to logout page\n } else {\n snackBar.open('You are not already logged in', 'Close', { duration: 3000 });\n await router.navigate(['/']);\n return false;\n }\n } else if (authService.isAuthenticated()) {\n // For protected routes, check if user is logged in\n return true;\n } else {\n await router.navigate(['/auth/login']);\n return false;\n }\n};\n","import { Component, inject, OnInit, signal } from '@angular/core';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { MatError, MatFormField, MatSuffix } from '@angular/material/form-field';\nimport { MatInput, MatLabel } from '@angular/material/input';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatDivider } from '@angular/material/divider';\nimport { TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE, AuthService } from '@processpuzzle/auth/domain';\nimport { NavigateBackService } from '@processpuzzle/widgets';\n\n@Component({\n selector: 'pp-login',\n templateUrl: 'login.component.html',\n styleUrls: ['login.component.css'],\n imports: [MatButton, MatDivider, MatError, MatFormField, MatIcon, MatIconButton, MatInput, MatLabel, MatSuffix, ReactiveFormsModule, RouterLink, TranslocoDirective],\n providers: [],\n})\nexport class LoginComponent implements OnInit {\n errorMessage = signal('');\n hidePassword = true;\n isLoading = signal(false);\n loginForm!: FormGroup;\n private readonly authService: AuthService = inject(AUTHENTICATION_SERVICE);\n private readonly fb = inject(FormBuilder);\n private readonly navigateBackService = inject(NavigateBackService);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n // region public event handlers\n ngOnInit(): void {\n const user = this.route.snapshot.data['signedInUser'];\n if (!user) {\n this.loginForm = this.buildLoginForm();\n }\n }\n\n async onSubmit() {\n if (this.loginForm.invalid) return;\n this.errorMessage.set('');\n this.isLoading.set(true);\n\n try {\n const { email, password } = this.loginForm.value;\n await this.authService.login(this.navigateBackService.getRouteStack().pop(), email, password);\n await this.router.navigate(['/']);\n } catch (error: unknown) {\n const message = this.getErrorMessage((error as { code?: string; message?: string }).code || (error as { code?: string; message?: string }).message || '');\n this.errorMessage.set(message);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n protected async signInWithGoogle() {\n this.errorMessage.set('');\n this.isLoading.set(true);\n try {\n // await signInWithPopup(this.authService, new GoogleAuthProvider());\n await this.router.navigate(['/']);\n } catch (error: unknown) {\n this.errorMessage.set(this.getErrorMessage((error as { code?: string; message?: string }).code || (error as { code?: string; message?: string }).message || ''));\n } finally {\n this.isLoading.set(false);\n }\n }\n // endregion\n\n // region protected, private helper methods\n private buildLoginForm() {\n return this.fb.group({\n email: ['', [Validators.required, Validators.email]],\n password: ['', Validators.required],\n });\n }\n\n private getErrorMessage(errorCode: string): string {\n switch (errorCode) {\n case 'auth/invalid-email':\n return 'Invalid email address';\n case 'auth/user-disabled':\n return 'This account has been disabled';\n case 'auth/user-not-found':\n return 'No account found with this email';\n case 'auth/wrong-password':\n return 'Invalid password';\n case 'auth/popup-closed-by-user':\n return 'Sign-in popup was closed before completion';\n default:\n return 'An error occurred during sign in';\n }\n }\n // endregion\n}\n","<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","import { Component } from '@angular/core';\nimport { provideTranslocoScope } from '@jsverse/transloco';\n\n@Component({\n selector: 'pp-my-profile',\n templateUrl: 'my-profile.component.html',\n styles: ``,\n imports: [],\n providers: [provideTranslocoScope('auth')],\n})\nexport class MyProfileComponent {}\n","<h1>My profile</h1>\n","import { Component, inject, signal } from '@angular/core';\nimport { AbstractControl, FormBuilder, FormGroup, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { MatProgressBar } from '@angular/material/progress-bar';\nimport { MatError, MatFormField } from '@angular/material/form-field';\nimport { MatInput, MatLabel } from '@angular/material/input';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { NavigateBackService } from '@processpuzzle/widgets';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE, AuthService } from '@processpuzzle/auth/domain';\n\n@Component({\n selector: 'pp-registration',\n templateUrl: './registration.component.html',\n styleUrls: ['./registration.component.css'],\n imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError, TranslocoDirective],\n providers: [provideTranslocoScope({ scope: 'auth' })],\n})\nexport class RegistrationComponent {\n private readonly authService: AuthService = inject(AUTHENTICATION_SERVICE);\n private readonly fb = inject(FormBuilder);\n private readonly navigateBack = inject(NavigateBackService);\n private readonly snackBar = inject<MatSnackBar>(MatSnackBar);\n public registerForm: FormGroup;\n public isLoading = signal<boolean>(false);\n public errorMessage = signal<string>('');\n public hidePassword = true;\n public hideConfirmPassword = true;\n\n constructor() {\n this.registerForm = this.fb.group(\n {\n email: ['', [Validators.required, Validators.email]],\n password: ['', [Validators.required, Validators.minLength(6)]],\n confirmPassword: ['', Validators.required],\n },\n {\n validators: [this.passwordMatchValidator],\n },\n );\n }\n\n private passwordMatchValidator(): ValidatorFn {\n return (form: AbstractControl): ValidationErrors | null => {\n const password = form.get('password')?.value;\n const confirmPassword = form.get('confirmPassword')?.value;\n\n if (password !== confirmPassword) {\n return { passwordMismatch: true };\n }\n return null;\n };\n }\n\n async onSubmit(): Promise<void> {\n if (this.registerForm.invalid) return;\n\n this.isLoading.set(true);\n\n try {\n const { email, password } = this.registerForm.value;\n await this.authService.login('', email, password);\n } catch (error: unknown) {\n const errorCode = (error as { code?: string; message?: string }).code || (error as { code?: string; message?: string }).message || 'unknown';\n this.snackBar.open(this.getErrorMessage(errorCode), 'Close', {\n duration: 5000,\n panelClass: ['error-snackbar'],\n });\n } finally {\n this.isLoading.set(false);\n this.errorMessage.set('');\n this.navigateBack.goBack();\n }\n }\n\n private getErrorMessage(errorCode: string): string {\n switch (errorCode) {\n case 'auth/email-already-in-use':\n return 'This email address is already registered';\n case 'auth/invalid-email':\n return 'Please enter a valid email address';\n case 'auth/operation-not-allowed':\n return 'Email/password registration is not enabled';\n case 'auth/weak-password':\n return 'Please choose a stronger password';\n default:\n return 'An error occurred during registration. Please try again.';\n }\n }\n}\n","<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","import { Component, inject, signal } from '@angular/core';\nimport { MatDialogActions, MatDialogContent, MatDialogTitle } from '@angular/material/dialog';\nimport { MatButton } from '@angular/material/button';\nimport { NavigateBackService } from '@processpuzzle/widgets';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE } from '@processpuzzle/auth/domain';\n\n@Component({\n selector: 'pp-logout',\n template: `\n <div class=\"logout-dialog\">\n <ng-container *transloco=\"let t\">\n <h2 mat-dialog-title>{{ t('auth.logout_dialog.title') }}</h2>\n <mat-dialog-content>{{ t('auth.logout_dialog.content') }}</mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button mat-button (click)=\"onCancel()\">{{ t('auth.logout_dialog.cancel_button') }}</button>\n <button mat-raised-button color=\"primary\" (click)=\"onLogout()\" [disabled]=\"isLoading()\">{{ t('auth.logout_dialog.logout_button') }}</button>\n </mat-dialog-actions>\n </ng-container>\n </div>\n `,\n styles: [\n `\n mat-dialog-actions {\n gap: 0.5rem;\n }\n\n mat-dialog-content {\n margin: 1rem 0;\n }\n `,\n ],\n imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButton, TranslocoDirective],\n providers: [provideTranslocoScope('auth')],\n})\nexport class LogoutComponent {\n private readonly authService = inject(AUTHENTICATION_SERVICE);\n private readonly navigateBackService = inject(NavigateBackService);\n protected isLoading = signal(false);\n\n onCancel() {\n this.navigateBackService.goBack();\n }\n\n async onLogout(): Promise<void> {\n try {\n this.isLoading.set(true);\n this.navigateBackService.getRouteStack().pop();\n await this.authService.logout(this.navigateBackService.getRouteStack().pop());\n this.navigateBackService.goBack();\n } catch (error) {\n console.error('Error during logout:', error);\n } finally {\n this.isLoading.set(false);\n }\n }\n}\n","import { inject } from '@angular/core';\nimport { ResolveFn } from '@angular/router';\nimport { AUTHENTICATION_CONFIGURATION, AUTHENTICATION_SERVICE, AuthenticationConfiguration, User } from '@processpuzzle/auth/domain';\nimport { NavigateBackService } from '@processpuzzle/widgets';\n\nexport const loginResolver: ResolveFn<User | undefined> = async () => {\n const authConfig: AuthenticationConfiguration = inject(AUTHENTICATION_CONFIGURATION);\n const authService = inject(AUTHENTICATION_SERVICE);\n const navigateBackService = inject(NavigateBackService);\n\n if (authConfig.AUTHENTICATION_PROVIDER === 'firebase-auth') return undefined;\n else return await authService.login(navigateBackService.getRouteStack().pop());\n};\n","import { Routes } from '@angular/router';\nimport { LoginComponent } from './login/login.component';\nimport { MyProfileComponent } from './my-profile/my-profile.component';\nimport { RegistrationComponent } from './registration/registration.component';\nimport { LogoutComponent } from './logout/logout.component';\nimport { authGuard } from './auth.guard';\nimport { loginResolver } from './login/login.resolver';\nimport { provideTranslocoScope } from '@jsverse/transloco';\n\nexport const authRoutes: Routes = [\n { path: '', redirectTo: 'login', pathMatch: 'full', providers: [provideTranslocoScope('auth')] },\n { path: 'login', component: LoginComponent, title: 'login', data: { icon: 'login', authToggle: true }, resolve: { signedInUser: loginResolver }, canActivate: [authGuard] },\n { path: 'logout', component: LogoutComponent, title: 'logout', data: { icon: 'logout', authToggle: false }, canActivate: [authGuard] },\n { path: 'register', component: RegistrationComponent, title: 'register', data: { icon: 'person_add', authToggle: true } },\n { path: 'my-profile', component: MyProfileComponent, title: 'my_profile', data: { icon: 'person', authToggle: false } },\n];\n","import { Component, computed, inject } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';\nimport { RouterLink } from '@angular/router';\nimport { authRoutes } from '../auth.routes';\nimport { SubstringPipe } from '@processpuzzle/util';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\nimport { AUTHENTICATION_SERVICE } from '@processpuzzle/auth/domain';\n\n@Component({\n selector: 'pp-auth-button',\n template: `\n <div class=\"auth-button\">\n <ng-container *transloco=\"let t\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\" aria-label=\"Auth Button\">\n <mat-icon>person</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (item of routes; track item) {\n @if ((isAuthenticated() && !item.data?.['authToggle']) || (!isAuthenticated() && item.data?.['authToggle'])) {\n <button mat-menu-item [routerLink]=\"'auth/' + item.path\">\n <mat-icon>{{ item.data?.['icon'] }}</mat-icon>\n <span>&nbsp;{{ t('auth.button.' + item.title | substring: 0) }}</span>\n </button>\n }\n }\n </mat-menu>\n </ng-container>\n </div>\n `,\n imports: [MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe, TranslocoDirective],\n styles: [],\n providers: [provideTranslocoScope('auth')],\n})\nexport class AuthButtonComponent {\n private readonly authService = inject(AUTHENTICATION_SERVICE);\n isAuthenticated = computed(() => this.authService.isAuthenticated());\n readonly routes = authRoutes.filter((item) => item.title !== null && item.title !== undefined);\n\n // region event handling methods\n // endregion\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAKa,SAAS,GAAG,OAAO,KAA6B,KAAI;AAC/D,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,OAAO;IACxD,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,QAAQ;AAC1D,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC7B,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AAEpC,IAAA,MAAM,WAAW,CAAC,YAAY,EAAE;IAEhC,IAAI,YAAY,EAAE;AAChB,QAAA,IAAI,WAAW,CAAC,eAAe,EAAE,EAAE;AACjC,YAAA,QAAQ,CAAC,IAAI,CAAC,2BAA2B,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACvE,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5B,YAAA,OAAO,KAAK;QACd;aAAO;YACL,OAAO,IAAI,CAAC;QACd;IACF;SAAO,IAAI,aAAa,EAAE;AACxB,QAAA,IAAI,WAAW,CAAC,eAAe,EAAE,EAAE;YACjC,OAAO,IAAI,CAAC;QACd;aAAO;AACL,YAAA,QAAQ,CAAC,IAAI,CAAC,+BAA+B,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC3E,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC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AC,CAAC,EAAA;;;ACjC5C;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processpuzzle/auth",
3
- "version": "0.1.0",
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 };