@abp/ng.account 9.2.1 → 9.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.
- package/fesm2022/abp-ng.account.mjs +407 -290
- package/fesm2022/abp-ng.account.mjs.map +1 -1
- package/lib/account.module.d.ts +8 -13
- package/lib/account.routes.d.ts +29 -0
- package/lib/components/change-password/change-password.component.d.ts +3 -3
- package/lib/components/forgot-password/forgot-password.component.d.ts +1 -1
- package/lib/components/login/login.component.d.ts +4 -4
- package/lib/components/manage-profile/manage-profile.component.d.ts +1 -1
- package/lib/components/personal-settings/personal-settings-half-row.component.d.ts +1 -1
- package/lib/components/personal-settings/personal-settings.component.d.ts +1 -1
- package/lib/components/register/register.component.d.ts +1 -1
- package/lib/components/reset-password/reset-password.component.d.ts +1 -1
- package/package.json +3 -3
- package/public-api.d.ts +1 -0
|
@@ -1,112 +1,169 @@
|
|
|
1
|
-
import * as i3$
|
|
2
|
-
import { AuthService,
|
|
3
|
-
import * as i4 from '@abp/ng.theme.shared';
|
|
4
|
-
import { ToasterService, getPasswordValidators, ConfirmationService, Confirmation, fadeIn, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
1
|
+
import * as i3$2 from '@abp/ng.core';
|
|
2
|
+
import { AuthService, LocalizationPipe, InternalStore, AutofocusDirective, ConfigStateService, NgxValidateCoreModule as NgxValidateCoreModule$1, ReplaceableTemplateDirective, ReplaceableRouteContainerComponent, authGuard, RouterOutletComponent, LazyModuleFactory } from '@abp/ng.core';
|
|
5
3
|
import * as i0 from '@angular/core';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import { InjectionToken, inject, Injectable, Inject, Component, Injector, NgModule } from '@angular/core';
|
|
5
|
+
import * as i2 from '@abp/ng.components/extensible';
|
|
6
|
+
import { EXTENSIONS_FORM_PROP, EXTENSIBLE_FORM_VIEW_PROVIDER, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps, FormPropData, generateFormFromProps, ExtensibleFormComponent, EXTENSIONS_IDENTIFIER } from '@abp/ng.components/extensible';
|
|
7
|
+
import * as i1 from '@angular/forms';
|
|
8
|
+
import { ReactiveFormsModule, Validators, UntypedFormControl, UntypedFormBuilder } from '@angular/forms';
|
|
9
|
+
import { map, tap, finalize, catchError, filter, switchMap } from 'rxjs/operators';
|
|
10
|
+
import * as i2$2 from '@abp/ng.account.core/proxy';
|
|
11
|
+
import { ProfileService } from '@abp/ng.account.core/proxy';
|
|
12
|
+
import * as i2$1 from '@abp/ng.theme.shared';
|
|
13
|
+
import { getPasswordValidators, ButtonComponent, ToasterService, ConfirmationService, Confirmation, fadeIn, LoadingDirective } from '@abp/ng.theme.shared';
|
|
14
|
+
import * as i4 from '@ngx-validate/core';
|
|
9
15
|
import { comparePasswords, NgxValidateCoreModule } from '@ngx-validate/core';
|
|
10
16
|
import * as i3 from '@angular/router';
|
|
11
|
-
import {
|
|
12
|
-
import * as i2 from '@abp/ng.account.core/proxy';
|
|
13
|
-
import { ProfileService } from '@abp/ng.account.core/proxy';
|
|
14
|
-
import * as i1 from '@angular/forms';
|
|
15
|
-
import { Validators, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
|
16
|
-
import { finalize, catchError, filter, switchMap, map, tap } from 'rxjs/operators';
|
|
17
|
+
import { RouterModule, ActivatedRoute } from '@angular/router';
|
|
17
18
|
import { throwError, map as map$1, tap as tap$1 } from 'rxjs';
|
|
18
19
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
19
|
-
import * as i3$
|
|
20
|
-
import
|
|
21
|
-
import { EXTENSIONS_FORM_PROP, EXTENSIBLE_FORM_VIEW_PROVIDER, FormProp, FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps, ExtensibleModule } from '@abp/ng.components/extensible';
|
|
22
|
-
|
|
23
|
-
class ForgotPasswordComponent {
|
|
24
|
-
constructor(fb, accountService) {
|
|
25
|
-
this.fb = fb;
|
|
26
|
-
this.accountService = accountService;
|
|
27
|
-
this.isEmailSent = false;
|
|
28
|
-
this.form = this.fb.group({
|
|
29
|
-
email: ['', [Validators.required, Validators.email]],
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
onSubmit() {
|
|
33
|
-
if (this.form.invalid)
|
|
34
|
-
return;
|
|
35
|
-
this.inProgress = true;
|
|
36
|
-
this.accountService
|
|
37
|
-
.sendPasswordResetCode({
|
|
38
|
-
email: this.form.get('email')?.value,
|
|
39
|
-
appName: 'Angular',
|
|
40
|
-
})
|
|
41
|
-
.pipe(finalize(() => (this.inProgress = false)))
|
|
42
|
-
.subscribe(() => {
|
|
43
|
-
this.isEmailSent = true;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ForgotPasswordComponent, isStandalone: false, selector: "abp-forgot-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isEmailSent) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" validateOnSubmit>\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} @else {\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}\r\n", dependencies: [{ 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.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3$1.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: i4.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: i3$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
48
|
-
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
50
|
-
type: Component,
|
|
51
|
-
args: [{ standalone: false, selector: 'abp-forgot-password', template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isEmailSent) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" validateOnSubmit>\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} @else {\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}\r\n" }]
|
|
52
|
-
}], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i2.AccountService }] });
|
|
20
|
+
import * as i3$1 from '@angular/common';
|
|
21
|
+
import { CommonModule } from '@angular/common';
|
|
53
22
|
|
|
54
23
|
const ACCOUNT_CONFIG_OPTIONS = new InjectionToken('ACCOUNT_CONFIG_OPTIONS');
|
|
55
24
|
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
25
|
+
function accountConfigOptionsFactory(options) {
|
|
26
|
+
return {
|
|
27
|
+
redirectUrl: '/',
|
|
28
|
+
...options,
|
|
29
|
+
};
|
|
60
30
|
}
|
|
61
31
|
|
|
62
|
-
|
|
63
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `authenticationFlowGuard` *function* instead.
|
|
34
|
+
*/
|
|
35
|
+
class AuthenticationFlowGuard {
|
|
64
36
|
constructor() {
|
|
65
|
-
this.injector = inject(Injector);
|
|
66
|
-
this.fb = inject(UntypedFormBuilder);
|
|
67
|
-
this.toasterService = inject(ToasterService);
|
|
68
37
|
this.authService = inject(AuthService);
|
|
69
|
-
this.configState = inject(ConfigStateService);
|
|
70
|
-
this.isSelfRegistrationEnabled = true;
|
|
71
|
-
this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
|
|
72
38
|
}
|
|
73
|
-
|
|
74
|
-
this.
|
|
75
|
-
|
|
39
|
+
canActivate() {
|
|
40
|
+
if (this.authService.isInternalAuth)
|
|
41
|
+
return true;
|
|
42
|
+
this.authService.navigateToLogin();
|
|
43
|
+
return false;
|
|
76
44
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthenticationFlowGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
46
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthenticationFlowGuard }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthenticationFlowGuard, decorators: [{
|
|
49
|
+
type: Injectable
|
|
50
|
+
}] });
|
|
51
|
+
const authenticationFlowGuard = () => {
|
|
52
|
+
const authService = inject(AuthService);
|
|
53
|
+
if (authService.isInternalAuth)
|
|
54
|
+
return true;
|
|
55
|
+
authService.navigateToLogin();
|
|
56
|
+
return false;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const RE_LOGIN_CONFIRMATION_TOKEN = new InjectionToken('RE_LOGIN_CONFIRMATION_TOKEN');
|
|
60
|
+
|
|
61
|
+
class PersonalSettingsHalfRowComponent {
|
|
62
|
+
constructor(propData) {
|
|
63
|
+
this.propData = propData;
|
|
64
|
+
this.displayName = propData.displayName;
|
|
65
|
+
this.name = propData.name;
|
|
66
|
+
this.id = propData.id || '';
|
|
80
67
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PersonalSettingsHalfRowComponent, deps: [{ token: EXTENSIONS_FORM_PROP }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
69
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.8", type: PersonalSettingsHalfRowComponent, isStandalone: true, selector: "abp-personal-settings-half-row", ngImport: i0, template: ` <div class="w-50 d-inline">
|
|
70
|
+
<label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
|
|
71
|
+
<input
|
|
72
|
+
type="text"
|
|
73
|
+
[attr.id]="id"
|
|
74
|
+
class="form-control"
|
|
75
|
+
[attr.name]="name"
|
|
76
|
+
[formControlName]="name"
|
|
77
|
+
/>
|
|
78
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "pipe", type: LocalizationPipe, name: "abpLocalization" }], viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }); }
|
|
79
|
+
}
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PersonalSettingsHalfRowComponent, decorators: [{
|
|
81
|
+
type: Component,
|
|
82
|
+
args: [{ selector: 'abp-personal-settings-half-row', template: ` <div class="w-50 d-inline">
|
|
83
|
+
<label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
|
|
84
|
+
<input
|
|
85
|
+
type="text"
|
|
86
|
+
[attr.id]="id"
|
|
87
|
+
class="form-control"
|
|
88
|
+
[attr.name]="name"
|
|
89
|
+
[formControlName]="name"
|
|
90
|
+
/>
|
|
91
|
+
</div>`, viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER], imports: [ReactiveFormsModule, LocalizationPipe] }]
|
|
92
|
+
}], ctorParameters: () => [{ type: i2.FormProp, decorators: [{
|
|
93
|
+
type: Inject,
|
|
94
|
+
args: [EXTENSIONS_FORM_PROP]
|
|
95
|
+
}] }] });
|
|
96
|
+
|
|
97
|
+
const { maxLength: maxLength$2, required: required$3, email: email$1 } = Validators;
|
|
98
|
+
const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany([
|
|
99
|
+
{
|
|
100
|
+
type: "string" /* ePropType.String */,
|
|
101
|
+
name: 'userName',
|
|
102
|
+
displayName: 'AbpIdentity::DisplayName:UserName',
|
|
103
|
+
id: 'username',
|
|
104
|
+
validators: () => [required$3, maxLength$2(256)],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: "string" /* ePropType.String */,
|
|
108
|
+
name: 'name',
|
|
109
|
+
displayName: 'AbpIdentity::DisplayName:Name',
|
|
110
|
+
id: 'name',
|
|
111
|
+
validators: () => [maxLength$2(64)],
|
|
112
|
+
template: PersonalSettingsHalfRowComponent,
|
|
113
|
+
className: 'd-inline-block w-50',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: "string" /* ePropType.String */,
|
|
117
|
+
name: 'surname',
|
|
118
|
+
displayName: 'AbpIdentity::DisplayName:Surname',
|
|
119
|
+
id: 'surname',
|
|
120
|
+
validators: () => [maxLength$2(64)],
|
|
121
|
+
className: 'd-inline-block w-50 ps-4',
|
|
122
|
+
template: PersonalSettingsHalfRowComponent,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: "string" /* ePropType.String */,
|
|
126
|
+
name: 'email',
|
|
127
|
+
displayName: 'AbpIdentity::DisplayName:Email',
|
|
128
|
+
id: 'email-address',
|
|
129
|
+
validators: () => [required$3, email$1, maxLength$2(256)],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: "string" /* ePropType.String */,
|
|
133
|
+
name: 'phoneNumber',
|
|
134
|
+
displayName: 'AbpIdentity::DisplayName:PhoneNumber',
|
|
135
|
+
id: 'phone-number',
|
|
136
|
+
validators: () => [maxLength$2(16)],
|
|
137
|
+
},
|
|
138
|
+
]);
|
|
139
|
+
|
|
140
|
+
const DEFAULT_ACCOUNT_FORM_PROPS = {
|
|
141
|
+
["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS,
|
|
142
|
+
};
|
|
143
|
+
const ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS');
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated Use `accountExtensionsResolver` *function* instead.
|
|
147
|
+
*/
|
|
148
|
+
class AccountExtensionsGuard {
|
|
149
|
+
constructor() {
|
|
150
|
+
this.injector = inject(Injector);
|
|
151
|
+
this.extensions = inject(ExtensionsService);
|
|
87
152
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
this.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.pipe(catchError(err => {
|
|
97
|
-
this.toasterService.error(err.error?.error_description ||
|
|
98
|
-
err.error?.error.message ||
|
|
99
|
-
'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
|
|
100
|
-
return throwError(err);
|
|
101
|
-
}), finalize(() => (this.inProgress = false)))
|
|
102
|
-
.subscribe();
|
|
153
|
+
canActivate() {
|
|
154
|
+
const config = { optional: true };
|
|
155
|
+
const editFormContributors = inject(ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, config) || {};
|
|
156
|
+
return getObjectExtensionEntitiesFromStore(this.injector, 'Identity').pipe(map(entities => ({
|
|
157
|
+
["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: entities.User,
|
|
158
|
+
})), mapEntitiesToContributors(this.injector, 'AbpIdentity'), tap(objectExtensionContributors => {
|
|
159
|
+
mergeWithDefaultProps(this.extensions.editFormProps, DEFAULT_ACCOUNT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
|
|
160
|
+
}), map(() => true));
|
|
103
161
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
105
|
-
static { this.ɵ
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
163
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountExtensionsGuard }); }
|
|
106
164
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
108
|
-
type:
|
|
109
|
-
args: [{ standalone: false, selector: 'abp-login', template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n@if (isSelfRegistrationEnabled) {\r\n <strong>\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}\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\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</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" }]
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountExtensionsGuard, decorators: [{
|
|
166
|
+
type: Injectable
|
|
110
167
|
}] });
|
|
111
168
|
|
|
112
169
|
class ManageProfileStateService {
|
|
@@ -197,99 +254,119 @@ class ChangePasswordComponent {
|
|
|
197
254
|
},
|
|
198
255
|
});
|
|
199
256
|
}
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Injector }, { token:
|
|
201
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ChangePasswordComponent, isStandalone:
|
|
257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ChangePasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.Injector }, { token: i2$1.ToasterService }, { token: i2$2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
258
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ChangePasswordComponent, isStandalone: true, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" [validateOnSubmit]=\"true\" class=\"abp-md-form\">\r\n @if (!hideCurrentPassword) {\r\n <div 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 }\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: "ngmodule", type: ReactiveFormsModule }, { 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: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }] }); }
|
|
202
259
|
}
|
|
203
260
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ChangePasswordComponent, decorators: [{
|
|
204
261
|
type: Component,
|
|
205
|
-
args: [{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
262
|
+
args: [{ selector: 'abp-change-password-form', exportAs: 'abpChangePasswordForm', imports: [
|
|
263
|
+
ReactiveFormsModule,
|
|
264
|
+
LocalizationPipe,
|
|
265
|
+
ButtonComponent,
|
|
266
|
+
NgxValidateCoreModule,
|
|
267
|
+
AutofocusDirective,
|
|
268
|
+
], template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" [validateOnSubmit]=\"true\" class=\"abp-md-form\">\r\n @if (!hideCurrentPassword) {\r\n <div 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 }\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" }]
|
|
269
|
+
}], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i0.Injector }, { type: i2$1.ToasterService }, { type: i2$2.ProfileService }, { type: ManageProfileStateService }] });
|
|
209
270
|
|
|
210
|
-
class
|
|
211
|
-
constructor(
|
|
212
|
-
this.
|
|
213
|
-
this.
|
|
214
|
-
this.
|
|
215
|
-
this.
|
|
271
|
+
class ForgotPasswordComponent {
|
|
272
|
+
constructor(fb, accountService) {
|
|
273
|
+
this.fb = fb;
|
|
274
|
+
this.accountService = accountService;
|
|
275
|
+
this.isEmailSent = false;
|
|
276
|
+
this.form = this.fb.group({
|
|
277
|
+
email: ['', [Validators.required, Validators.email]],
|
|
278
|
+
});
|
|
216
279
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
280
|
+
onSubmit() {
|
|
281
|
+
if (this.form.invalid)
|
|
282
|
+
return;
|
|
283
|
+
this.inProgress = true;
|
|
284
|
+
this.accountService
|
|
285
|
+
.sendPasswordResetCode({
|
|
286
|
+
email: this.form.get('email')?.value,
|
|
287
|
+
appName: 'Angular',
|
|
288
|
+
})
|
|
289
|
+
.pipe(finalize(() => (this.inProgress = false)))
|
|
290
|
+
.subscribe(() => {
|
|
291
|
+
this.isEmailSent = true;
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$2.AccountService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
295
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ForgotPasswordComponent, isStandalone: true, selector: "abp-forgot-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isEmailSent) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [validateOnSubmit]=\"true\">\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} @else {\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}\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }] }); }
|
|
228
296
|
}
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type:
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
230
298
|
type: Component,
|
|
231
|
-
args: [{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
[
|
|
238
|
-
|
|
239
|
-
/>
|
|
240
|
-
</div>`, viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }]
|
|
241
|
-
}], ctorParameters: () => [{ type: i4$1.FormProp, decorators: [{
|
|
242
|
-
type: Inject,
|
|
243
|
-
args: [EXTENSIONS_FORM_PROP]
|
|
244
|
-
}] }] });
|
|
299
|
+
args: [{ selector: 'abp-forgot-password', imports: [
|
|
300
|
+
ReactiveFormsModule,
|
|
301
|
+
RouterModule,
|
|
302
|
+
LocalizationPipe,
|
|
303
|
+
ButtonComponent,
|
|
304
|
+
NgxValidateCoreModule,
|
|
305
|
+
], template: "<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isEmailSent) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [validateOnSubmit]=\"true\">\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} @else {\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}\r\n" }]
|
|
306
|
+
}], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i2$2.AccountService }] });
|
|
245
307
|
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
displayName: 'AbpIdentity::DisplayName:UserName',
|
|
252
|
-
id: 'username',
|
|
253
|
-
validators: () => [required$1, maxLength$1(256)],
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
type: "string" /* ePropType.String */,
|
|
257
|
-
name: 'name',
|
|
258
|
-
displayName: 'AbpIdentity::DisplayName:Name',
|
|
259
|
-
id: 'name',
|
|
260
|
-
validators: () => [maxLength$1(64)],
|
|
261
|
-
template: PersonalSettingsHalfRowComponent,
|
|
262
|
-
className: 'd-inline-block w-50',
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
type: "string" /* ePropType.String */,
|
|
266
|
-
name: 'surname',
|
|
267
|
-
displayName: 'AbpIdentity::DisplayName:Surname',
|
|
268
|
-
id: 'surname',
|
|
269
|
-
validators: () => [maxLength$1(64)],
|
|
270
|
-
className: 'd-inline-block w-50 ps-4',
|
|
271
|
-
template: PersonalSettingsHalfRowComponent,
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
type: "string" /* ePropType.String */,
|
|
275
|
-
name: 'email',
|
|
276
|
-
displayName: 'AbpIdentity::DisplayName:Email',
|
|
277
|
-
id: 'email-address',
|
|
278
|
-
validators: () => [required$1, email$1, maxLength$1(256)],
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
type: "string" /* ePropType.String */,
|
|
282
|
-
name: 'phoneNumber',
|
|
283
|
-
displayName: 'AbpIdentity::DisplayName:PhoneNumber',
|
|
284
|
-
id: 'phone-number',
|
|
285
|
-
validators: () => [maxLength$1(16)],
|
|
286
|
-
},
|
|
287
|
-
]);
|
|
308
|
+
function getRedirectUrl(injector) {
|
|
309
|
+
const route = injector.get(ActivatedRoute);
|
|
310
|
+
const options = injector.get(ACCOUNT_CONFIG_OPTIONS);
|
|
311
|
+
return route.snapshot.queryParams.returnUrl || options.redirectUrl || '/';
|
|
312
|
+
}
|
|
288
313
|
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
314
|
+
const { maxLength: maxLength$1, required: required$1 } = Validators;
|
|
315
|
+
class LoginComponent {
|
|
316
|
+
constructor() {
|
|
317
|
+
this.injector = inject(Injector);
|
|
318
|
+
this.fb = inject(UntypedFormBuilder);
|
|
319
|
+
this.toasterService = inject(ToasterService);
|
|
320
|
+
this.authService = inject(AuthService);
|
|
321
|
+
this.configState = inject(ConfigStateService);
|
|
322
|
+
this.isSelfRegistrationEnabled = true;
|
|
323
|
+
this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
|
|
324
|
+
}
|
|
325
|
+
ngOnInit() {
|
|
326
|
+
this.init();
|
|
327
|
+
this.buildForm();
|
|
328
|
+
}
|
|
329
|
+
init() {
|
|
330
|
+
this.isSelfRegistrationEnabled =
|
|
331
|
+
(this.configState.getSetting('Abp.Account.IsSelfRegistrationEnabled') || '').toLowerCase() !== 'false';
|
|
332
|
+
}
|
|
333
|
+
buildForm() {
|
|
334
|
+
this.form = this.fb.group({
|
|
335
|
+
username: ['', [required$1, maxLength$1(255)]],
|
|
336
|
+
password: ['', [required$1, maxLength$1(128)]],
|
|
337
|
+
rememberMe: [false],
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
onSubmit() {
|
|
341
|
+
if (this.form.invalid)
|
|
342
|
+
return;
|
|
343
|
+
this.inProgress = true;
|
|
344
|
+
const { username, password, rememberMe } = this.form.value;
|
|
345
|
+
const redirectUrl = getRedirectUrl(this.injector);
|
|
346
|
+
this.authService
|
|
347
|
+
.login({ username, password, rememberMe, redirectUrl })
|
|
348
|
+
.pipe(catchError(err => {
|
|
349
|
+
this.toasterService.error(err.error?.error_description ||
|
|
350
|
+
err.error?.error.message ||
|
|
351
|
+
'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
|
|
352
|
+
return throwError(err);
|
|
353
|
+
}), finalize(() => (this.inProgress = false)))
|
|
354
|
+
.subscribe();
|
|
355
|
+
}
|
|
356
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
357
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: LoginComponent, isStandalone: true, selector: "abp-login", ngImport: i0, template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n@if (isSelfRegistrationEnabled) {\r\n <strong>\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}\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\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</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: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "ngmodule", type: NgxValidateCoreModule$1 }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }] }); }
|
|
358
|
+
}
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: LoginComponent, decorators: [{
|
|
360
|
+
type: Component,
|
|
361
|
+
args: [{ selector: 'abp-login', imports: [
|
|
362
|
+
ReactiveFormsModule,
|
|
363
|
+
RouterModule,
|
|
364
|
+
LocalizationPipe,
|
|
365
|
+
ButtonComponent,
|
|
366
|
+
NgxValidateCoreModule$1,
|
|
367
|
+
AutofocusDirective,
|
|
368
|
+
], template: "<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>\r\n@if (isSelfRegistrationEnabled) {\r\n <strong>\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}\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\">{{\r\n 'AbpAccount::Password' | abpLocalization\r\n }}</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" }]
|
|
369
|
+
}] });
|
|
293
370
|
|
|
294
371
|
class PersonalSettingsComponent {
|
|
295
372
|
constructor() {
|
|
@@ -348,20 +425,26 @@ class PersonalSettingsComponent {
|
|
|
348
425
|
.subscribe(this.logoutConfirmation);
|
|
349
426
|
}
|
|
350
427
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PersonalSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
351
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: PersonalSettingsComponent, isStandalone:
|
|
428
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: PersonalSettingsComponent, isStandalone: true, selector: "abp-personal-settings-form", providers: [
|
|
352
429
|
{
|
|
353
430
|
provide: EXTENSIONS_IDENTIFIER,
|
|
354
431
|
useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
|
|
355
432
|
},
|
|
356
|
-
], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "@if (form) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit class=\"abp-md-form\">\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}\r\n", dependencies: [{ 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: "
|
|
433
|
+
], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "@if (form) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit class=\"abp-md-form\">\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}\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "component", type: ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
|
|
357
434
|
}
|
|
358
435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: PersonalSettingsComponent, decorators: [{
|
|
359
436
|
type: Component,
|
|
360
|
-
args: [{
|
|
437
|
+
args: [{ selector: 'abp-personal-settings-form', exportAs: 'abpPersonalSettingsForm', providers: [
|
|
361
438
|
{
|
|
362
439
|
provide: EXTENSIONS_IDENTIFIER,
|
|
363
440
|
useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
|
|
364
441
|
},
|
|
442
|
+
], imports: [
|
|
443
|
+
ReactiveFormsModule,
|
|
444
|
+
ExtensibleFormComponent,
|
|
445
|
+
NgxValidateCoreModule,
|
|
446
|
+
ButtonComponent,
|
|
447
|
+
LocalizationPipe,
|
|
365
448
|
], template: "@if (form) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit class=\"abp-md-form\">\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}\r\n" }]
|
|
366
449
|
}] });
|
|
367
450
|
|
|
@@ -383,13 +466,21 @@ class ManageProfileComponent {
|
|
|
383
466
|
}
|
|
384
467
|
});
|
|
385
468
|
}
|
|
386
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ManageProfileComponent, deps: [{ token: i2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
387
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ManageProfileComponent, isStandalone:
|
|
469
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ManageProfileComponent, deps: [{ token: i2$2.ProfileService }, { token: ManageProfileStateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
470
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ManageProfileComponent, isStandalone: true, selector: "abp-manage-profile", ngImport: i0, template: "<div id=\"AbpContentToolbar\"></div>\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 @if (!hideChangePasswordTab && (profile$ | async)) {\r\n <li class=\"nav-item\" (click)=\"selectedTab = 0\">\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 }\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 @if (profile$ | async) {\r\n <div class=\"col-12 col-md-9\">\r\n @if (selectedTab === 0) {\r\n <div class=\"tab-content\" [@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 }\r\n @if (selectedTab === 1) {\r\n <div class=\"tab-content\" [@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 }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: PersonalSettingsComponent, selector: "abp-personal-settings-form", exportAs: ["abpPersonalSettingsForm"] }, { kind: "component", type: ChangePasswordComponent, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: LoadingDirective, selector: "[abpLoading]", inputs: ["abpLoading", "abpLoadingTargetElement", "abpLoadingDelay"] }], animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])] }); }
|
|
388
471
|
}
|
|
389
472
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ManageProfileComponent, decorators: [{
|
|
390
473
|
type: Component,
|
|
391
|
-
args: [{
|
|
392
|
-
|
|
474
|
+
args: [{ selector: 'abp-manage-profile', animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])], imports: [
|
|
475
|
+
CommonModule,
|
|
476
|
+
ReactiveFormsModule,
|
|
477
|
+
PersonalSettingsComponent,
|
|
478
|
+
ChangePasswordComponent,
|
|
479
|
+
LocalizationPipe,
|
|
480
|
+
ReplaceableTemplateDirective,
|
|
481
|
+
LoadingDirective,
|
|
482
|
+
], template: "<div id=\"AbpContentToolbar\"></div>\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 @if (!hideChangePasswordTab && (profile$ | async)) {\r\n <li class=\"nav-item\" (click)=\"selectedTab = 0\">\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 }\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 @if (profile$ | async) {\r\n <div class=\"col-12 col-md-9\">\r\n @if (selectedTab === 0) {\r\n <div class=\"tab-content\" [@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 }\r\n @if (selectedTab === 1) {\r\n <div class=\"tab-content\" [@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 }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"] }]
|
|
483
|
+
}], ctorParameters: () => [{ type: i2$2.ProfileService }, { type: ManageProfileStateService }] });
|
|
393
484
|
|
|
394
485
|
const { maxLength, required, email } = Validators;
|
|
395
486
|
class RegisterComponent {
|
|
@@ -450,13 +541,20 @@ class RegisterComponent {
|
|
|
450
541
|
}), finalize(() => (this.inProgress = false)))
|
|
451
542
|
.subscribe();
|
|
452
543
|
}
|
|
453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RegisterComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }, { token: i3$
|
|
454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: RegisterComponent, isStandalone:
|
|
544
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RegisterComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$2.AccountService }, { token: i3$2.ConfigStateService }, { token: i2$1.ToasterService }, { token: i3$2.AuthService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
545
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: RegisterComponent, isStandalone: true, 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@if (isSelfRegistrationEnabled) {\r\n <form\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}\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }] }); }
|
|
455
546
|
}
|
|
456
547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: RegisterComponent, decorators: [{
|
|
457
548
|
type: Component,
|
|
458
|
-
args: [{
|
|
459
|
-
|
|
549
|
+
args: [{ selector: 'abp-register', imports: [
|
|
550
|
+
ReactiveFormsModule,
|
|
551
|
+
RouterModule,
|
|
552
|
+
NgxValidateCoreModule,
|
|
553
|
+
LocalizationPipe,
|
|
554
|
+
ButtonComponent,
|
|
555
|
+
AutofocusDirective,
|
|
556
|
+
], 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@if (isSelfRegistrationEnabled) {\r\n <form\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}\r\n" }]
|
|
557
|
+
}], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i2$2.AccountService }, { type: i3$2.ConfigStateService }, { type: i2$1.ToasterService }, { type: i3$2.AuthService }, { type: i0.Injector }] });
|
|
460
558
|
|
|
461
559
|
const PASSWORD_FIELDS = ['password', 'confirmPassword'];
|
|
462
560
|
class ResetPasswordComponent {
|
|
@@ -503,64 +601,19 @@ class ResetPasswordComponent {
|
|
|
503
601
|
this.isPasswordReset = true;
|
|
504
602
|
});
|
|
505
603
|
}
|
|
506
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.AccountService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
507
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ResetPasswordComponent, isStandalone:
|
|
604
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$2.AccountService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
605
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.8", type: ResetPasswordComponent, isStandalone: true, selector: "abp-reset-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isPasswordReset) {\r\n <form [formGroup]=\"form\" [mapErrorsFn]=\"mapErrorsFn\" (ngSubmit)=\"onSubmit()\" validateOnSubmit>\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-outline-primary\" 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} @else {\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}\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }, { kind: "component", type: ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }] }); }
|
|
508
606
|
}
|
|
509
607
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: ResetPasswordComponent, decorators: [{
|
|
510
608
|
type: Component,
|
|
511
|
-
args: [{
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
class
|
|
518
|
-
|
|
519
|
-
this.authService = inject(AuthService);
|
|
520
|
-
}
|
|
521
|
-
canActivate() {
|
|
522
|
-
if (this.authService.isInternalAuth)
|
|
523
|
-
return true;
|
|
524
|
-
this.authService.navigateToLogin();
|
|
525
|
-
return false;
|
|
526
|
-
}
|
|
527
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthenticationFlowGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
528
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthenticationFlowGuard }); }
|
|
529
|
-
}
|
|
530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AuthenticationFlowGuard, decorators: [{
|
|
531
|
-
type: Injectable
|
|
532
|
-
}] });
|
|
533
|
-
const authenticationFlowGuard = () => {
|
|
534
|
-
const authService = inject(AuthService);
|
|
535
|
-
if (authService.isInternalAuth)
|
|
536
|
-
return true;
|
|
537
|
-
authService.navigateToLogin();
|
|
538
|
-
return false;
|
|
539
|
-
};
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* @deprecated Use `accountExtensionsResolver` *function* instead.
|
|
543
|
-
*/
|
|
544
|
-
class AccountExtensionsGuard {
|
|
545
|
-
constructor() {
|
|
546
|
-
this.injector = inject(Injector);
|
|
547
|
-
this.extensions = inject(ExtensionsService);
|
|
548
|
-
}
|
|
549
|
-
canActivate() {
|
|
550
|
-
const config = { optional: true };
|
|
551
|
-
const editFormContributors = inject(ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, config) || {};
|
|
552
|
-
return getObjectExtensionEntitiesFromStore(this.injector, 'Identity').pipe(map(entities => ({
|
|
553
|
-
["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: entities.User,
|
|
554
|
-
})), mapEntitiesToContributors(this.injector, 'AbpIdentity'), tap(objectExtensionContributors => {
|
|
555
|
-
mergeWithDefaultProps(this.extensions.editFormProps, DEFAULT_ACCOUNT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
|
|
556
|
-
}), map(() => true));
|
|
557
|
-
}
|
|
558
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
559
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountExtensionsGuard }); }
|
|
560
|
-
}
|
|
561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountExtensionsGuard, decorators: [{
|
|
562
|
-
type: Injectable
|
|
563
|
-
}] });
|
|
609
|
+
args: [{ selector: 'abp-reset-password', imports: [
|
|
610
|
+
ReactiveFormsModule,
|
|
611
|
+
RouterModule,
|
|
612
|
+
NgxValidateCoreModule,
|
|
613
|
+
LocalizationPipe,
|
|
614
|
+
ButtonComponent,
|
|
615
|
+
], template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isPasswordReset) {\r\n <form [formGroup]=\"form\" [mapErrorsFn]=\"mapErrorsFn\" (ngSubmit)=\"onSubmit()\" validateOnSubmit>\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-outline-primary\" 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} @else {\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}\r\n" }]
|
|
616
|
+
}], ctorParameters: () => [{ type: i1.UntypedFormBuilder }, { type: i2$2.AccountService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i0.Injector }] });
|
|
564
617
|
|
|
565
618
|
const accountExtensionsResolver = () => {
|
|
566
619
|
const injector = inject(Injector);
|
|
@@ -574,7 +627,7 @@ const accountExtensionsResolver = () => {
|
|
|
574
627
|
}));
|
|
575
628
|
};
|
|
576
629
|
|
|
577
|
-
const canActivate = [authenticationFlowGuard];
|
|
630
|
+
const canActivate$1 = [authenticationFlowGuard];
|
|
578
631
|
const routes = [
|
|
579
632
|
{ path: '', pathMatch: 'full', redirectTo: 'login' },
|
|
580
633
|
{
|
|
@@ -584,7 +637,7 @@ const routes = [
|
|
|
584
637
|
{
|
|
585
638
|
path: 'login',
|
|
586
639
|
component: ReplaceableRouteContainerComponent,
|
|
587
|
-
canActivate,
|
|
640
|
+
canActivate: canActivate$1,
|
|
588
641
|
data: {
|
|
589
642
|
replaceableComponent: {
|
|
590
643
|
key: "Account.LoginComponent" /* eAccountComponents.Login */,
|
|
@@ -596,7 +649,7 @@ const routes = [
|
|
|
596
649
|
{
|
|
597
650
|
path: 'register',
|
|
598
651
|
component: ReplaceableRouteContainerComponent,
|
|
599
|
-
canActivate,
|
|
652
|
+
canActivate: canActivate$1,
|
|
600
653
|
data: {
|
|
601
654
|
replaceableComponent: {
|
|
602
655
|
key: "Account.RegisterComponent" /* eAccountComponents.Register */,
|
|
@@ -608,7 +661,7 @@ const routes = [
|
|
|
608
661
|
{
|
|
609
662
|
path: 'forgot-password',
|
|
610
663
|
component: ReplaceableRouteContainerComponent,
|
|
611
|
-
canActivate,
|
|
664
|
+
canActivate: canActivate$1,
|
|
612
665
|
data: {
|
|
613
666
|
replaceableComponent: {
|
|
614
667
|
key: "Account.ForgotPasswordComponent" /* eAccountComponents.ForgotPassword */,
|
|
@@ -659,23 +712,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
659
712
|
}]
|
|
660
713
|
}] });
|
|
661
714
|
|
|
662
|
-
function accountConfigOptionsFactory(options) {
|
|
663
|
-
return {
|
|
664
|
-
redirectUrl: '/',
|
|
665
|
-
...options,
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
const declarations = [
|
|
670
|
-
LoginComponent,
|
|
671
|
-
RegisterComponent,
|
|
672
|
-
ChangePasswordComponent,
|
|
673
|
-
ManageProfileComponent,
|
|
674
|
-
PersonalSettingsComponent,
|
|
675
|
-
ForgotPasswordComponent,
|
|
676
|
-
ResetPasswordComponent,
|
|
677
|
-
PersonalSettingsHalfRowComponent,
|
|
678
|
-
];
|
|
679
715
|
class AccountModule {
|
|
680
716
|
static forChild(options = {}) {
|
|
681
717
|
return {
|
|
@@ -700,58 +736,139 @@ class AccountModule {
|
|
|
700
736
|
],
|
|
701
737
|
};
|
|
702
738
|
}
|
|
739
|
+
/**
|
|
740
|
+
* @deprecated `AccountModule.forLazy()` is deprecated. You can use `createRoutes` **function** instead.
|
|
741
|
+
*/
|
|
703
742
|
static forLazy(options = {}) {
|
|
704
743
|
return new LazyModuleFactory(AccountModule.forChild(options));
|
|
705
744
|
}
|
|
706
745
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
707
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: AccountModule,
|
|
746
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: AccountModule, imports: [LoginComponent,
|
|
708
747
|
RegisterComponent,
|
|
709
|
-
ChangePasswordComponent,
|
|
710
|
-
ManageProfileComponent,
|
|
711
|
-
PersonalSettingsComponent,
|
|
712
748
|
ForgotPasswordComponent,
|
|
713
749
|
ResetPasswordComponent,
|
|
714
|
-
PersonalSettingsHalfRowComponent], imports: [CoreModule,
|
|
715
|
-
AccountRoutingModule,
|
|
716
|
-
ThemeSharedModule,
|
|
717
|
-
NgbDropdownModule,
|
|
718
|
-
NgxValidateCoreModule,
|
|
719
|
-
ExtensibleModule], exports: [LoginComponent,
|
|
720
|
-
RegisterComponent,
|
|
721
|
-
ChangePasswordComponent,
|
|
722
750
|
ManageProfileComponent,
|
|
723
|
-
|
|
751
|
+
AccountRoutingModule] }); }
|
|
752
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountModule, imports: [LoginComponent,
|
|
753
|
+
RegisterComponent,
|
|
724
754
|
ForgotPasswordComponent,
|
|
725
755
|
ResetPasswordComponent,
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
AccountRoutingModule,
|
|
729
|
-
ThemeSharedModule,
|
|
730
|
-
NgbDropdownModule,
|
|
731
|
-
NgxValidateCoreModule,
|
|
732
|
-
ExtensibleModule] }); }
|
|
756
|
+
ManageProfileComponent,
|
|
757
|
+
AccountRoutingModule] }); }
|
|
733
758
|
}
|
|
734
759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AccountModule, decorators: [{
|
|
735
760
|
type: NgModule,
|
|
736
761
|
args: [{
|
|
737
|
-
declarations: [
|
|
762
|
+
declarations: [],
|
|
738
763
|
imports: [
|
|
739
|
-
|
|
764
|
+
LoginComponent,
|
|
765
|
+
RegisterComponent,
|
|
766
|
+
ForgotPasswordComponent,
|
|
767
|
+
ResetPasswordComponent,
|
|
768
|
+
ManageProfileComponent,
|
|
740
769
|
AccountRoutingModule,
|
|
741
|
-
ThemeSharedModule,
|
|
742
|
-
NgbDropdownModule,
|
|
743
|
-
NgxValidateCoreModule,
|
|
744
|
-
ExtensibleModule,
|
|
745
770
|
],
|
|
746
|
-
exports: [
|
|
771
|
+
exports: [],
|
|
747
772
|
}]
|
|
748
773
|
}] });
|
|
749
774
|
|
|
750
775
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
751
776
|
|
|
777
|
+
function provideAccount(options = {}) {
|
|
778
|
+
return [
|
|
779
|
+
{ provide: ACCOUNT_CONFIG_OPTIONS, useValue: options },
|
|
780
|
+
{
|
|
781
|
+
provide: 'ACCOUNT_OPTIONS',
|
|
782
|
+
useFactory: accountConfigOptionsFactory,
|
|
783
|
+
deps: [ACCOUNT_CONFIG_OPTIONS],
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
provide: RE_LOGIN_CONFIRMATION_TOKEN,
|
|
787
|
+
useValue: options.isPersonalSettingsChangedConfirmationActive ?? true,
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS,
|
|
791
|
+
useValue: options.editFormPropContributors,
|
|
792
|
+
},
|
|
793
|
+
];
|
|
794
|
+
}
|
|
795
|
+
const canActivate = [authenticationFlowGuard];
|
|
796
|
+
const createRoutes = (options = {}) => [
|
|
797
|
+
{
|
|
798
|
+
path: '',
|
|
799
|
+
component: RouterOutletComponent,
|
|
800
|
+
providers: provideAccount(options),
|
|
801
|
+
children: [
|
|
802
|
+
{ path: '', pathMatch: 'full', redirectTo: 'login' },
|
|
803
|
+
{
|
|
804
|
+
path: 'login',
|
|
805
|
+
component: ReplaceableRouteContainerComponent,
|
|
806
|
+
canActivate,
|
|
807
|
+
data: {
|
|
808
|
+
replaceableComponent: {
|
|
809
|
+
key: "Account.LoginComponent" /* eAccountComponents.Login */,
|
|
810
|
+
defaultComponent: LoginComponent,
|
|
811
|
+
},
|
|
812
|
+
},
|
|
813
|
+
title: 'AbpAccount::Login',
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
path: 'register',
|
|
817
|
+
component: ReplaceableRouteContainerComponent,
|
|
818
|
+
canActivate,
|
|
819
|
+
data: {
|
|
820
|
+
replaceableComponent: {
|
|
821
|
+
key: "Account.RegisterComponent" /* eAccountComponents.Register */,
|
|
822
|
+
defaultComponent: RegisterComponent,
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
title: 'AbpAccount::Register',
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
path: 'forgot-password',
|
|
829
|
+
component: ReplaceableRouteContainerComponent,
|
|
830
|
+
canActivate,
|
|
831
|
+
data: {
|
|
832
|
+
replaceableComponent: {
|
|
833
|
+
key: "Account.ForgotPasswordComponent" /* eAccountComponents.ForgotPassword */,
|
|
834
|
+
defaultComponent: ForgotPasswordComponent,
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
title: 'AbpAccount::ForgotPassword',
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
path: 'reset-password',
|
|
841
|
+
component: ReplaceableRouteContainerComponent,
|
|
842
|
+
canActivate: [],
|
|
843
|
+
data: {
|
|
844
|
+
tenantBoxVisible: false,
|
|
845
|
+
replaceableComponent: {
|
|
846
|
+
key: "Account.ResetPasswordComponent" /* eAccountComponents.ResetPassword */,
|
|
847
|
+
defaultComponent: ResetPasswordComponent,
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
title: 'AbpAccount::ResetPassword',
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
path: 'manage',
|
|
854
|
+
component: ReplaceableRouteContainerComponent,
|
|
855
|
+
canActivate: [authGuard],
|
|
856
|
+
resolve: [accountExtensionsResolver],
|
|
857
|
+
data: {
|
|
858
|
+
replaceableComponent: {
|
|
859
|
+
key: "Account.ManageProfileComponent" /* eAccountComponents.ManageProfile */,
|
|
860
|
+
defaultComponent: ManageProfileComponent,
|
|
861
|
+
},
|
|
862
|
+
},
|
|
863
|
+
title: 'AbpAccount::MyAccount',
|
|
864
|
+
},
|
|
865
|
+
],
|
|
866
|
+
},
|
|
867
|
+
];
|
|
868
|
+
|
|
752
869
|
/**
|
|
753
870
|
* Generated bundle index. Do not edit.
|
|
754
871
|
*/
|
|
755
872
|
|
|
756
|
-
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, accountConfigOptionsFactory, accountExtensionsResolver, authenticationFlowGuard, getRedirectUrl };
|
|
873
|
+
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, accountConfigOptionsFactory, accountExtensionsResolver, authenticationFlowGuard, createRoutes, getRedirectUrl, provideAccount };
|
|
757
874
|
//# sourceMappingURL=abp-ng.account.mjs.map
|