@rxap/authentication 13.0.0 → 14.0.1

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