Browse Source

Change HalfRowComponent name and export it

pull/13700/head
Mahmut Gundogdu 4 years ago
parent
commit
db5a3fb4bf
  1. 47
      npm/ng-packs/packages/account/src/lib/account.module.ts
  2. 1
      npm/ng-packs/packages/account/src/lib/components/index.ts
  3. 4
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts
  4. 6
      npm/ng-packs/packages/account/src/lib/defaults/default-personal-settings-form-props.ts

47
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,

1
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';

4
npm/ng-packs/packages/account/src/lib/components/personal-settings/half-row/half-row.component.ts → 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: `
<div class="w-50 d-inline">
<div class="mb-3 form-group" >
@ -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;

6
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<UpdateProfileDto>([
@ -18,7 +18,7 @@ export const DEFAULT_PERSONAL_SETTINGS_UPDATE_FORM_PROPS = FormProp.createMany<U
displayName: 'AbpIdentity::DisplayName:Name',
id: 'name',
validators: () => [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<U
id: 'surname',
validators: () => [maxLength(64)],
className:"d-inline-block w-50 ps-4",
template:HalfRowComponent
template:PersonalSettingsHalfRowComponent
},
{
type: ePropType.String,

Loading…
Cancel
Save