Browse Source

Merge branch 'dev' into feature/#19471

pull/22363/head
erdemcaygor 2 years ago
parent
commit
94ab190162
  1. 2
      Directory.Packages.props
  2. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json
  3. 5
      build/common.ps1
  4. 8
      docs/en/Community-Articles/2025-03-18-Using-Vue-Components/post.md
  5. 16
      docs/en/modules/gdpr.md
  6. 14
      framework/Volo.Abp.sln
  7. 19
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj
  8. 15
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/AbpAspNetCoreBundlingModule.cs
  9. 3
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCache.cs
  10. 3
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCacheItem.cs
  11. 248
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleManagerBase.cs
  12. 2
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleResult.cs
  13. 14
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerBase.cs
  14. 2
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerContext.cs
  15. 2
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleCache.cs
  16. 3
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleManager.cs
  17. 4
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundler.cs
  18. 2
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundlerContext.cs
  19. 6
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Scripts/IScriptBundler.cs
  20. 6
      framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Styles/IStyleBundler.cs
  21. 106
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs
  22. 13
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpBlazorWebView.cs
  23. 125
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/BundleManager.cs
  24. 8
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/IMauiBlazorContentFileProvide.cs
  25. 26
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorBundlerBase.cs
  26. 65
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorContentFileProvider.cs
  27. 28
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Scripts/ScriptBundler.cs
  28. 40
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Styles/StyleBundler.cs
  29. 41
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj
  30. 2
      framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Bundling/BlazorServerComponentBundleManager.cs
  31. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs
  32. 1
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj
  33. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs
  34. 233
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs
  35. 25
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/MvcUiBundlerBase.cs
  36. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/IScriptBundler.cs
  37. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/ScriptBundler.cs
  38. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/IStyleBundler.cs
  39. 11
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs
  40. 1
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs
  41. 1
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs
  42. 1
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs
  43. 2
      modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor
  44. 5
      modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs
  45. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityErrorCodes.cs
  46. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json
  47. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json
  48. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json
  49. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json
  50. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json
  51. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json
  52. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json
  53. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json
  54. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json
  55. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json
  56. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json
  57. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json
  58. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json
  59. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json
  60. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json
  61. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json
  62. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json
  63. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json
  64. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json
  65. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json
  66. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json
  67. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json
  68. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sv.json
  69. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json
  70. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json
  71. 2
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json
  72. 4
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json
  73. 6
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs
  74. 4
      modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs
  75. 2
      nupkg/common.ps1

2
Directory.Packages.props

@ -66,6 +66,8 @@
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.2" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.2" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.2" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.30" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="9.0.30" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.2" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.2" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.2" />

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

@ -264,6 +264,7 @@
"EditProfile": "Edit Profile",
"ConfirmEmailForPost": "To be able to post, you need to confirm your email. Go to account.abp.io/Account/Manage and verify your email in the Personal Info tab.",
"DailyPostCreateLimitation": "You have reached the daily post creation limit. You can create a new post in {0}.",
"YourAccountDisabled": "Your user account is disabled!"
"YourAccountDisabled": "Your user account is disabled!",
"PostCreationFailed": "An error occurred while creating the post. Please try again later."
}
}

5
build/common.ps1

@ -23,6 +23,11 @@ $solutionPaths = @(
"../modules/blob-storing-database"
)
# Remove MAUI related projects if not on Windows
if ($env:OS -ne "Windows_NT") {
dotnet sln ../framework/Volo.Abp.sln remove ../framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj
}
if ($full -eq "-f")
{
# List of additional solutions required for full build

8
docs/en/Community-Articles/2025-03-18-Using-Vue-Components/post.md

@ -4,6 +4,10 @@ In modern web development, integrating dynamic front-end frameworks with server-
This article won't use any SPA approach. The goal of this article is to use Razor Pages with simple Vue components to eliminate jQuery while developing MVC application.
> **🎉 Also video version is available!**
>
> [Watch on YouTube Now!](https://youtu.be/sZ8iSMovHZs?si=GynuJjsLEI1p2g6w)
## Creating the Solution
Let's create a simple TODO list application to demonstrate how to use Vue components in Razor Pages. I'll build a really simple backend without a connection to a database for demonstration purposes. We will focus on the frontend part.
@ -71,13 +75,13 @@ Let's create a simple Vue component to display the TODO list.
```html
<div id="vue-app">
<todo-component :message="'Welcome, @CurrentUser.UserName !'"></todo-component>
<message-component :message="'Welcome, @CurrentUser.UserName !'"></todo-component>
</div>
```
- Navigate to the `Index.cshtml.js` file and add the following code:
```js
Vue.component('todo-component', {
Vue.component('message-component', {
template: '<div>Hello, {{ message }}</div>',
props: ['message']
});

16
docs/en/modules/gdpr.md

@ -48,7 +48,14 @@ The "Personal Data" page is used to manage personal data requests. You can view
![gdpr](../images/gdpr-personal-data-page.png)
To see the other features of the GDPR module, visit [the module description page](https://abp.io/modules/Volo.Gdpr).
The GDPR module is designed for distributed architectures. When a user requests their personal data, the module publishes two events:
- `GdprUserDataRequestedEto`: Triggers personal data collectors to prepare user data
- `GdprUserDataDeletionRequestedEto`: Triggers personal data collectors to delete user data
You can subscribe to these events to implement custom data collection and deletion logic in your modules. See the [Distributed Events](#distributed-events) section for more details.
> To see the other features of the GDPR module, visit [the module description page](https://abp.io/modules/Volo.Gdpr).
## Options
@ -227,8 +234,13 @@ This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#e
### GdprUserDataPreparedEto
This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#event-transfer-object) is used to save the collected personal data into a single JSON file by module.
This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#event-transfer-object) is used to save the collected personal data into a single JSON file per module. Typically, you don't need to implement this event handler since the module already has an implementation that returns the collected data within a zip file containing multiple JSON files, with each file containing data collected from a specific module.
### GdprUserDataDeletionRequestedEto
This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#event-transfer-object) is published when a user requests to permanently delete their personal data and account. By default, only the `IdentityGdprEventHandler` in the [Identity Pro Module](../modules/identity-pro) subscribes to this event to anonymize the user's data and delete their account (using soft-delete unless configured otherwise).
If you want to delete additional sensitive user data stored in other modules, you can subscribe to this event and implement custom deletion (or anonymization) logic in those modules.
## Cookie Consent

14
framework/Volo.Abp.sln

@ -481,6 +481,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Sms.TencentCloud",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Sms.TencentCloud.Tests", "test\Volo.Abp.Sms.TencenCloud.Tests\Volo.Abp.Sms.TencentCloud.Tests.csproj", "{C753DDD6-5699-45F8-8669-08CE0BB816DE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Bundling", "src\Volo.Abp.AspNetCore.Bundling\Volo.Abp.AspNetCore.Bundling.csproj", "{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling", "src\Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling\Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj", "{70720321-DED4-464F-B913-BDA5BBDD7982}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlobStoring.Bunny", "src\Volo.Abp.BlobStoring.Bunny\Volo.Abp.BlobStoring.Bunny.csproj", "{1BBCBA72-CDB6-4882-96EE-D4CD149433A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlobStoring.Bunny.Tests", "test\Volo.Abp.BlobStoring.Bunny.Tests\Volo.Abp.BlobStoring.Bunny.Tests.csproj", "{BC4BB2D6-DFD8-4190-AAC3-32C0A7A8E915}"
@ -1439,6 +1443,14 @@ Global
{C753DDD6-5699-45F8-8669-08CE0BB816DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C753DDD6-5699-45F8-8669-08CE0BB816DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C753DDD6-5699-45F8-8669-08CE0BB816DE}.Release|Any CPU.Build.0 = Release|Any CPU
{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Release|Any CPU.Build.0 = Release|Any CPU
{70720321-DED4-464F-B913-BDA5BBDD7982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70720321-DED4-464F-B913-BDA5BBDD7982}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70720321-DED4-464F-B913-BDA5BBDD7982}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70720321-DED4-464F-B913-BDA5BBDD7982}.Release|Any CPU.Build.0 = Release|Any CPU
{1BBCBA72-CDB6-4882-96EE-D4CD149433A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1BBCBA72-CDB6-4882-96EE-D4CD149433A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BBCBA72-CDB6-4882-96EE-D4CD149433A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -1689,6 +1701,8 @@ Global
{E50739A7-5E2F-4EB5-AEA9-554115CB9613} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{BE7109C5-7368-4688-8557-4A15D3F4776A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{C753DDD6-5699-45F8-8669-08CE0BB816DE} = {447C8A77-E5F0-4538-8687-7383196D04EA}
{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{70720321-DED4-464F-B913-BDA5BBDD7982} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{1BBCBA72-CDB6-4882-96EE-D4CD149433A2} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{BC4BB2D6-DFD8-4190-AAC3-32C0A7A8E915} = {447C8A77-E5F0-4538-8687-7383196D04EA}
EndGlobalSection

19
framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.Minify\Volo.Abp.Minify.csproj" />
<ProjectReference Include="..\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj" />
</ItemGroup>
</Project>

15
framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/AbpAspNetCoreBundlingModule.cs

@ -0,0 +1,15 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Minify;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Bundling;
[DependsOn(
typeof(AbpAspNetCoreMvcUiBundlingAbstractionsModule),
typeof(AbpMinifyModule),
typeof(AbpVirtualFileSystemModule)
)]
public class AbpAspNetCoreBundlingModule : AbpModule
{
}

3
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCache.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCache.cs

@ -1,9 +1,10 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public class BundleCache : IBundleCache, ISingletonDependency
{

3
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCacheItem.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCacheItem.cs

@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public class BundleCacheItem
{

248
framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleManagerBase.cs

@ -0,0 +1,248 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling.Scripts;
using Volo.Abp.AspNetCore.Bundling.Styles;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Bundling;
public abstract class BundleManagerBase : IBundleManager
{
public ILogger<BundleManagerBase> Logger { get; set; }
protected readonly AbpBundlingOptions Options;
protected readonly AbpBundleContributorOptions ContributorOptions;
protected readonly IScriptBundler ScriptBundler;
protected readonly IStyleBundler StyleBundler;
protected readonly IServiceProvider ServiceProvider;
protected readonly IDynamicFileProvider DynamicFileProvider;
protected readonly IBundleCache BundleCache;
public BundleManagerBase(
IOptions<AbpBundlingOptions> options,
IOptions<AbpBundleContributorOptions> contributorOptions,
IScriptBundler scriptBundler,
IStyleBundler styleBundler,
IServiceProvider serviceProvider,
IDynamicFileProvider dynamicFileProvider,
IBundleCache bundleCache)
{
Options = options.Value;
ContributorOptions = contributorOptions.Value;
ScriptBundler = scriptBundler;
ServiceProvider = serviceProvider;
DynamicFileProvider = dynamicFileProvider;
BundleCache = bundleCache;
StyleBundler = styleBundler;
Logger = NullLogger<BundleManagerBase>.Instance;
}
public virtual async Task<IReadOnlyList<BundleFile>> GetStyleBundleFilesAsync(string bundleName)
{
return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler);
}
public virtual async Task<IReadOnlyList<BundleFile>> GetScriptBundleFilesAsync(string bundleName)
{
return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler);
}
protected virtual async Task<IReadOnlyList<BundleFile>> GetBundleFilesAsync(BundleConfigurationCollection bundles,
string bundleName, IBundler bundler)
{
var files = new List<BundleFile>();
var contributors = GetContributors(bundles, bundleName);
var bundleFiles = await GetBundleFilesAsync(contributors);
var dynamicResources = await GetDynamicResourcesAsync(contributors);
if (!IsBundlingEnabled())
{
return bundleFiles.Union(dynamicResources).ToImmutableList();
}
var localBundleFiles = new List<string>();
foreach (var bundleFile in bundleFiles)
{
if (!bundleFile.IsExternalFile)
{
localBundleFiles.Add(bundleFile.FileName);
}
else
{
if (localBundleFiles.Count != 0)
{
files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files);
localBundleFiles.Clear();
}
files.Add(bundleFile);
}
}
if (localBundleFiles.Count != 0)
{
files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files);
}
return files.Union(dynamicResources).ToImmutableList();
}
private BundleCacheItem AddToBundleCache(string bundleName, IBundler bundler, List<string> bundleFiles)
{
var bundleRelativePath =
Options.BundleFolderName.EnsureEndsWith('/') +
bundleName + "." + bundleFiles.JoinAsString("|").ToMd5() + "." + bundler.FileExtension;
return BundleCache.GetOrAdd(bundleRelativePath, () =>
{
var cacheValue = new BundleCacheItem(
new List<BundleFile> { new BundleFile("/" + bundleRelativePath) }
);
WatchChanges(cacheValue, bundleFiles, bundleRelativePath);
var bundleResult = bundler.Bundle(
new BundlerContext(
bundleRelativePath,
bundleFiles,
IsMinficationEnabled()
)
);
SaveBundleResult(bundleRelativePath, bundleResult);
return cacheValue;
});
}
private void WatchChanges(BundleCacheItem cacheValue, List<string> files, string bundleRelativePath)
{
lock (cacheValue.WatchDisposeHandles)
{
foreach (var file in files)
{
var watchDisposeHandle = GetFileProvider().Watch(file).RegisterChangeCallback(_ =>
{
lock (cacheValue.WatchDisposeHandles)
{
cacheValue.WatchDisposeHandles.ForEach(h => h.Dispose());
cacheValue.WatchDisposeHandles.Clear();
}
BundleCache.Remove(bundleRelativePath);
DynamicFileProvider.Delete("/wwwroot/" + bundleRelativePath); //TODO: get rid of wwwroot!
}, null);
cacheValue.WatchDisposeHandles.Add(watchDisposeHandle);
}
}
}
protected virtual void SaveBundleResult(string bundleRelativePath, BundleResult bundleResult)
{
var fileName = bundleRelativePath.Substring(bundleRelativePath.IndexOf('/') + 1);
DynamicFileProvider.AddOrUpdate(
new InMemoryFileInfo(
"/wwwroot/" + bundleRelativePath, //TODO: get rid of wwwroot!
Encoding.UTF8.GetBytes(bundleResult.Content),
fileName
)
);
}
public abstract bool IsBundlingEnabled();
protected abstract bool IsMinficationEnabled();
protected virtual async Task<List<BundleFile>> GetBundleFilesAsync(List<IBundleContributor> contributors)
{
var context = CreateBundleConfigurationContext();
foreach (var contributor in contributors)
{
await contributor.PreConfigureBundleAsync(context);
}
foreach (var contributor in contributors)
{
await contributor.ConfigureBundleAsync(context);
}
foreach (var contributor in contributors)
{
await contributor.PostConfigureBundleAsync(context);
}
return context.Files;
}
protected virtual async Task<List<BundleFile>> GetDynamicResourcesAsync(List<IBundleContributor> contributors)
{
var context = CreateBundleConfigurationContext();
foreach (var contributor in contributors)
{
await contributor.ConfigureDynamicResourcesAsync(context);
}
return context.Files;
}
protected virtual BundleConfigurationContext CreateBundleConfigurationContext()
{
return new BundleConfigurationContext(ServiceProvider, GetFileProvider(),
Options.Parameters);
}
protected abstract IFileProvider GetFileProvider();
protected virtual List<IBundleContributor> GetContributors(BundleConfigurationCollection bundles, string bundleName)
{
var contributors = new List<IBundleContributor>();
AddContributorsWithBaseBundles(contributors, bundles, bundleName);
for (var i = 0; i < contributors.Count; ++i)
{
var extensions = ContributorOptions.Extensions(contributors[i].GetType()).GetAll();
if (extensions.Count > 0)
{
contributors.InsertRange(i + 1, extensions);
i += extensions.Count;
}
}
return contributors;
}
protected virtual void AddContributorsWithBaseBundles(List<IBundleContributor> contributors,
BundleConfigurationCollection bundles, string bundleName)
{
var bundleConfiguration = bundles.Get(bundleName);
foreach (var baseBundleName in bundleConfiguration.BaseBundles)
{
AddContributorsWithBaseBundles(contributors, bundles, baseBundleName); //Recursive call
}
var selfContributors = bundleConfiguration.Contributors.GetAll();
if (selfContributors.Any())
{
contributors.AddRange(selfContributors);
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleResult.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleResult.cs

@ -1,4 +1,4 @@
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public class BundleResult
{

14
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerBase.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerBase.cs

@ -1,31 +1,27 @@
using System;
using System.Text;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Minify;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public abstract class BundlerBase : IBundler, ITransientDependency
{
private static string[] _minFileSuffixes = { "min", "prod" };
public ILogger<BundlerBase> Logger { get; set; }
protected IWebHostEnvironment HostEnvironment { get; }
protected IMinifier Minifier { get; }
protected AbpBundlingOptions BundlingOptions { get; }
protected BundlerBase(
IWebHostEnvironment hostEnvironment,
IMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions)
{
HostEnvironment = hostEnvironment;
Minifier = minifier;
BundlingOptions = bundlingOptions.Value;
@ -123,7 +119,7 @@ public abstract class BundlerBase : IBundler, ITransientDependency
protected virtual IFileInfo GetFileInfo(IBundlerContext context, string file)
{
var fileInfo = HostEnvironment.WebRootFileProvider.GetFileInfo(file);
var fileInfo = FindFileInfo(file);
if (!fileInfo.Exists)
{
@ -150,7 +146,7 @@ public abstract class BundlerBase : IBundler, ITransientDependency
{
foreach (var suffix in _minFileSuffixes)
{
var fileInfo = HostEnvironment.WebRootFileProvider.GetFileInfo(
var fileInfo = FindFileInfo(
$"{file.RemovePostFix($".{FileExtension}")}.{suffix}.{FileExtension}"
);
@ -163,6 +159,8 @@ public abstract class BundlerBase : IBundler, ITransientDependency
return null;
}
protected abstract IFileInfo FindFileInfo(string file);
protected virtual string ProcessBeforeAddingToTheBundle(IBundlerContext context, string filePath, string fileContent)
{
return fileContent;

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerContext.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerContext.cs

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public class BundlerContext : IBundlerContext
{

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleCache.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleCache.cs

@ -1,6 +1,6 @@
using System;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public interface IBundleCache
{

3
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleManager.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleManager.cs

@ -1,7 +1,8 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public interface IBundleManager
{

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundler.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundler.cs

@ -1,4 +1,6 @@
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public interface IBundler
{

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundlerContext.cs → framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundlerContext.cs

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Bundling;
public interface IBundlerContext
{

6
framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Scripts/IScriptBundler.cs

@ -0,0 +1,6 @@
namespace Volo.Abp.AspNetCore.Bundling.Scripts;
public interface IScriptBundler : IBundler
{
}

6
framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Styles/IStyleBundler.cs

@ -0,0 +1,6 @@
namespace Volo.Abp.AspNetCore.Bundling.Styles;
public interface IStyleBundler : IBundler
{
}

106
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs

@ -0,0 +1,106 @@
using System.Text;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Bundling.Styles;
using Volo.Abp.Modularity;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling;
[DependsOn(
typeof(AbpAspNetCoreComponentsMauiBlazorModule),
typeof(AbpAspNetCoreBundlingModule)
)]
public class AbpAspNetCoreComponentsMauiBlazorBundlingModule : AbpModule
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(() => OnApplicationInitializationAsync(context));
}
public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
{
await InitialGlobalAssetsAsync(context);
}
protected virtual async Task InitialGlobalAssetsAsync(ApplicationInitializationContext context)
{
var bundlingOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBundlingOptions>>().Value;
var logger = context.ServiceProvider.GetRequiredService<ILogger<AbpAspNetCoreComponentsMauiBlazorBundlingModule>>();
if (!bundlingOptions.GlobalAssets.Enabled)
{
return;
}
var bundleManager = context.ServiceProvider.GetRequiredService<BundleManager>();
var mauiBlazorContentFileProvider = context.ServiceProvider.GetRequiredService<IMauiBlazorContentFileProvider>();
var dynamicFileProvider = context.ServiceProvider.GetRequiredService<IDynamicFileProvider>();
if (!bundlingOptions.GlobalAssets.GlobalStyleBundleName.IsNullOrWhiteSpace())
{
var styleFiles = await bundleManager.GetStyleBundleFilesAsync(bundlingOptions.GlobalAssets.GlobalStyleBundleName);
var styles = string.Empty;
foreach (var file in styleFiles)
{
var fileInfo = mauiBlazorContentFileProvider.GetFileInfo(file.FileName);
if (!fileInfo.Exists)
{
logger.LogError($"Could not find the file: {file.FileName}");
continue;
}
var fileContent = await fileInfo.ReadAsStringAsync();
if (!bundleManager.IsBundlingEnabled())
{
fileContent = CssRelativePath.Adjust(fileContent,
file.FileName,
Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"));
styles += $"/*{file.FileName}*/{Environment.NewLine}{fileContent}{Environment.NewLine}{Environment.NewLine}";
}
else
{
styles += $"{fileContent}{Environment.NewLine}{Environment.NewLine}";
}
}
dynamicFileProvider.AddOrUpdate(
new InMemoryFileInfo("/wwwroot/" + bundlingOptions.GlobalAssets.CssFileName,
Encoding.UTF8.GetBytes(styles),
bundlingOptions.GlobalAssets.CssFileName));
}
if (!bundlingOptions.GlobalAssets.GlobalScriptBundleName.IsNullOrWhiteSpace())
{
var scriptFiles = await bundleManager.GetScriptBundleFilesAsync(bundlingOptions.GlobalAssets.GlobalScriptBundleName);
var scripts = string.Empty;
foreach (var file in scriptFiles)
{
var fileInfo = mauiBlazorContentFileProvider.GetFileInfo(file.FileName);
if (!fileInfo.Exists)
{
logger.LogError($"Could not find the file: {file.FileName}");
continue;
}
var fileContent = await fileInfo.ReadAsStringAsync();
if (!bundleManager.IsBundlingEnabled())
{
scripts += $"{fileContent.EnsureEndsWith(';')}{Environment.NewLine}{Environment.NewLine}";
}
else
{
scripts += $"//{file.FileName}{Environment.NewLine}{fileContent.EnsureEndsWith(';')}{Environment.NewLine}{Environment.NewLine}";
}
}
dynamicFileProvider.AddOrUpdate(
new InMemoryFileInfo("/wwwroot/" + bundlingOptions.GlobalAssets.JavaScriptFileName,
Encoding.UTF8.GetBytes(scripts),
bundlingOptions.GlobalAssets.JavaScriptFileName));
}
}
}

13
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpBlazorWebView.cs

@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Components.WebView.Maui;
using Microsoft.Extensions.FileProviders;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling;
public class AbpBlazorWebView : BlazorWebView
{
public override IFileProvider CreateFileProvider(string contentRootDir)
{
return new CompositeFileProvider(Handler!.GetRequiredService<IMauiBlazorContentFileProvider>(), base.CreateFileProvider(contentRootDir));
}
}

125
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/BundleManager.cs

@ -0,0 +1,125 @@
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Bundling.Scripts;
using Volo.Abp.AspNetCore.Bundling.Styles;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling;
public class BundleManager : BundleManagerBase, ITransientDependency
{
protected IMauiBlazorContentFileProvider MauiBlazorContentFileProvider { get; }
public BundleManager(
IOptions<AbpBundlingOptions> options,
IOptions<AbpBundleContributorOptions> contributorOptions,
IScriptBundler scriptBundler,
IStyleBundler styleBundler,
IServiceProvider serviceProvider,
IDynamicFileProvider dynamicFileProvider,
IBundleCache bundleCache,
IMauiBlazorContentFileProvider mauiBlazorContentFileProvider) : base(
options,
contributorOptions,
scriptBundler,
styleBundler,
serviceProvider,
dynamicFileProvider,
bundleCache)
{
MauiBlazorContentFileProvider = mauiBlazorContentFileProvider;
}
public override bool IsBundlingEnabled()
{
switch (Options.Mode)
{
case BundlingMode.None:
return false;
case BundlingMode.Bundle:
case BundlingMode.BundleAndMinify:
return true;
case BundlingMode.Auto:
return !IsDebug();
default:
throw new AbpException($"Unhandled {nameof(BundlingMode)}: {Options.Mode}");
}
}
protected async override Task<List<BundleFile>> GetBundleFilesAsync(List<IBundleContributor> contributors)
{
var files = await base.GetBundleFilesAsync(contributors);
foreach (var file in files)
{
await CopyFileToAppDataDirectoryAsync(file);
}
return files;
}
protected virtual async Task CopyFileToAppDataDirectoryAsync(BundleFile file)
{
if (file.IsExternalFile)
{
return;
}
var fileName = Path.Combine("wwwroot", file.FileName);
if(MauiBlazorContentFileProvider.GetFileInfo(fileName).Exists)
{
return;
}
try
{
await using var inputStream = await FileSystem.Current.OpenAppPackageFileAsync(fileName);
var targetFile = Path.Combine(FileSystem.Current.AppDataDirectory, fileName);
var fileDirectory = Path.GetDirectoryName(targetFile)!;
if (!Path.Exists(fileDirectory))
{
Directory.CreateDirectory(fileDirectory);
}
await using var outputStream = File.Create(targetFile);
await inputStream.CopyToAsync(outputStream);
}
catch (Exception e)
{
Logger.LogError($"Could not copy the file to the app data directory: {fileName}", e);
}
}
protected override bool IsMinficationEnabled()
{
switch (Options.Mode)
{
case BundlingMode.None:
case BundlingMode.Bundle:
return false;
case BundlingMode.BundleAndMinify:
return true;
case BundlingMode.Auto:
return !IsDebug();
default:
throw new AbpException($"Unhandled {nameof(BundlingMode)}: {Options.Mode}");
}
}
protected virtual bool IsDebug()
{
#if DEBUG
return true;
#else
retur false;
#endif
}
protected override IFileProvider GetFileProvider()
{
return MauiBlazorContentFileProvider;
}
}

8
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/IMauiBlazorContentFileProvide.cs

@ -0,0 +1,8 @@
using Microsoft.Extensions.FileProviders;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling;
public interface IMauiBlazorContentFileProvider : IFileProvider
{
string ContentRootPath { get; }
}

26
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorBundlerBase.cs

@ -0,0 +1,26 @@
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Minify;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling;
public abstract class MauiBlazorBundlerBase : BundlerBase
{
protected IMauiBlazorContentFileProvider MauiBlazorContentFileProvider { get; }
public MauiBlazorBundlerBase(
IMauiBlazorContentFileProvider mauiBlazorContentFileProvider,
IMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions) : base(minifier,
bundlingOptions)
{
MauiBlazorContentFileProvider = mauiBlazorContentFileProvider;
}
protected override IFileInfo FindFileInfo(string file)
{
return MauiBlazorContentFileProvider.GetFileInfo(file);
}
}

65
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorContentFileProvider.cs

@ -0,0 +1,65 @@
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Primitives;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Volo.Abp.DependencyInjection;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling;
public class MauiBlazorContentFileProvider : IMauiBlazorContentFileProvider, ISingletonDependency
{
private readonly IVirtualFileProvider _virtualFileProvider;
private readonly IFileProvider _fileProvider;
private string _rootPath = "/wwwroot";
public MauiBlazorContentFileProvider(IVirtualFileProvider virtualFileProvider)
{
_virtualFileProvider = virtualFileProvider;
_fileProvider = CreateFileProvider();
}
public string ContentRootPath => FileSystem.Current.AppDataDirectory;
public IFileInfo GetFileInfo(string subpath)
{
if (string.IsNullOrEmpty(subpath))
{
return new NotFoundFileInfo(subpath);
}
var fileInfo = _fileProvider.GetFileInfo(subpath);
return fileInfo.Exists ? fileInfo : _fileProvider.GetFileInfo( _rootPath + subpath.EnsureStartsWith('/'));
}
public IDirectoryContents GetDirectoryContents(string subpath)
{
if (string.IsNullOrEmpty(subpath))
{
return NotFoundDirectoryContents.Singleton;
}
var directory = _fileProvider.GetDirectoryContents(subpath);
return directory.Exists ? directory : _fileProvider.GetDirectoryContents( _rootPath + subpath.EnsureStartsWith('/'));
}
public IChangeToken Watch(string filter)
{
return new CompositeChangeToken(
[
_fileProvider.Watch(_rootPath + filter),
_fileProvider.Watch(filter)
]
);
}
protected virtual IFileProvider CreateFileProvider()
{
var assetsDirectory = Path.Combine(ContentRootPath, _rootPath.TrimStart('/'));
if (!Path.Exists(assetsDirectory))
{
Directory.CreateDirectory(assetsDirectory);
}
return new CompositeFileProvider(new PhysicalFileProvider(assetsDirectory), _virtualFileProvider);
}
}

28
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Scripts/ScriptBundler.cs

@ -0,0 +1,28 @@
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Bundling.Scripts;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Minify.Scripts;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.Scripts;
public class ScriptBundler : MauiBlazorBundlerBase, IScriptBundler
{
public override string FileExtension => "js";
public ScriptBundler(
IMauiBlazorContentFileProvider mauiBlazorContentFileProvider,
IJavascriptMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions)
: base(
mauiBlazorContentFileProvider,
minifier,
bundlingOptions)
{
}
protected override string ProcessBeforeAddingToTheBundle(IBundlerContext context, string filePath, string fileContent)
{
return fileContent.EnsureEndsWith(';') + Environment.NewLine;
}
}

40
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Styles/StyleBundler.cs

@ -0,0 +1,40 @@
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Bundling.Styles;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Bundling.Styles;
using Volo.Abp.Minify.Styles;
namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.Styles;
public class StyleBundler : MauiBlazorBundlerBase, IStyleBundler
{
private readonly IMauiBlazorContentFileProvider _mauiBlazorContentFileProvider;
public override string FileExtension => "css";
public StyleBundler(
IMauiBlazorContentFileProvider mauiBlazorContentFileProvider,
ICssMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions)
: base(
mauiBlazorContentFileProvider,
minifier,
bundlingOptions)
{
_mauiBlazorContentFileProvider = mauiBlazorContentFileProvider;
}
public string GetAbsolutePath(string relativePath)
{
return Path.Combine(_mauiBlazorContentFileProvider.ContentRootPath, "wwwroot", relativePath.RemovePreFix("/")).Replace("file://", "");
}
protected override string ProcessBeforeAddingToTheBundle(IBundlerContext context, string filePath, string fileContent)
{
return CssRelativePath.Adjust(
fileContent,
GetAbsolutePath(filePath),
GetAbsolutePath(context.BundleRelativePath)
);
}
}

41
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj

@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" />
<PackageReference Include="Microsoft.Maui.Controls"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Bundling\Volo.Abp.AspNetCore.Bundling.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.MauiBlazor\Volo.Abp.AspNetCore.Components.MauiBlazor.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Platforms\Android\" />
<Folder Include="Platforms\iOS\" />
<Folder Include="Platforms\MacCatalyst\" />
<Folder Include="Platforms\Windows\" />
</ItemGroup>
</Project>

2
framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Bundling/BlazorServerComponentBundleManager.cs

@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Components.Web.Theming.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Components.Server.Theming.Bundling;

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs → framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs

@ -1,6 +1,6 @@
using System;
using System;
using System.Collections.Concurrent;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
@ -27,4 +27,4 @@ public class AbpBundleContributorOptions
_ => new BundleContributorCollection()
);
}
}
}

1
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj

@ -19,6 +19,7 @@
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions\Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions.csproj" />
<ProjectReference Include="..\Volo.Abp.Minify\Volo.Abp.Minify.csproj" />
<ProjectReference Include="..\Volo.Abp.AspNetCore.Bundling\Volo.Abp.AspNetCore.Bundling.csproj" />
</ItemGroup>
</Project>

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs

@ -7,6 +7,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.VirtualFileSystem;
using Volo.Abp.Bundling.Styles;
@ -21,8 +22,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
[DependsOn(
typeof(AbpAspNetCoreMvcUiBootstrapModule),
typeof(AbpMinifyModule),
typeof(AbpAspNetCoreMvcUiBundlingAbstractionsModule)
typeof(AbpAspNetCoreBundlingModule)
)]
public class AbpAspNetCoreMvcUiBundlingModule : AbpModule
{

233
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs

@ -9,6 +9,10 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.FileProviders;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Bundling.Scripts;
using Volo.Abp.AspNetCore.Bundling.Styles;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Scripts;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles;
using Volo.Abp.AspNetCore.Mvc.UI.Resources;
@ -17,162 +21,47 @@ using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
public class BundleManager : IBundleManager, ITransientDependency
public class BundleManager : BundleManagerBase, ITransientDependency
{
public ILogger<BundleManager> Logger { get; set; }
protected readonly AbpBundlingOptions Options;
protected readonly AbpBundleContributorOptions ContributorOptions;
protected readonly IWebHostEnvironment HostingEnvironment;
protected readonly IScriptBundler ScriptBundler;
protected readonly IStyleBundler StyleBundler;
protected readonly IServiceProvider ServiceProvider;
protected readonly IDynamicFileProvider DynamicFileProvider;
protected readonly IBundleCache BundleCache;
protected readonly IWebRequestResources RequestResources;
public BundleManager(
IOptions<AbpBundlingOptions> options,
IOptions<AbpBundleContributorOptions> contributorOptions,
IScriptBundler scriptBundler,
IScriptBundler scriptBundler,
IStyleBundler styleBundler,
IWebHostEnvironment hostingEnvironment,
IServiceProvider serviceProvider,
IDynamicFileProvider dynamicFileProvider,
IBundleCache bundleCache,
IWebRequestResources requestResources)
IWebHostEnvironment hostingEnvironment,
IWebRequestResources requestResources) : base(
options,
contributorOptions,
scriptBundler,
styleBundler,
serviceProvider,
dynamicFileProvider,
bundleCache)
{
Options = options.Value;
ContributorOptions = contributorOptions.Value;
HostingEnvironment = hostingEnvironment;
ScriptBundler = scriptBundler;
ServiceProvider = serviceProvider;
DynamicFileProvider = dynamicFileProvider;
BundleCache = bundleCache;
RequestResources = requestResources;
StyleBundler = styleBundler;
Logger = NullLogger<BundleManager>.Instance;
}
public virtual async Task<IReadOnlyList<BundleFile>> GetStyleBundleFilesAsync(string bundleName)
{
return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler);
}
public virtual async Task<IReadOnlyList<BundleFile>> GetScriptBundleFilesAsync(string bundleName)
{
return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler);
}
protected virtual async Task<IReadOnlyList<BundleFile>> GetBundleFilesAsync(BundleConfigurationCollection bundles, string bundleName, IBundler bundler)
{
var files = new List<BundleFile>();
var contributors = GetContributors(bundles, bundleName);
var bundleFiles = RequestResources.TryAdd(await GetBundleFilesAsync(contributors));
var dynamicResources = RequestResources.TryAdd(await GetDynamicResourcesAsync(contributors));
if (!IsBundlingEnabled())
{
return bundleFiles.Union(dynamicResources).ToImmutableList();
}
var localBundleFiles = new List<string>();
foreach (var bundleFile in bundleFiles)
{
if (!bundleFile.IsExternalFile)
{
localBundleFiles.Add(bundleFile.FileName);
}
else
{
if (localBundleFiles.Count != 0)
{
files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files);
localBundleFiles.Clear();
}
files.Add(bundleFile);
}
}
if (localBundleFiles.Count != 0)
{
files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files);
}
return files.Union(dynamicResources).ToImmutableList();
}
private BundleCacheItem AddToBundleCache(string bundleName, IBundler bundler, List<string> bundleFiles)
{
var bundleRelativePath =
Options.BundleFolderName.EnsureEndsWith('/') +
bundleName + "." + bundleFiles.JoinAsString("|").ToMd5() + "." + bundler.FileExtension;
return BundleCache.GetOrAdd(bundleRelativePath, () =>
{
var cacheValue = new BundleCacheItem(
new List<BundleFile>
{
new BundleFile("/" + bundleRelativePath)
}
);
WatchChanges(cacheValue, bundleFiles, bundleRelativePath);
protected IWebHostEnvironment HostingEnvironment { get; }
var bundleResult = bundler.Bundle(
new BundlerContext(
bundleRelativePath,
bundleFiles,
IsMinficationEnabled()
)
);
protected IWebRequestResources RequestResources { get; }
SaveBundleResult(bundleRelativePath, bundleResult);
return cacheValue;
});
}
private void WatchChanges(BundleCacheItem cacheValue, List<string> files, string bundleRelativePath)
protected async override Task<List<BundleFile>> GetBundleFilesAsync(List<IBundleContributor> contributors)
{
lock (cacheValue.WatchDisposeHandles)
{
foreach (var file in files)
{
var watchDisposeHandle = HostingEnvironment.WebRootFileProvider.Watch(file).RegisterChangeCallback(_ =>
{
lock (cacheValue.WatchDisposeHandles)
{
cacheValue.WatchDisposeHandles.ForEach(h => h.Dispose());
cacheValue.WatchDisposeHandles.Clear();
}
BundleCache.Remove(bundleRelativePath);
DynamicFileProvider.Delete("/wwwroot/" + bundleRelativePath); //TODO: get rid of wwwroot!
}, null);
cacheValue.WatchDisposeHandles.Add(watchDisposeHandle);
}
}
return RequestResources.TryAdd(await base.GetBundleFilesAsync(contributors));
}
protected virtual void SaveBundleResult(string bundleRelativePath, BundleResult bundleResult)
protected async override Task<List<BundleFile>> GetDynamicResourcesAsync(List<IBundleContributor> contributors)
{
var fileName = bundleRelativePath.Substring(bundleRelativePath.IndexOf('/') + 1);
DynamicFileProvider.AddOrUpdate(
new InMemoryFileInfo(
"/wwwroot/" + bundleRelativePath, //TODO: get rid of wwwroot!
Encoding.UTF8.GetBytes(bundleResult.Content),
fileName
)
);
return RequestResources.TryAdd(await base.GetDynamicResourcesAsync(contributors));
}
public virtual bool IsBundlingEnabled()
public override bool IsBundlingEnabled()
{
switch (Options.Mode)
{
@ -188,7 +77,7 @@ public class BundleManager : IBundleManager, ITransientDependency
}
}
protected virtual bool IsMinficationEnabled()
protected override bool IsMinficationEnabled()
{
switch (Options.Mode)
{
@ -204,78 +93,8 @@ public class BundleManager : IBundleManager, ITransientDependency
}
}
protected async Task<List<BundleFile>> GetBundleFilesAsync(List<IBundleContributor> contributors)
{
var context = CreateBundleConfigurationContext();
foreach (var contributor in contributors)
{
await contributor.PreConfigureBundleAsync(context);
}
foreach (var contributor in contributors)
{
await contributor.ConfigureBundleAsync(context);
}
foreach (var contributor in contributors)
{
await contributor.PostConfigureBundleAsync(context);
}
return context.Files;
}
protected virtual async Task<List<BundleFile>> GetDynamicResourcesAsync(List<IBundleContributor> contributors)
{
var context = CreateBundleConfigurationContext();
foreach (var contributor in contributors)
{
await contributor.ConfigureDynamicResourcesAsync(context);
}
return context.Files;
}
protected virtual BundleConfigurationContext CreateBundleConfigurationContext()
{
return new BundleConfigurationContext(ServiceProvider, HostingEnvironment.WebRootFileProvider, Options.Parameters);
}
protected virtual List<IBundleContributor> GetContributors(BundleConfigurationCollection bundles, string bundleName)
{
var contributors = new List<IBundleContributor>();
AddContributorsWithBaseBundles(contributors, bundles, bundleName);
for (var i = 0; i < contributors.Count; ++i)
{
var extensions = ContributorOptions.Extensions(contributors[i].GetType()).GetAll();
if (extensions.Count > 0)
{
contributors.InsertRange(i + 1, extensions);
i += extensions.Count;
}
}
return contributors;
}
protected virtual void AddContributorsWithBaseBundles(List<IBundleContributor> contributors, BundleConfigurationCollection bundles, string bundleName)
protected override IFileProvider GetFileProvider()
{
var bundleConfiguration = bundles.Get(bundleName);
foreach (var baseBundleName in bundleConfiguration.BaseBundles)
{
AddContributorsWithBaseBundles(contributors, bundles, baseBundleName); //Recursive call
}
var selfContributors = bundleConfiguration.Contributors.GetAll();
if (selfContributors.Any())
{
contributors.AddRange(selfContributors);
}
return HostingEnvironment.WebRootFileProvider;
}
}
}

25
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/MvcUiBundlerBase.cs

@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.Minify;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;
public abstract class MvcUiBundlerBase : BundlerBase
{
protected IWebHostEnvironment WebHostingEnvironment { get; }
protected MvcUiBundlerBase(
IWebHostEnvironment webHostingEnvironment,
IMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions) : base(minifier, bundlingOptions)
{
WebHostingEnvironment = webHostingEnvironment;
}
protected override IFileInfo FindFileInfo(string file)
{
return WebHostingEnvironment.WebRootFileProvider.GetFileInfo(file);
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/IScriptBundler.cs

@ -1,6 +0,0 @@
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Scripts;
public interface IScriptBundler : IBundler
{
}

8
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/ScriptBundler.cs

@ -1,20 +1,22 @@
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Bundling.Scripts;
using Volo.Abp.Minify.Scripts;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Scripts;
public class ScriptBundler : BundlerBase, IScriptBundler
public class ScriptBundler : MvcUiBundlerBase, IScriptBundler
{
public override string FileExtension => "js";
public ScriptBundler(
IWebHostEnvironment hostEnvironment,
IWebHostEnvironment hostingEnvironment,
IJavascriptMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions)
: base(
hostEnvironment,
hostingEnvironment,
minifier,
bundlingOptions)
{

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/IStyleBundler.cs

@ -1,6 +0,0 @@
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles;
public interface IStyleBundler : IBundler
{
}

11
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs

@ -2,27 +2,28 @@ using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.VirtualFileSystem;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Bundling.Styles;
using Volo.Abp.Bundling.Styles;
using Volo.Abp.Minify.Styles;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles;
public class StyleBundler : BundlerBase, IStyleBundler
public class StyleBundler : MvcUiBundlerBase, IStyleBundler
{
private readonly IWebHostEnvironment _hostingEnvironment;
public override string FileExtension => "css";
public StyleBundler(
IWebHostEnvironment hostEnvironment,
IWebHostEnvironment hostingEnvironment,
ICssMinifier minifier,
IOptions<AbpBundlingOptions> bundlingOptions)
: base(
hostEnvironment,
hostingEnvironment,
minifier,
bundlingOptions)
{
_hostingEnvironment = hostEnvironment;
_hostingEnvironment = hostingEnvironment;
}
public string GetAbsolutePath(string relativePath)

1
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs

@ -10,6 +10,7 @@ using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers;

1
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers;

1
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs

@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Bundling;
using Volo.Abp.AspNetCore.Security;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers;

2
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor

@ -15,7 +15,7 @@
{
if (AbpAspNetCoreComponentsWebOptions.Value.IsBlazorWebApp)
{
Navigation.NavigateTo(AuthenticationOptions.Value.LogoutUrl, forceLoad: true);
Navigation.NavigateTo(AuthenticationOptions.Value.LoginUrl, forceLoad: true);
}
else
{

5
modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs

@ -79,11 +79,6 @@ public class CmsKitPublicWebModule : AbpModule
options.DisableModule(CmsKitPublicRemoteServiceConsts.ModuleName);
});
Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "CmsKit:";
});
if (GlobalFeatureManager.Instance.IsEnabled<PagesFeature>())
{
Configure<AbpEndpointRouterOptions>(options =>

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityErrorCodes.cs

@ -12,4 +12,6 @@ public static class IdentityErrorCodes
public const string CanNotChangeTwoFactor = "Volo.Abp.Identity:010008";
public const string YouCannotDelegateYourself = "Volo.Abp.Identity:010009";
public const string ClaimNameExist = "Volo.Abp.Identity:010021";
public const string CanNotUpdateStaticClaimType = "Volo.Abp.Identity:010022";
public const string CanNotDeleteStaticClaimType = "Volo.Abp.Identity:010023";
}

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "لا يجوز تغيير إعداد عاملين.",
"Volo.Abp.Identity:010009": "لا يمكنك تفويض نفسك.",
"Volo.Abp.Identity:010021": "الاسم {0} موجود بالفعل.",
"Volo.Abp.Identity:010022": "لا يمكن تحديث نوع المطابقة.",
"Volo.Abp.Identity:010023": "لا يمكن حذف نوع المطابقة.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "العدد الأقصى المسموح به لعضوية الوحدة التنظيمية للمستخدم",
"ThisUserIsNotActiveMessage": "هذا المستخدم غير نشط.",
"Permission:IdentityManagement": "إدارة الهوية",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Není povoleno měnit nastavení dvou faktorů.",
"Volo.Abp.Identity:010009": "Nemůžete delegovat své vlastní oprávnění.",
"Volo.Abp.Identity:010021": "Název '{0}' již existuje.",
"Volo.Abp.Identity:010022": "Nelze aktualizovat statický typ deklarace.",
"Volo.Abp.Identity:010023": "Nelze smazat statický typ deklarace.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maximální povolený počet členů organizační jednotky pro uživatele",
"ThisUserIsNotActiveMessage": "Tento uživatel není aktivní.",
"Permission:IdentityManagement": "Správa identit",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Die Zwei-Faktor-Einstellung dürfen nicht geändert werden.",
"Volo.Abp.Identity:010009": "Sie können sich nicht selbst delegieren.",
"Volo.Abp.Identity:010021": "Der Name existiert bereits {0}",
"Volo.Abp.Identity:010022": "Der Name kann nicht aktualisiert werden.",
"Volo.Abp.Identity:010023": "Der Name kann nicht gelöscht werden.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maximal zulässige Anzahl an Mitgliedschaften in Organisationseinheiten für einen Benutzer",
"ThisUserIsNotActiveMessage": "Dieser Benutzer ist nicht aktiv.",
"Permission:IdentityManagement": "Identitätsverwaltung",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json

@ -76,6 +76,8 @@
"Volo.Abp.Identity:010008": "Δεν επιτρέπεται η αλλαγή της ρύθμισης δύο παραγόντων.",
"Volo.Abp.Identity:010009": "Δεν μπορείτε να αναθέσετε την εξουσιοδότησή σας σε εσάς ίδιο.",
"Volo.Abp.Identity:010021": "Το όνομα '{0}' υπάρχει ήδη.",
"Volo.Abp.Identity:010022": "Δεν μπορείτε να ενημερώσετε ένα στατικό τύπο δήλωσης.",
"Volo.Abp.Identity:010023": "Δεν μπορείτε να διαγράψετε ένα στατικό τύπο δήλωσης.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Μέγιστος επιτρεπόμενος αριθμός μελών μονάδας οργανισμού για έναν χρήστη",
"ThisUserIsNotActiveMessage": "Αυτός ο χρήστης δεν είναι ενεργός.",
"Permission:IdentityManagement": "Διαχείριση ταυτότητας",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json

@ -76,6 +76,8 @@
"Volo.Abp.Identity:010008": "Changing the two factor setting is not allowed.",
"Volo.Abp.Identity:010009": "You cannot delegate yourself!",
"Volo.Abp.Identity:010021": "Name exist: '{0}'",
"Volo.Abp.Identity:010022": "Can not update a static ClaimType.",
"Volo.Abp.Identity:010023": "Can not delete a static ClaimType.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maximum allowed organisation unit membership count for a user",
"Permission:IdentityManagement": "Identity management",
"Permission:RoleManagement": "Role management",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "It's not allowed to change two factor setting.",
"Volo.Abp.Identity:010009": "You can not delegate yourself.",
"Volo.Abp.Identity:010021": "Name exist: '{0}'.",
"Volo.Abp.Identity:010022": "Can not update a static ClaimType.",
"Volo.Abp.Identity:010023": "Can not delete a static ClaimType.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maximum allowed organization unit membership count for a user",
"ThisUserIsNotActiveMessage": "This user is not active.",
"Permission:IdentityManagement": "Identity management",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "No está permitido cambiar la configuración de autenticación de dos pasos.",
"Volo.Abp.Identity:010009": "No puedes delegar tu propia cuenta!",
"Volo.Abp.Identity:010021": "Ya existe un con el nombre '{0}'",
"Volo.Abp.Identity:010022": "No se puede actualizar un tipo de reclamación estática.",
"Volo.Abp.Identity:010023": "No se puede borrar un tipo de reclamación estática.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Número máximo de unidades organizativas por usuario",
"ThisUserIsNotActiveMessage": "Este usuario no está activo.",
"Permission:IdentityManagement": "Gestión de identidades",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "تغییر دادن تنظیمات دو مرحله ای مجاز نمی باشد.",
"Volo.Abp.Identity:010009": "شما نمی توانید خودتان را معرفی کنید.",
"Volo.Abp.Identity:010021": "نام {0} قبلاً استفاده گردیده است.",
"Volo.Abp.Identity:010022": "نمی توان نام نقش/وظیفه را تغییر داد.",
"Volo.Abp.Identity:010023": "نمی توان نقش/وظیفه را حذف کرد.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "حداکثر تعداد مجاز عضویت در یک واحد سازمان برای یک کاربر",
"ThisUserIsNotActiveMessage": "این کاربر غیرفعال میباشد.",
"Permission:IdentityManagement": "مدیریت هویت",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Kahden tekijän asetusta ei saa muuttaa.",
"Volo.Abp.Identity:010009": "Et voi delegoida itseäsi.",
"Volo.Abp.Identity:010021": "{0} on jo olemassa.",
"Volo.Abp.Identity:010022": "Staattista väittämätunnusta ei voi päivittää.",
"Volo.Abp.Identity:010023": "Staattista väittämätunnusta ei voi poistaa.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Suurin sallittu organisaatioyksikön jäsenmäärä käyttäjälle",
"ThisUserIsNotActiveMessage": "Tämä käyttäjä ei ole aktiivinen.",
"Permission:IdentityManagement": "Identiteetin hallinta",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Il n’est pas permis de changer deux facteurs de réglage.",
"Volo.Abp.Identity:010009": "Vous ne pouvez pas vous déléguer vous-même.",
"Volo.Abp.Identity:010021" : "Le nom '{0}' existe déjà.",
"Volo.Abp.Identity:010022": "Vous ne pouvez pas modifier un type de revendication statique.",
"Volo.Abp.Identity:010023": "Vous ne pouvez pas supprimer un type de revendication statique.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Nombre maximal d’adhésions autorisées à l’unité d’organisation pour un utilisateur",
"ThisUserIsNotActiveMessage": "Cet utilisateur n'est pas actif.",
"Permission:IdentityManagement": "Gestion de l’identité",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "इसे दो कारक सेटिंग बदलने की अनुमति नहीं है।",
"Volo.Abp.Identity:010009": "आप अपने आप को अधिकृत नहीं कर सकते हैं!",
"Volo.Abp.Identity:010021" : "नाम '{0}' पहले से ही लिया गया है।",
"Volo.Abp.Identity:010022": "स्थैतिक भूमिकाओं का नाम नहीं बदला जा सकता है।",
"Volo.Abp.Identity:010023": "स्थैतिक भूमिकाओं को हटाया नहीं जा सकता।",
"Identity.OrganizationUnit.MaxUserMembershipCount": "उपयोगकर्ता के लिए अधिकतम अनुमत संगठन इकाई सदस्यता गणना",
"ThisUserIsNotActiveMessage": "यह उपयोगकर्ता सक्रिय नहीं है।",
"Permission:IdentityManagement": "पहचान प्रबंधन",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Ne možete promijeniti postavku dva faktora.",
"Volo.Abp.Identity:010008": "Nije dopušteno mijenjati postavke dvofaktorske autentifikacije.",
"Volo.Abp.Identity:010009": "Ne možete delegirati sami sebi.",
"Volo.Abp.Identity:010021" : "Naziv '{0}' već postoji.",
"Volo.Abp.Identity:010021": "Naziv '{0}' već postoji.",
"Volo.Abp.Identity:010022": "Ne možete ažurirati statički tip deklaracije.",
"Volo.Abp.Identity:010023": "Ne možete izbrisati statički tip deklaracije.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maksimalni dopušteni broj članstva u organizacijskoj jedinici za korisnika",
"ThisUserIsNotActiveMessage": "Ovaj korisnik nije aktivan.",
"Permission:IdentityManagement": "Upravljanje identitetom",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Nem változtathatja meg a kétlépcsős bejelentkezés beállítását.",
"Volo.Abp.Identity:010008": "Kétlépcsős bejelentkezés beállítás megváltoztatása nem megengedett.",
"Volo.Abp.Identity:010009": "Nem adhatja át a saját jogosultságait.",
"Volo.Abp.Identity:010021" : "'{0}' nevű már létezik.",
"Volo.Abp.Identity:010021": "'{0}' nevű már létezik.",
"Volo.Abp.Identity:010022": "Nem lehet frissíteni a statikus jogosultság típusát.",
"Volo.Abp.Identity:010023": "Nem lehet törölni a statikus jogosultság típusát.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "A maximálisan megengedett szervezeti egység tagsági szám egy felhasználó számára",
"ThisUserIsNotActiveMessage": "Ez a felhasználó nem aktív.",
"Permission:IdentityManagement": "Identitáskezelés",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Þú getur ekki breytt tveggja þátta stillingu þinni.",
"Volo.Abp.Identity:010008": "Það er ekki leyfilegt að breyta tvíþátta stillingu.",
"Volo.Abp.Identity:010009": "Þú getur ekki delegað þér sjálfum.",
"Volo.Abp.Identity:010021" : "Nafnið '{0}' er þegar í notkun.",
"Volo.Abp.Identity:010021": "Nafnið '{0}' er þegar í notkun.",
"Volo.Abp.Identity:010022": "Ekki er hægt að breyta static hlutverk.",
"Volo.Abp.Identity:010023": "Ekki er hægt að eyða static hlutverkum.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Hámarks leyfileg fjöldi aðildar að skipulagseiningu fyrir notanda",
"ThisUserIsNotActiveMessage": "Þessi notandi er ekki virkur.",
"Permission:IdentityManagement": "Auðkenninga umsjón",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Non puoi modificare l'impostazione dei due fattori.",
"Volo.Abp.Identity:010008": "Non è consentito modificare l'impostazione a due fattori.",
"Volo.Abp.Identity:010009": "Non puoi delegare te stesso.",
"Volo.Abp.Identity:010021" : "Il nome '{0}' è già in uso.",
"Volo.Abp.Identity:010021": "Il nome '{0}' è già in uso.",
"Volo.Abp.Identity:010022": "Non puoi modificare il tipo di richiesta statica.",
"Volo.Abp.Identity:010023": "Non puoi eliminare il tipo di richiesta statica.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Numero massimo consentito di membri dell'unità organizzativa per un utente",
"ThisUserIsNotActiveMessage": "Questo utente non è attivo.",
"Permission:IdentityManagement": "Gestione identità",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "U kunt uw instelling voor tweefactor authenticatie niet wijzigen.",
"Volo.Abp.Identity:010008": "Het is niet toegestaan om de instelling van tweefactor authenticatie te wijzigen.",
"Volo.Abp.Identity:010009": "U kunt uzelf niet delegeren.",
"Volo.Abp.Identity:010021" : "Er bestaat al een met de naam '{0}'.",
"Volo.Abp.Identity:010021": "Er bestaat al een met de naam '{0}'.",
"Volo.Abp.Identity:010022": "Kan de naam van een statische claim niet wijzigen.",
"Volo.Abp.Identity:010023": "Kan de naam van een statische claim niet verwijderen.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maximaal toegestande aantal lidmaatschappen van organisatie-eenheden voor een gebruiker",
"ThisUserIsNotActiveMessage": "Deze gebruiker is niet actief.",
"Permission:IdentityManagement": "Identiteitsbeheer",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Nie możesz zmienić ustawienia dwóch czynników.",
"Volo.Abp.Identity:010008": "Nie wolno zmieniać ustawienia dwuczynnikowego.",
"Volo.Abp.Identity:010009": "Nie możesz delegować swoich uprawnień.",
"Volo.Abp.Identity:010021" : "Nazwa '{0}' już istnieje.",
"Volo.Abp.Identity:010021": "Nazwa '{0}' już istnieje.",
"Volo.Abp.Identity:010022": "Nie można zmienić typu statycznej deklaracji.",
"Volo.Abp.Identity:010023": "Nie można usunąć typu statycznej deklaracji.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maksymalna dozwolona liczba członków jednostki organizacyjnej dla użytkownika",
"ThisUserIsNotActiveMessage": "Ten użytkownik nie jest aktywny.",
"Permission:IdentityManagement": "Zarządzanie tożsamością",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Você não pode alterar sua configuração de dois fatores.",
"Volo.Abp.Identity:010008": "Não é permitido alterar a configuração de dois fatores.",
"Volo.Abp.Identity:010009": "Você não pode delegar a si mesmo.",
"Volo.Abp.Identity:010021" : "Já existe um(a) {0} com o nome.",
"Volo.Abp.Identity:010021": "Já existe um(a) {0} com o nome.",
"Volo.Abp.Identity:010022": "Não é possível alterar o tipo de declaração estática.",
"Volo.Abp.Identity:010023": "Não é possível excluir o tipo de declaração estática.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Contagem máxima permitida de membros da unidade organizacional para um usuário",
"ThisUserIsNotActiveMessage": "Este usuário não está ativo.",
"Permission:IdentityManagement": "Acessos",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Nu vă puteţi schimba setările de autentificare în doi paşi.",
"Volo.Abp.Identity:010008": "Nu este permisă modificarea setărilor autentificării în doi paşi.",
"Volo.Abp.Identity:010009": "Nu vă puteţi delega singur.",
"Volo.Abp.Identity:010021" : "Numele '{0}' este deja luat.",
"Volo.Abp.Identity:010021": "Numele '{0}' este deja luat.",
"Volo.Abp.Identity:010022": "Nu poate fi schimbată tipul de declaraţie statică.",
"Volo.Abp.Identity:010023": "Nu poate fi ştersă declaraţia statică.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Numărul maxim de unităţi organizaţionale permise pentru un utilizator",
"ThisUserIsNotActiveMessage": "Acest utilizator nu este activ.",
"Permission:IdentityManagement": "Administrare identităţii",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Вы не можете изменить настройку двух факторов.",
"Volo.Abp.Identity:010008": "Изменение двухфакторной настройки не допускается.",
"Volo.Abp.Identity:010009": "Вы не можете делегировать свои собственные права.",
"Volo.Abp.Identity:010021" : "Имя '{0}' уже существует.",
"Volo.Abp.Identity:010021": "Имя '{0}' уже существует.",
"Volo.Abp.Identity:010022": "Невозможно изменить тип статической декларации.",
"Volo.Abp.Identity:010023": "Невозможно удалить тип статической декларации.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Максимально допустимое количество членов организационного подразделения для пользователя",
"ThisUserIsNotActiveMessage": "Этот пользователь не активен.",
"Permission:IdentityManagement": "Управление идентификацией",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "Dvojfaktorové nastavenie nie je možné zmeniť.",
"Volo.Abp.Identity:010008": "Dvojfaktorové nastavenie nie je povolené zmeniť.",
"Volo.Abp.Identity:010009": "Nemôžete delegovať svoje vlastné oprávnenia.",
"Volo.Abp.Identity:010021" : "Názov '{0}' sa už používa.",
"Volo.Abp.Identity:010021": "Názov '{0}' sa už používa.",
"Volo.Abp.Identity:010022": "Nie je možné zmeniť typ statického oprávnenia.",
"Volo.Abp.Identity:010023": "Nie je možné odstrániť typ statického oprávnenia.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Maximálny povolený počet členov organizačnej jednotky pre používateľa",
"ThisUserIsNotActiveMessage": "Tento používateľ nie je aktívny.",
"Permission:IdentityManagement": "Správa identít",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Ni dovoljeno spreminjati nastavitve dveh faktorjev.",
"Volo.Abp.Identity:010009": "Ne morete delegirati svojih pravic.",
"Volo.Abp.Identity:010021" : "Naziv '{0}' že obstaja.",
"Volo.Abp.Identity:010022": "Ne morete spremeniti tipa statične deklaracije.",
"Volo.Abp.Identity:010023": "Ne morete izbrisati tipa statične deklaracije.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Največje dovoljeno število članov v organizacijski enoti za uporabnika",
"ThisUserIsNotActiveMessage": "Ta uporabnik ni aktiven.",
"Permission:IdentityManagement": "Upravljanje identitet",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sv.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Det är inte tillåtet att ändra inställningen för två faktorer.",
"Volo.Abp.Identity:010009": "Du kan inte delegera dig själv.",
"Volo.Abp.Identity:010021": "Namn finns: '{0}'.",
"Volo.Abp.Identity:010022": "Kan inte ändra statiskt område.",
"Volo.Abp.Identity:010023": "Kan inte ta bort statiskt område.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Högsta tillåtna antal medlemskap i organisationsenheter för en användare",
"ThisUserIsNotActiveMessage": "Den här användaren är inte aktiv.",
"Permission:IdentityManagement": "Identitetshantering",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "İki faktörlü ayarınızı değiştiremezsiniz.",
"Volo.Abp.Identity:010008": "İki faktörlü ayarın değiştirilmesine izin verilmez.",
"Volo.Abp.Identity:010009": "Kendinizi yetkilendiremezsiniz.",
"Volo.Abp.Identity:010021" : "{0} isminde bir birim zaten var.",
"Volo.Abp.Identity:010021": "{0} isminde bir birim zaten var.",
"Volo.Abp.Identity:010022": "Bir statik izin tipi değiştirilemez.",
"Volo.Abp.Identity:010023": "Bir statik izin tipi silinemez.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Bir kullanıcı için izin verilen en fazla organizasyon birimi sayısı",
"ThisUserIsNotActiveMessage": "Bu kullanıcı aktif değil.",
"Permission:IdentityManagement": "Kimlik yönetimi",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "Không được phép thay đổi cài đặt hai yếu tố.",
"Volo.Abp.Identity:010009": "Bạn không thể ủy quyền cho chính mình.",
"Volo.Abp.Identity:010021": "Tên '{0}' đã tồn tại.",
"Volo.Abp.Identity:010022": "Không thể thay đổi kiểu của phát biểu tĩnh.",
"Volo.Abp.Identity:010023": "Không thể xóa phát biểu tĩnh.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "Số lượng thành viên đơn vị tổ chức tối đa được phép cho một người dùng",
"ThisUserIsNotActiveMessage": "Người dùng này không hoạt động.",
"Permission:IdentityManagement": "Quản lý danh tính",

2
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json

@ -77,6 +77,8 @@
"Volo.Abp.Identity:010008": "不允许修改双因素身份验证设置。",
"Volo.Abp.Identity:010009": "你不能委托给自己。",
"Volo.Abp.Identity:010021": "名称:'{0}' 已存在",
"Volo.Abp.Identity:010022": "不能更改静态声明的类型。",
"Volo.Abp.Identity:010023": "不能删除静态声明的类型。",
"Identity.OrganizationUnit.MaxUserMembershipCount": "组织单位最大允许的成员资格计数",
"ThisUserIsNotActiveMessage": "该用户不可用。",
"Permission:IdentityManagement": "身份标识管理",

4
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json

@ -76,7 +76,9 @@
"Volo.Abp.Identity:010007": "你不能修改你的雙因素身份驗證設置",
"Volo.Abp.Identity:010008": "不允許修改雙因素身份驗證設置.",
"Volo.Abp.Identity:010009": "你不能委派給自己",
"Volo.Abp.Identity:010021" : "名稱 '{0}' 已存在.",
"Volo.Abp.Identity:010021": "名稱 '{0}' 已存在.",
"Volo.Abp.Identity:010022": "無法更改靜態宣告的類型.",
"Volo.Abp.Identity:010023": "無法刪除靜態宣告的類型.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "允許一個使用者至多可隸屬在幾個組織單位",
"ThisUserIsNotActiveMessage": "該用戶不可用.",
"Permission:IdentityManagement": "身份識別管理",

6
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs

@ -35,12 +35,12 @@ public class IdentityClaimTypeManager : DomainService
{
if (await IdentityClaimTypeRepository.AnyAsync(claimType.Name, claimType.Id))
{
throw new AbpException($"Name Exist: {claimType.Name}");
throw new BusinessException(IdentityErrorCodes.ClaimNameExist).WithData("0", claimType.Name);
}
if (claimType.IsStatic)
{
throw new AbpException($"Can not update a static ClaimType.");
throw new BusinessException(IdentityErrorCodes.CanNotUpdateStaticClaimType);
}
return await IdentityClaimTypeRepository.UpdateAsync(claimType);
@ -51,7 +51,7 @@ public class IdentityClaimTypeManager : DomainService
var claimType = await IdentityClaimTypeRepository.GetAsync(id);
if (claimType.IsStatic)
{
throw new AbpException($"Can not delete a static ClaimType.");
throw new BusinessException(IdentityErrorCodes.CanNotDeleteStaticClaimType);
}
//Remove claim of this type from all users and roles

4
modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs

@ -53,7 +53,7 @@ public class IdentityClaimTypeManager_Tests : AbpIdentityDomainTestBase
[Fact]
public async Task Update_Name_Exist_Should_Exception()
{
await Assert.ThrowsAnyAsync<AbpException>(async () => await _claimTypeManager.UpdateAsync(
await Assert.ThrowsAnyAsync<BusinessException>(async () => await _claimTypeManager.UpdateAsync(
new IdentityClaimType(
Guid.NewGuid(), "Age")));
}
@ -65,6 +65,6 @@ public class IdentityClaimTypeManager_Tests : AbpIdentityDomainTestBase
var phoneClaim = new IdentityClaimType(Guid.NewGuid(), "Phone", true, true);
await _identityClaimTypeRepository.InsertAsync(phoneClaim);
await Assert.ThrowsAnyAsync<AbpException>(async () => await _claimTypeManager.UpdateAsync(phoneClaim));
await Assert.ThrowsAnyAsync<BusinessException>(async () => await _claimTypeManager.UpdateAsync(phoneClaim));
}
}

2
nupkg/common.ps1

@ -99,6 +99,7 @@ $projects = (
"framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect",
"framework/src/Volo.Abp.AspNetCore.Abstractions",
"framework/src/Volo.Abp.AspNetCore",
"framework/src/Volo.Abp.AspNetCore.Bundling",
"framework/src/Volo.Abp.AspNetCore.Mvc.Dapr",
"framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus",
"framework/src/Volo.Abp.AspNetCore.Components",
@ -111,6 +112,7 @@ $projects = (
"framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling",
"framework/src/Volo.Abp.AspNetCore.Components.Server",
"framework/src/Volo.Abp.AspNetCore.Components.Server.Theming",
"framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling",
"framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming",
"framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling",
"framework/src/Volo.Abp.AspNetCore.MultiTenancy",

Loading…
Cancel
Save