Merge branch 'rel-7.0' into Cmskit-set-paging-issue

pull/14786/head
malik masis 3 years ago
commit 684d86f3ce

@ -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)

@ -11,6 +11,7 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<UseMaui>true</UseMaui>
<RootNamespace />
</PropertyGroup>

@ -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<AbpBlazorClientHttpMessageHandler>();
builder.AddHttpMessageHandler<AbpMauiBlazorClientHttpMessageHandler>();
});
});
}

@ -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<IUiPageProgressService>();
}
protected async override Task<HttpResponseMessage> 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;
}
}

@ -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",

@ -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);
}

Loading…
Cancel
Save