From c06b08b964af00ef43badeb087e956e1a02353ae Mon Sep 17 00:00:00 2001 From: Salih Date: Wed, 13 Mar 2024 18:14:15 +0300 Subject: [PATCH 01/14] Rearrange template menus --- .../Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs index b17e595442..ede01b4813 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs @@ -114,7 +114,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor l["Cms"], icon: "far fa-newspaper"); - context.Menu.AddItem(cmsMenu); + context.Menu.GetAdministration().AddItem(cmsMenu); } foreach (var menu in cmsMenus) From 8ef5e714cd1583b953ec3bf58a6360aa1bb316f5 Mon Sep 17 00:00:00 2001 From: Volosoft Agent <43883821+voloagent@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:27:08 +0300 Subject: [PATCH 02/14] Update latest-versions.json to version 8.0.5 --- latest-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latest-versions.json b/latest-versions.json index 7752a099aa..8765e9bfa4 100644 --- a/latest-versions.json +++ b/latest-versions.json @@ -1,6 +1,6 @@ [ { - "version": "8.0.4", + "version": "8.0.5", "releaseDate": "", "type": "stable", "message": "" From ec43e96d952e61ff625b5aa7d22bdbb7f7a9b93f Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 15 Mar 2024 17:14:48 +0800 Subject: [PATCH 03/14] Recursively check if the `ValueObject` are `ValueEquals`. Resolve #19312 --- .../Volo/Abp/Domain/Values/ValueObject.cs | 12 +++- .../Abp/Domain/Values/AddressWithZipCode.cs | 63 +++++++++++++++++++ .../Abp/Domain/Values/ValueObject_Tests.cs | 16 +++++ 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/AddressWithZipCode.cs diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs index 4c9dab3487..acc0dcd59a 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; namespace Volo.Abp.Domain.Values; @@ -30,7 +31,14 @@ public abstract class ValueObject return false; } - if (thisValues.Current != null && !thisValues.Current.Equals(otherValues.Current)) + if (thisValues.Current is ValueObject currentValueObject && otherValues.Current is ValueObject otherValueObject) + { + if (!currentValueObject.ValueEquals(otherValueObject)) + { + return false; + } + } + else if (thisValues.Current != null && !thisValues.Current.Equals(otherValues.Current)) { return false; } diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/AddressWithZipCode.cs b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/AddressWithZipCode.cs new file mode 100644 index 0000000000..84f65d4128 --- /dev/null +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/AddressWithZipCode.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.Domain.Values; + +public class AddressWithZipCode : ValueObject +{ + public Guid CityId { get; } + + public string Street { get; } + + public int Number { get; } + + public ZipCode ZipCode { get; } + + public string[] Tags { get; } + + private AddressWithZipCode() + { + } + + public AddressWithZipCode( + Guid cityId, + string street, + int number, + ZipCode zipCode, + params string[] tags) + { + CityId = cityId; + Street = street; + Number = number; + ZipCode = zipCode; + Tags = tags; + } + + //Requires to implement this method to return properties. + protected override IEnumerable GetAtomicValues() + { + yield return Street; + yield return CityId; + yield return Number; + yield return ZipCode; + foreach (var tag in Tags) + { + yield return tag; + } + } +} + +public class ZipCode : ValueObject +{ + public string Code { get; } + + public ZipCode(string code) + { + Code = code; + } + + protected override IEnumerable GetAtomicValues() + { + yield return Code; + } +} diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/ValueObject_Tests.cs b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/ValueObject_Tests.cs index 11b2581437..97145c17a9 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/ValueObject_Tests.cs +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Values/ValueObject_Tests.cs @@ -37,4 +37,20 @@ public class ValueObject_Tests emailAddress1.ValueEquals(emailAddress2).ShouldBeFalse(); } + + [Fact] + public void ValueObjects_Recursively_ValueEquals() + { + var cityId = Guid.NewGuid(); + + var address1 = new AddressWithZipCode(cityId, "Baris Manco", 42, new ZipCode("0000001"), "home", "office"); + var address2 = new AddressWithZipCode(cityId, "Baris Manco", 42, new ZipCode("0000001"), "home", "office"); + + address1.ValueEquals(address2).ShouldBeTrue(); + + address1 = new AddressWithZipCode(cityId, "Baris Manco", 42, new ZipCode("0000001"), "home", "office"); + address2 = new AddressWithZipCode(cityId, "Baris Manco", 42, new ZipCode("0000002"), "home", "office"); + + address1.ValueEquals(address2).ShouldBeFalse(); + } } From 66b8676dd0b04d749a7659df642056717861a60c Mon Sep 17 00:00:00 2001 From: Sinan997 Date: Fri, 15 Mar 2024 12:16:43 +0300 Subject: [PATCH 04/14] Update chart.js version and add plugins to ChartComponent --- npm/ng-packs/package.json | 2 +- .../packages/components/chart.js/src/chart.component.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 6b46fa897a..462a592a11 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -93,7 +93,7 @@ "autoprefixer": "^10.0.0", "bootstrap": "^5.0.0", "bootstrap-icons": "^1.0.0", - "chart.js": "^3.0.0", + "chart.js": "^4.0.0", "cypress": "^7.0.0", "dotenv": "10.0.0", "eslint": "8.48.0", diff --git a/npm/ng-packs/packages/components/chart.js/src/chart.component.ts b/npm/ng-packs/packages/components/chart.js/src/chart.component.ts index ac839d86c4..fe6015ba2b 100644 --- a/npm/ng-packs/packages/components/chart.js/src/chart.component.ts +++ b/npm/ng-packs/packages/components/chart.js/src/chart.component.ts @@ -101,6 +101,7 @@ export class ChartComponent implements AfterViewInit, OnDestroy, OnChanges { type: this.type as any, data: this.data, options: this.options, + plugins: this.plugins }); }; From 343180d0ee0a8ce1519576ad51263ae4e7f6da8e Mon Sep 17 00:00:00 2001 From: Sinan997 Date: Fri, 15 Mar 2024 15:17:17 +0300 Subject: [PATCH 05/14] Add plugins example to chart documentation --- docs/en/UI/Angular/Chart-Component.md | 97 +++++++++++++++------------ 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/docs/en/UI/Angular/Chart-Component.md b/docs/en/UI/Angular/Chart-Component.md index d165261e18..e2bf2c2e1e 100644 --- a/docs/en/UI/Angular/Chart-Component.md +++ b/docs/en/UI/Angular/Chart-Component.md @@ -11,8 +11,8 @@ First of all, need to import the `ChartModule` to your feature module as follows ```ts // your-feature.module.ts -import { ChartModule } from '@abp/ng.components/chart.js'; -import { ChartDemoComponent } from './chart-demo.component'; +import { ChartModule } from "@abp/ng.components/chart.js"; +import { ChartDemoComponent } from "./chart-demo.component"; @NgModule({ imports: [ @@ -30,20 +30,20 @@ Then, `abp-chart` component can be used. See an example: ```ts // chart-demo.component.ts -import { Component } from '@angular/core'; +import { Component } from "@angular/core"; @Component({ - selector: 'app-chart-demo', + selector: "app-chart-demo", template: ` `, }) export class ChartDemoComponent { data = { - labels: ['Data 1', 'Data 2', 'Data 3'], + labels: ["Data 1", "Data 2", "Data 3"], datasets: [ { - label: 'Dataset 1', + label: "Dataset 1", data: [40, 15, 45], - backgroundColor: ['#ff7675', '#fdcb6e', '#0984e3'], + backgroundColor: ["#ff7675", "#fdcb6e", "#0984e3"], }, ], }; @@ -61,10 +61,10 @@ See the result: ### Doughnut ```ts -import { Component } from '@angular/core'; +import { Component } from "@angular/core"; @Component({ - selector: 'app-chart-demo', + selector: "app-chart-demo", template: ` `, }) export class ChartDemoComponent { data = { - labels: ['Data 1', 'Data 2', 'Data 3'], + labels: ["Data 1", "Data 2", "Data 3"], datasets: [ { - label: 'Dataset 1', + label: "Dataset 1", data: [40, 15, 45], - backgroundColor: ['#a0e6c3', '#f0ea4c', '#5b9dc3'], + backgroundColor: ["#a0e6c3", "#f0ea4c", "#5b9dc3"], }, ], }; @@ -91,14 +92,22 @@ export class ChartDemoComponent { plugins: { title: { display: true, - text: 'Doughnut Chart', + text: "Doughnut Chart", fontSize: 16, }, legend: { - position: 'bottom', + position: "bottom", }, }, }; + + myPlugin = [ + { + afterRender: (chart, args, options) => { + console.log("chart has been rendered"); + }, + }, + ]; } ``` @@ -109,10 +118,10 @@ Result: ### Bar ```ts -import { Component } from '@angular/core'; +import { Component } from "@angular/core"; @Component({ - selector: 'app-chart-demo', + selector: "app-chart-demo", template: ` Date: Fri, 15 Mar 2024 15:21:23 +0300 Subject: [PATCH 06/14] Add Audit Logs deletion localizations --- .../Volo/Abp/AuditLogging/Localization/en.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json index 70cbcc291a..76cfcc5b6a 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/Localization/en.json @@ -91,6 +91,8 @@ "DisplayName:IsExpiredDeleterEnabled": "Enable clean up service", "Description:IsExpiredDeleterEnabled": "If this option is enable expired items deleted automatically.", "DisplayName:ExpiredDeleterPeriod": "Expired item deletion period", - "Description:ExpiredDeleterPeriod": "Set the number of days after which expired items will be automatically deleted." + "Description:ExpiredDeleterPeriod": "Set the number of days after which expired items will be automatically deleted.", + "ExpiredDeleterPeriodUnit": "day(s)", + "AuditLogsBeforeXWillBeDeleted": "Audit logs before {0} will be deleted." } } From 508bfae3d751f3e3ffcf287e0f446cb7799e3b4a Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Fri, 15 Mar 2024 15:58:25 +0300 Subject: [PATCH 07/14] Update AbpExtensibleDataGrid.razor --- .../Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor index 522140811e..b38f4afaa9 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/AbpExtensibleDataGrid.razor @@ -23,7 +23,7 @@ - No data available + No data available From 1edb03f55ba346687f04bf0bbb00d245b2c73512 Mon Sep 17 00:00:00 2001 From: Salih Date: Fri, 15 Mar 2024 22:28:36 +0300 Subject: [PATCH 08/14] Update en.json --- .../AbpIoLocalization/Admin/Localization/Resources/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index 2f806ea797..3fed174714 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -283,6 +283,7 @@ "ChooseCoverImage": "Choose a cover image...", "Menu:Quotation": "Quotation", "Menu:Invoice": "Invoice", + "Menu:Quotation/Invoice": "Quotation/Invoice", "Menu:PaymentRequests": "Payment Requests", "Permission:PaymentRequests": "Payment Requests", "PaymentRequests": "Payment Requests", From 2a3b5c74c53ef619a02612fafe1e41b2c94d7647 Mon Sep 17 00:00:00 2001 From: maliming Date: Sat, 16 Mar 2024 18:16:08 +0800 Subject: [PATCH 09/14] Update `Pomelo.EntityFrameworkCore.MySql` to `8.0.2`. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index c39ba6790b..4787ed47bc 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -122,7 +122,7 @@ - + From 90e0c47a6a11e206f8f6bc0c130190d525c2e34d Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 18 Mar 2024 15:42:24 +0800 Subject: [PATCH 10/14] Prevent Toolbar flickering problem --- .../Layout/PageHeader.razor.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageHeader.razor.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageHeader.razor.cs index 91485d5bf8..76bffc43a8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageHeader.razor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageHeader.razor.cs @@ -57,6 +57,12 @@ public partial class PageHeader : ComponentBase if (Toolbar != null) { var toolbarItems = await PageToolbarManager.GetItemsAsync(Toolbar); + + if (!ShouldRenderToolbarItems(toolbarItems)) + { + return; + } + ToolbarItemRenders.Clear(); if (!Options.Value.RenderToolbar) @@ -88,6 +94,16 @@ public partial class PageHeader : ComponentBase } } } + + protected virtual bool ShouldRenderToolbarItems(PageToolbarItem[] items) + { + if (items.Length != PageLayout.ToolbarItems.Count) + { + return true; + } + + return items.Where((t, i) => t.ComponentType != PageLayout.ToolbarItems[i].ComponentType).Any(); + } protected async override Task OnInitializedAsync() { From 2039c62d313611b9d584fb93af08381d02b83fa8 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Mon, 18 Mar 2024 11:22:04 +0300 Subject: [PATCH 11/14] Remove ConfigureUI from MyProjectNameBlazorHostClientModule --- .../MyProjectNameBlazorHostClientModule.cs | 6 ------ 1 file changed, 6 deletions(-) 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 65f9488ba9..69bfb87723 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 @@ -76,12 +76,6 @@ public class MyProjectNameBlazorHostClientModule : AbpModule }); } - private static void ConfigureUI(WebAssemblyHostBuilder builder) - { - builder.RootComponents.Add("#ApplicationContainer"); - builder.RootComponents.Add("head::after"); - } - private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment) { context.Services.AddTransient(sp => new HttpClient From 9f64a46ac7200efc29aa349067cace7fbc519751 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Mon, 18 Mar 2024 11:32:48 +0300 Subject: [PATCH 12/14] Update MyProjectNameBlazorClientModule.cs --- .../MyProjectNameBlazorClientModule.cs | 6 ------ 1 file changed, 6 deletions(-) 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 d1eab9a3fd..6a71761ab7 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 @@ -81,12 +81,6 @@ public class MyProjectNameBlazorClientModule : AbpModule }); } - private static void ConfigureUI(WebAssemblyHostBuilder builder) - { - builder.RootComponents.Add("#ApplicationContainer"); - builder.RootComponents.Add("head::after"); - } - private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment) { context.Services.AddTransient(sp => new HttpClient From ee9e3cd720bc6b0dbe1d40c5fe3ebd9ebccbdffd Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Tue, 19 Mar 2024 10:08:02 +0300 Subject: [PATCH 13/14] Update bundle error color in AbpTagHelperResourceService.cs --- .../Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs index 9be91c535f..ea5ecc8edc 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs @@ -98,7 +98,7 @@ public abstract class AbpTagHelperResourceService : ITransientDependency protected virtual void AddErrorScript(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, BundleFile file, string bundleName) { - output.Content.AppendHtml($"{Environment.NewLine}"); + output.Content.AppendHtml($"{Environment.NewLine}"); } protected virtual string GenerateBundleName(List bundleItems) From 8d4ca7561524da2f4d982df06982c3f8067c7d15 Mon Sep 17 00:00:00 2001 From: Engincan VESKE <43685404+EngincanV@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:14:23 +0300 Subject: [PATCH 14/14] Update en.json --- .../AbpIoLocalization/Admin/Localization/Resources/en.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index 9c41f80e33..5b713a52ab 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -601,6 +601,10 @@ "NoChangesDetected": "No changes detected", "ProductCount": "Product Count", "Actions": "Actions", - "CreateInvoice": "Create Invoice" + "CreateInvoice": "Create Invoice", + "AllowedLicenses": "Allowed Licenses", + "AllowedModules": "Allowed Modules", + "ModuleName": "Module name", + "NonYet": "Non yet" } }