diff --git a/docs/en/Blog-Posts/2022-01-11 v5_1_Release_Stable/POST.md b/docs/en/Blog-Posts/2022-01-11 v5_1_Release_Stable/POST.md index 8ff63e3edd..2e09e9fb21 100644 --- a/docs/en/Blog-Posts/2022-01-11 v5_1_Release_Stable/POST.md +++ b/docs/en/Blog-Posts/2022-01-11 v5_1_Release_Stable/POST.md @@ -1,14 +1,14 @@ # ABP.IO Platform 5.1 Has Been Released -Today, we are releasing the [ABP Framework](https://abp.io/) and the [ABP Commercial](https://commercial.abp.io/) version 5.1 (with a version number `5.1.1`). This blog post introduces the new features and important changes in this new version. +Today, we are releasing the [ABP Framework](https://abp.io/) and [ABP Commercial](https://commercial.abp.io/) version 5.1 (with a version number `5.1.1`). This blog post introduces the new features and important changes in this new version. > **Warning** > -> For a long time we were releasing RC (Release Candidate) versions a few weeks before every minor and major release. **This version has been released without a preview version.** This is because we've accidently released all the packages with a stable version number, without a `-rc.1` suffix and there is no clear way to unpublish all the NuGet and NPM packages. Sorry about that. However, it doesn't mean that this release is buggy. We've already resolved known problems. We will publish one or more patch releases if needed. You can follow [this milestone](https://github.com/abpframework/abp/milestone/64?closed=1) for known problems or submit your own bug report. If you are worried about its stability, you can wait for the next patch release. +> For a long time we've been releasing RC (Release Candidate) versions a few weeks prior to every minor and major release. **This version has been released without a preview version.** This is because we've accidently released all the packages with a stable version number, without a `-rc.1` suffix and there is no clear way to unpublish all the NuGet and NPM packages. We're sorry about that. However, it doesn't mean that this release is buggy. We've already resolved the known problems. We will publish one or more patch releases if needed. You can follow [this milestone](https://github.com/abpframework/abp/milestone/64?closed=1) for the common problems or submit your own bug report. If you are worried about its stability, you can wait for the next patch release. -## Get Started with the 5.1 +## Get Started with 5.1 -follow the steps below to try the version 5.1 today; +Follow the steps below to try the 5.1 version today: 1) **Upgrade** the ABP CLI to the latest version using a command line terminal: @@ -16,7 +16,7 @@ follow the steps below to try the version 5.1 today; dotnet tool update Volo.Abp.Cli -g ```` -**or install** if you haven't installed before: +**or install** if you haven't installed it before: ````bash dotnet tool install Volo.Abp.Cli -g @@ -28,7 +28,7 @@ dotnet tool install Volo.Abp.Cli -g abp new BookStore ```` -See the [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for all the available options. +Check out the [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for all the available options. > You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page. @@ -36,11 +36,11 @@ You can use any IDE that supports .NET 6.x development (e.g. [Visual Studio 2022 ### Migration Notes & Breaking Changes -This is an minor feature release, mostly with enhancements and improvements based on the [version 5.0](https://blog.abp.io/abp/ABP-IO-Platform-5-0-Final-Has-Been-Released). There is no breaking change except the Angular UI upgrade. ABP 5.1 startup templates use **Angular 13**. +This is a minor feature release, mostly with enhancements and improvements based on [version 5.0](https://blog.abp.io/abp/ABP-IO-Platform-5-0-Final-Has-Been-Released). There aren't any breaking changes except for the Angular UI upgrade. ABP 5.1 startup templates use **Angular 13**. ### Angular UI -**If you want to upgrade ABP Framework but want to continue with Angular 12**, add the following section to `package.json` file of the Angular project: +**If you want to upgrade the ABP Framework but want to continue with Angular 12**, add the following section to the `package.json` file of the Angular project: ````json "resolutions": { @@ -49,19 +49,19 @@ This is an minor feature release, mostly with enhancements and improvements base } ```` -## What's new with ABP Framework 5.1? +## What's New with the ABP Framework 5.1? In this section, I will introduce some major features released with this version. -### The new hosting model +### The New Hosting Model -ABP startup application template now uses the new ASP.NET Core hosting APIs ([see the Microsoft's minimal APIs document](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0)) on application startup ([see the exact place in the ABP startup template](https://github.com/abpframework/abp/blob/46cdfbe7b06c93690181633be4e96bf62e7f34e2/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/Program.cs#L33-L40)). So, the `Startup.cs` file has been removed. +The ABP startup application template now uses the new ASP.NET Core hosting APIs ([check out the Microsoft's minimal APIs document](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0)) on application startup ([check out the exact place in the ABP startup template](https://github.com/abpframework/abp/blob/46cdfbe7b06c93690181633be4e96bf62e7f34e2/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/Program.cs#L33-L40)). So, the `Startup.cs` file has been removed. -Old-style hosting logic will continue to work as long as ASP.NET Core supports it. It is recommended to switch to the new model if possible for your solution. See [this guide](https://docs.abp.io/en/abp/latest/Migration-Guides/Upgrading-Startup-Template) if you need to know how you can to do that. +Old-style hosting logic will continue to work as long as ASP.NET Core supports it. It is recommended to switch to the new model if it's possible for your solution. Check out [this guide](https://docs.abp.io/en/abp/latest/Migration-Guides/Upgrading-Startup-Template) if you need to know how to do that. -### Asynchronous startup lifecycle methods +### Asynchronous Startup Lifecycle Methods -The new hosting model allows us to execute asynchronous code on application initialization in [ABP module](https://docs.abp.io/en/abp/latest/Module-Development-Basics) classes. If you are using the new hosting model (which is default with 5.1 startup templates), you can override the `Async` versions of the module lifecycle methods. +The new hosting model allows us to execute asynchronous code on application initialization in the [ABP module](https://docs.abp.io/en/abp/latest/Module-Development-Basics) classes. If you are using the new hosting model (which is default with 5.1 startup templates), you can override the `Async` versions of the module lifecycle methods. For example, you can now override the `ConfigureServicesAsync` (instead of `ConfigureServices`) or `OnApplicationInitializationAsync` (instead of `OnApplicationInitialization`) as shown in the following code block: @@ -80,46 +80,46 @@ public class MyModule : AbpModule } ```` -If you override both of asynchronous and synchronous versions of the same method, only the asynchronous one will be executed. So, override only one of them based on your needs. +If you override both the asynchronous and synchronous versions of the same method, only the asynchronous one will be executed. So, override only one of them based on your needs. -### eShopOnABP is getting mature +### eShopOnABP Is Getting More Stable -Our team is working to finalize the [eShopOnAbp](https://github.com/abpframework/eShopOnAbp) example solution, which is a reference **microservice solution** built with the ABP Framework. They will explain the project status and show what's done in the next **ABP Community Talks** meeting (see the *ABP Community Talks 2021.1* section below in this post). +Our team is working to finalize the [eShopOnAbp](https://github.com/abpframework/eShopOnAbp) example solution, which is a reference **microservice solution** built with the ABP Framework. They will explain the project status and show what's done in the next **ABP Community Talks** meeting (Check out the *ABP Community Talks 2021.1* section at the bottom of this post). -### The new ABP.IO design! +### The New ABP.IO Design! -We were working on a new design for the [abp.io](https://abp.io/) websites for a while. We are making the final touches; the new design will be live very soon. Here a screenshot from the design work: +We've been working on a new design for the [abp.io](https://abp.io/) websites for a while. We are adding the final touches; the new design will be live very soon. Here's a screenshot from the design work: ![new-abp-io-design](new-abp-io-design.png) -[ABP Commercial](https://commercial.abp.io/) and [ABP Community](https://community.abp.io/) websites will also have new designs as a part of this update. +The [ABP Commercial](https://commercial.abp.io/) and [ABP Community](https://community.abp.io/) websites will also have new designs as part of this update. -### Other changes +### Other Changes -Here some other notable changes that come with this release: +Here are some other notable changes that come with this release: * Support markdown in [CMS-Kit comments ](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Comments)feature ([#10792](https://github.com/abpframework/abp/pull/10792)) * Used file scoped namespaces for all the ABP Framework source code :) ([#10552](https://github.com/abpframework/abp/pull/10696)) All issues & PRs in [5.1 milesone](https://github.com/abpframework/abp/milestone/60?closed=1). -### About the ABP Commercial +### About ABP Commercial -The core team is also working on the ABP Commercial (which provides pre-built modules, themes, tooling and support on top of the ABP Framework). We've done a lot of minor improvements and fixes to the modules and tooling. +The core team is also working on ABP Commercial (which provides pre-built modules, themes, tooling and support on top of the ABP Framework). We've done a lot of minor improvements and fixes to the modules and tooling. -One exiting new is about the **LeptonX theme**; We are working on to make it available in **MVC (Razor Pages)** and **Blazor** UI options too (in addition to the Angular UI). We are also adding more components, layout options, demo pages, etc... We are planning to release a beta version in the next weeks. Here an animated GIF from the dashboard we've prepared as a demonstration: +There's some exciting news about the **LeptonX theme**; We are working on making it available in the **MVC (Razor Pages)** and **Blazor** UI options too (in addition to Angular UI). We are also adding more components, layout options, demo pages, etc... We are planning to release a beta version in the next weeks. Here's an animated GIF from the dashboard we've prepared as a demonstration: ![leptonx-dash](leptonx-dash.gif) -If you are wondering what is the LeptonX project, please see [that blog post](https://blog.abp.io/abp/LeptonX-Theme-for-ABP-Framework-Alpha-Release). +If you are wondering what is the LeptonX project, please check out this [blog post](https://blog.abp.io/abp/LeptonX-Theme-for-ABP-Framework-Alpha-Release). As another visible functionality, we've added a new feature to the [CMS Kit Pro](https://docs.abp.io/en/commercial/latest/modules/cms-kit/index) module that is used to forward a URL to another URL. This is a screenshot from the management UI: ![url-forward](url-forward.png) -This feature can be used to create short URLs in your application (like URL shortening services provide) or forward old pages to their new URLs. +This feature can be used to create short URLs in your application (like URL shortening services providers) or forward old pages to their new URLs. -In addition to the new features shipped in every minor version, we are working on long-term projects for ABP.IO Platform and ABP Commercial (a little secret for now :). We will have announcements once these projects get mature. +In addition to the new features shipped in every minor version, we are working on long-term projects for ABP.IO Platform and ABP Commercial (a little secret for now :). We will have announcements once these projects get more stable. ## Community News @@ -127,15 +127,15 @@ In addition to the new features shipped in every minor version, we are working o ![abp-community-talks-2022-1](abp-community-talks-2022-1.png) -This is the second episode of the ABP Community Talks and we are talking about microservice development with the ABP Framework, based on the [eShopOnAbp](https://github.com/abpframework/eShopOnAbp) reference solution. We will also briefly talk about the changes that come with ABP version 5.1. This **live meeting** will be at **January 20, 2022, 17:00 (UTC)** on YouTube. +This is the second episode of the ABP Community Talks and we are talking about microservice development with the ABP Framework, based on the [eShopOnAbp](https://github.com/abpframework/eShopOnAbp) reference solution. We will also briefly talk about the changes that come with ABP version 5.1. This **live meeting** will be on **January 20, 2022, 17:00 (UTC)** on YouTube. **Join this event on the Kommunity platform: https://kommunity.com/volosoft/events/abp-community-talks-20221-microservice-development-acd0f44b** -You can also [subscribe to the Volosoft channel](https://www.youtube.com/channel/UCO3XKlpvq8CA5MQNVS6b3dQ) for reminders for further ABP events and videos. +You can also [subscribe to Volosoft YouTube channel](https://www.youtube.com/channel/UCO3XKlpvq8CA5MQNVS6b3dQ) for reminders of further ABP events and videos. -### New ABP Community posts +### New ABP Community Posts -Here, some of the recent posts added to the [ABP community](https://community.abp.io/): +Here are some of the recent posts added to the [ABP community](https://community.abp.io/): * [Minimal API development with the ABP Framework](https://community.abp.io/articles/minimal-api-with-abp-hello-world-part-1-sg5i44p8) by [@antosubash](https://github.com/antosubash) (three parts, video tutorial). * [Integrating the Syncfusion MVC Components to the ABP MVC UI](https://community.abp.io/articles/integrating-the-syncfusion-mvc-components-to-the-abp-mvc-ui-0gpkr1if) by [@EngincanV](https://github.com/EngincanV). @@ -146,4 +146,4 @@ Thanks to the ABP Community for all the contents they have published. You can al ## Conclusion -In this blog post, I summarized the news about that new version and the ABP Community. Please try it and provide feedback by opening issues on [the GitHub repository](https://github.com/abpframework/abp). Thank you all! +In this blog post, I summarized the news about the new version and the ABP Community. Please try it and provide feedback by opening issues on the [GitHub repository](https://github.com/abpframework/abp). Thank you all! diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/EntityActions/EntityAction.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/EntityActions/EntityAction.cs index 2f800c7257..837eb2c96a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/EntityActions/EntityAction.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web/Volo/Abp/AspNetCore/Components/Web/Extensibility/EntityActions/EntityAction.cs @@ -12,6 +12,7 @@ public class EntityAction : IEquatable public object Color { get; set; } public string Icon { get; set; } public Func Visible { get; set; } + public bool Disabled { get; set; } public bool Equals(EntityAction other) { return string.Equals(Text, other?.Text, StringComparison.OrdinalIgnoreCase); diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor index 459e47f442..39a86456b8 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor @@ -44,7 +44,8 @@ Clicked="async () => await action.Clicked(context)" ConfirmationMessage="() => action.ConfirmationMessage.Invoke(context)" Visible="@(action.Visible != null ? action.Visible(context) : true)" - Text="@action.Text"> + Text="@action.Text" + Disabled="@action.Disabled"> } else @@ -54,7 +55,8 @@ Color="@(action.Color != null ? (Blazorise.Color) action.Color : Blazorise.Color.None)" Icon="@action.Icon" Visible="@(action.Visible != null ? action.Visible(context) : true)" - Text="@action.Text"> + Text="@action.Text" + Disabled="@action.Disabled"> } } @@ -78,18 +80,18 @@ { @if (column.ValueConverter == null) { - } else { - @(GetConvertedFieldValue(context, column)) @@ -143,4 +145,4 @@ } } - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor index 8e4544e09c..63b0f26df0 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor @@ -6,14 +6,15 @@ { if (Primary == false) { - @Text + @Text } } else { } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor.cs index 627c4bcdda..a38d915ff1 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityAction.razor.cs @@ -12,6 +12,9 @@ public partial class EntityAction : ComponentBase [Parameter] public bool Visible { get; set; } = true; + [Parameter] + public bool Disabled { get; set; } = false; + internal bool HasPermission { get; set; } = true; [Parameter] @@ -45,7 +48,7 @@ public partial class EntityAction : ComponentBase [Inject] protected IUiMessageService UiMessageService { get; set; } - protected override async Task OnInitializedAsync() + protected async override Task OnInitializedAsync() { await base.OnInitializedAsync(); await SetDefaultValuesAsync(); diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor index 7a2fd20145..b362358d70 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor @@ -2,12 +2,13 @@ @if ( Type == ActionType.Dropdown ) { - + @if ( HasPrimaryAction ) { @@ -27,4 +28,4 @@ { @ChildContent } - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor.cs index e6a7ff9c83..4ba27bf2f7 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/EntityActions.razor.cs @@ -29,6 +29,9 @@ public partial class EntityActions : ComponentBase [Parameter] public ActionType Type { get; set; } = ActionType.Dropdown; + [Parameter] + public bool Disabled { get; set; } = false; + [CascadingParameter] public DataGridEntityActionsColumn ParentEntityActionsColumn { get; set; } @@ -46,7 +49,7 @@ public partial class EntityActions : ComponentBase ToggleText = UiLocalizer["Actions"]; } - protected override async Task OnAfterRenderAsync(bool firstRender) + protected async override Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index 5ec6217ca2..2b2f815b7c 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs index 52a2fb93b1..5462f3e9fb 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/DerivedClassFinder.cs @@ -54,8 +54,14 @@ public class DerivedClassFinder : ITransientDependency protected bool IsDerived(string csFile, string baseClass) { var root = CSharpSyntaxTree.ParseText(File.ReadAllText(csFile)).GetRoot(); - var namespaceSyntax = root.DescendantNodes().OfType().First(); - var classDeclaration = (namespaceSyntax.DescendantNodes().OfType()).First(); + var namespaceSyntax = root.DescendantNodes().OfType().FirstOrDefault(); + var classDeclaration = (namespaceSyntax?.DescendantNodes().OfType())?.FirstOrDefault(); + + if (classDeclaration == null) + { + classDeclaration = root.DescendantNodes().OfType().First(); + } + var baseTypeList = classDeclaration.BaseList?.Types.Select(t => t.ToString()).ToList(); if (baseTypeList == null) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs index d4d535317f..310e613035 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs @@ -741,13 +741,13 @@ public class SolutionModuleAdder : ITransientDependency new NugetPackageInfo { Name = $"{module.Name}.Blazor.WebAssembly", - ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorWebAssemblyModule", + ModuleClass = $"{module.Name}.Blazor.WebAssembly.{moduleProjectName}BlazorWebAssemblyModule", Target = NuGetPackageTarget.BlazorWebAssembly }, new NugetPackageInfo { Name = $"{module.Name}.Blazor.Server", - ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorServerModule", + ModuleClass = $"{module.Name}.Blazor.Server.{moduleProjectName}BlazorServerModule", Target = NuGetPackageTarget.BlazorServer }, new NugetPackageInfo