diff --git a/Directory.Packages.props b/Directory.Packages.props index a402f01450..6842c542ce 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - + @@ -114,11 +114,11 @@ - - - - - + + + + + diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs index 17fd94c467..7804cbbd98 100644 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs +++ b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs @@ -298,32 +298,4 @@ public static class AutofacRegistration .ConfigureLifecycle(descriptor.Lifetime, null); } } - - /// - /// Normalizes the implementation instance data between keyed and not keyed services. - /// - /// - /// The to normalize. - /// - /// - /// The appropriate implementation instance from the service descriptor. - /// - public static object? NormalizedImplementationInstance(this ServiceDescriptor descriptor) - { - return !descriptor.IsKeyedService ? descriptor.ImplementationInstance : descriptor.KeyedImplementationInstance; - } - - /// - /// Normalizes the implementation type data between keyed and not keyed services. - /// - /// - /// The to normalize. - /// - /// - /// The appropriate implementation type from the service descriptor. - /// - public static Type? NormalizedImplementationType(this ServiceDescriptor descriptor) - { - return !descriptor.IsKeyedService ? descriptor.ImplementationType : descriptor.KeyedImplementationType; - } } diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs index 7301b0b7a9..16f5ba9a86 100644 --- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionCommonExtensions.cs @@ -28,7 +28,7 @@ public static class ServiceCollectionCommonExtensions { return (T?)services .FirstOrDefault(d => d.ServiceType == typeof(T)) - ?.ImplementationInstance; + ?.NormalizedImplementationInstance(); } public static T GetSingletonInstance(this IServiceCollection services) @@ -48,7 +48,7 @@ public static class ServiceCollectionCommonExtensions foreach (var service in services) { - var factoryInterface = service.ImplementationInstance?.GetType() + var factoryInterface = service.NormalizedImplementationInstance()?.GetType() .GetTypeInfo() .GetInterfaces() .FirstOrDefault(i => i.GetTypeInfo().IsGenericType && diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceDescriptorExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceDescriptorExtensions.cs new file mode 100644 index 0000000000..1a160edb54 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceDescriptorExtensions.cs @@ -0,0 +1,31 @@ +using System; + +namespace Microsoft.Extensions.DependencyInjection; + +/// +/// Extensions for working with . +/// +public static class ServiceDescriptorExtensions +{ + /// + /// Normalizes the implementation instance data between keyed and not keyed services. + /// + /// + /// The to normalize. + /// + /// + /// The appropriate implementation instance from the service descriptor. + /// + public static object? NormalizedImplementationInstance(this ServiceDescriptor descriptor) => descriptor.IsKeyedService ? descriptor.KeyedImplementationInstance : descriptor.ImplementationInstance; + + /// + /// Normalizes the implementation type data between keyed and not keyed services. + /// + /// + /// The to normalize. + /// + /// + /// The appropriate implementation type from the service descriptor. + /// + public static Type? NormalizedImplementationType(this ServiceDescriptor descriptor) => descriptor.IsKeyedService ? descriptor.KeyedImplementationType : descriptor.ImplementationType; +} diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceProviderKeyedServiceExtensions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceProviderKeyedServiceExtensions.cs new file mode 100644 index 0000000000..f31923f68c --- /dev/null +++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceProviderKeyedServiceExtensions.cs @@ -0,0 +1,19 @@ +using System; +using Volo.Abp; + +namespace Microsoft.Extensions.DependencyInjection; + +public static class ServiceProviderKeyedServiceExtensions +{ + public static object? GetKeyedService(this IServiceProvider provider, Type serviceType, object? serviceKey) + { + Check.NotNull(provider, nameof(provider)); + + if (provider is IKeyedServiceProvider keyedServiceProvider) + { + return keyedServiceProvider.GetKeyedService(serviceType, serviceKey); + } + + throw new InvalidOperationException("This service provider doesn't support keyed services."); + } +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/CachedServiceProviderBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/CachedServiceProviderBase.cs index 5e8d9d251a..770355428e 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/CachedServiceProviderBase.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/CachedServiceProviderBase.cs @@ -1,28 +1,29 @@ using System; using System.Collections.Concurrent; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.DependencyInjection; public abstract class CachedServiceProviderBase : ICachedServiceProviderBase { protected IServiceProvider ServiceProvider { get; } - protected ConcurrentDictionary> CachedServices { get; } + protected ConcurrentDictionary> CachedServices { get; } protected CachedServiceProviderBase(IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; - CachedServices = new ConcurrentDictionary>(); - CachedServices.TryAdd(typeof(IServiceProvider), new Lazy(() => ServiceProvider)); + CachedServices = new ConcurrentDictionary>(); + CachedServices.TryAdd(new ServiceIdentifier(typeof(IServiceProvider)), new Lazy(() => ServiceProvider)); } public virtual object? GetService(Type serviceType) { return CachedServices.GetOrAdd( - serviceType, + new ServiceIdentifier(serviceType), _ => new Lazy(() => ServiceProvider.GetService(serviceType)) ).Value; } - + public T GetService(T defaultValue) { return (T)GetService(typeof(T), defaultValue!); @@ -37,12 +38,28 @@ public abstract class CachedServiceProviderBase : ICachedServiceProviderBase { return (T)GetService(typeof(T), factory); } - + public object GetService(Type serviceType, Func factory) { return CachedServices.GetOrAdd( - serviceType, + new ServiceIdentifier(serviceType), _ => new Lazy(() => factory(ServiceProvider)) ).Value!; } + + public object? GetKeyedService(Type serviceType, object? serviceKey) + { + return CachedServices.GetOrAdd( + new ServiceIdentifier(serviceKey, serviceType), + _ => new Lazy(() => ServiceProvider.GetKeyedService(serviceType, serviceKey)) + ).Value; + } + + public object GetRequiredKeyedService(Type serviceType, object? serviceKey) + { + return CachedServices.GetOrAdd( + new ServiceIdentifier(serviceKey, serviceType), + _ => new Lazy(() => ServiceProvider.GetRequiredKeyedService(serviceType, serviceKey)) + ).Value!; + } } diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ICachedServiceProviderBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ICachedServiceProviderBase.cs index 2e15a45a46..ceec3326cc 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ICachedServiceProviderBase.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ICachedServiceProviderBase.cs @@ -1,14 +1,15 @@ using System; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.DependencyInjection; -public interface ICachedServiceProviderBase : IServiceProvider +public interface ICachedServiceProviderBase : IKeyedServiceProvider { T GetService(T defaultValue); - + object GetService(Type serviceType, object defaultValue); T GetService(Func factory); object GetService(Type serviceType, Func factory); -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IRootServiceProviderAccessor.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IRootServiceProviderAccessor.cs index 8a3c1d09a5..60f6b6461f 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IRootServiceProviderAccessor.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/IRootServiceProviderAccessor.cs @@ -1,4 +1,4 @@ -using System; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.DependencyInjection; @@ -8,7 +8,7 @@ namespace Volo.Abp.DependencyInjection; /// to release/dispose objects resolved from the root service provider. /// So, always create a new scope if you need to resolve any service. /// -public interface IRootServiceProvider : IServiceProvider +public interface IRootServiceProvider : IKeyedServiceProvider { - -} \ No newline at end of file + +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/RootServiceProvider.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/RootServiceProvider.cs index a406bc5597..7ba378d76a 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/RootServiceProvider.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/RootServiceProvider.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.DependencyInjection; @@ -6,7 +7,7 @@ namespace Volo.Abp.DependencyInjection; public class RootServiceProvider : IRootServiceProvider, ISingletonDependency { protected IServiceProvider ServiceProvider { get; } - + public RootServiceProvider(IObjectAccessor objectAccessor) { ServiceProvider = objectAccessor.Value!; @@ -16,4 +17,14 @@ public class RootServiceProvider : IRootServiceProvider, ISingletonDependency { return ServiceProvider.GetService(serviceType); } -} \ No newline at end of file + + public object? GetKeyedService(Type serviceType, object? serviceKey) + { + return ServiceProvider.GetKeyedService(serviceType, serviceKey); + } + + public virtual object GetRequiredKeyedService(Type serviceType, object? serviceKey) + { + return ServiceProvider.GetRequiredKeyedService(serviceType, serviceKey); + } +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceIdentifier.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceIdentifier.cs new file mode 100644 index 0000000000..b6dbcd8a02 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ServiceIdentifier.cs @@ -0,0 +1,54 @@ +using System; + +namespace Volo.Abp.DependencyInjection; + +/// +/// https://github.com/dotnet/runtime/blob/release/8.0/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ServiceIdentifier.cs#L9 +/// +public readonly struct ServiceIdentifier : IEquatable +{ + public object? ServiceKey { get; } + + public Type ServiceType { get; } + + public ServiceIdentifier(Type serviceType) + { + ServiceType = serviceType; + } + + public ServiceIdentifier(object? serviceKey, Type serviceType) + { + ServiceKey = serviceKey; + ServiceType = serviceType; + } + + public bool Equals(ServiceIdentifier other) + { + if (ServiceKey == null && other.ServiceKey == null) + { + return ServiceType == other.ServiceType; + } + else if (ServiceKey != null && other.ServiceKey != null) + { + return ServiceType == other.ServiceType && ServiceKey.Equals(other.ServiceKey); + } + return false; + } + + public override bool Equals(object? obj) + { + return obj is ServiceIdentifier && Equals((ServiceIdentifier)obj); + } + + public override int GetHashCode() + { + if (ServiceKey == null) + { + return ServiceType.GetHashCode(); + } + unchecked + { + return (ServiceType.GetHashCode() * 397) ^ ServiceKey.GetHashCode(); + } + } +} diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DependencyInjection/CachedServiceProvider_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DependencyInjection/CachedServiceProvider_Tests.cs index b040bbc71f..bc67386c20 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DependencyInjection/CachedServiceProvider_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/DependencyInjection/CachedServiceProvider_Tests.cs @@ -21,7 +21,11 @@ public class CachedServiceProvider_Tests var transientTestService1 = cachedServiceProvider1.GetRequiredService(); var transientTestService2 = cachedServiceProvider2.GetRequiredService(); transientTestService1.ShouldBeSameAs(transientTestService2); - + + var transientKeyedTestService1 = cachedServiceProvider1.GetRequiredKeyedService("key1"); + var transientKeyedTestService2 = cachedServiceProvider2.GetRequiredKeyedService("key1"); + transientKeyedTestService1.ShouldBeSameAs(transientKeyedTestService2); + var cachedServiceProvider3 = cachedServiceProvider1.GetRequiredService().GetRequiredService(); cachedServiceProvider3.ShouldBeSameAs(cachedServiceProvider1); } @@ -36,18 +40,18 @@ public class CachedServiceProvider_Tests var testCounter = scope1.ServiceProvider.GetRequiredService(); testCounter.GetValue(nameof(TransientTestService)).ShouldBe(1); } - + using (var scope2 = application.ServiceProvider.CreateScope()) { TestResolvingServices(scope2); var testCounter = scope2.ServiceProvider.GetRequiredService(); - + //Resolved in a different scope, so should not cache the service! testCounter.GetValue(nameof(TransientTestService)).ShouldBe(2); } } } - + [Fact] public void TransientCachedServiceProvider_Should_Cache_Services() { @@ -58,15 +62,26 @@ public class CachedServiceProvider_Tests var transientTestService1_1 = transientCachedServiceProvider1.GetRequiredService(); var transientTestService1_2 = transientCachedServiceProvider1.GetRequiredService(); transientTestService1_1.ShouldBeSameAs(transientTestService1_2); - + + var transientKeyedTestService1 = transientCachedServiceProvider1.GetRequiredKeyedService("key1"); + var transientKeyedTestService2 = transientCachedServiceProvider1.GetRequiredKeyedService("key1"); + transientKeyedTestService1.ShouldBeSameAs(transientKeyedTestService2); + var transientKeyedTestService3 = transientCachedServiceProvider1.GetRequiredKeyedService("key2"); + transientKeyedTestService2.ShouldNotBeSameAs(transientKeyedTestService3); + var transientCachedServiceProvider2 = scope.ServiceProvider.GetRequiredService(); transientCachedServiceProvider1.ShouldNotBeSameAs(transientCachedServiceProvider2); var transientTestService2_1 = transientCachedServiceProvider2.GetRequiredService(); var transientTestService2_2 = transientCachedServiceProvider2.GetRequiredService(); transientTestService2_1.ShouldBeSameAs(transientTestService2_2); - + + var transientKeyedTestService1_1 = transientCachedServiceProvider2.GetRequiredKeyedService("key1"); + var transientKeyedTestService2_1 = transientCachedServiceProvider2.GetRequiredKeyedService("key1"); + transientKeyedTestService1_1.ShouldBeSameAs(transientKeyedTestService2_1); + transientTestService1_1.ShouldNotBeSameAs(transientTestService2_1); + transientKeyedTestService1.ShouldNotBeSameAs(transientKeyedTestService1_1); var transientCachedServiceProvider1_1 = transientCachedServiceProvider1.GetRequiredService().GetRequiredService(); var transientCachedServiceProvider1_2 = transientCachedServiceProvider1.GetRequiredService().GetRequiredService(); @@ -87,7 +102,7 @@ public class CachedServiceProvider_Tests } } } - + [DependsOn(typeof(AbpTestBaseModule))] private class TestModule : AbpModule { @@ -99,6 +114,8 @@ public class CachedServiceProvider_Tests public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddType(); + context.Services.AddKeyedTransient("key1"); + context.Services.AddKeyedTransient("key2"); } } @@ -109,4 +126,9 @@ public class CachedServiceProvider_Tests counter.Increment(nameof(TransientTestService)); } } -} \ No newline at end of file + + private class TransientKeyedTestService + { + + } +} diff --git a/framework/test/Volo.Abp.Security.Tests/Volo/Abp/Security/Claims/AbpDynamicClaimsPrincipalContributorBase_Tests.cs b/framework/test/Volo.Abp.Security.Tests/Volo/Abp/Security/Claims/AbpDynamicClaimsPrincipalContributorBase_Tests.cs index 7054319dfa..4d0fc8ff6d 100644 --- a/framework/test/Volo.Abp.Security.Tests/Volo/Abp/Security/Claims/AbpDynamicClaimsPrincipalContributorBase_Tests.cs +++ b/framework/test/Volo.Abp.Security.Tests/Volo/Abp/Security/Claims/AbpDynamicClaimsPrincipalContributorBase_Tests.cs @@ -3,28 +3,55 @@ using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; using Shouldly; +using Volo.Abp.DependencyInjection; using Volo.Abp.Testing; using Xunit; namespace Volo.Abp.Security.Claims; +[DisableConventionalRegistration] class TestAbpDynamicClaimsPrincipalContributor : AbpDynamicClaimsPrincipalContributorBase { + private readonly List _claims; + + public TestAbpDynamicClaimsPrincipalContributor(List claims) + { + _claims = claims; + } + public async override Task ContributeAsync(AbpClaimsPrincipalContributorContext context) { var identity = context.ClaimsPrincipal.Identities.FirstOrDefault(); Check.NotNull(identity, nameof(identity)); - await AddDynamicClaimsAsync(context, identity, AbpDynamicClaimsPrincipalContributorBase_Tests.DynamicClaims.Claims); + await AddDynamicClaimsAsync(context, identity, _claims); } } public class AbpDynamicClaimsPrincipalContributorBase_Tests : AbpIntegratedTest { - private readonly TestAbpDynamicClaimsPrincipalContributor _dynamicClaimsPrincipalContributorBase = new TestAbpDynamicClaimsPrincipalContributor(); + private readonly TestAbpDynamicClaimsPrincipalContributor _dynamicClaimsPrincipalContributorBase; - public readonly static AbpDynamicClaimCacheItem DynamicClaims = new AbpDynamicClaimCacheItem(); + private readonly AbpDynamicClaimCacheItem _dynamicClaims; + + public AbpDynamicClaimsPrincipalContributorBase_Tests() + { + _dynamicClaims = new AbpDynamicClaimCacheItem(new List() + { + new AbpDynamicClaim("preferred_username", "test-preferred_username"), + new AbpDynamicClaim(ClaimTypes.GivenName, "test-given_name"), + new AbpDynamicClaim("family_name", "test-family_name"), + new AbpDynamicClaim("role", "test-role1"), + new AbpDynamicClaim("roles", "test-role2"), + new AbpDynamicClaim(ClaimTypes.Role, "test-role3"), + new AbpDynamicClaim("email", "test-email"), + new AbpDynamicClaim(AbpClaimTypes.EmailVerified, "test-email-verified"), + new AbpDynamicClaim(AbpClaimTypes.PhoneNumberVerified, null), + }); + _dynamicClaimsPrincipalContributorBase = new TestAbpDynamicClaimsPrincipalContributor(_dynamicClaims.Claims); + } protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) { @@ -46,19 +73,6 @@ public class AbpDynamicClaimsPrincipalContributorBase_Tests : AbpIntegratedTest< claimsPrincipal.Identities.First().AddClaim(new Claim(AbpClaimTypes.PhoneNumberVerified, "test-source-phoneNumberVerified")); claimsPrincipal.Identities.First().AddClaim(new Claim("my-claim", "test-source-my-claim")); - DynamicClaims.Claims.AddRange(new [] - { - new AbpDynamicClaim("preferred_username", "test-preferred_username"), - new AbpDynamicClaim(ClaimTypes.GivenName, "test-given_name"), - new AbpDynamicClaim("family_name", "test-family_name"), - new AbpDynamicClaim("role", "test-role1"), - new AbpDynamicClaim("roles", "test-role2"), - new AbpDynamicClaim(ClaimTypes.Role, "test-role3"), - new AbpDynamicClaim("email", "test-email"), - new AbpDynamicClaim(AbpClaimTypes.EmailVerified, "test-email-verified"), - new AbpDynamicClaim(AbpClaimTypes.PhoneNumberVerified, null), - }); - await _dynamicClaimsPrincipalContributorBase.ContributeAsync(new AbpClaimsPrincipalContributorContext(claimsPrincipal, GetRequiredService())); claimsPrincipal.Identities.First().Claims.ShouldContain(c => c.Type == AbpClaimTypes.UserName && c.Value == "test-preferred_username"); diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json index 6cabc6fa5d..e840810bfc 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json @@ -8,7 +8,7 @@ "Surname": "Příjmení", "EmailAddress": "Email", "PhoneNumber": "Telefonní číslo", - "UserInformations": "Uživatelské informace", + "UserInformations": "Uživatelské Informace", "DisplayName:IsDefault": "Výchozí", "DisplayName:IsStatic": "Statické", "DisplayName:IsPublic": "Veřejné", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json index 9a9c8b25ba..c3e6fb7add 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json @@ -8,7 +8,7 @@ "Surname": "Surname", "EmailAddress": "Email address", "PhoneNumber": "Phone number", - "UserInformations": "User information", + "UserInformations": "User Information", "DisplayName:IsDefault": "Default", "DisplayName:IsStatic": "Static", "DisplayName:IsPublic": "Public", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json index 5410e8b81a..f7b0280293 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json @@ -8,7 +8,7 @@ "Surname":"Surname", "EmailAddress": "Email address", "PhoneNumber": "Phone number", - "UserInformations": "User information", + "UserInformations": "User Information", "DisplayName:IsDefault": "Default", "DisplayName:IsStatic": "Static", "DisplayName:IsPublic": "Public", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json index 7fdbe1914e..ab5b43e980 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json @@ -8,7 +8,7 @@ "Surname": "Apellido", "EmailAddress": "Dirección e-mail", "PhoneNumber": "Número de teléfono", - "UserInformations": "Información de usuario", + "UserInformations": "Información de Usuario", "DisplayName:IsDefault": "Predeterminado", "DisplayName:IsStatic": "Estático", "DisplayName:IsPublic": "Público", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json index 9c564ee028..5ceda22c25 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json @@ -8,7 +8,7 @@ "Surname": "Sukunimi", "EmailAddress": "Sähköpostiosoite", "PhoneNumber": "Puhelinnumero", - "UserInformations": "Käyttäjän tiedot", + "UserInformations": "Käyttäjän Tiedot", "DisplayName:IsDefault": "Oletus", "DisplayName:IsStatic": "Staattinen", "DisplayName:IsPublic": "Julkinen", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json index 6bba226d60..7eee5a90af 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json @@ -8,7 +8,7 @@ "Surname": "Nom", "EmailAddress": "Adresse e-mail", "PhoneNumber": "Numéro de téléphone", - "UserInformations": "Informations utilisateur", + "UserInformations": "Informations Utilisateur", "DisplayName:IsDefault": "Par défaut", "DisplayName:IsStatic": "Statique", "DisplayName:IsPublic": "Public", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json index e5919cde80..c1ff5f1ebc 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json @@ -8,7 +8,7 @@ "Surname": "Prezime", "EmailAddress": "Email adresa", "PhoneNumber": "Broj telefona", - "UserInformations": "Informacije o korisniku", + "UserInformations": "Informacije o Korisniku", "DisplayName:IsDefault": "Zadano", "DisplayName:IsStatic": "Je statično", "DisplayName:IsPublic": "Je javno", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json index be4b1602a6..c4858f3c11 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json @@ -8,7 +8,7 @@ "Surname": "Vezetéknév", "EmailAddress": "Email cím", "PhoneNumber": "Telefonszám", - "UserInformations": "Felhasználói információ", + "UserInformations": "Felhasználói Információ", "DisplayName:IsDefault": "Alapértelmezett", "DisplayName:IsStatic": "Statikus", "DisplayName:IsPublic": "Publikus", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json index 6459e6a436..dab7f027b7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json @@ -8,7 +8,7 @@ "Surname": "Cognome", "EmailAddress": "Indirizzo e-mail", "PhoneNumber": "Numero di telefono", - "UserInformations": "Informazioni utente", + "UserInformations": "Informazioni Utente", "DisplayName:IsDefault": "Predefinito", "DisplayName:IsStatic": "Statico", "DisplayName:IsPublic": "Pubblico", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json index 776d2d9e2c..57afe1c640 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json @@ -8,7 +8,7 @@ "Surname": "Achternaam", "EmailAddress": "E-mail adres", "PhoneNumber": "Telefoonnummer", - "UserInformations": "Gebruikers informatie", + "UserInformations": "Gebruikers Informatie", "DisplayName:IsDefault": "Standaard", "DisplayName:IsStatic": "Statisch", "DisplayName:IsPublic": "Openbaar", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json index efadd1e638..326e4217de 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json @@ -8,7 +8,7 @@ "Surname": "Nazwisko", "EmailAddress": "Adres email", "PhoneNumber": "Numer telefonu", - "UserInformations": "Notyfikacje użytkownika", + "UserInformations": "Notyfikacje Użytkownika", "DisplayName:IsDefault": "Domyślny", "DisplayName:IsStatic": "Statyczny", "DisplayName:IsPublic": "Publiczny", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json index e092ff3e4a..525471262d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json @@ -8,7 +8,7 @@ "Surname": "Nume", "EmailAddress": "Adresa de email", "PhoneNumber": "Număr de telefon", - "UserInformations": "Informaţii de utilizator", + "UserInformations": "Informaţii de Utilizator", "DisplayName:IsDefault": "Implicit", "DisplayName:IsStatic": "Static", "DisplayName:IsPublic": "Public", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json index 26cc0ccfa0..3e960ded9c 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json @@ -8,7 +8,7 @@ "Surname": "Фамилия", "EmailAddress": "Адрес электронной почты", "PhoneNumber": "Номер телефона", - "UserInformations": "Информация о пользователе", + "UserInformations": "Информация о Пользователе", "DisplayName:IsDefault": "По умолчанию", "DisplayName:IsStatic": "Статичная", "DisplayName:IsPublic": "Доступно", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json index 961eac42eb..7f1041b756 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json @@ -8,7 +8,7 @@ "Surname": "Priezvisko", "EmailAddress": "Emailová adresa", "PhoneNumber": "Telefónne číslo", - "UserInformations": "Informácie o používateľovi", + "UserInformations": "Informácie o Používateľovi", "DisplayName:IsDefault": "Predvolený", "DisplayName:IsStatic": "Statický", "DisplayName:IsPublic": "Verejný", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json index 0bdcb60162..9032d14ca9 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json @@ -8,7 +8,7 @@ "Surname": "Priimek", "EmailAddress": "E-poštni naslov", "PhoneNumber": "Telefonska številka", - "UserInformations": "Informacije o uporabniku", + "UserInformations": "Informacije o Uporabniku", "DisplayName:IsDefault": "Privzeto", "DisplayName:IsStatic": "Statično", "DisplayName:IsPublic": "Javno", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json index a676592b80..f4f61ce798 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json @@ -8,7 +8,7 @@ "Surname": "Soyadı", "EmailAddress": "E-posta adresi", "PhoneNumber": "Telefon numarası", - "UserInformations": "Kullanıcı bilgileri", + "UserInformations": "Kullanıcı Bilgileri", "DisplayName:IsDefault": "Varsayılan", "DisplayName:IsStatic": "Sabit", "DisplayName:IsPublic": "Herkese Açık", diff --git a/modules/openiddict/app/angular/angular.json b/modules/openiddict/app/angular/angular.json index 34103ef0a8..3fea4d174b 100644 --- a/modules/openiddict/app/angular/angular.json +++ b/modules/openiddict/app/angular/angular.json @@ -105,7 +105,11 @@ "inject": false, "bundleName": "abp-bundle.rtl" }, - "node_modules/bootstrap-icons/font/bootstrap-icons.css", + { + "input": "node_modules/bootstrap-icons/font/bootstrap-icons.css", + "inject": true, + "bundleName": "bootstrap-icons" + }, "src/styles.scss" ], "scripts": [] diff --git a/npm/ng-packs/apps/dev-app/project.json b/npm/ng-packs/apps/dev-app/project.json index 72759f38ad..10c72d7127 100644 --- a/npm/ng-packs/apps/dev-app/project.json +++ b/npm/ng-packs/apps/dev-app/project.json @@ -108,7 +108,11 @@ "inject": false, "bundleName": "ng-zorro-antd-tree" }, - "node_modules/bootstrap-icons/font/bootstrap-icons.css", + { + "input": "node_modules/bootstrap-icons/font/bootstrap-icons.css", + "inject": true, + "bundleName": "bootstrap-icons" + }, "apps/dev-app/src/styles.scss" ], "scripts": [] diff --git a/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.html b/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.html index 368750a45a..8777254cfd 100644 --- a/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.html +++ b/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.html @@ -27,7 +27,7 @@ formControlName="confirmPassword" /> - {{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}

+

{{ 'AbpFeatureManagement::Menu:FeatureManagement' | abpLocalization }}

+ +
+

{{ 'AbpFeatureManagement::ManageHostFeaturesText' | abpLocalization }}

diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html index 2e4e28fea8..a3324960e0 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html @@ -107,7 +107,7 @@ {{ description }} -
+
@@ -117,9 +117,14 @@ + +
- {{ diff --git a/npm/ng-packs/packages/schematics/src/commands/change-theme/index.ts b/npm/ng-packs/packages/schematics/src/commands/change-theme/index.ts index f524f705fa..f922288f31 100644 --- a/npm/ng-packs/packages/schematics/src/commands/change-theme/index.ts +++ b/npm/ng-packs/packages/schematics/src/commands/change-theme/index.ts @@ -24,6 +24,7 @@ export default function (_options: ChangeThemeOptions): Rule { return async () => { const targetThemeName = _options.name; const selectedProject = _options.targetProject; + if (!targetThemeName) { throw new SchematicsException('The theme name does not selected'); } diff --git a/npm/ng-packs/packages/schematics/src/commands/change-theme/style-map.ts b/npm/ng-packs/packages/schematics/src/commands/change-theme/style-map.ts index a0db18aaf2..0b9f724e57 100644 --- a/npm/ng-packs/packages/schematics/src/commands/change-theme/style-map.ts +++ b/npm/ng-packs/packages/schematics/src/commands/change-theme/style-map.ts @@ -191,6 +191,11 @@ styleMap.set(ThemeOptionsEnum.LeptonX, [ inject: false, bundleName: 'abp-bundle.rtl', }, + { + input: 'node_modules/bootstrap-icons/font/bootstrap-icons.css', + inject: true, + bundleName: 'bootstrap-icons', + }, ]); styleMap.set(ThemeOptionsEnum.LeptonXLite, [ { @@ -243,6 +248,11 @@ styleMap.set(ThemeOptionsEnum.LeptonXLite, [ inject: false, bundleName: 'abp-bundle.rtl', }, + { + input: 'node_modules/bootstrap-icons/font/bootstrap-icons.css', + inject: true, + bundleName: 'bootstrap-icons', + }, ]); // the code written by Github co-pilot. thank go-pilot. You are the best sidekick. export const allStyles = Array.from(styleMap.values()).reduce((acc, val) => [...acc, ...val], []); diff --git a/npm/ng-packs/packages/setting-management/config/src/lib/components/email-setting-group/email-setting-group.component.html b/npm/ng-packs/packages/setting-management/config/src/lib/components/email-setting-group/email-setting-group.component.html index 3ab5623492..72ff2b37d1 100644 --- a/npm/ng-packs/packages/setting-management/config/src/lib/components/email-setting-group/email-setting-group.component.html +++ b/npm/ng-packs/packages/setting-management/config/src/lib/components/email-setting-group/email-setting-group.component.html @@ -1,14 +1,8 @@

{{ 'AbpSettingManagement::Menu:Emailing' | abpLocalization }}

-
+
-
+
-
+
@@ -81,9 +75,9 @@
- + {{ diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html b/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html index 1804050cf8..9e1466310d 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html @@ -49,7 +49,7 @@ -