diff --git a/npm/ng-packs/packages/account/src/lib/account.module.ts b/npm/ng-packs/packages/account/src/lib/account.module.ts index dfb58205fd..a3c05e6613 100644 --- a/npm/ng-packs/packages/account/src/lib/account.module.ts +++ b/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 { diff --git a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts index 8b2d29cba5..3d289b5068 100644 --- a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts +++ b/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 diff --git a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts index c6e976b72b..dad532f80a 100644 --- a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts +++ b/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; diff --git a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts index efb23afe67..983aad8478 100644 --- a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts +++ b/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: `
@@ -21,6 +23,7 @@ import { UntypedFormGroup } from '@angular/forms';
`, styles: [], viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER], + imports: [CommonModule, ReactiveFormsModule, CoreModule, ThemeSharedModule], }) export class PersonalSettingsHalfRowComponent { public displayName: string; diff --git a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts index 3ff2692c4b..9e1fff3d98 100644 --- a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts +++ b/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 diff --git a/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts index 046e761883..3c7c8611f3 100644 --- a/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts +++ b/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;