-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
304 changed files
with
5,868 additions
and
2,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
BlazorAppTest/Pages/HxInputDate_Issue859_OnBlur_Test.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@page "/hxinputdate_issue859_onblur_test" | ||
|
||
<h3>HxInputDate_Issue859_OnBlur_Test</h3> | ||
|
||
<HxInputDate Label="Date" @bind-Value="@_value" @onblur="Test" /> | ||
<HxFormValue Label="Value" Value="@_value.ToShortDateString()" /> | ||
|
||
@code { | ||
public DateTime _value { get; set; } | ||
|
||
private Task Test() | ||
{ | ||
Console.WriteLine("Test"); | ||
return Task.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,54 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Blazored.FluentValidation" Version="2.2.0" /> | ||
<PackageVersion Include="bunit.web" Version="1.31.3" /> | ||
<PackageVersion Include="Grpc.AspNetCore.Web" Version="2.66.0" /> | ||
<PackageVersion Include="Grpc.Net.Client" Version="2.66.0" /> | ||
<PackageVersion Include="Grpc.Net.Client.Web" Version="2.66.0" /> | ||
<PackageVersion Include="Havit.Core" Version="2.0.30" /> | ||
<PackageVersion Include="Havit.AspNetCore" Version="2.0.20" /> | ||
<PackageVersion Include="LoxSmoke.DocXml" Version="3.7.1" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" Condition="'$(TargetFramework)' == 'net8.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="6.0.33" Condition="'$(TargetFramework)' == 'net6.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.8" Condition="'$(TargetFramework)' == 'net8.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="6.0.32" Condition="'$(TargetFramework)' == 'net6.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" /> | ||
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Localization" Version="8.0.8" /> | ||
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.8" /> | ||
<PackageVersion Include="Microsoft.Bcl.TimeProvider" Version="8.0.1" Condition="'$(TargetFramework)' != 'net8.0'" /> | ||
<PackageVersion Include="Moq" Version="4.20.72" /> | ||
<PackageVersion Include="MSTest" Version="3.6.0" /> | ||
<PackageVersion Include="protobuf-net" Version="3.2.30" /> | ||
<PackageVersion Include="protobuf-net.Grpc" Version="1.1.1" /> | ||
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.1.1" /> | ||
<PackageVersion Include="protobuf-net.Grpc.ClientFactory" Version="1.1.1" /> | ||
<PackageVersion Include="SmartComponents.AspNetCore" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="SmartComponents.AspNetCore.Components" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="SmartComponents.Inference.OpenAI" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="SmartComponents.LocalEmbeddings" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="System.Text.Json" Version="8.0.4" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!-- https://github.com/microsoft/MSBuildSdks/tree/main/src/CopyOnWrite --> | ||
<GlobalPackageReference Include="Microsoft.Build.CopyOnWrite" Version="1.0.322"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</GlobalPackageReference> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(ProjectName.EndsWith(`Tests`))' == 'False'"> | ||
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</GlobalPackageReference> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> | ||
<AspNetCoreVersion8>8.0.11</AspNetCoreVersion8> | ||
<AspNetCoreVersion9>9.0.0</AspNetCoreVersion9> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Blazored.FluentValidation" Version="2.2.0" /> | ||
<PackageVersion Include="bunit.web" Version="1.36.0" /> | ||
<PackageVersion Include="Grpc.AspNetCore.Web" Version="2.67.0" /> | ||
<PackageVersion Include="Grpc.Net.Client" Version="2.67.0" /> | ||
<PackageVersion Include="Grpc.Net.Client.Web" Version="2.67.0" /> | ||
<PackageVersion Include="Havit.Core" Version="2.0.31" /> | ||
<PackageVersion Include="Havit.AspNetCore" Version="2.0.22" /> | ||
<PackageVersion Include="LoxSmoke.DocXml" Version="3.8.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="$(AspNetCoreVersion9)" Condition="'$(TargetFramework)' == 'net9.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="$(AspNetCoreVersion8)" Condition="'$(TargetFramework)' == 'net8.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="$(AspNetCoreVersion9)" Condition="'$(TargetFramework)' == 'net9.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="$(AspNetCoreVersion8)" Condition="'$(TargetFramework)' == 'net8.0'" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(AspNetCoreVersion9)" Condition="'$(TargetFramework)' == 'net9.0'"/> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(AspNetCoreVersion8)" Condition="'$(TargetFramework)' == 'net8.0'"/> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="$(AspNetCoreVersion9)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(AspNetCoreVersion9)" /> | ||
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Localization" Version="9.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="9.0.0" /> | ||
<PackageVersion Include="Moq" Version="4.20.72" /> | ||
<PackageVersion Include="MSTest" Version="3.6.3" /> | ||
<PackageVersion Include="protobuf-net" Version="3.2.45" /> | ||
<PackageVersion Include="protobuf-net.Grpc" Version="1.2.2" /> | ||
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.2.2" /> | ||
<PackageVersion Include="protobuf-net.Grpc.ClientFactory" Version="1.2.2" /> | ||
<PackageVersion Include="SmartComponents.AspNetCore" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="SmartComponents.AspNetCore.Components" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="SmartComponents.Inference.OpenAI" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="SmartComponents.LocalEmbeddings" Version="0.1.0-preview10148" /> | ||
<PackageVersion Include="System.Text.Json" Version="9.0.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!-- https://github.com/microsoft/MSBuildSdks/tree/main/src/CopyOnWrite --> | ||
<GlobalPackageReference Include="Microsoft.Build.CopyOnWrite" Version="1.0.334"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</GlobalPackageReference> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(ProjectName.EndsWith(`Tests`))' == 'False'"> | ||
<GlobalPackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.12.19"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</GlobalPackageReference> | ||
</ItemGroup> | ||
</Project> |
64 changes: 64 additions & 0 deletions
64
...s.Web.Bootstrap.EntifyFrameworkCore.Tests/Grids/GridDataProviderRequestExtensionsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using Microsoft.EntityFrameworkCore.Query.Internal; | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
|
||
namespace Havit.Blazor.Components.Web.Bootstrap.Tests.Grids; | ||
|
||
[TestClass] | ||
public class GridDataProviderRequestExtensionsTests | ||
{ | ||
[TestMethod] | ||
public void GridDataProviderRequestExtensions_ApplyGridDataProviderRequest_EntityFrameworkCore_CanBeCompiledForSqlServer() | ||
{ | ||
// Arrange | ||
var gridDataProviderRequest = new GridDataProviderRequest<Item> | ||
{ | ||
Sorting = new List<SortingItem<Item>> | ||
{ | ||
new SortingItem<Item>(null, item => item.A, Collections.SortDirection.Ascending), | ||
new SortingItem<Item>(null, item => item.B, Collections.SortDirection.Descending), | ||
}, | ||
StartIndex = 1, // zero based (skipping first item) | ||
Count = 3 | ||
}; | ||
|
||
var dbContext = new TestDbContext(); | ||
var query = dbContext.Items.ApplyGridDataProviderRequest(gridDataProviderRequest); | ||
|
||
#pragma warning disable EF1001 // Internal EF Core API usage. | ||
|
||
// Act | ||
|
||
// We just want to check if EF Core is able to compile the query. | ||
// We don't want to execute the query against the database (otherwise we need code migrations, database cleanup, etc.) | ||
_ = dbContext.GetService<IDatabase>().CompileQuery<SingleQueryingEnumerable<Item>>(query.Expression, false); | ||
|
||
#pragma warning restore EF1001 // Internal EF Core API usage. | ||
|
||
// Assert | ||
// No exception "(IComparable)...) could not be translated. Either rewrite the query in a form that can be translated, ..." was thrown. | ||
} | ||
|
||
private class TestDbContext : DbContext // nested class | ||
{ | ||
public DbSet<Item> Items { get; set; } | ||
|
||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | ||
{ | ||
base.OnConfiguring(optionsBuilder); | ||
|
||
// fake connection string (we don't need a real database connection for this test) | ||
optionsBuilder.UseSqlServer("Data Source=FAKE"); | ||
} | ||
} | ||
|
||
private class Item // nested class | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string A { get; set; } | ||
public int B { get; set; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...rameworkCore.Tests/Havit.Blazor.Components.Web.Bootstrap.EntifyFrameworkCore.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net9.0;net8.0</TargetFrameworks> | ||
<IsPackable>false</IsPackable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<EnableMSTestRunner>true</EnableMSTestRunner> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" /> | ||
<PackageReference Include="MSTest" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Havit.Blazor.Components.Web.Bootstrap\Havit.Blazor.Components.Web.Bootstrap.csproj" /> | ||
<ProjectReference Include="..\Havit.Blazor.Components.Web\Havit.Blazor.Components.Web.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Havit.Blazor.Components.Web.Bootstrap.Smart/css/Ignored.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@* | ||
This file is not used at runtime. | ||
It exists only so that the build system will activate the logic that bundles scoped CSS files. | ||
It can be removed if there is any other component with CSS isolation in the project. | ||
*@ |
1 change: 1 addition & 0 deletions
1
Havit.Blazor.Components.Web.Bootstrap.Smart/css/Ignored.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Ignored */ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.