Skip to content

Commit 0fb7ea5

Browse files
authored
Merge pull request #7 from Parziwal/fix/blazor-components
Fix blazor components issues +semver:patch
2 parents 6c18ba1 + 3e286c9 commit 0fb7ea5

28 files changed

+188
-243
lines changed

.github/workflows/AutSoftCore_CD.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ jobs:
3131

3232
- name: Restore dependencies
3333
run: dotnet restore
34-
34+
35+
# Reason for this build: https://github.com/microsoft/TypeScript/issues/42907
36+
- name: Build
37+
run: dotnet build --no-restore --configuration Release
38+
3539
- name: Pack
3640
run: dotnet pack --no-restore --configuration Release --output artifacts
3741

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,10 @@ MigrationBackup/
360360

361361
# Fody - auto-generated XML schema
362362
FodyWeavers.xsd
363+
364+
# JS files generated by Blazor projects at build
365+
**/AutSoft.AspNetCore.Blazor/wwwroot/app/AutSoft.AspNetCore.Blazor.js
366+
**/AutSoft.AspNetCore.Blazor/wwwroot/app/AutSoft.AspNetCore.Blazor.js.map
367+
368+
**/AutSoft.Mud.Blazor/wwwroot/app/AutSoft.Mud.Blazor.js
369+
**/AutSoft.Mud.Blazor/wwwroot/app/AutSoft.Mud.Blazor.js.map

pipelines/autsoft-core-packages-cd.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

pipelines/autsoft-core-packages-ci.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/AutSoft.All/ServiceCollectionExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using AutSoft.AspNetCore.Auth;
2-
using AutSoft.AspNetCore.Blazor;
32
using AutSoft.Common;
43
using AutSoft.Mud.Blazor;
54

@@ -20,7 +19,6 @@ public static IServiceCollection AddAutSoftAll(this IServiceCollection services)
2019
{
2120
services.AddAutSoftAspNetCoreAuth();
2221
services.AddAutSoftCommon();
23-
services.AddAutSoftAspNetCoreBlazor();
2422
services.AddAutSoftMudBlazor();
2523

2624
return services;

src/AutSoft.AspNetCore.Blazor/AutSoft.AspNetCore.Blazor.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Razor">
1+
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
@@ -26,7 +26,7 @@
2626

2727
<Target Name="RemoveTSConfigFileFromPackage" AfterTargets="CompileTypeScriptWithTSConfig">
2828
<ItemGroup>
29-
<Content Remove="**\tsconfig.json" />
29+
<Content Remove="tsconfig.json" />
3030
</ItemGroup>
3131
</Target>
3232
</Project>

src/AutSoft.AspNetCore.Blazor/Autocomplete/AutoCompleteDataSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task<IEnumerable<TKey>> SearchAsync(string search)
3939
/// <summary>
4040
/// Gets or sets the currently selected item.
4141
/// </summary>
42-
/// <param name="i">Index,</param>
42+
/// <param name="key">Index,</param>
4343
/// <returns>Item type.</returns>
4444
public TItem? this[TKey? key]
4545
{

src/AutSoft.AspNetCore.Blazor/Enumeration/EnumerationCache.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using AutSoft.Common.Concurrency;
2+
using AutSoft.Common.Enumeration;
23

34
using Microsoft.Extensions.Logging;
45

@@ -7,7 +8,7 @@ namespace AutSoft.AspNetCore.Blazor.Enumeration;
78
/// <inheritdoc />
89
public class EnumerationCache<TEnum> : IEnumerationCache<TEnum>, IDisposable where TEnum : Enum
910
{
10-
private readonly Dictionary<TEnum, List<EnumerationItem>> _enumerations = new();
11+
private readonly Dictionary<TEnum, List<EnumerationObjectItem>> _enumerations = new();
1112

1213
private readonly AsyncLock _downloadLock = new();
1314

@@ -57,23 +58,23 @@ private async Task TryEnsureHasCachedEnumerationAsync(params TEnum[] enumeration
5758
}
5859

5960
/// <inheritdoc />
60-
public async Task<string?> ResolveDisplayNameAsync(TEnum type, int key)
61+
public async Task<string?> ResolveDisplayNameAsync(TEnum type, int id)
6162
{
6263
await TryEnsureHasCachedEnumerationAsync(type);
6364

6465
if (!_enumerations.ContainsKey(type))
6566
return null;
6667

67-
return _enumerations[type].SingleOrDefault(i => i.Id == key)?.DisplayName;
68+
return _enumerations[type].SingleOrDefault(i => i.Id == id)?.DisplayName;
6869
}
6970

7071
/// <inheritdoc />
71-
public async Task<List<EnumerationItem>> ResolveEnumerationItemsAsync(TEnum type)
72+
public async Task<List<EnumerationObjectItem>> ResolveEnumerationItemsAsync(TEnum type)
7273
{
7374
await TryEnsureHasCachedEnumerationAsync(type);
7475

7576
if (!_enumerations.ContainsKey(type))
76-
return new List<EnumerationItem>();
77+
return new List<EnumerationObjectItem>();
7778

7879
return _enumerations[type];
7980
}

src/AutSoft.AspNetCore.Blazor/Enumeration/IEnumerationCache.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
using AutSoft.Common.Enumeration;
2+
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Threading.Tasks;
6+
17
namespace AutSoft.AspNetCore.Blazor.Enumeration;
28

39
/// <summary>
@@ -19,7 +25,7 @@ public interface IEnumerationCache<TEnum> where TEnum : Enum
1925
/// </summary>
2026
/// <param name="type">Enumeration type.</param>
2127
/// <returns>Enumeration items.</returns>
22-
Task<List<EnumerationItem>> ResolveEnumerationItemsAsync(TEnum type);
28+
Task<List<EnumerationObjectItem>> ResolveEnumerationItemsAsync(TEnum type);
2329

2430
/// <summary>
2531
/// Caches the specified enumeration types if they are not in the cache.

src/AutSoft.AspNetCore.Blazor/Enumeration/IEnumerationService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using AutSoft.Common.Enumeration;
2+
13
namespace AutSoft.AspNetCore.Blazor.Enumeration;
24

35
/// <summary>
@@ -11,5 +13,5 @@ public interface IEnumerationService<TEnum> where TEnum : Enum
1113
/// </summary>
1214
/// <param name="enumerationTypes">Enumeration types.</param>
1315
/// <returns>Values of the enumeration types.</returns>
14-
Task<List<Enumeration<TEnum>>> ListEnumerationsAsync(List<TEnum> enumerationTypes);
16+
Task<List<EnumerationObject<TEnum>>> ListEnumerationsAsync(List<TEnum> enumerationTypes);
1517
}

0 commit comments

Comments
 (0)