@abp/ng.account 10.5.0 → 10.6.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthService, LocalizationPipe, InternalStore, AutofocusDirective, ConfigStateService, NgxValidateCoreModule as NgxValidateCoreModule$1, ReplaceableTemplateDirective, ReplaceableRouteContainerComponent, authGuard, RouterOutletComponent, LazyModuleFactory } from '@abp/ng.core';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject, Injectable, Component, Injector, signal, NgModule } from '@angular/core';
|
|
3
|
+
import { InjectionToken, inject, Injectable, ChangeDetectionStrategy, Component, Injector, signal, effect, NgModule } from '@angular/core';
|
|
4
4
|
import { EXTENSIONS_FORM_PROP, EXTENSIBLE_FORM_VIEW_PROVIDER, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps, FormPropData, generateFormFromProps, ExtensibleFormComponent, EXTENSIONS_IDENTIFIER } from '@abp/ng.components/extensible';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { ReactiveFormsModule, Validators, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
|
@@ -36,10 +36,10 @@ class AuthenticationFlowGuard {
|
|
|
36
36
|
this.authService.navigateToLogin();
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
40
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AuthenticationFlowGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
40
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AuthenticationFlowGuard }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AuthenticationFlowGuard, decorators: [{
|
|
43
43
|
type: Injectable
|
|
44
44
|
}] });
|
|
45
45
|
const authenticationFlowGuard = () => {
|
|
@@ -60,8 +60,8 @@ class PersonalSettingsHalfRowComponent {
|
|
|
60
60
|
this.name = propData.name;
|
|
61
61
|
this.id = propData.id || '';
|
|
62
62
|
}
|
|
63
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PersonalSettingsHalfRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: PersonalSettingsHalfRowComponent, isStandalone: true, selector: "abp-personal-settings-half-row", ngImport: i0, template: ` <div class="w-50 d-inline">
|
|
65
65
|
<label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
|
|
66
66
|
<input
|
|
67
67
|
type="text"
|
|
@@ -70,11 +70,11 @@ class PersonalSettingsHalfRowComponent {
|
|
|
70
70
|
[attr.name]="name"
|
|
71
71
|
[formControlName]="name"
|
|
72
72
|
/>
|
|
73
|
-
</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] }); }
|
|
73
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
74
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PersonalSettingsHalfRowComponent, decorators: [{
|
|
76
76
|
type: Component,
|
|
77
|
-
args: [{ selector: 'abp-personal-settings-half-row', template: ` <div class="w-50 d-inline">
|
|
77
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-personal-settings-half-row', template: ` <div class="w-50 d-inline">
|
|
78
78
|
<label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
|
|
79
79
|
<input
|
|
80
80
|
type="text"
|
|
@@ -151,10 +151,10 @@ class AccountExtensionsGuard {
|
|
|
151
151
|
mergeWithDefaultProps(this.extensions.editFormProps, DEFAULT_ACCOUNT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
|
|
152
152
|
}), map(() => true));
|
|
153
153
|
}
|
|
154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
155
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountExtensionsGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
155
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountExtensionsGuard }); }
|
|
156
156
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountExtensionsGuard, decorators: [{
|
|
158
158
|
type: Injectable
|
|
159
159
|
}] });
|
|
160
160
|
|
|
@@ -174,10 +174,10 @@ class ManageProfileStateService {
|
|
|
174
174
|
setProfile(profile) {
|
|
175
175
|
this.store.patch({ profile });
|
|
176
176
|
}
|
|
177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
178
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
177
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ManageProfileStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
178
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ManageProfileStateService, providedIn: 'root' }); }
|
|
179
179
|
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ManageProfileStateService, decorators: [{
|
|
181
181
|
type: Injectable,
|
|
182
182
|
args: [{ providedIn: 'root' }]
|
|
183
183
|
}] });
|
|
@@ -191,6 +191,10 @@ class ChangePasswordComponent {
|
|
|
191
191
|
this.toasterService = inject(ToasterService);
|
|
192
192
|
this.profileService = inject(ProfileService);
|
|
193
193
|
this.manageProfileState = inject(ManageProfileStateService);
|
|
194
|
+
this.inProgress = signal(false, /* @ts-ignore */
|
|
195
|
+
...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
|
|
196
|
+
this.hideCurrentPassword = signal(false, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "hideCurrentPassword" }] : /* istanbul ignore next */ []));
|
|
194
198
|
this.mapErrorsFn = (errors, groupErrors, control) => {
|
|
195
199
|
if (PASSWORD_FIELDS$1.indexOf(String(control?.name)) < 0)
|
|
196
200
|
return errors;
|
|
@@ -198,7 +202,7 @@ class ChangePasswordComponent {
|
|
|
198
202
|
};
|
|
199
203
|
}
|
|
200
204
|
ngOnInit() {
|
|
201
|
-
this.hideCurrentPassword
|
|
205
|
+
this.hideCurrentPassword.set(!this.manageProfileState.getProfile()?.hasPassword);
|
|
202
206
|
const passwordValidations = getPasswordValidators(this.injector);
|
|
203
207
|
this.form = this.fb.group({
|
|
204
208
|
password: ['', required$2],
|
|
@@ -217,27 +221,27 @@ class ChangePasswordComponent {
|
|
|
217
221
|
}, {
|
|
218
222
|
validators: [comparePasswords(PASSWORD_FIELDS$1)],
|
|
219
223
|
});
|
|
220
|
-
if (this.hideCurrentPassword)
|
|
224
|
+
if (this.hideCurrentPassword())
|
|
221
225
|
this.form.removeControl('password');
|
|
222
226
|
}
|
|
223
227
|
onSubmit() {
|
|
224
228
|
if (this.form.invalid)
|
|
225
229
|
return;
|
|
226
|
-
this.inProgress
|
|
230
|
+
this.inProgress.set(true);
|
|
227
231
|
this.profileService
|
|
228
232
|
.changePassword({
|
|
229
|
-
...(!this.hideCurrentPassword && { currentPassword: this.form.get('password')?.value }),
|
|
233
|
+
...(!this.hideCurrentPassword() && { currentPassword: this.form.get('password')?.value }),
|
|
230
234
|
newPassword: this.form.get('newPassword')?.value,
|
|
231
235
|
})
|
|
232
|
-
.pipe(finalize(() =>
|
|
236
|
+
.pipe(finalize(() => this.inProgress.set(false)))
|
|
233
237
|
.subscribe({
|
|
234
238
|
next: () => {
|
|
235
239
|
this.form.reset();
|
|
236
240
|
this.toasterService.success('AbpAccount::PasswordChangedMessage', '', {
|
|
237
241
|
life: 5000,
|
|
238
242
|
});
|
|
239
|
-
if (this.hideCurrentPassword) {
|
|
240
|
-
this.hideCurrentPassword
|
|
243
|
+
if (this.hideCurrentPassword()) {
|
|
244
|
+
this.hideCurrentPassword.set(false);
|
|
241
245
|
this.form.addControl('password', new UntypedFormControl('', [required$2]));
|
|
242
246
|
}
|
|
243
247
|
},
|
|
@@ -246,25 +250,28 @@ class ChangePasswordComponent {
|
|
|
246
250
|
},
|
|
247
251
|
});
|
|
248
252
|
}
|
|
249
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
250
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChangePasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
254
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ChangePasswordComponent, isStandalone: true, selector: "abp-change-password-form", exportAs: ["abpChangePasswordForm"], ngImport: i0, template: "<form\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n [validateOnSubmit]=\"true\"\r\n class=\"abp-md-form\"\r\n>\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 >\r\n {{ 'AbpIdentity::Save' | 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "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: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
251
255
|
}
|
|
252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ChangePasswordComponent, decorators: [{
|
|
253
257
|
type: Component,
|
|
254
|
-
args: [{ selector: 'abp-change-password-form', exportAs: 'abpChangePasswordForm', imports: [
|
|
258
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-change-password-form', exportAs: 'abpChangePasswordForm', imports: [
|
|
255
259
|
ReactiveFormsModule,
|
|
256
260
|
LocalizationPipe,
|
|
257
261
|
ButtonComponent,
|
|
258
262
|
NgxValidateCoreModule,
|
|
259
263
|
AutofocusDirective,
|
|
260
|
-
], template: "<form
|
|
264
|
+
], template: "<form\r\n [formGroup]=\"form\"\r\n (ngSubmit)=\"onSubmit()\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n [validateOnSubmit]=\"true\"\r\n class=\"abp-md-form\"\r\n>\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 >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}\r\n </abp-button>\r\n</form>\r\n" }]
|
|
261
265
|
}] });
|
|
262
266
|
|
|
263
267
|
class ForgotPasswordComponent {
|
|
264
268
|
constructor() {
|
|
265
269
|
this.fb = inject(UntypedFormBuilder);
|
|
266
270
|
this.accountService = inject(AccountService);
|
|
267
|
-
this.
|
|
271
|
+
this.inProgress = signal(false, /* @ts-ignore */
|
|
272
|
+
...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
|
|
273
|
+
this.isEmailSent = signal(false, /* @ts-ignore */
|
|
274
|
+
...(ngDevMode ? [{ debugName: "isEmailSent" }] : /* istanbul ignore next */ []));
|
|
268
275
|
this.form = this.fb.group({
|
|
269
276
|
email: ['', [Validators.required, Validators.email]],
|
|
270
277
|
});
|
|
@@ -272,29 +279,29 @@ class ForgotPasswordComponent {
|
|
|
272
279
|
onSubmit() {
|
|
273
280
|
if (this.form.invalid)
|
|
274
281
|
return;
|
|
275
|
-
this.inProgress
|
|
282
|
+
this.inProgress.set(true);
|
|
276
283
|
this.accountService
|
|
277
284
|
.sendPasswordResetCode({
|
|
278
285
|
email: this.form.get('email')?.value,
|
|
279
286
|
appName: 'Angular',
|
|
280
287
|
})
|
|
281
|
-
.pipe(finalize(() =>
|
|
288
|
+
.pipe(finalize(() => this.inProgress.set(false)))
|
|
282
289
|
.subscribe(() => {
|
|
283
|
-
this.isEmailSent
|
|
290
|
+
this.isEmailSent.set(true);
|
|
284
291
|
});
|
|
285
292
|
}
|
|
286
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
287
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
294
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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 }}\r\n </a>\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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { 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: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
288
295
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
290
297
|
type: Component,
|
|
291
|
-
args: [{ selector: 'abp-forgot-password', imports: [
|
|
298
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-forgot-password', imports: [
|
|
292
299
|
ReactiveFormsModule,
|
|
293
300
|
RouterLink,
|
|
294
301
|
LocalizationPipe,
|
|
295
302
|
ButtonComponent,
|
|
296
303
|
NgxValidateCoreModule,
|
|
297
|
-
], 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
|
|
304
|
+
], 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 }}\r\n </a>\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" }]
|
|
298
305
|
}], ctorParameters: () => [] });
|
|
299
306
|
|
|
300
307
|
function getRedirectUrl(injector) {
|
|
@@ -311,6 +318,8 @@ class LoginComponent {
|
|
|
311
318
|
this.toasterService = inject(ToasterService);
|
|
312
319
|
this.authService = inject(AuthService);
|
|
313
320
|
this.configState = inject(ConfigStateService);
|
|
321
|
+
this.inProgress = signal(false, /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
|
|
314
323
|
this.isSelfRegistrationEnabled = true;
|
|
315
324
|
this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
|
|
316
325
|
}
|
|
@@ -332,7 +341,7 @@ class LoginComponent {
|
|
|
332
341
|
onSubmit() {
|
|
333
342
|
if (this.form.invalid)
|
|
334
343
|
return;
|
|
335
|
-
this.inProgress
|
|
344
|
+
this.inProgress.set(true);
|
|
336
345
|
const { username, password, rememberMe } = this.form.value;
|
|
337
346
|
const redirectUrl = getRedirectUrl(this.injector);
|
|
338
347
|
this.authService
|
|
@@ -341,23 +350,23 @@ class LoginComponent {
|
|
|
341
350
|
this.toasterService.error(err.error?.error_description ||
|
|
342
351
|
err.error?.error.message ||
|
|
343
352
|
'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
|
|
344
|
-
return throwError(err);
|
|
345
|
-
}), finalize(() =>
|
|
353
|
+
return throwError(() => err);
|
|
354
|
+
}), finalize(() => this.inProgress.set(false)))
|
|
346
355
|
.subscribe();
|
|
347
356
|
}
|
|
348
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
349
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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]=\"true\" 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { 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: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
350
359
|
}
|
|
351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LoginComponent, decorators: [{
|
|
352
361
|
type: Component,
|
|
353
|
-
args: [{ selector: 'abp-login', imports: [
|
|
362
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-login', imports: [
|
|
354
363
|
ReactiveFormsModule,
|
|
355
364
|
RouterLink,
|
|
356
365
|
LocalizationPipe,
|
|
357
366
|
ButtonComponent,
|
|
358
367
|
NgxValidateCoreModule$1,
|
|
359
368
|
AutofocusDirective,
|
|
360
|
-
], 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
|
+
], 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]=\"true\" 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" }]
|
|
361
370
|
}] });
|
|
362
371
|
|
|
363
372
|
class PersonalSettingsComponent {
|
|
@@ -371,6 +380,8 @@ class PersonalSettingsComponent {
|
|
|
371
380
|
this.configState = inject(ConfigStateService);
|
|
372
381
|
this.isPersonalSettingsChangedConfirmationActive = inject(RE_LOGIN_CONFIRMATION_TOKEN);
|
|
373
382
|
this.injector = inject(Injector);
|
|
383
|
+
this.inProgress = signal(false, /* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
|
|
374
385
|
this.logoutConfirmation = () => {
|
|
375
386
|
this.authService.logout().subscribe();
|
|
376
387
|
};
|
|
@@ -391,10 +402,10 @@ class PersonalSettingsComponent {
|
|
|
391
402
|
return;
|
|
392
403
|
const isLogOutConfirmMessageVisible = this.isLogoutConfirmMessageActive();
|
|
393
404
|
const isRefreshTokenExists = this.authService.getRefreshToken();
|
|
394
|
-
this.inProgress
|
|
405
|
+
this.inProgress.set(true);
|
|
395
406
|
this.profileService
|
|
396
407
|
.update(this.form.value)
|
|
397
|
-
.pipe(finalize(() =>
|
|
408
|
+
.pipe(finalize(() => this.inProgress.set(false)))
|
|
398
409
|
.subscribe(profile => {
|
|
399
410
|
this.manageProfileState.setProfile(profile);
|
|
400
411
|
this.configState.refreshAppState();
|
|
@@ -416,17 +427,17 @@ class PersonalSettingsComponent {
|
|
|
416
427
|
.pipe(filter(status => status === Confirmation.Status.confirm))
|
|
417
428
|
.subscribe(this.logoutConfirmation);
|
|
418
429
|
}
|
|
419
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
420
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PersonalSettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
431
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: PersonalSettingsComponent, isStandalone: true, selector: "abp-personal-settings-form", providers: [
|
|
421
432
|
{
|
|
422
433
|
provide: EXTENSIONS_IDENTIFIER,
|
|
423
434
|
useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
|
|
424
435
|
},
|
|
425
|
-
], 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\"
|
|
436
|
+
], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "@if (form) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" [validateOnSubmit]=\"true\" class=\"abp-md-form\">\r\n <abp-extensible-form [selectedRecord]=\"selected\" />\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 }}\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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: i2.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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
426
437
|
}
|
|
427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PersonalSettingsComponent, decorators: [{
|
|
428
439
|
type: Component,
|
|
429
|
-
args: [{ selector: 'abp-personal-settings-form', exportAs: 'abpPersonalSettingsForm', providers: [
|
|
440
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-personal-settings-form', exportAs: 'abpPersonalSettingsForm', providers: [
|
|
430
441
|
{
|
|
431
442
|
provide: EXTENSIONS_IDENTIFIER,
|
|
432
443
|
useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
|
|
@@ -437,45 +448,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
437
448
|
NgxValidateCoreModule,
|
|
438
449
|
ButtonComponent,
|
|
439
450
|
LocalizationPipe,
|
|
440
|
-
], template: "@if (form) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit class=\"abp-md-form\">\r\n <abp-extensible-form [selectedRecord]=\"selected\"
|
|
451
|
+
], template: "@if (form) {\r\n <form [formGroup]=\"form\" (ngSubmit)=\"submit()\" [validateOnSubmit]=\"true\" class=\"abp-md-form\">\r\n <abp-extensible-form [selectedRecord]=\"selected\" />\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 }}\r\n </abp-button>\r\n </form>\r\n}\r\n" }]
|
|
441
452
|
}] });
|
|
442
453
|
|
|
443
454
|
class ManageProfileComponent {
|
|
444
455
|
constructor() {
|
|
445
456
|
this.profileService = inject(ProfileService);
|
|
446
457
|
this.manageProfileState = inject(ManageProfileStateService);
|
|
447
|
-
this.selectedTab = 0
|
|
458
|
+
this.selectedTab = signal(0, /* @ts-ignore */
|
|
459
|
+
...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
|
|
460
|
+
this.hideChangePasswordTab = signal(false, /* @ts-ignore */
|
|
461
|
+
...(ngDevMode ? [{ debugName: "hideChangePasswordTab" }] : /* istanbul ignore next */ []));
|
|
462
|
+
this.profile = toSignal(this.manageProfileState.getProfile$());
|
|
448
463
|
this.changePasswordKey = "Account.ChangePasswordComponent" /* eAccountComponents.ChangePassword */;
|
|
449
464
|
this.personalSettingsKey = "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */;
|
|
450
|
-
this.profile = toSignal(this.manageProfileState.getProfile$());
|
|
451
|
-
this.profileLoading = signal(false, ...(ngDevMode ? [{ debugName: "profileLoading" }] : /* istanbul ignore next */ []));
|
|
452
465
|
}
|
|
453
466
|
ngOnInit() {
|
|
454
|
-
this.
|
|
455
|
-
this.profileService
|
|
456
|
-
.get()
|
|
457
|
-
.pipe(finalize(() => this.profileLoading.set(false)))
|
|
458
|
-
.subscribe(profile => {
|
|
467
|
+
this.profileService.get().subscribe(profile => {
|
|
459
468
|
this.manageProfileState.setProfile(profile);
|
|
460
469
|
if (profile.isExternal) {
|
|
461
|
-
this.hideChangePasswordTab
|
|
462
|
-
this.selectedTab
|
|
470
|
+
this.hideChangePasswordTab.set(true);
|
|
471
|
+
this.selectedTab.set(1);
|
|
463
472
|
}
|
|
464
473
|
});
|
|
465
474
|
}
|
|
466
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
467
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ManageProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
476
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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()?.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()) {\r\n <li class=\"nav-item\" (click)=\"selectedTab.set(0)\">\r\n <a\r\n class=\"nav-link\"\r\n [class.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.set(1)\">\r\n <a\r\n class=\"nav-link\"\r\n [class.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()) {\r\n <div class=\"col-12 col-md-9\">\r\n @if (selectedTab() === 0) {\r\n <div class=\"tab-content fade-in\">\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 />\r\n </div>\r\n </div>\r\n }\r\n @if (selectedTab() === 1) {\r\n <div class=\"tab-content fade-in\">\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 />\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}.fade-in{animation:fadeIn .35s ease both}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ 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: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "directive", type: LoadingDirective, selector: "[abpLoading]", inputs: ["abpLoading", "abpLoadingTargetElement", "abpLoadingDelay"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
468
477
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ManageProfileComponent, decorators: [{
|
|
470
479
|
type: Component,
|
|
471
|
-
args: [{ selector: 'abp-manage-profile', imports: [
|
|
480
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-manage-profile', imports: [
|
|
472
481
|
ReactiveFormsModule,
|
|
473
482
|
PersonalSettingsComponent,
|
|
474
483
|
ChangePasswordComponent,
|
|
475
484
|
LocalizationPipe,
|
|
476
485
|
ReplaceableTemplateDirective,
|
|
477
|
-
LoadingDirective
|
|
478
|
-
], template: "<div id=\"AbpContentToolbar\"></div>\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"
|
|
486
|
+
LoadingDirective,
|
|
487
|
+
], template: "<div id=\"AbpContentToolbar\"></div>\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"!profile()?.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()) {\r\n <li class=\"nav-item\" (click)=\"selectedTab.set(0)\">\r\n <a\r\n class=\"nav-link\"\r\n [class.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.set(1)\">\r\n <a\r\n class=\"nav-link\"\r\n [class.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()) {\r\n <div class=\"col-12 col-md-9\">\r\n @if (selectedTab() === 0) {\r\n <div class=\"tab-content fade-in\">\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 />\r\n </div>\r\n </div>\r\n }\r\n @if (selectedTab() === 1) {\r\n <div class=\"tab-content fade-in\">\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 />\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}.fade-in{animation:fadeIn .35s ease both}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
479
488
|
}] });
|
|
480
489
|
|
|
481
490
|
const { maxLength, required, email } = Validators;
|
|
@@ -487,6 +496,8 @@ class RegisterComponent {
|
|
|
487
496
|
this.toasterService = inject(ToasterService);
|
|
488
497
|
this.authService = inject(AuthService);
|
|
489
498
|
this.injector = inject(Injector);
|
|
499
|
+
this.inProgress = signal(false, /* @ts-ignore */
|
|
500
|
+
...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
|
|
490
501
|
this.isSelfRegistrationEnabled = true;
|
|
491
502
|
this.authWrapperKey = "Account.AuthWrapperComponent" /* eAccountComponents.AuthWrapper */;
|
|
492
503
|
}
|
|
@@ -516,7 +527,7 @@ class RegisterComponent {
|
|
|
516
527
|
onSubmit() {
|
|
517
528
|
if (this.form.invalid)
|
|
518
529
|
return;
|
|
519
|
-
this.inProgress
|
|
530
|
+
this.inProgress.set(true);
|
|
520
531
|
const newUser = {
|
|
521
532
|
userName: this.form.get('username')?.value,
|
|
522
533
|
password: this.form.get('password')?.value,
|
|
@@ -534,22 +545,22 @@ class RegisterComponent {
|
|
|
534
545
|
err.error?.error.message ||
|
|
535
546
|
'AbpAccount::DefaultErrorMessage', '', { life: 7000 });
|
|
536
547
|
return throwError(err);
|
|
537
|
-
}), finalize(() =>
|
|
548
|
+
}), finalize(() => this.inProgress.set(false)))
|
|
538
549
|
.subscribe();
|
|
539
550
|
}
|
|
540
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
541
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
551
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RegisterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
552
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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 [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [validateOnSubmit]=\"true\" class=\"mt-4\">\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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { 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"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
542
553
|
}
|
|
543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RegisterComponent, decorators: [{
|
|
544
555
|
type: Component,
|
|
545
|
-
args: [{ selector: 'abp-register', imports: [
|
|
556
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-register', imports: [
|
|
546
557
|
ReactiveFormsModule,
|
|
547
558
|
RouterLink,
|
|
548
559
|
NgxValidateCoreModule,
|
|
549
560
|
LocalizationPipe,
|
|
550
561
|
ButtonComponent,
|
|
551
562
|
AutofocusDirective,
|
|
552
|
-
], 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
|
|
563
|
+
], 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 [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [validateOnSubmit]=\"true\" class=\"mt-4\">\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" }]
|
|
553
564
|
}] });
|
|
554
565
|
|
|
555
566
|
const PASSWORD_FIELDS = ['password', 'confirmPassword'];
|
|
@@ -560,18 +571,25 @@ class ResetPasswordComponent {
|
|
|
560
571
|
this.route = inject(ActivatedRoute);
|
|
561
572
|
this.router = inject(Router);
|
|
562
573
|
this.injector = inject(Injector);
|
|
563
|
-
this.
|
|
564
|
-
this.
|
|
574
|
+
this.queryParams = toSignal(this.route.queryParams);
|
|
575
|
+
this.inProgress = signal(false, /* @ts-ignore */
|
|
576
|
+
...(ngDevMode ? [{ debugName: "inProgress" }] : /* istanbul ignore next */ []));
|
|
577
|
+
this.isPasswordReset = signal(false, /* @ts-ignore */
|
|
578
|
+
...(ngDevMode ? [{ debugName: "isPasswordReset" }] : /* istanbul ignore next */ []));
|
|
565
579
|
this.mapErrorsFn = (errors, groupErrors, control) => {
|
|
566
580
|
if (PASSWORD_FIELDS.indexOf(String(control?.name)) < 0)
|
|
567
581
|
return errors;
|
|
568
582
|
return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
|
|
569
583
|
};
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
584
|
+
effect(() => {
|
|
585
|
+
const params = this.queryParams();
|
|
586
|
+
if (!params)
|
|
587
|
+
return;
|
|
588
|
+
const { userId, resetToken } = params;
|
|
589
|
+
if (!userId || !resetToken) {
|
|
590
|
+
void this.router.navigateByUrl('/account/login');
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
575
593
|
this.form = this.fb.group({
|
|
576
594
|
userId: [userId, [Validators.required]],
|
|
577
595
|
resetToken: [resetToken, [Validators.required]],
|
|
@@ -583,33 +601,33 @@ class ResetPasswordComponent {
|
|
|
583
601
|
});
|
|
584
602
|
}
|
|
585
603
|
onSubmit() {
|
|
586
|
-
if (this.form.invalid || this.inProgress)
|
|
604
|
+
if (this.form.invalid || this.inProgress())
|
|
587
605
|
return;
|
|
588
|
-
this.inProgress
|
|
606
|
+
this.inProgress.set(true);
|
|
589
607
|
this.accountService
|
|
590
608
|
.resetPassword({
|
|
591
609
|
userId: this.form.get('userId')?.value,
|
|
592
610
|
resetToken: this.form.get('resetToken')?.value,
|
|
593
611
|
password: this.form.get('password')?.value,
|
|
594
612
|
})
|
|
595
|
-
.pipe(finalize(() =>
|
|
613
|
+
.pipe(finalize(() => this.inProgress.set(false)))
|
|
596
614
|
.subscribe(() => {
|
|
597
|
-
this.isPasswordReset
|
|
615
|
+
this.isPasswordReset.set(true);
|
|
598
616
|
});
|
|
599
617
|
}
|
|
600
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
601
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ResetPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
619
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ResetPasswordComponent, isStandalone: true, selector: "abp-reset-password", ngImport: i0, template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isPasswordReset()) {\r\n @if (form) {\r\n <form\r\n [formGroup]=\"form\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n (ngSubmit)=\"onSubmit()\"\r\n [validateOnSubmit]=\"true\"\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\r\n type=\"password\"\r\n id=\"input-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n />\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 }\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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "ngmodule", type: NgxValidateCoreModule }, { kind: "directive", type: i2.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i2.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { 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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
602
620
|
}
|
|
603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ResetPasswordComponent, decorators: [{
|
|
604
622
|
type: Component,
|
|
605
|
-
args: [{ selector: 'abp-reset-password', imports: [
|
|
623
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'abp-reset-password', imports: [
|
|
606
624
|
ReactiveFormsModule,
|
|
607
625
|
RouterLink,
|
|
608
626
|
NgxValidateCoreModule,
|
|
609
627
|
LocalizationPipe,
|
|
610
628
|
ButtonComponent,
|
|
611
|
-
], template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isPasswordReset) {\r\n <form
|
|
612
|
-
}] });
|
|
629
|
+
], template: "<h4>{{ 'AbpAccount::ResetPassword' | abpLocalization }}</h4>\r\n\r\n@if (!isPasswordReset()) {\r\n @if (form) {\r\n <form\r\n [formGroup]=\"form\"\r\n [mapErrorsFn]=\"mapErrorsFn\"\r\n (ngSubmit)=\"onSubmit()\"\r\n [validateOnSubmit]=\"true\"\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\r\n type=\"password\"\r\n id=\"input-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n />\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 }\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" }]
|
|
630
|
+
}], ctorParameters: () => [] });
|
|
613
631
|
|
|
614
632
|
const accountExtensionsResolver = () => {
|
|
615
633
|
const injector = inject(Injector);
|
|
@@ -696,11 +714,11 @@ const routes = [
|
|
|
696
714
|
},
|
|
697
715
|
];
|
|
698
716
|
class AccountRoutingModule {
|
|
699
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
700
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
701
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
717
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
718
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: AccountRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
|
|
719
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
702
720
|
}
|
|
703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountRoutingModule, decorators: [{
|
|
704
722
|
type: NgModule,
|
|
705
723
|
args: [{
|
|
706
724
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -738,21 +756,21 @@ class AccountModule {
|
|
|
738
756
|
static forLazy(options = {}) {
|
|
739
757
|
return new LazyModuleFactory(AccountModule.forChild(options));
|
|
740
758
|
}
|
|
741
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
742
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
759
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
760
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: AccountModule, imports: [LoginComponent,
|
|
743
761
|
RegisterComponent,
|
|
744
762
|
ForgotPasswordComponent,
|
|
745
763
|
ResetPasswordComponent,
|
|
746
764
|
ManageProfileComponent,
|
|
747
765
|
AccountRoutingModule] }); }
|
|
748
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
766
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountModule, imports: [LoginComponent,
|
|
749
767
|
RegisterComponent,
|
|
750
768
|
ForgotPasswordComponent,
|
|
751
769
|
ResetPasswordComponent,
|
|
752
770
|
ManageProfileComponent,
|
|
753
771
|
AccountRoutingModule] }); }
|
|
754
772
|
}
|
|
755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccountModule, decorators: [{
|
|
756
774
|
type: NgModule,
|
|
757
775
|
args: [{
|
|
758
776
|
declarations: [],
|