@processpuzzle/auth 0.0.1 → 0.0.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.
package/README.md CHANGED
@@ -20,8 +20,8 @@ The `AuthButtonComponent` is a versatile authentication button that displays dif
20
20
 
21
21
  - Displays a person icon button that opens a dropdown menu
22
22
  - Dynamically shows different menu options based on authentication status
23
- - When not authenticated, shows Login and Register options
24
- - When authenticated, shows My Profile and Logout options
23
+ - When not authenticated, it shows Login and Register options
24
+ - When authenticated, it shows My Profile and Logout options
25
25
  - Integrates with Angular Router for navigation to auth pages
26
26
  - Uses Angular Material components for a consistent UI experience
27
27
 
@@ -0,0 +1,12 @@
1
+ {
2
+ "language-selector": {
3
+ "en": "English",
4
+ "de": "Deutsch",
5
+ "hu": "Ungarisch",
6
+ "es": "Spanisch",
7
+ "english": "English",
8
+ "german": "Deutsch",
9
+ "hungarian": "Ungarisch",
10
+ "spanish": "Spanisch"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "language-selector": {
3
+ "en": "English",
4
+ "de": "German",
5
+ "hu": "Hungarian",
6
+ "es": "Spanish",
7
+ "english": "English",
8
+ "german": "German",
9
+ "hungarian": "Hungarian",
10
+ "spanish": "Spanish"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "language-selector": {
3
+ "en": "Inglés",
4
+ "de": "Alemán",
5
+ "hu": "Húngaro",
6
+ "es": "Español",
7
+ "english": "Inglés",
8
+ "german": "Alemán",
9
+ "hungarian": "Húngaro",
10
+ "spanish": "Español"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "language-selector": {
3
+ "en": "Angol",
4
+ "de": "Német",
5
+ "hu": "Magyar",
6
+ "es": "Spanyol",
7
+ "english": "Angol",
8
+ "german": "Német",
9
+ "hungarian": "Magyar",
10
+ "spanish": "Spanyol"
11
+ }
12
+ }
@@ -0,0 +1,300 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, signal, Component, computed, Injectable } from '@angular/core';
3
+ import { Auth, signInWithEmailAndPassword, GoogleAuthProvider, signInWithPopup, createUserWithEmailAndPassword, authState } from '@angular/fire/auth';
4
+ import { Router, RouterLink } from '@angular/router';
5
+ import * as i2 from '@angular/forms';
6
+ import { FormBuilder, Validators, ReactiveFormsModule, NonNullableFormBuilder } from '@angular/forms';
7
+ import { MatError, MatFormField, MatSuffix } from '@angular/material/form-field';
8
+ import { MatInput, MatLabel } from '@angular/material/input';
9
+ import * as i3 from '@angular/material/button';
10
+ import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
11
+ import * as i2$1 from '@angular/material/icon';
12
+ import { MatIcon, MatIconModule } from '@angular/material/icon';
13
+ import { MatDivider } from '@angular/material/divider';
14
+ import * as i1$1 from '@angular/common';
15
+ import { NgIf, CommonModule } from '@angular/common';
16
+ import * as i1 from '@angular/material/snack-bar';
17
+ import { MatProgressBar } from '@angular/material/progress-bar';
18
+ import { NavigateBackService } from '@processpuzzle/widgets';
19
+ import { MatDialogTitle, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
20
+ import { toSignal } from '@angular/core/rxjs-interop';
21
+ import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
22
+ import { SubstringPipe } from '@processpuzzle/util';
23
+
24
+ class LoginComponent {
25
+ snackBar;
26
+ auth = inject(Auth);
27
+ fb = inject(FormBuilder);
28
+ router = inject(Router);
29
+ loginForm;
30
+ isLoading = signal(false);
31
+ errorMessage = signal('');
32
+ hidePassword = true;
33
+ constructor(snackBar) {
34
+ this.snackBar = snackBar;
35
+ this.loginForm = this.fb.group({
36
+ email: ['', [Validators.required, Validators.email]],
37
+ password: ['', Validators.required],
38
+ });
39
+ }
40
+ async onSubmit() {
41
+ if (this.loginForm.invalid)
42
+ return;
43
+ this.isLoading.set(true);
44
+ try {
45
+ const { email, password } = this.loginForm.value;
46
+ await signInWithEmailAndPassword(this.auth, email, password);
47
+ await this.router.navigate(['/']);
48
+ }
49
+ catch (error) {
50
+ this.snackBar.open(this.getErrorMessage(error.code), 'Close', { duration: 5000, panelClass: ['error-snackbar'] });
51
+ }
52
+ finally {
53
+ this.isLoading.set(false);
54
+ this.errorMessage.set('');
55
+ }
56
+ }
57
+ async signInWithGoogle() {
58
+ this.isLoading.set(true);
59
+ try {
60
+ const provider = new GoogleAuthProvider();
61
+ await signInWithPopup(this.auth, provider);
62
+ await this.router.navigate(['/']); // Navigate to home page after successful login
63
+ }
64
+ catch (error) {
65
+ this.snackBar.open(this.getErrorMessage(error.code), 'Close', { duration: 5000, panelClass: ['error-snackbar'] });
66
+ }
67
+ finally {
68
+ this.isLoading.set(false);
69
+ this.errorMessage.set('');
70
+ }
71
+ }
72
+ getErrorMessage(errorCode) {
73
+ switch (errorCode) {
74
+ case 'auth/invalid-email':
75
+ return 'Invalid email address';
76
+ case 'auth/user-disabled':
77
+ return 'This account has been disabled';
78
+ case 'auth/user-not-found':
79
+ return 'No account found with this email';
80
+ case 'auth/wrong-password':
81
+ return 'Invalid password';
82
+ case 'auth/popup-closed-by-user':
83
+ return 'Sign-in popup was closed before completion';
84
+ default:
85
+ return 'An error occurred during sign in';
86
+ }
87
+ }
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LoginComponent, deps: [{ token: i1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
89
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: LoginComponent, isStandalone: true, selector: "pp-login", ngImport: i0, template: "<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", 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"] }] });
90
+ }
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LoginComponent, decorators: [{
92
+ 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>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", 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
+ }], ctorParameters: () => [{ type: i1.MatSnackBar }] });
95
+
96
+ class MyProfileComponent {
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: MyProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: MyProfileComponent, isStandalone: true, selector: "pp-my-profile", ngImport: i0, template: "<h1>My profile</h1>\n", styles: [""] });
99
+ }
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: MyProfileComponent, decorators: [{
101
+ type: Component,
102
+ args: [{ selector: 'pp-my-profile', imports: [], template: "<h1>My profile</h1>\n" }]
103
+ }] });
104
+
105
+ class RegistrationComponent {
106
+ snackBar;
107
+ auth = inject(Auth);
108
+ fb = inject(NonNullableFormBuilder);
109
+ navigateBack = inject(NavigateBackService);
110
+ registerForm;
111
+ isLoading = signal(false);
112
+ errorMessage = signal('');
113
+ hidePassword = true;
114
+ hideConfirmPassword = true;
115
+ constructor(snackBar) {
116
+ this.snackBar = snackBar;
117
+ this.registerForm = this.fb.group({
118
+ email: ['', [Validators.required, Validators.email]],
119
+ password: ['', [Validators.required, Validators.minLength(6)]],
120
+ confirmPassword: ['', Validators.required],
121
+ }, {
122
+ validators: [this.passwordMatchValidator],
123
+ });
124
+ }
125
+ passwordMatchValidator() {
126
+ return (form) => {
127
+ const password = form.get('password')?.value;
128
+ const confirmPassword = form.get('confirmPassword')?.value;
129
+ if (password !== confirmPassword) {
130
+ return { passwordMismatch: true };
131
+ }
132
+ return null;
133
+ };
134
+ }
135
+ async onSubmit() {
136
+ if (this.registerForm.invalid)
137
+ return;
138
+ this.isLoading.set(true);
139
+ try {
140
+ const { email, password } = this.registerForm.value;
141
+ await createUserWithEmailAndPassword(this.auth, email, password);
142
+ }
143
+ catch (error) {
144
+ this.snackBar.open(this.getErrorMessage(error.code), 'Close', {
145
+ duration: 5000,
146
+ panelClass: ['error-snackbar'],
147
+ });
148
+ }
149
+ finally {
150
+ this.isLoading.set(false);
151
+ this.errorMessage.set('');
152
+ this.navigateBack.goBack();
153
+ }
154
+ }
155
+ getErrorMessage(errorCode) {
156
+ switch (errorCode) {
157
+ case 'auth/email-already-in-use':
158
+ return 'This email address is already registered';
159
+ case 'auth/invalid-email':
160
+ return 'Please enter a valid email address';
161
+ case 'auth/operation-not-allowed':
162
+ return 'Email/password registration is not enabled';
163
+ case 'auth/weak-password':
164
+ return 'Please choose a stronger password';
165
+ default:
166
+ return 'An error occurred during registration. Please try again.';
167
+ }
168
+ }
169
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: RegistrationComponent, deps: [{ token: i1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
170
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: RegistrationComponent, isStandalone: true, selector: "pp-registration", ngImport: i0, template: "<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", 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"] }] });
171
+ }
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: RegistrationComponent, decorators: [{
173
+ 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>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", 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
+ }], ctorParameters: () => [{ type: i1.MatSnackBar }] });
176
+
177
+ class AuthService {
178
+ auth = inject(Auth);
179
+ user = toSignal(authState(this.auth), { initialValue: null });
180
+ isAuthenticated = computed(() => !!this.user());
181
+ async signOut() {
182
+ return this.auth.signOut();
183
+ }
184
+ getCurrentUser() {
185
+ return this.auth.currentUser;
186
+ }
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
188
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthService, providedIn: 'root' });
189
+ }
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthService, decorators: [{
191
+ type: Injectable,
192
+ args: [{
193
+ providedIn: 'root',
194
+ }]
195
+ }] });
196
+
197
+ class LogoutComponent {
198
+ authService = inject(AuthService);
199
+ navigateBackService = inject(NavigateBackService);
200
+ isLoading = signal(false);
201
+ onCancel() {
202
+ this.navigateBackService.goBack();
203
+ }
204
+ async onLogout() {
205
+ try {
206
+ this.isLoading.set(true);
207
+ await this.authService.signOut();
208
+ this.navigateBackService.goBack();
209
+ }
210
+ catch (error) {
211
+ console.error('Error during logout:', error);
212
+ }
213
+ finally {
214
+ this.isLoading.set(false);
215
+ }
216
+ }
217
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
218
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: LogoutComponent, isStandalone: true, selector: "pp-logout", ngImport: i0, template: `
219
+ <div class="logout-dialog">
220
+ <h2 mat-dialog-title>Confirm Logout</h2>
221
+ <mat-dialog-content> Are you sure you want to log out?</mat-dialog-content>
222
+ <mat-dialog-actions align="end">
223
+ <button mat-button (click)="onCancel()">Cancel</button>
224
+ <button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">Logout</button>
225
+ </mat-dialog-actions>
226
+ </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"] }] });
228
+ }
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: LogoutComponent, decorators: [{
230
+ type: Component,
231
+ args: [{ selector: 'pp-logout', template: `
232
+ <div class="logout-dialog">
233
+ <h2 mat-dialog-title>Confirm Logout</h2>
234
+ <mat-dialog-content> Are you sure you want to log out?</mat-dialog-content>
235
+ <mat-dialog-actions align="end">
236
+ <button mat-button (click)="onCancel()">Cancel</button>
237
+ <button mat-raised-button color="primary" (click)="onLogout()" [disabled]="isLoading()">Logout</button>
238
+ </mat-dialog-actions>
239
+ </div>
240
+ `, imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatButton], styles: [".logout-dialog{padding:1rem}mat-dialog-actions{gap:.5rem}mat-dialog-content{margin:1rem 0}\n"] }]
241
+ }] });
242
+
243
+ const authRoutes = [
244
+ { path: '', redirectTo: 'login', pathMatch: 'full' },
245
+ { path: 'login', component: LoginComponent, title: 'Login', data: { icon: 'login', authToggle: true } },
246
+ { path: 'logout', component: LogoutComponent, title: 'Logout', data: { icon: 'logout', authToggle: false } },
247
+ { path: 'register', component: RegistrationComponent, title: 'Register', data: { icon: 'person_add', authToggle: true } },
248
+ { path: 'my-profile', component: MyProfileComponent, title: 'My profile', data: { icon: 'person', authToggle: false } },
249
+ ];
250
+
251
+ class AuthButtonComponent {
252
+ authService = inject(AuthService);
253
+ isAuthenticated = computed(() => this.authService.isAuthenticated());
254
+ routes = authRoutes.filter((item) => item.title !== null && item.title !== undefined);
255
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
256
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: AuthButtonComponent, isStandalone: true, selector: "pp-auth-button", ngImport: i0, template: `
257
+ <div class="auth-button">
258
+ <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Auth Button">
259
+ <mat-icon>person</mat-icon>
260
+ </button>
261
+ <mat-menu #menu="matMenu">
262
+ @for (item of routes; track item) {
263
+ <ng-container *ngIf="(isAuthenticated() && !item.data?.['authToggle']) || (!isAuthenticated() && item.data?.['authToggle'])">
264
+ <button mat-menu-item [routerLink]="'auth/' + item.path">
265
+ <mat-icon>{{ item.data?.['icon'] }}</mat-icon>
266
+ <span>&nbsp;{{ item.title | substring: 0 }}</span>
267
+ </button>
268
+ </ng-container>
269
+ }
270
+ </mat-menu>
271
+ </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" }] });
273
+ }
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: AuthButtonComponent, decorators: [{
275
+ type: Component,
276
+ args: [{ selector: 'pp-auth-button', template: `
277
+ <div class="auth-button">
278
+ <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Auth Button">
279
+ <mat-icon>person</mat-icon>
280
+ </button>
281
+ <mat-menu #menu="matMenu">
282
+ @for (item of routes; track item) {
283
+ <ng-container *ngIf="(isAuthenticated() && !item.data?.['authToggle']) || (!isAuthenticated() && item.data?.['authToggle'])">
284
+ <button mat-menu-item [routerLink]="'auth/' + item.path">
285
+ <mat-icon>{{ item.data?.['icon'] }}</mat-icon>
286
+ <span>&nbsp;{{ item.title | substring: 0 }}</span>
287
+ </button>
288
+ </ng-container>
289
+ }
290
+ </mat-menu>
291
+ </div>
292
+ `, imports: [CommonModule, MatIconModule, MatButtonModule, MatMenu, MatMenuItem, RouterLink, MatMenuTrigger, SubstringPipe] }]
293
+ }] });
294
+
295
+ /**
296
+ * Generated bundle index. Do not edit.
297
+ */
298
+
299
+ export { AuthButtonComponent, authRoutes };
300
+ //# sourceMappingURL=processpuzzle-auth.mjs.map
@@ -0,0 +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>&nbsp;{{ 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;;A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A,EAAA,kBAAA,EAAA,WAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,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;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@processpuzzle/auth" />
5
+ export * from './public-api';
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AuthButtonComponent {
3
+ private readonly authService;
4
+ isAuthenticated: import("@angular/core").Signal<boolean>;
5
+ readonly routes: import("@angular/router").Route[];
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthButtonComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuthButtonComponent, "pp-auth-button", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,2 @@
1
+ import { Routes } from '@angular/router';
2
+ export declare const authRoutes: Routes;
@@ -0,0 +1,12 @@
1
+ import { Signal } from '@angular/core';
2
+ import { User } from '@angular/fire/auth';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AuthService {
5
+ private readonly auth;
6
+ readonly user: Signal<User | null>;
7
+ isAuthenticated: Signal<boolean>;
8
+ signOut(): Promise<void>;
9
+ getCurrentUser(): User | null;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
12
+ }
@@ -0,0 +1,19 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ import { MatSnackBar } from '@angular/material/snack-bar';
3
+ import * as i0 from "@angular/core";
4
+ export declare class LoginComponent {
5
+ private readonly snackBar;
6
+ private readonly auth;
7
+ private readonly fb;
8
+ private readonly router;
9
+ loginForm: FormGroup;
10
+ isLoading: import("@angular/core").WritableSignal<boolean>;
11
+ errorMessage: import("@angular/core").WritableSignal<string>;
12
+ hidePassword: boolean;
13
+ constructor(snackBar: MatSnackBar);
14
+ onSubmit(): Promise<void>;
15
+ signInWithGoogle(): Promise<void>;
16
+ private getErrorMessage;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "pp-login", never, {}, {}, never, never, true, never>;
19
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LogoutComponent {
3
+ private readonly authService;
4
+ private readonly navigateBackService;
5
+ protected isLoading: import("@angular/core").WritableSignal<boolean>;
6
+ onCancel(): void;
7
+ onLogout(): Promise<void>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<LogoutComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<LogoutComponent, "pp-logout", never, {}, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MyProfileComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<MyProfileComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<MyProfileComponent, "pp-my-profile", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,20 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ import { MatSnackBar } from '@angular/material/snack-bar';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RegistrationComponent {
5
+ private readonly snackBar;
6
+ private readonly auth;
7
+ private readonly fb;
8
+ private readonly navigateBack;
9
+ protected registerForm: FormGroup;
10
+ protected isLoading: import("@angular/core").WritableSignal<boolean>;
11
+ protected errorMessage: import("@angular/core").WritableSignal<string>;
12
+ protected hidePassword: boolean;
13
+ protected hideConfirmPassword: boolean;
14
+ constructor(snackBar: MatSnackBar);
15
+ private passwordMatchValidator;
16
+ onSubmit(): Promise<void>;
17
+ private getErrorMessage;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<RegistrationComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<RegistrationComponent, "pp-registration", never, {}, {}, never, never, true, never>;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processpuzzle/auth",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,8 +14,10 @@
14
14
  "@angular/common": "^19.2.0",
15
15
  "@angular/core": "^19.2.0"
16
16
  },
17
+ "sideEffects": false,
18
+ "module": "fesm2022/processpuzzle-auth.mjs",
19
+ "typings": "index.d.ts",
17
20
  "exports": {
18
- "./i18n/*": "./i18n/pp-auth/*",
19
21
  "./package.json": {
20
22
  "default": "./package.json"
21
23
  },
@@ -24,13 +26,6 @@
24
26
  "default": "./fesm2022/processpuzzle-auth.mjs"
25
27
  }
26
28
  },
27
- "files": [
28
- "dist/libs/auth/",
29
- "i18n/"
30
- ],
31
- "sideEffects": false,
32
- "module": "fesm2022/processpuzzle-auth.mjs",
33
- "typings": "index.d.ts",
34
29
  "dependencies": {
35
30
  "tslib": "^2.3.0"
36
31
  }
@@ -0,0 +1,2 @@
1
+ export * from './lib/auth.routes';
2
+ export { AuthButtonComponent } from './lib/auth-button/auth-button.component';