From d97754f62f372fa7f2d5721fc59ef3fd8517d9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Macanovi=C4=87?= Date: Wed, 15 Nov 2023 09:31:29 +0100 Subject: [PATCH] Migrating to .NET 8 (#4998) * Upgrade net8 packages * Fix warning in launchSettings * Use App.razor for base component * Rename Seo class to SeoGenerator * Configure Program and Startup for net8 * Add StreamRendering to pricing page * Add more net8 packages * Add counter page to test interactivity * Make the router take in rendermode Server * Separate Routes.razor * Use Routes.razor * Use net8.0 for Blazorise.Docs.Compiler * ThemeProvider in Routes * Add missing rewardful JS scripts * Formating * Remove render mode from home and pricing pages * Update NuGet packages * Update server rendering mode APIs * Fix static files query version * Skip TableOfContents if there is no TOC container * Update demos and docs to net8.0 * Update playwright path * Update playwright to latest * Delete NuGet.config * Remove AllowSynchronousIO * Interactive HeadOutlet * Delete counter page * Fix blog seo --------- Co-authored-by: David Moreira --- .github/workflows/blazorise-ci-basic.yml | 2 +- .runsettings | 1 + Build/Blazorise.Client.props | 6 +- Build/Blazorise.Demo.props | 10 +- Build/Blazorise.Docs.props | 6 +- Build/Blazorise.Server.RC.props | 4 +- Build/Blazorise.Server.props | 6 +- Build/Blazorise.props | 6 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../Blazorise.Docs.Compiler.csproj | 2 +- .../Blazorise.Docs.Generator.csproj | 2 +- .../Blazorise.Docs.Generator/Program.cs | 4 +- .../Blazorise.Docs.Server.csproj | 2 +- .../{Seo.cs => SeoGenerator.cs} | 2 +- .../Blazorise.Docs.Server/Pages/_Host.cshtml | 9 -- .../Pages/_Layout.cshtml | 90 ----------- .../Blazorise.Docs.Server/Program.cs | 31 ++-- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../Properties/launchSettings.json | 2 +- .../Blazorise.Docs.Server/Startup.cs | 50 ++---- .../Blazorise.Docs.Server/_Imports.razor | 9 -- Documentation/Blazorise.Docs/App.razor | 143 ++++++++---------- .../Blazorise.Docs/Blazorise.Docs.csproj | 4 +- .../Index.razor | 4 +- .../Pages/Docs/TemplatesPage.razor | 3 + Documentation/Blazorise.Docs/Routes.razor | 79 ++++++++++ .../Blazorise.Docs/wwwroot/blazorise.docs.js | 4 + .../wwwroot/blazorise.docs.min.js | 2 +- .../Blazorise.Shared/Blazorise.Shared.csproj | 6 +- .../BasicTestApp.Client.csproj | 8 +- .../BasicTestApp.Server.csproj | 6 +- .../Blazorise.Benchmark.csproj | 2 +- .../Blazorise.E2E.Tests.csproj | 12 +- Tests/Blazorise.E2E.Tests/ReadMe.md | 4 +- Tests/Blazorise.Tests/Blazorise.Tests.csproj | 2 +- 41 files changed, 241 insertions(+), 298 deletions(-) rename Documentation/Blazorise.Docs.Server/Infrastructure/{Seo.cs => SeoGenerator.cs} (99%) delete mode 100644 Documentation/Blazorise.Docs.Server/Pages/_Host.cshtml delete mode 100644 Documentation/Blazorise.Docs.Server/Pages/_Layout.cshtml delete mode 100644 Documentation/Blazorise.Docs.Server/_Imports.razor create mode 100644 Documentation/Blazorise.Docs/Routes.razor diff --git a/.github/workflows/blazorise-ci-basic.yml b/.github/workflows/blazorise-ci-basic.yml index b6c37fc732..93a1deb6bd 100644 --- a/.github/workflows/blazorise-ci-basic.yml +++ b/.github/workflows/blazorise-ci-basic.yml @@ -38,7 +38,7 @@ jobs: run: dotnet test ./Tests/Blazorise.Tests/Blazorise.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal - name: Prepare E2E Tests Dependencies - run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net7.0/playwright.ps1 install --with-deps + run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net8.0/playwright.ps1 install --with-deps - name: Run E2E Tests - Release run: dotnet test ./Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal diff --git a/.runsettings b/.runsettings index a93baeb974..ab3bc57454 100644 --- a/.runsettings +++ b/.runsettings @@ -9,6 +9,7 @@ + diff --git a/Build/Blazorise.Client.props b/Build/Blazorise.Client.props index 67dadeeada..2973229bcf 100644 --- a/Build/Blazorise.Client.props +++ b/Build/Blazorise.Client.props @@ -1,14 +1,14 @@ - net7.0 + net8.0 Exe 10.0 - - + + \ No newline at end of file diff --git a/Build/Blazorise.Demo.props b/Build/Blazorise.Demo.props index 1479e87cea..5636fac0de 100644 --- a/Build/Blazorise.Demo.props +++ b/Build/Blazorise.Demo.props @@ -1,7 +1,7 @@ - net7.0 + net8.0 Library true 10.0 @@ -9,14 +9,14 @@ - - + + - - + + diff --git a/Build/Blazorise.Docs.props b/Build/Blazorise.Docs.props index 49c6e41d98..5ece3cbfa4 100644 --- a/Build/Blazorise.Docs.props +++ b/Build/Blazorise.Docs.props @@ -1,7 +1,7 @@ - net7.0 + net8.0 Library true 10.0 @@ -9,8 +9,8 @@ - - + + diff --git a/Build/Blazorise.Server.RC.props b/Build/Blazorise.Server.RC.props index a5db8700c8..4830c8e360 100644 --- a/Build/Blazorise.Server.RC.props +++ b/Build/Blazorise.Server.RC.props @@ -1,13 +1,13 @@ - net7.0 + net8.0 10.0 true - + \ No newline at end of file diff --git a/Build/Blazorise.Server.props b/Build/Blazorise.Server.props index 85e9fccbbe..77c7b0ce96 100644 --- a/Build/Blazorise.Server.props +++ b/Build/Blazorise.Server.props @@ -1,13 +1,13 @@ - net7.0 + net8.0 10.0 - - + + \ No newline at end of file diff --git a/Build/Blazorise.props b/Build/Blazorise.props index 42ad3a866a..f95da14b53 100644 --- a/Build/Blazorise.props +++ b/Build/Blazorise.props @@ -57,8 +57,8 @@ - - - + + + diff --git a/Demos/Blazorise.Demo.AntDesign/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.AntDesign/Properties/PublishProfiles/FolderProfile.pubxml index c11ae8d66e..3f07d107ca 100644 --- a/Demos/Blazorise.Demo.AntDesign/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.AntDesign/Properties/PublishProfiles/FolderProfile.pubxml @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. D:\Projects\_releases\Blazorise\antdesign FileSystem - net7.0 + net8.0 browser-wasm 39cce894-2049-493f-9b49-2d8b94e4a1b6 true diff --git a/Demos/Blazorise.Demo.Bootstrap.Server/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.Bootstrap.Server/Properties/PublishProfiles/FolderProfile.pubxml index b233035309..d02b74059a 100644 --- a/Demos/Blazorise.Demo.Bootstrap.Server/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.Bootstrap.Server/Properties/PublishProfiles/FolderProfile.pubxml @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. D:\Projects\_releases\Blazorise\rcbootstrap FileSystem - net7.0 + net8.0 2b39f3d9-4721-4ea7-9272-708238d1208f false diff --git a/Demos/Blazorise.Demo.Bootstrap/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.Bootstrap/Properties/PublishProfiles/FolderProfile.pubxml index 47feef428a..f1ab2d0f9c 100644 --- a/Demos/Blazorise.Demo.Bootstrap/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.Bootstrap/Properties/PublishProfiles/FolderProfile.pubxml @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. D:\Projects\_releases\Blazorise\bootstrap FileSystem - net7.0 + net8.0 browser-wasm 36be2535-4cab-4d2d-8ec8-a5396214ea91 true diff --git a/Demos/Blazorise.Demo.Bootstrap5/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.Bootstrap5/Properties/PublishProfiles/FolderProfile.pubxml index 269f8cf5df..424cd69803 100644 --- a/Demos/Blazorise.Demo.Bootstrap5/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.Bootstrap5/Properties/PublishProfiles/FolderProfile.pubxml @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. D:\Projects\_releases\Blazorise\bootstrap5 FileSystem - net7.0 + net8.0 browser-wasm cca627e3-633e-4f00-854c-f028ab298cf5 true diff --git a/Demos/Blazorise.Demo.Bulma/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.Bulma/Properties/PublishProfiles/FolderProfile.pubxml index 8fc6b6a096..44e36a9818 100644 --- a/Demos/Blazorise.Demo.Bulma/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.Bulma/Properties/PublishProfiles/FolderProfile.pubxml @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. D:\Projects\_releases\Blazorise\bulma FileSystem - net7.0 + net8.0 browser-wasm 71232d47-6012-4fec-a52a-86301faa0ae8 true diff --git a/Demos/Blazorise.Demo.Material/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.Material/Properties/PublishProfiles/FolderProfile.pubxml index 000b959922..bb05a40298 100644 --- a/Demos/Blazorise.Demo.Material/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.Material/Properties/PublishProfiles/FolderProfile.pubxml @@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem <_TargetId>Folder - net7.0 + net8.0 browser-wasm 4deb65e7-40ba-409e-9c26-6ef75adf2601 true diff --git a/Demos/Blazorise.Demo.Tailwind/Properties/PublishProfiles/FolderProfile.pubxml b/Demos/Blazorise.Demo.Tailwind/Properties/PublishProfiles/FolderProfile.pubxml index 23af21ad0d..e103020c4e 100644 --- a/Demos/Blazorise.Demo.Tailwind/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Demos/Blazorise.Demo.Tailwind/Properties/PublishProfiles/FolderProfile.pubxml @@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem <_TargetId>Folder - net7.0 + net8.0 browser-wasm 47eeb5b2-3ca1-436c-8317-e69f611fa1e3 true diff --git a/Documentation/Blazorise.Docs.Compiler/Blazorise.Docs.Compiler.csproj b/Documentation/Blazorise.Docs.Compiler/Blazorise.Docs.Compiler.csproj index 7d0654bdf6..9393640893 100644 --- a/Documentation/Blazorise.Docs.Compiler/Blazorise.Docs.Compiler.csproj +++ b/Documentation/Blazorise.Docs.Compiler/Blazorise.Docs.Compiler.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/Documentation/Blazorise.Docs.Generator/Blazorise.Docs.Generator.csproj b/Documentation/Blazorise.Docs.Generator/Blazorise.Docs.Generator.csproj index d456ff4dfb..f67f521030 100644 --- a/Documentation/Blazorise.Docs.Generator/Blazorise.Docs.Generator.csproj +++ b/Documentation/Blazorise.Docs.Generator/Blazorise.Docs.Generator.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable diff --git a/Documentation/Blazorise.Docs.Generator/Program.cs b/Documentation/Blazorise.Docs.Generator/Program.cs index 3c7945ebec..d257a4bc7a 100644 --- a/Documentation/Blazorise.Docs.Generator/Program.cs +++ b/Documentation/Blazorise.Docs.Generator/Program.cs @@ -21,9 +21,9 @@ // // var blzSrcPath = @"..\..\..\..\..\Source\Blazorise"; -var file = @$"{blzSrcPath}\obj\Debug\net7.0\Blazorise.xml"; +var file = @$"{blzSrcPath}\obj\Debug\net8.0\Blazorise.xml"; var enumsFolder = @$"{blzSrcPath}\Enums"; -string outputPath = @$"{blzSrcPath}\obj\Debug\net7.0\EnumsOutput.txt"; +string outputPath = @$"{blzSrcPath}\obj\Debug\net8.0\EnumsOutput.txt"; var enumsFolderDirectory = new DirectoryInfo( enumsFolder ); var enumFileNames = enumsFolderDirectory.GetFiles().Select( x => x.Name.Split( ".cs" )[0] ); diff --git a/Documentation/Blazorise.Docs.Server/Blazorise.Docs.Server.csproj b/Documentation/Blazorise.Docs.Server/Blazorise.Docs.Server.csproj index 230ec96cc4..dcea0e4438 100644 --- a/Documentation/Blazorise.Docs.Server/Blazorise.Docs.Server.csproj +++ b/Documentation/Blazorise.Docs.Server/Blazorise.Docs.Server.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 $(MSBuildProjectName) diff --git a/Documentation/Blazorise.Docs.Server/Infrastructure/Seo.cs b/Documentation/Blazorise.Docs.Server/Infrastructure/SeoGenerator.cs similarity index 99% rename from Documentation/Blazorise.Docs.Server/Infrastructure/Seo.cs rename to Documentation/Blazorise.Docs.Server/Infrastructure/SeoGenerator.cs index 31375df5a0..2ea2409532 100644 --- a/Documentation/Blazorise.Docs.Server/Infrastructure/Seo.cs +++ b/Documentation/Blazorise.Docs.Server/Infrastructure/SeoGenerator.cs @@ -8,7 +8,7 @@ namespace Blazorise.Docs.Server.Infrastructure; -public class Seo +public class SeoGenerator { public static async Task GenerateRobots( HttpContext context ) { diff --git a/Documentation/Blazorise.Docs.Server/Pages/_Host.cshtml b/Documentation/Blazorise.Docs.Server/Pages/_Host.cshtml deleted file mode 100644 index d56a0c3771..0000000000 --- a/Documentation/Blazorise.Docs.Server/Pages/_Host.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@page "/" -@using Blazorise.Docs -@namespace Blazorise.Docs.Server.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = "_Layout"; -} - - diff --git a/Documentation/Blazorise.Docs.Server/Pages/_Layout.cshtml b/Documentation/Blazorise.Docs.Server/Pages/_Layout.cshtml deleted file mode 100644 index e09a4f2ad2..0000000000 --- a/Documentation/Blazorise.Docs.Server/Pages/_Layout.cshtml +++ /dev/null @@ -1,90 +0,0 @@ -@namespace Blazorise.Docs.Server.Pages -@using Microsoft.AspNetCore.Components.Web -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @RenderBody() - - - - - - - - - - - - - - - - - - diff --git a/Documentation/Blazorise.Docs.Server/Program.cs b/Documentation/Blazorise.Docs.Server/Program.cs index b013462637..b2e63c12d8 100644 --- a/Documentation/Blazorise.Docs.Server/Program.cs +++ b/Documentation/Blazorise.Docs.Server/Program.cs @@ -1,25 +1,22 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Blazorise.Docs.Server; +using Microsoft.AspNetCore.Builder; -namespace Blazorise.Docs.Server; +namespace Blazorise.Docs; public class Program { public static void Main( string[] args ) { - CreateHostBuilder( args ).Build().Run(); - } + var builder = WebApplication.CreateBuilder( args ); + + var startup = new Startup( builder.Configuration ); + + startup.ConfigureServices( builder.Services ); - public static IHostBuilder CreateHostBuilder( string[] args ) => - Host.CreateDefaultBuilder( args ) - .ConfigureWebHostDefaults( webBuilder => - { - webBuilder.UseStartup(); - } ); + var app = builder.Build(); + + startup.Configure( app ); + + app.Run(); + } } \ No newline at end of file diff --git a/Documentation/Blazorise.Docs.Server/Properties/PublishProfiles/FolderProfile.pubxml b/Documentation/Blazorise.Docs.Server/Properties/PublishProfiles/FolderProfile.pubxml index 53edb136cc..a381912c79 100644 --- a/Documentation/Blazorise.Docs.Server/Properties/PublishProfiles/FolderProfile.pubxml +++ b/Documentation/Blazorise.Docs.Server/Properties/PublishProfiles/FolderProfile.pubxml @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. D:\Projects\_releases\Blazorise\docs-v2 FileSystem - net7.0 + net8.0 3d262581-0f01-4317-9acc-3f104bb639cb false diff --git a/Documentation/Blazorise.Docs.Server/Properties/launchSettings.json b/Documentation/Blazorise.Docs.Server/Properties/launchSettings.json index 47ede289ac..680b4850e7 100644 --- a/Documentation/Blazorise.Docs.Server/Properties/launchSettings.json +++ b/Documentation/Blazorise.Docs.Server/Properties/launchSettings.json @@ -17,7 +17,7 @@ }, "Blazorise.Docs.Server": { "commandName": "Project", - "dotnetRunMessages": "true", + "dotnetRunMessages": true, "launchBrowser": true, "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { diff --git a/Documentation/Blazorise.Docs.Server/Startup.cs b/Documentation/Blazorise.Docs.Server/Startup.cs index efd040b5f1..9574cc7abf 100644 --- a/Documentation/Blazorise.Docs.Server/Startup.cs +++ b/Documentation/Blazorise.Docs.Server/Startup.cs @@ -17,6 +17,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Microsoft.AspNetCore.Server.Kestrel.Core; namespace Blazorise.Docs.Server; @@ -33,13 +34,10 @@ public Startup( IConfiguration configuration ) // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices( IServiceCollection services ) { - services.AddRazorPages(); - services.AddServerSideBlazor(); - - services.AddServerSideBlazor().AddHubOptions( ( o ) => - { - o.MaximumReceiveMessageSize = 1024 * 1024 * 100; - } ); + // Add services to the container. + services + .AddRazorComponents() + .AddInteractiveServerComponents(); services.AddHttpContextAccessor(); @@ -99,15 +97,11 @@ public void ConfigureServices( IServiceCollection services ) } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure( IApplicationBuilder app, IWebHostEnvironment env ) + public void Configure( WebApplication app ) { app.UseResponseCompression(); - if ( env.IsDevelopment() ) - { - app.UseDeveloperExceptionPage(); - } - else + if ( !app.Environment.IsDevelopment() ) { app.UseExceptionHandler( "/Error" ); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. @@ -115,31 +109,17 @@ public void Configure( IApplicationBuilder app, IWebHostEnvironment env ) } app.UseHttpsRedirection(); - app.UseStaticFiles(); - - app.UseRouting(); - app.UseEndpoints( endpoints => - { - endpoints.MapGet( "/robots.txt", async context => - { - await Seo.GenerateRobots( context ); - } ); - - endpoints.MapGet( "/sitemap.txt", async context => - { - await Seo.GenerateSitemap( context ); - } ); + app.UseStaticFiles(); + app.UseAntiforgery(); - endpoints.MapGet( "/sitemap.xml", async context => - { - await Seo.GenerateSitemapXml( context ); - } ); + app.MapRazorComponents() + .AddInteractiveServerRenderMode(); - endpoints.MapHealthChecks( "/healthcheck" ); + //app.UseRouting(); - endpoints.MapBlazorHub(); - endpoints.MapFallbackToPage( "/_Host" ); - } ); + app.MapGet( "/robots.txt", SeoGenerator.GenerateRobots ); + app.MapGet( "/sitemap.txt", SeoGenerator.GenerateSitemap ); + app.MapGet( "/sitemap.xml", SeoGenerator.GenerateSitemapXml ); } } diff --git a/Documentation/Blazorise.Docs.Server/_Imports.razor b/Documentation/Blazorise.Docs.Server/_Imports.razor deleted file mode 100644 index 8264e3f4c2..0000000000 --- a/Documentation/Blazorise.Docs.Server/_Imports.razor +++ /dev/null @@ -1,9 +0,0 @@ -@using System.Net.Http -@using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Components.Authorization -@using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.AspNetCore.Components.Web -@using Microsoft.AspNetCore.Components.Web.Virtualization -@using Microsoft.JSInterop -@using Blazorise.Docs.Server diff --git a/Documentation/Blazorise.Docs/App.razor b/Documentation/Blazorise.Docs/App.razor index 473188b90e..771a7d6ff0 100644 --- a/Documentation/Blazorise.Docs/App.razor +++ b/Documentation/Blazorise.Docs/App.razor @@ -1,78 +1,65 @@ - - - - - - - - - Sorry, there's nothing at this address. -

- The page you are looking for might have been removed. -
-
-
-
- - - - -
-@code{ - private Theme theme = new() - { - LuminanceThreshold = 170, - BarOptions = new() - { - HorizontalHeight = "64px", - VerticalBrandHeight = "64px", - LightColors = new() - { - ItemColorOptions = new() - { - ActiveBackgroundColor = "#dedede", - ActiveColor = "#000000", - HoverBackgroundColor = "#dedede", - HoverColor = "#000000", - }, - } - }, - ColorOptions = new() - { - Primary = "#9333ea", - Secondary = "#d7dae7", - Success = "#13a668", - Danger = "#e11d48", - Warning = "#FFA800", - Light = "#dce7ed", - Dark = "#181C32", - Info = "#60A5FA", - }, - BackgroundOptions = new() - { - Primary = "#9333ea", - Secondary = "#d7dae7", - Success = "#13a668", - Danger = "#e11d48", - Warning = "#FFA800", - Light = "#dce7ed", - Dark = "#181C32", - Info = "#60A5FA", - }, - TextColorOptions = new() - { - Primary = "#9333ea", - Secondary = "#d7dae7", - Success = "#13a668", - Danger = "#e11d48", - Warning = "#FFA800", - Light = "#dce7ed", - Dark = "#181C32", - Info = "#60A5FA", - }, - InputOptions = new() - { - CheckColor = "#9333ea", - }, - }; -} +@using Blazorise.Components +@using System.Reflection; +@using Blazorise.Docs.Layouts; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Documentation/Blazorise.Docs/Blazorise.Docs.csproj b/Documentation/Blazorise.Docs/Blazorise.Docs.csproj index c9a58a942c..fbb352ff8e 100644 --- a/Documentation/Blazorise.Docs/Blazorise.Docs.csproj +++ b/Documentation/Blazorise.Docs/Blazorise.Docs.csproj @@ -38,7 +38,7 @@ - ..\..\Documentation/Blazorise.Docs.Compiler/bin/Debug/net7.0/Blazorise.Docs.Compiler.dll + ..\..\Documentation/Blazorise.Docs.Compiler/bin/Debug/net8.0/Blazorise.Docs.Compiler.dll @@ -79,7 +79,7 @@ - + diff --git a/Documentation/Blazorise.Docs/Pages/Blog/2023-09-15_HowToHandleLocalizationInBlazoriseValidation/Index.razor b/Documentation/Blazorise.Docs/Pages/Blog/2023-09-15_HowToHandleLocalizationInBlazoriseValidation/Index.razor index 24efae9ce6..783a03e45c 100644 --- a/Documentation/Blazorise.Docs/Pages/Blog/2023-09-15_HowToHandleLocalizationInBlazoriseValidation/Index.razor +++ b/Documentation/Blazorise.Docs/Pages/Blog/2023-09-15_HowToHandleLocalizationInBlazoriseValidation/Index.razor @@ -1,6 +1,6 @@ @page "/blog/how-to-handle-localization-in-blazorise-validation" - + @@ -9,7 +9,7 @@ - In this blog post we'll teach you how to properly localize Blazorise Validation messages by using the inbuilt MessageLocalizer. + In this blog post we'll teach you how to properly localize Blazorise Validation messages by using the inbuilt MessageLocalizer parameter. diff --git a/Documentation/Blazorise.Docs/Pages/Docs/TemplatesPage.razor b/Documentation/Blazorise.Docs/Pages/Docs/TemplatesPage.razor index 8b1dc52908..2611384a52 100644 --- a/Documentation/Blazorise.Docs/Pages/Docs/TemplatesPage.razor +++ b/Documentation/Blazorise.Docs/Pages/Docs/TemplatesPage.razor @@ -110,6 +110,9 @@ net7.0 + + net8.0 + diff --git a/Documentation/Blazorise.Docs/Routes.razor b/Documentation/Blazorise.Docs/Routes.razor new file mode 100644 index 0000000000..c50cc3c328 --- /dev/null +++ b/Documentation/Blazorise.Docs/Routes.razor @@ -0,0 +1,79 @@ + + + + + @* *@ + + + + + Sorry, there's nothing at this address. +

+ The page you are looking for might have been removed. +
+
+
+
+ + + + +
+@code { + private Theme theme = new() + { + LuminanceThreshold = 170, + BarOptions = new() + { + HorizontalHeight = "64px", + VerticalBrandHeight = "64px", + LightColors = new() + { + ItemColorOptions = new() + { + ActiveBackgroundColor = "#dedede", + ActiveColor = "#000000", + HoverBackgroundColor = "#dedede", + HoverColor = "#000000", + }, + } + }, + ColorOptions = new() + { + Primary = "#9333ea", + Secondary = "#d7dae7", + Success = "#13a668", + Danger = "#e11d48", + Warning = "#FFA800", + Light = "#dce7ed", + Dark = "#181C32", + Info = "#60A5FA", + }, + BackgroundOptions = new() + { + Primary = "#9333ea", + Secondary = "#d7dae7", + Success = "#13a668", + Danger = "#e11d48", + Warning = "#FFA800", + Light = "#dce7ed", + Dark = "#181C32", + Info = "#60A5FA", + }, + TextColorOptions = new() + { + Primary = "#9333ea", + Secondary = "#d7dae7", + Success = "#13a668", + Danger = "#e11d48", + Warning = "#FFA800", + Light = "#dce7ed", + Dark = "#181C32", + Info = "#60A5FA", + }, + InputOptions = new() + { + CheckColor = "#9333ea", + }, + }; +} \ No newline at end of file diff --git a/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.js b/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.js index b19e2205ce..3e8babbfda 100644 --- a/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.js +++ b/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.js @@ -17,6 +17,10 @@ }, generateToc: (targetElement, options) => { + if (!document.getElementById('TableOfContents')) { + return; + } + document.querySelectorAll('.b-docs-page>h2, .b-docs-page>h3, .b-docs-page>h4, .b-docs-page-section-header>h3').forEach(function (el) { if (el && !el.id && el.textContent) { const textContent = el.textContent.trim(); diff --git a/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.min.js b/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.min.js index 4eaf1631a3..49b97e544a 100644 --- a/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.min.js +++ b/Documentation/Blazorise.Docs/wwwroot/blazorise.docs.min.js @@ -1 +1 @@ -window.blazoriseDocs={code:{copyToClipboard:n=>{navigator.clipboard.writeText(n)}},navigation:{scrollToTop:()=>{var n=document.getElementById("b-docs-layout-header");n&&n.scrollIntoView({behavior:"auto"})},generateToc:(n,t)=>{document.querySelectorAll(".b-docs-page>h2, .b-docs-page>h3, .b-docs-page>h4, .b-docs-page-section-header>h3").forEach(function(n){if(n&&!n.id&&n.textContent){const t=n.textContent.trim();n.id="toc_"+t.replace(/[^A-Za-z0-9]/g,"-")}}),tocbot.destroy(),tocbot.init({basePath:t.basePath,tocSelector:"#TableOfContents",contentSelector:".b-docs-page",headingSelector:".b-docs-page>h2, .b-docs-page>h3, .b-docs-page>h4, .b-docs-page-section-header>h3",hasInnerContainers:!1,orderedList:!1,activeLinkClass:"active",scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(){},disableTocScrollSync:!1,onClick:function(n){n.preventDefault();n.stopPropagation();const t=n.target;if(t&&t.href){const n=new URL(t.href);if(n){const t=n.hash;if(t&&t.length>0){const n=document.getElementById(t.substring(1));n&&n.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}}}},headingObjectCallback:function(n,t){return n&&n.textContent&&!n.id&&!t.id&&(n.id="toc_"+n.textContent.replace(/[^A-Za-z0-9]/g,"-")),n}})}}};window.myComponent={configureQuillJs:()=>{var n=Quill.import("formats/link");n.sanitize=n=>{let t=window.decodeURIComponent(n);return(t=t.trim().replace(/\s/g,""),/^(:\/\/)/.test(t))?`http${t}`:/^(f|ht)tps?:\/\//i.test(t)?t:`http://${t}`}}};window.blazorisePRO={paddle:{openCheckout:(n,t,i)=>{const r=window.Rewardful&&window.Rewardful.referral;i?Paddle.Checkout.open({product:n,quantity:t,upsell:i.id,upsellTitle:i.title,upsellText:i.text,upsellAction:i.action,passthrough:JSON.stringify({rewardful:{referral:r}})}):Paddle.Checkout.open({product:n,quantity:t,passthrough:JSON.stringify({rewardful:{referral:r}})})}}}; \ No newline at end of file +window.blazoriseDocs={code:{copyToClipboard:n=>{navigator.clipboard.writeText(n)}},navigation:{scrollToTop:()=>{var n=document.getElementById("b-docs-layout-header");n&&n.scrollIntoView({behavior:"auto"})},generateToc:(n,t)=>{document.getElementById("TableOfContents")&&(document.querySelectorAll(".b-docs-page>h2, .b-docs-page>h3, .b-docs-page>h4, .b-docs-page-section-header>h3").forEach(function(n){if(n&&!n.id&&n.textContent){const t=n.textContent.trim();n.id="toc_"+t.replace(/[^A-Za-z0-9]/g,"-")}}),tocbot.destroy(),tocbot.init({basePath:t.basePath,tocSelector:"#TableOfContents",contentSelector:".b-docs-page",headingSelector:".b-docs-page>h2, .b-docs-page>h3, .b-docs-page>h4, .b-docs-page-section-header>h3",hasInnerContainers:!1,orderedList:!1,activeLinkClass:"active",scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(){},disableTocScrollSync:!1,onClick:function(n){n.preventDefault();n.stopPropagation();const t=n.target;if(t&&t.href){const n=new URL(t.href);if(n){const t=n.hash;if(t&&t.length>0){const n=document.getElementById(t.substring(1));n&&n.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}}}},headingObjectCallback:function(n,t){return n&&n.textContent&&!n.id&&!t.id&&(n.id="toc_"+n.textContent.replace(/[^A-Za-z0-9]/g,"-")),n}}))}}};window.myComponent={configureQuillJs:()=>{var n=Quill.import("formats/link");n.sanitize=n=>{let t=window.decodeURIComponent(n);return(t=t.trim().replace(/\s/g,""),/^(:\/\/)/.test(t))?`http${t}`:/^(f|ht)tps?:\/\//i.test(t)?t:`http://${t}`}}};window.blazorisePRO={paddle:{openCheckout:(n,t,i)=>{const r=window.Rewardful&&window.Rewardful.referral;i?Paddle.Checkout.open({product:n,quantity:t,upsell:i.id,upsellTitle:i.title,upsellText:i.text,upsellAction:i.action,passthrough:JSON.stringify({rewardful:{referral:r}})}):Paddle.Checkout.open({product:n,quantity:t,passthrough:JSON.stringify({rewardful:{referral:r}})})}}}; \ No newline at end of file diff --git a/Shared/Blazorise.Shared/Blazorise.Shared.csproj b/Shared/Blazorise.Shared/Blazorise.Shared.csproj index 0466f2dde7..3be95bc167 100644 --- a/Shared/Blazorise.Shared/Blazorise.Shared.csproj +++ b/Shared/Blazorise.Shared/Blazorise.Shared.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 @@ -18,8 +18,8 @@ - - + + diff --git a/Tests/BasicTestApp.Client/BasicTestApp.Client.csproj b/Tests/BasicTestApp.Client/BasicTestApp.Client.csproj index cd10eef462..49e1fcd1e4 100644 --- a/Tests/BasicTestApp.Client/BasicTestApp.Client.csproj +++ b/Tests/BasicTestApp.Client/BasicTestApp.Client.csproj @@ -1,14 +1,14 @@  - net7.0 + net8.0 true - - - + + + diff --git a/Tests/BasicTestApp.Server/BasicTestApp.Server.csproj b/Tests/BasicTestApp.Server/BasicTestApp.Server.csproj index edb701b2b2..63275a9da8 100644 --- a/Tests/BasicTestApp.Server/BasicTestApp.Server.csproj +++ b/Tests/BasicTestApp.Server/BasicTestApp.Server.csproj @@ -1,13 +1,13 @@  - net7.0 + net8.0 10.0 - - + + diff --git a/Tests/Blazorise.Benchmark/Blazorise.Benchmark.csproj b/Tests/Blazorise.Benchmark/Blazorise.Benchmark.csproj index dfb406df1a..f6004add80 100644 --- a/Tests/Blazorise.Benchmark/Blazorise.Benchmark.csproj +++ b/Tests/Blazorise.Benchmark/Blazorise.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 1701;1702;CS8032 diff --git a/Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj b/Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj index 4d13d85fef..3109bf6c4b 100644 --- a/Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj +++ b/Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable false @@ -10,14 +10,14 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/Tests/Blazorise.E2E.Tests/ReadMe.md b/Tests/Blazorise.E2E.Tests/ReadMe.md index 6d7f0ef3bb..99f83908ba 100644 --- a/Tests/Blazorise.E2E.Tests/ReadMe.md +++ b/Tests/Blazorise.E2E.Tests/ReadMe.md @@ -17,7 +17,7 @@ Below you will find instructions on how to use Playwright. This assumes you will 2. Execute the playwright powershell script to install necessary dependencies (browser dependencies, etc...), i.e: ```bash -powershell .\bin\Debug\net7.0\playwright.ps1 install --with-deps +powershell .\bin\Debug\net8.0\playwright.ps1 install --with-deps ``` > The script must be run in the folder `./Tests/Blazorise.E2E.Tests/` @@ -27,7 +27,7 @@ powershell .\bin\Debug\net7.0\playwright.ps1 install --with-deps To start a record session to generate c# test code (a browser session & Playwright Inspector should be opened automatically): ```bash -powershell .\bin\Debug\net7.0\playwright.ps1 codegen http://localhost:14696 +powershell .\bin\Debug\net8.0\playwright.ps1 codegen http://localhost:14696 ``` In the **Playwright Inspector**, please select **.NET C# NUnit** as the target library to generate the appropriate code. diff --git a/Tests/Blazorise.Tests/Blazorise.Tests.csproj b/Tests/Blazorise.Tests/Blazorise.Tests.csproj index 36beaced58..8b10bb2118 100644 --- a/Tests/Blazorise.Tests/Blazorise.Tests.csproj +++ b/Tests/Blazorise.Tests/Blazorise.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false