@rxap/authentication 12.1.5 → 13.0.0-next.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 (92) hide show
  1. package/_theming.scss +1 -1
  2. package/components/README.md +3 -0
  3. package/components/package.json +5 -5
  4. package/esm2020/components/lib/authentication-container/authentication-container.component.mjs +38 -0
  5. package/esm2020/components/lib/authentication-container/authentication-container.component.module.mjs +30 -0
  6. package/esm2020/components/lib/authentication.module.mjs +29 -0
  7. package/esm2020/components/lib/fade-animation.mjs +14 -0
  8. package/esm2020/components/lib/loading/loading.component.mjs +38 -0
  9. package/esm2020/components/lib/loading/loading.component.module.mjs +26 -0
  10. package/esm2020/components/lib/login/login.component.mjs +84 -0
  11. package/esm2020/components/lib/login/login.component.module.mjs +70 -0
  12. package/esm2020/components/lib/login/login.form.mjs +115 -0
  13. package/esm2020/components/lib/reset-password/reset-password.component.mjs +39 -0
  14. package/esm2020/components/lib/reset-password/reset-password.component.module.mjs +66 -0
  15. package/esm2020/components/lib/reset-password/reset-password.form.mjs +115 -0
  16. package/esm2020/components/lib/routes.mjs +32 -0
  17. package/esm2020/components/public_api.mjs +13 -0
  18. package/esm2020/components/rxap-authentication-components.mjs +5 -0
  19. package/esm2020/index.mjs +8 -0
  20. package/esm2020/lib/authentication-routing.service.mjs +46 -0
  21. package/esm2020/lib/authentication.guard.mjs +110 -0
  22. package/esm2020/lib/authentication.service.mjs +72 -0
  23. package/esm2020/lib/register.service.mjs +18 -0
  24. package/esm2020/lib/sign-out.directive.mjs +48 -0
  25. package/esm2020/lib/tokens.mjs +3 -0
  26. package/esm2020/lib/user.service.mjs +16 -0
  27. package/esm2020/rxap-authentication.mjs +5 -0
  28. package/fesm2015/rxap-authentication-components.mjs +629 -0
  29. package/fesm2015/rxap-authentication-components.mjs.map +1 -0
  30. package/fesm2015/{rxap-authentication.js → rxap-authentication.mjs} +52 -48
  31. package/fesm2015/rxap-authentication.mjs.map +1 -0
  32. package/{fesm2015/rxap-authentication-components.js → fesm2020/rxap-authentication-components.mjs} +82 -111
  33. package/fesm2020/rxap-authentication-components.mjs.map +1 -0
  34. package/fesm2020/rxap-authentication.mjs +298 -0
  35. package/fesm2020/rxap-authentication.mjs.map +1 -0
  36. package/package.json +49 -25
  37. package/src/schematics/ng-add/index.js +1 -1
  38. package/src/schematics/ng-add/index.js.map +1 -1
  39. package/bundles/rxap-authentication-components.umd.js +0 -1030
  40. package/bundles/rxap-authentication-components.umd.js.map +0 -1
  41. package/bundles/rxap-authentication.umd.js +0 -697
  42. package/bundles/rxap-authentication.umd.js.map +0 -1
  43. package/esm2015/components/lib/authentication-container/authentication-container.component.js +0 -44
  44. package/esm2015/components/lib/authentication-container/authentication-container.component.js.map +0 -1
  45. package/esm2015/components/lib/authentication-container/authentication-container.component.module.js +0 -30
  46. package/esm2015/components/lib/authentication-container/authentication-container.component.module.js.map +0 -1
  47. package/esm2015/components/lib/authentication.module.js +0 -29
  48. package/esm2015/components/lib/authentication.module.js.map +0 -1
  49. package/esm2015/components/lib/fade-animation.js +0 -14
  50. package/esm2015/components/lib/fade-animation.js.map +0 -1
  51. package/esm2015/components/lib/loading/loading.component.js +0 -45
  52. package/esm2015/components/lib/loading/loading.component.js.map +0 -1
  53. package/esm2015/components/lib/loading/loading.component.module.js +0 -26
  54. package/esm2015/components/lib/loading/loading.component.module.js.map +0 -1
  55. package/esm2015/components/lib/login/login.component.js +0 -94
  56. package/esm2015/components/lib/login/login.component.js.map +0 -1
  57. package/esm2015/components/lib/login/login.component.module.js +0 -70
  58. package/esm2015/components/lib/login/login.component.module.js.map +0 -1
  59. package/esm2015/components/lib/login/login.form.js +0 -115
  60. package/esm2015/components/lib/login/login.form.js.map +0 -1
  61. package/esm2015/components/lib/reset-password/reset-password.component.js +0 -46
  62. package/esm2015/components/lib/reset-password/reset-password.component.js.map +0 -1
  63. package/esm2015/components/lib/reset-password/reset-password.component.module.js +0 -66
  64. package/esm2015/components/lib/reset-password/reset-password.component.module.js.map +0 -1
  65. package/esm2015/components/lib/reset-password/reset-password.form.js +0 -115
  66. package/esm2015/components/lib/reset-password/reset-password.form.js.map +0 -1
  67. package/esm2015/components/lib/routes.js +0 -32
  68. package/esm2015/components/lib/routes.js.map +0 -1
  69. package/esm2015/components/public_api.js +0 -13
  70. package/esm2015/components/public_api.js.map +0 -1
  71. package/esm2015/components/rxap-authentication-components.js +0 -5
  72. package/esm2015/components/rxap-authentication-components.js.map +0 -1
  73. package/esm2015/index.js +0 -8
  74. package/esm2015/index.js.map +0 -1
  75. package/esm2015/lib/authentication-routing.service.js +0 -46
  76. package/esm2015/lib/authentication-routing.service.js.map +0 -1
  77. package/esm2015/lib/authentication.guard.js +0 -113
  78. package/esm2015/lib/authentication.guard.js.map +0 -1
  79. package/esm2015/lib/authentication.service.js +0 -77
  80. package/esm2015/lib/authentication.service.js.map +0 -1
  81. package/esm2015/lib/register.service.js +0 -18
  82. package/esm2015/lib/register.service.js.map +0 -1
  83. package/esm2015/lib/sign-out.directive.js +0 -51
  84. package/esm2015/lib/sign-out.directive.js.map +0 -1
  85. package/esm2015/lib/tokens.js +0 -3
  86. package/esm2015/lib/tokens.js.map +0 -1
  87. package/esm2015/lib/user.service.js +0 -16
  88. package/esm2015/lib/user.service.js.map +0 -1
  89. package/esm2015/rxap-authentication.js +0 -5
  90. package/esm2015/rxap-authentication.js.map +0 -1
  91. package/fesm2015/rxap-authentication-components.js.map +0 -1
  92. package/fesm2015/rxap-authentication.js.map +0 -1
@@ -1,115 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Injectable, INJECTOR, Inject, } from '@angular/core';
3
- import { RxapAuthenticationService } from '@rxap/authentication';
4
- import { RxapFormBuilder, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_DEFINITION, RxapForm, UseFormControl, RxapFormControl, RXAP_FORM_SUBMIT_METHOD, RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD, } from '@rxap/forms';
5
- import { Validators } from '@angular/forms';
6
- import { ConfigService } from '@rxap/config';
7
- import { Router } from '@angular/router';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@rxap/config";
10
- import * as i2 from "@rxap/authentication";
11
- import * as i3 from "@angular/router";
12
- let LoginForm = class LoginForm {
13
- constructor(config) {
14
- this.config = config;
15
- this.loading = true;
16
- this.loginFailed = false;
17
- }
18
- rxapOnInit() {
19
- const email = this.config.get('authentication.default.email');
20
- if (email) {
21
- this.email.setValue(email);
22
- }
23
- const password = this.config.get('authentication.default.password');
24
- if (password) {
25
- this.password.setValue(password);
26
- }
27
- }
28
- };
29
- LoginForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginForm, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
30
- LoginForm.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginForm });
31
- __decorate([
32
- UseFormControl({
33
- validators: [Validators.required, Validators.email],
34
- }),
35
- __metadata("design:type", RxapFormControl)
36
- ], LoginForm.prototype, "email", void 0);
37
- __decorate([
38
- UseFormControl({
39
- validators: [Validators.required],
40
- }),
41
- __metadata("design:type", RxapFormControl)
42
- ], LoginForm.prototype, "password", void 0);
43
- __decorate([
44
- UseFormControl({
45
- state: true,
46
- }),
47
- __metadata("design:type", RxapFormControl)
48
- ], LoginForm.prototype, "remember", void 0);
49
- LoginForm = __decorate([
50
- RxapForm({
51
- id: 'rxap-login',
52
- providers: [
53
- {
54
- provide: ConfigService,
55
- useExisting: ConfigService,
56
- },
57
- ],
58
- }),
59
- __metadata("design:paramtypes", [ConfigService])
60
- ], LoginForm);
61
- export { LoginForm };
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginForm, decorators: [{
63
- type: Injectable
64
- }], ctorParameters: function () { return [{ type: i1.ConfigService }]; }, propDecorators: { email: [], password: [], remember: [] } });
65
- export class LoginFormSubmitMethod {
66
- constructor(authentication) {
67
- this.authentication = authentication;
68
- }
69
- call(value) {
70
- return this.authentication.signInWithEmailAndPassword(value.email, value.password, value.remember);
71
- }
72
- }
73
- LoginFormSubmitMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginFormSubmitMethod, deps: [{ token: i2.RxapAuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
74
- LoginFormSubmitMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginFormSubmitMethod });
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginFormSubmitMethod, decorators: [{
76
- type: Injectable
77
- }], ctorParameters: function () { return [{ type: i2.RxapAuthenticationService }]; } });
78
- export class LoginFormSubmitSuccessful {
79
- constructor(router) {
80
- this.router = router;
81
- }
82
- call() {
83
- return this.router.navigate(['/']);
84
- }
85
- }
86
- LoginFormSubmitSuccessful.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginFormSubmitSuccessful, deps: [{ token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
87
- LoginFormSubmitSuccessful.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginFormSubmitSuccessful });
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: LoginFormSubmitSuccessful, decorators: [{
89
- type: Injectable
90
- }], ctorParameters: function () { return [{ type: i3.Router, decorators: [{
91
- type: Inject,
92
- args: [Router]
93
- }] }]; } });
94
- export const LoginFormProviders = [
95
- LoginForm,
96
- {
97
- provide: RXAP_FORM_DEFINITION_BUILDER,
98
- useFactory: (injector) => new RxapFormBuilder(LoginForm, injector),
99
- deps: [INJECTOR],
100
- },
101
- {
102
- provide: RXAP_FORM_DEFINITION,
103
- useFactory: (builder) => builder.build(),
104
- deps: [RXAP_FORM_DEFINITION_BUILDER],
105
- },
106
- {
107
- provide: RXAP_FORM_SUBMIT_METHOD,
108
- useClass: LoginFormSubmitMethod,
109
- },
110
- {
111
- provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,
112
- useClass: LoginFormSubmitSuccessful,
113
- },
114
- ];
115
- //# sourceMappingURL=login.form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"login.form.js","sourceRoot":"","sources":["../../../../../../../libs/authentication/components/src/lib/login/login.form.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n Injectable,\n Provider,\n Injector,\n INJECTOR,\n Inject,\n} from '@angular/core';\nimport { RxapAuthenticationService } from '@rxap/authentication';\nimport {\n RxapFormBuilder,\n RXAP_FORM_DEFINITION_BUILDER,\n RXAP_FORM_DEFINITION,\n FormDefinition,\n RxapForm,\n UseFormControl,\n RxapFormControl,\n RxapFormGroup,\n FormSubmitMethod,\n RXAP_FORM_SUBMIT_METHOD,\n FormSubmitSuccessfulMethod,\n RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n FormType,\n} from '@rxap/forms';\nimport { Validators } from '@angular/forms';\nimport { ConfigService } from '@rxap/config';\nimport { RxapOnInit } from '@rxap/utilities';\nimport { Router } from '@angular/router';\n\nexport interface ILoginForm {\n email: string;\n password: string;\n}\n\n@RxapForm({\n id: 'rxap-login',\n providers: [\n {\n provide: ConfigService,\n useExisting: ConfigService,\n },\n ],\n})\n@Injectable()\nexport class LoginForm implements FormType<ILoginForm>, RxapOnInit {\n public rxapFormGroup!: RxapFormGroup;\n\n public loading = true;\n public loginFailed = false;\n\n @UseFormControl({\n validators: [Validators.required, Validators.email],\n })\n public email!: RxapFormControl<string>;\n\n @UseFormControl({\n validators: [Validators.required],\n })\n public password!: RxapFormControl;\n\n @UseFormControl({\n state: true,\n })\n public remember!: RxapFormControl;\n\n constructor(public readonly config: ConfigService<any>) {}\n\n public rxapOnInit() {\n const email = this.config.get<string>('authentication.default.email');\n if (email) {\n this.email.setValue(email);\n }\n const password = this.config.get<string>('authentication.default.password');\n if (password) {\n this.password.setValue(password);\n }\n }\n}\n\n@Injectable()\nexport class LoginFormSubmitMethod implements FormSubmitMethod<any> {\n constructor(private readonly authentication: RxapAuthenticationService) {}\n\n public call(value: {\n email: string;\n password: string;\n remember: boolean;\n }): Promise<any> {\n return this.authentication.signInWithEmailAndPassword(\n value.email,\n value.password,\n value.remember\n );\n }\n}\n\n@Injectable()\nexport class LoginFormSubmitSuccessful\n implements FormSubmitSuccessfulMethod<any>\n{\n constructor(\n @Inject(Router)\n private readonly router: Router\n ) {}\n\n public call(): Promise<any> {\n return this.router.navigate(['/']);\n }\n}\n\nexport const LoginFormProviders: Provider[] = [\n LoginForm,\n {\n provide: RXAP_FORM_DEFINITION_BUILDER,\n useFactory: (injector: Injector) =>\n new RxapFormBuilder<ILoginForm>(LoginForm, injector),\n deps: [INJECTOR],\n },\n {\n provide: RXAP_FORM_DEFINITION,\n useFactory: (builder: RxapFormBuilder) => builder.build(),\n deps: [RXAP_FORM_DEFINITION_BUILDER],\n },\n {\n provide: RXAP_FORM_SUBMIT_METHOD,\n useClass: LoginFormSubmitMethod,\n },\n {\n provide: RXAP_FORM_SUBMIT_SUCCESSFUL_METHOD,\n useClass: LoginFormSubmitSuccessful,\n },\n];\n"]}
@@ -1,46 +0,0 @@
1
- import { Component, ChangeDetectionStrategy } from '@angular/core';
2
- import { ResetPasswordFormProviders } from './reset-password.form';
3
- import { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@angular/material/core';
4
- import { fadeAnimation } from '../fade-animation';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@angular/material/icon";
7
- import * as i2 from "@angular/material/form-field";
8
- import * as i3 from "@angular/material/button";
9
- import * as i4 from "@angular/material/progress-bar";
10
- import * as i5 from "@rxap/forms";
11
- import * as i6 from "@angular/forms";
12
- import * as i7 from "@angular/flex-layout/flex";
13
- import * as i8 from "@angular/material/input";
14
- import * as i9 from "@angular/common";
15
- export class ResetPasswordComponent {
16
- }
17
- ResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- ResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ResetPasswordComponent, selector: "rxap-reset-password", providers: [
19
- ResetPasswordFormProviders,
20
- {
21
- provide: ErrorStateMatcher,
22
- useClass: ShowOnDirtyErrorStateMatcher
23
- }
24
- ], 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 - 96px - 16px)}.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}"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], 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.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], directives: [{ type: i5.FormDirective, selector: "form:not([formGroup]):not([ngForm]),rxap-form,form[rxapForm]", inputs: ["initial", "rxapForm", "submitMethod"], outputs: ["ngSubmit", "rxapSubmit", "invalidSubmit"], exportAs: ["rxapForm"] }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.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: i7.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: i7.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: i7.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.MatPrefix, selector: "[matPrefix]" }, { type: i2.MatLabel, selector: "mat-label" }, { type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5.FormControlErrorDirective, selector: "[rxapFormControlError]", inputs: ["rxapFormControlErrorFrom", "rxapFormControlErrorIf"] }, { type: i2.MatError, selector: "mat-error", inputs: ["id"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i5.FormControlMarkDirtyDirective, selector: "[rxapFormControlMarkDirty]" }, { type: i5.FormSubmitFailedDirective, selector: "[rxapFormSubmitFailed]" }, { type: i5.FormSubmittingDirective, selector: "[rxapFormSubmitting]" }], animations: [
25
- fadeAnimation
26
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordComponent, decorators: [{
28
- type: Component,
29
- args: [{
30
- selector: 'rxap-reset-password',
31
- templateUrl: './reset-password.component.html',
32
- styleUrls: ['./reset-password.component.scss'],
33
- changeDetection: ChangeDetectionStrategy.OnPush,
34
- providers: [
35
- ResetPasswordFormProviders,
36
- {
37
- provide: ErrorStateMatcher,
38
- useClass: ShowOnDirtyErrorStateMatcher
39
- }
40
- ],
41
- animations: [
42
- fadeAnimation
43
- ]
44
- }]
45
- }] });
46
- //# sourceMappingURL=reset-password.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reset-password.component.js","sourceRoot":"","sources":["../../../../../../../libs/authentication/components/src/lib/reset-password/reset-password.component.ts","../../../../../../../libs/authentication/components/src/lib/reset-password/reset-password.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;;;;;;;;;;AAkBlD,MAAM,OAAO,sBAAsB;;mHAAtB,sBAAsB;uGAAtB,sBAAsB,8CAXhB;QACf,0BAA0B;QAC1B;YACE,OAAO,EAAG,iBAAiB;YAC3B,QAAQ,EAAE,4BAA4B;SACvC;KACF,0BCtBH,+uHAuFA,q8KDhEmB;QACf,aAAa;KACd;2FAEU,sBAAsB;kBAhBlC,SAAS;mBAAC;oBACT,QAAQ,EAAS,qBAAqB;oBACtC,WAAW,EAAM,iCAAiC;oBAClD,SAAS,EAAQ,CAAE,iCAAiC,CAAE;oBACtD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAQ;wBACf,0BAA0B;wBAC1B;4BACE,OAAO,EAAG,iBAAiB;4BAC3B,QAAQ,EAAE,4BAA4B;yBACvC;qBACF;oBACD,UAAU,EAAO;wBACf,aAAa;qBACd;iBACF","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { ResetPasswordFormProviders } from './reset-password.form';\nimport {\n ErrorStateMatcher,\n ShowOnDirtyErrorStateMatcher\n} from '@angular/material/core';\nimport { fadeAnimation } from '../fade-animation';\n\n@Component({\n selector: 'rxap-reset-password',\n templateUrl: './reset-password.component.html',\n styleUrls: [ './reset-password.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n ResetPasswordFormProviders,\n {\n provide: ErrorStateMatcher,\n useClass: ShowOnDirtyErrorStateMatcher\n }\n ],\n animations: [\n fadeAnimation\n ]\n})\nexport class ResetPasswordComponent {}\n","<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"]}
@@ -1,66 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { ResetPasswordComponent } from './reset-password.component';
3
- import { FlexLayoutModule } from '@angular/flex-layout';
4
- import { CommonModule } from '@angular/common';
5
- import { MatCardModule } from '@angular/material/card';
6
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
7
- import { MatButtonModule } from '@angular/material/button';
8
- import { MatInputModule } from '@angular/material/input';
9
- import { RxapFormsModule } from '@rxap/forms';
10
- import { MatIconModule } from '@angular/material/icon';
11
- import { ReactiveFormsModule } from '@angular/forms';
12
- import { MatProgressBarModule } from '@angular/material/progress-bar';
13
- import { MatSnackBarModule } from '@angular/material/snack-bar';
14
- import * as i0 from "@angular/core";
15
- export class ResetPasswordComponentModule {
16
- }
17
- ResetPasswordComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
18
- ResetPasswordComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordComponentModule, declarations: [ResetPasswordComponent], imports: [MatCardModule,
19
- FlexLayoutModule,
20
- MatButtonModule,
21
- CommonModule,
22
- MatProgressSpinnerModule,
23
- MatInputModule,
24
- RxapFormsModule,
25
- MatIconModule,
26
- ReactiveFormsModule,
27
- MatProgressBarModule,
28
- MatSnackBarModule], exports: [ResetPasswordComponent] });
29
- ResetPasswordComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordComponentModule, imports: [[
30
- MatCardModule,
31
- FlexLayoutModule,
32
- MatButtonModule,
33
- CommonModule,
34
- MatProgressSpinnerModule,
35
- MatInputModule,
36
- RxapFormsModule,
37
- MatIconModule,
38
- ReactiveFormsModule,
39
- MatProgressBarModule,
40
- MatSnackBarModule,
41
- ]] });
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordComponentModule, decorators: [{
43
- type: NgModule,
44
- args: [{
45
- declarations: [
46
- ResetPasswordComponent
47
- ],
48
- imports: [
49
- MatCardModule,
50
- FlexLayoutModule,
51
- MatButtonModule,
52
- CommonModule,
53
- MatProgressSpinnerModule,
54
- MatInputModule,
55
- RxapFormsModule,
56
- MatIconModule,
57
- ReactiveFormsModule,
58
- MatProgressBarModule,
59
- MatSnackBarModule,
60
- ],
61
- exports: [
62
- ResetPasswordComponent
63
- ]
64
- }]
65
- }] });
66
- //# sourceMappingURL=reset-password.component.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reset-password.component.module.js","sourceRoot":"","sources":["../../../../../../../libs/authentication/components/src/lib/reset-password/reset-password.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;;AAwBhE,MAAM,OAAO,4BAA4B;;yHAA5B,4BAA4B;0HAA5B,4BAA4B,iBAnBrC,sBAAsB,aAGtB,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,YAAY;QACZ,wBAAwB;QACxB,cAAc;QACd,eAAe;QACf,aAAa;QACb,mBAAmB;QACnB,oBAAoB;QACpB,iBAAiB,aAGjB,sBAAsB;0HAGb,4BAA4B,YAjBzB;YACZ,aAAa;YACb,gBAAgB;YAChB,eAAe;YACf,YAAY;YACZ,wBAAwB;YACxB,cAAc;YACd,eAAe;YACf,aAAa;YACb,mBAAmB;YACnB,oBAAoB;YACpB,iBAAiB;SAClB;2FAKU,4BAA4B;kBArBxC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,sBAAsB;qBACvB;oBACD,OAAO,EAAO;wBACZ,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBACf,YAAY;wBACZ,wBAAwB;wBACxB,cAAc;wBACd,eAAe;wBACf,aAAa;wBACb,mBAAmB;wBACnB,oBAAoB;wBACpB,iBAAiB;qBAClB;oBACD,OAAO,EAAO;wBACZ,sBAAsB;qBACvB;iBACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { ResetPasswordComponent } from './reset-password.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { RxapFormsModule } from '@rxap/forms';\nimport { MatIconModule } from '@angular/material/icon';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\n\n\n@NgModule({\n declarations: [\n ResetPasswordComponent\n ],\n imports: [\n MatCardModule,\n FlexLayoutModule,\n MatButtonModule,\n CommonModule,\n MatProgressSpinnerModule,\n MatInputModule,\n RxapFormsModule,\n MatIconModule,\n ReactiveFormsModule,\n MatProgressBarModule,\n MatSnackBarModule,\n ],\n exports: [\n ResetPasswordComponent\n ]\n})\nexport class ResetPasswordComponentModule {}\n"]}
@@ -1,115 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Injectable, INJECTOR, Inject, } from '@angular/core';
3
- import { RxapAuthenticationService } from '@rxap/authentication';
4
- import { ActivatedRoute, Router } from '@angular/router';
5
- import { map, switchMap, tap, take } from 'rxjs/operators';
6
- import { UseFormControl, RxapFormBuilder, RXAP_FORM_DEFINITION_BUILDER, RXAP_FORM_DEFINITION, RxapForm, RxapFormControl, RXAP_FORM_SUBMIT_METHOD, ControlSetValue, ControlValidator, } from '@rxap/forms';
7
- import { Validators } from '@angular/forms';
8
- import { MatSnackBar } from '@angular/material/snack-bar';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "@angular/router";
11
- import * as i2 from "@rxap/authentication";
12
- import * as i3 from "@angular/material/snack-bar";
13
- export const RXAP_RESET_PASSWORD_FORM = 'rxap-reset-password';
14
- export class ResetPasswordFormSubmitMethod {
15
- constructor(route, authentication, snackBar, router) {
16
- this.route = route;
17
- this.authentication = authentication;
18
- this.snackBar = snackBar;
19
- this.router = router;
20
- }
21
- call(value) {
22
- return this.route.params
23
- .pipe(take(1), map((params) => params.token), switchMap((token) => this.authentication.sendPasswordReset(value.password, token)), tap((result) => {
24
- if (result) {
25
- this.snackBar.open('Password reset was successful.', undefined, {
26
- duration: 3500,
27
- });
28
- return this.router.navigate(['/']);
29
- }
30
- return Promise.resolve();
31
- }))
32
- .toPromise();
33
- }
34
- }
35
- ResetPasswordFormSubmitMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordFormSubmitMethod, deps: [{ token: ActivatedRoute }, { token: RxapAuthenticationService }, { token: MatSnackBar }, { token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
36
- ResetPasswordFormSubmitMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordFormSubmitMethod });
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordFormSubmitMethod, decorators: [{
38
- type: Injectable
39
- }], ctorParameters: function () { return [{ type: i1.ActivatedRoute, decorators: [{
40
- type: Inject,
41
- args: [ActivatedRoute]
42
- }] }, { type: i2.RxapAuthenticationService, decorators: [{
43
- type: Inject,
44
- args: [RxapAuthenticationService]
45
- }] }, { type: i3.MatSnackBar, decorators: [{
46
- type: Inject,
47
- args: [MatSnackBar]
48
- }] }, { type: i1.Router, decorators: [{
49
- type: Inject,
50
- args: [Router]
51
- }] }]; } });
52
- let ResetPasswordForm = class ResetPasswordForm {
53
- passwordEqual() {
54
- if (this.password.value !== this.passwordRepeat.value) {
55
- return { equal: 'passwords are not equal' };
56
- }
57
- return null;
58
- }
59
- resetRepeat() {
60
- this.passwordRepeat.reset();
61
- }
62
- };
63
- ResetPasswordForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordForm, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
64
- ResetPasswordForm.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordForm });
65
- __decorate([
66
- UseFormControl({
67
- validators: [Validators.required],
68
- }),
69
- __metadata("design:type", RxapFormControl)
70
- ], ResetPasswordForm.prototype, "password", void 0);
71
- __decorate([
72
- UseFormControl({
73
- validators: [Validators.required],
74
- }),
75
- __metadata("design:type", RxapFormControl)
76
- ], ResetPasswordForm.prototype, "passwordRepeat", void 0);
77
- __decorate([
78
- ControlValidator('passwordRepeat'),
79
- __metadata("design:type", Function),
80
- __metadata("design:paramtypes", []),
81
- __metadata("design:returntype", void 0)
82
- ], ResetPasswordForm.prototype, "passwordEqual", null);
83
- __decorate([
84
- ControlSetValue('password'),
85
- __metadata("design:type", Function),
86
- __metadata("design:paramtypes", []),
87
- __metadata("design:returntype", void 0)
88
- ], ResetPasswordForm.prototype, "resetRepeat", null);
89
- ResetPasswordForm = __decorate([
90
- RxapForm({
91
- id: RXAP_RESET_PASSWORD_FORM,
92
- })
93
- ], ResetPasswordForm);
94
- export { ResetPasswordForm };
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ResetPasswordForm, decorators: [{
96
- type: Injectable
97
- }], propDecorators: { password: [], passwordRepeat: [], passwordEqual: [], resetRepeat: [] } });
98
- export const ResetPasswordFormProviders = [
99
- ResetPasswordForm,
100
- {
101
- provide: RXAP_FORM_DEFINITION_BUILDER,
102
- useFactory: (injector) => new RxapFormBuilder(ResetPasswordForm, injector),
103
- deps: [INJECTOR],
104
- },
105
- {
106
- provide: RXAP_FORM_DEFINITION,
107
- useFactory: (builder) => builder.build(),
108
- deps: [RXAP_FORM_DEFINITION_BUILDER],
109
- },
110
- {
111
- provide: RXAP_FORM_SUBMIT_METHOD,
112
- useClass: ResetPasswordFormSubmitMethod,
113
- },
114
- ];
115
- //# sourceMappingURL=reset-password.form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reset-password.form.js","sourceRoot":"","sources":["../../../../../../../libs/authentication/components/src/lib/reset-password/reset-password.form.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n Injectable,\n Provider,\n Injector,\n INJECTOR,\n Inject,\n} from '@angular/core';\nimport { RxapAuthenticationService } from '@rxap/authentication';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { map, switchMap, tap, take } from 'rxjs/operators';\nimport {\n UseFormControl,\n RxapFormBuilder,\n RXAP_FORM_DEFINITION_BUILDER,\n FormDefinition,\n RXAP_FORM_DEFINITION,\n RxapForm,\n RxapFormControl,\n RxapFormGroup,\n RXAP_FORM_SUBMIT_METHOD,\n FormSubmitMethod,\n ControlSetValue,\n ControlValidator,\n FormType,\n} from '@rxap/forms';\nimport { Validators } from '@angular/forms';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\nexport const RXAP_RESET_PASSWORD_FORM = 'rxap-reset-password';\n\n@Injectable()\nexport class ResetPasswordFormSubmitMethod implements FormSubmitMethod<any> {\n constructor(\n @Inject(ActivatedRoute)\n private readonly route: ActivatedRoute,\n @Inject(RxapAuthenticationService)\n private readonly authentication: RxapAuthenticationService,\n @Inject(MatSnackBar)\n private readonly snackBar: MatSnackBar,\n @Inject(Router)\n private readonly router: Router\n ) {}\n\n public call(value: { password: string }): boolean | Promise<boolean> {\n return this.route.params\n .pipe(\n take(1),\n map((params) => params.token),\n switchMap((token) =>\n this.authentication.sendPasswordReset(value.password, token)\n ),\n tap((result) => {\n if (result) {\n this.snackBar.open('Password reset was successful.', undefined, {\n duration: 3500,\n });\n return this.router.navigate(['/']);\n }\n return Promise.resolve();\n })\n )\n .toPromise();\n }\n}\n\nexport interface IResetPasswordForm {\n password: string;\n passwordRepeat: string;\n}\n\n@RxapForm({\n id: RXAP_RESET_PASSWORD_FORM,\n})\n@Injectable()\nexport class ResetPasswordForm implements FormType<IResetPasswordForm> {\n public rxapFormGroup!: RxapFormGroup;\n\n @UseFormControl({\n validators: [Validators.required],\n })\n public password!: RxapFormControl;\n\n @UseFormControl({\n validators: [Validators.required],\n })\n public passwordRepeat!: RxapFormControl;\n\n @ControlValidator('passwordRepeat')\n public passwordEqual() {\n if (this.password.value !== this.passwordRepeat.value) {\n return { equal: 'passwords are not equal' };\n }\n return null;\n }\n\n @ControlSetValue('password')\n public resetRepeat() {\n this.passwordRepeat.reset();\n }\n}\n\nexport const ResetPasswordFormProviders: Provider[] = [\n ResetPasswordForm,\n {\n provide: RXAP_FORM_DEFINITION_BUILDER,\n useFactory: (injector: Injector) =>\n new RxapFormBuilder<IResetPasswordForm>(ResetPasswordForm, injector),\n deps: [INJECTOR],\n },\n {\n provide: RXAP_FORM_DEFINITION,\n useFactory: (builder: RxapFormBuilder<IResetPasswordForm>) =>\n builder.build(),\n deps: [RXAP_FORM_DEFINITION_BUILDER],\n },\n {\n provide: RXAP_FORM_SUBMIT_METHOD,\n useClass: ResetPasswordFormSubmitMethod,\n },\n];\n"]}
@@ -1,32 +0,0 @@
1
- import { LoginComponent } from './login/login.component';
2
- import { AuthenticationContainerComponent } from './authentication-container/authentication-container.component';
3
- import { ResetPasswordComponent } from './reset-password/reset-password.component';
4
- import { LoadingComponent } from './loading/loading.component';
5
- import { RxapAuthenticationGuard } from '@rxap/authentication';
6
- export const AuthenticationRoutes = [
7
- {
8
- path: 'authentication',
9
- component: AuthenticationContainerComponent,
10
- children: [
11
- {
12
- canActivate: [RxapAuthenticationGuard],
13
- path: 'login',
14
- component: LoginComponent
15
- },
16
- {
17
- canActivate: [RxapAuthenticationGuard],
18
- path: 'reset-password/:token',
19
- component: ResetPasswordComponent
20
- },
21
- {
22
- path: 'loading',
23
- component: LoadingComponent
24
- },
25
- {
26
- path: '**',
27
- redirectTo: 'login'
28
- }
29
- ]
30
- }
31
- ];
32
- //# sourceMappingURL=routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../../../libs/authentication/components/src/lib/routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AACjH,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,CAAC,MAAM,oBAAoB,GAAW;IAC1C;QACE,IAAI,EAAO,gBAAgB;QAC3B,SAAS,EAAE,gCAAgC;QAC3C,QAAQ,EAAG;YACT;gBACE,WAAW,EAAE,CAAE,uBAAuB,CAAE;gBACxC,IAAI,EAAS,OAAO;gBACpB,SAAS,EAAI,cAAc;aAC5B;YACD;gBACE,WAAW,EAAE,CAAE,uBAAuB,CAAE;gBACxC,IAAI,EAAO,uBAAuB;gBAClC,SAAS,EAAE,sBAAsB;aAClC;YACD;gBACE,IAAI,EAAO,SAAS;gBACpB,SAAS,EAAE,gBAAgB;aAC5B;YACD;gBACE,IAAI,EAAQ,IAAI;gBAChB,UAAU,EAAE,OAAO;aACpB;SACF;KACF;CACF,CAAC","sourcesContent":["import { Routes } from '@angular/router';\nimport { LoginComponent } from './login/login.component';\nimport { AuthenticationContainerComponent } from './authentication-container/authentication-container.component';\nimport { ResetPasswordComponent } from './reset-password/reset-password.component';\nimport { LoadingComponent } from './loading/loading.component';\nimport { RxapAuthenticationGuard } from '@rxap/authentication';\n\nexport const AuthenticationRoutes: Routes = [\n {\n path: 'authentication',\n component: AuthenticationContainerComponent,\n children: [\n {\n canActivate: [ RxapAuthenticationGuard ],\n path: 'login',\n component: LoginComponent\n },\n {\n canActivate: [ RxapAuthenticationGuard ],\n path: 'reset-password/:token',\n component: ResetPasswordComponent\n },\n {\n path: 'loading',\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: 'login'\n }\n ]\n }\n];\n"]}
@@ -1,13 +0,0 @@
1
- export * from './lib/authentication.module';
2
- export * from './lib/login/login.form';
3
- export * from './lib/login/login.component';
4
- export * from './lib/login/login.form';
5
- export * from './lib/login/login.component.module';
6
- export * from './lib/routes';
7
- export * from './lib/loading/loading.component.module';
8
- export * from './lib/loading/loading.component';
9
- export * from './lib/reset-password/reset-password.component.module';
10
- export * from './lib/reset-password/reset-password.component';
11
- export * from './lib/authentication-container/authentication-container.component';
12
- export * from './lib/authentication-container/authentication-container.component.module';
13
- //# sourceMappingURL=public_api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../../../../libs/authentication/components/src/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC;AACnD,cAAc,cAAc,CAAC;AAC7B,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sDAAsD,CAAC;AACrE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mEAAmE,CAAC;AAClF,cAAc,0EAA0E,CAAC","sourcesContent":["export * from './lib/authentication.module';\nexport * from './lib/login/login.form';\nexport * from './lib/login/login.component';\nexport * from './lib/login/login.form';\nexport * from './lib/login/login.component.module';\nexport * from './lib/routes';\nexport * from './lib/loading/loading.component.module';\nexport * from './lib/loading/loading.component';\nexport * from './lib/reset-password/reset-password.component.module';\nexport * from './lib/reset-password/reset-password.component';\nexport * from './lib/authentication-container/authentication-container.component';\nexport * from './lib/authentication-container/authentication-container.component.module';\n"]}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public_api';
5
- //# sourceMappingURL=rxap-authentication-components.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-authentication-components.js","sourceRoot":"","sources":["../../../../../libs/authentication/components/src/rxap-authentication-components.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"]}
package/esm2015/index.js DELETED
@@ -1,8 +0,0 @@
1
- export * from './lib/authentication.guard';
2
- export * from './lib/authentication.service';
3
- export * from './lib/register.service';
4
- export * from './lib/user.service';
5
- export * from './lib/authentication-routing.service';
6
- export * from './lib/tokens';
7
- export * from './lib/sign-out.directive';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/authentication/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sCAAsC,CAAC;AACrD,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './lib/authentication.guard';\nexport * from './lib/authentication.service';\nexport * from './lib/register.service';\nexport * from './lib/user.service';\nexport * from './lib/authentication-routing.service';\nexport * from './lib/tokens';\nexport * from './lib/sign-out.directive';\n"]}
@@ -1,46 +0,0 @@
1
- import { Injectable, Inject, Optional } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { RxapAuthenticationService } from './authentication.service';
4
- import { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';
5
- import { tap } from 'rxjs/operators';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@angular/router";
8
- import * as i2 from "./authentication.service";
9
- export class AuthenticationRoutingService {
10
- constructor(router, authenticationService, deactivated = null) {
11
- this.router = router;
12
- this.authenticationService = authenticationService;
13
- this.deactivated = deactivated;
14
- if (!deactivated) {
15
- console.warn('Authentication is enabled');
16
- this.authenticationService.isAuthenticated$.pipe(tap(isAuthenticated => {
17
- if (isAuthenticated) {
18
- return this.router.navigate(['/']);
19
- }
20
- else {
21
- return this.router.navigate(['/', 'authentication', 'login']);
22
- }
23
- })).subscribe();
24
- }
25
- }
26
- }
27
- AuthenticationRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: AuthenticationRoutingService, deps: [{ token: Router }, { token: RxapAuthenticationService }, { token: RXAP_AUTHENTICATION_DEACTIVATED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
28
- AuthenticationRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: AuthenticationRoutingService, providedIn: 'root' });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: AuthenticationRoutingService, decorators: [{
30
- type: Injectable,
31
- args: [{
32
- providedIn: 'root'
33
- }]
34
- }], ctorParameters: function () { return [{ type: i1.Router, decorators: [{
35
- type: Inject,
36
- args: [Router]
37
- }] }, { type: i2.RxapAuthenticationService, decorators: [{
38
- type: Inject,
39
- args: [RxapAuthenticationService]
40
- }] }, { type: undefined, decorators: [{
41
- type: Optional
42
- }, {
43
- type: Inject,
44
- args: [RXAP_AUTHENTICATION_DEACTIVATED]
45
- }] }]; } });
46
- //# sourceMappingURL=authentication-routing.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authentication-routing.service.js","sourceRoot":"","sources":["../../../../../libs/authentication/src/lib/authentication-routing.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,MAAM,EACN,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;;;;AAKrC,MAAM,OAAO,4BAA4B;IAEvC,YAEmB,MAAc,EAEd,qBAAgD,EAGhD,cAA8B,IAAI;QALlC,WAAM,GAAN,MAAM,CAAQ;QAEd,0BAAqB,GAArB,qBAAqB,CAA2B;QAGhD,gBAAW,GAAX,WAAW,CAAuB;QAEnD,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YAC1C,IAAI,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,IAAI,CAC9C,GAAG,CAAC,eAAe,CAAC,EAAE;gBACpB,IAAI,eAAe,EAAE;oBACnB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC;iBACtC;qBAAM;oBACL,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAE,GAAG,EAAE,gBAAgB,EAAE,OAAO,CAAE,CAAC,CAAC;iBACjE;YACH,CAAC,CAAC,CACH,CAAC,SAAS,EAAE,CAAC;SACf;IACH,CAAC;;yHAvBU,4BAA4B,kBAG7B,MAAM,aAEN,yBAAyB,aAGzB,+BAA+B;6HAR9B,4BAA4B,cAF3B,MAAM;2FAEP,4BAA4B;kBAHxC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;0BAII,MAAM;2BAAC,MAAM;;0BAEb,MAAM;2BAAC,yBAAyB;;0BAEhC,QAAQ;;0BACR,MAAM;2BAAC,+BAA+B","sourcesContent":["import {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { RxapAuthenticationService } from './authentication.service';\nimport { RXAP_AUTHENTICATION_DEACTIVATED } from './tokens';\nimport { tap } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationRoutingService {\n\n constructor(\n @Inject(Router)\n private readonly router: Router,\n @Inject(RxapAuthenticationService)\n private readonly authenticationService: RxapAuthenticationService,\n @Optional()\n @Inject(RXAP_AUTHENTICATION_DEACTIVATED)\n private readonly deactivated: boolean | null = null\n ) {\n if (!deactivated) {\n console.warn('Authentication is enabled');\n this.authenticationService.isAuthenticated$.pipe(\n tap(isAuthenticated => {\n if (isAuthenticated) {\n return this.router.navigate([ '/' ]);\n } else {\n return this.router.navigate([ '/', 'authentication', 'login' ]);\n }\n })\n ).subscribe();\n }\n }\n\n}\n"]}