Browse Source

Merge branch 'dev' into extra-properties-autocomplete

pull/6135/head
Ilkay Ilknur 6 years ago
parent
commit
0f39498c0c
  1. 2
      .github/workflows/build-and-test.yml
  2. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json
  3. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json
  4. 11
      common.DotSettings
  5. 142
      docs/en/Blog-Posts/2020-11-12 v4_0_Preview/POST.md
  6. BIN
      docs/en/Blog-Posts/2020-11-12 v4_0_Preview/abp-suite-auto-complete-dropdown.png
  7. 6
      docs/en/CLI.md
  8. 1
      docs/en/Customizing-Application-Modules-Overriding-Services.md
  9. 11
      docs/en/Migration-Guides/Abp-4_0-Angular.md
  10. 88
      docs/en/Migration-Guides/Abp-4_0-Blazor.md
  11. 6
      docs/en/Migration-Guides/Abp-4_0-MVC-Razor-Pages.md
  12. 181
      docs/en/Migration-Guides/Abp-4_0.md
  13. 11
      docs/en/Road-Map.md
  14. 4
      docs/en/UI/Angular/Component-Replacement.md
  15. 4
      docs/en/UI/Angular/Config-State.md
  16. 5
      docs/en/UI/Angular/Confirmation-Service.md
  17. 5
      docs/en/UI/Angular/Content-Projection-Service.md
  18. 7
      docs/en/UI/Angular/Cross-Origin-Strategy.md
  19. 4
      docs/en/UI/Angular/Dom-Insertion-Service.md
  20. 5
      docs/en/UI/Angular/Environment.md
  21. 6
      docs/en/UI/Angular/Feature-Libraries.md
  22. 4
      docs/en/UI/Angular/Features.md
  23. 140
      docs/en/UI/Angular/Form-Validation.md
  24. 4
      docs/en/UI/Angular/HTTP-Requests.md
  25. 7
      docs/en/UI/Angular/Lazy-Load-Service.md
  26. 5
      docs/en/UI/Angular/List-Service.md
  27. 4
      docs/en/UI/Angular/Localization.md
  28. 5
      docs/en/UI/Angular/Migration-Guide-v3.md
  29. 5
      docs/en/UI/Angular/Modifying-the-Menu.md
  30. 4
      docs/en/UI/Angular/Multi-Tenancy.md
  31. 4
      docs/en/UI/Angular/PWA-Configuration.md
  32. 6
      docs/en/UI/Angular/Permission-Management.md
  33. 6
      docs/en/UI/Angular/Quick-Start.md
  34. 4
      docs/en/UI/Angular/Service-Proxies.md
  35. 4
      docs/en/UI/Angular/Settings.md
  36. 4
      docs/en/UI/Angular/Subscription-Service.md
  37. 4
      docs/en/UI/Angular/Toaster-Service.md
  38. 6
      docs/en/UI/Angular/Track-By-Service.md
  39. BIN
      docs/en/UI/Angular/images/form-validation---custom-error-template.gif
  40. BIN
      docs/en/UI/Angular/images/form-validation---error-display-user-experience.gif
  41. BIN
      docs/en/UI/Angular/images/form-validation---new-error-message.gif
  42. BIN
      docs/en/UI/Angular/images/form-validation---overwrite-error-message.gif
  43. 4
      docs/en/UI/AspNetCore/Overall.md
  44. 4
      docs/en/docs-nav.json
  45. 1
      docs/zh-Hans/Customizing-Application-Modules-Overriding-Services.md
  46. 2
      framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj
  47. 2
      framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj
  48. 4
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj
  49. 2
      framework/src/Volo.Abp.AspNetCore.Components/Volo.Abp.AspNetCore.Components.csproj
  50. 15
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/VeeValidate/VeeValidateScriptContributor.cs
  51. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Vue/VueScriptContributor.cs
  52. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj
  53. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj
  54. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs
  55. 3
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs
  56. 2
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
  57. 2
      framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj
  58. 16
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs
  59. 2
      framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj
  60. 2
      framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor
  61. 6
      framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor.cs
  62. 2
      framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj
  63. 2
      framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj
  64. 17
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs
  65. 4
      framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj
  66. 18
      framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj
  67. 2
      framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj
  68. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj
  69. 4
      framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj
  70. 2
      framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj
  71. 2
      framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj
  72. 2
      framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj
  73. 2
      framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj
  74. 2
      framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs
  75. 15
      framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumConverter.cs
  76. 40
      framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumFactory.cs
  77. 1
      framework/src/Volo.Abp.Swashbuckle/Microsoft/AspNetCore/Builder/AbpSwaggerUIBuilderExtensions.cs
  78. 54
      framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs
  79. 3
      framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.swagger.js
  80. 6
      framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj
  81. 2
      framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj
  82. 8
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController.cs
  83. 25
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController_Tests.cs
  84. 19
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/TestResultFilter.cs
  85. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj
  86. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj
  87. 2
      framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj
  88. 2
      framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpHybridJsonSerializer_Tests.cs
  89. 63
      framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpSystemTextJsonSerializerProvider_Tests.cs
  90. 2
      framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj
  91. 2
      global.json
  92. 2
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj
  93. 4
      modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj
  94. 2
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj
  95. 2
      modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj
  96. 2
      modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj
  97. 2
      modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj
  98. 2
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj
  99. 2
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj
  100. 2
      modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj

2
.github/workflows/build-and-test.yml

@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-dotnet@master - uses: actions/setup-dotnet@master
with: with:
dotnet-version: 5.0.100-rc.2.20479.15 dotnet-version: 5.0.100
- name: Build All - name: Build All
run: .\build-all.ps1 run: .\build-all.ps1

4
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json

@ -30,6 +30,8 @@
"UserNameNotFound": "There is no user with username {0}", "UserNameNotFound": "There is no user with username {0}",
"SuccessfullyAddedToNewsletter": "Thanks you for subscribing to our newsletter!", "SuccessfullyAddedToNewsletter": "Thanks you for subscribing to our newsletter!",
"MyProfile": "My profile", "MyProfile": "My profile",
"EmailNotValid": "Please enter a valid email address." "EmailNotValid": "Please enter a valid email address.",
"JoinOurMarketingNewsletter": "Join our marketing newsletter",
"WouldLikeToReceiveMarketingMaterials": "I would like to receive marketing materials like product deals & special offers."
} }
} }

4
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json

@ -96,9 +96,9 @@
"NoThanks": "No, thanks", "NoThanks": "No, thanks",
"MaybeLater": "Maybe later", "MaybeLater": "Maybe later",
"JoinOurArticleNewsletter": "Join our article newsletter", "JoinOurArticleNewsletter": "Join our article newsletter",
"JoinOurMarketingNewsletter": "Join our marketing newsletter",
"Community": "Community", "Community": "Community",
"Marketing": "Marketing", "Marketing": "Marketing",
"ArticleAssignMessage": "Want to write this article? Click here to" "ArticleAssignMessage": "Want to write this article? Click here to",
"CommunityPrivacyPolicyConfirmation": "I agree to the Terms & Conditions and <a href=\"https://commercial.abp.io/Privacy\">Privacy Policy</a>."
} }
} }

11
common.DotSettings

@ -20,6 +20,17 @@
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String> <s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String> <s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String> <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
<s:Boolean x:Key="/Default/Environment/InlayHints/CppTypeNameHintsOptions/HideTypeNameHintsWhenTypeNameIsEvidentFromVariableName/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/Environment/InlayHints/CppTypeNameHintsOptions/ShowMethodReturnTypeNameHints/@EntryValue">Never</s:String>
<s:String x:Key="/Default/Environment/InlayHints/CppTypeNameHintsOptions/ShowTypeNameHintsForImplicitlyTypedVariables/@EntryValue">Never</s:String>
<s:Boolean x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/HideTypeNameHintsWhenTypeNameIsEvidentFromVariableName/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/ShowMethodReturnTypeNameHints/@EntryValue">Never</s:String>
<s:String x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/ShowTypeNameHintsForImplicitlyTypedVariables/@EntryValue">Never</s:String>
<s:String x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/ShowTypeNameHintsForLambdaExpressionParameters/@EntryValue">Never</s:String>
<s:String x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/ShowTypeNameHintsForLinqQueryRangeVariables/@EntryValue">Never</s:String>
<s:String x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/ShowTypeNameHintsForPatternMatchingExpressions/@EntryValue">Never</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002EDaemon_002ETypeNameHints_002ECppTypeNameHintsOptionsMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002ETypeNameHints_002ECSharpTypeNameHintsOptionsMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/TypeNameHintsOptions/HideTypeNameHintsWhenTypeNameIsEvidentFromVariableName/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/Environment/TypeNameHintsOptions/HideTypeNameHintsWhenTypeNameIsEvidentFromVariableName/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/Environment/TypeNameHintsOptions/ShowMethodReturnTypeNameHints/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/Environment/TypeNameHintsOptions/ShowMethodReturnTypeNameHints/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/Environment/TypeNameHintsOptions/ShowTypeNameHintsForImplicitlyTypedVariables/@EntryValue">False</s:Boolean> <s:Boolean x:Key="/Default/Environment/TypeNameHintsOptions/ShowTypeNameHintsForImplicitlyTypedVariables/@EntryValue">False</s:Boolean>

142
docs/en/Blog-Posts/2020-11-12 v4_0_Preview/POST.md

@ -0,0 +1,142 @@
# ABP Framework 4.0 RC Has Been Published based on .NET 5.0!
Today, we have released the [ABP Framework](https://abp.io/) (and the [ABP Commercial](https://commercial.abp.io/)) `4.0.0-rc.1` that is based on the **.NET 5.0**. This blog post introduces the new features and important changes in the new version.
> **The planned release date for the [4.0.0 final](https://github.com/abpframework/abp/milestone/45) version is November 26, 2020**.
## Get Started with the 4.0 RC.1
If you want to try the version `4.0.0-rc.1` today, follow the steps below;
1) **Upgrade** the ABP CLI to the version `4.0.0-rc.1` using a command line terminal:
````bash
dotnet tool update Volo.Abp.Cli -g --version 4.0.0-rc.1
````
**or install** if you haven't installed before:
````bash
dotnet tool install Volo.Abp.Cli -g --version 4.0.0-rc.1
````
2) Create a **new application** with the `--preview` option:
````bash
abp new BookStore --preview
````
See the [ABP CLI documentation](https://docs.abp.io/en/abp/3.3/CLI) for all the available options.
> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the **Preview checkbox**.
## Migrating From 3.x to 4.0
The version 4.0 comes with some major changes including the **migration from .NET Core 3.1 to .NET 5.0**.
We've prepared a **detailed [migration document](https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0)** to explain all the changes and the actions you need to take while upgrading your existing solutions.
## What's new with the ABP Framework 4.0
### The Blazor UI
The Blazor UI is now stable and officially supported. The [web application development tutorial](https://docs.abp.io/en/abp/4.0/Tutorials/Part-1?UI=Blazor) has been updated based on the version 4.0.
#### abp bundle command
Introducing the `abp bundle` CLI command to manage static JavaScript & CSS file dependencies of a Blazor application. This command is currently used to add the dependencies to the `index.html` file in the dependency order by respecting to modularity. In the next version it will automatically unify & minify the files. The documentation is being prepared.
#### Removed the JQuery & Bootstrap JavaScript
Removed JQuery & Bootstrap JavaScript dependencies for the Blazor UI.
>There are some other changes in the startup template and some public APIs. Follow the [Migration Guide](https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0) to apply changes for existing solutions that you're upgrading from the version 3.3. While we will continue to make improvements add new features, we no longer make breaking changes on the existing APIs until the version 5.0.
#### Others
A lot of minor and major improvements have been done for the Blazor UI. Some of them are listed below:
* Implemented `IComponentActivator` to resolve the component from the `IServiceProvider`. So, you can now inject dependencies into the constructor of your razor component.
* Introduced the `AbpComponentBase` base class that you derive your components from. It has useful base properties that you can use in your pages/components.
* Introduced `IUiNotificationService` service to show toast notifications on the UI.
* Improved the `IUiMessageService` to show message & confirmation dialogs.
### System.Text.Json
ABP Framework 4.0 uses the System.Text.Json by default as the JSON serialization library. It, actually, using a hybrid approach: Continues to use the Newtonsoft.Json when it needs to use the features not supported by the System.Text.Json.
Follow the [Migration Guide](https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0) to learn how to configure to use the Newtonsoft.Json for some specific types or switch back to the Newtonsoft.Json as the default JSON serializer.
### Identity Server 4 Upgrade
ABP Framework upgrades the [IdentityServer4](https://www.nuget.org/packages/IdentityServer4) library from 3.x to 4.1.1 with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes. Some of them are **breaking changes in the data structure**.
Follow the [Migration Guide](https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0) to upgrade existing solutions.
### Creating a New Module Inside the Application
ABP CLI has now a command to create a new module and add it to an existing solution. In this way, you can create modular applications easier than before.
Example: Create a *ProductManagement* module into your solution.
````bash
abp add-module ProductManagement --new --add-to-solution-file
````
Execute this command in a terminal in the root folder of your solution. If you don't specify the `--add-to-solution-file` option, then the module projects will not be added to the main solution, but the project references still be added. In this case, you need to open the module's solution to develop the module.
See the [CLI document](https://docs.abp.io/en/abp/4.0/CLI) for other options.
### WPF Startup Template
Introducing the WPF startup template for the ABP Framework. Use the ABP CLI new command to create a new WPF application:
````bash
abp new MyWpfApp -t wpf
````
This is a minimalist, empty project template that is integrated to the ABP Framework.
### New Languages
**Thanks to the contributors** from the ABP Community, the framework modules and the startup template have been localized to **German** (by [Alexander Pilhar](https://github.com/alexanderpilhar) & [Nico Lachmuth](https://github.com/tntwist)) and **Spanish** (by [Jose Manuel Gonzalez](https://github.com/jmglezgz)) languages.
### Other Notes
* Since [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library not supports transactions, you can use transactions in unit tests for MongoDB.
## What's new with the ABP Commercial 4.0
### The Blazor UI
The Blazor UI for the ABP Commercial is also becomes stable and feature rich with the version 4.0;
* [ABP Suite](https://commercial.abp.io/tools/suite) now supports to generate CRUD pages for the Blazor UI.
* Completed the [Lepton Theme](https://commercial.abp.io/themes) for the Blazor UI.
* Implemented the [File Management](https://commercial.abp.io/modules/Volo.FileManagement) module for the Blazor UI.
### The ABP Suite
While creating create/edit modals with a navigation property, we had two options: A dropdown to select the target entity and a modal to select the entity by searching with a data table.
Dropdown option now supports **lazy load, search and auto-complete**. In this way, selecting a navigation property becomes much easier and supports large data sets on the dropdown.
**Example: Select an author while creating a new book**
![abp-suite-auto-complete-dropdown](abp-suite-auto-complete-dropdown.png)
With the new version, you can **disable backend code generation** on CRUD page generation. This is especially useful if you want to regenerate the page with a different UI framework, but don't want to regenerate the server side code.
### Identity Server Management UI Revised
Completely revised the Identity Server Management UI based on the IDS 4.x changes.
## About the Next Release
The next feature version, `4.1.0`, will mostly focus on completing the missing documents, fixing bugs, performance optimizations and improving the Blazor UI features. The planned preview release date for the version `4.1.0` is December 10 and the final (stable) version release date is December 24.
Follow the [GitHub milestones](https://github.com/abpframework/abp/milestones) for all the planned ABP Framework version release dates.
## Feedback
Please check out the ABP Framework 4.0.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. **The planned release date for the [4.0.0 final](https://github.com/abpframework/abp/milestone/45) version is November 26**.

BIN
docs/en/Blog-Posts/2020-11-12 v4_0_Preview/abp-suite-auto-complete-dropdown.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

6
docs/en/CLI.md

@ -178,7 +178,7 @@ abp add-module Volo.Blogging
* This example adds the `Volo.Blogging` module to the solution. * This example adds the `Volo.Blogging` module to the solution.
```bash ```bash
abp add-module ProductManagement --new-template --add-to-solution-file abp add-module ProductManagement --new --add-to-solution-file
``` ```
* This command creates a fresh new module customized for your solution (named `ProductManagement`) and adds it to your solution. * This command creates a fresh new module customized for your solution (named `ProductManagement`) and adds it to your solution.
@ -189,8 +189,8 @@ abp add-module ProductManagement --new-template --add-to-solution-file
* `--solution` or `-s`: Specifies the solution (.sln) file path. If not specified, CLI tries to find a .sln file in the current directory. * `--solution` or `-s`: Specifies the solution (.sln) file path. If not specified, CLI tries to find a .sln file in the current directory.
* `--skip-db-migrations`: For EF Core database provider, it automatically adds a new code first migration (`Add-Migration`) and updates the database (`Update-Database`) if necessary. Specify this option to skip this operation. * `--skip-db-migrations`: For EF Core database provider, it automatically adds a new code first migration (`Add-Migration`) and updates the database (`Update-Database`) if necessary. Specify this option to skip this operation.
* `-sp` or `--startup-project`: Relative path to the project folder of the startup project. Default value is the current folder. * `-sp` or `--startup-project`: Relative path to the project folder of the startup project. Default value is the current folder.
* `--new-template`: Creates a fresh new module (customized for your solution) and adds it to your solution. * `--new`: Creates a fresh new module (customized for your solution) and adds it to your solution.
* `--with-source-code`: Downloads the source code of the module to your solution folder and uses local project references instead of NuGet/NPM packages. This options is always `True` if `--new-template` is used. * `--with-source-code`: Downloads the source code of the module to your solution folder and uses local project references instead of NuGet/NPM packages. This options is always `True` if `--new` is used.
* `--add-to-solution-file`: Adds the downloaded/created module to your solution file, so you will also see the projects of the module when you open the solution on a IDE. (only available when `--with-source-code` is `True`.) * `--add-to-solution-file`: Adds the downloaded/created module to your solution file, so you will also see the projects of the module when you open the solution on a IDE. (only available when `--with-source-code` is `True`.)
### get-source ### get-source

1
docs/en/Customizing-Application-Modules-Overriding-Services.md

@ -59,7 +59,6 @@ In most cases, you will want to change one or a few methods of the current imple
### Example: Overriding an Application Service ### Example: Overriding an Application Service
````csharp ````csharp
//[RemoteService(IsEnabled = false)] // If you use dynamic controller feature you can disable remote service. Prevent creating duplicate controller for the application service.
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))] [ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))]
public class MyIdentityUserAppService : IdentityUserAppService public class MyIdentityUserAppService : IdentityUserAppService

11
docs/en/Migration-Guides/Abp-4_0-Angular.md

@ -0,0 +1,11 @@
# Angular UI 3.3 to 4.0 Migration Guide
### Removed the Angular Account Module Public UI
Angular UI is using the Authorization Code Flow to authenticate since the version 3.1.0 by default. Starting from the version 4.0, this is becoming the only option, because it is the recommended way of authenticating SPAs.
If you haven't done it yet, see [this post](https://blog.abp.io/abp/ABP-Framework-v3.1-RC-Has-Been-Released) to change the authentication of your application.
### Removed the SessionState
Use `SessionStateService` instead of the `SessionState`. See [this issue](https://github.com/abpframework/abp/issues/5606) for details.

88
docs/en/Migration-Guides/Abp-4_0-Blazor.md

@ -0,0 +1,88 @@
# Blazor UI 3.3 to 4.0 Migration Guide
## Startup Template Changes
These changes are required to manually applied in your own solution. It would be easier if you create a new solution based on 4.0 with the same name of your current solution then compare the files.
### Csproj File / Dependencies
* Add `<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>` to the `PropertyGroup` section of your project (`.csproj`) file.
* Update the `Blazorise.*` packages to the latest version (to the latest RC for the ABP 4.0 preview).
### wwwroot/index.html
There are some changes made in the index.html file;
* Removed JQuery & Bootstrap JavaScript dependencies
* Replaced Bootstrap and FontAwesome imports with local files instead of CDN usages.
* Re-arranged some ABP CSS file locations.
* Introduced the `abp bundle` CLI command to manage global Style/Script file imports.
Follow the steps below to apply the changes;
1. Add the bundle contributor class into your project (it will be slightly different based on your solution namespaces):
````csharp
using Volo.Abp.Bundling;
namespace MyCompanyName.MyProjectName.Blazor
{
public class MyProjectNameBundleContributer : IBundleContributer
{
public void AddScripts(BundleContext context)
{
}
public void AddStyles(BundleContext context)
{
context.Add("main.css");
}
}
}
````
If you are using another global style/script files, add them here.
2. Remove all the `<link...>` elements and replace with the following comment tags:
````html
<!--ABP:Styles-->
<!--/ABP:Styles-->
````
3. Remove all the `<script...>` elements and replace with the following comment tags:
````html
<!--ABP:Scripts-->
<!--/ABP:Scripts-->
````
4. Execute the following command in a terminal in the root folder of the Blazor project (`.csproj`) file (ensure that you're using the ABP CLI version 4.0):
````bash
abp bundle
````
This will fill in the `Styles` and `Scripts` tags based on the dependencies.
5. You can clean the `blazor-error-ui` related sections from your `main.css` file since they are not needed anymore.
### The Root Element
This change is optional but recommended.
* Change `<app>...</app>` to `<div id="ApplicationContainer">...</div>` in the `wwwroot/index.html`.
* Change `builder.RootComponents.Add<App>("app");` to `builder.RootComponents.Add<App>("#ApplicationContainer");` in the *YourProjectBlazorModule.cs*.
## AbpCrudPageBase Changes
If you've derived your pages from the `AbpCrudPageBase` class, then you may need to apply the following changes;
- `OpenEditModalAsync` method gets `EntityDto` instead of id (`Guid`) parameter. Pass `context` instead of `context.Id`.
- `DeleteEntityAsync` method doesn't display confirmation dialog anymore. You can use the new `EntityActions` component in Data Grids to show confirmation messages. You can also inject `IUiMessageService` to your page or component and call the `ConfirmAsync` explicitly.
- Added `GetListInput` as a base property that is used to filter while getting the entities from the server.
## Others
- Refactored namespaces for some Blazor components ([#6015](https://github.com/abpframework/abp/issues/6015)).
- Removed Async Suffix from IUiMessageService ([#6123](https://github.com/abpframework/abp/pull/6123)).

6
docs/en/Migration-Guides/Abp-4_0-MVC-Razor-Pages.md

@ -0,0 +1,6 @@
# MVC / Razor Pages UI 3.3 to 4.0 Migration Guide
## Use IBrandingProvider in the Volo.Abp.UI Package
This will be a breaking change for MVC UI, but very easy to fix. `IBrandingProvider` is being moved from `Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components` to `Volo.Abp.Ui.Branding` namespace. So, just update the namespace imports.

181
docs/en/Migration-Guides/Abp-4_0.md

@ -8,68 +8,55 @@ This document introduces the breaking changes done in the ABP Framework 4.0 and
Here, the overall list of the changes; Here, the overall list of the changes;
* Upgraded to the .NET 5.0. * Upgraded to the .NET 5.0 [(#6118](https://github.com/abpframework/abp/issues/6118)).
* Upgraded to the Identity Server 4.1.1. * Moved from Newtonsoft.Json to System.Text.Json [(#1198](https://github.com/abpframework/abp/issues/1198)).
* Moved from Newtonsoft.Json to System.Text.Json as the JSON serializer by default. * Upgraded to the Identity Server 4.1.1 ([#4461](https://github.com/abpframework/abp/issues/4461)).
* Switched to `kebab-case` for conventional URLs for the auto API controller routes ([#5325](https://github.com/abpframework/abp/issues/5325)).
* Removed Retry for the Dynamic HTTP Client Proxies ([#6090](https://github.com/abpframework/abp/issues/6090)).
* Creation audit properties of the entities made read-only ([#6020](https://github.com/abpframework/abp/issues/6020)).
* Changed type of the IHasExtraProperties.ExtraProperties ([#3751](https://github.com/abpframework/abp/issues/3751)).
* Use IBrandingProvider in the Volo.Abp.UI package and remove the one in the Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared ([#5375](https://github.com/abpframework/abp/issues/5375)).
* Removed the Angular Account Module Public UI (login, register... pages) since they are not being used in the default (authorization code) flow ([#5652](https://github.com/abpframework/abp/issues/5652)).
* Removed the SessionState in the @abp/ng.core package ([#5606](https://github.com/abpframework/abp/issues/5606)).
* Made some API revisions & startup template changes for the Blazor UI. * Made some API revisions & startup template changes for the Blazor UI.
* Switched to `kebab-case` for conventional URLs for the auto API controller routes.
* Removed the Angular Account Module Public UI (login, register... pages) since they are not being used in the default (authorization code) flow.
* Moved retry logic for the Dynamic HTTP Client Proxies to the startup template.
* Make read only for Creation audit properties of the entities.
* TODO: Deprecate the SessionState in the @abp/ng.core package
* TODO: Use IBrandingProvider in the Volo.Abp.UI package and remove the one in the Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared
* TODO: Change type of the IHasExtraProperties.ExtraProperties
## Auto API Controller Route Changes ## Upgraded to .NET 5.0
The route calculation for the [Auto API Controllers](https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers) is changing with the ABP Framework version 4.0 ([#5325](https://github.com/abpframework/abp/issues/5325)). Before v4.0 the route paths were **camelCase**. After version 4.0, it's changed to **kebab-case** route paths where it is possible.
**A typical auto API before v4.0** ABP Framework has been moved to .NET 5.0. So, if you want to upgrade to the ABP Framework 4.0, you also need to upgrade to .NET 5.0.
![route-before-4](images/route-before-4.png) See the [Migrate from ASP.NET Core 3.1 to 5.0](https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50) document to learn how to upgrade your solution to .NET 5.0.
**camelCase route parts become kebab-case with 4.0**
![route-4](images/route-4.png)
### How to Fix?
You may not take any action for the MVC & Blazor UI projects.
For the Angular UI, this change may effect your client UI. If you have used the [ABP CLI Service Proxy Generation](../UI/Angular/Service-Proxies.md), you can run the server side and re-generate the service proxies. If you haven't used this tool, you should manually update the related URLs in your application. ## Moved to System.Text.Json
If there are other type of clients (e.g. 3rd-party companies) using your APIs, they also need to update the URLs. ABP Framework 4.0 uses the System.Text.Json by default as the JSON serialization library. It, actually, using a hybrid approach: Continues to use the Newtonsoft.Json when it needs to use features not supported by the System.Text.Json.
### Use the v3.x style URLs ### Unsupported Types
If it is hard to change it in your application, you can still to use the version 3.x route strategy, by following one of the approaches; If you want to use the Newtonsoft.Json to serialize/deserialize for some specific types, you can configure the `AbpSystemTextJsonSerializerOptions` in your module's `ConfigureServices` method.
- Set `UseV3UrlStyle` to `true` in the options of the `options.ConventionalControllers.Create(...)` method. Example: **Example: Use Newtonsoft.Json for `MySpecialClass`**
```csharp ````csharp
options.ConventionalControllers Configure<AbpSystemTextJsonSerializerOptions>(options =>
.Create(typeof(BookStoreApplicationModule).Assembly, opts => {
{ options.UnsupportedTypes.AddIfNotContains(typeof(MySpecialClass));
opts.UseV3UrlStyle = true; });
}); ````
```
This approach affects only the controllers for the `BookStoreApplicationModule`. ### Always Use the Newtonsoft.Json
- Set `UseV3UrlStyle` to `true` for the `AbpConventionalControllerOptions` to set it globally. Example: If you want to continue to use the Newtonsoft.Json library for all the types, you can set `UseHybridSerializer` to false in the `PreConfigureServices` method of your module class:
```csharp ````csharp
Configure<AbpConventionalControllerOptions>(options => PreConfigure<AbpJsonOptions>(options =>
{ {
options.UseV3UrlStyle = true; options.UseHybridSerializer = false;
}); });
``` ````
Setting it globally affects all the modules in a modular application. ## Upgraded to Identity Server 4.1.1
## Identity Server Changes
ABP Framework upgrades the [IdentityServer4](https://www.nuget.org/packages/IdentityServer4) library from 3.x to 4.x with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes. Some of them are **breaking changes in the data structure**. ABP Framework upgrades the [IdentityServer4](https://www.nuget.org/packages/IdentityServer4) library from 3.x to 4.1.1 with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes. Some of them are **breaking changes in the data structure**.
### Entity Changes ### Entity Changes
@ -147,13 +134,101 @@ app.Use((httpContext, next) =>
- https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/ - https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/
- https://github.com/IdentityServer/IdentityServer4/issues/4592 - https://github.com/IdentityServer/IdentityServer4/issues/4592
## Blazor UI ## Auto API Controller Route Changes
The route calculation for the [Auto API Controllers](https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers) is changing with the ABP Framework version 4.0 ([#5325](https://github.com/abpframework/abp/issues/5325)). Before v4.0 the route paths were **camelCase**. After version 4.0, it's changed to **kebab-case** route paths where it is possible.
### AbpCrudPageBase Changes **A typical auto API before v4.0**
![route-before-4](images/route-before-4.png)
**camelCase route parts become kebab-case with 4.0**
![route-4](images/route-4.png)
### How to Fix?
You may not take any action for the MVC & Blazor UI projects.
For the Angular UI, this change may effect your client UI. If you have used the [ABP CLI Service Proxy Generation](../UI/Angular/Service-Proxies.md), you can run the server side and re-generate the service proxies. If you haven't used this tool, you should manually update the related URLs in your application.
If there are other type of clients (e.g. 3rd-party companies) using your APIs, they also need to update the URLs.
### Use the v3.x style URLs
If it is hard to change it in your application, you can still to use the version 3.x route strategy, by following one of the approaches;
- Set `UseV3UrlStyle` to `true` in the options of the `options.ConventionalControllers.Create(...)` method. Example:
```csharp
options.ConventionalControllers
.Create(typeof(BookStoreApplicationModule).Assembly, opts =>
{
opts.UseV3UrlStyle = true;
});
```
This approach affects only the controllers for the `BookStoreApplicationModule`.
- Set `UseV3UrlStyle` to `true` for the `AbpConventionalControllerOptions` to set it globally. Example:
```csharp
Configure<AbpConventionalControllerOptions>(options =>
{
options.UseV3UrlStyle = true;
});
```
Setting it globally affects all the modules in a modular application.
## Removed Retry for the Dynamic HTTP Client Proxies
[Dynamic C# HTTP Client Proxies](../API/Dynamic-CSharp-API-Clients.md) were trying up to 3 times if a request fails using the [Polly](https://github.com/App-vNext/Polly) library. Starting from the version 4.0, this logic has been removed. If you need it, you should configure it in your own application, by configuring the `AbpHttpClientBuilderOptions` in the `PreConfigureServices` method of your module.
**Example: Retry 3 times on failure by incremental waiting between tries**
````csharp
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpHttpClientBuilderOptions>(options =>
{
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
{
clientBuilder.AddTransientHttpErrorPolicy(
policyBuilder => policyBuilder
.WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(Math.Pow(2, i)))
);
});
});
}
````
This example uses the Microsoft.Extensions.Http.Polly NuGet package.
If you create a new solution, you can find the same configuration in the `.HttpApi.Client.ConsoleTestApp` project's module class, as an example.
## Creation Audit Properties Made Read-Only
Removed setters from the `IHasCreationTime.CreationTime`, ` IMustHaveCreator.CreatorId` and `IMayHaveCreator.CreatorId` properties to accidently set the creation properties while updating an existing entity.
Since the ABP Framework automatically sets these properties, you normally don't need to directly set them. If you want to set them, as a best practice, it is suggested to make it in the constructor to not provide a way to change it later.
These properties implemented with `protected set` in the `Entity` and `AggregateRoot` base classes. That means you can still set in a derived class, if you need it. Alternatively, you can use reflection to set them (Or use `ObjectHelper.TrySetProperty` which internally uses reflection) out of the class if you have to do.
## Changed type of the IHasExtraProperties.ExtraProperties
`IHasExtraProperties.ExtraProperties` was a regular `Dictionary<string, object>`. With the version 4.0, it is replaced with `ExtraPropertyDictionary` class which inherits the `Dictionary<string, object>`.
Most of the applications don't be affected by this change. If you've directly implemented this interface, replace the standard dictionary the the `ExtraPropertyDictionary`.
## ASP.NET Core MVC / Razor Pages UI
See the [ASP.NET Core MVC / Razor Pages UI Migration Guide](Abp-4_0-MVC-Razor-Pages.md).
## Angular UI
See the [Angular UI Migration Guide](Abp-4_0-Angular.md).
## Blazor UI
- `OpenEditModalAsync` method requires `EntityDto` instead of id (`Guid`) parameter. See the [Blazor UI Migration Guide](Abp-4_0-Blazor.md).
- `DeleteEntityAsync` method doesn't display confirmation dialog anymore. You can use the new `EntityActions` component in DataGrids to show confirmation messages. You can also inject `IUiMessageService` to your page or component and call `ConfirmAsync` explicitly.
- TODO: Inconsistent Async suffix usage
- TODO: Refactor namespaces for Blazor components
- TODO: Update CreateGetListInputAsync on AbpCrudPageBase
- TODO: Change app to div for app container in blazor UI

11
docs/en/Road-Map.md

@ -1,17 +1,12 @@
# ABP Framework Road Map # ABP Framework Road Map
You can always check the milestone planning and the prioritized backlog issues on [the GitHub repository](https://github.com/abpframework/abp/milestones) for a detailed road map. You can always check the milestone planning and the prioritized backlog issues on [the GitHub repository](https://github.com/abpframework/abp/milestones) for a detailed road map. Here, a list of some major items in the backlog;
While we will **continue to add other exciting features**, we will work on the following major items in the **middle term**:
* **Blazor UI** for the framework and all the pre-built modules (in progress).
* **.NET 5.0**! As Microsoft has announced that the .NET 5.0 will be released in November 2020, we will prepare for this change before and move to the .NET 5.0 just after Microsoft releases it. We hope a smooth transition.
Beside this middle term goals, there are many features in the [backlog](https://github.com/abpframework/abp/milestone/2). Here, a list of some major items in the backlog;
* [#2882](https://github.com/abpframework/abp/issues/2882) / Providing a gRPC integration infrastructure (while it is [already possible](https://github.com/abpframework/abp-samples/tree/master/GrpcDemo) to create or consume gRPC endpoints for your application, we plan to create endpoints for the [standard application modules](https://docs.abp.io/en/abp/latest/Modules/Index)) * [#2882](https://github.com/abpframework/abp/issues/2882) / Providing a gRPC integration infrastructure (while it is [already possible](https://github.com/abpframework/abp-samples/tree/master/GrpcDemo) to create or consume gRPC endpoints for your application, we plan to create endpoints for the [standard application modules](https://docs.abp.io/en/abp/latest/Modules/Index))
* [#236](https://github.com/abpframework/abp/issues/236) Resource based authorization system * [#236](https://github.com/abpframework/abp/issues/236) Resource based authorization system
* [#6132](https://github.com/abpframework/abp/issues/6132) A New Theme alternative to the Basic Theme
* [#1754](https://github.com/abpframework/abp/issues/1754) / Multi-lingual entities * [#1754](https://github.com/abpframework/abp/issues/1754) / Multi-lingual entities
* [#497](https://github.com/abpframework/abp/issues/497) API Versioning system finalize & document
* [#633](https://github.com/abpframework/abp/issues/633) / Realtime notification system * [#633](https://github.com/abpframework/abp/issues/633) / Realtime notification system
* [#57](https://github.com/abpframework/abp/issues/57) / Built-in CQRS infrastructure * [#57](https://github.com/abpframework/abp/issues/57) / Built-in CQRS infrastructure
* [#336](https://github.com/abpframework/abp/issues/336) / Health Check abstraction * [#336](https://github.com/abpframework/abp/issues/336) / Health Check abstraction

4
docs/en/UI/Angular/Component-Replacement.md

@ -547,7 +547,3 @@ The final UI looks like below:
## See Also ## See Also
- [How to Replace PermissionManagementComponent](./Permission-Management-Component-Replacement.md) - [How to Replace PermissionManagementComponent](./Permission-Management-Component-Replacement.md)
## What's Next?
- [Custom Setting Page](./Custom-Setting-Page.md)

4
docs/en/UI/Angular/Config-State.md

@ -190,7 +190,3 @@ Please refer to `Config.Environment` type for all the properties you can pass to
- [Settings](./Settings.md) - [Settings](./Settings.md)
- [Features](./Features.md) - [Features](./Features.md)
## What's Next?
- [HTTP Requests](./Http-Requests)

5
docs/en/UI/Angular/Confirmation-Service.md

@ -180,8 +180,3 @@ clear(
``` ```
- `status` parameter is the value of the confirmation closing event. - `status` parameter is the value of the confirmation closing event.
## What's Next?
- [Toast Overlay](./Toaster-Service.md)

5
docs/en/UI/Angular/Content-Projection-Service.md

@ -71,8 +71,3 @@ projectContent<T extends Type<any> | TemplateRef<any>>(
- `projectionStrategy` parameter is the primary focus here and is explained above. - `projectionStrategy` parameter is the primary focus here and is explained above.
- `injector` parameter is the `Injector` instance you can pass to the projected content. It is not used in `TemplateProjectionStrategy`. - `injector` parameter is the `Injector` instance you can pass to the projected content. It is not used in `TemplateProjectionStrategy`.
## What's Next?
- [Confirmation Popup](./Confirmation-Service.md)

7
docs/en/UI/Angular/Cross-Origin-Strategy.md

@ -51,10 +51,3 @@ CROSS_ORIGIN_STRATEGY.UseCredentials(integrity?: string)
``` ```
`crossorigin` will be set as `"use-credentials"` and `integrity` is optional. `crossorigin` will be set as `"use-credentials"` and `integrity` is optional.
## What's Next?
- [LoadingStrategy](./Loading-Strategy.md)

4
docs/en/UI/Angular/Dom-Insertion-Service.md

@ -134,7 +134,3 @@ has(content: string): boolean
The `has` method returns a boolean value that indicates the given content has already been added to the DOM or not. The `has` method returns a boolean value that indicates the given content has already been added to the DOM or not.
- `content` parameter is the content of the inserted `HTMLScriptElement` or `HTMLStyleElement` element. - `content` parameter is the content of the inserted `HTMLScriptElement` or `HTMLStyleElement` element.
## What's Next?
- [Lazy Loading Scripts & Styles](./Lazy-Load-Service.md)

5
docs/en/UI/Angular/Environment.md

@ -101,8 +101,3 @@ export interface RemoteEnv {
* `customMergeFn`: You can also provide your own merge function as shown in the example. It will take two parameters, `localEnv: Partial<Config.Environment>` and `remoteEnv` and it needs to return a `Config.Environment` object. * `customMergeFn`: You can also provide your own merge function as shown in the example. It will take two parameters, `localEnv: Partial<Config.Environment>` and `remoteEnv` and it needs to return a `Config.Environment` object.
* `method`: HTTP method to be used when retrieving environment config. Default: `GET` * `method`: HTTP method to be used when retrieving environment config. Default: `GET`
* `headers`: If extra headers are needed for the request, it can be set through this field. * `headers`: If extra headers are needed for the request, it can be set through this field.
## What's Next?
- [About Feature Libraries](./Feature-Libraries.md)

6
docs/en/UI/Angular/Feature-Libraries.md

@ -90,9 +90,3 @@ Depending on the library, the `.forLazy` static method may also receive some opt
--- ---
<sup id="f-modify-route"><b>1</b></sup> _Libraries expect to work at a predefined path. Please check [how to patch a navigation element](./Modifying-the-Menu.md#how-to-patch-or-remove-a-navigation-element), if you want to use a different path from the default one (e.g. '/identity')._ <sup>[↩](#a-modify-route)</sup> <sup id="f-modify-route"><b>1</b></sup> _Libraries expect to work at a predefined path. Please check [how to patch a navigation element](./Modifying-the-Menu.md#how-to-patch-or-remove-a-navigation-element), if you want to use a different path from the default one (e.g. '/identity')._ <sup>[↩](#a-modify-route)</sup>
---
## What's Next?
- [Service Proxies](./Service-Proxies.md)

4
docs/en/UI/Angular/Features.md

@ -31,7 +31,3 @@ const defaultLang = this.config.getFeature("Identity.TwoFactor");
``` ```
You can then check the value of the feature to perform your logic. Please note that **feature keys are case-sensitive**. You can then check the value of the feature to perform your logic. Please note that **feature keys are case-sensitive**.
## What's Next?
- [Permission Management](./Permission-Management.md)

140
docs/en/UI/Angular/Form-Validation.md

@ -0,0 +1,140 @@
# Form Validation
Reactive forms in ABP Angular UI are validated by [ngx-validate](https://www.npmjs.com/package/@ngx-validate/core) and helper texts are shown automatically based on validation rules and error blueprints. You do not have to add any elements or components to your templates. The library handles that for you. Here is how the experience is:
<img alt="The ngx-validate library validates an Angular reactive form and an error text appears under each wrong input based on the validation rule and the error blueprint." src="./images/form-validation---error-display-user-experience.gif" width="990px" style="max-width:100%">
## How to Add New Error Messages
You can add a new error message by providing the `VALIDATION_BLUEPRINTS` injection token from your root module.
```js
import { VALIDATION_BLUEPRINTS } from "@ngx-validate/core";
@NgModule({
// rest of the module metadata
providers: [
// other providers
{
provide: VALIDATION_BLUEPRINTS,
useValue: {
uniqueUsername: "::AlreadyExists[{%{{{ username }}}%}]",
},
},
],
})
export class AppModule {}
```
When a [validator](https://angular.io/guide/form-validation#defining-custom-validators) or an [async validator](https://angular.io/guide/form-validation#creating-asynchronous-validators) returns an error with the key given to the error blueprints (`uniqueUsername` here), the validation library will be able to display an error message after localizing according to the given key and interpolation params. The result will look like this:
<img alt="An already taken username is entered while creating new user and a custom error message appears under the input after validation." src="./images/form-validation---new-error-message.gif" width="990px" style="max-width:100%">
In this example;
- Localization key is `::AlreadyExists`.
- The interpolation param is `username`.
- Localization resource is defined as `"AlreadyExists": "Sorry, “{0}” already exists."`.
- And the validator should return `{ uniqueUsername: { username: "admin" } }` as the error object.
## How to Change Existing Error Messages
You can overwrite an existing error message by providing `VALIDATION_BLUEPRINTS` injection token from your root module. Let's imagine you have a custom localization resource for required inputs.
```json
"RequiredInput": "Oops! We need this input."
```
To use this instead of the built-in required input message, all you need to do is the following.
```js
import { VALIDATION_BLUEPRINTS } from "@ngx-validate/core";
@NgModule({
// rest of the module metadata
providers: [
// other providers
{
provide: VALIDATION_BLUEPRINTS,
useValue: {
required: "::RequiredInput",
},
},
],
})
export class AppModule {}
```
The error message will look like this:
<img alt="A required field is cleared and the custom error message appears under the input." src="./images/form-validation---overwrite-error-message.gif" width="990px" style="max-width:100%">
## How to Disable Validation on a Form
If you want to validate a form manually, you can always disable automatic validation on it. All you need to do is place `skipValidation` on the form element.
```html
<form [formGroup]="form" skipValidation>
<!-- form fields here -->
</form>
```
## How to Disable Validation on a Specific Field
Validation works on any element or component with a `formControl` or `formControlName` directive. You can disable automatic validation on a specific field by placing `skipValidation` on the input element or component.
```html
<input type="text" formControlName="name" skipValidation />
```
## How to Use a Custom Error Component
First, build a custom error component. Extending the existing `ValidationErrorComponent` would make it easier.
```js
import { ValidationErrorComponent } from "@abp/ng.theme.basic";
import { ChangeDetectionStrategy, Component } from "@angular/core";
@Component({
selector: "app-validation-error",
template: `
<div
class="font-weight-bold font-italic px-1 invalid-feedback"
*ngFor="let error of abpErrors; trackBy: trackByFn"
>
{%{{{ error.message | abpLocalization: error.interpoliteParams }}}%}
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ErrorComponent extends ValidationErrorComponent {}
```
Then, declare and provide it in your root module.
```js
import { VALIDATION_ERROR_TEMPLATE } from "@ngx-validate/core";
@NgModule({
// rest of the module metadata
declarations: [
// other declarables
ErrorComponent,
],
providers: [
// other providers
{
provide: VALIDATION_ERROR_TEMPLATE,
useValue: ErrorComponent,
},
],
})
export class AppModule {}
```
The error message will be bold and italic now:
<img alt="A required field is cleared and a bold and italic error message appears." src="./images/form-validation---custom-error-template.gif" width="990px" style="max-width:100%">

4
docs/en/UI/Angular/HTTP-Requests.md

@ -203,7 +203,3 @@ getSomeCustomHeaderValue() {
You may find `Rest.Observe` enum [here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L10). You may find `Rest.Observe` enum [here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L10).
## What's Next?
* [Localization](./Localization.md)

7
docs/en/UI/Angular/Lazy-Load-Service.md

@ -204,10 +204,3 @@ load(strategy: LoadingStrategy, retryTimes?: number, retryDelay?: number): Obser
- `strategy` parameter is the primary focus here and is explained above. - `strategy` parameter is the primary focus here and is explained above.
- `retryTimes` defines how many times the loading will be tried again before fail (_default: 2_). - `retryTimes` defines how many times the loading will be tried again before fail (_default: 2_).
- `retryDelay` defines how much delay there will be between retries (_default: 1000_). - `retryDelay` defines how much delay there will be between retries (_default: 1000_).
## What's Next?
- [Projecting Angular Content](./Content-Projection-Service.md)

5
docs/en/UI/Angular/List-Service.md

@ -177,8 +177,3 @@ As of v3.0, with ngx-datatable, the `page` property has to be set as `0` for ini
``` ```
**Important Note:** The `abp-table` is not removed, but is deprecated and will be removed in the future. Please consider switching to ngx-datatable. **Important Note:** The `abp-table` is not removed, but is deprecated and will be removed in the future. Please consider switching to ngx-datatable.
## What's Next?
- [Easy *ngFor trackBy](./Track-By-Service.md)

4
docs/en/UI/Angular/Localization.md

@ -319,7 +319,3 @@ Which locale files you add to `webpackInclude` magic comment, they will be inclu
## See Also ## See Also
* [Localization in ASP.NET Core](../../Localization.md) * [Localization in ASP.NET Core](../../Localization.md)
## What's Next?
* [Settings](./Settings.md)

5
docs/en/UI/Angular/Migration-Guide-v3.md

@ -470,8 +470,3 @@ Some interfaces have long been marked as deprecated and now they are removed.
- Please check if you are still using [anything listed in this issue](https://github.com/abpframework/abp/issues/4281) - Please check if you are still using [anything listed in this issue](https://github.com/abpframework/abp/issues/4281)
## What's Next?
* [Quick Start](./Quick-Start.md)

5
docs/en/UI/Angular/Modifying-the-Menu.md

@ -271,8 +271,3 @@ export class AppComponent {
* Patched the languages dropdown element with new `requiredPolicy` and new `order`. * Patched the languages dropdown element with new `requiredPolicy` and new `order`.
* Removed the current user dropdown element. * Removed the current user dropdown element.
## What's Next
* [Component Replacement](./Component-Replacement.md)

4
docs/en/UI/Angular/Multi-Tenancy.md

@ -126,7 +126,3 @@ The app sends the `__tenant` header that contains the current tenant id on each
## See Also ## See Also
- [Multi Tenancy in ABP](../../Multi-Tenancy.md) - [Multi Tenancy in ABP](../../Multi-Tenancy.md)
## What's Next?
- [Managing RxJS Subscriptions](./Subscription-Service.md)

4
docs/en/UI/Angular/PWA-Configuration.md

@ -340,7 +340,3 @@ In case you want to cache other static files, please refer to the [service worke
### 3.2 Set Data Groups ### 3.2 Set Data Groups
This part is unique to your project. We recommend being very careful about which endpoints to cache. Please refer to [service worker configuration document](https://angular.io/guide/service-worker-config#datagroups) on Angular.io for details. This part is unique to your project. We recommend being very careful about which endpoints to cache. Please refer to [service worker configuration document](https://angular.io/guide/service-worker-config#datagroups) on Angular.io for details.
## What's Next?
- [Config State](./Config-State.md)

6
docs/en/UI/Angular/Permission-Management.md

@ -57,8 +57,4 @@ const routes: Routes = [
]; ];
``` ```
Granted Policies are stored in the `auth` property of `ConfigState`. Granted Policies are stored in the `auth` property of `ConfigState`.
## What's Next?
* [Multi Tenancy](./Multi-Tenancy.md)

6
docs/en/UI/Angular/Quick-Start.md

@ -204,9 +204,3 @@ In addition, you can [deploy your application to certain targets using the Angul
--- ---
<sup id="f-dist-folder-name"><b>1</b></sup> _The compiled output will be placed under `/dist` in a folder by the project name._ <sup>[↩](#a-dist-folder-name)</sup> <sup id="f-dist-folder-name"><b>1</b></sup> _The compiled output will be placed under `/dist` in a folder by the project name._ <sup>[↩](#a-dist-folder-name)</sup>
---
## What's Next?
- [Environment Variables](./Environment.md)

4
docs/en/UI/Angular/Service-Proxies.md

@ -137,7 +137,3 @@ export class BookComponent implements OnInit {
``` ```
> Please [see this article](https://github.com/abpframework/abp/blob/dev/docs/en/Blog-Posts/2020-09-07%20Angular-Service-Proxies/POST.md) to learn more about service proxies. > Please [see this article](https://github.com/abpframework/abp/blob/dev/docs/en/Blog-Posts/2020-09-07%20Angular-Service-Proxies/POST.md) to learn more about service proxies.
## What's Next?
- [PWA Configuration](./PWA-Configuration.md)

4
docs/en/UI/Angular/Settings.md

@ -53,7 +53,3 @@ const localizationSettings = this.config.getSettings("Localization");
``` ```
Beware though, **settings search is case-sensitive**. Beware though, **settings search is case-sensitive**.
## What's Next?
- [Features](./Features.md)

4
docs/en/UI/Angular/Subscription-Service.md

@ -197,7 +197,3 @@ class DemoComponent implements OnInit {
} }
} }
``` ```
## What's Next?
- [Working with Lists](./List-Service.md)

4
docs/en/UI/Angular/Toaster-Service.md

@ -249,7 +249,3 @@ Removes all open toasts.
## See Also ## See Also
- [Confirmation Popup](./Confirmation-Service.md) - [Confirmation Popup](./Confirmation-Service.md)
## What's Next?
- [Modifying the Menu](./Modifying-the-Menu.md)

6
docs/en/UI/Angular/Track-By-Service.md

@ -111,9 +111,3 @@ class DemoComponent {
trackByTenantAccountId = trackByDeep<Item>('tenant', 'account', 'id'); trackByTenantAccountId = trackByDeep<Item>('tenant', 'account', 'id');
} }
``` ```
## What's Next?
- [Inserting Scripts & Styles to DOM](./Dom-Insertion-Service.md)

BIN
docs/en/UI/Angular/images/form-validation---custom-error-template.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB

BIN
docs/en/UI/Angular/images/form-validation---error-display-user-experience.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

BIN
docs/en/UI/Angular/images/form-validation---new-error-message.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

BIN
docs/en/UI/Angular/images/form-validation---overwrite-error-message.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

4
docs/en/UI/AspNetCore/Overall.md

@ -50,7 +50,7 @@ There are a set of standard JavaScript/CSS libraries that comes pre-installed an
- [FontAwesome](https://fontawesome.com/) as the fundamental CSS font library. - [FontAwesome](https://fontawesome.com/) as the fundamental CSS font library.
- [SweetAlert](https://sweetalert.js.org/) to show fancy alert message and confirmation dialogs. - [SweetAlert](https://sweetalert.js.org/) to show fancy alert message and confirmation dialogs.
- [Toastr](https://github.com/CodeSeven/toastr) to show toast notifications. - [Toastr](https://github.com/CodeSeven/toastr) to show toast notifications.
- [Lodesh](https://lodash.com/) as a utility library. - [Lodash](https://lodash.com/) as a utility library.
- [Luxon](https://moment.github.io/luxon/) for date/time operations. - [Luxon](https://moment.github.io/luxon/) for date/time operations.
- [JQuery Form](https://github.com/jquery-form/form) for AJAX forms. - [JQuery Form](https://github.com/jquery-form/form) for AJAX forms.
- [bootstrap-datepicker](https://github.com/uxsolutions/bootstrap-datepicker) to show date pickers. - [bootstrap-datepicker](https://github.com/uxsolutions/bootstrap-datepicker) to show date pickers.
@ -156,4 +156,4 @@ ABP Framework provides a lot of built-in solutions to common application require
## Customization ## Customization
There are a lot of ways to customize the theme and the UIs of the pre-built modules. You can override components, pages, static resources, bundles and more. See the [User Interface Customization Guide](Customization-User-Interface.md). There are a lot of ways to customize the theme and the UIs of the pre-built modules. You can override components, pages, static resources, bundles and more. See the [User Interface Customization Guide](Customization-User-Interface.md).

4
docs/en/docs-nav.json

@ -636,6 +636,10 @@
"text": "Localization", "text": "Localization",
"path": "UI/Angular/Localization.md" "path": "UI/Angular/Localization.md"
}, },
{
"text": "Form Validation",
"path": "UI/Angular/Form-Validation.md"
},
{ {
"text": "Settings", "text": "Settings",
"path": "UI/Angular/Settings.md" "path": "UI/Angular/Settings.md"

1
docs/zh-Hans/Customizing-Application-Modules-Overriding-Services.md

@ -59,7 +59,6 @@ context.Services.Replace(
### 示例: 重写服务方法 ### 示例: 重写服务方法
````csharp ````csharp
//[RemoteService(IsEnabled = false)] // 如果你在使用动态控制器,为了避免为应用服务创建重复的控制器, 你可以禁用远程访问.
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))] [ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))]
public class MyIdentityUserAppService : IdentityUserAppService public class MyIdentityUserAppService : IdentityUserAppService

2
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

4
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj

@ -21,8 +21,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
</ItemGroup> </ItemGroup>

2
framework/src/Volo.Abp.AspNetCore.Components/Volo.Abp.AspNetCore.Components.csproj

@ -21,7 +21,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

15
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/VeeValidate/VeeValidateScriptContributor.cs

@ -0,0 +1,15 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Vue;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.VeeValidate
{
[DependsOn(typeof(VueScriptContributor))]
public class VeeValidateScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/vee-validate.js/vee-validate.full.js");
}
}
}

12
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Vue/VueScriptContributor.cs

@ -0,0 +1,12 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Vue
{
public class VueScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/vue.js/vue.js");
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj

@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

4
framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj

@ -27,8 +27,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" />
</ItemGroup> </ItemGroup>

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs

@ -25,7 +25,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json
options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpDateTimeConverter>()); options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpDateTimeConverter>());
options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpNullableDateTimeConverter>()); options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpNullableDateTimeConverter>());
options.JsonSerializerOptions.Converters.Add(new AbpStringToEnumConverter()); options.JsonSerializerOptions.Converters.Add(new AbpStringToEnumFactory());
options.JsonSerializerOptions.Converters.Add(new AbpStringToBooleanConverter()); options.JsonSerializerOptions.Converters.Add(new AbpStringToBooleanConverter());
} }
} }

3
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs

@ -18,7 +18,8 @@ namespace Volo.Abp.AspNetCore.Mvc.Response
await next(); await next();
if (context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK) if (context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK
&& context.Result == null)
{ {
var returnType = context.ActionDescriptor.GetReturnType(); var returnType = context.ActionDescriptor.GetReturnType();
if (returnType == typeof(Task) || returnType == typeof(void)) if (returnType == typeof(Task) || returnType == typeof(void))

2
framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj

@ -24,7 +24,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

16
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims; using Volo.Abp.Security.Claims;
namespace Volo.Abp.Authorization.Permissions namespace Volo.Abp.Authorization.Permissions
@ -9,10 +10,12 @@ namespace Volo.Abp.Authorization.Permissions
public override string Name => ProviderName; public override string Name => ProviderName;
public ClientPermissionValueProvider(IPermissionStore permissionStore) protected ICurrentTenant CurrentTenant { get; }
public ClientPermissionValueProvider(IPermissionStore permissionStore, ICurrentTenant currentTenant)
: base(permissionStore) : base(permissionStore)
{ {
CurrentTenant = currentTenant;
} }
public async override Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context) public async override Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context)
@ -24,9 +27,12 @@ namespace Volo.Abp.Authorization.Permissions
return PermissionGrantResult.Undefined; return PermissionGrantResult.Undefined;
} }
return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId) using (CurrentTenant.Change(null))
? PermissionGrantResult.Granted {
: PermissionGrantResult.Undefined; return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId)
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined;
}
} }
} }
} }

2
framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj

@ -17,7 +17,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="5.0.0" /> <PackageReference Include="Autofac.Extras.DynamicProxy" Version="5.0.0" />
<PackageReference Include="Autofac" Version="5.2.0" /> <PackageReference Include="Autofac" Version="5.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor

@ -1,4 +1,4 @@
<Modal @ref="@ModalRef"> <Modal @ref="@ModalRef" Closing="@OnModalClosing">
<ModalBackdrop /> <ModalBackdrop />
<ModalContent Centered="@CenterMessage"> <ModalContent Centered="@CenterMessage">
<ModalHeader> <ModalHeader>

6
framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor.cs

@ -137,5 +137,11 @@ namespace Volo.Abp.BlazoriseUI.Components
return Canceled.InvokeAsync(null); return Canceled.InvokeAsync(null);
} }
protected virtual void OnModalClosing(ModalClosingEventArgs eventArgs)
{
eventArgs.Cancel = eventArgs.CloseReason == CloseReason.EscapeClosing
|| eventArgs.CloseReason == CloseReason.FocusLostClosing;
}
} }
} }

2
framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

17
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs

@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule;
using Volo.Abp.Cli.ProjectModification; using Volo.Abp.Cli.ProjectModification;
using Volo.Abp.Cli.Utils; using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -37,7 +38,10 @@ namespace Volo.Abp.Cli.Commands
} }
var newTemplate = commandLineArgs.Options.ContainsKey(Options.NewTemplate.Long); var newTemplate = commandLineArgs.Options.ContainsKey(Options.NewTemplate.Long);
var newProTemplate = commandLineArgs.Options.ContainsKey(Options.NewProTemplate.Long);
var template = commandLineArgs.Options.GetOrNull(Options.Template.Short, Options.Template.Long);
var newProTemplate = !string.IsNullOrEmpty(template) && template == ModuleProTemplate.TemplateName;
var withSourceCode = newTemplate || newProTemplate || commandLineArgs.Options.ContainsKey(Options.SourceCode.Long); var withSourceCode = newTemplate || newProTemplate || commandLineArgs.Options.ContainsKey(Options.SourceCode.Long);
var addSourceCodeToSolutionFile = withSourceCode && commandLineArgs.Options.ContainsKey("add-to-solution-file"); var addSourceCodeToSolutionFile = withSourceCode && commandLineArgs.Options.ContainsKey("add-to-solution-file");
@ -91,8 +95,8 @@ namespace Volo.Abp.Cli.Commands
sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore Adds the module to the given solution."); sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore Adds the module to the given solution.");
sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore --skip-db-migrations false Adds the module to the given solution but doesn't create a database migration."); sb.AppendLine(" abp add-module Volo.Blogging -s Acme.BookStore --skip-db-migrations false Adds the module to the given solution but doesn't create a database migration.");
sb.AppendLine(@" abp add-module Volo.Blogging -s Acme.BookStore -sp ..\Acme.BookStore.Web\Acme.BookStore.Web.csproj Adds the module to the given solution and specify migration startup project."); sb.AppendLine(@" abp add-module Volo.Blogging -s Acme.BookStore -sp ..\Acme.BookStore.Web\Acme.BookStore.Web.csproj Adds the module to the given solution and specify migration startup project.");
sb.AppendLine(@" abp add-module ProductManagement --new-template -sp ..\Acme.BookStore.Web\Acme.BookStore.Web.csproj Crates a new module named `ProductManagement` and adds it to your solution."); sb.AppendLine(@" abp add-module ProductManagement --new -sp ..\Acme.BookStore.Web\Acme.BookStore.Web.csproj Crates a new module named `ProductManagement` and adds it to your solution.");
sb.AppendLine(@" abp add-module ProductManagement --new-template --add-to-solution-file -sp ..\Acme.BookStore.Web\Acme.BookStore.Web.csproj Crates a new module named `ProductManagement`, adds it to your solution & solution file."); sb.AppendLine(@" abp add-module ProductManagement --new --add-to-solution-file -sp ..\Acme.BookStore.Web\Acme.BookStore.Web.csproj Crates a new module named `ProductManagement`, adds it to your solution & solution file.");
sb.AppendLine(""); sb.AppendLine("");
sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI"); sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI");
@ -176,12 +180,13 @@ namespace Volo.Abp.Cli.Commands
public class NewTemplate public class NewTemplate
{ {
public const string Long = "new-template"; public const string Long = "new";
} }
public class NewProTemplate public class Template
{ {
public const string Long = "new-pro-template"; public const string Short = "t";
public const string Long = "template";
} }
} }
} }

4
framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj

@ -18,8 +18,8 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" /> <PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

18
framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj

@ -16,15 +16,15 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" /> <PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.1" /> <PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Localization" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" /> <PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.1.5" /> <PackageReference Include="System.Linq.Dynamic.Core" Version="1.1.5" />
<PackageReference Include="System.Linq.Queryable" Version="4.3.0" /> <PackageReference Include="System.Linq.Queryable" Version="4.3.0" />

2
framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

4
framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj

@ -20,8 +20,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj

@ -16,7 +16,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="IdentityModel" Version="4.3.0" /> <PackageReference Include="IdentityModel" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
<ProjectReference Include="..\Volo.Abp.Caching\Volo.Abp.Caching.csproj" /> <ProjectReference Include="..\Volo.Abp.Caching\Volo.Abp.Caching.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy\Volo.Abp.MultiTenancy.csproj" /> <ProjectReference Include="..\Volo.Abp.MultiTenancy\Volo.Abp.MultiTenancy.csproj" />
<ProjectReference Include="..\Volo.Abp.Threading\Volo.Abp.Threading.csproj" /> <ProjectReference Include="..\Volo.Abp.Threading\Volo.Abp.Threading.csproj" />

2
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs

@ -19,7 +19,7 @@ namespace Volo.Abp.Json.SystemTextJson
options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpDateTimeConverter>()); options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpDateTimeConverter>());
options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpNullableDateTimeConverter>()); options.JsonSerializerOptions.Converters.Add(ServiceProvider.GetRequiredService<AbpNullableDateTimeConverter>());
options.JsonSerializerOptions.Converters.Add(new AbpStringToEnumConverter()); options.JsonSerializerOptions.Converters.Add(new AbpStringToEnumFactory());
options.JsonSerializerOptions.Converters.Add(new AbpStringToBooleanConverter()); options.JsonSerializerOptions.Converters.Add(new AbpStringToBooleanConverter());
} }
} }

15
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumConverter.cs

@ -1,16 +1,19 @@
using System; using System;
using System.Collections.Generic;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Volo.Abp.Json.SystemTextJson.JsonConverters namespace Volo.Abp.Json.SystemTextJson.JsonConverters
{ {
public class AbpStringToEnumConverter : JsonConverter<object> public class AbpStringToEnumConverter<T> : JsonConverter<T>
where T : struct, Enum
{ {
private readonly JsonStringEnumConverter _innerJsonStringEnumConverter; private readonly JsonStringEnumConverter _innerJsonStringEnumConverter;
public AbpStringToEnumConverter() public AbpStringToEnumConverter()
: this(namingPolicy: null, allowIntegerValues: true) : this(namingPolicy: null, allowIntegerValues: true)
{ {
} }
public AbpStringToEnumConverter(JsonNamingPolicy namingPolicy = null, bool allowIntegerValues = true) public AbpStringToEnumConverter(JsonNamingPolicy namingPolicy = null, bool allowIntegerValues = true)
@ -23,18 +26,18 @@ namespace Volo.Abp.Json.SystemTextJson.JsonConverters
return typeToConvert.IsEnum; return typeToConvert.IsEnum;
} }
public override object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{ {
var newOptions = new JsonSerializerOptions(options); var newOptions = new JsonSerializerOptions(options);
newOptions.Converters.Remove(this); newOptions.Converters.RemoveAll(x => x == this || x.GetType() == typeof(AbpStringToEnumFactory));
newOptions.Converters.Add(_innerJsonStringEnumConverter.CreateConverter(typeToConvert, newOptions)); newOptions.Converters.Add(_innerJsonStringEnumConverter.CreateConverter(typeToConvert, newOptions));
return JsonSerializer.Deserialize(ref reader, typeToConvert, newOptions); return JsonSerializer.Deserialize<T>(ref reader, newOptions);
} }
public override void Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options) public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{ {
var newOptions = new JsonSerializerOptions(options); var newOptions = new JsonSerializerOptions(options);
newOptions.Converters.Remove(this); newOptions.Converters.RemoveAll(x => x == this || x.GetType() == typeof(AbpStringToEnumFactory));
JsonSerializer.Serialize(writer, value, newOptions); JsonSerializer.Serialize(writer, value, newOptions);
} }
} }

40
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumFactory.cs

@ -0,0 +1,40 @@
using System;
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Volo.Abp.Json.SystemTextJson.JsonConverters
{
public class AbpStringToEnumFactory : JsonConverterFactory
{
private readonly JsonNamingPolicy _namingPolicy;
private readonly bool _allowIntegerValues;
public AbpStringToEnumFactory()
: this(namingPolicy: null, allowIntegerValues: true)
{
}
public AbpStringToEnumFactory(JsonNamingPolicy namingPolicy, bool allowIntegerValues)
{
_namingPolicy = namingPolicy;
_allowIntegerValues = allowIntegerValues;
}
public override bool CanConvert(Type typeToConvert)
{
return typeToConvert.IsEnum;
}
public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
{
return (JsonConverter) Activator.CreateInstance(
typeof(AbpStringToEnumConverter<>).MakeGenericType(typeToConvert),
BindingFlags.Instance | BindingFlags.Public,
binder: null,
new object[] { _namingPolicy, _allowIntegerValues },
culture: null)!;
}
}
}

1
framework/src/Volo.Abp.Swashbuckle/Microsoft/AspNetCore/Builder/AbpSwaggerUIBuilderExtensions.cs

@ -1,7 +1,6 @@
using System; using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Swashbuckle.AspNetCore.SwaggerUI; using Swashbuckle.AspNetCore.SwaggerUI;
using Volo.Abp;
using Volo.Abp.Swashbuckle; using Volo.Abp.Swashbuckle;
namespace Microsoft.AspNetCore.Builder namespace Microsoft.AspNetCore.Builder

54
framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Microsoft.Extensions.DependencyInjection
{
public static class AbpSwaggerGenServiceCollectionExtensions
{
public static IServiceCollection AddAbpSwaggerGenWithOAuth(
this IServiceCollection services,
[NotNull] string authority,
[NotNull] Dictionary<string, string> scopes,
Action<SwaggerGenOptions> setupAction = null)
{
return services.AddSwaggerGen(
options =>
{
options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme
{
Type = SecuritySchemeType.OAuth2,
Flows = new OpenApiOAuthFlows
{
AuthorizationCode = new OpenApiOAuthFlow
{
AuthorizationUrl = new Uri($"{authority.EnsureEndsWith('/')}connect/authorize"),
Scopes = scopes,
TokenUrl = new Uri($"{authority.EnsureEndsWith('/')}connect/token")
}
}
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "oauth2"
}
},
Array.Empty<string>()
}
});
setupAction?.Invoke(options);
});
}
}
}

3
framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.swagger.js

@ -3,8 +3,7 @@
(function () { (function () {
abp.SwaggerUIBundle = function (configObject) { abp.SwaggerUIBundle = function (configObject) {
configObject.requestInterceptor = function (request) { configObject.requestInterceptor = function (request) {
var token = abp.auth.getToken();
request.headers.Authorization = token ? "Bearer " + token : null;
var antiForgeryToken = abp.security.antiForgery.getToken(); var antiForgeryToken = abp.security.antiForgery.getToken();
if (antiForgeryToken) { if (antiForgeryToken) {
request.headers[abp.security.antiForgery.tokenHeaderName] = antiForgeryToken; request.headers[abp.security.antiForgery.tokenHeaderName] = antiForgeryToken;

6
framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj

@ -15,9 +15,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj

@ -18,7 +18,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

8
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController.cs

@ -47,5 +47,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Response
Response.Redirect("/"); Response.Redirect("/");
await Task.CompletedTask; await Task.CompletedTask;
} }
[HttpGet]
[Route("TestAsyncMethodWithResultFilter")]
[TestResultFilter]
public async Task TestAsyncMethodWithResultFilter()
{
await Task.CompletedTask;
}
} }
} }

25
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/NoContentTestController_Tests.cs

@ -10,49 +10,50 @@ namespace Volo.Abp.AspNetCore.Mvc.Response
[Fact] [Fact]
public async Task Should_Set_No_Content_For_Void_Action() public async Task Should_Set_No_Content_For_Void_Action()
{ {
var result = await GetResponseAsync("/api/NoContent-Test/TestMethod", HttpStatusCode.NoContent) var result = await GetResponseAsync("/api/NoContent-Test/TestMethod", HttpStatusCode.NoContent);
;
result.StatusCode.ShouldBe(HttpStatusCode.NoContent); result.StatusCode.ShouldBe(HttpStatusCode.NoContent);
} }
[Fact] [Fact]
public async Task Should_Not_Set_No_Content_For_Not_Void_Action() public async Task Should_Not_Set_No_Content_For_Not_Void_Action()
{ {
var result = await GetResponseAsync("/api/NoContent-Test/TestMethodWithReturn") var result = await GetResponseAsync("/api/NoContent-Test/TestMethodWithReturn");
;
result.StatusCode.ShouldBe(HttpStatusCode.OK); result.StatusCode.ShouldBe(HttpStatusCode.OK);
} }
[Fact] [Fact]
public async Task Should_Not_Set_No_Content_For_Custom_Http_Status_Code_Action() public async Task Should_Not_Set_No_Content_For_Custom_Http_Status_Code_Action()
{ {
var result = await GetResponseAsync("/api/NoContent-Test/TestCustomHttpStatusCodeMethod", HttpStatusCode.Redirect) var result = await GetResponseAsync("/api/NoContent-Test/TestCustomHttpStatusCodeMethod", HttpStatusCode.Redirect);
;
result.StatusCode.ShouldBe(HttpStatusCode.Redirect); result.StatusCode.ShouldBe(HttpStatusCode.Redirect);
} }
[Fact] [Fact]
public async Task Should_Set_No_Content_For_Task_Action() public async Task Should_Set_No_Content_For_Task_Action()
{ {
var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethod", HttpStatusCode.NoContent) var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethod", HttpStatusCode.NoContent);
;
result.StatusCode.ShouldBe(HttpStatusCode.NoContent); result.StatusCode.ShouldBe(HttpStatusCode.NoContent);
} }
[Fact] [Fact]
public async Task Should_Not_Set_No_Content_For_Not_Task_Action() public async Task Should_Not_Set_No_Content_For_Not_Task_Action()
{ {
var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethodWithReturn") var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethodWithReturn");
;
result.StatusCode.ShouldBe(HttpStatusCode.OK); result.StatusCode.ShouldBe(HttpStatusCode.OK);
} }
[Fact] [Fact]
public async Task Should_Not_Set_No_Content_For_Custom_Http_Status_Code_Async_Action() public async Task Should_Not_Set_No_Content_For_Custom_Http_Status_Code_Async_Action()
{ {
var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncCustomHttpStatusCodeMethod", HttpStatusCode.Redirect) var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncCustomHttpStatusCodeMethod", HttpStatusCode.Redirect);
;
result.StatusCode.ShouldBe(HttpStatusCode.Redirect); result.StatusCode.ShouldBe(HttpStatusCode.Redirect);
} }
[Fact]
public async Task Should_Not_Set_No_Content_For_Custom_Result_Filter_Async_Action()
{
var result = await GetResponseAsync("/api/NoContent-Test/TestAsyncMethodWithResultFilter");
result.StatusCode.ShouldBe(HttpStatusCode.OK);
}
} }
} }

19
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Response/TestResultFilter.cs

@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Volo.Abp.AspNetCore.Mvc.Response
{
public class TestResultFilter : Attribute, IAsyncActionFilter
{
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
{
await next();
context.Result = new ObjectResult("TestResultFilter");
}
}
}

2
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj

@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup> </ItemGroup>

2
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj

@ -15,7 +15,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup> </ItemGroup>

2
framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj

@ -12,7 +12,7 @@
<ProjectReference Include="..\..\src\Volo.Abp.BlobStoring.Aliyun\Volo.Abp.BlobStoring.Aliyun.csproj" /> <ProjectReference Include="..\..\src\Volo.Abp.BlobStoring.Aliyun\Volo.Abp.BlobStoring.Aliyun.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <ProjectReference Include="..\..\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" /> <ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<ProjectReference Include="..\Volo.Abp.BlobStoring.Tests\Volo.Abp.BlobStoring.Tests.csproj" /> <ProjectReference Include="..\Volo.Abp.BlobStoring.Tests\Volo.Abp.BlobStoring.Tests.csproj" />
</ItemGroup> </ItemGroup>

2
framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpHybridJsonSerializer_Tests.cs

@ -1,10 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection;
using System.Text.Json; using System.Text.Json;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Shouldly; using Shouldly;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Json.Newtonsoft; using Volo.Abp.Json.Newtonsoft;

63
framework/test/Volo.Abp.Json.Tests/Volo/Abp/Json/AbpSystemTextJsonSerializerProvider_Tests.cs

@ -0,0 +1,63 @@
using Shouldly;
using Volo.Abp.Json.SystemTextJson;
using Xunit;
namespace Volo.Abp.Json
{
public class AbpSystemTextJsonSerializerProvider_Tests : AbpJsonTestBase
{
private readonly AbpSystemTextJsonSerializerProvider _jsonSerializer;
public AbpSystemTextJsonSerializerProvider_Tests()
{
_jsonSerializer = GetRequiredService<AbpSystemTextJsonSerializerProvider>();
}
[Fact]
public void Serialize_Deserialize_With_Boolean()
{
var json = "{\"name\":\"abp\",\"IsDeleted\":\"fAlSe\"}";
var file = _jsonSerializer.Deserialize<FileWithBoolean>(json);
file.Name.ShouldBe("abp");
file.IsDeleted.ShouldBeFalse();
file.IsDeleted = false;
var newJson = _jsonSerializer.Serialize(file);
newJson.ShouldBe("{\"name\":\"abp\",\"isDeleted\":false}");
}
[Fact]
public void Serialize_Deserialize_With_Enum()
{
var json = "{\"name\":\"abp\",\"type\":\"Exe\"}";
var file = _jsonSerializer.Deserialize<FileWithEnum>(json);
file.Name.ShouldBe("abp");
file.Type.ShouldBe(FileType.Exe);
var newJson = _jsonSerializer.Serialize(file);
newJson.ShouldBe("{\"name\":\"abp\",\"type\":2}");
}
class FileWithBoolean
{
public string Name { get; set; }
public bool IsDeleted { get; set; }
}
class FileWithEnum
{
public string Name { get; set; }
public FileType Type { get; set; }
}
enum FileType
{
Zip = 0,
Exe = 2
}
}
}

2
framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj

@ -16,7 +16,7 @@
<ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" /> <ProjectReference Include="..\AbpTestBase\AbpTestBase.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" /> <ProjectReference Include="..\..\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
global.json

@ -1,6 +1,6 @@
{ {
"sdk": { "sdk": {
"version": "5.0.100-rc.2.20479.15", "version": "5.0.100",
"rollForward": "latestFeature" "rollForward": "latestFeature"
} }
} }

2
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj

@ -21,7 +21,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

4
modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj

@ -17,7 +17,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.0-rc.2.*" /> <PackageReference Include="System.Text.Encodings.Web" Version="5.0.0" />
<ProjectReference Include="..\Volo.Abp.Account.Application.Contracts\Volo.Abp.Account.Application.Contracts.csproj" /> <ProjectReference Include="..\Volo.Abp.Account.Application.Contracts\Volo.Abp.Account.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" /> <ProjectReference Include="..\..\..\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.UI.Navigation\Volo.Abp.UI.Navigation.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.UI.Navigation\Volo.Abp.UI.Navigation.csproj" />
@ -25,7 +25,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj

@ -38,7 +38,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj

@ -40,7 +40,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj

@ -7,7 +7,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.0" />
<PackageReference Include="NSubstitute" Version="4.2.2" /> <PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Shouldly" Version="3.0.2" /> <PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" /> <PackageReference Include="xunit" Version="2.4.1" />

2
modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj

@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.BackgroundJobs.Abstractions\Volo.Abp.BackgroundJobs.Abstractions.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.BackgroundJobs.Abstractions\Volo.Abp.BackgroundJobs.Abstractions.csproj" />
</ItemGroup> </ItemGroup>

2
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj

@ -6,7 +6,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-rc.2.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference> </PackageReference>

2
modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj

@ -15,7 +15,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.0-rc.2.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save