Browse Source

Merge branch 'abpframework:dev' into dev

pull/17129/head
Masood Khoshgard 3 years ago
committed by GitHub
parent
commit
7bbcdc9000
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json
  2. 27
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json
  3. 32
      docs/en/Modules/Cms-Kit/Tags.md
  4. 2
      docs/en/Modules/OpenIddict.md
  5. 4
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/ITagAppService.cs
  6. 10
      modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/PopularTagDto.cs
  7. 2
      modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs
  8. 12
      modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs
  9. 3
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json
  10. 3
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json
  11. 7
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs
  12. 17
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/PopularTag.cs
  13. 18
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs
  14. 25
      modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs
  15. 10
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Blogs/BlogPostPublicClientProxy.Generated.cs
  16. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Blogs/BlogPostPublicClientProxy.cs
  17. 8
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs
  18. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs
  19. 8
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicClientProxy.Generated.cs
  20. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicClientProxy.cs
  21. 11
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Menus/MenuItemPublicClientProxy.Generated.cs
  22. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Menus/MenuItemPublicClientProxy.cs
  23. 10
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Pages/PagesPublicClientProxy.Generated.cs
  24. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Pages/PagesPublicClientProxy.cs
  25. 9
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs
  26. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs
  27. 8
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Reactions/ReactionPublicClientProxy.Generated.cs
  28. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Reactions/ReactionPublicClientProxy.cs
  29. 18
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Tags/TagPublicClientProxy.Generated.cs
  30. 2
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Tags/TagPublicClientProxy.cs
  31. 581
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json
  32. 7
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs
  33. 29
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/Default.cshtml
  34. 39
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/PopularTagsViewComponent.cs
  35. 4
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/default.css
  36. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml
  37. 9
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagPublicAppService_Tests.cs
  38. 10
      modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs

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

@ -217,6 +217,7 @@
"ReleaseNotes": "Release Notes",
"DetailedChangeNotes" : "Detailed Change Notes",
"SeeTrainings": "See Trainings",
"NoContent": "No content"
"NoContent": "No content",
"ABPStudioBeta": "ABP Studio <span class=\"badge border rounded fw--5\" style=\"border-color: #B84297 !important;\">BETA</span>"
}
}

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

@ -905,6 +905,33 @@
"DoesTheSubscriptionRenewAutomaticallyExplanation": "The ABP Commercial does not have an auto-renewal billing model. Therefore <strong>your subscription will not be automatically renewed</strong> at the end of your license period. If you want to continue to have the benefits of ABP Commercial, you need to manually renew it at the <a href=\"/my-organizations\">organization management page</a>. If you have multiple organizations, click the \"Manage\" button at your expiring organization and then click the \"Extend Now\" button to renew your license. You may also want to take a look at the <a href=\"/faq#what-happens-when-license-ends\">What Happens When My License Ends?</a> section.",
"ExtraQuestionCreditsFaqTitle": "Can I purchase extra support question credits?",
"ExtraQuestionCreditsFaqExplanation": "Yes, you can. To buy extra question credits, send an e-mail to <a href=\"mailto:info@abp.io\">info@abp.io</a> with your organization's name. Here's the price list for the extra question credits: <ul><li>50 questions pack $999</li><li>25 questions pack $625</li><li>15 questions pack $450</li></ul>",
"AlreadyBetaTester": "You have already joined the beta tester program.",
"AbpStudioForAbpDevelopers": "ABP Studio for <span class=\"gradient-commercial\">ABP Developers</span>",
"AbpStudioForAbpDevelopers_Description1": "ABP Studio is a <span class=\"text-info\">cross-platform desktop application</span> for ABP developers.",
"AbpStudioForAbpDevelopers_Description2": "It is <span class=\"text-info\">well integrated</span> to the ABP Framework and aims to provide a comfortable development environment for you by <span class=\"text-info\">automating things, providing insights</span> about your solution, making <span class=\"text-info\">develop, run</span> and <span class=\"text-info\">deploy</span> your solutions much easier.",
"CreateNewSolutions": "Create New Solutions",
"CreateNewSolutions_Description1": "You can create from simple applications to modular monolith or microservice solutions easily with a lot of options. You get a full production-ready base software solution for your business.",
"ArchitectYourSolutions": "Architect Your Solutions",
"ArchitectYourSolutions_Description1": "Build monolith-modular and microservice solution structures easier by creating modules or services and establishing relations between them. You can also install or uninstall pre-built application modules.",
"ExploreYourSolution": "Explore Your Solution",
"ExploreYourSolution_Description1": "ABP Studio shows a high-level view of components in your solution and the modules your solution depends on. You can explore entities, services, HTTP APIs and much more without needing to open your codebase.",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze": "Run Multi-Application or Microservice Solutions in a Breeze",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze_Description1": "Run one, <span class=\"text-info\">multiple</span> or <span class=\"text-info\">all services</span> with a single click. In this way, it is very easy to stop a service, run it in Visual Studio to <span class=\"text-info\">test</span> or <span class=\"text-info\">debug</span>.",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze_Description2": "See a list of services, view <span class=\"text-info\">real-time HTTP Request</span> and <span class=\"text-info\">exception counts</span> for each service.",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze_Description3": "See all details of all <span class=\"text-info\">HTTP requests</span> coming to any service.",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze_Description4": "Explore <span class=\"text-info\">exception details</span> as real-time in any service, easily filter and search.",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze_Description5": "Show the <span class=\"text-info\">application logs</span>, filter by log level or search by text..",
"RunMultiApplicationOrMicroserviceSolutionsInABreeze_Description6": "<span class=\"text-info\">Browse</span> the UI of your application without leaving the solution runner.",
"IntegrateToYourKubernetesCluster": "Integrate to your Kubernetes Cluster",
"IntegrateToYourKubernetesCluster_Description1": "<span class=\"text-info\">Connect your local development environment to a local or remote Kubernetes cluster</span>, where that cluster already runs your microservice solution.",
"IntegrateToYourKubernetesCluster_Description2": "Access any service in Kubernetes with their service name as DNS, just like they are running in your local computer.",
"IntegrateToYourKubernetesCluster_Description3": "<span class=\"text-info\">Intercept any service</span> in that cluster, so all the <span class=\"text-info\">traffic to the intercepted service is automatically redirected to your service</span>that is running in your local machine. When your service needs to use any service in Kubernetes, the traffic is redirected back to the cluster, just like your local service is running inside the Kubernetes.",
"GetInformed": "Get Informed",
"Studio_GetInformed_Description1": "Leave your contact information to <span class=\"text-info\">get informed</span> and <span class=\"text-info\">try it first</span> when ABP Studio has been launched.",
"Studio_GetInformed_Description2": "Planned preview release date: Q3 of 2023.",
"ThankYou!": "Thank you!",
"SendBetaRequest": "Send Beta Request",
"YouJoinedTheBetaTesterProgram": "You joined the ABP Studio beta tester program.",
"PricingExplanation2": "30 days money back guarantee *. <a href=\"/faq#refund-policy\">Learn more</a>",
"MoneyBackGuaranteeText": "* 30-day money-back guarantee on all licenses! 100% refund on Team, 60% refund on Business and Enterprise licenses within 30 days."
}

32
docs/en/Modules/Cms-Kit/Tags.md

@ -32,24 +32,40 @@ Configure<CmsKitTagOptions>(options =>
`TagEntityTypeDefiniton` properties:
- `EntityType`: Name of the entity type.
- `DisplayName`: Display name of the entity type. You can use a user friendly display name to show entity type definition on the admin website.
- `DisplayName`: The display name of the entity type. You can use a user-friendly display name to show entity type definition on the admin website.
- `CreatePolicies`: List of policy/permission names allowing users to create tags under the entity type.
- `UpdatePolicies`: List of policy/permission names allowing users to update tags under the entity type.
- `DeletePolicies`: List of policy/permission names allowing users to delete tags under the entity type.
## The Tag Widget
The tag system provides a tag [widget](../../UI/AspNetCore/Widgets.md) to display associated tags of a resource that was configured for tagging. You can simply place the widget on a page like below:
The tag system provides a tag [widget](../../UI/AspNetCore/Widgets.md) to display associated tags of a resource that was configured for tagging. You can simply place the widget on a page like the one below:
```csharp
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = "Product",
entityId = "..."
entityId = "...",
urlFormat = "/products?tagId={TagId}&tagName={TagName}"
})
```
`entityType` was explained in the previous section. `entityId` should be the unique id of the product, in this example. If you have a Product entity, you can use its Id here.
`entityType` was explained in the previous section. In this example, the `entityId` should be the unique id of the product. If you have a `Product` entity, you can use its Id here. `urlFormat` is the string format of the URL which will be generated for each tag. You can use the `{TagId}` and `{TagName}` placeholders to populate the URL. For example, the above URL format will populate URLs like `/products?tagId=1&tagName=tag1`.
## The Popular Tags Widget
The tag system provides a popular tags [widget](../../UI/AspNetCore/Widgets.md) to display popular tags of a resource that was configured for tagging. You can simply place the widget on a page as below:
```csharp
@await Component.InvokeAsync(typeof(PopularTagsViewComponent), new
{
entityType = "Product",
urlFormat = "/products?tagId={TagId}&tagName={TagName}",
maxCount = 10
})
```
`entityType` was explained in the previous section. `urlFormat` was explained in the previous section. `maxCount` is the maximum number of tags to be displayed.
## User Interface
@ -95,7 +111,7 @@ An entity tag represents a connection between the tag and the tagged entity.
This module follows the [Repository Best Practices & Conventions](https://docs.abp.io/en/abp/latest/Best-Practices/Repositories) guide.
Following custom repositories are defined for this feature:
The following custom repositories are defined for this feature:
- `ITagRepository`
- `IEntityTagRepository`
@ -106,11 +122,11 @@ This module follows the [Domain Services Best Practices & Conventions](https://d
##### Tag Manager
`TagManager` is used to perform some operations for the `Tag` aggregate root.
`TagManager` performs some operations for the `Tag` aggregate root.
##### Entity Tag Manager
`EntityTagManager` is used to perform some operations for the `EntityTag` entity.
`EntityTagManager` performs some operations for the `EntityTag` entity.
### Application layer
@ -124,7 +140,7 @@ This module follows the [Domain Services Best Practices & Conventions](https://d
#### Common
##### Table / collection prefix & schema
##### Table / Collection prefix & schema
All tables/collections use the `Cms` prefix by default. Set static properties on the `CmsKitDbProperties` class if you need to change the table prefix or set a schema name (if supported by your database provider).

2
docs/en/Modules/OpenIddict.md

@ -108,7 +108,7 @@ public override void PreConfigureServices(ServiceConfigurationContext context)
These services contain:
- `AddAudiances()` for resource servers.
- `AddAudiences()` for resource servers.
- `SetIssuer()` URI that is used to determine the actual location of the OAuth 2.0/OpenID Connect configuration document when using provider discovery.
- `SetConfiguration()` to configure `OpenIdConnectConfiguration`.
- `UseIntrospection()` to use introspection instead of local/direct validation.

4
modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/ITagAppService.cs

@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Tags;
public interface ITagAppService : IApplicationService
{
Task<List<TagDto>> GetAllRelatedTagsAsync(string entityType, string entityId);
}
Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount);
}

10
modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/PopularTagDto.cs

@ -0,0 +1,10 @@
using System;
namespace Volo.CmsKit.Tags;
public class PopularTagDto
{
public Guid Id { get; set; }
public string Name { get; set; }
public int Count { get; set; }
}

2
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs

@ -11,6 +11,8 @@ public class CmsKitCommonApplicationAutoMapperProfile : Profile
{
CreateMap<Tag, TagDto>().MapExtraProperties();
CreateMap<PopularTag, PopularTagDto>();
CreateMap<CmsUser, CmsUserDto>().MapExtraProperties();
CreateMap<BlogFeature, BlogFeatureCacheItem>().MapExtraProperties();

12
modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/Tags/TagAppService.cs

@ -24,4 +24,14 @@ public class TagAppService : CmsKitAppServiceBase, ITagAppService
return ObjectMapper.Map<List<Tag>, List<TagDto>>(entities);
}
}
public virtual async Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount)
{
return ObjectMapper.Map<List<PopularTag>, List<PopularTagDto>>(
await TagRepository.GetPopularTagsAsync(
entityType,
maxCount
)
);
}
}

3
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json

@ -218,6 +218,7 @@
"CaptchaCodeErrorMessage" : "The answer you entered for the CAPTCHA was not correct. Please try again",
"CaptchaCodeMissingMessage": "The captcha code is missing!",
"UnAllowedExternalUrlMessage": "You included an unallowed external URL. Please try again without the external URL.",
"URL": "URL"
"URL": "URL",
"PopularTags": "Popular Tags"
}
}

3
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json

@ -214,6 +214,7 @@
"Feature:TagEnableDescription": "Cmskit etiket sistemi",
"DeleteBlogPostMessage": "Blog silinecek. Emin misiniz?",
"CaptchaCode": "Captcha kodu",
"CommentTextRequired": "Yorum zorunlu"
"CommentTextRequired": "Yorum zorunlu",
"PopularTags": "Popüler Etiketler"
}
}

7
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs

@ -36,4 +36,9 @@ public interface ITagRepository : IBasicRepository<Tag, Guid>
[NotNull] string entityType,
[NotNull] string entityId,
CancellationToken cancellationToken = default);
}
Task<List<PopularTag>> GetPopularTagsAsync(
[NotNull] string entityType,
int maxCount,
CancellationToken cancellationToken = default);
}

17
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/PopularTag.cs

@ -0,0 +1,17 @@
using System;
namespace Volo.CmsKit.Tags;
public class PopularTag
{
public Guid Id { get; set; }
public string Name { get; set; }
public int Count { get; set; }
public PopularTag(Guid id, string name, int count)
{
Id = id;
Name = name;
Count = count;
}
}

18
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs

@ -79,7 +79,23 @@ public class EfCoreTagRepository : EfCoreRepository<ICmsKitDbContext, Tag, Guid>
return await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken));
}
public virtual async Task<List<PopularTag>> GetPopularTagsAsync(
[NotNull] string entityType,
int maxCount,
CancellationToken cancellationToken = default)
{
return await (from tag in await GetDbSetAsync()
join entityTag in (await GetDbContextAsync()).Set<EntityTag>() on tag.Id equals entityTag.TagId
where tag.EntityType == entityType
group tag by tag.Id
into g
orderby g.Count() descending
select new PopularTag(g.Key, g.First().Name, g.Count()))
.Take(maxCount)
.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken));
}
public virtual async Task<List<Tag>> GetListAsync(string filter, CancellationToken cancellationToken = default)
{
return await (await GetQueryableByFilterAsync(filter)).ToListAsync(GetCancellationToken(cancellationToken));

25
modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs

@ -3,6 +3,7 @@ using MongoDB.Driver;
using MongoDB.Driver.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp;
@ -81,6 +82,30 @@ public class MongoTagRepository : MongoDbRepository<ICmsKitMongoDbContext, Volo.
return result;
}
public virtual async Task<List<PopularTag>> GetPopularTagsAsync(string entityType, int maxCount, CancellationToken cancellationToken = default)
{
var tags = await (await GetMongoQueryableAsync(cancellationToken))
.Where(x => x.EntityType == entityType)
.Select(x => new { x.Id, x.Name })
.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken));
var tagIds = tags.Select(x => x.Id);
var entityTagCounts = await (await GetMongoQueryableAsync<EntityTag>(cancellationToken))
.Where(q => tagIds.Contains(q.TagId))
.GroupBy(q => q.TagId)
.Select(q => new { TagId = q.Key, Count = q.Count() })
.OrderByDescending(q => q.Count)
.Take(maxCount)
.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken));
return (from entityTagId in entityTagCounts
let tag = tags.FirstOrDefault(x => x.Id == entityTagId.TagId)
where tag != null
select new PopularTag(tag.Id, tag.Name, entityTagId.Count)).ToList();
}
public virtual async Task<List<Tag>> GetListAsync(string filter, CancellationToken cancellationToken = default)
{

10
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Blogs/BlogPostPublicClientProxy.Generated.cs

@ -1,17 +1,19 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Blogs;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Public.Blogs;
using Volo.CmsKit.Users;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Blogs.ClientProxies;
namespace Volo.CmsKit.Public.Blogs;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogPostPublicAppService), typeof(BlogPostPublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Blogs/BlogPostPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of BlogPostPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Blogs.ClientProxies;
namespace Volo.CmsKit.Public.Blogs;
public partial class BlogPostPublicClientProxy
{

8
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs

@ -1,15 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Comments.ClientProxies;
namespace Volo.CmsKit.Public.Comments;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of CommentPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Comments.ClientProxies;
namespace Volo.CmsKit.Public.Comments;
public partial class CommentPublicClientProxy
{

8
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/GlobalResourcePublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicClientProxy.Generated.cs

@ -1,15 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.GlobalResources;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.GlobalResources.ClientProxies;
namespace Volo.CmsKit.Public.GlobalResources;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IGlobalResourcePublicAppService), typeof(GlobalResourcePublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/GlobalResourcePublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of GlobalResourcePublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.GlobalResources.ClientProxies;
namespace Volo.CmsKit.Public.GlobalResources;
public partial class GlobalResourcePublicClientProxy
{

11
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Menus/MenuItemPublicClientProxy.Generated.cs

@ -1,17 +1,18 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Menus;
using System.Collections.Generic;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Menus;
using Volo.CmsKit.Public.Menus;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Menus.ClientProxies;
namespace Volo.CmsKit.Public.Menus;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMenuItemPublicAppService), typeof(MenuItemPublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Menus/MenuItemPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of MenuItemPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Menus.ClientProxies;
namespace Volo.CmsKit.Public.Menus;
public partial class MenuItemPublicClientProxy
{

10
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Pages/PagesPublicClientProxy.Generated.cs

@ -1,16 +1,18 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Pages;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Public.Pages;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Pages.ClientProxies;
namespace Volo.CmsKit.Public.Pages;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPagePublicAppService), typeof(PagesPublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Pages/PagesPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of PagesPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Pages.ClientProxies;
namespace Volo.CmsKit.Public.Pages;
public partial class PagesPublicClientProxy
{

9
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs

@ -1,16 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Ratings;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Ratings.ClientProxies;
namespace Volo.CmsKit.Public.Ratings;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of RatingPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Ratings.ClientProxies;
namespace Volo.CmsKit.Public.Ratings;
public partial class RatingPublicClientProxy
{

8
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Reactions/ReactionPublicClientProxy.Generated.cs

@ -1,15 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Reactions;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Reactions.ClientProxies;
namespace Volo.CmsKit.Public.Reactions;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IReactionPublicAppService), typeof(ReactionPublicClientProxy))]

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Reactions/ReactionPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of ReactionPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Reactions.ClientProxies;
namespace Volo.CmsKit.Public.Reactions;
public partial class ReactionPublicClientProxy
{

18
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Tags/TagPublicClientProxy.Generated.cs

@ -1,16 +1,17 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Tags;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Tags.ClientProxies;
namespace Volo.CmsKit.Public.Tags;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITagAppService), typeof(TagPublicClientProxy))]
@ -24,4 +25,13 @@ public partial class TagPublicClientProxy : ClientProxyBase<ITagAppService>, ITa
{ typeof(string), entityId }
});
}
public virtual async Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount)
{
return await RequestAsync<List<PopularTagDto>>(nameof(GetPopularTagsAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(int), maxCount }
});
}
}

2
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.cs → modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Tags/TagPublicClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of TagPublicClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Tags.ClientProxies;
namespace Volo.CmsKit.Public.Tags;
public partial class TagPublicClientProxy
{

581
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json

@ -8,11 +8,65 @@
"controllerName": "TagPublic",
"controllerGroupName": "TagPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Tags.TagPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Tags.ITagAppService"
"type": "Volo.CmsKit.Tags.ITagAppService",
"name": "ITagAppService",
"methods": [
{
"name": "GetAllRelatedTagsAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.CmsKit.Tags.TagDto>",
"typeSimple": "[Volo.CmsKit.Tags.TagDto]"
}
},
{
"name": "GetPopularTagsAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "maxCount",
"typeAsString": "System.Int32, System.Private.CoreLib",
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.CmsKit.Tags.PopularTagDto>",
"typeSimple": "[Volo.CmsKit.Tags.PopularTagDto]"
}
}
]
}
],
"actions": {
@ -72,6 +126,65 @@
},
"allowAnonymous": null,
"implementFrom": "Volo.CmsKit.Tags.ITagAppService"
},
"GetPopularTagsAsyncByEntityTypeAndMaxCount": {
"uniqueName": "GetPopularTagsAsyncByEntityTypeAndMaxCount",
"name": "GetPopularTagsAsync",
"httpMethod": "GET",
"url": "api/cms-kit-public/tags/popular/{entityType}/{maxCount}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "maxCount",
"typeAsString": "System.Int32, System.Private.CoreLib",
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "entityType",
"name": "entityType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "maxCount",
"name": "maxCount",
"jsonName": null,
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [
"IntRouteConstraint"
],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.CmsKit.Tags.PopularTagDto>",
"typeSimple": "[Volo.CmsKit.Tags.PopularTagDto]"
},
"allowAnonymous": null,
"implementFrom": "Volo.CmsKit.Tags.ITagAppService"
}
}
},
@ -79,11 +192,106 @@
"controllerName": "ReactionPublic",
"controllerGroupName": "ReactionPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Reactions.ReactionPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Reactions.IReactionPublicAppService"
"type": "Volo.CmsKit.Public.Reactions.IReactionPublicAppService",
"name": "IReactionPublicAppService",
"methods": [
{
"name": "GetForSelectionAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Reactions.ReactionWithSelectionDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Reactions.ReactionWithSelectionDto>"
}
},
{
"name": "CreateAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "reaction",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
},
{
"name": "DeleteAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "reaction",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
}
]
}
],
"actions": {
@ -304,11 +512,98 @@
"controllerName": "RatingPublic",
"controllerGroupName": "RatingPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Ratings.RatingPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService"
"type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService",
"name": "IRatingPublicAppService",
"methods": [
{
"name": "CreateAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput",
"typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Public.Ratings.RatingDto",
"typeSimple": "Volo.CmsKit.Public.Ratings.RatingDto"
}
},
{
"name": "DeleteAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
},
{
"name": "GetGroupedStarCountsAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.CmsKit.Public.Ratings.RatingWithStarCountDto>",
"typeSimple": "[Volo.CmsKit.Public.Ratings.RatingWithStarCountDto]"
}
}
]
}
],
"actions": {
@ -509,11 +804,40 @@
"controllerName": "PagesPublic",
"controllerGroupName": "PagesPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Pages.PagesPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Pages.IPagePublicAppService"
"type": "Volo.CmsKit.Public.Pages.IPagePublicAppService",
"name": "IPagePublicAppService",
"methods": [
{
"name": "FindBySlugAsync",
"parametersOnMethod": [
{
"name": "slug",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Contents.PageDto",
"typeSimple": "Volo.CmsKit.Contents.PageDto"
}
},
{
"name": "FindDefaultHomePageAsync",
"parametersOnMethod": [],
"returnValue": {
"type": "Volo.CmsKit.Contents.PageDto",
"typeSimple": "Volo.CmsKit.Contents.PageDto"
}
}
]
}
],
"actions": {
@ -575,11 +899,23 @@
"controllerName": "MenuItemPublic",
"controllerGroupName": "MenuItemPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Menus.MenuItemPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Menus.IMenuItemPublicAppService"
"type": "Volo.CmsKit.Public.Menus.IMenuItemPublicAppService",
"name": "IMenuItemPublicAppService",
"methods": [
{
"name": "GetListAsync",
"parametersOnMethod": [],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.CmsKit.Menus.MenuItemDto>",
"typeSimple": "[Volo.CmsKit.Menus.MenuItemDto]"
}
}
]
}
],
"actions": {
@ -604,11 +940,31 @@
"controllerName": "GlobalResourcePublic",
"controllerGroupName": "GlobalResourcePublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.GlobalResources.GlobalResourcePublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.GlobalResources.IGlobalResourcePublicAppService"
"type": "Volo.CmsKit.Public.GlobalResources.IGlobalResourcePublicAppService",
"name": "IGlobalResourcePublicAppService",
"methods": [
{
"name": "GetGlobalScriptAsync",
"parametersOnMethod": [],
"returnValue": {
"type": "Volo.CmsKit.Public.GlobalResources.GlobalResourceDto",
"typeSimple": "Volo.CmsKit.Public.GlobalResources.GlobalResourceDto"
}
},
{
"name": "GetGlobalStyleAsync",
"parametersOnMethod": [],
"returnValue": {
"type": "Volo.CmsKit.Public.GlobalResources.GlobalResourceDto",
"typeSimple": "Volo.CmsKit.Public.GlobalResources.GlobalResourceDto"
}
}
]
}
],
"actions": {
@ -648,11 +1004,115 @@
"controllerName": "CommentPublic",
"controllerGroupName": "CommentPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Comments.CommentPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService"
"type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService",
"name": "ICommentPublicAppService",
"methods": [
{
"name": "GetListAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Comments.CommentWithDetailsDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Comments.CommentWithDetailsDto>"
}
},
{
"name": "CreateAsync",
"parametersOnMethod": [
{
"name": "entityType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "entityId",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Comments.CreateCommentInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Comments.CreateCommentInput",
"typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Public.Comments.CommentDto",
"typeSimple": "Volo.CmsKit.Public.Comments.CommentDto"
}
},
{
"name": "UpdateAsync",
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Comments.UpdateCommentInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Comments.UpdateCommentInput",
"typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Public.Comments.CommentDto",
"typeSimple": "Volo.CmsKit.Public.Comments.CommentDto"
}
},
{
"name": "DeleteAsync",
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
}
]
}
],
"actions": {
@ -890,11 +1350,116 @@
"controllerName": "BlogPostPublic",
"controllerGroupName": "BlogPostPublic",
"isRemoteService": true,
"isIntegrationService": false,
"apiVersion": null,
"type": "Volo.CmsKit.Public.Blogs.BlogPostPublicController",
"interfaces": [
{
"type": "Volo.CmsKit.Public.Blogs.IBlogPostPublicAppService"
"type": "Volo.CmsKit.Public.Blogs.IBlogPostPublicAppService",
"name": "IBlogPostPublicAppService",
"methods": [
{
"name": "GetListAsync",
"parametersOnMethod": [
{
"name": "blogSlug",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Blogs.BlogPostGetListInput, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Blogs.BlogPostGetListInput",
"typeSimple": "Volo.CmsKit.Public.Blogs.BlogPostGetListInput",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.PagedResultDto<Volo.CmsKit.Contents.BlogPostCommonDto>",
"typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto<Volo.CmsKit.Contents.BlogPostCommonDto>"
}
},
{
"name": "GetAsync",
"parametersOnMethod": [
{
"name": "blogSlug",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "blogPostSlug",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Contents.BlogPostCommonDto",
"typeSimple": "Volo.CmsKit.Contents.BlogPostCommonDto"
}
},
{
"name": "GetAuthorsHasBlogPostsAsync",
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.CmsKit.Public.Blogs.BlogPostFilteredPagedAndSortedResultRequestDto, Volo.CmsKit.Public.Application.Contracts",
"type": "Volo.CmsKit.Public.Blogs.BlogPostFilteredPagedAndSortedResultRequestDto",
"typeSimple": "Volo.CmsKit.Public.Blogs.BlogPostFilteredPagedAndSortedResultRequestDto",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.PagedResultDto<Volo.CmsKit.Users.CmsUserDto>",
"typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto<Volo.CmsKit.Users.CmsUserDto>"
}
},
{
"name": "GetAuthorHasBlogPostAsync",
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Volo.CmsKit.Users.CmsUserDto",
"typeSimple": "Volo.CmsKit.Users.CmsUserDto"
}
},
{
"name": "DeleteAsync",
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
}
}
]
}
],
"actions": {

7
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs

@ -30,4 +30,11 @@ public class TagPublicController : CmsKitPublicControllerBase, ITagAppService
{
return TagAppService.GetAllRelatedTagsAsync(entityType, entityId);
}
[HttpGet]
[Route("popular/{entityType}/{maxCount:int}")]
public Task<List<PopularTagDto>> GetPopularTagsAsync(string entityType, int maxCount)
{
return TagAppService.GetPopularTagsAsync(entityType, maxCount);
}
}

29
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/Default.cshtml

@ -0,0 +1,29 @@
@inject IHtmlLocalizer<CmsKitResource> L
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.CmsKit.Localization
@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.PopularTags.PopularTagsViewComponent.PopularTagsViewModel
@if (Model.Tags != null && Model.Tags.Any())
{
<h4 class="mb-3 fw--6">@L["PopularTags"]</h4>
<div class="cms-tags-area my-3">
@foreach (var tag in Model.Tags)
{
if (Model.UrlFormat.IsNullOrWhiteSpace())
{
<span class="br-8 me-2 mb-2 p-2 d-inline-block cmskit-tag fw--5" data-count="@tag.Count">
@tag.Name
</span>
}
else
{
<a href="@Model.UrlFormat.Replace("{TagId}", tag.Id.ToString()).Replace("{TagName}",tag.Name)">
<span class="br-8 me-2 mb-2 p-2 d-inline-block cmskit-tag fw--5" data-count="@tag.Count">
@tag.Name
</span>
</a>
}
}
</div>
}

39
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/PopularTagsViewComponent.cs

@ -0,0 +1,39 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.PopularTags;
[Widget(
StyleFiles = new[]
{
"/Pages/CmsKit/Shared/Components/PopularTags/default.css"
})]
public class PopularTagsViewComponent : AbpViewComponent
{
private readonly ITagAppService _tagAppService;
public PopularTagsViewComponent(ITagAppService tagAppService)
{
_tagAppService = tagAppService;
}
public virtual async Task<IViewComponentResult> InvokeAsync(string entityType, int maxCount, string urlFormat)
{
var model = new PopularTagsViewModel
{
Tags = await _tagAppService.GetPopularTagsAsync(entityType, maxCount),
UrlFormat = urlFormat
};
return View("~/Pages/CmsKit/Shared/Components/PopularTags/Default.cshtml", model);
}
public class PopularTagsViewModel
{
public List<PopularTagDto> Tags { get; set; }
public string UrlFormat { get; set; }
}
}

4
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/PopularTags/default.css

@ -0,0 +1,4 @@
.cmskit-tag {
background: #eeedf7;
color: #766bc8
}

2
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml

@ -16,7 +16,7 @@
}
else
{
var formattedUrl = Model.UrlFormat.Replace("{TagId}", tag.Id.ToString());
var formattedUrl = Model.UrlFormat.Replace("{TagId}", tag.Id.ToString()).Replace("{TagName}", tag.Name);
<a href="@formattedUrl"><span class="badge rounded-pill bg-light text-dark px-3 py-2 cmskit-tag font-weight-normal">@tag.Name</span></a>
}
}

9
modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagPublicAppService_Tests.cs

@ -43,4 +43,13 @@ public class TagPublicAppService_Tests : CmsKitApplicationTestBase
list.ShouldBeEmpty();
}
[Fact]
public async Task GetPopularTagsAsync()
{
var list = await _tagAppService.GetPopularTagsAsync(_cmsKitTestData.Content_1_EntityType, 2);
list.ShouldNotBeEmpty();
list.Count.ShouldBe(2);
}
}

10
modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs

@ -129,4 +129,14 @@ public abstract class TagRepository_Test<TStartupModule> : CmsKitTestBase<TStart
count.ShouldBe(1);
}
[Fact]
public async Task Should_Get_Popular_Tags()
{
var popularTags = await _tagRepository.GetPopularTagsAsync(_cmsKitTestData.Content_1_EntityType, 2);
popularTags.Count.ShouldBe(2);
_cmsKitTestData.Content_1_Tags.Contains(popularTags[0].Name).ShouldBeTrue();
_cmsKitTestData.Content_1_Tags.Contains(popularTags[1].Name).ShouldBeTrue();
}
}

Loading…
Cancel
Save