@rxap/authentication 14.0.5 → 16.0.0-dev.0

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.
Files changed (63) hide show
  1. package/components/lib/authentication-container/authentication-container.component.d.ts +1 -1
  2. package/components/lib/loading/loading.component.d.ts +1 -1
  3. package/components/lib/loading/loading.component.module.d.ts +2 -2
  4. package/components/lib/login/login.component.d.ts +2 -2
  5. package/components/lib/login/login.component.module.d.ts +9 -9
  6. package/components/lib/reset-password/reset-password.component.d.ts +1 -1
  7. package/components/lib/reset-password/reset-password.component.module.d.ts +7 -7
  8. package/components/lib/reset-password/reset-password.form.d.ts +1 -1
  9. package/esm2022/components/lib/authentication-container/authentication-container.component.mjs +39 -0
  10. package/esm2022/components/lib/authentication-container/authentication-container.component.module.mjs +29 -0
  11. package/esm2022/components/lib/authentication.module.mjs +30 -0
  12. package/esm2022/components/lib/loading/loading.component.mjs +39 -0
  13. package/esm2022/components/lib/loading/loading.component.module.mjs +25 -0
  14. package/esm2022/components/lib/login/login.component.mjs +85 -0
  15. package/esm2022/components/lib/login/login.component.module.mjs +69 -0
  16. package/esm2022/components/lib/login/login.form.mjs +117 -0
  17. package/esm2022/components/lib/reset-password/reset-password.component.mjs +40 -0
  18. package/esm2022/components/lib/reset-password/reset-password.component.module.mjs +65 -0
  19. package/esm2022/components/lib/reset-password/reset-password.form.mjs +116 -0
  20. package/esm2022/lib/authentication-routing.service.mjs +47 -0
  21. package/esm2022/lib/authentication.guard.mjs +111 -0
  22. package/esm2022/lib/authentication.service.mjs +82 -0
  23. package/esm2022/lib/register.service.mjs +18 -0
  24. package/esm2022/lib/sign-out.directive.mjs +50 -0
  25. package/esm2022/lib/user.service.mjs +16 -0
  26. package/fesm2022/rxap-authentication-components.mjs +610 -0
  27. package/fesm2022/rxap-authentication-components.mjs.map +1 -0
  28. package/{fesm2020 → fesm2022}/rxap-authentication.mjs +22 -25
  29. package/fesm2022/rxap-authentication.mjs.map +1 -0
  30. package/lib/authentication.guard.d.ts +2 -2
  31. package/lib/sign-out.directive.d.ts +1 -1
  32. package/package.json +30 -37
  33. package/esm2020/components/lib/authentication-container/authentication-container.component.mjs +0 -38
  34. package/esm2020/components/lib/authentication-container/authentication-container.component.module.mjs +0 -28
  35. package/esm2020/components/lib/authentication.module.mjs +0 -29
  36. package/esm2020/components/lib/loading/loading.component.mjs +0 -38
  37. package/esm2020/components/lib/loading/loading.component.module.mjs +0 -24
  38. package/esm2020/components/lib/login/login.component.mjs +0 -84
  39. package/esm2020/components/lib/login/login.component.module.mjs +0 -68
  40. package/esm2020/components/lib/login/login.form.mjs +0 -115
  41. package/esm2020/components/lib/reset-password/reset-password.component.mjs +0 -39
  42. package/esm2020/components/lib/reset-password/reset-password.component.module.mjs +0 -64
  43. package/esm2020/components/lib/reset-password/reset-password.form.mjs +0 -115
  44. package/esm2020/lib/authentication-routing.service.mjs +0 -46
  45. package/esm2020/lib/authentication.guard.mjs +0 -110
  46. package/esm2020/lib/authentication.service.mjs +0 -82
  47. package/esm2020/lib/register.service.mjs +0 -18
  48. package/esm2020/lib/sign-out.directive.mjs +0 -48
  49. package/esm2020/lib/user.service.mjs +0 -16
  50. package/fesm2015/rxap-authentication-components.mjs +0 -621
  51. package/fesm2015/rxap-authentication-components.mjs.map +0 -1
  52. package/fesm2015/rxap-authentication.mjs +0 -321
  53. package/fesm2015/rxap-authentication.mjs.map +0 -1
  54. package/fesm2020/rxap-authentication-components.mjs +0 -610
  55. package/fesm2020/rxap-authentication-components.mjs.map +0 -1
  56. package/fesm2020/rxap-authentication.mjs.map +0 -1
  57. /package/{esm2020 → esm2022}/components/lib/fade-animation.mjs +0 -0
  58. /package/{esm2020 → esm2022}/components/lib/routes.mjs +0 -0
  59. /package/{esm2020 → esm2022}/components/public_api.mjs +0 -0
  60. /package/{esm2020 → esm2022}/components/rxap-authentication-components.mjs +0 -0
  61. /package/{esm2020 → esm2022}/index.mjs +0 -0
  62. /package/{esm2020 → esm2022}/lib/tokens.mjs +0 -0
  63. /package/{esm2020 → esm2022}/rxap-authentication.mjs +0 -0
@@ -1,621 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Inject, INJECTOR, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
- import * as i1$2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import { __decorate, __metadata, __awaiter } from 'tslib';
6
- import * as i8 from '@rxap/forms';
7
- import { UseFormControl, RxapFormControl, RxapForm, RXAP_FORM_DEFINITION_BUILDER, RxapFormBuilder, RXAP_FORM_DEFINITION, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, RxapFormsModule, ControlValidator, ControlSetValue } from '@rxap/forms';
8
- import * as i7 from '@angular/forms';
9
- import { Validators, ReactiveFormsModule } from '@angular/forms';
10
- import * as i1 from '@rxap/config';
11
- import { ConfigService } from '@rxap/config';
12
- import * as i1$1 from '@angular/router';
13
- import { Router, RouterModule, ActivatedRoute } from '@angular/router';
14
- import * as i2 from '@rxap/authentication';
15
- import { RxapAuthenticationService, RxapAuthenticationGuard } from '@rxap/authentication';
16
- import { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@angular/material/core';
17
- import { trigger, state, style, transition, animate } from '@angular/animations';
18
- import * as i14 from '@angular/material/snack-bar';
19
- import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
20
- import { ToggleSubject } from '@rxap/utilities/rxjs';
21
- import * as i2$1 from '@angular/flex-layout/flex';
22
- import * as i3 from '@angular/material/button';
23
- import { MatButtonModule } from '@angular/material/button';
24
- import * as i4 from '@angular/material/progress-spinner';
25
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
26
- import * as i5 from '@angular/material/form-field';
27
- import * as i6 from '@angular/material/input';
28
- import { MatInputModule } from '@angular/material/input';
29
- import * as i9 from '@angular/material/checkbox';
30
- import { MatCheckboxModule } from '@angular/material/checkbox';
31
- import * as i10 from '@angular/material/icon';
32
- import { MatIconModule } from '@angular/material/icon';
33
- import * as i11 from '@angular/material/tooltip';
34
- import { MatTooltipModule } from '@angular/material/tooltip';
35
- import * as i12 from '@angular/material/progress-bar';
36
- import { MatProgressBarModule } from '@angular/material/progress-bar';
37
- import { FlexLayoutModule } from '@angular/flex-layout';
38
- import { MatCardModule } from '@angular/material/card';
39
- import { MatToolbarModule } from '@angular/material/toolbar';
40
- import { take, map, switchMap, tap, filter } from 'rxjs/operators';
41
-
42
- let LoginForm = class LoginForm {
43
- constructor(config) {
44
- this.config = config;
45
- this.loading = true;
46
- this.loginFailed = false;
47
- }
48
- rxapOnInit() {
49
- const email = this.config.get('authentication.default.email');
50
- if (email) {
51
- this.email.setValue(email);
52
- }
53
- const password = this.config.get('authentication.default.password');
54
- if (password) {
55
- this.password.setValue(password);
56
- }
57
- }
58
- };
59
- LoginForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginForm, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
60
- LoginForm.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginForm });
61
- __decorate([
62
- UseFormControl({
63
- validators: [Validators.required, Validators.email],
64
- }),
65
- __metadata("design:type", RxapFormControl)
66
- ], LoginForm.prototype, "email", void 0);
67
- __decorate([
68
- UseFormControl({
69
- validators: [Validators.required],
70
- }),
71
- __metadata("design:type", RxapFormControl)
72
- ], LoginForm.prototype, "password", void 0);
73
- __decorate([
74
- UseFormControl({
75
- state: true,
76
- }),
77
- __metadata("design:type", RxapFormControl)
78
- ], LoginForm.prototype, "remember", void 0);
79
- LoginForm = __decorate([
80
- RxapForm({
81
- id: 'rxap-login',
82
- providers: [
83
- {
84
- provide: ConfigService,
85
- useExisting: ConfigService,
86
- },
87
- ],
88
- }),
89
- __metadata("design:paramtypes", [ConfigService])
90
- ], LoginForm);
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginForm, decorators: [{
92
- type: Injectable
93
- }], ctorParameters: function () { return [{ type: i1.ConfigService }]; }, propDecorators: { email: [], password: [], remember: [] } });
94
- class LoginFormSubmitMethod {
95
- constructor(authentication) {
96
- this.authentication = authentication;
97
- }
98
- call(value) {
99
- return this.authentication.signInWithEmailAndPassword(value.email, value.password, value.remember);
100
- }
101
- }
102
- LoginFormSubmitMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginFormSubmitMethod, deps: [{ token: i2.RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
103
- LoginFormSubmitMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginFormSubmitMethod });
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginFormSubmitMethod, decorators: [{
105
- type: Injectable
106
- }], ctorParameters: function () { return [{ type: i2.RxapAuthenticationService }]; } });
107
- class LoginFormSubmitSuccessful {
108
- constructor(router) {
109
- this.router = router;
110
- }
111
- call() {
112
- return this.router.navigate(['/']);
113
- }
114
- }
115
- LoginFormSubmitSuccessful.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginFormSubmitSuccessful, deps: [{ token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
116
- LoginFormSubmitSuccessful.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginFormSubmitSuccessful });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginFormSubmitSuccessful, decorators: [{
118
- type: Injectable
119
- }], ctorParameters: function () {
120
- return [{ type: i1$1.Router, decorators: [{
121
- type: Inject,
122
- args: [Router]
123
- }] }];
124
- } });
125
- const LoginFormProviders = [
126
- LoginForm,
127
- {
128
- provide: RXAP_FORM_DEFINITION_BUILDER,
129
- useFactory: (injector) => new RxapFormBuilder(LoginForm, injector),
130
- deps: [INJECTOR],
131
- },
132
- {
133
- provide: RXAP_FORM_DEFINITION,
134
- useFactory: (builder) => builder.build(),
135
- deps: [RXAP_FORM_DEFINITION_BUILDER],
136
- },
137
- {
138
- provide: RXAP_FORM_SUBMIT_METHOD,
139
- useClass: LoginFormSubmitMethod,
140
- },
141
- {
142
- provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,
143
- useClass: LoginFormSubmitSuccessful,
144
- },
145
- ];
146
-
147
- // the fade-in/fade-out animation.
148
- const fadeAnimation = trigger('fadeAnimation', [
149
- // the "in" style determines the "resting" state of the element when it is visible.
150
- state('in', style({ opacity: 1 })),
151
- // fade in when created. this could also be written as transition('void => *')
152
- transition(':enter', [
153
- style({ opacity: 0 }),
154
- animate(300)
155
- ]),
156
- // fade out when destroyed. this could also be written as transition('void => *')
157
- transition(':leave', animate(300, style({ opacity: 0 })))
158
- ]);
159
-
160
- class LoginComponent {
161
- constructor(authentication, snackBar) {
162
- this.authentication = authentication;
163
- this.snackBar = snackBar;
164
- this.requestingPasswordReset$ = new ToggleSubject();
165
- }
166
- requestPasswordReset(email) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- this.requestingPasswordReset$.enable();
169
- try {
170
- const result = yield this.authentication.requestPasswordReset(email);
171
- if (!result) {
172
- this.snackBar.open('The password reset request result is falsy', undefined, {
173
- duration: 5000,
174
- panelClass: 'error'
175
- });
176
- }
177
- else {
178
- this.snackBar.open('The password reset request was successful', undefined, {
179
- duration: 3000
180
- });
181
- }
182
- }
183
- catch (e) {
184
- this.snackBar.open(e.message, undefined, {
185
- duration: 3000,
186
- panelClass: 'error'
187
- });
188
- }
189
- finally {
190
- this.requestingPasswordReset$.disable();
191
- }
192
- });
193
- }
194
- }
195
- LoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginComponent, deps: [{ token: RxapAuthenticationService }, { token: MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
196
- LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: LoginComponent, selector: "rxap-login", providers: [
197
- LoginFormProviders,
198
- {
199
- provide: ErrorStateMatcher,
200
- useClass: ShowOnDirtyErrorStateMatcher
201
- }
202
- ], ngImport: i0, template: "<form rxapForm class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" #form=\"rxapForm\" fxLayoutGap=\"32px\" [@fadeAnimation]=\"'in'\"\n novalidate>\n\n <div class=\"header\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFlex=\"nogrow\">\n\n <mat-icon fxFlex=\"nogrow\" color=\"primary\" class=\"avatar-icon\">account_circle</mat-icon>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <mat-form-field class=\"email-input\">\n <mat-icon matPrefix inline>email</mat-icon>\n <mat-label i18n>Email</mat-label>\n <input matInput\n i18n-placeholder\n placeholder=\"Enter your email address\"\n type=\"email\"\n fxFlex=\"nogrow\"\n formControlName=\"email\">\n <mat-error *rxapFormControlError=\"let error from 'email'; if: 'required'\">\n Email is <strong>required</strong>\n </mat-error>\n <mat-error *rxapFormControlError=\"let error from 'email'; if: 'email'\">\n Please enter a valid email address\n </mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n>Password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your password\"\n fxFlex=\"nogrow\"\n #passwordInput\n formControlName=\"password\">\n <mat-error *rxapFormControlError=\"let error from 'password'; if: 'required'\">\n Password is <strong>required</strong>\n </mat-error>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'password'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'test'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'text'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n </div>\n\n <div class=\"sub-controls\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"16px\">\n\n <mat-checkbox class=\"remember-input\" fxFlex=\"nogrow\" formControlName=\"remember\">Remember me</mat-checkbox>\n\n <div fxFlex=\"nogrow\"\n matTooltip=\"Please enter a valid email address\"\n matTooltipPosition=\"above\"\n [matTooltipDisabled]=\"form.control.controls.email.valid\">\n <button color=\"accent\"\n type=\"button\"\n mat-button\n (click)=\"requestPasswordReset(form.value.email)\"\n [disabled]=\"!form.value.email || form.control.controls.email.hasError('email')\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"space-between center\">\n <mat-progress-spinner *ngIf=\"requestingPasswordReset$ | async\" mode=\"indeterminate\" [diameter]=\"15\"></mat-progress-spinner>\n <span fxFlex=\"nogrow\">Password forgotten</span>\n </span>\n </button>\n </div>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button mat-raised-button color=\"primary\" type=\"submit\" rxapFormControlMarkDirty>Login</button>\n </div>\n\n </div>\n\n </div>\n\n <div *rxapFormSubmitFailed=\"let error\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-error>{{ error.message }}</mat-error>\n </div>\n\n <mat-progress-bar *rxapFormSubmitting mode=\"indeterminate\" class=\"loading-bar\"></mat-progress-bar>\n\n</form>\n", styles: [".inner{padding:48px;position:relative;margin:16px 0}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px}.inner .content{width:304px;max-width:calc(100vw - 112px)}.inner .content .email-input,.inner .content .password-input{width:100%}.inner .content .email-input .prefix-icon,.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .email-input ::ng-deep .mat-form-field-prefix,.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:128px;text-transform:uppercase}.inner .sub-controls>*{margin-bottom:8px}.inner .loading-bar{position:absolute;inset:auto 0 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i8.FormDirective, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: ["initial", "rxapForm", "submitMethod"], outputs: ["ngSubmit", "rxapSubmit", "invalidSubmit", "submitSuccessful"], exportAs: ["rxapForm"] }, { kind: "directive", type: i8.FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]" }, { kind: "directive", type: i8.FormSubmittingDirective, selector: "[rxapFormSubmitting]" }, { kind: "directive", type: i8.FormControlErrorDirective, selector: "[rxapFormControlError]", inputs: ["rxapFormControlErrorFrom", "rxapFormControlErrorIf"] }, { kind: "directive", type: i8.FormControlMarkDirtyDirective, selector: "[rxapFormControlMarkDirty]" }, { kind: "component", type: i9.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], animations: [
203
- fadeAnimation
204
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginComponent, decorators: [{
206
- type: Component,
207
- args: [{ selector: 'rxap-login', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
208
- LoginFormProviders,
209
- {
210
- provide: ErrorStateMatcher,
211
- useClass: ShowOnDirtyErrorStateMatcher
212
- }
213
- ], animations: [
214
- fadeAnimation
215
- ], template: "<form rxapForm class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" #form=\"rxapForm\" fxLayoutGap=\"32px\" [@fadeAnimation]=\"'in'\"\n novalidate>\n\n <div class=\"header\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFlex=\"nogrow\">\n\n <mat-icon fxFlex=\"nogrow\" color=\"primary\" class=\"avatar-icon\">account_circle</mat-icon>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <mat-form-field class=\"email-input\">\n <mat-icon matPrefix inline>email</mat-icon>\n <mat-label i18n>Email</mat-label>\n <input matInput\n i18n-placeholder\n placeholder=\"Enter your email address\"\n type=\"email\"\n fxFlex=\"nogrow\"\n formControlName=\"email\">\n <mat-error *rxapFormControlError=\"let error from 'email'; if: 'required'\">\n Email is <strong>required</strong>\n </mat-error>\n <mat-error *rxapFormControlError=\"let error from 'email'; if: 'email'\">\n Please enter a valid email address\n </mat-error>\n </mat-form-field>\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n>Password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your password\"\n fxFlex=\"nogrow\"\n #passwordInput\n formControlName=\"password\">\n <mat-error *rxapFormControlError=\"let error from 'password'; if: 'required'\">\n Password is <strong>required</strong>\n </mat-error>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'password'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'test'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'text'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n </div>\n\n <div class=\"sub-controls\" fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"16px\">\n\n <mat-checkbox class=\"remember-input\" fxFlex=\"nogrow\" formControlName=\"remember\">Remember me</mat-checkbox>\n\n <div fxFlex=\"nogrow\"\n matTooltip=\"Please enter a valid email address\"\n matTooltipPosition=\"above\"\n [matTooltipDisabled]=\"form.control.controls.email.valid\">\n <button color=\"accent\"\n type=\"button\"\n mat-button\n (click)=\"requestPasswordReset(form.value.email)\"\n [disabled]=\"!form.value.email || form.control.controls.email.hasError('email')\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"space-between center\">\n <mat-progress-spinner *ngIf=\"requestingPasswordReset$ | async\" mode=\"indeterminate\" [diameter]=\"15\"></mat-progress-spinner>\n <span fxFlex=\"nogrow\">Password forgotten</span>\n </span>\n </button>\n </div>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button mat-raised-button color=\"primary\" type=\"submit\" rxapFormControlMarkDirty>Login</button>\n </div>\n\n </div>\n\n </div>\n\n <div *rxapFormSubmitFailed=\"let error\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-error>{{ error.message }}</mat-error>\n </div>\n\n <mat-progress-bar *rxapFormSubmitting mode=\"indeterminate\" class=\"loading-bar\"></mat-progress-bar>\n\n</form>\n", styles: [".inner{padding:48px;position:relative;margin:16px 0}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px}.inner .content{width:304px;max-width:calc(100vw - 112px)}.inner .content .email-input,.inner .content .password-input{width:100%}.inner .content .email-input .prefix-icon,.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .email-input ::ng-deep .mat-form-field-prefix,.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:128px;text-transform:uppercase}.inner .sub-controls>*{margin-bottom:8px}.inner .loading-bar{position:absolute;inset:auto 0 0}\n"] }]
216
- }], ctorParameters: function () {
217
- return [{ type: i2.RxapAuthenticationService, decorators: [{
218
- type: Inject,
219
- args: [RxapAuthenticationService]
220
- }] }, { type: i14.MatSnackBar, decorators: [{
221
- type: Inject,
222
- args: [MatSnackBar]
223
- }] }];
224
- } });
225
-
226
- class LoginComponentModule {
227
- }
228
- LoginComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
- LoginComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: LoginComponentModule, declarations: [LoginComponent], imports: [CommonModule,
230
- FlexLayoutModule,
231
- MatButtonModule,
232
- MatCardModule,
233
- MatSnackBarModule,
234
- MatProgressSpinnerModule,
235
- MatInputModule,
236
- ReactiveFormsModule,
237
- RxapFormsModule,
238
- MatCheckboxModule,
239
- MatIconModule,
240
- MatTooltipModule,
241
- MatProgressBarModule], exports: [LoginComponent] });
242
- LoginComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginComponentModule, imports: [CommonModule,
243
- FlexLayoutModule,
244
- MatButtonModule,
245
- MatCardModule,
246
- MatSnackBarModule,
247
- MatProgressSpinnerModule,
248
- MatInputModule,
249
- ReactiveFormsModule,
250
- RxapFormsModule,
251
- MatCheckboxModule,
252
- MatIconModule,
253
- MatTooltipModule,
254
- MatProgressBarModule] });
255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoginComponentModule, decorators: [{
256
- type: NgModule,
257
- args: [{
258
- declarations: [LoginComponent],
259
- imports: [
260
- CommonModule,
261
- FlexLayoutModule,
262
- MatButtonModule,
263
- MatCardModule,
264
- MatSnackBarModule,
265
- MatProgressSpinnerModule,
266
- MatInputModule,
267
- ReactiveFormsModule,
268
- RxapFormsModule,
269
- MatCheckboxModule,
270
- MatIconModule,
271
- MatTooltipModule,
272
- MatProgressBarModule
273
- ],
274
- exports: [LoginComponent]
275
- }]
276
- }] });
277
-
278
- class AuthenticationContainerComponent {
279
- prepareRoute(outlet) {
280
- return outlet.isActivated ? outlet.activatedRoute : 'true';
281
- }
282
- }
283
- AuthenticationContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
284
- AuthenticationContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: AuthenticationContainerComponent, selector: "rxap-authentication-container", host: { classAttribute: "rxap-authentication-container" }, ngImport: i0, template: "<div class=\"container\" [@routeAnimations]=\"prepareRoute(outlet)\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n <ng-content></ng-content>\n\n</div>\n", styles: [".container{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;overflow-x:hidden}.container .split{position:absolute;top:0;left:0;right:0;bottom:65vh;z-index:-10}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [
285
- trigger('routeAnimations', [
286
- transition(':enter', [
287
- style({ opacity: 0 }),
288
- animate('512ms', style({ opacity: 1 }))
289
- ]),
290
- transition(':leave', [
291
- style({ opacity: 1 }),
292
- animate('512ms', style({ opacity: 0 }))
293
- ])
294
- ])
295
- ] });
296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationContainerComponent, decorators: [{
297
- type: Component,
298
- args: [{ selector: 'rxap-authentication-container', host: { class: 'rxap-authentication-container' }, animations: [
299
- trigger('routeAnimations', [
300
- transition(':enter', [
301
- style({ opacity: 0 }),
302
- animate('512ms', style({ opacity: 1 }))
303
- ]),
304
- transition(':leave', [
305
- style({ opacity: 1 }),
306
- animate('512ms', style({ opacity: 0 }))
307
- ])
308
- ])
309
- ], template: "<div class=\"container\" [@routeAnimations]=\"prepareRoute(outlet)\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n <ng-content></ng-content>\n\n</div>\n", styles: [".container{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;overflow-x:hidden}.container .split{position:absolute;top:0;left:0;right:0;bottom:65vh;z-index:-10}\n"] }]
310
- }] });
311
-
312
- class AuthenticationContainerComponentModule {
313
- }
314
- AuthenticationContainerComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationContainerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
315
- AuthenticationContainerComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationContainerComponentModule, declarations: [AuthenticationContainerComponent], imports: [FlexLayoutModule,
316
- MatToolbarModule,
317
- RouterModule], exports: [AuthenticationContainerComponent] });
318
- AuthenticationContainerComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationContainerComponentModule, imports: [FlexLayoutModule,
319
- MatToolbarModule,
320
- RouterModule] });
321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: AuthenticationContainerComponentModule, decorators: [{
322
- type: NgModule,
323
- args: [{
324
- declarations: [AuthenticationContainerComponent],
325
- exports: [AuthenticationContainerComponent],
326
- imports: [
327
- FlexLayoutModule,
328
- MatToolbarModule,
329
- RouterModule
330
- ]
331
- }]
332
- }] });
333
-
334
- const RXAP_RESET_PASSWORD_FORM = 'rxap-reset-password';
335
- class ResetPasswordFormSubmitMethod {
336
- constructor(route, authentication, snackBar, router) {
337
- this.route = route;
338
- this.authentication = authentication;
339
- this.snackBar = snackBar;
340
- this.router = router;
341
- }
342
- call(value) {
343
- return this.route.params
344
- .pipe(take(1), map((params) => params.token), switchMap((token) => this.authentication.sendPasswordReset(value.password, token)), tap((result) => {
345
- if (result) {
346
- this.snackBar.open('Password reset was successful.', undefined, {
347
- duration: 3500,
348
- });
349
- return this.router.navigate(['/']);
350
- }
351
- return Promise.resolve();
352
- }))
353
- .toPromise();
354
- }
355
- }
356
- ResetPasswordFormSubmitMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordFormSubmitMethod, deps: [{ token: ActivatedRoute }, { token: RxapAuthenticationService }, { token: MatSnackBar }, { token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
357
- ResetPasswordFormSubmitMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordFormSubmitMethod });
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordFormSubmitMethod, decorators: [{
359
- type: Injectable
360
- }], ctorParameters: function () {
361
- return [{ type: i1$1.ActivatedRoute, decorators: [{
362
- type: Inject,
363
- args: [ActivatedRoute]
364
- }] }, { type: i2.RxapAuthenticationService, decorators: [{
365
- type: Inject,
366
- args: [RxapAuthenticationService]
367
- }] }, { type: i14.MatSnackBar, decorators: [{
368
- type: Inject,
369
- args: [MatSnackBar]
370
- }] }, { type: i1$1.Router, decorators: [{
371
- type: Inject,
372
- args: [Router]
373
- }] }];
374
- } });
375
- let ResetPasswordForm = class ResetPasswordForm {
376
- passwordEqual() {
377
- if (this.password.value !== this.passwordRepeat.value) {
378
- return { equal: 'passwords are not equal' };
379
- }
380
- return null;
381
- }
382
- resetRepeat() {
383
- this.passwordRepeat.reset();
384
- }
385
- };
386
- ResetPasswordForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordForm, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
387
- ResetPasswordForm.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordForm });
388
- __decorate([
389
- UseFormControl({
390
- validators: [Validators.required],
391
- }),
392
- __metadata("design:type", RxapFormControl)
393
- ], ResetPasswordForm.prototype, "password", void 0);
394
- __decorate([
395
- UseFormControl({
396
- validators: [Validators.required],
397
- }),
398
- __metadata("design:type", RxapFormControl)
399
- ], ResetPasswordForm.prototype, "passwordRepeat", void 0);
400
- __decorate([
401
- ControlValidator('passwordRepeat'),
402
- __metadata("design:type", Function),
403
- __metadata("design:paramtypes", []),
404
- __metadata("design:returntype", void 0)
405
- ], ResetPasswordForm.prototype, "passwordEqual", null);
406
- __decorate([
407
- ControlSetValue('password'),
408
- __metadata("design:type", Function),
409
- __metadata("design:paramtypes", []),
410
- __metadata("design:returntype", void 0)
411
- ], ResetPasswordForm.prototype, "resetRepeat", null);
412
- ResetPasswordForm = __decorate([
413
- RxapForm({
414
- id: RXAP_RESET_PASSWORD_FORM,
415
- })
416
- ], ResetPasswordForm);
417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordForm, decorators: [{
418
- type: Injectable
419
- }], propDecorators: { password: [], passwordRepeat: [], passwordEqual: [], resetRepeat: [] } });
420
- const ResetPasswordFormProviders = [
421
- ResetPasswordForm,
422
- {
423
- provide: RXAP_FORM_DEFINITION_BUILDER,
424
- useFactory: (injector) => new RxapFormBuilder(ResetPasswordForm, injector),
425
- deps: [INJECTOR],
426
- },
427
- {
428
- provide: RXAP_FORM_DEFINITION,
429
- useFactory: (builder) => builder.build(),
430
- deps: [RXAP_FORM_DEFINITION_BUILDER],
431
- },
432
- {
433
- provide: RXAP_FORM_SUBMIT_METHOD,
434
- useClass: ResetPasswordFormSubmitMethod,
435
- },
436
- ];
437
-
438
- class ResetPasswordComponent {
439
- }
440
- ResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
441
- ResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: ResetPasswordComponent, selector: "rxap-reset-password", providers: [
442
- ResetPasswordFormProviders,
443
- {
444
- provide: ErrorStateMatcher,
445
- useClass: ShowOnDirtyErrorStateMatcher
446
- }
447
- ], ngImport: i0, template: "<form rxapForm class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" #form=\"rxapForm\" fxLayoutGap=\"32px\" novalidate\n [@fadeAnimation]=\"'in'\">\n\n <div class=\"header\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFlex=\"nogrow\">\n\n <mat-icon fxFlex=\"nogrow\" color=\"primary\" class=\"avatar-icon\">vpn_key</mat-icon>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n>New password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your new password\"\n fxFlex=\"nogrow\"\n #passwordInput\n formControlName=\"password\">\n <mat-error *rxapFormControlError=\"let error from 'password'; if: 'required'\">\n Password is <strong>required</strong>\n </mat-error>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'password'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'test'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'text'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n>Repeat password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your new password again\"\n fxFlex=\"nogrow\"\n #passwordRepeatInput\n formControlName=\"passwordRepeat\">\n <mat-error *rxapFormControlError=\"let error from 'passwordRepeat'; if: 'required'\">\n Password is <strong>required</strong>\n </mat-error>\n <mat-error *rxapFormControlError=\"let error from 'passwordRepeat'; if: 'equal'\">\n Entered password are <strong>not equal</strong>\n </mat-error>\n <button tabIndex=\"-1\"\n matSuffix\n *ngIf=\"passwordRepeatInput.type === 'password'\"\n mat-icon-button\n type=\"button\"\n (click)=\"passwordRepeatInput.type = 'text'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\"\n matSuffix\n *ngIf=\"passwordRepeatInput.type === 'text'\"\n mat-icon-button\n type=\"button\"\n (click)=\"passwordRepeatInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button mat-raised-button color=\"primary\" type=\"submit\" rxapFormControlMarkDirty>Reset password</button>\n </div>\n\n </div>\n\n </div>\n\n <div *rxapFormSubmitFailed=\"let error\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-error>{{ error.message }}</mat-error>\n </div>\n\n <mat-progress-bar *rxapFormSubmitting mode=\"indeterminate\" class=\"loading-bar\"></mat-progress-bar>\n\n</form>\n", styles: [".inner{padding:48px;position:relative;margin:16px 0}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px}.inner .content{width:304px;max-width:calc(100vw - 112px)}.inner .content .password-input{width:100%}.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:256px;text-transform:uppercase}.inner .loading-bar{position:absolute;inset:auto 0 0}\n"], dependencies: [{ kind: "directive", type: i2$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i8.FormDirective, selector: "form[rxapForm]:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: ["initial", "rxapForm", "submitMethod"], outputs: ["ngSubmit", "rxapSubmit", "invalidSubmit", "submitSuccessful"], exportAs: ["rxapForm"] }, { kind: "directive", type: i8.FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]" }, { kind: "directive", type: i8.FormSubmittingDirective, selector: "[rxapFormSubmitting]" }, { kind: "directive", type: i8.FormControlErrorDirective, selector: "[rxapFormControlError]", inputs: ["rxapFormControlErrorFrom", "rxapFormControlErrorIf"] }, { kind: "directive", type: i8.FormControlMarkDirtyDirective, selector: "[rxapFormControlMarkDirty]" }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], animations: [
448
- fadeAnimation
449
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordComponent, decorators: [{
451
- type: Component,
452
- args: [{ selector: 'rxap-reset-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
453
- ResetPasswordFormProviders,
454
- {
455
- provide: ErrorStateMatcher,
456
- useClass: ShowOnDirtyErrorStateMatcher
457
- }
458
- ], animations: [
459
- fadeAnimation
460
- ], template: "<form rxapForm class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" #form=\"rxapForm\" fxLayoutGap=\"32px\" novalidate\n [@fadeAnimation]=\"'in'\">\n\n <div class=\"header\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFlex=\"nogrow\">\n\n <mat-icon fxFlex=\"nogrow\" color=\"primary\" class=\"avatar-icon\">vpn_key</mat-icon>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n>New password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your new password\"\n fxFlex=\"nogrow\"\n #passwordInput\n formControlName=\"password\">\n <mat-error *rxapFormControlError=\"let error from 'password'; if: 'required'\">\n Password is <strong>required</strong>\n </mat-error>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'password'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'test'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\" matSuffix *ngIf=\"passwordInput.type === 'text'\" mat-icon-button type=\"button\" (click)=\"passwordInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"password-input\">\n <mat-icon matPrefix inline>vpn_key</mat-icon>\n <mat-label i18n>Repeat password</mat-label>\n <input matInput\n type=\"password\"\n i18n-placeholder\n placeholder=\"Enter your new password again\"\n fxFlex=\"nogrow\"\n #passwordRepeatInput\n formControlName=\"passwordRepeat\">\n <mat-error *rxapFormControlError=\"let error from 'passwordRepeat'; if: 'required'\">\n Password is <strong>required</strong>\n </mat-error>\n <mat-error *rxapFormControlError=\"let error from 'passwordRepeat'; if: 'equal'\">\n Entered password are <strong>not equal</strong>\n </mat-error>\n <button tabIndex=\"-1\"\n matSuffix\n *ngIf=\"passwordRepeatInput.type === 'password'\"\n mat-icon-button\n type=\"button\"\n (click)=\"passwordRepeatInput.type = 'text'\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button tabIndex=\"-1\"\n matSuffix\n *ngIf=\"passwordRepeatInput.type === 'text'\"\n mat-icon-button\n type=\"button\"\n (click)=\"passwordRepeatInput.type = 'password'\">\n <mat-icon>visibility_off</mat-icon>\n </button>\n </mat-form-field>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button mat-raised-button color=\"primary\" type=\"submit\" rxapFormControlMarkDirty>Reset password</button>\n </div>\n\n </div>\n\n </div>\n\n <div *rxapFormSubmitFailed=\"let error\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-error>{{ error.message }}</mat-error>\n </div>\n\n <mat-progress-bar *rxapFormSubmitting mode=\"indeterminate\" class=\"loading-bar\"></mat-progress-bar>\n\n</form>\n", styles: [".inner{padding:48px;position:relative;margin:16px 0}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px}.inner .content{width:304px;max-width:calc(100vw - 112px)}.inner .content .password-input{width:100%}.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:256px;text-transform:uppercase}.inner .loading-bar{position:absolute;inset:auto 0 0}\n"] }]
461
- }] });
462
-
463
- class ResetPasswordComponentModule {
464
- }
465
- ResetPasswordComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
466
- ResetPasswordComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordComponentModule, declarations: [ResetPasswordComponent], imports: [MatCardModule,
467
- FlexLayoutModule,
468
- MatButtonModule,
469
- CommonModule,
470
- MatProgressSpinnerModule,
471
- MatInputModule,
472
- RxapFormsModule,
473
- MatIconModule,
474
- ReactiveFormsModule,
475
- MatProgressBarModule,
476
- MatSnackBarModule], exports: [ResetPasswordComponent] });
477
- ResetPasswordComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordComponentModule, imports: [MatCardModule,
478
- FlexLayoutModule,
479
- MatButtonModule,
480
- CommonModule,
481
- MatProgressSpinnerModule,
482
- MatInputModule,
483
- RxapFormsModule,
484
- MatIconModule,
485
- ReactiveFormsModule,
486
- MatProgressBarModule,
487
- MatSnackBarModule] });
488
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ResetPasswordComponentModule, decorators: [{
489
- type: NgModule,
490
- args: [{
491
- declarations: [
492
- ResetPasswordComponent
493
- ],
494
- imports: [
495
- MatCardModule,
496
- FlexLayoutModule,
497
- MatButtonModule,
498
- CommonModule,
499
- MatProgressSpinnerModule,
500
- MatInputModule,
501
- RxapFormsModule,
502
- MatIconModule,
503
- ReactiveFormsModule,
504
- MatProgressBarModule,
505
- MatSnackBarModule,
506
- ],
507
- exports: [
508
- ResetPasswordComponent
509
- ]
510
- }]
511
- }] });
512
-
513
- class LoadingComponent {
514
- constructor(authentication, router) {
515
- this.authentication = authentication;
516
- this.router = router;
517
- }
518
- ngOnInit() {
519
- // TODO : remove the concept of isAuthenticated$
520
- if (this.authentication.isAuthenticated$) {
521
- this.subscription = this.authentication.isAuthenticated$
522
- .pipe(filter((isAuthenticated) => isAuthenticated !== null), tap(() => this.router.navigate(['/', 'authentication', 'login'])))
523
- .subscribe();
524
- }
525
- }
526
- ngOnDestroy() {
527
- var _a;
528
- (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
529
- }
530
- }
531
- LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoadingComponent, deps: [{ token: RxapAuthenticationService }, { token: Router }], target: i0.ɵɵFactoryTarget.Component });
532
- LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.2", type: LoadingComponent, selector: "rxap-auth-loading", host: { classAttribute: "rxap-auth-loading" }, ngImport: i0, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [".loading-bar{position:absolute;bottom:65vh;left:0;right:0;top:auto}\n"], dependencies: [{ kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
533
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoadingComponent, decorators: [{
534
- type: Component,
535
- args: [{ selector: 'rxap-auth-loading', host: { class: 'rxap-auth-loading' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [".loading-bar{position:absolute;bottom:65vh;left:0;right:0;top:auto}\n"] }]
536
- }], ctorParameters: function () {
537
- return [{ type: i2.RxapAuthenticationService, decorators: [{
538
- type: Inject,
539
- args: [RxapAuthenticationService]
540
- }] }, { type: i1$1.Router, decorators: [{
541
- type: Inject,
542
- args: [Router]
543
- }] }];
544
- } });
545
-
546
- class LoadingComponentModule {
547
- }
548
- LoadingComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoadingComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
549
- LoadingComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: LoadingComponentModule, declarations: [LoadingComponent], imports: [MatProgressBarModule], exports: [LoadingComponent] });
550
- LoadingComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoadingComponentModule, imports: [MatProgressBarModule] });
551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: LoadingComponentModule, decorators: [{
552
- type: NgModule,
553
- args: [{
554
- declarations: [
555
- LoadingComponent
556
- ],
557
- imports: [
558
- MatProgressBarModule
559
- ],
560
- exports: [
561
- LoadingComponent
562
- ]
563
- }]
564
- }] });
565
-
566
- class RxapAuthenticationModule {
567
- }
568
- RxapAuthenticationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
569
- RxapAuthenticationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationModule, exports: [LoginComponentModule,
570
- AuthenticationContainerComponentModule,
571
- ResetPasswordComponentModule,
572
- LoadingComponentModule] });
573
- RxapAuthenticationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationModule, imports: [LoginComponentModule,
574
- AuthenticationContainerComponentModule,
575
- ResetPasswordComponentModule,
576
- LoadingComponentModule] });
577
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RxapAuthenticationModule, decorators: [{
578
- type: NgModule,
579
- args: [{
580
- exports: [
581
- LoginComponentModule,
582
- AuthenticationContainerComponentModule,
583
- ResetPasswordComponentModule,
584
- LoadingComponentModule
585
- ]
586
- }]
587
- }] });
588
-
589
- const AuthenticationRoutes = [
590
- {
591
- path: 'authentication',
592
- component: AuthenticationContainerComponent,
593
- children: [
594
- {
595
- canActivate: [RxapAuthenticationGuard],
596
- path: 'login',
597
- component: LoginComponent
598
- },
599
- {
600
- canActivate: [RxapAuthenticationGuard],
601
- path: 'reset-password/:token',
602
- component: ResetPasswordComponent
603
- },
604
- {
605
- path: 'loading',
606
- component: LoadingComponent
607
- },
608
- {
609
- path: '**',
610
- redirectTo: 'login'
611
- }
612
- ]
613
- }
614
- ];
615
-
616
- /**
617
- * Generated bundle index. Do not edit.
618
- */
619
-
620
- export { AuthenticationContainerComponent, AuthenticationContainerComponentModule, AuthenticationRoutes, LoadingComponent, LoadingComponentModule, LoginComponent, LoginComponentModule, LoginForm, LoginFormProviders, LoginFormSubmitMethod, LoginFormSubmitSuccessful, ResetPasswordComponent, ResetPasswordComponentModule, RxapAuthenticationModule, fadeAnimation };
621
- //# sourceMappingURL=rxap-authentication-components.mjs.map