@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.
- package/components/lib/authentication-container/authentication-container.component.d.ts +1 -1
- package/components/lib/loading/loading.component.d.ts +1 -1
- package/components/lib/loading/loading.component.module.d.ts +2 -2
- package/components/lib/login/login.component.d.ts +2 -2
- package/components/lib/login/login.component.module.d.ts +9 -9
- package/components/lib/reset-password/reset-password.component.d.ts +1 -1
- package/components/lib/reset-password/reset-password.component.module.d.ts +7 -7
- package/components/lib/reset-password/reset-password.form.d.ts +1 -1
- package/esm2022/components/lib/authentication-container/authentication-container.component.mjs +39 -0
- package/esm2022/components/lib/authentication-container/authentication-container.component.module.mjs +29 -0
- package/esm2022/components/lib/authentication.module.mjs +30 -0
- package/esm2022/components/lib/loading/loading.component.mjs +39 -0
- package/esm2022/components/lib/loading/loading.component.module.mjs +25 -0
- package/esm2022/components/lib/login/login.component.mjs +85 -0
- package/esm2022/components/lib/login/login.component.module.mjs +69 -0
- package/esm2022/components/lib/login/login.form.mjs +117 -0
- package/esm2022/components/lib/reset-password/reset-password.component.mjs +40 -0
- package/esm2022/components/lib/reset-password/reset-password.component.module.mjs +65 -0
- package/esm2022/components/lib/reset-password/reset-password.form.mjs +116 -0
- package/esm2022/lib/authentication-routing.service.mjs +47 -0
- package/esm2022/lib/authentication.guard.mjs +111 -0
- package/esm2022/lib/authentication.service.mjs +82 -0
- package/esm2022/lib/register.service.mjs +18 -0
- package/esm2022/lib/sign-out.directive.mjs +50 -0
- package/esm2022/lib/user.service.mjs +16 -0
- package/fesm2022/rxap-authentication-components.mjs +610 -0
- package/fesm2022/rxap-authentication-components.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/rxap-authentication.mjs +22 -25
- package/fesm2022/rxap-authentication.mjs.map +1 -0
- package/lib/authentication.guard.d.ts +2 -2
- package/lib/sign-out.directive.d.ts +1 -1
- package/package.json +30 -37
- package/esm2020/components/lib/authentication-container/authentication-container.component.mjs +0 -38
- package/esm2020/components/lib/authentication-container/authentication-container.component.module.mjs +0 -28
- package/esm2020/components/lib/authentication.module.mjs +0 -29
- package/esm2020/components/lib/loading/loading.component.mjs +0 -38
- package/esm2020/components/lib/loading/loading.component.module.mjs +0 -24
- package/esm2020/components/lib/login/login.component.mjs +0 -84
- package/esm2020/components/lib/login/login.component.module.mjs +0 -68
- package/esm2020/components/lib/login/login.form.mjs +0 -115
- package/esm2020/components/lib/reset-password/reset-password.component.mjs +0 -39
- package/esm2020/components/lib/reset-password/reset-password.component.module.mjs +0 -64
- package/esm2020/components/lib/reset-password/reset-password.form.mjs +0 -115
- package/esm2020/lib/authentication-routing.service.mjs +0 -46
- package/esm2020/lib/authentication.guard.mjs +0 -110
- package/esm2020/lib/authentication.service.mjs +0 -82
- package/esm2020/lib/register.service.mjs +0 -18
- package/esm2020/lib/sign-out.directive.mjs +0 -48
- package/esm2020/lib/user.service.mjs +0 -16
- package/fesm2015/rxap-authentication-components.mjs +0 -621
- package/fesm2015/rxap-authentication-components.mjs.map +0 -1
- package/fesm2015/rxap-authentication.mjs +0 -321
- package/fesm2015/rxap-authentication.mjs.map +0 -1
- package/fesm2020/rxap-authentication-components.mjs +0 -610
- package/fesm2020/rxap-authentication-components.mjs.map +0 -1
- package/fesm2020/rxap-authentication.mjs.map +0 -1
- /package/{esm2020 → esm2022}/components/lib/fade-animation.mjs +0 -0
- /package/{esm2020 → esm2022}/components/lib/routes.mjs +0 -0
- /package/{esm2020 → esm2022}/components/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/components/rxap-authentication-components.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/tokens.mjs +0 -0
- /package/{esm2020 → esm2022}/rxap-authentication.mjs +0 -0
|
@@ -0,0 +1,610 @@
|
|
|
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 } 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/legacy-snack-bar';
|
|
19
|
+
import { MatLegacySnackBar, MatLegacySnackBarModule } from '@angular/material/legacy-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/legacy-button';
|
|
23
|
+
import { MatLegacyButtonModule } from '@angular/material/legacy-button';
|
|
24
|
+
import * as i4 from '@angular/material/legacy-progress-spinner';
|
|
25
|
+
import { MatLegacyProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
|
|
26
|
+
import * as i5 from '@angular/material/legacy-form-field';
|
|
27
|
+
import * as i6 from '@angular/material/legacy-input';
|
|
28
|
+
import { MatLegacyInputModule } from '@angular/material/legacy-input';
|
|
29
|
+
import * as i9 from '@angular/material/legacy-checkbox';
|
|
30
|
+
import { MatLegacyCheckboxModule } from '@angular/material/legacy-checkbox';
|
|
31
|
+
import * as i10 from '@angular/material/icon';
|
|
32
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
33
|
+
import * as i11 from '@angular/material/legacy-tooltip';
|
|
34
|
+
import { MatLegacyTooltipModule } from '@angular/material/legacy-tooltip';
|
|
35
|
+
import * as i12 from '@angular/material/legacy-progress-bar';
|
|
36
|
+
import { MatLegacyProgressBarModule } from '@angular/material/legacy-progress-bar';
|
|
37
|
+
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
38
|
+
import { MatLegacyCardModule } from '@angular/material/legacy-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
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginForm, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
59
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginForm }); }
|
|
60
|
+
};
|
|
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: "16.0.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
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginFormSubmitMethod, deps: [{ token: i2.RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
102
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginFormSubmitMethod }); }
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.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
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginFormSubmitSuccessful, deps: [{ token: Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
115
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginFormSubmitSuccessful }); }
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", 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
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginComponent, deps: [{ token: RxapAuthenticationService }, { token: MatLegacySnackBar }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
191
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: LoginComponent, selector: "rxap-login", providers: [
|
|
192
|
+
LoginFormProviders,
|
|
193
|
+
{
|
|
194
|
+
provide: ErrorStateMatcher,
|
|
195
|
+
useClass: ShowOnDirtyErrorStateMatcher
|
|
196
|
+
}
|
|
197
|
+
], 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.MatLegacyButton, 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.MatLegacyProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i5.MatLegacyError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLegacyLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatLegacyPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i5.MatLegacySuffix, selector: "[matSuffix]" }, { kind: "directive", type: i6.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", 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.MatLegacyCheckbox, 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.MatLegacyTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i12.MatLegacyProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], animations: [
|
|
198
|
+
fadeAnimation
|
|
199
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
200
|
+
}
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", 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>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"] }]
|
|
212
|
+
}], ctorParameters: function () { return [{ type: i2.RxapAuthenticationService, decorators: [{
|
|
213
|
+
type: Inject,
|
|
214
|
+
args: [RxapAuthenticationService]
|
|
215
|
+
}] }, { type: i14.MatLegacySnackBar, decorators: [{
|
|
216
|
+
type: Inject,
|
|
217
|
+
args: [MatLegacySnackBar]
|
|
218
|
+
}] }]; } });
|
|
219
|
+
|
|
220
|
+
class LoginComponentModule {
|
|
221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
222
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: LoginComponentModule, declarations: [LoginComponent], imports: [CommonModule,
|
|
223
|
+
FlexLayoutModule,
|
|
224
|
+
MatLegacyButtonModule,
|
|
225
|
+
MatLegacyCardModule,
|
|
226
|
+
MatLegacySnackBarModule,
|
|
227
|
+
MatLegacyProgressSpinnerModule,
|
|
228
|
+
MatLegacyInputModule,
|
|
229
|
+
ReactiveFormsModule,
|
|
230
|
+
RxapFormsModule,
|
|
231
|
+
MatLegacyCheckboxModule,
|
|
232
|
+
MatIconModule,
|
|
233
|
+
MatLegacyTooltipModule,
|
|
234
|
+
MatLegacyProgressBarModule], exports: [LoginComponent] }); }
|
|
235
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginComponentModule, imports: [CommonModule,
|
|
236
|
+
FlexLayoutModule,
|
|
237
|
+
MatLegacyButtonModule,
|
|
238
|
+
MatLegacyCardModule,
|
|
239
|
+
MatLegacySnackBarModule,
|
|
240
|
+
MatLegacyProgressSpinnerModule,
|
|
241
|
+
MatLegacyInputModule,
|
|
242
|
+
ReactiveFormsModule,
|
|
243
|
+
RxapFormsModule,
|
|
244
|
+
MatLegacyCheckboxModule,
|
|
245
|
+
MatIconModule,
|
|
246
|
+
MatLegacyTooltipModule,
|
|
247
|
+
MatLegacyProgressBarModule] }); }
|
|
248
|
+
}
|
|
249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoginComponentModule, decorators: [{
|
|
250
|
+
type: NgModule,
|
|
251
|
+
args: [{
|
|
252
|
+
declarations: [LoginComponent],
|
|
253
|
+
imports: [
|
|
254
|
+
CommonModule,
|
|
255
|
+
FlexLayoutModule,
|
|
256
|
+
MatLegacyButtonModule,
|
|
257
|
+
MatLegacyCardModule,
|
|
258
|
+
MatLegacySnackBarModule,
|
|
259
|
+
MatLegacyProgressSpinnerModule,
|
|
260
|
+
MatLegacyInputModule,
|
|
261
|
+
ReactiveFormsModule,
|
|
262
|
+
RxapFormsModule,
|
|
263
|
+
MatLegacyCheckboxModule,
|
|
264
|
+
MatIconModule,
|
|
265
|
+
MatLegacyTooltipModule,
|
|
266
|
+
MatLegacyProgressBarModule
|
|
267
|
+
],
|
|
268
|
+
exports: [LoginComponent]
|
|
269
|
+
}]
|
|
270
|
+
}] });
|
|
271
|
+
|
|
272
|
+
class AuthenticationContainerComponent {
|
|
273
|
+
prepareRoute(outlet) {
|
|
274
|
+
return outlet.isActivated ? outlet.activatedRoute : 'true';
|
|
275
|
+
}
|
|
276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuthenticationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
277
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.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", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [
|
|
278
|
+
trigger('routeAnimations', [
|
|
279
|
+
transition(':enter', [
|
|
280
|
+
style({ opacity: 0 }),
|
|
281
|
+
animate('512ms', style({ opacity: 1 }))
|
|
282
|
+
]),
|
|
283
|
+
transition(':leave', [
|
|
284
|
+
style({ opacity: 1 }),
|
|
285
|
+
animate('512ms', style({ opacity: 0 }))
|
|
286
|
+
])
|
|
287
|
+
])
|
|
288
|
+
] }); }
|
|
289
|
+
}
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuthenticationContainerComponent, decorators: [{
|
|
291
|
+
type: Component,
|
|
292
|
+
args: [{ selector: 'rxap-authentication-container', host: { class: 'rxap-authentication-container' }, animations: [
|
|
293
|
+
trigger('routeAnimations', [
|
|
294
|
+
transition(':enter', [
|
|
295
|
+
style({ opacity: 0 }),
|
|
296
|
+
animate('512ms', style({ opacity: 1 }))
|
|
297
|
+
]),
|
|
298
|
+
transition(':leave', [
|
|
299
|
+
style({ opacity: 1 }),
|
|
300
|
+
animate('512ms', style({ opacity: 0 }))
|
|
301
|
+
])
|
|
302
|
+
])
|
|
303
|
+
], 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"] }]
|
|
304
|
+
}] });
|
|
305
|
+
|
|
306
|
+
class AuthenticationContainerComponentModule {
|
|
307
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuthenticationContainerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
308
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: AuthenticationContainerComponentModule, declarations: [AuthenticationContainerComponent], imports: [FlexLayoutModule,
|
|
309
|
+
MatToolbarModule,
|
|
310
|
+
RouterModule], exports: [AuthenticationContainerComponent] }); }
|
|
311
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuthenticationContainerComponentModule, imports: [FlexLayoutModule,
|
|
312
|
+
MatToolbarModule,
|
|
313
|
+
RouterModule] }); }
|
|
314
|
+
}
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AuthenticationContainerComponentModule, decorators: [{
|
|
316
|
+
type: NgModule,
|
|
317
|
+
args: [{
|
|
318
|
+
declarations: [AuthenticationContainerComponent],
|
|
319
|
+
exports: [AuthenticationContainerComponent],
|
|
320
|
+
imports: [
|
|
321
|
+
FlexLayoutModule,
|
|
322
|
+
MatToolbarModule,
|
|
323
|
+
RouterModule
|
|
324
|
+
]
|
|
325
|
+
}]
|
|
326
|
+
}] });
|
|
327
|
+
|
|
328
|
+
const RXAP_RESET_PASSWORD_FORM = 'rxap-reset-password';
|
|
329
|
+
class ResetPasswordFormSubmitMethod {
|
|
330
|
+
constructor(route, authentication, snackBar, router) {
|
|
331
|
+
this.route = route;
|
|
332
|
+
this.authentication = authentication;
|
|
333
|
+
this.snackBar = snackBar;
|
|
334
|
+
this.router = router;
|
|
335
|
+
}
|
|
336
|
+
call(value) {
|
|
337
|
+
return this.route.params
|
|
338
|
+
.pipe(take(1), map((params) => params.token), switchMap((token) => this.authentication.sendPasswordReset(value.password, token)), tap((result) => {
|
|
339
|
+
if (result) {
|
|
340
|
+
this.snackBar.open('Password reset was successful.', undefined, {
|
|
341
|
+
duration: 3500,
|
|
342
|
+
});
|
|
343
|
+
return this.router.navigate(['/']);
|
|
344
|
+
}
|
|
345
|
+
return Promise.resolve();
|
|
346
|
+
}))
|
|
347
|
+
.toPromise();
|
|
348
|
+
}
|
|
349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordFormSubmitMethod, deps: [{ token: ActivatedRoute }, { token: RxapAuthenticationService }, { token: MatLegacySnackBar }, { token: Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
350
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordFormSubmitMethod }); }
|
|
351
|
+
}
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordFormSubmitMethod, decorators: [{
|
|
353
|
+
type: Injectable
|
|
354
|
+
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute, decorators: [{
|
|
355
|
+
type: Inject,
|
|
356
|
+
args: [ActivatedRoute]
|
|
357
|
+
}] }, { type: i2.RxapAuthenticationService, decorators: [{
|
|
358
|
+
type: Inject,
|
|
359
|
+
args: [RxapAuthenticationService]
|
|
360
|
+
}] }, { type: i14.MatLegacySnackBar, decorators: [{
|
|
361
|
+
type: Inject,
|
|
362
|
+
args: [MatLegacySnackBar]
|
|
363
|
+
}] }, { type: i1$1.Router, decorators: [{
|
|
364
|
+
type: Inject,
|
|
365
|
+
args: [Router]
|
|
366
|
+
}] }]; } });
|
|
367
|
+
let ResetPasswordForm = class ResetPasswordForm {
|
|
368
|
+
passwordEqual() {
|
|
369
|
+
if (this.password.value !== this.passwordRepeat.value) {
|
|
370
|
+
return { equal: 'passwords are not equal' };
|
|
371
|
+
}
|
|
372
|
+
return null;
|
|
373
|
+
}
|
|
374
|
+
resetRepeat() {
|
|
375
|
+
this.passwordRepeat.reset();
|
|
376
|
+
}
|
|
377
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordForm, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
378
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordForm }); }
|
|
379
|
+
};
|
|
380
|
+
__decorate([
|
|
381
|
+
UseFormControl({
|
|
382
|
+
validators: [Validators.required],
|
|
383
|
+
}),
|
|
384
|
+
__metadata("design:type", RxapFormControl)
|
|
385
|
+
], ResetPasswordForm.prototype, "password", void 0);
|
|
386
|
+
__decorate([
|
|
387
|
+
UseFormControl({
|
|
388
|
+
validators: [Validators.required],
|
|
389
|
+
}),
|
|
390
|
+
__metadata("design:type", RxapFormControl)
|
|
391
|
+
], ResetPasswordForm.prototype, "passwordRepeat", void 0);
|
|
392
|
+
__decorate([
|
|
393
|
+
ControlValidator('passwordRepeat'),
|
|
394
|
+
__metadata("design:type", Function),
|
|
395
|
+
__metadata("design:paramtypes", []),
|
|
396
|
+
__metadata("design:returntype", void 0)
|
|
397
|
+
], ResetPasswordForm.prototype, "passwordEqual", null);
|
|
398
|
+
__decorate([
|
|
399
|
+
ControlSetValue('password'),
|
|
400
|
+
__metadata("design:type", Function),
|
|
401
|
+
__metadata("design:paramtypes", []),
|
|
402
|
+
__metadata("design:returntype", void 0)
|
|
403
|
+
], ResetPasswordForm.prototype, "resetRepeat", null);
|
|
404
|
+
ResetPasswordForm = __decorate([
|
|
405
|
+
RxapForm({
|
|
406
|
+
id: RXAP_RESET_PASSWORD_FORM,
|
|
407
|
+
})
|
|
408
|
+
], ResetPasswordForm);
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordForm, decorators: [{
|
|
410
|
+
type: Injectable
|
|
411
|
+
}], propDecorators: { password: [], passwordRepeat: [], passwordEqual: [], resetRepeat: [] } });
|
|
412
|
+
const ResetPasswordFormProviders = [
|
|
413
|
+
ResetPasswordForm,
|
|
414
|
+
{
|
|
415
|
+
provide: RXAP_FORM_DEFINITION_BUILDER,
|
|
416
|
+
useFactory: (injector) => new RxapFormBuilder(ResetPasswordForm, injector),
|
|
417
|
+
deps: [INJECTOR],
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
provide: RXAP_FORM_DEFINITION,
|
|
421
|
+
useFactory: (builder) => builder.build(),
|
|
422
|
+
deps: [RXAP_FORM_DEFINITION_BUILDER],
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
provide: RXAP_FORM_SUBMIT_METHOD,
|
|
426
|
+
useClass: ResetPasswordFormSubmitMethod,
|
|
427
|
+
},
|
|
428
|
+
];
|
|
429
|
+
|
|
430
|
+
class ResetPasswordComponent {
|
|
431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
432
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ResetPasswordComponent, selector: "rxap-reset-password", providers: [
|
|
433
|
+
ResetPasswordFormProviders,
|
|
434
|
+
{
|
|
435
|
+
provide: ErrorStateMatcher,
|
|
436
|
+
useClass: ShowOnDirtyErrorStateMatcher
|
|
437
|
+
}
|
|
438
|
+
], 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.MatLegacyButton, 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.MatLegacyError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLegacyLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatLegacyPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i5.MatLegacySuffix, selector: "[matSuffix]" }, { kind: "directive", type: i6.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", 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.MatLegacyProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], animations: [
|
|
439
|
+
fadeAnimation
|
|
440
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
441
|
+
}
|
|
442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordComponent, decorators: [{
|
|
443
|
+
type: Component,
|
|
444
|
+
args: [{ selector: 'rxap-reset-password', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
445
|
+
ResetPasswordFormProviders,
|
|
446
|
+
{
|
|
447
|
+
provide: ErrorStateMatcher,
|
|
448
|
+
useClass: ShowOnDirtyErrorStateMatcher
|
|
449
|
+
}
|
|
450
|
+
], animations: [
|
|
451
|
+
fadeAnimation
|
|
452
|
+
], 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"] }]
|
|
453
|
+
}] });
|
|
454
|
+
|
|
455
|
+
class ResetPasswordComponentModule {
|
|
456
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
457
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordComponentModule, declarations: [ResetPasswordComponent], imports: [MatLegacyCardModule,
|
|
458
|
+
FlexLayoutModule,
|
|
459
|
+
MatLegacyButtonModule,
|
|
460
|
+
CommonModule,
|
|
461
|
+
MatLegacyProgressSpinnerModule,
|
|
462
|
+
MatLegacyInputModule,
|
|
463
|
+
RxapFormsModule,
|
|
464
|
+
MatIconModule,
|
|
465
|
+
ReactiveFormsModule,
|
|
466
|
+
MatLegacyProgressBarModule,
|
|
467
|
+
MatLegacySnackBarModule], exports: [ResetPasswordComponent] }); }
|
|
468
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordComponentModule, imports: [MatLegacyCardModule,
|
|
469
|
+
FlexLayoutModule,
|
|
470
|
+
MatLegacyButtonModule,
|
|
471
|
+
CommonModule,
|
|
472
|
+
MatLegacyProgressSpinnerModule,
|
|
473
|
+
MatLegacyInputModule,
|
|
474
|
+
RxapFormsModule,
|
|
475
|
+
MatIconModule,
|
|
476
|
+
ReactiveFormsModule,
|
|
477
|
+
MatLegacyProgressBarModule,
|
|
478
|
+
MatLegacySnackBarModule] }); }
|
|
479
|
+
}
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ResetPasswordComponentModule, decorators: [{
|
|
481
|
+
type: NgModule,
|
|
482
|
+
args: [{
|
|
483
|
+
declarations: [
|
|
484
|
+
ResetPasswordComponent
|
|
485
|
+
],
|
|
486
|
+
imports: [
|
|
487
|
+
MatLegacyCardModule,
|
|
488
|
+
FlexLayoutModule,
|
|
489
|
+
MatLegacyButtonModule,
|
|
490
|
+
CommonModule,
|
|
491
|
+
MatLegacyProgressSpinnerModule,
|
|
492
|
+
MatLegacyInputModule,
|
|
493
|
+
RxapFormsModule,
|
|
494
|
+
MatIconModule,
|
|
495
|
+
ReactiveFormsModule,
|
|
496
|
+
MatLegacyProgressBarModule,
|
|
497
|
+
MatLegacySnackBarModule,
|
|
498
|
+
],
|
|
499
|
+
exports: [
|
|
500
|
+
ResetPasswordComponent
|
|
501
|
+
]
|
|
502
|
+
}]
|
|
503
|
+
}] });
|
|
504
|
+
|
|
505
|
+
class LoadingComponent {
|
|
506
|
+
constructor(authentication, router) {
|
|
507
|
+
this.authentication = authentication;
|
|
508
|
+
this.router = router;
|
|
509
|
+
}
|
|
510
|
+
ngOnInit() {
|
|
511
|
+
// TODO : remove the concept of isAuthenticated$
|
|
512
|
+
if (this.authentication.isAuthenticated$) {
|
|
513
|
+
this.subscription = this.authentication.isAuthenticated$
|
|
514
|
+
.pipe(filter((isAuthenticated) => isAuthenticated !== null), tap(() => this.router.navigate(['/', 'authentication', 'login'])))
|
|
515
|
+
.subscribe();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
ngOnDestroy() {
|
|
519
|
+
this.subscription?.unsubscribe();
|
|
520
|
+
}
|
|
521
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponent, deps: [{ token: RxapAuthenticationService }, { token: Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
522
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.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.MatLegacyProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
523
|
+
}
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
525
|
+
type: Component,
|
|
526
|
+
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"] }]
|
|
527
|
+
}], ctorParameters: function () { return [{ type: i2.RxapAuthenticationService, decorators: [{
|
|
528
|
+
type: Inject,
|
|
529
|
+
args: [RxapAuthenticationService]
|
|
530
|
+
}] }, { type: i1$1.Router, decorators: [{
|
|
531
|
+
type: Inject,
|
|
532
|
+
args: [Router]
|
|
533
|
+
}] }]; } });
|
|
534
|
+
|
|
535
|
+
class LoadingComponentModule {
|
|
536
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
537
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, declarations: [LoadingComponent], imports: [MatLegacyProgressBarModule], exports: [LoadingComponent] }); }
|
|
538
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, imports: [MatLegacyProgressBarModule] }); }
|
|
539
|
+
}
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: LoadingComponentModule, decorators: [{
|
|
541
|
+
type: NgModule,
|
|
542
|
+
args: [{
|
|
543
|
+
declarations: [
|
|
544
|
+
LoadingComponent
|
|
545
|
+
],
|
|
546
|
+
imports: [
|
|
547
|
+
MatLegacyProgressBarModule
|
|
548
|
+
],
|
|
549
|
+
exports: [
|
|
550
|
+
LoadingComponent
|
|
551
|
+
]
|
|
552
|
+
}]
|
|
553
|
+
}] });
|
|
554
|
+
|
|
555
|
+
class RxapAuthenticationModule {
|
|
556
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RxapAuthenticationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
557
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: RxapAuthenticationModule, exports: [LoginComponentModule,
|
|
558
|
+
AuthenticationContainerComponentModule,
|
|
559
|
+
ResetPasswordComponentModule,
|
|
560
|
+
LoadingComponentModule] }); }
|
|
561
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RxapAuthenticationModule, imports: [LoginComponentModule,
|
|
562
|
+
AuthenticationContainerComponentModule,
|
|
563
|
+
ResetPasswordComponentModule,
|
|
564
|
+
LoadingComponentModule] }); }
|
|
565
|
+
}
|
|
566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: RxapAuthenticationModule, decorators: [{
|
|
567
|
+
type: NgModule,
|
|
568
|
+
args: [{
|
|
569
|
+
exports: [
|
|
570
|
+
LoginComponentModule,
|
|
571
|
+
AuthenticationContainerComponentModule,
|
|
572
|
+
ResetPasswordComponentModule,
|
|
573
|
+
LoadingComponentModule
|
|
574
|
+
]
|
|
575
|
+
}]
|
|
576
|
+
}] });
|
|
577
|
+
|
|
578
|
+
const AuthenticationRoutes = [
|
|
579
|
+
{
|
|
580
|
+
path: 'authentication',
|
|
581
|
+
component: AuthenticationContainerComponent,
|
|
582
|
+
children: [
|
|
583
|
+
{
|
|
584
|
+
canActivate: [RxapAuthenticationGuard],
|
|
585
|
+
path: 'login',
|
|
586
|
+
component: LoginComponent
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
canActivate: [RxapAuthenticationGuard],
|
|
590
|
+
path: 'reset-password/:token',
|
|
591
|
+
component: ResetPasswordComponent
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
path: 'loading',
|
|
595
|
+
component: LoadingComponent
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
path: '**',
|
|
599
|
+
redirectTo: 'login'
|
|
600
|
+
}
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
];
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Generated bundle index. Do not edit.
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
export { AuthenticationContainerComponent, AuthenticationContainerComponentModule, AuthenticationRoutes, LoadingComponent, LoadingComponentModule, LoginComponent, LoginComponentModule, LoginForm, LoginFormProviders, LoginFormSubmitMethod, LoginFormSubmitSuccessful, ResetPasswordComponent, ResetPasswordComponentModule, RxapAuthenticationModule, fadeAnimation };
|
|
610
|
+
//# sourceMappingURL=rxap-authentication-components.mjs.map
|