@abp/ng.account 6.0.0 → 7.0.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,7 +1,7 @@
1
1
  import * as i3$2 from '@abp/ng.core';
2
2
  import { InternalStore, ConfigStateService, RouterOutletComponent, ReplaceableRouteContainerComponent, AuthGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
3
3
  import * as i2$1 from '@abp/ng.theme.shared';
4
- import { getPasswordValidators, fadeIn, ThemeSharedModule } from '@abp/ng.theme.shared';
4
+ import { getPasswordValidators, Confirmation, fadeIn, ThemeSharedModule } from '@abp/ng.theme.shared';
5
5
  import * as i0 from '@angular/core';
6
6
  import { Component, InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
7
7
  import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
@@ -11,13 +11,13 @@ import * as i3$1 from '@angular/router';
11
11
  import { ActivatedRoute, RouterModule } from '@angular/router';
12
12
  import * as i1 from '@angular/forms';
13
13
  import { Validators, UntypedFormControl } from '@angular/forms';
14
- import { finalize, catchError, switchMap, map, tap, mapTo } from 'rxjs/operators';
14
+ import { finalize, catchError, filter, switchMap, map, tap, mapTo } from 'rxjs/operators';
15
15
  import * as i2 from '@abp/ng.account.core/proxy';
16
16
  import * as i3 from '@angular/common';
17
17
  import { throwError } from 'rxjs';
18
18
  import { trigger, transition, useAnimation } from '@angular/animations';
19
- import * as i8 from '@abp/ng.theme.shared/extensions';
20
- import { FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, EXTENSIONS_FORM_PROP, EXTENSIBLE_FORM_VIEW_PROVIDER, FormProp, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps, UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
19
+ import * as i4 from '@abp/ng.theme.shared/extensions';
20
+ import { EXTENSIONS_FORM_PROP, EXTENSIBLE_FORM_VIEW_PROVIDER, FormProp, FormPropData, generateFormFromProps, EXTENSIONS_IDENTIFIER, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps, UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
21
21
 
22
22
  class ForgotPasswordComponent {
23
23
  constructor(fb, accountService) {
@@ -204,13 +204,111 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
204
204
  args: [{ selector: 'abp-change-password-form', exportAs: 'abpChangePasswordForm', template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" [mapErrorsFn]=\"mapErrorsFn\" validateOnSubmit>\r\n <div *ngIf=\"!hideCurrentPassword\" class=\"mb-3 form-group\">\r\n <label for=\"current-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"current-password\"\r\n class=\"form-control\"\r\n formControlName=\"password\"\r\n autofocus\r\n autocomplete=\"current-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPassword' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"new-password\"\r\n class=\"form-control\"\r\n formControlName=\"newPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <div class=\"mb-3 form-group\">\r\n <label for=\"confirm-new-password\" class=\"form-label\">{{\r\n 'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization\r\n }}</label\r\n ><span> * </span\r\n ><input\r\n type=\"password\"\r\n id=\"confirm-new-password\"\r\n class=\"form-control\"\r\n formControlName=\"repeatNewPassword\"\r\n autocomplete=\"new-password\"\r\n />\r\n </div>\r\n <abp-button\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n buttonType=\"submit\"\r\n [loading]=\"inProgress\"\r\n [disabled]=\"form?.invalid\"\r\n >{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n" }]
205
205
  }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.Injector }, { type: i2$1.ToasterService }, { type: i2.ProfileService }, { type: ManageProfileStateService }]; } });
206
206
 
207
+ const RE_LOGIN_CONFIRMATION_TOKEN = new InjectionToken('RE_LOGIN_CONFIRMATION_TOKEN');
208
+
209
+ class PersonalSettingsHalfRowComponent {
210
+ constructor(propData) {
211
+ this.propData = propData;
212
+ this.displayName = propData.displayName;
213
+ this.name = propData.name;
214
+ this.id = propData.id;
215
+ }
216
+ }
217
+ PersonalSettingsHalfRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsHalfRowComponent, deps: [{ token: EXTENSIONS_FORM_PROP }], target: i0.ɵɵFactoryTarget.Component });
218
+ PersonalSettingsHalfRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: PersonalSettingsHalfRowComponent, selector: "abp-personal-settings-half-row", ngImport: i0, template: ` <div class="w-50 d-inline">
219
+ <div class="mb-3">
220
+ <label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
221
+ <input
222
+ type="text"
223
+ [attr.id]="id"
224
+ class="form-control"
225
+ [attr.name]="name"
226
+ [formControlName]="name"
227
+ />
228
+ </div>
229
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }], viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] });
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsHalfRowComponent, decorators: [{
231
+ type: Component,
232
+ args: [{ selector: 'abp-personal-settings-half-row', template: ` <div class="w-50 d-inline">
233
+ <div class="mb-3">
234
+ <label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
235
+ <input
236
+ type="text"
237
+ [attr.id]="id"
238
+ class="form-control"
239
+ [attr.name]="name"
240
+ [formControlName]="name"
241
+ />
242
+ </div>
243
+ </div>`, viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }]
244
+ }], ctorParameters: function () {
245
+ return [{ type: i4.FormProp, decorators: [{
246
+ type: Inject,
247
+ args: [EXTENSIONS_FORM_PROP]
248
+ }] }];
249
+ } });
250
+
251
+ const { maxLength: maxLength$1, required: required$1, email: email$1 } = Validators;
252
+ const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany([
253
+ {
254
+ type: "string" /* ePropType.String */,
255
+ name: 'userName',
256
+ displayName: 'AbpIdentity::DisplayName:UserName',
257
+ id: 'username',
258
+ validators: () => [required$1, maxLength$1(256)],
259
+ },
260
+ {
261
+ type: "string" /* ePropType.String */,
262
+ name: 'name',
263
+ displayName: 'AbpIdentity::DisplayName:Name',
264
+ id: 'name',
265
+ validators: () => [maxLength$1(64)],
266
+ template: PersonalSettingsHalfRowComponent,
267
+ className: 'd-inline-block w-50',
268
+ },
269
+ {
270
+ type: "string" /* ePropType.String */,
271
+ name: 'surname',
272
+ displayName: 'AbpIdentity::DisplayName:Surname',
273
+ id: 'surname',
274
+ validators: () => [maxLength$1(64)],
275
+ className: 'd-inline-block w-50 ps-4',
276
+ template: PersonalSettingsHalfRowComponent,
277
+ },
278
+ {
279
+ type: "string" /* ePropType.String */,
280
+ name: 'email',
281
+ displayName: 'AbpIdentity::DisplayName:Email',
282
+ id: 'email-address',
283
+ validators: () => [required$1, email$1, maxLength$1(256)],
284
+ },
285
+ {
286
+ type: "string" /* ePropType.String */,
287
+ name: 'phoneNumber',
288
+ displayName: 'AbpIdentity::DisplayName:PhoneNumber',
289
+ id: 'phone-number',
290
+ validators: () => [maxLength$1(16)],
291
+ },
292
+ ]);
293
+
294
+ const DEFAULT_ACCOUNT_FORM_PROPS = {
295
+ ["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS,
296
+ };
297
+ const ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS');
298
+
207
299
  class PersonalSettingsComponent {
208
- constructor(fb, toasterService, profileService, manageProfileState, injector) {
300
+ constructor(fb, toasterService, profileService, manageProfileState, authService, confirmationService, isPersonalSettingsChangedConfirmationActive, injector) {
209
301
  this.fb = fb;
210
302
  this.toasterService = toasterService;
211
303
  this.profileService = profileService;
212
304
  this.manageProfileState = manageProfileState;
305
+ this.authService = authService;
306
+ this.confirmationService = confirmationService;
307
+ this.isPersonalSettingsChangedConfirmationActive = isPersonalSettingsChangedConfirmationActive;
213
308
  this.injector = injector;
309
+ this.logoutConfirmation = () => {
310
+ this.authService.logout().subscribe();
311
+ };
214
312
  }
215
313
  buildForm() {
216
314
  this.selected = this.manageProfileState.getProfile();
@@ -226,6 +324,7 @@ class PersonalSettingsComponent {
226
324
  submit() {
227
325
  if (this.form.invalid)
228
326
  return;
327
+ const isLogOutConfirmMessageVisible = this.isLogoutConfirmMessageActive();
229
328
  this.inProgress = true;
230
329
  this.profileService
231
330
  .update(this.form.value)
@@ -233,16 +332,39 @@ class PersonalSettingsComponent {
233
332
  .subscribe(profile => {
234
333
  this.manageProfileState.setProfile(profile);
235
334
  this.toasterService.success('AbpAccount::PersonalSettingsSaved', 'Success', { life: 5000 });
335
+ if (isLogOutConfirmMessageVisible) {
336
+ this.showLogoutConfirmMessage();
337
+ }
236
338
  });
237
339
  }
340
+ isDataSame(oldValue, newValue) {
341
+ return Object.entries(oldValue).some(([key, value]) => {
342
+ if (key in newValue) {
343
+ return value !== newValue[key];
344
+ }
345
+ return false;
346
+ });
347
+ }
348
+ isLogoutConfirmMessageActive() {
349
+ if (!this.isPersonalSettingsChangedConfirmationActive) {
350
+ return false;
351
+ }
352
+ return this.isDataSame(this.profile, this.form.value);
353
+ }
354
+ showLogoutConfirmMessage() {
355
+ this.confirmationService
356
+ .info('AbpAccount::PersonalSettingsChangedConfirmationModalDescription', 'AbpAccount::PersonalSettingsChangedConfirmationModalTitle')
357
+ .pipe(filter(status => status === Confirmation.Status.confirm))
358
+ .subscribe(this.logoutConfirmation);
359
+ }
238
360
  }
239
- PersonalSettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$1.ToasterService }, { token: i2.ProfileService }, { token: ManageProfileStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
361
+ PersonalSettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2$1.ToasterService }, { token: i2.ProfileService }, { token: ManageProfileStateService }, { token: i3$2.AuthService }, { token: i2$1.ConfirmationService }, { token: RE_LOGIN_CONFIRMATION_TOKEN }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
240
362
  PersonalSettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: PersonalSettingsComponent, selector: "abp-personal-settings-form", providers: [
241
363
  {
242
364
  provide: EXTENSIONS_IDENTIFIER,
243
365
  useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
244
366
  },
245
- ], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "directive", type: i7.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
367
+ ], exportAs: ["abpPersonalSettingsForm"], ngImport: i0, template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "directive", type: i7.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i4.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }] });
246
368
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsComponent, decorators: [{
247
369
  type: Component,
248
370
  args: [{ selector: 'abp-personal-settings-form', exportAs: 'abpPersonalSettingsForm', providers: [
@@ -251,7 +373,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
251
373
  useValue: "Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */,
252
374
  },
253
375
  ], template: "<form [formGroup]=\"form\" *ngIf=\"form\" (ngSubmit)=\"submit()\" validateOnSubmit>\r\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\r\n\r\n <abp-button\r\n buttonType=\"submit\"\r\n iconClass=\"fa fa-check\"\r\n buttonClass=\"btn btn-primary color-white\"\r\n [loading]=\"inProgress\"\r\n >\r\n {{ 'AbpIdentity::Save' | abpLocalization }}</abp-button\r\n >\r\n</form>\r\n" }]
254
- }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2$1.ToasterService }, { type: i2.ProfileService }, { type: ManageProfileStateService }, { type: i0.Injector }]; } });
376
+ }], ctorParameters: function () {
377
+ return [{ type: i1.UntypedFormBuilder }, { type: i2$1.ToasterService }, { type: i2.ProfileService }, { type: ManageProfileStateService }, { type: i3$2.AuthService }, { type: i2$1.ConfirmationService }, { type: undefined, decorators: [{
378
+ type: Inject,
379
+ args: [RE_LOGIN_CONFIRMATION_TOKEN]
380
+ }] }, { type: i0.Injector }];
381
+ } });
255
382
 
256
383
  class ManageProfileComponent {
257
384
  constructor(profileService, manageProfileState) {
@@ -279,7 +406,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
279
406
  args: [{ selector: 'abp-manage-profile', animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])], template: "<div id=\"AbpContentToolbar\"></div>\r\n\r\n<div class=\"card border-0 shadow-sm min-h-400\" [abpLoading]=\"!(profile$ | async)?.userName\">\r\n <div class=\"card-body\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-3\">\r\n <ul class=\"nav flex-column nav-pills\" id=\"nav-tab\" role=\"tablist\">\r\n <li\r\n *ngIf=\"!hideChangePasswordTab && (profile$ | async)\"\r\n class=\"nav-item\"\r\n (click)=\"selectedTab = 0\"\r\n >\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 0 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpUi::ChangePassword' | abpLocalization }}</a\r\n >\r\n </li>\r\n <li class=\"nav-item mb-2\" (click)=\"selectedTab = 1\">\r\n <a\r\n class=\"nav-link\"\r\n [ngClass]=\"{ active: selectedTab === 1 }\"\r\n role=\"tab\"\r\n href=\"javascript:void(0)\"\r\n >{{ 'AbpAccount::PersonalSettings' | abpLocalization }}</a\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n <div *ngIf=\"profile$ | async\" class=\"col-12 col-md-9\">\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 0\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::ChangePassword' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-change-password-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: changePasswordKey\r\n }\"\r\n ></abp-change-password-form>\r\n </div>\r\n </div>\r\n <div class=\"tab-content\" *ngIf=\"selectedTab === 1\" [@fadeIn]>\r\n <div class=\"tab-pane active\" role=\"tabpanel\">\r\n <h4>\r\n {{ 'AbpIdentity::PersonalSettings' | abpLocalization }}\r\n <hr />\r\n </h4>\r\n <abp-personal-settings-form\r\n *abpReplaceableTemplate=\"{\r\n componentKey: personalSettingsKey\r\n }\"\r\n ></abp-personal-settings-form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".min-h-400{min-height:400px}\n"] }]
280
407
  }], ctorParameters: function () { return [{ type: i2.ProfileService }, { type: ManageProfileStateService }]; } });
281
408
 
282
- const { maxLength: maxLength$1, required: required$1, email: email$1 } = Validators;
409
+ const { maxLength, required, email } = Validators;
283
410
  class RegisterComponent {
284
411
  constructor(fb, accountService, configState, toasterService, authService, injector) {
285
412
  this.fb = fb;
@@ -309,9 +436,9 @@ class RegisterComponent {
309
436
  }
310
437
  buildForm() {
311
438
  this.form = this.fb.group({
312
- username: ['', [required$1, maxLength$1(255)]],
313
- password: ['', [required$1, ...getPasswordValidators(this.injector)]],
314
- email: ['', [required$1, email$1]],
439
+ username: ['', [required, maxLength(255)]],
440
+ password: ['', [required, ...getPasswordValidators(this.injector)]],
441
+ email: ['', [required, email]],
315
442
  });
316
443
  }
317
444
  onSubmit() {
@@ -417,96 +544,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
417
544
  type: Injectable
418
545
  }], ctorParameters: function () { return [{ type: i3$2.AuthService }]; } });
419
546
 
420
- class PersonalSettingsHalfRowComponent {
421
- constructor(propData) {
422
- this.propData = propData;
423
- this.displayName = propData.displayName;
424
- this.name = propData.name;
425
- this.id = propData.id;
426
- }
427
- }
428
- PersonalSettingsHalfRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsHalfRowComponent, deps: [{ token: EXTENSIONS_FORM_PROP }], target: i0.ɵɵFactoryTarget.Component });
429
- PersonalSettingsHalfRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: PersonalSettingsHalfRowComponent, selector: "abp-personal-settings-half-row", ngImport: i0, template: ` <div class="w-50 d-inline">
430
- <div class="mb-3 form-group">
431
- <label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
432
- <input
433
- type="text"
434
- [attr.id]="id"
435
- class="form-control"
436
- [attr.name]="name"
437
- [formControlName]="name"
438
- />
439
- </div>
440
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3$2.LocalizationPipe, name: "abpLocalization" }], viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] });
441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: PersonalSettingsHalfRowComponent, decorators: [{
442
- type: Component,
443
- args: [{ selector: 'abp-personal-settings-half-row', template: ` <div class="w-50 d-inline">
444
- <div class="mb-3 form-group">
445
- <label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
446
- <input
447
- type="text"
448
- [attr.id]="id"
449
- class="form-control"
450
- [attr.name]="name"
451
- [formControlName]="name"
452
- />
453
- </div>
454
- </div>`, viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER] }]
455
- }], ctorParameters: function () {
456
- return [{ type: i8.FormProp, decorators: [{
457
- type: Inject,
458
- args: [EXTENSIONS_FORM_PROP]
459
- }] }];
460
- } });
461
-
462
- const { maxLength, required, email } = Validators;
463
- const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany([
464
- {
465
- type: "string" /* ePropType.String */,
466
- name: 'userName',
467
- displayName: 'AbpIdentity::DisplayName:UserName',
468
- id: 'username',
469
- validators: () => [required, maxLength(256)],
470
- },
471
- {
472
- type: "string" /* ePropType.String */,
473
- name: 'name',
474
- displayName: 'AbpIdentity::DisplayName:Name',
475
- id: 'name',
476
- validators: () => [maxLength(64)],
477
- template: PersonalSettingsHalfRowComponent,
478
- className: 'd-inline-block w-50',
479
- },
480
- {
481
- type: "string" /* ePropType.String */,
482
- name: 'surname',
483
- displayName: 'AbpIdentity::DisplayName:Surname',
484
- id: 'surname',
485
- validators: () => [maxLength(64)],
486
- className: 'd-inline-block w-50 ps-4',
487
- template: PersonalSettingsHalfRowComponent,
488
- },
489
- {
490
- type: "string" /* ePropType.String */,
491
- name: 'email',
492
- displayName: 'AbpIdentity::DisplayName:Email',
493
- id: 'email-address',
494
- validators: () => [required, email, maxLength(256)],
495
- },
496
- {
497
- type: "string" /* ePropType.String */,
498
- name: 'phoneNumber',
499
- displayName: 'AbpIdentity::DisplayName:PhoneNumber',
500
- id: 'phone-number',
501
- validators: () => [maxLength(16)],
502
- },
503
- ]);
504
-
505
- const DEFAULT_ACCOUNT_FORM_PROPS = {
506
- ["Account.PersonalSettingsComponent" /* eAccountComponents.PersonalSettings */]: DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS,
507
- };
508
- const ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS = new InjectionToken('ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS');
509
-
510
547
  class AccountExtensionsGuard {
511
548
  constructor(injector) {
512
549
  this.injector = injector;
@@ -622,6 +659,7 @@ const declarations = [
622
659
  ];
623
660
  class AccountModule {
624
661
  static forChild(options = {}) {
662
+ var _a;
625
663
  return {
626
664
  ngModule: AccountModule,
627
665
  providers: [
@@ -632,6 +670,10 @@ class AccountModule {
632
670
  useFactory: accountConfigOptionsFactory,
633
671
  deps: [ACCOUNT_CONFIG_OPTIONS],
634
672
  },
673
+ {
674
+ provide: RE_LOGIN_CONFIRMATION_TOKEN,
675
+ useValue: (_a = options.isPersonalSettingsChangedConfirmationActive) !== null && _a !== void 0 ? _a : true,
676
+ },
635
677
  {
636
678
  provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS,
637
679
  useValue: options.editFormPropContributors,
@@ -691,5 +733,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
691
733
  * Generated bundle index. Do not edit.
692
734
  */
693
735
 
694
- export { ACCOUNT_CONFIG_OPTIONS, ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, AccountExtensionsGuard, AccountModule, AuthenticationFlowGuard, ChangePasswordComponent, DEFAULT_ACCOUNT_FORM_PROPS, ForgotPasswordComponent, LoginComponent, ManageProfileComponent, ManageProfileStateService, PersonalSettingsComponent, PersonalSettingsHalfRowComponent, RegisterComponent, ResetPasswordComponent };
736
+ 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 };
695
737
  //# sourceMappingURL=abp-ng.account.mjs.map