From db5a3fb4bf587259244023fd42aa6cf6ff8db3f1 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Tue, 16 Aug 2022 15:43:36 +0300 Subject: [PATCH] Change HalfRowComponent name and export it --- .../account/src/lib/account.module.ts | 47 ++++++++++--------- .../account/src/lib/components/index.ts | 1 + ...> personal-settings-half-row.component.ts} | 4 +- .../default-personal-settings-form-props.ts | 6 +-- 4 files changed, 30 insertions(+), 28 deletions(-) rename npm/ng-packs/packages/account/src/lib/components/personal-settings/{half-row/half-row.component.ts => personal-settings-half-row.component.ts} (91%) 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 3929963665..74310ce1bd 100644 --- a/npm/ng-packs/packages/account/src/lib/account.module.ts +++ b/npm/ng-packs/packages/account/src/lib/account.module.ts @@ -1,24 +1,25 @@ -import { CoreModule, LazyModuleFactory } from '@abp/ng.core'; -import { ThemeSharedModule } from '@abp/ng.theme.shared'; -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 { LoginComponent } from './components/login/login.component'; -import { ManageProfileComponent } from './components/manage-profile/manage-profile.component'; -import { PersonalSettingsComponent } from './components/personal-settings/personal-settings.component'; -import { RegisterComponent } from './components/register/register.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 { ForgotPasswordComponent } from './components/forgot-password/forgot-password.component'; -import { ResetPasswordComponent } from './components/reset-password/reset-password.component'; -import { UiExtensionsModule } from '@abp/ng.theme.shared/extensions'; -import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS } from './tokens/extensions.token'; -import { AccountExtensionsGuard } from './guards/extensions.guard'; -import { HalfRowComponent } from './components/personal-settings/half-row/half-row.component'; +import {CoreModule, LazyModuleFactory} from '@abp/ng.core'; +import {ThemeSharedModule} from '@abp/ng.theme.shared'; +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 {LoginComponent} from './components/login/login.component'; +import {ManageProfileComponent} from './components/manage-profile/manage-profile.component'; +import {PersonalSettingsComponent} from './components/personal-settings/personal-settings.component'; +import {RegisterComponent} from './components/register/register.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 {ForgotPasswordComponent} from './components/forgot-password/forgot-password.component'; +import {ResetPasswordComponent} from './components/reset-password/reset-password.component'; +import {UiExtensionsModule} from '@abp/ng.theme.shared/extensions'; +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'; + const declarations = [ LoginComponent, RegisterComponent, @@ -27,7 +28,7 @@ const declarations = [ PersonalSettingsComponent, ForgotPasswordComponent, ResetPasswordComponent, - HalfRowComponent, + PersonalSettingsHalfRowComponent, ]; @NgModule({ @@ -48,7 +49,7 @@ export class AccountModule { ngModule: AccountModule, providers: [ AuthenticationFlowGuard, - { provide: ACCOUNT_CONFIG_OPTIONS, useValue: options }, + {provide: ACCOUNT_CONFIG_OPTIONS, useValue: options}, { provide: 'ACCOUNT_OPTIONS', useFactory: accountConfigOptionsFactory, diff --git a/npm/ng-packs/packages/account/src/lib/components/index.ts b/npm/ng-packs/packages/account/src/lib/components/index.ts index 098ee8a202..d74263b052 100644 --- a/npm/ng-packs/packages/account/src/lib/components/index.ts +++ b/npm/ng-packs/packages/account/src/lib/components/index.ts @@ -4,4 +4,5 @@ export * from './login/login.component'; export * from './manage-profile/manage-profile.component'; export * from './register/register.component'; export * from './personal-settings/personal-settings.component'; +export * from './personal-settings/personal-settings-half-row.component'; export * from './reset-password/reset-password.component'; diff --git a/npm/ng-packs/packages/account/src/lib/components/personal-settings/half-row/half-row.component.ts b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts similarity index 91% rename from npm/ng-packs/packages/account/src/lib/components/personal-settings/half-row/half-row.component.ts rename to npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts index a0f0ead029..a1086a24a2 100644 --- a/npm/ng-packs/packages/account/src/lib/components/personal-settings/half-row/half-row.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts @@ -3,7 +3,7 @@ import {FORM_PROP_DATA_STREAM, FormProp} from "@abp/ng.theme.shared/extensions"; import {ControlContainer, FormGroup, FormGroupDirective} from "@angular/forms"; @Component({ - selector: 'abp-half-row', + selector: 'abp-personal-settings-half-row', template: `
@@ -18,7 +18,7 @@ import {ControlContainer, FormGroup, FormGroupDirective} from "@angular/forms"; viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }] }) -export class HalfRowComponent { +export class PersonalSettingsHalfRowComponent { public displayName: string; public name: string; public id: string; diff --git a/npm/ng-packs/packages/account/src/lib/defaults/default-personal-settings-form-props.ts b/npm/ng-packs/packages/account/src/lib/defaults/default-personal-settings-form-props.ts index d99401ecf2..0e9e06f020 100644 --- a/npm/ng-packs/packages/account/src/lib/defaults/default-personal-settings-form-props.ts +++ b/npm/ng-packs/packages/account/src/lib/defaults/default-personal-settings-form-props.ts @@ -1,7 +1,7 @@ import {ePropType, FormProp} from "@abp/ng.theme.shared/extensions"; import {UpdateProfileDto} from "@abp/ng.account.core/proxy"; import {Validators} from "@angular/forms"; - import {HalfRowComponent} from "../components/personal-settings/half-row/half-row.component"; + import {PersonalSettingsHalfRowComponent} from "../components/personal-settings/personal-settings-half-row.component"; const { maxLength, required, email } = Validators; export const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany([ @@ -18,7 +18,7 @@ export const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany [maxLength(64)], - template:HalfRowComponent, + template:PersonalSettingsHalfRowComponent, className:"d-inline-block w-50" }, { @@ -28,7 +28,7 @@ export const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany [maxLength(64)], className:"d-inline-block w-50 ps-4", - template:HalfRowComponent + template:PersonalSettingsHalfRowComponent }, { type: ePropType.String,