Browse Source

standalone applied to reset password, personal settings and change password

pull/22816/head
erdemcaygor 9 months ago
parent
commit
93cf586a7c
  1. 17
      npm/ng-packs/packages/account/src/lib/account.module.ts
  2. 7
      npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts
  3. 2
      npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts
  4. 7
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts
  5. 14
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts
  6. 2
      npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts

17
npm/ng-packs/packages/account/src/lib/account.module.ts

@ -4,31 +4,18 @@ import { ModuleWithProviders, NgModule, NgModuleFactory } from '@angular/core';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { NgxValidateCoreModule } from '@ngx-validate/core';
import { AccountRoutingModule } from './account-routing.module';
import { ChangePasswordComponent } from './components/change-password/change-password.component';
import { ManageProfileComponent } from './components/manage-profile/manage-profile.component';
import { PersonalSettingsComponent } from './components/personal-settings/personal-settings.component';
import { AccountConfigOptions } from './models/config-options';
import { ACCOUNT_CONFIG_OPTIONS } from './tokens/config-options.token';
import { accountConfigOptionsFactory } from './utils/factory-utils';
import { AuthenticationFlowGuard } from './guards/authentication-flow.guard';
import { ResetPasswordComponent } from './components/reset-password/reset-password.component';
import { RE_LOGIN_CONFIRMATION_TOKEN } from './tokens';
import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS } from './tokens/extensions.token';
import { AccountExtensionsGuard } from './guards/extensions.guard';
import { PersonalSettingsHalfRowComponent } from './components/personal-settings/personal-settings-half-row.component';
import { ExtensibleModule } from '@abp/ng.components/extensible';
const declarations = [
ChangePasswordComponent,
ManageProfileComponent,
PersonalSettingsComponent,
ResetPasswordComponent,
PersonalSettingsHalfRowComponent,
];
@NgModule({
declarations: [...declarations],
declarations: [],
imports: [
CoreModule,
AccountRoutingModule,
@ -37,7 +24,7 @@ const declarations = [
NgxValidateCoreModule,
ExtensibleModule,
],
exports: [...declarations],
exports: [],
})
export class AccountModule {
static forChild(options = {} as AccountConfigOptions): ModuleWithProviders<AccountModule> {

7
npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts

@ -1,7 +1,8 @@
import { ProfileService } from '@abp/ng.account.core/proxy';
import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared';
import { getPasswordValidators, ThemeSharedModule, ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core';
import {
ReactiveFormsModule,
UntypedFormBuilder,
UntypedFormControl,
UntypedFormGroup,
@ -11,16 +12,18 @@ import { comparePasswords, Validation } from '@ngx-validate/core';
import { finalize } from 'rxjs/operators';
import { Account } from '../../models/account';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
import { CoreModule } from '@abp/ng.core';
import { CommonModule } from '@angular/common';
const { required } = Validators;
const PASSWORD_FIELDS = ['newPassword', 'repeatNewPassword'];
@Component({
standalone: false,
selector: 'abp-change-password-form',
templateUrl: './change-password.component.html',
exportAs: 'abpChangePasswordForm',
imports: [CommonModule, ReactiveFormsModule, CoreModule, ThemeSharedModule],
})
export class ChangePasswordComponent
implements OnInit, Account.ChangePasswordComponentInputs, Account.ChangePasswordComponentOutputs

2
npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts

@ -6,7 +6,6 @@ import { eAccountComponents } from '../../enums/components';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
@Component({
standalone: false,
selector: 'abp-manage-profile',
templateUrl: './manage-profile.component.html',
animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])],
@ -17,6 +16,7 @@ import { ManageProfileStateService } from '../../services/manage-profile.state.s
}
`,
],
imports: [CoreModule, ThemeSharedModule, CommonModule, ReactiveFormsModule],
})
export class ManageProfileComponent implements OnInit {
selectedTab = 0;

7
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts

@ -4,10 +4,12 @@ import {
FormProp,
EXTENSIBLE_FORM_VIEW_PROVIDER,
} from '@abp/ng.components/extensible';
import { UntypedFormGroup } from '@angular/forms';
import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@abp/ng.core';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
@Component({
standalone: false,
selector: 'abp-personal-settings-half-row',
template: ` <div class="w-50 d-inline">
<label [attr.for]="name" class="form-label">{{ displayName | abpLocalization }} </label>
@ -21,6 +23,7 @@ import { UntypedFormGroup } from '@angular/forms';
</div>`,
styles: [],
viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER],
imports: [CommonModule, ReactiveFormsModule, CoreModule, ThemeSharedModule],
})
export class PersonalSettingsHalfRowComponent {
public displayName: string;

14
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

@ -1,11 +1,16 @@
import { ProfileDto, ProfileService } from '@abp/ng.account.core/proxy';
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
import {
Confirmation,
ConfirmationService,
ThemeSharedModule,
ToasterService,
} from '@abp/ng.theme.shared';
import { Component, inject, Injector, OnInit } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { ReactiveFormsModule, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { finalize, filter } from 'rxjs/operators';
import { Account } from '../../models/account';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
import { AuthService, ConfigStateService } from '@abp/ng.core';
import { AuthService, ConfigStateService, CoreModule } from '@abp/ng.core';
import { RE_LOGIN_CONFIRMATION_TOKEN } from '../../tokens';
import {
EXTENSIONS_IDENTIFIER,
@ -13,9 +18,9 @@ import {
generateFormFromProps,
} from '@abp/ng.components/extensible';
import { eAccountComponents } from '../../enums';
import { CommonModule } from '@angular/common';
@Component({
standalone: false,
selector: 'abp-personal-settings-form',
templateUrl: './personal-settings.component.html',
exportAs: 'abpPersonalSettingsForm',
@ -25,6 +30,7 @@ import { eAccountComponents } from '../../enums';
useValue: eAccountComponents.PersonalSettings,
},
],
imports: [CommonModule, ReactiveFormsModule, CoreModule, ThemeSharedModule],
})
export class PersonalSettingsComponent
implements

2
npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts

@ -9,9 +9,9 @@ import { finalize } from 'rxjs/operators';
const PASSWORD_FIELDS = ['password', 'confirmPassword'];
@Component({
standalone: false,
selector: 'abp-reset-password',
templateUrl: './reset-password.component.html',
imports: [CoreModule, ThemeSharedModule, ReactiveFormsModule, CommonModule],
})
export class ResetPasswordComponent implements OnInit {
form!: UntypedFormGroup;

Loading…
Cancel
Save