From 7e7e369691b874a92d8bf2a48d7f1a36c27bb863 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 21:18:40 +0100 Subject: [PATCH 01/27] remove tests --- build/Build.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index ebbad02..9df55e6 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -32,7 +32,6 @@ class Build : NukeBuild [Solution] readonly Solution Solution; AbsolutePath SourceDirectory => RootDirectory / "src"; - AbsolutePath TestsDirectory => RootDirectory / "tests"; AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; Project TargetProject => Solution.GetProject("SimpleBlazorMultiselect"); @@ -42,7 +41,6 @@ class Build : NukeBuild .Executes(() => { SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(path => path.DeleteDirectory()); - TestsDirectory.GlobDirectories("**/bin", "**/obj").ForEach(path => path.DeleteDirectory()); ArtifactsDirectory.CreateOrCleanDirectory(); }); From 4dc24b4b9dc3b344431ed5c1cd27ca36fb4c6ebd Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 21:21:47 +0100 Subject: [PATCH 02/27] moved stuff around, switched demo app to wasm --- SimpleBlazorMultiselect.sln | 22 +++--- .../Components/App.razor | 22 ------ .../Components/Pages/Error.razor | 38 ---------- .../Components/Routes.razor | 6 -- SimpleBlazorMultiselectDemo/Program.cs | 27 ------- .../Properties/launchSettings.json | 36 --------- .../appsettings.Development.json | 8 -- SimpleBlazorMultiselectDemo/appsettings.json | 9 --- src/SimpleBlazorMultiselect.Demo/App.razor | 12 +++ .../Layout/MainLayout.razor | 0 .../Layout/MainLayout.razor.css | 0 .../Layout/NavMenu.razor | 0 .../Layout/NavMenu.razor.css | 0 .../Models/SimpleItem.cs | 0 .../Pages/BasicDropdown.razor | 0 .../Pages/CustomTemplate.razor | 0 .../Pages/FilteredDropdown.razor | 0 .../Pages/Home.razor | 0 .../Pages/SingleSelect.razor | 0 src/SimpleBlazorMultiselect.Demo/Program.cs | 14 ++++ .../Properties/launchSettings.json | 41 ++++++++++ .../SimpleBlazorMultiselect.Demo.csproj | 8 +- .../_Imports.razor | 7 +- .../wwwroot/css}/app.css | 70 +++++++++++++++--- .../wwwroot/css}/bootstrap/bootstrap.min.css | 0 .../css}/bootstrap/bootstrap.min.css.map | 0 .../wwwroot/favicon.png | Bin .../wwwroot/icon-192.png | Bin 0 -> 2626 bytes .../wwwroot/index.html | 35 +++++++++ .../wwwroot/sample-data/weather.json | 27 +++++++ .../SimpleBlazorMultiselect.csproj | 4 +- .../SimpleMultiselect.razor | 0 .../SimpleMultiselect.razor.cs | 4 +- .../SimpleMultiselect.razor.css | 0 .../SimpleBlazorMultiselect}/_Imports.razor | 0 .../wwwroot/bootstrap.bundle.min.js | 0 .../wwwroot/bootstrap.min.css | 0 37 files changed, 215 insertions(+), 175 deletions(-) delete mode 100644 SimpleBlazorMultiselectDemo/Components/App.razor delete mode 100644 SimpleBlazorMultiselectDemo/Components/Pages/Error.razor delete mode 100644 SimpleBlazorMultiselectDemo/Components/Routes.razor delete mode 100644 SimpleBlazorMultiselectDemo/Program.cs delete mode 100644 SimpleBlazorMultiselectDemo/Properties/launchSettings.json delete mode 100644 SimpleBlazorMultiselectDemo/appsettings.Development.json delete mode 100644 SimpleBlazorMultiselectDemo/appsettings.json create mode 100644 src/SimpleBlazorMultiselect.Demo/App.razor rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Layout/MainLayout.razor (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Layout/MainLayout.razor.css (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Layout/NavMenu.razor (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Layout/NavMenu.razor.css (100%) rename {SimpleBlazorMultiselectDemo => src/SimpleBlazorMultiselect.Demo}/Models/SimpleItem.cs (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Pages/BasicDropdown.razor (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Pages/CustomTemplate.razor (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Pages/FilteredDropdown.razor (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Pages/Home.razor (100%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/Pages/SingleSelect.razor (100%) create mode 100644 src/SimpleBlazorMultiselect.Demo/Program.cs create mode 100644 src/SimpleBlazorMultiselect.Demo/Properties/launchSettings.json rename SimpleBlazorMultiselectDemo/SimpleBlazorMultiselectDemo.csproj => src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj (50%) rename {SimpleBlazorMultiselectDemo/Components => src/SimpleBlazorMultiselect.Demo}/_Imports.razor (61%) rename {SimpleBlazorMultiselectDemo/wwwroot => src/SimpleBlazorMultiselect.Demo/wwwroot/css}/app.css (65%) rename {SimpleBlazorMultiselectDemo/wwwroot => src/SimpleBlazorMultiselect.Demo/wwwroot/css}/bootstrap/bootstrap.min.css (100%) rename {SimpleBlazorMultiselectDemo/wwwroot => src/SimpleBlazorMultiselect.Demo/wwwroot/css}/bootstrap/bootstrap.min.css.map (100%) rename {SimpleBlazorMultiselectDemo => src/SimpleBlazorMultiselect.Demo}/wwwroot/favicon.png (100%) create mode 100644 src/SimpleBlazorMultiselect.Demo/wwwroot/icon-192.png create mode 100644 src/SimpleBlazorMultiselect.Demo/wwwroot/index.html create mode 100644 src/SimpleBlazorMultiselect.Demo/wwwroot/sample-data/weather.json rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/SimpleBlazorMultiselect.csproj (95%) rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/SimpleMultiselect.razor (100%) rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/SimpleMultiselect.razor.cs (96%) rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/SimpleMultiselect.razor.css (100%) rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/_Imports.razor (100%) rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/wwwroot/bootstrap.bundle.min.js (100%) rename {SimpleBlazorMultiselect => src/SimpleBlazorMultiselect}/wwwroot/bootstrap.min.css (100%) diff --git a/SimpleBlazorMultiselect.sln b/SimpleBlazorMultiselect.sln index 7df1c1d..6981d47 100644 --- a/SimpleBlazorMultiselect.sln +++ b/SimpleBlazorMultiselect.sln @@ -1,10 +1,10 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect", "SimpleBlazorMultiselect\SimpleBlazorMultiselect.csproj", "{AEFF45E1-DA9E-427F-908F-2C142523BDAA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{49DA0B6E-92AE-41C0-8763-16D0303F2015}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselectDemo", "SimpleBlazorMultiselectDemo\SimpleBlazorMultiselectDemo.csproj", "{B04E859C-9794-41AC-BD91-4544276A5FC8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect", "src\SimpleBlazorMultiselect\SimpleBlazorMultiselect.csproj", "{1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{49DA0B6E-92AE-41C0-8763-16D0303F2015}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBlazorMultiselect.Demo", "src\SimpleBlazorMultiselect.Demo\SimpleBlazorMultiselect.Demo.csproj", "{025632E8-CB51-4E49-B47C-B9C75D35A874}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -14,13 +14,13 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {49DA0B6E-92AE-41C0-8763-16D0303F2015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {49DA0B6E-92AE-41C0-8763-16D0303F2015}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AEFF45E1-DA9E-427F-908F-2C142523BDAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AEFF45E1-DA9E-427F-908F-2C142523BDAA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AEFF45E1-DA9E-427F-908F-2C142523BDAA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AEFF45E1-DA9E-427F-908F-2C142523BDAA}.Release|Any CPU.Build.0 = Release|Any CPU - {B04E859C-9794-41AC-BD91-4544276A5FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B04E859C-9794-41AC-BD91-4544276A5FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B04E859C-9794-41AC-BD91-4544276A5FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B04E859C-9794-41AC-BD91-4544276A5FC8}.Release|Any CPU.Build.0 = Release|Any CPU + {1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F3DCC28-1FD5-4F3C-B43D-564A44DBE398}.Release|Any CPU.Build.0 = Release|Any CPU + {025632E8-CB51-4E49-B47C-B9C75D35A874}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {025632E8-CB51-4E49-B47C-B9C75D35A874}.Debug|Any CPU.Build.0 = Debug|Any CPU + {025632E8-CB51-4E49-B47C-B9C75D35A874}.Release|Any CPU.ActiveCfg = Release|Any CPU + {025632E8-CB51-4E49-B47C-B9C75D35A874}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/SimpleBlazorMultiselectDemo/Components/App.razor b/SimpleBlazorMultiselectDemo/Components/App.razor deleted file mode 100644 index 5501298..0000000 --- a/SimpleBlazorMultiselectDemo/Components/App.razor +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SimpleBlazorMultiselectDemo/Components/Pages/Error.razor b/SimpleBlazorMultiselectDemo/Components/Pages/Error.razor deleted file mode 100644 index 30c1b33..0000000 --- a/SimpleBlazorMultiselectDemo/Components/Pages/Error.razor +++ /dev/null @@ -1,38 +0,0 @@ -@page "/Error" -@using System.Diagnostics - -Error - -

Error.

-

An error occurred while processing your request.

- -@if (ShowRequestId) -{ -

- Request ID: @RequestId -

-} - -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

- -@code{ - - [CascadingParameter] - private HttpContext? HttpContext { get; set; } - - private string? RequestId { get; set; } - private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - protected override void OnInitialized() => - RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; - -} \ No newline at end of file diff --git a/SimpleBlazorMultiselectDemo/Components/Routes.razor b/SimpleBlazorMultiselectDemo/Components/Routes.razor deleted file mode 100644 index bf0ce0b..0000000 --- a/SimpleBlazorMultiselectDemo/Components/Routes.razor +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SimpleBlazorMultiselectDemo/Program.cs b/SimpleBlazorMultiselectDemo/Program.cs deleted file mode 100644 index 80b4880..0000000 --- a/SimpleBlazorMultiselectDemo/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -using SimpleBlazorMultiselectDemo.Components; - -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. -builder.Services.AddRazorComponents() - .AddInteractiveServerComponents(); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (!app.Environment.IsDevelopment()) -{ - app.UseExceptionHandler("/Error", createScopeForErrors: true); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); -} - -app.UseHttpsRedirection(); - -app.UseStaticFiles(); -app.UseAntiforgery(); - -app.MapRazorComponents() - .AddInteractiveServerRenderMode(); - -app.Run(); \ No newline at end of file diff --git a/SimpleBlazorMultiselectDemo/Properties/launchSettings.json b/SimpleBlazorMultiselectDemo/Properties/launchSettings.json deleted file mode 100644 index 8a50e8c..0000000 --- a/SimpleBlazorMultiselectDemo/Properties/launchSettings.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:11997", - "sslPort": 44358 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "applicationUrl": "http://localhost:5223", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "applicationUrl": "https://localhost:7261;http://localhost:5223", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } - } diff --git a/SimpleBlazorMultiselectDemo/appsettings.Development.json b/SimpleBlazorMultiselectDemo/appsettings.Development.json deleted file mode 100644 index 0c208ae..0000000 --- a/SimpleBlazorMultiselectDemo/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/SimpleBlazorMultiselectDemo/appsettings.json b/SimpleBlazorMultiselectDemo/appsettings.json deleted file mode 100644 index 10f68b8..0000000 --- a/SimpleBlazorMultiselectDemo/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff --git a/src/SimpleBlazorMultiselect.Demo/App.razor b/src/SimpleBlazorMultiselect.Demo/App.razor new file mode 100644 index 0000000..c7730d1 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/App.razor @@ -0,0 +1,12 @@ + + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
\ No newline at end of file diff --git a/SimpleBlazorMultiselectDemo/Components/Layout/MainLayout.razor b/src/SimpleBlazorMultiselect.Demo/Layout/MainLayout.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Layout/MainLayout.razor rename to src/SimpleBlazorMultiselect.Demo/Layout/MainLayout.razor diff --git a/SimpleBlazorMultiselectDemo/Components/Layout/MainLayout.razor.css b/src/SimpleBlazorMultiselect.Demo/Layout/MainLayout.razor.css similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Layout/MainLayout.razor.css rename to src/SimpleBlazorMultiselect.Demo/Layout/MainLayout.razor.css diff --git a/SimpleBlazorMultiselectDemo/Components/Layout/NavMenu.razor b/src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Layout/NavMenu.razor rename to src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor diff --git a/SimpleBlazorMultiselectDemo/Components/Layout/NavMenu.razor.css b/src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor.css similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Layout/NavMenu.razor.css rename to src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor.css diff --git a/SimpleBlazorMultiselectDemo/Models/SimpleItem.cs b/src/SimpleBlazorMultiselect.Demo/Models/SimpleItem.cs similarity index 100% rename from SimpleBlazorMultiselectDemo/Models/SimpleItem.cs rename to src/SimpleBlazorMultiselect.Demo/Models/SimpleItem.cs diff --git a/SimpleBlazorMultiselectDemo/Components/Pages/BasicDropdown.razor b/src/SimpleBlazorMultiselect.Demo/Pages/BasicDropdown.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Pages/BasicDropdown.razor rename to src/SimpleBlazorMultiselect.Demo/Pages/BasicDropdown.razor diff --git a/SimpleBlazorMultiselectDemo/Components/Pages/CustomTemplate.razor b/src/SimpleBlazorMultiselect.Demo/Pages/CustomTemplate.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Pages/CustomTemplate.razor rename to src/SimpleBlazorMultiselect.Demo/Pages/CustomTemplate.razor diff --git a/SimpleBlazorMultiselectDemo/Components/Pages/FilteredDropdown.razor b/src/SimpleBlazorMultiselect.Demo/Pages/FilteredDropdown.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Pages/FilteredDropdown.razor rename to src/SimpleBlazorMultiselect.Demo/Pages/FilteredDropdown.razor diff --git a/SimpleBlazorMultiselectDemo/Components/Pages/Home.razor b/src/SimpleBlazorMultiselect.Demo/Pages/Home.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Pages/Home.razor rename to src/SimpleBlazorMultiselect.Demo/Pages/Home.razor diff --git a/SimpleBlazorMultiselectDemo/Components/Pages/SingleSelect.razor b/src/SimpleBlazorMultiselect.Demo/Pages/SingleSelect.razor similarity index 100% rename from SimpleBlazorMultiselectDemo/Components/Pages/SingleSelect.razor rename to src/SimpleBlazorMultiselect.Demo/Pages/SingleSelect.razor diff --git a/src/SimpleBlazorMultiselect.Demo/Program.cs b/src/SimpleBlazorMultiselect.Demo/Program.cs new file mode 100644 index 0000000..5415f6c --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Program.cs @@ -0,0 +1,14 @@ +using System; +using System.Net.Http; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.DependencyInjection; +using SimpleBlazorMultiselect.Demo; + +var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); +builder.RootComponents.Add("head::after"); + +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + +await builder.Build().RunAsync(); \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/Properties/launchSettings.json b/src/SimpleBlazorMultiselect.Demo/Properties/launchSettings.json new file mode 100644 index 0000000..a8dc3c2 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:62962", + "sslPort": 44329 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "http://localhost:5106", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "https://localhost:7019;http://localhost:5106", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/SimpleBlazorMultiselectDemo/SimpleBlazorMultiselectDemo.csproj b/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj similarity index 50% rename from SimpleBlazorMultiselectDemo/SimpleBlazorMultiselectDemo.csproj rename to src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj index c8d1870..1f6d5a8 100644 --- a/SimpleBlazorMultiselectDemo/SimpleBlazorMultiselectDemo.csproj +++ b/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -7,7 +7,11 @@ - + + + + + diff --git a/SimpleBlazorMultiselectDemo/Components/_Imports.razor b/src/SimpleBlazorMultiselect.Demo/_Imports.razor similarity index 61% rename from SimpleBlazorMultiselectDemo/Components/_Imports.razor rename to src/SimpleBlazorMultiselect.Demo/_Imports.razor index bec5154..772c458 100644 --- a/SimpleBlazorMultiselectDemo/Components/_Imports.razor +++ b/src/SimpleBlazorMultiselect.Demo/_Imports.razor @@ -3,9 +3,8 @@ @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web -@using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop -@using SimpleBlazorMultiselectDemo -@using SimpleBlazorMultiselectDemo.Components -@using SimpleBlazorMultiselect; \ No newline at end of file +@using SimpleBlazorMultiselect.Demo +@using SimpleBlazorMultiselect.Demo.Layout \ No newline at end of file diff --git a/SimpleBlazorMultiselectDemo/wwwroot/app.css b/src/SimpleBlazorMultiselect.Demo/wwwroot/css/app.css similarity index 65% rename from SimpleBlazorMultiselectDemo/wwwroot/app.css rename to src/SimpleBlazorMultiselect.Demo/wwwroot/css/app.css index 2bd9b78..54a8aa3 100644 --- a/SimpleBlazorMultiselectDemo/wwwroot/app.css +++ b/src/SimpleBlazorMultiselect.Demo/wwwroot/css/app.css @@ -2,8 +2,12 @@ html, body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; } +h1:focus { + outline: none; +} + a, .btn-link { - color: #006bb7; + color: #0071c1; } .btn-primary { @@ -20,22 +24,37 @@ a, .btn-link { padding-top: 1.1rem; } -h1:focus { - outline: none; -} - .valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; } .invalid { - outline: 1px solid #e50000; + outline: 1px solid red; } .validation-message { - color: #e50000; + color: red; } +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } + .blazor-error-boundary { background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; padding: 1rem 1rem 1rem 3.7rem; @@ -46,6 +65,39 @@ h1:focus { content: "An error has occurred." } -.darker-border-checkbox.form-check-input { - border-color: #929292; +.loading-progress { + position: relative; + display: block; + width: 8rem; + height: 8rem; + margin: 20vh auto 1rem auto; +} + + .loading-progress circle { + fill: none; + stroke: #e0e0e0; + stroke-width: 0.6rem; + transform-origin: 50% 50%; + transform: rotate(-90deg); + } + + .loading-progress circle:last-child { + stroke: #1b6ec2; + stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; + transition: stroke-dasharray 0.05s ease-in-out; + } + +.loading-progress-text { + position: absolute; + text-align: center; + font-weight: bold; + inset: calc(20vh + 3.25rem) 0 auto 0.2rem; +} + + .loading-progress-text:after { + content: var(--blazor-load-percentage-text, "Loading"); + } + +code { + color: #c02d76; } diff --git a/SimpleBlazorMultiselectDemo/wwwroot/bootstrap/bootstrap.min.css b/src/SimpleBlazorMultiselect.Demo/wwwroot/css/bootstrap/bootstrap.min.css similarity index 100% rename from SimpleBlazorMultiselectDemo/wwwroot/bootstrap/bootstrap.min.css rename to src/SimpleBlazorMultiselect.Demo/wwwroot/css/bootstrap/bootstrap.min.css diff --git a/SimpleBlazorMultiselectDemo/wwwroot/bootstrap/bootstrap.min.css.map b/src/SimpleBlazorMultiselect.Demo/wwwroot/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from SimpleBlazorMultiselectDemo/wwwroot/bootstrap/bootstrap.min.css.map rename to src/SimpleBlazorMultiselect.Demo/wwwroot/css/bootstrap/bootstrap.min.css.map diff --git a/SimpleBlazorMultiselectDemo/wwwroot/favicon.png b/src/SimpleBlazorMultiselect.Demo/wwwroot/favicon.png similarity index 100% rename from SimpleBlazorMultiselectDemo/wwwroot/favicon.png rename to src/SimpleBlazorMultiselect.Demo/wwwroot/favicon.png diff --git a/src/SimpleBlazorMultiselect.Demo/wwwroot/icon-192.png b/src/SimpleBlazorMultiselect.Demo/wwwroot/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..166f56da7612ea74df6a297154c8d281a4f28a14 GIT binary patch literal 2626 zcmV-I3cdA-P)v0A9xRwxP|bki~~&uFk>U z#P+PQh zyZ;-jwXKqnKbb6)@RaxQz@vm={%t~VbaZrdbaZrdbaeEeXj>~BG?&`J0XrqR#sSlO zg~N5iUk*15JibvlR1f^^1czzNKWvoJtc!Sj*G37QXbZ8LeD{Fzxgdv#Q{x}ytfZ5q z+^k#NaEp>zX_8~aSaZ`O%B9C&YLHb(mNtgGD&Kezd5S@&C=n~Uy1NWHM`t07VQP^MopUXki{2^#ryd94>UJMYW|(#4qV`kb7eD)Q=~NN zaVIRi@|TJ!Rni8J=5DOutQ#bEyMVr8*;HU|)MEKmVC+IOiDi9y)vz=rdtAUHW$yjt zrj3B7v(>exU=IrzC<+?AE=2vI;%fafM}#ShGDZx=0Nus5QHKdyb9pw&4>4XCpa-o?P(Gnco1CGX|U> z$f+_tA3+V~<{MU^A%eP!8R*-sD9y<>Jc7A(;aC5hVbs;kX9&Sa$JMG!W_BLFQa*hM zri__C@0i0U1X#?)Y=)>JpvTnY6^s;fu#I}K9u>OldV}m!Ch`d1Vs@v9 zb}w(!TvOmSzmMBa9gYvD4xocL2r0ds6%Hs>Z& z#7#o9PGHDmfG%JQq`O5~dt|MAQN@2wyJw_@``7Giyy(yyk(m8U*kk5$X1^;3$a3}N^Lp6hE5!#8l z#~NYHmKAs6IAe&A;bvM8OochRmXN>`D`{N$%#dZCRxp4-dJ?*3P}}T`tYa3?zz5BA zTu7uE#GsDpZ$~j9q=Zq!LYjLbZPXFILZK4?S)C-zE1(dC2d<7nO4-nSCbV#9E|E1MM|V<9>i4h?WX*r*ul1 z5#k6;po8z=fdMiVVz*h+iaTlz#WOYmU^SX5#97H~B32s-#4wk<1NTN#g?LrYieCu> zF7pbOLR;q2D#Q`^t%QcY06*X-jM+ei7%ZuanUTH#9Y%FBi*Z#22({_}3^=BboIsbg zR0#jJ>9QR8SnmtSS6x($?$}6$x+q)697#m${Z@G6Ujf=6iO^S}7P`q8DkH!IHd4lB zDzwxt3BHsPAcXFFY^Fj}(073>NL_$A%v2sUW(CRutd%{G`5ow?L`XYSO*Qu?x+Gzv zBtR}Y6`XF4xX7)Z04D+fH;TMapdQFFameUuHL34NN)r@aF4RO%x&NApeWGtr#mG~M z6sEIZS;Uj1HB1*0hh=O@0q1=Ia@L>-tETu-3n(op+97E z#&~2xggrl(LA|giII;RwBlX2^Q`B{_t}gxNL;iB11gEPC>v` zb4SJ;;BFOB!{chn>?cCeGDKuqI0+!skyWTn*k!WiPNBf=8rn;@y%( znhq%8fj2eAe?`A5mP;TE&iLEmQ^xV%-kmC-8mWao&EUK_^=GW-Y3z ksi~={si~={skwfB0gq6itke#r1ONa407*qoM6N<$g11Kq@c;k- literal 0 HcmV?d00001 diff --git a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html new file mode 100644 index 0000000..aec2b27 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html @@ -0,0 +1,35 @@ + + + + + + + SimpleBlazorMultiselect.Demo + + + + + + + + + + + +
+ + + + +
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + diff --git a/src/SimpleBlazorMultiselect.Demo/wwwroot/sample-data/weather.json b/src/SimpleBlazorMultiselect.Demo/wwwroot/sample-data/weather.json new file mode 100644 index 0000000..b745973 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/wwwroot/sample-data/weather.json @@ -0,0 +1,27 @@ +[ + { + "date": "2022-01-06", + "temperatureC": 1, + "summary": "Freezing" + }, + { + "date": "2022-01-07", + "temperatureC": 14, + "summary": "Bracing" + }, + { + "date": "2022-01-08", + "temperatureC": -13, + "summary": "Freezing" + }, + { + "date": "2022-01-09", + "temperatureC": -16, + "summary": "Balmy" + }, + { + "date": "2022-01-10", + "temperatureC": -2, + "summary": "Chilly" + } +] diff --git a/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj b/src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj similarity index 95% rename from SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj rename to src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj index 0787f30..c6e24c0 100644 --- a/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj +++ b/src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj @@ -26,11 +26,11 @@ - + True \ - + True \ diff --git a/SimpleBlazorMultiselect/SimpleMultiselect.razor b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor similarity index 100% rename from SimpleBlazorMultiselect/SimpleMultiselect.razor rename to src/SimpleBlazorMultiselect/SimpleMultiselect.razor diff --git a/SimpleBlazorMultiselect/SimpleMultiselect.razor.cs b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor.cs similarity index 96% rename from SimpleBlazorMultiselect/SimpleMultiselect.razor.cs rename to src/SimpleBlazorMultiselect/SimpleMultiselect.razor.cs index 8539fb2..629e37e 100644 --- a/SimpleBlazorMultiselect/SimpleMultiselect.razor.cs +++ b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor.cs @@ -1,4 +1,6 @@ -using Microsoft.AspNetCore.Components; +using System; +using System.Collections.Generic; +using Microsoft.AspNetCore.Components; namespace SimpleBlazorMultiselect; diff --git a/SimpleBlazorMultiselect/SimpleMultiselect.razor.css b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor.css similarity index 100% rename from SimpleBlazorMultiselect/SimpleMultiselect.razor.css rename to src/SimpleBlazorMultiselect/SimpleMultiselect.razor.css diff --git a/SimpleBlazorMultiselect/_Imports.razor b/src/SimpleBlazorMultiselect/_Imports.razor similarity index 100% rename from SimpleBlazorMultiselect/_Imports.razor rename to src/SimpleBlazorMultiselect/_Imports.razor diff --git a/SimpleBlazorMultiselect/wwwroot/bootstrap.bundle.min.js b/src/SimpleBlazorMultiselect/wwwroot/bootstrap.bundle.min.js similarity index 100% rename from SimpleBlazorMultiselect/wwwroot/bootstrap.bundle.min.js rename to src/SimpleBlazorMultiselect/wwwroot/bootstrap.bundle.min.js diff --git a/SimpleBlazorMultiselect/wwwroot/bootstrap.min.css b/src/SimpleBlazorMultiselect/wwwroot/bootstrap.min.css similarity index 100% rename from SimpleBlazorMultiselect/wwwroot/bootstrap.min.css rename to src/SimpleBlazorMultiselect/wwwroot/bootstrap.min.css From ba843338ac73e4cd6b05caf1d08e06a3bf4cbfd0 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 21:27:13 +0100 Subject: [PATCH 03/27] fixed styling issue, added nuke clean logging --- build/Build.cs | 7 ++++++- src/SimpleBlazorMultiselect.Demo/wwwroot/index.html | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index 9df55e6..2de22bd 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -40,7 +40,12 @@ class Build : NukeBuild .Before(Restore) .Executes(() => { - SourceDirectory.GlobDirectories("**/bin", "**/obj").ForEach(path => path.DeleteDirectory()); + SourceDirectory.GlobDirectories("**/bin", "**/obj") + .ForEach(path => + { + Console.WriteLine($"Removing '{path}'"); + path.DeleteDirectory(); + }); ArtifactsDirectory.CreateOrCleanDirectory(); }); diff --git a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html index aec2b27..3d713d0 100644 --- a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html +++ b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html @@ -6,13 +6,12 @@ SimpleBlazorMultiselect.Demo - - - + + From 8eec89e9c05324f862c6cbd5e756b285224a6153 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 22:52:50 +0100 Subject: [PATCH 04/27] Added github pages --- .nuke/build.schema.json | 2 + build/Build.cs | 100 ++++++++++++++++++++++++++++++++-------- build/_build.csproj | 1 + 3 files changed, 84 insertions(+), 19 deletions(-) diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index b1bce39..e023650 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -88,6 +88,7 @@ "Clean", "Compile", "Pack", + "PublishDemo", "Push", "Restore", "Test" @@ -107,6 +108,7 @@ "Clean", "Compile", "Pack", + "PublishDemo", "Push", "Restore", "Test" diff --git a/build/Build.cs b/build/Build.cs index 2de22bd..f0c4065 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,45 +1,56 @@ using System; +using System.IO; using System.Linq; using Nuke.Common; using Nuke.Common.CI; using Nuke.Common.CI.GitHubActions; using Nuke.Common.Execution; +using Nuke.Common.Git; using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; +using Nuke.Common.Tools.GitHub; using Nuke.Common.Tools.GitVersion; using Nuke.Common.Utilities.Collections; -using static Nuke.Common.EnvironmentInfo; -using static Nuke.Common.IO.FileSystemTasks; -using static Nuke.Common.IO.PathConstruction; +using Octokit; +using Octokit.Internal; using static Nuke.Common.Tools.DotNet.DotNetTasks; +using Project = Nuke.Common.ProjectModel.Project; [GitHubActions("test", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Test) }, FetchDepth = 10000)] -[GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] +[GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push), nameof(DeployDemo) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] class Build : NukeBuild { - [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; + [Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; [GitVersion] readonly GitVersion GitVersion; - [Parameter("API Key for the NuGet server.")] [Secret] readonly string NugetApiKey; + [Nuke.Common.Parameter("API Key for the NuGet server.")] [Secret] readonly string NugetApiKey; - [Parameter("NuGet server URL.")] readonly string NugetSource = "https://api.nuget.org/v3/index.json"; + [Nuke.Common.Parameter("NuGet server URL.")] readonly string NugetSource = "https://api.nuget.org/v3/index.json"; - [Parameter("NuGet package version.")] readonly string PackageVersion; + [Nuke.Common.Parameter("NuGet package version.")] readonly string PackageVersion; + + static GitHubActions GitHubActions => GitHubActions.Instance; + [GitRepository] readonly GitRepository Repository; [Solution] readonly Solution Solution; AbsolutePath SourceDirectory => RootDirectory / "src"; AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; - - Project TargetProject => Solution.GetProject("SimpleBlazorMultiselect"); - + AbsolutePath TempDirectory => RootDirectory / "temp"; + AbsolutePath DemoDirectory => TempDirectory / "demo"; + + Project LibProject => Solution.GetProject("SimpleBlazorMultiselect"); + Project DemoProject => Solution.GetProject("SimpleBlazorMultiselect.Demo"); + Target Clean => _ => _ .Before(Restore) .Executes(() => { + TempDirectory.CreateOrCleanDirectory(); + DemoDirectory.CreateOrCleanDirectory(); SourceDirectory.GlobDirectories("**/bin", "**/obj") .ForEach(path => { @@ -68,8 +79,20 @@ class Build : NukeBuild .SetAssemblyVersion(GitVersion.AssemblySemVer) .SetFileVersion(GitVersion.AssemblySemFileVer) .SetInformationalVersion(GitVersion.InformationalVersion) + .CombineWith( + from project in new[] { LibProject, DemoProject } + from framework in project.GetTargetFrameworks() + select new { project, framework }, (cs, v) => cs + .SetProjectFile(v.project.Path) + .SetFramework(v.framework) + ) ); + }); + Target BuildDemo => _ => _ + .DependsOn(Restore, Compile) + .Executes(() => + { DotNetPublish(s => s .EnableNoRestore() .EnableNoBuild() @@ -77,16 +100,55 @@ class Build : NukeBuild .SetAssemblyVersion(GitVersion.AssemblySemVer) .SetFileVersion(GitVersion.AssemblySemFileVer) .SetInformationalVersion(GitVersion.InformationalVersion) - .CombineWith( - from project in new[] { TargetProject } - from framework in project.GetTargetFrameworks() - select new { project, framework }, (cs, v) => cs - .SetProject(v.project) - .SetFramework(v.framework) - ) + .SetProject(DemoProject) + .SetOutput(DemoDirectory) ); }); + + Target DeployDemo => _ => _ + .DependsOn(BuildDemo) + .Requires(() => Configuration == Configuration.Release) + .Executes(async () => + { + var credentials = new Credentials(GitHubActions.Token); + GitHubTasks.GitHubClient = new GitHubClient(new ProductHeaderValue(nameof(NukeBuild)), + new InMemoryCredentialStore(credentials)); + var client = GitHubTasks.GitHubClient; + + var repoOwner = Repository.GetGitHubOwner(); + var repoName = Repository.GetGitHubName(); + + var ghPagesBranch = await client.Repository.Branch.Get(repoOwner, repoName, "gh-pages"); + var latestCommit = await client.Git.Commit.Get(repoOwner, repoName, ghPagesBranch.Commit.Sha); + + var files = DemoDirectory.GlobFiles("**/*"); + var newTree = new NewTree { BaseTree = latestCommit.Tree.Sha }; + foreach (var file in files) + { + var fileContent = await File.ReadAllTextAsync(file); + var blob = new NewBlob + { + Content = fileContent, + Encoding = EncodingType.Utf8 + }; + + var blobRef = await client.Git.Blob.Create(repoOwner, repoName, blob); + newTree.Tree.Add(new NewTreeItem + { + Path = file, + Mode = "100644", + Type = TreeType.Blob, + Sha = blobRef.Sha + }); + } + + var newTreeRef = await client.Git.Tree.Create(repoOwner, repoName, newTree); + var newCommit = new NewCommit("Deploying to GitHub Pages", newTreeRef.Sha, latestCommit.Sha); + var commitRef = await client.Git.Commit.Create(repoOwner, repoName, newCommit); + await client.Git.Reference.Update(repoOwner, repoName, "heads/gh-pages", new ReferenceUpdate(commitRef.Sha)); + }) + Target Test => _ => _ .DependsOn(Compile) .Executes(() => @@ -110,7 +172,7 @@ from framework in project.GetTargetFrameworks() DotNetPack(s => s .EnableNoRestore() .EnableNoBuild() - .SetProject(TargetProject) + .SetProject(LibProject) .SetConfiguration(Configuration) .SetOutputDirectory(ArtifactsDirectory) .SetProperty("PackageVersion", PackageVersion ?? GitVersion.NuGetVersionV2) diff --git a/build/_build.csproj b/build/_build.csproj index 608ff07..bba68e4 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -13,6 +13,7 @@ + From 54dc84620194a4f085340ada22f837bd718e6318 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 22:54:40 +0100 Subject: [PATCH 05/27] publish demo --- .github/workflows/publish_demo.yml | 37 ++++++++++++++++++++++++++++++ .nuke/build.schema.json | 6 +++-- build/Build.cs | 13 ++++++----- 3 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/publish_demo.yml diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml new file mode 100644 index 0000000..f0b8aff --- /dev/null +++ b/.github/workflows/publish_demo.yml @@ -0,0 +1,37 @@ +# ------------------------------------------------------------------------------ +# +# +# This code was generated. +# +# - To turn off auto-generation set: +# +# [GitHubActions (AutoGenerate = false)] +# +# - To trigger manual generation invoke: +# +# nuke --generate-configuration GitHubActions_publish_demo --host GitHubActions +# +# +# ------------------------------------------------------------------------------ + +name: publish_demo + +on: [workflow_dispatch] + +jobs: + ubuntu-latest: + name: ubuntu-latest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 10000 + - name: 'Cache: .nuke/temp, ~/.nuget/packages' + uses: actions/cache@v3 + with: + path: | + .nuke/temp + ~/.nuget/packages + key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + - name: 'Run: DeployDemo' + run: ./build.cmd DeployDemo diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index e023650..7ed3e2b 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -85,10 +85,11 @@ "items": { "type": "string", "enum": [ + "BuildDemo", "Clean", "Compile", + "DeployDemo", "Pack", - "PublishDemo", "Push", "Restore", "Test" @@ -105,10 +106,11 @@ "items": { "type": "string", "enum": [ + "BuildDemo", "Clean", "Compile", + "DeployDemo", "Pack", - "PublishDemo", "Push", "Restore", "Test" diff --git a/build/Build.cs b/build/Build.cs index f0c4065..25c020a 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -19,7 +19,8 @@ using Project = Nuke.Common.ProjectModel.Project; [GitHubActions("test", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Test) }, FetchDepth = 10000)] -[GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push), nameof(DeployDemo) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] +[GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] +[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000)] class Build : NukeBuild { [Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; @@ -104,7 +105,7 @@ from framework in project.GetTargetFrameworks() .SetOutput(DemoDirectory) ); }); - + Target DeployDemo => _ => _ .DependsOn(BuildDemo) .Requires(() => Configuration == Configuration.Release) @@ -114,10 +115,10 @@ from framework in project.GetTargetFrameworks() GitHubTasks.GitHubClient = new GitHubClient(new ProductHeaderValue(nameof(NukeBuild)), new InMemoryCredentialStore(credentials)); var client = GitHubTasks.GitHubClient; - + var repoOwner = Repository.GetGitHubOwner(); var repoName = Repository.GetGitHubName(); - + var ghPagesBranch = await client.Repository.Branch.Get(repoOwner, repoName, "gh-pages"); var latestCommit = await client.Git.Commit.Get(repoOwner, repoName, ghPagesBranch.Commit.Sha); @@ -131,7 +132,7 @@ from framework in project.GetTargetFrameworks() Content = fileContent, Encoding = EncodingType.Utf8 }; - + var blobRef = await client.Git.Blob.Create(repoOwner, repoName, blob); newTree.Tree.Add(new NewTreeItem { @@ -147,7 +148,7 @@ from framework in project.GetTargetFrameworks() var newCommit = new NewCommit("Deploying to GitHub Pages", newTreeRef.Sha, latestCommit.Sha); var commitRef = await client.Git.Commit.Create(repoOwner, repoName, newCommit); await client.Git.Reference.Update(repoOwner, repoName, "heads/gh-pages", new ReferenceUpdate(commitRef.Sha)); - }) + }); Target Test => _ => _ .DependsOn(Compile) From 5ec3bfa31b616f269ed4cff1a02eff59d1002536 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 23:04:16 +0100 Subject: [PATCH 06/27] issue with gh actions --- .github/workflows/publish_demo.yml | 2 +- build/Build.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml index f0b8aff..739d8b6 100644 --- a/.github/workflows/publish_demo.yml +++ b/.github/workflows/publish_demo.yml @@ -16,7 +16,7 @@ name: publish_demo -on: [workflow_dispatch] +on: [workflow_dispatch, push] jobs: ubuntu-latest: diff --git a/build/Build.cs b/build/Build.cs index 25c020a..3bbbbc0 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -20,7 +20,7 @@ [GitHubActions("test", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Test) }, FetchDepth = 10000)] [GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] -[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000)] +[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000)] class Build : NukeBuild { [Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; From 721a35ca3a7366a237203d4a3d077e8d0f64e841 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 23:08:05 +0100 Subject: [PATCH 07/27] gitversion --- GitVersion.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GitVersion.yml b/GitVersion.yml index c47807b..a4665d8 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,5 +1,11 @@ mode: Mainline -branches: {} +branches: + master: + regex: (origin/)?master + develop: + increment: Patch + tag: beta + regex: (origin/)?dev(elop)?(ment)?$ ignore: sha: [] merge-message-formats: {} From baa3d4aef88a99f98eae7bb5caa43a8d75407345 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 23:54:23 +0100 Subject: [PATCH 08/27] gitversion is broken now --- GitVersion.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/GitVersion.yml b/GitVersion.yml index a4665d8..b08c465 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -4,7 +4,6 @@ branches: regex: (origin/)?master develop: increment: Patch - tag: beta regex: (origin/)?dev(elop)?(ment)?$ ignore: sha: [] From fe7b50386e2f3437d9a00b84a3fcbb78e02b5cd3 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Sun, 26 Nov 2023 23:58:32 +0100 Subject: [PATCH 09/27] GitVersion.yml --- GitVersion.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GitVersion.yml b/GitVersion.yml index b08c465..b8a5742 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -4,7 +4,8 @@ branches: regex: (origin/)?master develop: increment: Patch - regex: (origin/)?dev(elop)?(ment)?$ + tag: beta + regex: (origin/)?development$ ignore: sha: [] merge-message-formats: {} From 97d60019ab2ffd152f219e646c69c090eb6485c9 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 00:05:08 +0100 Subject: [PATCH 10/27] GitVersion.yml --- GitVersion.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index b8a5742..514b9bc 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,11 +1,10 @@ mode: Mainline branches: - master: - regex: (origin/)?master - develop: - increment: Patch - tag: beta - regex: (origin/)?development$ + development: + is-mainline: true + increment: Patch + tag: beta + regex: (origin/)?development$ ignore: sha: [] merge-message-formats: {} From 92296f5864e6f6ad4ed10363d56ad7f02ffe1da6 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 00:06:47 +0100 Subject: [PATCH 11/27] source branches --- GitVersion.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/GitVersion.yml b/GitVersion.yml index 514b9bc..d05a49a 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -2,6 +2,7 @@ branches: development: is-mainline: true + source-branches: [] increment: Patch tag: beta regex: (origin/)?development$ From 0d0489086235219d3fb504bfb506cee68e6abec4 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 00:18:32 +0100 Subject: [PATCH 12/27] develop? --- GitVersion.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index d05a49a..b08df24 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,8 +1,8 @@ mode: Mainline branches: - development: + develop: is-mainline: true - source-branches: [] + source-branches: [ ] increment: Patch tag: beta regex: (origin/)?development$ From 58087e201631d6d65c599efb1eb04078d9e659cf Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 00:22:06 +0100 Subject: [PATCH 13/27] fix token --- .github/workflows/publish_demo.yml | 2 ++ build/Build.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml index 739d8b6..8e88c4a 100644 --- a/.github/workflows/publish_demo.yml +++ b/.github/workflows/publish_demo.yml @@ -35,3 +35,5 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} - name: 'Run: DeployDemo' run: ./build.cmd DeployDemo + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build/Build.cs b/build/Build.cs index 3bbbbc0..b18e531 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -20,7 +20,7 @@ [GitHubActions("test", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Test) }, FetchDepth = 10000)] [GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] -[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000)] +[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000, EnableGitHubToken = true)] class Build : NukeBuild { [Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; @@ -33,7 +33,7 @@ class Build : NukeBuild [Nuke.Common.Parameter("NuGet package version.")] readonly string PackageVersion; - static GitHubActions GitHubActions => GitHubActions.Instance; + GitHubActions GitHubActions => GitHubActions.Instance; [GitRepository] readonly GitRepository Repository; [Solution] readonly Solution Solution; From 2bd8eff16e69d81f0419d4a32a9f0d9f581b73af Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 00:25:41 +0100 Subject: [PATCH 14/27] run deploy From 6ffb3094ff741a13914167a86ebbad8b96bc84c8 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 00:36:20 +0100 Subject: [PATCH 15/27] fix token for real this time --- .github/workflows/publish_demo.yml | 2 +- .nuke/build.schema.json | 5 +++++ build/Build.cs | 7 ++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml index 8e88c4a..85e9a9a 100644 --- a/.github/workflows/publish_demo.yml +++ b/.github/workflows/publish_demo.yml @@ -36,4 +36,4 @@ jobs: - name: 'Run: DeployDemo' run: ./build.cmd DeployDemo env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TokenGithub: ${{ secrets.TOKEN_GITHUB }} diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 7ed3e2b..6596734 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -117,6 +117,11 @@ ] } }, + "TokenGithub": { + "type": "string", + "description": "Github token", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, "Verbosity": { "type": "string", "description": "Logging verbosity during build execution. Default is 'Normal'", diff --git a/build/Build.cs b/build/Build.cs index b18e531..5a0ded7 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -20,7 +20,7 @@ [GitHubActions("test", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Test) }, FetchDepth = 10000)] [GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] -[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000, EnableGitHubToken = true)] +[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000, ImportSecrets = new[] {nameof(TokenGithub)})] class Build : NukeBuild { [Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; @@ -32,7 +32,8 @@ class Build : NukeBuild [Nuke.Common.Parameter("NuGet server URL.")] readonly string NugetSource = "https://api.nuget.org/v3/index.json"; [Nuke.Common.Parameter("NuGet package version.")] readonly string PackageVersion; - + + [Nuke.Common.Parameter("Github token.")] [Secret] readonly string TokenGithub; GitHubActions GitHubActions => GitHubActions.Instance; [GitRepository] readonly GitRepository Repository; @@ -111,7 +112,7 @@ from framework in project.GetTargetFrameworks() .Requires(() => Configuration == Configuration.Release) .Executes(async () => { - var credentials = new Credentials(GitHubActions.Token); + var credentials = new Credentials(TokenGithub); GitHubTasks.GitHubClient = new GitHubClient(new ProductHeaderValue(nameof(NukeBuild)), new InMemoryCredentialStore(credentials)); var client = GitHubTasks.GitHubClient; From 145aba0e735687563b5b85106a03c373233e125e Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 15:38:02 +0100 Subject: [PATCH 16/27] Git messes up line endings so deploy fails --- .github/workflows/publish_demo.yml | 4 ++ .gitignore | 3 +- build/Build.cs | 67 ++++++++++++++++--- .../SimpleBlazorMultiselect.Demo.csproj | 1 + .../wwwroot/index.html | 6 +- 5 files changed, 66 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml index 85e9a9a..79c739a 100644 --- a/.github/workflows/publish_demo.yml +++ b/.github/workflows/publish_demo.yml @@ -18,6 +18,10 @@ name: publish_demo on: [workflow_dispatch, push] +permissions: + contents: write + pages: write + jobs: ubuntu-latest: name: ubuntu-latest diff --git a/.gitignore b/.gitignore index 0f425b8..7e8a8bc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ obj/ riderModule.iml /_ReSharper.Caches/ artifacts/ -.nuke/temp \ No newline at end of file +.nuke/temp +temp/ \ No newline at end of file diff --git a/build/Build.cs b/build/Build.cs index 5a0ded7..29e2236 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Linq; +using System.Threading.Tasks; using Nuke.Common; using Nuke.Common.CI; using Nuke.Common.CI.GitHubActions; @@ -10,6 +11,7 @@ using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; +using Nuke.Common.Tools.Git; using Nuke.Common.Tools.GitHub; using Nuke.Common.Tools.GitVersion; using Nuke.Common.Utilities.Collections; @@ -20,7 +22,15 @@ [GitHubActions("test", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.PullRequest, GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Test) }, FetchDepth = 10000)] [GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] -[GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, InvokedTargets = new[] { nameof(DeployDemo) }, FetchDepth = 10000, ImportSecrets = new[] {nameof(TokenGithub)})] +[GitHubActions("publish demo", + GitHubActionsImage.UbuntuLatest, + On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, + InvokedTargets = new[] { nameof(DeployDemo) }, + FetchDepth = 10000, + ImportSecrets = new[] {nameof(TokenGithub)}, + WritePermissions = new[] { GitHubActionsPermissions.Contents, GitHubActionsPermissions.Pages } + + )] class Build : NukeBuild { [Nuke.Common.Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; @@ -34,7 +44,7 @@ class Build : NukeBuild [Nuke.Common.Parameter("NuGet package version.")] readonly string PackageVersion; [Nuke.Common.Parameter("Github token.")] [Secret] readonly string TokenGithub; - GitHubActions GitHubActions => GitHubActions.Instance; + [GitRepository] readonly GitRepository Repository; [Solution] readonly Solution Solution; @@ -93,6 +103,8 @@ from framework in project.GetTargetFrameworks() Target BuildDemo => _ => _ .DependsOn(Restore, Compile) + .Before(DeployDemo) + .Produces(ArtifactsDirectory / "demo.zip") .Executes(() => { DotNetPublish(s => s @@ -105,10 +117,13 @@ from framework in project.GetTargetFrameworks() .SetProject(DemoProject) .SetOutput(DemoDirectory) ); + + var zipPath = ArtifactsDirectory / "demo.zip"; + zipPath.DeleteFile(); + (DemoDirectory / "wwwroot").CompressTo(zipPath); }); Target DeployDemo => _ => _ - .DependsOn(BuildDemo) .Requires(() => Configuration == Configuration.Release) .Executes(async () => { @@ -122,12 +137,29 @@ from framework in project.GetTargetFrameworks() var ghPagesBranch = await client.Repository.Branch.Get(repoOwner, repoName, "gh-pages"); var latestCommit = await client.Git.Commit.Get(repoOwner, repoName, ghPagesBranch.Commit.Sha); - - var files = DemoDirectory.GlobFiles("**/*"); - var newTree = new NewTree { BaseTree = latestCommit.Tree.Sha }; - foreach (var file in files) + + var wwwroot = DemoDirectory / "wwwroot"; + var files = wwwroot.GlobFiles("**/*"); + var newTree = new NewTree(); + newTree.Tree.Add(new NewTreeItem + { + Path = ".nojekyll", + Mode = "100644", + Type = TreeType.Blob, + Content = "" + }); + + newTree.Tree.Add(new NewTreeItem + { + Path = ".gitattributes", + Mode = "100644", + Type = TreeType.Blob, + Content = "* binary" + }); + var tasks = files.Select(async file => { var fileContent = await File.ReadAllTextAsync(file); + if (string.IsNullOrEmpty(fileContent)) return; var blob = new NewBlob { Content = fileContent, @@ -137,18 +169,31 @@ from framework in project.GetTargetFrameworks() var blobRef = await client.Git.Blob.Create(repoOwner, repoName, blob); newTree.Tree.Add(new NewTreeItem { - Path = file, + Path = file.ToString()! + .Replace(wwwroot.ToString()!, "") + .Replace("\\", "/") + .TrimStart('/'), Mode = "100644", Type = TreeType.Blob, Sha = blobRef.Sha }); - } - + Console.WriteLine($"Added '{file}' to commit"); + }); + + await Task.WhenAll(tasks); + + Console.WriteLine("Creating new tree"); var newTreeRef = await client.Git.Tree.Create(repoOwner, repoName, newTree); - + Console.WriteLine($"Created new tree '{newTreeRef.Sha}'"); + + Console.WriteLine("Creating new commit"); var newCommit = new NewCommit("Deploying to GitHub Pages", newTreeRef.Sha, latestCommit.Sha); var commitRef = await client.Git.Commit.Create(repoOwner, repoName, newCommit); + Console.WriteLine($"Created new commit '{commitRef.Sha}'"); + + Console.WriteLine("Updating reference"); await client.Git.Reference.Update(repoOwner, repoName, "heads/gh-pages", new ReferenceUpdate(commitRef.Sha)); + Console.WriteLine("Reference updated"); }); Target Test => _ => _ diff --git a/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj b/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj index 1f6d5a8..e9536e7 100644 --- a/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj +++ b/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj @@ -4,6 +4,7 @@ net8.0 enable enable + false diff --git a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html index 3d713d0..8b8f4df 100644 --- a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html +++ b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html @@ -5,13 +5,13 @@ SimpleBlazorMultiselect.Demo - + - - + + From 94e39c244b968b0b7dba4f7c8d2d7a8c0058f27c Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 15:39:42 +0100 Subject: [PATCH 17/27] added clean and build to publish demo --- .github/workflows/publish_demo.yml | 9 +++++++-- build/Build.cs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml index 79c739a..afe4b22 100644 --- a/.github/workflows/publish_demo.yml +++ b/.github/workflows/publish_demo.yml @@ -37,7 +37,12 @@ jobs: .nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} - - name: 'Run: DeployDemo' - run: ./build.cmd DeployDemo + - name: 'Run: Clean, BuildDemo, DeployDemo' + run: ./build.cmd Clean BuildDemo DeployDemo env: TokenGithub: ${{ secrets.TOKEN_GITHUB }} + - name: 'Publish: demo.zip' + uses: actions/upload-artifact@v3 + with: + name: demo.zip + path: artifacts/demo.zip diff --git a/build/Build.cs b/build/Build.cs index 29e2236..bc8dc9b 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -25,7 +25,7 @@ [GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, - InvokedTargets = new[] { nameof(DeployDemo) }, + InvokedTargets = new[] { nameof(Clean), nameof(BuildDemo), nameof(DeployDemo) }, FetchDepth = 10000, ImportSecrets = new[] {nameof(TokenGithub)}, WritePermissions = new[] { GitHubActionsPermissions.Contents, GitHubActionsPermissions.Pages } From 4c0b0c8a2e405cd3f38b387f9b6568cdbdc6af9a Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 16:13:24 +0100 Subject: [PATCH 18/27] everything should work now --- build/Build.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index bc8dc9b..d8efa88 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Linq; +using System.Text; using System.Threading.Tasks; using Nuke.Common; using Nuke.Common.CI; @@ -158,12 +159,13 @@ from framework in project.GetTargetFrameworks() }); var tasks = files.Select(async file => { - var fileContent = await File.ReadAllTextAsync(file); - if (string.IsNullOrEmpty(fileContent)) return; + var bytes = file.ReadAllBytes(); + var base64String = Convert.ToBase64String(bytes); + if (string.IsNullOrEmpty(base64String)) return; var blob = new NewBlob { - Content = fileContent, - Encoding = EncodingType.Utf8 + Content = base64String, + Encoding = EncodingType.Base64 }; var blobRef = await client.Git.Blob.Create(repoOwner, repoName, blob); From dc275b5b869ec32f2b143aa200db2544f49112f8 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 17:04:37 +0100 Subject: [PATCH 19/27] Added virtualize comparison to demo --- .nuke/build.schema.json | 5 ++++ build/Build.cs | 16 ++++++----- .../Layout/NavMenu.razor | 15 ++++++++++- .../Pages/BigListNoVirtualize.razor | 26 ++++++++++++++++++ .../Pages/BigListVirtualize.razor | 27 +++++++++++++++++++ .../wwwroot/index.html | 2 +- 6 files changed, 83 insertions(+), 8 deletions(-) create mode 100644 src/SimpleBlazorMultiselect.Demo/Pages/BigListNoVirtualize.razor create mode 100644 src/SimpleBlazorMultiselect.Demo/Pages/BigListVirtualize.razor diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 6596734..0515d5d 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -6,6 +6,11 @@ "build": { "type": "object", "properties": { + "BaseUrl": { + "type": "string", + "description": "Base url", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, "Configuration": { "type": "string", "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", diff --git a/build/Build.cs b/build/Build.cs index d8efa88..a1a2b7d 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,20 +1,16 @@ using System; -using System.IO; using System.Linq; -using System.Text; using System.Threading.Tasks; using Nuke.Common; -using Nuke.Common.CI; using Nuke.Common.CI.GitHubActions; -using Nuke.Common.Execution; using Nuke.Common.Git; using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; -using Nuke.Common.Tools.Git; using Nuke.Common.Tools.GitHub; using Nuke.Common.Tools.GitVersion; +using Nuke.Common.Utilities; using Nuke.Common.Utilities.Collections; using Octokit; using Octokit.Internal; @@ -45,6 +41,7 @@ class Build : NukeBuild [Nuke.Common.Parameter("NuGet package version.")] readonly string PackageVersion; [Nuke.Common.Parameter("Github token.")] [Secret] readonly string TokenGithub; + [Nuke.Common.Parameter("Base url.")] [Secret] readonly string BaseUrl = "/SimpleBlazorMultiselect/"; [GitRepository] readonly GitRepository Repository; @@ -157,6 +154,13 @@ from framework in project.GetTargetFrameworks() Type = TreeType.Blob, Content = "* binary" }); + + // replace base href + var indexHtml = wwwroot / "index.html"; + var indexHtmlContent = indexHtml.ReadAllText(); + indexHtmlContent = indexHtmlContent.ReplaceRegex("()", m => $"{m.Groups[1].Value}{BaseUrl}{m.Groups[3].Value}"); + indexHtml.WriteAllText(indexHtmlContent); + var tasks = files.Select(async file => { var bytes = file.ReadAllBytes(); @@ -167,7 +171,7 @@ from framework in project.GetTargetFrameworks() Content = base64String, Encoding = EncodingType.Base64 }; - + var blobRef = await client.Git.Blob.Create(repoOwner, repoName, blob); newTree.Tree.Add(new NewTreeItem { diff --git a/src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor b/src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor index f1dcebe..eddf69a 100644 --- a/src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor +++ b/src/SimpleBlazorMultiselect.Demo/Layout/NavMenu.razor @@ -40,7 +40,20 @@ CustomTemplate + + + + + + + - \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/Pages/BigListNoVirtualize.razor b/src/SimpleBlazorMultiselect.Demo/Pages/BigListNoVirtualize.razor new file mode 100644 index 0000000..8ba5679 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Pages/BigListNoVirtualize.razor @@ -0,0 +1,26 @@ +@page "/BigListNoVirtualize" +

Big list without virtualize

+
+
+ +
+
+ You have selected the following items: +
    + @foreach (var item in _selectedItems) + { +
  • @item
  • + } +
+
+
+ + +@code { + private readonly List _items = Enumerable.Range(1, 100_000).Select(i => $"Item {i}").ToList(); + private List _selectedItems = new(); + +} \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/Pages/BigListVirtualize.razor b/src/SimpleBlazorMultiselect.Demo/Pages/BigListVirtualize.razor new file mode 100644 index 0000000..9ce4ffd --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Pages/BigListVirtualize.razor @@ -0,0 +1,27 @@ +@page "/BigListVirtualize" +

Big list with virtualize

+
+
+ +
+
+ You have selected the following items: +
    + @foreach (var item in _selectedItems) + { +
  • @item
  • + } +
+
+
+ + +@code { + private readonly List _items = Enumerable.Range(1, 100_000).Select(i => $"Item {i}").ToList(); + private List _selectedItems = new(); + +} \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html index 8b8f4df..8aaf231 100644 --- a/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html +++ b/src/SimpleBlazorMultiselect.Demo/wwwroot/index.html @@ -5,7 +5,7 @@ SimpleBlazorMultiselect.Demo - + From 9c79baadeff61873b3ee0469a3896fd572617e88 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 17:12:34 +0100 Subject: [PATCH 20/27] Update publish flow --- .github/workflows/publish_demo.yml | 2 +- .nuke/build.schema.json | 3 +-- build/Build.cs | 5 ++--- .../SimpleBlazorMultiselect.Demo.csproj | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish_demo.yml b/.github/workflows/publish_demo.yml index afe4b22..d090861 100644 --- a/.github/workflows/publish_demo.yml +++ b/.github/workflows/publish_demo.yml @@ -16,7 +16,7 @@ name: publish_demo -on: [workflow_dispatch, push] +on: [workflow_dispatch] permissions: contents: write diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 0515d5d..cf70c3f 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -8,8 +8,7 @@ "properties": { "BaseUrl": { "type": "string", - "description": "Base url", - "default": "Secrets must be entered via 'nuke :secrets [profile]'" + "description": "Base url" }, "Configuration": { "type": "string", diff --git a/build/Build.cs b/build/Build.cs index a1a2b7d..90da7f7 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -21,12 +21,11 @@ [GitHubActions("publish", GitHubActionsImage.UbuntuLatest, On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Pack), nameof(Push) }, ImportSecrets = new[] { nameof(NugetApiKey) }, FetchDepth = 10000)] [GitHubActions("publish demo", GitHubActionsImage.UbuntuLatest, - On = new[] { GitHubActionsTrigger.WorkflowDispatch, GitHubActionsTrigger.Push }, + On = new[] { GitHubActionsTrigger.WorkflowDispatch }, InvokedTargets = new[] { nameof(Clean), nameof(BuildDemo), nameof(DeployDemo) }, FetchDepth = 10000, ImportSecrets = new[] {nameof(TokenGithub)}, WritePermissions = new[] { GitHubActionsPermissions.Contents, GitHubActionsPermissions.Pages } - )] class Build : NukeBuild { @@ -41,7 +40,7 @@ class Build : NukeBuild [Nuke.Common.Parameter("NuGet package version.")] readonly string PackageVersion; [Nuke.Common.Parameter("Github token.")] [Secret] readonly string TokenGithub; - [Nuke.Common.Parameter("Base url.")] [Secret] readonly string BaseUrl = "/SimpleBlazorMultiselect/"; + [Nuke.Common.Parameter("Base url.")] readonly string BaseUrl = "/SimpleBlazorMultiselect/"; [GitRepository] readonly GitRepository Repository; diff --git a/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj b/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj index e9536e7..1f6d5a8 100644 --- a/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj +++ b/src/SimpleBlazorMultiselect.Demo/SimpleBlazorMultiselect.Demo.csproj @@ -4,7 +4,6 @@ net8.0 enable enable - false From a469a38b1ac1ea32be863c349ea136dcf83a4b56 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 17:25:21 +0100 Subject: [PATCH 21/27] Added demo url to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d7818a1..a543e74 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This package contains a simple blazor dropdown component that supports single an ## Usage See the project `SimpleBlazorMultiselectDemo` for more examples of how to use the component, or take a look at the properties page on the [wiki](https://github.com/BorisGerretzen/SimpleBlazorMultiselect/wiki/Properties). +The demo project is hosted on [GitHub Pages](https://borisgerretzen.github.io/SimpleBlazorMultiselect/). Below are some short examples, they all use the following `@code` block: ```csharp From 4865158c70f56d40a9e0142432ea520197c7270b Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 17:25:52 +0100 Subject: [PATCH 22/27] Added truncation to dropdown --- src/SimpleBlazorMultiselect/SimpleMultiselect.razor | 2 +- src/SimpleBlazorMultiselect/SimpleMultiselect.razor.css | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SimpleBlazorMultiselect/SimpleMultiselect.razor b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor index d0c3476..6407e5f 100644 --- a/src/SimpleBlazorMultiselect/SimpleMultiselect.razor +++ b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor @@ -4,7 +4,7 @@ @typeparam TItem
-
+ + + \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/Pages/CustomStyling.razor b/src/SimpleBlazorMultiselect.Demo/Pages/CustomStyling.razor new file mode 100644 index 0000000..24d5963 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Pages/CustomStyling.razor @@ -0,0 +1,24 @@ +@page "/CustomStyling" +

CustomStyling

+ +
+
+ +
+
+ You have selected the following items: +
    + @foreach (var item in _selectedItems) + { +
  • @item
  • + } +
+
+
+ +@code { + private readonly List _items = new() { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10" }; + private List _selectedItems = new(); +} \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/Pages/CustomStyling.razor.css b/src/SimpleBlazorMultiselect.Demo/Pages/CustomStyling.razor.css new file mode 100644 index 0000000..a3818f9 --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Pages/CustomStyling.razor.css @@ -0,0 +1,54 @@ +::deep .simple-dropdown .btn-outline-secondary { + --bs-btn-color: red; + --bs-btn-bg: black; + --bs-btn-border-color: green; + --bs-btn-border-width: 10px; + + animation: rainbow 2.5s linear; + animation-iteration-count: infinite; +} + +::deep .simple-dropdown .dropdown-item { + --bs-btn-color: red; + --bs-dropdown-link-hover-bg: yellow; +} + + +@keyframes rainbow{ + 100%,0%{ + --bs-btn-color: rgb(255,0,0); + } + 8%{ + --bs-btn-color: rgb(255,127,0); + } + 16%{ + --bs-btn-color: rgb(255,255,0); + } + 25%{ + --bs-btn-color: rgb(127,255,0); + } + 33%{ + --bs-btn-color: rgb(0,255,0); + } + 41%{ + --bs-btn-color: rgb(0,255,127); + } + 50%{ + --bs-btn-color: rgb(0,255,255); + } + 58%{ + --bs-btn-color: rgb(0,127,255); + } + 66%{ + --bs-btn-color: rgb(0,0,255); + } + 75%{ + --bs-btn-color: rgb(127,0,255); + } + 83%{ + --bs-btn-color: rgb(255,0,255); + } + 91%{ + --bs-btn-color: rgb(255,0,127); + } +} \ No newline at end of file diff --git a/src/SimpleBlazorMultiselect/SimpleMultiselect.razor b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor index 6407e5f..4ce17c4 100644 --- a/src/SimpleBlazorMultiselect/SimpleMultiselect.razor +++ b/src/SimpleBlazorMultiselect/SimpleMultiselect.razor @@ -3,7 +3,7 @@ @inject IJSRuntime JsRuntime @typeparam TItem -
+
+ + +
\ No newline at end of file diff --git a/src/SimpleBlazorMultiselect.Demo/Pages/MultipleDropdowns.razor b/src/SimpleBlazorMultiselect.Demo/Pages/MultipleDropdowns.razor new file mode 100644 index 0000000..71421bc --- /dev/null +++ b/src/SimpleBlazorMultiselect.Demo/Pages/MultipleDropdowns.razor @@ -0,0 +1,16 @@ +@page "/MultipleDropdowns" +

MultipleDropdowns

+ +
+ @foreach(var _ in Enumerable.Range(0, 9)) + { +
+ +
+ } +
+ +@code { + private const string Classes = "col-4 mb-4"; + private readonly List _items = new() { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10" }; +} \ No newline at end of file From a8173a39669d49d85816db011e8ab3ecd61a44b5 Mon Sep 17 00:00:00 2001 From: Boris Gerretzen Date: Mon, 27 Nov 2023 18:11:27 +0100 Subject: [PATCH 27/27] Moved net8.0 to front --- src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj b/src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj index c6e24c0..b241678 100644 --- a/src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj +++ b/src/SimpleBlazorMultiselect/SimpleBlazorMultiselect.csproj @@ -1,6 +1,6 @@ - net6.0;net7.0;net8.0 + net8.0;net6.0;net7.0; enable enable true