diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index d8f0befd48..dd7112efec 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -359,11 +359,24 @@ "InvalidFormInputs": "Please, type the valid information specified on the form.", "DDDBookEmailBody": "Thank you.
To download your book, click here.", "FreeDDDEBook": "Free DDD E-Book", + "StartFree": "Start free", + "FreeTrial": "Free Trial", + "AcceptsMarketingCommunications": " Yes, I`d like to receive ABP Commercial marketing communications.", + "PurposeOfUsage": "Purpose of usage", + "Industry": "Industry", + "Choose": "- Choose -", + "CompanyOrganizationName": "Company / Organization Name", + "CompanySize": "Company Size", + "Next": "Next", + "StartTrial": "Start My Free Trial", + "ContactUsIssues": "Contact us if you have any issues", + "TrialActivatedWarning": "Dear {0}, a user is entitled to have only 1 free trial period. You already used your trial period.", + "ActivationRequirement": "You are one step away from starting your free trial.
We have sent an email to {0} to activate your account. Check your inbox/junk/spam boxes!", "SaveAndDownload": "Save And Download", - "CompanyNameValidationMessage": "Company Name is too long.", - "AddressValidationMessage": "Address is too long.", - "TaxNoValidationMessage": "TAX/VAT No is too long.", - "NotesValidationMessage": "Too many characters.", - "CheckYourBillingInfo": "Check your billing info before creating your invoice. You can create your invoice only once!" + "CompanyNameValidationMessage": "Company name is too long!", + "AddressValidationMessage": "Address is too long!", + "TaxNoValidationMessage": "TAX/VAT No is too long!", + "NotesValidationMessage": "Notes field is too long!", + "CheckYourBillingInfo": "You can create your invoice only once! Check your billing info before creating your invoice." } -} +} \ No newline at end of file diff --git a/docs/en/Community-Articles/2021-05-24-Removing-EfCore-Migrations/POST.md b/docs/en/Community-Articles/2021-05-24-Removing-EfCore-Migrations/POST.md index 15fbbc4678..d8fa243c3b 100644 --- a/docs/en/Community-Articles/2021-05-24-Removing-EfCore-Migrations/POST.md +++ b/docs/en/Community-Articles/2021-05-24-Removing-EfCore-Migrations/POST.md @@ -30,7 +30,7 @@ If you want to make it in your solution with today, follow the steps in this art > There is one **drawback** with the new design (everything in software development is a trade-off). We need to remove the `AppUser` entity, because EF Core can't map two classes to single table without an inheritance relation. I will cover this later in this article and provide suggestions to deal with it. -> If you are using **ABP Commercial**, ABP Suite code generation won't work correctly with the new design. In this case, we suggest to wait for the next version. +> If you are using **ABP Commercial**, ABP Suite code generation won't work correctly before the version 4.4. Please upgrade to v4.4 if you are using a previous version. ## The Steps diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/ApplicationBuilderAbpJwtTokenMiddlewareExtension.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/JwtTokenMiddleware.cs rename to framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Microsoft/AspNetCore/Builder/ApplicationBuilderAbpJwtTokenMiddlewareExtension.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Routing/AbpBlazorRouterOptions.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Routing/AbpRouterOptions.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Routing/AbpBlazorRouterOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Routing/AbpRouterOptions.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ComponentsWebAssemblyBundleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ComponentsComponentsBundleContributor.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ComponentsWebAssemblyBundleContributor.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/ComponentsComponentsBundleContributor.cs diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HttpTenantResolveContributerBase.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HttpTenantResolveContributorBase.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HttpTenantResolveContributerBase.cs rename to framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/HttpTenantResolveContributorBase.cs diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyOptionsExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenancyOptionsExtensions.cs rename to framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/MultiTenancy/AbpMultiTenancyOptionsExtensions.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ObjectExtensionConfigurationDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ModuleExtensionDto.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ObjectExtensionConfigurationDto.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ModuleExtensionDto.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/CssRelativePathAdjuster.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/CssRelativePath.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/CssRelativePathAdjuster.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/CssRelativePath.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/JsTree/JQueryFormScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/JsTree/JsTreeScriptContributor.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/JsTree/JQueryFormScriptContributor.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/JsTree/JsTreeScriptContributor.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropDownDemoModel.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropDownDemoDemoModel.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropDownDemoModel.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/DropdownsDemo/DropDownDemoDemoModel.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalDependencyRegistrar.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalRegistrar.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalDependencyRegistrar.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalRegistrar.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpAspNetCoreMvcQueryStringCultureReplacement.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpAspNetCoreMvcQueryStringCultureReplacement.cs index 900d1c5de7..8e173a2e26 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpAspNetCoreMvcQueryStringCultureReplacement.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Localization/AbpAspNetCoreMvcQueryStringCultureReplacement.cs @@ -16,12 +16,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Localization { context.ReturnUrl = Regex.Replace( context.ReturnUrl, - "culture=[A-Za-z-]+?&", - $"culture={context.RequestCulture.Culture}&", + "culture=[A-Za-z-]+", + $"culture={context.RequestCulture.Culture}", RegexOptions.Compiled | RegexOptions.IgnoreCase); context.ReturnUrl = Regex.Replace( - context.ReturnUrl, "ui-culture=[A-Za-z-]+?$", + context.ReturnUrl, + "ui-culture=[A-Za-z-]+", $"ui-culture={context.RequestCulture.UICulture}", RegexOptions.Compiled | RegexOptions.IgnoreCase); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/ObjectExtending/ObjectExtendingPropertyInfoExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/ObjectExtending/ObjectExtensionPropertyInfoAspNetCoreMvcExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/ObjectExtending/ObjectExtendingPropertyInfoExtensions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/ObjectExtending/ObjectExtensionPropertyInfoAspNetCoreMvcExtensions.cs diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreUnitOfWorkOptions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreAuditingOptions.cs similarity index 100% rename from framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreUnitOfWorkOptions.cs rename to framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAspNetCoreAuditingOptions.cs diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzPeriodicBackgroundWorkerAdapter.cs similarity index 98% rename from framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs rename to framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzPeriodicBackgroundWorkerAdapter.cs index a37807e473..aa99434ed5 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzPeriodicBackgroundWorkerAdapter.cs @@ -6,6 +6,7 @@ using Volo.Abp.Threading; namespace Volo.Abp.BackgroundWorkers.Quartz { + [DisallowConcurrentExecution] public class QuartzPeriodicBackgroundWorkerAdapter : QuartzBackgroundWorkerBase, IQuartzBackgroundWorkerAdapter where TWorker : IBackgroundWorker diff --git a/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerContext.cs b/framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/PeriodicBackgroundWorkerContext.cs similarity index 100% rename from framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerContext.cs rename to framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/PeriodicBackgroundWorkerContext.cs diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseModule.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUIModule.cs similarity index 100% rename from framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseModule.cs rename to framework/src/Volo.Abp.BlazoriseUI/AbpBlazoriseUIModule.cs diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand..cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand.cs similarity index 100% rename from framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand..cs rename to framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand.cs diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Localization/AbpStringLocalizerFactoryExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Localization/AbpCoreStringLocalizerFactoryExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Core/Microsoft/Extensions/Localization/AbpStringLocalizerFactoryExtensions.cs rename to framework/src/Volo.Abp.Core/Microsoft/Extensions/Localization/AbpCoreStringLocalizerFactoryExtensions.cs diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IOnServiceExposingContext.cs similarity index 100% rename from framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IServiceExposingArgs.cs rename to framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IOnServiceExposingContext.cs diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceExposingContext.cs similarity index 100% rename from framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceExposingArgs.cs rename to framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/OnServiceExposingContext.cs diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleContributorBase.cs similarity index 100% rename from framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleContributerBase.cs rename to framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ModuleLifecycleContributorBase.cs diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolverExtensions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/ConnectionStringResolverExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolverExtensions.cs rename to framework/src/Volo.Abp.Data/Volo/Abp/Data/ConnectionStringResolverExtensions.cs diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventHandlerWithDisposeAction.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventHandlerDisposeWrapper.cs similarity index 100% rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventHandlerWithDisposeAction.cs rename to framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/EventHandlerDisposeWrapper.cs diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueSettingValueProvider.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueFeatureValueProvider.cs similarity index 100% rename from framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueSettingValueProvider.cs rename to framework/src/Volo.Abp.Features/Volo/Abp/Features/DefaultValueFeatureValueProvider.cs diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/StringLocalizerHelper.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpInternalLocalizationHelper.cs similarity index 100% rename from framework/src/Volo.Abp.Localization/Volo/Abp/Localization/StringLocalizerHelper.cs rename to framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpInternalLocalizationHelper.cs diff --git a/framework/src/Volo.Abp.MultiTenancy/System/Security/Principal/AbpClaimsIdentityExtensions.cs b/framework/src/Volo.Abp.MultiTenancy/System/Security/Principal/AbpMultiTenancyClaimsIdentityExtensions.cs similarity index 100% rename from framework/src/Volo.Abp.MultiTenancy/System/Security/Principal/AbpClaimsIdentityExtensions.cs rename to framework/src/Volo.Abp.MultiTenancy/System/Security/Principal/AbpMultiTenancyClaimsIdentityExtensions.cs diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/IgnoreMultiTenancy.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/IgnoreMultiTenancyAttribute.cs similarity index 100% rename from framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/IgnoreMultiTenancy.cs rename to framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/IgnoreMultiTenancyAttribute.cs diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/IDynamicFileManager.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/IDynamicFileProvider.cs similarity index 100% rename from framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/IDynamicFileManager.cs rename to framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/IDynamicFileProvider.cs diff --git a/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo/Abp/BlobStoring/FileSystem/AbpBlobStoringTestBase.cs b/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo/Abp/BlobStoring/FileSystem/AbpBlobStoringFileSystemTestBase.cs similarity index 100% rename from framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo/Abp/BlobStoring/FileSystem/AbpBlobStoringTestBase.cs rename to framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo/Abp/BlobStoring/FileSystem/AbpBlobStoringFileSystemTestBase.cs diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicTheme.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicThemeModule.cs similarity index 100% rename from modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicTheme.cs rename to modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/AbpAspNetCoreComponentsWebAssemblyBasicThemeModule.cs diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolbarViewComponent.cs similarity index 100% rename from modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolsViewComponent.cs rename to modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/MainNavbarToolbarViewComponent.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs index 0ff1ad7bfa..65d6b0e1ca 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs @@ -39,7 +39,7 @@ namespace Volo.CmsKit.Menus public Guid? PageId { get; protected set; } - public Guid? TenantId { get; } + public Guid? TenantId { get; protected set; } public MenuItem(Guid id, [NotNull] string displayName, diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/PublicPageModel.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKitPublicPageModelBase.cs similarity index 100% rename from modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/PublicPageModel.cs rename to modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKitPublicPageModelBase.cs diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsHttpApiClientModule.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsAdminHttpApiClientModule.cs similarity index 100% rename from modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsHttpApiClientModule.cs rename to modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsAdminHttpApiClientModule.cs diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/BloggingMongoDbModule.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbModule.cs similarity index 100% rename from modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/BloggingMongoDbModule.cs rename to modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbModule.cs diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentParseParamaters.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentRenderParameters.cs similarity index 100% rename from modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentParseParamaters.cs rename to modules/docs/src/Volo.Docs.Web/HtmlConverting/DocumentRenderParameters.cs diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLinkManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityLinkUserManager.cs similarity index 100% rename from modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserLinkManager.cs rename to modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityLinkUserManager.cs diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientIdentityUserLookupService.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientExternalUserLookupServiceProvider.cs similarity index 100% rename from modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientIdentityUserLookupService.cs rename to modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/HttpClientExternalUserLookupServiceProvider.cs diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/IdentityUserExtensions.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/IdentityUserDtoExtensions.cs similarity index 100% rename from modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/IdentityUserExtensions.cs rename to modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity/IdentityUserDtoExtensions.cs diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopeConsts.cs similarity index 100% rename from modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopeConsts.cs diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs similarity index 100% rename from modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistentGrantRepository.cs similarity index 100% rename from modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs rename to modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistentGrantRepository.cs diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityApplicationTestBase.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestBase.cs similarity index 100% rename from modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityApplicationTestBase.cs rename to modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestBase.cs diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/SettingManagementApplicationModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/AbpSettingManagementApplicationModule.cs similarity index 100% rename from modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/SettingManagementApplicationModule.cs rename to modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/AbpSettingManagementApplicationModule.cs diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/AbpTenantManagementDomainTestModule.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/AbpSettingManagementDomainTestModule.cs similarity index 100% rename from modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/AbpTenantManagementDomainTestModule.cs rename to modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/AbpSettingManagementDomainTestModule.cs diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/AbpVirtualFileExplorerMenuContributor.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/VirtualFileExplorerMenuContributor.cs similarity index 100% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/AbpVirtualFileExplorerMenuContributor.cs rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/VirtualFileExplorerMenuContributor.cs diff --git a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts index eb2a0d30b6..69cf23e8a4 100644 --- a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { map, tap } from 'rxjs/operators'; +import { Observable, Subject } from 'rxjs'; +import { map, take, switchMap } from 'rxjs/operators'; import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { InternalStore } from '../utils/internal-store-utils'; import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; @@ -15,14 +15,29 @@ export class ConfigStateService { return this.store.sliceUpdate; } - constructor(private abpConfigService: AbpApplicationConfigurationService) {} + private updateSubject = new Subject(); + constructor(private abpConfigService: AbpApplicationConfigurationService) { + this.initUpdateStream(); + } + + private initUpdateStream() { + this.updateSubject + .pipe(switchMap(() => this.abpConfigService.get())) + .subscribe(res => this.setState(res)); + } + + /** + * @deprecated do not use this method directly, instead call refreshAppState + * This method will be private in v5.0 + */ setState(state: ApplicationConfigurationDto) { this.store.set(state); } refreshAppState() { - return this.abpConfigService.get().pipe(tap(res => this.setState(res))); + this.updateSubject.next(); + return this.createOnUpdateStream(state => state).pipe(take(1)); } getOne$(key: string) { diff --git a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts index dc229a4c22..fe6e410f24 100644 --- a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts @@ -1,10 +1,9 @@ import { registerLocaleData } from '@angular/common'; import { Injectable, Injector, isDevMode, Optional, SkipSelf } from '@angular/core'; import { from, Observable, Subject } from 'rxjs'; -import { filter, map, mapTo, switchMap, tap } from 'rxjs/operators'; +import { filter, map, mapTo, switchMap } from 'rxjs/operators'; import { ABP } from '../models/common'; import { Config } from '../models/config'; -import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { CORE_OPTIONS } from '../tokens/options.token'; import { createLocalizer, createLocalizerWithFallback } from '../utils/localization-utils'; @@ -35,7 +34,6 @@ export class LocalizationService { @SkipSelf() otherInstance: LocalizationService, private configState: ConfigStateService, - private appConfigService: AbpApplicationConfigurationService, ) { if (otherInstance) throw new Error('LocalizationService should have only one instance.'); @@ -49,12 +47,7 @@ export class LocalizationService { filter( lang => this.configState.getDeep('localization.currentCulture.cultureName') !== lang, ), - switchMap(lang => - this.appConfigService - .get() - .pipe(tap(res => this.configState.setState(res))) - .pipe(mapTo(lang)), - ), + switchMap(lang => this.configState.refreshAppState().pipe(mapTo(lang))), switchMap(lang => from(this.registerLocale(lang).then(() => lang))), ) .subscribe(lang => this._languageChange$.next(lang)); diff --git a/npm/ng-packs/packages/core/src/lib/states/config.state.ts b/npm/ng-packs/packages/core/src/lib/states/config.state.ts index 4cc2dc741d..455014e895 100644 --- a/npm/ng-packs/packages/core/src/lib/states/config.state.ts +++ b/npm/ng-packs/packages/core/src/lib/states/config.state.ts @@ -1,19 +1,17 @@ import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Action, createSelector, Selector, State, StateContext, Store } from '@ngxs/store'; -import { of, throwError } from 'rxjs'; -import { catchError, distinctUntilChanged, switchMap, tap } from 'rxjs/operators'; +import { throwError } from 'rxjs'; +import { catchError, distinctUntilChanged } from 'rxjs/operators'; import snq from 'snq'; import { GetAppConfiguration, PatchConfigState, SetEnvironment } from '../actions/config.actions'; import { RestOccurError } from '../actions/rest.actions'; -import { ApplicationConfiguration } from '../models/application-configuration'; import { Config } from '../models/config'; import { ConfigStateService } from '../services/config-state.service'; import { EnvironmentService } from '../services/environment.service'; import { SessionStateService } from '../services/session-state.service'; import { interpolate } from '../utils/string-utils'; import compare from 'just-compare'; -import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; /** * @deprecated Use ConfigStateService instead. To be deleted in v5.0. @@ -143,11 +141,16 @@ export class ConfigState { } static getLocalizationResource(resourceName: string) { - const selector = createSelector([ConfigState], (state: Config.State): { - [key: string]: string; - } => { - return state.localization.values[resourceName]; - }); + const selector = createSelector( + [ConfigState], + ( + state: Config.State, + ): { + [key: string]: string; + } => { + return state.localization.values[resourceName]; + }, + ); return selector; } @@ -217,9 +220,7 @@ export class ConfigState { } constructor( - private http: HttpClient, private store: Store, - private sessionState: SessionStateService, private environmentService: EnvironmentService, private configState: ConfigStateService, ) { @@ -245,15 +246,12 @@ export class ConfigState { addData({ patchState, dispatch }: StateContext) { const apiName = 'default'; const api = this.store.selectSnapshot(ConfigState.getApiUrl(apiName)); - return this.http - .get(`${api}/api/abp/application-configuration`) - .pipe( - tap(configuration => this.configState.setState(configuration)), - catchError((err: HttpErrorResponse) => { - dispatch(new RestOccurError(err)); - return throwError(err); - }), - ); + return this.configState.refreshAppState().pipe( + catchError((err: HttpErrorResponse) => { + dispatch(new RestOccurError(err)); + return throwError(err); + }), + ); } @Action(SetEnvironment) diff --git a/npm/ng-packs/packages/core/src/lib/strategies/auth-flow.strategy.ts b/npm/ng-packs/packages/core/src/lib/strategies/auth-flow.strategy.ts index 4cb959ac45..001d0e8842 100644 --- a/npm/ng-packs/packages/core/src/lib/strategies/auth-flow.strategy.ts +++ b/npm/ng-packs/packages/core/src/lib/strategies/auth-flow.strategy.ts @@ -13,7 +13,6 @@ import { from, Observable, of, pipe } from 'rxjs'; import { filter, switchMap, tap } from 'rxjs/operators'; import { RestOccurError } from '../actions/rest.actions'; import { LoginParams } from '../models/auth'; -import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { ConfigStateService } from '../services/config-state.service'; import { EnvironmentService } from '../services/environment.service'; import { SessionStateService } from '../services/session-state.service'; @@ -32,7 +31,6 @@ export abstract class AuthFlowStrategy { protected oAuthService: OAuthService; protected oAuthConfig: AuthConfig; protected sessionState: SessionStateService; - protected appConfigService: AbpApplicationConfigurationService; protected tenantKey: string; abstract checkIfInternalAuth(queryParams?: Params): boolean; @@ -47,7 +45,6 @@ export abstract class AuthFlowStrategy { this.environment = injector.get(EnvironmentService); this.configState = injector.get(ConfigStateService); this.oAuthService = injector.get(OAuthService); - this.appConfigService = injector.get(AbpApplicationConfigurationService); this.sessionState = injector.get(SessionStateService); this.oAuthConfig = this.environment.getEnvironment().oAuthConfig; this.tenantKey = injector.get(TENANT_KEY); @@ -84,11 +81,9 @@ export abstract class AuthFlowStrategy { .pipe( filter(event => event instanceof OAuthErrorEvent), tap(() => clearOAuthStorage()), - switchMap(() => this.appConfigService.get()), + switchMap(() => this.configState.refreshAppState()), ) - .subscribe(res => { - this.configState.setState(res); - }); + .subscribe(); } } @@ -148,9 +143,7 @@ export class AuthPasswordFlowStrategy extends AuthFlowStrategy { } else { this.oAuthService.logOut(); removeRememberMe(); - this.appConfigService.get().subscribe(res => { - this.configState.setState(res); - }); + this.configState.refreshAppState().subscribe(); } }); } @@ -188,9 +181,8 @@ export class AuthPasswordFlowStrategy extends AuthFlowStrategy { const router = this.injector.get(Router); return pipe( - switchMap(() => this.appConfigService.get()), - tap(res => { - this.configState.setState(res); + switchMap(() => this.configState.refreshAppState()), + tap(() => { setRememberMe(params.rememberMe); if (params.redirectUrl) router.navigate([params.redirectUrl]); }), @@ -201,9 +193,8 @@ export class AuthPasswordFlowStrategy extends AuthFlowStrategy { const router = this.injector.get(Router); return from(this.oAuthService.revokeTokenAndLogout(queryParams)).pipe( - switchMap(() => this.appConfigService.get()), - tap(res => { - this.configState.setState(res); + switchMap(() => this.configState.refreshAppState()), + tap(() => { router.navigateByUrl('/'); removeRememberMe(); }), diff --git a/npm/ng-packs/packages/core/src/lib/utils/auth-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/auth-utils.ts index 44da3f7c4a..10fe1e1177 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/auth-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/auth-utils.ts @@ -4,7 +4,6 @@ import { OAuthStorage, TokenResponse } from 'angular-oauth2-oidc'; import { pipe } from 'rxjs'; import { switchMap, tap } from 'rxjs/operators'; import { LoginParams } from '../models/auth'; -import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { ConfigStateService } from '../services/config-state.service'; const cookieKey = 'rememberMe'; @@ -15,13 +14,11 @@ export function pipeToLogin( injector: Injector, ) { const configState = injector.get(ConfigStateService); - const appConfigService = injector.get(AbpApplicationConfigurationService); const router = injector.get(Router); return pipe( - switchMap(() => appConfigService.get()), - tap(res => { - configState.setState(res); + switchMap(() => configState.refreshAppState()), + tap(() => { setRememberMe(params.rememberMe); if (params.redirectUrl) router.navigate([params.redirectUrl]); }), diff --git a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts index 87982d8bd0..9c14d14b6d 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts @@ -5,7 +5,6 @@ import { tap, catchError } from 'rxjs/operators'; import { throwError } from 'rxjs'; import { ABP } from '../models/common'; import { Environment } from '../models/environment'; -import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { CurrentTenantDto } from '../proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models'; import { AuthService } from '../services/auth.service'; import { ConfigStateService } from '../services/config-state.service'; @@ -21,7 +20,6 @@ export function getInitialData(injector: Injector) { const fn = async () => { const environmentService = injector.get(EnvironmentService); const configState = injector.get(ConfigStateService); - const appConfigService = injector.get(AbpApplicationConfigurationService); const options = injector.get(CORE_OPTIONS) as ABP.Root; environmentService.setState(options.environment as Environment); @@ -31,10 +29,9 @@ export function getInitialData(injector: Injector) { if (options.skipGetAppConfiguration) return; - return appConfigService - .get() + return configState + .refreshAppState() .pipe( - tap(res => configState.setState(res)), tap(() => checkAccessToken(injector)), tap(() => { const currentTenant = configState.getOne('currentTenant') as CurrentTenantDto; diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts index 4bda77b4fb..e40779eba4 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts @@ -1,12 +1,8 @@ -import { - AbpApplicationConfigurationService, - ConfigStateService, - TrackByService, -} from '@abp/ng.core'; +import { ConfigStateService, TrackByService } from '@abp/ng.core'; import { LocaleDirection } from '@abp/ng.theme.shared'; import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Store } from '@ngxs/store'; -import { finalize, tap } from 'rxjs/operators'; +import { finalize } from 'rxjs/operators'; import { FeatureManagement } from '../../models/feature-management'; import { FeaturesService } from '../../proxy/feature-management/features.service'; import { @@ -29,7 +25,8 @@ enum ValueTypes { export class FeatureManagementComponent implements FeatureManagement.FeatureManagementComponentInputs, - FeatureManagement.FeatureManagementComponentOutputs { + FeatureManagement.FeatureManagementComponentOutputs +{ @Input() providerKey: string; @@ -70,7 +67,6 @@ export class FeatureManagementComponent protected service: FeaturesService, protected store: Store, protected configState: ConfigStateService, - protected appConfigService: AbpApplicationConfigurationService, ) {} openModal() { @@ -122,10 +118,7 @@ export class FeatureManagementComponent if (!this.providerKey) { // to refresh host's features - this.appConfigService - .get() - .pipe(tap(res => this.configState.setState(res))) - .subscribe(); + this.configState.refreshAppState().subscribe(); } }); } diff --git a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts index 67a48cb507..2fe9a1f294 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts +++ b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts @@ -1,8 +1,4 @@ -import { - AbpApplicationConfigurationService, - ConfigStateService, - CurrentUserDto, -} from '@abp/ng.core'; +import { ConfigStateService, CurrentUserDto } from '@abp/ng.core'; import { LocaleDirection } from '@abp/ng.theme.shared'; import { Component, EventEmitter, Input, Output, TrackByFunction } from '@angular/core'; import { Select, Store } from '@ngxs/store'; @@ -39,7 +35,8 @@ type PermissionWithStyle = PermissionGrantInfoDto & { export class PermissionManagementComponent implements PermissionManagement.PermissionManagementComponentInputs, - PermissionManagement.PermissionManagementComponentOutputs { + PermissionManagement.PermissionManagementComponentOutputs +{ @Input() readonly providerName: string; @@ -105,21 +102,17 @@ export class PermissionManagementComponent map(permissions => permissions.map( permission => - (({ + ({ ...permission, style: { [margin]: findMargin(permissions, permission) }, isGranted: this.permissions.find(per => per.name === permission.name).isGranted, - } as any) as PermissionWithStyle), + } as any as PermissionWithStyle), ), ), ); } - constructor( - protected store: Store, - protected configState: ConfigStateService, - protected appConfigService: AbpApplicationConfigurationService, - ) {} + constructor(protected store: Store, protected configState: ConfigStateService) {} getChecked(name: string) { return (this.permissions.find(per => per.name === name) || { isGranted: false }).isGranted; @@ -253,9 +246,7 @@ export class PermissionManagementComponent ) .pipe( switchMap(() => - this.shouldFetchAppConfig() - ? this.appConfigService.get().pipe(tap(res => this.configState.setState(res))) - : of(null), + this.shouldFetchAppConfig() ? this.configState.refreshAppState() : of(null), ), finalize(() => (this.modalBusy = false)), )