Browse Source

Merge branch 'dev' into IsChangeTrackingEnabled

pull/17491/head
maliming 3 years ago
committed by GitHub
parent
commit
0f7910a57d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Directory.Build.props
  2. 2
      docs/en/Modules/Cms-Kit/Index.md
  3. 8
      framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj
  4. 4
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs
  5. 2
      framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj
  6. 27
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs
  7. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj
  8. 22
      framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs
  9. 53
      framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs
  10. 4
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/DatabaseBlob.cs
  11. 4
      modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/DatabaseBlobContainer.cs
  12. 4
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Blog.cs
  13. 4
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs
  14. 4
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs
  15. 5
      modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs
  16. 9
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
  17. 3
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs
  18. 6
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml
  19. 5
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs
  20. 32
      npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts
  21. 43
      npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts
  22. 6
      npm/ng-packs/packages/theme-shared/src/lib/models/common.ts
  23. 48
      npm/ng-packs/packages/theme-shared/src/lib/services/create-error-component.service.ts
  24. 29
      npm/ng-packs/packages/theme-shared/src/lib/services/router-error-handler.service.ts
  25. 88
      npm/ng-packs/packages/theme-shared/src/lib/services/status-code-error-handler.service.ts
  26. 6
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj
  27. 6
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj
  28. 8
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyCompanyName.MyProjectName.Blazor.WebAssembly.Client.csproj
  29. 5664
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/wwwroot/global.css
  30. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/wwwroot/global.js
  31. 4
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/wwwroot/index.html
  32. 4
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo.csproj
  33. 6
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.csproj
  34. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Shared/MyCompanyName.MyProjectName.Blazor.WebAssembly.Shared.csproj
  35. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj
  36. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj
  37. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj
  38. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj
  39. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj
  40. 6
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj
  41. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj
  42. 8
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj
  43. 5664
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css
  44. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.js
  45. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html
  46. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj
  47. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj
  48. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj
  49. 2
      templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj
  50. 2
      templates/maui/src/MyCompanyName.MyProjectName/MyCompanyName.MyProjectName.csproj
  51. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj
  52. 8
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj
  53. 5664
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/global.css
  54. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html
  55. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj
  56. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj
  57. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj
  58. 2
      templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj
  59. 2
      templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj
  60. 2
      templates/module/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj

4
Directory.Build.props

@ -2,10 +2,10 @@
<PropertyGroup> <PropertyGroup>
<!-- All Microsoft AspNetCore packages --> <!-- All Microsoft AspNetCore packages -->
<MicrosoftAspNetCorePackageVersion>7.0.0</MicrosoftAspNetCorePackageVersion> <MicrosoftAspNetCorePackageVersion>7.0.10</MicrosoftAspNetCorePackageVersion>
<!-- All Microsoft EntityFrameworkCore packages --> <!-- All Microsoft EntityFrameworkCore packages -->
<MicrosoftEntityFrameworkCorePackageVersion>7.0.1</MicrosoftEntityFrameworkCorePackageVersion> <MicrosoftEntityFrameworkCorePackageVersion>7.0.10</MicrosoftEntityFrameworkCorePackageVersion>
<!-- All Microsoft packages --> <!-- All Microsoft packages -->
<MicrosoftPackageVersion>7.0.0</MicrosoftPackageVersion> <MicrosoftPackageVersion>7.0.0</MicrosoftPackageVersion>

2
docs/en/Modules/Cms-Kit/Index.md

@ -33,7 +33,7 @@ All features are individually usable. If you disable a feature, it completely di
[ABP CLI](../../CLI.md) allows installing a module to a solution using the `add-module` command. You can install the CMS Kit module in a command-line terminal with the following command: [ABP CLI](../../CLI.md) allows installing a module to a solution using the `add-module` command. You can install the CMS Kit module in a command-line terminal with the following command:
```bash ```bash
abp add-module Volo.CmsKit abp add-module Volo.CmsKit --skip-db-migrations
``` ```
> By default, Cms-Kit is disabled by `GlobalFeature`. Because of that the initial migration will be empty. So you can skip the migration by adding `--skip-db-migrations` to command when installing if you are using Entity Framework Core. After enabling Cms-Kit global feture, please add new migration. > By default, Cms-Kit is disabled by `GlobalFeature`. Because of that the initial migration will be empty. So you can skip the migration by adding `--skip-db-migrations` to command when installing if you are using Entity Framework Core. After enabling Cms-Kit global feture, please add new migration.

8
framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj

@ -16,10 +16,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise" Version="1.2.3" /> <PackageReference Include="Blazorise" Version="1.3.1" />
<PackageReference Include="Blazorise.DataGrid" Version="1.2.3" /> <PackageReference Include="Blazorise.DataGrid" Version="1.3.1" />
<PackageReference Include="Blazorise.Snackbar" Version="1.2.3" /> <PackageReference Include="Blazorise.Snackbar" Version="1.3.1" />
<PackageReference Include="Blazorise.Components" Version="1.2.3" /> <PackageReference Include="Blazorise.Components" Version="1.3.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

4
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs

@ -187,7 +187,9 @@ public abstract class AppTemplateBase : TemplateInfo
} }
else else
{ {
if (context.BuildArgs.ExtraProperties.ContainsKey(NewCommand.Options.Tiered.Long) || context.BuildArgs.ExtraProperties.ContainsKey("separate-identity-server")) if (context.BuildArgs.ExtraProperties.ContainsKey(NewCommand.Options.Tiered.Long) ||
context.BuildArgs.ExtraProperties.ContainsKey("separate-identity-server") ||
context.BuildArgs.ExtraProperties.ContainsKey("separate-auth-server"))
{ {
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web.Public")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web.Public"));
} }

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

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.10" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" /> <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
</ItemGroup> </ItemGroup>

27
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs

@ -127,6 +127,11 @@ public class EfCoreRepository<TDbContext, TEntity> : RepositoryBase<TEntity>, IE
{ {
CheckChangeTracking(); CheckChangeTracking();
var entityArray = entities.ToArray(); var entityArray = entities.ToArray();
if (entityArray.IsNullOrEmpty())
{
return;
}
var dbContext = await GetDbContextAsync(); var dbContext = await GetDbContextAsync();
cancellationToken = GetCancellationToken(cancellationToken); cancellationToken = GetCancellationToken(cancellationToken);
@ -173,14 +178,21 @@ public class EfCoreRepository<TDbContext, TEntity> : RepositoryBase<TEntity>, IE
public async override Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) public async override Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{ {
var entityArray = entities.ToArray();
if (entityArray.IsNullOrEmpty())
{
return;
}
CheckChangeTracking(); CheckChangeTracking();
cancellationToken = GetCancellationToken(cancellationToken); cancellationToken = GetCancellationToken(cancellationToken);
if (BulkOperationProvider != null) if (BulkOperationProvider != null)
{ {
await BulkOperationProvider.UpdateManyAsync<TDbContext, TEntity>( await BulkOperationProvider.UpdateManyAsync<TDbContext, TEntity>(
this, this,
entities, entityArray,
autoSave, autoSave,
GetCancellationToken(cancellationToken) GetCancellationToken(cancellationToken)
); );
@ -190,7 +202,7 @@ public class EfCoreRepository<TDbContext, TEntity> : RepositoryBase<TEntity>, IE
var dbContext = await GetDbContextAsync(); var dbContext = await GetDbContextAsync();
dbContext.Set<TEntity>().UpdateRange(entities); dbContext.Set<TEntity>().UpdateRange(entityArray);
if (autoSave) if (autoSave)
{ {
@ -213,14 +225,21 @@ public class EfCoreRepository<TDbContext, TEntity> : RepositoryBase<TEntity>, IE
public async override Task DeleteManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) public async override Task DeleteManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{ {
var entityArray = entities.ToArray();
if (entityArray.IsNullOrEmpty())
{
return;
}
CheckChangeTracking(); CheckChangeTracking();
cancellationToken = GetCancellationToken(cancellationToken); cancellationToken = GetCancellationToken(cancellationToken);
if (BulkOperationProvider != null) if (BulkOperationProvider != null)
{ {
await BulkOperationProvider.DeleteManyAsync<TDbContext, TEntity>( await BulkOperationProvider.DeleteManyAsync<TDbContext, TEntity>(
this, this,
entities, entityArray,
autoSave, autoSave,
cancellationToken cancellationToken
); );
@ -230,7 +249,7 @@ public class EfCoreRepository<TDbContext, TEntity> : RepositoryBase<TEntity>, IE
var dbContext = await GetDbContextAsync(); var dbContext = await GetDbContextAsync();
dbContext.RemoveRange(entities); dbContext.RemoveRange(entityArray.Select(x => x));
if (autoSave) if (autoSave)
{ {

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj

@ -20,7 +20,7 @@
<ProjectReference Include="..\Volo.Abp.Json.Abstractions\Volo.Abp.Json.Abstractions.csproj" /> <ProjectReference Include="..\Volo.Abp.Json.Abstractions\Volo.Abp.Json.Abstractions.csproj" />
<ProjectReference Include="..\Volo.Abp.Timing\Volo.Abp.Timing.csproj" /> <ProjectReference Include="..\Volo.Abp.Timing\Volo.Abp.Timing.csproj" />
<ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" /> <ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" />
<PackageReference Include="System.Text.Json" Version="$(MicrosoftAspNetCorePackageVersion)" /> <PackageReference Include="System.Text.Json" Version="$(MicrosoftPackageVersion)" />
</ItemGroup> </ItemGroup>
</Project> </Project>

22
framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs

@ -138,9 +138,13 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
public async override Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) public async override Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{ {
cancellationToken = GetCancellationToken(cancellationToken);
var entityArray = entities.ToArray(); var entityArray = entities.ToArray();
if (entityArray.IsNullOrEmpty())
{
return;
}
cancellationToken = GetCancellationToken(cancellationToken);
foreach (var entity in entityArray) foreach (var entity in entityArray)
{ {
@ -228,6 +232,10 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
public async override Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) public async override Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{ {
var entityArray = entities.ToArray(); var entityArray = entities.ToArray();
if (entityArray.IsNullOrEmpty())
{
return;
}
foreach (var entity in entityArray) foreach (var entity in entityArray)
{ {
@ -358,12 +366,18 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
bool autoSave = false, bool autoSave = false,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
{ {
var entityArray = entities.ToArray();
if (entityArray.IsNullOrEmpty())
{
return;
}
cancellationToken = GetCancellationToken(cancellationToken); cancellationToken = GetCancellationToken(cancellationToken);
var softDeletedEntities = new Dictionary<TEntity, string>(); var softDeletedEntities = new Dictionary<TEntity, string>();
var hardDeletedEntities = new List<TEntity>(); var hardDeletedEntities = new List<TEntity>();
foreach (var entity in entities) foreach (var entity in entityArray)
{ {
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity)) if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity))
{ {
@ -383,7 +397,7 @@ public class MongoDbRepository<TMongoDbContext, TEntity>
if (BulkOperationProvider != null) if (BulkOperationProvider != null)
{ {
await BulkOperationProvider.DeleteManyAsync(this, entities, dbContext.SessionHandle, autoSave, cancellationToken); await BulkOperationProvider.DeleteManyAsync(this, entityArray, dbContext.SessionHandle, autoSave, cancellationToken);
return; return;
} }

53
framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleDocumentFilter.cs

@ -13,7 +13,7 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter
protected virtual string[] ActionUrlPrefixes { get; set; } = new[] { "Volo." }; protected virtual string[] ActionUrlPrefixes { get; set; } = new[] { "Volo." };
protected virtual string RegexConstraintPattern => @":regex\(([^()]*)\)"; protected virtual string RegexConstraintPattern => @":regex\(([^()]*)\)";
public virtual void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) public virtual void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
{ {
var actionUrls = context.ApiDescriptions var actionUrls = context.ApiDescriptions
@ -28,29 +28,8 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter
swaggerDoc swaggerDoc
.Paths .Paths
.RemoveAll(path => !actionUrls.Contains(path.Key)); .RemoveAll(path => !actionUrls.Contains(path.Key));
var actionSchemas = new HashSet<string>();
actionSchemas.UnionWith(swaggerDoc.Paths.Select(path => new { path = path.Value, schemas = swaggerDoc.Components.Schemas }).SelectMany(x => GetSchemaIdList(x.path, x.schemas)));
swaggerDoc.Components.Schemas.RemoveAll(schema => !actionSchemas.Contains(schema.Key));
} }
protected virtual HashSet<string> GetSchemaIdList(OpenApiPathItem pathItem, IDictionary<string, OpenApiSchema> schemas)
{
var selectedSchemas = new HashSet<OpenApiSchema>();
var schemaIds = new HashSet<string>();
selectedSchemas.UnionWith(pathItem.Parameters.Select(parameter => parameter.Schema));
selectedSchemas.UnionWith(pathItem.Parameters.SelectMany(parameter => parameter.Content.Select(x => x.Value.Schema)));
selectedSchemas.UnionWith(pathItem.Operations.Values.SelectMany(c => c.Responses.SelectMany(x => x.Value.Content.Values.Select(x => x.Schema))));
selectedSchemas.UnionWith(pathItem.Operations.Values.SelectMany(c => c.Parameters.Select(x => x.Schema)));
foreach (var schema in selectedSchemas)
{
schemaIds.UnionWith(MakeListSchemaId(schema, schemas));
}
return schemaIds;
}
protected virtual string? RemoveRouteParameterConstraints(ActionDescriptor actionDescriptor) protected virtual string? RemoveRouteParameterConstraints(ActionDescriptor actionDescriptor)
{ {
var route = actionDescriptor.AttributeRouteInfo?.Template?.EnsureStartsWith('/').Replace("?", ""); var route = actionDescriptor.AttributeRouteInfo?.Template?.EnsureStartsWith('/').Replace("?", "");
@ -70,34 +49,10 @@ public class AbpSwashbuckleDocumentFilter : IDocumentFilter
{ {
break; break;
} }
route = route.Remove(startIndex, endIndex - startIndex); route = route.Remove(startIndex, (endIndex - startIndex));
} }
return route; return route;
} }
}
private HashSet<string> MakeListSchemaId(OpenApiSchema schema, IDictionary<string, OpenApiSchema> contextSchemas)
{
var schemasId = new HashSet<string>();
if (schema != null)
{
if (schema.Reference != null)
{
schemasId.Add(schema.Reference.Id);
foreach (var sc in contextSchemas.Where(x => x.Key == schema.Reference.Id).Select(x => x.Value))
{
foreach (var property in sc.Properties.Values)
{
schemasId.UnionWith(MakeListSchemaId(property, contextSchemas));
}
}
}
if (schema.Items != null)
{
schemasId.UnionWith(MakeListSchemaId(schema.Items, contextSchemas));
}
}
return schemasId;
}
}

4
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/DatabaseBlob.cs

@ -17,6 +17,10 @@ public class DatabaseBlob : AggregateRoot<Guid>, IMultiTenant
[DisableAuditing] [DisableAuditing]
public virtual byte[] Content { get; protected set; } public virtual byte[] Content { get; protected set; }
protected DatabaseBlob()
{
}
public DatabaseBlob(Guid id, Guid containerId, [NotNull] string name, [NotNull] byte[] content, Guid? tenantId = null) public DatabaseBlob(Guid id, Guid containerId, [NotNull] string name, [NotNull] byte[] content, Guid? tenantId = null)
: base(id) : base(id)
{ {

4
modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo/Abp/BlobStoring/Database/DatabaseBlobContainer.cs

@ -11,6 +11,10 @@ public class DatabaseBlobContainer : AggregateRoot<Guid>, IMultiTenant
public virtual string Name { get; protected set; } public virtual string Name { get; protected set; }
protected DatabaseBlobContainer()
{
}
public DatabaseBlobContainer(Guid id, [NotNull] string name, Guid? tenantId = null) public DatabaseBlobContainer(Guid id, [NotNull] string name, Guid? tenantId = null)
: base(id) : base(id)
{ {

4
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/Blog.cs

@ -16,6 +16,10 @@ public class Blog : FullAuditedAggregateRoot<Guid>, IMultiTenant
public virtual Guid? TenantId { get; protected set; } public virtual Guid? TenantId { get; protected set; }
protected Blog()
{
}
protected internal Blog( protected internal Blog(
Guid id, Guid id,
[NotNull] string name, [NotNull] string name,

4
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/BlogFeature.cs

@ -13,6 +13,10 @@ public class BlogFeature : FullAuditedAggregateRoot<Guid>
public bool IsEnabled { get; protected internal set; } public bool IsEnabled { get; protected internal set; }
protected BlogFeature()
{
}
public BlogFeature(Guid blogId, [NotNull] string featureName, bool isEnabled = true) public BlogFeature(Guid blogId, [NotNull] string featureName, bool isEnabled = true)
{ {
BlogId = blogId; BlogId = blogId;

4
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs

@ -41,6 +41,10 @@ public class MenuItem : AuditedAggregateRoot<Guid>, IMultiTenant
public Guid? TenantId { get; protected set; } public Guid? TenantId { get; protected set; }
protected MenuItem()
{
}
public MenuItem(Guid id, public MenuItem(Guid id,
[NotNull] string displayName, [NotNull] string displayName,
[NotNull] string url, [NotNull] string url,

5
modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs

@ -173,7 +173,10 @@ public class IdentityUserAppService : IdentityAppServiceBase, IIdentityUserAppSe
(await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); (await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors();
} }
(await UserManager.SetLockoutEnabledAsync(user, input.LockoutEnabled)).CheckErrors(); if (user.Id != CurrentUser.Id)
{
(await UserManager.SetLockoutEnabledAsync(user, input.LockoutEnabled)).CheckErrors();
}
user.Name = input.Name; user.Name = input.Name;
user.Surname = input.Surname; user.Surname = input.Surname;

9
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor

@ -129,9 +129,12 @@
<Field> <Field>
<Check TValue="bool" @bind-Checked="@NewEntity.IsActive">@L["DisplayName:IsActive"]</Check> <Check TValue="bool" @bind-Checked="@NewEntity.IsActive">@L["DisplayName:IsActive"]</Check>
</Field> </Field>
<Field> @if (!IsEditCurrentUser)
<Check TValue="bool" @bind-Checked="@NewEntity.LockoutEnabled">@L["DisplayName:LockoutEnabled"]</Check> {
</Field> <Field>
<Check TValue="bool" @bind-Checked="@NewEntity.LockoutEnabled">@L["DisplayName:LockoutEnabled"]</Check>
</Field>
}
<ExtensionProperties TEntityType="IdentityUserCreateDto" TResourceType="IdentityResource" Entity="@NewEntity" LH="@LH" ModalType="ExtensionPropertyModalType.CreateModal" /> <ExtensionProperties TEntityType="IdentityUserCreateDto" TResourceType="IdentityResource" Entity="@NewEntity" LH="@LH" ModalType="ExtensionPropertyModalType.CreateModal" />
</TabPanel> </TabPanel>
<TabPanel Name="Roles"> <TabPanel Name="Roles">

3
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor.cs

@ -41,6 +41,7 @@ public partial class UserManagement
private List<TableColumn> UserManagementTableColumns => TableColumns.Get<UserManagement>(); private List<TableColumn> UserManagementTableColumns => TableColumns.Get<UserManagement>();
private TextRole _passwordTextRole = TextRole.Password; private TextRole _passwordTextRole = TextRole.Password;
public bool IsEditCurrentUser { get; set; }
public UserManagement() public UserManagement()
{ {
@ -119,7 +120,7 @@ public partial class UserManagement
try try
{ {
EditModalSelectedTab = DefaultSelectedTab; EditModalSelectedTab = DefaultSelectedTab;
IsEditCurrentUser = entity.Id == CurrentUser.Id;
var userRoleNames = (await AppService.GetRolesAsync(entity.Id)).Items.Select(r => r.Name).ToList(); var userRoleNames = (await AppService.GetRolesAsync(entity.Id)).Items.Select(r => r.Name).ToList();
EditUserRoles = Roles.Select(x => new AssignedRoleViewModel EditUserRoles = Roles.Select(x => new AssignedRoleViewModel

6
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml

@ -39,8 +39,10 @@
<abp-input asp-for="UserInfo.Email" /> <abp-input asp-for="UserInfo.Email" />
<abp-input asp-for="UserInfo.PhoneNumber" /> <abp-input asp-for="UserInfo.PhoneNumber" />
<abp-input asp-for="UserInfo.IsActive" /> <abp-input asp-for="UserInfo.IsActive" />
<abp-input asp-for="UserInfo.LockoutEnabled" /> @if (!Model.IsEditCurrentUser)
{
<abp-input asp-for="UserInfo.LockoutEnabled" />
}
@foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<EditModalModel.UserInfoViewModel>()) @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<EditModalModel.UserInfoViewModel>())
{ {
if (!propertyInfo.Name.EndsWith("_Text")) if (!propertyInfo.Name.EndsWith("_Text"))

5
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs

@ -24,6 +24,8 @@ public class EditModalModel : IdentityPageModel
protected IIdentityUserAppService IdentityUserAppService { get; } protected IIdentityUserAppService IdentityUserAppService { get; }
public bool IsEditCurrentUser { get; set; }
public EditModalModel(IIdentityUserAppService identityUserAppService) public EditModalModel(IIdentityUserAppService identityUserAppService)
{ {
IdentityUserAppService = identityUserAppService; IdentityUserAppService = identityUserAppService;
@ -32,10 +34,9 @@ public class EditModalModel : IdentityPageModel
public virtual async Task<IActionResult> OnGetAsync(Guid id) public virtual async Task<IActionResult> OnGetAsync(Guid id)
{ {
var user = await IdentityUserAppService.GetAsync(id); var user = await IdentityUserAppService.GetAsync(id);
UserInfo = ObjectMapper.Map<IdentityUserDto, UserInfoViewModel>(user); UserInfo = ObjectMapper.Map<IdentityUserDto, UserInfoViewModel>(user);
Roles = ObjectMapper.Map<IReadOnlyList<IdentityRoleDto>, AssignedRoleViewModel[]>((await IdentityUserAppService.GetAssignableRolesAsync()).Items); Roles = ObjectMapper.Map<IReadOnlyList<IdentityRoleDto>, AssignedRoleViewModel[]>((await IdentityUserAppService.GetAssignableRolesAsync()).Items);
IsEditCurrentUser = CurrentUser.Id == id;
var userRoleNames = (await IdentityUserAppService.GetRolesAsync(UserInfo.Id)).Items.Select(r => r.Name).ToList(); var userRoleNames = (await IdentityUserAppService.GetRolesAsync(UserInfo.Id)).Items.Select(r => r.Name).ToList();
foreach (var role in Roles) foreach (var role in Roles)

32
npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts

@ -1,19 +1,22 @@
import { LocalizationParam, SubscriptionService } from '@abp/ng.core';
import { import {
AfterViewInit,
ApplicationRef, ApplicationRef,
Component, Component,
Injector,
inject,
OnInit,
ComponentFactoryResolver, ComponentFactoryResolver,
ElementRef, ElementRef,
EmbeddedViewRef, EmbeddedViewRef,
Injector,
OnDestroy,
OnInit,
Type, Type,
ViewChild, ViewChild,
AfterViewInit,
OnDestroy,
} from '@angular/core'; } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { fromEvent, Subject } from 'rxjs'; import { fromEvent, Subject } from 'rxjs';
import { debounceTime, filter } from 'rxjs/operators'; import { debounceTime, filter } from 'rxjs/operators';
import { LocalizationParam, SubscriptionService } from '@abp/ng.core';
import { ErrorScreenErrorCodes } from '../../models';
@Component({ @Component({
selector: 'abp-http-error-wrapper', selector: 'abp-http-error-wrapper',
@ -21,14 +24,17 @@ import { debounceTime, filter } from 'rxjs/operators';
styleUrls: ['http-error-wrapper.component.scss'], styleUrls: ['http-error-wrapper.component.scss'],
providers: [SubscriptionService], providers: [SubscriptionService],
}) })
export class HttpErrorWrapperComponent implements AfterViewInit, OnDestroy, OnInit { export class HttpErrorWrapperComponent implements OnInit, AfterViewInit, OnDestroy {
protected readonly document = inject(DOCUMENT);
protected readonly window = this.document.defaultView;
appRef!: ApplicationRef; appRef!: ApplicationRef;
cfRes!: ComponentFactoryResolver; cfRes!: ComponentFactoryResolver;
injector!: Injector; injector!: Injector;
status = 0; status: ErrorScreenErrorCodes = 0;
title: LocalizationParam = 'Oops!'; title: LocalizationParam = 'Oops!';
@ -53,12 +59,12 @@ export class HttpErrorWrapperComponent implements AfterViewInit, OnDestroy, OnIn
constructor(private subscription: SubscriptionService) {} constructor(private subscription: SubscriptionService) {}
ngOnInit() { ngOnInit(): void {
this.backgroundColor = this.backgroundColor =
window.getComputedStyle(document.body)?.getPropertyValue('background-color') || '#fff'; this.window.getComputedStyle(this.document.body)?.getPropertyValue('background-color') || '#fff';
} }
ngAfterViewInit() { ngAfterViewInit(): void {
if (this.customComponent) { if (this.customComponent) {
const customComponentRef = this.cfRes const customComponentRef = this.cfRes
.resolveComponentFactory(this.customComponent) .resolveComponentFactory(this.customComponent)
@ -74,18 +80,18 @@ export class HttpErrorWrapperComponent implements AfterViewInit, OnDestroy, OnIn
customComponentRef.changeDetectorRef.detectChanges(); customComponentRef.changeDetectorRef.detectChanges();
} }
const keyup$ = fromEvent<KeyboardEvent>(document, 'keyup').pipe( const keyup$ = fromEvent<KeyboardEvent>(this.document, 'keyup').pipe(
debounceTime(150), debounceTime(150),
filter((key: KeyboardEvent) => key && key.key === 'Escape'), filter((key: KeyboardEvent) => key && key.key === 'Escape'),
); );
this.subscription.addOne(keyup$, () => this.destroy()); this.subscription.addOne(keyup$, () => this.destroy());
} }
ngOnDestroy() { ngOnDestroy(): void {
this.destroy(); this.destroy();
} }
destroy() { destroy(): void {
this.destroy$.next(); this.destroy$.next();
this.destroy$.complete(); this.destroy$.complete();
} }

43
npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts

@ -1,25 +1,29 @@
import { HttpErrorReporterService } from '@abp/ng.core';
import { HttpErrorResponse } from '@angular/common/http';
import { inject, Injectable, Injector } from '@angular/core'; import { inject, Injectable, Injector } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { Observable, of, throwError } from 'rxjs'; import { Observable, of, throwError } from 'rxjs';
import { catchError, filter, switchMap } from 'rxjs/operators'; import { catchError, filter, switchMap } from 'rxjs/operators';
import { HttpErrorReporterService } from '@abp/ng.core';
import { CustomHttpErrorHandlerService } from '../models/common'; import { CustomHttpErrorHandlerService } from '../models/common';
import { Confirmation } from '../models/confirmation'; import { Confirmation } from '../models/confirmation';
import { ConfirmationService } from '../services/confirmation.service';
import { CUSTOM_ERROR_HANDLERS, HTTP_ERROR_HANDLER } from '../tokens/http-error.token'; import { CUSTOM_ERROR_HANDLERS, HTTP_ERROR_HANDLER } from '../tokens/http-error.token';
import { HTTP_ERROR_CONFIG } from '../tokens/http-error.token';
import { DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES } from '../constants/default-errors'; import { DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES } from '../constants/default-errors';
import { ConfirmationService } from '../services/confirmation.service';
import { RouterErrorHandlerService } from '../services/router-error-handler.service'; import { RouterErrorHandlerService } from '../services/router-error-handler.service';
import { HTTP_ERROR_CONFIG } from '../tokens/http-error.token';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class ErrorHandler { export class ErrorHandler {
private httpErrorReporter = inject(HttpErrorReporterService); protected readonly httpErrorReporter = inject(HttpErrorReporterService);
private confirmationService = inject(ConfirmationService); protected readonly confirmationService = inject(ConfirmationService);
private routerErrorHandlerService = inject(RouterErrorHandlerService); protected readonly routerErrorHandlerService = inject(RouterErrorHandlerService);
protected httpErrorConfig = inject(HTTP_ERROR_CONFIG); protected readonly httpErrorConfig = inject(HTTP_ERROR_CONFIG);
private customErrorHandlers = inject(CUSTOM_ERROR_HANDLERS); protected readonly customErrorHandlers = inject(CUSTOM_ERROR_HANDLERS);
private defaultHttpErrorHandler = (_, err: HttpErrorResponse) => throwError(() => err); protected readonly defaultHttpErrorHandler = (_, err: HttpErrorResponse) => throwError(() => err);
private httpErrorHandler = protected readonly httpErrorHandler =
inject(HTTP_ERROR_HANDLER, { optional: true }) || this.defaultHttpErrorHandler; inject(HTTP_ERROR_HANDLER, { optional: true }) || this.defaultHttpErrorHandler;
constructor(protected injector: Injector) { constructor(protected injector: Injector) {
@ -34,17 +38,14 @@ export class ErrorHandler {
protected listenToRestError() { protected listenToRestError() {
this.httpErrorReporter.reporter$ this.httpErrorReporter.reporter$
.pipe(filter(this.filterRestErrors), switchMap(this.executeErrorHandler)) .pipe(filter(this.filterRestErrors), switchMap(this.executeErrorHandler))
.subscribe(err => { .subscribe(err => this.handleError(err));
this.handleError(err);
});
} }
private executeErrorHandler = (error: HttpErrorResponse) => { protected executeErrorHandler = (error: HttpErrorResponse) => {
const errHandler = this.httpErrorHandler(this.injector, error); const errHandler = this.httpErrorHandler(this.injector, error);
const isObservable = errHandler instanceof Observable; const isObservable = errHandler instanceof Observable;
const response = isObservable ? errHandler : of(null);
return response.pipe( return (isObservable ? errHandler : of(null)).pipe(
catchError(err => { catchError(err => {
this.handleError(err); this.handleError(err);
return of(null); return of(null);
@ -59,16 +60,18 @@ export class ErrorHandler {
return (b.priority || 0) - (a.priority || 0); return (b.priority || 0) - (a.priority || 0);
} }
private handleError(err: unknown) { protected handleError(err: unknown) {
if (this.customErrorHandlers && this.customErrorHandlers.length) { if (this.customErrorHandlers && this.customErrorHandlers.length) {
const canHandleService = this.customErrorHandlers const canHandleService = this.customErrorHandlers
.sort(this.sortHttpErrorHandlers) .sort(this.sortHttpErrorHandlers)
.find(service => service.canHandle(err)); .find(service => service.canHandle(err));
if (canHandleService) { if (canHandleService) {
canHandleService.execute(); canHandleService.execute();
return; return;
} }
} }
this.showError().subscribe(); this.showError().subscribe();
} }
@ -90,10 +93,10 @@ export class ErrorHandler {
protected filterRestErrors = ({ status }: HttpErrorResponse): boolean => { protected filterRestErrors = ({ status }: HttpErrorResponse): boolean => {
if (typeof status !== 'number') return false; if (typeof status !== 'number') return false;
if (!this.httpErrorConfig.skipHandledErrorCodes) { if (!this.httpErrorConfig || !this.httpErrorConfig.skipHandledErrorCodes) {
return true; return true;
} }
return this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0; return this.httpErrorConfig.skipHandledErrorCodes?.findIndex(code => code === status) < 0;
}; };
} }

6
npm/ng-packs/packages/theme-shared/src/lib/models/common.ts

@ -1,5 +1,5 @@
import { HttpErrorResponse } from '@angular/common/http'; import { HttpErrorResponse } from '@angular/common/http';
import { Injector, Type } from '@angular/core'; import { Type } from '@angular/core';
import { Validation } from '@ngx-validate/core'; import { Validation } from '@ngx-validate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { ConfirmationIcons } from '../tokens/confirmation-icons.token'; import { ConfirmationIcons } from '../tokens/confirmation-icons.token';
@ -10,7 +10,7 @@ export interface RootParams {
confirmationIcons?: Partial<ConfirmationIcons>; confirmationIcons?: Partial<ConfirmationIcons>;
} }
export type ErrorScreenErrorCodes = 401 | 403 | 404 | 500; export type ErrorScreenErrorCodes = 0 | 401 | 403 | 404 | 500;
export interface HttpErrorConfig { export interface HttpErrorConfig {
skipHandledErrorCodes?: ErrorScreenErrorCodes[] | number[]; skipHandledErrorCodes?: ErrorScreenErrorCodes[] | number[];
@ -26,5 +26,5 @@ export type LocaleDirection = 'ltr' | 'rtl';
export interface CustomHttpErrorHandlerService { export interface CustomHttpErrorHandlerService {
readonly priority: number; readonly priority: number;
canHandle(error: unknown): boolean; canHandle(error: unknown): boolean;
execute(); execute(): void;
} }

48
npm/ng-packs/packages/theme-shared/src/lib/services/create-error-component.service.ts

@ -8,8 +8,9 @@ import {
Injector, Injector,
RendererFactory2, RendererFactory2,
} from '@angular/core'; } from '@angular/core';
import { Subject } from 'rxjs'; import { DOCUMENT } from '@angular/common';
import { ResolveEnd } from '@angular/router'; import { ResolveEnd } from '@angular/router';
import { Subject } from 'rxjs';
import { filter } from 'rxjs/operators'; import { filter } from 'rxjs/operators';
import { RouterEvents } from '@abp/ng.core'; import { RouterEvents } from '@abp/ng.core';
import { HTTP_ERROR_CONFIG } from '../tokens/http-error.token'; import { HTTP_ERROR_CONFIG } from '../tokens/http-error.token';
@ -18,31 +19,20 @@ import { ErrorScreenErrorCodes } from '../models/common';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class CreateErrorComponentService { export class CreateErrorComponentService {
protected rendererFactory = inject(RendererFactory2); protected readonly document = inject(DOCUMENT);
protected cfRes = inject(ComponentFactoryResolver); protected readonly rendererFactory = inject(RendererFactory2);
private routerEvents = inject(RouterEvents); protected readonly cfRes = inject(ComponentFactoryResolver);
private injector = inject(Injector); protected readonly routerEvents = inject(RouterEvents);
private httpErrorConfig = inject(HTTP_ERROR_CONFIG); protected readonly injector = inject(Injector);
protected readonly httpErrorConfig = inject(HTTP_ERROR_CONFIG);
componentRef: ComponentRef<HttpErrorWrapperComponent> | null = null; componentRef: ComponentRef<HttpErrorWrapperComponent> | null = null;
private getErrorHostElement() {
return document.body;
}
public canCreateCustomError(status: ErrorScreenErrorCodes) {
return !!(
this.httpErrorConfig?.errorScreen?.component &&
this.httpErrorConfig?.errorScreen?.forWhichErrors &&
this.httpErrorConfig?.errorScreen?.forWhichErrors.indexOf(status) > -1
);
}
constructor() { constructor() {
this.listenToRouterDataResolved(); this.listenToRouterDataResolved();
} }
protected listenToRouterDataResolved() { protected listenToRouterDataResolved(): void {
this.routerEvents this.routerEvents
.getEvents(ResolveEnd) .getEvents(ResolveEnd)
.pipe(filter(() => !!this.componentRef)) .pipe(filter(() => !!this.componentRef))
@ -52,11 +42,25 @@ export class CreateErrorComponentService {
}); });
} }
private isCloseIconHidden() { protected getErrorHostElement(): HTMLElement {
return !!this.httpErrorConfig.errorScreen?.hideCloseIcon; return this.document.body;
}
protected isCloseIconHidden(): boolean {
return !!this.httpErrorConfig?.errorScreen?.hideCloseIcon;
}
canCreateCustomError(status: ErrorScreenErrorCodes) {
const { component, forWhichErrors } = this.httpErrorConfig?.errorScreen || {};
if (!component || !forWhichErrors) {
return false;
}
return forWhichErrors.indexOf(status) > -1;
} }
execute(instance: Partial<HttpErrorWrapperComponent>) { execute(instance: Partial<HttpErrorWrapperComponent>): void {
const renderer = this.rendererFactory.createRenderer(null, null); const renderer = this.rendererFactory.createRenderer(null, null);
const hostElement = this.getErrorHostElement(); const hostElement = this.getErrorHostElement();
const host = renderer.selectRootElement(hostElement, true); const host = renderer.selectRootElement(hostElement, true);

29
npm/ng-packs/packages/theme-shared/src/lib/services/router-error-handler.service.ts

@ -1,42 +1,43 @@
import { inject, Injectable } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { NavigationError } from '@angular/router';
import { filter } from 'rxjs/operators'; import { filter } from 'rxjs/operators';
import { RouterEvents } from '@abp/ng.core'; import { RouterEvents } from '@abp/ng.core';
import { NavigationError } from '@angular/router';
import { HTTP_ERROR_CONFIG } from '../tokens/'; import { HTTP_ERROR_CONFIG } from '../tokens/';
import { CreateErrorComponentService } from '../services'; import { CreateErrorComponentService } from '../services';
import { DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES } from '../constants/default-errors'; import { DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES } from '../constants/default-errors';
import { ErrorScreenErrorCodes } from '../models';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class RouterErrorHandlerService { export class RouterErrorHandlerService {
private readonly routerEvents = inject(RouterEvents); protected readonly routerEvents = inject(RouterEvents);
private httpErrorConfig = inject(HTTP_ERROR_CONFIG); protected readonly httpErrorConfig = inject(HTTP_ERROR_CONFIG);
private createErrorComponentService = inject(CreateErrorComponentService); protected readonly createErrorComponentService = inject(CreateErrorComponentService);
listen() {
this.routerEvents
.getNavigationEvents('Error')
.pipe(filter(this.filterRouteErrors))
.subscribe(() => this.show404Page());
}
protected filterRouteErrors = (navigationError: NavigationError): boolean => { protected filterRouteErrors = (navigationError: NavigationError): boolean => {
if (!this.httpErrorConfig.skipHandledErrorCodes) { if (!this.httpErrorConfig?.skipHandledErrorCodes) {
return true; return true;
} }
return ( return (
navigationError.error?.message?.indexOf('Cannot match') > -1 && navigationError.error?.message?.indexOf('Cannot match') > -1 &&
this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0 this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === 404) < 0
); );
}; };
listen() {
this.routerEvents
.getNavigationEvents('Error')
.pipe(filter(this.filterRouteErrors))
.subscribe(() => this.show404Page());
}
show404Page() { show404Page() {
const instance = { const instance = {
title: { title: {
key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title, key: DEFAULT_ERROR_LOCALIZATIONS.defaultError404.title,
defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title, defaultValue: DEFAULT_ERROR_MESSAGES.defaultError404.title,
}, },
status: 404, status: <ErrorScreenErrorCodes>404,
}; };
this.createErrorComponentService.execute(instance); this.createErrorComponentService.execute(instance);

88
npm/ng-packs/packages/theme-shared/src/lib/services/status-code-error-handler.service.ts

@ -12,19 +12,57 @@ import { CreateErrorComponentService } from './create-error-component.service';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class StatusCodeErrorHandlerService implements CustomHttpErrorHandlerService { export class StatusCodeErrorHandlerService implements CustomHttpErrorHandlerService {
private readonly confirmationService = inject(ConfirmationService); protected readonly confirmationService = inject(ConfirmationService);
private readonly createErrorComponentService = inject(CreateErrorComponentService); protected readonly createErrorComponentService = inject(CreateErrorComponentService);
private readonly authService = inject(AuthService); protected readonly authService = inject(AuthService);
protected readonly handledStatusCodes = [401, 403, 404, 500] as const;
protected status: typeof this.handledStatusCodes[number];
readonly priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.normal; readonly priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.normal;
private status: typeof this.handledStatusCodes[number];
private readonly handledStatusCodes = [401, 403, 404, 500] as const; protected navigateToLogin(): void {
this.authService.navigateToLogin();
}
protected showConfirmation(
message: LocalizationParam,
title: LocalizationParam,
): Observable<Confirmation.Status> {
return this.confirmationService.error(message, title, {
hideCancelBtn: true,
yesText: 'AbpAccount::Close',
});
}
protected showPage(): void {
const key = `defaultError${this.status}`;
const shouldRemoveDetail = [401, 404].indexOf(this.status) > -1;
const instance = {
title: {
key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
defaultValue: DEFAULT_ERROR_MESSAGES[key]?.title,
},
details: {
key: DEFAULT_ERROR_LOCALIZATIONS[key]?.details,
defaultValue: DEFAULT_ERROR_MESSAGES[key]?.details,
},
status: this.status,
};
if (shouldRemoveDetail) {
delete instance.details;
}
this.createErrorComponentService.execute(instance);
}
canHandle({ status }): boolean { canHandle({ status }): boolean {
this.status = status; this.status = status || 0;
return this.handledStatusCodes.indexOf(status) > -1; return this.handledStatusCodes.indexOf(status) > -1;
} }
execute() { execute(): void {
const key = `defaultError${this.status}`; const key = `defaultError${this.status}`;
const title = { const title = {
key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title, key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
@ -36,6 +74,7 @@ export class StatusCodeErrorHandlerService implements CustomHttpErrorHandlerServ
}; };
const canCreateCustomError = this.createErrorComponentService.canCreateCustomError(this.status); const canCreateCustomError = this.createErrorComponentService.canCreateCustomError(this.status);
switch (this.status) { switch (this.status) {
case 401: case 401:
case 404: case 404:
@ -56,39 +95,4 @@ export class StatusCodeErrorHandlerService implements CustomHttpErrorHandlerServ
break; break;
} }
} }
private navigateToLogin() {
this.authService.navigateToLogin();
}
protected showConfirmation(
message: LocalizationParam,
title: LocalizationParam,
): Observable<Confirmation.Status> {
return this.confirmationService.error(message, title, {
hideCancelBtn: true,
yesText: 'AbpAccount::Close',
});
}
protected showPage() {
const key = `defaultError${this.status}`;
const instance = {
title: {
key: DEFAULT_ERROR_LOCALIZATIONS[key]?.title,
defaultValue: DEFAULT_ERROR_MESSAGES[key]?.title,
},
details: {
key: DEFAULT_ERROR_LOCALIZATIONS[key]?.details,
defaultValue: DEFAULT_ERROR_MESSAGES[key]?.details,
},
status: this.status,
};
const shouldRemoveDetail = [401, 404].indexOf(this.status) > -1;
if (shouldRemoveDetail) {
delete instance.details;
}
this.createErrorComponentService.execute(instance);
}
} }

6
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj

@ -8,8 +8,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup> </ItemGroup>
@ -82,7 +82,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

6
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj

@ -8,8 +8,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup> </ItemGroup>
@ -83,7 +83,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

8
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyCompanyName.MyProjectName.Blazor.WebAssembly.Client.csproj

@ -9,10 +9,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

5664
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/wwwroot/global.css

File diff suppressed because one or more lines are too long

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/wwwroot/global.js

File diff suppressed because one or more lines are too long

4
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/wwwroot/index.html

@ -8,7 +8,7 @@
<base href="/" /> <base href="/" />
<!--ABP:Styles--> <!--ABP:Styles-->
<link href="global.css?_v=638118923149875950" rel="stylesheet"/> <link href="global.css?_v=638289244950963716" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/> <link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles--> <!--/ABP:Styles-->
<link href="MyCompanyName.MyProjectName.Blazor.styles.css" rel="stylesheet"/> <link href="MyCompanyName.MyProjectName.Blazor.styles.css" rel="stylesheet"/>
@ -29,7 +29,7 @@
</div> </div>
<!--ABP:Scripts--> <!--ABP:Scripts-->
<script src="global.js?_v=638118923150952740"></script> <script src="global.js?_v=638289244953139634"></script>
<!--/ABP:Scripts--> <!--/ABP:Scripts-->
</body> </body>
</html> </html>

4
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo.csproj

@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -78,7 +78,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

6
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.csproj

@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -79,11 +79,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.10">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> <PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets>
</PackageReference> </PackageReference>

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Shared/MyCompanyName.MyProjectName.Blazor.WebAssembly.Shared.csproj

@ -29,7 +29,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj

@ -74,7 +74,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj

@ -75,7 +75,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj

@ -77,7 +77,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj

@ -78,7 +78,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj

@ -34,7 +34,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" /> <PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
</ItemGroup> </ItemGroup>

6
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj

@ -14,11 +14,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" /> <PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
</ItemGroup> </ItemGroup>

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj

@ -14,8 +14,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup> </ItemGroup>

8
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj

@ -12,10 +12,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

5664
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css

File diff suppressed because one or more lines are too long

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.js

File diff suppressed because one or more lines are too long

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html

@ -8,7 +8,7 @@
<base href="/" /> <base href="/" />
<!--ABP:Styles--> <!--ABP:Styles-->
<link href="global.css?_v=638210550967168851" rel="stylesheet"/> <link href="global.css?_v=638289244910528761" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/> <link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles--> <!--/ABP:Styles-->
<link href="MyCompanyName.MyProjectName.Blazor.styles.css" rel="stylesheet"/> <link href="MyCompanyName.MyProjectName.Blazor.styles.css" rel="stylesheet"/>
@ -29,7 +29,7 @@
</div> </div>
<!--ABP:Scripts--> <!--ABP:Scripts-->
<script src="global.js?_v=638210550970188800"></script> <script src="global.js?_v=638289244912430522"></script>
<!--/ABP:Scripts--> <!--/ABP:Scripts-->
<!-- <TEMPLATE-REMOVE IF-NOT='PWA'> --> <!-- <TEMPLATE-REMOVE IF-NOT='PWA'> -->

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj

@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
</Project> </Project>

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj

@ -13,8 +13,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" /> <PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy\Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy\Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj

@ -19,7 +19,7 @@
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" /> <PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj

@ -23,7 +23,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.10" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
templates/maui/src/MyCompanyName.MyProjectName/MyCompanyName.MyProjectName.csproj

@ -35,7 +35,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj

@ -13,7 +13,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

8
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj

@ -9,10 +9,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

5664
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/global.css

File diff suppressed because one or more lines are too long

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html

@ -8,7 +8,7 @@
<base href="/" /> <base href="/" />
<!--ABP:Styles--> <!--ABP:Styles-->
<link href="global.css?_v=638210551285656747" rel="stylesheet"/> <link href="global.css?_v=638289244983804402" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/> <link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles--> <!--/ABP:Styles-->
</head> </head>
@ -22,7 +22,7 @@
</div> </div>
<!--ABP:Scripts--> <!--ABP:Scripts-->
<script src="global.js?_v=638210551286504891"></script> <script src="global.js?_v=638289244984662394"></script>
<!--/ABP:Scripts--> <!--/ABP:Scripts-->
</body> </body>
</html> </html>

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj

@ -13,8 +13,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.2.3" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.3" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1" />

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyCompanyName.MyProjectName.HttpApi.Host.csproj

@ -14,8 +14,8 @@
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="IdentityModel" Version="6.0.0" /> <PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Caching.StackExchangeRedis\Volo.Abp.Caching.StackExchangeRedis.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Caching.StackExchangeRedis\Volo.Abp.Caching.StackExchangeRedis.csproj" />

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj

@ -13,7 +13,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.10" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Serilog\Volo.Abp.AspNetCore.Serilog.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Serilog\Volo.Abp.AspNetCore.Serilog.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Caching.StackExchangeRedis\Volo.Abp.Caching.StackExchangeRedis.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Caching.StackExchangeRedis\Volo.Abp.Caching.StackExchangeRedis.csproj" />

2
templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyCompanyName.MyProjectName.Domain.Shared.csproj

@ -15,7 +15,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj

@ -22,7 +22,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
templates/module/aspnet-core/test/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests/MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj

@ -10,7 +10,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="7.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="7.0.10" />
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.EntityFrameworkCore\MyCompanyName.MyProjectName.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.EntityFrameworkCore\MyCompanyName.MyProjectName.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\MyCompanyName.MyProjectName.TestBase\MyCompanyName.MyProjectName.TestBase.csproj" /> <ProjectReference Include="..\MyCompanyName.MyProjectName.TestBase\MyCompanyName.MyProjectName.TestBase.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.Sqlite\Volo.Abp.EntityFrameworkCore.Sqlite.csproj" /> <ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.Sqlite\Volo.Abp.EntityFrameworkCore.Sqlite.csproj" />

Loading…
Cancel
Save