Skip to content

Commit

Permalink
Updates Framework targets .Net(7/8/9)
Browse files Browse the repository at this point in the history
Bumps Version for release
Adds init sort for BSDataGrid
  • Loading branch information
jbomhold3 committed Nov 17, 2024
1 parent ead0913 commit 1eaaefc
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 50 deletions.
4 changes: 2 additions & 2 deletions src/BlazorStrap.Docs/BlazorStrap.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>BlazorStrap_Docs</RootNamespace>
Expand All @@ -19,7 +19,7 @@
<ItemGroup>
<PackageReference Include="Markdig.SyntaxHighlighting" Version="1.0.0-custom"/>
<PackageReference Include="Markdig" Version="0.26.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.*"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorStrap.Server/BlazorStrap.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>BlazorStrap.Server</RootNamespace>
Expand Down
12 changes: 6 additions & 6 deletions src/BlazorStrap.V4/BlazorStrap.V4.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -14,13 +14,9 @@
<PackageProjectUrl>https://blazorstrap.io/</PackageProjectUrl>
<RepositoryUrl>https://github.com/chanan/BlazorStrap</RepositoryUrl>
<RootNamespace>BlazorStrap.V4</RootNamespace>
<PackageVersion>5.2.103-RC1</PackageVersion>
<PackageVersion>5.2.103-RC2</PackageVersion>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
Expand All @@ -29,6 +25,10 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorStrap\BlazorStrap.csproj" />
</ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions src/BlazorStrap.V5/BlazorStrap.V5.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -13,17 +13,13 @@
<PackageProjectUrl>https://blazorstrap.io/</PackageProjectUrl>
<RepositoryUrl>https://github.com/chanan/BlazorStrap</RepositoryUrl>
<RootNamespace>BlazorStrap.V5</RootNamespace>
<PackageVersion>5.2.103-RC1</PackageVersion>
<PackageVersion>5.2.103-RC2</PackageVersion>
</PropertyGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
<_CurrentProjectDiscoveredScopedCssFiles Include="@(ThemeCssFiles)" RelativePath="%(Identity)" BasePath="_content/$(AssemblyName)" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
Expand All @@ -32,6 +28,10 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorStrap\BlazorStrap.csproj" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/BlazorStrap.WASM/BlazorStrap.WASM.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>BlazorStrap.WASM</RootNamespace>
Expand All @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.7" PrivateAssets="all"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.*"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.*" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorStrap.WASM/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>BlazorStrap</title>
<base href="/" />
<link href="css/app.css" rel="stylesheet" />
<link href="_content/BlazorStrap.V4/offcanvas.css" rel="stylesheet" /><!-- This is only included for V4 demo note needed in V5-->
<link href="_content/BlazorStrap.V4/offcanvas.css" rel="stylesheet" /><!-- This is only included for V4 demo not needed in V5-->
<link href="_content/BlazorStrap.Extensions.TreeView/css/style.css" rel="stylesheet" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/docs.css" rel="stylesheet" />
Expand Down
10 changes: 5 additions & 5 deletions src/BlazorStrap/BlazorStrap.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down Expand Up @@ -33,10 +33,6 @@
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
Expand All @@ -45,4 +41,8 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
</Project>
2 changes: 0 additions & 2 deletions src/BlazorStrap/Shared/Components/Forms/BSInputBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ public BSInputBase()
CultureInfo @cultureInfo => BindConverter.FormatValue(@cultureInfo.Name),
DateTime @dateTimeValue => BindConverter.FormatValue(@dateTimeValue, _dateFormat, CultureInfo.InvariantCulture),
DateTimeOffset @dateTimeOffsetValue => BindConverter.FormatValue(@dateTimeOffsetValue, _dateFormat, CultureInfo.InvariantCulture),
#if NET6_0_OR_GREATER
DateOnly dateOnlyValue => BindConverter.FormatValue(dateOnlyValue, _dateFormat, CultureInfo.InvariantCulture),
TimeOnly timeOnlyValue => BindConverter.FormatValue(timeOnlyValue, _dateFormat, CultureInfo.InvariantCulture),
#endif
_ => base.FormatValueAsString(value),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ public abstract class BlazorStrapInputBase<TValue> : BlazorInputBase<TValue>, IB
CultureInfo @cultureInfo => BindConverter.FormatValue(@cultureInfo.Name),
DateTime @dateTimeValue => BindConverter.FormatValue(@dateTimeValue, _dateFormat, CultureInfo.InvariantCulture),
DateTimeOffset @dateTimeOffsetValue => BindConverter.FormatValue(@dateTimeOffsetValue, _dateFormat, CultureInfo.InvariantCulture),
#if NET6_0_OR_GREATER
DateOnly dateOnlyValue => BindConverter.FormatValue(dateOnlyValue, _dateFormat, CultureInfo.InvariantCulture),
TimeOnly timeOnlyValue => BindConverter.FormatValue(timeOnlyValue, _dateFormat, CultureInfo.InvariantCulture),
#endif
_ => base.FormatValueAsString(value),
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorStrap/Utilities/BlazorInputBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace BlazorStrap.Utilities;
/// as a cascading parameter.
/// </summary>

#if NET8_0
#if NET8_0_OR_GREATER
public abstract class BlazorInputBase<TValue> : InputBase<TValue>
{
[CascadingParameter] private EditContext? CascadeEditContext { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net7.0;net8.0;net9.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<LangVersion>8.0</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
Expand All @@ -19,16 +19,16 @@
<AssemblyName>BlazorStrap.Extensions.FluentValidation</AssemblyName>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
<PackageReference Include="FluentValidation" Version="10.4.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.*" />
<PackageReference Include="FluentValidation" Version="10.4.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.*" />
<PackageReference Include="FluentValidation" Version="10.4.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<PackageId>BlazorStrap.Extensions.TreeView</PackageId>
<Version>5.1.101-Preview1a</Version>
<Authors>Chanan Braunstein; John Bomhold</Authors>
Expand All @@ -18,11 +18,11 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.*" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.*" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion src/Extensions/BlazorStrap.Extensions.Wizard/BSWizard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<CascadingValue Value="this">
<div class="card text-center @CardClass">
<div class="card-header @CardHeaderClass">
@Header?.Invoke(this)
<ul class="@ClassBuilder">

@ChildContent
</ul>
@HeaderAfterNavItems?.Invoke(this)
</div>
<div class="card-body @CardBodyClass">
<BSWizardRender @ref="_wizardRender"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public partial class BSWizard : ComponentBase
[Parameter] public string? CardBodyClass { get; set; }
[Parameter] public string? CardBodyFooterClass { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment<BSWizard>? Header { get; set; }
[Parameter] public RenderFragment<BSWizard>? HeaderAfterNavItems { get; set; }

[Parameter] public RenderFragment<BSWizard>? NextButton { get; set; }
[Parameter] public RenderFragment<BSWizard>? BackButton { get; set; }
[Parameter] public EventCallback<string> OnError { get; set; }
Expand Down Expand Up @@ -61,7 +64,11 @@ public async Task InvokeAsync(BSWizardItem sender)
ChildHandler?.Invoke(sender);
if (_wizardRender != null) await _wizardRender.RefreshAsync();
}


public async Task RefreshAsync()
{
await InvokeAsync(StateHasChanged);
}
public event Action<BSWizardItem>? ChildHandler;

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@implements IDisposable
<li class="@ListClassBuilder">
<a href="@Url" class="@ClassBuilder" @attributes="Attributes" @onclick="ClickEvent" @onclick:preventDefault="PreventDefault">
@Label
@Label?.Invoke(this)
</a>
</li>
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public partial class BSWizardItem : ComponentBase, IDisposable
/// Label.
/// </summary>
[Parameter]
public RenderFragment? Label { get; set; }
public RenderFragment<BSWizardItem>? Label { get; set; }

/// <summary>
/// Url for nav link.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<PackageId>BlazorStrap.Extensions.Wizard</PackageId>
<Version>5.1.100-Beta1</Version>
<Version>5.2.103-RC2</Version>
<Authors>John Bomhold</Authors>
<Title>BlazorStrap Extension for Wizards</Title>
<Description>A treeview component library for BlazorStrap</Description>
Expand All @@ -25,9 +25,8 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.*" />
<PackageReference Include="BlazorComponentUtilities" Version="1.7.1" />
</ItemGroup>

</Project>

0 comments on commit 1eaaefc

Please sign in to comment.