@abp/ng.account 7.2.2 → 7.3.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +128 -2
  2. package/config/account-config.module.d.ts +8 -8
  3. package/config/enums/index.d.ts +1 -1
  4. package/config/enums/route-names.d.ts +8 -8
  5. package/config/index.d.ts +5 -5
  6. package/config/providers/index.d.ts +1 -1
  7. package/config/providers/route.provider.d.ts +8 -8
  8. package/config/public-api.d.ts +3 -3
  9. package/config/utils/factories.d.ts +2 -2
  10. package/{esm2020 → esm2022}/abp-ng.account.mjs +4 -4
  11. package/{esm2020 → esm2022}/config/abp-ng.account-config.mjs +4 -4
  12. package/esm2022/config/account-config.module.mjs +28 -0
  13. package/{esm2020 → esm2022}/config/enums/index.mjs +1 -1
  14. package/{esm2020 → esm2022}/config/enums/route-names.mjs +1 -1
  15. package/{esm2020 → esm2022}/config/providers/index.mjs +1 -1
  16. package/{esm2020 → esm2022}/config/providers/route.provider.mjs +49 -49
  17. package/{esm2020 → esm2022}/config/public-api.mjs +3 -3
  18. package/{esm2020 → esm2022}/config/utils/factories.mjs +10 -10
  19. package/esm2022/lib/account-routing.module.mjs +91 -0
  20. package/esm2022/lib/account.module.mjs +104 -0
  21. package/esm2022/lib/components/change-password/change-password.component.mjs +88 -0
  22. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +44 -0
  23. package/{esm2020 → esm2022}/lib/components/index.mjs +8 -8
  24. package/esm2022/lib/components/login/login.component.mjs +65 -0
  25. package/esm2022/lib/components/manage-profile/manage-profile.component.mjs +40 -0
  26. package/{esm2020 → esm2022}/lib/components/personal-settings/personal-settings-half-row.component.mjs +27 -26
  27. package/esm2022/lib/components/personal-settings/personal-settings.component.mjs +90 -0
  28. package/{esm2020 → esm2022}/lib/components/register/register.component.mjs +84 -83
  29. package/esm2022/lib/components/reset-password/reset-password.component.mjs +69 -0
  30. package/{esm2020 → esm2022}/lib/defaults/default-personal-settings-form-props.mjs +45 -45
  31. package/{esm2020 → esm2022}/lib/enums/components.mjs +1 -1
  32. package/{esm2020 → esm2022}/lib/enums/index.mjs +1 -1
  33. package/esm2022/lib/guards/authentication-flow.guard.mjs +21 -0
  34. package/esm2022/lib/guards/extensions.guard.mjs +28 -0
  35. package/{esm2020 → esm2022}/lib/guards/index.mjs +2 -2
  36. package/{esm2020 → esm2022}/lib/models/account.mjs +2 -2
  37. package/{esm2020 → esm2022}/lib/models/config-options.mjs +1 -1
  38. package/{esm2020 → esm2022}/lib/models/index.mjs +2 -2
  39. package/{esm2020 → esm2022}/lib/services/index.mjs +1 -1
  40. package/esm2022/lib/services/manage-profile.state.service.mjs +28 -0
  41. package/{esm2020 → esm2022}/lib/tokens/config-options.token.mjs +2 -2
  42. package/{esm2020 → esm2022}/lib/tokens/extensions.token.mjs +6 -6
  43. package/{esm2020 → esm2022}/lib/tokens/index.mjs +3 -3
  44. package/{esm2020 → esm2022}/lib/tokens/re-login-confirmation.token.mjs +2 -2
  45. package/{esm2020 → esm2022}/lib/utils/auth-utils.mjs +7 -7
  46. package/{esm2020 → esm2022}/lib/utils/factory-utils.mjs +6 -6
  47. package/{esm2020 → esm2022}/public-api.mjs +7 -7
  48. package/{fesm2015 → fesm2022}/abp-ng.account-config.mjs +75 -75
  49. package/{fesm2020 → fesm2022}/abp-ng.account-config.mjs.map +1 -1
  50. package/{fesm2020 → fesm2022}/abp-ng.account.mjs +646 -645
  51. package/fesm2022/abp-ng.account.mjs.map +1 -0
  52. package/index.d.ts +5 -5
  53. package/lib/account-routing.module.d.ts +7 -7
  54. package/lib/account.module.d.ts +24 -24
  55. package/lib/components/change-password/change-password.component.d.ts +24 -24
  56. package/lib/components/forgot-password/forgot-password.component.d.ts +14 -14
  57. package/lib/components/index.d.ts +8 -8
  58. package/lib/components/login/login.component.d.ts +24 -24
  59. package/lib/components/manage-profile/manage-profile.component.d.ts +18 -18
  60. package/lib/components/personal-settings/personal-settings-half-row.component.d.ts +13 -13
  61. package/lib/components/personal-settings/personal-settings.component.d.ts +30 -30
  62. package/lib/components/register/register.component.d.ts +26 -26
  63. package/lib/components/reset-password/reset-password.component.d.ts +22 -22
  64. package/lib/defaults/default-personal-settings-form-props.d.ts +3 -3
  65. package/lib/enums/components.d.ts +11 -11
  66. package/lib/enums/index.d.ts +1 -1
  67. package/lib/guards/authentication-flow.guard.d.ts +8 -10
  68. package/lib/guards/extensions.guard.d.ts +11 -11
  69. package/lib/guards/index.d.ts +2 -2
  70. package/lib/models/account.d.ts +14 -14
  71. package/lib/models/config-options.d.ts +11 -11
  72. package/lib/models/index.d.ts +2 -2
  73. package/lib/services/index.d.ts +1 -1
  74. package/lib/services/manage-profile.state.service.d.ts +29 -29
  75. package/lib/tokens/config-options.token.d.ts +3 -3
  76. package/lib/tokens/extensions.token.d.ts +9 -9
  77. package/lib/tokens/index.d.ts +3 -3
  78. package/lib/tokens/re-login-confirmation.token.d.ts +2 -2
  79. package/lib/utils/auth-utils.d.ts +2 -2
  80. package/lib/utils/factory-utils.d.ts +8 -8
  81. package/package.json +25 -19
  82. package/public-api.d.ts +7 -7
  83. package/esm2020/config/account-config.module.mjs +0 -27
  84. package/esm2020/lib/account-routing.module.mjs +0 -90
  85. package/esm2020/lib/account.module.mjs +0 -103
  86. package/esm2020/lib/components/change-password/change-password.component.mjs +0 -87
  87. package/esm2020/lib/components/forgot-password/forgot-password.component.mjs +0 -43
  88. package/esm2020/lib/components/login/login.component.mjs +0 -64
  89. package/esm2020/lib/components/manage-profile/manage-profile.component.mjs +0 -39
  90. package/esm2020/lib/components/personal-settings/personal-settings.component.mjs +0 -89
  91. package/esm2020/lib/components/reset-password/reset-password.component.mjs +0 -68
  92. package/esm2020/lib/guards/authentication-flow.guard.mjs +0 -21
  93. package/esm2020/lib/guards/extensions.guard.mjs +0 -27
  94. package/esm2020/lib/services/manage-profile.state.service.mjs +0 -27
  95. package/fesm2015/abp-ng.account-config.mjs.map +0 -1
  96. package/fesm2015/abp-ng.account.mjs +0 -726
  97. package/fesm2015/abp-ng.account.mjs.map +0 -1
  98. package/fesm2020/abp-ng.account-config.mjs +0 -90
  99. package/fesm2020/abp-ng.account.mjs.map +0 -1
@@ -1,221 +1,220 @@
1
1
  import * as i3$2 from '@abp/ng.core';
2
- import { InternalStore, ConfigStateService, RouterOutletComponent, ReplaceableRouteContainerComponent, AuthGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
2
+ import { InternalStore, AuthService, ConfigStateService, RouterOutletComponent, ReplaceableRouteContainerComponent, AuthGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
3
3
  import * as i2$1 from '@abp/ng.theme.shared';
4
4
  import { getPasswordValidators, Confirmation, fadeIn, ThemeSharedModule } from '@abp/ng.theme.shared';
5
5
  import * as i0 from '@angular/core';
6
- import { Component, InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
6
+ import { Component, InjectionToken, Injectable, Inject, inject, NgModule } from '@angular/core';
7
7
  import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
8
8
  import * as i6 from '@ngx-validate/core';
9
9
  import { comparePasswords, NgxValidateCoreModule } from '@ngx-validate/core';
10
10
  import * as i3$1 from '@angular/router';
11
- import { ActivatedRoute, RouterModule } from '@angular/router';
11
+ import { ActivatedRoute, mapToCanActivate, RouterModule } from '@angular/router';
12
12
  import * as i2 from '@abp/ng.account.core/proxy';
13
13
  import * as i1 from '@angular/forms';
14
14
  import { Validators, UntypedFormControl } from '@angular/forms';
15
- import { finalize, catchError, filter, switchMap, map, tap, mapTo } from 'rxjs/operators';
15
+ import { finalize, catchError, filter, switchMap, map, tap } from 'rxjs/operators';
16
16
  import * as i3 from '@angular/common';
17
17
  import { throwError } from 'rxjs';
18
18
  import { trigger, transition, useAnimation } from '@angular/animations';
19
19
  import * as i4 from '@abp/ng.theme.shared/extensions';
20
20
  import { EXTENSIONS_FORM_PROP, EXTENSIBLE_FORM_VIEW_PROVIDER, FormProp, FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps, UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
21
21
 
22
- class ForgotPasswordComponent {
23
- constructor(fb, accountService) {
24
- this.fb = fb;
25
- this.accountService = accountService;
26
- this.isEmailSent = false;
27
- this.form = this.fb.group({
28
- email: ['', [Validators.required, Validators.email]],
29
- });
30
- }
31
- onSubmit() {
32
- if (this.form.invalid)
33
- return;
34
- this.inProgress = true;
35
- this.accountService
36
- .sendPasswordResetCode({
37
- email: this.form.get('email')?.value,
38
- appName: 'Angular',
39
- })
40
- .pipe(finalize(() => (this.inProgress = false)))
41
- .subscribe(() => {
42
- this.isEmailSent = true;
43
- });
44
- }
45
- }
46
- ForgotPasswordComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }], target: i0.ɵɵFactoryTarget.Component });
47
- ForgotPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ForgotPasswordComponent, selector: "abp-forgot-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isEmailSent; else emailSentTemplate\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::SendPasswordResetLink_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <abp-button\r\n class=\"d-block\"\r\n buttonClass=\"mt-2 mb-3 btn btn-primary btn-block\"\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n <a routerLink=\"/account/login\"\r\n ><i class=\"fa fa-long-arrow-left me-1\"></i>{{ 'AbpAccount::Login' | abpLocalization }}</a\r\n >\r\n</form>\r\n\r\n<ng-template #emailSentTemplate>\r\n <p>\r\n {{ 'AbpAccount::PasswordResetMailSentMessage' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary btn-block\">\r\n <i class=\"fa fa-long-arrow-left me-1\"></i>\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
49
- type: Component,
50
- args: [{ selector: 'abp-forgot-password', template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isEmailSent; else emailSentTemplate\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::SendPasswordResetLink_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <abp-button\r\n class=\"d-block\"\r\n buttonClass=\"mt-2 mb-3 btn btn-primary btn-block\"\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n <a routerLink=\"/account/login\"\r\n ><i class=\"fa fa-long-arrow-left me-1\"></i>{{ 'AbpAccount::Login' | abpLocalization }}</a\r\n >\r\n</form>\r\n\r\n<ng-template #emailSentTemplate>\r\n <p>\r\n {{ 'AbpAccount::PasswordResetMailSentMessage' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary btn-block\">\r\n <i class=\"fa fa-long-arrow-left me-1\"></i>\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n" }]
22
+ class ForgotPasswordComponent {
23
+ constructor(fb, accountService) {
24
+ this.fb = fb;
25
+ this.accountService = accountService;
26
+ this.isEmailSent = false;
27
+ this.form = this.fb.group({
28
+ email: ['', [Validators.required, Validators.email]],
29
+ });
30
+ }
31
+ onSubmit() {
32
+ if (this.form.invalid)
33
+ return;
34
+ this.inProgress = true;
35
+ this.accountService
36
+ .sendPasswordResetCode({
37
+ email: this.form.get('email')?.value,
38
+ appName: 'Angular',
39
+ })
40
+ .pipe(finalize(() => (this.inProgress = false)))
41
+ .subscribe(() => {
42
+ this.isEmailSent = true;
43
+ });
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ForgotPasswordComponent, selector: "abp-forgot-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isEmailSent; else emailSentTemplate\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::SendPasswordResetLink_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <abp-button\r\n class=\"d-block\"\r\n buttonClass=\"mt-2 mb-3 btn btn-primary btn-block\"\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n <a routerLink=\"/account/login\"\r\n ><i class=\"fa fa-long-arrow-left me-1\" aria-hidden=\"true\"></i\r\n >{{ 'AbpAccount::Login' | abpLocalization }}</a\r\n >\r\n</form>\r\n\r\n<ng-template #emailSentTemplate>\r\n <p>\r\n {{ 'AbpAccount::PasswordResetMailSentMessage' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary btn-block\">\r\n <i class=\"fa fa-long-arrow-left me-1\" aria-hidden=\"true\"></i>\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] }); }
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ selector: 'abp-forgot-password', template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isEmailSent; else emailSentTemplate\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::SendPasswordResetLink_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <abp-button\r\n class=\"d-block\"\r\n buttonClass=\"mt-2 mb-3 btn btn-primary btn-block\"\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n [disabled]=\"form?.invalid\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n <a routerLink=\"/account/login\"\r\n ><i class=\"fa fa-long-arrow-left me-1\" aria-hidden=\"true\"></i\r\n >{{ 'AbpAccount::Login' | abpLocalization }}</a\r\n >\r\n</form>\r\n\r\n<ng-template #emailSentTemplate>\r\n <p>\r\n {{ 'AbpAccount::PasswordResetMailSentMessage' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary btn-block\">\r\n <i class=\"fa fa-long-arrow-left me-1\" aria-hidden=\"true\"></i>\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n" }]
51
51
  }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2.AccountService }]; } });
52
52
 
53
53
  const ACCOUNT_CONFIG_OPTIONS = new InjectionToken('ACCOUNT_CONFIG_OPTIONS');
54
54
 
55
- function getRedirectUrl(injector) {
56
- const route = injector.get(ActivatedRoute);
57
- const options = injector.get(ACCOUNT_CONFIG_OPTIONS);
58
- return route.snapshot.queryParams.returnUrl || options.redirectUrl || '/';
55
+ function getRedirectUrl(injector) {
56
+ const route = injector.get(ActivatedRoute);
57
+ const options = injector.get(ACCOUNT_CONFIG_OPTIONS);
58
+ return route.snapshot.queryParams.returnUrl || options.redirectUrl || '/';
59
59
  }
60
60
 
61
- const { maxLength: maxLength$2, required: required$3 } = Validators;
62
- class LoginComponent {
63
- constructor(injector, fb, toasterService, authService, configState) {
64
- this.injector = injector;
65
- this.fb = fb;
66
- this.toasterService = toasterService;
67
- this.authService = authService;
68
- this.configState = configState;
69
- this.isSelfRegistrationEnabled = true;
70
- this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
71
- }
72
- ngOnInit() {
73
- this.init();
74
- this.buildForm();
75
- }
76
- init() {
77
- this.isSelfRegistrationEnabled =
78
- (this.configState.getSetting('Abp.Account.IsSelfRegistrationEnabled') || '').toLowerCase() !== 'false';
79
- }
80
- buildForm() {
81
- this.form = this.fb.group({
82
- username: ['', [required$3, maxLength$2(255)]],
83
- password: ['', [required$3, maxLength$2(128)]],
84
- rememberMe: [false],
85
- });
86
- }
87
- onSubmit() {
88
- if (this.form.invalid)
89
- return;
90
- this.inProgress = true;
91
- const { username, password, rememberMe } = this.form.value;
92
- const redirectUrl = getRedirectUrl(this.injector);
93
- this.authService
94
- .login({ username, password, rememberMe, redirectUrl })
95
- .pipe(catchError(err => {
96
- this.toasterService.error(err.error?.error_description ||
97
- err.error?.error.message ||
98
- 'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
99
- return throwError(err);
100
- }), finalize(() => (this.inProgress = false)))
101
- .subscribe();
102
- }
103
- }
104
- LoginComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoginComponent, deps: [{ token: i0.Injector }, { token: i1.UntypedFormBuilder }, { token: i2$1.ToasterService }, { token: i3$2.AuthService }, { token: i3$2.ConfigStateService }], target: i0.ɵɵFactoryTarget.Component });
105
- LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LoginComponent, selector: "abp-login", ngImport: i0, template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n<strong *ngIf=\"isSelfRegistrationEnabled\">\r\n {{ 'AbpAccount::AreYouANewUser' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/register\" queryParamsHandling=\"preserve\">{{\r\n 'AbpAccount::Register' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" validateOnSubmit class=\"mt-4\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-user-name-or-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::UserNameOrEmailAddress' | abpLocalization\r\n }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n id=\"login-input-user-name-or-email-address\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-password\" class=\"form-label\">{{ 'AbpAccount::Password' | abpLocalization }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"password\"\r\n id=\"login-input-password\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <div class=\"form-check\">\r\n <label class=\"form-check-label mb-2\" for=\"login-input-remember-me\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"login-input-remember-me\"\r\n formControlName=\"rememberMe\"\r\n />\r\n {{ 'AbpAccount::RememberMe' | abpLocalization }}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"text-end col\">\r\n <a routerLink=\"/account/forgot-password\">{{\r\n 'AbpAccount::ForgotPassword' | abpLocalization\r\n }}</a>\r\n </div>\r\n </div>\r\n\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Login' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoginComponent, decorators: [{
107
- type: Component,
108
- args: [{ selector: 'abp-login', template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n<strong *ngIf=\"isSelfRegistrationEnabled\">\r\n {{ 'AbpAccount::AreYouANewUser' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/register\" queryParamsHandling=\"preserve\">{{\r\n 'AbpAccount::Register' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" validateOnSubmit class=\"mt-4\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-user-name-or-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::UserNameOrEmailAddress' | abpLocalization\r\n }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n id=\"login-input-user-name-or-email-address\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-password\" class=\"form-label\">{{ 'AbpAccount::Password' | abpLocalization }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"password\"\r\n id=\"login-input-password\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <div class=\"form-check\">\r\n <label class=\"form-check-label mb-2\" for=\"login-input-remember-me\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"login-input-remember-me\"\r\n formControlName=\"rememberMe\"\r\n />\r\n {{ 'AbpAccount::RememberMe' | abpLocalization }}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"text-end col\">\r\n <a routerLink=\"/account/forgot-password\">{{\r\n 'AbpAccount::ForgotPassword' | abpLocalization\r\n }}</a>\r\n </div>\r\n </div>\r\n\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Login' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n" }]
61
+ const { maxLength: maxLength$2, required: required$3 } = Validators;
62
+ class LoginComponent {
63
+ constructor(injector, fb, toasterService, authService, configState) {
64
+ this.injector = injector;
65
+ this.fb = fb;
66
+ this.toasterService = toasterService;
67
+ this.authService = authService;
68
+ this.configState = configState;
69
+ this.isSelfRegistrationEnabled = true;
70
+ this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
71
+ }
72
+ ngOnInit() {
73
+ this.init();
74
+ this.buildForm();
75
+ }
76
+ init() {
77
+ this.isSelfRegistrationEnabled =
78
+ (this.configState.getSetting('Abp.Account.IsSelfRegistrationEnabled') || '').toLowerCase() !== 'false';
79
+ }
80
+ buildForm() {
81
+ this.form = this.fb.group({
82
+ username: ['', [required$3, maxLength$2(255)]],
83
+ password: ['', [required$3, maxLength$2(128)]],
84
+ rememberMe: [false],
85
+ });
86
+ }
87
+ onSubmit() {
88
+ if (this.form.invalid)
89
+ return;
90
+ this.inProgress = true;
91
+ const { username, password, rememberMe } = this.form.value;
92
+ const redirectUrl = getRedirectUrl(this.injector);
93
+ this.authService
94
+ .login({ username, password, rememberMe, redirectUrl })
95
+ .pipe(catchError(err => {
96
+ this.toasterService.error(err.error?.error_description ||
97
+ err.error?.error.message ||
98
+ 'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
99
+ return throwError(err);
100
+ }), finalize(() => (this.inProgress = false)))
101
+ .subscribe();
102
+ }
103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: LoginComponent, deps: [{ token: i0.Injector }, { token: i1.UntypedFormBuilder }, { token: i2$1.ToasterService }, { token: i3$2.AuthService }, { token: i3$2.ConfigStateService }], target: i0.ɵɵFactoryTarget.Component }); }
104
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: LoginComponent, selector: "abp-login", ngImport: i0, template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n<strong *ngIf=\"isSelfRegistrationEnabled\">\r\n {{ 'AbpAccount::AreYouANewUser' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/register\" queryParamsHandling=\"preserve\">{{\r\n 'AbpAccount::Register' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" validateOnSubmit class=\"mt-4\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-user-name-or-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::UserNameOrEmailAddress' | abpLocalization\r\n }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n id=\"login-input-user-name-or-email-address\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-password\" class=\"form-label\">{{ 'AbpAccount::Password' | abpLocalization }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"password\"\r\n id=\"login-input-password\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <div class=\"form-check\">\r\n <label class=\"form-check-label mb-2\" for=\"login-input-remember-me\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"login-input-remember-me\"\r\n formControlName=\"rememberMe\"\r\n />\r\n {{ 'AbpAccount::RememberMe' | abpLocalization }}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"text-end col\">\r\n <a routerLink=\"/account/forgot-password\">{{\r\n 'AbpAccount::ForgotPassword' | abpLocalization\r\n }}</a>\r\n </div>\r\n </div>\r\n\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Login' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] }); }
105
+ }
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: LoginComponent, decorators: [{
107
+ type: Component,
108
+ args: [{ selector: 'abp-login', template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n<strong *ngIf=\"isSelfRegistrationEnabled\">\r\n {{ 'AbpAccount::AreYouANewUser' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/register\" queryParamsHandling=\"preserve\">{{\r\n 'AbpAccount::Register' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" validateOnSubmit class=\"mt-4\">\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-user-name-or-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::UserNameOrEmailAddress' | abpLocalization\r\n }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n id=\"login-input-user-name-or-email-address\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n autofocus\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"login-input-password\" class=\"form-label\">{{ 'AbpAccount::Password' | abpLocalization }}</label>\r\n <input\r\n class=\"form-control\"\r\n type=\"password\"\r\n id=\"login-input-password\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col\">\r\n <div class=\"form-check\">\r\n <label class=\"form-check-label mb-2\" for=\"login-input-remember-me\">\r\n <input\r\n class=\"form-check-input\"\r\n type=\"checkbox\"\r\n id=\"login-input-remember-me\"\r\n formControlName=\"rememberMe\"\r\n />\r\n {{ 'AbpAccount::RememberMe' | abpLocalization }}\r\n </label>\r\n </div>\r\n </div>\r\n <div class=\"text-end col\">\r\n <a routerLink=\"/account/forgot-password\">{{\r\n 'AbpAccount::ForgotPassword' | abpLocalization\r\n }}</a>\r\n </div>\r\n </div>\r\n\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Login' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n" }]
109
109
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.UntypedFormBuilder }, { type: i2$1.ToasterService }, { type: i3$2.AuthService }, { type: i3$2.ConfigStateService }]; } });
110
110
 
111
- class ManageProfileStateService {
112
- constructor() {
113
- this.store = new InternalStore({});
114
- }
115
- get createOnUpdateStream() {
116
- return this.store.sliceUpdate;
117
- }
118
- getProfile$() {
119
- return this.store.sliceState(state => state.profile);
120
- }
121
- getProfile() {
122
- return this.store.state.profile;
123
- }
124
- setProfile(profile) {
125
- this.store.patch({ profile });
126
- }
127
- }
128
- ManageProfileStateServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ManageProfileStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
129
- ManageProfileStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ManageProfileStateService, providedIn: 'root' });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ManageProfileStateService, decorators: [{
131
- type: Injectable,
132
- args: [{ providedIn: 'root' }]
111
+ class ManageProfileStateService {
112
+ constructor() {
113
+ this.store = new InternalStore({});
114
+ }
115
+ get createOnUpdateStream() {
116
+ return this.store.sliceUpdate;
117
+ }
118
+ getProfile$() {
119
+ return this.store.sliceState(state => state.profile);
120
+ }
121
+ getProfile() {
122
+ return this.store.state.profile;
123
+ }
124
+ setProfile(profile) {
125
+ this.store.patch({ profile });
126
+ }
127
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ManageProfileStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
128
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ManageProfileStateService, providedIn: 'root' }); }
129
+ }
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ManageProfileStateService, decorators: [{
131
+ type: Injectable,
132
+ args: [{ providedIn: 'root' }]
133
133
  }] });
134
134
 
135
- const { required: required$2 } = Validators;
136
- const PASSWORD_FIELDS$1 = ['newPassword', 'repeatNewPassword'];
137
- class ChangePasswordComponent {
138
- constructor(fb, injector, toasterService, profileService, manageProfileState) {
139
- this.fb = fb;
140
- this.injector = injector;
141
- this.toasterService = toasterService;
142
- this.profileService = profileService;
143
- this.manageProfileState = manageProfileState;
144
- this.mapErrorsFn = (errors, groupErrors, control) => {
145
- if (PASSWORD_FIELDS$1.indexOf(String(control?.name)) < 0)
146
- return errors;
147
- return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
148
- };
149
- }
150
- ngOnInit() {
151
- this.hideCurrentPassword = !this.manageProfileState.getProfile()?.hasPassword;
152
- const passwordValidations = getPasswordValidators(this.injector);
153
- this.form = this.fb.group({
154
- password: ['', required$2],
155
- newPassword: [
156
- '',
157
- {
158
- validators: [required$2, ...passwordValidations],
159
- },
160
- ],
161
- repeatNewPassword: [
162
- '',
163
- {
164
- validators: [required$2, ...passwordValidations],
165
- },
166
- ],
167
- }, {
168
- validators: [comparePasswords(PASSWORD_FIELDS$1)],
169
- });
170
- if (this.hideCurrentPassword)
171
- this.form.removeControl('password');
172
- }
173
- onSubmit() {
174
- if (this.form.invalid)
175
- return;
176
- this.inProgress = true;
177
- this.profileService
178
- .changePassword({
179
- ...(!this.hideCurrentPassword && { currentPassword: this.form.get('password')?.value }),
180
- newPassword: this.form.get('newPassword')?.value,
181
- })
182
- .pipe(finalize(() => (this.inProgress = false)))
183
- .subscribe({
184
- next: () => {
185
- this.form.reset();
186
- this.toasterService.success('AbpAccount::PasswordChangedMessage', '', {
187
- life: 5000,
188
- });
189
- if (this.hideCurrentPassword) {
190
- this.hideCurrentPassword = false;
191
- this.form.addControl('password', new UntypedFormControl('', [required$2]));
192
- }
193
- },
194
- error: err => {
195
- this.toasterService.error(err.error?.error?.message || 'AbpAccount::DefaultErrorMessage');
196
- },
197
- });
198
- }
199
- }
200
- ChangePasswordComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Injector }, { token: i2$1.ToasterService }, { token: i2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component });
201
- ChangePasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ChangePasswordComponent, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" validateOnSubmit>\r\n <div *ngIf=\"!hideCurrentPassword\" class=\"mb-3 form-group\">\r\n <label for=\"current-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"current-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autofocus\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"confirm-new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"confirm-new-password\"\r\n class=\"form-control\"\r\n formControlName=\"repeatNewPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n buttonType=\"submit\"\r\n [loading]=\"inProgress\"\r\n [disabled]=\"form?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChangePasswordComponent, decorators: [{
203
- type: Component,
204
- args: [{ selector: 'abp-change-password-form', exportAs: 'abpChangePasswordForm', template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" validateOnSubmit>\r\n <div *ngIf=\"!hideCurrentPassword\" class=\"mb-3 form-group\">\r\n <label for=\"current-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"current-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autofocus\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"confirm-new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"confirm-new-password\"\r\n class=\"form-control\"\r\n formControlName=\"repeatNewPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n buttonType=\"submit\"\r\n [loading]=\"inProgress\"\r\n [disabled]=\"form?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n" }]
135
+ const { required: required$2 } = Validators;
136
+ const PASSWORD_FIELDS$1 = ['newPassword', 'repeatNewPassword'];
137
+ class ChangePasswordComponent {
138
+ constructor(fb, injector, toasterService, profileService, manageProfileState) {
139
+ this.fb = fb;
140
+ this.injector = injector;
141
+ this.toasterService = toasterService;
142
+ this.profileService = profileService;
143
+ this.manageProfileState = manageProfileState;
144
+ this.mapErrorsFn = (errors, groupErrors, control) => {
145
+ if (PASSWORD_FIELDS$1.indexOf(String(control?.name)) < 0)
146
+ return errors;
147
+ return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
148
+ };
149
+ }
150
+ ngOnInit() {
151
+ this.hideCurrentPassword = !this.manageProfileState.getProfile()?.hasPassword;
152
+ const passwordValidations = getPasswordValidators(this.injector);
153
+ this.form = this.fb.group({
154
+ password: ['', required$2],
155
+ newPassword: [
156
+ '',
157
+ {
158
+ validators: [required$2, ...passwordValidations],
159
+ },
160
+ ],
161
+ repeatNewPassword: [
162
+ '',
163
+ {
164
+ validators: [required$2, ...passwordValidations],
165
+ },
166
+ ],
167
+ }, {
168
+ validators: [comparePasswords(PASSWORD_FIELDS$1)],
169
+ });
170
+ if (this.hideCurrentPassword)
171
+ this.form.removeControl('password');
172
+ }
173
+ onSubmit() {
174
+ if (this.form.invalid)
175
+ return;
176
+ this.inProgress = true;
177
+ this.profileService
178
+ .changePassword({
179
+ ...(!this.hideCurrentPassword && { currentPassword: this.form.get('password')?.value }),
180
+ newPassword: this.form.get('newPassword')?.value,
181
+ })
182
+ .pipe(finalize(() => (this.inProgress = false)))
183
+ .subscribe({
184
+ next: () => {
185
+ this.form.reset();
186
+ this.toasterService.success('AbpAccount::PasswordChangedMessage', '', {
187
+ life: 5000,
188
+ });
189
+ if (this.hideCurrentPassword) {
190
+ this.hideCurrentPassword = false;
191
+ this.form.addControl('password', new UntypedFormControl('', [required$2]));
192
+ }
193
+ },
194
+ error: err => {
195
+ this.toasterService.error(err.error?.error?.message || 'AbpAccount::DefaultErrorMessage');
196
+ },
197
+ });
198
+ }
199
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Injector }, { token: i2$1.ToasterService }, { token: i2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component }); }
200
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ChangePasswordComponent, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" validateOnSubmit>\r\n <div *ngIf=\"!hideCurrentPassword\" class=\"mb-3 form-group\">\r\n <label for=\"current-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"current-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autofocus\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"confirm-new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"confirm-new-password\"\r\n class=\"form-control\"\r\n formControlName=\"repeatNewPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n buttonType=\"submit\"\r\n [loading]=\"inProgress\"\r\n [disabled]=\"form?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] }); }
201
+ }
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ChangePasswordComponent, decorators: [{
203
+ type: Component,
204
+ args: [{ selector: 'abp-change-password-form', exportAs: 'abpChangePasswordForm', template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" validateOnSubmit>\r\n <div *ngIf=\"!hideCurrentPassword\" class=\"mb-3 form-group\">\r\n <label for=\"current-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"current-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autofocus\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"confirm-new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"confirm-new-password\"\r\n class=\"form-control\"\r\n formControlName=\"repeatNewPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n buttonType=\"submit\"\r\n [loading]=\"inProgress\"\r\n [disabled]=\"form?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n" }]
205
205
  }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Injector }, { type: i2$1.ToasterService }, { type: i2.ProfileService }, { type: ManageProfileStateService }]; } });
206
206
 
207
207
  const RE_LOGIN_CONFIRMATION_TOKEN = new InjectionToken('RE_LOGIN_CONFIRMATION_TOKEN');
208
208
 
209
- class PersonalSettingsHalfRowComponent {
210
- constructor(propData) {
211
- this.propData = propData;
212
- this.displayName = propData.displayName;
213
- this.name = propData.name;
214
- this.id = propData.id || '';
215
- }
216
- }
217
- PersonalSettingsHalfRowComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PersonalSettingsHalfRowComponent, deps: [{ token: EXTENSIONS_FORM_PROP }], target: i0.ɵɵFactoryTarget.Component });
218
- PersonalSettingsHalfRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PersonalSettingsHalfRowComponent, selector: "abp-personal-settings-half-row", ngImport: i0, template: ` <div class="w-50 d-inline">
209
+ class PersonalSettingsHalfRowComponent {
210
+ constructor(propData) {
211
+ this.propData = propData;
212
+ this.displayName = propData.displayName;
213
+ this.name = propData.name;
214
+ this.id = propData.id || '';
215
+ }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PersonalSettingsHalfRowComponent, deps: [{ token: EXTENSIONS_FORM_PROP }], target: i0.ɵɵFactoryTarget.Component }); }
217
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: PersonalSettingsHalfRowComponent, selector: "abp-personal-settings-half-row", ngImport: i0, template: ` <div class="w-50 d-inline">
219
218
  <label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
220
219
  <input
221
220
  type="text"
@@ -224,9 +223,10 @@ PersonalSettingsHalfRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
224
223
  [attr.name]="name"
225
224
  [formControlName]="name"
226
225
  />
227
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }], viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] });
228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PersonalSettingsHalfRowComponent, decorators: [{
229
- type: Component,
226
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }], viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }); }
227
+ }
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PersonalSettingsHalfRowComponent, decorators: [{
229
+ type: Component,
230
230
  args: [{ selector: 'abp-personal-settings-half-row', template: ` <div class="w-50 d-inline">
231
231
  <label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
232
232
  <input
@@ -236,485 +236,486 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
236
236
  [attr.name]="name"
237
237
  [formControlName]="name"
238
238
  />
239
- </div>`, viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }]
240
- }], ctorParameters: function () { return [{ type: i4.FormProp, decorators: [{
241
- type: Inject,
242
- args: [EXTENSIONS_FORM_PROP]
239
+ </div>`, viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }]
240
+ }], ctorParameters: function () { return [{ type: i4.FormProp, decorators: [{
241
+ type: Inject,
242
+ args: [EXTENSIONS_FORM_PROP]
243
243
  }] }]; } });
244
244
 
245
- const { maxLength: maxLength$1, required: required$1, email: email$1 } = Validators;
246
- const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany([
247
- {
248
- type: "string" /* ePropType.String */,
249
- name: 'userName',
250
- displayName: 'AbpIdentity::DisplayName:UserName',
251
- id: 'username',
252
- validators: () => [required$1, maxLength$1(256)],
253
- },
254
- {
255
- type: "string" /* ePropType.String */,
256
- name: 'name',
257
- displayName: 'AbpIdentity::DisplayName:Name',
258
- id: 'name',
259
- validators: () => [maxLength$1(64)],
260
- template: PersonalSettingsHalfRowComponent,
261
- className: 'd-inline-block w-50',
262
- },
263
- {
264
- type: "string" /* ePropType.String */,
265
- name: 'surname',
266
- displayName: 'AbpIdentity::DisplayName:Surname',
267
- id: 'surname',
268
- validators: () => [maxLength$1(64)],
269
- className: 'd-inline-block w-50 ps-4',
270
- template: PersonalSettingsHalfRowComponent,
271
- },
272
- {
273
- type: "string" /* ePropType.String */,
274
- name: 'email',
275
- displayName: 'AbpIdentity::DisplayName:Email',
276
- id: 'email-address',
277
- validators: () => [required$1, email$1, maxLength$1(256)],
278
- },
279
- {
280
- type: "string" /* ePropType.String */,
281
- name: 'phoneNumber',
282
- displayName: 'AbpIdentity::DisplayName:PhoneNumber',
283
- id: 'phone-number',
284
- validators: () => [maxLength$1(16)],
285
- },
245
+ const { maxLength: maxLength$1, required: required$1, email: email$1 } = Validators;
246
+ const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany([
247
+ {
248
+ type: "string" /* ePropType.String */,
249
+ name: 'userName',
250
+ displayName: 'AbpIdentity::DisplayName:UserName',
251
+ id: 'username',
252
+ validators: () => [required$1, maxLength$1(256)],
253
+ },
254
+ {
255
+ type: "string" /* ePropType.String */,
256
+ name: 'name',
257
+ displayName: 'AbpIdentity::DisplayName:Name',
258
+ id: 'name',
259
+ validators: () => [maxLength$1(64)],
260
+ template: PersonalSettingsHalfRowComponent,
261
+ className: 'd-inline-block w-50',
262
+ },
263
+ {
264
+ type: "string" /* ePropType.String */,
265
+ name: 'surname',
266
+ displayName: 'AbpIdentity::DisplayName:Surname',
267
+ id: 'surname',
268
+ validators: () => [maxLength$1(64)],
269
+ className: 'd-inline-block w-50 ps-4',
270
+ template: PersonalSettingsHalfRowComponent,
271
+ },
272
+ {
273
+ type: "string" /* ePropType.String */,
274
+ name: 'email',
275
+ displayName: 'AbpIdentity::DisplayName:Email',
276
+ id: 'email-address',
277
+ validators: () => [required$1, email$1, maxLength$1(256)],
278
+ },
279
+ {
280
+ type: "string" /* ePropType.String */,
281
+ name: 'phoneNumber',
282
+ displayName: 'AbpIdentity::DisplayName:PhoneNumber',
283
+ id: 'phone-number',
284
+ validators: () => [maxLength$1(16)],
285
+ },
286
286
  ]);
287
287
 
288
- const DEFAULT_ACCOUNT_FORM_PROPS = {
289
- ["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS,
290
- };
288
+ const DEFAULT_ACCOUNT_FORM_PROPS = {
289
+ ["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS,
290
+ };
291
291
  const ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS');
292
292
 
293
- class PersonalSettingsComponent {
294
- constructor(fb, toasterService, profileService, manageProfileState, authService, confirmationService, isPersonalSettingsChangedConfirmationActive, injector) {
295
- this.fb = fb;
296
- this.toasterService = toasterService;
297
- this.profileService = profileService;
298
- this.manageProfileState = manageProfileState;
299
- this.authService = authService;
300
- this.confirmationService = confirmationService;
301
- this.isPersonalSettingsChangedConfirmationActive = isPersonalSettingsChangedConfirmationActive;
302
- this.injector = injector;
303
- this.logoutConfirmation = () => {
304
- this.authService.logout().subscribe();
305
- };
306
- }
307
- buildForm() {
308
- this.selected = this.manageProfileState.getProfile();
309
- if (!this.selected) {
310
- return;
311
- }
312
- const data = new FormPropData(this.injector, this.selected);
313
- this.form = generateFormFromProps(data);
314
- }
315
- ngOnInit() {
316
- this.buildForm();
317
- }
318
- submit() {
319
- if (this.form.invalid)
320
- return;
321
- const isLogOutConfirmMessageVisible = this.isLogoutConfirmMessageActive();
322
- this.inProgress = true;
323
- this.profileService
324
- .update(this.form.value)
325
- .pipe(finalize(() => (this.inProgress = false)))
326
- .subscribe(profile => {
327
- this.manageProfileState.setProfile(profile);
328
- this.toasterService.success('AbpAccount::PersonalSettingsSaved', 'Success', { life: 5000 });
329
- if (isLogOutConfirmMessageVisible) {
330
- this.showLogoutConfirmMessage();
331
- }
332
- });
333
- }
334
- isLogoutConfirmMessageActive() {
335
- return this.isPersonalSettingsChangedConfirmationActive;
336
- }
337
- showLogoutConfirmMessage() {
338
- this.confirmationService
339
- .info('AbpAccount::PersonalSettingsChangedConfirmationModalDescription', 'AbpAccount::PersonalSettingsChangedConfirmationModalTitle')
340
- .pipe(filter(status => status === Confirmation.Status.confirm))
341
- .subscribe(this.logoutConfirmation);
342
- }
343
- }
344
- PersonalSettingsComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PersonalSettingsComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$1.ToasterService }, { token: i2.ProfileService }, { token: ManageProfileStateService }, { token: i3$2.AuthService }, { token: i2$1.ConfirmationService }, { token: RE_LOGIN_CONFIRMATION_TOKEN }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
345
- PersonalSettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PersonalSettingsComponent, selector: "abp-personal-settings-form", providers: [
346
- {
347
- provide: EXTENSIONS_IDENTIFIER,
348
- useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
349
- },
350
- ], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PersonalSettingsComponent, decorators: [{
352
- type: Component,
353
- args: [{ selector: 'abp-personal-settings-form', exportAs: 'abpPersonalSettingsForm', providers: [
354
- {
355
- provide: EXTENSIONS_IDENTIFIER,
356
- useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
357
- },
358
- ], template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n" }]
359
- }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2$1.ToasterService }, { type: i2.ProfileService }, { type: ManageProfileStateService }, { type: i3$2.AuthService }, { type: i2$1.ConfirmationService }, { type: undefined, decorators: [{
360
- type: Inject,
361
- args: [RE_LOGIN_CONFIRMATION_TOKEN]
293
+ class PersonalSettingsComponent {
294
+ constructor(fb, toasterService, profileService, manageProfileState, authService, confirmationService, isPersonalSettingsChangedConfirmationActive, injector) {
295
+ this.fb = fb;
296
+ this.toasterService = toasterService;
297
+ this.profileService = profileService;
298
+ this.manageProfileState = manageProfileState;
299
+ this.authService = authService;
300
+ this.confirmationService = confirmationService;
301
+ this.isPersonalSettingsChangedConfirmationActive = isPersonalSettingsChangedConfirmationActive;
302
+ this.injector = injector;
303
+ this.logoutConfirmation = () => {
304
+ this.authService.logout().subscribe();
305
+ };
306
+ }
307
+ buildForm() {
308
+ this.selected = this.manageProfileState.getProfile();
309
+ if (!this.selected) {
310
+ return;
311
+ }
312
+ const data = new FormPropData(this.injector, this.selected);
313
+ this.form = generateFormFromProps(data);
314
+ }
315
+ ngOnInit() {
316
+ this.buildForm();
317
+ }
318
+ submit() {
319
+ if (this.form.invalid)
320
+ return;
321
+ const isLogOutConfirmMessageVisible = this.isLogoutConfirmMessageActive();
322
+ this.inProgress = true;
323
+ this.profileService
324
+ .update(this.form.value)
325
+ .pipe(finalize(() => (this.inProgress = false)))
326
+ .subscribe(profile => {
327
+ this.manageProfileState.setProfile(profile);
328
+ this.toasterService.success('AbpAccount::PersonalSettingsSaved', 'Success', { life: 5000 });
329
+ if (isLogOutConfirmMessageVisible) {
330
+ this.showLogoutConfirmMessage();
331
+ }
332
+ });
333
+ }
334
+ isLogoutConfirmMessageActive() {
335
+ return this.isPersonalSettingsChangedConfirmationActive;
336
+ }
337
+ showLogoutConfirmMessage() {
338
+ this.confirmationService
339
+ .info('AbpAccount::PersonalSettingsChangedConfirmationModalDescription', 'AbpAccount::PersonalSettingsChangedConfirmationModalTitle')
340
+ .pipe(filter(status => status === Confirmation.Status.confirm))
341
+ .subscribe(this.logoutConfirmation);
342
+ }
343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PersonalSettingsComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$1.ToasterService }, { token: i2.ProfileService }, { token: ManageProfileStateService }, { token: i3$2.AuthService }, { token: i2$1.ConfirmationService }, { token: RE_LOGIN_CONFIRMATION_TOKEN }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
344
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: PersonalSettingsComponent, selector: "abp-personal-settings-form", providers: [
345
+ {
346
+ provide: EXTENSIONS_IDENTIFIER,
347
+ useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
348
+ },
349
+ ], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] }); }
350
+ }
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PersonalSettingsComponent, decorators: [{
352
+ type: Component,
353
+ args: [{ selector: 'abp-personal-settings-form', exportAs: 'abpPersonalSettingsForm', providers: [
354
+ {
355
+ provide: EXTENSIONS_IDENTIFIER,
356
+ useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
357
+ },
358
+ ], template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n" }]
359
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2$1.ToasterService }, { type: i2.ProfileService }, { type: ManageProfileStateService }, { type: i3$2.AuthService }, { type: i2$1.ConfirmationService }, { type: undefined, decorators: [{
360
+ type: Inject,
361
+ args: [RE_LOGIN_CONFIRMATION_TOKEN]
362
362
  }] }, { type: i0.Injector }]; } });
363
363
 
364
- class ManageProfileComponent {
365
- constructor(profileService, manageProfileState) {
366
- this.profileService = profileService;
367
- this.manageProfileState = manageProfileState;
368
- this.selectedTab = 0;
369
- this.changePasswordKey = "Account.ChangePasswordComponent" /* eAccountComponents.ChangePassword */;
370
- this.personalSettingsKey = "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */;
371
- this.profile$ = this.manageProfileState.getProfile$();
372
- }
373
- ngOnInit() {
374
- this.profileService.get().subscribe(profile => {
375
- this.manageProfileState.setProfile(profile);
376
- if (profile.isExternal) {
377
- this.hideChangePasswordTab = true;
378
- this.selectedTab = 1;
379
- }
380
- });
381
- }
382
- }
383
- ManageProfileComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ManageProfileComponent, deps: [{ token: i2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component });
384
- ManageProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ManageProfileComponent, selector: "abp-manage-profile", ngImport: i0, template: "<div id=\"AbpContentToolbar\"></div>\r\n\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"!(profile$ | async)?.userName\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-3\">\r\n <ul class=\"nav flex-column nav-pills\" id=\"nav-tab\" role=\"tablist\">\r\n <li\r\n *ngIf=\"!hideChangePasswordTab && (profile$ | async)\"\r\n class=\"nav-item\"\r\n (click)=\"selectedTab = 0\"\r\n >\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 0 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUi::ChangePassword' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item mb-2\" (click)=\"selectedTab = 1\">\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 1 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpAccount::PersonalSettings' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf=\"profile$ | async\" class=\"col-12 col-md-9\">\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 0\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::ChangePassword' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-change-password-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: changePasswordKey\r\n }\"\r\n ></abp-change-password-form>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 1\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::PersonalSettings' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-personal-settings-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: personalSettingsKey\r\n }\"\r\n ></abp-personal-settings-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: i2$1.LoadingDirective, selector: "[abpLoading]", inputs: ["abpLoading", "abpLoadingTargetElement", "abpLoadingDelay"] }, { kind: "component", type: ChangePasswordComponent, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"] }, { kind: "component", type: PersonalSettingsComponent, selector: "abp-personal-settings-form", exportAs: ["abpPersonalSettingsForm"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }], animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])] });
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ManageProfileComponent, decorators: [{
386
- type: Component,
387
- args: [{ selector: 'abp-manage-profile', animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])], template: "<div id=\"AbpContentToolbar\"></div>\r\n\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"!(profile$ | async)?.userName\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-3\">\r\n <ul class=\"nav flex-column nav-pills\" id=\"nav-tab\" role=\"tablist\">\r\n <li\r\n *ngIf=\"!hideChangePasswordTab && (profile$ | async)\"\r\n class=\"nav-item\"\r\n (click)=\"selectedTab = 0\"\r\n >\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 0 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUi::ChangePassword' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item mb-2\" (click)=\"selectedTab = 1\">\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 1 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpAccount::PersonalSettings' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf=\"profile$ | async\" class=\"col-12 col-md-9\">\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 0\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::ChangePassword' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-change-password-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: changePasswordKey\r\n }\"\r\n ></abp-change-password-form>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 1\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::PersonalSettings' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-personal-settings-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: personalSettingsKey\r\n }\"\r\n ></abp-personal-settings-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"] }]
364
+ class ManageProfileComponent {
365
+ constructor(profileService, manageProfileState) {
366
+ this.profileService = profileService;
367
+ this.manageProfileState = manageProfileState;
368
+ this.selectedTab = 0;
369
+ this.changePasswordKey = "Account.ChangePasswordComponent" /* eAccountComponents.ChangePassword */;
370
+ this.personalSettingsKey = "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */;
371
+ this.profile$ = this.manageProfileState.getProfile$();
372
+ }
373
+ ngOnInit() {
374
+ this.profileService.get().subscribe(profile => {
375
+ this.manageProfileState.setProfile(profile);
376
+ if (profile.isExternal) {
377
+ this.hideChangePasswordTab = true;
378
+ this.selectedTab = 1;
379
+ }
380
+ });
381
+ }
382
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ManageProfileComponent, deps: [{ token: i2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component }); }
383
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ManageProfileComponent, selector: "abp-manage-profile", ngImport: i0, template: "<div id=\"AbpContentToolbar\"></div>\r\n\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"!(profile$ | async)?.userName\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-3\">\r\n <ul class=\"nav flex-column nav-pills\" id=\"nav-tab\" role=\"tablist\">\r\n <li\r\n *ngIf=\"!hideChangePasswordTab && (profile$ | async)\"\r\n class=\"nav-item\"\r\n (click)=\"selectedTab = 0\"\r\n >\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 0 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUi::ChangePassword' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item mb-2\" (click)=\"selectedTab = 1\">\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 1 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpAccount::PersonalSettings' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf=\"profile$ | async\" class=\"col-12 col-md-9\">\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 0\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::ChangePassword' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-change-password-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: changePasswordKey\r\n }\"\r\n ></abp-change-password-form>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 1\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::PersonalSettings' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-personal-settings-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: personalSettingsKey\r\n }\"\r\n ></abp-personal-settings-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: i2$1.LoadingDirective, selector: "[abpLoading]", inputs: ["abpLoading", "abpLoadingTargetElement", "abpLoadingDelay"] }, { kind: "component", type: ChangePasswordComponent, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"] }, { kind: "component", type: PersonalSettingsComponent, selector: "abp-personal-settings-form", exportAs: ["abpPersonalSettingsForm"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }], animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])] }); }
384
+ }
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ManageProfileComponent, decorators: [{
386
+ type: Component,
387
+ args: [{ selector: 'abp-manage-profile', animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])], template: "<div id=\"AbpContentToolbar\"></div>\r\n\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"!(profile$ | async)?.userName\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-3\">\r\n <ul class=\"nav flex-column nav-pills\" id=\"nav-tab\" role=\"tablist\">\r\n <li\r\n *ngIf=\"!hideChangePasswordTab && (profile$ | async)\"\r\n class=\"nav-item\"\r\n (click)=\"selectedTab = 0\"\r\n >\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 0 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUi::ChangePassword' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item mb-2\" (click)=\"selectedTab = 1\">\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 1 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpAccount::PersonalSettings' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf=\"profile$ | async\" class=\"col-12 col-md-9\">\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 0\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::ChangePassword' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-change-password-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: changePasswordKey\r\n }\"\r\n ></abp-change-password-form>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 1\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::PersonalSettings' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-personal-settings-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: personalSettingsKey\r\n }\"\r\n ></abp-personal-settings-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"] }]
388
388
  }], ctorParameters: function () { return [{ type: i2.ProfileService }, { type: ManageProfileStateService }]; } });
389
389
 
390
- const { maxLength, required, email } = Validators;
391
- class RegisterComponent {
392
- constructor(fb, accountService, configState, toasterService, authService, injector) {
393
- this.fb = fb;
394
- this.accountService = accountService;
395
- this.configState = configState;
396
- this.toasterService = toasterService;
397
- this.authService = authService;
398
- this.injector = injector;
399
- this.isSelfRegistrationEnabled = true;
400
- this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
401
- }
402
- ngOnInit() {
403
- this.init();
404
- this.buildForm();
405
- }
406
- init() {
407
- this.isSelfRegistrationEnabled =
408
- (this.configState.getSetting('Abp.Account.IsSelfRegistrationEnabled') || '').toLowerCase() !==
409
- 'false';
410
- if (!this.isSelfRegistrationEnabled) {
411
- this.toasterService.warn({
412
- key: 'AbpAccount::SelfRegistrationDisabledMessage',
413
- defaultValue: 'Self registration is disabled.',
414
- }, '', { life: 10000 });
415
- return;
416
- }
417
- }
418
- buildForm() {
419
- this.form = this.fb.group({
420
- username: ['', [required, maxLength(255)]],
421
- password: ['', [required, ...getPasswordValidators(this.injector)]],
422
- email: ['', [required, email]],
423
- });
424
- }
425
- onSubmit() {
426
- if (this.form.invalid)
427
- return;
428
- this.inProgress = true;
429
- const newUser = {
430
- userName: this.form.get('username')?.value,
431
- password: this.form.get('password')?.value,
432
- emailAddress: this.form.get('email')?.value,
433
- appName: 'Angular',
434
- };
435
- this.accountService
436
- .register(newUser)
437
- .pipe(switchMap(() => this.authService.login({
438
- username: newUser.userName,
439
- password: newUser.password,
440
- redirectUrl: getRedirectUrl(this.injector),
441
- })), catchError(err => {
442
- this.toasterService.error(err.error?.error_description ||
443
- err.error?.error.message ||
444
- 'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
445
- return throwError(err);
446
- }), finalize(() => (this.inProgress = false)))
447
- .subscribe();
448
- }
449
- }
450
- RegisterComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RegisterComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }, { token: i3$2.ConfigStateService }, { token: i2$1.ToasterService }, { token: i3$2.AuthService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
451
- RegisterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: RegisterComponent, selector: "abp-register", ngImport: i0, template: "<h4>{{ 'AbpAccount::Register' | abpLocalization }}</h4>\r\n<strong>\r\n {{ 'AbpAccount::AlreadyRegistered' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/login\">{{\r\n 'AbpAccount::Login' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form\r\n *ngIf=\"isSelfRegistrationEnabled\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n class=\"mt-4\"\r\n>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-user-name\" class=\"form-label\">{{\r\n 'AbpAccount::UserName' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n autofocus\r\n type=\"text\"\r\n id=\"input-user-name\"\r\n class=\"form-control\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"input-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Register' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
452
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RegisterComponent, decorators: [{
453
- type: Component,
454
- args: [{ selector: 'abp-register', template: "<h4>{{ 'AbpAccount::Register' | abpLocalization }}</h4>\r\n<strong>\r\n {{ 'AbpAccount::AlreadyRegistered' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/login\">{{\r\n 'AbpAccount::Login' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form\r\n *ngIf=\"isSelfRegistrationEnabled\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n class=\"mt-4\"\r\n>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-user-name\" class=\"form-label\">{{\r\n 'AbpAccount::UserName' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n autofocus\r\n type=\"text\"\r\n id=\"input-user-name\"\r\n class=\"form-control\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"input-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Register' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n" }]
390
+ const { maxLength, required, email } = Validators;
391
+ class RegisterComponent {
392
+ constructor(fb, accountService, configState, toasterService, authService, injector) {
393
+ this.fb = fb;
394
+ this.accountService = accountService;
395
+ this.configState = configState;
396
+ this.toasterService = toasterService;
397
+ this.authService = authService;
398
+ this.injector = injector;
399
+ this.isSelfRegistrationEnabled = true;
400
+ this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
401
+ }
402
+ ngOnInit() {
403
+ this.init();
404
+ this.buildForm();
405
+ }
406
+ init() {
407
+ this.isSelfRegistrationEnabled =
408
+ (this.configState.getSetting('Abp.Account.IsSelfRegistrationEnabled') || '').toLowerCase() !==
409
+ 'false';
410
+ if (!this.isSelfRegistrationEnabled) {
411
+ this.toasterService.warn({
412
+ key: 'AbpAccount::SelfRegistrationDisabledMessage',
413
+ defaultValue: 'Self registration is disabled.',
414
+ }, '', { life: 10000 });
415
+ return;
416
+ }
417
+ }
418
+ buildForm() {
419
+ this.form = this.fb.group({
420
+ username: ['', [required, maxLength(255)]],
421
+ password: ['', [required, ...getPasswordValidators(this.injector)]],
422
+ email: ['', [required, email]],
423
+ });
424
+ }
425
+ onSubmit() {
426
+ if (this.form.invalid)
427
+ return;
428
+ this.inProgress = true;
429
+ const newUser = {
430
+ userName: this.form.get('username')?.value,
431
+ password: this.form.get('password')?.value,
432
+ emailAddress: this.form.get('email')?.value,
433
+ appName: 'Angular',
434
+ };
435
+ this.accountService
436
+ .register(newUser)
437
+ .pipe(switchMap(() => this.authService.login({
438
+ username: newUser.userName,
439
+ password: newUser.password,
440
+ redirectUrl: getRedirectUrl(this.injector),
441
+ })), catchError(err => {
442
+ this.toasterService.error(err.error?.error_description ||
443
+ err.error?.error.message ||
444
+ 'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
445
+ return throwError(err);
446
+ }), finalize(() => (this.inProgress = false)))
447
+ .subscribe();
448
+ }
449
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: RegisterComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }, { token: i3$2.ConfigStateService }, { token: i2$1.ToasterService }, { token: i3$2.AuthService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
450
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: RegisterComponent, selector: "abp-register", ngImport: i0, template: "<h4>{{ 'AbpAccount::Register' | abpLocalization }}</h4>\r\n<strong>\r\n {{ 'AbpAccount::AlreadyRegistered' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/login\">{{\r\n 'AbpAccount::Login' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form\r\n *ngIf=\"isSelfRegistrationEnabled\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n class=\"mt-4\"\r\n>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-user-name\" class=\"form-label\">{{\r\n 'AbpAccount::UserName' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n autofocus\r\n type=\"text\"\r\n id=\"input-user-name\"\r\n class=\"form-control\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"input-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Register' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] }); }
451
+ }
452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: RegisterComponent, decorators: [{
453
+ type: Component,
454
+ args: [{ selector: 'abp-register', template: "<h4>{{ 'AbpAccount::Register' | abpLocalization }}</h4>\r\n<strong>\r\n {{ 'AbpAccount::AlreadyRegistered' | abpLocalization }}\r\n <a class=\"text-decoration-none\" routerLink=\"/account/login\">{{\r\n 'AbpAccount::Login' | abpLocalization\r\n }}</a>\r\n</strong>\r\n<form\r\n *ngIf=\"isSelfRegistrationEnabled\"\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n class=\"mt-4\"\r\n>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-user-name\" class=\"form-label\">{{\r\n 'AbpAccount::UserName' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n autofocus\r\n type=\"text\"\r\n id=\"input-user-name\"\r\n class=\"form-control\"\r\n formControlName=\"username\"\r\n autocomplete=\"username\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-email-address\" class=\"form-label\">{{\r\n 'AbpAccount::EmailAddress' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input type=\"email\" id=\"input-email-address\" class=\"form-control\" formControlName=\"email\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"input-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <abp-button\r\n [loading]=\"inProgress\"\r\n buttonType=\"submit\"\r\n name=\"Action\"\r\n buttonClass=\"btn-block btn-lg mt-3 btn btn-primary\"\r\n >\r\n {{ 'AbpAccount::Register' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n" }]
455
455
  }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2.AccountService }, { type: i3$2.ConfigStateService }, { type: i2$1.ToasterService }, { type: i3$2.AuthService }, { type: i0.Injector }]; } });
456
456
 
457
- const PASSWORD_FIELDS = ['password', 'confirmPassword'];
458
- class ResetPasswordComponent {
459
- constructor(fb, accountService, route, router, injector) {
460
- this.fb = fb;
461
- this.accountService = accountService;
462
- this.route = route;
463
- this.router = router;
464
- this.injector = injector;
465
- this.inProgress = false;
466
- this.isPasswordReset = false;
467
- this.mapErrorsFn = (errors, groupErrors, control) => {
468
- if (PASSWORD_FIELDS.indexOf(String(control?.name)) < 0)
469
- return errors;
470
- return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
471
- };
472
- }
473
- ngOnInit() {
474
- this.route.queryParams.subscribe(({ userId, resetToken }) => {
475
- if (!userId || !resetToken)
476
- this.router.navigateByUrl('/account/login');
477
- this.form = this.fb.group({
478
- userId: [userId, [Validators.required]],
479
- resetToken: [resetToken, [Validators.required]],
480
- password: ['', [Validators.required, ...getPasswordValidators(this.injector)]],
481
- confirmPassword: ['', [Validators.required, ...getPasswordValidators(this.injector)]],
482
- }, {
483
- validators: [comparePasswords(PASSWORD_FIELDS)],
484
- });
485
- });
486
- }
487
- onSubmit() {
488
- if (this.form.invalid || this.inProgress)
489
- return;
490
- this.inProgress = true;
491
- this.accountService
492
- .resetPassword({
493
- userId: this.form.get('userId')?.value,
494
- resetToken: this.form.get('resetToken')?.value,
495
- password: this.form.get('password')?.value,
496
- })
497
- .pipe(finalize(() => (this.inProgress = false)))
498
- .subscribe(() => {
499
- this.isPasswordReset = true;
500
- });
501
- }
502
- }
503
- ResetPasswordComponentfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }, { token: i3$1.ActivatedRoute }, { token: i3$1.Router }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
504
- ResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ResetPasswordComponent, selector: "abp-reset-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isPasswordReset; else passwordResetTemplate\"\r\n [formGroup]=\"form\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::ResetPassword_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"password\" id=\"input-password\" class=\"form-control\" formControlName=\"password\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-confirm-password\" class=\"form-label\">{{\r\n 'AbpAccount::ConfirmPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input\r\n type=\"password\"\r\n id=\"input-confirm-password\"\r\n class=\"form-control\"\r\n formControlName=\"confirmPassword\"\r\n />\r\n </div>\r\n <button class=\"me-2 btn btn-secondary\" type=\"button\" routerLink=\"/account/login\">\r\n {{ 'AbpAccount::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"me-2 btn btn-primary\"\r\n [loading]=\"inProgress\"\r\n (click)=\"onSubmit()\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n\r\n<ng-template #passwordResetTemplate>\r\n <p>\r\n {{ 'AbpAccount::YourPasswordIsSuccessfullyReset' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary\">\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ResetPasswordComponent, decorators: [{
506
- type: Component,
507
- args: [{ selector: 'abp-reset-password', template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isPasswordReset; else passwordResetTemplate\"\r\n [formGroup]=\"form\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::ResetPassword_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"password\" id=\"input-password\" class=\"form-control\" formControlName=\"password\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-confirm-password\" class=\"form-label\">{{\r\n 'AbpAccount::ConfirmPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input\r\n type=\"password\"\r\n id=\"input-confirm-password\"\r\n class=\"form-control\"\r\n formControlName=\"confirmPassword\"\r\n />\r\n </div>\r\n <button class=\"me-2 btn btn-secondary\" type=\"button\" routerLink=\"/account/login\">\r\n {{ 'AbpAccount::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"me-2 btn btn-primary\"\r\n [loading]=\"inProgress\"\r\n (click)=\"onSubmit()\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n\r\n<ng-template #passwordResetTemplate>\r\n <p>\r\n {{ 'AbpAccount::YourPasswordIsSuccessfullyReset' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary\">\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n" }]
457
+ const PASSWORD_FIELDS = ['password', 'confirmPassword'];
458
+ class ResetPasswordComponent {
459
+ constructor(fb, accountService, route, router, injector) {
460
+ this.fb = fb;
461
+ this.accountService = accountService;
462
+ this.route = route;
463
+ this.router = router;
464
+ this.injector = injector;
465
+ this.inProgress = false;
466
+ this.isPasswordReset = false;
467
+ this.mapErrorsFn = (errors, groupErrors, control) => {
468
+ if (PASSWORD_FIELDS.indexOf(String(control?.name)) < 0)
469
+ return errors;
470
+ return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
471
+ };
472
+ }
473
+ ngOnInit() {
474
+ this.route.queryParams.subscribe(({ userId, resetToken }) => {
475
+ if (!userId || !resetToken)
476
+ this.router.navigateByUrl('/account/login');
477
+ this.form = this.fb.group({
478
+ userId: [userId, [Validators.required]],
479
+ resetToken: [resetToken, [Validators.required]],
480
+ password: ['', [Validators.required, ...getPasswordValidators(this.injector)]],
481
+ confirmPassword: ['', [Validators.required, ...getPasswordValidators(this.injector)]],
482
+ }, {
483
+ validators: [comparePasswords(PASSWORD_FIELDS)],
484
+ });
485
+ });
486
+ }
487
+ onSubmit() {
488
+ if (this.form.invalid || this.inProgress)
489
+ return;
490
+ this.inProgress = true;
491
+ this.accountService
492
+ .resetPassword({
493
+ userId: this.form.get('userId')?.value,
494
+ resetToken: this.form.get('resetToken')?.value,
495
+ password: this.form.get('password')?.value,
496
+ })
497
+ .pipe(finalize(() => (this.inProgress = false)))
498
+ .subscribe(() => {
499
+ this.isPasswordReset = true;
500
+ });
501
+ }
502
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }, { token: i3$1.ActivatedRoute }, { token: i3$1.Router }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
503
+ static { thiscmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ResetPasswordComponent, selector: "abp-reset-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isPasswordReset; else passwordResetTemplate\"\r\n [formGroup]=\"form\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::ResetPassword_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"password\" id=\"input-password\" class=\"form-control\" formControlName=\"password\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-confirm-password\" class=\"form-label\">{{\r\n 'AbpAccount::ConfirmPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input\r\n type=\"password\"\r\n id=\"input-confirm-password\"\r\n class=\"form-control\"\r\n formControlName=\"confirmPassword\"\r\n />\r\n </div>\r\n <button class=\"me-2 btn btn-secondary\" type=\"button\" routerLink=\"/account/login\">\r\n {{ 'AbpAccount::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"me-2 btn btn-primary\"\r\n [loading]=\"inProgress\"\r\n (click)=\"onSubmit()\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n\r\n<ng-template #passwordResetTemplate>\r\n <p>\r\n {{ 'AbpAccount::YourPasswordIsSuccessfullyReset' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary\">\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i6.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] }); }
504
+ }
505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ResetPasswordComponent, decorators: [{
506
+ type: Component,
507
+ args: [{ selector: 'abp-reset-password', template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n<form\r\n *ngIf=\"!isPasswordReset; else passwordResetTemplate\"\r\n [formGroup]=\"form\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n (ngSubmit)=\"onSubmit()\"\r\n validateOnSubmit\r\n>\r\n <p>{{ 'AbpAccount::ResetPassword_Information' | abpLocalization }}</p>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-password\" class=\"form-label\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input type=\"password\" id=\"input-password\" class=\"form-control\" formControlName=\"password\" />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"input-confirm-password\" class=\"form-label\">{{\r\n 'AbpAccount::ConfirmPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span>\r\n <input\r\n type=\"password\"\r\n id=\"input-confirm-password\"\r\n class=\"form-control\"\r\n formControlName=\"confirmPassword\"\r\n />\r\n </div>\r\n <button class=\"me-2 btn btn-secondary\" type=\"button\" routerLink=\"/account/login\">\r\n {{ 'AbpAccount::Cancel' | abpLocalization }}\r\n </button>\r\n <abp-button\r\n buttonType=\"submit\"\r\n buttonClass=\"me-2 btn btn-primary\"\r\n [loading]=\"inProgress\"\r\n (click)=\"onSubmit()\"\r\n >\r\n {{ 'AbpAccount::Submit' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n\r\n<ng-template #passwordResetTemplate>\r\n <p>\r\n {{ 'AbpAccount::YourPasswordIsSuccessfullyReset' | abpLocalization }}\r\n </p>\r\n\r\n <a routerLink=\"/account/login\">\r\n <button class=\"d-block mt-2 mb-3 btn btn-primary\">\r\n {{ 'AbpAccount::BackToLogin' | abpLocalization }}\r\n </button>\r\n </a>\r\n</ng-template>\r\n" }]
508
508
  }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2.AccountService }, { type: i3$1.ActivatedRoute }, { type: i3$1.Router }, { type: i0.Injector }]; } });
509
509
 
510
- class AuthenticationFlowGuard {
511
- constructor(authService) {
512
- this.authService = authService;
513
- }
514
- canActivate() {
515
- if (this.authService.isInternalAuth)
516
- return true;
517
- this.authService.navigateToLogin();
518
- return false;
519
- }
520
- }
521
- AuthenticationFlowGuardfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthenticationFlowGuard, deps: [{ token: i3$2.AuthService }], target: i0.ɵɵFactoryTarget.Injectable });
522
- AuthenticationFlowGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthenticationFlowGuard });
523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthenticationFlowGuard, decorators: [{
524
- type: Injectable
525
- }], ctorParameters: function () { return [{ type: i3$2.AuthService }]; } });
510
+ class AuthenticationFlowGuard {
511
+ constructor() {
512
+ this.authService = inject(AuthService);
513
+ }
514
+ canActivate() {
515
+ if (this.authService.isInternalAuth)
516
+ return true;
517
+ this.authService.navigateToLogin();
518
+ return false;
519
+ }
520
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationFlowGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
521
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationFlowGuard }); }
522
+ }
523
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationFlowGuard, decorators: [{
524
+ type: Injectable
525
+ }] });
526
526
 
527
- class AccountExtensionsGuard {
528
- constructor(injector) {
529
- this.injector = injector;
530
- }
531
- canActivate() {
532
- const extensions = this.injector.get(ExtensionsService);
533
- const editFormContributors = this.injector.get(ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
534
- const configState = this.injector.get(ConfigStateService);
535
- return getObjectExtensionEntitiesFromStore(configState, 'Identity').pipe(map(entities => ({
536
- ["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: entities.User,
537
- })), mapEntitiesToContributors(configState, 'AbpIdentity'), tap(objectExtensionContributors => {
538
- mergeWithDefaultProps(extensions.editFormProps, DEFAULT_ACCOUNT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
539
- }), mapTo(true));
540
- }
541
- }
542
- AccountExtensionsGuardfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountExtensionsGuard, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
543
- AccountExtensionsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountExtensionsGuard });
544
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountExtensionsGuard, decorators: [{
545
- type: Injectable
546
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
527
+ class AccountExtensionsGuard {
528
+ constructor() {
529
+ this.configState = inject(ConfigStateService);
530
+ this.extensions = inject(ExtensionsService);
531
+ }
532
+ canActivate() {
533
+ const config = { optional: true };
534
+ const editFormContributors = inject(ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, config) || {};
535
+ return getObjectExtensionEntitiesFromStore(this.configState, 'Identity').pipe(map(entities => ({
536
+ ["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: entities.User,
537
+ })), mapEntitiesToContributors(this.configState, 'AbpIdentity'), tap(objectExtensionContributors => {
538
+ mergeWithDefaultProps(this.extensions.editFormProps, DEFAULT_ACCOUNT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
539
+ }), map(() => true));
540
+ }
541
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
542
+ static { thisprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountExtensionsGuard }); }
543
+ }
544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountExtensionsGuard, decorators: [{
545
+ type: Injectable
546
+ }] });
547
547
 
548
- const routes = [
549
- { path: '', pathMatch: 'full', redirectTo: 'login' },
550
- {
551
- path: '',
552
- component: RouterOutletComponent,
553
- children: [
554
- {
555
- path: 'login',
556
- component: ReplaceableRouteContainerComponent,
557
- canActivate: [AuthenticationFlowGuard],
558
- data: {
559
- replaceableComponent: {
560
- key: "Account.LoginComponent" /* eAccountComponents.Login */,
561
- defaultComponent: LoginComponent,
562
- },
563
- },
564
- },
565
- {
566
- path: 'register',
567
- component: ReplaceableRouteContainerComponent,
568
- canActivate: [AuthenticationFlowGuard],
569
- data: {
570
- replaceableComponent: {
571
- key: "Account.RegisterComponent" /* eAccountComponents.Register */,
572
- defaultComponent: RegisterComponent,
573
- },
574
- },
575
- },
576
- {
577
- path: 'forgot-password',
578
- component: ReplaceableRouteContainerComponent,
579
- canActivate: [AuthenticationFlowGuard],
580
- data: {
581
- replaceableComponent: {
582
- key: "Account.ForgotPasswordComponent" /* eAccountComponents.ForgotPassword */,
583
- defaultComponent: ForgotPasswordComponent,
584
- },
585
- },
586
- },
587
- {
588
- path: 'reset-password',
589
- component: ReplaceableRouteContainerComponent,
590
- canActivate: [],
591
- data: {
592
- tenantBoxVisible: false,
593
- replaceableComponent: {
594
- key: "Account.ResetPasswordComponent" /* eAccountComponents.ResetPassword */,
595
- defaultComponent: ResetPasswordComponent,
596
- },
597
- },
598
- },
599
- {
600
- path: 'manage',
601
- component: ReplaceableRouteContainerComponent,
602
- canActivate: [AuthGuard, AccountExtensionsGuard],
603
- data: {
604
- replaceableComponent: {
605
- key: "Account.ManageProfileComponent" /* eAccountComponents.ManageProfile */,
606
- defaultComponent: ManageProfileComponent,
607
- },
608
- },
609
- },
610
- ],
611
- },
612
- ];
613
- class AccountRoutingModule {
614
- }
615
- AccountRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
616
- AccountRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AccountRoutingModule, imports: [i3$1.RouterModule], exports: [RouterModule] });
617
- AccountRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountRoutingModule, decorators: [{
619
- type: NgModule,
620
- args: [{
621
- imports: [RouterModule.forChild(routes)],
622
- exports: [RouterModule],
623
- }]
548
+ const canActivate = mapToCanActivate([AuthenticationFlowGuard]);
549
+ const routes = [
550
+ { path: '', pathMatch: 'full', redirectTo: 'login' },
551
+ {
552
+ path: '',
553
+ component: RouterOutletComponent,
554
+ children: [
555
+ {
556
+ path: 'login',
557
+ component: ReplaceableRouteContainerComponent,
558
+ canActivate,
559
+ data: {
560
+ replaceableComponent: {
561
+ key: "Account.LoginComponent" /* eAccountComponents.Login */,
562
+ defaultComponent: LoginComponent,
563
+ },
564
+ },
565
+ },
566
+ {
567
+ path: 'register',
568
+ component: ReplaceableRouteContainerComponent,
569
+ canActivate,
570
+ data: {
571
+ replaceableComponent: {
572
+ key: "Account.RegisterComponent" /* eAccountComponents.Register */,
573
+ defaultComponent: RegisterComponent,
574
+ },
575
+ },
576
+ },
577
+ {
578
+ path: 'forgot-password',
579
+ component: ReplaceableRouteContainerComponent,
580
+ canActivate,
581
+ data: {
582
+ replaceableComponent: {
583
+ key: "Account.ForgotPasswordComponent" /* eAccountComponents.ForgotPassword */,
584
+ defaultComponent: ForgotPasswordComponent,
585
+ },
586
+ },
587
+ },
588
+ {
589
+ path: 'reset-password',
590
+ component: ReplaceableRouteContainerComponent,
591
+ canActivate: [],
592
+ data: {
593
+ tenantBoxVisible: false,
594
+ replaceableComponent: {
595
+ key: "Account.ResetPasswordComponent" /* eAccountComponents.ResetPassword */,
596
+ defaultComponent: ResetPasswordComponent,
597
+ },
598
+ },
599
+ },
600
+ {
601
+ path: 'manage',
602
+ component: ReplaceableRouteContainerComponent,
603
+ canActivate: mapToCanActivate([AuthGuard, AccountExtensionsGuard]),
604
+ data: {
605
+ replaceableComponent: {
606
+ key: "Account.ManageProfileComponent" /* eAccountComponents.ManageProfile */,
607
+ defaultComponent: ManageProfileComponent,
608
+ },
609
+ },
610
+ },
611
+ ],
612
+ },
613
+ ];
614
+ class AccountRoutingModule {
615
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
616
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: AccountRoutingModule, imports: [i3$1.RouterModule], exports: [RouterModule] }); }
617
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
618
+ }
619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountRoutingModule, decorators: [{
620
+ type: NgModule,
621
+ args: [{
622
+ imports: [RouterModule.forChild(routes)],
623
+ exports: [RouterModule],
624
+ }]
624
625
  }] });
625
626
 
626
- function accountConfigOptionsFactory(options) {
627
- return {
628
- redirectUrl: '/',
629
- ...options,
630
- };
627
+ function accountConfigOptionsFactory(options) {
628
+ return {
629
+ redirectUrl: '/',
630
+ ...options,
631
+ };
631
632
  }
632
633
 
633
- const declarations = [
634
- LoginComponent,
635
- RegisterComponent,
636
- ChangePasswordComponent,
637
- ManageProfileComponent,
638
- PersonalSettingsComponent,
639
- ForgotPasswordComponent,
640
- ResetPasswordComponent,
641
- PersonalSettingsHalfRowComponent,
642
- ];
643
- class AccountModule {
644
- static forChild(options = {}) {
645
- return {
646
- ngModule: AccountModule,
647
- providers: [
648
- AuthenticationFlowGuard,
649
- { provide: ACCOUNT_CONFIG_OPTIONS, useValue: options },
650
- {
651
- provide: 'ACCOUNT_OPTIONS',
652
- useFactory: accountConfigOptionsFactory,
653
- deps: [ACCOUNT_CONFIG_OPTIONS],
654
- },
655
- {
656
- provide: RE_LOGIN_CONFIRMATION_TOKEN,
657
- useValue: options.isPersonalSettingsChangedConfirmationActive ?? true,
658
- },
659
- {
660
- provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS,
661
- useValue: options.editFormPropContributors,
662
- },
663
- AccountExtensionsGuard,
664
- ],
665
- };
666
- }
667
- static forLazy(options = {}) {
668
- return new LazyModuleFactory(AccountModule.forChild(options));
669
- }
670
- }
671
- AccountModulefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
672
- AccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AccountModule, declarations: [LoginComponent,
673
- RegisterComponent,
674
- ChangePasswordComponent,
675
- ManageProfileComponent,
676
- PersonalSettingsComponent,
677
- ForgotPasswordComponent,
678
- ResetPasswordComponent,
679
- PersonalSettingsHalfRowComponent], imports: [CoreModule,
680
- AccountRoutingModule,
681
- ThemeSharedModule,
682
- NgbDropdownModule,
683
- NgxValidateCoreModule,
684
- UiExtensionsModule], exports: [LoginComponent,
685
- RegisterComponent,
686
- ChangePasswordComponent,
687
- ManageProfileComponent,
688
- PersonalSettingsComponent,
689
- ForgotPasswordComponent,
690
- ResetPasswordComponent,
691
- PersonalSettingsHalfRowComponent] });
692
- AccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountModule, imports: [CoreModule,
693
- AccountRoutingModule,
694
- ThemeSharedModule,
695
- NgbDropdownModule,
696
- NgxValidateCoreModule,
697
- UiExtensionsModule] });
698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountModule, decorators: [{
699
- type: NgModule,
700
- args: [{
701
- declarations: [...declarations],
702
- imports: [
703
- CoreModule,
704
- AccountRoutingModule,
705
- ThemeSharedModule,
706
- NgbDropdownModule,
707
- NgxValidateCoreModule,
708
- UiExtensionsModule,
709
- ],
710
- exports: [...declarations],
711
- }]
634
+ const declarations = [
635
+ LoginComponent,
636
+ RegisterComponent,
637
+ ChangePasswordComponent,
638
+ ManageProfileComponent,
639
+ PersonalSettingsComponent,
640
+ ForgotPasswordComponent,
641
+ ResetPasswordComponent,
642
+ PersonalSettingsHalfRowComponent,
643
+ ];
644
+ class AccountModule {
645
+ static forChild(options = {}) {
646
+ return {
647
+ ngModule: AccountModule,
648
+ providers: [
649
+ AuthenticationFlowGuard,
650
+ { provide: ACCOUNT_CONFIG_OPTIONS, useValue: options },
651
+ {
652
+ provide: 'ACCOUNT_OPTIONS',
653
+ useFactory: accountConfigOptionsFactory,
654
+ deps: [ACCOUNT_CONFIG_OPTIONS],
655
+ },
656
+ {
657
+ provide: RE_LOGIN_CONFIRMATION_TOKEN,
658
+ useValue: options.isPersonalSettingsChangedConfirmationActive ?? true,
659
+ },
660
+ {
661
+ provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS,
662
+ useValue: options.editFormPropContributors,
663
+ },
664
+ AccountExtensionsGuard,
665
+ ],
666
+ };
667
+ }
668
+ static forLazy(options = {}) {
669
+ return new LazyModuleFactory(AccountModule.forChild(options));
670
+ }
671
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
672
+ static { thismod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: AccountModule, declarations: [LoginComponent,
673
+ RegisterComponent,
674
+ ChangePasswordComponent,
675
+ ManageProfileComponent,
676
+ PersonalSettingsComponent,
677
+ ForgotPasswordComponent,
678
+ ResetPasswordComponent,
679
+ PersonalSettingsHalfRowComponent], imports: [CoreModule,
680
+ AccountRoutingModule,
681
+ ThemeSharedModule,
682
+ NgbDropdownModule,
683
+ NgxValidateCoreModule,
684
+ UiExtensionsModule], exports: [LoginComponent,
685
+ RegisterComponent,
686
+ ChangePasswordComponent,
687
+ ManageProfileComponent,
688
+ PersonalSettingsComponent,
689
+ ForgotPasswordComponent,
690
+ ResetPasswordComponent,
691
+ PersonalSettingsHalfRowComponent] }); }
692
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountModule, imports: [CoreModule,
693
+ AccountRoutingModule,
694
+ ThemeSharedModule,
695
+ NgbDropdownModule,
696
+ NgxValidateCoreModule,
697
+ UiExtensionsModule] }); }
698
+ }
699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AccountModule, decorators: [{
700
+ type: NgModule,
701
+ args: [{
702
+ declarations: [...declarations],
703
+ imports: [
704
+ CoreModule,
705
+ AccountRoutingModule,
706
+ ThemeSharedModule,
707
+ NgbDropdownModule,
708
+ NgxValidateCoreModule,
709
+ UiExtensionsModule,
710
+ ],
711
+ exports: [...declarations],
712
+ }]
712
713
  }] });
713
714
 
714
715
  /* eslint-disable @typescript-eslint/no-empty-interface */
715
716
 
716
- /**
717
- * Generated bundle index. Do not edit.
717
+ /**
718
+ * Generated bundle index. Do not edit.
718
719
  */
719
720
 
720
721
  export { ACCOUNT_CONFIG_OPTIONS, ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, AccountExtensionsGuard, AccountModule, AuthenticationFlowGuard, ChangePasswordComponent, DEFAULT_ACCOUNT_FORM_PROPS, ForgotPasswordComponent, LoginComponent, ManageProfileComponent, ManageProfileStateService, PersonalSettingsComponent, PersonalSettingsHalfRowComponent, RE_LOGIN_CONFIRMATION_TOKEN, RegisterComponent, ResetPasswordComponent };