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 @@ - + diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index 3fd77f45a1..5b713a52ab 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", @@ -600,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" } } 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: ` t.ComponentType != PageLayout.ToolbarItems[i].ComponentType).Any(); + } protected async override Task OnInitializedAsync() { 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) 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 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(); + } } 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": "" 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." } } 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) 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 }); }; 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 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