From 2bede22f7ec2a385fd759b5990cb93d51916924d Mon Sep 17 00:00:00 2001 From: muhammedaltug Date: Tue, 15 Nov 2022 13:16:29 +0300 Subject: [PATCH 1/4] fix abp tree value update --- .../tree/src/lib/components/tree.component.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts b/npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts index 24e2c8128a..c61b9c3f22 100644 --- a/npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts +++ b/npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts @@ -3,12 +3,11 @@ import { ContentChild, EventEmitter, Input, - OnChanges, Output, TemplateRef, ViewEncapsulation, } from '@angular/core'; -import { NzFormatEmitEvent, NzFormatBeforeDropEvent } from 'ng-zorro-antd/tree'; +import { NzFormatBeforeDropEvent, NzFormatEmitEvent } from 'ng-zorro-antd/tree'; import { of } from 'rxjs'; import { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive'; import { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive'; @@ -25,7 +24,7 @@ export type DropEvent = NzFormatEmitEvent & { pos: number }; ], encapsulation: ViewEncapsulation.None, }) -export class TreeComponent implements OnChanges { +export class TreeComponent { dropPosition: number; dropdowns = {} as { [key: string]: NgbDropdown }; @@ -46,30 +45,26 @@ export class TreeComponent implements OnChanges { @Input() expandedKeys: string[] = []; @Input() selectedNode: any; @Input() changeCheckboxWithNode: boolean; - @Input() changedNodeValues = []; @Input() isNodeSelected = node => this.selectedNode?.id === node.key; @Input() beforeDrop = (event: NzFormatBeforeDropEvent) => { this.dropPosition = event.pos; return of(false); }; - ngOnChanges() { - this.checkedKeys = [...this.changedNodeValues]; - } - onSelectedNodeChange(node) { this.selectedNode = node.origin.entity; if (this.changeCheckboxWithNode) { this.selectedNodeChange.emit(node); - this.checkedKeys = [...this.changedNodeValues]; - this.checkedKeysChange.emit(this.changedNodeValues); + const newVal = [...this.checkedKeys, node.key]; + this.checkedKeys = newVal; + this.checkedKeysChange.emit(newVal); } else { this.selectedNodeChange.emit(node.origin.entity); } } onCheckboxChange(event) { - this.checkedKeys = this.changedNodeValues = [...event.keys]; + this.checkedKeys = [...event.keys]; this.checkedKeysChange.emit(event.keys); } From d5bdef86c64ec7a70b87f1e3acf8f0059c5ed621 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 23 Nov 2022 10:05:12 +0800 Subject: [PATCH 2/4] Add AbpMauiBlazorClientHttpMessageHandler --- ...bp.AspNetCore.Components.MauiBlazor.csproj | 1 + ...AbpAspNetCoreComponentsMauiBlazorModule.cs | 8 ++- .../AbpMauiBlazorClientHttpMessageHandler.cs | 55 +++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpMauiBlazorClientHttpMessageHandler.cs diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj index b1b9dcde81..5340bdfb1c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo.Abp.AspNetCore.Components.MauiBlazor.csproj @@ -11,6 +11,7 @@ false false false + true diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpAspNetCoreComponentsMauiBlazorModule.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpAspNetCoreComponentsMauiBlazorModule.cs index e7d116b5cc..9772db6a92 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpAspNetCoreComponentsMauiBlazorModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpAspNetCoreComponentsMauiBlazorModule.cs @@ -9,9 +9,15 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client; using Volo.Abp.Modularity; using Volo.Abp.Threading; +using Volo.Abp.UI; namespace Volo.Abp.AspNetCore.Components.MauiBlazor; +[DependsOn( + typeof(AbpAspNetCoreMvcClientCommonModule), + typeof(AbpUiModule), + typeof(AbpAspNetCoreComponentsWebModule) +)] public class AbpAspNetCoreComponentsMauiBlazorModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) @@ -20,7 +26,7 @@ public class AbpAspNetCoreComponentsMauiBlazorModule : AbpModule { options.ProxyClientBuildActions.Add((_, builder) => { - builder.AddHttpMessageHandler(); + builder.AddHttpMessageHandler(); }); }); } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpMauiBlazorClientHttpMessageHandler.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpMauiBlazorClientHttpMessageHandler.cs new file mode 100644 index 0000000000..5520eed966 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/AbpMauiBlazorClientHttpMessageHandler.cs @@ -0,0 +1,55 @@ +using System; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Maui.Storage; +using Volo.Abp.AspNetCore.Components.Progression; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor; + +public class AbpMauiBlazorClientHttpMessageHandler : DelegatingHandler, ITransientDependency +{ + private readonly IUiPageProgressService _uiPageProgressService; + + private const string SelectedLanguageName = "Abp.SelectedLanguage"; + + public AbpMauiBlazorClientHttpMessageHandler(IClientScopeServiceProviderAccessor clientScopeServiceProviderAccessor) + { + _uiPageProgressService = clientScopeServiceProviderAccessor.ServiceProvider.GetRequiredService(); + } + + protected async override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + try + { + await _uiPageProgressService.Go(null, options => + { + options.Type = UiPageProgressType.Info; + }); + + await SetLanguageAsync(request); + + return await base.SendAsync(request, cancellationToken); + } + finally + { + await _uiPageProgressService.Go(-1); + } + } + + private Task SetLanguageAsync(HttpRequestMessage request) + { + var selectedLanguage = Preferences.Get(SelectedLanguageName, string.Empty); + + if (!selectedLanguage.IsNullOrWhiteSpace()) + { + request.Headers.AcceptLanguage.Clear(); + request.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(selectedLanguage)); + } + + return Task.CompletedTask; + } +} \ No newline at end of file From fbee84c1dd481afc87f76b54a1d23abdd948ccd3 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 23 Nov 2022 10:16:51 +0800 Subject: [PATCH 3/4] Update build-all.ps1 --- build/build-all.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/build-all.ps1 b/build/build-all.ps1 index f0b2f398db..c8b37ec33c 100644 --- a/build/build-all.ps1 +++ b/build/build-all.ps1 @@ -7,6 +7,7 @@ $full = $args[0] Write-Host $solutionPaths dotnet workload install wasm-tools +dotnet workload install maui-tizen foreach ($solutionPath in $solutionPaths) { $solutionAbsPath = (Join-Path $rootFolder $solutionPath) From 77cedad837e5d32e91404664213b1a23a029ec79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20KILI=C3=87?= Date: Wed, 23 Nov 2022 10:40:52 +0300 Subject: [PATCH 4/4] change audit logging en.json localization --- .../Abp/AuditLogging/Localization/en.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 5de7585e30..b37e3793c0 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 @@ -5,31 +5,31 @@ "Permission:AuditLogs": "Audit Logs", "Menu:AuditLogging": "Audit Logs", "AuditLogs": "Audit Logs", - "HttpStatus": "Http Status", - "HttpMethod": "Http Method", - "HttpMethodFilter": "Http Method Filter", - "HttpRequest": "Http Request", + "HttpStatus": "HTTP Status", + "HttpMethod": "HTTP Method", + "HttpMethodFilter": "HTTP Method Filter", + "HttpRequest": "HTTP Request", "User": "User", "UserNameFilter": "User Filter", "HasException": "Has Exception", - "IpAddress": "Ip Address", + "IpAddress": "IP Address", "Time": "Time", "Duration": "Duration", "Detail": "Detail", "Overall": "Overall", "Actions": "Actions", - "ClientIpAddress": "Client Ip Address", + "ClientIpAddress": "Client IP Address", "ClientName": "Client Name", "BrowserInfo": "Browser Info", - "Url": "Url", + "Url": "URL", "UserName": "User Name", "TenantImpersonator": "Tenant Impersonator", "UserImpersonator": "User Impersonator", - "UrlFilter": "Url Filter", + "UrlFilter": "URL Filter", "Exceptions": "Exceptions", "Comments": "Comments", - "HttpStatusCode": "Http Status Code", - "HttpStatusCodeFilter": "Http Status Code Filter", + "HttpStatusCode": "HTTP Status Code", + "HttpStatusCodeFilter": "HTTP Status Code Filter", "ServiceName": "Service", "MethodName": "Method", "CorrelationId": "Correlation Id",