diff --git a/Directory.Packages.props b/Directory.Packages.props index 0d61ef436a..b7409b5c8f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -186,5 +186,6 @@ + \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index abd7184278..7ef0ca75e9 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -1910,6 +1910,7 @@ "DoYouSupportCustomABPArchitectures": "Do you support custom ABP architectures?", "SupportCustomABPArchitecturesExplanation": "No. Support is only provided for standard ABP solution structures. On the other hand, you can always get support for your custom needs with a paid consultancy from the ABP Team.", "DoesABPCollectAnyPersonalOrTechnicalData": "Does ABP collect any personal or technical data?", - "ABPCollectAnyDataExplanation": "The software may collect information about you and your use of the software, and send that to Volosoft. Volosoft as the software and service provider may use this information to provide services and improve its products & services. You may opt-out of these scenarios, as described in the EULA under PRIVACY AND COLLECTION OF PERSONAL DATA topic ." + "ABPCollectAnyDataExplanation": "The software may collect information about you and your use of the software, and send that to Volosoft. Volosoft as the software and service provider may use this information to provide services and improve its products & services. You may opt-out of these scenarios, as described in the EULA under PRIVACY AND COLLECTION OF PERSONAL DATA topic .", + "InThisDocument": "In this document" } } diff --git a/docs/en/Community-Articles/2025-08-25-App-Services-vs-Domain-Services/POST.md b/docs/en/Community-Articles/2025-08-25-App-Services-vs-Domain-Services/POST.md new file mode 100644 index 0000000000..534dc1abe1 --- /dev/null +++ b/docs/en/Community-Articles/2025-08-25-App-Services-vs-Domain-Services/POST.md @@ -0,0 +1,213 @@ +# App Services vs Domain Services: Deep Dive into Two Core Service Types in ABP Framework + +In ABP's layered architecture, we frequently encounter two types of services that appear similar but serve distinctly different purposes: Application Services and Domain Services. Understanding the differences between them is crucial for building clear and maintainable enterprise applications. + +## Architectural Positioning + +In ABP's layered architecture: + +- **Application Services** reside in the application layer and are responsible for coordinating use case execution +- **Domain Services** reside in the domain layer and are responsible for implementing core business logic + +This layered design follows Domain-Driven Design (DDD) principles, ensuring clear separation of business logic and system maintainability. + +## Application Services: Use Case Orchestrators + +### Core Responsibilities + +Application Services are stateless services primarily used to implement application use cases. They act as a bridge between the presentation layer and domain layer, responsible for: + +- **Parameter Validation**: Input validation is automatically handled by ABP using data annotations +- **Authorization**: Checking user permissions and access control using `[Authorize]` attribute or manual authorization checks via `IAuthorizationService` +- **Transaction Management**: Methods automatically run as Unit of Work (transactional by default) +- **Use Case Orchestration**: Organizing and coordinating multiple domain objects to complete specific business use cases +- **Data Transformation**: Handling conversion between DTOs and domain objects using ObjectMapper + +### Design Principles + +1. **DTO Boundaries**: Application service methods should only accept and return DTOs, never directly expose domain entities +2. **Use Case Oriented**: Each method should correspond to a clear user use case +3. **Thin Layer Design**: Avoid implementing complex business logic in application services + +### Typical Execution Flow + +A standard application service method typically follows this pattern: + +```csharp +[Authorize(BookPermissions.Create)] // Declarative authorization +public virtual async Task CreateBookAsync(CreateBookDto input) // input is automatically validated +{ + // Get related data + var author = await _authorRepository.GetAsync(input.AuthorId); + + // Call domain service to execute business logic (if needed) + // You can also use the entity constructor directly if no complex business logic is required + var book = await _bookManager.CreateAsync(input.Title, author, input.Price); + + // Persist changes + await _bookRepository.InsertAsync(book); + + // Return DTO + return ObjectMapper.Map(book); +} +``` + +### Integration Services: Special kind of Application Service + +It's worth mentioning that ABP also provides a special type of application service—Integration Services. They are application services marked with the `[IntegrationService]` attribute, designed for inter-module or inter-microservice communication. + +We have a community article dedicated to integration services: [Integration Services Explained — What they are, when to use them, and how they behave](https://abp.io/community/articles/integration-services-explained-what-they-are-when-to-use-lienmsy8) + +## Domain Services: Guardians of Business Logic + +### Core Responsibilities + +Domain Services implement core business logic and are particularly needed when: + +- **Core domain logic depends on services**: You need to implement logic that requires repositories or other external services +- **Logic spans multiple aggregates**: The business logic is related to more than one aggregate/entity and doesn't properly fit in any single aggregate +- **Complex business rules**: Complex domain rules that don't naturally belong in a single entity + +### Design Principles + +1. **Domain Object Interaction**: Method parameters and return values should be domain objects (entities, value objects), never DTOs +2. **Business Logic Focus**: Focus on implementing pure business rules +3. **Stateless Design**: Maintain the stateless nature of services +4. **State-Changing Operations Only**: Domain services should only define methods that mutate data, not query methods +5. **No Authorization Logic**: Domain services should not perform authorization checks or depend on current user context +6. **Specific Method Names**: Use descriptive, business-meaningful method names (e.g., `AssignToAsync`) instead of generic names (e.g., `UpdateAsync`) + +### Implementation Example + +```csharp +public class IssueManager : DomainService +{ + private readonly IRepository _issueRepository; + + public virtual async Task AssignToAsync(Issue issue, Guid userId) + { + // Business rule: Check user's unfinished task count + var openIssueCount = await _issueRepository.GetCountAsync(i => i.AssignedUserId == userId && !i.IsClosed); + + if (openIssueCount >= 3) + { + throw new BusinessException("IssueTracking:ConcurrentOpenIssueLimit"); + } + + // Execute assignment logic + issue.AssignedUserId = userId; + issue.AssignedDate = Clock.Now; + } +} +``` + +## Key Differences Comparison + +| Dimension | Application Services | Domain Services | +|-----------|---------------------|-----------------| +| **Layer Position** | Application Layer | Domain Layer | +| **Primary Responsibility** | Use Case Orchestration | Business Logic Implementation | +| **Data Interaction** | DTOs | Domain Objects | +| **Callers** | Presentation Layer/Client Applications | Application Services/Other Domain Services | +| **Authorization** | Responsible for permission checks | No authorization logic | +| **Transaction Management** | Manages transaction boundaries (Unit of Work) | Participates in transactions but doesn't manage | +| **Current User Context** | Can access current user information | Should not depend on current user context | +| **Return Types** | Returns DTOs | Returns domain objects only | +| **Query Operations** | Can perform query operations | Should not define GET/query methods | +| **Naming Convention** | `*AppService` | `*Manager` or `*Service` | + +## Collaboration Patterns in Practice + +In real-world development, these two types of services typically work together: + +```csharp +// Application Service +public class BookAppService : ApplicationService +{ + private readonly BookManager _bookManager; + private readonly IRepository _bookRepository; + + [Authorize(BookPermissions.Update)] + public virtual async Task UpdatePriceAsync(Guid id, decimal newPrice) + { + var book = await _bookRepository.GetAsync(id); + + await _bookManager.ChangePriceAsync(book, newPrice); + + await _bookRepository.UpdateAsync(book); + + return ObjectMapper.Map(book); + } +} + +// Domain Service +public class BookManager : DomainService +{ + public virtual async Task ChangePriceAsync(Book book, decimal newPrice) + { + // Domain service focuses on business rules + if (newPrice <= 0) + { + throw new BusinessException("Book:InvalidPrice"); + } + + if (book.IsDiscounted && newPrice > book.OriginalPrice) + { + throw new BusinessException("Book:DiscountedPriceCannotExceedOriginal"); + } + + if (book.Price == newPrice) + { + return; + } + + // Additional business logic: Check if price change requires approval + if (await RequiresApprovalAsync(book, newPrice)) + { + throw new BusinessException("Book:PriceChangeRequiresApproval"); + } + + book.ChangePrice(newPrice); + } + + private Task RequiresApprovalAsync(Book book, decimal newPrice) + { + // Example business rule: Large price increases require approval + var increasePercentage = ((newPrice - book.Price) / book.Price) * 100; + return Task.FromResult(increasePercentage > 50); // 50% increase threshold + } +} +``` + +## Best Practice Recommendations + +### Application Services +- Create a corresponding application service for each aggregate root +- Use clear naming conventions (e.g., `IBookAppService`) +- Implement standard CRUD operation methods (`GetAsync`, `CreateAsync`, `UpdateAsync`, `DeleteAsync`) +- Avoid inter-application service calls within the same module/application +- Always return DTOs, never expose domain entities directly +- Use the `[Authorize]` attribute for declarative authorization or manual checks via `IAuthorizationService` +- Methods automatically run as Unit of Work (transactional) +- Input validation is handled automatically by ABP + +### Domain Services +- Use the `Manager` suffix for naming (e.g., `BookManager`) +- Only define state-changing methods, avoid query methods (use repositories directly in Application Services for queries) +- Throw `BusinessException` with clear, unique error codes for domain validation failures +- Keep methods pure, avoid involving user context or authorization logic +- Accept and return domain objects only, never DTOs +- Use descriptive, business-meaningful method names (e.g., `AssignToAsync`, `ChangePriceAsync`) +- Do not implement interfaces unless there's a specific need for multiple implementations + +## Summary + +Application Services and Domain Services each have their distinct roles in the ABP framework: Application Services serve as use case orchestrators, handling authorization, validation, transaction management, and DTO transformations; Domain Services focus purely on business logic implementation without any infrastructure concerns. Integration Services are a special type of Application Service designed for inter-service communication. + +Correctly understanding and applying these service patterns is key to building high-quality ABP applications. Through clear separation of responsibilities, we can not only build more maintainable code but also flexibly switch between monolithic and microservice architectures—this is precisely the elegance of ABP framework design. + +## References + +- [Application Services](https://abp.io/docs/latest/framework/architecture/domain-driven-design/application-services) +- [Integration Services](https://abp.io/docs/latest/framework/api-development/integration-services) +- [Domain Services](https://abp.io/docs/latest/framework/architecture/domain-driven-design/domain-services) diff --git a/docs/en/Community-Articles/2025-08-25-App-Services-vs-Domain-Services/cover.png b/docs/en/Community-Articles/2025-08-25-App-Services-vs-Domain-Services/cover.png new file mode 100644 index 0000000000..a59643d12a Binary files /dev/null and b/docs/en/Community-Articles/2025-08-25-App-Services-vs-Domain-Services/cover.png differ diff --git a/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/AutoMapper-Alternatives.md b/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/AutoMapper-Alternatives.md new file mode 100644 index 0000000000..e9c4dec4ee --- /dev/null +++ b/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/AutoMapper-Alternatives.md @@ -0,0 +1,338 @@ +# Best Free Alternatives to AutoMapper in .NET — Why We Moved to Mapperly + +--- + +## Introduction + +[AutoMapper](https://automapper.io/) has been one of the most popular mapping library for .NET apps. It has been free and [open-source](https://github.com/LuckyPennySoftware/AutoMapper) since 2009. On 16 April 2025, Jimmy Bogard (the owner of the project) decided to make it commercial for his own reasons. You can read [this announcement](https://www.jimmybogard.com/automapper-and-mediatr-licensing-update/) about what happened to AutoMapper. + + + +### Why AutoMapper’s licensing change matters + +In ABP Framework we have been also using AutoMapper for object mappings. After its commercial transition, we also needed to replace it. Because ABP Framework is open-source and under [LGPL-3.0 license](https://github.com/abpframework/abp#LGPL-3.0-1-ov-file). + +**TL;DR** + +> That's why, **we decided to replace AutoMapper with Mapperly**. + +In this article, we'll discuss the alternatives of AutoMapper so that you can cut down on costs and maximize performance while retaining control over your codebase. Also I'll explain why we chose Mapperly. + +Also AutoMapper uses heavily reflection. And reflection comes with a performance cost if used indiscriminately, and compile-time safety is limited. Let's see how we can overcome these... + + + +## Cost-Free Alternatives to AutoMapper + +Check out the comparison table for key features vs. AutoMapper. + +| | **AutoMapper (Paid)** | **Mapster (Free)** | **Mapperly (Free)** | **AgileMapper (Free)** | **Manual Mapping** | +| ------------------- | ----------------------------------------------- | ----------------------------------------- | -------------------------------------------- | ------------------------------------------- | ------------------------------------------------ | +| **License & Cost** | Paid/commercial | Free, MIT License | Free, MIT License | Free, Apache 2.0 | Free (no library) | +| **Performance** | Slower due to reflection & conventions | Very fast (runtime & compile-time modes) | Very fast (compile-time code generation) | Good, faster than AutoMapper | Fastest (direct assignment) | +| **Ease of Setup** | Easy, but configuration-heavy | Easy, minimal config | Easy, but different approach from AutoMapper | Simple, flexible configuration | Manual coding required | +| **Features** | Rich features, conventions, nested mappings | Strong typed mappings, projection support | Strong typed, compile-time safe mappings | Dynamic & conditional mapping | Whatever you code | +| **Maintainability** | Hidden mappings can be hard to debug | Explicit & predictable | Very explicit, compiler-verified mappings | Readable, good balance | Very explicit, most maintainable | +| **Best For** | Large teams used to AutoMapper & willing to pay | Teams wanting performance + free tool | Teams prioritizing type-safety & performance | Developers needing flexibility & simplicity | Small/medium projects, performance-critical apps | + +There are other libraries such as [**ExpressMapper**](https://github.com/fluentsprings/ExpressMapper) **(308 GitHub stars)**, [**ValueInjecter**](https://github.com/omuleanu/ValueInjecter) **(258 GitHub stars)**, [**AgileMapper**](https://github.com/agileobjects/AgileMapper) **(463 GitHub stars)**. These are not very popular but also free and offer a different balance of simplicity and features. + + + +## Why We Chose Mapperly + +We filtered down all the alternatives into 2: **Mapster** and **Mapperly**. + +The crucial factor was maintainability! As you see from the screenshots below, Mapster is already stopped development. Mapster’s development appears stalled, and its future maintenance is uncertain. On the other hand, Mapperly regularly gets commits. The community support is valuable. + +We looked up different alternatives of AutoMapper also, here's the initial issue of AutoMapper replacement [github.com/abpframework/abp/issues/23243](https://github.com/abpframework/abp/issues/23243). + +The ABP team started Mapperly integration with this initial commit [github.com/abpframework/abp/commit/178d3f56d42b4e5acb7e349470f4a644d4c5214e](https://github.com/abpframework/abp/commit/178d3f56d42b4e5acb7e349470f4a644d4c5214e). And this is our Mapperly integration package : [github.com/abpframework/abp/tree/dev/framework/src/Volo.Abp.Mapperly.](https://github.com/abpframework/abp/tree/dev/framework/src/Volo.Abp.Mapperly.) + +![Community Powers](mapster-mapperly-community-powers.png) + +Here are some considerations for developers who are used to ABP and AutoMapper. + +### [Mapster](https://github.com/MapsterMapper/Mapster): + +* ✔ It is similar to AutoMapper, configuring mappings through code. +* ✔ Support for dependency injection and complex runtime configuration. +* ❌ It is looking additional Mapster maintainers ([Call for additional Mapster maintainers MapsterMapper/Mapster#752](https://github.com/MapsterMapper/Mapster/discussions/752)) + +### [Mapperly](https://github.com/riok/Mapperly): + +- ✔ It generates mapping code(` source generator`) during the build process. +- ✔ It is actively being developed and maintained. +- ❌ It is a static `map` method, which is not friendly to dependency injection. +- ❌ The configuration method is completely different from AutoMapper, and there is a learning curve. + + + +**Mapperly** → generates mapping code at **compile time** using source generators. + +**Mapster** → has two modes: + +- By default, it uses **runtime code generation** (via expression trees and compilation). + +- But with **Mapster.Tool** (source generator), it can also generate mappings at **compile time**. + + + +This is important because it guarantees the mappings are working well. Also they provide type safety and improved performance. Another advantages of these libraries, they eliminate runtime surprises and offer better IDE support. + +--- + +## When Mapperly Will Come To ABP + +Mapperly integration will be delivered with ABP v10. If you have already defined AutoMapper configurations, you can still keep and use them. But the framework will use Mapperly. So there'll be 2 mapping integrations in your app. You can also remove AutoMapper from your final application and use one mapping library: Mapperly. It's up to you! Check [AutoMapper pricing table](https://automapper.io/#pricing). + + + +## Migrating from AutoMapper to Mapperly + +In ABP v10, we will be migrating from AutoMapper to Mapperly. The document about the migration is not delivered by the time I wrote this article, but you can reach the document in our dev docs branch + +* [github.com/abpframework/abp/blob/dev/docs/en/release-info/migration-guides/AutoMapper-To-Mapperly.md](https://github.com/abpframework/abp/blob/dev/docs/en/release-info/migration-guides/AutoMapper-To-Mapperly.md). + +Also for ABP, you can check out how you will define DTO mappings based on Mapperly at this document + +* [github.com/abpframework/abp/blob/dev/docs/en/framework/infrastructure/object-to-object-mapping.md](https://github.com/abpframework/abp/blob/dev/docs/en/framework/infrastructure/object-to-object-mapping.md) + + + +## Mapping Code Examples for AutoMapper, Mapster, AgileMapper + +### AutoMapper vs Mapster vs Mapperly Performance + +Here are concise, drop-in **side-by-side C# snippets** that map the same model with AutoMapper, Mapster, AgileMapper, and manual mapping. + + Models used in all examples + +We'll use these models to show the mapping examples for AutoMapper, Mapster, AgileMapper. + +```csharp +public class Order +{ + public int Id { get; set; } + public Customer Customer { get; set; } = default!; + public List Lines { get; set; } = new(); + public DateTime CreatedAt { get; set; } +} + +public class Customer +{ + public int Id { get; set; } + public string Name { get; set; } = ""; + public string? Email { get; set; } +} + +public class OrderLine +{ + public int ProductId { get; set; } + public int Quantity { get; set; } + public decimal UnitPrice { get; set; } +} + +public class OrderDto +{ + public int Id { get; set; } + public string CustomerName { get; set; } = ""; + public int ItemCount { get; set; } + public decimal Total { get; set; } + public string CreatedAtIso { get; set; } = ""; +} +``` + + + +#### AutoMapper Example (Paid) + +```csharp +public sealed class OrderProfile : Profile +{ + public OrderProfile() + { + CreateMap() + .ForMember(d => d.CustomerName, m => m.MapFrom(s => s.Customer.Name)) + .ForMember(d => d.ItemCount, m => m.MapFrom(s => s.Lines.Sum(l => l.Quantity))) + .ForMember(d => d.Total, m => m.MapFrom(s => s.Lines.Sum(l => l.Quantity * l.UnitPrice))) + .ForMember(d => d.CreatedAtIso,m => m.MapFrom(s => s.CreatedAt.ToString("O"))); + } +} + +// registration +services.AddAutoMapper(typeof(OrderProfile)); + +// mapping +var dto = mapper.Map(order); + +// EF Core projection (common pattern) +var list = dbContext.Orders + .ProjectTo(mapper.ConfigurationProvider) + .ToList(); +``` + +**NuGet Packages:** + +- https://www.nuget.org/packages/AutoMapper +- https://www.nuget.org/packages/AutoMapper.Extensions.Microsoft.DependencyInjection + +--- + +#### Mapperly (Free, Apache-2.0) + +This is compile-time generated mapping. + +```csharp +[Mapper] // generates the implementation at build time +public partial class OrderMapper +{ + // Simple property mapping: Customer.Name -> CustomerName + [MapProperty(nameof(Order.Customer) + "." + nameof(Customer.Name), nameof(OrderDto.CustomerName))] + public partial OrderDto ToDto(Order source); + + // Update an existing target (like MapToExisting) + [MapProperty(nameof(Order.Customer) + "." + nameof(Customer.Name), nameof(OrderDto.CustomerName))] + public partial void UpdateDto(Order source, OrderDto target); + + public OrderDto Map(Order s) + { + var d = ToDto(s); + AfterMap(s, d); + return d; + } + + public void Map(Order source, OrderDto d) + { + UpdateDto(source, d); + AfterMap(source, d); + } + + private void AfterMap(Order source, OrderDto d) + { + d.ItemCount = source.Lines.Sum(l => l.Quantity); + d.Total = source.Lines.Sum(l => l.Quantity * l.UnitPrice); + d.CreatedAtIso = source.CreatedAt.ToString("O"); + } +} + + +//USAGE +var mapper = new OrderMapper(); +var order = new Order +{ + Id = 1, + Customer = new Customer { Id = 1, Name = "John Doe", Email = "johndoe@abp.io" }, + Lines = + [ + new OrderLine {ProductId = 1, Quantity = 2, UnitPrice = 10.0m}, + new OrderLine {ProductId = 2, Quantity = 1, UnitPrice = 20.0m} + ] +}; + +// Map to a new object +var dto = mapper.Map(order); + +// Map to an existing object +var target = new OrderDto(); +mapper.Map(order, target); +``` + +**NuGet Packages:** + +* https://www.nuget.org/packages/Riok.Mapperly/ + +--- + +#### Mapster Example (Free, MIT) + +```csharp +TypeAdapterConfig.NewConfig() + .Map(d => d.CustomerName, s => s.Customer.Name) + .Map(d => d.ItemCount, s => s.Lines.Sum(l => l.Quantity)) + .Map(d => d.Total, s => s.Lines.Sum(l => l.Quantity * l.UnitPrice)) + .Map(d => d.CreatedAtIso, s => s.CreatedAt.ToString("O")); + +// one-off +var dto = order.Adapt(); + +// DI-friendly registration +services.AddSingleton(TypeAdapterConfig.GlobalSettings); +services.AddScoped(); + +// EF Core projection (strong suit) +var mappedList = dbContext.Orders + .ProjectToType() // Mapster projection + .ToList(); +``` + +**NuGet Packages:** + +- https://www.nuget.org/packages/Mapster +- https://www.nuget.org/packages/Mapster.DependencyInjection +- https://www.nuget.org/packages/Mapster.SourceGenerator (for performance improvement) + +--- + +#### AgileMapper Example (Free, Apache-2.0) + +```csharp +var mapper = Mapper.CreateNew(cfg => +{ + cfg.WhenMapping + .From() + .To() + .Map(ctx => ctx.Source.Customer.Name).To(dto => dto.CustomerName) + .Map(ctx => ctx.Source.Lines.Sum(l => l.Quantity)).To(dto => dto.ItemCount) + .Map(ctx => ctx.Source.Lines.Sum(l => l.Quantity * l.UnitPrice)).To(dto => dto.Total) + .Map(ctx => ctx.Source.CreatedAt.ToString("O")).To(dto => dto.CreatedAtIso); +}); + +var mappedDto = mapper.Map(order).ToANew(); +``` + +**NuGet Packages:** + +* https://www.nuget.org/packages/AgileObjects.AgileMapper + + +--- + +#### Manual (Pure) Mapping (no library) + +Straightforward, fastest, and most explicit. Good for simple applications which doesn't need long term maintenance. Hand-written mapping is faster, safer, and more maintainable. And for tiny mappings, you can still use manual mapping. + +* Examples of when manual mapping is better than libraries. + +```csharp +public static class OrderMapping +{ + public static OrderDto ToDto(this Order s) => new() + { + Id = s.Id, + CustomerName = s.Customer.Name, + ItemCount = s.Lines.Sum(l => l.Quantity), + Total = s.Lines.Sum(l => l.Quantity * l.UnitPrice), + CreatedAtIso = s.CreatedAt.ToString("O") + }; +} + +// usage +var dto = order.ToDto(); + +// EF Core projection (best for perf + SQL translation) +var mappedList = dbContext.Orders.Select(s => new OrderDto + { + Id = s.Id, + CustomerName = s.Customer.Name, + ItemCount = s.Lines.Sum(l => l.Quantity), + Total = s.Lines.Sum(l => l.Quantity * l.UnitPrice), + CreatedAtIso = s.CreatedAt.ToString("O") + }).ToList(); +``` + + + +### Conclusion + +If you rely on AutoMapper today, it’s time to evaluate alternatives. For ABP Framework, we chose **Mapperly** due to active development, strong community, and compile-time performance. But your team may prefer **Mapster** for flexibility or even manual mapping for small apps. Your requirements might be different, your project is not a framework so you decide the best one for you. diff --git a/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/cover.png b/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/cover.png new file mode 100644 index 0000000000..d1c7e26166 Binary files /dev/null and b/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/cover.png differ diff --git a/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/mapster-mapperly-community-powers.png b/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/mapster-mapperly-community-powers.png new file mode 100644 index 0000000000..c2e3adbbfc Binary files /dev/null and b/docs/en/Community-Articles/2025-08-25-AutoMapper-Alternatives/mapster-mapperly-community-powers.png differ diff --git a/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/POST.md b/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/POST.md new file mode 100644 index 0000000000..2d6c98102f --- /dev/null +++ b/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/POST.md @@ -0,0 +1,174 @@ +# Building a Permission-Based Authorization System for ASP.NET Core + +In this article, we'll explore different authorization approaches in ASP.NET Core and examine how ABP's permission-based authorization system works. + +First, we'll look at some of the core authorization types that come with ASP.NET Core, such as role-based, claims-based, policy-based, and resource-based authorization. We'll briefly review the pros and cons of each approach. + +Then, we'll dive into [ABP's Permission-Based Authorization System](https://abp.io/docs/latest/framework/fundamentals/authorization#permission-system). This is a more advanced approach that gives you fine-grained control over what users can do in your application. We'll also explore ABP's Permission Management Module, which makes managing permissions through the UI easily. + +## Understanding ASP.NET Core Authorization Types + +Before diving into permission-based authorization, let's examine some of the core authorization types available in ASP.NET Core: + +- **[Role-Based Authorization](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-9.0)** checks if the current user belongs to specific roles (like **"Admin"** or **"User"**) and grants access based on these roles. (For example, only users in the **"Manager"** role can access the employee salary management page.) + +- **[Claims-Based Authorization](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/claims?view=aspnetcore-9.0)** uses key-value pairs (claims) that describe user attributes, such as age, department, or security clearance. (For example, only users with a **"Department=Finance"** claim can view financial reports.) This provides more granular control but requires careful claim management (such as grouping claims under policies). + +- **[Policy-Based Authorization](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-9.0)** combines multiple requirements (roles, claims, custom logic) into reusable policies. It offers flexibility and centralized management, and **this is exactly why ABP's permission system is built on top of it!** (We'll discuss this in more detail later.) + +- **[Resource-Based Authorization](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/resourcebased?view=aspnetcore-9.0)** determines access by examining both the user and the specific item they want to access. (For example, a user can edit only their own blog posts, not others' posts.) Unlike policy-based authorization which applies the same rules everywhere, resource-based authorization makes decisions based on the actual data being accessed, requiring more complex implementation. + +Here's a quick comparison of these approaches: + +| Authorization Type | Pros | Cons | +|-------------------|------|------| +| **Role-Based** | Simple implementation, easy to understand | Becomes inflexible with complex role hierarchies | +| **Claims-Based** | Granular control, flexible user attributes | Complex claim management, potential for claim explosion | +| **Policy-Based** | Centralized logic, combines multiple requirements | Can become complex with numerous policies | +| **Resource-Based** | Fine-grained per-resource control | Implementation complexity, resource-specific code | + +## What is Permission-Based Authorization? + +Permission-based authorization takes a different approach from other authorization types by defining specific permissions (like **"CreateUser"**, **"DeleteOrder"**, **"ViewReports"**) that represent granular actions within your application. These permissions can be assigned to users directly or through roles, providing both flexibility and clear action-based access control. + +ABP Framework's permission system is built on top of this approach and extends ASP.NET Core's policy-based authorization system, working seamlessly with it. + +## ABP Framework's Permission System + +ABP extends [ASP.NET Core Authorization](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/introduction?view=aspnetcore-9.0) by adding **permissions** as automatic [policies](https://learn.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-9.0) and allows the authorization system to be used in application services as well. + +This system provides a clean abstraction while maintaining full compatibility with ASP.NET Core's authorization infrastructure. + +ABP also provides a [Permission Management Module](https://abp.io/docs/latest/modules/permission-management) that offers a complete UI and API for managing permissions. This allows you to easily manage permissions in the UI, assign permissions to roles or users, and much more. (We'll see how to use it in the following sections.) + +### Defining Permissions in ABP + +In ABP, permissions are defined in classes (typically under the `*.Application.Contracts` project) that inherit from the `PermissionDefinitionProvider` class. Here's how you can define permissions for a book management system: + +```csharp +public class BookStorePermissionDefinitionProvider : PermissionDefinitionProvider +{ + public override void Define(IPermissionDefinitionContext context) + { + var bookStoreGroup = context.AddGroup("BookStore"); + + var booksPermission = bookStoreGroup.AddPermission("BookStore.Books", L("Permission:Books")); + booksPermission.AddChild("BookStore.Books.Create", L("Permission:Books.Create")); + booksPermission.AddChild("BookStore.Books.Edit", L("Permission:Books.Edit")); + booksPermission.AddChild("BookStore.Books.Delete", L("Permission:Books.Delete")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} +``` + +ABP automatically discovers this class and registers the permissions/policies in the system. You can then assign these permissions/policies to users/roles. There are two ways to do this: + +* Using the [Permission Management Module](https://abp.io/docs/latest/modules/permission-management) +* Using the `IPermissionManager` service (via code) + +#### Setting Permissions to Roles and Users via Permission Management Module + +When you define a permission, it also becomes usable in the ASP.NET Core authorization system as a **policy name**. If you are using the [Permission Management Module](https://abp.io/docs/latest/modules/permission-management), you can manage the permissions through the UI: + +![](permission-management-module.png) + +In the permission management UI, you can grant permissions to roles and users through the **Role Management** and **User Management** pages within the "permissions" modals. You can then easily check these permissions in your code. In the screenshot above, you can see the permission modal for the user's page, clearly showing the permissions granted to the user by their role. (**(R)** in the UI indicates that the permission is granted by one of the current user's roles.) + +#### Setting Permissions to Roles and Users via Code + +You can also set permissions for roles and users programmatically. You just need to inject the `IPermissionManager` service and use its `SetForRoleAsync` and `SetForUserAsync` methods (or similar methods): + +```csharp +public class MyService : ITransientDependency +{ + private readonly IPermissionManager _permissionManager; + + public MyService(IPermissionManager permissionManager) + { + _permissionManager = permissionManager; + } + + public async Task GrantPermissionForUserAsync(Guid userId, string permissionName) + { + await _permissionManager.SetForUserAsync(userId, permissionName, true); + } + + public async Task ProhibitPermissionForUserAsync(Guid userId, string permissionName) + { + await _permissionManager.SetForUserAsync(userId, permissionName, false); + } +} +``` + +### Checking Permissions in AppServices and Controllers + +ABP provides multiple ways to check permissions. The most common approach is using the `[Authorize]` attribute and passing the permission/policy name. + +Here is an example of how to check permissions in an application service: + +```csharp +[Authorize("BookStore.Books")] +public class BookAppService : ApplicationService, IBookAppService +{ + [Authorize("BookStore.Books.Create")] + public async Task CreateAsync(CreateBookDto input) + { + //logic here + } +} +``` + +> Notice that you can use the `[Authorize]` attribute at both class and method levels. In the example above, the `CreateAsync` method is marked with the `[Authorize]` attribute, so it will check the user's permission before executing the method. Since the application service class also has a permission requirement, both permissions must be granted to the user to execute the method! + +And here is an example of how to check permissions in a controller: + +```csharp +[Authorize("BookStore.Books")] +public class CreateBookController : AbpController +{ + //omitted for brevity... +} +``` + +### Programmatic Permission Checking + +To conditionally control authorization in your code, you can use the `IAuthorizationService` service: + +```csharp +public class BookAppService : ApplicationService, IBookAppService +{ + public async Task CreateAsync(CreateBookDto input) + { + // Checks the permission and throws an exception if the user does not have the permission + await AuthorizationService.CheckAsync(BookStorePermissions.Books.Create); + + // Your logic here + } + + public async Task CanUserCreateBooksAsync() + { + // Checks if the permission is granted for the current user + return await AuthorizationService.IsGrantedAsync(BookStorePermissions.Books.Create); + } +} +``` + +You can use the `IAuthorizationService`'s helpful methods for authorization checking, as shown in the example above: + +- `IsGrantedAsync` checks if the current user has the given permission. +- `CheckAsync` throws an exception if the current user does not have the given permission. +- `AuthorizeAsync` checks if the current user has the given permission and returns an `AuthorizationResult`, which has a `Succeeded` property that you can use to verify if the user has the permission. + +Also notice that we did not inject the `IAuthorizationService` in the constructor, because we are using the `ApplicationService` base class, which already provides property injection for it. This means we can directly use it in our application services, just like other helpful base services (such as `ICurrentUser` and `ICurrentTenant`). + +## Conclusion + +Permission-based authorization in ABP Framework provides a powerful and flexible approach to securing your applications. By building on ASP.NET Core's policy-based authorization, ABP offers a clean abstraction that simplifies permission management while maintaining the full power of the underlying system. + +The ability to check permissions in both application services and controllers makes ABP Framework's authorization system very flexible and powerful, yet easy to use. + +Additionally, the Permission Management Module makes it very easy to manage permissions and roles through the UI. You can learn more about how it works in the [documentation](https://abp.io/docs/latest/modules/permission-management). diff --git a/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/cover-image.png b/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/cover-image.png new file mode 100644 index 0000000000..f0a0796034 Binary files /dev/null and b/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/cover-image.png differ diff --git a/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/permission-management-module.png b/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/permission-management-module.png new file mode 100644 index 0000000000..e22de787af Binary files /dev/null and b/docs/en/Community-Articles/2025-08-27-Building-a-permission-based-authorization-system-for-net-core/permission-management-module.png differ diff --git a/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md b/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md new file mode 100644 index 0000000000..f88bb0e41c --- /dev/null +++ b/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md @@ -0,0 +1,169 @@ +# Best Practices for Designing Backward‑Compatible REST APIs in a Microservice Solution for .NET Developers + +## Introduction +With microservice architecture, each service develops and ships independently at its own pace, and clients infrequently update in lockstep. **Backward compatibility** means that when you release new versions, current consumers continue to function without changing code. This article provides a practical, 6–7 minute tutorial specific to **.NET developers**. + +--- +## What Counts as “Breaking”? (and what doesn’t) +A change is **breaking** if a client that previously conformed can **fail at compile time or runtime**, or exhibit **different business‑critical behavior**, **without** changing that client in any way. In other words: if an old client needs to be altered in order to continue functioning as it did, your change is breaking. + +### Examples of breaking changes +- **Deleting or renaming an endpoint** or modifying its URL/route. +- **Making an existing field required** (e.g., requiring `address`). +- **Data type or format changes** (e.g., `price: string` → `price: number`, or date format changes). +- **Altering default behavior or ordering** that clients implicitly depend on (hidden contracts). +- **Changing the error model** or HTTP status codes in a manner that breaks pre-existing error handling. +- **Renaming fields** or **making optional fields required** in requests or responses. +- **Reinterpreting semantics** (e.g., `status="closed"` formerly included archived items, but no longer does). + +### Examples of non‑breaking changes +- **Optional fields or query parameters can be added** (clients may disregard them). +- **Adding new enum values** (if the clients default to a safe behavior for unrecognized values). +- **Adding a new endpoint** while leaving the previous one unchanged. +- **Performance enhancements** that leave input/output unchanged. +- **Including metadata** (e.g., pagination links) without changing the current payload shape. + +> Golden rule: **Old clients should continue to work exactly as they did before—without any changes.** + +--- +## Versioning Strategy +Versioning is your master control lever for managing change. Typical methods: + +1) **URI Segment** (simplest) +``` +GET /api/v1/orders +GET /api/v2/orders +``` +Pros: Cache/gateway‑friendly; explicit in docs. Cons: URL noise. + +2) **Header‑Based** +``` +GET /api/orders +x-api-version: 2.0 +``` +Pros: Clean URLs; multiple reader support. Cons: Needs proxy/CDN rules. + +3) **Media Type** + Accept: application/json;v=2 + + Pros: Semantically accurate.
Cons: More complicated to test and implement.
**Recommendation:** For the majority of teams, favor **URI segments**, with an optional **`x-api-version`** header for flexibility. + +### Quick Setup in ASP.NET Core (Asp.Versioning) +```csharp +// Program.cs +using Asp.Versioning; + +builder.Services.AddControllers(); +builder.Services.AddApiVersioning(o => +{ + o.DefaultApiVersion = new ApiVersion(1, 0); + o.AssumeDefaultVersionWhenUnspecified = true; + o.ReportApiVersions = true; // response header: api-supported-versions + o.ApiVersionReader = ApiVersionReader.Combine( + new UrlSegmentApiVersionReader(), + new HeaderApiVersionReader("x-api-version") + ); +}); + +builder.Services.AddVersionedApiExplorer(o => +{ + o.GroupNameFormat = "'v'VVV"; // v1, v2 + o.SubstituteApiVersionInUrl = true; +}); +``` +```csharp +// Controller +using Asp.Versioning; + +[ApiController] +[Route("api/v{version:apiVersion}/orders")] +public class OrdersController : ControllerBase +{ + [HttpGet] + [ApiVersion("1.0", Deprecated = true)] + public IActionResult GetV1() => Ok(new { message = "v1" }); + + [HttpGet] + [MapToApiVersion("2.0")] + public IActionResult GetV2() => Ok(new { message = "v2", includes = new []{"items"} }); +} +``` + +--- +## Schema Evolution Playbook (JSON & DTO) +Obey the following rules for compatibility‑safe evolution: + +- **Add‑only changes**: Favor adding **optional** fields; do not remove/rename fields. +- **Maintain defaults**: When the new field is disregarded, the old functionality must not change. +- **Enum extension**: Clients should handle unknown enum values gracefully (default behavior). +- **Deprecation pipeline**: Mark fields/endpoints as deprecated **at least one version** prior to removal and publicize extensively. - **Stability by contract**: Record any unspoken contracts (ordering, casing, formats) that clients depend on. + +### Example: adding a non‑breaking field +```csharp +public record OrderDto( + Guid Id, + decimal Total, + string Currency, + string? SalesChannel // new, optional +); +``` + +--- +## Compatibility‑Safe API Behaviors +- **Error model**: Use a standard structure (e.g., RFC 7807 `ProblemDetails`). Avoid ad‑hoc error shapes on a per-endpoint basis. +- **Versioning/Deprecation communication** through headers: +- `api-supported-versions: 1.0, 2.0` +- `Deprecation: true` (in deprecated endpoints) +- `Sunset: Wed, 01 Oct 2025 00:00:00 GMT` (planned deprecation date) +- **Idempotency**: Use an `Idempotency-Key` header for retry-safe POSTs. +- **Optimistic concurrency**: Utilize `ETag`/`If-Match` to prevent lost updates. +- **Pagination**: Prefer cursor tokens (`nextPageToken`) to protect clients from sorting/index changes. +- **Time**: Employ ISO‑8601 in UTC; record time‑zone semantics and rounding conventions. + +--- +## Rollout & Deprecation Policy +A good deprecation policy is **announce → coexist → remove**: + +1) **Announce**: Release changelog, docs, and comms (mail/Slack) with v2 information and the sunset date. +2) **Coexist**: Operate v1 and v2 side by side. Employ gateway percentage routing for progressive cutover. +3) **Observability**: Monitor errors/latency/usage **by version**. When v1 traffic falls below ~5%, plan for removal. 4) **Remove**: Post sunset date, return **410 (Gone)** with a link to migration documentation. + +**Canary & Blue‑Green**: Initialize v2 with a small traffic portion and compare error/latency budgets prior to scaling up. + +--- +## Contract & Compatibility Testing +- **Consumer‑Driven Contracts**: Write expectations using Pact.NET; verify at provider CI. +- **Golden files / snapshots**: Freeze representative JSON payloads and automatically detect regressions. +- **Version-specific smoke tests**: Maintain separate, minimal test suites for v1 and v2. +- **SemVer discipline**: Minor = backward‑compatible; Major = breaking (avoid when possible). + +Minimal example (xUnit + snapshot style): +```csharp +[Fact] +public async Task Orders_v1_contract_should_match_snapshot() +{ + var resp = await _client.GetStringAsync("/api/v1/orders"); + Approvals.VerifyJson(resp); // snapshot comparison +} +``` + +--- +## Tooling & Docs (for .NET) +- **Asp.Versioning (NuGet)**: API versioning + ApiExplorer integration. +- **Swashbuckle / NSwag**: Generate an OpenAPI definition **for every version** (`/swagger/v1/swagger.json`, `/swagger/v2/swagger.json`). Display both in Swagger UI. +- **Polly**: Client‑side retries/fallbacks to handle transient failures and ensure resilience. +- **Serilog + OpenTelemetry**: Collect metrics/logs/traces by version for observability and SLOs. + +Swagger UI configuration by group name: +```csharp +app.UseSwagger(); +app.UseSwaggerUI(c => +{ +c.SwaggerEndpoint("/swagger/v1/swagger.json", "API v1"); +c.SwaggerEndpoint("/swagger/v2/swagger.json", "API v2"); +}); +``` +--- + +## Conclusion +Backward compatibility is not a version number—it is **disciplined change management**. When you use add‑only schema evolution, a well‑defined versioning strategy, strict contract testing, and rolling rollout, you maintain microservice independence and safeguard consumer experience. diff --git a/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/cover.png b/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/cover.png new file mode 100644 index 0000000000..07f0782775 Binary files /dev/null and b/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/cover.png differ diff --git a/docs/en/Community-Articles/2025-09-02-training-campaign/post.md b/docs/en/Community-Articles/2025-09-02-training-campaign/post.md new file mode 100644 index 0000000000..821b06de6b --- /dev/null +++ b/docs/en/Community-Articles/2025-09-02-training-campaign/post.md @@ -0,0 +1,29 @@ +# IMPROVE YOUR ABP SKILLS WITH 33% OFF LIVE TRAININGS! + +We have exciting news to share\! As you know, we offer live training packages to help you improve your skills and knowledge of ABP. From September 8th to 19th, we are giving you 33% OFF our live trainings, so you can learn more about the product at a discounted price\! + +#### Why Join ABP.IO Training? + +ABP training programs are designed to help developers, architects, and teams master the ABP Framework efficiently. Whether you're new to the framework or looking to deepen your knowledge, our courses cover everything you need to build robust and scalable applications with ABP. + +#### What You’ll Gain: + +✔ Comprehensive live training from ABP Experts +✔ Hands-on learning with real-world applications +✔ Best practices for building modern web applications +✔ Certification to showcase your expertise + +#### [Limited-Time 33% Discount – Don’t Miss Out\!](https://abp.io/trainings?utm_source=referral&utm_medium=website&utm_campaign=training_abpblogpost) + +For a short period, all training packages are available at a 33% discount. This is a great opportunity to upskill yourself or train your team at a significantly reduced cost. + +#### How to Get the Discount? + +Simply visit our training page, select your preferred package, add your note if needed and send your training request, that's all\! ABP Training Team will reply to your request via email soon. + +#### Take Advantage of This Offer Today + +Invest in your skills and advance your career with ABP.IO training. This offer won’t last long, so grab your spot now\! + +### 🔗[Sign up for training now and start building with ABP](https://abp.io/trainings?utm_source=referral&utm_medium=website&utm_campaign=training_abpblogpost)\! + diff --git a/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/1.png b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/1.png new file mode 100644 index 0000000000..9168907741 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/1.png differ diff --git a/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/2.png b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/2.png new file mode 100644 index 0000000000..ff84b51766 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/2.png differ diff --git a/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/POST.md b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/POST.md new file mode 100644 index 0000000000..076e623ad8 --- /dev/null +++ b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/POST.md @@ -0,0 +1,335 @@ +# Keep Track of Your Users in an ASP.NET Core Application + +Tracking what users do in your app matters for security, debugging, and business insights. Doing it by hand usually means lots of boilerplate: managing request context, logging operations, tracking entity changes, and more. It adds complexity and makes mistakes more likely. + +## Why Applications Need Audit Logs + +Audit logs are time-ordered records that show what happened in your app. + +A good audit log should capture details for every web request, including: + +### 1. Request and Response Details +- Basic info like **URL, HTTP method, browser**, and **HTTP status code** +- Network info like **client IP address** and **user agent** +- **Request parameters** and **response content** when needed + +### 2. Operations Performed +- **Controller actions** and **application service method calls** with parameters +- **Execution time** and **duration** for performance tracking +- **Call chains** and **dependencies** where helpful + +### 3. Entity Changes +- **Entity changes** that happen during requests +- **Property-level changes**, with old and new values +- **Change types** (create, update, delete) and timestamps + +### 4. Exception Information +- **Errors and exceptions** during request execution +- **Exception stack traces** and **error context** +- Clear records of failed operations + +### 5. Request Duration +- Key metrics for **measuring performance** +- **Finding bottlenecks** and optimization opportunities +- Useful data for **monitoring system health** + +## The Challenge with Doing It by Hand + +In ASP.NET Core, developers often use middleware or MVC filters for tracking. Here’s what that looks like and the common problems you’ll hit. + +### Using Middleware + +Middleware are components in the ASP.NET Core pipeline that run during request processing. + +Manual tracking typically requires: +- Writing custom middleware to intercept HTTP requests +- Extracting user info (user ID, username, IP address, and so on) +- Recording request start time and execution duration +- Handling both success and failure cases +- Saving audit data to logs or a database + +### Tracking Inside Business Methods + +In your business code, you also need to: +- Log the start and end of important operations +- Capture errors and related context +- Link business operations to the request-level audit data +- Make sure you track all critical actions + +### Problems with Manual Tracking + +Manual tracking has some big downsides: + +**Code duplication and maintenance pain**: Each controller ends up repeating similar tracking logic. Changing the rules means touching many places, and it’s easy to miss some. + +**Consistency and reliability issues**: Different people implement tracking differently. Exception paths are easy to forget. It’s hard to ensure complete coverage. + +**Performance and scalability concerns**: Homegrown tracking can slow the app if not designed well. Tuning and extending it takes effort. + +**Entity change tracking is especially hard**. It often requires: +- Recording original values before updates +- Comparing old and new values for each property +- Handling complex types, collections, and navigation properties +- Designing and saving change records +- Capturing data even when exceptions happen + +This usually leads to: +- **A lot of code** in every update method +- **Easy-to-miss edge cases** and subtle bugs +- **High maintenance** when entity models change +- **Extra queries and comparisons** that can hurt performance +- **Incomplete coverage** for complex scenarios + +## ABP Framework’s Built-in Solution + +ABP Framework includes a built-in audit logging system. It solves the problems above and adds useful features on top. + +### Simple Setup vs. Manual Tracking + +Instead of writing lots of code, you configure it once: + +```csharp +// Configure audit log options in the module's ConfigureServices method +Configure(options => +{ + options.IsEnabled = true; // Enable audit log system (default value) + options.IsEnabledForAnonymousUsers = true; // Track anonymous users (default value) + options.IsEnabledForGetRequests = false; // Skip GET requests (default value) + options.AlwaysLogOnException = true; // Always log on errors (default value) + options.HideErrors = true; // Hide audit log errors (default value) + options.EntityHistorySelectors.AddAllEntities(); // Track all entity changes +}); +``` + +```csharp +// Add middleware in the module's OnApplicationInitialization method +public override void OnApplicationInitialization(ApplicationInitializationContext context) +{ + var app = context.GetApplicationBuilder(); + + // Add audit log middleware - one line of code solves all problems! + app.UseAuditing(); +} +``` + +By contrast, manual tracking needs middleware, controller logic, exception handling, and often hundreds of lines. With ABP, a couple of lines enable it and it just works. + +## What You Get with ABP + +Here’s how ABP removes tracking code from your application and still captures what you need. + +### 1. Application Services: No Tracking Code + +Manual approach: You’d log inside each method and still risk missing cases. + +ABP approach: Tracking is automatic—no tracking code in your methods. + +```csharp +public class BookAppService : ApplicationService +{ + private readonly IRepository _bookRepository; + private readonly IRepository _authorRepository; + + [Authorize(BookPermissions.Create)] + public virtual async Task CreateAsync(CreateBookDto input) + { + // No need to write any tracking code! + // ABP automatically tracks: + // - Method calls and parameters + // - Calling user + // - Execution duration + // - Any exceptions thrown + + var author = await _authorRepository.GetAsync(input.AuthorId); + var book = new Book(input.Title, author, input.Price); + + await _bookRepository.InsertAsync(book); + + return ObjectMapper.Map(book); + } + + [Authorize(BookPermissions.Update)] + public virtual async Task UpdateAsync(Guid id, UpdateBookDto input) + { + var book = await _bookRepository.GetAsync(id); + + // No need to write any entity change tracking code! + // ABP automatically tracks entity changes: + // - Which properties changed + // - Old and new values + // - When the change happened + + book.ChangeTitle(input.Title); + book.ChangePrice(input.Price); + + await _bookRepository.UpdateAsync(book); + + return ObjectMapper.Map(book); + } +} +``` + +With manual code, each method might need 20–30 lines for tracking. With ABP, it’s zero—and you still get richer data. + +For entity changes, ABP also saves you from writing comparison code. It handles: +- Property change detection +- Recording old and new values +- Complex types and collections +- Navigation property changes +- All with no extra code to maintain + +### 2. Entity Change Tracking: One Line to Turn It On + +Manual approach: You’d compare properties, serialize complex types, track collection changes, and write to storage. + +ABP approach: Mark the entity or select entities globally. + +```csharp +// Enable audit log for specific entity - one line of code solves all problems! +[Audited] +public class MyEntity : Entity +{ + public string Name { get; set; } + public string Description { get; set; } + + [DisableAuditing] // Exclude sensitive data - security control + public string InternalNotes { get; set; } +} +``` + +```csharp +// Or global configuration - batch processing +Configure(options => +{ + // Track all entities - one line of code tracks all entity changes + options.EntityHistorySelectors.AddAllEntities(); + + // Or use custom selector - precise control + options.EntityHistorySelectors.Add( + new NamedTypeSelector( + "MySelectorName", + type => typeof(IEntity).IsAssignableFrom(type) + ) + ); +}); +``` + +### 3. Extension Features + +Manual approach: Adding custom tracking usually spreads across many places and is hard to test. + +ABP approach: Use a contributor for clean, centralized extensions. + +```csharp +public class MyAuditLogContributor : AuditLogContributor +{ + public override void PreContribute(AuditLogContributionContext context) + { + var currentUser = context.ServiceProvider.GetRequiredService(); + + // Easily add custom properties - manual implementation needs lots of work + context.AuditInfo.SetProperty( + "MyCustomClaimValue", + currentUser.FindClaimValue("MyCustomClaim") + ); + } + + public override void PostContribute(AuditLogContributionContext context) + { + // Add custom comments - business logic integration + context.AuditInfo.Comments.Add("Some comment..."); + } +} + +// Register contributor - one line of code enables extension features +Configure(options => +{ + options.Contributors.Add(new MyAuditLogContributor()); +}); +``` + +### 4. Precise Control + +Manual approach: You end up with complex conditional logic. + +ABP approach: Use attributes for simple, precise control. + +```csharp +// Disable audit log for specific controller - precise control +[DisableAuditing] +public class HomeController : AbpController +{ + // Health check endpoints won't be audited - avoid meaningless logs +} + +// Disable for specific action - method-level control +public class HomeController : AbpController +{ + [DisableAuditing] + public async Task Home() + { + // This action won't be audited - public data access + } + + public async Task OtherActionLogged() + { + // This action will be audited - important business operation + } +} +``` + +### 5. Visual Management of Audit Logs + +ABP also provides a UI to browse and inspect audit logs: + +![](1.png) + +![](2.png) + +## Manual vs. ABP: A Quick Comparison + +The benefits of ABP’s audit log system compared to doing it by hand: + +| Aspect | Manual Implementation | ABP Audit Logs | +|--------|----------------------|----------------| +| **Setup Complexity** | High — Write middleware, services, repository code | Low — A few lines of config, works out of the box | +| **Code Maintenance** | High — Tracking code spread across the app | Low — Centralized, convention-based | +| **Consistency** | Variable — Depends on discipline | Consistent — Automated and standardized | +| **Performance** | Risky without careful tuning | Built-in optimizations and scope control | +| **Functionality Completeness** | Basic tracking only | Comprehensive by default | +| **Error Handling** | Easy to miss edge cases | Automatic and reliable | +| **Data Integrity** | Manual effort required | Handled by the framework | +| **Extensibility** | Custom work is costly | Rich extension points | +| **Development Efficiency** | Weeks to build | Minutes to enable | +| **Learning Cost** | Understand many details | Convention-based, low effort | + +## Why ABP Audit Logs Matter + +ABP’s audit logging removes the boilerplate from user tracking in ASP.NET Core apps. + +### Core Idea + +Manual tracking is error-prone and hard to maintain. ABP gives you a convention-based, automated system that works with minimal setup. + +### Key Benefits + +ABP runs by convention, so you don’t need repetitive code. You can control behavior at the request, entity, and method levels. It automatically captures request details, operations, entity changes, and exceptions, and you can extend it with contributors when needed. + +### Results in Practice + +| Metric | Manual Implementation | ABP Implementation | Improvement | +|--------|----------------------|-------------------|-------------| +| Development Time | Weeks | Minutes | **99%+** | +| Lines of Code | Hundreds of lines | 2 lines of config | **99%+** | +| Maintenance Cost | High | Low | **Significant** | +| Functionality Completeness | Basic | Comprehensive | **Significant** | +| Error Rate | Higher risk | Lower risk | **Improved** | + +### Recommendation + +If you need audit logs, start with ABP’s built-in system. It reduces effort, improves consistency, and stays flexible as your app grows. You can focus on your business logic and let the framework handle the infrastructure. + +## References + +- [ABP Audit Logging](https://abp.io/docs/latest/framework/infrastructure/audit-logging) +- [ABP Audit Logging UI](https://abp.io/modules/Volo.AuditLogging.Ui) diff --git a/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/cover.png b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/cover.png new file mode 100644 index 0000000000..7030e285b2 Binary files /dev/null and b/docs/en/Community-Articles/2025-09-03-Keep-Track-of-Your-Users-in-an-ASP.NET-Core-Application/cover.png differ diff --git a/docs/en/cli/index.md b/docs/en/cli/index.md index 60d4e3ff0b..415cef1878 100644 --- a/docs/en/cli/index.md +++ b/docs/en/cli/index.md @@ -33,44 +33,44 @@ While each command may have a set of options, there are some global options that Here, is the list of all available commands before explaining their details: -* **`help`**: Shows help on the usage of the ABP CLI. -* **`cli`**: Update or remove ABP CLI. -* **`new`**: Generates a new solution based on the ABP [startup templates](../solution-templates/index.md). -* **`new-module`**: Generates a new module based on the given template. -* **`new-package`**: Generates a new package based on the given template. -* **`update`**: Automatically updates all ABP related NuGet and NPM packages in a solution. -* **`clean`**: Deletes all `BIN` and `OBJ` folders in the current folder. -* **`add-package`**: Adds an ABP package to a project. -* **`add-package-ref`**: Adds package to given project. -* **`install-module`**: Adds a [multi-package application module](../modules/index.md) to a given module. -* **`install-local-module`**: Installs a local module to given module. -* **`list-modules`**: Lists names of application modules. -* **`list-templates`**: Lists the names of available templates to create a solution. -* **`get-source`**: Downloads the source code of a module. -* **`add-source-code`**: Downloads the source code and replaces package references with project references. -* **`init-solution`**: Creates ABP Studio configuration files for a given solution. -* **`kube-connect`**: Connects to kubernetes environment. (*Available for* ***Business*** *or higher licenses*) -* **`kube-intercept`**: Intercepts a service running in Kubernetes environment. (*Available for* ***Business*** *or higher licenses*) -* **`list-module-sources`**: Lists the remote module sources. -* **`add-module-source`**: Adds a remote module source. -* **`delete-module-source`**: Deletes a remote module source. -* **`generate-proxy`**: Generates client side proxies to use HTTP API endpoints. -* **`remove-proxy`**: Removes previously generated client side proxies. -* **`switch-to-preview`**: Switches to the latest preview version of the ABP. -* **`switch-to-nightly`**: Switches to the latest [nightly builds](../release-info/nightly-builds.md) of the ABP related packages on a solution. -* **`switch-to-stable`**: Switches to the latest stable versions of the ABP related packages on a solution. -* **`switch-to-local`**: Changes NuGet package references on a solution to local project references. -* **`upgrade`**: It converts the application to use pro modules. -* **`translate`**: Simplifies to translate localization files when you have multiple JSON [localization](../framework/fundamentals/localization.md) files in a source control repository. -* **`login`**: Authenticates on your computer with your [abp.io](https://abp.io/) username and password. -* **`login-info`**: Shows the current user's login information. -* **`logout`**: Logouts from your computer if you've authenticated before. -* **`bundle`**: Generates script and style references for ABP Blazor and MAUI Blazor project. -* **`install-libs`**: Install NPM Packages for MVC / Razor Pages and Blazor Server UI types. -* **`clear-download-cache`**: Clears the templates download cache. -* **`check-extensions`**: Checks the latest version of the ABP CLI extensions. -* **`install-old-cli`**: Installs old ABP CLI. -* **`generate-razor-page`**: Generates a page class that you can use it in the ASP NET Core pipeline to return an HTML page. +* **[`help`](../cli#help)**: Shows help on the usage of the ABP CLI. +* **[`cli`](../cli#cli)**: Update or remove ABP CLI. +* **[`new`](../cli#new)**: Generates a new solution based on the ABP [startup templates](../solution-templates/index.md). +* **[`new-module`](../cli#new-module)**: Generates a new module based on the given template. +* **[`new-package`](../cli#new-package)**: Generates a new package based on the given template. +* **[`update`](../cli#update)**: Automatically updates all ABP related NuGet and NPM packages in a solution. +* **[`clean`](../cli#clean)**: Deletes all `BIN` and `OBJ` folders in the current folder. +* **[`add-package`](../cli#add-package)**: Adds an ABP package to a project. +* **[`add-package-ref`](../cli#add-package-ref)**: Adds package to given project. +* **[`install-module`](../cli#install-module)**: Adds a [multi-package application module](../modules/index.md) to a given module. +* **[`install-local-module`](../cli#install-local-module)**: Installs a local module to given module. +* **[`list-modules`](../cli#list-modules)**: Lists names of application modules. +* **[`list-templates`](../cli#list-templates)**: Lists the names of available templates to create a solution. +* **[`get-source`](../cli#get-source)**: Downloads the source code of a module. +* **[`add-source-code`](../cli#add-source-code)**: Downloads the source code and replaces package references with project references. +* **[`init-solution`](../cli#init-solution)**: Creates ABP Studio configuration files for a given solution. +* **[`kube-connect`](../cli#kube-connect)**: Connects to kubernetes environment. (*Available for* ***Business*** *or higher licenses*) +* **[`kube-intercept`](../cli#kube-intercept)**: Intercepts a service running in Kubernetes environment. (*Available for* ***Business*** *or higher licenses*) +* **[`list-module-sources`](../cli#list-module-sources)**: Lists the remote module sources. +* **[`add-module-source`](../cli#add-module-source)**: Adds a remote module source. +* **[`delete-module-source`](../cli#delete-module-source)**: Deletes a remote module source. +* **[`generate-proxy`](../cli#generate-proxy)**: Generates client side proxies to use HTTP API endpoints. +* **[`remove-proxy`](../cli#remove-proxy)**: Removes previously generated client side proxies. +* **[`switch-to-preview`](../cli#switch-to-preview)**: Switches to the latest preview version of the ABP. +* **[`switch-to-nightly`](../cli#switch-to-nightly)**: Switches to the latest [nightly builds](../release-info/nightly-builds.md) of the ABP related packages on a solution. +* **[`switch-to-stable`](../cli#switch-to-stable)**: Switches to the latest stable versions of the ABP related packages on a solution. +* **[`switch-to-local`](../cli#switch-to-local)**: Changes NuGet package references on a solution to local project references. +* **[`upgrade`](../cli#upgrade)**: It converts the application to use pro modules. +* **[`translate`](../cli#translate)**: Simplifies to translate localization files when you have multiple JSON [localization](../framework/fundamentals/localization.md) files in a source control repository. +* **[`login`](../cli#login)**: Authenticates on your computer with your [abp.io](https://abp.io/) username and password. +* **[`login-info`](../cli#login-info)**: Shows the current user's login information. +* **[`logout`](../cli#logout)**: Logouts from your computer if you've authenticated before. +* **[`bundle`](../cli#bundle)**: Generates script and style references for ABP Blazor and MAUI Blazor project. +* **[`install-libs`](../cli#install-libs)**: Install NPM Packages for MVC / Razor Pages and Blazor Server UI types. +* **[`clear-download-cache`](../cli#clear-download-cache)**: Clears the templates download cache. +* **[`check-extensions`](../cli#check-extensions)**: Checks the latest version of the ABP CLI extensions. +* **[`install-old-cli`](../cli#install-old-cli)**: Installs old ABP CLI. +* **[`generate-razor-page`](../cli#generate-razor-page)**: Generates a page class that you can use it in the ASP NET Core pipeline to return an HTML page. ### help diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index dc2412b529..585309d8eb 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -745,6 +745,10 @@ "text": "Image Manipulation", "path": "framework/infrastructure/image-manipulation.md" }, + { + "text": "Interceptors", + "path": "framework/infrastructure/interceptors.md" + }, { "text": "JSON", "path": "framework/infrastructure/json.md" diff --git a/docs/en/dynamic-proxying-interceptors.md b/docs/en/dynamic-proxying-interceptors.md deleted file mode 100644 index 722eadc249..0000000000 --- a/docs/en/dynamic-proxying-interceptors.md +++ /dev/null @@ -1,7 +0,0 @@ -# Dynamic Proxying / Interceptors - -This document is planned to be written later. - -## See Also - -* [Video tutorial](https://abp.io/video-courses/essentials/interception) \ No newline at end of file diff --git a/docs/en/framework/api-development/standard-apis/configuration.md b/docs/en/framework/api-development/standard-apis/configuration.md index c1470fcf71..11e754f214 100644 --- a/docs/en/framework/api-development/standard-apis/configuration.md +++ b/docs/en/framework/api-development/standard-apis/configuration.md @@ -55,7 +55,16 @@ namespace Acme.BookStore.Web } ``` +Add your contributor instance to the `AbpApplicationConfigurationOptions` + +```csharp +Configure(options => +{ + options.Contributors.AddIfNotContains(new MyApplicationConfigurationContributor()); +}); +``` + * `IApplicationConfigurationContributor` defines the `ContributeAsync` method to extend the **application-configuration** endpoint with the specified additional data. -* You can inject services and perform any logic needed to extend the endpoint as you wish. +* You can get services from `context.ServiceProvider` and perform any logic needed to extend the endpoint as you wish. -> Application configuration contributors are automatically discovered by the ABP and executed as a part of the application configuration initialization process. +> Application configuration contributors are executed as a part of the application configuration initialization process. diff --git a/docs/en/framework/architecture/domain-driven-design/application-services.md b/docs/en/framework/architecture/domain-driven-design/application-services.md index 4d32f853dd..968ceb434d 100644 --- a/docs/en/framework/architecture/domain-driven-design/application-services.md +++ b/docs/en/framework/architecture/domain-driven-design/application-services.md @@ -134,7 +134,7 @@ The `CreateAsync` method above manually creates a `Book` entity from given `Crea However, in many cases, it's very practical to use **auto object mapping** to set properties of an object from a similar object. ABP provides an [object to object mapping](../../infrastructure/object-to-object-mapping.md) infrastructure to make this even easier. -Object to object mapping provides abstractions and it is implemented by the [AutoMapper](https://automapper.org/) library by default. +Object to object mapping provides abstractions and it is implemented by the [Mapperly](https://mapperly.riok.app/) library by default. Let's create another method to get a book. First, define the method in the `IBookAppService` interface: @@ -162,36 +162,32 @@ public class BookDto } ```` -AutoMapper requires to create a mapping [profile class](https://docs.automapper.org/en/stable/Configuration.html#profile-instances). Example: +[Mapperly](https://mapperly.riok.app/) requires to create a mapping class that implements the `MapperBase` class with the `[Mapper]` attribute as follows: -````csharp -public class MyProfile : Profile +```csharp +[Mapper] +public partial class BookToBookDtoMapper : MapperBase { - public MyProfile() - { - CreateMap(); - } + public override partial BookDto Map(Book source); + + public override partial void Map(Book source, BookDto destination); } -```` +``` -You should then register profiles using the `AbpAutoMapperOptions`: +Then, if your application uses multiple mapping providers, you should add the following configuration to your module's `ConfigureServices` method to decide which mapping provider to use: ````csharp -[DependsOn(typeof(AbpAutoMapperModule))] +[DependsOn(typeof(AbpMapperlyModule))] public class MyModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => - { - //Add all mappings defined in the assembly of the MyModule class - options.AddMaps(); - }); + context.Services.AddMapperlyObjectMapper(); } } ```` -`AddMaps` registers all profile classes defined in the assembly of the given class, typically your module class. It also registers for the [attribute mapping](https://docs.automapper.org/en/stable/Attribute-mapping.html). +With this configuration, your module will use [Mapperly](https://mapperly.riok.app/) as the default mapping provider and you don't need to register mapping classes manually. Then you can implement the `GetAsync` method as shown below: @@ -291,16 +287,21 @@ public class CreateUpdateBookDto } ```` -[Profile](https://docs.automapper.org/en/stable/Configuration.html#profile-instances) class of DTO class. +Define the mapping classes for [Mapperly](https://mapperly.riok.app/) as follows: ```csharp -public class MyProfile : Profile +[Mapper] +public partial class BookToBookDtoMapper : MapperBase { - public MyProfile() - { - CreateMap(); - CreateMap(); - } + public override partial BookDto Map(Book source); + public override partial void Map(Book source, BookDto destination); +} + +[Mapper] +public partial class CreateUpdateBookDtoToBookMapper : MapperBase +{ + public override partial Book Map(CreateUpdateBookDto source); + public override partial void Map(CreateUpdateBookDto source, Book destination); } ``` diff --git a/docs/en/framework/infrastructure/entity-cache.md b/docs/en/framework/infrastructure/entity-cache.md index 64a03ad4c4..cba0cf8eaa 100644 --- a/docs/en/framework/infrastructure/entity-cache.md +++ b/docs/en/framework/infrastructure/entity-cache.md @@ -88,6 +88,17 @@ public class MyMapperProfile : Profile } ``` +If you are using [Mapperly](https://mapperly.riok.app/), you can create a new mapping class that implements the `MapperBase` class with the `[Mapper]` attribute as follows: + +```csharp +[Mapper] +public partial class ProductToProductDtoMapper : MapperBase +{ + public override partial ProductDto Map(Product source); + public override partial void Map(Product source, ProductDto destination); +} +``` + Now, you can inject the `IEntityCache` service wherever you want: ```csharp diff --git a/docs/en/framework/infrastructure/interceptors.md b/docs/en/framework/infrastructure/interceptors.md new file mode 100644 index 0000000000..d50de3ad84 --- /dev/null +++ b/docs/en/framework/infrastructure/interceptors.md @@ -0,0 +1,213 @@ +# Interceptors + +ABP provides a powerful interception system that allows you to execute custom logic before and after method calls without modifying the original method code. This is achieved through **dynamic proxying** and is extensively used throughout the ABP framework to implement cross-cutting concerns. ABP's interception is implemented on top of the [Castle DynamicProxy](https://www.castleproject.org/projects/dynamicproxy/) library. + +## What is Dynamic Proxying / Interception? + +**Interception** is a technique that allows executing additional logic before or after a method call without directly modifying the method's code. This is achieved through **dynamic proxying**, where the runtime generates proxy classes that wrap the original class. + +When a method is called on a proxied object: +1. The call is intercepted by the proxy +2. Custom behaviors (like logging, validation, or authorization) can be executed +3. The original method is called +4. Additional logic can be executed after the method completes + +This enables **cross-cutting concerns** (logic that applies across many parts of an application) to be handled in a clean, reusable way without code duplication. + +## Similarities and Differences with MVC Action/Page Filters + +If you are familiar with ASP.NET Core MVC, you've likely used **action filters** or **page filters**. Interceptors are conceptually similar but have some key differences: + +### Similarities + +* Both allow executing code before and after method execution +* Both are used to implement cross-cutting concerns like validation, logging, caching, or exception handling +* Both support asynchronous operations + +### Differences + +* **Scope**: Filters are tied to MVC's request pipeline, while interceptors can be applied to **any class or service** in the application +* **Configuration**: Filters are configured via attributes or middleware in MVC, while interceptors in ABP are applied through **dependency injection and dynamic proxies** +* **Target**: Interceptors can target application services, domain services, repositories, and virtually any service resolved from the IoC container—not just web controllers + +## How ABP Uses Interceptors + +ABP Framework extensively leverages interception to provide built-in features without requiring boilerplate code. Here are some key examples: + +### [Unit of Work (UOW)](../architecture/domain-driven-design/unit-of-work.md) + +Automatically begins and commits/rolls back a database transaction when entering or exiting an application service method. This ensures data consistency without manual transaction management. + +### [Input Validation](../fundamentals/validation.md) + +Input DTOs are automatically validated against data annotation attributes and custom validation rules before executing the service logic, providing consistent validation behavior across all services. + +### [Authorization](../fundamentals/authorization.md) + +Checks user permissions before allowing the execution of application service methods, ensuring security policies are enforced consistently. + +### [Feature](./features.md) & [Global Feature](./global-features.md) Checking + +Checks if a feature is enabled before executing the service logic, allowing you to conditionally enable or restrict functionality for tenants or the application. + +### [Auditing](./audit-logging.md) + +Automatically logs who performed an action, when it happened, what parameters were used, and what data was involved, providing comprehensive audit trails. + +## Building Your Own Interceptor + +You can create custom interceptors in ABP to implement your own cross-cutting concerns. + +### Creating an Interceptor + +Create a class that inherits from `AbpInterceptor`: + +````csharp +using System.Threading.Tasks; +using Volo.Abp.Aspects; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DynamicProxy; + +public class ExecutionTimeLogInterceptor : AbpInterceptor, ITransientDependency +{ + private readonly ILogger _logger; + + public ExecutionTimeLogInterceptor(ILogger logger) + { + _logger = logger; + } + + public override async Task InterceptAsync(IAbpMethodInvocation invocation) + { + var sw = Stopwatch.StartNew(); + + _logger.LogInformation($"Executing {invocation.TargetObject.GetType().Name}.{invocation.Method.Name}"); + + // Proceed to the actual target method + await invocation.ProceedAsync(); + + sw.Stop(); + + _logger.LogInformation($"Executed {invocation.TargetObject.GetType().Name}.{invocation.Method.Name} in {sw.ElapsedMilliseconds} ms"); + } +} +```` + +### Register Interceptors + +Create a static class that contains the `RegisterIfNeeded` method and register the interceptor in the `PreConfigureServices` method of your module. + +The `ShouldIntercept` method is used to determine if the interceptor should be registered for the given type. You can add an `IExecutionTimeLogEnabled` interface and implement it in the classes that you want to intercept. + +> `DynamicProxyIgnoreTypes` is static class that contains the types that should be ignored by the interceptor. See [Performance Considerations](#performance-considerations) for more information. + +````csharp +// Define an interface to mark the classes that should be intercepted +public interface IExecutionTimeLogEnabled +{ +} +```` + +````csharp +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +// A simple service that added to the DI container and will be intercepted since it implements the `IExecutionTimeLogEnabled` interface +public class SampleExecutionTimeService : IExecutionTimeLogEnabled, ITransientDependency +{ + public virtual async Task DoWorkAsync() + { + // Simulate a long-running task to test the interceptor + await Task.Delay(1000); + } +} +```` + +````csharp +using System; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DynamicProxy; + +public static class ExecutionTimeLogInterceptorRegistrar +{ + public static void RegisterIfNeeded(IOnServiceRegistredContext context) + { + if (ShouldIntercept(context.ImplementationType)) + { + context.Interceptors.TryAdd(); + } + } + + private static bool ShouldIntercept(Type type) + { + return !DynamicProxyIgnoreTypes.Contains(type) && typeof(IExecutionTimeLogEnabled).IsAssignableFrom(type); + } +} +```` + +````csharp +public override void PreConfigureServices(ServiceConfigurationContext context) +{ + context.Services.OnRegistered(ExecutionTimeLogInterceptorRegistrar.RegisterIfNeeded); +} +```` + +## Restrictions and Important Notes + +### Always use asynchronous methods + +For best performance and reliability, implement your service methods as asynchronous to avoid **async over sync**, that can cause unexpected problems, For more information, see [Should I expose synchronous wrappers for asynchronous methods?](https://devblogs.microsoft.com/dotnet/should-i-expose-synchronous-wrappers-for-asynchronous-methods/) + +### Virtual Methods Requirement + +For **class proxies**, methods need to be marked as `virtual` so that they can be overridden by the proxy. Otherwise, interception will not occur. + +````csharp +public class MyService : IExecutionTimeLogEnabled, ITransientDependency +{ + // This method CANNOT be intercepted (not virtual) + public void CannotBeIntercepted() + { + } + + // This method CAN be intercepted (virtual) + public virtual void CanBeIntercepted() + { + } +} +```` + +> This restriction does **not** apply to interface-based proxies. If your service implements an interface and is injected via that interface, all methods can be intercepted regardless of the `virtual` keyword. + +### Dependency Injection Scope + +Interceptors only work when services are resolved from the dependency injection container. Direct instantiation with `new` bypasses interception: + +````csharp +// This will NOT be intercepted +var service = new MyService(); +service.CannotBeIntercepted(); + +// This WILL be intercepted (if MyService is registered with DI) +var service = serviceProvider.GetService(); +service.CanBeIntercepted(); +```` + +### Performance Considerations + +Interceptors are generally efficient, but each one adds method-call overhead. Keep the number of interceptors minimal on hot paths. + +Castle DynamicProxy can negatively impact performance for certain components, notably ASP.NET Core MVC controllers. See the discussions in [castleproject/Core#486](https://github.com/castleproject/Core/issues/486) and [abpframework/abp#3180](https://github.com/abpframework/abp/issues/3180). + +ABP uses interceptors for features like UOW, auditing, and authorization, which rely on dynamic proxy classes. For controllers, prefer implementing cross-cutting concerns with middleware or MVC/Page filters instead of dynamic proxies. + +To avoid generating dynamic proxies for specific types, use the static class `DynamicProxyIgnoreTypes` and add the base classes of the types to the list. Subclasses of any listed base class are also ignored. ABP framework already adds some base classes to the list (`ComponentBase, ControllerBase, PageModel, ViewComponent`); you can add more base classes if needed. + +> Always use interface-based proxies instead of class-based proxies for better performance. + +## See Also + +* [Video tutorial: Interceptors in ABP Framework](https://abp.io/video-courses/essentials/interception) +* [Castle DynamicProxy](https://www.castleproject.org/projects/dynamicproxy/) +* [Castle.Core.AsyncInterceptor](https://github.com/JSkimming/Castle.Core.AsyncInterceptor) +* [ASP.NET Core Filters](https://learn.microsoft.com/en-us/aspnet/core/mvc/controllers/filters) diff --git a/docs/en/framework/ui/angular/form-validation.md b/docs/en/framework/ui/angular/form-validation.md index 6a67018124..6e36945c96 100644 --- a/docs/en/framework/ui/angular/form-validation.md +++ b/docs/en/framework/ui/angular/form-validation.md @@ -170,3 +170,211 @@ export const appConfig: ApplicationConfig = { The error message will be bold and italic now: A required field is cleared and a bold and italic error message appears. + +## How to Validate Nested Form Groups + +There are multiple ways to validate nested form groups in ABP Angular UI. Below is the first and most common approach, using automatic validation and error messages with nested reactive forms. (A second method will be described in the next section.) + +### 1st Way: Automatic Validation and Error Message Using Nested Reactive Forms + +ABP Angular UI leverages Angular's reactive forms and the [ngx-validate](https://www.npmjs.com/package/@ngx-validate/core) library to provide a robust, flexible, and user-friendly form validation experience. Whether you build your forms manually or use ABP’s dynamic form generation features, validation and error messages are handled automatically. + +#### Key Features + +- **Automatic Validation:** + All validation rules defined in your DTOs (such as `[Required]`, `[StringLength]`, `[EmailAddress]`, etc.) are automatically reflected in the Angular form. Error messages are shown under each field without any extra markup. + +- **Nested Form Groups and Dynamic Fields:** + For complex data structures, you can group fields or manage dynamic lists using nested `FormGroup` and `FormArray` structures. Validation and error display work seamlessly for both parent and child controls. + +- **Dynamic and Extensible Forms:** + With ABP’s extensibility system, you can generate forms dynamically using helpers like `generateFormFromProps` and display them with the `abp-extensible-form` component. This ensures all entity properties (including extension properties) are included in the form and their validation rules are applied. + +- **No Extra Boilerplate:** + You do not need to add custom error components or directives for validation. The system works out of the box, including for nested and dynamically generated controls. + +#### Real-World Example: Nested Form Groups in the Users Form + +Below is a real example from the Users management form in ABP Angular UI, showing how nested form structures and validation are implemented. This example includes both dynamically generated fields (with `abp-extensible-form`) and a dynamic list of roles using `FormArray` and `FormGroup`. + +**TypeScript: Building the Form** + +```ts +buildForm() { + const data = new FormPropData(this.injector, this.selected); + this.form = generateFormFromProps(data); // Automatically creates form controls from entity and extension properties + + this.service.getAssignableRoles().subscribe(({ items }) => { + this.roles = items; + if (this.roles) { + // Dynamic roles list: nested FormArray and FormGroup + this.form.addControl( + 'roleNames', + this.fb.array( + this.roles.map(role => + this.fb.group({ + [role.name as string]: [ + this.selected?.id + ? !!this.selectedUserRoles?.find(userRole => userRole.id === role.id) + : role.isDefault, + ], + }), + ), + ), + ); + } + }); +} +``` + +**HTML: Displaying the Form** + +```html + + +

{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}

+
+ + + @if (form) { +
+ +
+
+ } @else { +
+ } +
+
+``` + +**Explanation:** +- `abp-extensible-form` automatically generates and displays all entity fields and their validation. +- In the Roles tab, each role is represented by a checkbox, and these checkboxes are managed in a `FormArray`, with each as a `FormGroup`. This is a real-world example of a nested form structure. +- All validation and error messages are shown automatically for both the main form and nested groups. + + +### 2nd Way: Manual Nested Reactive Forms Without abp-extensible-form + +You can also build and validate nested form groups manually, without using `abp-extensible-form` or dynamic helpers. This approach gives you full control over the form structure and is useful for custom or non-entity-based forms. + +#### Example: Simple Manual Nested FormGroup + +Below is a simple, generic example of a nested reactive form. This form includes a nested `FormGroup` for profile information and demonstrates how to apply validation rules. + +**TypeScript: Building the Form** + +```ts +import { Component, OnInit, inject } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { NgxValidateCoreModule } from '@ngx-validate/core'; + +@Component({ + selector: 'app-nested-form', + templateUrl: './nested-form.component.html', + standalone: true, + imports: [NgxValidateCoreModule], +}) +export class NestedFormComponent implements OnInit { + form: FormGroup; + + private fb = inject(FormBuilder); + + ngOnInit() { + this.buildForm(); + } + + buildForm() { + this.form = this.fb.group({ + userName: ['', Validators.required], + email: ['', [Validators.required, Validators.email]], + profile: this.fb.group({ + firstName: ['', Validators.required], + lastName: ['', Validators.required], + }), + }); + } + + submit() { + if (this.form.invalid) { + return; + } + // handle submit + } +} +``` + +**HTML: Displaying the Form** + +```html +
+
+ + +
+ +
+ + +
+ +
+
+ Profile Details +
+
+
+ + +
+ +
+ + +
+
+
+ +
+ +
+ + Save + +
+
+``` + +**How it works:** +- The form contains main fields (`userName`, `email`) and a nested `FormGroup` (`profile`). +- The `profile` group includes `firstName` and `lastName` fields, each with their own validation rules. +- Validation rules are defined directly in the form builder. +- Error messages and validation feedback are handled automatically by ngx-validate and ABP Angular UI, just like with dynamic forms. +- This structure ensures that validation works automatically for both the main form and nested groups. + +> **Note:** This approach is ideal for custom forms or when you want full control over the form structure. It provides a user experience and validation behavior similar to ABP's dynamic forms, but with manual control over the form layout and logic. + +--- \ No newline at end of file diff --git a/docs/en/modules/cms-kit/index.md b/docs/en/modules/cms-kit/index.md index 5c30806028..3744ce3590 100644 --- a/docs/en/modules/cms-kit/index.md +++ b/docs/en/modules/cms-kit/index.md @@ -72,6 +72,23 @@ CMS kit packages are designed for various usage scenarios. If you check the [CMS - `Volo.CmsKit.Public.*` packages contain the functionalities used in public websites where users read blog posts or leave comments. - `Volo.CmsKit.*` (without Admin/Public suffix) packages are called as unified packages. Unified packages are shortcuts for adding Admin & Public packages (of the related layer) separately. If you have a single application for administration and public web site, you can use these packages. +## Integrating Public and Admin Packages in a Unified Application + +If you are using a single application for both admin and public web site, it's important to configure the global layout settings appropriately. By default, the layout is set for a **Public Website**, which is suitable for public-facing pages. However, when your application serves both admin and public pages, you should explicitly set the global layout for all CMS Kit pages. + +To do this, add a `_ViewStart.cshtml` file to your web project at `/Pages/Public/CmsKit/_ViewStart.cshtml` and configure the layout as shown below: + +```html +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@inject IThemeManager ThemeManager +@{ + // default: GetPublicLayout() + Layout = ThemeManager.CurrentTheme.GetApplicationLayout(); +} +``` + +> The `_ViewStart.cshtml` file is used to set the layout for all pages in the `CmsKit` folder. + ## Internals ### Table / collection prefix & schema diff --git a/docs/en/modules/docs.md b/docs/en/modules/docs.md index b564980ba3..b9c3209e3f 100644 --- a/docs/en/modules/docs.md +++ b/docs/en/modules/docs.md @@ -148,11 +148,6 @@ An ABP module must declare `[DependsOn]` attribute if it has a dependency upon a { options.DefinitionProviders.Add(); }); - - Configure(options => - { - options.AddProfile(); - }); } } ``` diff --git a/docs/en/others/why-abp-platform.md b/docs/en/others/why-abp-platform.md index c13631546b..61756d2654 100644 --- a/docs/en/others/why-abp-platform.md +++ b/docs/en/others/why-abp-platform.md @@ -169,7 +169,7 @@ The learning curve is much lower than not using the ABP. That may sound surprisi ABP creates a full stack, production-ready, working solution for you in seconds. Many of the real-life problems are already solved and many fine tune configurations are already applied for the ASP.NET Core and the other used libraries. If you start from scratch, you will experience and learn all these details yourself to truly implement your solution. -ABP uses the industry standard frameworks, libraries and systems you already know (or need to learn to build a real-world product) like Angular, Blazor, MAUI, EF Core, AutoMapper, OpenIddict, Bootstrap, Redis, SignalR... etc. So, all your knowledge is directly re-usable with the ABP. ABP even simplifies using these libraries and systems and solves the integration problems. If you don't know these tools now, learning them will be easier within the ABP. +ABP uses the industry standard frameworks, libraries and systems you already know (or need to learn to build a real-world product) like Angular, Blazor, MAUI, EF Core, AutoMapper (switched to Mapperly due to licensing concerns), OpenIddict, Bootstrap, Redis, SignalR... etc. So, all your knowledge is directly re-usable with the ABP. ABP even simplifies using these libraries and systems and solves the integration problems. If you don't know these tools now, learning them will be easier within the ABP. ABP provides an excellent infrastructure to apply DDD principles and other best practices. It provides a lot of sweet abstractions and automation to reduce the repeating code. However, it doesn't force you to use or apply all these. A common mistake is to see that ABP has a lot of features, and it is hard to learn all of them. Having a lot of features is an advantage when you come to the point that you need them. However, you don't need to know a feature until you need it, and you can continue with the development approach you are used to. You can still write code as you are used to as if ABP doesn't provide all these benefits. Learning the ABP infrastructure is progressive. You will love it whenever you learn a new feature but can continue developing without knowing its existence. diff --git a/docs/en/release-info/migration-guides/pro/openiddict-microservice.md b/docs/en/release-info/migration-guides/pro/openiddict-microservice.md index 818a8c368a..33c319111b 100644 --- a/docs/en/release-info/migration-guides/pro/openiddict-microservice.md +++ b/docs/en/release-info/migration-guides/pro/openiddict-microservice.md @@ -472,17 +472,12 @@ In `appsettings.json` replace **IdentityServer** section with **OpenIddict** and typeof(AbpOpenIddictProWebModule), ``` -- In **IdentityServiceWebModule.cs** add object mapping configurations: +- In **IdentityServiceWebModule.cs** add object mapping configurations for [Mapperly](https://mapperly.riok.app/) (if you are using an another mapping providers, see the [Object to Object Mapping](../../../framework/infrastructure/object-to-object-mapping.md) documentation): ```csharp - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); ``` - ### Shared Hosting Module - In **MyApplicationSharedHostingModule** replace the **database configuration**: diff --git a/docs/en/solution-templates/guide.md b/docs/en/solution-templates/guide.md index cb14f57ef3..ded0c49f20 100644 --- a/docs/en/solution-templates/guide.md +++ b/docs/en/solution-templates/guide.md @@ -27,7 +27,7 @@ Besides the overall solution structure, the internals of each project in a solut ### Library Integrations & Configurations -When you use ABP startup solution templates to create a new solution, some **fundamental library installations** ([Serilog](https://serilog.net/), [Autofac](https://autofac.org/), [AutoMapper](https://automapper.org/), [Swagger](https://swagger.io/), [HealthCheck](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks) and others..) and their fine-tuned configurations are already prepared for you. Also, required **[ABP packages](https://abp.io/packages)** are just installed based on your preferences and configured for **development and production environments**. +When you use ABP startup solution templates to create a new solution, some **fundamental library installations** ([Serilog](https://serilog.net/), [Autofac](https://autofac.org/), [Mapperly](https://mapperly.riok.app/), [Swagger](https://swagger.io/), [HealthCheck](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks) and others..) and their fine-tuned configurations are already prepared for you. Also, required **[ABP packages](https://abp.io/packages)** are just installed based on your preferences and configured for **development and production environments**. ### Development Ready diff --git a/docs/en/tutorials/book-store/part-01.md b/docs/en/tutorials/book-store/part-01.md index 6b856d9687..4634a68c67 100644 --- a/docs/en/tutorials/book-store/part-01.md +++ b/docs/en/tutorials/book-store/part-01.md @@ -291,22 +291,17 @@ public class BookDto : AuditedEntityDto * The `BookDto` is used to transfer the book data to the presentation layer in order to show the book information on the UI. * The `BookDto` is derived from the `AuditedEntityDto` which has audit properties just like the `Book` entity defined above. -It will be needed to map the `Book` entities to the `BookDto` objects while returning books to the presentation layer. [AutoMapper](https://automapper.org) library can automate this conversion when you define the proper mapping. The startup template comes with AutoMapper pre-configured. So, you can just define the mapping in the `BookStoreApplicationAutoMapperProfile` class in the `Acme.BookStore.Application` project: +It will be needed to map the `Book` entities to the `BookDto` objects while returning books to the presentation layer. [Mapperly](https://mapperly.riok.app/) library can automate this conversion when you define the proper mapping. The startup template comes with Mapperly pre-configured. So, you can just define the mapping in the `BookStoreApplicationMappers` class in the `Acme.BookStore.Application` project: -````csharp -using Acme.BookStore.Books; -using AutoMapper; - -namespace Acme.BookStore; - -public class BookStoreApplicationAutoMapperProfile : Profile +```csharp +[Mapper] +public partial class BookToBookDtoMapper : MapperBase { - public BookStoreApplicationAutoMapperProfile() - { - CreateMap(); - } + public override partial BookDto Map(Book source); + + public override partial void Map(Book source, BookDto destination); } -```` +``` > See the [object to object mapping](../../framework/infrastructure/object-to-object-mapping.md) document for details. @@ -343,21 +338,23 @@ public class CreateUpdateBookDto As done to the `BookDto` above, we should define the mapping from the `CreateUpdateBookDto` object to the `Book` entity. The final class will be as shown below: -````csharp -using Acme.BookStore.Books; -using AutoMapper; +```csharp +[Mapper] +public partial class BookToBookDtoMapper : MapperBase +{ + public override partial BookDto Map(Book source); -namespace Acme.BookStore; + public override partial void Map(Book source, BookDto destination); +} -public class BookStoreApplicationAutoMapperProfile : Profile +[Mapper] +public partial class CreateUpdateBookDtoToBookMapper : MapperBase { - public BookStoreApplicationAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } + public override partial Book Map(CreateUpdateBookDto source); + + public override partial void Map(CreateUpdateBookDto source, Book destination); } -```` +``` ### IBookAppService @@ -416,7 +413,7 @@ public class BookAppService : * `BookAppService` is derived from `CrudAppService<...>` which implements all the CRUD (create, read, update, delete) methods defined by the `ICrudAppService`. * `BookAppService` injects `IRepository` which is the default repository for the `Book` entity. ABP automatically creates default repositories for each aggregate root (or entity). See the [repository document](../../framework/architecture/domain-driven-design/repositories.md). -* `BookAppService` uses `IObjectMapper` service ([see](../../framework/infrastructure/object-to-object-mapping.md)) to map the `Book` objects to the `BookDto` objects and `CreateUpdateBookDto` objects to the `Book` objects. The Startup template uses the [AutoMapper](http://automapper.org/) library as the object mapping provider. We have defined the mappings before, so it will work as expected. +* `BookAppService` uses `IObjectMapper` service ([see](../../framework/infrastructure/object-to-object-mapping.md)) to map the `Book` objects to the `BookDto` objects and `CreateUpdateBookDto` objects to the `Book` objects. The Startup template uses the [Mapperly](https://mapperly.riok.app/) library as the object mapping provider. We have defined the mappings before, so it will work as expected. ## Auto API Controllers diff --git a/docs/en/tutorials/book-store/part-03.md b/docs/en/tutorials/book-store/part-03.md index 45444ee76f..e67353b1fa 100644 --- a/docs/en/tutorials/book-store/part-03.md +++ b/docs/en/tutorials/book-store/part-03.md @@ -298,23 +298,17 @@ public class EditModalModel : BookStorePageModel ### Mapping from BookDto to CreateUpdateBookDto -To be able to map the `BookDto` to `CreateUpdateBookDto`, configure a new mapping. To do this, open the `BookStoreWebAutoMapperProfile.cs` file in the `Acme.BookStore.Web` project and change it as shown below: +To be able to map the `BookDto` to `CreateUpdateBookDto`, configure a new mapping. To do this, open the `BookStoreWebMappers.cs` file in the `Acme.BookStore.Web` project and change it as shown below: -````csharp -using AutoMapper; - -namespace Acme.BookStore.Web; - -public class BookStoreWebAutoMapperProfile : Profile +```csharp +[Mapper] +public partial class BookDtoToCreateUpdateBookDtoMapper : MapperBase { - public BookStoreWebAutoMapperProfile() - { - CreateMap(); - } -} -```` + public override partial CreateUpdateBookDto Map(BookDto source); -* We have just added `CreateMap();` to define this mapping. + public override partial void Map(BookDto source, CreateUpdateBookDto destination); +} +``` > Notice that we do the mapping definition in the web layer as a best practice since it is only needed in this layer. @@ -1288,28 +1282,26 @@ We can now define a modal to edit the book. Add the following code to the end of ```` -### AutoMapper Configuration +### Mapperly Configuration The base `AbpCrudPageBase` uses the [object to object mapping](../../framework/infrastructure/object-to-object-mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. -Open the `BookStoreBlazorAutoMapperProfile` inside the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor` {{ else if UI == "MAUIBlazor" }}`Acme.BookStore.MauiBlazor` {{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and change the content as the following: +Open the `BookStoreBlazorMappers` inside the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor` {{ else if UI == "MAUIBlazor" }}`Acme.BookStore.MauiBlazor` {{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and change the content as the following: -````csharp -using Acme.BookStore.Books; -using AutoMapper; +```csharp +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; {{ if UI == "BlazorServer" }}namespace Acme.BookStore.Blazor; {{ else if UI == "MAUIBlazor" }}namespace Acme.BookStore.MauiBlazor; {{ else }}namespace Acme.BookStore.Blazor.Client;{{ end }} -public class BookStoreBlazorAutoMapperProfile : Profile +[Mapper] +public partial class BookDtoToCreateUpdateBookDtoMapper : MapperBase { - public BookStoreBlazorAutoMapperProfile() - { - CreateMap(); - } -} -```` + public override partial CreateUpdateBookDto Map(BookDto source); -* We've just added the `CreateMap();` line to define the mapping. + public override partial void Map(BookDto source, CreateUpdateBookDto destination); +} +``` ### Test the Editing Modal diff --git a/docs/en/tutorials/book-store/part-08.md b/docs/en/tutorials/book-store/part-08.md index a7d73f0209..ac49c6aee4 100644 --- a/docs/en/tutorials/book-store/part-08.md +++ b/docs/en/tutorials/book-store/part-08.md @@ -193,7 +193,7 @@ public async Task GetAsync(Guid id) } ```` -This method simply gets the `Author` entity by its `Id`, converts to the `AuthorDto` using the [object to object mapper](../../framework/infrastructure/object-to-object-mapping.md). This requires to configure the AutoMapper, which will be explained later. +This method simply gets the `Author` entity by its `Id`, converts to the `AuthorDto` using the [object to object mapper](../../framework/infrastructure/object-to-object-mapping.md). This requires to configure the Mapperly, which will be explained later. ### GetListAsync @@ -350,12 +350,18 @@ Finally, add the following entries to the `Localization/BookStore/en.json` insid ## Object to Object Mapping -`AuthorAppService` is using the `ObjectMapper` to convert the `Author` objects to `AuthorDto` objects. So, we need to define this mapping in the AutoMapper configuration. +`AuthorAppService` is using the `ObjectMapper` to convert the `Author` objects to `AuthorDto` objects. So, we need to define this mapping in the Mapperly configuration. -Open the `BookStoreApplicationAutoMapperProfile` class inside the `Acme.BookStore.Application` project and add the following line to the constructor: +Open the `BookStoreApplicationMappers` class inside the `Acme.BookStore.Application` project and define the following mapping class: ````csharp -CreateMap(); +[Mapper] +public partial class AuthorToAuthorDtoMapper : MapperBase +{ + public override partial AuthorDto Map(Author source); + + public override partial void Map(Author source, AuthorDto destination); +} ```` ## Data Seeder diff --git a/docs/en/tutorials/book-store/part-09.md b/docs/en/tutorials/book-store/part-09.md index 06db5f37d9..18ecd2726d 100644 --- a/docs/en/tutorials/book-store/part-09.md +++ b/docs/en/tutorials/book-store/part-09.md @@ -335,27 +335,16 @@ The main reason of this decision was to show you how to use a different model cl * Added `[DataType(DataType.Date)]` attribute to the `BirthDate` which shows a date picker on the UI for this property. * Added `[TextArea]` attribute to the `ShortBio` which shows a multi-line text area instead of a standard textbox. -In this way, you can specialize the view model class based on your UI requirements without touching to the DTO. As a result of this decision, we have used `ObjectMapper` to map `CreateAuthorViewModel` to `CreateAuthorDto`. To be able to do that, you need to add a new mapping code to the `BookStoreWebAutoMapperProfile` constructor: +In this way, you can specialize the view model class based on your UI requirements without touching to the DTO. As a result of this decision, we have used `ObjectMapper` to map `CreateAuthorViewModel` to `CreateAuthorDto`. To be able to do that, you need to define a new mapping configuration in the `BookStoreWebMappers` class: -````csharp -using Acme.BookStore.Authors; // ADDED NAMESPACE IMPORT -using Acme.BookStore.Books; -using AutoMapper; - -namespace Acme.BookStore.Web; - -public class BookStoreWebAutoMapperProfile : Profile +```csharp +[Mapper] +public partial class CreateAuthorViewModelToCreateAuthorDtoMapper : MapperBase { - public BookStoreWebAutoMapperProfile() - { - CreateMap(); - - // ADD a NEW MAPPING - CreateMap(); - } + public override partial CreateAuthorDto Map(Pages.Authors.CreateModalModel.CreateAuthorViewModel source); + public override partial void Map(Pages.Authors.CreateModalModel.CreateAuthorViewModel source, CreateAuthorDto destination); } -```` +``` "New author" button will work as expected and open a new model when you run the application again: @@ -456,29 +445,22 @@ This class is similar to the `CreateModal.cshtml.cs` while there are some main d * Uses the `IAuthorAppService.GetAsync(...)` method to get the editing author from the application layer. * `EditAuthorViewModel` has an additional `Id` property which is marked with the `[HiddenInput]` attribute that creates a hidden input for this property. -This class requires to add two object mapping declarations to the `BookStoreWebAutoMapperProfile` class: +This class requires to add two object mapping declarations, so open the `BookStoreWebMappers` class and add the following mappings: ```csharp -using Acme.BookStore.Authors; -using Acme.BookStore.Books; -using AutoMapper; - -namespace Acme.BookStore.Web; - -public class BookStoreWebAutoMapperProfile : Profile +[Mapper] +public partial class AuthorDtoToEditAuthorViewModelMapper : MapperBase { - public BookStoreWebAutoMapperProfile() - { - CreateMap(); + public override partial EditAuthorViewModel Map(AuthorDto source); - CreateMap(); + public override partial void Map(AuthorDto source, EditAuthorViewModel destination); +} - // ADD THESE NEW MAPPINGS - CreateMap(); - CreateMap(); - } +[Mapper] +public partial class EditAuthorViewModelToUpdateAuthorDtoMapper : MapperBase +{ + public override partial UpdateAuthorDto Map(Pages.Authors.EditModalModel.EditAuthorViewModel source); + public override partial void Map(Pages.Authors.EditModalModel.EditAuthorViewModel source, UpdateAuthorDto destination); } ``` @@ -1220,13 +1202,23 @@ This class typically defines the properties and methods used by the `Authors.raz `Authors` class uses the `IObjectMapper` in the `OpenEditAuthorModal` method. So, we need to define this mapping. -Open the `BookStoreBlazorAutoMapperProfile.cs` in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else if UI == "MAUIBlazor" }}`Acme.BookStore.MauiBlazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add the following mapping code in the constructor: +Open the `BookStoreBlazorMappers.cs` in the {{ if UI == "BlazorServer" }}`Acme.BookStore.Blazor`{{ else if UI == "MAUIBlazor" }}`Acme.BookStore.MauiBlazor`{{ else }}`Acme.BookStore.Blazor.Client`{{ end }} project and add the following mappings in the class: -````csharp -CreateMap(); -```` +```csharp +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Acme.BookStore.Authors; + +//... + +[Mapper] +public partial class AuthorDtoToUpdateAuthorDtoMapper : MapperBase +{ + public override partial UpdateAuthorDto Map(AuthorDto source); -You will need to declare a `using Acme.BookStore.Authors;` statement to the beginning of the file. + public override partial void Map(AuthorDto source, UpdateAuthorDto destination); +} +``` ### Add to the Main Menu diff --git a/docs/en/tutorials/book-store/part-10.md b/docs/en/tutorials/book-store/part-10.md index d4137e3681..02d1f81aba 100644 --- a/docs/en/tutorials/book-store/part-10.md +++ b/docs/en/tutorials/book-store/part-10.md @@ -578,11 +578,17 @@ Let's see the changes we've done: ### Object to Object Mapping Configuration -Introduced the `AuthorLookupDto` class and used object mapping inside the `GetAuthorLookupAsync` method. So, we need to add a new mapping definition inside the `BookStoreApplicationAutoMapperProfile.cs` file of the `Acme.BookStore.Application` project: +Introduced the `AuthorLookupDto` class and used object mapping inside the `GetAuthorLookupAsync` method. So, we need to add a new mapping definition inside the `BookStoreApplicationMappers.cs` file of the `Acme.BookStore.Application` project: -````csharp -CreateMap(); -```` +```csharp +[Mapper] +public partial class AuthorToAuthorLookupDtoMapper : MapperBase +{ + public override partial AuthorLookupDto Map(Author source); + + public override partial void Map(Author source, AuthorLookupDto destination); +} +``` ## Unit Tests @@ -898,12 +904,37 @@ These changes require a small change in the `EditModal.cshtml`. Remove the `(); -CreateMap(); -CreateMap(); +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +//... + +[Mapper] +public partial class CreateBookViewModelToCreateUpdateBookDtoMapper : MapperBase +{ + public override partial CreateUpdateBookDto Map(Pages.Books.CreateModalModel.CreateBookViewModel source); + + public override partial void Map(Pages.Books.CreateModalModel.CreateBookViewModel source, CreateUpdateBookDto destination); +} + +[Mapper] +public partial class BookDtoToEditBookViewModelMapper : MapperBase +{ + public override partial Pages.Books.EditModalModel.EditBookViewModel Map(BookDto source); + + public override partial void Map(BookDto source, Pages.Books.EditModalModel.EditBookViewModel destination); +} + +[Mapper] +public partial class EditBookViewModelToCreateUpdateBookDtoMapper : MapperBase +{ + public override partial CreateUpdateBookDto Map(Pages.Books.EditModalModel.EditBookViewModel source); + + public override partial void Map(Pages.Books.EditModalModel.EditBookViewModel source, CreateUpdateBookDto destination); +} ``` You can run the application and try to create a new book or update an existing book. You will see a drop down list on the create/update form to select the author of the book: diff --git a/docs/en/tutorials/microservice/part-05.md b/docs/en/tutorials/microservice/part-05.md index 9c037617a1..e72e94fc66 100644 --- a/docs/en/tutorials/microservice/part-05.md +++ b/docs/en/tutorials/microservice/part-05.md @@ -255,21 +255,20 @@ public class OrderAppService : ApplicationService, IOrderAppService In this code snippet, we inject the `IRepository` into the `OrderAppService` class. We use this repository to interact with the `Order` entity. The `GetListAsync` method retrieves a list of orders from the database and maps them to the `OrderDto` class. The `CreateAsync` method creates a new order entity and inserts it into the database. -Afterward, we need to configure the *AutoMapper* object to map the `Order` entity to the `OrderDto` class. Open the `OrderingServiceApplicationAutoMapperProfile` class in the `CloudCrm.OrderingService` project, located in the `ObjectMapping` folder, and add the following code: +Afterward, we need to configure the *Mapperly* object to map the `Order` entity to the `OrderDto` class. Open the `OrderingServiceApplicationMappers` class in the `CloudCrm.OrderingService` project, located in the `ObjectMapping` folder, and add the following code: ```csharp -using AutoMapper; -using CloudCrm.OrderingService.Entities; -using CloudCrm.OrderingService.Services; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; namespace CloudCrm.OrderingService.ObjectMapping; -public class OrderingServiceApplicationAutoMapperProfile : Profile +[Mapper] +public partial class OrderingServiceApplicationMappers : MapperBase { - public OrderingServiceApplicationAutoMapperProfile() - { - CreateMap(); - } + public override partial OrderDto Map(Order source); + + public override partial void Map(Order source, OrderDto destination); } ``` diff --git a/docs/en/tutorials/microservice/part-06.md b/docs/en/tutorials/microservice/part-06.md index e5a8f53fe5..f268ba6fff 100644 --- a/docs/en/tutorials/microservice/part-06.md +++ b/docs/en/tutorials/microservice/part-06.md @@ -216,25 +216,25 @@ public class OrderDto } ``` -Lastly, open the `OrderingServiceApplicationAutoMapperProfile` class (the `OrderingServiceApplicationAutoMapperProfile.cs` file under the `ObjectMapping` folder of the `CloudCrm.OrderingService` project of the `CloudCrm.OrderingService` .NET solution) and ignore the `ProductName` property in the mapping configuration: +Lastly, open the `OrderingServiceApplicationMappers` class (the `OrderingServiceApplicationMappers.cs` file under the `ObjectMapping` folder of the `CloudCrm.OrderingService` project of the `CloudCrm.OrderingService` .NET solution) and ignore the `ProductName` property in the mapping configuration: ```csharp -using AutoMapper; -using CloudCrm.OrderingService.Entities; -using CloudCrm.OrderingService.Services; -using Volo.Abp.AutoMapper; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; namespace CloudCrm.OrderingService.ObjectMapping; -public class OrderingServiceApplicationAutoMapperProfile : Profile +[Mapper] +public partial class OrderingServiceApplicationMappers : MapperBase { - public OrderingServiceApplicationAutoMapperProfile() - { - CreateMap() - .Ignore(x => x.ProductName); // New line - } + [MapperIgnoreTarget(nameof(OrderDto.ProductName))] + public override partial OrderDto Map(Order source); + + [MapperIgnoreTarget(nameof(OrderDto.ProductName))] + public override partial void Map(Order source, OrderDto destination); } ``` + Let's explain the changes we made: - We added a new property named `ProductName` to the `OrderDto` class. This property will hold the product name. diff --git a/docs/en/tutorials/modular-crm/part-03.md b/docs/en/tutorials/modular-crm/part-03.md index fb19277895..bbb0339b50 100644 --- a/docs/en/tutorials/modular-crm/part-03.md +++ b/docs/en/tutorials/modular-crm/part-03.md @@ -323,23 +323,17 @@ Notice that `ProductAppService` class implements the `IProductAppService` and al #### Object Mapping -`ProductAppService.GetListAsync` method uses the `ObjectMapper` service to convert `Product` entities to `ProductDto` objects. The mapping should be configured. Open the `CatalogAutoMapperProfile` class in the `ModularCrm.Catalog` project and change it to the following code block: +`ProductAppService.GetListAsync` method uses the `ObjectMapper` service to convert `Product` entities to `ProductDto` objects. The mapping should be configured. So, create a new mapping class in the `ModularCrm.Catalog` project that implements the `MapperBase` class with the `[Mapper]` attribute as follows: -````csharp -using AutoMapper; - -namespace ModularCrm.Catalog; - -public class CatalogAutoMapperProfile : Profile +```csharp +[Mapper] +public partial class ProductToProductDtoMapper : MapperBase { - public CatalogAutoMapperProfile() - { - CreateMap(); - } -} -```` + public override partial ProductDto Map(Product source); -We've added the `CreateMap();` line to define the mapping. + public override partial void Map(Product source, ProductDto destination); +} +``` ### Exposing Application Services as HTTP API Controllers diff --git a/docs/en/tutorials/modular-crm/part-05.md b/docs/en/tutorials/modular-crm/part-05.md index d2082667aa..46a693a963 100644 --- a/docs/en/tutorials/modular-crm/part-05.md +++ b/docs/en/tutorials/modular-crm/part-05.md @@ -283,21 +283,17 @@ The new files under the `ModularCrm.Ordering.Contracts` project should be like t ### Implementing the Application Service -First we configure the *AutoMapper* to map the `Order` entity to the `OrderDto` object, because we will need it later. Open the `OrderingAutoMapperProfile` under the `ModularCrm.Ordering` project: +First, create a new mapping class (under the `ModularCrm.Ordering` project) that implements the `MapperBase` class with the `[Mapper]` attribute to map `Order` entities to `OrderDto` objects as follows, because we will need it later: -````csharp -using AutoMapper; - -namespace ModularCrm.Ordering; - -public class OrderingAutoMapperProfile : Profile +```csharp +[Mapper] +public partial class OrderToOrderDtoMapper : MapperBase { - public OrderingAutoMapperProfile() - { - CreateMap(); - } + public override partial OrderDto Map(Order source); + + public override partial void Map(Order source, OrderDto destination); } -```` +``` Now, you can implement the `IOrderAppService` interface. Create an `OrderAppService` class under the `ModularCrm.Ordering` project: diff --git a/docs/en/tutorials/modular-crm/part-06.md b/docs/en/tutorials/modular-crm/part-06.md index b685d72960..1c04cd56d1 100644 --- a/docs/en/tutorials/modular-crm/part-06.md +++ b/docs/en/tutorials/modular-crm/part-06.md @@ -217,21 +217,17 @@ public class OrderDto } ```` -Lastly, open the `OrderingAutoMapperProfile` class (the `OrderingAutoMapperProfile.cs` file under the `Services` folder of the `ModularCrm.Ordering` project of the `ModularCrm.Ordering` .NET solution) and ignore the `ProductName` property in the mapping configuration: +Lastly, open the `OrderingApplicationMappers` class (the `OrderingApplicationMappers.cs` file under the `Services` folder of the `ModularCrm.Ordering` project of the `ModularCrm.Ordering` .NET solution) and add the following mapping class: ````csharp -using AutoMapper; -using Volo.Abp.AutoMapper; - -namespace ModularCrm.Ordering; - -public class OrderingApplicationAutoMapperProfile : Profile +[Mapper] +public partial class OrderToOrderDtoMapper : MapperBase { - public OrderingApplicationAutoMapperProfile() - { - CreateMap() - .Ignore(x => x.ProductName); // New line - } + [MapperIgnoreTarget(nameof(OrderDto.ProductName))] + public override partial OrderDto Map(Order source); + + [MapperIgnoreTarget(nameof(OrderDto.ProductName))] + public override partial void Map(Order source, OrderDto destination); } ```` diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/TelemetryApplicationMetricsEnricher.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/TelemetryApplicationMetricsEnricher.cs new file mode 100644 index 0000000000..fa95f5c298 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/TelemetryApplicationMetricsEnricher.cs @@ -0,0 +1,47 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.DependencyInjection; +using System.Linq; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Activity.Providers; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Reflection; + +namespace Volo.Abp.AspNetCore.Mvc; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher), typeof(IHasParentTelemetryActivityEventEnricher))] +public sealed class TelemetryApplicationMetricsEnricher : TelemetryActivityEventEnricher, IHasParentTelemetryActivityEventEnricher +{ + private readonly ITypeFinder _typeFinder; + public TelemetryApplicationMetricsEnricher(ITypeFinder typeFinder, IServiceProvider serviceProvider) : base(serviceProvider) + { + _typeFinder = typeFinder; + } + + protected override Task CanExecuteAsync(ActivityContext context) + { + return Task.FromResult(context.SessionType == SessionType.ApplicationRuntime); + } + + protected override Task ExecuteAsync(ActivityContext context) + { + var appServiceCount = _typeFinder.Types.Count(t => + typeof(IApplicationService).IsAssignableFrom(t) && + t is { IsAbstract: false, IsInterface: false } && + !t.AssemblyQualifiedName!.StartsWith(TelemetryConsts.VoloNameSpaceFilter)); + + var controllerCount = _typeFinder.Types.Count(t => + typeof(ControllerBase).IsAssignableFrom(t) && + !t.IsAbstract && + !t.AssemblyQualifiedName!.StartsWith(TelemetryConsts.VoloNameSpaceFilter)); + + + context.Current[ActivityPropertyNames.AppServiceCount] = appServiceCount; + context.Current[ActivityPropertyNames.ControllerCount] = controllerCount; + return Task.CompletedTask; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Properties/AssemblyInfo.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..f9e35084b9 --- /dev/null +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Volo.Abp.Authorization.Abstractions")] +[assembly: AssemblyTrademark("")] +[assembly: InternalsVisibleTo("Volo.Abp.Authorization")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("83632bec-2f60-4c2b-b964-30e8b37fa9d8")] diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs index ab49e4aad4..0f5d713e2b 100644 --- a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs @@ -108,6 +108,8 @@ public class PermissionDefinition : Parent = this }; + child[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName] = this[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName]; + _children.Add(child); return child; diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinitionContext.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinitionContext.cs index 85d771a6ab..394cdb9d82 100644 --- a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinitionContext.cs +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionDefinitionContext.cs @@ -11,6 +11,13 @@ public class PermissionDefinitionContext : IPermissionDefinitionContext public Dictionary Groups { get; } + internal IPermissionDefinitionProvider? CurrentProvider { get; set; } + + public static class KnownPropertyNames + { + public const string CurrentProviderName = "_CurrentProviderName"; + } + public PermissionDefinitionContext(IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; @@ -28,7 +35,16 @@ public class PermissionDefinitionContext : IPermissionDefinitionContext throw new AbpException($"There is already an existing permission group with name: {name}"); } - return Groups[name] = new PermissionGroupDefinition(name, displayName); + var group = new PermissionGroupDefinition(name, displayName); + + if (CurrentProvider != null) + { + group[KnownPropertyNames.CurrentProviderName] = CurrentProvider.GetType().FullName; + } + + Groups[name] = group; + + return group; } [NotNull] diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs index bbc6e96cdf..0ad2dca099 100644 --- a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs @@ -61,6 +61,8 @@ public class PermissionGroupDefinition : ICanAddChildPermission isEnabled ); + permission[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName] = this[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName]; + _permissions.Add(permission); return permission; diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/StaticPermissionDefinitionStore.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/StaticPermissionDefinitionStore.cs index 2d0a9d668c..4e6ff0d11c 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/StaticPermissionDefinitionStore.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/StaticPermissionDefinitionStore.cs @@ -84,18 +84,23 @@ public class StaticPermissionDefinitionStore : IStaticPermissionDefinitionStore, foreach (var provider in providers) { + context.CurrentProvider = provider; provider.PreDefine(context); } foreach (var provider in providers) { + context.CurrentProvider = provider; provider.Define(context); } foreach (var provider in providers) { + context.CurrentProvider = provider; provider.PostDefine(context); } + + context.CurrentProvider = null; return context.Groups; } diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/TelemetryPermissionInfoEnricher.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/TelemetryPermissionInfoEnricher.cs new file mode 100644 index 0000000000..4fab06ba8f --- /dev/null +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/TelemetryPermissionInfoEnricher.cs @@ -0,0 +1,45 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Activity.Providers; +using Volo.Abp.Internal.Telemetry.Constants; + +namespace Volo.Abp.Authorization.Permissions; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher), typeof(IHasParentTelemetryActivityEventEnricher))] +public sealed class TelemetryPermissionInfoEnricher : TelemetryActivityEventEnricher, IHasParentTelemetryActivityEventEnricher +{ + private readonly IPermissionDefinitionManager _permissionDefinitionManager; + + public TelemetryPermissionInfoEnricher(IPermissionDefinitionManager permissionDefinitionManager, + IServiceProvider serviceProvider) : base(serviceProvider) + { + _permissionDefinitionManager = permissionDefinitionManager; + } + + protected override Task CanExecuteAsync(ActivityContext context) + { + return Task.FromResult(context.ProjectId.HasValue); + } + + protected async override Task ExecuteAsync(ActivityContext context) + { + var permissions = await _permissionDefinitionManager.GetPermissionsAsync(); + + var userDefinedPermissionsCount = permissions.Count(IsUserDefinedPermission); + + context.Current[ActivityPropertyNames.PermissionCount] = userDefinedPermissionsCount; + } + + private static bool IsUserDefinedPermission(PermissionDefinition permission) + { + return permission.Properties.TryGetValue(PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName, out var providerName) && + providerName is string && + !providerName.ToString()!.StartsWith(TelemetryConsts.VoloNameSpaceFilter); + } + + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index dd42cdee32..def4aa417d 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -22,6 +22,7 @@ + diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs index ec20467ac9..6811e2a9a1 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs @@ -4,13 +4,17 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; using JetBrains.Annotations; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Volo.Abp.DependencyInjection; using Volo.Abp.Internal; +using Volo.Abp.Internal.Telemetry; +using Volo.Abp.Internal.Telemetry.Constants; using Volo.Abp.Logging; using Volo.Abp.Modularity; +using Volo.Abp.Threading; namespace Volo.Abp; @@ -149,6 +153,56 @@ public abstract class AbpApplicationBase : IAbpApplication options.PlugInSources ); } + protected void SetupTelemetryTracking() + { + if (!ShouldSendTelemetryData()) + { + return; + } + + AsyncHelper.RunSync(InitializeTelemetryTracking); + } + + protected async Task SetupTelemetryTrackingAsync() + { + if (!ShouldSendTelemetryData()) + { + return; + } + + await InitializeTelemetryTracking(); + } + + private async Task InitializeTelemetryTracking() + { + try + { + using var scope = ServiceProvider.CreateScope(); + var telemetryService = scope.ServiceProvider.GetRequiredService(); + await telemetryService.AddActivityAsync(ActivityNameConsts.ApplicationRun); + } + catch (Exception ex) + { + try + { + using var scope = ServiceProvider.CreateScope(); + var logger = scope.ServiceProvider.GetRequiredService>(); + logger.LogException(ex, LogLevel.Trace); + } + catch + { + /* ignored */ + } + } + } + + private bool ShouldSendTelemetryData() + { + using var scope = ServiceProvider.CreateScope(); + var abpHostEnvironment = scope.ServiceProvider.GetRequiredService(); + var configuration = scope.ServiceProvider.GetRequiredService(); + return abpHostEnvironment.IsDevelopment() && configuration.GetValue("Abp:Telemetry:IsEnabled") == true; + } //TODO: We can extract a new class for this public virtual async Task ConfigureServicesAsync() diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs index d80e46c5d7..faf4f7fa1a 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithExternalServiceProvider.cs @@ -44,6 +44,8 @@ internal class AbpApplicationWithExternalServiceProvider : AbpApplicationBase, I SetServiceProvider(serviceProvider); await InitializeModulesAsync(); + + await SetupTelemetryTrackingAsync(); } public void Initialize([NotNull] IServiceProvider serviceProvider) @@ -53,6 +55,8 @@ internal class AbpApplicationWithExternalServiceProvider : AbpApplicationBase, I SetServiceProvider(serviceProvider); InitializeModules(); + + SetupTelemetryTracking(); } public override void Dispose() diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs index c5e5eccc83..b652999a7a 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationWithInternalServiceProvider.cs @@ -50,12 +50,15 @@ internal class AbpApplicationWithInternalServiceProvider : AbpApplicationBase, I { CreateServiceProvider(); await InitializeModulesAsync(); + await SetupTelemetryTrackingAsync(); + } public void Initialize() { CreateServiceProvider(); InitializeModules(); + SetupTelemetryTracking(); } public override void Dispose() diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs index d9fae16e16..0f83fcced7 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs @@ -19,16 +19,15 @@ public abstract class ConventionalRegistrarBase : IConventionalRegistrar { types = AssemblyHelper .GetAllTypes(assembly) - .Where( - type => type != null && - type.IsClass && - !type.IsAbstract && - !type.IsGenericType - ).ToArray(); + .Where(type => type != null && type.IsClass && !type.IsAbstract && !type.IsGenericType) + .ToArray(); } catch (ReflectionTypeLoadException e) { - types = e.Types.Select(x => x!).ToArray(); + types = e.Types + .Where(type => type != null && type.IsClass && !type.IsAbstract && !type.IsGenericType) + .Select(x => x!) + .ToArray(); logger.LogException(e); } catch (Exception e) diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/ActivityContext.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/ActivityContext.cs new file mode 100644 index 0000000000..8a03a66e65 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/ActivityContext.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; + +namespace Volo.Abp.Internal.Telemetry.Activity; + +public class ActivityContext +{ + public ActivityEvent Current { get; } + public Dictionary ExtraProperties { get; } = new(); + public bool IsTerminated { get; private set; } + + public Guid? ProjectId => Current.Get(ActivityPropertyNames.ProjectId); + + public Guid? SolutionId => Current.Get(ActivityPropertyNames.SolutionId); + + public SessionType? SessionType => Current.Get(ActivityPropertyNames.SessionType); + + public string? DeviceId => Current.Get(ActivityPropertyNames.DeviceId); + + public string? SolutionPath => ExtraProperties.TryGetValue(ActivityPropertyNames.SolutionPath, out var solutionPath) + ? solutionPath?.ToString() + : null; + + private ActivityContext(ActivityEvent current) + { + Current = current; + } + + public static ActivityContext Create(string activityName, string? details = null, + Action>? additionalProperties = null) + { + var activity = new ActivityEvent(activityName, details); + + if (additionalProperties is not null) + { + var additionalPropertiesDict = new Dictionary(); + activity[ActivityPropertyNames.AdditionalProperties] = additionalPropertiesDict; + additionalProperties.Invoke(additionalPropertiesDict); + } + + return new ActivityContext(activity); + } + + public void Terminate() + { + IsTerminated = true; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/ActivityEvent.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/ActivityEvent.cs new file mode 100644 index 0000000000..22ad4c0da3 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/ActivityEvent.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using Volo.Abp.Internal.Telemetry.Constants; + +namespace Volo.Abp.Internal.Telemetry.Activity; + +public class ActivityEvent : Dictionary +{ + public ActivityEvent() + { + this[ActivityPropertyNames.Id] = Guid.NewGuid(); + this[ActivityPropertyNames.Time] = DateTimeOffset.UtcNow; + } + + public ActivityEvent(string activityName, string? details = null) : this() + { + Check.NotNullOrWhiteSpace(activityName, nameof(activityName)); + + this[ActivityPropertyNames.ActivityName] = activityName; + this[ActivityPropertyNames.ActivityDetails] = details; + } + + public bool HasSolutionInfo() + { + return this.ContainsKey(ActivityPropertyNames.HasSolutionInfo); + } + + public bool HasDeviceInfo() + { + return this.ContainsKey(ActivityPropertyNames.HasDeviceInfo); + } + + public bool HasProjectInfo() + { + return this.ContainsKey(ActivityPropertyNames.HasProjectInfo); + } + + public T Get(string key) + { + return TryConvert(key, out var value) ? value : default!; + } + + public bool TryGetValue(string key, out T value) + { + return TryConvert(key, out value); + } + + private bool TryConvert(string key, out T result) + { + result = default!; + if (!this.TryGetValue(key, out var value) || value is null) + { + return false; + } + + try + { + if (value is T tValue) + { + result = tValue; + return true; + } + + if (value is JsonElement jsonElement) + { + value = ExtractFromJsonElement(jsonElement); + if (value is null) + { + return false; + } + } + + var targetType = typeof(T); + var underlyingType = Nullable.GetUnderlyingType(targetType) ?? targetType; + if (underlyingType.IsEnum) + { + if (value is string str) + { + result = (T)Enum.Parse(underlyingType, str, ignoreCase: true); + } + else if (value is int intValue) + { + result = (T)Enum.ToObject(underlyingType, intValue); + } + + return true; + } + + + if (underlyingType == typeof(Dictionary[])) + { + result = (T)value; + return true; + } + + if (underlyingType == typeof(Guid)) + { + result = (T)(object)Guid.Parse(value.ToString()!); + return true; + } + + if (underlyingType == typeof(DateTimeOffset)) + { + result = (T)(object)DateTimeOffset.Parse(value.ToString()!); + return true; + } + + // Nullable types + result = (T)Convert.ChangeType(value, underlyingType); + return true; + } + catch + { + return false; + } + } + + private static object? ExtractFromJsonElement(JsonElement element) + { + return element.ValueKind switch + { + JsonValueKind.String => element.GetString(), + JsonValueKind.Number => element.GetInt32(), + JsonValueKind.True => true, + JsonValueKind.False => false, + JsonValueKind.Null => null, + JsonValueKind.Array => element.EnumerateArray() + .Select(item => + { + if (item.ValueKind == JsonValueKind.Object) + { + return item.EnumerateObject() + .ToDictionary(prop => prop.Name, prop => ExtractFromJsonElement(prop.Value)); + } + + return new Dictionary { { "value", ExtractFromJsonElement(item) } }; + }) + .ToArray(), + + JsonValueKind.Object => element.EnumerateObject() + .ToDictionary(prop => prop.Name, prop => ExtractFromJsonElement(prop.Value)), + _ => element.ToString() + }; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/IHasParentTelemetryActivityEventEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/IHasParentTelemetryActivityEventEnricher.cs new file mode 100644 index 0000000000..5547445d54 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/IHasParentTelemetryActivityEventEnricher.cs @@ -0,0 +1,7 @@ +using Volo.Abp.Internal.Telemetry.Activity.Providers; + +namespace Volo.Abp.Internal.Telemetry.Activity.Contracts; + +public interface IHasParentTelemetryActivityEventEnricher where TParent: TelemetryActivityEventEnricher +{ +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityEventBuilder.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityEventBuilder.cs new file mode 100644 index 0000000000..0542b9d676 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityEventBuilder.cs @@ -0,0 +1,8 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.Internal.Telemetry.Activity.Contracts; + +public interface ITelemetryActivityEventBuilder +{ + Task BuildAsync(ActivityContext context); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityEventEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityEventEnricher.cs new file mode 100644 index 0000000000..b83741cd88 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityEventEnricher.cs @@ -0,0 +1,11 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.Internal.Telemetry.Activity.Contracts; + +public interface ITelemetryActivityEventEnricher +{ + int ExecutionOrder { get; } + + Task EnrichAsync(ActivityContext context); + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityStorage.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityStorage.cs new file mode 100644 index 0000000000..870876ffbd --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Contracts/ITelemetryActivityStorage.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.Internal.Telemetry.Activity.Contracts; + +public interface ITelemetryActivityStorage +{ + Guid InitializeOrGetSession(); + void DeleteActivities(ActivityEvent[] activities); + void SaveActivity(ActivityEvent activityEvent); + List GetActivities(); + bool ShouldAddDeviceInfo(); + bool ShouldAddSolutionInformation(Guid solutionId); + bool ShouldAddProjectInfo(Guid projectId); + bool ShouldSendActivities(); + void MarkActivitiesAsFailed(ActivityEvent[] activities); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryActivityEventBuilder.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryActivityEventBuilder.cs new file mode 100644 index 0000000000..201ac8c3b6 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryActivityEventBuilder.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DynamicProxy; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; + +public class TelemetryActivityEventBuilder : ITelemetryActivityEventBuilder, ISingletonDependency +{ + private readonly List _activityEnrichers; + + public TelemetryActivityEventBuilder(IEnumerable activityDataEnrichers) + { + _activityEnrichers = activityDataEnrichers + .Where(FilterEnricher) + .OrderByDescending(x => x.ExecutionOrder) + .ToList(); + } + public virtual async Task BuildAsync(ActivityContext context) + { + foreach (var enricher in _activityEnrichers) + { + try + { + await enricher.EnrichAsync(context); + } + catch + { + //ignored + } + + if (context.IsTerminated) + { + return null; + } + } + + return context.Current; + } + + private static bool FilterEnricher(ITelemetryActivityEventEnricher enricher) + { + return ProxyHelper.GetUnProxiedType(enricher).Assembly.FullName!.StartsWith(TelemetryConsts.VoloNameSpaceFilter) && + enricher is not IHasParentTelemetryActivityEventEnricher; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryActivityEventEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryActivityEventEnricher.cs new file mode 100644 index 0000000000..d25e9c58f8 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryActivityEventEnricher.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; +using Volo.Abp.DynamicProxy; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; + +public abstract class TelemetryActivityEventEnricher : ITelemetryActivityEventEnricher, IScopedDependency +{ + public virtual int ExecutionOrder { get; set; } = 0; + protected bool IgnoreChildren { get; set; } + protected virtual Type? ReplaceParentType { get; set; } + + private readonly IServiceProvider _serviceProvider; + + protected TelemetryActivityEventEnricher(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + public async Task EnrichAsync(ActivityContext context) + { + if (!await CanExecuteAsync(context)) + { + return; + } + + await ExecuteAsync(context); + await ExecuteChildrenAsync(context); + } + + protected virtual Task CanExecuteAsync(ActivityContext context) + { + return Task.FromResult(true); + } + + protected abstract Task ExecuteAsync(ActivityContext context); + + protected virtual async Task ExecuteChildrenAsync(ActivityContext context) + { + if (IgnoreChildren) + { + return; + } + + using var scope = _serviceProvider.CreateScope(); + + foreach (var child in GetChildren(scope.ServiceProvider)) + { + await child.EnrichAsync(context); + } + } + + private ITelemetryActivityEventEnricher[] GetChildren(IServiceProvider serviceProvider) + { + var targetType = ReplaceParentType ?? ProxyHelper.GetUnProxiedType(this); + var genericInterfaceType = typeof(IHasParentTelemetryActivityEventEnricher<>).MakeGenericType(targetType); + var enumerableType = typeof(IEnumerable<>).MakeGenericType(genericInterfaceType); + + var childServices = (IEnumerable)serviceProvider.GetRequiredService(enumerableType); + + return childServices + .Cast() + .ToArray(); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryApplicationInfoEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryApplicationInfoEnricher.cs new file mode 100644 index 0000000000..6616c62bda --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryApplicationInfoEnricher.cs @@ -0,0 +1,104 @@ +using System; +using System.IO; +using System.Reflection; +using System.Text.Json; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.Helpers; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher), typeof(IHasParentTelemetryActivityEventEnricher))] +public sealed class TelemetryApplicationInfoEnricher : TelemetryActivityEventEnricher, IHasParentTelemetryActivityEventEnricher +{ + private readonly ITelemetryActivityStorage _telemetryActivityStorage; + + public TelemetryApplicationInfoEnricher(ITelemetryActivityStorage telemetryActivityStorage, IServiceProvider serviceProvider) : base(serviceProvider) + { + _telemetryActivityStorage = telemetryActivityStorage; + } + + protected override Task CanExecuteAsync(ActivityContext context) + { + return Task.FromResult(context.SessionType == SessionType.ApplicationRuntime); + } + + protected override Task ExecuteAsync(ActivityContext context) + { + try + { + var entryAssembly = Assembly.GetEntryAssembly(); + if (entryAssembly is null) + { + context.Terminate(); + return Task.CompletedTask; + } + + var projectMetaData = AbpProjectMetadataReader.ReadProjectMetadata(entryAssembly); + if (projectMetaData?.ProjectId == null || projectMetaData.AbpSlnPath.IsNullOrEmpty()) + { + context.Terminate(); + return Task.CompletedTask; + } + + if (!_telemetryActivityStorage.ShouldAddProjectInfo(projectMetaData.ProjectId.Value)) + { + IgnoreChildren = true; + return Task.CompletedTask; + } + + var solutionId = ReadSolutionIdFromSolutionPath(projectMetaData.AbpSlnPath); + + if (!solutionId.HasValue) + { + IgnoreChildren = true; + context.Terminate(); + return Task.CompletedTask; + } + + context.ExtraProperties[ActivityPropertyNames.SolutionPath] = projectMetaData.AbpSlnPath; + context.Current[ActivityPropertyNames.ProjectType] = projectMetaData.Role ?? string.Empty; + context.Current[ActivityPropertyNames.ProjectId] = projectMetaData.ProjectId.Value; + context.Current[ActivityPropertyNames.SolutionId] = solutionId; + context.Current[ActivityPropertyNames.HasProjectInfo] = true; + } + catch + { + //ignored + } + + return Task.CompletedTask; + } + + + private static Guid? ReadSolutionIdFromSolutionPath(string solutionPath) + { + try + { + if (solutionPath.IsNullOrEmpty()) + { + return null; + } + + using var fs = new FileStream(solutionPath!, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + using var doc = JsonDocument.Parse(fs, new JsonDocumentOptions + { + AllowTrailingCommas = true + }); + if (doc.RootElement.TryGetProperty("id", out var property) && property.TryGetGuid(out var solutionId)) + { + return solutionId; + } + } + catch + { + // ignored + } + + return null; + } + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryDeviceInfoEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryDeviceInfoEnricher.cs new file mode 100644 index 0000000000..5081519b40 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryDeviceInfoEnricher.cs @@ -0,0 +1,79 @@ +using System; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher))] +internal sealed class TelemetryDeviceInfoEnricher : TelemetryActivityEventEnricher +{ + private readonly ITelemetryActivityStorage _telemetryActivityStorage; + private readonly ISoftwareInfoProvider _softwareInfoProvider; + + public TelemetryDeviceInfoEnricher(ITelemetryActivityStorage telemetryActivityStorage, + ISoftwareInfoProvider softwareInfoProvider, IServiceProvider serviceProvider) : base(serviceProvider) + { + _telemetryActivityStorage = telemetryActivityStorage; + _softwareInfoProvider = softwareInfoProvider; + } + protected async override Task ExecuteAsync(ActivityContext context) + { + try + { + var deviceId = DeviceManager.GetUniquePhysicalKey(true); + context.Current[ActivityPropertyNames.DeviceId] = deviceId; + + if (!_telemetryActivityStorage.ShouldAddDeviceInfo()) + { + return; + } + + var softwareList = await _softwareInfoProvider.GetSoftwareInfoAsync(); + + context.Current[ActivityPropertyNames.InstalledSoftwares] = softwareList; + context.Current[ActivityPropertyNames.DeviceLanguage] = CultureInfo.CurrentUICulture.Name; + context.Current[ActivityPropertyNames.OperatingSystem] = GetOperatingSystem(); + context.Current[ActivityPropertyNames.CountryIsoCode] = GetCountry(); + context.Current[ActivityPropertyNames.HasDeviceInfo] = true; + context.Current[ActivityPropertyNames.OperatingSystemArchitecture] = RuntimeInformation.OSArchitecture.ToString(); + } + catch + { + //ignored + } + } + + private static OperationSystem GetOperatingSystem() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return OperationSystem.Windows; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return OperationSystem.Linux; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return OperationSystem.MacOS; + } + + return OperationSystem.Unknown; + } + + + + private static string GetCountry() + { + var region = new RegionInfo(CultureInfo.InstalledUICulture.Name); + return region.TwoLetterISORegionName; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryModuleInfoEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryModuleInfoEnricher.cs new file mode 100644 index 0000000000..d35973b79d --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetryModuleInfoEnricher.cs @@ -0,0 +1,39 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Modularity; +using Volo.Abp.Reflection; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher), typeof(IHasParentTelemetryActivityEventEnricher))] +internal sealed class TelemetryModuleInfoEnricher : TelemetryActivityEventEnricher, IHasParentTelemetryActivityEventEnricher +{ + private readonly IModuleContainer _moduleContainer; + private readonly IAssemblyFinder _assemblyFinder; + + public TelemetryModuleInfoEnricher(IModuleContainer moduleContainer, IAssemblyFinder assemblyFinder, + IServiceProvider serviceProvider) : base(serviceProvider) + { + _moduleContainer = moduleContainer; + _assemblyFinder = assemblyFinder; + } + + protected override Task CanExecuteAsync(ActivityContext context) + { + return Task.FromResult(context.SessionType == SessionType.ApplicationRuntime); + } + + protected override Task ExecuteAsync(ActivityContext context) + { + context.Current[ActivityPropertyNames.ModuleCount] = _moduleContainer.Modules.Count; + context.Current[ActivityPropertyNames.ProjectCount] = _assemblyFinder.Assemblies.Count(x => + !x.FullName.IsNullOrEmpty() && + !x.FullName.StartsWith(TelemetryConsts.VoloNameSpaceFilter)); + return Task.CompletedTask; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySessionInfoEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySessionInfoEnricher.cs new file mode 100644 index 0000000000..a015d40733 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySessionInfoEnricher.cs @@ -0,0 +1,27 @@ +using System; +using System.IO; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; +[ExposeServices(typeof(ITelemetryActivityEventEnricher))] +public class TelemetrySessionInfoEnricher : TelemetryActivityEventEnricher +{ + public override int ExecutionOrder { get; set; } = 10; + + public TelemetrySessionInfoEnricher(IServiceProvider serviceProvider) : base(serviceProvider) + { + } + + protected override Task ExecuteAsync(ActivityContext context) + { + context.Current[ActivityPropertyNames.SessionType] = SessionType.ApplicationRuntime; + context.Current[ActivityPropertyNames.SessionId] = Guid.NewGuid().ToString(); + context.Current[ActivityPropertyNames.IsFirstSession] = !File.Exists(TelemetryPaths.ActivityStorage); + + return Task.CompletedTask; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs new file mode 100644 index 0000000000..785ca0dfa1 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Providers/TelemetrySolutionInfoEnricher.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; + +namespace Volo.Abp.Internal.Telemetry.Activity.Providers; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher), typeof(IHasParentTelemetryActivityEventEnricher))] +internal sealed class TelemetrySolutionInfoEnricher : TelemetryActivityEventEnricher, IHasParentTelemetryActivityEventEnricher +{ + private readonly ITelemetryActivityStorage _telemetryActivityStorage; + + public TelemetrySolutionInfoEnricher(ITelemetryActivityStorage telemetryActivityStorage, IServiceProvider serviceProvider) : base(serviceProvider) + { + _telemetryActivityStorage = telemetryActivityStorage; + } + + protected override Task CanExecuteAsync(ActivityContext context) + { + if (context.SolutionId.HasValue && !context.SolutionPath.IsNullOrEmpty()) + { + return Task.FromResult(_telemetryActivityStorage.ShouldAddSolutionInformation(context.SolutionId.Value)); + } + + return Task.FromResult(false); + } + + protected override Task ExecuteAsync(ActivityContext context) + { + try + { + var jsonContent = File.ReadAllText(context.SolutionPath!); + using var doc = JsonDocument.Parse(jsonContent, new JsonDocumentOptions + { + AllowTrailingCommas = true + }); + + var root = doc.RootElement; + + if (root.TryGetProperty("creatingStudioConfiguration", out var creatingStudioConfiguration)) + { + AddSolutionCreationConfiguration(context, creatingStudioConfiguration); + } + + if (root.TryGetProperty("modules", out var modulesElement)) + { + AddModuleInfo(context, modulesElement); + } + + context.Current[ActivityPropertyNames.HasSolutionInfo] = true; + } + catch + { + //ignored + } + + return Task.CompletedTask; + } + + private static void AddSolutionCreationConfiguration(ActivityContext context, JsonElement config) + { + context.Current[ActivityPropertyNames.Template] = TelemetryJsonExtensions.GetStringOrNull(config, "template"); + context.Current[ActivityPropertyNames.CreatedAbpStudioVersion] = TelemetryJsonExtensions.GetStringOrNull(config, "createdAbpStudioVersion"); + context.Current[ActivityPropertyNames.MultiTenancy] = TelemetryJsonExtensions.GetBooleanOrNull(config, "multiTenancy"); + context.Current[ActivityPropertyNames.UiFramework] = TelemetryJsonExtensions.GetStringOrNull(config, "uiFramework"); + context.Current[ActivityPropertyNames.DatabaseProvider] = TelemetryJsonExtensions.GetStringOrNull(config, "databaseProvider"); + context.Current[ActivityPropertyNames.Theme] = TelemetryJsonExtensions.GetStringOrNull(config, "theme"); + context.Current[ActivityPropertyNames.ThemeStyle] = TelemetryJsonExtensions.GetStringOrNull(config, "themeStyle"); + context.Current[ActivityPropertyNames.HasPublicWebsite] = TelemetryJsonExtensions.GetBooleanOrNull(config, "publicWebsite"); + context.Current[ActivityPropertyNames.IsTiered] = TelemetryJsonExtensions.GetBooleanOrNull(config, "tiered"); + context.Current[ActivityPropertyNames.SocialLogins] = TelemetryJsonExtensions.GetBooleanOrNull(config, "socialLogin"); + context.Current[ActivityPropertyNames.DatabaseManagementSystem] = TelemetryJsonExtensions.GetStringOrNull(config, "databaseManagementSystem"); + context.Current[ActivityPropertyNames.IsSeparateTenantSchema] = TelemetryJsonExtensions.GetBooleanOrNull(config, "separateTenantSchema"); + context.Current[ActivityPropertyNames.MobileFramework] = TelemetryJsonExtensions.GetStringOrNull(config, "mobileFramework"); + context.Current[ActivityPropertyNames.IncludeTests] = TelemetryJsonExtensions.GetBooleanOrNull(config, "includeTests"); + context.Current[ActivityPropertyNames.DynamicLocalization] = TelemetryJsonExtensions.GetBooleanOrNull(config, "dynamicLocalization"); + context.Current[ActivityPropertyNames.KubernetesConfiguration] = TelemetryJsonExtensions.GetBooleanOrNull(config, "kubernetesConfiguration"); + context.Current[ActivityPropertyNames.GrafanaDashboard] = TelemetryJsonExtensions.GetBooleanOrNull(config, "grafanaDashboard"); + } + + private static void AddModuleInfo(ActivityContext context, JsonElement modulesElement) + { + var modules = new List>(); + + foreach (var module in modulesElement.EnumerateObject()) + { + var modulePath = GetModuleFilePath(context.SolutionPath!, module); + if (modulePath.IsNullOrEmpty()) + { + continue; + } + + var moduleJsonFileContent = File.ReadAllText(modulePath); + using var moduleDoc = JsonDocument.Parse(moduleJsonFileContent); + + if (!moduleDoc.RootElement.TryGetProperty("imports", out var imports)) + { + continue; + } + + foreach (var import in imports.EnumerateObject()) + { + modules.Add(new Dictionary + { + { ActivityPropertyNames.ModuleName, import.Name }, + { ActivityPropertyNames.ModuleVersion, TelemetryJsonExtensions.GetStringOrNull(import.Value, "version") }, + { ActivityPropertyNames.ModuleInstallationTime, TelemetryJsonExtensions.GetDateTimeOffsetOrNull(import.Value, "creationTime") } + }); + } + } + + context.Current[ActivityPropertyNames.InstalledModules] = modules; + } + + private static string? GetModuleFilePath(string solutionPath, JsonProperty module) + { + var path = TelemetryJsonExtensions.GetStringOrNull(module.Value, "path"); + if (path.IsNullOrEmpty()) + { + return null; + } + + var fullPath = Path.Combine(Path.GetDirectoryName(solutionPath)!, path); + return File.Exists(fullPath) ? fullPath : null; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/FailedActivityInfo.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/FailedActivityInfo.cs new file mode 100644 index 0000000000..d12565d5d2 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/FailedActivityInfo.cs @@ -0,0 +1,18 @@ +using System; + +namespace Volo.Abp.Internal.Telemetry.Activity.Storage; + +internal class FailedActivityInfo +{ + public DateTimeOffset FirstFailTime { get; set; } + public DateTimeOffset LastFailTime { get; set; } + public int RetryCount { get; set; } + + public bool IsExpired() + { + var now = DateTimeOffset.UtcNow; + + return RetryCount >= TelemetryPeriod.MaxActivityRetryCount || + now - FirstFailTime > TelemetryPeriod.MaxFailedActivityAge; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs new file mode 100644 index 0000000000..70455b2d45 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorage.cs @@ -0,0 +1,207 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Text.Encodings.Web; +using System.Text.Json; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Helpers; + +namespace Volo.Abp.Internal.Telemetry.Activity.Storage; + +public class TelemetryActivityStorage : ITelemetryActivityStorage, ISingletonDependency +{ + private TelemetryActivityStorageState State { get; } + private readonly static JsonSerializerOptions JsonSerializerOptions = new() + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping + }; + + public TelemetryActivityStorage() + { + CreateDirectoryIfNotExist(); + + State = LoadState(); + } + + public void SaveActivity(ActivityEvent activityEvent) + { + State.Activities.Add(activityEvent); + + var activityName = activityEvent.Get(ActivityPropertyNames.ActivityName); + + if (activityName == ActivityNameConsts.AbpStudioClose) + { + State.SessionId = null; + } + + if (activityEvent.HasDeviceInfo()) + { + State.LastDeviceInfoAddTime = DateTimeOffset.UtcNow; + } + + if (activityEvent.HasSolutionInfo()) + { + var solutionId = activityEvent.Get(ActivityPropertyNames.SolutionId); + State.Solutions[solutionId] = DateTimeOffset.UtcNow; + } + + if (activityEvent.HasProjectInfo()) + { + var projectId = activityEvent.Get(ActivityPropertyNames.ProjectId); + State.Projects[projectId] = DateTimeOffset.UtcNow; + } + + SaveState(); + } + + public List GetActivities() + { + return State.Activities; + } + + public Guid InitializeOrGetSession() + { + if (State.SessionId.HasValue) + { + return State.SessionId.Value; + } + + State.SessionId = Guid.NewGuid(); + SaveState(); + + return State.SessionId.Value; + } + + public void DeleteActivities(ActivityEvent[] activities) + { + var activityIds = new HashSet(activities.Select(x => x.Get(ActivityPropertyNames.Id))); + + State.Activities.RemoveAll(x => activityIds.Contains(x.Get(ActivityPropertyNames.Id))); + + SaveState(); + } + + public void MarkActivitiesAsFailed(ActivityEvent[] activities) + { + var now = DateTimeOffset.UtcNow; + + foreach (var activity in activities) + { + var activityId = activity.Get(ActivityPropertyNames.Id); + + if (State.FailedActivities.TryGetValue(activityId, out var failedActivityInfo)) + { + failedActivityInfo.RetryCount++; + failedActivityInfo.LastFailTime = now; + + if (!failedActivityInfo.IsExpired()) + { + continue; + } + + State.Activities.RemoveAll(x=> x.Get(ActivityPropertyNames.Id) == activityId); + State.FailedActivities.Remove(activityId); + } + else + { + State.FailedActivities[activityId] = new FailedActivityInfo + { + FirstFailTime = now, + LastFailTime = now, + RetryCount = 1 + }; + } + } + + SaveState(); + } + + public bool ShouldAddDeviceInfo() + { + return State.LastDeviceInfoAddTime is null || + DateTimeOffset.UtcNow - State.LastDeviceInfoAddTime > TelemetryPeriod.InformationSendPeriod; + } + + public bool ShouldAddSolutionInformation(Guid solutionId) + { + return !State.Solutions.TryGetValue(solutionId, out var lastSend) || + DateTimeOffset.UtcNow - lastSend > TelemetryPeriod.InformationSendPeriod; + } + + public bool ShouldAddProjectInfo(Guid projectId) + { + return !State.Projects.TryGetValue(projectId, out var lastSend) || + DateTimeOffset.UtcNow - lastSend > TelemetryPeriod.InformationSendPeriod; + } + + public bool ShouldSendActivities() + { + return State.ActivitySendTime is null || + DateTimeOffset.UtcNow - State.ActivitySendTime > TelemetryPeriod.ActivitySendPeriod; + } + + private void SaveState() + { + try + { + var json = JsonSerializer.Serialize(State, JsonSerializerOptions); + var encryptedJson = Cryptography.Encrypt(json); + File.WriteAllText(TelemetryPaths.ActivityStorage, encryptedJson, Encoding.UTF8); + } + catch + { + // Ignored + } + } + + private static TelemetryActivityStorageState LoadState() + { + try + { + if (!File.Exists(TelemetryPaths.ActivityStorage)) + { + return new TelemetryActivityStorageState(); + } + + var fileContent = MutexExecutor.ReadFileSafely(TelemetryPaths.ActivityStorage); + + if (fileContent.IsNullOrEmpty()) + { + return new TelemetryActivityStorageState(); + } + + var json = Cryptography.Decrypt(fileContent); + + var state = JsonSerializer.Deserialize(json, JsonSerializerOptions)!; + state.Activities = state.Activities.Where(x => x != null).ToList(); + return state; + } + catch + { + return new TelemetryActivityStorageState(); + } + } + + private static void CreateDirectoryIfNotExist() + { + try + { + var storageDirectory = Path.GetDirectoryName(TelemetryPaths.ActivityStorage)!; + + if (!Directory.Exists(storageDirectory)) + { + Directory.CreateDirectory(storageDirectory); + } + } + catch + { + // Ignored + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorageState.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorageState.cs new file mode 100644 index 0000000000..f0d1dfd4a5 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryActivityStorageState.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.Internal.Telemetry.Activity.Storage; + +internal class TelemetryActivityStorageState +{ + public DateTimeOffset? ActivitySendTime { get; set; } + public DateTimeOffset? LastDeviceInfoAddTime { get; set; } + public Guid? SessionId { get; set; } + public List Activities { get; set; } = new(); + public Dictionary Solutions { get; set; } = new(); + public Dictionary Projects { get; set; } = new(); + public Dictionary FailedActivities { get; set; } = new(); + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryPeriod.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryPeriod.cs new file mode 100644 index 0000000000..131180a3a4 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/Storage/TelemetryPeriod.cs @@ -0,0 +1,34 @@ +using System; + +namespace Volo.Abp.Internal.Telemetry.Activity.Storage; + +static internal class TelemetryPeriod +{ + private const string TestModeEnvironmentVariable = "ABP_TELEMETRY_TEST_MODE"; + + static TelemetryPeriod() + { + var isTestMode = IsTestModeEnabled(); + + InformationSendPeriod = isTestMode + ? TimeSpan.FromSeconds(15) + : TimeSpan.FromDays(7); + + ActivitySendPeriod = isTestMode + ? TimeSpan.FromSeconds(5) + : TimeSpan.FromDays(1); + } + + public static TimeSpan ActivitySendPeriod { get; } + public static TimeSpan InformationSendPeriod { get; } + + public static int MaxActivityRetryCount { get; set; } = 3; + public static TimeSpan MaxFailedActivityAge { get; set; } = TimeSpan.FromDays(30); + + private static bool IsTestModeEnabled() + { + var testModeVariable = + Environment.GetEnvironmentVariable(TestModeEnvironmentVariable, EnvironmentVariableTarget.User); + return bool.TryParse(testModeVariable, out var isTestMode) && isTestMode; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/TelemetryJsonExtensions.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/TelemetryJsonExtensions.cs new file mode 100644 index 0000000000..6f8b5c2a10 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Activity/TelemetryJsonExtensions.cs @@ -0,0 +1,34 @@ +using System; +using System.Text.Json; + +namespace Volo.Abp.Internal.Telemetry.Activity; + +static internal class TelemetryJsonExtensions +{ + static internal string? GetStringOrNull(JsonElement element, string propertyName) + { + return element.TryGetProperty(propertyName, out var property) + ? property.GetString() ?? null + : null; + } + + static internal bool? GetBooleanOrNull(JsonElement element, string propertyName) + { + if (element.TryGetProperty(propertyName, out var property) && bool.TryParse(property.GetString(), out var boolValue)) + { + return boolValue; + } + + return null; + } + + static internal DateTimeOffset? GetDateTimeOffsetOrNull(JsonElement element, string propertyName) + { + if (element.TryGetProperty(propertyName, out var date) && DateTimeOffset.TryParse(date.GetString(), out var dateTimeValue)) + { + return dateTimeValue; + } + + return null; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/AbpPlatformUrls.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/AbpPlatformUrls.cs new file mode 100644 index 0000000000..61f2907e8f --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/AbpPlatformUrls.cs @@ -0,0 +1,12 @@ +namespace Volo.Abp.Internal.Telemetry.Constants; + +public static class AbpPlatformUrls +{ +#if DEBUG + public const string AbpTelemetryApiUrl = "https://localhost:44393/"; +#else + public const string AbpTelemetryApiUrl = "https://telemetry.abp.io/"; +#endif + + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityNameConsts.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityNameConsts.cs new file mode 100644 index 0000000000..64b22ef78f --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityNameConsts.cs @@ -0,0 +1,76 @@ +namespace Volo.Abp.Internal.Telemetry.Constants; + +public static class ActivityNameConsts +{ + public const string AbpStudioOpen = "AbpStudio.Open"; + public const string AbpStudioOpenFirstTimeForDevice = "AbpStudio.Open.FirstTimeForDevice"; + public const string AbpStudioOpenFirstTimeForUser = "AbpStudio.Open.FirstTimeForUser"; + public const string AbpStudioClose = "AbpStudio.Close"; + public const string AbpStudioCloseWithoutLogin = "AbpStudio.Close.WithoutLogin"; + public const string AbpStudioLogin = "AbpStudio.Login"; + public const string AbpStudioCampaignClick = "AbpStudio.Campaing.Click"; + public const string AbpStudioCommunityPostClick = "AbpStudio.CommunityPost.Click"; + public const string AbpStudioSolutionInitExisting = "AbpStudio.Solution.InitExisting"; + public const string AbpStudioSolutionNew = "AbpStudio.Solution.New"; + public const string AbpStudioSolutionNewMicroservice = "AbpStudio.Solution.New.Microservice"; + public const string AbpStudioSolutionAddModule = "AbpStudio.Solution.Add.Module"; + public const string AbpStudioSolutionAddModuleEmpty = "AbpStudio.Solution.Add.Module.Empty"; + public const string AbpStudioSolutionAddModuleDdd = "AbpStudio.Solution.Add.Module.Ddd"; + public const string AbpStudioSolutionAddModuleStandard = "AbpStudio.Solution.Add.Module.Standard"; + public const string AbpStudioSolutionAddMicroservice = "AbpStudio.Solution.Add.Microservice"; + public const string AbpStudioSolutionAddGateway = "AbpStudio.Solution.Add.Gateway"; + public const string AbpStudioSolutionAddWeb = "AbpStudio.Solution.Add.Web"; + public const string AbpStudioSolutionAddPackage = "AbpStudio.Solution.Add.Package"; + public const string AbpStudioSolutionAddPackageHttpApiLayer = "AbpStudio.Solution.Add.Package.HttpApiLayer"; + public const string AbpStudioAbpCliInstallLibs = "AbpStudio.AbpCli.InstallLibs"; + public const string AbpStudioAbpCliUpgradeAbp = "AbpStudio.AbpCli.UpgradeAbp"; + public const string AbpStudioAbpCliSwitchToStable = "AbpStudio.AbpCli.SwitchToStable"; + public const string AbpStudioAbpCliSwitchToPreview = "AbpStudio.AbpCli.SwitchToPreview"; + public const string AbpStudioAbpCliSwitchToNightly = "AbpStudio.AbpCli.SwitchToNightly"; + public const string AbpStudioAbpCliClean = "AbpStudio.AbpCli.Clean"; + public const string AbpStudioDotnetCliBuild = "AbpStudio.DotnetCli.Build"; + public const string AbpStudioDotnetCliGraphBuild = "AbpStudio.DotnetCli.GraphBuild"; + public const string AbpStudioDotnetCliClean = "AbpStudio.DotnetCli.Clean"; + public const string AbpStudioDotnetCliRestore = "AbpStudio.DotnetCli.Restore"; + public const string AbpStudioSolutionRunnerRunApp = "AbpStudio.SolutionRunner.RunApp"; + public const string AbpStudioSolutionRunnerAddCsharpApp = "AbpStudio.SolutionRunner.Add.CsharpApp"; + public const string AbpStudioSolutionRunnerAddCliApp = "AbpStudio.SolutionRunner.Add.CliApp"; + public const string AbpStudioSolutionRunnerAddProfile = "AbpStudio.SolutionRunner.Add.Profile"; + public const string AbpStudioSolutionRunnerAppManageMetadata = "AbpStudio.SolutionRunner.App.Manage.Metadata"; + public const string AbpStudioSolutionRunnerAppManageSecrets = "AbpStudio.SolutionRunner.App.Manage.Secrets"; + public const string AbpStudioSolutionOpen = "AbpStudio.Solution.Open"; + public const string AbpStudioMonitoringBrowse = "AbpStudio.Monitoring.Browse"; + public const string AbpStudioMonitoringHttpRequests = "AbpStudio.Monitoring.HttpRequests"; + public const string AbpStudioMonitoringHttpRequestsDetail = "AbpStudio.Monitoring.HttpRequests.Detail"; + public const string AbpStudioMonitoringEvents = "AbpStudio.Monitoring.Events"; + public const string AbpStudioMonitoringEventsDetail = "AbpStudio.Monitoring.Events.Detail"; + public const string AbpStudioMonitoringExceptions = "AbpStudio.Monitoring.Exceptions"; + public const string AbpStudioMonitoringExceptionsDetail = "AbpStudio.Monitoring.Exceptions.Detail"; + public const string AbpStudioMonitoringLogs = "AbpStudio.Monitoring.Logs"; + public const string AbpStudioKubernetesAddProfile = "AbpStudio.Kubernetes.Add.Profile"; + public const string AbpStudioKubernetesConnect = "AbpStudio.Kubernetes.Connect"; + public const string AbpStudioKubernetesIntercept = "AbpStudio.Kubernetes.Intercept"; + public const string AbpStudioKubernetesHelmCommandsInstall = "AbpStudio.Kubernetes.Helm.Commands.Install"; + public const string AbpStudioKubernetesHelmCommandsBuildImages = "AbpStudio.Kubernetes.Helm.Commands.BuildImages"; + public const string AbpStudioKubernetesHelmChartsRefreshSubCharts = "AbpStudio.Kubernetes.Helm.Charts.RefreshSubCharts"; + public const string AbpStudioKubernetesHelmChartsManageMetadata = "AbpStudio.Kubernetes.Helm.Charts.Manage.Metadata"; + public const string AbpStudioLogsShow = "AbpStudio.Logs.Show"; + public const string AbpStudioSuiteOpen = "AbpStudio.Suite.Open"; + public const string AbpStudioGlobalSecretsManage = "AbpStudio.GlobalSecrets.Manage"; + public const string AbpStudioGlobalMetadataManage = "AbpStudio.GlobalMetadata.Manage"; + public const string AbpCliCommandsNewSolution = "AbpCli.Comands.NewSolution"; + public const string AbpCliCommandsNewModule = "AbpCli.Comands.NewModule"; + public const string AbpCliCommandsNewPackage = "AbpCli.Comands.NewPackage"; + public const string AbpCliCommandsUpdate = "AbpCli.Comands.Update"; + public const string AbpCliCommandsClean = "AbpCli.Comands.Clean"; + public const string AbpCliCommandsAddPackage = "AbpCli.Comands.AddPackage"; + public const string AbpCliCommandsAddPackageRef = "AbpCli.Comands.AddPackageRef"; + public const string AbpCliCommandsInstallModule = "AbpCli.Comands.InstallModule"; + public const string AbpCliCommandsInstallLocalModule = "AbpCli.Comands.InstallLocalModule"; + public const string AbpCliCommandsListModules = "AbpCli.Comands.ListModules"; + public const string AbpCliRun = "AbpCli.Run"; + public const string AbpCliExit = "AbpCli.Exit"; + public const string ApplicationRun = "Application.Run"; + public const string AbpStudioBrowserOpen = "AbpStudio.Browser.Open"; + public const string Error = "Error"; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs new file mode 100644 index 0000000000..68f7e95f16 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/ActivityPropertyNames.cs @@ -0,0 +1,77 @@ +namespace Volo.Abp.Internal.Telemetry.Constants; + +public static class ActivityPropertyNames +{ + public const string SessionId = "SessionId"; + public const string ActivityName = "ActivityName"; + public const string Error = "Error"; + public const string ErrorDetail = "ErrorDetail"; + public const string Id = "Id"; + public const string UserId = "UserId"; + public const string OrganizationId = "OrganizationId"; + public const string IpAddress = "IpAddress"; + public const string IsFirstSession = "IsFirstSession"; + public const string DeviceId = "DeviceId"; + public const string DeviceLanguage = "DeviceLanguage"; + public const string OperatingSystem = "OperatingSystem"; + public const string CountryIsoCode = "CountryIsoCode"; + public const string InstalledSoftwares = "InstalledSoftwares"; + public const string ControllerCount = "ControllerCount"; + public const string EntityCount = "EntityCount"; + public const string ProjectCount = "ProjectCount"; + public const string ModuleCount = "ModuleCount"; + public const string PermissionCount = "PermissionCount"; + public const string AppServiceCount = "AppServiceCount"; + public const string ProjectType = "ProjectType"; + public const string ProjectId = "ProjectId"; + public const string SolutionId = "SolutionId"; + public const string Template = "Template"; + public const string CreatedAbpStudioVersion = "CreatedAbpStudioVersion"; + public const string IsTiered = "IsTiered"; + public const string UiFramework = "UiFramework"; + public const string DatabaseProvider = "DatabaseProvider"; + public const string DatabaseManagementSystem = "DatabaseManagementSystem"; + public const string IsSeparateTenantSchema = "IsSeparateTenantSchema"; + public const string Theme = "Theme"; + public const string ThemeStyle = "ThemeStyle"; + public const string MobileFramework = "MobileFramework"; + public const string HasPublicWebsite = "HasPublicWebsite"; + public const string IncludeTests = "IncludeTests"; + public const string MultiTenancy = "MultiTenancy"; + public const string DynamicLocalization = "DynamicLocalization"; + public const string KubernetesConfiguration = "KubernetesConfiguration"; + public const string GrafanaDashboard = "GrafanaDashboard"; + public const string SocialLogins = "SocialLogins"; + public const string InstalledModules = "InstalledModules"; + public const string SolutionPath = "SolutionPath"; + public const string LicenseType = "LicenseType"; + public const string SessionType = "SessionType"; + public const string HasError = "HasError"; + public const string ActivityDuration = "ActivityDuration"; + public const string ActivityDetails = "ActivityDetails"; + public const string Time = "Time"; + public const string SoftwareName = "Name"; + public const string SoftwareVersion = "Version"; + public const string SoftwareUiTheme = "UiTheme"; + public const string SoftwareType = "SoftwareType"; + public const string WebFramework = "WebFramework"; + public const string Dbms = "Dbms"; + public const string UiTheme = "UiTheme"; + public const string UiThemeStyle = "UiThemeStyle"; + public const string MobileApp = "MobileApp"; + public const string SampleCrudPage = "SampleCrudPage"; + public const string FirstAbpVersion = "FirstAbpVersion"; + public const string FirstDotnetVersion = "FirstDotnetVersion"; + public const string CreationTool = "CreationTool"; + public const string ModuleName = "ModuleName"; + public const string ModuleVersion = "ModuleVersion"; + public const string ModuleInstallationTime = "ModuleInstallationTime"; + public const string ExtraProperties = "ExtraProperties"; + public const string HasSolutionInfo = "HasSolutionInfo"; + public const string HasDeviceInfo = "HasDeviceInfo"; + public const string HasProjectInfo = "HasProjectInfo"; + public const string ErrorMessage = "ErrorMessage"; + public const string FailingActivity = "FailingActivity"; + public const string OperatingSystemArchitecture = "OperatingSystemArchitecture"; + public const string AdditionalProperties = "AdditionalProperties"; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs new file mode 100644 index 0000000000..e3993886a0 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/DeviceManager.cs @@ -0,0 +1,260 @@ +using System; + +namespace Volo.Abp.Internal.Telemetry.Constants; + +static internal class DeviceManager +{ + public static string GetUniquePhysicalKey(bool shouldHash) + { + char platformId = '?'; + char osArchitecture = '?'; + string operatingSystem = "?"; + + try + { + string osPrefix; + string uniqueKey; + + platformId = GetPlatformIdOrDefault(); + osArchitecture = GetOsArchitectureOrDefault(); + + if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform + .Windows)) + { + operatingSystem = "Windows"; + uniqueKey = GetUniqueKeyForWindows(); + osPrefix = "W"; + } + else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices + .OSPlatform.Linux)) + { + operatingSystem = "Linux"; + uniqueKey = GetHarddiskSerialForLinux(); + osPrefix = "L"; + } + else if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices + .OSPlatform.OSX)) //MAC + { + operatingSystem = "OSX"; + uniqueKey = GetHarddiskSerialForOsX(); + osPrefix = "O"; + } + else + { + operatingSystem = "Other"; + uniqueKey = GetNetworkAdapterSerial(); + osPrefix = "X"; + } + + if (shouldHash) + { + uniqueKey = ConvertToMd5(uniqueKey).ToUpperInvariant(); + } + + return osPrefix + platformId + osArchitecture + "-" + uniqueKey; + } + catch + { + return Guid.NewGuid().ToString(); + } + } + + private static string GetNetworkAdapterSerial() + { + string macAddress = string.Empty; + + var networkInterfaces = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces(); + foreach (var networkInterface in networkInterfaces) + { + if (networkInterface.NetworkInterfaceType == System.Net.NetworkInformation.NetworkInterfaceType.Loopback) + { + continue; + } + + var physicalAddress = networkInterface.GetPhysicalAddress().ToString(); + if (string.IsNullOrEmpty(physicalAddress)) + { + continue; + } + + macAddress = physicalAddress; + break; + } + + return macAddress!; + } + + private static char GetPlatformIdOrDefault(char defaultValue = '*') + { + try + { + return ((int)System.Environment.OSVersion.Platform).ToString()[0]; + } + catch + { + return defaultValue; + } + } + + private static string ConvertToMd5(string text) + { + using (var md5 = new System.Security.Cryptography.MD5CryptoServiceProvider()) + { + return EncodeBase64(md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(text))); + } + } + + private static string EncodeBase64(byte[] ba) + { + var hex = new System.Text.StringBuilder(ba.Length * 2); + + foreach (var b in ba) + { + hex.AppendFormat("{0:x2}", b); + } + + return hex.ToString(); + } + + + private static char GetOsArchitectureOrDefault(char defaultValue = '*') + { + try + { + return ((int)System.Runtime.InteropServices.RuntimeInformation.OSArchitecture).ToString()[0]; + } + catch + { + return defaultValue; + } + } + + private static string GetUniqueKeyForWindows() + { + try + { + return GetProcessorIdForWindows(); + } + catch + { + } + + return GetWindowsMachineUniqueId(); + } + + private static string GetProcessorIdForWindows() + { + using (var managementObjectSearcher = + new System.Management.ManagementObjectSearcher("SELECT ProcessorId FROM Win32_Processor")) + { + using (var searcherObj = managementObjectSearcher.Get()) + { + if (searcherObj.Count == 0) + { + throw new System.Exception("No unique computer ID found for this computer!"); + } + + var managementObjectEnumerator = searcherObj.GetEnumerator(); + managementObjectEnumerator.MoveNext(); + return managementObjectEnumerator.Current.GetPropertyValue("ProcessorId").ToString()!; + } + } + } + + private static string GetWindowsMachineUniqueId() + { + return RunCommandAndGetOutput("powershell (Get-CimInstance -Class Win32_ComputerSystemProduct).UUID"); + } + + + private static string GetHarddiskSerialForLinux() + { + return RunCommandAndGetOutput( + "udevadm info --query=all --name=/dev/sda | grep ID_SERIAL_SHORT | tr -d \"ID_SERIAL_SHORT=:\""); + } + + private static string GetHarddiskSerialForOsX() + { + var command = + "ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/ { split($0, line, \"\\\"\"); printf(\"%s\\n\", line[4]); }'"; + + command = System.Text.RegularExpressions.Regex.Replace(command, @"(\\*)" + "\"", @"$1$1\" + "\""); + + return RunCommandAndGetOutput(command); + } + + private static string RunCommandAndGetOutput(string command) + { + var output = ""; + + using (var process = new System.Diagnostics.Process()) + { + process.StartInfo = new System.Diagnostics.ProcessStartInfo(GetFileName()) + { + Arguments = GetArguments(command), + UseShellExecute = false, + CreateNoWindow = true, + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + process.Start(); + process?.WaitForExit(); + + using (var stdOut = process!.StandardOutput) + { + using (var stdErr = process.StandardError) + { + output = stdOut.ReadToEnd(); + output += stdErr.ReadToEnd(); + } + } + } + + return output.Trim(); + } + + private static string GetFileName() + { + if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform( + System.Runtime.InteropServices.OSPlatform.OSX) || + System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform + .Linux)) + { + string[] fileNames = { "/bin/bash", "/usr/bin/bash", "/bin/sh", "/usr/bin/sh" }; + foreach (var fileName in fileNames) + { + try + { + if (System.IO.File.Exists(fileName)) + { + return fileName; + } + } + catch + { + //ignore + } + } + + return "/bin/bash"; + } + + //Windows default. + return "cmd.exe"; + } + + private static string GetArguments(string command) + { + if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform( + System.Runtime.InteropServices.OSPlatform.OSX) || + System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform + .Linux)) + { + return "-c \"" + command + "\""; + } + + //Windows default. + return "/C \"" + command + "\""; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/AbpTool.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/AbpTool.cs new file mode 100644 index 0000000000..f2b20e3a03 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/AbpTool.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.Internal.Telemetry.Constants.Enums; + +public enum AbpTool : byte +{ + Unknown = 0, + StudioUI = 1, + StudioCli = 2, + OldCli = 3 +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/OperationSystem.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/OperationSystem.cs new file mode 100644 index 0000000000..312eccec69 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/OperationSystem.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.Internal.Telemetry.Constants.Enums; + +public enum OperationSystem +{ + Unknown = 0, + Windows = 1, + MacOS = 2, + Linux = 3, +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/SessionType.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/SessionType.cs new file mode 100644 index 0000000000..568fdb4f4d --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/SessionType.cs @@ -0,0 +1,9 @@ +namespace Volo.Abp.Internal.Telemetry.Constants.Enums; + +public enum SessionType +{ + Unknown = 0, + AbpStudio = 1, + AbpCli = 2, + ApplicationRuntime = 3 +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/SoftwareType.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/SoftwareType.cs new file mode 100644 index 0000000000..0e334513da --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/Enums/SoftwareType.cs @@ -0,0 +1,11 @@ +namespace Volo.Abp.Internal.Telemetry.Constants.Enums; + +public enum SoftwareType : byte +{ + Others = 0, + AbpStudio = 1, + DotnetSdk = 2, + OperatingSystem = 3, + Ide = 4, + Browser = 5 +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/TelemetryConsts.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/TelemetryConsts.cs new file mode 100644 index 0000000000..c2797efd4a --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/TelemetryConsts.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.Internal.Telemetry.Constants; + +public class TelemetryConsts +{ + public const string VoloNameSpaceFilter = "Volo."; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/TelemetryPaths.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/TelemetryPaths.cs new file mode 100644 index 0000000000..07bc408043 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Constants/TelemetryPaths.cs @@ -0,0 +1,13 @@ +using System; +using System.IO; + +namespace Volo.Abp.Internal.Telemetry.Constants; + +public static class TelemetryPaths +{ + public static string AccessToken => Path.Combine(AbpRootPath, "cli", "access-token.bin"); + public static string ComputerId => Path.Combine(AbpRootPath, "cli", "computer-id.bin"); + public static string ActivityStorage => Path.Combine(AbpRootPath , "telemetry", "activity-storage.bin"); + public static string Studio => Path.Combine(AbpRootPath, "studio"); + private readonly static string AbpRootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".abp"); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/ISoftwareDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/ISoftwareDetector.cs new file mode 100644 index 0000000000..8942bf359d --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/ISoftwareDetector.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; + +internal interface ISoftwareDetector +{ + string Name { get; } + Task DetectAsync(); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/ISoftwareInfoProvider.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/ISoftwareInfoProvider.cs new file mode 100644 index 0000000000..ae5d75a099 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/ISoftwareInfoProvider.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; + +internal interface ISoftwareInfoProvider +{ + Task> GetSoftwareInfoAsync(); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/SoftwareInfo.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/SoftwareInfo.cs new file mode 100644 index 0000000000..bbfa3fe414 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Contracts/SoftwareInfo.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Internal.Telemetry.Constants.Enums; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; + +internal class SoftwareInfo(string name, string? version, string? uiTheme, SoftwareType softwareType) +{ + public string Name { get; set; } = name; + public string? Version { get; set; } = version; + public string? UiTheme { get; set; } = uiTheme; + public SoftwareType SoftwareType { get; set; } = softwareType; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Core/SoftwareDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Core/SoftwareDetector.cs new file mode 100644 index 0000000000..6b02c22c7c --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Core/SoftwareDetector.cs @@ -0,0 +1,78 @@ +using System.Diagnostics; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +[ExposeServices(typeof(ISoftwareDetector))] +abstract internal class SoftwareDetector: ISoftwareDetector , ISingletonDependency +{ + public abstract string Name { get; } + public abstract Task DetectAsync(); + + protected virtual async Task ExecuteCommandAsync(string command, string? arg) + { + var outputBuilder = new StringBuilder(); + + var processStartInfo = new ProcessStartInfo + { + FileName = command, + Arguments = arg ?? "", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + using var process = new Process(); + process.StartInfo = processStartInfo; + process.EnableRaisingEvents = true; + + var tcs = new TaskCompletionSource(); + + process.OutputDataReceived += (sender, e) => + { + if (e.Data != null) + { + outputBuilder.AppendLine(e.Data); + } + }; + + process.ErrorDataReceived += (sender, e) => + { + if (e.Data != null) + { + outputBuilder.AppendLine(e.Data); + } + }; + + process.Exited += (sender, e) => + { + tcs.TrySetResult(true); + }; + + process.Start(); + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + + await tcs.Task; + + var output = outputBuilder.ToString().Trim(); + return string.IsNullOrWhiteSpace(output) ? null : output; + } + + protected string? GetFileVersion(string filePath) + { + try + { + var versionInfo = FileVersionInfo.GetVersionInfo(filePath); + return versionInfo.FileVersion; + } + catch + { + return string.Empty; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs new file mode 100644 index 0000000000..3d35c7192a --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/AbpStudioDetector.cs @@ -0,0 +1,76 @@ +using System.IO; +using System.Text.Json; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class AbpStudioDetector : SoftwareDetector +{ + public override string Name => "Abp Studio"; + private const string AbpStudioVersionExtensionName = "Volo.Abp.Studio.Extensions.StandardSolutionTemplates"; + + public override Task DetectAsync() + { + try + { + var uiTheme = GetAbpStudioUiTheme(); + var version = GetAbpStudioVersion(); + + return Task.FromResult(new SoftwareInfo(Name, version, uiTheme, SoftwareType.AbpStudio)); + } + catch + { + return Task.FromResult(null); + } + } + + private string? GetAbpStudioUiTheme() + { + var ideStateJsonPath = Path.Combine( + TelemetryPaths.Studio, + "ui", + "ide-state.json" + ); + if (!File.Exists(ideStateJsonPath)) + { + return null; + } + using var fs = new FileStream(ideStateJsonPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + using var doc = JsonDocument.Parse(fs); + + return doc.RootElement.TryGetProperty("theme", out var themeElement) ? themeElement.GetString() : null; + } + + private string? GetAbpStudioVersion() + { + var extensionsFilePath = Path.Combine(TelemetryPaths.Studio, "extensions.json"); + + if (!File.Exists(extensionsFilePath)) + { + return null; + } + + using var fs = new FileStream(extensionsFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + using var doc = JsonDocument.Parse(fs); + + if (doc.RootElement.TryGetProperty("Extensions", out var extensionsElement) && + extensionsElement.ValueKind == JsonValueKind.Array) + { + foreach (var extension in extensionsElement.EnumerateArray()) + { + if (extension.TryGetProperty("name", out var nameProp) && + nameProp.GetString() == AbpStudioVersionExtensionName && + extension.TryGetProperty("version", out var versionProp)) + { + return versionProp.GetString(); + } + } + } + + return null; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/ChromeDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/ChromeDetector.cs new file mode 100644 index 0000000000..fa7f8cff74 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/ChromeDetector.cs @@ -0,0 +1,48 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class ChromeDetector : SoftwareDetector +{ + public override string Name => "Chrome"; + + public async override Task DetectAsync() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var chromePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Google", "Chrome", "Application", "chrome.exe"); + if (File.Exists(chromePath)) + { + return new SoftwareInfo(Name, GetFileVersion(chromePath), null, SoftwareType.Browser); + } + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var chromePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; + if (File.Exists(chromePath)) + { + var version = await ExecuteCommandAsync(chromePath, "--version"); + return new SoftwareInfo(Name, version, null, SoftwareType.Browser); + } + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + var chromePath = "/usr/bin/google-chrome"; + if (File.Exists(chromePath)) + { + var version = await ExecuteCommandAsync(chromePath, "--version"); + return new SoftwareInfo(Name, version, null, SoftwareType.Browser); + } + } + + return null; + } + + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/DotnetSdkDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/DotnetSdkDetector.cs new file mode 100644 index 0000000000..4f03eac248 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/DotnetSdkDetector.cs @@ -0,0 +1,17 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class DotnetSdkDetector : SoftwareDetector +{ + public override string Name => "DotnetSdk"; + + public async override Task DetectAsync() + { + return new SoftwareInfo(Name, Environment.Version.ToString(), null, SoftwareType.DotnetSdk); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/FireFoxDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/FireFoxDetector.cs new file mode 100644 index 0000000000..261e36c7e5 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/FireFoxDetector.cs @@ -0,0 +1,45 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class FireFoxDetector : SoftwareDetector +{ + public override string Name => "Firefox"; + public async override Task DetectAsync() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var firefoxPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Mozilla Firefox", "firefox.exe"); + if (File.Exists(firefoxPath)) + { + return new SoftwareInfo(Name, GetFileVersion(firefoxPath), null, SoftwareType.Browser); + } + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var firefoxPath = "/Applications/Firefox.app/Contents/MacOS/firefox"; + if (File.Exists(firefoxPath)) + { + var version = await ExecuteCommandAsync(firefoxPath, "--version"); + return new SoftwareInfo(Name, version, null, SoftwareType.Browser); + } + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + var firefoxPath = "/usr/bin/firefox"; + if (File.Exists(firefoxPath)) + { + var version = await ExecuteCommandAsync(firefoxPath, "--version"); + return new SoftwareInfo(Name, version, null, SoftwareType.Browser); + } + } + + return null; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/MsEdgeDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/MsEdgeDetector.cs new file mode 100644 index 0000000000..e1e67c516e --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/MsEdgeDetector.cs @@ -0,0 +1,47 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class MsEdgeDetector : SoftwareDetector +{ + public override string Name => "MsEdge"; + public async override Task DetectAsync() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var firefoxPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), + "Microsoft", "Edge", "Application", "msedge.exe"); + + if (File.Exists(firefoxPath)) + { + return new SoftwareInfo(Name, GetFileVersion(firefoxPath), null, SoftwareType.Browser); + } + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var edgePath = "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"; + if (File.Exists(edgePath)) + { + var version = await ExecuteCommandAsync(edgePath, "--version"); + return new SoftwareInfo(Name, version, null, SoftwareType.Browser); + } + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + var edgePath = "/usr/bin/microsoft-edge"; + if (File.Exists(edgePath)) + { + var version = await ExecuteCommandAsync(edgePath, "--version"); + return new SoftwareInfo(Name, version, null, SoftwareType.Browser); + } + } + + return null; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/NodeJsDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/NodeJsDetector.cs new file mode 100644 index 0000000000..85a4e05cce --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/NodeJsDetector.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal class NodeJsDetector : SoftwareDetector +{ + public override string Name => "Node.js"; + + public async override Task DetectAsync() + { + try + { + var output = await ExecuteCommandAsync("node", "-v"); + + if (output.IsNullOrWhiteSpace()) + { + return null; + } + + var version = output.Trim().TrimStart('v'); + + return new SoftwareInfo(Name, version, uiTheme: null, SoftwareType.Others); + } + catch + { + return null; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/OperatingSystemDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/OperatingSystemDetector.cs new file mode 100644 index 0000000000..9dfc77f8f2 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/OperatingSystemDetector.cs @@ -0,0 +1,77 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class OperatingSystemDetector : SoftwareDetector +{ + public override string Name => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "Windows" : + RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "macOS" : "Linux"; + + public async override Task DetectAsync() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return new SoftwareInfo(Name, Environment.OSVersion.Version.ToString(), null, SoftwareType.OperatingSystem); + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var version = await ExecuteCommandAsync("sw_vers", "-productVersion"); + return new SoftwareInfo(Name, version, GetMacUiTheme(), SoftwareType.OperatingSystem); + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + var version = await ExecuteCommandAsync("lsb_release", "-ds") ?? await ExecuteCommandAsync("uname", "-r"); + return new SoftwareInfo(Name, version, await GetLinuxUiTheme(), SoftwareType.OperatingSystem); + } + + return null; + } + + private async Task GetLinuxUiTheme() + { + var output = await ExecuteCommandAsync("gsettings", "get org.gnome.desktop.interface gtk-theme"); + + if (!output.IsNullOrWhiteSpace() && output.ToLowerInvariant().Contains("dark")) + { + return "Dark"; + } + + return "Light"; + } + + + private string? GetMacUiTheme() + { + try + { + using var process = new Process(); + process.StartInfo = new ProcessStartInfo + { + FileName = "defaults", + Arguments = "read -g AppleInterfaceStyle", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + process.Start(); + var output = process.StandardOutput.ReadToEnd().Trim(); + process.WaitForExit(); + + return output == "Dark" ? "Dark" : "Light"; + } + catch + { + return "Light"; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/RiderDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/RiderDetector.cs new file mode 100644 index 0000000000..a36dd8a0ab --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/RiderDetector.cs @@ -0,0 +1,100 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using System.Xml.Linq; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class RiderDetector : SoftwareDetector +{ + public override string Name => "Rider"; + + public override Task DetectAsync() + { + try + { + string baseConfigDir; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + baseConfigDir = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "JetBrains"); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + baseConfigDir = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.Personal), + "Library", "Application Support", "JetBrains"); + } + else + { + baseConfigDir = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.Personal), + ".config", "JetBrains"); + } + + if (!Directory.Exists(baseConfigDir)) + { + return Task.FromResult(null); + } + + var riderDirs = Directory + .GetDirectories(baseConfigDir, "Rider*") + .Select(dir => + { + var name = Path.GetFileName(dir); + var verStr = name.Substring("Rider".Length); + return Version.TryParse(verStr, out var v) + ? (Path: dir, Version: v) + : (Path: null, Version: null); + }) + .Where(x => x.Path != null) + .ToList(); + + if (!riderDirs.Any()) + { + return Task.FromResult(null); + } + + var latest = riderDirs + .OrderByDescending(x => x.Version) + .First(); + + var theme = string.Empty; + var colorsFile = Path.Combine(latest.Path!, "options", "colors.scheme.xml"); + if (File.Exists(colorsFile)) + { + try + { + var doc = XDocument.Load(colorsFile); + var schemeEl = doc + .Descendants("global_color_scheme") + .FirstOrDefault(); + var schemeName = schemeEl?.Attribute("name")?.Value; + if (!schemeName.IsNullOrEmpty()) + { + theme = schemeName.IndexOf("dark", StringComparison.OrdinalIgnoreCase) >= 0 + ? "Dark" + : "Light"; + } + } + catch + { + //ignored + } + } + + return Task.FromResult(new SoftwareInfo(Name, latest.Version?.ToString(), theme, + SoftwareType.Ide)); + } + catch (Exception e) + { + return Task.FromResult(null); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs new file mode 100644 index 0000000000..72fda0f500 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioCodeDetector.cs @@ -0,0 +1,132 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text.Json; +using System.Threading.Tasks; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class VisualStudioCodeDetector : SoftwareDetector +{ + public override string Name => "Visual Studio Code"; + + public async override Task DetectAsync() + { + string? installDir = null; + string? settingsPath = null; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var progFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + var candidates = new[] + { + Path.Combine(localAppData, "Programs", "Microsoft VS Code"), + Path.Combine(progFiles, "Microsoft VS Code") + }; + installDir = candidates.FirstOrDefault(Directory.Exists); + + settingsPath = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "Code", "User", "globalStorage" ,"storage.json" + ); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var app = "/Applications/Visual Studio Code.app"; + if (Directory.Exists(app)) + { + installDir = app; + } + + settingsPath = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.Personal), + "Library", "Application Support", "Code", "User", "globalStorage", "storage.json" + ); + } + else + { + var candidate = "/usr/share/code"; + if (Directory.Exists(candidate)) + { + installDir = candidate; + } + + settingsPath = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.Personal), + ".config", "Code", "User", "globalStorage", "storage.json" + ); + } + + if (installDir == null) + { + return null; + } + + + Version? version = null; + var productJson = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) + ? Path.Combine(installDir, "Contents", "Resources", "app", "product.json") + : Path.Combine(installDir, "resources", "app", "product.json"); + + if (File.Exists(productJson)) + { + try + { + using var jsonDoc = JsonDocument.Parse(File.ReadAllText(productJson)); + var root = jsonDoc.RootElement; + if (root.TryGetProperty("version", out var versionProp)) + { + var versionStr = versionProp.GetString(); + if (Version.TryParse(versionStr, out var v)) + { + version = v; + } + } + } + catch + { + + } + } + + if (version == null) + { + return null; + } + + var theme = "Unknown"; + + if (File.Exists(settingsPath)) + { + try + { + using var json = JsonDocument.Parse( File.ReadAllText(settingsPath)); + var root = json.RootElement; + if (root.TryGetProperty("theme", out var themeProp)) + { + var themeName = themeProp.GetString() ?? ""; + if (themeName.IndexOf("dark", StringComparison.OrdinalIgnoreCase) >= 0) + { + theme = "Dark"; + } + else if (themeName.IndexOf("light", StringComparison.OrdinalIgnoreCase) >= 0) + { + theme = "Light"; + } + } + } + catch + { + // ignored + } + } + + return new SoftwareInfo(Name, version?.ToString(), theme, SoftwareType.Ide); + + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioDetector.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioDetector.cs new file mode 100644 index 0000000000..fbbb596157 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Detectors/VisualStudioDetector.cs @@ -0,0 +1,106 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Xml.Linq; +using Volo.Abp.Internal.Telemetry.Constants.Enums; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Core; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Detectors; + +internal sealed class VisualStudioDetector : SoftwareDetector +{ + public override string Name => "Visual Studio"; + + public override Task DetectAsync() + { + var version = GetVisualStudioVersionViaVsWhere(); + var theme = GetVisualStudioTheme(); + + if (version == null) + { + return Task.FromResult(null); + } + + return Task.FromResult(new SoftwareInfo( + name: Name, + version: version, + uiTheme: theme, + softwareType: SoftwareType.Ide)); + } + + private string? GetVisualStudioVersionViaVsWhere() + { + var vswherePath = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), + "Microsoft Visual Studio", + "Installer", + "vswhere.exe"); + + if (!File.Exists(vswherePath)) + { + return null; + } + + var process = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = vswherePath, + Arguments = "-latest -property catalog_productDisplayVersion", + RedirectStandardOutput = true, + UseShellExecute = false, + CreateNoWindow = true + } + }; + + process.Start(); + var output = process.StandardOutput.ReadToEnd().Trim(); + process.WaitForExit(); + + return string.IsNullOrWhiteSpace(output) ? null : output; + } + + private string? GetVisualStudioTheme() + { + var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + + var vsSettingsDir = Path.Combine(localAppData, "Microsoft", "VisualStudio"); + + if (!Directory.Exists(vsSettingsDir)) + { + return null; + } + + var settingsPath = Directory.GetFiles(vsSettingsDir, "CurrentSettings*.vssettings", SearchOption.AllDirectories) + .OrderByDescending(File.GetLastWriteTime) + .FirstOrDefault(); + + if (string.IsNullOrEmpty(settingsPath)) + { + return null; + } + + try + { + var doc = XDocument.Load(settingsPath); + + var themeId = doc.Descendants("Theme") + .FirstOrDefault()?.Attribute("Id")?.Value; + + return themeId?.ToUpperInvariant() switch + { + "{1DED0138-47CE-435E-84EF-9EC1F439B749}" => "Dark", + "{DE3DBBCD-F642-433C-8353-8F1DF4370ABA}" => "Light", + "{2DED0138-47CE-435E-84EF-9EC1F439B749}" => "Blue", + _ => "Unknown" + }; + } + catch + { + return null; + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Providers/SoftwareInfoProvider.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Providers/SoftwareInfoProvider.cs new file mode 100644 index 0000000000..3a56ed420e --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/EnvironmentInspection/Providers/SoftwareInfoProvider.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.EnvironmentInspection.Contracts; + +namespace Volo.Abp.Internal.Telemetry.EnvironmentInspection.Providers; + +internal class SoftwareInfoProvider : ISoftwareInfoProvider , ISingletonDependency +{ + private readonly IEnumerable _softwareDetectors; + + public SoftwareInfoProvider(IEnumerable softwareDetectors) + { + _softwareDetectors = softwareDetectors; + } + + public async Task> GetSoftwareInfoAsync() + { + var result = new List(); + + foreach (var softwareDetector in _softwareDetectors) + { + try + { + var softwareInfo = await softwareDetector.DetectAsync(); + if (softwareInfo is not null) + { + result.Add(softwareInfo); + } + } + catch + { + //ignored + } + } + return result; + } + + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs new file mode 100644 index 0000000000..5f505324b0 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpPackageMetadataReader.cs @@ -0,0 +1,135 @@ +using System; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Text.Json; + +namespace Volo.Abp.Internal.Telemetry.Helpers; + +static internal class AbpProjectMetadataReader +{ + private const string AbpPackageSearchPattern = "*.abppkg"; + private const string AbpSolutionSearchPattern = "*.abpsln"; + private const int MaxDepth = 5; + public static AbpProjectMetaData? ReadProjectMetadata(Assembly assembly) + { + var assemblyPath = assembly.Location; + try + { + var projectDirectory = Path.GetDirectoryName(assemblyPath); + if (projectDirectory == null) + { + return null; + } + + var abpPackagePath = FindFileUpwards(projectDirectory, AbpPackageSearchPattern); + + if (abpPackagePath.IsNullOrEmpty()) + { + return null; + } + + var projectMetaData = ReadOrCreateMetadata(abpPackagePath); + + var abpSolutionPath = FindFileUpwards(projectDirectory, AbpSolutionSearchPattern); + + if (!abpSolutionPath.IsNullOrEmpty()) + { + projectMetaData.AbpSlnPath = abpSolutionPath; + } + + return projectMetaData; + } + catch + { + return null; + } + } + + private static AbpProjectMetaData ReadOrCreateMetadata(string packagePath) + { + + var fileContent = File.ReadAllText(packagePath); + var metadata = new AbpProjectMetaData(); + + using var document = JsonDocument.Parse(fileContent); + var root = document.RootElement; + + if (TryGetProjectId(root,out var projectId)) + { + metadata.ProjectId = projectId; + } + else + { + metadata.ProjectId = Guid.NewGuid(); + WriteProjectIdToPackageFile(root, packagePath, metadata.ProjectId.Value); + } + + if (root.TryGetProperty("role", out var roleElement) && + roleElement.ValueKind == JsonValueKind.String) + { + metadata.Role = roleElement.GetString()!; + } + + return metadata; + } + + private static void WriteProjectIdToPackageFile(JsonElement root, string packagePath, Guid projectId) + { + using var stream = new MemoryStream(); + using (var writer = new Utf8JsonWriter(stream, new JsonWriterOptions { Indented = true })) + { + writer.WriteStartObject(); + + if (root.ValueKind == JsonValueKind.Object) + { + foreach (var property in root.EnumerateObject()) + { + if (property.Name != "projectId") + { + property.WriteTo(writer); + } + } + } + + writer.WriteString("projectId", projectId.ToString()); + writer.WriteEndObject(); + } + + var json = Encoding.UTF8.GetString(stream.ToArray()); + File.WriteAllText(packagePath, json); + } + + private static string? FindFileUpwards(string startingDir, string searchPattern) + { + var currentDir = new DirectoryInfo(startingDir); + var currentDepth = 0; + + while (currentDir != null && currentDepth < MaxDepth) + { + var file = currentDir.GetFiles(searchPattern).FirstOrDefault(); + if (file != null) + { + return file.FullName; + } + + currentDir = currentDir.Parent; + currentDepth++; + } + + return null; + } + private static bool TryGetProjectId(JsonElement element, out Guid projectId) + { + if (element.TryGetProperty("projectId", out var projectIdElement) && + projectIdElement.ValueKind == JsonValueKind.String && + Guid.TryParse(projectIdElement.GetString(), out projectId)) + { + return true; + } + + projectId = Guid.Empty; + return false; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpProjectMetaData.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpProjectMetaData.cs new file mode 100644 index 0000000000..d56ecf6106 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/AbpProjectMetaData.cs @@ -0,0 +1,10 @@ +using System; + +namespace Volo.Abp.Internal.Telemetry.Helpers; + +internal class AbpProjectMetaData +{ + public Guid? ProjectId { get; set; } + public string? Role { get; set; } + public string? AbpSlnPath { get; set; } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/Cryptography.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/Cryptography.cs new file mode 100644 index 0000000000..3d402b651b --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/Cryptography.cs @@ -0,0 +1,42 @@ +using System; +using System.Security.Cryptography; +using System.Text; + +namespace Volo.Abp.Internal.Telemetry.Helpers; + +static internal class Cryptography +{ + private const string EncryptionKey = "AbpTelemetryStorageKey"; + + public static string Encrypt(string plainText) + { + Check.NotNullOrEmpty(plainText, nameof(plainText)); + using var aes = Aes.Create(); + using var sha256 = SHA256.Create(); + + aes.Key = sha256.ComputeHash(Encoding.UTF8.GetBytes(EncryptionKey)); + aes.Mode = CipherMode.ECB; + aes.Padding = PaddingMode.PKCS7; + + var encryptor = aes.CreateEncryptor(); + var inputBytes = Encoding.UTF8.GetBytes(plainText); + var encryptedBytes = encryptor.TransformFinalBlock(inputBytes, 0, inputBytes.Length); + return Convert.ToBase64String(encryptedBytes); + } + + public static string Decrypt(string cipherText) + { + Check.NotNullOrEmpty(cipherText, nameof(cipherText)); + using var aes = Aes.Create(); + using var sha256 = SHA256.Create(); + + aes.Key = sha256.ComputeHash(Encoding.UTF8.GetBytes(EncryptionKey)); + aes.Mode = CipherMode.ECB; + aes.Padding = PaddingMode.PKCS7; + + var decryptor = aes.CreateDecryptor(); + var inputBytes = Convert.FromBase64String(cipherText); + var decryptedBytes = decryptor.TransformFinalBlock(inputBytes, 0, inputBytes.Length); + return Encoding.UTF8.GetString(decryptedBytes); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/MutexExecutor.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/MutexExecutor.cs new file mode 100644 index 0000000000..d8eb28b40e --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/Helpers/MutexExecutor.cs @@ -0,0 +1,46 @@ +using System; +using System.IO; +using System.Threading; + +namespace Volo.Abp.Internal.Telemetry.Helpers; + +static internal class MutexExecutor +{ + private const string MutexName = "Global\\MyFileReadMutex"; + private const int TimeoutMilliseconds = 3000; + + public static string? ReadFileSafely(string filePath) + { + using var mutex = new Mutex(false, MutexName); + + if (!mutex.WaitOne(TimeoutMilliseconds)) + { + return null; + } + + try + { + if (!File.Exists(filePath)) + { + return null; + } + + return File.ReadAllText(filePath); + } + catch (IOException) + { + return null; + } + finally + { + try + { + mutex.ReleaseMutex(); + } + catch + { + // Already released or abandoned + } + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/ITelemetryActivitySender.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/ITelemetryActivitySender.cs new file mode 100644 index 0000000000..46171de7ad --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/ITelemetryActivitySender.cs @@ -0,0 +1,8 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.Internal.Telemetry; + +public interface ITelemetryActivitySender +{ + Task TrySendQueuedActivitiesAsync(); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/ITelemetryService.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/ITelemetryService.cs new file mode 100644 index 0000000000..32ec6f706a --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/ITelemetryService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Volo.Abp.Internal.Telemetry; +public interface ITelemetryService +{ + IAsyncDisposable TrackActivityAsync(string activityName, Action>? additionalProperties = null); + Task AddActivityAsync(string activityName, Action>? additionalProperties = null); + Task AddErrorActivityAsync(Action> additionalProperties); + Task AddErrorActivityAsync(string errorMessage); + Task AddErrorForActivityAsync(string failingActivity, string errorMessage); +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryActivitySender.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryActivitySender.cs new file mode 100644 index 0000000000..d5efc1ccfd --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryActivitySender.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; + +namespace Volo.Abp.Internal.Telemetry; + +public class TelemetryActivitySender : ITelemetryActivitySender, IScopedDependency +{ + private readonly ITelemetryActivityStorage _telemetryActivityStorage; + private readonly ILogger _logger; + + private const int ActivitySendBatchSize = 50; + private const int MaxRetryAttempts = 3; + private const int RetryDelayMilliseconds = 1000; + + public TelemetryActivitySender(ITelemetryActivityStorage telemetryActivityStorage, ILogger logger) + { + _telemetryActivityStorage = telemetryActivityStorage; + _logger = logger; + } + + public async Task TrySendQueuedActivitiesAsync() + { + if (!_telemetryActivityStorage.ShouldSendActivities()) + { + return; + } + + await SendActivitiesAsync(); + } + + + private async Task SendActivitiesAsync() + { + try + { + var activities = _telemetryActivityStorage.GetActivities(); + var batches = CreateActivityBatches(activities); + + using var httpClient = new HttpClient(); + ConfigureHttpClientAuthentication(httpClient); + + foreach (var batch in batches) + { + var isSuccessful = await TrySendBatchWithRetriesAsync(httpClient, batch); + + if (!isSuccessful) + { + break; + } + } + } + catch + { + //ignored + } + } + + + private async Task TrySendBatchWithRetriesAsync(HttpClient httpClient, ActivityEvent[] activities) + { + var currentAttempt = 0; + + while (currentAttempt < MaxRetryAttempts) + { + try + { + var response = await httpClient.PostAsync($"{AbpPlatformUrls.AbpTelemetryApiUrl}api/telemetry/collect", new StringContent(JsonSerializer.Serialize(activities), Encoding.UTF8, "application/json")); + + if (response.IsSuccessStatusCode) + { + _telemetryActivityStorage.DeleteActivities(activities); + } + else + { + _logger.LogWithLevel(LogLevel.Trace, + $"Failed to send telemetry activities. Status code: {response.StatusCode}, Reason: {response.ReasonPhrase}"); + _telemetryActivityStorage.MarkActivitiesAsFailed(activities); + } + + return true; + } + catch (Exception ex) + { + _logger.LogWithLevel(LogLevel.Trace, $"Error sending telemetry activities: {ex.Message}"); + currentAttempt++; + await Task.Delay(currentAttempt * RetryDelayMilliseconds); + } + } + + _logger.LogWithLevel(LogLevel.Trace, "Max retries reached. Failed to send telemetry activities."); + + return false; + } + + private static IEnumerable CreateActivityBatches(List activities) + { + return activities + .Select((x, i) => new { Index = i, Value = x }) + .GroupBy(x => x.Index / ActivitySendBatchSize) + .Select(x => x.Select(v => v.Value).ToArray()); + } + + private static void ConfigureHttpClientAuthentication(HttpClient httpClient) + { + if (!File.Exists(TelemetryPaths.AccessToken)) + { + return; + } + + var accessToken = File.ReadAllText(TelemetryPaths.AccessToken, Encoding.UTF8); + + if (accessToken.IsNullOrEmpty()) + { + return; + } + + httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs new file mode 100644 index 0000000000..8a2e3b4382 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Internal/Telemetry/TelemetryService.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Constants; +using ActivityContext = Volo.Abp.Internal.Telemetry.Activity.ActivityContext; + +namespace Volo.Abp.Internal.Telemetry; + +public class TelemetryService : ITelemetryService, IScopedDependency +{ + private readonly ITelemetryActivitySender _telemetryActivitySender; + private readonly ITelemetryActivityEventBuilder _telemetryActivityEventBuilder; + private readonly ITelemetryActivityStorage _telemetryActivityStorage; + + public TelemetryService(ITelemetryActivitySender telemetryActivitySender, + ITelemetryActivityEventBuilder telemetryActivityEventBuilder, + ITelemetryActivityStorage telemetryActivityStorage) + { + _telemetryActivitySender = telemetryActivitySender; + _telemetryActivityEventBuilder = telemetryActivityEventBuilder; + _telemetryActivityStorage = telemetryActivityStorage; + } + + + public IAsyncDisposable TrackActivityAsync(string activityName, + Action>? additionalProperties = null) + { + Check.NotNullOrEmpty(activityName, nameof(activityName)); + var stopwatch = Stopwatch.StartNew(); + var context = ActivityContext.Create(activityName, additionalProperties: additionalProperties); + + return new AsyncDisposeFunc(async () => + { + stopwatch.Stop(); + context.Current[ActivityPropertyNames.ActivityDuration] = stopwatch.ElapsedMilliseconds; + await AddActivityAsync(context); + }); + } + + public async Task AddActivityAsync(string activityName, + Action>? additionalProperties = null) + { + Check.NotNullOrEmpty(activityName, nameof(activityName)); + var context = ActivityContext.Create(activityName, additionalProperties: additionalProperties); + await AddActivityAsync(context); + } + + public async Task AddErrorActivityAsync(Action> additionalProperties) + { + var context = ActivityContext.Create(ActivityNameConsts.Error, additionalProperties: additionalProperties); + await AddActivityAsync(context); + } + + public async Task AddErrorActivityAsync(string errorMessage) + { + var context = ActivityContext.Create(ActivityNameConsts.Error, errorMessage); + await AddActivityAsync(context); + } + + public async Task AddErrorForActivityAsync(string failingActivity, string errorMessage) + { + Check.NotNullOrEmpty(failingActivity, nameof(failingActivity)); + var context = ActivityContext.Create(ActivityNameConsts.Error, errorMessage, configure => + { + configure[ActivityPropertyNames.FailingActivity] = failingActivity; + }); + await AddActivityAsync(context); + } + + private Task AddActivityAsync(ActivityContext context) + { + _ = Task.Run(async () => + { + await BuildAndSendActivityAsync(context); + }); + + return Task.CompletedTask; + } + + private async Task BuildAndSendActivityAsync(ActivityContext context) + { + try + { + var activityEvent = await _telemetryActivityEventBuilder.BuildAsync(context); + if (activityEvent is null) + { + return; + } + + _telemetryActivityStorage.SaveActivity(activityEvent); + await _telemetryActivitySender.TrySendQueuedActivitiesAsync(); + } + catch + { + //ignored + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs index 8a67d20b31..0118fd9874 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs @@ -80,6 +80,37 @@ public static class TypeHelper return false; } + public static TProperty? ChangeTypePrimitiveExtended(object? value) + { + if (value == null) + { + return default; + } + + if (IsPrimitiveExtended(typeof(TProperty), includeEnums: true)) + { + var conversionType = typeof(TProperty); + if (IsNullable(conversionType)) + { + conversionType = conversionType.GetFirstGenericArgumentIfNullable(); + } + + if (conversionType == typeof(Guid)) + { + return (TProperty)TypeDescriptor.GetConverter(conversionType).ConvertFromInvariantString(value.ToString()!)!; + } + + if (conversionType.IsEnum) + { + return (TProperty)Enum.Parse(conversionType, value.ToString()!); + } + + return (TProperty)Convert.ChangeType(value, conversionType, CultureInfo.InvariantCulture); + } + + throw new AbpException("ChangeTypePrimitiveExtended does not support non-primitive types. Use non-generic GetProperty method and handle type casting manually."); + } + public static bool IsNullable(Type type) { return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs index 1d058d19b9..32c0cc71bf 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs @@ -44,16 +44,18 @@ public abstract class BasicRepositoryBase : public bool? IsChangeTrackingEnabled { get; protected set; } - protected string? CustomEntityName { get; private set; } + public string? EntityName { get; set; } - public void SetCustomEntityName(string? name) + public void SetEntityName(string? name) { - CustomEntityName = name; + EntityName = name; } - protected BasicRepositoryBase() - { + public string ProviderName { get; } + protected BasicRepositoryBase(string providerName) + { + ProviderName = Check.NotNullOrWhiteSpace(providerName, nameof(providerName)); } public abstract Task InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default); @@ -146,6 +148,12 @@ public abstract class BasicRepositoryBase : public abstract class BasicRepositoryBase : BasicRepositoryBase, IBasicRepository where TEntity : class, IEntity { + protected BasicRepositoryBase(string providerName) + : base(providerName) + { + + } + public virtual async Task GetAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { var entity = await FindAsync(id, includeDetails, cancellationToken); diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs index c5942088f0..cadc25da43 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs @@ -8,13 +8,15 @@ using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories; /// -/// Just to mark a class as repository. +/// The base interface to implement a repository for an entity. /// public interface IRepository { bool? IsChangeTrackingEnabled { get; } - void SetCustomEntityName(string? name); + string? EntityName { get; set; } + + string ProviderName { get; } } public interface IRepository : IReadOnlyRepository, IBasicRepository diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs index eb2457f8c8..1277b9ceb8 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs @@ -14,6 +14,11 @@ namespace Volo.Abp.Domain.Repositories; public abstract class RepositoryBase : BasicRepositoryBase, IRepository, IUnitOfWorkManagerAccessor where TEntity : class, IEntity { + protected RepositoryBase(string providerName) + : base(providerName) + { + } + [Obsolete("Use WithDetailsAsync method.")] public virtual IQueryable WithDetails() { @@ -92,6 +97,11 @@ public abstract class RepositoryBase : BasicRepositoryBase, IR public abstract class RepositoryBase : RepositoryBase, IRepository where TEntity : class, IEntity { + protected RepositoryBase(string providerName) + : base(providerName) + { + } + public abstract Task GetAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default); public abstract Task FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default); diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs index 3c43798c38..70e69490a4 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs @@ -250,4 +250,13 @@ public static class RepositoryExtensions hardDeleteEntities.Add(entity); await repository.DeleteAsync(entity, autoSave, cancellationToken); } + + public static TRepository SetEntityName( + this TRepository repository, + string name + ) where TRepository : class, IRepository + { + repository.EntityName = name; + return repository; + } } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Telemetry/TelemetryDomainInfoEnricher.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Telemetry/TelemetryDomainInfoEnricher.cs new file mode 100644 index 0000000000..543cf8e406 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Telemetry/TelemetryDomainInfoEnricher.cs @@ -0,0 +1,41 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Activity.Contracts; +using Volo.Abp.Internal.Telemetry.Activity.Providers; +using Volo.Abp.Internal.Telemetry.Constants; +using Volo.Abp.Reflection; + +namespace Volo.Abp.Domain.Telemetry; + +[ExposeServices(typeof(ITelemetryActivityEventEnricher), typeof(IHasParentTelemetryActivityEventEnricher))] +public class TelemetryDomainInfoEnricher : TelemetryActivityEventEnricher, IHasParentTelemetryActivityEventEnricher +{ + private readonly ITypeFinder _typeFinder; + + public TelemetryDomainInfoEnricher(ITypeFinder typeFinder, IServiceProvider serviceProvider) + : base(serviceProvider) + { + _typeFinder = typeFinder; + } + + protected override Task CanExecuteAsync(ActivityContext context) + { + return Task.FromResult(context.ProjectId.HasValue); + } + + protected override Task ExecuteAsync(ActivityContext context) + { + var entityCount = _typeFinder.Types.Count(t => + typeof(IEntity).IsAssignableFrom(t) && !t.IsAbstract && + !t.AssemblyQualifiedName!.StartsWith(TelemetryConsts.VoloNameSpaceFilter)); + + context.Current[ActivityPropertyNames.EntityCount] = entityCount; + + return Task.CompletedTask; + } + +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index 760660dc82..575dccadef 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -93,6 +93,7 @@ public class EfCoreRepository : RepositoryBase, IE public IEfCoreBulkOperationProvider? BulkOperationProvider => LazyServiceProvider.LazyGetService(); public EfCoreRepository(IDbContextProvider dbContextProvider) + : base(AbpEfCoreConsts.ProviderName) { _dbContextProvider = dbContextProvider; @@ -122,8 +123,8 @@ public class EfCoreRepository : RepositoryBase, IE private DbSet GetDbSetInternal(TDbContext dbContext) { - return CustomEntityName != null - ? dbContext.Set(CustomEntityName) + return EntityName != null + ? dbContext.Set(EntityName) : dbContext.Set(); } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEfCoreConsts.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEfCoreConsts.cs new file mode 100644 index 0000000000..6d1f0c9dc6 --- /dev/null +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEfCoreConsts.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.EntityFrameworkCore; + +public class AbpEfCoreConsts +{ + public const string ProviderName = "Volo.Abp.EntityFrameworkCore"; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs index ad5ac9ecde..af42ea905b 100644 --- a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs @@ -1,8 +1,10 @@ using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; using Rebus.Config; using Rebus.Handlers; using Rebus.Pipeline; using Rebus.Pipeline.Receive; +using Rebus.ServiceProvider; using Volo.Abp.Modularity; namespace Volo.Abp.EventBus.Rebus; @@ -16,11 +18,12 @@ public class AbpEventBusRebusModule : AbpModule context.Services.AddTransient(typeof(IHandleMessages<>), typeof(RebusDistributedEventHandlerAdapter<>)); var preActions = context.Services.GetPreConfigureActions(); - Configure(rebusOptions => + var rebusOptions = preActions.Configure(); + Configure(options => { - preActions.Configure(rebusOptions); + preActions.Configure(options); }); - + context.Services.AddRebus(configure => { configure.Options(options => @@ -34,9 +37,9 @@ public class AbpEventBusRebusModule : AbpModule }); }); - preActions.Configure().Configurer?.Invoke(configure); + rebusOptions.Configurer?.Invoke(configure); return configure; - }); + }, startAutomatically: false, key: rebusOptions.RebusInstanceName); } public override void OnApplicationInitialization(ApplicationInitializationContext context) @@ -46,6 +49,9 @@ public class AbpEventBusRebusModule : AbpModule .GetRequiredService() .Initialize(); - context.ServiceProvider.StartRebus(); + var rebusOptions = context.ServiceProvider.GetRequiredService>().Value; + context.ServiceProvider + .GetRequiredService() + .StartBus(rebusOptions.RebusInstanceName); } } diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs index 4b93082722..8f61d8dae3 100644 --- a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs @@ -10,10 +10,10 @@ namespace Volo.Abp.EventBus.Rebus; public class AbpRebusEventBusOptions { - [NotNull] - public string InputQueueName { get; set; } = default!; + public string InputQueueName { get; set; } = null!; + + public string RebusInstanceName { get; set; } = "default-instance"; - [NotNull] public Action Configurer { get => _configurer; set => _configurer = Check.NotNull(value, nameof(value)); diff --git a/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/AbpMapperlyModule.cs b/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/AbpMapperlyModule.cs index f879354ed3..60381163eb 100644 --- a/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/AbpMapperlyModule.cs +++ b/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/AbpMapperlyModule.cs @@ -1,6 +1,4 @@ -using System; -using System.Linq; -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Auditing; using Volo.Abp.Modularity; using Volo.Abp.ObjectExtending; @@ -22,23 +20,6 @@ public class AbpMapperlyModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { - // This is the temporary solution, We will remove it in when all apps are migrated to Mapperly. - var disableMapperlyAutoObjectMappingProvider = false; - - var modules = context.Services.GetSingletonInstance().Modules.ToList(); - var autoMapperModuleIndex = modules.FindIndex(x => x.Type.FullName!.Equals("Volo.Abp.AutoMapper.AbpAutoMapperModule", StringComparison.OrdinalIgnoreCase)); - if (autoMapperModuleIndex >= 0) - { - var mapperlyModuleIndex = modules.FindIndex(x => x.Type == typeof(AbpMapperlyModule)); - if (mapperlyModuleIndex > autoMapperModuleIndex) - { - disableMapperlyAutoObjectMappingProvider = true; - } - } - - if (!disableMapperlyAutoObjectMappingProvider) - { - context.Services.AddMapperlyObjectMapper(); - } + context.Services.AddMapperlyObjectMapper(); } } diff --git a/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/MapperlyAutoObjectMappingProvider.cs b/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/MapperlyAutoObjectMappingProvider.cs index 80f959710d..3876ee09a1 100644 --- a/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/MapperlyAutoObjectMappingProvider.cs +++ b/framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/MapperlyAutoObjectMappingProvider.cs @@ -9,7 +9,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Data; using Volo.Abp.ObjectExtending; using Volo.Abp.ObjectMapping; -using Volo.Abp.Reflection; namespace Volo.Abp.Mapperly; @@ -47,7 +46,7 @@ public class MapperlyAutoObjectMappingProvider : IAutoObjectMappingProvider { mapper.BeforeMap((TSource)source); var destination = mapper.Map((TSource)source); - TryMapExtraProperties(mapper.GetType().GetSingleAttributeOrNull(), (TSource)source, destination, new ExtraPropertyDictionary()); + TryMapExtraProperties(mapper.GetType().GetSingleAttributeOrNull(), (TSource)source, destination, GetExtraProperties(destination)); mapper.AfterMap((TSource)source, destination); return destination; } @@ -62,8 +61,7 @@ public class MapperlyAutoObjectMappingProvider : IAutoObjectMappingProvider return destination; } - throw new AbpException($"No {TypeHelper.GetFullNameHandlingNullableAndGenerics(typeof(IAbpMapperlyMapper))} or" + - $" {TypeHelper.GetFullNameHandlingNullableAndGenerics(typeof(IAbpReverseMapperlyMapper))} was found"); + throw GetNoMapperFoundException(); } public virtual TDestination Map(TSource source, TDestination destination) @@ -95,8 +93,34 @@ public class MapperlyAutoObjectMappingProvider : IAutoObjectMappingProvider return destination; } - throw new AbpException($"No {TypeHelper.GetFullNameHandlingNullableAndGenerics(typeof(IAbpMapperlyMapper))} or" + - $" {TypeHelper.GetFullNameHandlingNullableAndGenerics(typeof(IAbpReverseMapperlyMapper))} was found"); + throw GetNoMapperFoundException(); + } + + protected virtual AbpException GetNoMapperFoundException() + { + var newLine = Environment.NewLine; + var message = "No object mapping was found for the specified source and destination types." + + newLine + + newLine + + "Mapping attempted:" + + newLine + + $"{typeof(TSource).Name} -> {typeof(TDestination).Name}" + + newLine + + $"{typeof(TSource).FullName} -> {typeof(TDestination).FullName}" + + newLine + + newLine + + "How to fix:" + + newLine + + "Define a mapping class for these types:" + + newLine + + " - Use MapperBase for one-way mapping." + + newLine + + " - Use TwoWayMapperBase for two-way mapping." + + newLine + + newLine + + "For details, see the Mapperly integration document https://abp.io/docs/latest/framework/infrastructure/object-to-object-mapping#mapperly-integration"; + + return new AbpException(message); } protected virtual bool TryToMapCollection(TSource source, TDestination? destination, out TDestination collectionResult) @@ -212,13 +236,27 @@ public class MapperlyAutoObjectMappingProvider : IAutoObjectMappingProvider protected virtual void TryMapExtraProperties(MapExtraPropertiesAttribute? mapExtraPropertiesAttribute, TSource source, TDestination destination, ExtraPropertyDictionary destinationExtraProperty) { - if (mapExtraPropertiesAttribute != null && - typeof(IHasExtraProperties).IsAssignableFrom(typeof(TDestination)) && - typeof(IHasExtraProperties).IsAssignableFrom(typeof(TSource))) + if(source is not IHasExtraProperties sourceHasExtraProperties) + { + return; + } + + if (destination is not IHasExtraProperties destinationHasExtraProperties) + { + return; + } + + if (sourceHasExtraProperties.ExtraProperties != null && sourceHasExtraProperties.ExtraProperties == + destinationHasExtraProperties.ExtraProperties) + { + ObjectHelper.TrySetProperty(destinationHasExtraProperties, x => x.ExtraProperties, () => new ExtraPropertyDictionary(destinationHasExtraProperties.ExtraProperties));; + } + + if (mapExtraPropertiesAttribute != null) { MapExtraProperties( - source!.As(), - destination!.As(), + sourceHasExtraProperties, + destinationHasExtraProperties, destinationExtraProperty, mapExtraPropertiesAttribute.DefinitionChecks, mapExtraPropertiesAttribute.IgnoredProperties, diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs index 058508a30a..9bef2a124a 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs @@ -50,6 +50,7 @@ public class MemoryDbRepository : RepositoryBase LazyServiceProvider.LazyGetRequiredService(); public MemoryDbRepository(IMemoryDatabaseProvider databaseProvider) + : base(AbpMemoryDbConsts.ProviderName) { DatabaseProvider = databaseProvider; } diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbConsts.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbConsts.cs new file mode 100644 index 0000000000..a15563c68f --- /dev/null +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbConsts.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.MemoryDb; + +public class AbpMemoryDbConsts +{ + public const string ProviderName = "Volo.Abp.MemoryDb"; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs index fdc7464d6b..a8cc1d39ae 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs @@ -101,6 +101,7 @@ public class MongoDbRepository public IMongoDbRepositoryFilterer RepositoryFilterer => LazyServiceProvider.LazyGetService>()!; public MongoDbRepository(IMongoDbContextProvider dbContextProvider) + : base(AbpMongoDbConsts.ProviderName) { DbContextProvider = dbContextProvider; } diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpBsonSerializer.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpBsonSerializer.cs new file mode 100644 index 0000000000..59b24e6063 --- /dev/null +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpBsonSerializer.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Concurrent; + +using System.Reflection; +using MongoDB.Bson.Serialization; + +namespace Volo.Abp.MongoDB; + +public static class AbpBsonSerializer +{ + private static readonly ConcurrentDictionary Cache; + + static AbpBsonSerializer() + { + var registry = BsonSerializer.SerializerRegistry; + var type = typeof(BsonSerializerRegistry); + var cacheField = type.GetField("_cache", BindingFlags.NonPublic | BindingFlags.Instance) ?? + throw new AbpException($"Cannot find _cache field of {type.FullName}."); + Cache = (ConcurrentDictionary)cacheField.GetValue(registry)!; + } + + public static void RemoveSerializer() + { + Cache.TryRemove(typeof(T), out _); + } + + public static ConcurrentDictionary GetSerializerCache() + { + return Cache; + } +} diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbConsts.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbConsts.cs new file mode 100644 index 0000000000..e107d31bf0 --- /dev/null +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbConsts.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.MongoDB; + +public class AbpMongoDbConsts +{ + public const string ProviderName = "Volo.Abp.MongoDB"; +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs index 195491d989..fb9d6eaea1 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs @@ -19,7 +19,8 @@ public class AbpMongoDbModule : AbpModule { static AbpMongoDbModule() { - BsonSerializer.TryRegisterSerializer(new GuidSerializer(GuidRepresentation.Standard)); + AbpBsonSerializer.RemoveSerializer(); + BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard)); BsonTypeMapper.RegisterCustomTypeMapper(typeof(Guid), new AbpGuidCustomBsonTypeMapper()); } diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/HasExtraPropertiesExtensions.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/HasExtraPropertiesExtensions.cs index 75f5672a29..54cdc2bc94 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/HasExtraPropertiesExtensions.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/Data/HasExtraPropertiesExtensions.cs @@ -26,34 +26,9 @@ public static class HasExtraPropertiesExtensions public static TProperty? GetProperty(this IHasExtraProperties source, string name, TProperty? defaultValue = default) { - var value = source.GetProperty(name); - if (value == null) - { - return defaultValue; - } - - if (TypeHelper.IsPrimitiveExtended(typeof(TProperty), includeEnums: true)) - { - var conversionType = typeof(TProperty); - if (TypeHelper.IsNullable(conversionType)) - { - conversionType = conversionType.GetFirstGenericArgumentIfNullable(); - } - - if (conversionType == typeof(Guid)) - { - return (TProperty)TypeDescriptor.GetConverter(conversionType).ConvertFromInvariantString(value.ToString()!)!; - } - - if (conversionType.IsEnum) - { - return (TProperty)Enum.Parse(conversionType, value.ToString()!); - } - - return (TProperty)Convert.ChangeType(value, conversionType, CultureInfo.InvariantCulture); - } - - throw new AbpException("GetProperty does not support non-primitive types. Use non-generic GetProperty method and handle type casting manually."); + return TypeHelper.ChangeTypePrimitiveExtended( + source.GetProperty(name, (object?) defaultValue) + ) ?? defaultValue; } public static TSource SetProperty( diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs index 28cacd4be0..b2a9179415 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/AuthorizationTestPermissionDefinitionProvider.cs @@ -15,8 +15,12 @@ public class AuthorizationTestPermissionDefinitionProvider : PermissionDefinitio var group = context.AddGroup("TestGroup"); - group.AddPermission("MyAuthorizedService1"); + group[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName].ShouldBe(typeof(AuthorizationTestPermissionDefinitionProvider).FullName); + + var permission1 = group.AddPermission("MyAuthorizedService1"); + permission1[PermissionDefinitionContext.KnownPropertyNames.CurrentProviderName].ShouldBe(typeof(AuthorizationTestPermissionDefinitionProvider).FullName); + group.AddPermission("MyPermission1").StateCheckers.Add(new TestRequireEditionPermissionSimpleStateChecker()); group.AddPermission("MyPermission2"); group.AddPermission("MyPermission3"); diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/ActivityEvent_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/ActivityEvent_Tests.cs new file mode 100644 index 0000000000..42083ceaa1 --- /dev/null +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/ActivityEvent_Tests.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using Shouldly; +using Volo.Abp.Internal.Telemetry.Activity; +using Volo.Abp.Internal.Telemetry.Constants; +using Xunit; + +namespace Volo.Abp.Telemetry; + +public class ActivityEvent_Tests +{ + [Fact] + public void Should_Create_ActivityEvent_With_Required_Parameters() + { + // Arrange + var activityName = "TestActivity"; + var details = "Test Details"; + + // Act + var activityEvent = new ActivityEvent(activityName, details); + + // Assert + activityEvent[ActivityPropertyNames.ActivityName].ShouldBe(activityName); + activityEvent[ActivityPropertyNames.ActivityDetails].ShouldBe(details); + activityEvent[ActivityPropertyNames.Id].ShouldNotBe(Guid.Empty); + activityEvent[ActivityPropertyNames.Time].ShouldNotBe(default); + } + + [Theory] + [InlineData(null)] + [InlineData("")] + [InlineData(" ")] + public void Should_Throw_Exception_When_ActivityName_Is_Invalid(string invalidName) + { + // Act & Assert + Should.Throw(() => + new ActivityEvent(invalidName)); + } + + [Fact] + public void Should_Set_And_Get_AdditionalProperties() + { + // Arrange + var activityEvent = new ActivityEvent("TestActivity"); + var additionalProps = new Dictionary + { + { "key1", "value1" }, + { "key2", 42 } + }; + + // Act + activityEvent[ActivityPropertyNames.AdditionalProperties] = additionalProps; + + // Assert + + var activityAdditionalProps = activityEvent[ActivityPropertyNames.AdditionalProperties] as Dictionary; + activityAdditionalProps.ShouldNotBeNull(); + activityAdditionalProps.Count.ShouldBe(2); + activityAdditionalProps["key1"].ShouldBe("value1"); + activityAdditionalProps["key2"].ShouldBe(42); + } + + [Fact] + public void Should_Return_Default_Values_When_Properties_Not_Set() + { + // Arrange + var activityEvent = new ActivityEvent("TestActivity"); + + // Assert + activityEvent[ActivityPropertyNames.ActivityDetails].ShouldBeNull(); + } + + [Fact] + public void Should_Behave_Like_Dictionary() + { + // Arrange + var activityEvent = new ActivityEvent("TestActivity"); + + // Act + activityEvent["CustomKey"] = "CustomValue"; + + // Assert + activityEvent["CustomKey"].ShouldBe("CustomValue"); + activityEvent.ContainsKey("CustomKey").ShouldBeTrue(); + } + + +} + diff --git a/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/Cryptography_Tests.cs b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/Cryptography_Tests.cs new file mode 100644 index 0000000000..fd90e1221a --- /dev/null +++ b/framework/test/Volo.Abp.Core.Tests/Volo/Abp/Telemetry/Cryptography_Tests.cs @@ -0,0 +1,52 @@ +using System; +using Shouldly; +using Volo.Abp.Internal.Telemetry.Helpers; +using Xunit; + +namespace Volo.Abp.Telemetry; + +public class Cryptography_Tests +{ + [Fact] + public void Should_Encrypt_And_Decrypt_Text_Successfully() + { + // Arrange + const string plainText = "Test message 123!"; + + // Act + var encryptedText = Cryptography.Encrypt(plainText); + var decryptedText = Cryptography.Decrypt(encryptedText); + + // Assert + decryptedText.ShouldBe(plainText); + } + + [Fact] + public void Should_Generate_Different_Encrypted_Values_For_Different_Inputs() + { + // Arrange + const string text1 = "Message 1"; + const string text2 = "Message 2"; + + // Act + var encrypted1 = Cryptography.Encrypt(text1); + var encrypted2 = Cryptography.Encrypt(text2); + + // Assert + encrypted1.ShouldNotBe(encrypted2); + } + [Fact] + public void Encrypt_Should_Throw_ArgumentException_When_Input_Is_Null() + { + // Act & Assert + Should.Throw(() => Cryptography.Encrypt(null)); + } + + [Fact] + public void Decrypt_Should_Throw_ArgumentException_When_Input_Is_Null() + { + // Act & Assert + Should.Throw(() => Cryptography.Decrypt(null)); + } + +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs index 63aa0e3411..bb2e9eeecd 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs @@ -295,6 +295,10 @@ public class RepositoryRegistration_Tests public class MyTestDefaultRepository : RepositoryBase where TEntity : class, IEntity { + public MyTestDefaultRepository() + : base("MyTestDefault") + { + } [Obsolete("Use GetQueryableAsync method.")] protected override IQueryable GetQueryable() @@ -408,11 +412,8 @@ public class RepositoryRegistration_Tests public class MyTestAggregateRootWithDefaultPkEmptyRepository : IMyTestAggregateRootWithDefaultPkEmptyRepository { public bool? IsChangeTrackingEnabled { get; set; } - - public void SetCustomEntityName(string name) - { - - } + public string EntityName { get; set; } + public string ProviderName { get; } = "MyFakeProvider"; } public class TestDbContextRegistrationOptions : AbpCommonDbContextRegistrationOptions diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/SharedEntity_Repository_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/SharedEntity_Repository_Tests.cs index abdc7a4e6d..869069debe 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/SharedEntity_Repository_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/SharedEntity_Repository_Tests.cs @@ -29,7 +29,7 @@ public class SharedEntity_Repository_Tests : EntityFrameworkCoreTestBase { await WithUnitOfWorkAsync(async () => { - TestSharedTypeEntityRepository.SetCustomEntityName("TestSharedEntity1"); + TestSharedTypeEntityRepository.SetEntityName("TestSharedEntity1"); var tenantId = Guid.NewGuid(); await TestSharedTypeEntityRepository.InsertManyAsync(new List() @@ -121,7 +121,7 @@ public class SharedEntity_Repository_Tests : EntityFrameworkCoreTestBase } } - TestSharedTypeEntityRepository.SetCustomEntityName("TestSharedEntity2"); + TestSharedTypeEntityRepository.SetEntityName("TestSharedEntity2"); await TestSharedTypeEntityRepository.InsertManyAsync(new List() { new TestSharedEntity(Guid.NewGuid()) @@ -146,7 +146,7 @@ public class SharedEntity_Repository_Tests : EntityFrameworkCoreTestBase { await WithUnitOfWorkAsync(async () => { - TestSharedTypeEntityRepository.SetCustomEntityName("TestSharedEntity1"); + TestSharedTypeEntityRepository.SetEntityName("TestSharedEntity1"); var entity = new TestSharedEntity(Guid.NewGuid()) { @@ -169,7 +169,7 @@ public class SharedEntity_Repository_Tests : EntityFrameworkCoreTestBase entity.Birthday.ShouldNotBeNull(); entity["DynamicProperty"].ShouldBe("Test Value1"); - TestSharedTypeEntityRepository.SetCustomEntityName("TestSharedEntity2"); + TestSharedTypeEntityRepository.SetEntityName("TestSharedEntity2"); entity = await TestSharedTypeEntityRepository.FindAsync(x => x.Id == entity.Id!); entity.ShouldBeNull(); }); diff --git a/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/AbpMapperlyModule_Basic_Tests.cs b/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/AbpMapperlyModule_Basic_Tests.cs index 3f0773f0a1..b5987769be 100644 --- a/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/AbpMapperlyModule_Basic_Tests.cs +++ b/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/AbpMapperlyModule_Basic_Tests.cs @@ -106,9 +106,14 @@ public class AbpMapperlyModule_Basic_Tests : AbpIntegratedTest(() =>_objectMapper.Map(new MyEntity())); - exception.Message.ShouldBe("No " + - "Volo.Abp.Mapperly.IAbpMapperlyMapper or " + - "Volo.Abp.Mapperly.IAbpReverseMapperlyMapper" + - " was found"); + exception.Message.ShouldBe("No object mapping was found for the specified source and destination types.\n\n" + + "Mapping attempted:\n" + + "MyEntity -> MyClassDto\n" + + "Volo.Abp.Mapperly.SampleClasses.MyEntity -> Volo.Abp.Mapperly.MyClassDto\n\n" + + "How to fix:\n" + + "Define a mapping class for these types:" + "\n" + + " - Use MapperBase for one-way mapping.\n" + + " - Use TwoWayMapperBase for two-way mapping.\n\n" + + "For details, see the Mapperly integration document https://abp.io/docs/latest/framework/infrastructure/object-to-object-mapping#mapperly-integration"); } } diff --git a/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/ExtraProperties_Dictionary_Reference_Tests.cs b/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/ExtraProperties_Dictionary_Reference_Tests.cs new file mode 100644 index 0000000000..e5453d09a3 --- /dev/null +++ b/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/ExtraProperties_Dictionary_Reference_Tests.cs @@ -0,0 +1,158 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Riok.Mapperly.Abstractions; +using Shouldly; +using Volo.Abp.Data; +using Volo.Abp.Mapperly.SampleClasses; +using Volo.Abp.ObjectExtending; +using Volo.Abp.ObjectMapping; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.Mapperly; + +public class ExtraProperties_Dictionary_Reference_Tests : AbpIntegratedTest +{ + private readonly IObjectMapper _objectMapper; + + public ExtraProperties_Dictionary_Reference_Tests() + { + _objectMapper = ServiceProvider.GetRequiredService(); + } + + [Fact] + public void Should_Create_New_ExtraProperties_Dictionary_When_Same_Reference() + { + // Arrange: Create a shared ExtraProperties dictionary + var sharedExtraProperties = new ExtraPropertyDictionary + { + {"TestProperty", "TestValue"}, + {"NumberProperty", 42} + }; + + var source = new TestEntityWithExtraProperties + { + Id = Guid.NewGuid(), + Name = "Source Entity" + }; + + var destination = new TestEntityDtoWithExtraProperties + { + Id = Guid.NewGuid(), + Name = "Destination DTO" + }; + + // Make both source and destination reference the same ExtraProperties dictionary + SetExtraPropertiesReference(source, sharedExtraProperties); + SetExtraPropertiesReference(destination, sharedExtraProperties); + + // Verify they have the same reference before mapping + ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeTrue(); + source.ExtraProperties.Count.ShouldBe(2); + destination.ExtraProperties.Count.ShouldBe(2); + + // Act: Perform mapping + _objectMapper.Map(source, destination); + + // Assert: After mapping, they should have different references + // This is the key fix: when ExtraProperties references are the same, + // a new dictionary should be created for the destination + ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeFalse(); + + // But content should be preserved + destination.ExtraProperties["TestProperty"].ShouldBe("TestValue"); + destination.ExtraProperties["NumberProperty"].ShouldBe(42); + destination.ExtraProperties.Count.ShouldBe(source.ExtraProperties.Count); + } + + [Fact] + public void Should_Not_Create_New_Dictionary_When_Different_References() + { + // Arrange: Create source and destination with different ExtraProperties references + var source = new TestEntityWithExtraProperties + { + Id = Guid.NewGuid(), + Name = "Source Entity" + }; + source.SetProperty("SourceProperty", "SourceValue"); + + var destination = new TestEntityDtoWithExtraProperties + { + Id = Guid.NewGuid(), + Name = "Destination DTO" + }; + destination.SetProperty("DestinationProperty", "DestinationValue"); + + var originalSourceReference = source.ExtraProperties; + + // Verify they have different references before mapping + ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeFalse(); + + // Act: Perform mapping + _objectMapper.Map(source, destination); + + // Assert: Source reference should remain unchanged + ReferenceEquals(source.ExtraProperties, originalSourceReference).ShouldBeTrue(); + + // Destination reference may change due to normal mapping process, but should not be same as source + ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeFalse(); + + destination.ExtraProperties["SourceProperty"].ShouldBe("SourceValue"); + destination.ExtraProperties["DestinationProperty"].ShouldBe("DestinationValue"); + } + + [Fact] + public void Should_Handle_Readonly_ExtraProperties_Gracefully() + { + // Arrange: Create entities with readonly ExtraProperties + var source = new TestEntityWithReadonlyExtraProperties + { + Id = Guid.NewGuid(), + Name = "Source Entity" + }; + source.ExtraProperties.Add("TestProperty", "TestValue"); + + var destination = new TestEntityWithReadonlyExtraProperties + { + Id = Guid.NewGuid(), + Name = "Destination Entity" + }; + + // Make them reference the same ExtraProperties + var sharedExtraProperties = new ExtraPropertyDictionary + { + {"SharedProperty", "SharedValue"} + }; + SetReadonlyExtraPropertiesReference(source, sharedExtraProperties); + SetReadonlyExtraPropertiesReference(destination, sharedExtraProperties); + + // Verify they have the same reference + ReferenceEquals(source.ExtraProperties, destination.ExtraProperties).ShouldBeTrue(); + + // Act & Assert: Should not throw exception even if setter is not available + Should.NotThrow(() => _objectMapper.Map(source, destination)); + } + + private static void SetExtraPropertiesReference(TestEntityWithExtraProperties entity, ExtraPropertyDictionary extraProperties) + { + // Use reflection to set the protected setter from ExtensibleObject + var propertyInfo = typeof(ExtensibleObject).GetProperty(nameof(ExtensibleObject.ExtraProperties)); + propertyInfo?.SetValue(entity, extraProperties); + } + + private static void SetExtraPropertiesReference(TestEntityDtoWithExtraProperties entity, ExtraPropertyDictionary extraProperties) + { + // Use reflection to set the protected setter from ExtensibleObject + var propertyInfo = typeof(ExtensibleObject).GetProperty(nameof(ExtensibleObject.ExtraProperties)); + propertyInfo?.SetValue(entity, extraProperties); + } + + private static void SetReadonlyExtraPropertiesReference(TestEntityWithReadonlyExtraProperties entity, ExtraPropertyDictionary extraProperties) + { + // Use reflection to set the private field + var fieldInfo = typeof(TestEntityWithReadonlyExtraProperties).GetField("_extraProperties", + System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); + fieldInfo?.SetValue(entity, extraProperties); + } +} + diff --git a/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/SampleClasses/MapperlyMappers.cs b/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/SampleClasses/MapperlyMappers.cs index 49be64b61a..eb11d16be1 100644 --- a/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/SampleClasses/MapperlyMappers.cs +++ b/framework/test/Volo.Abp.Mapperly.Tests/Volo/Abp/Mapperly/SampleClasses/MapperlyMappers.cs @@ -1,6 +1,9 @@ -using Riok.Mapperly.Abstractions; +using System; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Data; using Volo.Abp.Mapperly; using Volo.Abp.Mapperly.SampleClasses; +using Volo.Abp.ObjectExtending; using Volo.Abp.ObjectExtending.TestObjects; [Mapper] @@ -42,3 +45,41 @@ public partial class ExtensibleTestPersonWithRegularPropertiesDtoMapper : Mapper public override partial void Map(ExtensibleTestPerson source, ExtensibleTestPersonWithRegularPropertiesDto destination); } + +// Test entities for ExtraProperties dictionary reference tests +public class TestEntityWithExtraProperties : ExtensibleObject +{ + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; +} + +public class TestEntityDtoWithExtraProperties : ExtensibleObject +{ + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; +} + +public class TestEntityWithReadonlyExtraProperties : IHasExtraProperties +{ + private readonly ExtraPropertyDictionary _extraProperties = new(); + + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; + public ExtraPropertyDictionary ExtraProperties => _extraProperties; +} + +[Mapper] +public partial class TestEntityWithExtraPropertiesMapper : MapperBase +{ + public override partial TestEntityDtoWithExtraProperties Map(TestEntityWithExtraProperties source); + + public override partial void Map(TestEntityWithExtraProperties source, TestEntityDtoWithExtraProperties destination); +} + +[Mapper] +public partial class TestEntityWithReadonlyExtraPropertiesMapper : MapperBase +{ + public override partial TestEntityWithReadonlyExtraProperties Map(TestEntityWithReadonlyExtraProperties source); + + public override partial void Map(TestEntityWithReadonlyExtraProperties source, TestEntityWithReadonlyExtraProperties destination); +} \ No newline at end of file diff --git a/latest-versions.json b/latest-versions.json index 90c464cd3b..e1800b4312 100644 --- a/latest-versions.json +++ b/latest-versions.json @@ -1,4 +1,13 @@ [ + { + "version": "9.3.2", + "releaseDate": "", + "type": "stable", + "message": "", + "leptonx": { + "version": "4.3.2" + } + }, { "version": "9.3.1", "releaseDate": "", diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationMappers.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationMappers.cs index dcfaf275dd..20cfd1753e 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationMappers.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationMappers.cs @@ -4,7 +4,7 @@ using Volo.Abp.Mapperly; namespace Volo.Abp.Account; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class IdentityUserToProfileDtoMapper : MapperBase { diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs index 04f25d33d8..9291cae3fd 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AbpAccountApplicationModule.cs @@ -1,4 +1,5 @@ -using Volo.Abp.Mapperly; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.Identity; using Volo.Abp.Modularity; @@ -28,5 +29,7 @@ public class AbpAccountApplicationModule : AbpModule { options.Applications["MVC"].Urls[AccountUrlNames.PasswordReset] = "Account/ResetPassword"; }); + + context.Services.AddMapperlyObjectMapper(); } } diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs index cc7cdd8c83..09f78f2851 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs @@ -33,6 +33,7 @@ public class AccountAppService : ApplicationService, IAccountAppService IdentityOptions = identityOptions; LocalizationResource = typeof(AccountResource); + ObjectMapperContext = typeof(AbpAccountApplicationModule); } public virtual async Task RegisterAsync(RegisterDto input) diff --git a/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountBlazorMappers.cs b/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountBlazorMappers.cs index 98ef9f9ab6..f3079ae8d5 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountBlazorMappers.cs +++ b/modules/account/src/Volo.Abp.Account.Blazor/AbpAccountBlazorMappers.cs @@ -5,7 +5,7 @@ using Volo.Abp.Identity; namespace Volo.Abp.Account.Blazor; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class ProfileDtoToPersonalInfoModelMapper : MapperBase { @@ -18,7 +18,7 @@ public partial class ProfileDtoToPersonalInfoModelMapper : MapperBase { diff --git a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebMappers.cs b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebMappers.cs index 09a2e8373c..e352b14ac6 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebMappers.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebMappers.cs @@ -4,7 +4,7 @@ using Volo.Abp.Mapperly; namespace Volo.Abp.Account.Web; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class ProfileDtoToPersonalInfoModelMapper : MapperBase { diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj index e1ec109ab9..b18fcaf03b 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp.BackgroundJobs.Domain.csproj @@ -10,7 +10,7 @@ - + diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs index 1a551ef7c4..3342deb794 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/AbpBackgroundJobsDomainModule.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Modularity; namespace Volo.Abp.BackgroundJobs; @@ -7,16 +7,13 @@ namespace Volo.Abp.BackgroundJobs; [DependsOn( typeof(AbpBackgroundJobsDomainSharedModule), typeof(AbpBackgroundJobsModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class AbpBackgroundJobsDomainModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); + } } diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs deleted file mode 100644 index 67891f4f91..0000000000 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs +++ /dev/null @@ -1,17 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; - -namespace Volo.Abp.BackgroundJobs; - -public class BackgroundJobsDomainAutoMapperProfile : Profile -{ - public BackgroundJobsDomainAutoMapperProfile() - { - CreateMap() - .ConstructUsing(x => new BackgroundJobRecord(x.Id)) - .Ignore(record => record.ConcurrencyStamp) - .Ignore(record => record.ExtraProperties); - - CreateMap(); - } -} diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainMapperlyMappers.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainMapperlyMappers.cs new file mode 100644 index 0000000000..9ac5cef9bf --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainMapperlyMappers.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace Volo.Abp.BackgroundJobs; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BackgroundJobInfoToBackgroundJobRecordMapper + : MapperBase +{ + [MapperIgnoreTarget(nameof(BackgroundJobRecord.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(BackgroundJobRecord.ExtraProperties))] + public override partial BackgroundJobRecord Map(BackgroundJobInfo source); + + [MapperIgnoreTarget(nameof(BackgroundJobRecord.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(BackgroundJobRecord.ExtraProperties))] + public override partial void Map(BackgroundJobInfo source, BackgroundJobRecord destination); + + [ObjectFactory] + protected BackgroundJobRecord CreateBackgroundJobRecord(BackgroundJobInfo source) + { + return new BackgroundJobRecord(source.Id); + } +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BackgroundJobRecordToBackgroundJobInfoMapper + : MapperBase +{ + public override partial BackgroundJobInfo Map(BackgroundJobRecord source); + + public override partial void Map(BackgroundJobRecord source, BackgroundJobInfo destination); +} diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs index ed5abd3796..022fd0b2e7 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Bundling/BasicThemeGlobalStyleContributor.cs @@ -6,6 +6,7 @@ public class BasicThemeGlobalStyleContributor : BundleContributor { public override void ConfigureBundle(BundleConfigurationContext context) { + context.Files.Add(new BundleFile("/themes/basic/googlefonts.css", true)); context.Files.Add("/themes/basic/layout.css"); } } diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/googlefonts.css b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/googlefonts.css new file mode 100644 index 0000000000..a76b545b70 --- /dev/null +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/googlefonts.css @@ -0,0 +1 @@ +@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); \ No newline at end of file diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css index 14aa3186c2..5d92291c1f 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/layout.css @@ -1,60 +1,65 @@ - -@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); - #main-navbar-tools a.dropdown-toggle { text-decoration: none; color: #fff; } - + .navbar .dropdown-submenu { position: relative; } + .navbar .dropdown-menu { margin: 0; padding: 0; } - .navbar .dropdown-menu a { - font-size: .9em; - padding: 10px 15px; - display: block; - min-width: 210px; - text-align: left; - border-radius: 0.25rem; - min-height: 44px; - } + +.navbar .dropdown-menu a { + font-size: .9em; + padding: 10px 15px; + display: block; + min-width: 210px; + text-align: left; + border-radius: 0.25rem; + min-height: 44px; +} + .navbar .dropdown-submenu a::after { transform: rotate(-90deg); position: absolute; right: 16px; top: 18px; -} +} + .navbar .dropdown-submenu .dropdown-menu { top: 0; - left: 100%; -} + left: 100%; +} .card-header .btn { padding: 2px 6px; -} +} + .card-header h5 { margin: 0; -} -.container > .card { +} + +.container>.card { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; } -@media screen and (min-width: 768px) { - .navbar .dropdown:hover > .dropdown-menu { +@media screen and (min-width: 768px) { + .navbar .dropdown:hover>.dropdown-menu { display: block; } - .navbar .dropdown-submenu:hover > .dropdown-menu { + .navbar .dropdown-submenu:hover>.dropdown-menu { display: block; } } + .input-validation-error { border-color: #dc3545; } + .field-validation-error { font-size: 0.8em; } @@ -75,33 +80,40 @@ div.dataTables_wrapper div.dataTables_length label { .rtl .dropdown-menu-right { right: auto; - left: 0; + left: 0; } - .rtl .dropdown-menu-right a { - text-align: right; - } +.rtl .dropdown-menu-right a { + text-align: right; +} .rtl .navbar .dropdown-menu a { text-align: right; } + .rtl .navbar .dropdown-submenu .dropdown-menu { top: 0; left: auto; right: 100%; -} +} + .rtl div.dataTables_wrapper div.dataTables_filter input { margin-left: auto; margin-right: 0.5em; } + .rtl div.dataTables_wrapper div.dataTables_filter { text-align: left; } -.rtl table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td { + +.rtl table.dataTable thead th, +table.dataTable thead td, +table.dataTable tfoot th, +table.dataTable tfoot td { text-align: right; } -.brand-container{ +.brand-container { text-align: center; margin-top: 8rem; } @@ -111,7 +123,7 @@ div.dataTables_wrapper div.dataTables_length label { } .brand-text { - color: #292D33; + color: #292D33; font-family: Lexend; font-size: 30px; font-style: normal; @@ -119,4 +131,4 @@ div.dataTables_wrapper div.dataTables_length label { line-height: 34px; margin-top: 5px; margin-bottom: 15px; -} \ No newline at end of file +} diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json index d6c0888f0a..a71ee3f64a 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json @@ -3,8 +3,8 @@ "name": "asp.net", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "~9.3.2", - "@abp/prismjs": "~9.3.2", - "@abp/highlight.js": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared": "~9.3.3", + "@abp/prismjs": "~9.3.3", + "@abp/highlight.js": "~9.3.3" } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock index 73d5ffbb8e..6d96ba495c 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock @@ -2,203 +2,203 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== - dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== + dependencies: + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/clipboard@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.2.tgz#4e0d6456e142e552ca3b4ec10159276e096c56bf" - integrity sha512-jorX68Yw/9pWAmt8cOuVx3Cnp7VF9xuvCD/ecvL5eZyHhXt4tDcYIFO5LkF+CaIky79gdzdF3tmYeFSPUE/HzA== +"@abp/clipboard@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.3.tgz#e6fd477a9f6d6c7fb224ea018e8f23d8d303f3ed" + integrity sha512-iR9HUk1JPWHS3LQ5QmH40maCuwi6SFwxPYvqVjNLVTisHsUOGGZLvHJ46aA8Ei3Q4UlUCdISP9Kc4F88JrhRpA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" clipboard "^2.0.11" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/highlight.js@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-9.3.2.tgz#add22b40f5b412d6c86629a4d6d449d426c9b141" - integrity sha512-EVUCK6Hm3J+sMCuGZDTEEyWxfvAK5mxLuYGRuRrmzZvxXKsnAwqZitMddAvkZVAwN1QiV3gyXgdrz1XUBWZ2kg== +"@abp/highlight.js@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-9.3.3.tgz#fe557c7e3a8d17f3c319d6af8d90de4979f28589" + integrity sha512-sqRynOCoBZAYqqQXU3LEmSupC7HrkmRg+8I8CJJZbfduZJvETbWZyXAISLkyTOzPa9CvOOBXYjnpCkjCWqOxcg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@highlightjs/cdn-assets" "~11.10.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/prismjs@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.2.tgz#2ea48bfa5ebcfd98962029eebeab374d63a4e242" - integrity sha512-q8bdUjk+IuP+nWzN8phgFjvKtOHR94OT5Sth7Rp64L68pVCJopihyth8f4mLZl7hMtwrro/5GFxjpR+KRNRpbg== +"@abp/prismjs@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.3.tgz#e34972d2943403fcfe4f41ec6771405afc553904" + integrity sha512-4LUIMa2elN9wpKJB3ndZz2XrntB4kCCeKZHvqpnwTwALsVsR+K5mVjR5jrsniJu4kJ0H51M+s/EMpgT6b1LQUA== dependencies: - "@abp/clipboard" "~9.3.2" - "@abp/core" "~9.3.2" + "@abp/clipboard" "~9.3.3" + "@abp/core" "~9.3.3" prismjs "^1.29.0" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json index a81470c4a5..b0de7e4c4d 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json @@ -3,8 +3,8 @@ "name": "asp.net", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2", - "@abp/prismjs": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3", + "@abp/prismjs": "~9.3.3" }, "devDependencies": {} } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock index 7018f52f8c..40c06cda11 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock @@ -2,202 +2,202 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" - -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== - dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" + +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== + dependencies: + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/clipboard@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.2.tgz#4e0d6456e142e552ca3b4ec10159276e096c56bf" - integrity sha512-jorX68Yw/9pWAmt8cOuVx3Cnp7VF9xuvCD/ecvL5eZyHhXt4tDcYIFO5LkF+CaIky79gdzdF3tmYeFSPUE/HzA== +"@abp/clipboard@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.3.tgz#e6fd477a9f6d6c7fb224ea018e8f23d8d303f3ed" + integrity sha512-iR9HUk1JPWHS3LQ5QmH40maCuwi6SFwxPYvqVjNLVTisHsUOGGZLvHJ46aA8Ei3Q4UlUCdISP9Kc4F88JrhRpA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" clipboard "^2.0.11" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/prismjs@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.2.tgz#2ea48bfa5ebcfd98962029eebeab374d63a4e242" - integrity sha512-q8bdUjk+IuP+nWzN8phgFjvKtOHR94OT5Sth7Rp64L68pVCJopihyth8f4mLZl7hMtwrro/5GFxjpR+KRNRpbg== +"@abp/prismjs@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.3.tgz#e34972d2943403fcfe4f41ec6771405afc553904" + integrity sha512-4LUIMa2elN9wpKJB3ndZz2XrntB4kCCeKZHvqpnwTwALsVsR+K5mVjR5jrsniJu4kJ0H51M+s/EMpgT6b1LQUA== dependencies: - "@abp/clipboard" "~9.3.2" - "@abp/core" "~9.3.2" + "@abp/clipboard" "~9.3.3" + "@abp/core" "~9.3.3" prismjs "^1.29.0" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/blogging/app/Volo.BloggingTestApp/package.json b/modules/blogging/app/Volo.BloggingTestApp/package.json index 7f75fb85e5..1f2aad9269 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/package.json +++ b/modules/blogging/app/Volo.BloggingTestApp/package.json @@ -3,7 +3,7 @@ "name": "volo.blogtestapp", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2", - "@abp/blogging": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3", + "@abp/blogging": "~9.3.3" } } diff --git a/modules/blogging/app/Volo.BloggingTestApp/yarn.lock b/modules/blogging/app/Volo.BloggingTestApp/yarn.lock index 033458c351..9358aafd0a 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/yarn.lock +++ b/modules/blogging/app/Volo.BloggingTestApp/yarn.lock @@ -2,228 +2,228 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" - -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== - dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" + +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== + dependencies: + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/blogging@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/blogging/-/blogging-9.3.2.tgz#52821170874f6d33da4f579abd3323c233abb1ba" - integrity sha512-P7oMpO1o/UEthlkDgYU7uZyFClNJEa5J2EcTFkLzGoQeVbZU/PF2GfVpm8wQb1Fl2EIzpHrslSkVPYiReog/Ww== +"@abp/blogging@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/blogging/-/blogging-9.3.3.tgz#16a4433b52f8ec08e8b4ed1d7fef8ee072fe47f7" + integrity sha512-hND79rJkapTEr4bwlh2Bzv2SdwOKXLMHtXv2nrtsmCb/GkPvkBNX07gewvJos/rIupxal0ZKH3aNcUzllH3ccA== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" - "@abp/owl.carousel" "~9.3.2" - "@abp/prismjs" "~9.3.2" - "@abp/tui-editor" "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" + "@abp/owl.carousel" "~9.3.3" + "@abp/prismjs" "~9.3.3" + "@abp/tui-editor" "~9.3.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/clipboard@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.2.tgz#4e0d6456e142e552ca3b4ec10159276e096c56bf" - integrity sha512-jorX68Yw/9pWAmt8cOuVx3Cnp7VF9xuvCD/ecvL5eZyHhXt4tDcYIFO5LkF+CaIky79gdzdF3tmYeFSPUE/HzA== +"@abp/clipboard@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.3.tgz#e6fd477a9f6d6c7fb224ea018e8f23d8d303f3ed" + integrity sha512-iR9HUk1JPWHS3LQ5QmH40maCuwi6SFwxPYvqVjNLVTisHsUOGGZLvHJ46aA8Ei3Q4UlUCdISP9Kc4F88JrhRpA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" clipboard "^2.0.11" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/owl.carousel@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/owl.carousel/-/owl.carousel-9.3.2.tgz#79fbb5bb2dd8d18a7519b0cd7a8cd4e28814907b" - integrity sha512-ETDndGFbyTGWLWiuFChJP6T3rniJgka2hfK3uatg5YmneY9Oqz0X1mwXHHWgD4mBSAB2nCi+PnhSU5Oi3Fj4kQ== +"@abp/owl.carousel@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/owl.carousel/-/owl.carousel-9.3.3.tgz#fc94b12ff3c1df59a770a7a4519b9d765a1861ab" + integrity sha512-ZJnWMu9PPAgwMOxtrcE8PcMXOlhVcwfcBF1soIOCcY3eC3lGQ7t8voZr7Iu+WKC1CWeD0qxqHrlqXw+nHbc7Dw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" owl.carousel "^2.3.4" -"@abp/prismjs@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.2.tgz#2ea48bfa5ebcfd98962029eebeab374d63a4e242" - integrity sha512-q8bdUjk+IuP+nWzN8phgFjvKtOHR94OT5Sth7Rp64L68pVCJopihyth8f4mLZl7hMtwrro/5GFxjpR+KRNRpbg== +"@abp/prismjs@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.3.tgz#e34972d2943403fcfe4f41ec6771405afc553904" + integrity sha512-4LUIMa2elN9wpKJB3ndZz2XrntB4kCCeKZHvqpnwTwALsVsR+K5mVjR5jrsniJu4kJ0H51M+s/EMpgT6b1LQUA== dependencies: - "@abp/clipboard" "~9.3.2" - "@abp/core" "~9.3.2" + "@abp/clipboard" "~9.3.3" + "@abp/core" "~9.3.3" prismjs "^1.29.0" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/tui-editor@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-9.3.2.tgz#7d18d8cf1d6dae3c5072c403dcc85af5ab9792ba" - integrity sha512-JnYCrr4UIZskB4zwNywdk76cXKUzMCXW5v4ec4ClbHC59FTKv34iIRonl1kYC/NkjDTGO8gvmyYG/3UeXrRWmQ== +"@abp/tui-editor@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-9.3.3.tgz#0a4651bb4babc625f4598ebddcb4049eedcff4cc" + integrity sha512-9iHqRRFS6EVqrKwZ75yVW2nkTkZxF5BcVOYnIMTApwrxsRTqzQ95tikt0UNUZ4qgmsgDy4LeOnJAVk1K6MsiQA== dependencies: - "@abp/jquery" "~9.3.2" - "@abp/prismjs" "~9.3.2" + "@abp/jquery" "~9.3.3" + "@abp/prismjs" "~9.3.3" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.abppkg.analyze.json b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.abppkg.analyze.json index 473750d55d..58e8a82dd7 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.abppkg.analyze.json +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.abppkg.analyze.json @@ -21,9 +21,9 @@ "name": "AbpCachingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.Ddd.Application", diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj index 5f027d1bc2..bcffdd8a59 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo.Blogging.Admin.Application.csproj @@ -17,7 +17,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs deleted file mode 100644 index 378fc46132..0000000000 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,15 +0,0 @@ -using AutoMapper; -using Volo.Blogging.Admin.Blogs; -using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; - -namespace Volo.Blogging.Admin -{ - public class BloggingAdminApplicationAutoMapperProfile : Profile - { - public BloggingAdminApplicationAutoMapperProfile() - { - CreateMap(); - } - } -} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationMappers.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationMappers.cs new file mode 100644 index 0000000000..2999a3c480 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; + +namespace Volo.Blogging.Admin; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogToBlogDtoMapper : MapperBase +{ + public override partial BlogDto Map(Blog source); + + public override partial void Map(Blog source, BlogDto destination); +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs index c9fcbbaf0a..77ec9aa552 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationModule.cs @@ -1,11 +1,8 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Application; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Modularity; -using Volo.Blogging.Comments; -using Volo.Blogging.Posts; namespace Volo.Blogging.Admin { @@ -13,18 +10,14 @@ namespace Volo.Blogging.Admin typeof(BloggingDomainModule), typeof(BloggingAdminApplicationContractsModule), typeof(AbpCachingModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpDddApplicationModule) )] public class BloggingAdminApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs deleted file mode 100644 index 35f83cd480..0000000000 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs +++ /dev/null @@ -1,18 +0,0 @@ -using AutoMapper; -using Volo.Blogging.Admin.Blogs; -using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs; -using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; -using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel; - -namespace Volo.Blogging.Admin -{ - public class AbpBloggingAdminWebAutoMapperProfile : Profile - { - public AbpBloggingAdminWebAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } - } -} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebMappers.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebMappers.cs new file mode 100644 index 0000000000..30a2518050 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebMappers.cs @@ -0,0 +1,24 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Blogging.Admin.Blogs; +using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs; +using Volo.Blogging.Blogs.Dtos; +using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel; + +namespace Volo.Blogging.Admin; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogDtoToBlogEditViewModelMapper : MapperBase +{ + public override partial EditModel.BlogEditViewModel Map(BlogDto source); + + public override partial void Map(BlogDto source, EditModel.BlogEditViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogCreateModalViewToCreateBlogDtoMapper : MapperBase +{ + public override partial CreateBlogDto Map(CreateModel.BlogCreateModalView source); + + public override partial void Map(CreateModel.BlogCreateModalView source, CreateBlogDto destination); +} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs index 507745b386..79e933465c 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/BloggingAdminWebModule.cs @@ -2,7 +2,7 @@ using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; @@ -15,7 +15,7 @@ namespace Volo.Blogging.Admin typeof(BloggingAdminApplicationContractsModule), typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiBundlingModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class BloggingAdminWebModule : AbpModule { @@ -34,6 +34,8 @@ namespace Volo.Blogging.Admin public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.MenuContributors.Add(new BloggingAdminMenuContributor()); @@ -44,12 +46,6 @@ namespace Volo.Blogging.Admin options.FileSets.AddEmbedded(); }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - Configure(options => { options.DisableModule(BloggingAdminRemoteServiceConsts.ModuleName); diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.abppkg.analyze.json b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.abppkg.analyze.json index bfadd4006b..42604b9be1 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.abppkg.analyze.json +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.abppkg.analyze.json @@ -21,9 +21,9 @@ "name": "AbpAspNetCoreMvcUiBundlingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" } ], "implementingInterfaces": [ diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj index e4703a7377..8d8e6943a2 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj @@ -18,7 +18,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.abppkg.analyze.json b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.abppkg.analyze.json index b332019e6d..417f7e0bd4 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.abppkg.analyze.json +++ b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.abppkg.analyze.json @@ -21,9 +21,9 @@ "name": "AbpCachingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.BlobStoring", diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj index 7b3874ae7e..0aa0ded30e 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj +++ b/modules/blogging/src/Volo.Blogging.Application/Volo.Blogging.Application.csproj @@ -17,7 +17,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationAutoMapperProfile.cs deleted file mode 100644 index 71e90070cf..0000000000 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,33 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.Blogging.Blogs; -using Volo.Blogging.Blogs.Dtos; -using Volo.Blogging.Comments; -using Volo.Blogging.Comments.Dtos; -using Volo.Blogging.Posts; -using Volo.Blogging.Tagging; -using Volo.Blogging.Tagging.Dtos; -using Volo.Blogging.Users; - -namespace Volo.Blogging -{ - public class BloggingApplicationAutoMapperProfile : Profile - { - public BloggingApplicationAutoMapperProfile() - { - CreateMap(); - CreateMap(); - CreateMap().Ignore(x=>x.Writer).Ignore(x=>x.CommentCount).Ignore(x=>x.Tags); - CreateMap().Ignore(x => x.Writer); - CreateMap(); - CreateMap().Ignore(x=>x.CommentCount).Ignore(x=>x.Tags); - CreateMap() - .IgnoreModificationAuditedObjectProperties() - .IgnoreDeletionAuditedObjectProperties() - .Ignore(x => x.ConcurrencyStamp) - .Ignore(x => x.Writer) - .Ignore(x => x.CommentCount) - .Ignore(x => x.Tags); - } - } -} diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationMappers.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationMappers.cs new file mode 100644 index 0000000000..28bf339526 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationMappers.cs @@ -0,0 +1,98 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; +using Volo.Blogging.Comments; +using Volo.Blogging.Comments.Dtos; +using Volo.Blogging.Posts; +using Volo.Blogging.Tagging; +using Volo.Blogging.Tagging.Dtos; +using Volo.Blogging.Users; + +namespace Volo.Blogging; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PostCacheItemToPostWithDetailsDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModifierId))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.IsDeleted))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.DeletionTime))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.DeleterId))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] + public override partial PostWithDetailsDto Map(PostCacheItem source); + + [MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModificationTime))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.LastModifierId))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.IsDeleted))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.DeletionTime))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.DeleterId))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] + public override partial void Map(PostCacheItem source, PostWithDetailsDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PostToPostCacheItemMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(PostCacheItem.CommentCount))] + [MapperIgnoreTarget(nameof(PostCacheItem.Tags))] + public override partial PostCacheItem Map(Post source); + + [MapperIgnoreTarget(nameof(PostCacheItem.CommentCount))] + [MapperIgnoreTarget(nameof(PostCacheItem.Tags))] + public override partial void Map(Post source, PostCacheItem destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class CommentToCommentWithDetailsDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(CommentWithDetailsDto.Writer))] + public override partial CommentWithDetailsDto Map(Comment source); + + [MapperIgnoreTarget(nameof(CommentWithDetailsDto.Writer))] + public override partial void Map(Comment source, CommentWithDetailsDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PostToPostWithDetailsDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] + public override partial PostWithDetailsDto Map(Post source); + + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Tags))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.CommentCount))] + [MapperIgnoreTarget(nameof(PostWithDetailsDto.Writer))] + public override partial void Map(Post source, PostWithDetailsDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TagToTagDtoMapper : MapperBase +{ + public override partial TagDto Map(Tag source); + + public override partial void Map(Tag source, TagDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogUserToBlogUserDtoMapper : MapperBase +{ + public override partial BlogUserDto Map(BlogUser source); + + public override partial void Map(BlogUser source, BlogUserDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogToBlogDtoMapper : MapperBase +{ + public override partial BlogDto Map(Blog source); + + public override partial void Map(Blog source, BlogDto destination); +} diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs index aee53fe9b0..2a4ba01979 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/BloggingApplicationModule.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Application; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.BlobStoring; using Volo.Abp.Caching; using Volo.Abp.Modularity; @@ -14,7 +14,7 @@ namespace Volo.Blogging typeof(BloggingDomainModule), typeof(BloggingApplicationContractsModule), typeof(AbpCachingModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpBlobStoringModule), typeof(AbpDddApplicationModule) )] @@ -22,12 +22,8 @@ namespace Volo.Blogging { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - + context.Services.AddMapperlyObjectMapper(); + Configure(options => { //TODO: Rename UpdatePolicy/DeletePolicy since it's candidate to conflicts with other modules! diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.abppkg.analyze.json b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.abppkg.analyze.json index 4fb8a11fb7..a91fd840e4 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.abppkg.analyze.json +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.abppkg.analyze.json @@ -16,9 +16,9 @@ "name": "AbpDddDomainModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.Caching", diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj index 4dd49c23d1..ba90d3c374 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo.Blogging.Domain.csproj @@ -13,7 +13,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappers.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappers.cs new file mode 100644 index 0000000000..dfc7fcadcf --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappers.cs @@ -0,0 +1,40 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Blogging.Blogs; +using Volo.Blogging.Comments; +using Volo.Blogging.Posts; +using Volo.Blogging.Tagging; + +namespace Volo.Blogging; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TagToTagEtoMapper : MapperBase +{ + public override partial TagEto Map(Tag source); + + public override partial void Map(Tag source, TagEto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PostToPostEtoMapper : MapperBase +{ + public override partial PostEto Map(Post source); + + public override partial void Map(Post source, PostEto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class CommentToCommentEtoMapper : MapperBase +{ + public override partial CommentEto Map(Comment source); + + public override partial void Map(Comment source, CommentEto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogToBlogEtoMapper : MapperBase +{ + public override partial BlogEto Map(Blog source); + + public override partial void Map(Blog source, BlogEto destination); +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappingProfile.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappingProfile.cs deleted file mode 100644 index da36b39049..0000000000 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainMappingProfile.cs +++ /dev/null @@ -1,19 +0,0 @@ -using AutoMapper; -using Volo.Blogging.Blogs; -using Volo.Blogging.Comments; -using Volo.Blogging.Posts; -using Volo.Blogging.Tagging; - -namespace Volo.Blogging -{ - public class BloggingDomainMappingProfile : Profile - { - public BloggingDomainMappingProfile() - { - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - } - } -} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs index 2e5e9a68e0..b2bd8439f2 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/BloggingDomainModule.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Domain; using Volo.Abp.Domain.Entities.Events.Distributed; @@ -14,20 +14,15 @@ namespace Volo.Blogging [DependsOn( typeof(BloggingDomainSharedModule), typeof(AbpDddDomainModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpCachingModule) )] public class BloggingDomainModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); - + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.EtoMappings.Add(typeof(BloggingDomainModule)); diff --git a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs deleted file mode 100644 index f96b302a6a..0000000000 --- a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebAutoMapperProfile.cs +++ /dev/null @@ -1,16 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.Blogging.Pages.Blogs.Posts; -using Volo.Blogging.Posts; - -namespace Volo.Blogging -{ - public class AbpBloggingWebAutoMapperProfile : Profile - { - public AbpBloggingWebAutoMapperProfile() - { - CreateMap().Ignore(x=>x.Tags); - CreateMap(); - } - } -} diff --git a/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebMappers.cs b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebMappers.cs new file mode 100644 index 0000000000..538621c56e --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Web/AbpBloggingWebMappers.cs @@ -0,0 +1,24 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Blogging.Pages.Blogs.Posts; +using Volo.Blogging.Posts; + +namespace Volo.Blogging; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PostWithDetailsDtoToEditPostViewModelMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(EditPostViewModel.Tags))] + public override partial EditPostViewModel Map(PostWithDetailsDto source); + + [MapperIgnoreTarget(nameof(EditPostViewModel.Tags))] + public override partial void Map(PostWithDetailsDto source, EditPostViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class CreatePostViewModelToCreatePostDtoMapper : MapperBase +{ + public override partial CreatePostDto Map(NewModel.CreatePostViewModel source); + + public override partial void Map(NewModel.CreatePostViewModel source, CreatePostDto destination); +} diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index 9de636cdb2..95b66ee136 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -8,7 +8,7 @@ using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; @@ -23,7 +23,7 @@ namespace Volo.Blogging typeof(BloggingApplicationContractsModule), typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiBundlingModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class BloggingWebModule : AbpModule { @@ -42,17 +42,13 @@ namespace Volo.Blogging public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.FileSets.AddEmbedded(); }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - Configure(options => { options diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg.analyze.json b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg.analyze.json index 895ffb1675..7eba0d50a7 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg.analyze.json +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.abppkg.analyze.json @@ -21,9 +21,9 @@ "name": "AbpAspNetCoreMvcUiBundlingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" } ], "implementingInterfaces": [ diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index 5ad9341c17..0379bd280d 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -18,7 +18,7 @@ - + diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json index 3f75e592bf..0fe6ca046f 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json @@ -3,6 +3,6 @@ "name": "client-simulation-web", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock index 13950786c8..06fb5e9906 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock @@ -2,185 +2,185 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/angular/package.json b/modules/cms-kit/angular/package.json index b5196a58c7..42dbd7ffc3 100644 --- a/modules/cms-kit/angular/package.json +++ b/modules/cms-kit/angular/package.json @@ -15,11 +15,11 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "~9.3.2", - "@abp/ng.identity": "~9.3.2", - "@abp/ng.setting-management": "~9.3.2", - "@abp/ng.tenant-management": "~9.3.2", - "@abp/ng.theme.basic": "~9.3.2", + "@abp/ng.account": "~9.3.3", + "@abp/ng.identity": "~9.3.3", + "@abp/ng.setting-management": "~9.3.3", + "@abp/ng.tenant-management": "~9.3.3", + "@abp/ng.theme.basic": "~9.3.3", "@angular/animations": "~10.0.0", "@angular/common": "~10.0.0", "@angular/compiler": "~10.0.0", diff --git a/modules/cms-kit/angular/projects/cms-kit/package.json b/modules/cms-kit/angular/projects/cms-kit/package.json index 2c37d6bf52..20786eec7b 100644 --- a/modules/cms-kit/angular/projects/cms-kit/package.json +++ b/modules/cms-kit/angular/projects/cms-kit/package.json @@ -4,8 +4,8 @@ "peerDependencies": { "@angular/common": "^9.1.11", "@angular/core": "^9.1.11", - "@abp/ng.core": ">=9.3.2", - "@abp/ng.theme.shared": ">=9.3.2" + "@abp/ng.core": ">=9.3.3", + "@abp/ng.theme.shared": ">=9.3.3" }, "dependencies": { "tslib": "^2.0.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json index 1f34c513a9..a476bc5de9 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-identityserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock index 13950786c8..06fb5e9906 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock @@ -2,185 +2,185 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebAutoMapperProfile.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebAutoMapperProfile.cs deleted file mode 100644 index bea413f2bc..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace Volo.CmsKit; - -public class CmsKitWebAutoMapperProfile : Profile -{ - public CmsKitWebAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Web project. - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs index 7f2f539d7e..522771c77b 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/CmsKitWebHostModule.cs @@ -23,7 +23,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.FeatureManagement; @@ -87,7 +87,6 @@ public class CmsKitWebHostModule : AbpModule ConfigureCache(configuration); ConfigureUrls(configuration); ConfigureAuthentication(context, configuration); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureSwaggerServices(context.Services); ConfigureMultiTenancy(); @@ -159,14 +158,6 @@ public class CmsKitWebHostModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment) { if (hostingEnvironment.IsDevelopment()) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json index 255027fa5f..8097db43a4 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock index 13950786c8..06fb5e9906 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock @@ -2,185 +2,185 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json index f103d3b08d..0dd231cc71 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2", - "@abp/cms-kit": "9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3", + "@abp/cms-kit": "9.3.3" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock index c1a52914c8..98abe9cae6 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock @@ -2,293 +2,293 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" - -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== - dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" + +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== + dependencies: + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/clipboard@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.2.tgz#4e0d6456e142e552ca3b4ec10159276e096c56bf" - integrity sha512-jorX68Yw/9pWAmt8cOuVx3Cnp7VF9xuvCD/ecvL5eZyHhXt4tDcYIFO5LkF+CaIky79gdzdF3tmYeFSPUE/HzA== +"@abp/clipboard@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.3.tgz#e6fd477a9f6d6c7fb224ea018e8f23d8d303f3ed" + integrity sha512-iR9HUk1JPWHS3LQ5QmH40maCuwi6SFwxPYvqVjNLVTisHsUOGGZLvHJ46aA8Ei3Q4UlUCdISP9Kc4F88JrhRpA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" clipboard "^2.0.11" -"@abp/cms-kit.admin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/cms-kit.admin/-/cms-kit.admin-9.3.2.tgz#dd43e879bbfbdeae61fc001026bacc09279e5e7d" - integrity sha512-BsWb6vO+2n0s9aJ+ud1whxST7v/0cwk66CLGfUeWkdiahQGyOx3PsRHDD2k9yZA7H8okgYr+tpN/+hUPUjFw6w== +"@abp/cms-kit.admin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/cms-kit.admin/-/cms-kit.admin-9.3.3.tgz#f3ca6e4ecdda1a70ef8581ad1e302c4dd7b77316" + integrity sha512-cvHYgvtFuM5G2TkkeEIvRgpC7tZDGioVXLKNqovT4T1XzCtqZyuU3AOKBHCZqiqinJZ+9E/FsnKKjp3vlZpvZw== dependencies: - "@abp/codemirror" "~9.3.2" - "@abp/jstree" "~9.3.2" - "@abp/markdown-it" "~9.3.2" - "@abp/slugify" "~9.3.2" - "@abp/tui-editor" "~9.3.2" - "@abp/uppy" "~9.3.2" + "@abp/codemirror" "~9.3.3" + "@abp/jstree" "~9.3.3" + "@abp/markdown-it" "~9.3.3" + "@abp/slugify" "~9.3.3" + "@abp/tui-editor" "~9.3.3" + "@abp/uppy" "~9.3.3" -"@abp/cms-kit.public@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/cms-kit.public/-/cms-kit.public-9.3.2.tgz#6eeed0407fd70b86aee148c79193403133364213" - integrity sha512-h5Ul5opCApy1wlwp4bARKKMkW+Q43VnPc/4BsKsPpLAB10XU3+DBr8U1vJWNnh+0h0bpRJ44norKfQ/mApscEw== +"@abp/cms-kit.public@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/cms-kit.public/-/cms-kit.public-9.3.3.tgz#b2140e2edc4e78f55ff4d01416685bdc7109f663" + integrity sha512-5xh41EqEwxMdSUMb89XXmlO7c7vbe4XU3kzEMxN70V7jAUtww+bCHKqbw/mqvHhjuSCdXQ0K+IfTjWxZ/kFPVQ== dependencies: - "@abp/highlight.js" "~9.3.2" - "@abp/star-rating-svg" "~9.3.2" + "@abp/highlight.js" "~9.3.3" + "@abp/star-rating-svg" "~9.3.3" -"@abp/cms-kit@9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-9.3.2.tgz#02f135bb44165b0b687776c5d3b209810a541437" - integrity sha512-UHlFEJAeoKEl3KmuuHf3Hi8UQrUrciTYi4PRHInuS5JdpMT8ZOaTTPZtKxE9ZDuiN19lwc8vsrATbb43dgiX0g== +"@abp/cms-kit@9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-9.3.3.tgz#7b8e67a5391aefb5f563af8a9b0435c008612185" + integrity sha512-+G3SuChVU6apexSCqW7W0Zy4EO/hiKt5cXRWjjx5A8em+SgUOuDB2/nA1TNBe/IGixJJbei6qF4mLlabwnJDTw== dependencies: - "@abp/cms-kit.admin" "~9.3.2" - "@abp/cms-kit.public" "~9.3.2" + "@abp/cms-kit.admin" "~9.3.3" + "@abp/cms-kit.public" "~9.3.3" -"@abp/codemirror@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-9.3.2.tgz#09de9ce79e6ed542292d12e288f57a58b6a84c98" - integrity sha512-h7yHGeOQRThHAsN1U7Viu0ifafK6m0LpyJOSWvQqAWHQJ44+iXy+gLeZJhJwIpJuwxPwZqQkuRKKjHqHTllf/Q== +"@abp/codemirror@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-9.3.3.tgz#9bb164b214d1969a951f46ee997a69856c25bc26" + integrity sha512-XivrP8v9kztDFWTXkuoHLONFdBQ54dlVUsmwv8WBRVl4QKfVIDhSZs8EmqU8PSIqygS10rcjo6dDLvJYEL3mfg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" codemirror "^5.65.1" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/highlight.js@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-9.3.2.tgz#add22b40f5b412d6c86629a4d6d449d426c9b141" - integrity sha512-EVUCK6Hm3J+sMCuGZDTEEyWxfvAK5mxLuYGRuRrmzZvxXKsnAwqZitMddAvkZVAwN1QiV3gyXgdrz1XUBWZ2kg== +"@abp/highlight.js@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-9.3.3.tgz#fe557c7e3a8d17f3c319d6af8d90de4979f28589" + integrity sha512-sqRynOCoBZAYqqQXU3LEmSupC7HrkmRg+8I8CJJZbfduZJvETbWZyXAISLkyTOzPa9CvOOBXYjnpCkjCWqOxcg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@highlightjs/cdn-assets" "~11.10.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/jstree@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jstree/-/jstree-9.3.2.tgz#2442e3465fe168e90ffe2d672c1dc6f086c81b4f" - integrity sha512-B0WeKkAmfcwuI7DmS7/V/4neWIK/2RNXnMWVYSQPOZQm89mmSe/blQra4KRMZzlQLPAV76oncIHju01Cn+MV0w== +"@abp/jstree@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jstree/-/jstree-9.3.3.tgz#6c7ab0049dc033da23617ce9e192fb98b1a0a081" + integrity sha512-HVkL6DtiURnhBhqivBAnVpFSgrAJ5HCsieVBPdciWdrggQ0Y/rPZN6F+HrrI28Asymnj8ayrG/4735yAn2bNZA== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jstree "^3.3.17" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/markdown-it@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-9.3.2.tgz#1a673991c986eaec7cac5b035e4cbf2eed7c8d59" - integrity sha512-b/yTk312LZOWEF+f13zNHejdBf0dtdrjnd3LGFs9BDPyx2HMDAlDhZ9MiBM160W8ej1h3cIC06sbZBuyxns5Rg== +"@abp/markdown-it@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-9.3.3.tgz#4fc2b4934fe50999e6f20015b7f4e4bdbd185e38" + integrity sha512-6/IZ/2XQQzsnjYNBCcFxTroVenThiridD1oyRmtGK/+q7TGkgxU6x7b89losmvn8n1oGKBOOsqr/f3knEB/+RA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" markdown-it "^14.1.0" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/prismjs@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.2.tgz#2ea48bfa5ebcfd98962029eebeab374d63a4e242" - integrity sha512-q8bdUjk+IuP+nWzN8phgFjvKtOHR94OT5Sth7Rp64L68pVCJopihyth8f4mLZl7hMtwrro/5GFxjpR+KRNRpbg== +"@abp/prismjs@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.3.tgz#e34972d2943403fcfe4f41ec6771405afc553904" + integrity sha512-4LUIMa2elN9wpKJB3ndZz2XrntB4kCCeKZHvqpnwTwALsVsR+K5mVjR5jrsniJu4kJ0H51M+s/EMpgT6b1LQUA== dependencies: - "@abp/clipboard" "~9.3.2" - "@abp/core" "~9.3.2" + "@abp/clipboard" "~9.3.3" + "@abp/core" "~9.3.3" prismjs "^1.29.0" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/slugify@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/slugify/-/slugify-9.3.2.tgz#dfca463f3750d264fd1ffcc5b14c7e15f3cf12ca" - integrity sha512-ux6j9ojt79g7D5AAODoBRwGeLkccynxEtQQQw+hk55YG5PZFImBL/BxRLEhkBBKBL7YrlHvnO58X2YoCUIG6Ug== +"@abp/slugify@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/slugify/-/slugify-9.3.3.tgz#9cf5b7d924f69a3e75e3cbfa87e0f7ee0e99ad3b" + integrity sha512-9cuT2CgCwcUumuTuMtVq108i65gAgz3SBWq7xy5CW5fS72OenRqi45N1m3yKQxhZ1JIkbvBGI5UlKHmWd9W7mQ== dependencies: slugify "^1.6.6" -"@abp/star-rating-svg@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-9.3.2.tgz#9d60ac8bc953e6dae544c2a9961c6905036253b7" - integrity sha512-97n81FqBxnBEQ9jUeXXOtuZ71VHW2mmbaOlroqLl+dE18PR/HIWBNUCEpKK7RCNRBUMMh1saIdv16ApBFVeBFQ== +"@abp/star-rating-svg@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-9.3.3.tgz#3330bcc4635aed05001404cbdf3cb84ef68f211e" + integrity sha512-rSpXtyhL7n21mp7O7GotbyJyBL+Yo/6+UAAXgPjpq0qia8OHB+aRPuZiyBBQwvPfR8nIzRK0wrdwOsaSaFU71Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" star-rating-svg "^3.5.0" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/tui-editor@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-9.3.2.tgz#7d18d8cf1d6dae3c5072c403dcc85af5ab9792ba" - integrity sha512-JnYCrr4UIZskB4zwNywdk76cXKUzMCXW5v4ec4ClbHC59FTKv34iIRonl1kYC/NkjDTGO8gvmyYG/3UeXrRWmQ== +"@abp/tui-editor@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-9.3.3.tgz#0a4651bb4babc625f4598ebddcb4049eedcff4cc" + integrity sha512-9iHqRRFS6EVqrKwZ75yVW2nkTkZxF5BcVOYnIMTApwrxsRTqzQ95tikt0UNUZ4qgmsgDy4LeOnJAVk1K6MsiQA== dependencies: - "@abp/jquery" "~9.3.2" - "@abp/prismjs" "~9.3.2" + "@abp/jquery" "~9.3.3" + "@abp/prismjs" "~9.3.3" -"@abp/uppy@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/uppy/-/uppy-9.3.2.tgz#9e8647bd79c92263f2e8744ec2aa5180db9923b3" - integrity sha512-JXK43liPBifJC/Byq4VA+xWRPyd6ScurbK9FJZQMoD7kWLg/iFVSyLn7D7U4khYmCnmz8nc96SfgE8+CEsCaBQ== +"@abp/uppy@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/uppy/-/uppy-9.3.3.tgz#cb7371e323340021f8de80295f53557df05aeab7" + integrity sha512-/3dBmqlxt/pJ5iQJN6zqoGyCmXN4MSqkKqR+ZVo+z5H807GQiYfZbQ8aqDzTpqIEEF+9NU5Czyelvm5zby6PlA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" uppy "^4.4.1" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json index e2ddb41de0..ce5b9fcead 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo.CmsKit.Admin.Application.abppkg.analyze.json @@ -11,9 +11,9 @@ "name": "CmsKitAdminApplicationContractsModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.CmsKit.Common.Application", diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs deleted file mode 100644 index 60f8ccb8a8..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,54 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.CmsKit.Admin.Blogs; -using Volo.CmsKit.Admin.Comments; -using Volo.CmsKit.Admin.MediaDescriptors; -using Volo.CmsKit.Admin.Pages; -using Volo.CmsKit.Blogs; -using Volo.CmsKit.Admin.Tags; -using Volo.CmsKit.Comments; -using Volo.CmsKit.MediaDescriptors; -using Volo.CmsKit.Pages; -using Volo.CmsKit.Tags; -using Volo.CmsKit.Users; -using Volo.CmsKit.Menus; -using Volo.CmsKit.Admin.Menus; - -namespace Volo.CmsKit.Admin; - -public class CmsKitAdminApplicationAutoMapperProfile : Profile -{ - public CmsKitAdminApplicationAutoMapperProfile() - { - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - CreateMap() - .Ignore(x => x.Author) - .MapExtraProperties(); - - CreateMap().MapExtraProperties(); - CreateMap(); - - CreateMap(MemberList.Destination).MapExtraProperties(); - CreateMap() - .Ignore(d => d.BlogName) - .MapExtraProperties(); - - CreateMap(MemberList.Source).MapExtraProperties(); - CreateMap(MemberList.Source).MapExtraProperties(); - - CreateMap().Ignore(b => b.BlogPostCount).MapExtraProperties(); - - CreateMap(MemberList.Destination); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - CreateMap() - .Ignore(x => x.PageTitle) - .MapExtraProperties(); - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationMappers.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationMappers.cs new file mode 100644 index 0000000000..533fa08656 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationMappers.cs @@ -0,0 +1,140 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.CmsKit.Admin.Blogs; +using Volo.CmsKit.Admin.Comments; +using Volo.CmsKit.Admin.MediaDescriptors; +using Volo.CmsKit.Admin.Pages; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.Admin.Tags; +using Volo.CmsKit.Comments; +using Volo.CmsKit.MediaDescriptors; +using Volo.CmsKit.Pages; +using Volo.CmsKit.Tags; +using Volo.CmsKit.Users; +using Volo.CmsKit.Menus; +using Volo.CmsKit.Admin.Menus; + +namespace Volo.CmsKit.Admin; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TagEntityTypeDefinitonToTagDefinitionDtoMapper : MapperBase +{ + public override partial TagDefinitionDto Map(TagEntityTypeDefiniton source); + + public override partial void Map(TagEntityTypeDefiniton source, TagDefinitionDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogPostToBlogPostDtoMapper : MapperBase +{ + public override partial BlogPostDto Map(BlogPost source); + + public override partial void Map(BlogPost source, BlogPostDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogPostToBlogPostListDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(BlogPostListDto.BlogName))] + public override partial BlogPostListDto Map(BlogPost source); + + [MapperIgnoreTarget(nameof(BlogPostListDto.BlogName))] + public override partial void Map(BlogPost source, BlogPostListDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MenuItemToMenuItemWithDetailsDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(MenuItemWithDetailsDto.PageTitle))] + public override partial MenuItemWithDetailsDto Map(MenuItem source); + + [MapperIgnoreTarget(nameof(MenuItemWithDetailsDto.PageTitle))] + public override partial void Map(MenuItem source, MenuItemWithDetailsDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MenuItemToMenuItemMapper : MapperBase +{ + public override partial MenuItemDto Map(MenuItem source); + + public override partial void Map(MenuItem source, MenuItemDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MediaDescriptorToMediaDescriptorDtoMapper : MapperBase +{ + public override partial MediaDescriptorDto Map(MediaDescriptor source); + + public override partial void Map(MediaDescriptor source, MediaDescriptorDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class TagToTagDtoMapper : MapperBase +{ + public override partial TagDto Map(Tag source); + + public override partial void Map(Tag source, TagDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogToBlogDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(BlogDto.BlogPostCount))] + public override partial BlogDto Map(Blog source); + + [MapperIgnoreTarget(nameof(BlogDto.BlogPostCount))] + public override partial void Map(Blog source, BlogDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PageToPageLookupDtoMapper : MapperBase +{ + public override partial PageLookupDto Map(Page source); + + public override partial void Map(Page source, PageLookupDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class PageToPageDtoMapper : MapperBase +{ + public override partial PageDto Map(Page source); + + public override partial void Map(Page source, PageDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CommentToCommentWithAuthorDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(CommentWithAuthorDto.Author))] + public override partial CommentWithAuthorDto Map(Comment source); + + [MapperIgnoreTarget(nameof(CommentWithAuthorDto.Author))] + public override partial void Map(Comment source, CommentWithAuthorDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CommentToCommentDtoMapper : MapperBase +{ + public override partial CommentDto Map(Comment source); + + public override partial void Map(Comment source, CommentDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CmsUserToCommentsCmsUserDtoMapper : MapperBase +{ + public override partial Comments.CmsUserDto Map(CmsUser source); + + public override partial void Map(CmsUser source, Comments.CmsUserDto destination); +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs index 2a9765dd5a..0be1a58d00 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using System.Collections.Generic; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.GlobalFeatures; using Volo.Abp.Localization; using Volo.Abp.Modularity; @@ -17,23 +17,18 @@ namespace Volo.CmsKit.Admin; [DependsOn( typeof(CmsKitAdminApplicationContractsModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(CmsKitCommonApplicationModule) )] public class CmsKitAdminApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); + context.Services.AddMapperlyObjectMapper(); ConfigureTagOptions(); ConfigureCommentOptions(); - - Configure(options => - { - options.AddMaps(validate: true); - }); } private void ConfigureTagOptions() diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminAppService.cs index 0847347ab6..eec3483a90 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminAppService.cs @@ -7,13 +7,14 @@ using Volo.CmsKit.Features; using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalResources; using Volo.CmsKit.Permissions; +using Volo.CmsKit.Admin; namespace Volo.CmsKit.Admin.GlobalResources; [RequiresFeature(CmsKitFeatures.GlobalResourceEnable)] [RequiresGlobalFeature(typeof(GlobalResourcesFeature))] [Authorize(CmsKitAdminPermissions.GlobalResources.Default)] -public class GlobalResourceAdminAppService : ApplicationService, IGlobalResourceAdminAppService +public class GlobalResourceAdminAppService : CmsKitAdminAppServiceBase, IGlobalResourceAdminAppService { public GlobalResourceManager GlobalResourceManager { get; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebAutoMapperProfile.cs deleted file mode 100644 index 655399109d..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebAutoMapperProfile.cs +++ /dev/null @@ -1,57 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.CmsKit.Admin.Blogs; -using Volo.CmsKit.Admin.Menus; -using Volo.CmsKit.Admin.Pages; -using Volo.CmsKit.Admin.Tags; -using Volo.CmsKit.Menus; -using Volo.CmsKit.Tags; - -namespace Volo.CmsKit.Admin.Web; - -public class CmsKitAdminWebAutoMapperProfile : Profile -{ - public CmsKitAdminWebAutoMapperProfile() - { - CreateBlogPostMappings(); - CreateBlogMappings(); - CreateMenuMappings(); - CreatePageMappings(); - CreateTagMappings(); - } - - protected virtual void CreateBlogPostMappings() - { - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - } - - protected virtual void CreateBlogMappings() - { - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - } - - protected virtual void CreateMenuMappings() - { - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - } - - protected virtual void CreatePageMappings() - { - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - } - - protected virtual void CreateTagMappings() - { - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - } -} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebMappers.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebMappers.cs new file mode 100644 index 0000000000..99b07a65fc --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebMappers.cs @@ -0,0 +1,214 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.CmsKit.Admin.Blogs; +using Volo.CmsKit.Admin.Menus; +using Volo.CmsKit.Admin.Pages; +using Volo.CmsKit.Admin.Tags; +using Volo.CmsKit.Admin.Web.Pages.CmsKit.BlogPosts; +using Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs; +using Volo.CmsKit.Admin.Web.Pages.CmsKit.Tags; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.Tags; +using CreateModalModel = Volo.CmsKit.Admin.Web.Pages.CmsKit.Tags.CreateModalModel; + +namespace Volo.CmsKit.Admin.Web; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogFeatureInputDtoToBlogFeatureViewModelMapper : TwoWayMapperBase +{ + public override partial FeaturesModalModel.BlogFeatureViewModel Map(BlogFeatureInputDto source); + public override partial void Map(BlogFeatureInputDto source, FeaturesModalModel.BlogFeatureViewModel destination); + + public override partial BlogFeatureInputDto ReverseMap(FeaturesModalModel.BlogFeatureViewModel destination); + public override partial void ReverseMap(FeaturesModalModel.BlogFeatureViewModel destination, BlogFeatureInputDto source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogFeatureDtoToBlogFeatureViewModelMapper : TwoWayMapperBase +{ + public override partial FeaturesModalModel.BlogFeatureViewModel Map(BlogFeatureDto source); + public override partial void Map(BlogFeatureDto source, FeaturesModalModel.BlogFeatureViewModel destination); + + public override partial BlogFeatureDto ReverseMap(FeaturesModalModel.BlogFeatureViewModel destination); + public override partial void ReverseMap(FeaturesModalModel.BlogFeatureViewModel destination, BlogFeatureDto source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class CreateBlogPostDtoToCreateBlogPostViewModelMapper : TwoWayMapperBase +{ + public override partial CreateModel.CreateBlogPostViewModel Map(CreateBlogPostDto source); + public override partial void Map(CreateBlogPostDto source, CreateModel.CreateBlogPostViewModel destination); + + public override partial CreateBlogPostDto ReverseMap(CreateModel.CreateBlogPostViewModel destination); + public override partial void ReverseMap(CreateModel.CreateBlogPostViewModel destination, CreateBlogPostDto source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TagUpdateDtoToTagEditViewModelMapper : TwoWayMapperBase +{ + public override partial EditModalModel.TagEditViewModel Map(TagUpdateDto source); + public override partial void Map(TagUpdateDto source, EditModalModel.TagEditViewModel destination); + + public override partial TagUpdateDto ReverseMap(EditModalModel.TagEditViewModel destination); + public override partial void ReverseMap(EditModalModel.TagEditViewModel destination, TagUpdateDto source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TagDtoToCreateBlogPostDtoMapper : MapperBase +{ + public override partial EditModalModel.TagEditViewModel Map(TagDto source); + + public override partial void Map(TagDto source, EditModalModel.TagEditViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CreateBlogPostViewModelToCreateBlogPostDtoMapper : MapperBase +{ + public override partial CreateBlogPostDto Map(CreateModel.CreateBlogPostViewModel source); + + public override partial void Map(CreateModel.CreateBlogPostViewModel source, CreateBlogPostDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class UpdateBlogPostViewModelToUpdateBlogPostDtoMapper : TwoWayMapperBase +{ + public override partial UpdateBlogPostDto Map(UpdateModel.UpdateBlogPostViewModel source); + + public override partial void Map(UpdateModel.UpdateBlogPostViewModel source, UpdateBlogPostDto destination); + + public override partial UpdateModel.UpdateBlogPostViewModel ReverseMap(UpdateBlogPostDto destination); + + public override partial void ReverseMap(UpdateBlogPostDto destination, UpdateModel.UpdateBlogPostViewModel source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogPostDtoToUpdateBlogPostViewModelMapper : MapperBase +{ + public override partial UpdateModel.UpdateBlogPostViewModel Map(BlogPostDto source); + + public override partial void Map(BlogPostDto source, UpdateModel.UpdateBlogPostViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogDtoUpdateToBlogViewModelMapper : MapperBase +{ + public override partial Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs.UpdateModalModel.UpdateBlogViewModel Map(BlogDto source); + + public override partial void Map(BlogDto source, Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs.UpdateModalModel.UpdateBlogViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CreateBlogViewModelToCreateBlogDtoMapper : MapperBase +{ + public override partial CreateBlogDto Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs.CreateModalModel.CreateBlogViewModel source); + + public override partial void Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs.CreateModalModel.CreateBlogViewModel source, CreateBlogDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class UpdateBlogViewModelToUpdateBlogDtoMapper : MapperBase +{ + public override partial UpdateBlogDto Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs.UpdateModalModel.UpdateBlogViewModel source); + + public override partial void Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Blogs.UpdateModalModel.UpdateBlogViewModel source, UpdateBlogDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MenuItemUpdateViewModelToMenuItemCreateInputMapper : TwoWayMapperBase +{ + public override partial MenuItemCreateInput Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems.CreateModalModel.MenuItemCreateViewModel source); + + public override partial void Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems.CreateModalModel.MenuItemCreateViewModel source, MenuItemCreateInput destination); + public override partial Pages.CmsKit.Menus.MenuItems.CreateModalModel.MenuItemCreateViewModel ReverseMap(MenuItemCreateInput destination); + + public override partial void ReverseMap(MenuItemCreateInput destination, Pages.CmsKit.Menus.MenuItems.CreateModalModel.MenuItemCreateViewModel source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MenuItemUpdateViewModelToMenuItemUpdateInputMapper : MapperBase +{ + public override partial MenuItemUpdateInput Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems.UpdateModalModel.MenuItemUpdateViewModel source); + + public override partial void Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems.UpdateModalModel.MenuItemUpdateViewModel source, MenuItemUpdateInput destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MenuItemWithDetailsDtoToMenuItemUpdateViewModelMapper : MapperBase +{ + public override partial Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems.UpdateModalModel.MenuItemUpdateViewModel Map(MenuItemWithDetailsDto source); + + public override partial void Map(MenuItemWithDetailsDto source, Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems.UpdateModalModel.MenuItemUpdateViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class PageDtoToCreatePageInputDtoMapper : MapperBase +{ + public override partial Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages.UpdateModel.UpdatePageViewModel Map(PageDto source); + + public override partial void Map(PageDto source, Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages.UpdateModel.UpdatePageViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CreatePageViewModelToCreatePageInputDtoMapper : TwoWayMapperBase +{ + public override partial CreatePageInputDto Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages.CreateModel.CreatePageViewModel source); + + public override partial void Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages.CreateModel.CreatePageViewModel source, CreatePageInputDto destination); + public override partial Pages.CmsKit.Pages.CreateModel.CreatePageViewModel ReverseMap(CreatePageInputDto destination); + + public override partial void ReverseMap(CreatePageInputDto destination, Pages.CmsKit.Pages.CreateModel.CreatePageViewModel source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class UpdatePageViewModelToUpdatePageInputDtoMapper : TwoWayMapperBase +{ + public override partial UpdatePageInputDto Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages.UpdateModel.UpdatePageViewModel source); + + public override partial void Map(Volo.CmsKit.Admin.Web.Pages.CmsKit.Pages.UpdateModel.UpdatePageViewModel source, UpdatePageInputDto destination); + + public override partial Pages.CmsKit.Pages.UpdateModel.UpdatePageViewModel ReverseMap(UpdatePageInputDto destination); + + public override partial void ReverseMap(UpdatePageInputDto destination, Pages.CmsKit.Pages.UpdateModel.UpdatePageViewModel source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class TagCreateViewModelToTagCreateDtoMapper : TwoWayMapperBase +{ + public override partial TagCreateDto Map(CreateModalModel.TagCreateViewModel source); + + public override partial void Map(CreateModalModel.TagCreateViewModel source, TagCreateDto destination); + public override partial CreateModalModel.TagCreateViewModel ReverseMap(TagCreateDto destination); + + public override partial void ReverseMap(TagCreateDto destination, CreateModalModel.TagCreateViewModel source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class TagEditViewModelToTagUpdateDtoMapper : MapperBase +{ + public override partial TagUpdateDto Map(EditModalModel.TagEditViewModel source); + + public override partial void Map(EditModalModel.TagEditViewModel source, TagUpdateDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class TagDtoToTagEditViewModelMapper : MapperBase +{ + public override partial EditModalModel.TagEditViewModel Map(TagDto source); + + public override partial void Map(TagDto source, EditModalModel.TagEditViewModel destination); +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs index 45cbbd818d..c820362566 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs @@ -7,7 +7,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Packages.MarkdownIt; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.PageToolbars; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Localization; using Volo.Abp.Modularity; @@ -82,8 +82,7 @@ public class CmsKitAdminWebModule : AbpModule options.FileSets.AddEmbedded("Volo.CmsKit.Admin.Web"); }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => { options.AddMaps(validate: true); }); + context.Services.AddMapperlyObjectMapper(); Configure(options => { diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml.cs index 83fa3d0285..8e969115e0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Create.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; @@ -50,7 +49,6 @@ public class CreateModel : CmsKitAdminPageModel return new OkObjectResult(createResult); } - [AutoMap(typeof(CreateBlogPostDto), ReverseMap = true)] public class CreateBlogPostViewModel : ExtensibleObject { [Required] diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml.cs index 810a955158..b0ed97d8cd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/BlogPosts/Update.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; @@ -56,8 +55,6 @@ public class UpdateModel : CmsKitAdminPageModel return NoContent(); } - [AutoMap(typeof(BlogPostDto))] - [AutoMap(typeof(UpdateBlogPostDto), ReverseMap = true)] public class UpdateBlogPostViewModel : ExtensibleObject, IHasConcurrencyStamp { [DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxTitleLength))] diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/CreateModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/CreateModal.cshtml.cs index 5f7ea9cee1..422a167776 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/CreateModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/CreateModal.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Volo.Abp.ObjectExtending; diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/FeaturesModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/FeaturesModal.cshtml.cs index a18d2e7d89..a7071a1f12 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/FeaturesModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/FeaturesModal.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; @@ -47,8 +46,6 @@ public class FeaturesModalModel : CmsKitAdminPageModel return NoContent(); } - [AutoMap(typeof(BlogFeatureDto), ReverseMap = true)] - [AutoMap(typeof(BlogFeatureInputDto), ReverseMap = true)] public class BlogFeatureViewModel { private string featureName; diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/UpdateModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/UpdateModal.cshtml.cs index 1cccffe496..b36c0daefc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/UpdateModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Blogs/UpdateModal.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/CreateModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/CreateModal.cshtml.cs index f0730d08a7..6c9a324da8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/CreateModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/CreateModal.cshtml.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; -using AutoMapper; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Features; @@ -48,7 +47,6 @@ public class CreateModalModel : CmsKitAdminPageModel return new OkObjectResult(dto); } - [AutoMap(typeof(MenuItemCreateInput), ReverseMap = true)] public class MenuItemCreateViewModel : ExtensibleObject { [HiddenInput] diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/UpdateModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/UpdateModal.cshtml.cs index 9cb5af1bba..19da825365 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/UpdateModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/UpdateModal.cshtml.cs @@ -2,9 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; -using AutoMapper; using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; using Volo.Abp.Domain.Entities; using Volo.Abp.Features; using Volo.Abp.GlobalFeatures; @@ -12,7 +10,6 @@ using Volo.Abp.ObjectExtending; using Volo.CmsKit.Admin.Menus; using Volo.CmsKit.Features; using Volo.CmsKit.GlobalFeatures; -using Volo.CmsKit.Menus; namespace Volo.CmsKit.Admin.Web.Pages.CmsKit.Menus.MenuItems; diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml.cs index 9a8369ad60..96d3f218c6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; @@ -32,7 +31,6 @@ public class CreateModel : CmsKitAdminPageModel return new OkObjectResult(created); } - [AutoMap(typeof(CreatePageInputDto), ReverseMap = true)] public class CreatePageViewModel : ExtensibleObject { [Required] diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml.cs index 44c48a31c0..fff1f814e5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; @@ -44,8 +43,6 @@ public class UpdateModel : CmsKitAdminPageModel return NoContent(); } - [AutoMap(typeof(PageDto))] - [AutoMap(typeof(UpdatePageInputDto), ReverseMap = true)] public class UpdatePageViewModel : ExtensibleObject, IHasConcurrencyStamp { [Required] diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/CreateModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/CreateModal.cshtml.cs index 8b2b5f7dcf..807683826c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/CreateModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/CreateModal.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -44,7 +43,6 @@ public class CreateModalModel : CmsKitAdminPageModel return NoContent(); } - [AutoMap(typeof(TagCreateDto), ReverseMap = true)] public class TagCreateViewModel : ExtensibleObject { [DynamicMaxLength(typeof(TagConsts), nameof(TagConsts.MaxEntityTypeLength))] diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/EditModal.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/EditModal.cshtml.cs index 3482e5e05b..34a052591e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/EditModal.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Tags/EditModal.cshtml.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -44,8 +43,6 @@ public class EditModalModel : CmsKitAdminPageModel return NoContent(); } - [AutoMap(typeof(TagDto))] - [AutoMap(typeof(TagUpdateDto), ReverseMap = true)] public class TagEditViewModel : ExtensibleObject, IHasConcurrencyStamp { [Required] diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.abppkg.analyze.json b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.abppkg.analyze.json index 970db426d7..b661387b41 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.abppkg.analyze.json +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.abppkg.analyze.json @@ -21,9 +21,9 @@ "name": "AbpDddApplicationModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" } ], "implementingInterfaces": [ diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj index b2b40d4dbf..379a2ba1f3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo.CmsKit.Common.Application.csproj @@ -9,7 +9,7 @@ - + diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs index 99efcb92b8..dc3b79f2d0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs @@ -8,5 +8,6 @@ public abstract class CmsKitAppServiceBase : ApplicationService protected CmsKitAppServiceBase() { LocalizationResource = typeof(CmsKitResource); + ObjectMapperContext = typeof(CmsKitCommonApplicationModule); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs deleted file mode 100644 index 099b3e1b10..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,25 +0,0 @@ -using AutoMapper; -using Volo.CmsKit.Blogs; -using Volo.CmsKit.Tags; -using Volo.CmsKit.Users; - -namespace Volo.CmsKit; - -public class CmsKitCommonApplicationAutoMapperProfile : Profile -{ - public CmsKitCommonApplicationAutoMapperProfile() - { - CreateMap().MapExtraProperties(); - - CreateMap(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - CreateMap().MapExtraProperties(); - CreateMap() - .MapExtraProperties() - .ReverseMap() - .MapExtraProperties(); - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationMappers.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationMappers.cs new file mode 100644 index 0000000000..53ca4b28f7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationMappers.cs @@ -0,0 +1,62 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.Tags; +using Volo.CmsKit.Users; + +namespace Volo.CmsKit; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class OrganizationUnitRoleToOrganizationUnitRoleDtoMapper : TwoWayMapperBase +{ + public override partial BlogFeatureDto Map(BlogFeatureCacheItem source); + public override partial void Map(BlogFeatureCacheItem source, BlogFeatureDto destination); + + public override partial BlogFeatureCacheItem ReverseMap(BlogFeatureDto destination); + public override partial void ReverseMap(BlogFeatureDto destination, BlogFeatureCacheItem source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogFeatureToBlogFeatureDtoMapper : MapperBase +{ + public override partial BlogFeatureDto Map(BlogFeature source); + + public override partial void Map(BlogFeature source, BlogFeatureDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogFeatureToBlogFeatureCacheItemMapper : MapperBase +{ + public override partial BlogFeatureCacheItem Map(BlogFeature source); + + public override partial void Map(BlogFeature source, BlogFeatureCacheItem destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PopularTagToPopularTagDtoMapper : MapperBase +{ + public override partial PopularTagDto Map(PopularTag source); + + public override partial void Map(PopularTag source, PopularTagDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CmsUserToCmsUserDtoMapper : MapperBase +{ + public override partial CmsUserDto Map(CmsUser source); + + public override partial void Map(CmsUser source, CmsUserDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class TagToTagDtoMapper : MapperBase +{ + public override partial TagDto Map(Tag source); + + public override partial void Map(Tag source, TagDto destination); +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs index 44125bd4bf..5a9b786bc8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs @@ -1,11 +1,7 @@ -using Volo.Abp.Application; -using Volo.Abp.AutoMapper; -using Volo.Abp.GlobalFeatures; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Application; +using Volo.Abp.Mapperly; using Volo.Abp.Modularity; -using Volo.CmsKit.Blogs; -using Volo.CmsKit.GlobalFeatures; -using Volo.CmsKit.MediaDescriptors; -using Volo.CmsKit.Permissions; namespace Volo.CmsKit; @@ -13,15 +9,12 @@ namespace Volo.CmsKit; typeof(CmsKitCommonApplicationContractsModule), typeof(CmsKitDomainModule), typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class CmsKitCommonApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => - { - options.AddMaps(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs index e8a30a75bc..754f2263a0 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitCommonWebModule.cs @@ -1,5 +1,5 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; @@ -13,12 +13,14 @@ namespace Volo.CmsKit.Web; [DependsOn( typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(CmsKitCommonApplicationContractsModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class CmsKitCommonWebModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.ReactionIcons[StandardReactions.Smile] = new LocalizableIconDictionary("fas fa-smile text-warning"); diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.abppkg.analyze.json b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.abppkg.analyze.json index 6b69cfe938..e507786073 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.abppkg.analyze.json +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.abppkg.analyze.json @@ -16,9 +16,9 @@ "name": "CmsKitCommonApplicationContractsModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" } ], "implementingInterfaces": [ diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj index c373de7916..98659fb205 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Volo.CmsKit.Common.Web.csproj @@ -14,7 +14,7 @@ - + diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs index d54256bd8d..af2236c53c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs @@ -58,31 +58,20 @@ public class EfCoreBlogPostRepository : EfCoreRepository entityIdFilters = null; - if (tagId.HasValue) - { - entityIdFilters = (await _entityTagManager.GetEntityIdsFilteredByTagAsync(tagId.Value, CurrentTenant.Id, cancellationToken)).Select(Guid.Parse).ToList(); - } - - var tagFilteredEntityIds = tagId.HasValue - ? await _entityTagManager.GetEntityIdsFilteredByTagAsync(tagId.Value, CurrentTenant.Id, cancellationToken) - : null; - - var favoriteUserFilteredEntityIds = favoriteUserId.HasValue - ? await _markedItemManager.GetEntityIdsFilteredByUserAsync(favoriteUserId.Value, BlogPostConsts.EntityType) - : null; + cancellationToken = GetCancellationToken(cancellationToken); + + var tagFilteredEntityIds = await GetEntityIdsByTagId(tagId, cancellationToken); + var favoriteUserFilteredEntityIds = await GetFavoriteEntityIdsByUserId(favoriteUserId, cancellationToken); var queryable = (await GetDbSetAsync()) - .WhereIf(entityIdFilters != null, x => entityIdFilters.Contains(x.Id)) - .WhereIf(tagFilteredEntityIds != null, x => tagFilteredEntityIds.Contains(x.Id.ToString())) - .WhereIf(favoriteUserFilteredEntityIds != null, x => favoriteUserFilteredEntityIds.Contains(x.Id.ToString())) + .WhereIf(tagFilteredEntityIds.Count > 0, x => tagFilteredEntityIds.Contains(x.Id)) + .WhereIf(favoriteUserFilteredEntityIds.Count > 0, x => favoriteUserFilteredEntityIds.Contains(x.Id)) .WhereIf(blogId.HasValue, x => x.BlogId == blogId) .WhereIf(authorId.HasValue, x => x.AuthorId == authorId) .WhereIf(statusFilter.HasValue, x => x.Status == statusFilter) .WhereIf(!string.IsNullOrEmpty(filter), x => x.Title.Contains(filter) || x.Slug.Contains(filter)); - var count = await queryable.CountAsync(GetCancellationToken(cancellationToken)); - return count; + return await queryable.CountAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -99,27 +88,16 @@ public class EfCoreBlogPostRepository : EfCoreRepository(); var usersDbSet = dbContext.Set(); - List entityIdFilters = null; - if (tagId.HasValue) - { - entityIdFilters = (await _entityTagManager.GetEntityIdsFilteredByTagAsync(tagId.Value, CurrentTenant.Id, cancellationToken)).Select(Guid.Parse).ToList(); - } - - var tagFilteredEntityIds = tagId.HasValue - ? await _entityTagManager.GetEntityIdsFilteredByTagAsync(tagId.Value, CurrentTenant.Id, cancellationToken) - : null; - - var favoriteUserFilteredEntityIds = favoriteUserId.HasValue - ? await _markedItemManager.GetEntityIdsFilteredByUserAsync(favoriteUserId.Value, BlogPostConsts.EntityType) - : null; + cancellationToken = GetCancellationToken(cancellationToken); + + var tagFilteredEntityIds = await GetEntityIdsByTagId(tagId, cancellationToken); + var favoriteUserFilteredEntityIds = await GetFavoriteEntityIdsByUserId(favoriteUserId, cancellationToken); var queryable = (await GetDbSetAsync()) - .WhereIf(entityIdFilters != null, x => entityIdFilters.Contains(x.Id)) - .WhereIf(tagFilteredEntityIds != null, x => tagFilteredEntityIds.Contains(x.Id.ToString())) - .WhereIf(favoriteUserFilteredEntityIds != null, x => favoriteUserFilteredEntityIds.Contains(x.Id.ToString())) + .WhereIf(tagFilteredEntityIds.Count > 0, x => tagFilteredEntityIds.Contains(x.Id)) + .WhereIf(favoriteUserFilteredEntityIds.Count > 0, x => favoriteUserFilteredEntityIds.Contains(x.Id)) .WhereIf(blogId.HasValue, x => x.BlogId == blogId) .WhereIf(!string.IsNullOrWhiteSpace(filter), x => x.Title.Contains(filter) || x.Slug.Contains(filter)) .WhereIf(authorId.HasValue, x => x.AuthorId == authorId) @@ -204,4 +182,64 @@ public class EfCoreBlogPostRepository : EfCoreRepository x.BlogId == blogId, cancellationToken: cancellationToken); } + + private async Task> GetFavoriteEntityIdsByUserId(Guid? userId, CancellationToken cancellationToken = default) + { + var entityIdFilters = new List(); + if (!userId.HasValue) + { + return entityIdFilters; + } + + var entityIds = await _markedItemManager.GetEntityIdsFilteredByUserAsync( + userId.Value, + BlogPostConsts.EntityType, + CurrentTenant.Id, + cancellationToken + ); + + if (entityIds.Count == 0) + { + entityIdFilters.Add(Guid.Empty); + return entityIdFilters; + } + + foreach (var entityId in entityIds) + { + if (Guid.TryParse(entityId, out var parsedEntityId)) + { + entityIdFilters.Add(parsedEntityId); + } + } + + return entityIdFilters; + } + + private async Task> GetEntityIdsByTagId(Guid? tagId, CancellationToken cancellationToken = default) + { + var entityIdFilters = new List(); + if (!tagId.HasValue) + { + return entityIdFilters; + } + + var entityIds = + await _entityTagManager.GetEntityIdsFilteredByTagAsync(tagId.Value, CurrentTenant.Id, cancellationToken); + + if (entityIds.Count == 0) + { + entityIdFilters.Add(Guid.Empty); + return entityIdFilters; + } + + foreach (var entityId in entityIds) + { + if (Guid.TryParse(entityId, out var parsedEntityId)) + { + entityIdFilters.Add(parsedEntityId); + } + } + + return entityIdFilters; + } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs index 78afc5a871..f2103c1580 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Blogs/MongoBlogPostRepository.cs @@ -86,8 +86,9 @@ public class MongoBlogPostRepository : MongoDbRepository( - await BlogPostRepository.GetCountAsync(blogId: blog.Id, tagId: input.TagId, - statusFilter: BlogPostStatus.Published, authorId: input.AuthorId), + await BlogPostRepository.GetCountAsync( + blogId: blog.Id, + tagId: input.TagId, + favoriteUserId: favoriteUserId, + statusFilter: BlogPostStatus.Published, + authorId: input.AuthorId + ), ObjectMapper.Map, List>(blogPosts)); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationMappers.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationMappers.cs new file mode 100644 index 0000000000..2d71d87eb1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationMappers.cs @@ -0,0 +1,111 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.CmsKit.Blogs; +using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.GlobalResources; +using Volo.CmsKit.Menus; +using Volo.CmsKit.Pages; +using Volo.CmsKit.Public.Comments; +using Volo.CmsKit.Public.GlobalResources; +using Volo.CmsKit.Public.Ratings; +using Volo.CmsKit.Ratings; +using Volo.CmsKit.Users; + +namespace Volo.CmsKit.Public; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CmsUserToCmsUserDtoMapper : MapperBase +{ + public override partial Comments.CmsUserDto Map(CmsUser source); + + public override partial void Map(CmsUser source, Comments.CmsUserDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CommentToCommentDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(CommentDto.Author))] + public override partial CommentDto Map(Comment source); + + [MapperIgnoreTarget(nameof(CommentDto.Author))] + public override partial void Map(Comment source, CommentDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CommentToCommentWithDetailsDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(CommentWithDetailsDto.Replies))] + [MapperIgnoreTarget(nameof(CommentWithDetailsDto.Author))] + public override partial CommentWithDetailsDto Map(Comment source); + + [MapperIgnoreTarget(nameof(CommentWithDetailsDto.Replies))] + [MapperIgnoreTarget(nameof(CommentWithDetailsDto.Author))] + public override partial void Map(Comment source, CommentWithDetailsDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class RatingToRatingDtoMapper : MapperBase +{ + public override partial RatingDto Map(Rating source); + + public override partial void Map(Rating source, RatingDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class PageToPageCacheItemMapper : MapperBase +{ + public override partial PageCacheItem Map(Page source); + + public override partial void Map(Page source, PageCacheItem destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class PageCacheItemToPageDtoMapper : MapperBase +{ + public override partial PageDto Map(PageCacheItem source); + + public override partial void Map(PageCacheItem source, PageDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogPostToPageDtoMapper : MapperBase +{ + public override partial PageDto Map(Page source); + + public override partial void Map(Page source, PageDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class BlogPostToBlogPostCommonDtoMapper : MapperBase +{ + public override partial BlogPostCommonDto Map(BlogPost source); + + public override partial void Map(BlogPost source, BlogPostCommonDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class MenuItemToMenuItemDtoMapper : MapperBase +{ + public override partial MenuItemDto Map(MenuItem source); + + public override partial void Map(MenuItem source, MenuItemDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class GlobalResourceToGlobalResourceDtoMapper : MapperBase +{ + public override partial GlobalResourceDto Map(GlobalResource source); + + public override partial void Map(GlobalResource source, GlobalResourceDto destination); +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs index 4d7f816081..93a0ae83f1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/CmsKitPublicApplicationModule.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AutoMapper; using Volo.Abp.Caching; using Volo.Abp.Modularity; @@ -14,11 +13,6 @@ public class CmsKitPublicApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddMaps(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicAppService.cs index 3b432967db..a91e6bd0d4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicAppService.cs @@ -5,12 +5,13 @@ using Volo.Abp.GlobalFeatures; using Volo.CmsKit.Features; using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalResources; +using Volo.CmsKit.Public; namespace Volo.CmsKit.Public.GlobalResources; [RequiresFeature(CmsKitFeatures.GlobalResourceEnable)] [RequiresGlobalFeature(typeof(GlobalResourcesFeature))] -public class GlobalResourcePublicAppService : ApplicationService, IGlobalResourcePublicAppService +public class GlobalResourcePublicAppService : CmsKitPublicAppServiceBase, IGlobalResourcePublicAppService { public GlobalResourceManager GlobalResourceManager { get; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/Handlers/GlobalResourceEventHandler.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/Handlers/GlobalResourceEventHandler.cs index d16e271e4e..1b5089def9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/Handlers/GlobalResourceEventHandler.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/Handlers/GlobalResourceEventHandler.cs @@ -12,12 +12,12 @@ public class GlobalResourceEventHandler : ILocalEventHandler>, ITransientDependency { - public IObjectMapper ObjectMapper { get; } + public IObjectMapper ObjectMapper { get; } private readonly IDistributedCache _resourceCache; public GlobalResourceEventHandler( IDistributedCache resourceCache, - IObjectMapper objectMapper) + IObjectMapper objectMapper) { ObjectMapper = objectMapper; _resourceCache = resourceCache; @@ -29,4 +29,4 @@ public class GlobalResourceEventHandler : eventData.Entity.Name, ObjectMapper.Map(eventData.Entity)); } -} \ No newline at end of file +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs deleted file mode 100644 index a625eca4f8..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,46 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.CmsKit.Blogs; -using Volo.CmsKit.Comments; -using Volo.CmsKit.Contents; -using Volo.CmsKit.GlobalResources; -using Volo.CmsKit.Menus; -using Volo.CmsKit.Pages; -using Volo.CmsKit.Public.Blogs; -using Volo.CmsKit.Public.Comments; -using Volo.CmsKit.Public.GlobalResources; -using Volo.CmsKit.Public.Ratings; -using Volo.CmsKit.Ratings; -using Volo.CmsKit.Users; - -namespace Volo.CmsKit.Public; - -public class PublicApplicationAutoMapperProfile : Profile -{ - public PublicApplicationAutoMapperProfile() - { - CreateMap().MapExtraProperties(); - - CreateMap() - .Ignore(x => x.Author).MapExtraProperties(); - - CreateMap() - .Ignore(x => x.Replies) - .Ignore(x => x.Author) - .MapExtraProperties(); - - CreateMap(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - - CreateMap().MapExtraProperties(); - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs index 5acb8d6fe9..7fcbeed7d8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs @@ -1,15 +1,38 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.CmsKit.Menus; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.CmsKit.Contents; using Volo.CmsKit.Public.Comments; +using Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Blogs; +using Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages; namespace Volo.CmsKit.Public.Web; -public class CmsKitPublicWebAutoMapperProfile : Profile +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PageDtoToPageViewModelMapper : TwoWayMapperBase { - public CmsKitPublicWebAutoMapperProfile() - { - CreateMap() - .Ignore(x=> x.ExtraProperties); - } + public override partial PageViewModel Map(PageDto source); + public override partial void Map(PageDto source, PageViewModel destination); + + public override partial PageDto ReverseMap(PageViewModel destination); + public override partial void ReverseMap(PageViewModel destination, PageDto source); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class BlogPostCommonDtoToBlogPostViewModelMapper : TwoWayMapperBase +{ + public override partial BlogPostViewModel Map(BlogPostCommonDto source); + public override partial void Map(BlogPostCommonDto source, BlogPostViewModel destination); + + public override partial BlogPostCommonDto ReverseMap(BlogPostViewModel destination); + public override partial void ReverseMap(BlogPostViewModel destination, BlogPostCommonDto source); } + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class CreateCommentWithParametersInputToCommentDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(CreateCommentInput.ExtraProperties))] + public override partial CreateCommentInput Map(CreateCommentWithParametersInput source); + + [MapperIgnoreTarget(nameof(CreateCommentInput.ExtraProperties))] + public override partial void Map(CreateCommentWithParametersInput source, CreateCommentInput destination); +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index 8132202717..31344206ec 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.Localization; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.GlobalFeatures; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; @@ -67,12 +67,7 @@ public class CmsKitPublicWebModule : AbpModule options.FileSets.AddEmbedded("Volo.CmsKit.Public.Web"); }); - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddMaps(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); Configure(options => { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicControllerBase.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicControllerBase.cs index f22444036d..8251397bdd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicControllerBase.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Controllers/CmsKitPublicControllerBase.cs @@ -8,5 +8,6 @@ public abstract class CmsKitPublicControllerBase : AbpController public CmsKitPublicControllerBase() { LocalizationResource = typeof(CmsKitResource); + ObjectMapperContext = typeof(CmsKitPublicWebModule); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPostViewModel.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPostViewModel.cs index 789d2687fc..02caf748ef 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPostViewModel.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPostViewModel.cs @@ -1,13 +1,11 @@ using System; using System.Collections.Generic; -using AutoMapper; using Volo.Abp.Application.Dtos; using Volo.CmsKit.Contents; using Volo.CmsKit.Users; namespace Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Blogs; -[AutoMap(typeof(BlogPostCommonDto), ReverseMap = true)] public class BlogPostViewModel : AuditedEntityDto { public Guid BlogId { get; set; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml index 23f214f1e5..b6d0b41f9d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml @@ -14,7 +14,8 @@ @{ const string dummyImageSource = "/cms-kit/dummy-placeholder-320x180.png"; - var isMarkedItemFeatureEnabled = GlobalFeatureManager.Instance.IsEnabled() && Model.MarkedItemsFeature?.IsEnabled == true; + var isMarkedItemFeatureEnabled = GlobalFeatureManager.Instance.IsEnabled() && + (Model.MarkedItemsFeature?.IsEnabled == true || Model.FilterOnFavorites.HasValue); } @section styles { @@ -68,20 +69,20 @@
} -@if (Model.Blogs.TotalCount > 0) +@if (isMarkedItemFeatureEnabled) { - @if (isMarkedItemFeatureEnabled) - { - var filterOnFavorties = Model.FilterOnFavorites.GetValueOrDefault(); - string icon = filterOnFavorties ? "heart" : "heart-o"; - - + var filterOnFavorites = Model.FilterOnFavorites.GetValueOrDefault(); + string icon = filterOnFavorites ? "heart" : "heart-o"; + + +} - } +@if (Model.Blogs.TotalCount > 0) +{ @foreach (var blog in Model.Blogs.Items) { diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml.cs index 18eb184742..6eb5982030 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml.cs @@ -20,6 +20,8 @@ public class IndexModel : CommonPageModel public IndexModel(IPagePublicAppService pagePublicAppService, ContentParser contentParser) { + ObjectMapperContext = typeof(CmsKitPublicWebModule); + PagePublicAppService = pagePublicAppService; ContentParser = contentParser; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/PageViewModel.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/PageViewModel.cs index 27432305fe..ebc2a9f69c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/PageViewModel.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/PageViewModel.cs @@ -1,12 +1,9 @@ using System; using System.Collections.Generic; -using AutoMapper; using Volo.CmsKit.Contents; -using Volo.CmsKit.Public.Pages; namespace Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages; -[AutoMap(typeof(PageDto), ReverseMap = true)] public class PageViewModel { public Guid Id { get; set; } diff --git a/modules/docs/app/VoloDocs.Web/package.json b/modules/docs/app/VoloDocs.Web/package.json index 11a654b87b..985c0f9988 100644 --- a/modules/docs/app/VoloDocs.Web/package.json +++ b/modules/docs/app/VoloDocs.Web/package.json @@ -3,7 +3,7 @@ "name": "volo.docstestapp", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2", - "@abp/docs": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3", + "@abp/docs": "~9.3.3" } } diff --git a/modules/docs/app/VoloDocs.Web/yarn.lock b/modules/docs/app/VoloDocs.Web/yarn.lock index 8b283f6c5f..81fe908a9d 100644 --- a/modules/docs/app/VoloDocs.Web/yarn.lock +++ b/modules/docs/app/VoloDocs.Web/yarn.lock @@ -2,229 +2,229 @@ # yarn lockfile v1 -"@abp/anchor-js@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/anchor-js/-/anchor-js-9.3.2.tgz#46a7cc1482e4064a15dedc2000f3c22accc57551" - integrity sha512-1cEpNPnKcpRoApYyo7fDNVQLLdjpZLIAt5VU5yHdssJgdeK99ebPkWFNQNl3T72XSzBvvnGmplz63p6loe1H4A== +"@abp/anchor-js@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/anchor-js/-/anchor-js-9.3.3.tgz#cc98c5eb55ba854f3e6d379401bdc8606c6ff69b" + integrity sha512-h+ifARYy3nRfe1hzO7hx3ELqdMf1nxjcWjBBSvRHRqsxpjZqhE7B4Pasw+Se2VmCCfvP2wYDYmed8Ejfksezyg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" anchor-js "^5.0.0" -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" - -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== - dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" + +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== + dependencies: + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/clipboard@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.2.tgz#4e0d6456e142e552ca3b4ec10159276e096c56bf" - integrity sha512-jorX68Yw/9pWAmt8cOuVx3Cnp7VF9xuvCD/ecvL5eZyHhXt4tDcYIFO5LkF+CaIky79gdzdF3tmYeFSPUE/HzA== +"@abp/clipboard@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.3.3.tgz#e6fd477a9f6d6c7fb224ea018e8f23d8d303f3ed" + integrity sha512-iR9HUk1JPWHS3LQ5QmH40maCuwi6SFwxPYvqVjNLVTisHsUOGGZLvHJ46aA8Ei3Q4UlUCdISP9Kc4F88JrhRpA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" clipboard "^2.0.11" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/docs@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/docs/-/docs-9.3.2.tgz#f786e589af447d9b55c1192c6f07ed494e1465ba" - integrity sha512-Aa8xtZMj18m23XMGWbcddzeT2R6lkp66BAlF5pshj8yKi/5SFlh+5YtIigy0UItqw6tQD2oQJAUWpuTd7jgNng== +"@abp/docs@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/docs/-/docs-9.3.3.tgz#52aabdca61bc5a6479a7d2a64c59204a789d051b" + integrity sha512-lb0zaYstUN2lzbDRwnrrbHHViVboJi2uyLEqxeM11Ds+8Yrt93u+42Aol9P14wYlgvYcvXUN5erffYawFSkPDg== dependencies: - "@abp/anchor-js" "~9.3.2" - "@abp/clipboard" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/popper.js" "~9.3.2" - "@abp/prismjs" "~9.3.2" + "@abp/anchor-js" "~9.3.3" + "@abp/clipboard" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/popper.js" "~9.3.3" + "@abp/prismjs" "~9.3.3" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/popper.js@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-9.3.2.tgz#9abfa7f635fca499836a757dca5918a85322069e" - integrity sha512-VkePozQx871bMpyYP3qJAXbTc5iA5feLU66zH+WBo2doqes+gq3RvQCrkJzNKT8uvb5vgHXSYMMpL5HwTxvtOQ== +"@abp/popper.js@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/popper.js/-/popper.js-9.3.3.tgz#23c729cbadec27a2452f81a32a88c7357963281d" + integrity sha512-vo5RQBQV9R0sF34283vGDdDAjlGHB/dukNae04RvhN4N/0hUYssRIyEQENRHCn86sWtrd8YKSUoOSPW2LPH6Cg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@popperjs/core" "^2.11.8" -"@abp/prismjs@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.2.tgz#2ea48bfa5ebcfd98962029eebeab374d63a4e242" - integrity sha512-q8bdUjk+IuP+nWzN8phgFjvKtOHR94OT5Sth7Rp64L68pVCJopihyth8f4mLZl7hMtwrro/5GFxjpR+KRNRpbg== +"@abp/prismjs@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.3.3.tgz#e34972d2943403fcfe4f41ec6771405afc553904" + integrity sha512-4LUIMa2elN9wpKJB3ndZz2XrntB4kCCeKZHvqpnwTwALsVsR+K5mVjR5jrsniJu4kJ0H51M+s/EMpgT6b1LQUA== dependencies: - "@abp/clipboard" "~9.3.2" - "@abp/core" "~9.3.2" + "@abp/clipboard" "~9.3.3" + "@abp/core" "~9.3.3" prismjs "^1.29.0" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.abppkg.analyze.json b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.abppkg.analyze.json index ad864b4fe1..ea4dad5da4 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.abppkg.analyze.json +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.abppkg.analyze.json @@ -26,9 +26,9 @@ "name": "AbpCachingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.Ddd.Application", diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj index 0b27712718..9a61971adb 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo.Docs.Admin.Application.csproj @@ -14,7 +14,7 @@ - + diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationAutoMapperProfile.cs b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationAutoMapperProfile.cs deleted file mode 100644 index 366c0ab27b..0000000000 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,22 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.Docs.Admin.Documents; -using Volo.Docs.Admin.Projects; -using Volo.Docs.Documents; -using Volo.Docs.Projects; - -namespace Volo.Docs.Admin -{ - public class DocsAdminApplicationAutoMapperProfile : Profile - { - public DocsAdminApplicationAutoMapperProfile() - { - CreateMap(); - CreateMap().Ignore(x => x.ProjectName); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - } - } -} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationMappers.cs b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationMappers.cs new file mode 100644 index 0000000000..813e4165b8 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationMappers.cs @@ -0,0 +1,58 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Docs.Admin.Documents; +using Volo.Docs.Admin.Projects; +using Volo.Docs.Documents; +using Volo.Docs.Projects; + +namespace Volo.Docs.Admin; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectPdfFileToProjectPdfFileDtoMapper : MapperBase +{ + public override partial ProjectPdfFileDto Map(ProjectPdfFile source); + + public override partial void Map(ProjectPdfFile source, ProjectPdfFileDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentInfoToDocumentInfoDtoMapper : MapperBase +{ + public override partial DocumentInfoDto Map(DocumentInfo source); + + public override partial void Map(DocumentInfo source, DocumentInfoDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectWithoutDetailsToProjectWithoutDetailsDtoMapper : MapperBase +{ + public override partial ProjectWithoutDetailsDto Map(ProjectWithoutDetails source); + + public override partial void Map(ProjectWithoutDetails source, ProjectWithoutDetailsDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentWithoutContentToDocumentDtoMapper : MapperBase +{ + public override partial DocumentDto Map(DocumentWithoutContent source); + + public override partial void Map(DocumentWithoutContent source, DocumentDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentToDocumentDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(DocumentDto.ProjectName))] + public override partial DocumentDto Map(Document source); + + [MapperIgnoreTarget(nameof(DocumentDto.ProjectName))] + public override partial void Map(Document source, DocumentDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectToProjectDtoMapper : MapperBase +{ + public override partial ProjectDto Map(Project source); + + public override partial void Map(Project source, ProjectDto destination); +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationModule.cs b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationModule.cs index 2491bf5fb6..0a54afbcce 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/DocsAdminApplicationModule.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Application; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Modularity; using Volo.Docs.Common; @@ -13,7 +13,7 @@ namespace Volo.Docs.Admin typeof(DocsAdminApplicationContractsModule), typeof(DocsCommonApplicationModule), typeof(AbpCachingModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpDddApplicationModule), typeof(AbpBackgroundJobsAbstractionsModule) )] @@ -21,11 +21,7 @@ namespace Volo.Docs.Admin { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } } diff --git a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/Documents/DocumentAdminAppService.cs b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/Documents/DocumentAdminAppService.cs index a6359c2c9b..36edcb12d4 100644 --- a/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/Documents/DocumentAdminAppService.cs +++ b/modules/docs/src/Volo.Docs.Admin.Application/Volo/Docs/Admin/Documents/DocumentAdminAppService.cs @@ -46,6 +46,7 @@ namespace Volo.Docs.Admin.Documents _elasticSearchService = elasticSearchService; LocalizationResource = typeof(DocsResource); + ObjectMapperContext = typeof(DocsAdminApplicationModule); } public virtual async Task ClearCacheAsync(ClearCacheInput input) diff --git a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMapperProfile.cs b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMapperProfile.cs deleted file mode 100644 index d6a1d2230a..0000000000 --- a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMapperProfile.cs +++ /dev/null @@ -1,30 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.Docs.Admin.Documents; -using Volo.Docs.Admin.Pages.Docs.Admin.Projects; -using Volo.Docs.Admin.Projects; - -namespace Volo.Docs.Admin -{ - public class DocsAdminWebAutoMapperProfile : Profile - { - public DocsAdminWebAutoMapperProfile() - { - CreateMap() - .Ignore(x => x.ExtraProperties); - - CreateMap() - .Ignore(x => x.ExtraProperties); - - CreateMap () - .Ignore(x => x.GitHubAccessToken) - .Ignore(x => x.GitHubRootUrl) - .Ignore(x => x.GitHubUserAgent) - .Ignore(x => x.GithubVersionProviderSource) - .Ignore(x => x.VersionBranchPrefix); - - CreateMap(); - CreateMap(); - } - } -} diff --git a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMappers.cs b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMappers.cs new file mode 100644 index 0000000000..87b87c021b --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebAutoMappers.cs @@ -0,0 +1,60 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Docs.Admin.Documents; +using Volo.Docs.Admin.Pages.Docs.Admin.Projects; +using Volo.Docs.Admin.Projects; + +namespace Volo.Docs.Admin; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PullDocumentViewModelToPullAllDocumentInputMapper : MapperBase +{ + public override partial PullAllDocumentInput Map(PullModel.PullDocumentViewModel source); + + public override partial void Map(PullModel.PullDocumentViewModel source, PullAllDocumentInput destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class PullDocumentViewModelToPullDocumentInputMapper : MapperBase +{ + public override partial PullDocumentInput Map(PullModel.PullDocumentViewModel source); + + public override partial void Map(PullModel.PullDocumentViewModel source, PullDocumentInput destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectDtoToEditGithubProjectViewModelMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubAccessToken))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubRootUrl))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubUserAgent))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GithubVersionProviderSource))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.VersionBranchPrefix))] + public override partial EditModel.EditGithubProjectViewModel Map(ProjectDto source); + + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubAccessToken))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubRootUrl))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubUserAgent))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GithubVersionProviderSource))] + [MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.VersionBranchPrefix))] + public override partial void Map(ProjectDto source, EditModel.EditGithubProjectViewModel destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class CreateGithubProjectViewModelToCreateProjectDtoMapper : MapperBase +{ + public override partial CreateProjectDto Map(CreateModel.CreateGithubProjectViewModel source); + + public override partial void Map(CreateModel.CreateGithubProjectViewModel source, CreateProjectDto destination); +} + + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class EditGithubProjectViewModelToUpdateProjectDtoMyClassMapper : MapperBase +{ + public override partial UpdateProjectDto Map(EditModel.EditGithubProjectViewModel source); + + public override partial void Map(EditModel.EditGithubProjectViewModel source, UpdateProjectDto destination); +} diff --git a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs index 3e0d548487..ead6d38375 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.Web/DocsAdminWebModule.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; @@ -32,6 +32,8 @@ namespace Volo.Docs.Admin public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.MenuContributors.Add(new DocsMenuContributor()); @@ -42,12 +44,6 @@ namespace Volo.Docs.Admin options.FileSets.AddEmbedded(); }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - Configure(options => { options.DisableModule(DocsAdminRemoteServiceConsts.ModuleName); diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj index 9c0b5f92ee..832ef7125f 100644 --- a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj +++ b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj @@ -19,7 +19,7 @@
- + diff --git a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json index b6e792225a..3eb0baf95f 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json +++ b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.abppkg.analyze.json @@ -21,9 +21,9 @@ "name": "AbpCachingModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Docs.Common.Application", diff --git a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj index d5e4ff8cd0..f349e59e21 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj +++ b/modules/docs/src/Volo.Docs.Application/Volo.Docs.Application.csproj @@ -14,7 +14,7 @@ - + diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationAutoMapperProfile.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationAutoMapperProfile.cs deleted file mode 100644 index f2cb5476f7..0000000000 --- a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,20 +0,0 @@ -using AutoMapper; -using Volo.Docs.Documents; -using Volo.Abp.AutoMapper; -using Volo.Docs.Common.Projects; -using Volo.Docs.Projects; - -namespace Volo.Docs -{ - public class DocsApplicationAutoMapperProfile : Profile - { - public DocsApplicationAutoMapperProfile() - { - CreateMap(); - CreateMap(); - CreateMap().Ignore(x => x.Project).Ignore(x => x.Contributors); - CreateMap(); - CreateMap(); - } - } -} diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs new file mode 100644 index 0000000000..bd8474b7b9 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationMappers.cs @@ -0,0 +1,51 @@ +using Riok.Mapperly.Abstractions; +using Volo.Docs.Documents; +using Volo.Abp.Mapperly; +using Volo.Docs.Common.Projects; +using Volo.Docs.Projects; + +namespace Volo.Docs; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentResourceToDocumentResourceDtoMapper : MapperBase +{ + public override partial DocumentResourceDto Map(DocumentResource source); + + public override partial void Map(DocumentResource source, DocumentResourceDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentContributorToDocumentContributorDtoMapper : MapperBase +{ + public override partial DocumentContributorDto Map(DocumentContributor source); + + public override partial void Map(DocumentContributor source, DocumentContributorDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class VersionInfoToVersionInfoDtoMapper : MapperBase +{ + public override partial VersionInfoDto Map(VersionInfo source); + + public override partial void Map(VersionInfo source, VersionInfoDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectToProjectDtoMapper : MapperBase +{ + public override partial ProjectDto Map(Project source); + + public override partial void Map(Project source, ProjectDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentToDocumentWithDetailsDtoMapper : MapperBase +{ + [MapperIgnoreTarget(nameof(DocumentWithDetailsDto.Project))] + [MapperIgnoreTarget(nameof(DocumentWithDetailsDto.Contributors))] + public override partial DocumentWithDetailsDto Map(Document source); + + [MapperIgnoreTarget(nameof(DocumentWithDetailsDto.Project))] + [MapperIgnoreTarget(nameof(DocumentWithDetailsDto.Contributors))] + public override partial void Map(Document source, DocumentWithDetailsDto destination); +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs index f6d60099ad..e30577f8f6 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs +++ b/modules/docs/src/Volo.Docs.Application/Volo/Docs/DocsApplicationModule.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Volo.Abp.Application; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Modularity; using Volo.Docs.Common; @@ -13,7 +13,7 @@ namespace Volo.Docs typeof(DocsDomainModule), typeof(DocsApplicationContractsModule), typeof(AbpCachingModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(DocsCommonApplicationModule), typeof(AbpDddApplicationModule) )] @@ -21,12 +21,7 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); context.Services.TryAddSingleton(NullNavigationTreePostProcessor.Instance); } diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.abppkg.analyze.json b/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.abppkg.analyze.json index 0b3f9b4bf2..090a9292d0 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.abppkg.analyze.json +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.abppkg.analyze.json @@ -16,9 +16,9 @@ "name": "DocsCommonApplicationContractsModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.Ddd.Application", diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj b/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj index 021e229079..2b097e70ba 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo.Docs.Common.Application.csproj @@ -13,7 +13,7 @@ - + diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationAutoMapperProfile.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationAutoMapperProfile.cs deleted file mode 100644 index 8175654743..0000000000 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,15 +0,0 @@ -using AutoMapper; -using Volo.Docs.Common.Projects; -using Volo.Docs.Projects; - -namespace Volo.Docs.Common -{ - public class DocsCommonApplicationAutoMapperProfile : Profile - { - public DocsCommonApplicationAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } - } -} diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs new file mode 100644 index 0000000000..9c0874ecdd --- /dev/null +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationMappers.cs @@ -0,0 +1,22 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; +using Volo.Docs.Common.Projects; +using Volo.Docs.Projects; + +namespace Volo.Docs.Common; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectToProjectDtoMapper : MapperBase +{ + public override partial ProjectDto Map(Project source); + + public override partial void Map(Project source, ProjectDto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class VersionInfoToVersionInfoDtoMapper : MapperBase +{ + public override partial VersionInfoDto Map(VersionInfo source); + + public override partial void Map(VersionInfo source, VersionInfoDto destination); +} diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationModule.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationModule.cs index b7eb350930..3339c528dd 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationModule.cs +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/DocsCommonApplicationModule.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Application; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Modularity; namespace Volo.Docs.Common; @@ -8,18 +8,13 @@ namespace Volo.Docs.Common; [DependsOn( typeof(DocsDomainModule), typeof(DocsCommonApplicationContractsModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpDddApplicationModule) )] public class DocsCommonApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs index 96634a300e..eb5c9bc7db 100644 --- a/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs +++ b/modules/docs/src/Volo.Docs.Common.Application/Volo/Docs/Common/Projects/ProjectAppService.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Caching.Distributed; using Volo.Abp.Application.Dtos; using Volo.Abp.Caching; using Volo.Abp.Data; +using Volo.Abp.Threading; using Volo.Docs.Caching; using Volo.Docs.Documents; using Volo.Docs.Projects; @@ -19,6 +21,8 @@ namespace Volo.Docs.Common.Projects private readonly IDocumentSourceFactory _documentSource; protected IDistributedCache LanguageCache { get; } + private readonly SemaphoreSlim _syncSemaphore = new SemaphoreSlim(1, 1); + public ProjectAppService( IProjectRepository projectRepository, IDistributedCache> versionCache, @@ -56,21 +60,31 @@ namespace Volo.Docs.Common.Projects public virtual async Task> GetVersionsAsync(string shortName) { var project = await _projectRepository.GetByShortNameAsync(shortName); - - var versions = await _versionCache.GetOrAddAsync( - CacheKeyGenerator.GenerateProjectVersionsCacheKey(project), - () => GetVersionsAsync(project), - () => new DistributedCacheEntryOptions + using (await _syncSemaphore.LockAsync()) + { + var versions = await _versionCache.GetAsync(CacheKeyGenerator.GenerateProjectVersionsCacheKey(project)); + if (versions.IsNullOrEmpty()) { - //TODO: Configurable? - AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(12), - SlidingExpiration = TimeSpan.FromMinutes(60) + versions = await GetVersionsAsync(project); + if (!versions.IsNullOrEmpty()) + { + await _versionCache.SetAsync( + CacheKeyGenerator.GenerateProjectVersionsCacheKey(project), + versions, + new DistributedCacheEntryOptions + { + //TODO: Configurable? + AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(12), + SlidingExpiration = TimeSpan.FromMinutes(60) + } + ); + } } - ); - return new ListResultDto( - ObjectMapper.Map, List>(versions) - ); + return new ListResultDto( + ObjectMapper.Map, List>(versions) + ); + } } protected virtual async Task> GetVersionsAsync(Project project) diff --git a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.abppkg.analyze.json b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.abppkg.analyze.json index c5c46bc5d7..8dba6531a8 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.abppkg.analyze.json +++ b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.abppkg.analyze.json @@ -16,9 +16,9 @@ "name": "AbpDddDomainModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.BlobStoring", diff --git a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj index 2bc8c41c10..45f06aa595 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj +++ b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj @@ -31,7 +31,7 @@ - + diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainMappingProfile.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainMappingProfile.cs index 74f7224ea6..757d8d7195 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainMappingProfile.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainMappingProfile.cs @@ -1,15 +1,22 @@ -using AutoMapper; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; using Volo.Docs.Documents; using Volo.Docs.Projects; -namespace Volo.Docs +namespace Volo.Docs; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class ProjectToProjectEtoMapper : MapperBase { - public class DocsDomainMappingProfile : Profile - { - public DocsDomainMappingProfile() - { - CreateMap(); - CreateMap(); - } - } + public override partial ProjectEto Map(Project source); + + public override partial void Map(Project source, ProjectEto destination); +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class DocumentToDocumentEtoMapper : MapperBase +{ + public override partial DocumentEto Map(Document source); + + public override partial void Map(Document source, DocumentEto destination); } \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs index 502b2f9065..414ed4b36f 100644 --- a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/DocsDomainModule.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Volo.Abp; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.BlobStoring; using Volo.Abp.Caching; using Volo.Abp.Domain; @@ -27,7 +27,7 @@ namespace Volo.Docs [DependsOn( typeof(DocsDomainSharedModule), typeof(AbpDddDomainModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpBlobStoringModule), typeof(AbpCachingModule) )] @@ -35,13 +35,8 @@ namespace Volo.Docs { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); - + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.EtoMappings.Add(typeof(DocsDomainModule)); diff --git a/modules/docs/src/Volo.Docs.Web/DocsWebAutoMapperProfile.cs b/modules/docs/src/Volo.Docs.Web/DocsWebAutoMapperProfile.cs deleted file mode 100644 index e0a383e691..0000000000 --- a/modules/docs/src/Volo.Docs.Web/DocsWebAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace Volo.Docs -{ - public class DocsWebAutoMapperProfile : Profile - { - public DocsWebAutoMapperProfile() - { - } - } -} diff --git a/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs b/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs index dc9993dea6..6839196d0b 100644 --- a/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs +++ b/modules/docs/src/Volo.Docs.Web/DocsWebModule.cs @@ -1,4 +1,3 @@ -using System; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -9,7 +8,7 @@ using Volo.Abp.Ui.LayoutHooks; using Volo.Abp.AspNetCore.Mvc.UI.Packages; using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; @@ -23,7 +22,7 @@ namespace Volo.Docs { [DependsOn( typeof(DocsApplicationContractsModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAspNetCoreMvcUiPackagesModule), @@ -46,6 +45,8 @@ namespace Volo.Docs public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.FileSets.AddEmbedded(); @@ -88,12 +89,6 @@ namespace Volo.Docs } }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - Configure(options => { options.Converters[MarkdownDocumentToHtmlConverter.Type] = typeof(MarkdownDocumentToHtmlConverter); diff --git a/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanWebDocumentSectionRenderer.cs b/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanWebDocumentSectionRenderer.cs index e4a26b2df6..48379765ec 100644 --- a/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanWebDocumentSectionRenderer.cs +++ b/modules/docs/src/Volo.Docs.Web/HtmlConverting/ScribanWebDocumentSectionRenderer.cs @@ -1,22 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Collections.Generic; using System.Threading.Tasks; -using Scriban; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using Volo.Abp; -using Volo.Abp.ObjectMapping; using Volo.Docs.Documents.Rendering; -using Volo.Extensions; namespace Volo.Docs.HtmlConverting { public class ScribanWebDocumentSectionRenderer : ScribanDocumentSectionRenderer, IWebDocumentSectionRenderer { - private IObjectMapper ObjectMapper { get; set; } - public Task GetDocumentNavigationsAsync(string documentContent) { return GetSectionAsync(documentContent, DocsNav); @@ -35,4 +24,4 @@ namespace Volo.Docs.HtmlConverting return templates; } } -} \ No newline at end of file +} diff --git a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg.analyze.json b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg.analyze.json index 754357e581..9abe50dda3 100644 --- a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg.analyze.json +++ b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.abppkg.analyze.json @@ -11,9 +11,9 @@ "name": "DocsApplicationContractsModule" }, { - "declaringAssemblyName": "Volo.Abp.AutoMapper", - "namespace": "Volo.Abp.AutoMapper", - "name": "AbpAutoMapperModule" + "declaringAssemblyName": "Volo.Abp.Mapperly", + "namespace": "Volo.Abp.Mapperly", + "name": "AbpMapperlyModule" }, { "declaringAssemblyName": "Volo.Abp.AspNetCore.Mvc.UI.Bootstrap", diff --git a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj index c8c35589ea..0242a49124 100644 --- a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj +++ b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj @@ -15,7 +15,7 @@ - + diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationMappers.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationMappers.cs index 164da27aae..18645cf013 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationMappers.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/AbpIdentityApplicationMappers.cs @@ -2,7 +2,7 @@ using Volo.Abp.Identity; using Volo.Abp.Mapperly; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class IdentityUserToIdentityUserDtoMapper : MapperBase { @@ -10,7 +10,7 @@ public partial class IdentityUserToIdentityUserDtoMapper : MapperBase { diff --git a/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorMappers.cs b/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorMappers.cs index 614ca6ae32..8272d99098 100644 --- a/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorMappers.cs +++ b/modules/identity/src/Volo.Abp.Identity.Blazor/AbpIdentityBlazorMappers.cs @@ -3,7 +3,7 @@ using Volo.Abp.Mapperly; namespace Volo.Abp.Identity.Blazor; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class IdentityUserDtoToIdentityUserUpdateDtoMapper : MapperBase { @@ -16,7 +16,7 @@ public partial class IdentityUserDtoToIdentityUserUpdateDtoMapper : MapperBase { diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDomainMappers.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDomainMappers.cs index f7d41c9891..8986ddcd3a 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDomainMappers.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDomainMappers.cs @@ -4,28 +4,28 @@ using Volo.Abp.Users; namespace Volo.Abp.Identity; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityUserToUserEtoMapper : MapperBase { public override partial UserEto Map(IdentityUser source); public override partial void Map(IdentityUser source, UserEto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityClaimTypeToIdentityClaimTypeEtoMapper : MapperBase { public override partial IdentityClaimTypeEto Map(IdentityClaimType source); public override partial void Map(IdentityClaimType source, IdentityClaimTypeEto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityRoleToIdentityRoleEtoMapper : MapperBase { public override partial IdentityRoleEto Map(IdentityRole source); public override partial void Map(IdentityRole source, IdentityRoleEto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class OrganizationUnitToOrganizationUnitEtoMapper : MapperBase { public override partial OrganizationUnitEto Map(OrganizationUnit source); diff --git a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebMappers.cs b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebMappers.cs index 1877dac1d8..d992c6e9b3 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebMappers.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/AbpIdentityWebMappers.cs @@ -6,7 +6,7 @@ using EditUserModalModel = Volo.Abp.Identity.Web.Pages.Identity.Users.EditModalM namespace Volo.Abp.Identity.Web; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityUserDtoToEditUserModalModelUserInfoViewModelMapper : MapperBase { [MapperIgnoreTarget(nameof(EditUserModalModel.UserInfoViewModel.Password))] @@ -16,7 +16,7 @@ public partial class IdentityUserDtoToEditUserModalModelUserInfoViewModelMapper public override partial void Map(IdentityUserDto source, EditUserModalModel.UserInfoViewModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class CreateUserModalModelUserInfoViewModelToIdentityUserCreateDtoMapper : MapperBase { @@ -27,7 +27,7 @@ public partial class CreateUserModalModelUserInfoViewModelToIdentityUserCreateDt public override partial void Map(CreateUserModalModel.UserInfoViewModel source, IdentityUserCreateDto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class IdentityRoleDtoToCreateUserModalModelAssignedRoleViewModelMapper : MapperBase { @@ -38,7 +38,7 @@ public partial class IdentityRoleDtoToCreateUserModalModelAssignedRoleViewModelM public override partial void Map(IdentityRoleDto source, CreateUserModalModel.AssignedRoleViewModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class EditUserModalModelUserInfoViewModelToIdentityUserUpdateDtoMapper : MapperBase { [MapperIgnoreTarget(nameof(IdentityUserUpdateDto.RoleNames))] @@ -48,7 +48,7 @@ public partial class EditUserModalModelUserInfoViewModelToIdentityUserUpdateDtoM public override partial void Map(EditUserModalModel.UserInfoViewModel source, IdentityUserUpdateDto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityRoleDtoToEditUserModalModelAssignedRoleViewModelMapper : MapperBase { [MapperIgnoreTarget(nameof(EditUserModalModel.AssignedRoleViewModel.IsAssigned))] @@ -58,7 +58,7 @@ public partial class IdentityRoleDtoToEditUserModalModelAssignedRoleViewModelMap public override partial void Map(IdentityRoleDto source, EditUserModalModel.AssignedRoleViewModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityUserDtoToEditUserModalModelDetailViewModelMapper : MapperBase { [MapperIgnoreTarget(nameof(EditUserModalModel.DetailViewModel.CreatedBy))] @@ -70,14 +70,14 @@ public partial class IdentityUserDtoToEditUserModalModelDetailViewModelMapper : public override partial void Map(IdentityUserDto source, EditUserModalModel.DetailViewModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityRoleDtoToEditModalModelRoleInfoModelMapper : MapperBase { public override partial EditModalModel.RoleInfoModel Map(IdentityRoleDto source); public override partial void Map(IdentityRoleDto source, EditModalModel.RoleInfoModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class CreateModalModelRoleInfoModelToIdentityRoleCreateDtoMapper : MapperBase { @@ -85,7 +85,7 @@ public partial class CreateModalModelRoleInfoModelToIdentityRoleCreateDtoMapper public override partial void Map(CreateModalModel.RoleInfoModel source, IdentityRoleCreateDto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] [MapExtraProperties] public partial class EditModalModelRoleInfoModelToIdentityRoleUpdateDtoMapper : MapperBase { diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerMapperlyMappers.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerMapperlyMappers.cs index dbeee6d7f1..004583a0bb 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerMapperlyMappers.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityServerMapperlyMappers.cs @@ -12,7 +12,7 @@ using Volo.Abp.IdentityServer.IdentityResources; namespace Volo.Abp.IdentityServer; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class ClientToISClientMapper : MapperBase { [MapperIgnoreTarget(nameof(IdentityServer4.Models.Client.AllowedIdentityTokenSigningAlgorithms))] @@ -81,7 +81,7 @@ public partial class ClientToISClientMapper : MapperBase { [MapperIgnoreTarget(nameof(IdentityServer4.Models.ApiResource.AllowedAccessTokenSigningAlgorithms))] @@ -120,7 +120,7 @@ public partial class ApiResourceToISApiResourceMapper : MapperBase { [MapperIgnoreTarget(nameof(IdentityServer4.Models.ApiScope.UserClaims))] @@ -144,7 +144,7 @@ public partial class ApiScopeToISApiScopeMapper : MapperBase { [MapperIgnoreTarget(nameof(IdentityServer4.Models.IdentityResource.UserClaims))] @@ -168,21 +168,21 @@ public partial class IdentityResourceToISIdentityResourceMapper : MapperBase { public override partial ClientEto Map(Client source); public override partial void Map(Client source, ClientEto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class IdentityResourceToIdentityResourceEtoMapper : MapperBase { public override partial IdentityResourceEto Map(IdentityResource source); public override partial void Map(IdentityResource source, IdentityResourceEto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class PersistedGrantToISPersistedGrantMapper : TwoWayMapperBase { public override partial IdentityServer4.Models.PersistedGrant Map(PersistedGrant source); @@ -221,14 +221,14 @@ public partial class PersistedGrantToISPersistedGrantMapper : TwoWayMapperBase

{ public override partial PersistedGrantEto Map(PersistedGrant source); public override partial void Map(PersistedGrant source, PersistedGrantEto destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class DeviceFlowCodesToDeviceFlowCodesEtoMapper : MapperBase { public override partial DeviceFlowCodesEto Map(DeviceFlowCodes source); diff --git a/modules/openiddict/app/OpenIddict.Demo.Server/package.json b/modules/openiddict/app/OpenIddict.Demo.Server/package.json index 255027fa5f..8097db43a4 100644 --- a/modules/openiddict/app/OpenIddict.Demo.Server/package.json +++ b/modules/openiddict/app/OpenIddict.Demo.Server/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/modules/openiddict/app/angular/package.json b/modules/openiddict/app/angular/package.json index 815442652f..e64b663083 100644 --- a/modules/openiddict/app/angular/package.json +++ b/modules/openiddict/app/angular/package.json @@ -12,15 +12,15 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "~9.3.2", - "@abp/ng.components": "~9.3.2", - "@abp/ng.core": "~9.3.2", - "@abp/ng.oauth": "~9.3.2", - "@abp/ng.identity": "~9.3.2", - "@abp/ng.setting-management": "~9.3.2", - "@abp/ng.tenant-management": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", - "@abp/ng.theme.lepton-x": "~4.3.2", + "@abp/ng.account": "~9.3.3", + "@abp/ng.components": "~9.3.3", + "@abp/ng.core": "~9.3.3", + "@abp/ng.oauth": "~9.3.3", + "@abp/ng.identity": "~9.3.3", + "@abp/ng.setting-management": "~9.3.3", + "@abp/ng.tenant-management": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", + "@abp/ng.theme.lepton-x": "~4.3.3", "@angular/animations": "^15.0.1", "@angular/common": "^15.0.1", "@angular/compiler": "^15.0.1", @@ -36,7 +36,7 @@ "zone.js": "~0.11.4" }, "devDependencies": { - "@abp/ng.schematics": "~9.3.2", + "@abp/ng.schematics": "~9.3.3", "@angular-devkit/build-angular": "^15.0.1", "@angular-eslint/builder": "~15.1.0", "@angular-eslint/eslint-plugin": "~15.1.0", diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs index 28abc4d75b..e628c39644 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs @@ -9,6 +9,7 @@ using Volo.Abp.Authorization.Permissions; using Volo.Abp.Localization; using Volo.Abp.MultiTenancy; using Volo.Abp.SimpleStateChecking; +using Volo.Abp.PermissionManagement.Localization; namespace Volo.Abp.PermissionManagement; @@ -26,6 +27,9 @@ public class PermissionAppService : ApplicationService, IPermissionAppService IOptions options, ISimpleStateCheckerManager simpleStateCheckerManager) { + LocalizationResource = typeof(AbpPermissionManagementResource); + ObjectMapperContext = typeof(AbpPermissionManagementApplicationModule); + Options = options.Value; PermissionManager = permissionManager; PermissionDefinitionManager = permissionDefinitionManager; diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs index 85ffd77924..49e956ad1b 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; @@ -175,13 +176,15 @@ public class PermissionStore : IPermissionStore, ITransientDependency { using (PermissionGrantRepository.DisableTracking()) { + var permissionNames = new HashSet(notCacheKeys.Select(GetPermissionNameFormCacheKeyOrNull)); var permissions = (await PermissionDefinitionManager.GetPermissionsAsync()) - .Where(x => notCacheKeys.Any(k => GetPermissionNameFormCacheKeyOrNull(k) == x.Name)).ToList(); + .Where(x => permissionNames.Contains(x.Name)) + .ToList(); Logger.LogDebug($"Getting not cache granted permissions from the repository for this provider name,key: {providerName},{providerKey}"); var grantedPermissionsHashSet = new HashSet( - (await PermissionGrantRepository.GetListAsync(notCacheKeys.Select(GetPermissionNameFormCacheKeyOrNull).ToArray(), providerName, providerKey)).Select(p => p.Name) + (await PermissionGrantRepository.GetListAsync(permissionNames.ToArray(), providerName, providerKey)).Select(p => p.Name) ); Logger.LogDebug($"Setting the cache items. Count: {permissions.Count}"); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebMappers.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebMappers.cs index 950a3972f0..70e738d243 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebMappers.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebMappers.cs @@ -4,7 +4,7 @@ using static Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.Per namespace Volo.Abp.PermissionManagement.Web; -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class PermissionGroupDtoToPermissionGroupViewModelMapper : MapperBase { [MapperIgnoreTarget(nameof(PermissionGroupViewModel.IsAllPermissionsGranted))] @@ -14,7 +14,7 @@ public partial class PermissionGroupDtoToPermissionGroupViewModelMapper : Mapper public override partial void Map(PermissionGroupDto source, PermissionGroupViewModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class PermissionGrantInfoDtoToPermissionGrantInfoViewModelMapper : MapperBase { [MapperIgnoreTarget(nameof(PermissionGrantInfoViewModel.Depth))] @@ -24,7 +24,7 @@ public partial class PermissionGrantInfoDtoToPermissionGrantInfoViewModelMapper public override partial void Map(PermissionGrantInfoDto source, PermissionGrantInfoViewModel destination); } -[Mapper] +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] public partial class ProviderInfoDtoToProviderInfoViewModelMapper : MapperBase { public override partial ProviderInfoViewModel Map(ProviderInfoDto source); diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/package.json b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/package.json index 4da72f48d3..37101210a7 100644 --- a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/package.json +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/package.json @@ -3,6 +3,6 @@ "name": "demo-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/yarn.lock b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/yarn.lock index 13950786c8..06fb5e9906 100644 --- a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/yarn.lock +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/yarn.lock @@ -2,185 +2,185 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.2.tgz#92907ca78607515c8fd5696e00ad3b65b42881a7" - integrity sha512-wmXGPoKkbR2sCErFdAT37HxYbCbfN0IAd0CGo8aMaQkFzzenq1b9omnN6l9+xd91Q3WcjUcWhpCJLYurcdbgOA== +"@abp/aspnetcore.mvc.ui.theme.basic@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.3.3.tgz#71c2003dbc5ccd6d9f78740c28bb52d57452f4d7" + integrity sha512-YqFGHIw/jAQ02jU4FGUay/pQQGWAA/815YoQskFNxc4R0hlGRS6YrR+kSAzRjmMkeRn9gM/KtndLWiygv1fbEQ== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared" "~9.3.3" -"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.2.tgz#94089c3dcac4571c5fcb9bdb754e5df28a24e966" - integrity sha512-eRSvhLimwf65KKI1P/DZgQK+l300EwX4r2S4XYL0gJjjXI9aeIDQuPEqGZs2a6P5/zfejFvefqCIcG5EfEH9ew== +"@abp/aspnetcore.mvc.ui.theme.shared@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.3.3.tgz#6886575725904f7b8f08234e0057ee851a68735d" + integrity sha512-zv1BL054q3VnqZXjd4fa2E7es/Gs8HsFfp3jWljRwEOytdG1PyHo5++ChM3FlB4+mIXq1On4leST3sDVxa75Sw== dependencies: - "@abp/aspnetcore.mvc.ui" "~9.3.2" - "@abp/bootstrap" "~9.3.2" - "@abp/bootstrap-datepicker" "~9.3.2" - "@abp/bootstrap-daterangepicker" "~9.3.2" - "@abp/datatables.net-bs5" "~9.3.2" - "@abp/font-awesome" "~9.3.2" - "@abp/jquery-form" "~9.3.2" - "@abp/jquery-validation-unobtrusive" "~9.3.2" - "@abp/lodash" "~9.3.2" - "@abp/luxon" "~9.3.2" - "@abp/malihu-custom-scrollbar-plugin" "~9.3.2" - "@abp/moment" "~9.3.2" - "@abp/select2" "~9.3.2" - "@abp/sweetalert2" "~9.3.2" - "@abp/timeago" "~9.3.2" - -"@abp/aspnetcore.mvc.ui@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.2.tgz#5cab40d0f17eea2ae97a0d25fa238e52b5e8ef91" - integrity sha512-C73MB6abc531CmYyRctZXtKUY/0t+hhBQg5fIbzdJaR8SCSHEh2v9j2ZAhKFU0kectdrpKrLroOihOWYMfuWdQ== + "@abp/aspnetcore.mvc.ui" "~9.3.3" + "@abp/bootstrap" "~9.3.3" + "@abp/bootstrap-datepicker" "~9.3.3" + "@abp/bootstrap-daterangepicker" "~9.3.3" + "@abp/datatables.net-bs5" "~9.3.3" + "@abp/font-awesome" "~9.3.3" + "@abp/jquery-form" "~9.3.3" + "@abp/jquery-validation-unobtrusive" "~9.3.3" + "@abp/lodash" "~9.3.3" + "@abp/luxon" "~9.3.3" + "@abp/malihu-custom-scrollbar-plugin" "~9.3.3" + "@abp/moment" "~9.3.3" + "@abp/select2" "~9.3.3" + "@abp/sweetalert2" "~9.3.3" + "@abp/timeago" "~9.3.3" + +"@abp/aspnetcore.mvc.ui@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.3.3.tgz#16aca3844bccb24317f65f3a419cad34f9aa6387" + integrity sha512-bp1syI3exn3YBSoDertHxF1CVmEUIRHLCPr/+K1DLuBxW6KUPnDIpnJVVhXsO7EmwwzzukJF99utPXNGgQXnIg== dependencies: ansi-colors "^4.1.3" -"@abp/bootstrap-datepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.2.tgz#e156b0715b87a182e2cf3132436559e7c47f8987" - integrity sha512-8tDHiFvppm5YlIaLL0IfRd9r/YtyV4+bIp8zuIDeVW6eUvFd1ueuifCzf89vZXRf18PLR8JAiYFdBOx9+8CjZw== +"@abp/bootstrap-datepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.3.3.tgz#7c2e9f153d4bac45858e0d3dcfe6a382302d9c7f" + integrity sha512-kBjnpD0w2BCzEX3gw1ua+dlioAZ6xQigN4aQNpHumrDamAZ+ULhDiUTMJ8ofwlyM9nEryK9NP2+3Bm42iTSWPw== dependencies: bootstrap-datepicker "^1.10.0" -"@abp/bootstrap-daterangepicker@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.2.tgz#19c2f5088ef8cf1cdc4483376f28faa2ca172f18" - integrity sha512-ygyUkiffq5Dry5yuyAzCKnlymbGZZ5f8es9d+dXLjp5lzk8K88LI4jTaIhm/Gc7wzKhFmHMpOIFYIRMzwvMmRQ== +"@abp/bootstrap-daterangepicker@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.3.3.tgz#6420b359ac440d9d76b1cf47ea28f6ad345a2607" + integrity sha512-l5A2NaBDt5o5mePDoLvrWcDX1wj50o+q3OmFVm6x7lHfjOw+1iCxqv2A2GEye1TZeQ8yxCQOn+aUd7OdLUwE7Q== dependencies: bootstrap-daterangepicker "^3.1.0" -"@abp/bootstrap@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.2.tgz#53dc0d68d15c60d36200d711b4f5a0acef15096b" - integrity sha512-vrUux40RDPx7hBXp2u5evRpm2LHRwHmRhmtTXx6ltQ8Aq7BwD9BvqBZEgg5GB5L9MGy5oy5Wm57t9ooQ8qmLgg== +"@abp/bootstrap@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.3.3.tgz#7fafbe0a6fb6cf051c63943361bcc3ee7159d506" + integrity sha512-O1Nv4cXkChcmlcDmszKGDqDZs1ofcmftkMSSGKYCpdJYEHBuGPhC8v29NDLCE3BLgoZjs8BJd3YpPh/cnJoJrA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" bootstrap "^5.3.3" -"@abp/core@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.2.tgz#10f0a485affb15d51c319bbdf88c1bfa24b5b778" - integrity sha512-y3kkP9+PBG1xxiHDXPk+kYs1BzbAytVRg611vKhCejHntMSD3cD4vCg4NW5oNEtCktNRBYcnQICdgLElAX/koQ== +"@abp/core@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.3.3.tgz#f87e8de30d0e496eebc6ba4db8ffb2a33ef5b591" + integrity sha512-P/B81S+8jkcRv+QsqczWJq9pk0hQk42mg8bpCnlUif9zyUSq2wsWNwulwC5HJAauLf3UvIcOrarpK8T1X/4cVw== dependencies: - "@abp/utils" "~9.3.2" + "@abp/utils" "~9.3.3" -"@abp/datatables.net-bs5@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.2.tgz#89a3664c2ee0e98b16a41894f04f12edcf7b7780" - integrity sha512-llju5jfVIppot59cQ4cBGJdl9VA156mDI5V+h5ZHGBmVvwG79R/mUd3D49XmqQGBke95K1Z49R7V/JxYqa6F+Q== +"@abp/datatables.net-bs5@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.3.3.tgz#12e4011edb151bd8ce8e38f4f83b84062087dbe6" + integrity sha512-+Dn0njWJXdr0g/gMS89njzEHvP4oScUdROZaT40CvFxssN3lIkD3+AYi4QPv+onPGKZQ6D9+K+T1yk9/mrwzDA== dependencies: - "@abp/datatables.net" "~9.3.2" + "@abp/datatables.net" "~9.3.3" datatables.net-bs5 "^2.1.8" -"@abp/datatables.net@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.2.tgz#ee5cd8cb286211404d50593b33ea532f1b7cb9f1" - integrity sha512-JK6XgZeP2diBOnC9jSml0kYc1uvbU09yz4GOyPmh/QZiGdS4vonRKfjIXdFd0YbxK0qAPZO+MzZuwqvZSA6nyA== +"@abp/datatables.net@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.3.3.tgz#ac5281b921e152ae07d73a0061856f4598d33acf" + integrity sha512-4q4gKK3W3x6xXgvj+BYuXMZjSOgU4yecbLvQZkYGvoXk2KJ8PvQUz1ay5W2mJJmX0cvYvIX7ni5uhnEFdKxmZQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" datatables.net "^2.1.8" -"@abp/font-awesome@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.2.tgz#b0659aeec243a4fe3c851a98a79673292c2687b1" - integrity sha512-7esRWpT7PFMPSVhGPKb3DGq1h5n/R2xmusurbGDGhTHckiOfna8tQerZ6A9YdRsM2kIIDisWbuSzBkoM8hqfCQ== +"@abp/font-awesome@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.3.3.tgz#d9727d6652f419ca0f876a02932d226fa7a39370" + integrity sha512-n8XvR9Xr2u6yH2QEQpiu2RU3Br3hNx+ItSQ0ncp81wjYhR007NbOJvjDoQJFiuzgPKZdPNDbPbiiBv9L0oIgAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" "@fortawesome/fontawesome-free" "^6.6.0" -"@abp/jquery-form@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.2.tgz#17d0fe0a81d61e2e96131379e82872e5e45a2d5b" - integrity sha512-IwXWBRbtLhdB6/pJwQsWJHqLDHpZfJoA6x48A/GbTQLgWhpt0/OainDZsEUH3o0TWMhgJU+tp274uPENlG3DzQ== +"@abp/jquery-form@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.3.3.tgz#37d7e1c16b932e439e2127844991496b6557c094" + integrity sha512-B8uDWM13O+fB/TAN7xfMskLC0Qq8327waqpuctiulALz7uM4Ri1txANMp4+ftf25dxMeii/J4k6BSGer8K520Q== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.2.tgz#f13183ed7108cdea1500f18b1f80aff3037132ce" - integrity sha512-0v0Rhj3bir91cqwhlxDuD0PqwEYceyqLYf6K5eFF1/nE+1wN1VIST/oLN1Xis9x4NswbnnKai+OST0fqagpuhg== +"@abp/jquery-validation-unobtrusive@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.3.3.tgz#3882d15076fcf4ef6a197648c84b9edd91435235" + integrity sha512-csWL1+h/aRkU71uoxsKCuGZU9zloPdY6WB1uSBCFDTJ4aBy6gkdtAZGwsXHsJZ4AiHwL+d22P9XVSF1MhKB+MQ== dependencies: - "@abp/jquery-validation" "~9.3.2" + "@abp/jquery-validation" "~9.3.3" jquery-validation-unobtrusive "^4.0.0" -"@abp/jquery-validation@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.2.tgz#8ec072e2babb5d75aa1088a3754b837b7387df76" - integrity sha512-JCquJcN0FAF+8TQOYgbqeDZqPIwy2mWVDtHKCts2lVj8ol+sQgWCOhZDx11sl1oqVZjkvdOmKMgWHDztdoUojA== +"@abp/jquery-validation@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.3.3.tgz#daea2a288e8c440051af21ebf519f7e40b4d27d3" + integrity sha512-nU6a04fiaZuHXRnV+J++AwcyZOxEvW6i4yqm2PzFT9OCbDk1E3X5S1ntO7sGlCcppxj0pSp3uL2Jxq5d4gq+qg== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" jquery-validation "^1.21.0" -"@abp/jquery@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.2.tgz#edb3d65bdbd3885af72759ce0cd9d813ab41aade" - integrity sha512-i4scUZt6q09jhl8YTtQrPg+GV5Vd1QW57hHesYmgor8pLD87JU7cc5sCEJlmmtzVZsXjDkVuiyD2sOUXSItxMw== +"@abp/jquery@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.3.3.tgz#5c3ab4dfa820d9f2eb19fecc65194f0211d5bf37" + integrity sha512-5Nfw287+JugPCnm/KK8fjT4e5zHiwnL8w9OSAHVmf9UBcuJ2yBc+b8mklqy5pLt+jObouE5wJUOtENxgkgSkAw== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" jquery "~3.7.1" -"@abp/lodash@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.2.tgz#d3ca624dd8927d33cf8728403ef591977b9e11f4" - integrity sha512-4XOhLKa/reKB85DyHtz1obC96j2VJs9+xqlO8Pn58hXP396cMEMuC1MfjHMwhPuMVHwgffg0UCfukKKf/UGJ/w== +"@abp/lodash@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.3.3.tgz#a60a41088288da41fa61b09cd747f1fde3c3ec40" + integrity sha512-GsAJPMGNHZcVHQWJMCEQ7oWSeRwmHx0n2oWLQOQoyFQu1itZeJy2dFE+nSIb2jAQ7sfKZVNw7OrEqN/VqgEoUg== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" lodash "^4.17.21" -"@abp/luxon@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.2.tgz#806464e828adf6b99a9620f3c39a16f8621ecd84" - integrity sha512-oP74Q9/FJ8QpB7yVOycFlfsGhPKFUk6NTnoT+cVRNg0wpUkRRjg5WTkZeKLoVxKNk9RwA/9fa6MnBiiNs2z/Pg== +"@abp/luxon@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.3.3.tgz#5742a90953bf0b24fa129f5a6a4c32dbdc134553" + integrity sha512-+AqTiMhN8Z8Khmv/9aBPwasNVcboJa9BV3WdJ5Nccwo2OEN7Wycw6TkRnb42fbUpzXAvxvwv9cSDHjRBib299A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" luxon "^3.5.0" -"@abp/malihu-custom-scrollbar-plugin@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.2.tgz#71069a6abd8a9456f0fc6227ee17b93300ad6030" - integrity sha512-6pFO68hvtbGiGTaxkzTPnzJA2NZkzE+acWlTfBvSVyMvZM1jER5wYJmDpflZO+WPtTTu9CUflTwvYw2TiNKlUg== +"@abp/malihu-custom-scrollbar-plugin@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.3.3.tgz#93a649bb621a47fb50b9b776fb864a07ccdff287" + integrity sha512-w83FD8mqGkhvoAEu0DwzcrmX1wwyKwVRkvfYmxjhokD7+Hq1FyuFDMO51F8hh590I2wzWCX8NvAVUP24viOY+A== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/moment@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.2.tgz#150548dd2b817d586f87113abb40c85f9b1ab406" - integrity sha512-TdHeqPPEPk00/5vKbGHY6D74XlzfRM2Kb4WVvykVx2gjzScp5Sfunpus/A9UCOYls/bWp1MVMT7V0ExBXYPyNg== +"@abp/moment@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.3.3.tgz#622c424350620e0215a0a04059dfd3e18022fd69" + integrity sha512-m/xV11aWOZKTVVyGsX2mZl9ondcP8pWSmjmUKVNLrFSul4pRNgfM2ZeaKiaOLApkyOSZDzCEMUYbEf+dM2/rcg== dependencies: moment "^2.30.1" -"@abp/select2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.2.tgz#5c069ff7a9fcb9e78bd4a8591d1e5eac6d66f03f" - integrity sha512-/N5bJjyLQnN8zPovRrmrcYhiUxG/RTI6kNaH0QW/QEsryfuX24wdDWrRXacsJ1QKlMxig++IHRnpMBrHhxAKUw== +"@abp/select2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.3.3.tgz#8ef9bc3d3674d515d7b7f9060d77831246d03b6a" + integrity sha512-2g8LkLBu1Ooaxj6utYne1gPMYG9888l/mEFMJU5iHOPXS0vz4lANw+VjtawapFtP6yRSiD2/qJtOt0C5rQq1yA== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" select2 "^4.0.13" -"@abp/sweetalert2@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.2.tgz#1ada87b720faef1289aa5fdcf42c0f5c74ff4493" - integrity sha512-PUNbt7O6reTqDelUBGryullFDD5XeZkgQFn/FXbZVp6y0owHUyIlX+Jr7PIesWEB/RHuLa+uZoSywtVPH7fsEw== +"@abp/sweetalert2@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.3.3.tgz#b9d6075d9ede12509f27576f88d54f21598f37df" + integrity sha512-CeX5IWwxAu9M4jqNZBK6o59sVoDuFgxnffhHTMEP7pt8WzH+2uucxGe/21gXT/PW1c3EjSwP3Ri2MhtKOFZuyQ== dependencies: - "@abp/core" "~9.3.2" + "@abp/core" "~9.3.3" sweetalert2 "^11.14.1" -"@abp/timeago@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.2.tgz#fe4d184aed92dd265e3c9531c53bdc684abb3b52" - integrity sha512-GLimaRixGtZ5oiH3JLEmeUe54gePdSfVZtyJOvGcc0wQjQVOa5JgyTqktszb+pF4QVdeJr+ijz6RZlavwIY0EA== +"@abp/timeago@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.3.3.tgz#b116a7112c1d53588129587d5572dc0ae55567a5" + integrity sha512-L0X0yc8oS36eDx+8jvzreW4Cr4TnWESMceXihfOfuWbuOm4R58W4Cvx2/74XFiX/0if1WEg31P4Aj3LhpjgEaQ== dependencies: - "@abp/jquery" "~9.3.2" + "@abp/jquery" "~9.3.3" timeago "^1.6.7" -"@abp/utils@~9.3.2": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.2.tgz#f2158e9858c8efcbd3f17bf6e79c41116ac66795" - integrity sha512-DtD07VHsDS5KPfn3jnL6f9WsfXEJVv7xUF+NcgW+HBTHnJTxunnE/OYGf/clTM4xeDb+RWl3AoGYP+kF4H/Snw== +"@abp/utils@~9.3.3": + version "9.3.3" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.3.3.tgz#e8cda12eb1f7432787072c2d5fe9905b7613e2ec" + integrity sha512-X1q9hod+Z6x/QypixI8BVvnMOqncQXM/Vs2Kq2p0jJJsNoerOFqGr+qLqZ5x3e5CoSz0H/38VjaG1yxIoq2exA== dependencies: just-compare "^2.3.0" diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor index e6accb0918..ad571fb448 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor @@ -13,20 +13,19 @@ - - - -

+ + @if (!string.IsNullOrEmpty(SelectedGroup)) + { + + @foreach (var group in SettingComponentCreationContext.Groups) { @group.DisplayName } -
- - -
+ + @foreach (var group in SettingComponentCreationContext.Groups) { @@ -41,8 +40,8 @@ @SettingItemRenders.Last() } -
-
- + + + } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs index 123ff940c5..1b443fc827 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs @@ -43,23 +43,12 @@ public partial class SettingManagement SettingComponentCreationContext.Normalize(); SettingItemRenders.Clear(); - if (SettingComponentCreationContext.Groups.Any()) + if(SelectedGroup.IsNullOrEmpty() && SettingComponentCreationContext.Groups.Any()) { SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id); } } - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - await Task.Yield(); - await InvokeAsync(StateHasChanged); - } - - await base.OnAfterRenderAsync(firstRender); - } - protected virtual string GetNormalizedString(string value) { return value.Replace('.', '_'); diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs index 4e892abded..6f11da24e5 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/SettingManagementStore.cs @@ -176,9 +176,10 @@ public class SettingManagementStore : ISettingManagementStore, ITransientDepende string providerKey, List notCacheKeys) { - var settingDefinitions = (await SettingDefinitionManager.GetAllAsync()).Where(x => notCacheKeys.Any(k => GetSettingNameFormCacheKeyOrNull(k) == x.Name)); + var settingNames = new HashSet(notCacheKeys.Select(GetSettingNameFormCacheKeyOrNull)); + var settingDefinitions = (await SettingDefinitionManager.GetAllAsync()).Where(x => settingNames.Contains(x.Name)); - var settingsDictionary = (await SettingRepository.GetListAsync(notCacheKeys.Select(GetSettingNameFormCacheKeyOrNull).ToArray(), providerName, providerKey)) + var settingsDictionary = (await SettingRepository.GetListAsync(settingNames.ToArray(), providerName, providerKey)) .ToDictionary(s => s.Name, s => s.Value); var cacheItems = new List>(); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationAutoMapperProfile.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationAutoMapperProfile.cs deleted file mode 100644 index e7db0c19b9..0000000000 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,12 +0,0 @@ -using AutoMapper; - -namespace Volo.Abp.TenantManagement; - -public class AbpTenantManagementApplicationAutoMapperProfile : Profile -{ - public AbpTenantManagementApplicationAutoMapperProfile() - { - CreateMap() - .MapExtraProperties(); - } -} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationMapperlyMappers.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationMapperlyMappers.cs new file mode 100644 index 0000000000..c3f44f2129 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationMapperlyMappers.cs @@ -0,0 +1,13 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace Volo.Abp.TenantManagement.Application.Volo.Abp.TenantManagement; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +[MapExtraProperties] +public partial class TenantToTenantDtoMapper + : MapperBase +{ + public override partial TenantDto Map(Tenant source); + public override partial void Map(Tenant source, TenantDto destination); +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs index 2583c06458..4f51d28f82 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application/Volo/Abp/TenantManagement/AbpTenantManagementApplicationModule.cs @@ -1,6 +1,5 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Application; -using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; namespace Volo.Abp.TenantManagement; @@ -12,10 +11,6 @@ public class AbpTenantManagementApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs deleted file mode 100644 index 28ad6e9b8a..0000000000 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs +++ /dev/null @@ -1,12 +0,0 @@ -using AutoMapper; - -namespace Volo.Abp.TenantManagement.Blazor; - -public class AbpTenantManagementBlazorAutoMapperProfile : Profile -{ - public AbpTenantManagementBlazorAutoMapperProfile() - { - CreateMap() - .MapExtraProperties(); - } -} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorMapperlyMappers.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorMapperlyMappers.cs new file mode 100644 index 0000000000..7b8ea2a5bf --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorMapperlyMappers.cs @@ -0,0 +1,16 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace Volo.Abp.TenantManagement.Blazor; + +[Mapper] +[MapExtraProperties] +public partial class TenantDtoToTenantUpdateDtoMapper + : MapperBase +{ + [MapperIgnoreSource(nameof(TenantDto.Id))] + public override partial TenantUpdateDto Map(TenantDto source); + + [MapperIgnoreSource(nameof(TenantDto.Id))] + public override partial void Map(TenantDto source, TenantUpdateDto destination); +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs index 0433f2e33b..0263106b43 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs @@ -1,7 +1,7 @@ using Localization.Resources.AbpUi; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.FeatureManagement.Blazor; using Volo.Abp.FeatureManagement.Localization; using Volo.Abp.Localization; @@ -16,7 +16,7 @@ using Volo.Abp.UI.Navigation; namespace Volo.Abp.TenantManagement.Blazor; [DependsOn( - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpTenantManagementApplicationContractsModule), typeof(AbpFeatureManagementBlazorModule) )] @@ -26,12 +26,7 @@ public class AbpTenantManagementBlazorModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); Configure(options => { diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj index fd4cf71255..183c54dae9 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj @@ -8,7 +8,7 @@ - + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj index 2723e25760..ecc9006bb2 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo.Abp.TenantManagement.Domain.csproj @@ -17,7 +17,7 @@ - + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainMapperlyMappers.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainMapperlyMappers.cs new file mode 100644 index 0000000000..29ae9f21fe --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainMapperlyMappers.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using Riok.Mapperly.Abstractions; +using Volo.Abp.Data; +using Volo.Abp.Mapperly; +using Volo.Abp.MultiTenancy; + +namespace Volo.Abp.TenantManagement.Domain.Volo.Abp.TenantManagement; + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TenantToTenantConfigurationMapper + : MapperBase +{ + [MapperIgnoreTarget(nameof(TenantConfiguration.EditionId))] + [MapperIgnoreTarget(nameof(TenantConfiguration.IsActive))] + public override partial TenantConfiguration Map(Tenant source); + + [MapperIgnoreTarget(nameof(TenantConfiguration.EditionId))] + [MapperIgnoreTarget(nameof(TenantConfiguration.IsActive))] + public override partial void Map(Tenant source, TenantConfiguration destination); + + protected virtual ConnectionStrings Map(List source) + { + var connStrings = new ConnectionStrings(); + + if (source == null) + { + return connStrings; + } + + foreach (var connectionString in source) + { + connStrings[connectionString.Name] = connectionString.Value; + } + + return connStrings; + } +} + +[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)] +public partial class TenantToTenantEtoMapper + : MapperBase +{ + public override partial TenantEto Map(Tenant source); + + public override partial void Map(Tenant source, TenantEto destination); +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainMappingProfile.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainMappingProfile.cs deleted file mode 100644 index 6fe1edafc6..0000000000 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainMappingProfile.cs +++ /dev/null @@ -1,36 +0,0 @@ -using AutoMapper; -using Volo.Abp.Data; -using Volo.Abp.MultiTenancy; - -namespace Volo.Abp.TenantManagement; - -public class AbpTenantManagementDomainMappingProfile : Profile -{ - public AbpTenantManagementDomainMappingProfile() - { - CreateMap() - .ForMember(ti => ti.ConnectionStrings, opts => - { - opts.MapFrom((tenant, ti) => - { - var connStrings = new ConnectionStrings(); - - if (tenant.ConnectionStrings == null) - { - return connStrings; - } - - foreach (var connectionString in tenant.ConnectionStrings) - { - connStrings[connectionString.Name] = connectionString.Value; - } - - return connStrings; - }); - }) - .ForMember(x => x.IsActive, x => x.Ignore()) - .ForMember(x => x.EditionId, x => x.Ignore()); - - CreateMap(); - } -} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs index 6bd09809e4..afce2e0809 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/AbpTenantManagementDomainModule.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Data; using Volo.Abp.Domain; @@ -16,7 +16,7 @@ namespace Volo.Abp.TenantManagement; [DependsOn(typeof(AbpTenantManagementDomainSharedModule))] [DependsOn(typeof(AbpDataModule))] [DependsOn(typeof(AbpDddDomainModule))] -[DependsOn(typeof(AbpAutoMapperModule))] +[DependsOn(typeof(AbpMapperlyModule))] [DependsOn(typeof(AbpCachingModule))] public class AbpTenantManagementDomainModule : AbpModule { @@ -24,12 +24,7 @@ public class AbpTenantManagementDomainModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); Configure(options => { diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebAutoMapperProfile.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebAutoMapperProfile.cs deleted file mode 100644 index 4730033e60..0000000000 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebAutoMapperProfile.cs +++ /dev/null @@ -1,22 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants; - -namespace Volo.Abp.TenantManagement.Web; - -public class AbpTenantManagementWebAutoMapperProfile : Profile -{ - public AbpTenantManagementWebAutoMapperProfile() - { - //List - CreateMap(); - - //CreateModal - CreateMap() - .MapExtraProperties(); - - //EditModal - CreateMap() - .MapExtraProperties(); - } -} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebMapperlyMappers.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebMapperlyMappers.cs new file mode 100644 index 0000000000..d729809010 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebMapperlyMappers.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Riok.Mapperly.Abstractions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Mapperly; +using Volo.Abp.TenantManagement.Web.Pages.TenantManagement.Tenants; + +namespace Volo.Abp.TenantManagement.Web; + +[Mapper] +[MapExtraProperties] +public partial class TenantDtoToTenantInfoModelMapper + : MapperBase +{ + public override partial EditModalModel.TenantInfoModel Map(TenantDto source); + + public override partial void Map(TenantDto source, EditModalModel.TenantInfoModel destination); +} + +[Mapper] +[MapExtraProperties] +public partial class CreateTenantInfoModelToTenantCreateDtoMapper + : TwoWayMapperBase +{ + public override partial TenantCreateDto Map(CreateModalModel.TenantInfoModel source); + + public override partial void Map(CreateModalModel.TenantInfoModel source, TenantCreateDto destination); + + public override partial CreateModalModel.TenantInfoModel ReverseMap(TenantCreateDto source); + + public override partial void ReverseMap(TenantCreateDto source, CreateModalModel.TenantInfoModel destination); +} + +[Mapper] +[MapExtraProperties] +public partial class TenantInfoModelToTenantUpdateDtoMapper + : MapperBase +{ + [MapperIgnoreSource(nameof(EditModalModel.TenantInfoModel.Id))] + [MapperIgnoreSource(nameof(EditModalModel.TenantInfoModel.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(TenantUpdateDto.ConcurrencyStamp))] + public override partial TenantUpdateDto Map(EditModalModel.TenantInfoModel source); + + [MapperIgnoreSource(nameof(EditModalModel.TenantInfoModel.Id))] + [MapperIgnoreSource(nameof(EditModalModel.TenantInfoModel.ConcurrencyStamp))] + [MapperIgnoreTarget(nameof(TenantUpdateDto.ConcurrencyStamp))] + public override partial void Map(EditModalModel.TenantInfoModel source, TenantUpdateDto destination); +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs index b3a63fb8ae..90dc1df3d6 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/AbpTenantManagementWebModule.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.PageToolbars; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.FeatureManagement; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Localization; @@ -21,7 +21,7 @@ namespace Volo.Abp.TenantManagement.Web; [DependsOn(typeof(AbpTenantManagementApplicationContractsModule))] [DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))] [DependsOn(typeof(AbpFeatureManagementWebModule))] -[DependsOn(typeof(AbpAutoMapperModule))] +[DependsOn(typeof(AbpMapperlyModule))] public class AbpTenantManagementWebModule : AbpModule { private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); @@ -41,6 +41,8 @@ public class AbpTenantManagementWebModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddMapperlyObjectMapper(); + Configure(options => { options.MenuContributors.Add(new AbpTenantManagementWebMainMenuContributor()); @@ -51,12 +53,6 @@ public class AbpTenantManagementWebModule : AbpModule options.FileSets.AddEmbedded(); }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - Configure(options => { options.Conventions.AuthorizePage("/TenantManagement/Tenants/Index", TenantManagementPermissions.Tenants.Default); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj index 9afa70ba15..a471bee493 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj @@ -35,7 +35,7 @@ - + diff --git a/modules/virtual-file-explorer/app/DemoApp.csproj b/modules/virtual-file-explorer/app/DemoApp.csproj index 47a4555bac..4f35545d60 100644 --- a/modules/virtual-file-explorer/app/DemoApp.csproj +++ b/modules/virtual-file-explorer/app/DemoApp.csproj @@ -13,7 +13,7 @@ - + diff --git a/modules/virtual-file-explorer/app/DemoAppModule.cs b/modules/virtual-file-explorer/app/DemoAppModule.cs index ae03d3f2ed..4ffbc6c5d5 100644 --- a/modules/virtual-file-explorer/app/DemoAppModule.cs +++ b/modules/virtual-file-explorer/app/DemoAppModule.cs @@ -1,4 +1,4 @@ -using DemoApp.Data; +using DemoApp.Data; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Account; @@ -8,7 +8,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; @@ -32,7 +32,7 @@ namespace DemoApp; // ABP Framework packages typeof(AbpAspNetCoreMvcModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), diff --git a/modules/virtual-file-explorer/app/package.json b/modules/virtual-file-explorer/app/package.json index 248bf04f9e..e51345e5da 100644 --- a/modules/virtual-file-explorer/app/package.json +++ b/modules/virtual-file-explorer/app/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2", - "@abp/virtual-file-explorer": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3", + "@abp/virtual-file-explorer": "~9.3.3" } } diff --git a/npm/lerna.json b/npm/lerna.json index eda8f7144c..1537cb6afb 100644 --- a/npm/lerna.json +++ b/npm/lerna.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "packages": [ "packs/*" ], diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 8006f374a3..5c7c2d6cc2 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -42,8 +42,8 @@ }, "private": true, "devDependencies": { - "@abp/ng.theme.lepton-x": "~4.3.2", - "@abp/utils": "~9.3.2", + "@abp/ng.theme.lepton-x": "~4.3.3", + "@abp/utils": "~9.3.3", "@angular-devkit/build-angular": "~20.0.0", "@angular-devkit/core": "~20.0.0", "@angular-devkit/schematics": "~20.0.0", diff --git a/npm/ng-packs/packages/account-core/package.json b/npm/ng-packs/packages/account-core/package.json index 533ca334ac..a24af65e9e 100644 --- a/npm/ng-packs/packages/account-core/package.json +++ b/npm/ng-packs/packages/account-core/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.account.core", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.core": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.core": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/account/package.json b/npm/ng-packs/packages/account/package.json index 830539bbd7..be91100f77 100644 --- a/npm/ng-packs/packages/account/package.json +++ b/npm/ng-packs/packages/account/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.account", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.account.core": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.account.core": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html index 9555c58f4b..366398e444 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html @@ -7,6 +7,11 @@ (activate)="tableActivate.emit($event)" (select)="onSelect($event)" [selected]="selected" + (scroll)="onScroll($event)" + [scrollbarV]="infiniteScroll" + [style.height]="getTableHeight()" + [loadingIndicator]="infiniteScroll && isLoading" + [footerHeight]="infiniteScroll ? false : 50" > @if(selectable) { @@ -40,8 +45,9 @@ @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) { @@ -59,7 +65,8 @@ @for (prop of propList; track prop.name; let i = $index) { implements OnChanges, AfterViewInit { +export class ExtensibleTableComponent implements OnChanges, AfterViewInit, OnDestroy { readonly #injector = inject(Injector); readonly getInjected = this.#injector.get.bind(this.#injector); protected readonly cdr = inject(ChangeDetectorRef); @@ -97,7 +100,7 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn @Input() recordsTotal!: number; @Input() set actionsColumnWidth(width: number) { - this.setColumnWidths(width ? Number(width) : undefined); + this._actionsColumnWidth.set(width ? Number(width) : undefined); } @Input() actionsTemplate?: TemplateRef; @@ -110,14 +113,18 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn this._selectionType = typeof value === 'string' ? SelectionType[value] : value; } _selectionType: SelectionType = SelectionType.multiClick; - - + @Input() selected: any[] = []; @Output() selectionChange = new EventEmitter(); - hasAtLeastOnePermittedAction: boolean; + // Infinite scroll configuration + @Input() infiniteScroll = false; + @Input() isLoading = false; + @Input() scrollThreshold = 10; + @Output() loadMore = new EventEmitter(); + @Input() tableHeight: number; - readonly columnWidths!: number[]; + hasAtLeastOnePermittedAction: boolean; readonly propList: EntityPropList; @@ -125,6 +132,24 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn readonly trackByFn: TrackByFunction> = (_, item) => item.name; + // Signal for actions column width + private readonly _actionsColumnWidth = signal(DEFAULT_ACTIONS_COLUMN_WIDTH); + + // Infinite scroll: debounced load more subject + private readonly loadMoreSubject = new Subject(); + private readonly loadMoreSubscription = this.loadMoreSubject + .pipe(debounceTime(100), distinctUntilChanged()) + .subscribe(() => this.triggerLoadMore()); + + readonly columnWidths = computed(() => { + const actionsColumn = this._actionsColumnWidth(); + const widths = [actionsColumn]; + this.propList.forEach(({ value: prop }) => { + widths.push(prop.columnWidth); + }); + return widths; + }); + constructor() { const extensions = this.#injector.get(ExtensionsService); const name = this.#injector.get(EXTENSIONS_IDENTIFIER); @@ -136,15 +161,6 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn this.permissionService.filterItemsByPolicy( this.actionList.toArray().map(action => ({ requiredPolicy: action.permission })), ).length > 0; - this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH); - } - - private setColumnWidths(actionsColumn: number | undefined) { - const widths = [actionsColumn]; - this.propList.forEach(({ value: prop }) => { - widths.push(prop.columnWidth); - }); - (this.columnWidths as any) = widths; } private getIcon(value: boolean) { @@ -242,10 +258,50 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn this.selectionChange.emit(selected); } + onScroll(scrollEvent: Event): void { + if (!this.shouldHandleScroll()) { + return; + } + + const target = scrollEvent.target as HTMLElement; + if (!target) { + return; + } + + if (this.isNearScrollBottom(target)) { + this.loadMoreSubject.next(); + } + } + + private shouldHandleScroll(): boolean { + return this.infiniteScroll && !this.isLoading; + } + + private isNearScrollBottom(element: HTMLElement): boolean { + const { offsetHeight, scrollTop, scrollHeight } = element; + return offsetHeight + scrollTop >= scrollHeight - this.scrollThreshold; + } + + private triggerLoadMore(): void { + this.loadMore.emit(); + } + + getTableHeight() { + if (!this.infiniteScroll) return 'auto'; + + return this.tableHeight ? `${this.tableHeight}px` : 'auto'; + } + ngAfterViewInit(): void { - this.list?.requestStatus$?.pipe(filter(status => status === 'loading')).subscribe(() => { + if (!this.infiniteScroll) { + this.list?.requestStatus$?.pipe(filter(status => status === 'loading')).subscribe(() => { this.data = []; this.cdr.markForCheck(); }); + } + } + + ngOnDestroy(): void { + this.loadMoreSubscription.unsubscribe(); } } diff --git a/npm/ng-packs/packages/components/package.json b/npm/ng-packs/packages/components/package.json index b52f7830c7..d93d558aef 100644 --- a/npm/ng-packs/packages/components/package.json +++ b/npm/ng-packs/packages/components/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.components", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "peerDependencies": { - "@abp/ng.core": ">=9.3.2", - "@abp/ng.theme.shared": ">=9.3.2" + "@abp/ng.core": ">=9.3.3", + "@abp/ng.theme.shared": ">=9.3.3" }, "dependencies": { "chart.js": "^3.5.1", diff --git a/npm/ng-packs/packages/core/package.json b/npm/ng-packs/packages/core/package.json index fd3db6eafa..ca0c74fee4 100644 --- a/npm/ng-packs/packages/core/package.json +++ b/npm/ng-packs/packages/core/package.json @@ -1,13 +1,13 @@ { "name": "@abp/ng.core", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/utils": "~9.3.2", + "@abp/utils": "~9.3.3", "just-clone": "^6.0.0", "just-compare": "^2.0.0", "ts-toolbelt": "^9.0.0", diff --git a/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts b/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts index c53817264b..7dca0cd388 100644 --- a/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts +++ b/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts @@ -1,4 +1,4 @@ -import { Component, inject, isDevMode, OnInit, Type } from '@angular/core'; +import { Component, inject, isDevMode, Type } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { eLayoutType } from '../enums/common'; import { ABP } from '../models'; @@ -13,6 +13,7 @@ import { TreeNode } from '../utils/tree-utils'; import { DYNAMIC_LAYOUTS_TOKEN } from '../tokens/dynamic-layout.token'; import { EnvironmentService } from '../services'; import { NgComponentOutlet } from '@angular/common'; +import { filter, take } from 'rxjs'; @Component({ selector: 'abp-dynamic-layout', @@ -24,7 +25,7 @@ import { NgComponentOutlet } from '@angular/common'; providers: [SubscriptionService], imports: [NgComponentOutlet], }) -export class DynamicLayoutComponent implements OnInit { +export class DynamicLayoutComponent { layout?: Type; layoutKey?: eLayoutType; readonly layouts = inject(DYNAMIC_LAYOUTS_TOKEN); @@ -40,7 +41,7 @@ export class DynamicLayoutComponent implements OnInit { protected readonly environment = inject(EnvironmentService); constructor() { - const dynamicLayoutComponent = inject(DynamicLayoutComponent, { optional: true, skipSelf: true })!; + const dynamicLayoutComponent = inject(DynamicLayoutComponent, { optional: true, skipSelf: true }); if (dynamicLayoutComponent) { if (isDevMode()) console.warn('DynamicLayoutComponent must be used only in AppComponent.'); @@ -48,17 +49,7 @@ export class DynamicLayoutComponent implements OnInit { } this.checkLayoutOnNavigationEnd(); this.listenToLanguageChange(); - } - - ngOnInit(): void { - if (this.layout) { - return; - } - - const { oAuthConfig } = this.environment.getEnvironment(); - if (oAuthConfig.responseType === 'code') { - this.getLayout(); - } + this.listenToEnvironmentChange(); } private checkLayoutOnNavigationEnd() { @@ -120,4 +111,19 @@ export class DynamicLayoutComponent implements OnInit { private getComponent(key: string): ReplaceableComponents.ReplaceableComponent | undefined { return this.replaceableComponents.get(key); } + + private listenToEnvironmentChange() { + this.environment + .createOnUpdateStream(x => x.oAuthConfig) + .pipe( + take(1), + filter(config => config.responseType === 'code'), + ) + .subscribe(() => { + if (this.layout) { + return; + } + this.getLayout(); + }); + } } diff --git a/npm/ng-packs/packages/feature-management/package.json b/npm/ng-packs/packages/feature-management/package.json index cb7d451359..70d4587a72 100644 --- a/npm/ng-packs/packages/feature-management/package.json +++ b/npm/ng-packs/packages/feature-management/package.json @@ -1,13 +1,13 @@ { "name": "@abp/ng.feature-management", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/generators/package.json b/npm/ng-packs/packages/generators/package.json index 62a254f0b7..aa6c822161 100644 --- a/npm/ng-packs/packages/generators/package.json +++ b/npm/ng-packs/packages/generators/package.json @@ -1,6 +1,6 @@ { "name": "@abp/nx.generators", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "generators": "./generators.json", "type": "commonjs", diff --git a/npm/ng-packs/packages/identity/package.json b/npm/ng-packs/packages/identity/package.json index ad0ec9610d..87562d6dc5 100644 --- a/npm/ng-packs/packages/identity/package.json +++ b/npm/ng-packs/packages/identity/package.json @@ -1,15 +1,15 @@ { "name": "@abp/ng.identity", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.components": "~9.3.2", - "@abp/ng.permission-management": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.components": "~9.3.3", + "@abp/ng.permission-management": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/oauth/package.json b/npm/ng-packs/packages/oauth/package.json index 7a8a2dae8b..1cabe81905 100644 --- a/npm/ng-packs/packages/oauth/package.json +++ b/npm/ng-packs/packages/oauth/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.oauth", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.core": "~9.3.2", - "@abp/utils": "~9.3.2", + "@abp/ng.core": "~9.3.3", + "@abp/utils": "~9.3.3", "angular-oauth2-oidc": "^20.0.0", "just-clone": "^6.0.0", "just-compare": "^2.0.0", diff --git a/npm/ng-packs/packages/permission-management/package.json b/npm/ng-packs/packages/permission-management/package.json index 368c1d10bf..f46fefaceb 100644 --- a/npm/ng-packs/packages/permission-management/package.json +++ b/npm/ng-packs/packages/permission-management/package.json @@ -1,13 +1,13 @@ { "name": "@abp/ng.permission-management", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/schematics/package.json b/npm/ng-packs/packages/schematics/package.json index 3593ddbaca..1cc6932f3c 100644 --- a/npm/ng-packs/packages/schematics/package.json +++ b/npm/ng-packs/packages/schematics/package.json @@ -1,6 +1,6 @@ { "name": "@abp/ng.schematics", - "version": "9.3.2", + "version": "9.3.3", "author": "", "schematics": "./collection.json", "dependencies": { diff --git a/npm/ng-packs/packages/schematics/src/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template b/npm/ng-packs/packages/schematics/src/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template index 8b0c343173..c445286162 100644 --- a/npm/ng-packs/packages/schematics/src/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template +++ b/npm/ng-packs/packages/schematics/src/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template @@ -21,7 +21,11 @@ export class <%= name %>Service { if (isBlob) { %> responseType: 'blob',<% } %> url: <%= body.url %>,<% - if (body.params.length) { %> + if (body.dictParamVar && !body.params.length) { %> + params: <%= body.dictParamVar %>,<% } %><% + if (body.dictParamVar && body.params.length) { %> + params: { ...<%= body.dictParamVar %>, <%= body.params.join(', ') %> },<% } %><% + if (!body.dictParamVar && body.params.length) { %> params: { <%= body.params.join(', ') %> },<% } if (body.body) { %> body: <%= body.body %>,<% } %> diff --git a/npm/ng-packs/packages/schematics/src/models/method.ts b/npm/ng-packs/packages/schematics/src/models/method.ts index 043df6d458..404fa9d233 100644 --- a/npm/ng-packs/packages/schematics/src/models/method.ts +++ b/npm/ng-packs/packages/schematics/src/models/method.ts @@ -1,11 +1,12 @@ import { eBindingSourceId, eMethodModifier } from '../enums'; import { camel, camelizeHyphen } from '../utils/text'; -import { getParamName, getParamValueName } from '../utils/methods'; +import { getParamName, getParamValueName, isDictionaryType } from '../utils/methods'; import { ParameterInBody } from './api-definition'; import { Property } from './model'; import { Omissible } from './util'; import { VOLO_REMOTE_STREAM_CONTENT } from '../constants'; // eslint-disable-next-line @typescript-eslint/no-var-requires + const shouldQuote = require('should-quote'); export class Method { @@ -40,6 +41,7 @@ export class Body { body?: string; method: string; params: string[] = []; + dictParamVar?: string; responseTypeWithNamespace: string; requestType = 'any'; responseType: string; @@ -57,6 +59,10 @@ export class Body { switch (bindingSourceId) { case eBindingSourceId.Model: case eBindingSourceId.Query: + if (isDictionaryType(param.type, param.typeSimple)) { + this.dictParamVar = value; + break; + } this.params.push(paramName === value ? value : `${getParamName(paramName)}: ${value}`); break; case eBindingSourceId.FormFile: diff --git a/npm/ng-packs/packages/schematics/src/utils/methods.ts b/npm/ng-packs/packages/schematics/src/utils/methods.ts index 6767adf540..d3fc935819 100644 --- a/npm/ng-packs/packages/schematics/src/utils/methods.ts +++ b/npm/ng-packs/packages/schematics/src/utils/methods.ts @@ -1,11 +1,9 @@ import { camel } from './text'; -// eslint-disable-next-line @typescript-eslint/no-var-requires const shouldQuote = require('should-quote'); export const getParamName = (paramName: string) => shouldQuote(paramName) ? `["${paramName}"]` : paramName; -// check dot exists in param name and camelize access continuously export const getParamValueName = (paramName: string, descriptorName: string) => { if (paramName.includes('.')) { const splitted = paramName.split('.'); @@ -17,3 +15,8 @@ export const getParamValueName = (paramName: string, descriptorName: string) => } return `${descriptorName}.${paramName}`; }; + +export function isDictionaryType(type?: string, typeSimple?: string): boolean { + const haystacks = [type || '', typeSimple || '']; + return haystacks.some(t => /(^|\b)(System\.Collections\.Generic\.)?(I)?Dictionary\s* f.startsWith(SAAS_NAMESPACE)).length > 0; - if (isTenant && isSaasDto) { + if (isTenant && isSaasDto && !prop.type.startsWith('Saas')) { prop.type = 'Saas' + prop.type; } } diff --git a/npm/ng-packs/packages/schematics/src/utils/service.ts b/npm/ng-packs/packages/schematics/src/utils/service.ts index 1280aa3aef..53eaa1d501 100644 --- a/npm/ng-packs/packages/schematics/src/utils/service.ts +++ b/npm/ng-packs/packages/schematics/src/utils/service.ts @@ -124,7 +124,7 @@ export function createActionToSignatureMapper() { } let type = adaptType(p.typeSimple); - if (p.typeSimple === 'enum' || p.typeSimple === '[enum]') { + if (p.typeSimple === 'enum' || p.typeSimple === '[enum]' || p.typeSimple === 'enum?' || p.typeSimple === '[enum]?') { type = adaptType(p.type); } diff --git a/npm/ng-packs/packages/setting-management/package.json b/npm/ng-packs/packages/setting-management/package.json index 3123b24bc2..8245bc940c 100644 --- a/npm/ng-packs/packages/setting-management/package.json +++ b/npm/ng-packs/packages/setting-management/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.setting-management", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.components": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.components": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/tenant-management/package.json b/npm/ng-packs/packages/tenant-management/package.json index 185e677a0e..755948f49d 100644 --- a/npm/ng-packs/packages/tenant-management/package.json +++ b/npm/ng-packs/packages/tenant-management/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.tenant-management", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.feature-management": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.feature-management": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/theme-basic/package.json b/npm/ng-packs/packages/theme-basic/package.json index 132d7916be..0b222f3278 100644 --- a/npm/ng-packs/packages/theme-basic/package.json +++ b/npm/ng-packs/packages/theme-basic/package.json @@ -1,14 +1,14 @@ { "name": "@abp/ng.theme.basic", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.account.core": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.account.core": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts b/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts index d19776424f..5d4e745ce9 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/constants/styles.ts @@ -151,4 +151,15 @@ background-color: rgba(0, 0, 0, 0.6); .abp-md-form { max-width: 540px; } + +.ngx-datatable.material:has(.datatable-body-row) .datatable-footer { + border-top: none; +} + +.ngx-datatable.material:not(:has(.datatable-body-row)) .datatable-footer { + border-top: 1px solid #dee2e6; +} + `; + + diff --git a/npm/ng-packs/packages/theme-shared/package.json b/npm/ng-packs/packages/theme-shared/package.json index 5015810221..c2e8f3b5c5 100644 --- a/npm/ng-packs/packages/theme-shared/package.json +++ b/npm/ng-packs/packages/theme-shared/package.json @@ -1,13 +1,13 @@ { "name": "@abp/ng.theme.shared", - "version": "9.3.2", + "version": "9.3.3", "homepage": "https://abp.io", "repository": { "type": "git", "url": "https://github.com/abpframework/abp.git" }, "dependencies": { - "@abp/ng.core": "~9.3.2", + "@abp/ng.core": "~9.3.3", "@fortawesome/fontawesome-free": "^6.0.0", "@ng-bootstrap/ng-bootstrap": "~19.0.0", "@ngx-validate/core": "^0.2.0", diff --git a/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts b/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts index 87ac4b9ce1..0754300b0f 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts @@ -111,10 +111,13 @@ export class NgxDatatableListDirective implements OnChanges, OnInit, DoCheck { const spinnerRef = this.viewContainerRef.createComponent(SpinnerComponent); const spinnerElement = spinnerRef.location.nativeElement; - if (placeholder?.parentNode === parent) { - this.renderer.insertBefore(parent, spinnerElement, placeholder); + + this.renderer.insertBefore(parent, spinnerElement, parent.firstChild); + + const placeholderParent = placeholder?.parentNode as Element | null; + if (placeholderParent) { + this.renderer.removeChild(placeholderParent, placeholder); } - this.renderer.removeChild(parent, placeholder); } protected setInitialValues() { @@ -185,4 +188,4 @@ export class NgxDatatableListDirective implements OnChanges, OnInit, DoCheck { this.setTablePage(maxPage); } } -} +} \ No newline at end of file diff --git a/npm/packs/anchor-js/package.json b/npm/packs/anchor-js/package.json index 5a91e33085..95c53b9256 100644 --- a/npm/packs/anchor-js/package.json +++ b/npm/packs/anchor-js/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/anchor-js", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "anchor-js": "^5.0.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/aspnetcore.components.server.basictheme/package.json b/npm/packs/aspnetcore.components.server.basictheme/package.json index 45459bfd87..4669a13ab9 100644 --- a/npm/packs/aspnetcore.components.server.basictheme/package.json +++ b/npm/packs/aspnetcore.components.server.basictheme/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/aspnetcore.components.server.basictheme", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/aspnetcore.components.server.theming": "~9.3.2" + "@abp/aspnetcore.components.server.theming": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/aspnetcore.components.server.theming/package.json b/npm/packs/aspnetcore.components.server.theming/package.json index c628f7c02c..6ef0c3a3fd 100644 --- a/npm/packs/aspnetcore.components.server.theming/package.json +++ b/npm/packs/aspnetcore.components.server.theming/package.json @@ -1,12 +1,12 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/aspnetcore.components.server.theming", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/bootstrap": "~9.3.2", - "@abp/font-awesome": "~9.3.2" + "@abp/bootstrap": "~9.3.3", + "@abp/font-awesome": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json b/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json index f195d02502..b5d1571142 100644 --- a/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json +++ b/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/aspnetcore.mvc.ui.theme.basic", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json b/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json index 05adc9b35c..5741f908d3 100644 --- a/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json +++ b/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/aspnetcore.mvc.ui.theme.shared", "repository": { "type": "git", @@ -10,21 +10,21 @@ "access": "public" }, "dependencies": { - "@abp/aspnetcore.mvc.ui": "~9.3.2", - "@abp/bootstrap": "~9.3.2", - "@abp/bootstrap-datepicker": "~9.3.2", - "@abp/bootstrap-daterangepicker": "~9.3.2", - "@abp/datatables.net-bs5": "~9.3.2", - "@abp/font-awesome": "~9.3.2", - "@abp/jquery-form": "~9.3.2", - "@abp/jquery-validation-unobtrusive": "~9.3.2", - "@abp/lodash": "~9.3.2", - "@abp/luxon": "~9.3.2", - "@abp/malihu-custom-scrollbar-plugin": "~9.3.2", - "@abp/moment": "~9.3.2", - "@abp/select2": "~9.3.2", - "@abp/sweetalert2": "~9.3.2", - "@abp/timeago": "~9.3.2" + "@abp/aspnetcore.mvc.ui": "~9.3.3", + "@abp/bootstrap": "~9.3.3", + "@abp/bootstrap-datepicker": "~9.3.3", + "@abp/bootstrap-daterangepicker": "~9.3.3", + "@abp/datatables.net-bs5": "~9.3.3", + "@abp/font-awesome": "~9.3.3", + "@abp/jquery-form": "~9.3.3", + "@abp/jquery-validation-unobtrusive": "~9.3.3", + "@abp/lodash": "~9.3.3", + "@abp/luxon": "~9.3.3", + "@abp/malihu-custom-scrollbar-plugin": "~9.3.3", + "@abp/moment": "~9.3.3", + "@abp/select2": "~9.3.3", + "@abp/sweetalert2": "~9.3.3", + "@abp/timeago": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/aspnetcore.mvc.ui/package-lock.json b/npm/packs/aspnetcore.mvc.ui/package-lock.json index b60f37d05c..db6b98090c 100644 --- a/npm/packs/aspnetcore.mvc.ui/package-lock.json +++ b/npm/packs/aspnetcore.mvc.ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "@abp/aspnetcore.mvc.ui", - "version": "9.3.2", + "version": "9.3.3", "lockfileVersion": 1, "requires": true, "packages": { diff --git a/npm/packs/aspnetcore.mvc.ui/package.json b/npm/packs/aspnetcore.mvc.ui/package.json index 66bba515cb..6056aefe1a 100644 --- a/npm/packs/aspnetcore.mvc.ui/package.json +++ b/npm/packs/aspnetcore.mvc.ui/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/aspnetcore.mvc.ui", "repository": { "type": "git", diff --git a/npm/packs/blogging/package.json b/npm/packs/blogging/package.json index b434c79bc8..16988d0c8f 100644 --- a/npm/packs/blogging/package.json +++ b/npm/packs/blogging/package.json @@ -1,14 +1,14 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/blogging", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "~9.3.2", - "@abp/owl.carousel": "~9.3.2", - "@abp/prismjs": "~9.3.2", - "@abp/tui-editor": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.shared": "~9.3.3", + "@abp/owl.carousel": "~9.3.3", + "@abp/prismjs": "~9.3.3", + "@abp/tui-editor": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/bootstrap-datepicker/package.json b/npm/packs/bootstrap-datepicker/package.json index 45ac16193f..c1bb75cdb3 100644 --- a/npm/packs/bootstrap-datepicker/package.json +++ b/npm/packs/bootstrap-datepicker/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/bootstrap-datepicker", "repository": { "type": "git", diff --git a/npm/packs/bootstrap-daterangepicker/package.json b/npm/packs/bootstrap-daterangepicker/package.json index 3fc34e5e8b..20da35308d 100644 --- a/npm/packs/bootstrap-daterangepicker/package.json +++ b/npm/packs/bootstrap-daterangepicker/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/bootstrap-daterangepicker", "repository": { "type": "git", diff --git a/npm/packs/bootstrap/package.json b/npm/packs/bootstrap/package.json index 3ecbb3b611..2a98a31bc2 100644 --- a/npm/packs/bootstrap/package.json +++ b/npm/packs/bootstrap/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/bootstrap", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "bootstrap": "^5.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/chart.js/package.json b/npm/packs/chart.js/package.json index e21459ffa2..df47f12bbd 100644 --- a/npm/packs/chart.js/package.json +++ b/npm/packs/chart.js/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/chart.js", "publishConfig": { "access": "public" diff --git a/npm/packs/clipboard/package.json b/npm/packs/clipboard/package.json index a17e0d3281..3fbdc8b14c 100644 --- a/npm/packs/clipboard/package.json +++ b/npm/packs/clipboard/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/clipboard", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "clipboard": "^2.0.11" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/cms-kit.admin/package.json b/npm/packs/cms-kit.admin/package.json index 67bd67d435..b3ed120343 100644 --- a/npm/packs/cms-kit.admin/package.json +++ b/npm/packs/cms-kit.admin/package.json @@ -1,16 +1,16 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/cms-kit.admin", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/codemirror": "~9.3.2", - "@abp/jstree": "~9.3.2", - "@abp/markdown-it": "~9.3.2", - "@abp/slugify": "~9.3.2", - "@abp/tui-editor": "~9.3.2", - "@abp/uppy": "~9.3.2" + "@abp/codemirror": "~9.3.3", + "@abp/jstree": "~9.3.3", + "@abp/markdown-it": "~9.3.3", + "@abp/slugify": "~9.3.3", + "@abp/tui-editor": "~9.3.3", + "@abp/uppy": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/cms-kit.public/package.json b/npm/packs/cms-kit.public/package.json index d807de4ed2..6ea991b582 100644 --- a/npm/packs/cms-kit.public/package.json +++ b/npm/packs/cms-kit.public/package.json @@ -1,12 +1,12 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/cms-kit.public", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/highlight.js": "~9.3.2", - "@abp/star-rating-svg": "~9.3.2" + "@abp/highlight.js": "~9.3.3", + "@abp/star-rating-svg": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/cms-kit/package.json b/npm/packs/cms-kit/package.json index 2a22618cba..766e7afa2b 100644 --- a/npm/packs/cms-kit/package.json +++ b/npm/packs/cms-kit/package.json @@ -1,12 +1,12 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/cms-kit", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/cms-kit.admin": "~9.3.2", - "@abp/cms-kit.public": "~9.3.2" + "@abp/cms-kit.admin": "~9.3.3", + "@abp/cms-kit.public": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/codemirror/package.json b/npm/packs/codemirror/package.json index dfb0551d7d..227cde9615 100644 --- a/npm/packs/codemirror/package.json +++ b/npm/packs/codemirror/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/codemirror", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "codemirror": "^5.65.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/core/package.json b/npm/packs/core/package.json index c8cf08d756..feda9396ee 100644 --- a/npm/packs/core/package.json +++ b/npm/packs/core/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/core", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/utils": "~9.3.2" + "@abp/utils": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/cropperjs/package.json b/npm/packs/cropperjs/package.json index 2dfc9268a2..ff0f875055 100644 --- a/npm/packs/cropperjs/package.json +++ b/npm/packs/cropperjs/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/cropperjs", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "cropperjs": "^1.6.2" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/datatables.net-bs4/package.json b/npm/packs/datatables.net-bs4/package.json index f353c4a4ec..8c9f9b6e76 100644 --- a/npm/packs/datatables.net-bs4/package.json +++ b/npm/packs/datatables.net-bs4/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/datatables.net-bs4", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/datatables.net": "~9.3.2", + "@abp/datatables.net": "~9.3.3", "datatables.net-bs4": "^2.1.8" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/datatables.net-bs5/package.json b/npm/packs/datatables.net-bs5/package.json index a71fc10553..d37dffacf8 100644 --- a/npm/packs/datatables.net-bs5/package.json +++ b/npm/packs/datatables.net-bs5/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/datatables.net-bs5", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/datatables.net": "~9.3.2", + "@abp/datatables.net": "~9.3.3", "datatables.net-bs5": "^2.1.8" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/datatables.net/package.json b/npm/packs/datatables.net/package.json index 1621a86211..fa27d3228d 100644 --- a/npm/packs/datatables.net/package.json +++ b/npm/packs/datatables.net/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/datatables.net", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "datatables.net": "^2.1.8" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/docs/package.json b/npm/packs/docs/package.json index de27b7c930..9a39238556 100644 --- a/npm/packs/docs/package.json +++ b/npm/packs/docs/package.json @@ -1,15 +1,15 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/docs", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/anchor-js": "~9.3.2", - "@abp/clipboard": "~9.3.2", - "@abp/malihu-custom-scrollbar-plugin": "~9.3.2", - "@abp/popper.js": "~9.3.2", - "@abp/prismjs": "~9.3.2" + "@abp/anchor-js": "~9.3.3", + "@abp/clipboard": "~9.3.3", + "@abp/malihu-custom-scrollbar-plugin": "~9.3.3", + "@abp/popper.js": "~9.3.3", + "@abp/prismjs": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/flag-icon-css/package.json b/npm/packs/flag-icon-css/package.json index 10448865d5..fe843d1004 100644 --- a/npm/packs/flag-icon-css/package.json +++ b/npm/packs/flag-icon-css/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/flag-icon-css", "publishConfig": { "access": "public" diff --git a/npm/packs/flag-icons/package.json b/npm/packs/flag-icons/package.json index 8db3c72fb0..b4ae06d57c 100644 --- a/npm/packs/flag-icons/package.json +++ b/npm/packs/flag-icons/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/flag-icons", "publishConfig": { "access": "public" diff --git a/npm/packs/font-awesome/package.json b/npm/packs/font-awesome/package.json index d971d3fe01..2e355ad6b1 100644 --- a/npm/packs/font-awesome/package.json +++ b/npm/packs/font-awesome/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/font-awesome", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "@fortawesome/fontawesome-free": "^6.6.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/highlight.js/package.json b/npm/packs/highlight.js/package.json index d0d4373bb0..488a57f18b 100644 --- a/npm/packs/highlight.js/package.json +++ b/npm/packs/highlight.js/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/highlight.js", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "@highlightjs/cdn-assets": "~11.10.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/jquery-form/package.json b/npm/packs/jquery-form/package.json index 68226e8402..fbcddee1f0 100644 --- a/npm/packs/jquery-form/package.json +++ b/npm/packs/jquery-form/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/jquery-form", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "jquery-form": "^4.3.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/jquery-validation-unobtrusive/package.json b/npm/packs/jquery-validation-unobtrusive/package.json index 9cd157d675..c8769e2ed4 100644 --- a/npm/packs/jquery-validation-unobtrusive/package.json +++ b/npm/packs/jquery-validation-unobtrusive/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/jquery-validation-unobtrusive", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/jquery-validation": "~9.3.2", + "@abp/jquery-validation": "~9.3.3", "jquery-validation-unobtrusive": "^4.0.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/jquery-validation/package.json b/npm/packs/jquery-validation/package.json index a677076474..3cf1c1c80d 100644 --- a/npm/packs/jquery-validation/package.json +++ b/npm/packs/jquery-validation/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/jquery-validation", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "jquery-validation": "^1.21.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/jquery/package.json b/npm/packs/jquery/package.json index 0691c57328..97bd3a15db 100644 --- a/npm/packs/jquery/package.json +++ b/npm/packs/jquery/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/jquery", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "jquery": "~3.7.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/jstree/package.json b/npm/packs/jstree/package.json index 983a961dc7..1f0421e6b8 100644 --- a/npm/packs/jstree/package.json +++ b/npm/packs/jstree/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/jstree", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "jstree": "^3.3.17" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/lodash/package.json b/npm/packs/lodash/package.json index 4e120d39ec..1192329661 100644 --- a/npm/packs/lodash/package.json +++ b/npm/packs/lodash/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/lodash", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "lodash": "^4.17.21" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/luxon/package.json b/npm/packs/luxon/package.json index 0a4612a22f..9e2cd8cb9a 100644 --- a/npm/packs/luxon/package.json +++ b/npm/packs/luxon/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/luxon", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "luxon": "^3.5.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/malihu-custom-scrollbar-plugin/package.json b/npm/packs/malihu-custom-scrollbar-plugin/package.json index 92ed45f52e..e986b62d87 100644 --- a/npm/packs/malihu-custom-scrollbar-plugin/package.json +++ b/npm/packs/malihu-custom-scrollbar-plugin/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/malihu-custom-scrollbar-plugin", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "malihu-custom-scrollbar-plugin": "^3.1.5" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/markdown-it/package.json b/npm/packs/markdown-it/package.json index 0af3d20772..31c1a6dc4f 100644 --- a/npm/packs/markdown-it/package.json +++ b/npm/packs/markdown-it/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/markdown-it", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "markdown-it": "^14.1.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/moment/package.json b/npm/packs/moment/package.json index 0522b8fd26..c64cc53597 100644 --- a/npm/packs/moment/package.json +++ b/npm/packs/moment/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/moment", "repository": { "type": "git", diff --git a/npm/packs/owl.carousel/package.json b/npm/packs/owl.carousel/package.json index 1e38a47e9b..aeaafc293c 100644 --- a/npm/packs/owl.carousel/package.json +++ b/npm/packs/owl.carousel/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/owl.carousel", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "owl.carousel": "^2.3.4" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/popper.js/package.json b/npm/packs/popper.js/package.json index ac4530894a..bd4d6eb93d 100644 --- a/npm/packs/popper.js/package.json +++ b/npm/packs/popper.js/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/popper.js", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "@popperjs/core": "^2.11.8" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/prismjs/package.json b/npm/packs/prismjs/package.json index fcff391c9a..84317300d5 100644 --- a/npm/packs/prismjs/package.json +++ b/npm/packs/prismjs/package.json @@ -1,12 +1,12 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/prismjs", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/clipboard": "~9.3.2", - "@abp/core": "~9.3.2", + "@abp/clipboard": "~9.3.3", + "@abp/core": "~9.3.3", "prismjs": "^1.29.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/qrcode/package.json b/npm/packs/qrcode/package.json index 36d5c76a4d..472a0d6e98 100644 --- a/npm/packs/qrcode/package.json +++ b/npm/packs/qrcode/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/qrcode", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2" + "@abp/core": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/select2/package.json b/npm/packs/select2/package.json index 7b7d4d5c6b..9a7de01e79 100644 --- a/npm/packs/select2/package.json +++ b/npm/packs/select2/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/select2", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "select2": "^4.0.13" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/signalr/package.json b/npm/packs/signalr/package.json index 7d3ac14e21..0374fa4590 100644 --- a/npm/packs/signalr/package.json +++ b/npm/packs/signalr/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/signalr", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "@microsoft/signalr": "~8.0.7" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/slugify/package.json b/npm/packs/slugify/package.json index 455a1b17f6..57af3403c5 100644 --- a/npm/packs/slugify/package.json +++ b/npm/packs/slugify/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/slugify", "publishConfig": { "access": "public" diff --git a/npm/packs/star-rating-svg/package.json b/npm/packs/star-rating-svg/package.json index 54c8080eec..a51ae9d7ae 100644 --- a/npm/packs/star-rating-svg/package.json +++ b/npm/packs/star-rating-svg/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/star-rating-svg", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "star-rating-svg": "^3.5.0" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/sweetalert2/package.json b/npm/packs/sweetalert2/package.json index cbc8dfedca..e2b58a9c8b 100644 --- a/npm/packs/sweetalert2/package.json +++ b/npm/packs/sweetalert2/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/sweetalert2", "publishConfig": { "access": "public" @@ -10,7 +10,7 @@ "directory": "npm/packs/sweetalert2" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "sweetalert2": "^11.14.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/timeago/package.json b/npm/packs/timeago/package.json index 4f53d0215e..21da270f14 100644 --- a/npm/packs/timeago/package.json +++ b/npm/packs/timeago/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/timeago", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "timeago": "^1.6.7" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/toastr/package.json b/npm/packs/toastr/package.json index 8e259f0c43..bd4a5ab5d9 100644 --- a/npm/packs/toastr/package.json +++ b/npm/packs/toastr/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/toastr", "repository": { "type": "git", @@ -10,7 +10,7 @@ "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", + "@abp/jquery": "~9.3.3", "toastr": "^2.1.4" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/tui-editor/package.json b/npm/packs/tui-editor/package.json index 410cb5417e..e847522d25 100644 --- a/npm/packs/tui-editor/package.json +++ b/npm/packs/tui-editor/package.json @@ -1,12 +1,12 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/tui-editor", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/jquery": "~9.3.2", - "@abp/prismjs": "~9.3.2" + "@abp/jquery": "~9.3.3", + "@abp/prismjs": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/uppy/package.json b/npm/packs/uppy/package.json index dc075f11d4..5c7dafb7d8 100644 --- a/npm/packs/uppy/package.json +++ b/npm/packs/uppy/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/uppy", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "uppy": "^4.4.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/utils/package.json b/npm/packs/utils/package.json index 477ed01ac7..d778726f3a 100644 --- a/npm/packs/utils/package.json +++ b/npm/packs/utils/package.json @@ -1,6 +1,6 @@ { "name": "@abp/utils", - "version": "9.3.2", + "version": "9.3.3", "scripts": { "prepublishOnly": "yarn install --ignore-scripts && node prepublish.js", "ng": "ng", diff --git a/npm/packs/vee-validate/package.json b/npm/packs/vee-validate/package.json index 5898cee23a..b19edfcbe7 100644 --- a/npm/packs/vee-validate/package.json +++ b/npm/packs/vee-validate/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/vee-validate", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/vue": "~9.3.2", + "@abp/vue": "~9.3.3", "vee-validate": "~3.4.4" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/npm/packs/virtual-file-explorer/package.json b/npm/packs/virtual-file-explorer/package.json index 99062f62f1..b69308f4b8 100644 --- a/npm/packs/virtual-file-explorer/package.json +++ b/npm/packs/virtual-file-explorer/package.json @@ -1,12 +1,12 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/virtual-file-explorer", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/clipboard": "~9.3.2", - "@abp/prismjs": "~9.3.2" + "@abp/clipboard": "~9.3.3", + "@abp/prismjs": "~9.3.3" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", "homepage": "https://abp.io", diff --git a/npm/packs/vue/package.json b/npm/packs/vue/package.json index f1de15800a..909084bdea 100644 --- a/npm/packs/vue/package.json +++ b/npm/packs/vue/package.json @@ -1,5 +1,5 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/vue", "publishConfig": { "access": "public" diff --git a/npm/packs/zxcvbn/package.json b/npm/packs/zxcvbn/package.json index 2d3e243581..b424c68465 100644 --- a/npm/packs/zxcvbn/package.json +++ b/npm/packs/zxcvbn/package.json @@ -1,11 +1,11 @@ { - "version": "9.3.2", + "version": "9.3.3", "name": "@abp/zxcvbn", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~9.3.2", + "@abp/core": "~9.3.3", "zxcvbn": "^4.4.2" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431", diff --git a/source-code/Volo.Abp.Account.SourceCode/Volo.Abp.Account.SourceCode.zip b/source-code/Volo.Abp.Account.SourceCode/Volo.Abp.Account.SourceCode.zip index 2c01030c5a..8186ddf883 100644 Binary files a/source-code/Volo.Abp.Account.SourceCode/Volo.Abp.Account.SourceCode.zip and b/source-code/Volo.Abp.Account.SourceCode/Volo.Abp.Account.SourceCode.zip differ diff --git a/source-code/Volo.Abp.AuditLogging.SourceCode/Volo.Abp.AuditLogging.SourceCode.zip b/source-code/Volo.Abp.AuditLogging.SourceCode/Volo.Abp.AuditLogging.SourceCode.zip index 152fc2cba8..afa61234f9 100644 Binary files a/source-code/Volo.Abp.AuditLogging.SourceCode/Volo.Abp.AuditLogging.SourceCode.zip and b/source-code/Volo.Abp.AuditLogging.SourceCode/Volo.Abp.AuditLogging.SourceCode.zip differ diff --git a/source-code/Volo.Abp.BackgroundJobs.SourceCode/Volo.Abp.BackgroundJobs.SourceCode.zip b/source-code/Volo.Abp.BackgroundJobs.SourceCode/Volo.Abp.BackgroundJobs.SourceCode.zip index 5790f57495..5c53690422 100644 Binary files a/source-code/Volo.Abp.BackgroundJobs.SourceCode/Volo.Abp.BackgroundJobs.SourceCode.zip and b/source-code/Volo.Abp.BackgroundJobs.SourceCode/Volo.Abp.BackgroundJobs.SourceCode.zip differ diff --git a/source-code/Volo.Abp.BasicTheme.SourceCode/Volo.Abp.BasicTheme.SourceCode.zip b/source-code/Volo.Abp.BasicTheme.SourceCode/Volo.Abp.BasicTheme.SourceCode.zip index 69b8359590..7306e7beb1 100644 Binary files a/source-code/Volo.Abp.BasicTheme.SourceCode/Volo.Abp.BasicTheme.SourceCode.zip and b/source-code/Volo.Abp.BasicTheme.SourceCode/Volo.Abp.BasicTheme.SourceCode.zip differ diff --git a/source-code/Volo.Abp.BlobStoring.Database.SourceCode/Volo.Abp.BlobStoring.Database.SourceCode.zip b/source-code/Volo.Abp.BlobStoring.Database.SourceCode/Volo.Abp.BlobStoring.Database.SourceCode.zip index ff96d1411d..62eb9bf769 100644 Binary files a/source-code/Volo.Abp.BlobStoring.Database.SourceCode/Volo.Abp.BlobStoring.Database.SourceCode.zip and b/source-code/Volo.Abp.BlobStoring.Database.SourceCode/Volo.Abp.BlobStoring.Database.SourceCode.zip differ diff --git a/source-code/Volo.Abp.FeatureManagement.SourceCode/Volo.Abp.FeatureManagement.SourceCode.zip b/source-code/Volo.Abp.FeatureManagement.SourceCode/Volo.Abp.FeatureManagement.SourceCode.zip index 6d02b51aa0..5aae287a26 100644 Binary files a/source-code/Volo.Abp.FeatureManagement.SourceCode/Volo.Abp.FeatureManagement.SourceCode.zip and b/source-code/Volo.Abp.FeatureManagement.SourceCode/Volo.Abp.FeatureManagement.SourceCode.zip differ diff --git a/source-code/Volo.Abp.Identity.SourceCode/Volo.Abp.Identity.SourceCode.zip b/source-code/Volo.Abp.Identity.SourceCode/Volo.Abp.Identity.SourceCode.zip index c426ce7027..cd490a332c 100644 Binary files a/source-code/Volo.Abp.Identity.SourceCode/Volo.Abp.Identity.SourceCode.zip and b/source-code/Volo.Abp.Identity.SourceCode/Volo.Abp.Identity.SourceCode.zip differ diff --git a/source-code/Volo.Abp.IdentityServer.SourceCode/Volo.Abp.IdentityServer.SourceCode.zip b/source-code/Volo.Abp.IdentityServer.SourceCode/Volo.Abp.IdentityServer.SourceCode.zip index 66ccbab949..d7dadf1d9f 100644 Binary files a/source-code/Volo.Abp.IdentityServer.SourceCode/Volo.Abp.IdentityServer.SourceCode.zip and b/source-code/Volo.Abp.IdentityServer.SourceCode/Volo.Abp.IdentityServer.SourceCode.zip differ diff --git a/source-code/Volo.Abp.OpenIddict.SourceCode/Volo.Abp.OpenIddict.SourceCode.zip b/source-code/Volo.Abp.OpenIddict.SourceCode/Volo.Abp.OpenIddict.SourceCode.zip index f8b215f0cd..4f7cdfdcaa 100644 Binary files a/source-code/Volo.Abp.OpenIddict.SourceCode/Volo.Abp.OpenIddict.SourceCode.zip and b/source-code/Volo.Abp.OpenIddict.SourceCode/Volo.Abp.OpenIddict.SourceCode.zip differ diff --git a/source-code/Volo.Abp.PermissionManagement.SourceCode/Volo.Abp.PermissionManagement.SourceCode.zip b/source-code/Volo.Abp.PermissionManagement.SourceCode/Volo.Abp.PermissionManagement.SourceCode.zip index 92d7ff2a4f..fc027a2ea7 100644 Binary files a/source-code/Volo.Abp.PermissionManagement.SourceCode/Volo.Abp.PermissionManagement.SourceCode.zip and b/source-code/Volo.Abp.PermissionManagement.SourceCode/Volo.Abp.PermissionManagement.SourceCode.zip differ diff --git a/source-code/Volo.Abp.SettingManagement.SourceCode/Volo.Abp.SettingManagement.SourceCode.zip b/source-code/Volo.Abp.SettingManagement.SourceCode/Volo.Abp.SettingManagement.SourceCode.zip index f653b6c552..ae5ec98acc 100644 Binary files a/source-code/Volo.Abp.SettingManagement.SourceCode/Volo.Abp.SettingManagement.SourceCode.zip and b/source-code/Volo.Abp.SettingManagement.SourceCode/Volo.Abp.SettingManagement.SourceCode.zip differ diff --git a/source-code/Volo.Abp.TenantManagement.SourceCode/Volo.Abp.TenantManagement.SourceCode.zip b/source-code/Volo.Abp.TenantManagement.SourceCode/Volo.Abp.TenantManagement.SourceCode.zip index d2ab8518f4..31369ea3dc 100644 Binary files a/source-code/Volo.Abp.TenantManagement.SourceCode/Volo.Abp.TenantManagement.SourceCode.zip and b/source-code/Volo.Abp.TenantManagement.SourceCode/Volo.Abp.TenantManagement.SourceCode.zip differ diff --git a/source-code/Volo.Abp.Users.SourceCode/Volo.Abp.Users.SourceCode.zip b/source-code/Volo.Abp.Users.SourceCode/Volo.Abp.Users.SourceCode.zip index 41fe56182f..fd9b5c7292 100644 Binary files a/source-code/Volo.Abp.Users.SourceCode/Volo.Abp.Users.SourceCode.zip and b/source-code/Volo.Abp.Users.SourceCode/Volo.Abp.Users.SourceCode.zip differ diff --git a/source-code/Volo.Abp.VirtualFileExplorer.SourceCode/Volo.Abp.VirtualFileExplorer.SourceCode.zip b/source-code/Volo.Abp.VirtualFileExplorer.SourceCode/Volo.Abp.VirtualFileExplorer.SourceCode.zip index b6ffd5f6d9..2b5a6e9dfb 100644 Binary files a/source-code/Volo.Abp.VirtualFileExplorer.SourceCode/Volo.Abp.VirtualFileExplorer.SourceCode.zip and b/source-code/Volo.Abp.VirtualFileExplorer.SourceCode/Volo.Abp.VirtualFileExplorer.SourceCode.zip differ diff --git a/source-code/Volo.Blogging.SourceCode/Volo.Blogging.SourceCode.zip b/source-code/Volo.Blogging.SourceCode/Volo.Blogging.SourceCode.zip index 5cdd4def50..34448d02f9 100644 Binary files a/source-code/Volo.Blogging.SourceCode/Volo.Blogging.SourceCode.zip and b/source-code/Volo.Blogging.SourceCode/Volo.Blogging.SourceCode.zip differ diff --git a/source-code/Volo.ClientSimulation.SourceCode/Volo.ClientSimulation.SourceCode.zip b/source-code/Volo.ClientSimulation.SourceCode/Volo.ClientSimulation.SourceCode.zip index 02242f8cd4..23e2cfcfed 100644 Binary files a/source-code/Volo.ClientSimulation.SourceCode/Volo.ClientSimulation.SourceCode.zip and b/source-code/Volo.ClientSimulation.SourceCode/Volo.ClientSimulation.SourceCode.zip differ diff --git a/source-code/Volo.CmsKit.SourceCode/Volo.CmsKit.SourceCode.zip b/source-code/Volo.CmsKit.SourceCode/Volo.CmsKit.SourceCode.zip index 7c79d675e5..e64408486f 100644 Binary files a/source-code/Volo.CmsKit.SourceCode/Volo.CmsKit.SourceCode.zip and b/source-code/Volo.CmsKit.SourceCode/Volo.CmsKit.SourceCode.zip differ diff --git a/source-code/Volo.Docs.SourceCode/Volo.Docs.SourceCode.zip b/source-code/Volo.Docs.SourceCode/Volo.Docs.SourceCode.zip index d523b41a8c..af66298e20 100644 Binary files a/source-code/Volo.Docs.SourceCode/Volo.Docs.SourceCode.zip and b/source-code/Volo.Docs.SourceCode/Volo.Docs.SourceCode.zip differ diff --git a/templates/app-nolayers/angular/package.json b/templates/app-nolayers/angular/package.json index 44f22e7cba..5aab4db6f8 100644 --- a/templates/app-nolayers/angular/package.json +++ b/templates/app-nolayers/angular/package.json @@ -12,15 +12,15 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "~9.3.2", - "@abp/ng.components": "~9.3.2", - "@abp/ng.core": "~9.3.2", - "@abp/ng.identity": "~9.3.2", - "@abp/ng.oauth": "~9.3.2", - "@abp/ng.setting-management": "~9.3.2", - "@abp/ng.tenant-management": "~9.3.2", - "@abp/ng.theme.lepton-x": "~4.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.account": "~9.3.3", + "@abp/ng.components": "~9.3.3", + "@abp/ng.core": "~9.3.3", + "@abp/ng.identity": "~9.3.3", + "@abp/ng.oauth": "~9.3.3", + "@abp/ng.setting-management": "~9.3.3", + "@abp/ng.tenant-management": "~9.3.3", + "@abp/ng.theme.lepton-x": "~4.3.3", + "@abp/ng.theme.shared": "~9.3.3", "@angular/animations": "~20.0.0", "@angular/common": "~20.0.0", "@angular/compiler": "~20.0.0", @@ -36,7 +36,7 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@abp/ng.schematics": "~9.3.2", + "@abp/ng.schematics": "~9.3.3", "@angular-devkit/build-angular": "~20.0.0", "@angular-eslint/builder": "~20.0.0", "@angular-eslint/eslint-plugin": "~20.0.0", diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj index 47292162f4..cd5d07a278 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj @@ -28,7 +28,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyProjectNameModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyProjectNameModule.cs index 988608d631..86c8803963 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyProjectNameModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyProjectNameModule.cs @@ -24,7 +24,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.MongoDB; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.MongoDB; using Volo.Abp.Emailing; using Volo.Abp.FeatureManagement; @@ -63,7 +63,7 @@ namespace MyCompanyName.MyProjectName; // ABP Framework packages typeof(AbpAspNetCoreMvcModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), @@ -176,7 +176,6 @@ public class MyProjectNameModule : AbpModule ConfigureAuthentication(context); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(context); ConfigureVirtualFiles(hostingEnvironment); ConfigureLocalizationServices(); ConfigureSwaggerServices(context.Services); @@ -185,6 +184,8 @@ public class MyProjectNameModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMongoDB(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureAuthentication(ServiceConfigurationContext context) @@ -326,15 +327,6 @@ public class MyProjectNameModule : AbpModule }); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureMongoDB(ServiceConfigurationContext context) { context.Services.AddMongoDbContext(options => diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json index 394cd8bd5a..5af503a552 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.2", - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.3", + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index 34bb4e020f..e080ba5e17 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -28,7 +28,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameModule.cs index 8923f6189b..762ca3b7b1 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameModule.cs @@ -25,7 +25,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; @@ -64,7 +64,7 @@ namespace MyCompanyName.MyProjectName; // ABP Framework packages typeof(AbpAspNetCoreMvcModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), @@ -179,7 +179,6 @@ public class MyProjectNameModule : AbpModule ConfigureAuthentication(context); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(context); ConfigureVirtualFiles(hostingEnvironment); ConfigureLocalizationServices(); ConfigureSwaggerServices(context.Services); @@ -188,6 +187,8 @@ public class MyProjectNameModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureEfCore(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureAuthentication(ServiceConfigurationContext context) @@ -329,15 +330,6 @@ public class MyProjectNameModule : AbpModule }); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureEfCore(ServiceConfigurationContext context) { context.Services.AddAbpDbContext(options => diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json index bef97c0d2e..6f60f47e0f 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorAutoMapperProfile.cs deleted file mode 100644 index 623f6fb33e..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName; - -public class MyProjectNameBlazorAutoMapperProfile : Profile -{ - public MyProjectNameBlazorAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Blazor project. - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorMappers.cs new file mode 100644 index 0000000000..aeb87b3440 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Blazor.WebAssembly.Client; + +[Mapper] +public partial class MyProjectNameBlazorMappers +{ + //Define your Mapperly configuration here for the Blazor project. +} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorModule.cs index 46afc0d1b0..aeeec93107 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyProjectNameBlazorModule.cs @@ -10,7 +10,7 @@ using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme; using Volo.Abp.Autofac.WebAssembly; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.FeatureManagement; using Volo.Abp.Identity; using Volo.Abp.Identity.Blazor.WebAssembly; @@ -68,8 +68,9 @@ public class MyProjectNameBlazorModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); - ConfigureAutoMapper(context); ConfigureHttpClientProxies(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureRouter(ServiceConfigurationContext context) @@ -131,12 +132,4 @@ public class MyProjectNameBlazorModule : AbpModule BaseAddress = new Uri(environment.BaseAddress) }); } - - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(); - }); - } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo.csproj index 91f678ef00..297a2e0b8b 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.Mongo.csproj @@ -19,7 +19,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyProjectNameHostModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyProjectNameHostModule.cs index 4d8c9f7f51..42ad99abd1 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyProjectNameHostModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/MyProjectNameHostModule.cs @@ -23,7 +23,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.MongoDB; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.FeatureManagement; using Volo.Abp.FeatureManagement.MongoDB; @@ -58,7 +58,7 @@ namespace MyCompanyName.MyProjectName; typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMultiTenancyModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeBundlingModule), typeof(AbpSwashbuckleModule), @@ -156,7 +156,7 @@ public class MyProjectNameHostModule : AbpModule ConfigureBundles(); ConfigureMultiTenancy(); ConfigureUrls(configuration); - ConfigureAutoMapper(context); + ConfigureMapperly(context); ConfigureSwagger(context.Services, configuration); ConfigureAutoApiControllers(); ConfigureVirtualFiles(hostingEnvironment); @@ -239,17 +239,9 @@ public class MyProjectNameHostModule : AbpModule }); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) + private void ConfigureMapperly(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. - * See AutoMapper's documentation to learn what it is: - * https://docs.automapper.org/en/stable/Configuration-validation.html - */ - options.AddMaps(/* validate: true */); - }); + context.Services.AddMapperlyObjectMapper(); } private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server.Mongo/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.csproj index 6b25e6a859..b354d9b29a 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyCompanyName.MyProjectName.Blazor.WebAssembly.Server.csproj @@ -19,7 +19,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyProjectNameHostModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyProjectNameHostModule.cs index 454120e5ef..f77a4069e1 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyProjectNameHostModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/MyProjectNameHostModule.cs @@ -23,7 +23,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; @@ -60,7 +60,7 @@ namespace MyCompanyName.MyProjectName; typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMultiTenancyModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeBundlingModule), @@ -161,7 +161,7 @@ public class MyProjectNameHostModule : AbpModule ConfigureBundles(); ConfigureMultiTenancy(); ConfigureUrls(configuration); - ConfigureAutoMapper(context); + ConfigureMapperly(context); ConfigureSwagger(context.Services, configuration); ConfigureAutoApiControllers(); ConfigureVirtualFiles(hostingEnvironment); @@ -244,17 +244,9 @@ public class MyProjectNameHostModule : AbpModule }); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) + private void ConfigureMapperly(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. - * See AutoMapper's documentation to learn what it is: - * https://docs.automapper.org/en/stable/Configuration-validation.html - */ - options.AddMaps(/* validate: true */); - }); + context.Services.AddMapperlyObjectMapper(); } private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Server/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj index 2370ad89fe..787aa1bbce 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj @@ -15,7 +15,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyProjectNameModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyProjectNameModule.cs index 0a1942912c..93a9bd89b6 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyProjectNameModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyProjectNameModule.cs @@ -19,7 +19,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.MongoDB; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.FeatureManagement; using Volo.Abp.FeatureManagement.MongoDB; @@ -54,7 +54,7 @@ namespace MyCompanyName.MyProjectName; typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMultiTenancyModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), @@ -153,7 +153,7 @@ public class MyProjectNameModule : AbpModule ConfigureBundles(); ConfigureMultiTenancy(); ConfigureUrls(configuration); - ConfigureAutoMapper(context); + ConfigureMapperly(context); ConfigureSwagger(context.Services, configuration); ConfigureAutoApiControllers(); ConfigureVirtualFiles(hostingEnvironment); @@ -279,17 +279,9 @@ public class MyProjectNameModule : AbpModule }); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) + private void ConfigureMapperly(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. - * See AutoMapper's documentation to learn what it is: - * https://docs.automapper.org/en/stable/Configuration-validation.html - */ - options.AddMaps(/* validate: true */); - }); + context.Services.AddMapperlyObjectMapper(); } private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj index 5f0b07f268..0f14f963a8 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj @@ -15,7 +15,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyProjectNameModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyProjectNameModule.cs index a4a4410663..d0bc2944dc 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyProjectNameModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyProjectNameModule.cs @@ -20,7 +20,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; @@ -56,7 +56,7 @@ namespace MyCompanyName.MyProjectName; typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMultiTenancyModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), typeof(AbpSwashbuckleModule), @@ -157,7 +157,7 @@ public class MyProjectNameModule : AbpModule ConfigureBundles(); ConfigureMultiTenancy(); ConfigureUrls(configuration); - ConfigureAutoMapper(context); + ConfigureMapperly(context); ConfigureSwagger(context.Services, configuration); ConfigureAutoApiControllers(); ConfigureVirtualFiles(hostingEnvironment); @@ -283,17 +283,9 @@ public class MyProjectNameModule : AbpModule }); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) + private void ConfigureMapperly(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. - * See AutoMapper's documentation to learn what it is: - * https://docs.automapper.org/en/stable/Configuration-validation.html - */ - options.AddMaps(/* validate: true */); - }); + context.Services.AddMapperlyObjectMapper(); } private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj index a987350436..af71ad5280 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj @@ -23,7 +23,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyProjectNameModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyProjectNameModule.cs index 543c60f13f..b0331d6144 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyProjectNameModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyProjectNameModule.cs @@ -17,7 +17,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.MongoDB; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.MongoDB; using Volo.Abp.Emailing; using Volo.Abp.FeatureManagement; @@ -56,7 +56,7 @@ namespace MyCompanyName.MyProjectName; // ABP Framework packages typeof(AbpAspNetCoreMvcModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule), @@ -159,7 +159,7 @@ public class MyProjectNameModule : AbpModule ConfigureMultiTenancy(); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(context); + ConfigureMapperly(context); ConfigureSwagger(context.Services); ConfigureNavigationServices(); ConfigureAutoApiControllers(); @@ -287,17 +287,9 @@ public class MyProjectNameModule : AbpModule ); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) + private void ConfigureMapperly(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. - * See AutoMapper's documentation to learn what it is: - * https://docs.automapper.org/en/stable/Configuration-validation.html - */ - options.AddMaps(/* validate: true */); - }); + context.Services.AddMapperlyObjectMapper(); } private void ConfigureMongoDB(ServiceConfigurationContext context) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj index 3032eff59a..b3432a426d 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj @@ -23,7 +23,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyProjectNameModule.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyProjectNameModule.cs index e8c99fc852..4869ab492e 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyProjectNameModule.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyProjectNameModule.cs @@ -18,7 +18,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Emailing; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.SqlServer; @@ -57,7 +57,7 @@ namespace MyCompanyName.MyProjectName; // ABP Framework packages typeof(AbpAspNetCoreMvcModule), typeof(AbpAutofacModule), - typeof(AbpAutoMapperModule), + typeof(AbpMapperlyModule), typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), @@ -162,7 +162,7 @@ public class MyProjectNameModule : AbpModule ConfigureMultiTenancy(); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(context); + ConfigureMapperly(context); ConfigureSwagger(context.Services); ConfigureNavigationServices(); ConfigureAutoApiControllers(); @@ -291,17 +291,9 @@ public class MyProjectNameModule : AbpModule ); } - private void ConfigureAutoMapper(ServiceConfigurationContext context) + private void ConfigureMapperly(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - /* Uncomment `validate: true` if you want to enable the Configuration Validation feature. - * See AutoMapper's documentation to learn what it is: - * https://docs.automapper.org/en/stable/Configuration-validation.html - */ - options.AddMaps(/* validate: true */); - }); + context.Services.AddMapperlyObjectMapper(); } private void ConfigureEfCore(ServiceConfigurationContext context) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/ObjectMapping/MyProjectNameAutoMapperProfile.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/ObjectMapping/MyProjectNameAutoMapperProfile.cs deleted file mode 100644 index 6871cd2257..0000000000 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/ObjectMapping/MyProjectNameAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.ObjectMapping; - -public class MyProjectNameAutoMapperProfile : Profile -{ - public MyProjectNameAutoMapperProfile() - { - /* Create your AutoMapper object mappings here */ - } -} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/ObjectMapping/MyProjectNameMappers.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/ObjectMapping/MyProjectNameMappers.cs new file mode 100644 index 0000000000..d857855a80 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/ObjectMapping/MyProjectNameMappers.cs @@ -0,0 +1,14 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.ObjectMapping; + +// This file is a placeholder for Mapperly mappers. +// Add your mapper classes here following the pattern: +// [Mapper] +// public partial class SourceToDestinationMapper : MapperBase +// { +// public override partial Destination Map(Source source); +// public override partial void Map(Source source, Destination destination); +// } + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json index 44f22e7cba..5aab4db6f8 100644 --- a/templates/app/angular/package.json +++ b/templates/app/angular/package.json @@ -12,15 +12,15 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "~9.3.2", - "@abp/ng.components": "~9.3.2", - "@abp/ng.core": "~9.3.2", - "@abp/ng.identity": "~9.3.2", - "@abp/ng.oauth": "~9.3.2", - "@abp/ng.setting-management": "~9.3.2", - "@abp/ng.tenant-management": "~9.3.2", - "@abp/ng.theme.lepton-x": "~4.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.account": "~9.3.3", + "@abp/ng.components": "~9.3.3", + "@abp/ng.core": "~9.3.3", + "@abp/ng.identity": "~9.3.3", + "@abp/ng.oauth": "~9.3.3", + "@abp/ng.setting-management": "~9.3.3", + "@abp/ng.tenant-management": "~9.3.3", + "@abp/ng.theme.lepton-x": "~4.3.3", + "@abp/ng.theme.shared": "~9.3.3", "@angular/animations": "~20.0.0", "@angular/common": "~20.0.0", "@angular/compiler": "~20.0.0", @@ -36,7 +36,7 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@abp/ng.schematics": "~9.3.2", + "@abp/ng.schematics": "~9.3.3", "@angular-devkit/build-angular": "~20.0.0", "@angular-eslint/builder": "~20.0.0", "@angular-eslint/eslint-plugin": "~20.0.0", diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationAutoMapperProfile.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationAutoMapperProfile.cs deleted file mode 100644 index f3f7d14052..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName; - -public class MyProjectNameApplicationAutoMapperProfile : Profile -{ - public MyProjectNameApplicationAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationMappers.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationMappers.cs new file mode 100644 index 0000000000..fa87ca82bd --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationMappers.cs @@ -0,0 +1,12 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName; + +[Mapper] +public partial class MyProjectNameApplicationMappers +{ + /* You can configure your Mapperly mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple mapper classes for a better organization. */ +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs index 12ba3bdc25..081d167b6d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs @@ -1,11 +1,12 @@ using Volo.Abp.Account; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.FeatureManagement; using Volo.Abp.Identity; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement; using Volo.Abp.SettingManagement; using Volo.Abp.TenantManagement; +using Microsoft.Extensions.DependencyInjection; namespace MyCompanyName.MyProjectName; @@ -23,9 +24,6 @@ public class MyProjectNameApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => - { - options.AddMaps(); - }); + context.Services.AddMapperlyObjectMapper(); } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj index 9ba73f2551..1466b4065f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj @@ -49,7 +49,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json index 1c7c3d09c5..3edcfba045 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-authserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorAutoMapperProfile.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorAutoMapperProfile.cs deleted file mode 100644 index 9e5092bfe7..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Blazor.Client; - -public class MyProjectNameBlazorAutoMapperProfile : Profile -{ - public MyProjectNameBlazorAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Blazor project. - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorClientModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorClientModule.cs index 035c9ef835..13a9d2694b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorClientModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorClientModule.cs @@ -10,7 +10,7 @@ using OpenIddict.Abstractions; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme; using Volo.Abp.Autofac.WebAssembly; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Identity.Blazor.WebAssembly; using Volo.Abp.Modularity; using Volo.Abp.SettingManagement.Blazor.WebAssembly; @@ -39,7 +39,8 @@ public class MyProjectNameBlazorClientModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); - ConfigureAutoMapper(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureRouter(ServiceConfigurationContext context) @@ -87,12 +88,4 @@ public class MyProjectNameBlazorClientModule : AbpModule BaseAddress = new Uri(environment.BaseAddress) }); } - - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(); - }); - } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorMappers.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorMappers.cs new file mode 100644 index 0000000000..81e4271bc8 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyProjectNameBlazorMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Blazor.Client; + +[Mapper] +public partial class MyProjectNameBlazorMappers +{ + //Define your Mapperly configuration here for the Blazor project. +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj index 0d4e981795..44a929d75d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj @@ -26,7 +26,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyProjectNameBlazorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyProjectNameBlazorModule.cs index 3414c945a3..4d94c3bde9 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyProjectNameBlazorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyProjectNameBlazorModule.cs @@ -38,7 +38,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.DistributedLocking; @@ -108,7 +108,6 @@ public class MyProjectNameBlazorModule : AbpModule ConfigureBundles(); ConfigureMultiTenancy(); ConfigureAuthentication(context, configuration); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureBlazorise(context); ConfigureRouter(context); @@ -116,6 +115,8 @@ public class MyProjectNameBlazorModule : AbpModule ConfigureDataProtection(context, configuration, hostingEnvironment); ConfigureDistributedLocking(context, configuration); ConfigureSwaggerServices(context.Services); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureUrls(IConfiguration configuration) @@ -298,15 +299,6 @@ public class MyProjectNameBlazorModule : AbpModule options.AppAssembly = typeof(MyProjectNameBlazorModule).Assembly; }); } - - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureSwaggerServices(IServiceCollection services) { services.AddAbpSwaggerGen( diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json index bef97c0d2e..6f60f47e0f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index 35f067d493..3870725b72 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -25,7 +25,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorModule.cs index 6fb111d98d..5d27bb122f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorModule.cs @@ -32,7 +32,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Identity.Blazor.Server; using Volo.Abp.Modularity; using Volo.Abp.Security.Claims; @@ -121,13 +121,14 @@ public class MyProjectNameBlazorModule : AbpModule ConfigureAuthentication(context); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureSwaggerServices(context.Services); ConfigureAutoApiControllers(); ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureAuthentication(ServiceConfigurationContext context) @@ -244,14 +245,6 @@ public class MyProjectNameBlazorModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - public override void OnApplicationInitialization(ApplicationInitializationContext context) { var env = context.GetEnvironment(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json index bef97c0d2e..6f60f47e0f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorAutoMapperProfile.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorAutoMapperProfile.cs deleted file mode 100644 index 4ec4dfb7bb..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Blazor.WebApp.Client; - -public class MyProjectNameBlazorAutoMapperProfile : Profile -{ - public MyProjectNameBlazorAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Blazor project. - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorClientModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorClientModule.cs index e2de628db7..d3e28b8e23 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorClientModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorClientModule.cs @@ -11,7 +11,7 @@ using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme; using Volo.Abp.Autofac.WebAssembly; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Identity.Blazor.WebAssembly; using Volo.Abp.Modularity; using Volo.Abp.SettingManagement.Blazor.WebAssembly; @@ -48,7 +48,8 @@ public class MyProjectNameBlazorClientModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); - ConfigureAutoMapper(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureRouter(ServiceConfigurationContext context) @@ -89,12 +90,4 @@ public class MyProjectNameBlazorClientModule : AbpModule BaseAddress = new Uri(environment.BaseAddress) }); } - - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(); - }); - } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorMappers.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorMappers.cs new file mode 100644 index 0000000000..2edcf5e58f --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Blazor.WebApp.Client; + +[Mapper] +public partial class MyProjectNameBlazorMappers +{ + //Define your Mapperly configuration here for the Blazor project. +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorAutoMapperProfile.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorAutoMapperProfile.cs deleted file mode 100644 index efd9d3cb61..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client; - -public class MyProjectNameBlazorAutoMapperProfile : Profile -{ - public MyProjectNameBlazorAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Blazor project. - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorClientModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorClientModule.cs index b0e4e4f67f..7f1f464aac 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorClientModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorClientModule.cs @@ -11,7 +11,7 @@ using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme; using Volo.Abp.Autofac.WebAssembly; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Identity.Blazor.WebAssembly; using Volo.Abp.Modularity; using Volo.Abp.SettingManagement.Blazor.WebAssembly; @@ -48,7 +48,8 @@ public class MyProjectNameBlazorClientModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); - ConfigureAutoMapper(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureRouter(ServiceConfigurationContext context) @@ -88,12 +89,4 @@ public class MyProjectNameBlazorClientModule : AbpModule BaseAddress = new Uri(environment.BaseAddress) }); } - - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(); - }); - } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorMappers.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorMappers.cs new file mode 100644 index 0000000000..fc64d2f482 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client; + +[Mapper] +public partial class MyProjectNameBlazorMappers +{ + //Define your Mapperly configuration here for the Blazor project. +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj index 838be90c07..7e918c51f8 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj @@ -28,7 +28,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyProjectNameBlazorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyProjectNameBlazorModule.cs index aa439fe0ff..0849b09d6d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyProjectNameBlazorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyProjectNameBlazorModule.cs @@ -41,7 +41,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.DistributedLocking; @@ -112,7 +112,6 @@ public class MyProjectNameBlazorModule : AbpModule ConfigureBundles(); ConfigureMultiTenancy(); ConfigureAuthentication(context, configuration); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureBlazorise(context); ConfigureRouter(context); @@ -307,14 +306,6 @@ public class MyProjectNameBlazorModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureSwaggerServices(IServiceCollection services) { services.AddAbpSwaggerGen( diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/package.json index bef97c0d2e..6f60f47e0f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj index c82f8e328f..0efcd6f8bf 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj @@ -26,7 +26,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyProjectNameBlazorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyProjectNameBlazorModule.cs index a47a16406f..6a75e85ae0 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyProjectNameBlazorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyProjectNameBlazorModule.cs @@ -34,7 +34,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite; using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Identity.Blazor.Server; using Volo.Abp.Modularity; using Volo.Abp.OpenIddict; @@ -125,13 +125,14 @@ public class MyProjectNameBlazorModule : AbpModule ConfigureAuthentication(context); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureSwaggerServices(context.Services); ConfigureAutoApiControllers(); ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureAuthentication(ServiceConfigurationContext context) @@ -252,14 +253,6 @@ public class MyProjectNameBlazorModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - public override void OnApplicationInitialization(ApplicationInitializationContext context) { var env = context.GetEnvironment(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/package.json index bef97c0d2e..6f60f47e0f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj index a6da5515f5..219f63070b 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj @@ -24,7 +24,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index fccbef2276..e49ba72074 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -26,7 +26,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebAutoMapperProfile.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebAutoMapperProfile.cs deleted file mode 100644 index eea8d4cb05..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Web; - -public class MyProjectNameWebAutoMapperProfile : Profile -{ - public MyProjectNameWebAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Web project. - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebMappers.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebMappers.cs new file mode 100644 index 0000000000..4ef965f932 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Web.Host; + +[Mapper] +public partial class MyProjectNameWebMappers +{ + //Define your Mapperly configuration here for the Web project. +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs index 9c2db7971c..152076d235 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs @@ -28,7 +28,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.DistributedLocking; @@ -92,11 +92,12 @@ public class MyProjectNameWebModule : AbpModule ConfigureDistributedLocking(context, configuration); ConfigureUrls(configuration); ConfigureAuthentication(context, configuration); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureNavigationServices(configuration); ConfigureMultiTenancy(); ConfigureSwaggerServices(context.Services); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureBundles() @@ -217,14 +218,6 @@ public class MyProjectNameWebModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment) { if (hostingEnvironment.IsDevelopment()) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index bf6aa7f50a..1c67acc87a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -47,7 +47,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs deleted file mode 100644 index eea8d4cb05..0000000000 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Web; - -public class MyProjectNameWebAutoMapperProfile : Profile -{ - public MyProjectNameWebAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Web project. - } -} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebMappers.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebMappers.cs new file mode 100644 index 0000000000..b7b6450bb3 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Web; + +[Mapper] +public partial class MyProjectNameWebMappers +{ + //Define your Mapperly configuration here for the Web project. +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index bec50e72eb..27f8f93367 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -25,7 +25,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.FeatureManagement; using Volo.Abp.Identity.Web; using Volo.Abp.Localization; @@ -107,11 +107,12 @@ public class MyProjectNameWebModule : AbpModule ConfigureAuthentication(context); ConfigureUrls(configuration); ConfigureBundles(); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureNavigationServices(); ConfigureAutoApiControllers(); ConfigureSwaggerServices(context.Services); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureAuthentication(ServiceConfigurationContext context) @@ -145,14 +146,6 @@ public class MyProjectNameWebModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment) { if (hostingEnvironment.IsDevelopment()) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json index efa37fe2fe..9a966b5c41 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.2" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~4.3.3" } } diff --git a/templates/module/angular/package.json b/templates/module/angular/package.json index 9f2dd09d82..4243f05089 100644 --- a/templates/module/angular/package.json +++ b/templates/module/angular/package.json @@ -13,15 +13,15 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "~9.3.2", - "@abp/ng.components": "~9.3.2", - "@abp/ng.core": "~9.3.2", - "@abp/ng.identity": "~9.3.2", - "@abp/ng.oauth": "~9.3.2", - "@abp/ng.setting-management": "~9.3.2", - "@abp/ng.tenant-management": "~9.3.2", - "@abp/ng.theme.basic": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2", + "@abp/ng.account": "~9.3.3", + "@abp/ng.components": "~9.3.3", + "@abp/ng.core": "~9.3.3", + "@abp/ng.identity": "~9.3.3", + "@abp/ng.oauth": "~9.3.3", + "@abp/ng.setting-management": "~9.3.3", + "@abp/ng.tenant-management": "~9.3.3", + "@abp/ng.theme.basic": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3", "@angular/animations": "~20.0.0", "@angular/common": "~20.0.0", "@angular/compiler": "~20.0.0", @@ -36,7 +36,7 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@abp/ng.schematics": "~9.3.2", + "@abp/ng.schematics": "~9.3.3", "@angular-devkit/build-angular": "~20.0.0", "@angular-eslint/builder": "~20.0.0", "@angular-eslint/eslint-plugin": "~20.0.0", diff --git a/templates/module/angular/projects/my-project-name/package.json b/templates/module/angular/projects/my-project-name/package.json index cd427aa2d2..3dbeba073e 100644 --- a/templates/module/angular/projects/my-project-name/package.json +++ b/templates/module/angular/projects/my-project-name/package.json @@ -4,8 +4,8 @@ "peerDependencies": { "@angular/common": "~19.1.0", "@angular/core": "~19.1.0", - "@abp/ng.core": "~9.3.2", - "@abp/ng.theme.shared": "~9.3.2" + "@abp/ng.core": "~9.3.3", + "@abp/ng.theme.shared": "~9.3.3" }, "dependencies": { "tslib": "^2.1.0" diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/package.json index 2e82b80925..1fe91dec0a 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-authserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostAutoMapperProfile.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostAutoMapperProfile.cs deleted file mode 100644 index 1552e364ff..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Blazor.Host.Client; - -public class MyProjectNameBlazorHostAutoMapperProfile : Profile -{ - public MyProjectNameBlazorHostAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Blazor project. - } -} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostClientModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostClientModule.cs index 69bfb87723..f8f1805ea1 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostClientModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostClientModule.cs @@ -11,7 +11,7 @@ using Volo.Abp.Account; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme; using Volo.Abp.Autofac.WebAssembly; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Identity.Blazor.WebAssembly; using Volo.Abp.Modularity; using Volo.Abp.SettingManagement.Blazor.WebAssembly; @@ -41,7 +41,8 @@ public class MyProjectNameBlazorHostClientModule : AbpModule ConfigureBlazorise(context); ConfigureRouter(context); ConfigureMenu(context); - ConfigureAutoMapper(context); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureRouter(ServiceConfigurationContext context) @@ -83,12 +84,4 @@ public class MyProjectNameBlazorHostClientModule : AbpModule BaseAddress = new Uri(environment.BaseAddress) }); } - - private void ConfigureAutoMapper(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(); - }); - } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostMappers.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostMappers.cs new file mode 100644 index 0000000000..71b072cd93 --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyProjectNameBlazorHostMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Blazor.Host.Client; + +[Mapper] +public partial class MyProjectNameBlazorHostMappers +{ + //Define your Mapperly configuration here for the Blazor project. +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/package.json index 35d240f9b5..ffbf3861ba 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2", - "@abp/aspnetcore.components.server.basictheme": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3", + "@abp/aspnetcore.components.server.basictheme": "~9.3.3" } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebAutoMapperProfile.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebAutoMapperProfile.cs deleted file mode 100644 index c6255b4bd1..0000000000 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName; - -public class MyProjectNameWebAutoMapperProfile : Profile -{ - public MyProjectNameWebAutoMapperProfile() - { - //Define your AutoMapper configuration here for the Web project. - } -} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs index e90eddd122..8d912bcad4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs @@ -29,7 +29,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.FeatureManagement; @@ -101,11 +101,12 @@ public class MyProjectNameWebHostModule : AbpModule ConfigureCache(configuration); ConfigureUrls(configuration); ConfigureAuthentication(context, configuration); - ConfigureAutoMapper(); ConfigureVirtualFileSystem(hostingEnvironment); ConfigureSwaggerServices(context.Services); ConfigureMultiTenancy(); ConfigureDataProtection(context, configuration, hostingEnvironment); + + context.Services.AddMapperlyObjectMapper(); } private void ConfigureMenu(IConfiguration configuration) @@ -169,14 +170,6 @@ public class MyProjectNameWebHostModule : AbpModule }); } - private void ConfigureAutoMapper() - { - Configure(options => - { - options.AddMaps(); - }); - } - private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment) { if (hostingEnvironment.IsDevelopment()) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebMappers.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebMappers.cs new file mode 100644 index 0000000000..4ef965f932 --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Web.Host; + +[Mapper] +public partial class MyProjectNameWebMappers +{ + //Define your Mapperly configuration here for the Web project. +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json index 255027fa5f..8097db43a4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json index 255027fa5f..8097db43a4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.3.3" } } diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj index b8f41e5fa7..6a6efaf730 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyCompanyName.MyProjectName.Application.csproj @@ -9,7 +9,7 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationAutoMapperProfile.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationAutoMapperProfile.cs deleted file mode 100644 index f3f7d14052..0000000000 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName; - -public class MyProjectNameApplicationAutoMapperProfile : Profile -{ - public MyProjectNameApplicationAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - } -} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationMappers.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationMappers.cs new file mode 100644 index 0000000000..fa87ca82bd --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationMappers.cs @@ -0,0 +1,12 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName; + +[Mapper] +public partial class MyProjectNameApplicationMappers +{ + /* You can configure your Mapperly mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple mapper classes for a better organization. */ +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs index d8fefafb98..93ca04edf6 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application/MyProjectNameApplicationModule.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Modularity; using Volo.Abp.Application; @@ -9,16 +9,12 @@ namespace MyCompanyName.MyProjectName; typeof(MyProjectNameDomainModule), typeof(MyProjectNameApplicationContractsModule), typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class MyProjectNameApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); } } diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj index 0c31a85ed8..682ca7eaa3 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj @@ -8,7 +8,7 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorAutoMapperProfile.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorAutoMapperProfile.cs deleted file mode 100644 index 13deb63b1d..0000000000 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorAutoMapperProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Blazor; - -public class MyProjectNameBlazorAutoMapperProfile : Profile -{ - public MyProjectNameBlazorAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - } -} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorMappers.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorMappers.cs new file mode 100644 index 0000000000..a37e5da245 --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorMappers.cs @@ -0,0 +1,12 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Blazor; + +[Mapper] +public partial class MyProjectNameBlazorMappers +{ + /* You can configure your Mapperly mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple mapper classes for a better organization. */ +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs index dd7bf654ee..1dcb64b5c5 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs @@ -2,7 +2,7 @@ using MyCompanyName.MyProjectName.Blazor.Menus; using Volo.Abp.AspNetCore.Components.Web.Theming; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; @@ -11,18 +11,13 @@ namespace MyCompanyName.MyProjectName.Blazor; [DependsOn( typeof(MyProjectNameApplicationContractsModule), typeof(AbpAspNetCoreComponentsWebThemingModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class MyProjectNameBlazorModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - Configure(options => - { - options.AddProfile(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); Configure(options => { diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index 1d2ad57d60..cda173c2f0 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -13,7 +13,7 @@ - + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs deleted file mode 100644 index 08b573de75..0000000000 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebAutoMapperProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using AutoMapper; - -namespace MyCompanyName.MyProjectName.Web; - -public class MyProjectNameWebAutoMapperProfile : Profile -{ - public MyProjectNameWebAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - } -} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebMappers.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebMappers.cs new file mode 100644 index 0000000000..b7b6450bb3 --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebMappers.cs @@ -0,0 +1,10 @@ +using Riok.Mapperly.Abstractions; +using Volo.Abp.Mapperly; + +namespace MyCompanyName.MyProjectName.Web; + +[Mapper] +public partial class MyProjectNameWebMappers +{ + //Define your Mapperly configuration here for the Web project. +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 9e139a0515..4b1876a61d 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -4,7 +4,7 @@ using MyCompanyName.MyProjectName.Localization; using MyCompanyName.MyProjectName.Web.Menus; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; -using Volo.Abp.AutoMapper; +using Volo.Abp.Mapperly; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; @@ -15,7 +15,7 @@ namespace MyCompanyName.MyProjectName.Web; [DependsOn( typeof(MyProjectNameApplicationContractsModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), - typeof(AbpAutoMapperModule) + typeof(AbpMapperlyModule) )] public class MyProjectNameWebModule : AbpModule { @@ -44,11 +44,7 @@ public class MyProjectNameWebModule : AbpModule options.FileSets.AddEmbedded(); }); - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); + context.Services.AddMapperlyObjectMapper(); Configure(options => {