diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index a1545c57f6..6921f8e4d8 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -40,18 +40,29 @@ namespace Volo.Abp.Cli.Commands Logger.LogInformation("Creating your project..."); Logger.LogInformation("Project name: " + commandLineArgs.Target); - commandLineArgs.Options.Add(CliConsts.Command, commandLineArgs.Command); + var template = commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long); + if (template != null) + { + Logger.LogInformation("Template: " + template); + } - var result = await ProjectBuilder.BuildAsync( - new ProjectBuildArgs( - SolutionName.Parse(commandLineArgs.Target), - commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long), - commandLineArgs.Options.GetOrNull(Options.Version.Short, Options.Version.Long), - GetDatabaseProvider(commandLineArgs), - GetUiFramework(commandLineArgs), - commandLineArgs.Options - ) - ); + var version = commandLineArgs.Options.GetOrNull(Options.Version.Short, Options.Version.Long); + if (version != null) + { + Logger.LogInformation("Version: " + version); + } + + var databaseProvider = GetDatabaseProvider(commandLineArgs); + if (databaseProvider != DatabaseProvider.NotSpecified) + { + Logger.LogInformation("Database provider: " + databaseProvider); + } + + var uiFramework = GetUiFramework(commandLineArgs); + if (uiFramework != UiFramework.NotSpecified) + { + Logger.LogInformation("UI Framework: " + uiFramework); + } var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long); if (outputFolder != null) @@ -68,6 +79,21 @@ namespace Volo.Abp.Cli.Commands outputFolder = Directory.GetCurrentDirectory(); } + Logger.LogInformation("Output folder: " + outputFolder); + + commandLineArgs.Options.Add(CliConsts.Command, commandLineArgs.Command); + + var result = await ProjectBuilder.BuildAsync( + new ProjectBuildArgs( + SolutionName.Parse(commandLineArgs.Target), + template, + version, + databaseProvider, + uiFramework, + commandLineArgs.Options + ) + ); + using (var templateFileStream = new MemoryStream(result.ZipContent)) { using (var zipInputStream = new ZipInputStream(templateFileStream)) @@ -101,8 +127,7 @@ namespace Volo.Abp.Cli.Commands } } - Logger.LogInformation($"Successfully created the project '{commandLineArgs.Target}'"); - Logger.LogInformation($"The output folder is: '{outputFolder}'"); + Logger.LogInformation($"'{commandLineArgs.Target}' has been successfully created to '{outputFolder}'"); } public string GetUsageInfo() diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs index e48e7853d4..22cd692ec3 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/AbpIoApiKeyService.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.Cli.Licensing protected IJsonSerializer JsonSerializer { get; } - public async Task GetApiKeyOrNullAsync() + public async Task GetApiKeyOrNullAsync() { using (var client = new CliHttpClient()) { @@ -29,7 +29,7 @@ namespace Volo.Abp.Cli.Licensing } var responseContent = await response.Content.ReadAsStringAsync(); - return JsonSerializer.Deserialize(responseContent).ApiKey; + return JsonSerializer.Deserialize(responseContent); } } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/IApiKeyService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/IApiKeyService.cs index 9e97859148..0fb8058c61 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/IApiKeyService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/IApiKeyService.cs @@ -5,6 +5,6 @@ namespace Volo.Abp.Cli.Licensing { public interface IApiKeyService { - Task GetApiKeyOrNullAsync(); + Task GetApiKeyOrNullAsync(); } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs index 5f763b15f9..49cb44d13a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/ProjectBuildPipelineBuilder.cs @@ -1,4 +1,5 @@ using Volo.Abp.Cli.ProjectBuilding.Building.Steps; +using Volo.Abp.Cli.ProjectBuilding.Templates.App; namespace Volo.Abp.Cli.ProjectBuilding.Building { @@ -19,6 +20,12 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building pipeline.Steps.Add(new TemplateCodeDeleteStep()); pipeline.Steps.Add(new SolutionRenameStep()); + + if (context.Template.Name == AppProTemplate.TemplateName) + { + pipeline.Steps.Add(new LicenseCodeReplaceStep()); + } + pipeline.Steps.Add(new CreateProjectResultZipStep()); return pipeline; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/LicenseCodeReplaceStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/LicenseCodeReplaceStep.cs new file mode 100644 index 0000000000..b2dee80867 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/LicenseCodeReplaceStep.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Volo.Abp.Cli.ProjectBuilding.Files; + +namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps +{ + public class LicenseCodeReplaceStep : ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + var licenseCode = context.BuildArgs.ExtraProperties.GetOrDefault("license-code"); + + var appSettingsJsonFiles = context.Files.Where(f => + f.Name.EndsWith("appsettings.json", StringComparison.OrdinalIgnoreCase)); + + foreach (var appSettingsJson in appSettingsJsonFiles) + { + appSettingsJson.ReplaceText(@"", licenseCode); + } + } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs index 076ee084d1..cb6f29de7e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using Volo.Abp.Cli.ProjectBuilding.Files; namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ProjectBuilder.cs index 827e4e3d1f..6c9b6fa145 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/ProjectBuilder.cs @@ -53,10 +53,15 @@ namespace Volo.Abp.Cli.ProjectBuilding args.Version ); - var apiKey = await ApiKeyService.GetApiKeyOrNullAsync(); - if (apiKey != null) + var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync(); + if (apiKeyResult?.ApiKey != null) { - args.ExtraProperties["api-key"] = apiKey; + args.ExtraProperties["api-key"] = apiKeyResult.ApiKey; + } + + if (apiKeyResult?.LicenseCode != null) + { + args.ExtraProperties["license-code"] = apiKeyResult.LicenseCode; } var context = new ProjectBuildContext( @@ -69,7 +74,7 @@ namespace Volo.Abp.Cli.ProjectBuilding if (!templateInfo.DocumentUrl.IsNullOrEmpty()) { - Logger.LogInformation("Check out the documents: " + templateInfo.DocumentUrl); + Logger.LogInformation("Check out the documents at " + templateInfo.DocumentUrl); } // Exclude unwanted or known options. diff --git a/npm/ng-packs/packages/core/src/lib/core.module.ts b/npm/ng-packs/packages/core/src/lib/core.module.ts index ed1a93b8e0..d3c98f9925 100644 --- a/npm/ng-packs/packages/core/src/lib/core.module.ts +++ b/npm/ng-packs/packages/core/src/lib/core.module.ts @@ -18,6 +18,7 @@ import { VisibilityDirective } from './directives/visibility.directive'; import { ApiInterceptor } from './interceptors/api.interceptor'; import { ABP } from './models/common'; import { LocalizationPipe } from './pipes/localization.pipe'; +import { SortPipe } from './pipes/sort.pipe'; import { LocaleProvider } from './providers/locale.provider'; import { ConfigState } from './states/config.state'; import { ProfileState } from './states/profile.state'; @@ -46,6 +47,7 @@ import { AbstractNgModelComponent } from './abstracts/ng-model.component'; ForDirective, FormSubmitDirective, LocalizationPipe, + SortPipe, PermissionDirective, VisibilityDirective, InputEventDebounceDirective, @@ -65,6 +67,7 @@ import { AbstractNgModelComponent } from './abstracts/ng-model.component'; ForDirective, FormSubmitDirective, LocalizationPipe, + SortPipe, PermissionDirective, VisibilityDirective, InputEventDebounceDirective, diff --git a/npm/ng-packs/packages/core/src/lib/pipes/index.ts b/npm/ng-packs/packages/core/src/lib/pipes/index.ts index 7bbacf6329..4802a25ca4 100644 --- a/npm/ng-packs/packages/core/src/lib/pipes/index.ts +++ b/npm/ng-packs/packages/core/src/lib/pipes/index.ts @@ -1 +1,2 @@ export * from './localization.pipe'; +export * from "./sort.pipe"; diff --git a/npm/ng-packs/packages/core/src/lib/pipes/sort.pipe.ts b/npm/ng-packs/packages/core/src/lib/pipes/sort.pipe.ts new file mode 100644 index 0000000000..b44de74193 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/pipes/sort.pipe.ts @@ -0,0 +1,13 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'abpSort', + pure: false +}) +export class SortPipe implements PipeTransform { + transform(value: any[], sortOrder: string): any { + sortOrder = sortOrder.toLowerCase(); + if(sortOrder === "desc") return value.reverse(); + else return value; + } +} \ No newline at end of file diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html index 2acb2d3337..93134d26a4 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html +++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html @@ -1,16 +1,17 @@ -
-
-
-
-
{{ 'AbpIdentity::Roles' | abpLocalization }}
-
-
- -
+
+
+

{{ 'AbpIdentity::Roles' | abpLocalization }}

+
+
+
+
+
+ +
- + + + + + + + + + {{ 'AbpIdentity::Actions' | abpLocalization }} - {{ 'AbpIdentity::RoleName' | abpLocalization }} + + {{ 'AbpIdentity::RoleName' | abpLocalization }} + + -
+
-
+
+
+

{{ 'AbpIdentity::Users' | abpLocalization }}

+
+
+
+
+
+ +
+ + + + + + + + {{ 'AbpIdentity::Actions' | abpLocalization }} - {{ 'AbpIdentity::UserName' | abpLocalization }} - {{ 'AbpIdentity::EmailAddress' | abpLocalization }} - {{ 'AbpIdentity::PhoneNumber' | abpLocalization }} + + {{ 'AbpIdentity::UserName' | abpLocalization }} + + + {{ 'AbpIdentity::EmailAddress' | abpLocalization }} + {{ 'AbpIdentity::PhoneNumber' | abpLocalization }} -
+
-
+
+
+

{{ 'AbpTenantManagement::Tenants' | abpLocalization }}

+
+
+
+
+
+ +
- + + + + + + + + + {{ 'AbpTenantManagement::Actions' | abpLocalization }} - {{ 'AbpTenantManagement::TenantName' | abpLocalization }} + + {{ 'AbpTenantManagement::TenantName' | abpLocalization }} + + -
+
- +

{{ selectedModalContent.title | abpLocalization }}

diff --git a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts index 8624862323..a6040da45f 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts @@ -58,6 +58,8 @@ export class TenantsComponent { modalBusy: boolean = false; + sortOrder: string = 'asc'; + get useSharedDatabase(): boolean { return this.defaultConnectionStringForm.get('useSharedDatabase').value; } @@ -184,8 +186,8 @@ export class TenantsComponent { ? new UpdateTenant({ ...this.tenantForm.value, id: this.selected.id }) : new CreateTenant(this.tenantForm.value), ) + .pipe(finalize(()=> (this.modalBusy = false))) .subscribe(() => { - this.modalBusy = false; this.isModalVisible = false; }); } @@ -198,7 +200,6 @@ export class TenantsComponent { .subscribe((status: Toaster.Status) => { if (status === Toaster.Status.confirm) { this.store.dispatch(new DeleteTenant(id)); - this.modalBusy = false; } }); } @@ -217,4 +218,8 @@ export class TenantsComponent { .pipe(finalize(() => (this.loading = false))) .subscribe(); } + + changeSortOrder() { + this.sortOrder = this.sortOrder.toLowerCase() === "asc" ? "desc" : "asc"; + } } diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/index.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/index.ts index ca8f7982bc..cd1e7e8757 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/index.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/index.ts @@ -1,3 +1,4 @@ export * from './account-layout/account-layout.component'; export * from './application-layout/application-layout.component'; export * from './empty-layout/empty-layout.component'; +export * from './validation-error/validation-error.component'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/errors/validation-error.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/validation-error/validation-error.component.ts similarity index 100% rename from npm/ng-packs/packages/theme-shared/src/lib/components/errors/validation-error.component.ts rename to npm/ng-packs/packages/theme-basic/src/lib/components/validation-error/validation-error.component.ts diff --git a/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts b/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts new file mode 100644 index 0000000000..5b4e7f483a --- /dev/null +++ b/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts @@ -0,0 +1,9 @@ +export default ` +.content-header-title { + font-size: 24px; +} + +.entry-row { + margin-bottom: 15px; +} +`; \ No newline at end of file diff --git a/npm/ng-packs/packages/theme-basic/src/lib/services/initial.service.ts b/npm/ng-packs/packages/theme-basic/src/lib/services/initial.service.ts new file mode 100644 index 0000000000..fdc3861d4d --- /dev/null +++ b/npm/ng-packs/packages/theme-basic/src/lib/services/initial.service.ts @@ -0,0 +1,15 @@ +import { Injectable } from '@angular/core'; +import { Router } from '@angular/router'; +import { LazyLoadService } from '@abp/ng.core'; +import styles from '../constants/styles'; + +@Injectable({ providedIn: 'root' }) +export class InitialService { + constructor(private lazyLoadService: LazyLoadService) { + this.appendStyle().subscribe(); + } + + appendStyle() { + return this.lazyLoadService.load(null, 'style', styles, 'head', 'afterbegin'); + } +} diff --git a/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts b/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts index 2fe5dabae4..25cb7d0ebd 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts @@ -10,11 +10,13 @@ import { ApplicationLayoutComponent } from './components/application-layout/appl import { EmptyLayoutComponent } from './components/empty-layout/empty-layout.component'; import { LayoutComponent } from './components/layout/layout.component'; import { LayoutState } from './states/layout.state'; +import { ValidationErrorComponent } from './components/validation-error/validation-error.component'; +import { InitialService } from './services/initial.service'; export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent]; @NgModule({ - declarations: [...LAYOUTS, LayoutComponent], + declarations: [...LAYOUTS, LayoutComponent, ValidationErrorComponent], imports: [ CoreModule, ThemeSharedModule, @@ -23,8 +25,23 @@ export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, Empt ToastModule, NgxValidateCoreModule, NgxsModule.forFeature([LayoutState]), + NgxValidateCoreModule.forRoot({ + targetSelector: '.form-group', + blueprints: { + email: `AbpAccount::ThisFieldIsNotAValidEmailAddress.`, + max: `AbpAccount::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]`, + maxlength: `AbpAccount::ThisFieldMustBeAStringWithAMaximumLengthOf{1}[{{ requiredLength }}]`, + min: `AbpAccount::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]`, + minlength: `AbpAccount::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf[{{ min }},{{ max }}]`, + required: `AbpAccount::ThisFieldIsRequired.`, + passwordMismatch: `AbpIdentity::Identity.PasswordConfirmationFailed`, + }, + errorTemplate: ValidationErrorComponent, + }), ], exports: [...LAYOUTS], - entryComponents: [...LAYOUTS], + entryComponents: [...LAYOUTS, ValidationErrorComponent], }) -export class ThemeBasicModule {} +export class ThemeBasicModule { + constructor(private initialService: InitialService) {} +} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/change-password/change-password.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/change-password/change-password.component.html index 738a673945..f483f23e94 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/change-password/change-password.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/change-password/change-password.component.html @@ -24,9 +24,9 @@ - - {{ 'AbpIdentity::Save' | abpLocalization }} + {{ 'AbpIdentity::Save' | abpLocalization }}
diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts index e4bcb47597..0792538400 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts @@ -6,4 +6,5 @@ export * from './confirmation/confirmation.component'; export * from './loader-bar/loader-bar.component'; export * from './modal/modal.component'; export * from './profile/profile.component'; +export * from './table-empty-message/table-empty-message.component'; export * from './toast/toast.component'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/profile/profile.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/profile/profile.component.html index b0624e9d82..797b4c7509 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/profile/profile.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/profile/profile.component.html @@ -33,9 +33,9 @@ - - {{ 'AbpIdentity::Save' | abpLocalization }} + {{ 'AbpIdentity::Save' | abpLocalization }}
diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/table-empty-message/table-empty-message.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/table-empty-message/table-empty-message.component.ts new file mode 100644 index 0000000000..e53b90129e --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/table-empty-message/table-empty-message.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: '[abp-table-empty-message]', + template: ` + + {{ emptyMessage | abpLocalization }} + + `, +}) +export class TableEmptyMessageComponent { + @Input() + colspan = 2; + + @Input() + message: string; + + @Input() + localizationResource: string = 'AbpAccount'; + + @Input() + localizationProp: string = 'NoDataAvailableInDatatable'; + + get emptyMessage(): string { + return this.message || `${this.localizationResource}::${this.localizationProp}`; + } +} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 9323565f7f..40f09d6c5f 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -1,6 +1,5 @@ import { CoreModule, LazyLoadService } from '@abp/ng.core'; import { APP_INITIALIZER, Injector, ModuleWithProviders, NgModule } from '@angular/core'; -import { NgxValidateCoreModule } from '@ngx-validate/core'; import { MessageService } from 'primeng/components/common/messageservice'; import { ToastModule } from 'primeng/toast'; import { forkJoin } from 'rxjs'; @@ -11,7 +10,6 @@ import { ChangePasswordComponent } from './components/change-password/change-pas import { ChartComponent } from './components/chart/chart.component'; import { ConfirmationComponent } from './components/confirmation/confirmation.component'; import { ErrorComponent } from './components/errors/error.component'; -import { ValidationErrorComponent } from './components/errors/validation-error.component'; import { LoaderBarComponent } from './components/loader-bar/loader-bar.component'; import { ModalComponent } from './components/modal/modal.component'; import { ProfileComponent } from './components/profile/profile.component'; @@ -19,6 +17,7 @@ import { ToastComponent } from './components/toast/toast.component'; import styles from './contants/styles'; import { ErrorHandler } from './handlers/error.handler'; import { chartJsLoaded$ } from './utils/widget-utils'; +import { TableEmptyMessageComponent } from './components/table-empty-message/table-empty-message.component'; export function appendScript(injector: Injector) { const fn = function() { @@ -41,23 +40,7 @@ export function appendScript(injector: Injector) { } @NgModule({ - imports: [ - CoreModule, - ToastModule, - NgxValidateCoreModule.forRoot({ - targetSelector: '.form-group', - blueprints: { - email: `AbpAccount::ThisFieldIsNotAValidEmailAddress.`, - max: `AbpAccount::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]`, - maxlength: `AbpAccount::ThisFieldMustBeAStringWithAMaximumLengthOf{1}[{{ requiredLength }}]`, - min: `AbpAccount::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]`, - minlength: `AbpAccount::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf[{{ min }},{{ max }}]`, - required: `AbpAccount::ThisFieldIsRequired.`, - passwordMismatch: `AbpIdentity::Identity.PasswordConfirmationFailed`, - }, - errorTemplate: ValidationErrorComponent, - }), - ], + imports: [CoreModule, ToastModule], declarations: [ BreadcrumbComponent, ButtonComponent, @@ -68,8 +51,8 @@ export function appendScript(injector: Injector) { LoaderBarComponent, ModalComponent, ProfileComponent, + TableEmptyMessageComponent, ToastComponent, - ValidationErrorComponent, ], exports: [ BreadcrumbComponent, @@ -80,9 +63,10 @@ export function appendScript(injector: Injector) { LoaderBarComponent, ModalComponent, ProfileComponent, + TableEmptyMessageComponent, ToastComponent, ], - entryComponents: [ErrorComponent, ValidationErrorComponent], + entryComponents: [ErrorComponent], }) export class ThemeSharedModule { static forRoot(): ModuleWithProviders {