@processpuzzle/auth 0.0.2 → 0.0.4
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.
- package/assets/i18n/auth/de.json +39 -9
- package/assets/i18n/auth/en.json +39 -9
- package/assets/i18n/auth/es.json +39 -9
- package/assets/i18n/auth/fr.json +42 -0
- package/assets/i18n/auth/hu.json +39 -9
- package/fesm2022/processpuzzle-auth.mjs +76 -67
- package/fesm2022/processpuzzle-auth.mjs.map +1 -1
- package/package.json +13 -5
package/assets/i18n/auth/de.json
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
2
|
+
"button": {
|
|
3
|
+
"login": "Anmelden",
|
|
4
|
+
"logout": "Abmelden",
|
|
5
|
+
"register": "Registrieren",
|
|
6
|
+
"my_profile": "Mein Profil"
|
|
7
|
+
},
|
|
8
|
+
"login-form": {
|
|
9
|
+
"title": "Anmelden",
|
|
10
|
+
"email_label": "E-Mail",
|
|
11
|
+
"email_err_required": "E-Mail ist erforderlich",
|
|
12
|
+
"email_err_invalid": "Bitte geben Sie eine gültige E-Mail-Adresse ein",
|
|
13
|
+
"password_label": "Passwort",
|
|
14
|
+
"password_err_required": "Passwort ist erforderlich",
|
|
15
|
+
"create_account_button": "Konto erstellen",
|
|
16
|
+
"sign_in_button": "Anmelden",
|
|
17
|
+
"signing_in_button": "Anmeldung läuft...",
|
|
18
|
+
"google_button": "Mit Google anmelden"
|
|
19
|
+
},
|
|
20
|
+
"logout-dialog": {
|
|
21
|
+
"title": "Abmeldung bestätigen",
|
|
22
|
+
"content": "Sind Sie sicher, dass Sie sich abmelden möchten?",
|
|
23
|
+
"cancel_button": "Abbrechen",
|
|
24
|
+
"logout_button": "Abmelden"
|
|
25
|
+
},
|
|
26
|
+
"registration-form": {
|
|
27
|
+
"title": "Konto erstellen",
|
|
28
|
+
"email_label": "E-Mail",
|
|
29
|
+
"email_placeholder": "Geben Sie Ihre E-Mail-Adresse ein",
|
|
30
|
+
"email_err_required": "E-Mail ist erforderlich",
|
|
31
|
+
"email_err_invalid": "Bitte geben Sie eine gültige E-Mail-Adresse ein",
|
|
32
|
+
"password_label": "Passwort",
|
|
33
|
+
"password_placeholder": "Geben Sie Ihr Passwort ein",
|
|
34
|
+
"password_err_required": "Passwort ist erforderlich",
|
|
35
|
+
"password_err_min_length": "Das Passwort muss mindestens 6 Zeichen lang sein",
|
|
36
|
+
"password_confirm_label": "Passwort bestätigen",
|
|
37
|
+
"password_confirm_placeholder": "Bestätigen Sie Ihr Passwort",
|
|
38
|
+
"password_err_mismatch": "Die Passwörter stimmen nicht überein",
|
|
39
|
+
"create_button": "Konto erstellen",
|
|
40
|
+
"sign_in_button": "Haben Sie bereits ein Konto? Anmelden"
|
|
11
41
|
}
|
|
12
42
|
}
|
package/assets/i18n/auth/en.json
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
2
|
+
"button": {
|
|
3
|
+
"login": "Login",
|
|
4
|
+
"logout": "Logout",
|
|
5
|
+
"register": "Register",
|
|
6
|
+
"my_profile": "My Profile"
|
|
7
|
+
},
|
|
8
|
+
"login-form": {
|
|
9
|
+
"title": "Login",
|
|
10
|
+
"email_label": "Email",
|
|
11
|
+
"email_err_required": "Email is required",
|
|
12
|
+
"email_err_invalid": "Please enter a valid email",
|
|
13
|
+
"password_label": "Password",
|
|
14
|
+
"password_err_required": "Password is required",
|
|
15
|
+
"create_account_button": "Create Account",
|
|
16
|
+
"sign_in_button": "Sign In",
|
|
17
|
+
"signing_in_button": "Signing in...",
|
|
18
|
+
"google_button": "Sign in with Google"
|
|
19
|
+
},
|
|
20
|
+
"logout-dialog": {
|
|
21
|
+
"title": "Confirm Logout",
|
|
22
|
+
"content": " Are you sure you want to log out?",
|
|
23
|
+
"cancel_button": "Cancel",
|
|
24
|
+
"logout_button": "Logout"
|
|
25
|
+
},
|
|
26
|
+
"registration-form": {
|
|
27
|
+
"title": "Create Account",
|
|
28
|
+
"email_label": "Email",
|
|
29
|
+
"email_placeholder": "Enter your email",
|
|
30
|
+
"email_err_required": "Email is required",
|
|
31
|
+
"email_err_invalid": "Please enter a valid email address",
|
|
32
|
+
"password_label": "Password",
|
|
33
|
+
"password_placeholder": "Enter your password",
|
|
34
|
+
"password_err_required": "Password is required",
|
|
35
|
+
"password_err_min_length": "Password must be at least 6 characters long",
|
|
36
|
+
"password_confirm_label": "Confirm Password",
|
|
37
|
+
"password_confirm_placeholder": "Confirm your password",
|
|
38
|
+
"password_err_mismatch": "Passwords do not match",
|
|
39
|
+
"create_button": "Create Account",
|
|
40
|
+
"sign_in_button": "Already have an account? Sign in"
|
|
11
41
|
}
|
|
12
42
|
}
|
package/assets/i18n/auth/es.json
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
2
|
+
"button": {
|
|
3
|
+
"login": "Iniciar sesión",
|
|
4
|
+
"logout": "Cerrar sesión",
|
|
5
|
+
"register": "Registrarse",
|
|
6
|
+
"my_profile": "Mi perfil"
|
|
7
|
+
},
|
|
8
|
+
"login-form": {
|
|
9
|
+
"title": "Iniciar sesión",
|
|
10
|
+
"email_label": "Correo electrónico",
|
|
11
|
+
"email_err_required": "El correo electrónico es obligatorio",
|
|
12
|
+
"email_err_invalid": "Por favor, introduce un correo electrónico válido",
|
|
13
|
+
"password_label": "Contraseña",
|
|
14
|
+
"password_err_required": "La contraseña es obligatoria",
|
|
15
|
+
"create_account_button": "Crear cuenta",
|
|
16
|
+
"sign_in_button": "Iniciar sesión",
|
|
17
|
+
"signing_in_button": "Iniciando sesión...",
|
|
18
|
+
"google_button": "Iniciar sesión con Google"
|
|
19
|
+
},
|
|
20
|
+
"logout-dialog": {
|
|
21
|
+
"title": "Confirmar cierre de sesión",
|
|
22
|
+
"content": "¿Estás seguro de que quieres cerrar sesión?",
|
|
23
|
+
"cancel_button": "Cancelar",
|
|
24
|
+
"logout_button": "Cerrar sesión"
|
|
25
|
+
},
|
|
26
|
+
"registration-form": {
|
|
27
|
+
"title": "Crear cuenta",
|
|
28
|
+
"email_label": "Correo electrónico",
|
|
29
|
+
"email_placeholder": "Introduce tu correo electrónico",
|
|
30
|
+
"email_err_required": "El correo electrónico es obligatorio",
|
|
31
|
+
"email_err_invalid": "Por favor, introduce un correo electrónico válido",
|
|
32
|
+
"password_label": "Contraseña",
|
|
33
|
+
"password_placeholder": "Introduce tu contraseña",
|
|
34
|
+
"password_err_required": "La contraseña es obligatoria",
|
|
35
|
+
"password_err_min_length": "La contraseña debe tener al menos 6 caracteres",
|
|
36
|
+
"password_confirm_label": "Confirmar contraseña",
|
|
37
|
+
"password_confirm_placeholder": "Confirma tu contraseña",
|
|
38
|
+
"password_err_mismatch": "Las contraseñas no coinciden",
|
|
39
|
+
"create_button": "Crear cuenta",
|
|
40
|
+
"sign_in_button": "¿Ya tienes una cuenta? Inicia sesión"
|
|
11
41
|
}
|
|
12
42
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"button": {
|
|
3
|
+
"login": "Connexion",
|
|
4
|
+
"logout": "Déconnexion",
|
|
5
|
+
"register": "S'inscrire",
|
|
6
|
+
"my_profile": "Mon Profil"
|
|
7
|
+
},
|
|
8
|
+
"login-form": {
|
|
9
|
+
"title": "Connexion",
|
|
10
|
+
"email_label": "Email",
|
|
11
|
+
"email_err_required": "L'email est requis",
|
|
12
|
+
"email_err_invalid": "Veuillez entrer un email valide",
|
|
13
|
+
"password_label": "Mot de passe",
|
|
14
|
+
"password_err_required": "Le mot de passe est requis",
|
|
15
|
+
"create_account_button": "Créer un compte",
|
|
16
|
+
"sign_in_button": "Se connecter",
|
|
17
|
+
"signing_in_button": "Connexion en cours...",
|
|
18
|
+
"google_button": "Se connecter avec Google"
|
|
19
|
+
},
|
|
20
|
+
"logout-dialog": {
|
|
21
|
+
"title": "Confirmer la déconnexion",
|
|
22
|
+
"content": "Êtes-vous sûr de vouloir vous déconnecter?",
|
|
23
|
+
"cancel_button": "Annuler",
|
|
24
|
+
"logout_button": "Déconnexion"
|
|
25
|
+
},
|
|
26
|
+
"registration-form": {
|
|
27
|
+
"title": "Créer un compte",
|
|
28
|
+
"email_label": "Email",
|
|
29
|
+
"email_placeholder": "Entrez votre email",
|
|
30
|
+
"email_err_required": "L'email est requis",
|
|
31
|
+
"email_err_invalid": "Veuillez entrer une adresse email valide",
|
|
32
|
+
"password_label": "Mot de passe",
|
|
33
|
+
"password_placeholder": "Entrez votre mot de passe",
|
|
34
|
+
"password_err_required": "Le mot de passe est requis",
|
|
35
|
+
"password_err_min_length": "Le mot de passe doit contenir au moins 6 caractères",
|
|
36
|
+
"password_confirm_label": "Confirmer le mot de passe",
|
|
37
|
+
"password_confirm_placeholder": "Confirmez votre mot de passe",
|
|
38
|
+
"password_err_mismatch": "Les mots de passe ne correspondent pas",
|
|
39
|
+
"create_button": "Créer un compte",
|
|
40
|
+
"sign_in_button": "Vous avez déjà un compte? Connectez-vous"
|
|
41
|
+
}
|
|
42
|
+
}
|
package/assets/i18n/auth/hu.json
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
2
|
+
"button": {
|
|
3
|
+
"login": "Bejelentkezés",
|
|
4
|
+
"logout": "Kijelentkezés",
|
|
5
|
+
"register": "Regisztráció",
|
|
6
|
+
"my_profile": "Profilom"
|
|
7
|
+
},
|
|
8
|
+
"login-form": {
|
|
9
|
+
"title": "Bejelentkezés",
|
|
10
|
+
"email_label": "Email",
|
|
11
|
+
"email_err_required": "Az email megadása kötelező",
|
|
12
|
+
"email_err_invalid": "Kérjük, adjon meg egy érvényes email címet",
|
|
13
|
+
"password_label": "Jelszó",
|
|
14
|
+
"password_err_required": "A jelszó megadása kötelező",
|
|
15
|
+
"create_account_button": "Fiók létrehozása",
|
|
16
|
+
"sign_in_button": "Bejelentkezés",
|
|
17
|
+
"signing_in_button": "Bejelentkezés folyamatban...",
|
|
18
|
+
"google_button": "Bejelentkezés Google-lal"
|
|
19
|
+
},
|
|
20
|
+
"logout-dialog": {
|
|
21
|
+
"title": "Kijelentkezés megerősítése",
|
|
22
|
+
"content": "Biztosan ki szeretne jelentkezni?",
|
|
23
|
+
"cancel_button": "Mégsem",
|
|
24
|
+
"logout_button": "Kijelentkezés"
|
|
25
|
+
},
|
|
26
|
+
"registration-form": {
|
|
27
|
+
"title": "Fiók létrehozása",
|
|
28
|
+
"email_label": "Email",
|
|
29
|
+
"email_placeholder": "Adja meg az email címét",
|
|
30
|
+
"email_err_required": "Az email megadása kötelező",
|
|
31
|
+
"email_err_invalid": "Kérjük, adjon meg egy érvényes email címet",
|
|
32
|
+
"password_label": "Jelszó",
|
|
33
|
+
"password_placeholder": "Adja meg a jelszavát",
|
|
34
|
+
"password_err_required": "A jelszó megadása kötelező",
|
|
35
|
+
"password_err_min_length": "A jelszónak legalább 6 karakter hosszúnak kell lennie",
|
|
36
|
+
"password_confirm_label": "Jelszó megerősítése",
|
|
37
|
+
"password_confirm_placeholder": "Erősítse meg a jelszavát",
|
|
38
|
+
"password_err_mismatch": "A jelszavak nem egyeznek",
|
|
39
|
+
"create_button": "Fiók létrehozása",
|
|
40
|
+
"sign_in_button": "Már van fiókja? Jelentkezzen be"
|
|
11
41
|
}
|
|
12
42
|
}
|
|
@@ -14,6 +14,7 @@ import { MatDivider } from '@angular/material/divider';
|
|
|
14
14
|
import * as i1$1 from '@angular/common';
|
|
15
15
|
import { NgIf, CommonModule } from '@angular/common';
|
|
16
16
|
import * as i1 from '@angular/material/snack-bar';
|
|
17
|
+
import { TranslocoDirective, provideTranslocoScope } from '@jsverse/transloco';
|
|
17
18
|
import { MatProgressBar } from '@angular/material/progress-bar';
|
|
18
19
|
import { NavigateBackService } from '@processpuzzle/widgets';
|
|
19
20
|
import { MatDialogTitle, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
|
|
@@ -85,21 +86,21 @@ class LoginComponent {
|
|
|
85
86
|
return 'An error occurred during sign in';
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
89
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
89
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LoginComponent, deps: [{ token: i1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: LoginComponent, isStandalone: true, selector: "pp-login", providers: [provideTranslocoScope('auth')], 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 <mat-error *ngIf=\"loginForm.get('email')?.hasError('required')\">{{t('auth.login-form.email_err_required')}}</mat-error>\n <mat-error *ngIf=\"loginForm.get('email')?.hasError('email')\">{{t('auth.login-form.email_err_invalid')}}</mat-error>\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 <mat-error *ngIf=\"loginForm.get('password')?.hasError('required')\">{{t('auth.login-form.password_err_required')}}</mat-error>\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 <div class=\"error-message\" *ngIf=\"errorMessage\">{{ errorMessage() }}</div>\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[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { 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]", exportAs: ["matButton"] }, { 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: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
|
|
90
91
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LoginComponent, decorators: [{
|
|
92
93
|
type: Component,
|
|
93
|
-
args: [{ selector: 'pp-login', imports: [MatButton, MatDivider, MatError, MatFormField, MatIcon, MatIconButton, MatInput, MatLabel, MatSuffix, ReactiveFormsModule, NgIf, RouterLink], template: "<div class=\"login-container\">\n <h2>
|
|
94
|
+
args: [{ selector: 'pp-login', imports: [MatButton, MatDivider, MatError, MatFormField, MatIcon, MatIconButton, MatInput, MatLabel, MatSuffix, ReactiveFormsModule, NgIf, RouterLink, TranslocoDirective], providers: [provideTranslocoScope('auth')], 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 <mat-error *ngIf=\"loginForm.get('email')?.hasError('required')\">{{t('auth.login-form.email_err_required')}}</mat-error>\n <mat-error *ngIf=\"loginForm.get('email')?.hasError('email')\">{{t('auth.login-form.email_err_invalid')}}</mat-error>\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 <mat-error *ngIf=\"loginForm.get('password')?.hasError('required')\">{{t('auth.login-form.password_err_required')}}</mat-error>\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 <div class=\"error-message\" *ngIf=\"errorMessage\">{{ errorMessage() }}</div>\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"] }]
|
|
94
95
|
}], ctorParameters: () => [{ type: i1.MatSnackBar }] });
|
|
95
96
|
|
|
96
97
|
class MyProfileComponent {
|
|
97
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
98
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MyProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: MyProfileComponent, isStandalone: true, selector: "pp-my-profile", providers: [provideTranslocoScope('auth')], ngImport: i0, template: "<h1>My profile</h1>\n", styles: [""] });
|
|
99
100
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MyProfileComponent, decorators: [{
|
|
101
102
|
type: Component,
|
|
102
|
-
args: [{ selector: 'pp-my-profile', imports: [], template: "<h1>My profile</h1>\n" }]
|
|
103
|
+
args: [{ selector: 'pp-my-profile', imports: [], providers: [provideTranslocoScope('auth')], template: "<h1>My profile</h1>\n" }]
|
|
103
104
|
}] });
|
|
104
105
|
|
|
105
106
|
class RegistrationComponent {
|
|
@@ -166,12 +167,12 @@ class RegistrationComponent {
|
|
|
166
167
|
return 'An error occurred during registration. Please try again.';
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
170
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: RegistrationComponent, deps: [{ token: i1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
|
|
171
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: RegistrationComponent, isStandalone: true, selector: "pp-registration", providers: [provideTranslocoScope('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 <mat-progress-bar *ngIf=\"isLoading()\" mode=\"indeterminate\"></mat-progress-bar>\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 <mat-error *ngIf=\"registerForm.get('email')?.errors?.['required']\">{{t('auth.registration-form.email_err_required')}}</mat-error>\n <mat-error *ngIf=\"registerForm.get('email')?.errors?.['email']\">{{t('auth.registration-form.email_err_invalid')}}</mat-error>\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 <mat-error *ngIf=\"registerForm.get('password')?.errors?.['required']\">{{t('auth.registration-form.password_err_required')}}</mat-error>\n <mat-error *ngIf=\"registerForm.get('password')?.errors?.['minlength']\">{{t('auth.registration-form.password_err_min_length')}}</mat-error>\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 <mat-error *ngIf=\"registerForm.errors?.['passwordMismatch']\">{{t('auth.registration-form.password_confirm_err_mismatch')}}</mat-error>\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 <mat-error *ngIf=\"errorMessage() !== ''\" class=\"server-error\">{{ errorMessage() }}</mat-error>\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: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { 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"] }] });
|
|
171
172
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: RegistrationComponent, decorators: [{
|
|
173
174
|
type: Component,
|
|
174
|
-
args: [{ selector: 'pp-registration', imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, NgIf, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError], template: "<div class=\"registration-container\">\n <h1>
|
|
175
|
+
args: [{ selector: 'pp-registration', imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, NgIf, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError, TranslocoDirective], providers: [provideTranslocoScope('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 <mat-progress-bar *ngIf=\"isLoading()\" mode=\"indeterminate\"></mat-progress-bar>\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 <mat-error *ngIf=\"registerForm.get('email')?.errors?.['required']\">{{t('auth.registration-form.email_err_required')}}</mat-error>\n <mat-error *ngIf=\"registerForm.get('email')?.errors?.['email']\">{{t('auth.registration-form.email_err_invalid')}}</mat-error>\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 <mat-error *ngIf=\"registerForm.get('password')?.errors?.['required']\">{{t('auth.registration-form.password_err_required')}}</mat-error>\n <mat-error *ngIf=\"registerForm.get('password')?.errors?.['minlength']\">{{t('auth.registration-form.password_err_min_length')}}</mat-error>\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 <mat-error *ngIf=\"registerForm.errors?.['passwordMismatch']\">{{t('auth.registration-form.password_confirm_err_mismatch')}}</mat-error>\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 <mat-error *ngIf=\"errorMessage() !== ''\" class=\"server-error\">{{ errorMessage() }}</mat-error>\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"] }]
|
|
175
176
|
}], ctorParameters: () => [{ type: i1.MatSnackBar }] });
|
|
176
177
|
|
|
177
178
|
class AuthService {
|
|
@@ -184,10 +185,10 @@ class AuthService {
|
|
|
184
185
|
getCurrentUser() {
|
|
185
186
|
return this.auth.currentUser;
|
|
186
187
|
}
|
|
187
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
188
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
189
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
189
190
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AuthService, decorators: [{
|
|
191
192
|
type: Injectable,
|
|
192
193
|
args: [{
|
|
193
194
|
providedIn: 'root',
|
|
@@ -214,82 +215,90 @@ class LogoutComponent {
|
|
|
214
215
|
this.isLoading.set(false);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
218
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
219
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: LogoutComponent, isStandalone: true, selector: "pp-logout", providers: [provideTranslocoScope('auth')], ngImport: i0, template: `
|
|
219
220
|
<div class="logout-dialog">
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
221
|
+
<ng-container *transloco="let t">
|
|
222
|
+
<h2 mat-dialog-title>{{ t('auth.logout-dialog.title') }}</h2>
|
|
223
|
+
<mat-dialog-content>{{ t('auth.logout-dialog.content') }}</mat-dialog-content>
|
|
224
|
+
<mat-dialog-actions align="end">
|
|
225
|
+
<button mat-button (click)="onCancel()">{{ t('auth.logout-dialog.cancel_button') }}</button>
|
|
226
|
+
<button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">{{ t('auth.logout-dialog.logout_button') }}</button>
|
|
227
|
+
</mat-dialog-actions>
|
|
228
|
+
</ng-container>
|
|
226
229
|
</div>
|
|
227
|
-
`, 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[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] });
|
|
230
|
+
`, 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[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
228
231
|
}
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LogoutComponent, decorators: [{
|
|
230
233
|
type: Component,
|
|
231
234
|
args: [{ selector: 'pp-logout', template: `
|
|
232
235
|
<div class="logout-dialog">
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
<ng-container *transloco="let t">
|
|
237
|
+
<h2 mat-dialog-title>{{ t('auth.logout-dialog.title') }}</h2>
|
|
238
|
+
<mat-dialog-content>{{ t('auth.logout-dialog.content') }}</mat-dialog-content>
|
|
239
|
+
<mat-dialog-actions align="end">
|
|
240
|
+
<button mat-button (click)="onCancel()">{{ t('auth.logout-dialog.cancel_button') }}</button>
|
|
241
|
+
<button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">{{ t('auth.logout-dialog.logout_button') }}</button>
|
|
242
|
+
</mat-dialog-actions>
|
|
243
|
+
</ng-container>
|
|
239
244
|
</div>
|
|
240
|
-
`, imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButton], styles: [".logout-dialog{padding:1rem}mat-dialog-actions{gap:.5rem}mat-dialog-content{margin:1rem 0}\n"] }]
|
|
245
|
+
`, 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"] }]
|
|
241
246
|
}] });
|
|
242
247
|
|
|
243
248
|
const authRoutes = [
|
|
244
249
|
{ path: '', redirectTo: 'login', pathMatch: 'full' },
|
|
245
|
-
{ path: 'login', component: LoginComponent, title: '
|
|
246
|
-
{ path: 'logout', component: LogoutComponent, title: '
|
|
247
|
-
{ path: 'register', component: RegistrationComponent, title: '
|
|
248
|
-
{ path: 'my-profile', component: MyProfileComponent, title: '
|
|
250
|
+
{ path: 'login', component: LoginComponent, title: 'login', data: { icon: 'login', authToggle: true } },
|
|
251
|
+
{ path: 'logout', component: LogoutComponent, title: 'logout', data: { icon: 'logout', authToggle: false } },
|
|
252
|
+
{ path: 'register', component: RegistrationComponent, title: 'register', data: { icon: 'person_add', authToggle: true } },
|
|
253
|
+
{ path: 'my-profile', component: MyProfileComponent, title: 'my_profile', data: { icon: 'person', authToggle: false } },
|
|
249
254
|
];
|
|
250
255
|
|
|
251
256
|
class AuthButtonComponent {
|
|
252
257
|
authService = inject(AuthService);
|
|
253
258
|
isAuthenticated = computed(() => this.authService.isAuthenticated());
|
|
254
259
|
routes = authRoutes.filter((item) => item.title !== null && item.title !== undefined);
|
|
255
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
256
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
260
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AuthButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
261
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: AuthButtonComponent, isStandalone: true, selector: "pp-auth-button", providers: [provideTranslocoScope('auth')], ngImport: i0, template: `
|
|
257
262
|
<div class="auth-button">
|
|
258
|
-
<
|
|
259
|
-
<mat-icon
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
<
|
|
265
|
-
<mat-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
263
|
+
<ng-container *transloco="let t">
|
|
264
|
+
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Auth Button">
|
|
265
|
+
<mat-icon>person</mat-icon>
|
|
266
|
+
</button>
|
|
267
|
+
<mat-menu #menu="matMenu">
|
|
268
|
+
@for (item of routes; track item) {
|
|
269
|
+
<ng-container *ngIf="(isAuthenticated() && !item.data?.['authToggle']) || (!isAuthenticated() && item.data?.['authToggle'])">
|
|
270
|
+
<button mat-menu-item [routerLink]="'auth/' + item.path">
|
|
271
|
+
<mat-icon>{{ item.data?.['icon'] }}</mat-icon>
|
|
272
|
+
<span> {{ t('auth.button.' + item.title | substring: 0) }}</span>
|
|
273
|
+
</button>
|
|
274
|
+
</ng-container>
|
|
275
|
+
}
|
|
276
|
+
</mat-menu>
|
|
277
|
+
</ng-container>
|
|
271
278
|
</div>
|
|
272
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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: "pipe", type: SubstringPipe, name: "substring" }] });
|
|
279
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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: "pipe", type: SubstringPipe, name: "substring" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
273
280
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AuthButtonComponent, decorators: [{
|
|
275
282
|
type: Component,
|
|
276
283
|
args: [{ selector: 'pp-auth-button', template: `
|
|
277
284
|
<div class="auth-button">
|
|
278
|
-
<
|
|
279
|
-
<mat-icon
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
<
|
|
285
|
-
<mat-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
285
|
+
<ng-container *transloco="let t">
|
|
286
|
+
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Auth Button">
|
|
287
|
+
<mat-icon>person</mat-icon>
|
|
288
|
+
</button>
|
|
289
|
+
<mat-menu #menu="matMenu">
|
|
290
|
+
@for (item of routes; track item) {
|
|
291
|
+
<ng-container *ngIf="(isAuthenticated() && !item.data?.['authToggle']) || (!isAuthenticated() && item.data?.['authToggle'])">
|
|
292
|
+
<button mat-menu-item [routerLink]="'auth/' + item.path">
|
|
293
|
+
<mat-icon>{{ item.data?.['icon'] }}</mat-icon>
|
|
294
|
+
<span> {{ t('auth.button.' + item.title | substring: 0) }}</span>
|
|
295
|
+
</button>
|
|
296
|
+
</ng-container>
|
|
297
|
+
}
|
|
298
|
+
</mat-menu>
|
|
299
|
+
</ng-container>
|
|
291
300
|
</div>
|
|
292
|
-
`, imports: [CommonModule, MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe] }]
|
|
301
|
+
`, imports: [CommonModule, MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe, TranslocoDirective], providers: [provideTranslocoScope('auth')] }]
|
|
293
302
|
}] });
|
|
294
303
|
|
|
295
304
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processpuzzle-auth.mjs","sources":["../../../../libs/auth/src/lib/login/login.component.ts","../../../../libs/auth/src/lib/login/login.component.html","../../../../libs/auth/src/lib/my-profile/my-profile.component.ts","../../../../libs/auth/src/lib/my-profile/my-profile.component.html","../../../../libs/auth/src/lib/registration/registration.component.ts","../../../../libs/auth/src/lib/registration/registration.component.html","../../../../libs/auth/src/lib/domain/auth.service.ts","../../../../libs/auth/src/lib/logout/logout.component.ts","../../../../libs/auth/src/lib/auth.routes.ts","../../../../libs/auth/src/lib/auth-button/auth-button.component.ts","../../../../libs/auth/src/processpuzzle-auth.ts"],"sourcesContent":["import { Component, inject, signal } from '@angular/core';\nimport { Auth, GoogleAuthProvider, signInWithEmailAndPassword, signInWithPopup } from '@angular/fire/auth';\nimport { 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 { NgIf } from '@angular/common';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { FirebaseError } from 'firebase-admin/lib/utils/error';\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, NgIf, RouterLink],\n})\nexport class LoginComponent {\n private readonly auth: Auth = inject(Auth);\n private readonly fb = inject(FormBuilder);\n private readonly router = inject(Router);\n\n loginForm: FormGroup;\n isLoading = signal(false);\n errorMessage = signal('');\n hidePassword = true;\n\n constructor(private readonly snackBar: MatSnackBar) {\n this.loginForm = this.fb.group({\n email: ['', [Validators.required, Validators.email]],\n password: ['', Validators.required],\n });\n }\n\n async onSubmit() {\n if (this.loginForm.invalid) return;\n\n this.isLoading.set(true);\n\n try {\n const { email, password } = this.loginForm.value;\n await signInWithEmailAndPassword(this.auth, email, password);\n await this.router.navigate(['/']);\n } catch (error: unknown) {\n this.snackBar.open(this.getErrorMessage((error as FirebaseError).code), 'Close', { duration: 5000, panelClass: ['error-snackbar'] });\n } finally {\n this.isLoading.set(false);\n this.errorMessage.set('');\n }\n }\n\n async signInWithGoogle() {\n this.isLoading.set(true);\n\n try {\n const provider = new GoogleAuthProvider();\n await signInWithPopup(this.auth, provider);\n await this.router.navigate(['/']); // Navigate to home page after successful login\n } catch (error: unknown) {\n this.snackBar.open(this.getErrorMessage((error as FirebaseError).code), 'Close', { duration: 5000, panelClass: ['error-snackbar'] });\n } finally {\n this.isLoading.set(false);\n this.errorMessage.set('');\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}\n","<div class=\"login-container\">\n <h2>Login</h2>\n\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Login Form\">\n <mat-form-field appearance=\"outline\">\n <mat-label>Email</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" placeholder=\"Enter your email\">\n <mat-error *ngIf=\"loginForm.get('email')?.hasError('required')\">Email is required</mat-error>\n <mat-error *ngIf=\"loginForm.get('email')?.hasError('email')\">Please enter a valid email</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>Password</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 <mat-error *ngIf=\"loginForm.get('password')?.hasError('required')\">Password is required</mat-error>\n </mat-form-field>\n\n <div class=\"actions\">\n <button mat-raised-button color=\"secondary\" routerLink=\"/auth/register\">Create Account</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"loginForm.invalid || isLoading()\">{{ isLoading() ? 'Signing in...' : 'Sign In' }}</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 Sign in with Google\n </button>\n\n <div class=\"error-message\" *ngIf=\"errorMessage\">{{ errorMessage() }}</div>\n</div>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'pp-my-profile',\n templateUrl: 'my-profile.component.html',\n styles: ``,\n imports: [],\n})\nexport class MyProfileComponent {}\n","<h1>My profile</h1>\n","import { Component, inject, signal } from '@angular/core';\nimport { AbstractControl, FormGroup, NonNullableFormBuilder, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { Auth, createUserWithEmailAndPassword } from '@angular/fire/auth';\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 { NgIf } from '@angular/common';\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 { FirebaseError } from 'firebase-admin/lib/utils/error';\n\n@Component({\n selector: 'pp-registration',\n templateUrl: 'registration.component.html',\n styleUrls: ['registration.component.css'],\n imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, NgIf, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError],\n})\nexport class RegistrationComponent {\n private readonly auth = inject(Auth);\n private readonly fb = inject(NonNullableFormBuilder);\n private readonly navigateBack = inject(NavigateBackService);\n\n protected registerForm: FormGroup;\n protected isLoading = signal<boolean>(false);\n protected errorMessage = signal<string>('');\n protected hidePassword = true;\n protected hideConfirmPassword = true;\n\n constructor(private readonly snackBar: MatSnackBar) {\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 createUserWithEmailAndPassword(this.auth, email, password);\n } catch (error: unknown) {\n this.snackBar.open(this.getErrorMessage((error as FirebaseError).code), '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 <h1>Create Account</h1>\n\n <form [formGroup]=\"registerForm\" (ngSubmit)=\"onSubmit()\" aria-label=\"Registration Form\">\n <mat-progress-bar *ngIf=\"isLoading()\" mode=\"indeterminate\"></mat-progress-bar>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>Email</mat-label>\n <input matInput type=\"email\" formControlName=\"email\" placeholder=\"Enter your email\">\n <mat-error *ngIf=\"registerForm.get('email')?.errors?.['required']\">Email is required</mat-error>\n <mat-error *ngIf=\"registerForm.get('email')?.errors?.['email']\">Please enter a valid email address</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>Password</mat-label>\n <input matInput [type]=\"hidePassword ? 'password' : 'text'\" formControlName=\"password\" placeholder=\"Enter your password\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hidePassword = !hidePassword\">\n <mat-icon>{{hidePassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n <mat-error *ngIf=\"registerForm.get('password')?.errors?.['required']\">Password is required</mat-error>\n <mat-error *ngIf=\"registerForm.get('password')?.errors?.['minlength']\">Password must be at least 6 characters long</mat-error>\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>Confirm Password</mat-label>\n <input matInput [type]=\"hideConfirmPassword ? 'password' : 'text'\" formControlName=\"confirmPassword\" placeholder=\"Confirm your password\">\n <button mat-icon-button type=\"button\" matSuffix (click)=\"hideConfirmPassword = !hideConfirmPassword\">\n <mat-icon>{{hideConfirmPassword ? 'visibility_off' : 'visibility'}}</mat-icon>\n </button>\n <mat-error *ngIf=\"registerForm.errors?.['passwordMismatch']\">Passwords do not match</mat-error>\n </mat-form-field>\n\n <div class=\"form-actions\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"registerForm.invalid || isLoading()\">Create Account</button>\n <button mat-button type=\"button\" routerLink=\"/auth/login\" [disabled]=\"isLoading()\">Already have an account? Sign in</button>\n </div>\n\n <mat-error *ngIf=\"errorMessage() !== ''\" class=\"server-error\">{{ errorMessage() }}</mat-error>\n </form>\n</div>\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { Auth, authState, User } from '@angular/fire/auth';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n private readonly auth: Auth = inject(Auth);\n readonly user = toSignal<User | null>(authState(this.auth), { initialValue: null });\n isAuthenticated: Signal<boolean> = computed(() => !!this.user());\n\n async signOut(): Promise<void> {\n return this.auth.signOut();\n }\n\n getCurrentUser(): User | null {\n return this.auth.currentUser;\n }\n}\n","import { Component, inject, signal } from '@angular/core';\nimport { MatDialogActions, MatDialogContent, MatDialogTitle } from '@angular/material/dialog';\nimport { MatButton } from '@angular/material/button';\nimport { AuthService } from '../domain/auth.service';\nimport { NavigateBackService } from '@processpuzzle/widgets';\n\n@Component({\n selector: 'pp-logout',\n template: `\n <div class=\"logout-dialog\">\n <h2 mat-dialog-title>Confirm Logout</h2>\n <mat-dialog-content> Are you sure you want to log out?</mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button mat-button (click)=\"onCancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" (click)=\"onLogout()\" [disabled]=\"isLoading()\">Logout</button>\n </mat-dialog-actions>\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],\n})\nexport class LogoutComponent {\n private readonly authService = inject(AuthService);\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 await this.authService.signOut();\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 { 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';\n\nexport const authRoutes: Routes = [\n { path: '', redirectTo: 'login', pathMatch: 'full' },\n { path: 'login', component: LoginComponent, title: 'Login', data: { icon: 'login', authToggle: true } },\n { path: 'logout', component: LogoutComponent, title: 'Logout', data: { icon: 'logout', authToggle: false } },\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 { CommonModule } from '@angular/common';\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 { AuthService } from '../domain/auth.service';\nimport { authRoutes } from '../auth.routes';\nimport { SubstringPipe } from '@processpuzzle/util';\n\n@Component({\n selector: 'pp-auth-button',\n template: `\n <div class=\"auth-button\">\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 <ng-container *ngIf=\"(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> {{ item.title | substring: 0 }}</span>\n </button>\n </ng-container>\n }\n </mat-menu>\n </div>\n `,\n imports: [CommonModule, MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe],\n styles: [],\n})\nexport class AuthButtonComponent {\n private readonly authService = inject(AuthService);\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","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAmBa,cAAc,CAAA;AAUI,IAAA,QAAA;AATZ,IAAA,IAAI,GAAS,MAAM,CAAC,IAAI,CAAC;AACzB,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAExC,IAAA,SAAS;AACT,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;AACzB,IAAA,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;IACzB,YAAY,GAAG,IAAI;AAEnB,IAAA,WAAA,CAA6B,QAAqB,EAAA;QAArB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AAC7B,YAAA,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;AACpD,YAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC;AACpC,SAAA,CAAC;;AAGJ,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,IAAI,IAAI,CAAC,SAAS,CA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,OAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,OAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,WAAW,EAAE,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,EAAE,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,cAAc,gSAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAG5G,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAtB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAChB,QAAA,EAAA;;;;;;;;;;;;;;;;AAgBT,EAAA,CAAA,EAAA,OAAA,EACQ,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC,EAAA;;;AC7B1H;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"processpuzzle-auth.mjs","sources":["../../../../libs/auth/src/lib/login/login.component.ts","../../../../libs/auth/src/lib/login/login.component.html","../../../../libs/auth/src/lib/my-profile/my-profile.component.ts","../../../../libs/auth/src/lib/my-profile/my-profile.component.html","../../../../libs/auth/src/lib/registration/registration.component.ts","../../../../libs/auth/src/lib/registration/registration.component.html","../../../../libs/auth/src/lib/domain/auth.service.ts","../../../../libs/auth/src/lib/logout/logout.component.ts","../../../../libs/auth/src/lib/auth.routes.ts","../../../../libs/auth/src/lib/auth-button/auth-button.component.ts","../../../../libs/auth/src/processpuzzle-auth.ts"],"sourcesContent":["import { Component, inject, signal } from '@angular/core';\nimport { Auth, GoogleAuthProvider, signInWithEmailAndPassword, signInWithPopup } from '@angular/fire/auth';\nimport { 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 { NgIf } from '@angular/common';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { FirebaseError } from 'firebase-admin/lib/utils/error';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\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, NgIf, RouterLink, TranslocoDirective],\n providers: [provideTranslocoScope('auth')],\n})\nexport class LoginComponent {\n private readonly auth: Auth = inject(Auth);\n private readonly fb = inject(FormBuilder);\n private readonly router = inject(Router);\n\n loginForm: FormGroup;\n isLoading = signal(false);\n errorMessage = signal('');\n hidePassword = true;\n\n constructor(private readonly snackBar: MatSnackBar) {\n this.loginForm = this.fb.group({\n email: ['', [Validators.required, Validators.email]],\n password: ['', Validators.required],\n });\n }\n\n async onSubmit() {\n if (this.loginForm.invalid) return;\n\n this.isLoading.set(true);\n\n try {\n const { email, password } = this.loginForm.value;\n await signInWithEmailAndPassword(this.auth, email, password);\n await this.router.navigate(['/']);\n } catch (error: unknown) {\n this.snackBar.open(this.getErrorMessage((error as FirebaseError).code), 'Close', { duration: 5000, panelClass: ['error-snackbar'] });\n } finally {\n this.isLoading.set(false);\n this.errorMessage.set('');\n }\n }\n\n async signInWithGoogle() {\n this.isLoading.set(true);\n\n try {\n const provider = new GoogleAuthProvider();\n await signInWithPopup(this.auth, provider);\n await this.router.navigate(['/']); // Navigate to home page after successful login\n } catch (error: unknown) {\n this.snackBar.open(this.getErrorMessage((error as FirebaseError).code), 'Close', { duration: 5000, panelClass: ['error-snackbar'] });\n } finally {\n this.isLoading.set(false);\n this.errorMessage.set('');\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}\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 <mat-error *ngIf=\"loginForm.get('email')?.hasError('required')\">{{t('auth.login-form.email_err_required')}}</mat-error>\n <mat-error *ngIf=\"loginForm.get('email')?.hasError('email')\">{{t('auth.login-form.email_err_invalid')}}</mat-error>\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 <mat-error *ngIf=\"loginForm.get('password')?.hasError('required')\">{{t('auth.login-form.password_err_required')}}</mat-error>\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 <div class=\"error-message\" *ngIf=\"errorMessage\">{{ errorMessage() }}</div>\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, FormGroup, NonNullableFormBuilder, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { Auth, createUserWithEmailAndPassword } from '@angular/fire/auth';\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 { NgIf } from '@angular/common';\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 { FirebaseError } from 'firebase-admin/lib/utils/error';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\n\n@Component({\n selector: 'pp-registration',\n templateUrl: 'registration.component.html',\n styleUrls: ['registration.component.css'],\n imports: [ReactiveFormsModule, MatProgressBar, MatFormField, MatInput, NgIf, MatIconButton, MatIcon, MatLabel, MatButton, RouterLink, MatError, TranslocoDirective],\n providers: [provideTranslocoScope('auth')],\n})\nexport class RegistrationComponent {\n private readonly auth = inject(Auth);\n private readonly fb = inject(NonNullableFormBuilder);\n private readonly navigateBack = inject(NavigateBackService);\n\n protected registerForm: FormGroup;\n protected isLoading = signal<boolean>(false);\n protected errorMessage = signal<string>('');\n protected hidePassword = true;\n protected hideConfirmPassword = true;\n\n constructor(private readonly snackBar: MatSnackBar) {\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 createUserWithEmailAndPassword(this.auth, email, password);\n } catch (error: unknown) {\n this.snackBar.open(this.getErrorMessage((error as FirebaseError).code), '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 <mat-progress-bar *ngIf=\"isLoading()\" mode=\"indeterminate\"></mat-progress-bar>\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 <mat-error *ngIf=\"registerForm.get('email')?.errors?.['required']\">{{t('auth.registration-form.email_err_required')}}</mat-error>\n <mat-error *ngIf=\"registerForm.get('email')?.errors?.['email']\">{{t('auth.registration-form.email_err_invalid')}}</mat-error>\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 <mat-error *ngIf=\"registerForm.get('password')?.errors?.['required']\">{{t('auth.registration-form.password_err_required')}}</mat-error>\n <mat-error *ngIf=\"registerForm.get('password')?.errors?.['minlength']\">{{t('auth.registration-form.password_err_min_length')}}</mat-error>\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 <mat-error *ngIf=\"registerForm.errors?.['passwordMismatch']\">{{t('auth.registration-form.password_confirm_err_mismatch')}}</mat-error>\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 <mat-error *ngIf=\"errorMessage() !== ''\" class=\"server-error\">{{ errorMessage() }}</mat-error>\n </form>\n </ng-container>\n</div>\n","import { computed, inject, Injectable, Signal } from '@angular/core';\nimport { Auth, authState, User } from '@angular/fire/auth';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n private readonly auth: Auth = inject(Auth);\n readonly user = toSignal<User | null>(authState(this.auth), { initialValue: null });\n isAuthenticated: Signal<boolean> = computed(() => !!this.user());\n\n async signOut(): Promise<void> {\n return this.auth.signOut();\n }\n\n getCurrentUser(): User | null {\n return this.auth.currentUser;\n }\n}\n","import { Component, inject, signal } from '@angular/core';\nimport { MatDialogActions, MatDialogContent, MatDialogTitle } from '@angular/material/dialog';\nimport { MatButton } from '@angular/material/button';\nimport { AuthService } from '../domain/auth.service';\nimport { NavigateBackService } from '@processpuzzle/widgets';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\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 .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(AuthService);\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 await this.authService.signOut();\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 { 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';\n\nexport const authRoutes: Routes = [\n { path: '', redirectTo: 'login', pathMatch: 'full' },\n { path: 'login', component: LoginComponent, title: 'login', data: { icon: 'login', authToggle: true } },\n { path: 'logout', component: LogoutComponent, title: 'logout', data: { icon: 'logout', authToggle: false } },\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 { CommonModule } from '@angular/common';\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 { AuthService } from '../domain/auth.service';\nimport { authRoutes } from '../auth.routes';\nimport { SubstringPipe } from '@processpuzzle/util';\nimport { provideTranslocoScope, TranslocoDirective } from '@jsverse/transloco';\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 <ng-container *ngIf=\"(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> {{ t('auth.button.' + item.title | substring: 0) }}</span>\n </button>\n </ng-container>\n }\n </mat-menu>\n </ng-container>\n </div>\n `,\n imports: [CommonModule, MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe, TranslocoDirective],\n styles: [],\n providers: [provideTranslocoScope('auth')],\n})\nexport class AuthButtonComponent {\n private readonly authService = inject(AuthService);\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","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAqBa,cAAc,CAAA;AAUI,IAAA,QAAA;AATZ,IAAA,IAAI,GAAS,MAAM,CAAC,IAAI,CAAC;AACzB,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAExC,IAAA,SAAS;AACT,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC;AACzB,IAAA,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;IACzB,YAAY,GAAG,IAAI;AAEnB,IAAA,WAAA,CAA6B,QAAqB,EAAA;QAArB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AAC7B,YAAA,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;AACpD,YAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC;AACpC,SAAA,CAAC;;AAGJ,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO;YAAE;AAE5B,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;AAExB,QAAA,IAAI;YACF,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK;YAChD,MAAM,0BAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC;YAC5D,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CA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.com/ZsZs/processpuzzle#readme",
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@angular/common": "^19.2.0",
|
|
15
|
-
"@angular/core": "^19.2.0"
|
|
15
|
+
"@angular/core": "^19.2.0",
|
|
16
|
+
"@angular/forms": "^19.2.0",
|
|
17
|
+
"@angular/router": "^19.2.0",
|
|
18
|
+
"@angular/material": "^19.2.0",
|
|
19
|
+
"@angular/cdk": "^19.2.0",
|
|
20
|
+
"@angular/fire": "^19.1.0",
|
|
21
|
+
"@processpuzzle/util": "^0.0.1",
|
|
22
|
+
"firebase-admin": "^13.2.0",
|
|
23
|
+
"rxjs": "~7.8.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"tslib": "^2.8.1"
|
|
16
27
|
},
|
|
17
28
|
"sideEffects": false,
|
|
18
29
|
"module": "fesm2022/processpuzzle-auth.mjs",
|
|
@@ -25,8 +36,5 @@
|
|
|
25
36
|
"types": "./index.d.ts",
|
|
26
37
|
"default": "./fesm2022/processpuzzle-auth.mjs"
|
|
27
38
|
}
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"tslib": "^2.3.0"
|
|
31
39
|
}
|
|
32
40
|
}
|