From d81d1a1063d4105bec799c3a124d1ec65da240f5 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Tue, 9 Jan 2024 23:14:41 +0330 Subject: [PATCH 01/39] feat(butil): improve History samples in bit Butil demo #6528 (#6529) --- .../Pages/HistoryPage.razor | 99 ++++++++++++++++--- 1 file changed, 87 insertions(+), 12 deletions(-) diff --git a/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/HistoryPage.razor b/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/HistoryPage.razor index 98672be442..3d4c5107a5 100644 --- a/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/HistoryPage.razor +++ b/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/HistoryPage.razor @@ -7,7 +7,7 @@

History

-
+
 @@inject Bit.Butil.History history
 
 @@code {
@@ -20,32 +20,75 @@
 

-

Open the DevTools and start clicking on buttons

+

Open the DevTools console and start clicking on buttons



- -
-
+
+
+ +  + +  + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+ +
+
+ + +
+
+
+
+ + + +
+
+
+
+ + +  + + +
+
@code { + private bool isScrollRestorationManual; + protected override async Task OnInitializedAsync() { - // await history.PushState(new { Name = "Saleh1" }, "#1"); - // await history.PushState(new { Name = "Saleh2" }, "#2"); - - await history.AddPopState(o => _ = console.Log("Popped state:", o)); + await history.AddPopState(obj => _ = console.Log("Popped state:", obj)); await base.OnInitializedAsync(); } - private async Task GetLength() + private async Task Go(int delta) { - var length = await history.GetLength(); - await console.Log("History length", length); + await history.Go(delta); } private async Task GoBack() @@ -58,6 +101,38 @@ await history.GoForward(); } + private async Task GetLength() + { + var length = await history.GetLength(); + await console.Log("History length", length); + } + + private async Task SetScrollRestoration() + { + await history.SetScrollRestoration(isScrollRestorationManual ? ScrollRestoration.Manual : ScrollRestoration.Auto); + } + + private async Task GetScrollRestoration() + { + await console.Log("history.scrollRestoration =", await history.GetScrollRestoration()); + } + + private async Task GetState() + { + var state = await history.GetState(); + await console.Log("History state", state); + } + + private async Task PushState() + { + await history.PushState(url: "/window"); + } + + private async Task ReplaceState() + { + await history.ReplaceState(url: "/document"); + } + public void Dispose() { history.Dispose(); From 5d226700104753f5b981249408ff0d32d8413e4c Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Wed, 10 Jan 2024 19:21:01 +0330 Subject: [PATCH 02/39] fix(butil): update js function name of GetAttributeNames method of Element in Butil #6537 (#6538) --- src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index 68a7126916..dcc33c55ac 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -13,7 +13,7 @@ internal static async ValueTask ElementGetAttribute(this IJSRuntime js, => await js.InvokeAsync("BitButil.element.getAttribute", element, name); internal static async ValueTask ElementGetAttributeNames(this IJSRuntime js, ElementReference element) - => await js.InvokeAsync("BitButil.element.getAttribute", element); + => await js.InvokeAsync("BitButil.element.getAttributeNames", element); internal static async ValueTask ElementGetBoundingClientRect(this IJSRuntime js, ElementReference element) => await js.InvokeAsync("BitButil.element.getBoundingClientRect", element); From 0bdf9258b3db6ec2f3b7831ab24ddb6e53bf3b82 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Wed, 10 Jan 2024 17:48:38 +0100 Subject: [PATCH 03/39] feat(templates): add TupleExtensions to shared project of boilerplate project template #6534 (#6535) --- .../Extensions/TupleExtensions.cs | 110 ++++++++++++++++++ .../Components/Layout/Footer.razor.cs | 2 +- .../Services/AuthenticationManager.cs | 6 +- .../Client/Boilerplate.Client.Web/Program.cs | 2 +- 4 files changed, 116 insertions(+), 4 deletions(-) create mode 100644 src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/TupleExtensions.cs diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/TupleExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/TupleExtensions.cs new file mode 100644 index 0000000000..2533070f16 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/TupleExtensions.cs @@ -0,0 +1,110 @@ +using System.Runtime.CompilerServices; + +namespace System.Threading.Tasks; + +/// +/// This code was inspired by a post by 'Federico Alterio', found here: +/// https://www.codeproject.com/Tips/5367698/Awaiting-a-Tuple-in-Csharp +/// +/// In essence, this code empowers the concurrent execution of multiple asynchronous tasks, +/// promoting a streamlined and efficient workflow across various functionalities. +/// +/// As an alternative to the following code: +/// public class MyPage : AppComponentBase +/// { +/// CategoryDto[] categories; +/// ProductDto[] products; +/// protected override async Task OnInitAsync() +/// { +/// categories = await HttpClient.GetJsonAsync("api/categories"); // Tooks 150ms +/// products = await HttpClient.GetJsonAsync("api/products"); // Tooks 150ms +/// // The total time is 300ms 😖 +/// } +/// } +/// +/// You can now employ the following concise approach: +/// public class MyPage : AppComponentBase +/// { +/// CategoryDto[] categories; +/// ProductDto[] products; +/// protected override async Task OnInitAsync() +/// { +/// (categories, products) = await (HttpClient.GetJsonAsync("api/categories"), HttpClient.GetJsonAsync("api/products")); // Tooks 150ms +/// // The total time is 150ms 👍 +/// } +/// } +/// +public static class TupleExtensions +{ + public static TaskAwaiter<(T1, T2)> GetAwaiter(this (Task, Task) tuple) + { + async Task<(T1, T2)> UnifyTasks() + { + var (task1, task2) = tuple; + await Task.WhenAll(task1, task2); + return (task1.Result, task2.Result); + } + + return UnifyTasks().GetAwaiter(); + } + + public static TaskAwaiter<(T1, T2, T3)> GetAwaiter(this (Task, Task, Task) tuple) + { + async Task<(T1, T2, T3)> UnifyTasks() + { + var (task1, task2, task3) = tuple; + await Task.WhenAll(task1, task2, task3); + return (task1.Result, task2.Result, task3.Result); + } + + return UnifyTasks().GetAwaiter(); + } + + public static TaskAwaiter<(T1, T2, T3, T4)> GetAwaiter(this (Task, Task, Task, Task) tuple) + { + async Task<(T1, T2, T3, T4)> UnifyTasks() + { + var (task1, task2, task3, task4) = tuple; + await Task.WhenAll(task1, task2, task3, task4); + return (task1.Result, task2.Result, task3.Result, task4.Result); + } + + return UnifyTasks().GetAwaiter(); + } + + public static TaskAwaiter<(T1, T2, T3, T4, T5)> GetAwaiter(this (Task, Task, Task, Task, Task) tuple) + { + async Task<(T1, T2, T3, T4, T5)> UnifyTasks() + { + var (task1, task2, task3, task4, task5) = tuple; + await Task.WhenAll(task1, task2, task3, task4, task5); + return (task1.Result, task2.Result, task3.Result, task4.Result, task5.Result); + } + + return UnifyTasks().GetAwaiter(); + } + + public static TaskAwaiter<(T1, T2, T3, T4, T5, T6)> GetAwaiter(this (Task, Task, Task, Task, Task, Task) tuple) + { + async Task<(T1, T2, T3, T4, T5, T6)> UnifyTasks() + { + var (task1, task2, task3, task4, task5, task6) = tuple; + await Task.WhenAll(task1, task2, task3, task4, task5, task6); + return (task1.Result, task2.Result, task3.Result, task4.Result, task5.Result, task6.Result); + } + + return UnifyTasks().GetAwaiter(); + } + + public static TaskAwaiter<(T1, T2, T3, T4, T5, T6, T7)> GetAwaiter(this (Task, Task, Task, Task, Task, Task, Task) tuple) + { + async Task<(T1, T2, T3, T4, T5, T6, T7)> UnifyTasks() + { + var (task1, task2, task3, task4, task5, task6, task7) = tuple; + await Task.WhenAll(task1, task2, task3, task4, task5, task6, task7); + return (task1.Result, task2.Result, task3.Result, task4.Result, task5.Result, task6.Result, task7.Result); + } + + return UnifyTasks().GetAwaiter(); + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs index e8743d7ba4..edaf7d394f 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs @@ -24,7 +24,7 @@ protected override Task OnInitAsync() private async Task OnCultureChanged() { - await cookie.Set(new ButilCookie + await cookie.Set(new() { Name = ".AspNetCore.Culture", Value = $"c={SelectedCulture}|uic={SelectedCulture}", diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthenticationManager.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthenticationManager.cs index 5997b76c23..dd5ba8e306 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthenticationManager.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AuthenticationManager.cs @@ -92,11 +92,13 @@ private async Task StoreToken(TokenResponseDto tokenResponseDto, bool? rememberM await storageService.SetItem("refresh_token", tokenResponseDto!.RefreshToken, rememberMe is true); if (AppRenderMode.PrerenderEnabled && AppRenderMode.IsBlazorHybrid is false) { - await cookie.Set(new ButilCookie + await cookie.Set(new() { Name = "access_token", Value = tokenResponseDto.AccessToken, - MaxAge = tokenResponseDto.ExpiresIn + MaxAge = tokenResponseDto.ExpiresIn, + SameSite = SameSite.Strict, + Secure = BuildConfiguration.IsRelease() }); } } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs index e2e88642c6..73aefc28de 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs @@ -8,7 +8,7 @@ if (apiServerAddress!.IsAbsoluteUri is false) { - apiServerAddress = new Uri($"{builder.HostEnvironment.BaseAddress}{apiServerAddress}"); + apiServerAddress = new Uri(new Uri(builder.HostEnvironment.BaseAddress), apiServerAddress); } builder.Services.AddTransient(sp => new HttpClient(sp.GetRequiredKeyedService("DefaultMessageHandler")) { BaseAddress = apiServerAddress }); From 41717e810b0b7e707c2f0ea1450df0ffd648d061 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Wed, 10 Jan 2024 20:25:26 +0330 Subject: [PATCH 04/39] feat(websites): add Besql documents to Platform website #6513 (#6536) --- src/Besql/README.md | 12 ++--- .../Pages/Besql/Besql01OverviewPage.razor | 32 +++++++++++++ .../Besql/Besql01OverviewPage.razor.scss | 16 +++++++ .../Pages/Besql/Besql02InstallPage.razor | 37 +++++++++++++++ .../Pages/Besql/Besql02InstallPage.razor.scss | 26 +++++++++++ .../Pages/Besql/Besql03UsagePage.razor | 43 ++++++++++++++++++ .../Pages/Besql/Besql03UsagePage.razor.scss | 20 ++++++++ .../Shared/Header.razor | 14 ++++++ .../Shared/MainLayout.razor | 9 +--- .../Shared/MainLayout.razor.cs | 35 ++++++++++---- .../Shared/NavMenu.razor.cs | 6 +++ .../Shared/Urls.cs | 1 + .../compilerconfig.json | 36 +++++++++++++++ .../images/besql/install-visualstudio.webp | Bin 0 -> 24530 bytes 14 files changed, 264 insertions(+), 23 deletions(-) create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/wwwroot/images/besql/install-visualstudio.webp diff --git a/src/Besql/README.md b/src/Besql/README.md index abd56a0626..45e665ef6e 100644 --- a/src/Besql/README.md +++ b/src/Besql/README.md @@ -1,4 +1,4 @@ -## bit entity framework core sqlite (bit Besql) +## bit Blazor Entity Framework Sqlite (bit Besql) **Step by step walkthrough video:** @@ -8,18 +8,18 @@ How to use `Bit.Besql`: The usage of `Bit.Besql` is exactly the same as the regular usage of `Microsoft.EntityFrameworkCore.Sqlite` with [IDbContextFactory](https://learn.microsoft.com/en-us/aspnet/core/blazor/blazor-ef-core?view=aspnetcore-8.0#new-dbcontext-instances). -To get start, simply install `Bit.Besql` and use `services.AddBesqlDbContextFactory` instead of `services.AddDbContextFactory`. +To get started, simply install `Bit.Besql` and use `services.AddBesqlDbContextFactory` instead of `services.AddDbContextFactory`. Then add the following script: ```html ``` -Note: Don't use `IDbContextFactory` in `OnInitialized` because it relies on `IJSRuntime`. Use `OnAfterRender` instead. +Note: Do NOT use `IDbContextFactory` in `OnInitialized` method because it relies on `IJSRuntime`. Use `OnAfterRender` method instead. In order to download sqlite db file from browser cache storage in blazor WebAssembly run the followings in browser console: ```js -const cache = await caches.open('Bit-Besql'); -const resp = await cache.match('/data/cache/Boilerplate-ClientDb.db'); +const cache = await caches.open('bit-besql'); +const resp = await cache.match('/data/cache/MyDb.db'); const blob = await resp.blob(); -URL.createObjectURL(blob); +const urlToDownload = URL.createObjectURL(blob); ``` diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor new file mode 100644 index 0000000000..7cf3a6aa9d --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor @@ -0,0 +1,32 @@ +@page "/besql/overview" +@inherits AppComponentBase + + + +
+ Besql +
+ Blazor Entity Framework Sqlite utilities + + + bit Besql facilitates the use of Entity Framework and sqlite in web browsers with Blazor WebAssembly. + + +
+ +
+ You can watch this step by step walkthrough video to see bit Besql in action: +
+
+
+ +
+ +
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor.scss new file mode 100644 index 0000000000..8e7839faad --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor.scss @@ -0,0 +1,16 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; + display: flex; + flex-flow: column; +} + +.video-container { + width: 100%; + display: flex; + justify-content: center; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor new file mode 100644 index 0000000000..888a111e21 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor @@ -0,0 +1,37 @@ +@page "/besql/install" +@inherits AppComponentBase + + + +
+ Install bit Besql +
+ + How to install the bit Besql? + +
+ +
+ CLI +
+ Open the command line of your choice and run the following command: +
+dotnet add package Bit.Besql
+
+
+ +
+ Visual Studio +
+
+ Open your Visual Studio's Manage NuGet Packages window and install the Bit.Besql package: +
+
+ +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor.scss new file mode 100644 index 0000000000..2963986add --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql02InstallPage.razor.scss @@ -0,0 +1,26 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} + +.besql-img { + width: 100%; + max-width: rem2(900px); + border: 1px solid gray; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor new file mode 100644 index 0000000000..c0b47a7643 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor @@ -0,0 +1,43 @@ +@page "/besql/usage" +@inherits AppComponentBase + + + +
+ Using bit Besql +
+ + How to use the bit Besql? + +
+
+ Script +
+ To get started, simply after installing bit Besql, add the following script tag to your default document: +
+<script src="_content/Bit.Besql/bit-besql.js"></script>
+
+
+ +
+ Services +
+
+ Register bit Besql services using its specific IServiceCollection extension method as follows: +
+services.AddBesqlDbContextFactory();
+
+
+ +
+ Usage +
+
+ The usage of bit Besql is the same as the usage of EFCore's Sqlite provider with IDbContextFactory. +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql03UsagePage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor index ad8e3749a0..d9b17f7b3b 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor @@ -34,6 +34,13 @@
Blazor Service Worker Update Progress
+ + + +
Services
@@ -111,6 +118,13 @@
Blazor Service Worker Update Progress
+ + + +
Services
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor index 548d2d327c..05d53ad723 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor @@ -3,14 +3,9 @@
- @if (isTemplateDocRoute) + @if (isDocsRoute) { - - } - - @if (isBswupDocRoute) - { - + }
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs index 1fc5bb6571..f53f9e543d 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs @@ -9,10 +9,13 @@ public partial class MainLayout : IDisposable private bool isDocsRoute; private bool isTemplateDocRoute; private bool isBswupDocRoute; + private bool isBesqlDocRoute; + private List navItems = []; - private readonly List templatesNavItems = new() - { + + private readonly List templatesNavItems = + [ new BitNavItem { Text = "Overview", Url = "/templates/overview", AdditionalUrls = new string[] { "/admin-panel/overview", "/todo-template/overview" } }, new BitNavItem { Text = "Development prerequisites", Url = "/templates/development-prerequisites", AdditionalUrls = new string[] { "/admin-panel/development-prerequisites", "/todo-template/development-prerequisites" } }, new BitNavItem { Text = "Create project", Url = "/templates/create-project", AdditionalUrls = new string[] { "/admin-panel/create-project", "/todo-template/create-project" } }, @@ -27,22 +30,29 @@ public partial class MainLayout : IDisposable new BitNavItem { Text = "Settings", Url = "/templates/settings", AdditionalUrls = new string[] { "/admin-panel/settings", "/todo-template/settings" } }, new BitNavItem { Text = "Exception handling", Url = "/templates/exception-handling", AdditionalUrls = new string[] { "/admin-panel/exception-handling", "/todo-template/exception-handling" } }, new BitNavItem { Text = "Multilingualism", Url = "/templates/multilingualism", AdditionalUrls = new string[] { "/admin-panel/multilingualism", "/todo-template/multilingualism" } }, - }; + ]; - private readonly List bswupNavItems = new() - { + private readonly List bswupNavItems = + [ new BitNavItem { Text = "Overview", Url = "/bswup/overview" }, new BitNavItem { Text = "Install", Url = "/bswup/install" }, new BitNavItem { Text = "Scripts", Url = "/bswup/scripts" }, new BitNavItem { Text = "Events", Url = "/bswup/events" }, new BitNavItem { Text = "Service Worker", Url = "/bswup/service-worker" }, new BitNavItem { Text = "Caching", Url = "/bswup/caching" }, - }; + ]; + + private readonly List besqlNavItems = + [ + new BitNavItem { Text = "Overview", Url = "/besql/overview" }, + new BitNavItem { Text = "Install", Url = "/besql/install" }, + new BitNavItem { Text = "Usage", Url = "/besql/usage" }, + ]; protected override Task OnInitializedAsync() { - SetCurrentUrl(); + SetNavItems(); navigationManager.LocationChanged += OnLocationChanged; @@ -51,19 +61,24 @@ protected override Task OnInitializedAsync() private void OnLocationChanged(object? sender, LocationChangedEventArgs args) { - SetCurrentUrl(); + SetNavItems(); StateHasChanged(); } - private void SetCurrentUrl() + private void SetNavItems() { var currentUrl = navigationManager.Uri.Replace(navigationManager.BaseUri, "/", StringComparison.InvariantCultureIgnoreCase); isTemplateDocRoute = currentUrl.Contains("templates") || currentUrl.Contains("admin-panel") || currentUrl.Contains("todo-template"); isBswupDocRoute = currentUrl.Contains("bswup"); + isBesqlDocRoute = currentUrl.Contains("besql"); + isDocsRoute = isTemplateDocRoute || isBswupDocRoute || isBesqlDocRoute; - isDocsRoute = isTemplateDocRoute || isBswupDocRoute; + navItems = isTemplateDocRoute ? templatesNavItems + : isBswupDocRoute ? bswupNavItems + : isBesqlDocRoute ? besqlNavItems + : []; } public void Dispose() diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/NavMenu.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/NavMenu.razor.cs index c2349c886e..16f34005a4 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/NavMenu.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/NavMenu.razor.cs @@ -22,6 +22,12 @@ protected override async Task OnInitAsync() HandleOnClear(); } + protected override void OnParametersSet() + { + filteredNavItems = NavItems; + } + + private async Task ToggleMenu() { diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs index c252e01757..e7ba82a776 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs @@ -23,6 +23,7 @@ public static class Urls public const string Templates = "/templates/overview"; public const string Bswup = "/bswup/overview"; + public const string Besql = "/besql/overview"; public const string BoilerplateNuget = "https://www.nuget.org/packages/Bit.Boilerplate/"; diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json index 326ea87756..3f42b6ace2 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json @@ -178,5 +178,41 @@ "inputFile": "Pages/Bswup/Bswup03ScriptsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Bswup/Bswup04EventsPage.razor.css", + "inputFile": "Pages/Bswup/Bswup04EventsPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Bswup/Bswup05ServiceWorkerPage.razor.css", + "inputFile": "Pages/Bswup/Bswup05ServiceWorkerPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Bswup/Bswup06CachingPage.razor.css", + "inputFile": "Pages/Bswup/Bswup06CachingPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Besql/Besql01OverviewPage.razor.css", + "inputFile": "Pages/Besql/Besql01OverviewPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Besql/Besql02InstallPage.razor.css", + "inputFile": "Pages/Besql/Besql02InstallPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Besql/Besql03UsagePage.razor.css", + "inputFile": "Pages/Besql/Besql03UsagePage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } } ] \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/wwwroot/images/besql/install-visualstudio.webp b/src/Websites/Platform/src/Bit.Websites.Platform.Client/wwwroot/images/besql/install-visualstudio.webp new file mode 100644 index 0000000000000000000000000000000000000000..140056ce8f50d74c3baefe1c41962d97e10d741b GIT binary patch literal 24530 zcmY(p1CVDy&o4Z-ZQHi(`HyYewrz9Awr!icW80qD9o>1J_r2e(FIB12Cpp#mb&^h{ z`n0mNgv68q5Ritr2tXacr3nKB1O)ZNYT!U7pg=zoxoLeMAV#&(H6S&_;Wj(cb?2t< z1;3jmXcA+PqvEoZ(Bl3E&T3$if^=Cke#_?7CJOukBAq`m*JLUWK^BlBtgm6u^f=zTwCmbq^C=Vx)%*=F2xWd?Az?B=}VExTs;2&q_~a$ zTfg~rV^_O*{`>Zp|63AxBh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Y zvBTrg>U0ZjI>|&EsQydCJo#%UAO6XtITMQ{Pm2VMGPmybLAcw`ptf6M{_q z$Y=lA!?_g95iGY`Tz@^qyJYxP`;Z%N`6N&V`{Ur;<1E}{ZU1akmrWC0D@Nz~ty!JS zcmaPk@5p%_2Fxy$`xkv}*bGio`C%#;LU;FO^TD&WneokMmUfcQ-E<&q#m`w+6PhAa zb!g;n-5bImjOk1C)(ZS2Wui*j5AyRvL?`CP?)yJ1-tA={Dd^j0em5b26d!O0+8C6I zF`mu8PUp%8WybXV)wHuwo?_qUd#sLpYxvAOPgkQ5VrugMRegYrqzHSV zw2V06{>2N<|4zC`MWsab~IR8I&w{URv=5e+0W)S27@$m5@A)z55rC=bTB4j}P0wCm~|En8N q^gmcogb2z%-Wmm=@sIC9=={9^h#CO@A?S#TAh>^Md?3)@yZ;Z52_(e; literal 0 HcmV?d00001 From 1142ddb1daac61e355fa9f342fd358f55ef92e25 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Thu, 11 Jan 2024 15:30:34 +0330 Subject: [PATCH 05/39] fix(butil): resolve issues of ScrollBy method of Element in Butil #6540 (#6541) --- .../Bit.Butil/Internals/JsInterops/ElementJsInterop.cs | 2 +- src/Butil/Bit.Butil/Publics/Element.cs | 5 ----- src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs | 6 ++++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index dcc33c55ac..f74a88affe 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -49,7 +49,7 @@ internal static async ValueTask ElementScroll(this IJSRuntime js, ElementReferen => await js.InvokeVoidAsync("BitButil.element.scroll", element, options, x, y); internal static async ValueTask ElementScrollBy(this IJSRuntime js, ElementReference element, ScrollToOptions? options, double? x, double? y) - => await js.InvokeVoidAsync("BitButil.element.scrollBy", element, options, x, y); + => await js.InvokeVoidAsync("BitButil.element.scrollBy", element, options?.ToJsObject(), x, y); internal static async ValueTask ElementScrollIntoView(this IJSRuntime js, ElementReference element, bool? alignToTop, ScrollIntoViewOptions? options) => await js.InvokeVoidAsync("BitButil.element.scrollIntoView", element, alignToTop, options); diff --git a/src/Butil/Bit.Butil/Publics/Element.cs b/src/Butil/Bit.Butil/Publics/Element.cs index cdecfbf7e8..a1494ee17d 100644 --- a/src/Butil/Bit.Butil/Publics/Element.cs +++ b/src/Butil/Bit.Butil/Publics/Element.cs @@ -119,11 +119,6 @@ public async Task ScrollBy(ElementReference element, ScrollToOptions? options) /// public async Task ScrollBy(ElementReference element, double? x, double? y) => await js.ElementScrollBy(element, null, x, y); - /// - /// Scrolls an element by the given amount. - /// - public async Task ScrollBy(ElementReference element, ScrollToOptions? options, double? x, double? y) - => await js.ElementScrollBy(element, options, x, y); /// /// Scrolls the page until the element gets into the view. diff --git a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs index 56bd302e36..664101f24d 100644 --- a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs +++ b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs @@ -64,8 +64,10 @@ public static async ValueTask RequestPointerLock(this ElementReference element) public static async ValueTask Scroll(this ElementReference element, ScrollToOptions? options, double? x, double? y) => await GetJSRuntime(element).ElementScroll(element, options, x, y); - public static async ValueTask ScrollBy(this ElementReference element, ScrollToOptions? options, double? x, double? y) - => await GetJSRuntime(element).ElementScrollBy(element, options, x, y); + public static async ValueTask ScrollBy(this ElementReference element, ScrollToOptions? options) + => await GetJSRuntime(element).ElementScrollBy(element, options, null, null); + public static async ValueTask ScrollBy(this ElementReference element, double? x, double? y) + => await GetJSRuntime(element).ElementScrollBy(element, null, x, y); public static async ValueTask ScrollIntoView(this ElementReference element, bool? alignToTop, ScrollIntoViewOptions? options) => await GetJSRuntime(element).ElementScrollIntoView(element, alignToTop, options); From dc65f9ef7881dc398f064a487ebfba9eb517097b Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Thu, 11 Jan 2024 16:59:12 +0330 Subject: [PATCH 06/39] feat(butil): make RemoveAttribute of Element void in bit Butil #6544 (#6547) --- src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs | 4 ++-- src/Butil/Bit.Butil/Publics/Element.cs | 2 +- src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs | 2 +- src/Butil/Bit.Butil/Scripts/element.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index f74a88affe..a390e05cc2 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -36,8 +36,8 @@ internal static async ValueTask ElementReleasePointerCapture(this IJSRuntime js, internal static async ValueTask ElementRemove(this IJSRuntime js, ElementReference element) => await js.InvokeVoidAsync("BitButil.element.remove", element); - internal static async ValueTask ElementRemoveAttribute(this IJSRuntime js, ElementReference element, string name) - => await js.InvokeAsync("BitButil.element.removeAttribute", element, name); + internal static async ValueTask ElementRemoveAttribute(this IJSRuntime js, ElementReference element, string name) + => await js.InvokeVoidAsync("BitButil.element.removeAttribute", element, name); internal static async ValueTask ElementRequestFullScreen(this IJSRuntime js, ElementReference element, FullScreenOptions? options) => await js.InvokeVoidAsync("BitButil.element.requestFullScreen", element, options); diff --git a/src/Butil/Bit.Butil/Publics/Element.cs b/src/Butil/Bit.Butil/Publics/Element.cs index a1494ee17d..150c405d45 100644 --- a/src/Butil/Bit.Butil/Publics/Element.cs +++ b/src/Butil/Bit.Butil/Publics/Element.cs @@ -78,7 +78,7 @@ public async Task Remove(ElementReference element) /// /// Removes the named attribute from the current node. /// - public async Task RemoveAttribute(ElementReference element, string name) + public async Task RemoveAttribute(ElementReference element, string name) => await js.ElementRemoveAttribute(element, name); /// diff --git a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs index 664101f24d..09ef2aae04 100644 --- a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs +++ b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs @@ -52,7 +52,7 @@ public static async ValueTask ReleasePointerCapture(this ElementReference elemen public static async ValueTask Remove(this ElementReference element) => await GetJSRuntime(element).ElementRemove(element); - public static async ValueTask RemoveAttribute(this ElementReference element, string name) + public static async ValueTask RemoveAttribute(this ElementReference element, string name) => await GetJSRuntime(element).ElementRemoveAttribute(element, name); public static async ValueTask RequestFullScreen(this ElementReference element, FullScreenOptions? options) diff --git a/src/Butil/Bit.Butil/Scripts/element.ts b/src/Butil/Bit.Butil/Scripts/element.ts index b739d9fe4d..1f170c1897 100644 --- a/src/Butil/Bit.Butil/Scripts/element.ts +++ b/src/Butil/Bit.Butil/Scripts/element.ts @@ -12,7 +12,7 @@ var BitButil = BitButil || {}; matches(element: HTMLElement, selectors: string) { return element.matches(selectors) }, releasePointerCapture(element: HTMLElement, pointerId: number) { element.releasePointerCapture(pointerId) }, remove(element: HTMLElement) { element.remove() }, - removeAttribute(element: HTMLElement, name: string) { return element.removeAttribute(name) }, + removeAttribute(element: HTMLElement, name: string) { element.removeAttribute(name) }, requestFullScreen(element: HTMLElement, options?: FullscreenOptions) { return element.requestFullscreen(options) }, requestPointerLock(element: HTMLElement) { return element.requestPointerLock() }, scroll, From 505a9824cfd1673d1a6b043cc9e8c5c9c68436c8 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Thu, 11 Jan 2024 14:30:06 +0100 Subject: [PATCH 07/39] fix(github actions): resolve android build issues in CI/CD pipelines #6545 (#6546) --- .github/workflows/admin-sample.cd.yml | 4 ++-- .github/workflows/bit.ci.yml | 4 ++-- .github/workflows/bit.full.ci.yml | 2 +- .github/workflows/blazorui.demo.cd.yml | 4 ++-- .github/workflows/todo-sample.cd.yml | 4 ++-- .../Bit.Boilerplate/.azure-devops/workflows/cd.yml | 4 ++-- .../Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/admin-sample.cd.yml b/.github/workflows/admin-sample.cd.yml index 9640816b17..15961a161b 100644 --- a/.github/workflows/admin-sample.cd.yml +++ b/.github/workflows/admin-sample.cd.yml @@ -196,8 +196,8 @@ jobs: - name: Install maui run: cd src && dotnet workload install maui-android - - name: Install Android Dependencies - run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/" + - name: Install Android Sdk platform tools + run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" - name: Generate CSS/JS files run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore diff --git a/.github/workflows/bit.ci.yml b/.github/workflows/bit.ci.yml index a45b26132d..b6e050501a 100644 --- a/.github/workflows/bit.ci.yml +++ b/.github/workflows/bit.ci.yml @@ -55,8 +55,8 @@ jobs: - name: Install wasm and maui run: cd src && dotnet workload install maui-android wasm-tools wasm-experimental - - name: Install Android Dependencies - run: dotnet build src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/" + - name: Install Android Sdk platform tools + run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" - name: Build run: dotnet build src/Bit-CI.sln -p:WarningLevel=0 -p:RunCodeAnalysis=false diff --git a/.github/workflows/bit.full.ci.yml b/.github/workflows/bit.full.ci.yml index 95701a80d2..ecdd8021ae 100644 --- a/.github/workflows/bit.full.ci.yml +++ b/.github/workflows/bit.full.ci.yml @@ -33,7 +33,7 @@ jobs: run: | dotnet workload install maui-tizen maui-android wasm-tools wasm-experimental dotnet new bit-bp --name TodoBPSqlite --database sqlite --sample todo --pipeline other - dotnet build TodoBPSqlite/src/Client/TodoBPSqlite.Client.Maui/TodoBPSqlite.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/" + ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" cd TodoBPSqlite/src/TodoBPSqlite.Server/ dotnet tool restore dotnet ef migrations add InitialMigration diff --git a/.github/workflows/blazorui.demo.cd.yml b/.github/workflows/blazorui.demo.cd.yml index 64e4fa78b3..344868d088 100644 --- a/.github/workflows/blazorui.demo.cd.yml +++ b/.github/workflows/blazorui.demo.cd.yml @@ -162,8 +162,8 @@ jobs: - name: Install maui run: cd src && dotnet workload install maui-android - - name: Install Android Dependencies - run: dotnet build src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/" + - name: Install Android Sdk platform tools + run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" - name: Generate CSS/JS files run: dotnet build src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj -c Release diff --git a/.github/workflows/todo-sample.cd.yml b/.github/workflows/todo-sample.cd.yml index ac77786904..9e15eb5796 100644 --- a/.github/workflows/todo-sample.cd.yml +++ b/.github/workflows/todo-sample.cd.yml @@ -198,8 +198,8 @@ jobs: - name: Install maui run: cd src && dotnet workload install maui-android - - name: Install Android Dependencies - run: dotnet build TodoSample/src/Client/TodoSample.Client.Maui/TodoSample.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/" + - name: Install Android Sdk platform tools + run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" - name: Generate CSS/JS files run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks --no-restore diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml b/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml index 908f26f97c..163877c5cd 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml @@ -217,10 +217,10 @@ jobs: script: cd src && dotnet workload install maui-android - task: Bash@3 - displayName: 'Install Android Dependencies' + displayName: 'Install Android Sdk platform tools' inputs: targetType: 'inline' - script: 'dotnet build src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"' + script: '${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools"' - task: DownloadSecureFile@1 displayName: Download Boilerplate keystore file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml b/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml index bf8f6b97f0..fa2f8a9529 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml @@ -199,8 +199,8 @@ jobs: - name: Install maui run: cd src && dotnet workload install maui-android - - name: Install Android Dependencies - run: dotnet build src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/" + - name: Install Android Sdk platform tools + run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" - name: Generate CSS/JS files run: dotnet build src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore From 59baf2fe23efc7f6b5486632837d6e586b66479f Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Thu, 11 Jan 2024 16:50:38 +0100 Subject: [PATCH 08/39] feat(deps): update to .NET 8.0.1 #6548 (#6549) --- .devcontainer/devcontainer.json | 2 +- docs/how-to-build.md | 2 +- .../Bit.Besql.Demo.Client.csproj | 2 +- .../Demo/Bit.Besql.Demo/Bit.Besql.Demo.csproj | 6 +-- src/Bit-CI.sln | 46 +++++++++++++++++++ .../Bit.BlazorUI.Tests.csproj | 2 +- .../Bit.BlazorUI.Demo.Server.csproj | 2 +- .../Bit.BlazorUI.Demo.Shared.csproj | 6 +-- .../Bit.BlazorUI.Demo.Client.Core.csproj | 4 +- .../Bit.Bswup.Demo/Bit.Bswup.Demo.csproj | 4 +- .../Bit.Bswup.NewDemo.Client.csproj | 2 +- .../Bit.Bswup.NewDemo.csproj | 2 +- .../Client/Bit.Bswup.Demo.Client.csproj | 4 +- .../Server/Bit.Bswup.Demo.Server.csproj | 2 +- src/Bup/Bit.Bup.Demo/Bit.Bup.Demo.csproj | 4 +- .../Client/Bit.Bup.Demo.Client.csproj | 4 +- .../Server/Bit.Bup.Demo.Server.csproj | 2 +- .../Bit.Butil.Demo.Web.csproj | 4 +- .../BlazorEmpty.Client.csproj | 2 +- .../BlazorEmpty/BlazorEmpty.csproj | 2 +- .../BlazorEmpty/Bit.BlazorEmpty/global.json | 2 +- .../Boilerplate/Bit.Boilerplate/global.json | 2 +- .../Boilerplate.Iac/Boilerplate.Iac.csproj | 2 +- .../.config/dotnet-tools.json | 2 +- .../Boilerplate.Server.csproj | 22 ++++----- .../Boilerplate.Shared.csproj | 8 ++-- .../Boilerplate.Client.Core.csproj | 6 +-- .../Bit.Websites.Careers.Client.csproj | 4 +- .../Bit.Websites.Careers.Server.csproj | 4 +- .../Bit.Websites.Careers.Shared.csproj | 4 +- .../Bit.Websites.Platform.Client.csproj | 4 +- ...plates02DevelopmentPrerequisitesPage.razor | 4 +- .../Bit.Websites.Platform.Server.csproj | 4 +- .../Bit.Websites.Platform.Shared.csproj | 4 +- .../Bit.Websites.Sales.Client.csproj | 4 +- .../Bit.Websites.Sales.Server.csproj | 4 +- .../Bit.Websites.Sales.Shared.csproj | 4 +- src/global.json | 2 +- 38 files changed, 118 insertions(+), 72 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b013825786..756adbaa91 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "hostRequirements": { "cpus": 4 }, - "onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/5226a5fa-8c0b-474f-b79a-8984ad7c5beb/3113ccbf789c9fd29972835f0f334b7a/dotnet-sdk-8.0.100-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && sudo dotnet workload install wasm-tools wasm-experimental && dotnet dev-certs https --trust && dotnet build src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj -t:BeforeBuildTasks --no-restore && dotnet build src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj -t:BeforeBuildTasks --no-restore && dotnet build src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj -t:BeforeBuildTasks --no-restore && dotnet build src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore", + "onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/9454f7dc-b98e-4a64-a96d-4eb08c7b6e66/da76f9c6bc4276332b587b771243ae34/dotnet-sdk-8.0.101-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && sudo dotnet workload install wasm-tools wasm-experimental && dotnet dev-certs https --trust && dotnet build src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj -t:BeforeBuildTasks --no-restore && dotnet build src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj -t:BeforeBuildTasks --no-restore && dotnet build src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj -t:BeforeBuildTasks --no-restore && dotnet build src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore", "waitFor": "onCreateCommand", "customizations": { "codespaces": { diff --git a/docs/how-to-build.md b/docs/how-to-build.md index 55a97f65f5..0211194e06 100644 --- a/docs/how-to-build.md +++ b/docs/how-to-build.md @@ -22,7 +22,7 @@ building each one of them requires some specific steps that are explained below. Building each of the bit platform projects needs the following basic requirements other than the specific requirements that are explained later: -- [.NET 8 SDK (8.0.100)](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) +- [.NET 8 SDK (8.0.101)](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) - [Node.js](https://nodejs.org)
diff --git a/src/Besql/Demo/Bit.Besql.Demo.Client/Bit.Besql.Demo.Client.csproj b/src/Besql/Demo/Bit.Besql.Demo.Client/Bit.Besql.Demo.Client.csproj index 6af6d0ec21..1119460d81 100644 --- a/src/Besql/Demo/Bit.Besql.Demo.Client/Bit.Besql.Demo.Client.csproj +++ b/src/Besql/Demo/Bit.Besql.Demo.Client/Bit.Besql.Demo.Client.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Besql/Demo/Bit.Besql.Demo/Bit.Besql.Demo.csproj b/src/Besql/Demo/Bit.Besql.Demo/Bit.Besql.Demo.csproj index a89b396157..5240c099f1 100644 --- a/src/Besql/Demo/Bit.Besql.Demo/Bit.Besql.Demo.csproj +++ b/src/Besql/Demo/Bit.Besql.Demo/Bit.Besql.Demo.csproj @@ -8,7 +8,7 @@ - + @@ -19,11 +19,11 @@ and open Nuget Package Manager Console, and select `Bit.Besql.Demo` project as default project Then run either Add-Migration MigrationName -OutputDir Data\Migrations or Optimize-DbContext -OutputDir Data/CompiledModel commands. --> - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Bit-CI.sln b/src/Bit-CI.sln index eaf6697ef9..869701b206 100644 --- a/src/Bit-CI.sln +++ b/src/Bit-CI.sln @@ -228,6 +228,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Besql.Demo", "Besql\Dem EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Besql.Demo.Client", "Besql\Demo\Bit.Besql.Demo.Client\Bit.Besql.Demo.Client.csproj", "{778CD788-7477-4D76-B75C-2E5618ACB8CE}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Bswup.NewDemo", "Bswup\Bit.Bswup.NewDemo\Bit.Bswup.NewDemo\Bit.Bswup.NewDemo.csproj", "{A572BB00-354D-4C66-8DE1-946C96CA4172}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Bswup.NewDemo.Client", "Bswup\Bit.Bswup.NewDemo\Bit.Bswup.NewDemo.Client\Bit.Bswup.NewDemo.Client.csproj", "{610E87D1-63A1-4D78-BA84-6E90DDDCF138}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1143,6 +1147,46 @@ Global {778CD788-7477-4D76-B75C-2E5618ACB8CE}.Release|x64.Build.0 = Release|Any CPU {778CD788-7477-4D76-B75C-2E5618ACB8CE}.Release|x86.ActiveCfg = Release|Any CPU {778CD788-7477-4D76-B75C-2E5618ACB8CE}.Release|x86.Build.0 = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|iPhone.Build.0 = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|x64.ActiveCfg = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|x64.Build.0 = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|x86.ActiveCfg = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Debug|x86.Build.0 = Debug|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|Any CPU.Build.0 = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|iPhone.ActiveCfg = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|iPhone.Build.0 = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|x64.ActiveCfg = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|x64.Build.0 = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|x86.ActiveCfg = Release|Any CPU + {A572BB00-354D-4C66-8DE1-946C96CA4172}.Release|x86.Build.0 = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|Any CPU.Build.0 = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|iPhone.Build.0 = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|x64.ActiveCfg = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|x64.Build.0 = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|x86.ActiveCfg = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Debug|x86.Build.0 = Debug|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|Any CPU.ActiveCfg = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|Any CPU.Build.0 = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|iPhone.ActiveCfg = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|iPhone.Build.0 = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|x64.ActiveCfg = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|x64.Build.0 = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|x86.ActiveCfg = Release|Any CPU + {610E87D1-63A1-4D78-BA84-6E90DDDCF138}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1208,6 +1252,8 @@ Global {B1A39CE1-FFB5-4ACB-89E3-55C1B7D43F5A} = {619FE7F0-CF56-4325-BE76-7A3464D4DF3C} {591CEAF6-0D1A-423A-937A-09491BCF6F1B} = {B1A39CE1-FFB5-4ACB-89E3-55C1B7D43F5A} {778CD788-7477-4D76-B75C-2E5618ACB8CE} = {B1A39CE1-FFB5-4ACB-89E3-55C1B7D43F5A} + {A572BB00-354D-4C66-8DE1-946C96CA4172} = {C6EBC527-A489-44B4-A951-D023107A577F} + {610E87D1-63A1-4D78-BA84-6E90DDDCF138} = {C6EBC527-A489-44B4-A951-D023107A577F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DA107107-478F-477A-872B-787CEA7DD9B8} diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj b/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj index 24090475f4..a60b493591 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj +++ b/src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj index 05233cb9f3..034232b70c 100644 --- a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj +++ b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj @@ -21,7 +21,7 @@ - + diff --git a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj index 05440114d9..2b971df1df 100644 --- a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj +++ b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj @@ -14,9 +14,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj index 211a42b8a8..09093aad40 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj @@ -24,8 +24,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Bswup/Bit.Bswup.Demo/Bit.Bswup.Demo.csproj b/src/Bswup/Bit.Bswup.Demo/Bit.Bswup.Demo.csproj index 631b5e8173..ca3e06ece3 100644 --- a/src/Bswup/Bit.Bswup.Demo/Bit.Bswup.Demo.csproj +++ b/src/Bswup/Bit.Bswup.Demo/Bit.Bswup.Demo.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/Bit.Bswup.NewDemo.Client.csproj b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/Bit.Bswup.NewDemo.Client.csproj index 6e2fdfe53b..a15cb4b613 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/Bit.Bswup.NewDemo.Client.csproj +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/Bit.Bswup.NewDemo.Client.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.csproj b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.csproj index cd0137492c..6e8d1e9463 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.csproj +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Bswup/FullDemo/Client/Bit.Bswup.Demo.Client.csproj b/src/Bswup/FullDemo/Client/Bit.Bswup.Demo.Client.csproj index 4b1a55eecb..3b3d93cfc9 100644 --- a/src/Bswup/FullDemo/Client/Bit.Bswup.Demo.Client.csproj +++ b/src/Bswup/FullDemo/Client/Bit.Bswup.Demo.Client.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/Bswup/FullDemo/Server/Bit.Bswup.Demo.Server.csproj b/src/Bswup/FullDemo/Server/Bit.Bswup.Demo.Server.csproj index cace6043bf..dfca8b5b08 100644 --- a/src/Bswup/FullDemo/Server/Bit.Bswup.Demo.Server.csproj +++ b/src/Bswup/FullDemo/Server/Bit.Bswup.Demo.Server.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Bup/Bit.Bup.Demo/Bit.Bup.Demo.csproj b/src/Bup/Bit.Bup.Demo/Bit.Bup.Demo.csproj index c62255032b..dfaa3989c8 100644 --- a/src/Bup/Bit.Bup.Demo/Bit.Bup.Demo.csproj +++ b/src/Bup/Bit.Bup.Demo/Bit.Bup.Demo.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/src/Bup/FullDemo/Client/Bit.Bup.Demo.Client.csproj b/src/Bup/FullDemo/Client/Bit.Bup.Demo.Client.csproj index 98ee49fc38..0157da5296 100644 --- a/src/Bup/FullDemo/Client/Bit.Bup.Demo.Client.csproj +++ b/src/Bup/FullDemo/Client/Bit.Bup.Demo.Client.csproj @@ -8,7 +8,7 @@ - - + + diff --git a/src/Bup/FullDemo/Server/Bit.Bup.Demo.Server.csproj b/src/Bup/FullDemo/Server/Bit.Bup.Demo.Server.csproj index 61d817238e..88c1e63dba 100644 --- a/src/Bup/FullDemo/Server/Bit.Bup.Demo.Server.csproj +++ b/src/Bup/FullDemo/Server/Bit.Bup.Demo.Server.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Butil/Demo/Bit.Butil.Demo.Web/Bit.Butil.Demo.Web.csproj b/src/Butil/Demo/Bit.Butil.Demo.Web/Bit.Butil.Demo.Web.csproj index 52ac3fa36b..8b2442f929 100644 --- a/src/Butil/Demo/Bit.Butil.Demo.Web/Bit.Butil.Demo.Web.csproj +++ b/src/Butil/Demo/Bit.Butil.Demo.Web/Bit.Butil.Demo.Web.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj index 3cdeb98d6e..64d11ebf67 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj index e237e52761..efe2693c2a 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/global.json b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/global.json index fb5197ed1b..76a1fd415b 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/global.json +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "8.0.101", "rollForward": "disable" } } \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/global.json b/src/Templates/Boilerplate/Bit.Boilerplate/global.json index c41d522c76..70f5783086 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/global.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "8.0.101", "rollForward": "disable" } } \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Iac/Boilerplate.Iac.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Iac/Boilerplate.Iac.csproj index 7f97212904..793087a084 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Iac/Boilerplate.Iac.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Iac/Boilerplate.Iac.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/.config/dotnet-tools.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/.config/dotnet-tools.json index e3cadb92fc..fd9a39d879 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/.config/dotnet-tools.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.0", + "version": "8.0.1", "commands": [ "dotnet-ef" ] diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj index 0e659c7a69..d6145f8ff5 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj @@ -16,26 +16,26 @@ - - + + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -44,7 +44,7 @@ - + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj index 8c7c6bfc76..f2073bf3db 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj @@ -13,12 +13,12 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + - + compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj index 53e8489f54..7cae17376b 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj @@ -32,9 +32,9 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj index e4a8b5aea6..0c535189db 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj @@ -14,7 +14,7 @@ - + @@ -35,7 +35,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj index 4fe0a6814a..69ced17699 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj @@ -7,8 +7,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj index f749e74942..a1f43cb0b9 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj @@ -15,8 +15,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj index 5b5d7fe1ab..b4f2599bf7 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj @@ -14,7 +14,7 @@ - + @@ -36,7 +36,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor index 727def9c0e..19817d551c 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor @@ -21,12 +21,12 @@
  1. - .NET Sdk 8.0.100 + .NET Sdk 8.0.101
  2. To install .NET 8 SDK on Linux(Ubuntu) run the following commands:
    - wget https://download.visualstudio.microsoft.com/download/pr/5226a5fa-8c0b-474f-b79a-8984ad7c5beb/3113ccbf789c9fd29972835f0f334b7a/dotnet-sdk-8.0.100-linux-x64.tar.gz -O $HOME/dotnet.tar.gz + wget https://download.visualstudio.microsoft.com/download/pr/9454f7dc-b98e-4a64-a96d-4eb08c7b6e66/da76f9c6bc4276332b587b771243ae34/dotnet-sdk-8.0.101-linux-x64.tar.gz -O $HOME/dotnet.tar.gz
    mkdir -p $HOME/.dotnet
    diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj index dd76eaa5ae..19951e6565 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj @@ -7,8 +7,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj index f749e74942..a1f43cb0b9 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj @@ -15,8 +15,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj index cce1c65bba..245ebb0405 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj @@ -14,7 +14,7 @@ - + @@ -35,7 +35,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj index 251d572b69..394558740c 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj @@ -7,8 +7,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj index f749e74942..a1f43cb0b9 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj @@ -15,8 +15,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/global.json b/src/global.json index fb5197ed1b..76a1fd415b 100644 --- a/src/global.json +++ b/src/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "8.0.101", "rollForward": "disable" } } \ No newline at end of file From 83d48ff0ad61e0d0039174c1b76a637392dd74ad Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Thu, 11 Jan 2024 18:34:46 +0100 Subject: [PATCH 09/39] fix(templates): resolve culture change issues in windows #6543 (#6553) --- .../IServiceCollectionExtensions.cs | 1 + .../Services/CultureInfoManager.cs | 4 +- .../Components/Layout/Footer.razor.cs | 13 ++++-- .../Boilerplate.Client.Core/Routes.razor.cs | 3 +- .../Services/PubSubMessages.cs | 1 + .../Client/Boilerplate.Client.Web/Program.cs | 2 +- .../Boilerplate.Client.Windows/App.xaml | 2 +- .../Boilerplate.Client.Windows/App.xaml.cs | 33 ++++++++++++++- .../Boilerplate.Client.Windows.csproj | 1 + .../IServiceCollectionExtensions.cs | 1 + .../MainWindow.xaml.cs | 13 +++++- .../Services/WindowsStorageService.cs | 40 +++++++++++++++++++ 12 files changed, 102 insertions(+), 12 deletions(-) create mode 100644 src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsStorageService.cs diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/IServiceCollectionExtensions.cs index 469353e36b..e633ab70ba 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Extensions/IServiceCollectionExtensions.cs @@ -7,6 +7,7 @@ public static IServiceCollection AddSharedServices(this IServiceCollection servi // Services being registered here can get injected everywhere (Api, Web, Android, iOS, Windows and macOS) services.TryAddTransient(); + services.TryAddTransient(); // Define authorization policies here to seamlessly integrate them across various components, // including web api actions and razor pages using Authorize attribute, AuthorizeView in razor pages, and programmatically in C# for enhanced security and access control. diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Services/CultureInfoManager.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Services/CultureInfoManager.cs index 46c0fd4e28..fc8654181a 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Services/CultureInfoManager.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Services/CultureInfoManager.cs @@ -23,7 +23,7 @@ public static CultureInfo CreateCultureInfo(string cultureInfoId) return cultureInfo; } - public static void SetCurrentCulture(string? cultureInfoCookie) + public void SetCurrentCulture(string? cultureInfoCookie) { var currentCulture = GetCurrentCulture(cultureInfoCookie); @@ -32,7 +32,7 @@ public static void SetCurrentCulture(string? cultureInfoCookie) CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = CultureInfo.DefaultThreadCurrentCulture = CultureInfo.DefaultThreadCurrentUICulture = Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = cultureInfo; } - public static string GetCurrentCulture(string? preferredCulture = null) + public string GetCurrentCulture(string? preferredCulture = null) { string culture = preferredCulture ?? CultureInfo.CurrentUICulture.Name; if (SupportedCultures.Any(sc => sc.code == culture) is false) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs index edaf7d394f..24433abead 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/Footer.razor.cs @@ -5,7 +5,9 @@ public partial class Footer { [AutoInject] private Cookie cookie = default!; [AutoInject] private BitThemeManager bitThemeManager = default!; - [AutoInject] private IBitDeviceCoordinator bitDeviceCoordinator { get; set; } = default!; + [AutoInject] private IBitDeviceCoordinator bitDeviceCoordinator = default!; + [AutoInject] private CultureInfoManager cultureInfoManager = default!; + [AutoInject] private IPubSubService pubSubService = default!; private BitDropdownItem[] cultures = default!; @@ -15,7 +17,7 @@ protected override Task OnInitAsync() .Select(sc => new BitDropdownItem { Value = sc.code, Text = sc.name }) .ToArray(); - SelectedCulture = CultureInfoManager.GetCurrentCulture(); + SelectedCulture = cultureInfoManager.GetCurrentCulture(); return base.OnInitAsync(); } @@ -34,8 +36,11 @@ await cookie.Set(new() await StorageService.SetItem("Culture", SelectedCulture, persistent: true); - // Relevant in the context of Blazor Hybrid, where the reloading of the web view doesn't result in the resetting of all static in memory data on the client side - CultureInfoManager.SetCurrentCulture(SelectedCulture); + if (AppRenderMode.IsBlazorHybrid) + { + cultureInfoManager.SetCurrentCulture(SelectedCulture); + pubSubService.Publish(PubSubMessages.CULTURE_CHANGED, SelectedCulture); + } NavigationManager.Refresh(forceReload: true); } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor.cs index 72001ca7a8..1196687e46 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor.cs @@ -5,6 +5,7 @@ public partial class Routes [AutoInject] IJSRuntime jsRuntime = default!; [AutoInject] IBitDeviceCoordinator bitDeviceCoordinator = default!; [AutoInject] IStorageService storageService = default!; + [AutoInject] CultureInfoManager cultureInfoManager = default!; protected override async Task OnInitializedAsync() { @@ -12,7 +13,7 @@ protected override async Task OnInitializedAsync() { if (AppRenderMode.MultilingualEnabled) { - CultureInfoManager.SetCurrentCulture(await storageService.GetItem("Culture")); + cultureInfoManager.SetCurrentCulture(await storageService.GetItem("Culture")); } await SetupBodyClasses(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubMessages.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubMessages.cs index 290ea25a27..4d13c83ab9 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubMessages.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubMessages.cs @@ -4,4 +4,5 @@ public static class PubSubMessages { public const string PROFILE_UPDATED = nameof(PROFILE_UPDATED); public const string SHOW_MESSAGE = nameof(SHOW_MESSAGE); + public const string CULTURE_CHANGED = nameof(CULTURE_CHANGED); } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs index 73aefc28de..7f8876f3bb 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs @@ -20,7 +20,7 @@ if (AppRenderMode.MultilingualEnabled) { var culture = await host.Services.GetRequiredService().GetItem("Culture"); - CultureInfoManager.SetCurrentCulture(culture); + host.Services.GetRequiredService().SetCurrentCulture(culture); } await host.RunAsync(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml index 02ffbbe006..1cee354319 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml @@ -1,4 +1,4 @@  + StartupUri="MainWindow.xaml" Startup="App_Startup" Exit="App_Exit" /> diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml.cs index 61afffdb4e..dbc41f7fe1 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/App.xaml.cs @@ -1,6 +1,37 @@ -namespace Boilerplate.Client.Windows; +using System.IO.IsolatedStorage; +using System.IO; +using System.Windows; +using System.Text.Json; +using System.Collections; + +namespace Boilerplate.Client.Windows; public partial class App { + const string WindowsStorageFilename = "windows.storage.json"; + + private void App_Startup(object sender, StartupEventArgs e) + { + // Restore application-scope property from isolated storage + using IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForDomain(); + try + { + using IsolatedStorageFileStream stream = new IsolatedStorageFileStream(WindowsStorageFilename, FileMode.Open, storage); + foreach (DictionaryEntry item in JsonSerializer.Deserialize(stream)!) + { + Properties.Add(item.Key, item.Value); + } + } + catch (IsolatedStorageException exp) when (exp.InnerException is FileNotFoundException) { } + } + + private void App_Exit(object sender, ExitEventArgs e) + { + // Persist application-scope property to isolated storage + IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForDomain(); + using IsolatedStorageFileStream stream = new IsolatedStorageFileStream(WindowsStorageFilename, FileMode.Create, storage); + using StreamWriter writer = new StreamWriter(stream); + writer.Write(JsonSerializer.Serialize(Properties)); + } } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj index bd2196d760..5f14cdd30f 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj @@ -6,6 +6,7 @@ enable enable true + true Boilerplate.Client.Windows diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Extensions/IServiceCollectionExtensions.cs index 91e61f233d..eded4180fd 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Extensions/IServiceCollectionExtensions.cs @@ -6,6 +6,7 @@ public static class IServiceCollectionExtensions { public static void AddWindowsServices(this IServiceCollection services) { + services.TryAddTransient(); services.AddTransient(); services.AddTransient(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/MainWindow.xaml.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/MainWindow.xaml.cs index 98b49da7da..11e48762a5 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/MainWindow.xaml.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/MainWindow.xaml.cs @@ -30,11 +30,20 @@ public MainWindow() services.AddWindowsServices(); InitializeComponent(); BlazorWebView.Services = services.BuildServiceProvider(); + BlazorWebView.Services.GetRequiredService().SetCurrentCulture(App.Current.Properties["Culture"]?.ToString()); + BlazorWebView.Services.GetRequiredService().Subscribe(PubSubMessages.CULTURE_CHANGED, async culture => + { + App.Current.Shutdown(); + Application.Restart(); + }); BlazorWebView.Loaded += async delegate { await BlazorWebView.WebView.EnsureCoreWebView2Async(); - while ((await BlazorWebView.WebView.ExecuteScriptAsync("Blazor.start()")) is "null") - await Task.Yield(); + + BlazorWebView.WebView.NavigationCompleted += async delegate + { + await BlazorWebView.WebView.ExecuteScriptAsync("Blazor.start()"); + }; }; } } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsStorageService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsStorageService.cs new file mode 100644 index 0000000000..7cf126d8b2 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Services/WindowsStorageService.cs @@ -0,0 +1,40 @@ +namespace Boilerplate.Client.Windows.Services; + +public class WindowsStorageService : IStorageService +{ + private readonly Dictionary tempStorage = []; + + public async ValueTask GetItem(string key) + { + if (tempStorage.TryGetValue(key, out string? value)) + return value; + + return App.Current.Properties[key]?.ToString(); + } + + public async ValueTask IsPersistent(string key) + { + return App.Current.Properties.Contains(key); + } + + public async ValueTask RemoveItem(string key) + { + App.Current.Properties.Remove(key); + tempStorage.Remove(key); + } + + public async ValueTask SetItem(string key, string? value, bool persistent = true) + { + if (persistent) + { + App.Current.Properties[key] = value; + } + else + { + if (tempStorage.TryAdd(key, value) is false) + { + tempStorage[key] = value; + } + } + } +} From b889332c5bb6360e8b4a2f9798ba5f1e41e06009 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Thu, 11 Jan 2024 18:55:05 +0100 Subject: [PATCH 10/39] fix(templates): resolve PubSubService issue with SubscribeOnce pattern #6554 (#6555) --- .../Client/Boilerplate.Client.Core/Services/PubSubService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubService.cs index ed7252829d..f44bfec30a 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/PubSubService.cs @@ -13,7 +13,7 @@ public void Publish(string message, object? payload) { if (handlers.TryGetValue(message, out var messageHandlers)) { - foreach (var handler in messageHandlers) + foreach (var handler in messageHandlers.ToArray()) { handler(payload) .ContinueWith(t => serviceProvider.GetRequiredService().Handle(t.Exception!), TaskContinuationOptions.OnlyOnFaulted); From 48796083563528efde68ea637438a21bd23468e4 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Thu, 11 Jan 2024 21:29:27 +0330 Subject: [PATCH 11/39] fix(butil): resolve issues of Scroll method of Element in Butil #6551 (#6552) --- .../Bit.Butil/Internals/JsInterops/ElementJsInterop.cs | 2 +- src/Butil/Bit.Butil/Publics/Element.cs | 5 ----- src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs | 6 ++++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index a390e05cc2..4995175c18 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -46,7 +46,7 @@ internal static async ValueTask ElementRequestPointerLock(this IJSRuntime js, El => await js.InvokeVoidAsync("BitButil.element.requestPointerLock", element); internal static async ValueTask ElementScroll(this IJSRuntime js, ElementReference element, ScrollToOptions? options, double? x, double? y) - => await js.InvokeVoidAsync("BitButil.element.scroll", element, options, x, y); + => await js.InvokeVoidAsync("BitButil.element.scroll", element, options?.ToJsObject(), x, y); internal static async ValueTask ElementScrollBy(this IJSRuntime js, ElementReference element, ScrollToOptions? options, double? x, double? y) => await js.InvokeVoidAsync("BitButil.element.scrollBy", element, options?.ToJsObject(), x, y); diff --git a/src/Butil/Bit.Butil/Publics/Element.cs b/src/Butil/Bit.Butil/Publics/Element.cs index 150c405d45..38eced4d55 100644 --- a/src/Butil/Bit.Butil/Publics/Element.cs +++ b/src/Butil/Bit.Butil/Publics/Element.cs @@ -103,11 +103,6 @@ public async Task Scroll(ElementReference element, ScrollToOptions? options) ///
public async Task Scroll(ElementReference element, double? x, double? y) => await js.ElementScroll(element, null, x, y); - /// - /// Scrolls to a particular set of coordinates inside a given element. - /// - public async Task Scroll(ElementReference element, ScrollToOptions? options, double? x, double? y) - => await js.ElementScroll(element, options, x, y); /// /// Scrolls an element by the given amount. diff --git a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs index 09ef2aae04..7ee8c698ae 100644 --- a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs +++ b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs @@ -61,8 +61,10 @@ public static async ValueTask RequestFullScreen(this ElementReference element, F public static async ValueTask RequestPointerLock(this ElementReference element) => await GetJSRuntime(element).ElementRequestPointerLock(element); - public static async ValueTask Scroll(this ElementReference element, ScrollToOptions? options, double? x, double? y) - => await GetJSRuntime(element).ElementScroll(element, options, x, y); + public static async ValueTask Scroll(this ElementReference element, ScrollToOptions? options) + => await GetJSRuntime(element).ElementScroll(element, options, null, null); + public static async ValueTask Scroll(this ElementReference element, double? x, double? y) + => await GetJSRuntime(element).ElementScroll(element, null, x, y); public static async ValueTask ScrollBy(this ElementReference element, ScrollToOptions? options) => await GetJSRuntime(element).ElementScrollBy(element, options, null, null); From a72dd08e1c1363494a300d1ea9287e783cbf5cc2 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Thu, 11 Jan 2024 21:37:57 +0330 Subject: [PATCH 12/39] feat(prerelease): v-8.7.2-pre-01 #6556 (#6557) --- src/Bit.Build.props | 6 +++--- .../Bit.BlazorUI.Demo.Server.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Shared.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Client.Core.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Client.Maui.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Client.Web.csproj | 6 +++--- .../wwwroot/service-worker.published.js | 2 +- src/BlazorUI/Demo/Directory.Build.props | 2 +- .../Bit.Bswup.Demo/wwwroot/service-worker.js | 2 +- .../wwwroot/service-worker.published.js | 2 +- .../wwwroot/service-worker.js | 2 +- .../wwwroot/service-worker.published.js | 2 +- .../Bit.Bswup/Scripts/bit-bswup.progress.ts | 2 +- src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts | 2 +- src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts | 2 +- .../FullDemo/Client/wwwroot/service-worker.js | 2 +- .../Client/wwwroot/service-worker.published.js | 2 +- src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts | 2 +- src/Bup/Bit.Bup/Scripts/bit-bup.ts | 2 +- src/Butil/Bit.Butil/Scripts/butil.ts | 2 +- .../BlazorEmpty.Client/BlazorEmpty.Client.csproj | 8 ++++---- .../BlazorEmpty/BlazorEmpty.csproj | 8 ++++---- .../Boilerplate.Server/Boilerplate.Server.csproj | 4 ++-- .../Boilerplate.Shared/Boilerplate.Shared.csproj | 4 ++-- .../Boilerplate.Client.Core.csproj | 16 ++++++++-------- .../Boilerplate.Client.Maui.csproj | 4 ++-- .../Boilerplate.Client.Web.csproj | 6 +++--- .../wwwroot/service-worker.published.js | 2 +- .../Boilerplate.Client.Windows.csproj | 4 ++-- .../Bit.Boilerplate/src/Directory.Build.props | 2 +- .../Bit.Websites.Careers.Client.csproj | 10 +++++----- .../Bit.Websites.Careers.Server.csproj | 4 ++-- .../Bit.Websites.Careers.Shared.csproj | 4 ++-- src/Websites/Careers/src/Directory.Build.props | 2 +- .../Bit.Websites.Platform.Client.csproj | 12 ++++++------ .../Bit.Websites.Platform.Server.csproj | 4 ++-- .../Bit.Websites.Platform.Shared.csproj | 4 ++-- src/Websites/Platform/src/Directory.Build.props | 2 +- .../Bit.Websites.Sales.Client.csproj | 10 +++++----- .../Bit.Websites.Sales.Server.csproj | 4 ++-- .../Bit.Websites.Sales.Shared.csproj | 4 ++-- src/Websites/Sales/src/Directory.Build.props | 2 +- 42 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/Bit.Build.props b/src/Bit.Build.props index 16cf2c4460..2331d3280a 100644 --- a/src/Bit.Build.props +++ b/src/Bit.Build.props @@ -25,10 +25,10 @@ https://github.com/bitfoundation/bitplatform https://avatars.githubusercontent.com/u/22663390 - 8.7.1 + 8.7.2 - https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion) - $(ReleaseVersion) + https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)-pre-01 + $(ReleaseVersion)-pre-01 $(ReleaseVersion).$([System.DateTime]::Now.ToString(HHmm)) diff --git a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj index 034232b70c..b21d89e627 100644 --- a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj +++ b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj @@ -5,11 +5,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj index 2b971df1df..d4811f3e7a 100644 --- a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj +++ b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj @@ -5,11 +5,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj index 09093aad40..49e7b9b733 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj @@ -16,11 +16,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj index 463c603c0f..dc91a5dd2d 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj @@ -81,12 +81,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj index be551dae94..fb6ba0167c 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj @@ -26,12 +26,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js index 6c488f267e..3f06fdedf3 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 // https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup self.assetsInclude = []; diff --git a/src/BlazorUI/Demo/Directory.Build.props b/src/BlazorUI/Demo/Directory.Build.props index 49051ab5fb..eda5a0ed53 100644 --- a/src/BlazorUI/Demo/Directory.Build.props +++ b/src/BlazorUI/Demo/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 diff --git a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js index a5ecc966ba..9688430a63 100644 --- a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js +++ b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; self.caseInsensitiveUrl = true; diff --git a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js index e1ef1df21e..4b970a4d99 100644 --- a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js +++ b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; self.caseInsensitiveUrl = true; diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js index 5f6e200282..fc7bd1b5c3 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 // In development, always fetch from the network and do not enable offline support. // This is because caching would make development more difficult (changes would not diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js index 06920c870f..fb30082798 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 self.assetsInclude = []; self.assetsExclude = [ diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts index 49a664d2f0..1f46fcef2e 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts @@ -1,4 +1,4 @@ -window['bit-bswup.progress version'] = '8.7.1'; +window['bit-bswup.progress version'] = '8.7.2-pre-01'; ; (function () { (window as any).startBswupProgress = (autoReload: boolean, diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts index 0245c5f291..5f9742c1a9 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts @@ -1,4 +1,4 @@ -self['bit-bswup.sw version'] = '8.7.1'; +self['bit-bswup.sw version'] = '8.7.2-pre-01'; interface Window { clients: any diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts index 838686abee..8e35d6b4d7 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts @@ -1,4 +1,4 @@ -window['bit-bswup version'] = '8.7.1'; +window['bit-bswup version'] = '8.7.2-pre-01'; declare const Blazor: any; diff --git a/src/Bswup/FullDemo/Client/wwwroot/service-worker.js b/src/Bswup/FullDemo/Client/wwwroot/service-worker.js index 2b50a4edad..c0bee703fa 100644 --- a/src/Bswup/FullDemo/Client/wwwroot/service-worker.js +++ b/src/Bswup/FullDemo/Client/wwwroot/service-worker.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 // In development, always fetch from the network and do not enable offline support. // This is because caching would make development more difficult (changes would not diff --git a/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js b/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js index ed3053621c..67f65fb6a2 100644 --- a/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js +++ b/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 self.assetsInclude = []; self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; diff --git a/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts b/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts index 0ce1b719ad..15d93c681c 100644 --- a/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts +++ b/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts @@ -1,4 +1,4 @@ -window['bit-bup.progress version'] = '8.7.1'; +window['bit-bup.progress version'] = '8.7.2-pre-01'; ; (function () { (window as any).startBupProgress = (showLogs: boolean, showAssets: boolean, appContainerSelector: string, hideApp: boolean, autoHide: boolean) => { diff --git a/src/Bup/Bit.Bup/Scripts/bit-bup.ts b/src/Bup/Bit.Bup/Scripts/bit-bup.ts index ffadd3a0c7..b3ffc0bbf8 100644 --- a/src/Bup/Bit.Bup/Scripts/bit-bup.ts +++ b/src/Bup/Bit.Bup/Scripts/bit-bup.ts @@ -1,4 +1,4 @@ -window['bit-bup version'] = '8.7.1'; +window['bit-bup version'] = '8.7.2-pre-01'; declare const Blazor: any; diff --git a/src/Butil/Bit.Butil/Scripts/butil.ts b/src/Butil/Bit.Butil/Scripts/butil.ts index 1d66bde20e..7a3d098bd5 100644 --- a/src/Butil/Bit.Butil/Scripts/butil.ts +++ b/src/Butil/Bit.Butil/Scripts/butil.ts @@ -1,2 +1,2 @@ var BitButil = BitButil || {}; -BitButil.version = window['bit-butil version'] = '8.7.1'; \ No newline at end of file +BitButil.version = window['bit-butil version'] = '8.7.2-pre-01'; \ No newline at end of file diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj index 64d11ebf67..a455ba5233 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj @@ -1,4 +1,4 @@ - + @@ -15,14 +15,14 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj index efe2693c2a..a416b136ff 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj @@ -1,4 +1,4 @@ - + @@ -18,14 +18,14 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj index d6145f8ff5..2281217ab9 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj index f2073bf3db..9be4269ee8 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj @@ -5,11 +5,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj index 7cae17376b..3ec05273a1 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj @@ -16,19 +16,19 @@ - - - - + + + + - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj index 48ee80b8b2..33325a7725 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj @@ -84,11 +84,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj index 84a872b423..0e8df5e5ce 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj @@ -24,12 +24,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js index e10f7f69e0..13ec76c385 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.1 +// bit version: 8.7.2-pre-01 // https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup self.assetsInclude = []; diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj index 5f14cdd30f..c7082652ef 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj @@ -15,11 +15,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props index aa9ef09a2b..e10a70dee3 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props @@ -1,4 +1,4 @@ - + diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj index 0c535189db..2f4324abf5 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj @@ -24,14 +24,14 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj index 69ced17699..5a6236f7c6 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj @@ -9,11 +9,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj index a1f43cb0b9..ef96c02b63 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Directory.Build.props b/src/Websites/Careers/src/Directory.Build.props index 3de1cb0213..b6c5f2fe88 100644 --- a/src/Websites/Careers/src/Directory.Build.props +++ b/src/Websites/Careers/src/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj index b4f2599bf7..51e0ecc8d1 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj @@ -24,15 +24,15 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj index 19951e6565..b4c855131d 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj @@ -9,11 +9,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj index a1f43cb0b9..ef96c02b63 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Directory.Build.props b/src/Websites/Platform/src/Directory.Build.props index 03ef5f985c..4cdcf2bf65 100644 --- a/src/Websites/Platform/src/Directory.Build.props +++ b/src/Websites/Platform/src/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj index 245ebb0405..d5679b92bb 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj @@ -24,14 +24,14 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj index 394558740c..e03b9b149c 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj @@ -9,11 +9,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj index a1f43cb0b9..ef96c02b63 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Directory.Build.props b/src/Websites/Sales/src/Directory.Build.props index 9361e05d32..0b692dfe15 100644 --- a/src/Websites/Sales/src/Directory.Build.props +++ b/src/Websites/Sales/src/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 From c5fc9216947a314546d8004dddc7758c35691a5a Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Fri, 12 Jan 2024 09:20:14 +0330 Subject: [PATCH 13/39] fix(butil): resolve issues of RequestFullScreen method of Element class in Butil #6559 (#6560) --- .../Internals/JsInterops/ElementJsInterop.cs | 2 +- .../Publics/Element/FullscreenOptions.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index 4995175c18..cc34f22291 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -40,7 +40,7 @@ internal static async ValueTask ElementRemoveAttribute(this IJSRuntime js, Eleme => await js.InvokeVoidAsync("BitButil.element.removeAttribute", element, name); internal static async ValueTask ElementRequestFullScreen(this IJSRuntime js, ElementReference element, FullScreenOptions? options) - => await js.InvokeVoidAsync("BitButil.element.requestFullScreen", element, options); + => await js.InvokeVoidAsync("BitButil.element.requestFullScreen", element, options?.ToJsObject()); internal static async ValueTask ElementRequestPointerLock(this IJSRuntime js, ElementReference element) => await js.InvokeVoidAsync("BitButil.element.requestPointerLock", element); diff --git a/src/Butil/Bit.Butil/Publics/Element/FullscreenOptions.cs b/src/Butil/Bit.Butil/Publics/Element/FullscreenOptions.cs index 88dde4f1bd..01d2b1383f 100644 --- a/src/Butil/Bit.Butil/Publics/Element/FullscreenOptions.cs +++ b/src/Butil/Bit.Butil/Publics/Element/FullscreenOptions.cs @@ -3,4 +3,19 @@ public class FullScreenOptions { public FullScreenNavigationUI? NavigationUI { get; set; } + + public object ToJsObject() + { + var navigationUI = NavigationUI switch + { + FullScreenNavigationUI.Hide => "hide", + FullScreenNavigationUI.Show => "show", + _ => "auto", + }; + + return new + { + NavigationUI = navigationUI, + }; + } } From 2f14693df19be9f16bcecff97ba814032d85ed49 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Fri, 12 Jan 2024 14:54:16 +0330 Subject: [PATCH 14/39] fix(butil): resolve issues of ScrollIntoView method of Element class in Butil #6561 (#6562) --- .../Internals/JsInterops/ElementJsInterop.cs | 2 +- src/Butil/Bit.Butil/Publics/Element.cs | 11 ++---- .../Publics/Element/ScrollIntoViewOptions.cs | 35 ++++++++++++++++++- .../Publics/ElementReferenceExtensions.cs | 8 +++-- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index cc34f22291..209dcfe1f3 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -52,7 +52,7 @@ internal static async ValueTask ElementScrollBy(this IJSRuntime js, ElementRefer => await js.InvokeVoidAsync("BitButil.element.scrollBy", element, options?.ToJsObject(), x, y); internal static async ValueTask ElementScrollIntoView(this IJSRuntime js, ElementReference element, bool? alignToTop, ScrollIntoViewOptions? options) - => await js.InvokeVoidAsync("BitButil.element.scrollIntoView", element, alignToTop, options); + => await js.InvokeVoidAsync("BitButil.element.scrollIntoView", element, alignToTop, options?.ToJsObject()); internal static async ValueTask ElementSetAttribute(this IJSRuntime js, ElementReference element, string name, string value) => await js.InvokeVoidAsync("BitButil.element.setAttribute", element, name, value); diff --git a/src/Butil/Bit.Butil/Publics/Element.cs b/src/Butil/Bit.Butil/Publics/Element.cs index 38eced4d55..6a51c76e2b 100644 --- a/src/Butil/Bit.Butil/Publics/Element.cs +++ b/src/Butil/Bit.Butil/Publics/Element.cs @@ -119,22 +119,17 @@ public async Task ScrollBy(ElementReference element, double? x, double? y) /// Scrolls the page until the element gets into the view. /// public async Task ScrollIntoView(ElementReference element) - => await ScrollIntoView(element, null, null); + => await js.ElementScrollIntoView(element, null, null); /// /// Scrolls the page until the element gets into the view. /// public async Task ScrollIntoView(ElementReference element, bool alignToTop) - => await ScrollIntoView(element, alignToTop, null); + => await js.ElementScrollIntoView(element, alignToTop, null); /// /// Scrolls the page until the element gets into the view. /// public async Task ScrollIntoView(ElementReference element, ScrollIntoViewOptions options) - => await ScrollIntoView(element, null, options); - /// - /// Scrolls the page until the element gets into the view. - /// - public async Task ScrollIntoView(ElementReference element, bool? alignToTop, ScrollIntoViewOptions? options) - => await js.ElementScrollIntoView(element, alignToTop, options); + => await js.ElementScrollIntoView(element, null, options); /// /// Sets the value of a named attribute of the current node. diff --git a/src/Butil/Bit.Butil/Publics/Element/ScrollIntoViewOptions.cs b/src/Butil/Bit.Butil/Publics/Element/ScrollIntoViewOptions.cs index 292645cdc5..d59a52710b 100644 --- a/src/Butil/Bit.Butil/Publics/Element/ScrollIntoViewOptions.cs +++ b/src/Butil/Bit.Butil/Publics/Element/ScrollIntoViewOptions.cs @@ -2,9 +2,42 @@ public class ScrollIntoViewOptions { - public ScrollBehavior? behavior { get; set; } + public ScrollBehavior? Behavior { get; set; } public ScrollLogicalPosition? Block { get; set; } public ScrollLogicalPosition? Inline { get; set; } + + public object ToJsObject() + { + var behavior = Behavior switch + { + ScrollBehavior.Instant => "instant", + ScrollBehavior.Smooth => "smooth", + _ => "auto", + }; + + var block = Block switch + { + ScrollLogicalPosition.Center => "center", + ScrollLogicalPosition.End => "end", + ScrollLogicalPosition.Nearest => "nearest", + _ => "start", + }; + + var inline = Inline switch + { + ScrollLogicalPosition.Center => "center", + ScrollLogicalPosition.End => "end", + ScrollLogicalPosition.Nearest => "nearest", + _ => "start", + }; + + return new + { + Behavior = behavior, + Block = block, + Inline = inline + }; + } } diff --git a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs index 7ee8c698ae..5b32863806 100644 --- a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs +++ b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs @@ -71,8 +71,12 @@ public static async ValueTask ScrollBy(this ElementReference element, ScrollToOp public static async ValueTask ScrollBy(this ElementReference element, double? x, double? y) => await GetJSRuntime(element).ElementScrollBy(element, null, x, y); - public static async ValueTask ScrollIntoView(this ElementReference element, bool? alignToTop, ScrollIntoViewOptions? options) - => await GetJSRuntime(element).ElementScrollIntoView(element, alignToTop, options); + public static async ValueTask ScrollIntoView(this ElementReference element) + => await GetJSRuntime(element).ElementScrollIntoView(element, null, null); + public static async ValueTask ScrollIntoView(this ElementReference element, bool alignToTop) + => await GetJSRuntime(element).ElementScrollIntoView(element, alignToTop, null); + public static async ValueTask ScrollIntoView(this ElementReference element, ScrollIntoViewOptions options) + => await GetJSRuntime(element).ElementScrollIntoView(element, null, options); public static async ValueTask SetAttribute(this ElementReference element, string name, string value) => await GetJSRuntime(element).ElementSetAttribute(element, name, value); From e4ee1dc965d4abda00d6e2d82a47ef0ad5b63b9e Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Fri, 12 Jan 2024 15:14:37 +0330 Subject: [PATCH 15/39] fix(butil): resolve issues of ToggleAttribute return value of Element in Butil #6563 (#6564) --- src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs | 4 ++-- src/Butil/Bit.Butil/Publics/Element.cs | 2 +- src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs index 209dcfe1f3..4a62fed660 100644 --- a/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs +++ b/src/Butil/Bit.Butil/Internals/JsInterops/ElementJsInterop.cs @@ -60,8 +60,8 @@ internal static async ValueTask ElementSetAttribute(this IJSRuntime js, ElementR internal static async ValueTask ElementSetPointerCapture(this IJSRuntime js, ElementReference element, int pointerId) => await js.InvokeVoidAsync("BitButil.element.setPointerCapture", element, pointerId); - internal static async ValueTask ElementToggleAttribute(this IJSRuntime js, ElementReference element, string name, bool? force) - => await js.InvokeVoidAsync("BitButil.element.toggleAttribute", element, name, force); + internal static async ValueTask ElementToggleAttribute(this IJSRuntime js, ElementReference element, string name, bool? force) + => await js.InvokeAsync("BitButil.element.toggleAttribute", element, name, force); internal static async ValueTask ElementGetAccessKey(this IJSRuntime js, ElementReference element) => await js.InvokeAsync("BitButil.element.getAccessKey", element); diff --git a/src/Butil/Bit.Butil/Publics/Element.cs b/src/Butil/Bit.Butil/Publics/Element.cs index 6a51c76e2b..ed3db0c585 100644 --- a/src/Butil/Bit.Butil/Publics/Element.cs +++ b/src/Butil/Bit.Butil/Publics/Element.cs @@ -146,7 +146,7 @@ public async Task SetPointerCapture(ElementReference element, int pointerId) /// /// Toggles a boolean attribute, removing it if it is present and adding it if it is not present, on the specified element. /// - public async Task ToggleAttribute(ElementReference element, string name, bool? force = null) + public async Task ToggleAttribute(ElementReference element, string name, bool? force = null) => await js.ElementToggleAttribute(element, name, force); /// diff --git a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs index 5b32863806..4578373de3 100644 --- a/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs +++ b/src/Butil/Bit.Butil/Publics/ElementReferenceExtensions.cs @@ -84,7 +84,7 @@ public static async ValueTask SetAttribute(this ElementReference element, string public static async ValueTask SetPointerCapture(this ElementReference element, int pointerId) => await GetJSRuntime(element).ElementSetPointerCapture(element, pointerId); - public static async ValueTask ToggleAttribute(this ElementReference element, string name, bool? force) + public static async ValueTask ToggleAttribute(this ElementReference element, string name, bool? force) => await GetJSRuntime(element).ElementToggleAttribute(element, name, force); public static async ValueTask GetAccessKey(this ElementReference element) From dc0b79714f72fcf978377abdfdf403eea145a2aa Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Sat, 13 Jan 2024 09:45:31 +0100 Subject: [PATCH 16/39] fix(templates): resolve template.json issues and add some mapperly comments #6565 (#6566) --- .../Bit.Boilerplate/.template.config/template.json | 8 ++++---- .../Controllers/Categories/CategoryController.cs | 2 +- .../Controllers/Products/ProductController.cs | 2 +- .../Controllers/Todo/TodoItemController.cs | 2 +- .../Boilerplate.Server/Mappers/CategoriesMapper.cs | 5 +++++ .../Boilerplate.Server/Mappers/ProductsMapper.cs | 13 +++++++++++++ .../Boilerplate.Server/Models/Products/Product.cs | 4 +--- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json b/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json index f76b0a56e8..e4bb988b70 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json @@ -148,9 +148,9 @@ { "condition": "(sample != Admin)", "exclude": [ - "src/Shared/Dtos/Categories/**", - "src/Shared/Dtos/Dashboard/**", - "src/Shared/Dtos/Products/**", + "src/Boilerplate.Shared/Dtos/Categories/**", + "src/Boilerplate.Shared/Dtos/Dashboard/**", + "src/Boilerplate.Shared/Dtos/Products/**", "src/Boilerplate.Server/Controllers/Categories/**", "src/Boilerplate.Server/Controllers/Products/**", "src/Boilerplate.Server/Controllers/Dashboard/**", @@ -171,7 +171,7 @@ { "condition": "(sample != Todo)", "exclude": [ - "src/Shared/Dtos/Todo/**", + "src/Boilerplate.Shared/Dtos/Todo/**", "src/Boilerplate.Server/Controllers/Todo/**", "src/Boilerplate.Server/Mappers/TodoMapper.cs", "src/Boilerplate.Server/Models/Todo/**", diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Categories/CategoryController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Categories/CategoryController.cs index 2ddd6eaf3e..fe808b1ee3 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Categories/CategoryController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Categories/CategoryController.cs @@ -77,7 +77,7 @@ public async Task Delete(int id, CancellationToken cancellationToken) throw new BadRequestException(Localizer[nameof(AppStrings.CategoryNotEmpty)]); } - DbContext.Remove(new Category { Id = id }); + DbContext.Categories.Remove(new() { Id = id }); var affectedRows = await DbContext.SaveChangesAsync(cancellationToken); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Products/ProductController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Products/ProductController.cs index 183cb6b342..f94ae75386 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Products/ProductController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Products/ProductController.cs @@ -72,7 +72,7 @@ public async Task Update(ProductDto dto, CancellationToken cancellat [HttpDelete("{id}")] public async Task Delete(int id, CancellationToken cancellationToken) { - DbContext.Remove(new Product { Id = id }); + DbContext.Products.Remove(new() { Id = id }); var affectedRows = await DbContext.SaveChangesAsync(cancellationToken); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Todo/TodoItemController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Todo/TodoItemController.cs index ab1062ba63..90a6ed59e6 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Todo/TodoItemController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Todo/TodoItemController.cs @@ -79,7 +79,7 @@ public async Task Update(TodoItemDto dto, CancellationToken cancell [HttpDelete("{id}")] public async Task Delete(int id, CancellationToken cancellationToken) { - DbContext.Remove(new TodoItem { Id = id }); + DbContext.TodoItems.Remove(new() { Id = id }); var affectedRows = await DbContext.SaveChangesAsync(cancellationToken); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/CategoriesMapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/CategoriesMapper.cs index f5c70f232a..4cc675c011 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/CategoriesMapper.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/CategoriesMapper.cs @@ -12,6 +12,11 @@ public static partial class CategoriesMapper { public static partial IQueryable Project(this IQueryable query); + // In reality, the utilization of [MapProperty] is unnecessary in this context. + // This is because the 'Category' model already possesses a 'Products' property, and the 'Products' property, in turn, + // includes a 'Count' property. By concatenating these properties, we naturally obtain 'ProductsCount,' + // thereby leveraging automatic functionality through mapperly conventions. + // Nevertheless, we employ MapProperty in this instance to illustrate its usage [MapProperty(nameof(@Category.Products.Count), nameof(@CategoryDto.ProductsCount))] public static partial CategoryDto Map(this Category source); public static partial Category Map(this CategoryDto source); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/ProductsMapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/ProductsMapper.cs index 99e63d7d5e..1b819bb0a9 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/ProductsMapper.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Mappers/ProductsMapper.cs @@ -11,9 +11,22 @@ namespace Boilerplate.Server.Mappers; public static partial class ProductsMapper { public static partial IQueryable Project(this IQueryable query); + + // In reality, the utilization of [MapProperty] is unnecessary in this context. + // This is because the 'Product' model already possesses a 'Category' property, and the 'Category' property, in turn, + // includes a 'Name' property. By concatenating these properties, we naturally obtain 'CategoryName,' + // thereby leveraging automatic functionality through mapperly conventions. + // Nevertheless, we employ MapProperty in this instance to illustrate its usage + [MapProperty(nameof(@Product.Category.Name), nameof(@ProductDto.CategoryName))] public static partial ProductDto Map(this Product source); public static partial Product Map(this ProductDto source); public static partial void Patch(this ProductDto source, Product destination); + + // It is important to note that when a ProductDto is sent to the server, + // it may contain a 'CategoryName'. However, while Mappingly's automatic conventions may fill Category property of product model + // with only its Name property populated by the 'CategoryName' value while the Id remains 0, + // this oversight could lead to ef core mistakenly assuming a new category is being added to the database during product saving, + // resulting in unintended data persistence. That's why we need to ignore 'CategoryName' during Patching and Mapping manually. [MapperIgnoreSource(nameof(Product.Category))] public static partial void Patch(this Product source, ProductDto destination); } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Models/Products/Product.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Models/Products/Product.cs index 1bb07cd665..d723b3720b 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Models/Products/Product.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Models/Products/Product.cs @@ -1,5 +1,4 @@ -using System.Diagnostics.CodeAnalysis; -using Boilerplate.Server.Models.Categories; +using Boilerplate.Server.Models.Categories; namespace Boilerplate.Server.Models.Products; @@ -17,7 +16,6 @@ public class Product [MaxLength(512)] public string? Description { get; set; } - [NotNull] public DateTimeOffset CreatedOn { get; set; } = DateTimeOffset.UtcNow; [ForeignKey(nameof(CategoryId))] From 6e1024dfe2a4a023e1b5a2e237ba7f0e78bb8e8e Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Sat, 13 Jan 2024 13:24:18 +0330 Subject: [PATCH 17/39] feat(websites): add Butil documents to the Platform website #6512 (#6567) --- src/Butil/README.md | 42 ++++---- .../Pages/Butil/Butil01OverviewPage.razor | 21 ++++ .../Butil/Butil01OverviewPage.razor.scss | 16 ++++ .../Pages/Butil/Butil02InstallPage.razor | 37 +++++++ .../Pages/Butil/Butil02InstallPage.razor.scss | 26 +++++ .../Pages/Butil/Butil03SetupPage.razor | 37 +++++++ .../Pages/Butil/Butil03SetupPage.razor.scss | 20 ++++ .../Pages/Butil/Butil04WindowPage.razor | 54 +++++++++++ .../Pages/Butil/Butil04WindowPage.razor.scss | 20 ++++ .../Pages/Butil/Butil05DocumentPage.razor | 51 ++++++++++ .../Butil/Butil05DocumentPage.razor.scss | 20 ++++ .../Pages/Butil/Butil06KeyboardPage.razor | 40 ++++++++ .../Butil/Butil06KeyboardPage.razor.scss | 20 ++++ .../Pages/Butil/Butil07ConsolePage.razor | 55 +++++++++++ .../Pages/Butil/Butil07ConsolePage.razor.scss | 20 ++++ .../Pages/Butil/Butil08HistoryPage.razor | 41 ++++++++ .../Pages/Butil/Butil08HistoryPage.razor.scss | 20 ++++ .../Pages/Butil/Butil09ElementPage.razor | 45 +++++++++ .../Pages/Butil/Butil09ElementPage.razor.scss | 20 ++++ .../Pages/Butil/Butil10NavigatorPage.razor | 36 +++++++ .../Butil/Butil10NavigatorPage.razor.scss | 20 ++++ .../Pages/Butil/Butil11StoragePage.razor | 38 ++++++++ .../Pages/Butil/Butil11StoragePage.razor.scss | 20 ++++ .../Pages/Butil/Butil12LocationPage.razor | 36 +++++++ .../Butil/Butil12LocationPage.razor.scss | 20 ++++ .../Pages/Butil/Butil13ScreenPage.razor | 36 +++++++ .../Pages/Butil/Butil13ScreenPage.razor.scss | 20 ++++ .../Pages/Butil/Butil14CookiePage.razor | 36 +++++++ .../Pages/Butil/Butil14CookiePage.razor.scss | 20 ++++ .../Pages/Butil/Butil15CryptoPage.razor | 36 +++++++ .../Pages/Butil/Butil15CryptoPage.razor.scss | 20 ++++ .../Pages/HomePage.razor.scss | 2 +- .../Shared/Header.razor | 14 +++ .../Shared/Header.razor.scss | 3 +- .../Shared/MainLayout.razor.cs | 24 ++++- .../Shared/Urls.cs | 1 + .../compilerconfig.json | 90 ++++++++++++++++++ .../images/butil/install-visualstudio.webp | Bin 0 -> 26990 bytes 38 files changed, 1053 insertions(+), 24 deletions(-) create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor.scss create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/wwwroot/images/butil/install-visualstudio.webp diff --git a/src/Butil/README.md b/src/Butil/README.md index 4e62e6fc54..fb9b1d7c5d 100644 --- a/src/Butil/README.md +++ b/src/Butil/README.md @@ -29,21 +29,21 @@ builder.Services.AddBitButilServices(); Now you can inject its classes to use the utilities. -### Console -To use the browser console features you can try injecting the `Bit.Butil.Console` class like this: +### Window + +To use a representation of the DOM's `window` object in C# you can inject the `Bit.Butil.Window` class: ```razor -@inject Bit.Butil.Console console +@inject Bit.Butil.Window window ... @code { + ... - console.Log("This is a test log:", someValue); - console.Assert(condition, "The condition failed!", testedValue); - console.Error("This is a test error:", value); + await window.AddEventListener(ButilEvents.KeyDown, args => { ... }); ... } @@ -55,11 +55,11 @@ To use the browser console features you can try injecting the `Bit.Butil.Console To use a representation of the DOM's `document` object in C# you can inject the `Bit.Butil.Document` class: ```razor -@@inject Bit.Butil.Document document +@inject Bit.Butil.Document document ... -@@code { +@code { ... @@ -70,37 +70,39 @@ To use a representation of the DOM's `document` object in C# you can inject the ``` -### Window - -To use a representation of the DOM's `window` object in C# you can inject the `Bit.Butil.Window` class: +### Keyboard +In Butil there is a special class to work with keyboard and short keys. you can use this class by inejcting the `Bit.Butil.Keyboard` class: ```razor -@@inject Bit.Butil.Window window +@inject Bit.Butil.Keyboard keyboard ... -@@code { - +@code { ... - await window.AddEventListener(ButilEvents.KeyDown, args => { ... }); + await keyboard.Add("F10", args => { ... }, , ButilModifiers.Alt | ButilModifiers.Ctrl); ... } ``` -### Keyboard -In Butil there is a special class to work with keyboard and short keys. you can use this class by inejcting the `Bit.Butil.Keyboard` class: + +### Console + +To use the browser console features you can try injecting the `Bit.Butil.Console` class like this: ```razor -@inject Bit.Butil.Keyboard keyboard +@inject Bit.Butil.Console console ... -@@code { +@code { ... - await keyboard.Add("F10", args => { ... }, , ButilModifiers.Alt | ButilModifiers.Ctrl); + console.Log("This is a test log:", someValue); + console.Assert(condition, "The condition failed!", testedValue); + console.Error("This is a test error:", value); ... } diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor new file mode 100644 index 0000000000..64e64354ff --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor @@ -0,0 +1,21 @@ +@page "/butil/overview" +@inherits AppComponentBase + + + +
+ Butil +
+ Blazor Utilities for JavaScript + + + bit Butil helps C# developers to access the browser APIs that are only accessible through JavaScript in C#. + + +
+ +
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor.scss new file mode 100644 index 0000000000..8e7839faad --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor.scss @@ -0,0 +1,16 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; + display: flex; + flex-flow: column; +} + +.video-container { + width: 100%; + display: flex; + justify-content: center; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor new file mode 100644 index 0000000000..858182b522 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor @@ -0,0 +1,37 @@ +@page "/butil/install" +@inherits AppComponentBase + + + +
+ Install bit Butil +
+ + How to install the bit Butil? + +
+ +
+ CLI +
+ Open the command line of your choice and run the following command: +
+dotnet add package Bit.Butil
+
+
+ +
+ Visual Studio +
+
+ Open your Visual Studio's Manage NuGet Packages window and install the Bit.Butil package: +
+
+ +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor.scss new file mode 100644 index 0000000000..16007a75ea --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil02InstallPage.razor.scss @@ -0,0 +1,26 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} + +.butil-img { + width: 100%; + max-width: rem2(900px); + border: 1px solid gray; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor new file mode 100644 index 0000000000..c38c87b3c0 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor @@ -0,0 +1,37 @@ +@page "/butil/setup" +@inherits AppComponentBase + + + +
+ Setup bit Butil +
+ + How to install the bit Butil? + +
+ +
+ Script +
+ Add the following script tag to your default document: +
+<script src="_content/Bit.Butil/bit-butil.js"></script>
+
+
+ +
+ Service +
+ Add the following line to register the bit Butil services: +
+builder.Services.AddBitButilServices();
+ + Now you can inject its classes to use the bit Butil tools. +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil03SetupPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor new file mode 100644 index 0000000000..0bd269c94a --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor @@ -0,0 +1,54 @@ +@page "/butil/window" +@inherits AppComponentBase + + + +
+ Window +
+ + How to use the Window class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser window features you need to inject the Bit.Butil.Window class and use it like this: +
+@@inject Bit.Butil.Window window
+
+@@code {
+    await window.AddEventListener(ButilEvents.KeyDown, args => { ... });
+    await window.Alert("Alert from C#");
+}
+
+
+ +
+ Methods +
+ AddBeforeUnload, RemoveBeforeUnload: The beforeunload event is fired when the current window, + contained document, and associated resources are about to be unloaded. The main use case for this event is to + trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page + when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data. + (MDN). +

+ GetInnerHeight: Gets the height of the content area of the browser window in px including, if rendered, the horizontal scrollbar + (MDN). +

+ GetInnerWidth: Gets the width of the content area of the browser window in px including, if rendered, the vertical scrollbar + (MDN). +

+ IsSecureContext: Returns a boolean indicating whether the current context is secure (true) or not (false) + (MDN). +

+ GetOrigin: Returns the global object's origin, serialized as a string + (MDN). +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor new file mode 100644 index 0000000000..bd7f5c0d13 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor @@ -0,0 +1,51 @@ +@page "/butil/document" +@inherits AppComponentBase + + + +
+ Document +
+ + How to use the Document class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser document features you need to inject the Bit.Butil.Document class and use it like this: +
+@@inject Bit.Butil.Document document
+
+@@code {
+    await document.AddEventListener(ButilEvents.Click, args => { ... });
+    await document.SetTitle("New shinny title");
+}
+
+
+ +
+ Methods +
+ GetCharacterSet: Returns the character set being used by the document + (MDN). +

+ GetCompatMode: Indicates whether the document is rendered in quirks or strict mode + (MDN). +

+ GetInnerWidth: Gets the width of the content area of the browser window in px including, if rendered, the vertical scrollbar + (MDN). +

+ GetContentType: Returns the document location as a string + (MDN). +

+ GetDesignMode: Gets ability to edit the whole document + (MDN). +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor new file mode 100644 index 0000000000..8ed3588aa3 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor @@ -0,0 +1,40 @@ +@page "/butil/keyboard" +@inherits AppComponentBase + + + +
+ Keyboard +
+ + How to use the Keyboard class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser Keyboard features you need to inject the Bit.Butil.Keyboard class and use it like this: +
+@@inject Bit.Butil.Keyboard keyboard
+
+@@code {
+    await keyboard.Add(ButilKeyCodes.F10, args => { ... }, , ButilModifiers.Alt | ButilModifiers.Ctrl);
+    await keyboard.Remove(ButilKeyCodes.F10, handler);
+}
+
+
+ +
+ Methods +
+ Add: Adds a handler to a keyboard key combination. +

+ Remove: Removes a handler from a keyboard key combination. +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor new file mode 100644 index 0000000000..3f0241fe68 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor @@ -0,0 +1,55 @@ +@page "/butil/console" +@inherits AppComponentBase + + + +
+ Console +
+ + How to use the Console class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser console features you need to inject the Bit.Butil.Console class and use it like this: +
+@@inject Bit.Butil.Console console
+
+@@code {
+    console.Log("This is a test log:", someValue);
+    console.Assert(condition, "The condition failed!", testedValue);
+    console.Error("This is a test error:", value);
+}
+
+
+ +
+ Methods +
+ Assert: Log a message and stack trace to console if the first argument is false + (MDN). +

+ Clear: Clear the console + (MDN). +

+ Count: Log the number of times this line has been called with the given label + (MDN). +

+ CountReset: Resets the value of the counter with the given label + (MDN). +

+ Debug: Outputs a message to the console with the log level debug + (MDN). +

+ Dir: Displays an interactive listing of the properties of a specified JavaScript object + (MDN). +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor new file mode 100644 index 0000000000..22bfcdf4f5 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor @@ -0,0 +1,41 @@ +@page "/butil/history" +@inherits AppComponentBase + + + +
+ History +
+ + How to use the History class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser history features you need to inject the Bit.Butil.History class and use it like this: +
+@@inject Bit.Butil.History history
+
+@@code {
+    await history.GoBack();
+}
+
+
+ +
+ Methods +
+ GetLength: Returns an Integer representing the number of elements in the session history, including the currently loaded page + (MDN). +

+ GetScrollRestoration: Gets default scroll restoration behavior on history navigation. This property can be either auto or manual + (MDN). +
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor new file mode 100644 index 0000000000..cf54df968b --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor @@ -0,0 +1,45 @@ +@page "/butil/element" +@inherits AppComponentBase + + + +
+ Element +
+ + How to use the Element class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser Element features you need to inject the Bit.Butil.Element class and use it like this: +
+@@inject Bit.Butil.Element element
+
+...
+<div @@ref="elementRef">Test element</div>
+...
+
+@@code {
+    private ElementReference elementRef;
+    ...
+    var rect = await element.GetBoundingClientRect(elementRef);
+    // or
+    var rect = await elementRef.GetBoundingClientRect();
+    ...
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor new file mode 100644 index 0000000000..a7e1e9954a --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor @@ -0,0 +1,36 @@ +@page "/butil/navigator" +@inherits AppComponentBase + + + +
+ Navigator +
+ + How to use the Navigator class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser navigator features you need to inject the Bit.Butil.Navigator class and use it like this: +
+@@inject Bit.Butil.Navigator navigator
+
+@@code {
+    var userAgent = await navigator.GetUserAgent();
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor new file mode 100644 index 0000000000..7b14f7637f --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor @@ -0,0 +1,38 @@ +@page "/butil/storage" +@inherits AppComponentBase + + + +
+ Storage +
+ + How to use the Storage class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser storage features you need to inject the Bit.Butil.Storage class and use it like this: +
+@@inject Bit.Butil.LocalStorage localStorage
+@@inject Bit.Butil.SessionStorage sessionStorage
+
+@@code {
+    await localStorage.setItem("my-key", "my-value");
+    await sessionStorage.setItem("my-key2", "my-value2");
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor new file mode 100644 index 0000000000..d896dd8b71 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor @@ -0,0 +1,36 @@ +@page "/butil/location" +@inherits AppComponentBase + + + +
+ Location +
+ + How to use the Location class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser location features you need to inject the Bit.Butil.Location class and use it like this: +
+@@inject Bit.Butil.Location location
+
+@@code {
+    await location.Reload();
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor new file mode 100644 index 0000000000..94bd93af05 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor @@ -0,0 +1,36 @@ +@page "/butil/screen" +@inherits AppComponentBase + + + +
+ Screen +
+ + How to use the Screen class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser screen features you need to inject the Bit.Butil.Screen class and use it like this: +
+@@inject Bit.Butil.Screen screen
+
+@@code {
+    var screenWidth = await screen.GetWidth();
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor new file mode 100644 index 0000000000..7d439f97bd --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor @@ -0,0 +1,36 @@ +@page "/butil/cookie" +@inherits AppComponentBase + + + +
+ Cookie +
+ + How to use the Cookie class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser cookie features you need to inject the Bit.Butil.Cookie class and use it like this: +
+@@inject Bit.Butil.Cookie cookie
+
+@@code {
+    await Cookie.Remove("cookie-name");
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor new file mode 100644 index 0000000000..0a4766d374 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor @@ -0,0 +1,36 @@ +@page "/butil/crypto" +@inherits AppComponentBase + + + +
+ Crypto +
+ + How to use the Crypto class of the bit Butil? + +
+ +
+ Usage +
+ To use the browser crypto features you need to inject the Bit.Butil.Crypto class and use it like this: +
+@@inject Bit.Butil.Crypto crypto
+
+@@code {
+    await Crypto.Encrypt(...);
+}
+
+
+ +
+ Methods +
+
+
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor.scss new file mode 100644 index 0000000000..7daf60a86e --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor.scss @@ -0,0 +1,20 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.section-card { + @include SectionCard; +} + +.section-card-txt { + @include SectionCardText; +} + +.code-box { + @include CodeBox; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/HomePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/HomePage.razor.scss index 132bad6fda..ed47317667 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/HomePage.razor.scss +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/HomePage.razor.scss @@ -488,7 +488,7 @@ .customer-section { ::deep .customer-feedback-carousel { width: 100%; - height: rem2(360px); + height: rem2(300px); margin: rem2(32px) auto; } diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor index d9b17f7b3b..ae106bd3f3 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor @@ -41,6 +41,13 @@
Blazor Entity Framework Sqlite
+ + + +
Services
@@ -125,6 +132,13 @@
Blazor Entity Framework Sqlite
+ + + +
Services
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor.scss index 8f36c473f4..3e995adc90 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor.scss +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor.scss @@ -199,6 +199,7 @@ ::deep { .header-nav-close-btn { + z-index: 2; top: rem2(10px); right: rem2(10px); width: rem2(44px); @@ -235,7 +236,6 @@ cursor: default; position: absolute; flex-flow: row nowrap; - max-height: rem2(350px); border-radius: rem2(4px); padding: rem2(8px) rem2(16px); box-shadow: $bit-box-shadow-callout; @@ -275,7 +275,6 @@ .menu-item { display: flex; cursor: pointer; - margin: rem2(8px) 0; align-items: center; flex-flow: row nowrap; border-radius: rem2(4px); diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs index f53f9e543d..3fb41a8756 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs @@ -10,6 +10,7 @@ public partial class MainLayout : IDisposable private bool isTemplateDocRoute; private bool isBswupDocRoute; private bool isBesqlDocRoute; + private bool isButilDocRoute; private List navItems = []; @@ -49,6 +50,25 @@ public partial class MainLayout : IDisposable new BitNavItem { Text = "Usage", Url = "/besql/usage" }, ]; + private readonly List butilNavItems = + [ + new BitNavItem { Text = "Overview", Url = "/butil/overview" }, + new BitNavItem { Text = "Install", Url = "/butil/install" }, + new BitNavItem { Text = "Setup", Url = "/butil/setup" }, + new BitNavItem { Text = "Window", Url = "/butil/window" }, + new BitNavItem { Text = "Document", Url = "/butil/document" }, + new BitNavItem { Text = "Keyboard", Url = "/butil/keyboard" }, + new BitNavItem { Text = "Console", Url = "/butil/console" }, + new BitNavItem { Text = "History", Url = "/butil/history" }, + new BitNavItem { Text = "Element", Url = "/butil/element" }, + new BitNavItem { Text = "Navigator", Url = "/butil/navigator" }, + new BitNavItem { Text = "Storage", Url = "/butil/storage" }, + new BitNavItem { Text = "Location", Url = "/butil/location" }, + new BitNavItem { Text = "Screen", Url = "/butil/screen" }, + new BitNavItem { Text = "Cookie", Url = "/butil/cookie" }, + new BitNavItem { Text = "Crypto", Url = "/butil/Crypto" }, + ]; + protected override Task OnInitializedAsync() { @@ -73,11 +93,13 @@ private void SetNavItems() isTemplateDocRoute = currentUrl.Contains("templates") || currentUrl.Contains("admin-panel") || currentUrl.Contains("todo-template"); isBswupDocRoute = currentUrl.Contains("bswup"); isBesqlDocRoute = currentUrl.Contains("besql"); - isDocsRoute = isTemplateDocRoute || isBswupDocRoute || isBesqlDocRoute; + isButilDocRoute = currentUrl.Contains("butil"); + isDocsRoute = isTemplateDocRoute || isBswupDocRoute || isBesqlDocRoute || isButilDocRoute; navItems = isTemplateDocRoute ? templatesNavItems : isBswupDocRoute ? bswupNavItems : isBesqlDocRoute ? besqlNavItems + : isButilDocRoute ? butilNavItems : []; } diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs index e7ba82a776..45d858d32f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Urls.cs @@ -24,6 +24,7 @@ public static class Urls public const string Bswup = "/bswup/overview"; public const string Besql = "/besql/overview"; + public const string Butil = "/butil/overview"; public const string BoilerplateNuget = "https://www.nuget.org/packages/Bit.Boilerplate/"; diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json index 3f42b6ace2..aa0958b96f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json @@ -214,5 +214,95 @@ "inputFile": "Pages/Besql/Besql03UsagePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil01OverviewPage.razor.css", + "inputFile": "Pages/Butil/Butil01OverviewPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil02InstallPage.razor.css", + "inputFile": "Pages/Butil/Butil02InstallPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil03SetupPage.razor.css", + "inputFile": "Pages/Butil/Butil03SetupPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil04WindowPage.razor.css", + "inputFile": "Pages/Butil/Butil04WindowPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil05DocumentPage.razor.css", + "inputFile": "Pages/Butil/Butil05DocumentPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil06KeyboardPage.razor.css", + "inputFile": "Pages/Butil/Butil06KeyboardPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil07ConsolePage.razor.css", + "inputFile": "Pages/Butil/Butil07ConsolePage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil08HistoryPage.razor.css", + "inputFile": "Pages/Butil/Butil08HistoryPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil09ElementPage.razor.css", + "inputFile": "Pages/Butil/Butil09ElementPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil10NavigatorPage.razor.css", + "inputFile": "Pages/Butil/Butil10NavigatorPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil11StoragePage.razor.css", + "inputFile": "Pages/Butil/Butil11StoragePage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil12LocationPage.razor.css", + "inputFile": "Pages/Butil/Butil12LocationPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil13ScreenPage.razor.css", + "inputFile": "Pages/Butil/Butil13ScreenPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil14CookiePage.razor.css", + "inputFile": "Pages/Butil/Butil14CookiePage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Butil/Butil15CryptoPage.razor.css", + "inputFile": "Pages/Butil/Butil15CryptoPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } } ] \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/wwwroot/images/butil/install-visualstudio.webp b/src/Websites/Platform/src/Bit.Websites.Platform.Client/wwwroot/images/butil/install-visualstudio.webp new file mode 100644 index 0000000000000000000000000000000000000000..4af735a46358ad5484c76ea2f71d3e9b9c977f9a GIT binary patch literal 26990 zcmV)@K!LwfNk&FyX#fCMMM6+kP&il$00008000101ps6N09H^qOlN2S054Sq*#H%f z!?tZC$s;S%f6uo!`&1AS6OeUH-fkQI-{Cp{3XqeBuK;tlQGn1EF)j16gpaY7cMxkvrhYjeDfQpx(7CaBZJkEcU zqziHcvZQDlW&bDpawr$(CZI!ml+s1bGnrofC=30B-dGmc|&Y;S; zRcx&Kj9bRZWp}E3^9Q88ELF$4sM6X=x5qfA3g^hMwY%6(<(v`7v2B~S)-j*$RG6(J zu=QL1zir!qBipuVYh|wwuR*V0FS2dhifr5Fx9xxG^j`vOTXEZ5Y&;(ahM#?b$H$G; zn2xk3Cg4kK?4F|u?Cmh%7pFS9Bd7LG7pTQZlK;Q|#Q zb7|b=?QzFiW-Nc18MBt5GeQg%b%GXiyJIc76Xi&@ZPPj57((o%^?I@G;o5f6w!ek} zx3+Cn)yi-}*9oc=nZSMaHrUI|RR$n0GB;U|mEZUMepOvPyFJ?hH5SY<`T%9FNzv476LuH1v@<|U zRWvl*jwoue-apEL%82sv0AnP*rsfICX$l($pxfBC6X$lKSu_0}-YjJbRi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Ftu3|%dGj3@jzugD7p_m6x8dM4 zvOqjlKbG*v{FKg>O;}S#Tc8`>d2|M1VuvM6&Kyx;vxxrh5+@ni%hGwT-=s#b=-9@6c{6}XE-y6% z{?YMHE0@cgn$%s6^j_oM?Xvn9g>mO)P%(`yMoQuLIkr?9j;yqH{%1OVxZhqMV_8MD zWJzK6AbUb&%J4vUe_(jm!aXbk0_p?=(iWJ;h;W$Xu-#J8X>4@!E6Ir$S^6q!pC^6x z?m6jI)%7Jm+Lgbf_F-$ROAJBgrU&X~K69M74x7QOuq^xS0aTe_=MtsGN!lQ zaFMS5M)xuo9;Jz~UXRb9FZyEJz$vJ`iwMq0ku5`9li}gdkbu%qILf6LpG@-lEmOao>*Co3-lg@p85ygi@4H zp>I_TcFGl~@~m&dU`e}88U3>ANhaL>g`4KV7@Jj^SYCBJvGW(mEWTJ%rxHGi>nR{k-~lQ1FV_wOvcz8m5;ptG4Y+CiTcJwly5SigDu+LzgMV?yUz znLt~9Y>%jaOR*>t&mmcV0+e{Tkw4&|A`0+)*BGq(Py7{mzvM`VEs}%klUywJ>V)>IJb1 zyHhh$K{}`30yT*TO?(ObiD$$$*EWQ`ss{K`P+}1u^d)t%4^TYYLc-<3Qx$}v< ze5M*tKERL~&fAs!H`0rtfEPv(v|JvQk(aoF7&DNVvkc)?l zmk$L6h=Kxtf&xI&@bK~TpyvOdZnXUW$kIoWp#K-PMMrY{7j8rH{5{Z+8qoepcp)l+ Og#Igymxt#s_WuFBHXHl^ literal 0 HcmV?d00001 From f65ce2ba1a5939735666878002d5b4feba4da145 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Sat, 13 Jan 2024 18:38:41 +0330 Subject: [PATCH 18/39] fix(websites): resolve issues of the new docs' navmenu in small screens #6571 (#6572) --- .../Shared/Header.razor | 22 ++++++++-------- .../Shared/Header.razor.cs | 26 ++++++++++++++++--- .../Shared/MainLayout.razor.scss | 4 +++ 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor index ae106bd3f3..23b5e3a249 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Header.razor @@ -1,14 +1,14 @@ @inherits AppComponentBase -
+
- @if (currentUrl.Contains("templates")) + @if (isDocsRoute) { }
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor index 22bfcdf4f5..61899b1dfa 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor @@ -32,8 +32,37 @@ GetLength: Returns an Integer representing the number of elements in the session history, including the currently loaded page (MDN).

- GetScrollRestoration: Gets default scroll restoration behavior on history navigation. This property can be either auto or manual + + SetScrollRestoration, GetScrollRestoration: Gets/Sets default scroll restoration behavior on history navigation. This property can be either auto or manual (MDN). +

+ + GetState: Returns an any value representing the state at the top of the history stack + (MDN). +

+ + GoBack: This asynchronous method goes to the previous page in session history, the same action as when the user clicks the browser's Back button. Calling this method to go back beyond the first page in the session history has no effect and doesn't raise an exception + (MDN). +

+ + GoForward: This asynchronous method goes to the next page in session history, the same action as when the user clicks the browser's Forward button. Calling this method to go forward beyond the most recent page in the session history has no effect and doesn't raise an exception + (MDN). +

+ + Go: Asynchronously loads a page from the session history, identified by its relative location to the current page, for example -1 for the previous page or 1 for the next page. Calling this method without parameters or a value of 0 reloads the current page + (MDN). +

+ + PushState: Pushes the given data onto the session history stack with the specified title (and, if provided, URL) + (MDN). +

+ + ReplaceState: Updates the most recent entry on the history stack to have the specified data, title, and, if provided, URL + (MDN). +

+ + AddPopState, RemovePopState: The popstate event of the Window interface is fired when the active history entry changes while the user navigates the session history + (MDN).
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor index cf54df968b..899fa5ca5b 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil09ElementPage.razor @@ -38,6 +38,184 @@
Methods
+ Blur: Removes keyboard focus from the currently focused element + (MDN). +

+ + GetAttribute: Retrieves the value of the named attribute from the current node and returns it as a string + (MDN). +

+ + GetAttributeNames: Returns an array of attribute names from the current element + (MDN). +

+ + GetBoundingClientRect: Returns the size of an element and its position relative to the viewport + (MDN). +

+ + HasAttribute: Returns a boolean value indicating if the element has the specified attribute or not + (MDN). +

+ + HasPointerCapture: Indicates whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID + (MDN). +

+ + Matches: Returns a boolean value indicating whether or not the element would be selected by the specified selector string + (MDN). +

+ + ReleasePointerCapture: Releases (stops) pointer capture that was previously set for a specific pointer event + (MDN). +

+ + Remove: Removes the element from the children list of its parent + (MDN). +

+ + RemoveAttribute: Removes the named attribute from the current node + (MDN). +

+ + RequestFullScreen: Asynchronously asks the browser to make the element fullscreen + (MDN). +

+ + RequestPointerLock: Allows to asynchronously ask for the pointer to be locked on the given element + (MDN). +

+ + Scroll: Scrolls to a particular set of coordinates inside a given element + (MDN). +

+ + ScrollBy: Scrolls an element by the given amount + (MDN). +

+ + ScrollIntoView: Scrolls the page until the element gets into the view + (MDN). +

+ + SetAttribute: Sets the value of a named attribute of the current node + (MDN). +

+ + SetPointerCapture: Designates a specific element as the capture target of future pointer events + (MDN). +

+ + ToggleAttribute: Toggles a boolean attribute, removing it if it is present and adding it if it is not present, on the specified element + (MDN). +

+ + SetAccessKey, GetAccessKey: Gets/Sets a string representing the access key assigned to the element + (MDN). +

+ + SetClassName, GetClassName: Gets/Sets a string representing the class of the element + (MDN). +

+ + GetClientHeight: Returns a number representing the inner height of the element in px + (MDN). +

+ + GetClientLeft: Returns a number representing the width of the left border of the element in px + (MDN). +

+ + GetClientTop: Returns a number representing the width of the top border of the element in px + (MDN). +

+ + GetClientWidth: Returns a number representing the inner width of the element in px + (MDN). +

+ + SetId, GetId: Gets/Sets a string representing the id of the element + (MDN). +

+ + SetInnerHtml, GetInnerHtml: Gets/Sets a string representing the markup of the element's content + (MDN). +

+ + SetOuterHtml, GetOuterHtml: Gets/Sets a string representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string + (MDN). +

+ + GetScrollHeight: Returns a number representing the scroll view height of an element + (MDN). +

+ + GetScrollLeft: A number representing the left scroll offset of the element + (MDN). +

+ + GetScrollTop: A number representing number of pixels the top of the element is scrolled vertically + (MDN). +

+ + GetScrollWidth: Returns a number representing the scroll view width of the element + (MDN). +

+ + GetTagName: Returns a string with the name of the tag for the given element + (MDN). +

+ + SetContentEditable, GetContentEditable: Gets/Sets the contentEditable property, which specifies whether or not the element is editable + (MDN). +

+ + IsContentEditable: Returns a boolean value indicating whether or not the content of the element can be edited + (MDN). +

+ + SetDir, GetDir: Gets/Sets the text writing directionality of the content of the current element + (MDN). +

+ + SetEnterKeyHint, GetEnterKeyHint: Gets/Sets the enterKeyHint property, which is an enumerated property defining what action label (or icon) to present for the enter key on virtual keyboards + (MDN). +

+ + SetHidden, GetHidden: Gets/Sets the hidden property, which reflects the value of the element's hidden attribute + (MDN). +

+ + SetInert, GetInert: Gets/Sets the inert property, which reflects the value of the element's inert attribute. It is a boolean value that, when present, makes the browser "ignore" user input events for the element, including focus events and events from assistive technologies + (MDN). +

+ + SetInnerText, GetInnerText: Gets/Sets the innerText property, which represents the rendered text content of a node and its descendants + (MDN). +

+ + SetInputMode, GetInputMode: Gets/Sets the inputMode property, which reflects the value of the element's inputmode attribute + (MDN). +

+ + GetOffsetHeight: Returns the height of an element, including vertical padding and borders in px + (MDN). +

+ + GetOffsetLeft: Returns the number of pixels that the upper left corner of the current element is offset to the left within the offsetParent node + (MDN). +

+ + GetOffsetTop: Returns the distance from the outer border of the current element (including its margin) to the top padding edge of the offsetParent, the closest positioned ancestor element + (MDN). +

+ + GetOffsetWidth: The layout width of an element in px + (MDN). +

+ + SetTabIndex, GetTabIndex: Gets/Sets a number representing the position of the element in the tabbing order + (MDN).
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor index a7e1e9954a..394dd676cc 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor @@ -29,6 +29,64 @@
Methods
+ GetDeviceMemory: Returns the amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024 + (MDN). +

+ + GetHardwareConcurrency: Returns the number of logical processor cores available + (MDN). +

+ + GetLanguage: Returns a string representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown + (MDN). +

+ + GetLanguages: Returns an array of strings representing the languages known to the user, by order of preference + (MDN). +

+ + GetMaxTouchPoints: Returns the maximum number of simultaneous touch contact points are supported by the current device + (MDN). +

+ + IsOnLine: Returns a boolean value indicating whether the browser is working online + (MDN). +

+ + IsPdfViewerEnabled: Returns true if the browser can display PDF files inline when navigating to them, and false otherwise + (MDN). +

+ + GetUserAgent: Returns the user agent string for the current browser + (MDN). +

+ + IsWebDriver: Indicates whether the user agent is controlled by automation + (MDN). +

+ + CanShare: Returns true if a call to Navigator.share() would succeed + (MDN). +

+ + ClearAppBadge: Clears a badge on the current app's icon and returns a Promise that resolves with undefined + (MDN). +

+ + SendBeacon: Used to asynchronously transfer a small amount of data using HTTP from the User Agent to a web server + (MDN). +

+ + SetAppBadge: Sets a badge on the icon associated with this app and returns a Promise that resolves with undefined + (MDN). +

+ + Share: Invokes the native sharing mechanism of the current platform + (MDN). +

+ + Vibrate: Causes vibration on devices with support for it. Does nothing if vibration support isn't available + (MDN).
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor index 7b14f7637f..c3a1bdff33 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor @@ -31,6 +31,29 @@
Methods
+ GetLength: Returns an integer representing the number of data items stored in the Storage object + (MDN). +

+ + GetKey: When passed a number n, this method will return the name of the nth key in the storage + (MDN). +

+ + GetItem: When passed a key name, will return that key's value + (MDN). +

+ + SetItem: When passed a key name and value, will add that key to the storage, or update that key's value if it already exists + (MDN). +

+ + RemoveItem: When passed a key name, will remove that key from the storage + (MDN). +

+ + Clear: When invoked, will empty all keys out of the storage + (MDN). +

diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor index d896dd8b71..74ae1091d3 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil12LocationPage.razor @@ -29,6 +29,52 @@
Methods
+ SetHref, GetHref: Gets/Sets the href of the location andn then the associated document navigates to the new page + (MDN). +

+ + SetProtocol, GetProtocol: Gets/Sets a string containing the protocol scheme of the URL, including the final ':' + (MDN). +

+ + SetHost, GetHost: Gets/Sets a string containing the host, that is the hostname, a ':', and the port of the URL + (MDN). +

+ + SetHostname, GetHostname: Gets/Sets the hostname of the location and then the associated document navigates to the new page + (MDN). +

+ + SetPort, GetPort: Gets/Sets the port of the location and then the associated document navigates to the new page + (MDN). +

+ + SetPathname, GetPathname: Gets/Sets a string containing an initial '/' followed by the path of the URL, not including the query string or fragment + (MDN). +

+ + SetSearch, GetSearch: Gets/Sets a string containing a '#' followed by the fragment identifier of the URL + (MDN). +

+ + SetHash, GetHash: Gets/Sets the hash of the location and then the associated document navigates to the new page + (MDN). +

+ + GetOrigin: Returns a string containing the canonical form of the origin of the specific location + (MDN). +

+ + Assign: Loads the resource at the URL provided in parameter + (MDN). +

+ + Reload: Reloads the current URL, like the Refresh button + (MDN). +

+ + Replace: Replaces the current resource with the one at the provided URL (redirects to the provided URL) + (MDN).
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor index 94bd93af05..74ac944f60 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil13ScreenPage.razor @@ -29,6 +29,36 @@
Methods
+ GetAvailableHeight: Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows + (MDN). +

+ + GetAvailableWidth: Returns the amount of horizontal space in pixels available to the window + (MDN). +

+ + GetColorDepth: Returns the color depth of the screen + (MDN). +

+ + GetHeight: Returns the height of the screen in pixels + (MDN). +

+ + IsExtended: Returns true if the user's device has multiple screens, and false if not + (MDN). +

+ + GetPixelDepth: Gets the bit depth of the screen + (MDN). +

+ + GetWidth: Returns the width of the screen + (MDN). +

+ + AddChange, RemoveChange: Fired on a specific screen when it changes in some way — width or height, available width or height, color depth, or orientation + (MDN).
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor index 7d439f97bd..bc85706cf3 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil14CookiePage.razor @@ -29,6 +29,14 @@
Methods
+ Set, Get: Gets/Sets a cookie by providing the cookie name + (MDN). +

+ + GetAll: Gets all cookies registered on the current document. +

+ + Remove: Removes a cookie by providing the its name.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor index 0a4766d374..d7e9ece3dd 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil15CryptoPage.razor @@ -29,6 +29,12 @@
Methods
+ Encrypt: The Encrypt method of the Crypto interface that encrypts data + (MDN). +

+ + Decrypt: The Decrypt method of the Crypto interface that decrypts data + (MDN).
From ddbf2570cf33059a160ec089d88ddea5cb6c9a90 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Sun, 14 Jan 2024 14:31:34 +0330 Subject: [PATCH 20/39] feat(butil): improve Element sample page in Butil #6569 (#6575) --- .../Pages/ElementPage.razor | 697 +++++++++++++++++- 1 file changed, 692 insertions(+), 5 deletions(-) diff --git a/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/ElementPage.razor b/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/ElementPage.razor index 20184c909b..a6ce8ad53e 100644 --- a/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/ElementPage.razor +++ b/src/Butil/Demo/Bit.Butil.Demo.Core/Pages/ElementPage.razor @@ -6,7 +6,7 @@

Element

-
+
 @@inject Bit.Butil.Element element
 
 @@code {
@@ -19,21 +19,708 @@
 

-

Open the DevTools and start clicking on buttons

+

Open the DevTools and start clicking on buttons



-
Element
+
+
Element
+
+ +
+
+
+ + +
+
+ +  + +
+
+ +  + +
+
+ +  + + +
+
+
+
+ +X: +
+
+Y: +
+
+ + +
+
+

+ +X: +
+
+Y: +
+
+ + +
+
+
+
+ + + +
+
+
+
+ +
+
+
+
+ +@if (pointerId != 0) +{ + + + +
+
+ + + +
+} +else +{ +
*Click/Tap on the element first*
+} + +
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + +  + +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + +  + +
+
+ +  + + +
+
+
+
+ + + +
+
+
+
+ + +
+
+ +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + + +
+
+ +  + + +
+
+
+
+ + + +
+
+ +
+
+ + +
+
+
+
+ + + +
+
+ +  + + +
+
+
+
+ + +  + +
+
+ +  + + +
+
+
+
+ + +
+
+ +  + + +
+
+
+
+ + + +
+
+ @code { private ElementReference elementRef = default!; + private bool isDirRtl; + + private bool isInert; + + private int tabIndex; + + private int pointerId; + + private float scrollX = 0; + private float scrollY = 100; + + private float scrollByX = 0; + private float scrollByY = -156; + + private string attributeName = "style"; + + private string accessKey = "TestKey"; + + private string className = "element-class"; + + private string idName = "target"; + + private string innerHTML = "
Element
"; + + private string outerHTML = "
Element
"; + + private string innerText = "Element"; + + private ContentEditable selectedContentEditable = ContentEditable.True; + + private EnterKeyHint selectedEnterKeyHint = EnterKeyHint.Done; + + private Hidden selectedHidden = Hidden.True; + + + private async Task GetAttribute() + { + await console.Log("Element Attribute:", await elementRef.GetAttribute(attributeName)); + } + + private async Task GetAttributeNames() + { + var attributeNames = await elementRef.GetAttributeNames(); + + foreach (var name in attributeNames) + { + var value = await elementRef.GetAttribute(name); + await console.Log(name, value); + } + } + private async Task GetBoundingClientRect() { - await console.Log("BoundingClientRect:", await elementRef.GetBoundingClientRect()); - await console.Log("BoundingClientRect:", await element.GetBoundingClientRect(elementRef)); + await console.Log("Element BoundingClientRect:", await elementRef.GetBoundingClientRect()); + } + + private async Task HasAttribute() + { + await console.Log($"Element HasAttribute ({attributeName}):", await elementRef.HasAttribute(attributeName)); + } + + private async Task HasAttributes() + { + await console.Log("Element HasAttributes:", await elementRef.HasAttributes()); + } + + private async Task ToggleAttribute() + { + await console.Log($"Element ToggleAttribute ({attributeName}):", await elementRef.ToggleAttribute(attributeName, true)); + } + + private async Task RemoveAttribute() + { + var hasAttribute = await elementRef.HasAttribute(attributeName); + + await elementRef.RemoveAttribute(attributeName); + + if (hasAttribute) + { + await console.Log($"Element {attributeName} attribute has been removed"); + } + } + + private void HandleOnPointerDown(PointerEventArgs e) + { + pointerId = (int)e.PointerId; + } + + private async Task HasPointerCapture() + { + var isPointerCaptured = await elementRef.HasPointerCapture(pointerId); + await console.Log($"Element HasPointerCapture (id: {pointerId}):", isPointerCaptured); + } + + private async Task SetPointerCapture() + { + await elementRef.SetPointerCapture(pointerId); + var isPointerCaptured = await elementRef.HasPointerCapture(pointerId); + + if (isPointerCaptured) + { + await console.Log($"Element Pointer (id: {pointerId}) has been captured"); + } + } + + private async Task ReleasePointerCapture() + { + await elementRef.ReleasePointerCapture(pointerId); + var isPointerCaptured = await elementRef.HasPointerCapture(pointerId); + + if (isPointerCaptured) + { + await console.Log($"Element Pointer with (id: {pointerId}) capture has been released"); + } + } + + private async Task RequestPointerLock() + { + await elementRef.RequestPointerLock(); + await console.Log("Pointer has been locked"); + } + + private async Task Matches() + { + await console.Log("Element matches id=\"target\"?", await elementRef.Matches("#target")); + } + + private async Task RequestFullScreen() + { + var options = new FullScreenOptions() { NavigationUI = FullScreenNavigationUI.Show }; + await elementRef.RequestFullScreen(options); + await console.Log("Element has been fullscreened"); + } + + private async Task Scroll() + { + var scrollOptions = new ScrollToOptions() { Top = scrollY, Left = scrollX, Behavior = ScrollBehavior.Smooth }; + await elementRef.Scroll(scrollOptions); + } + + private async Task ScrollBy() + { + var scrollOptions = new ScrollToOptions() { Top = scrollByY, Left = scrollByX, Behavior = ScrollBehavior.Smooth }; + await elementRef.ScrollBy(scrollOptions); + } + + private async Task ScrollIntoView() + { + var scrollOptions = new ScrollIntoViewOptions() + { + Inline = ScrollLogicalPosition.Center, + Block = ScrollLogicalPosition.Center, + Behavior = ScrollBehavior.Smooth + }; + + await elementRef.ScrollIntoView(scrollOptions); + } + + private async Task SetAccessKey() + { + await elementRef.SetAccessKey(accessKey); + await console.Log($"Element AccessKey has been successfuly set to \"{accessKey}\""); + } + + private async Task GetAccessKey() + { + await console.Log("Element AccessKey:", await elementRef.GetAccessKey()); + } + + private async Task SetClassName() + { + await elementRef.SetClassName(className); + await console.Log($"Element class name has been successfuly set to \"{className}\""); + } + + private async Task GetClassName() + { + await console.Log("Element AccessKey:", await elementRef.GetClassName()); + } + + private async Task GetClientHeight() + { + await console.Log("Element ClientHeight:", await elementRef.GetClientHeight()); + } + + private async Task GetClientLeft() + { + await console.Log("Element ClientLeft:", await elementRef.GetClientLeft()); + } + + private async Task GetClientTop() + { + await console.Log("Element ClientTop:", await elementRef.GetClientTop()); + } + + private async Task GetClientWidth() + { + await console.Log("Element ClientWidth:", await elementRef.GetClientWidth()); + } + + private async Task SetId() + { + await elementRef.SetId(idName); + await console.Log($"Element Id has been successfuly set to \"{idName}\""); + } + + private async Task GetId() + { + await console.Log("Element Id:", await elementRef.GetId()); + } + + private async Task SetInnerHTML() + { + await elementRef.SetInnerHTML(innerHTML); + await console.Log($"Element InnerHTML has been successfuly set to \"{innerHTML}\""); + } + + private async Task GetInnerHTML() + { + await console.Log("Element InnerHTML:", await elementRef.GetInnerHTML()); + } + + private async Task SetOuterHTML() + { + await elementRef.SetOuterHTML(outerHTML); + await console.Log($"Element OuterHTML has been successfuly set to \"{outerHTML}\""); + } + + private async Task GetOuterHTML() + { + await console.Log("Element OuterHTML:", await elementRef.GetOuterHTML()); + } + + private async Task SetInnerText() + { + await elementRef.SetInnerText(innerText); + await console.Log("Element InnerText has been successfuly set"); + } + + private async Task GetInnerText() + { + await console.Log("Element InnerText:", await elementRef.GetInnerText()); + } + + private async Task GetScrollHeight() + { + await console.Log("Element ScrollHeight:", await elementRef.GetScrollHeight()); + } + + private async Task GetScrollLeft() + { + await console.Log("Element ScrollLeft:", await elementRef.GetScrollLeft()); + } + + private async Task GetScrollTop() + { + await console.Log("Element ScrollTop:", await elementRef.GetScrollTop()); + } + + private async Task GetScrollWidth() + { + await console.Log("Element ScrollWidth:", await elementRef.GetScrollWidth()); + } + + private async Task GetTagName() + { + await console.Log("Element TagName:", await elementRef.GetTagName()); + } + + private async Task IsContentEditable() + { + await console.Log("Element IsContentEditable:", await elementRef.IsContentEditable()); + } + + private async Task SetContentEditable() + { + await elementRef.SetContentEditable(selectedContentEditable); + await console.Log($"Element ContentEditable has been successfuly set to \"{selectedContentEditable}\""); + } + + private async Task GetContentEditable() + { + await console.Log("Element ContentEditable:", await elementRef.GetContentEditable()); + } + + private async Task SetEnterKeyHint() + { + await elementRef.SetEnterKeyHint(selectedEnterKeyHint); + await console.Log($"Element EnterKeyHint has been successfuly set to \"{selectedEnterKeyHint}\""); + } + + private async Task GetEnterKeyHint() + { + await console.Log("Element EnterKeyHint:", await elementRef.GetEnterKeyHint()); + } + + private async Task SetHidden() + { + await elementRef.SetHidden(selectedHidden); + await console.Log($"Element Hidden has been successfuly set to \"{selectedHidden}\""); + } + + private async Task GetHidden() + { + await console.Log("Element Hidden:", await elementRef.GetHidden()); + } + + private async Task SetDir() + { + await elementRef.SetDir(isDirRtl ? ElementDir.Rtl : ElementDir.Ltr); + await console.Log($"Element Dir has been successfuly set to \"{(isDirRtl ? "Rtl" : "Ltr")}\""); + } + + private async Task GetDir() + { + await console.Log("Element Dir:", await elementRef.GetDir()); + } + + private async Task SetInert() + { + await elementRef.SetInert(isInert); + await console.Log($"Element Inert has been successfuly set to \"{isInert}\""); + } + + private async Task GetInert() + { + await console.Log("Element Inert:", await elementRef.GetInert()); + } + + private async Task GetOffsetHeight() + { + await console.Log("Element OffsetHeight:", await elementRef.GetOffsetHeight()); + } + + private async Task GetOffsetLeft() + { + await console.Log("Element OffsetLeft:", await elementRef.GetOffsetLeft()); + } + + private async Task GetOffsetTop() + { + await console.Log("Element OffsetTop:", await elementRef.GetOffsetTop()); + } + + private async Task GetOffsetWidth() + { + await console.Log("Element OffsetWidth:", await elementRef.GetOffsetWidth()); + } + + private async Task SetTabIndex() + { + await elementRef.SetTabIndex(tabIndex); + await console.Log($"Element TabIndex has been successfuly set to \"{tabIndex}\""); + } + + private async Task GetTabIndex() + { + await console.Log("Element TabIndex:", await elementRef.GetTabIndex()); + } + + private async Task Remove() + { + await elementRef.Remove(); + await console.Log("Element has been Removed"); } } \ No newline at end of file From 95568958069ed197be61cf0f50e3de325c7e87d5 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Sun, 14 Jan 2024 15:00:34 +0330 Subject: [PATCH 21/39] feat(butil): improve Bswup docs in the Platform website #6570 (#6576) --- .../Pages/Bswup/Bswup03ScriptsPage.razor | 19 ++- .../Pages/Bswup/Bswup04EventsPage.razor | 21 +++ .../Bswup/Bswup05ServiceWorkerPage.razor | 43 +++--- .../Pages/Bswup/Bswup06CachingPage.razor | 43 ------ .../Pages/Bswup/Bswup06ProgressPage.razor | 134 ++++++++++++++++++ ...or.scss => Bswup06ProgressPage.razor.scss} | 0 .../Shared/MainLayout.razor.cs | 2 +- .../compilerconfig.json | 4 +- 8 files changed, 188 insertions(+), 78 deletions(-) delete mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06CachingPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06ProgressPage.razor rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/{Bswup06CachingPage.razor.scss => Bswup06ProgressPage.razor.scss} (100%) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup03ScriptsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup03ScriptsPage.razor index 1c93df4f2e..fa90bd92c5 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup03ScriptsPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup03ScriptsPage.razor @@ -16,12 +16,12 @@
Blazor script
- Since Bswup is taking care of the lifecyle of the application, we need to disable - the autostarting of the Blazor by adding autostart=false to the Blazor script tag: + Since Bswup is taking care of the lifecycle of the application, we need to disable + the autostart of the Blazor by adding autostart=false to the Blazor script tag:
 <script src="_framework/blazor.web.js" autostart="false">/<script>
- +Or for the standalone template:
 <script src="_framework/blazor.webassembly.js" autostart="false"></script>
@@ -44,17 +44,16 @@
This script tag as shown above, has some options: -
-
+

scope: The scope of the service-worker (read more). -
+

log: The log level of the Bswup logger. available options are: info, verbose, debug, and error (coming soon). -
+

sw: The file path of the service-worker file. -
- handler: The name of the handler function for the service-worker events. -
+

+ handler: The name of the handler function for the service-worker events that explained here. +

blazorScript: The file path of the Blazor's js script file.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup04EventsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup04EventsPage.razor index a5a7cd6755..221ab477f6 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup04EventsPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup04EventsPage.razor @@ -63,6 +63,27 @@ function bitBswupHandler(type, data) {
+
+ Bswup Events +
+
+ All the bit Bswup events are as follows: +

+ updateFound: when a new update for the app is found by the bit Bswup's Service Worker. +

+ stateChanged: when the state of the Service Worker is changed. +

+ activate: when a new version of the Service Worker is activated. +

+ downloadStarted: when download of the new version of the app started. +

+ downloadProgress: the progress of downloading the new version of the app. +

+ downloadFinished: when the download of the new version of the app finished. +

+ updateReady: when the new version of the app is ready to apply. +
+
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup05ServiceWorkerPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup05ServiceWorkerPage.razor index 19cc40c257..229ba44ec1 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup05ServiceWorkerPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup05ServiceWorkerPage.razor @@ -46,74 +46,73 @@ self.enableDiagnostics = true; self.enableFetchDiagnostics = true; self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js');
- -
- Note: The most important line here is the last line which is the only mandatory config in this file - that imports the Bswup service-worker file: +
+ Note: The most important line here is the last line which is the only mandatory config in this file + that imports the Bswup service-worker file: -
+
 self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js');
-
+
-
- The other settings are: + These available configurations are explained below:

- assetsInclude: The list of file names from the assets list to include when the Bswup + assetsInclude: The list of file names from the assets list to include when the Bswup tries to store them in the cache storage (regex supported).

- assetsExclude: The list of file names from the assets list to exclude when the Bswup + assetsExclude: The list of file names from the assets list to exclude when the Bswup tries to store them in the cache storage (regex supported).

- externalAssets: The list of external assets to cache that are not included in the auto-generated assets file. + externalAssets: The list of external assets to cache that are not included in the auto-generated assets file. For example, if you're not using index.html (like _host.cshtml), then you should add { "url": "/" }.

defaultUrl: The default page URL. Use / when using _Host.cshtml.

- assetsUrl: The file path of the service-worker assets file generated at compile time + assetsUrl: The file path of the service-worker assets file generated at compile time (the default file name is service-worker-assets.js).

prohibitedUrls: The list of file names that should not be accessed (regex supported).

caseInsensitiveUrl: Enables the case insensitivity in the URL checking of the cache process.

- serverHandledUrls: The list of URLs that do not enter the service-worker offline process and + serverHandledUrls: The list of URLs that do not enter the service-worker offline process and will be handled only by server (regex supported). such as /api, /swagger, ...

- serverRenderedUrls: The list of URLs that should be rendered by the server and not + serverRenderedUrls: The list of URLs that should be rendered by the server and not client while navigating (regex supported). such as /about.html, /privacy, ...

- noPrerenderQuery: The query string attached to the default document request to disable + noPrerenderQuery: The query string attached to the default document request to disable the prerendering from the server so an unwanted prerendered result not be cached.

- ignoreDefaultInclude: Ignores the default asset includes array which is provided by the + ignoreDefaultInclude: Ignores the default asset includes array which is provided by the Bswup itself which is like this:
 [/\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/, /\.svg$/, /\.woff2$/, /\.ttf$/, /\.webp$/]
- ignoreDefaultExclude: Ignores the default asset excludes array which is provided by the Bswup + ignoreDefaultExclude: Ignores the default asset excludes array which is provided by the Bswup itself which is like this:
 [/^_content\/Bit\.Bswup\/bit-bswup\.sw\.js$/, /^service-worker\.js$/]
- Note: Keep in mind that caching service-worker related files will corrupt the update cycle of the service-worker. + Note: Keep in mind that caching service-worker related files will corrupt the update cycle of the service-worker. Only the browser should handle these files.

- isPassive: Enables the Bswup's passive mode. In this mode, the assets won't be + isPassive: Enables the Bswup's passive mode. In this mode, the assets won't be cached in advance but rather upon initial request.

disablePassiveFirstBoot: Disables downloading the Blazor's boot files in first time of Passive mode.

- enableIntegrityCheck: Enables the default integrity check available in browsers by setting + enableIntegrityCheck: Enables the default integrity check available in browsers by setting the integrity attribute of the request object created in the service-worker to fetch the assets.

enableDiagnostics: Enables diagnostics by pushing service-worker logs to the browser console.

- enableFetchDiagnostics: Enables fetch event diagnostics by pushing service-worker + enableFetchDiagnostics: Enables fetch event diagnostics by pushing service-worker fetch event logs to the browser console. +
- + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06CachingPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06CachingPage.razor deleted file mode 100644 index c4d92ee779..0000000000 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06CachingPage.razor +++ /dev/null @@ -1,43 +0,0 @@ -@page "/bswup/caching" -@inherits AppComponentBase - - - -
- Caching -
- - bit Bswup needs no caching to be set on the assets response header. - -
- -
- ASP.NET caching -
- Enable static file caching. You can follow the below code in the Startup.cs file: - -
-app.UseStaticFiles(new StaticFileOptions
-{
-    OnPrepareResponse = ctx =>
-    {
-        if (env.IsDevelopment() is false)
-        {
-            // https://bitplatform.dev/templates/cache-mechanism
-            ctx.Context.Response.GetTypedHeaders().CacheControl = new()
-            {
-                MaxAge = TimeSpan.FromDays(7),
-                Public = true
-            };
-        }
-    }
-});
-
- -
- -
- - diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06ProgressPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06ProgressPage.razor new file mode 100644 index 0000000000..e8e661bec5 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06ProgressPage.razor @@ -0,0 +1,134 @@ +@page "/bswup/progress" +@inherits AppComponentBase + + + +
+ Progress component +
+ + bit Bswup has its own Progress component to simplify the process of implementing a sophisticated UI widget to show the update progress. + +
+ +
+ BswupProgress +
+ The BswupProgress component can be used to implement a customizable update progress easily. + In order to use this component first add its script tag to the default document of your app: +
+
+<script src="_content/Bit.Bswup/bit-bswup.progress.js"></script>
+ + Then you can use it in your app like this: +
+
+<div>
+    <BswupProgress AppContainer="#app-container" AutoReload=false>
+        <div class="bswup-progress-text" />
+        <svg class="bswup-container">
+            <circle r="40%" cx="50%" cy="50%" />
+            <circle r="40%" cx="50%" cy="50%" />
+        </svg>
+    </BswupProgress>
+    <button id="bit-bswup-reload">Update available, Click to Reload</button>
+</div>
+ + +
+
+#bit-bswup {
+    top: 2px;
+    left: 50%;
+    display: none;
+    z-index: 999999;
+    position: fixed;
+    text-align: center;
+    transform: translateX(-50%);
+    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI";
+}
+
+#bit-bswup .bswup-container {
+    width: 3rem;
+    height: 3rem;
+    display: block;
+    position: relative;
+}
+
+#bit-bswup .bswup-container circle {
+    fill: none;
+    stroke: #e0e0e0;
+    stroke-width: 0.2rem;
+    transform: rotate(-90deg);
+    transform-origin: 50% 50%;
+}
+
+#bit-bswup .bswup-container circle:last-child {
+    stroke: #1b6ec2;
+    transition: stroke-dasharray 0.05s ease-in-out;
+    stroke-dasharray: calc(3.141 * var(--bit-bswup-percent, 0%) * 0.8), 500%;
+}
+
+#bit-bswup .bswup-progress-text {
+    top: 50%;
+    left: 50%;
+    font-size: 12px;
+    position: absolute;
+    text-align: center;
+    font-weight: normal;
+    transform: translate(-50%, -50%);
+}
+
+#bit-bswup .bswup-progress-text::after {
+    content: var(--bit-bswup-percent-text, "");
+}
+
+#bit-bswup-reload {
+    top: 10px;
+    right: 10px;
+    display: none;
+    position: fixed;
+}
+
+
+

+ The parameters of this component are as follows: +

+ AutoReload: if the BswupProgress should auto-reload the app after downloading the new update. + The default value is true. +

+ ShowAssets: if the BswupProgress should show the assets list in its default UI. + The default value is false. +

+ ShowLogs: if the BswupProgress should show the logs of its process in the console of the web browser. + The default value is false. +

+ HideApp: if the BswupProgress should hide the main app's UI in the process of the update progress. + The default value is false. +

+ AppContainer: the css selector of the blazor app container element. + The default value is "#app". +

+ Handler: the custom js handler function to do custom additional tasks in Bswup events. + The default value is null. +


+ + As you can see in the above example, you can provide your own custom UI and use it + instead of the default UI of the BswupProgress component. + +

+ + Note: In the case of using a custom UI, you can use the following custom CSS properties to access the progress +

+ --bit-bswup-percent: the number value of the current progress percent. +

+ --bit-bswup-percent-text: the string (text) value of the current progress percent with % character at the end of it. +
+ +
+ +
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06CachingPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06ProgressPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06CachingPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup06ProgressPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs index 3fb41a8756..7e1eb52819 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs @@ -40,7 +40,7 @@ public partial class MainLayout : IDisposable new BitNavItem { Text = "Scripts", Url = "/bswup/scripts" }, new BitNavItem { Text = "Events", Url = "/bswup/events" }, new BitNavItem { Text = "Service Worker", Url = "/bswup/service-worker" }, - new BitNavItem { Text = "Caching", Url = "/bswup/caching" }, + new BitNavItem { Text = "BswupProgress", Url = "/bswup/progress" }, ]; private readonly List besqlNavItems = diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json index aa0958b96f..c27f6eae7c 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json @@ -192,8 +192,8 @@ "options": { "sourceMap": false } }, { - "outputFile": "Pages/Bswup/Bswup06CachingPage.razor.css", - "inputFile": "Pages/Bswup/Bswup06CachingPage.razor.scss", + "outputFile": "Pages/Bswup/Bswup06ProgressPage.razor.css", + "inputFile": "Pages/Bswup/Bswup06ProgressPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, From a59e3cc732ef826186719ca0f38e5a934a9c024e Mon Sep 17 00:00:00 2001 From: Mohammad Aminsafaei Date: Mon, 15 Jan 2024 16:09:07 +0330 Subject: [PATCH 22/39] feat(blazorui): remove unused field in BitCalendar #6577 (#6578) --- .../Components/Inputs/Calendar/BitCalendar.razor.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Calendar/BitCalendar.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Calendar/BitCalendar.razor.cs index 0e4cf869d1..c2d3c3ce84 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Calendar/BitCalendar.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/Calendar/BitCalendar.razor.cs @@ -91,7 +91,6 @@ private int _minuteView private int _yearPickerEndYear; private int _yearPickerStartYear; private int? _selectedDateDayOfWeek; - private string? _activeDescendantId; private string _monthTitle = string.Empty; private ElementReference _inputTimeHourRef = default!; private ElementReference _inputTimeMinuteRef = default!; @@ -328,8 +327,6 @@ protected override void RegisterCssStyles() protected override void OnInitialized() { - _activeDescendantId = $"BitCalendar-{UniqueId}-active-descendant"; - _showTimePicker = showTimePicker && ShowTimePickerAsOverlay is false; _showMonthPicker = _showTimePicker is false && showMonthPicker && ShowMonthPickerAsOverlay is false; From 31f5c2b656ed3aac0f2bb80c3c360335eceb20cc Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Mon, 15 Jan 2024 13:42:50 +0100 Subject: [PATCH 23/39] feat(github): improve bitplatform's README.md file #6579 (#6580) --- README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 06a52f3e14..cb9f56f845 100644 --- a/README.md +++ b/README.md @@ -12,24 +12,19 @@ # 🧾 Introduction -[bit platform](https://bitplatform.dev) is the home ❤️ for .NET developers. +At **bitplatform**, we've curated a comprehensive toolkit to empower you in crafting the finest projects using Blazor. Diverging from others merely offering UI Toolkits, BitPlatform distinguishes itself with over 56 components, with a compact size of under 400 KB. These components boast both Dark and Light Themes, delivering unparalleled High Performance. -Using C#, HTML, and CSS it offers a full featured dotnet project template equipped with a lot of features a .NET developer needs. With this template, one can also easily switch between different app modes: +Yet, bitplatform doesn't stop there. Our platform introduces exclusive tools that elevate your development experience: -* **Blazor Server**: Best for fast development and debugging with hot reload. With the Blazor Server hosting model, the app is executed on the server from within an ASP.NET Core app. UI updates, event handling, and JavaScript calls are handled over a SignalR connection using the WebSockets protocol. -* **Blazor WebAssembly**: Best for SPA deployment. Blazor WebAssembly (WASM) apps run client-side in the browser on a WebAssembly-based .NET runtime. The Blazor app, its dependencies, and the .NET runtime are downloaded to the browser. The app is executed directly on the browser UI thread. UI updates and event handling occur within the same process. -* **Blazor Auto**: Blazor seamlessly combines Blazor Server and WebAssembly. This approach enhances user interaction initially through Blazor Server, while simultaneously downloading Blazor WebAssembly for subsequent visits, reducing server load. -* **Blazor Hybrid - MAUI**: Blazor can also be used to build native client apps using a hybrid approach. Hybrid apps are native apps that leverage web technologies for their functionality. In a Blazor Hybrid app, Razor components run directly in the native app (not on WebAssembly). Blazor Hybrid is on top of .NET MAUI and has access to all native features of supported platforms (Android, iOS, macOS and Windows) +**Bswup**: This unique tool harnesses the power of Progressive Web Apps (PWA) within the innovative new structure of dotnet 8. By amalgamating pre-rendering techniques reminiscent of renowned platforms like GitHub, Reddit, and Facebook, Bswup ensures an exceptional user experience. -With different deployment types: +**Butil**: Embracing Blazor because of your love for C#? Butil enables you to stay true to that sentiment by providing essential Browser APIs in C#, eliminating the need to revert to JavaScript for any functionality. -* **SPA**: It's referring to a Typical Single Page Application (SPA) without pre-rendering. Best for development / debugging. It is the default option. -* **PWA**: A Blazor WebAssembly app built as a Progressive Web App (PWA) uses modern browser APIs to enable many of the capabilities of a native client app, such as working offline, running in its own app window, launching from the host's operating system, receiving push notifications, and automatically updating in the background. -* **SPA-Prerendered**: Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in the browser. Blazor pre-renders the requested page on the server and sends it as a static page, then later the page becomes an interactive Blazor app on the client. This behavior is intended to serve pages quickly to search engines with time-based positioning. It improves SEO. -* **PWA-Prerendered**: Almost the same as the SPA version, but with the PWA capability which reduces the toll on the server considerebly after the first render. -* **Prerender-Only**: Statically renders the component with the specified parameters without any interactivity on the client. It's recommended when the target is building a static content like a landing page. +**Besql**: Dreaming of an offline web application capable of saving data and syncing later? Enter Besql, your solution to incorporating ef core & sqlite in your browser. It's a crucial aid for achieving this objective seamlessly. -This project template is powered by [bit BlazorUI](https://components.bitplatform.dev) components, which are super-fast 🌶 and lightweight making them the best toolbox for developing common apps. +**Bit Boilerplate Project Template**: If the aforementioned features have piqued your interest, dive into the Bit Boilerplate project template. Experience everything mentioned above along with additional features such as ASP.NET Core Identity integration, multilingualism, and other cool features that empowers you to develop unified Web, Android, iOS, Windows, and macOS apps from a single codebase, while providing seamless integration with native platform features and third-party Java, Kotlin, Swift, Objective-C, and JavaScript libraries. + +For more details, visit us at [bitplatform.dev](https://bitplatform.dev/).
@@ -41,7 +36,8 @@ The following apps are our open-source projects powered by the bit platform show |:-:|:--:|:--:|:--:|:--:|:--:| | bit BlazorUI | [![Prerendered PWA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381583-8b8eb895-80c9-4811-9641-57a5a08db163.png)](https://components.bitplatform.dev) | [![iOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381842-e72976ce-fd20-431d-a677-ca1ed625b83b.png)](https://apps.apple.com/us/app/bit-blazor-ui/id6450401404) | [![Android app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381958-24931682-87f6-44fc-a1c7-eecf46387005.png)](https://play.google.com/store/apps/details?id=com.bitplatform.BlazorUI.Demo) | [![Windows app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382080-9ae97fea-934c-4097-aca4-124a2aed1595.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/BlazorUIDemo-Windows.zip) | [![macOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382211-0d58f9ba-1a1f-4481-a0ca-b23a393cca9f.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/BlazorUIDemo-macOS.pkg) | Todo | [![Prerendered PWA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381583-8b8eb895-80c9-4811-9641-57a5a08db163.png)](https://todo.bitplatform.dev) | [![iOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381842-e72976ce-fd20-431d-a677-ca1ed625b83b.png)](https://apps.apple.com/us/app/bit-todotemplate/id6450611072) | [![Android app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381958-24931682-87f6-44fc-a1c7-eecf46387005.png)](https://play.google.com/store/apps/details?id=com.bitplatform.Todo.Template) | [![Windows app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382080-9ae97fea-934c-4097-aca4-124a2aed1595.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/TodoTemplate-Windows.zip) | [![macOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382211-0d58f9ba-1a1f-4481-a0ca-b23a393cca9f.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/TodoTemplate-macOS.pkg) -| AdminPanel | [![SPA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251395129-71a5a79c-af74-4d4e-a0f7-ed9a15cf2e46.png)](https://adminpanel.bitplatform.dev) | [![iOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381842-e72976ce-fd20-431d-a677-ca1ed625b83b.png)](https://apps.apple.com/us/app/bit-adminpanel/id6450611349) | [![Android app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381958-24931682-87f6-44fc-a1c7-eecf46387005.png)](https://play.google.com/store/apps/details?id=com.bitplatform.AdminPanel.Template) | [![Windows app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382080-9ae97fea-934c-4097-aca4-124a2aed1595.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-Windows.zip) | [![macOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382211-0d58f9ba-1a1f-4481-a0ca-b23a393cca9f.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-macOS.pkg) | +| AdminPanel | [![Prerendered PWA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381583-8b8eb895-80c9-4811-9641-57a5a08db163.png)](https://adminpanel.bitplatform.dev) | [![iOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381842-e72976ce-fd20-431d-a677-ca1ed625b83b.png)](https://apps.apple.com/us/app/bit-adminpanel/id6450611349) | [![Android app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381958-24931682-87f6-44fc-a1c7-eecf46387005.png)](https://play.google.com/store/apps/details?id=com.bitplatform.AdminPanel.Template) | [![Windows app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382080-9ae97fea-934c-4097-aca4-124a2aed1595.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-Windows.zip) | [![macOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382211-0d58f9ba-1a1f-4481-a0ca-b23a393cca9f.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-macOS.pkg) | +| bitplatform | [![SPA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251395129-71a5a79c-af74-4d4e-a0f7-ed9a15cf2e46.png)](https://bitplatform.dev)|
From 35ffd1ef33dac6506828a83c4f619eb656a161f3 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Mon, 15 Jan 2024 14:22:46 +0100 Subject: [PATCH 24/39] feat(github): improve bitplatform's README.md II #6581 (#6582) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cb9f56f845..2e085f37ad 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,17 @@ # 🧾 Introduction -At **bitplatform**, we've curated a comprehensive toolkit to empower you in crafting the finest projects using Blazor. Diverging from others merely offering UI Toolkits, BitPlatform distinguishes itself with over 56 components, with a compact size of under 400 KB. These components boast both Dark and Light Themes, delivering unparalleled High Performance. +At **bitplatform**, we've curated a comprehensive toolkit to empower you in crafting the finest projects using Blazor. Diverging from others merely offering UI Toolkits, ***bit BlazorUI components*** distinguishes itself with over 56 components, with a compact size of under 400 KB. These components boast both Dark and Light Themes, delivering unparalleled High Performance 🚀 Yet, bitplatform doesn't stop there. Our platform introduces exclusive tools that elevate your development experience: -**Bswup**: This unique tool harnesses the power of Progressive Web Apps (PWA) within the innovative new structure of dotnet 8. By amalgamating pre-rendering techniques reminiscent of renowned platforms like GitHub, Reddit, and Facebook, Bswup ensures an exceptional user experience. +***Bswup***: This unique tool harnesses the power of Progressive Web Apps (PWA) within the innovative new structure of dotnet 8. By amalgamating pre-rendering techniques reminiscent of renowned platforms like GitHub, Reddit, and Facebook, Bswup ensures an exceptional user experience 😍 -**Butil**: Embracing Blazor because of your love for C#? Butil enables you to stay true to that sentiment by providing essential Browser APIs in C#, eliminating the need to revert to JavaScript for any functionality. +***Butil***: Embracing Blazor because of your love for C#? Butil enables you to stay true to that sentiment by providing essential Browser APIs in C#, eliminating the need to revert to JavaScript for any functionality 👌 -**Besql**: Dreaming of an offline web application capable of saving data and syncing later? Enter Besql, your solution to incorporating ef core & sqlite in your browser. It's a crucial aid for achieving this objective seamlessly. +***Besql***: Dreaming of an offline web application capable of saving data and syncing later? Enter Besql, your solution to incorporating ef core & sqlite in your browser. It's a crucial aid for achieving this objective seamlessly 🕺 -**Bit Boilerplate Project Template**: If the aforementioned features have piqued your interest, dive into the Bit Boilerplate project template. Experience everything mentioned above along with additional features such as ASP.NET Core Identity integration, multilingualism, and other cool features that empowers you to develop unified Web, Android, iOS, Windows, and macOS apps from a single codebase, while providing seamless integration with native platform features and third-party Java, Kotlin, Swift, Objective-C, and JavaScript libraries. +***Bit Boilerplate Project Template***: If the aforementioned features have piqued your interest, dive into the Bit Boilerplate project template. Experience everything mentioned above along with additional features such as ASP.NET Core Identity integration, multilingualism, and other cool features that empowers you to develop unified Web, Android, iOS, Windows, and macOS apps from a single codebase, while providing seamless integration with native platform features and third-party Java, Kotlin, Swift, Objective-C, and JavaScript libraries 💯 For more details, visit us at [bitplatform.dev](https://bitplatform.dev/). From 318866c9e3955573e7544860c0d80fb9cf810bdc Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Mon, 15 Jan 2024 22:31:30 +0330 Subject: [PATCH 25/39] feat(websites): add samples for Butil Window methods in Platform website #6583 (#6584) --- .../Pages/Butil/Butil04WindowPage.razor | 269 +++++++++++++++++- 1 file changed, 263 insertions(+), 6 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor index c416b612ab..000722627f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor @@ -1,5 +1,6 @@ @page "/butil/window" @inherits AppComponentBase +@inject Bit.Butil.Window window Methods
- AddBeforeUnload, RemoveBeforeUnload: The beforeunload event is fired when the current window, - contained document, and associated resources are about to be unloaded. The main use case for this event is to - trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page + AddBeforeUnload, RemoveBeforeUnload: The beforeunload event is fired when the current window, + contained document, and associated resources are about to be unloaded. The main use case for this event is to + trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data (MDN).

+ AddEventListener, RemoveEventListener: Sets up a function that will be called whenever the specified event is delivered to the window + (MDN). +

+ GetInnerHeight: Gets the height of the content area of the browser window in px including, if rendered, the horizontal scrollbar (MDN).

@@ -60,14 +65,65 @@ GetOrigin: Returns the global object's origin, serialized as a string (MDN).

+ + + + +
+                                @exampleCode1
+                            
+
+ +
+ GetOrigin +
Origin is: @origin
+
+
+
+
+

GetOuterHeight: Gets the height of the outside of the browser window in px (MDN).

+ + + + +
+                                @exampleCode2
+                            
+
+ +
+ GetOuterHeight +
OuterHeight is: @outerHeight
+
+
+
+
+

GetOuterWidth: Gets the width of the outside of the browser window in px (MDN).

+ + + + +
+                                @exampleCode3
+                            
+
+ +
+ GetOuterWidth +
OuterWidth is: @outerWidth
+
+
+
+
+

GetScreenX: Returns the horizontal distance in px from the left border of the user's browser viewport to the left side of the screen (MDN). @@ -85,17 +141,71 @@ (MDN).

+ Btoa: Creates a base-64 encoded ASCII string from a string of binary data + (MDN). +

+ + + + +
+                                @exampleCode4
+                            
+
+ +
+ +
+ EncodeData +
Encoded data is: @btoaText
+
+
+
+
+

+ Atob: Decodes a string of data which has been encoded using base-64 encoding (MDN).

- - Btoa: Creates a base-64 encoded ASCII string from a string of binary data - (MDN). + + + + +
+                                @exampleCode5
+                            
+
+ +
+ +
+ DecodeData +
Decoded text is: @atobText
+
+
+
+


Alert: Displays an alert dialog (MDN).

+ + + + +
+                                @exampleCode6
+                            
+
+ +
+ ShowAlert +
+
+
+
+

Blur: Sets focus away from the window (MDN). @@ -108,6 +218,22 @@ Confirm: Displays a dialog with a message that the user needs to respond to (MDN).

+ + + + +
+                                @exampleCode7
+                            
+
+ +
+ ShowConfirm +
+
+
+
+

Find: Searches for a given string in a window (MDN). @@ -152,3 +278,134 @@
+ +@code { + private string? origin; + + private float outerHeight; + + private float outerWidth; + + private string? btoaText; + private string? btoaValue; + + private string? atobText; + private string? atobValue; + + + private async Task GetOrigin() + { + origin = await window.GetOrigin(); + } + + private async Task GetOuterHeight() + { + outerHeight = await window.GetOuterHeight(); + } + + private async Task GetOuterWidth() + { + outerWidth = await window.GetOuterWidth(); + } + + private async Task EncodeData() + { + btoaText = await window.Btoa(btoaValue!); + } + + private async Task DecodeData() + { + atobText = await window.Atob(atobValue!); + } + + private string exampleCode1 = +@"@inject Bit.Butil.Window window + +GetOrigin + +
Origin is: @origin
+ +@code { + private string? origin; + + private async Task GetOrigin() + { + origin = await window.GetOrigin(); + } +}"; + private string exampleCode2 = +@"@inject Bit.Butil.Window window + +GetOuterHeight + +
OuterHeight is: @outerHeight
+ +@code { + private float outerHeight; + + private async Task GetOuterHeight() + { + outerHeight = await window.GetOuterHeight(); + } +}"; + private string exampleCode3 = +@"@inject Bit.Butil.Window window + +GetOuterWidth + +
OuterWidth is: @outerWidth
+ +@code { + private float outerWidth; + + private async Task GetOuterWidth() + { + outerWidth = await window.GetOuterWidth(); + } +}"; + private string exampleCode4 = +@"@inject Bit.Butil.Window window + + + +EncodeData + +
Encoded data is: @btoaText
+ +@code { + private string? btoaText; + private string? btoaValue; + + private async Task EncodeData() + { + btoaText = await window.Btoa(btoaValue!); + } +}"; + private string exampleCode5 = +@"@inject Bit.Butil.Window window + + + +DecodeData + +
Decoded data is: @atobText
+ +@code { + private string? atobText; + private string? atobValue; + + private async Task DecodeData() + { + atobText = await window.Atob(atobValue!); + } +}"; + private string exampleCode6 = +@"@inject Bit.Butil.Window window + + window.Alert(""Alert from C#""))"">ShowAlert"; + private string exampleCode7 = +@"@inject Bit.Butil.Window window + + window.Confirm(""Confirm from C#""))"">ShowConfirm"; + +} \ No newline at end of file From 1fcb3a069d3ae19c1bc0b4cb25ec33491c4f754d Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Mon, 15 Jan 2024 23:36:25 +0330 Subject: [PATCH 26/39] feat(websites): add samples of Document class of Butil to the docs of the Platform website #6585 (#6586) --- .../Pages/Butil/Butil05DocumentPage.razor | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor index 24bf9fd142..6a01e9b6a5 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil05DocumentPage.razor @@ -1,5 +1,6 @@ @page "/butil/document" @inherits AppComponentBase +@inject Bit.Butil.Document document SetDesignMode, GetDesignMode: Gets/Sets ability to edit the whole document (MDN).

+ + + + +
+                                @exampleCode1
+                            
+
+ +
+ +
+ SetDesignMode +
+
+
+
+

- SetDir, GetDir: Gets/Sets directionality (rtl/ltr) of the document + SetDir, GetDir: Gets/Sets directionality (Rtl/Ltr) of the document (MDN).

@@ -81,3 +100,28 @@ + +@code { + private bool isDesignModeOn; + + private async Task SetDesignMode() + { + await document.SetDesignMode(isDesignModeOn ? DesignMode.On : DesignMode.Off); + } + + private string exampleCode1 = +@"@inject Bit.Butil.Document document + + + +SetDesignMode + +@code { + private bool isDesignModeOn; + + private async Task SetDesignMode() + { + await document.SetDesignMode(isDesignModeOn ? DesignMode.On : DesignMode.Off); + } +}"; +} From d0b6ac576bd7145a6960cd60dbb7aea76e1d88e3 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Tue, 16 Jan 2024 13:48:36 +0330 Subject: [PATCH 27/39] feat(websites): add samples for Butil Keyboard methods in Platform website #6587 (#6588) --- .../Pages/Butil/Butil06KeyboardPage.razor | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor index 8ed3588aa3..63c1f247cf 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor @@ -1,5 +1,6 @@ @page "/butil/keyboard" @inherits AppComponentBase +@inject Bit.Butil.Keyboard keyboard Methods
- Add: Adds a handler to a keyboard key combination. + Add, Remove: Adds/Removes a handler to a keyboard key combination.

- Remove: Removes a handler from a keyboard key combination. + + + + +
+                                @exampleCode1
+                            
+
+ +
+
Press Ctrl+F to focus on search box
+
+ +
+
+
+
+
+ +@code { + private BitSearchBox searchBox = default!; + + protected override async Task OnInitAsync() + { + await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + } + + private string exampleCode1 = +@"@inject Bit.Butil.Document document + +
Press Ctrl+F to focus on search box
+ + + +@code { + private BitSearchBox searchBox = default!; + + protected override async Task OnInitAsync() + { + await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + } +}"; +} \ No newline at end of file From d72e8d0d55ad6c95c6251b0bcf36c7fd718b657f Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Tue, 16 Jan 2024 14:57:01 +0330 Subject: [PATCH 28/39] feat(websites): add samples for Butil Console methods in Platform website #6589 (#6590) --- .../Pages/Butil/Butil07ConsolePage.razor | 702 +++++++++++++++++- 1 file changed, 690 insertions(+), 12 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor index 62115e8495..463d0c2911 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil07ConsolePage.razor @@ -1,5 +1,6 @@ @page "/butil/console" @inherits AppComponentBase +@inject Bit.Butil.Console console @@ -34,91 +35,768 @@ Assert: Log a message and stack trace to console if the first argument is false (MDN).

- - Clear: Clear the console - (MDN). + + + + +
+                                @exampleCode1
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Assert +
+
+
+
+


Count: Log the number of times this line has been called with the given label (MDN).

+ + + + +
+                                @exampleCode2
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Count +
+
+
+
+
+

CountReset: Resets the value of the counter with the given label (MDN).

+ + + + +
+                                @exampleCode3
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ CountReset +
+
+
+
+
+

Debug: Outputs a message to the console with the log level debug (MDN).

+ + + + +
+                                @exampleCode4
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Debug +
+
+
+
+
+

Dir: Displays an interactive listing of the properties of a specified JavaScript object (MDN).

+ + + + +
+                                @exampleCode5
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Dir +
+
+
+
+
+

Dirxml: Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not possible (MDN).

+ + + + +
+                                @exampleCode6
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Dirxml +
+
+
+
+
+

Error: Outputs an error message. You may use string substitution and additional arguments with this method (MDN).

+ + + + +
+                                @exampleCode7
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Error +
+
+
+
+
+

Group: Creates a new inline group, indenting all following output by another level. To move back out a level, call console.groupEnd() (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Create group logs +
+
+
+
+
+

GroupCollapsed: Creates a new inline group, indenting all following output by another level. However, unlike console.group() this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call console.groupEnd() (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Create group logs +
+
+
+
+
+

GroupEnd: Exits the current inline group (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Create group logs +
+
+
+
+
+

Info: Informative logging of information. You may use string substitution and additional arguments with this method (MDN).

+ + + + +
+                                @exampleCode9
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Info +
+
+
+
+
+

Log: For general output of logging information. You may use string substitution and additional arguments with this method (MDN).

+ + + + +
+                                @exampleCode10
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Log +
+
+
+
+
+

- Log: For general output of logging information. You may use string substitution and additional arguments with this method - (MDN). + Warn: Outputs a warning message + (MDN). +

+ + + + +
+                                @exampleCode11
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Warn +
+
+
+
+
+

+ + Table: Displays tabular data as a table + (MDN). +

+ + + + +
+                                @exampleCode12
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Table +
+
+
+
+


Profile: Starts the browser's built-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile (MDN).

+ + + + +
+                                @exampleCode13
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Profile +
+
+
+
+
+

ProfileEnd: Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool) (MDN).

+ + + + +
+                                @exampleCode14
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ ProfileEnd +
+
+
+
+
+

Time: Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page (MDN).

- - TimeEnd: Stops the specified timer and logs the elapsed time in milliseconds since it started - (MDN). + + + + +
+                                @exampleCode15
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Time +
+
+
+
+


TimeLog: Logs the value of the specified timer to the console (MDN).

+ + + + +
+                                @exampleCode16
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ TimeLog +
+
+
+
+
+

+ + TimeEnd: Stops the specified timer and logs the elapsed time in milliseconds since it started + (MDN). +

+ + + + +
+                                @exampleCode17
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ TimeEnd +
+
+
+
+
+

TimeStamp: Adds a marker to the browser performance tool's timeline (MDN).

+ + + + +
+                                @exampleCode18
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ TimeStamp +
+
+
+
+
+

Trace: Outputs a stack trace (MDN).

+ + + + +
+                                @exampleCode19
+                            
+
+ +
+ +
+
Open the DevTools console and start clicking on the button
+
+ Trace +
+
+
+
+
+

- Warn: Outputs a warning message - (MDN). + Clear: Clear the console + (MDN). +

+ + + + +
+                                @exampleCode20
+                            
+
+ +
+
Open the DevTools console and start clicking on the button
+
+ Clear +
+
+
+
+
+ +@code { + private string value = "Test"; + + private async Task CreateGroupLogs() + { + await console.Log("This is the outer level"); + await console.Group(); + await console.Log("Level 2"); + await console.Group(); + await console.Log("Level 3"); + await console.Warn("More of level 3"); + await console.GroupCollapsed(); + await console.Log("Back to level 2"); + await console.GroupEnd(); + await console.Log("Back to the outer level"); + } + + private string exampleCode1 = +@"@inject Bit.Butil.Console console + + + + console.Assert(false, ""This is a test assert:"", value))"">Assert + +@code { + private string value = ""Test""; +}"; + private string exampleCode2 = +@"@inject Bit.Butil.Console console + + + + console.Count(value))"">Count + +@code { + private string value = ""Test""; +}"; + private string exampleCode3 = +@"@inject Bit.Butil.Console console + + + + console.CountReset(value))"">CountReset + +@code { + private string value = ""Test""; +}"; + private string exampleCode4 = +@"@inject Bit.Butil.Console console + + + + console.Debug(value))"">Debug + +@code { + private string value = ""Test""; +}"; + private string exampleCode5 = +@"@inject Bit.Butil.Console console + + + + console.Dir(value))"">Dir + +@code { + private string value = ""Test""; +}"; + private string exampleCode6 = +@"@inject Bit.Butil.Console console + + + + console.Dirxml(value))"">Dirxml + +@code { + private string value = ""Test""; +}"; + private string exampleCode7 = +@"@inject Bit.Butil.Console console + + + + console.Error(""This is a test error:"", value))"">Error + +@code { + private string value = ""Test""; +}"; + private string exampleCode8 = +@"@inject Bit.Butil.Console console + +Create group logs + +@code { + private async Task CreateGroupLogs() + { + await console.Log(""This is the outer level""); + await console.Group(); + await console.Log(""Level 2""); + await console.Group(); + await console.Log(""Level 3""); + await console.Warn(""More of level 3""); + await console.GroupCollapsed(); + await console.Log(""Back to level 2""); + await console.GroupEnd(); + await console.Log(""Back to the outer level""); + } +}"; + private string exampleCode9 = +@"@inject Bit.Butil.Console console + + + + console.Info(""This is a test info:"", value))"">Info + +@code { + private string value = ""Test""; +}"; + private string exampleCode10 = +@"@inject Bit.Butil.Console console + + + + console.Log(""This is a test log:"", value))"">Log + +@code { + private string value = ""Test""; +}"; + private string exampleCode11 = +@"@inject Bit.Butil.Console console + + + + console.Warn(""This is a test warn:"", value))"">Warn + +@code { + private string value = ""Test""; +}"; + private string exampleCode12 = +@"@inject Bit.Butil.Console console + + + + console.Table(new {Name = ""Value"", Value = value }))"">Table + +@code { + private string value = ""Test""; +}"; + private string exampleCode13 = +@"@inject Bit.Butil.Console console + + + + console.Profile(value))"">Profile + +@code { + private string value = ""Test""; +}"; + private string exampleCode14 = +@"@inject Bit.Butil.Console console + + + + console.ProfileEnd(value))"">ProfileEnd + +@code { + private string value = ""Test""; +}"; + private string exampleCode15 = +@"@inject Bit.Butil.Console console + + + + console.Time(value))"">Time + +@code { + private string value = ""Test""; +}"; + private string exampleCode16 = +@"@inject Bit.Butil.Console console + + + + console.TimeLog(value))"">TimeLog + +@code { + private string value = ""Test""; +}"; + private string exampleCode17 = +@"@inject Bit.Butil.Console console + + + + console.TimeEnd(value))"">TimeEnd + +@code { + private string value = ""Test""; +}"; + private string exampleCode18 = +@"@inject Bit.Butil.Console console + + + + console.TimeStamp(value))"">TimeStamp + +@code { + private string value = ""Test""; +}"; + private string exampleCode19 = +@"@inject Bit.Butil.Console console + + + + console.Trace(value))"">Trace + +@code { + private string value = ""Test""; +}"; + private string exampleCode20 = +@"@inject Bit.Butil.Console console + + console.Clear(value))"">Clear"; +} \ No newline at end of file From 59c42e4bdfa2f64f6a196e13c41bfd59f958fd53 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Tue, 16 Jan 2024 16:13:52 +0330 Subject: [PATCH 29/39] feat(websites): improve Window docs of the Butil in the Platform website #6593 (#6594) --- .../Pages/Butil/Butil04WindowPage.razor | 312 +++++++----------- .../Pages/Butil/Butil04WindowPage.razor.cs | 134 ++++++++ 2 files changed, 257 insertions(+), 189 deletions(-) create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor index 000722627f..2493b0b19f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor @@ -30,39 +30,82 @@
Methods +
- AddBeforeUnload, RemoveBeforeUnload: The beforeunload event is fired when the current window, + AddBeforeUnload, RemoveBeforeUnload:
+ The beforeunload event is fired when the current window, contained document, and associated resources are about to be unloaded. The main use case for this event is to trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data (MDN). -

+


- AddEventListener, RemoveEventListener: Sets up a function that will be called whenever the specified event is delivered to the window + AddEventListener, RemoveEventListener:
+ Sets up a function that will be called whenever the specified event is delivered to the window (MDN). -

+


- GetInnerHeight: Gets the height of the content area of the browser window in px including, if rendered, the horizontal scrollbar + GetInnerHeight:
+ Gets the height of the content area of the browser window in px including, if rendered, the horizontal scrollbar (MDN).

+ + + + +
+                                @getOriginExampleCode
+                            
+
+ +
+ GetInnerHeight +
InnerHeight is: @innerHeight
+
+
+
+
+

- GetInnerWidth: Gets the width of the content area of the browser window in px including, if rendered, the vertical scrollbar + GetInnerWidth:
+ Gets the width of the content area of the browser window in px including, if rendered, the vertical scrollbar (MDN).

+ + + + +
+                                @getOriginExampleCode
+                            
+
+ +
+ GetInnerWidth +
InnerWidth is: @innerWidth
+
+
+
+
+

- IsSecureContext: Returns a boolean indicating whether the current context is secure (true) or not (false) + IsSecureContext:
+ Returns a boolean indicating whether the current context is secure (true) or not (false) (MDN). -

+


- GetLocationBar: Returns the locationbar object. For privacy and interoperability reasons, the value of the visible property is now false if this Window is a popup, and true otherwise + GetLocationBar:
+ Returns the locationbar object. For privacy and interoperability reasons, the value of the visible property is now false if this Window is a popup, and true otherwise (MDN). -

+


- SetName, GetName: Gets/Sets the name of the window's browsing context + SetName, GetName:
+ Gets/Sets the name of the window's browsing context (MDN). -

+


- GetOrigin: Returns the global object's origin, serialized as a string + GetOrigin:
+ Returns the global object's origin, serialized as a string (MDN).

@@ -70,7 +113,7 @@
-                                @exampleCode1
+                                @getOriginExampleCode
                             
@@ -83,7 +126,8 @@


- GetOuterHeight: Gets the height of the outside of the browser window in px + GetOuterHeight:
+ Gets the height of the outside of the browser window in px (MDN).

@@ -91,7 +135,7 @@
-                                @exampleCode2
+                                @getOuterHeightExampleCode
                             
@@ -104,7 +148,8 @@


- GetOuterWidth: Gets the width of the outside of the browser window in px + GetOuterWidth:
+ Gets the width of the outside of the browser window in px (MDN).

@@ -112,7 +157,7 @@
-                                @exampleCode3
+                                @getOuterWidthExampleCode
                             
@@ -125,23 +170,28 @@


- GetScreenX: Returns the horizontal distance in px from the left border of the user's browser viewport to the left side of the screen + GetScreenX:
+ Returns the horizontal distance in px from the left border of the user's browser viewport to the left side of the screen (MDN). -

+


- GetScreenY: Returns the vertical distance in px from the top border of the user's browser viewport to the top side of the screen + GetScreenY:
+ Returns the vertical distance in px from the top border of the user's browser viewport to the top side of the screen (MDN). -

+


- GetScrollX: Returns the number of pixels that the document has already been scrolled horizontally + GetScrollX:
+ Returns the number of pixels that the document has already been scrolled horizontally (MDN). -

+


- GetScrollY: Returns the number of pixels that the document has already been scrolled vertically + GetScrollY:
+ Returns the number of pixels that the document has already been scrolled vertically (MDN). -

+


- Btoa: Creates a base-64 encoded ASCII string from a string of binary data + Btoa:
+ Creates a base-64 encoded ASCII string from a string of binary data (MDN).

@@ -149,7 +199,7 @@
-                                @exampleCode4
+                                @btoaExampleCode
                             
@@ -164,7 +214,8 @@


- Atob: Decodes a string of data which has been encoded using base-64 encoding + Atob:
+ Decodes a string of data which has been encoded using base-64 encoding (MDN).

@@ -172,7 +223,7 @@
-                                @exampleCode5
+                                @atobExampleCode
                             
@@ -187,7 +238,8 @@


- Alert: Displays an alert dialog + Alert:
+ Displays an alert dialog (MDN).

@@ -195,7 +247,7 @@
-                                @exampleCode6
+                                @alertExampleCode
                             
@@ -207,15 +259,18 @@


- Blur: Sets focus away from the window + Blur:
+ Sets focus away from the window (MDN). -

+


- Close: Closes the current window + Close:
+ Closes the current window (MDN). -

+


- Confirm: Displays a dialog with a message that the user needs to respond to + Confirm:
+ Displays a dialog with a message that the user needs to respond to (MDN).

@@ -223,7 +278,7 @@
-                                @exampleCode7
+                                @confirmExampleCode
                             
@@ -235,177 +290,56 @@


- Find: Searches for a given string in a window + Find:
+ Searches for a given string in a window (MDN). -

+


- Focus: Sets focus on the current window + Focus:
+ Sets focus on the current window (MDN). -

+


- GetSelection: Returns the selection text representing the selected item(s) + GetSelection:
+ Returns the selection text representing the selected item(s) (MDN). -

+


- MatchMedia: Returns a MediaQueryList object representing the specified media query string + MatchMedia:
+ Returns a MediaQueryList object representing the specified media query string (MDN). -

+


- Open: Opens a new window + Open:
+ Opens a new window (MDN). -

+


- Print: Opens the Print Dialog to print the current document + Print:
+ Opens the Print Dialog to print the current document (MDN). -

+


- Prompt: Returns the text entered by the user in a prompt dialog + Prompt:
+ Returns the text entered by the user in a prompt dialog (MDN). -

+


- Scroll: Scrolls the window to a particular place in the document + Scroll:
+ Scrolls the window to a particular place in the document (MDN). -

+


- ScrollBy: Scrolls the document in the window by the given amount + ScrollBy:
+ Scrolls the document in the window by the given amount (MDN). -

+


- Stop: This method stops window loading + Stop:
+ This method stops window loading (MDN).
- - -@code { - private string? origin; - - private float outerHeight; - - private float outerWidth; - - private string? btoaText; - private string? btoaValue; - - private string? atobText; - private string? atobValue; - - - private async Task GetOrigin() - { - origin = await window.GetOrigin(); - } - - private async Task GetOuterHeight() - { - outerHeight = await window.GetOuterHeight(); - } - - private async Task GetOuterWidth() - { - outerWidth = await window.GetOuterWidth(); - } - - private async Task EncodeData() - { - btoaText = await window.Btoa(btoaValue!); - } - - private async Task DecodeData() - { - atobText = await window.Atob(atobValue!); - } - - private string exampleCode1 = -@"@inject Bit.Butil.Window window - -GetOrigin - -
Origin is: @origin
- -@code { - private string? origin; - - private async Task GetOrigin() - { - origin = await window.GetOrigin(); - } -}"; - private string exampleCode2 = -@"@inject Bit.Butil.Window window - -GetOuterHeight - -
OuterHeight is: @outerHeight
- -@code { - private float outerHeight; - - private async Task GetOuterHeight() - { - outerHeight = await window.GetOuterHeight(); - } -}"; - private string exampleCode3 = -@"@inject Bit.Butil.Window window - -GetOuterWidth - -
OuterWidth is: @outerWidth
- -@code { - private float outerWidth; - - private async Task GetOuterWidth() - { - outerWidth = await window.GetOuterWidth(); - } -}"; - private string exampleCode4 = -@"@inject Bit.Butil.Window window - - - -EncodeData - -
Encoded data is: @btoaText
- -@code { - private string? btoaText; - private string? btoaValue; - - private async Task EncodeData() - { - btoaText = await window.Btoa(btoaValue!); - } -}"; - private string exampleCode5 = -@"@inject Bit.Butil.Window window - - - -DecodeData - -
Decoded data is: @atobText
- -@code { - private string? atobText; - private string? atobValue; - - private async Task DecodeData() - { - atobText = await window.Atob(atobValue!); - } -}"; - private string exampleCode6 = -@"@inject Bit.Butil.Window window - - window.Alert(""Alert from C#""))"">ShowAlert"; - private string exampleCode7 = -@"@inject Bit.Butil.Window window - - window.Confirm(""Confirm from C#""))"">ShowConfirm"; - -} \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs new file mode 100644 index 0000000000..3be43aa0d9 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil04WindowPage.razor.cs @@ -0,0 +1,134 @@ +namespace Bit.Websites.Platform.Client.Pages.Butil; + +public partial class Butil04WindowPage +{ + private float innerHeight; + + private float innerWidth; + + private string? origin; + + private float outerHeight; + + private float outerWidth; + + private string? btoaText; + private string? btoaValue; + + private string? atobText; + private string? atobValue; + + + private async Task GetInnerHeight() => innerHeight = await window.GetInnerHeight(); + + private async Task GetInnerWidth() => innerWidth = await window.GetInnerWidth(); + + private async Task GetOrigin() => origin = await window.GetOrigin(); + + private async Task GetOuterHeight() => outerHeight = await window.GetOuterHeight(); + + private async Task GetOuterWidth() => outerWidth = await window.GetOuterWidth(); + + private async Task EncodeData() => btoaText = await window.Btoa(btoaValue!); + + private async Task DecodeData() => atobText = await window.Atob(atobValue!); + + private string getInnerHeightExampleCode = + @"@inject Bit.Butil.Window window + +GetInnerHeight + +
InnerHeight is: @innerHeight
+ +@code { + private string? innerHeight; + + private async Task GetInnerHeight() => innerHeight = await window.GetInnerHeight(); +}"; + private string getInnerWidthExampleCode = +@"@inject Bit.Butil.Window window + +GetInnerWidth + +
InnerWidth is: @innerWidth
+ +@code { + private string? innerWidth; + + private async Task GetInnerWidth() => innerWidth = await window.GetInnerWidth(); +}"; + private string getOriginExampleCode = + @"@inject Bit.Butil.Window window + +GetOrigin + +
Origin is: @origin
+ +@code { + private string? origin; + + private async Task GetOrigin() => origin = await window.GetOrigin(); +}"; + private string getOuterHeightExampleCode = + @"@inject Bit.Butil.Window window + +GetOuterHeight + +
OuterHeight is: @outerHeight
+ +@code { + private float outerHeight; + + private async Task GetOuterHeight() => outerHeight = await window.GetOuterHeight(); +}"; + private string getOuterWidthExampleCode = + @"@inject Bit.Butil.Window window + +GetOuterWidth + +
OuterWidth is: @outerWidth
+ +@code { + private float outerWidth; + + private async Task GetOuterWidth() => outerWidth = await window.GetOuterWidth(); +}"; + private string btoaExampleCode = + @"@inject Bit.Butil.Window window + + + +EncodeData + +
Encoded data is: @btoaText
+ +@code { + private string? btoaText; + private string? btoaValue; + + private async Task EncodeData() => btoaText = await window.Btoa(btoaValue!); +}"; + private string atobExampleCode = + @"@inject Bit.Butil.Window window + + + +DecodeData + +
Decoded data is: @atobText
+ +@code { + private string? atobText; + private string? atobValue; + + private async Task DecodeData() => atobText = await window.Atob(atobValue!); +}"; + private string alertExampleCode = + @"@inject Bit.Butil.Window window + + window.Alert(""Alert from C#""))"">ShowAlert"; + private string confirmExampleCode = + @"@inject Bit.Butil.Window window + + window.Confirm(""Confirm from C#""))"">ShowConfirm"; +} From 196eeb82ce0a1b1100f3bd565a3f4adff5778304 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Tue, 16 Jan 2024 16:51:39 +0330 Subject: [PATCH 30/39] feat(websites): improve docs overview of the Platform website #6595 (#6596) --- .../Pages/Besql/Besql01OverviewPage.razor | 5 + .../Pages/Bswup/Bswup01OverviewPage.razor | 5 + .../Pages/Butil/Butil01OverviewPage.razor | 5 + .../Templates/Templates01OverviewPage.razor | 69 ++----- .../Templates01OverviewPage.razor.scss | 178 +---------------- .../Templates/Templates02SamplesPage.razor | 72 +++++++ .../Templates02SamplesPage.razor.scss | 188 ++++++++++++++++++ ...lates03DevelopmentPrerequisitesPage.razor} | 0 ...03DevelopmentPrerequisitesPage.razor.scss} | 0 ...zor => Templates04CreateProjectPage.razor} | 0 ...> Templates04CreateProjectPage.razor.scss} | 0 ... => Templates05ProjectStructurePage.razor} | 0 ...emplates05ProjectStructurePage.razor.scss} | 0 ...ge.razor => Templates06DatabasePage.razor} | 0 ...css => Templates06DatabasePage.razor.scss} | 0 ...RunPage.razor => Templates07RunPage.razor} | 0 ...zor.scss => Templates07RunPage.razor.scss} | 0 ...e.razor => Templates08AppModelsPage.razor} | 0 ...ss => Templates08AppModelsPage.razor.scss} | 0 ...or => Templates09DeploymentTypePage.razor} | 0 ... Templates09DeploymentTypePage.razor.scss} | 0 ...or => Templates10CacheMechanismPage.razor} | 0 ... Templates10CacheMechanismPage.razor.scss} | 0 ...Page.razor => Templates11DevOpsPage.razor} | 0 ....scss => Templates11DevOpsPage.razor.scss} | 0 ... Templates12PlatformIntegrationPage.razor} | 0 ...lates12PlatformIntegrationPage.razor.scss} | 0 ...ge.razor => Templates13SettingsPage.razor} | 0 ...css => Templates13SettingsPage.razor.scss} | 0 ...=> Templates14ExceptionHandlingPage.razor} | 0 ...mplates14ExceptionHandlingPage.razor.scss} | 0 ...r => Templates15MultilingualismPage.razor} | 0 ...Templates15MultilingualismPage.razor.scss} | 0 .../Shared/MainLayout.razor.cs | 1 + .../compilerconfig.json | 57 +++--- 35 files changed, 329 insertions(+), 251 deletions(-) create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor create mode 100644 src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates02DevelopmentPrerequisitesPage.razor => Templates03DevelopmentPrerequisitesPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates02DevelopmentPrerequisitesPage.razor.scss => Templates03DevelopmentPrerequisitesPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates03CreateProjectPage.razor => Templates04CreateProjectPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates03CreateProjectPage.razor.scss => Templates04CreateProjectPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates04ProjectStructurePage.razor => Templates05ProjectStructurePage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates04ProjectStructurePage.razor.scss => Templates05ProjectStructurePage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates05DatabasePage.razor => Templates06DatabasePage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates05DatabasePage.razor.scss => Templates06DatabasePage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates06RunPage.razor => Templates07RunPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates06RunPage.razor.scss => Templates07RunPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates07AppModelsPage.razor => Templates08AppModelsPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates07AppModelsPage.razor.scss => Templates08AppModelsPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates08DeploymentTypePage.razor => Templates09DeploymentTypePage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates08DeploymentTypePage.razor.scss => Templates09DeploymentTypePage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates09CacheMechanismPage.razor => Templates10CacheMechanismPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates09CacheMechanismPage.razor.scss => Templates10CacheMechanismPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates10DevOpsPage.razor => Templates11DevOpsPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates10DevOpsPage.razor.scss => Templates11DevOpsPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates11PlatformIntegrationPage.razor => Templates12PlatformIntegrationPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates11PlatformIntegrationPage.razor.scss => Templates12PlatformIntegrationPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates12SettingsPage.razor => Templates13SettingsPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates12SettingsPage.razor.scss => Templates13SettingsPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates13ExceptionHandlingPage.razor => Templates14ExceptionHandlingPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates13ExceptionHandlingPage.razor.scss => Templates14ExceptionHandlingPage.razor.scss} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates14MultilingualismPage.razor => Templates15MultilingualismPage.razor} (100%) rename src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/{Templates14MultilingualismPage.razor.scss => Templates15MultilingualismPage.razor.scss} (100%) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor index 7cf3a6aa9d..06c50573b3 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Besql/Besql01OverviewPage.razor @@ -11,6 +11,11 @@ Blazor Entity Framework Sqlite utilities + Dreaming of an offline web application capable of saving data and syncing later? +
+ Enter Besql, your solution to incorporating EF core & sqlite in your browser. + It's a crucial aid for achieving this objective seamlessly. +
bit Besql facilitates the use of Entity Framework and sqlite in web browsers with Blazor WebAssembly.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor index df7fc7e6a5..ebf8cd1d09 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Bswup/Bswup01OverviewPage.razor @@ -15,8 +15,13 @@ Service Worker when building PWAs with Blazor. It utilizes the Service Worker's events to handle Installing and Updating the app as fast and smooth as possible while minimizing the download size. +
+ This unique tool harnesses the power of Progressive Web Apps (PWA) within the innovative + new structure of dotnet 8. By amalgamating pre-rendering techniques reminiscent of renowned + platforms like GitHub, Reddit, and Facebook, Bswup ensures an exceptional user experience. +
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor index 64e64354ff..0783b9a10e 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil01OverviewPage.razor @@ -11,6 +11,11 @@ Blazor Utilities for JavaScript + Embracing Blazor because of your love for C#? +
+ Butil enables you to stay true to that sentiment by providing essential Browser APIs in C#, + eliminating the need to revert to JavaScript for any functionality. +
bit Butil helps C# developers to access the browser APIs that are only accessible through JavaScript in C#.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor index 46c821618c..9756785d14 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor @@ -14,64 +14,33 @@ bit Boilerplate + If our efforts in providing modern tooling have piqued your interest, dive into the Bit Boilerplate project template. +
+ Experience all of our tools along with additional features such as ASP.NET Core Identity integration, + multilingualism, and other cool features that empowers you to develop unified Web, Android, iOS, Windows, + and macOS apps from a single codebase, while providing seamless integration with native platform features + and third-party Java, Kotlin, Swift, Objective-C, and JavaScript libraries. +

bit Boilerplate is a feature-rich project template for both Visual studio and the .NET CLI. It comes with a lot of features right out of the box that are required for a real world application. - Two distinct samples that further explain the features in action are included in the project template. +

+ Watch our YouTube playlist to get more familiar with bit Boilerplate project template + + here + :
-
-
-
- - AdminPanel sample -
-
- - - The AdminPanel sample is a project powered by bit Boilerplate that includes all the necessary parts to create a fully-featured cross-platform admin/management website/app. - -
+

- +
+
-
-

- Todo sample -
-
- - - The Todo sample is a project powered by Boilerplate that includes work packages and actions that you can apply to various cross-platform projects. - -
- - -
- + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss index df16fd7d31..8e7839faad 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates01OverviewPage.razor.scss @@ -5,184 +5,12 @@ .page-container { @include PageContainer; -} - -.page-flex-container { - width: 100%; display: flex; - flex-flow: row wrap; - box-sizing: border-box; -} - -.page-content-container { - margin: 0; - flex-grow: 0; - max-width: 66%; - flex-basis: 66%; - flex-direction: row; - box-sizing: border-box; - - &:last-child { - max-width: 34%; - flex-basis: 34%; - padding-left: rem2(48px); - } - - @include lt-xl { - flex-grow: 0; - max-width: 100%; - flex-basis: 100%; - - &:last-child { - padding-left: 0; - max-width: 100%; - flex-basis: 100%; - padding-top: rem2(32px); - } - } -} - -.image-container { - position: relative; - padding: 50% 0 0 0; - margin-bottom: 1rem; - - .template-img { - top: 0; - width: 100%; - height: 100%; - color: #f5f5f5; - display: block; - position: absolute; - border-radius: rem2(8px); - background-color: #f5f5f5; - box-shadow: $bit-box-shadow-callout; - } - - .demo-btn-shadow { - top: 0; - left: 0; - right: 0; - bottom: 0; - opacity: 0; - display: flex; - position: absolute; - align-items: center; - justify-content: center; - border-radius: rem2(8px); - background-color: rgba(25, 118, 210, 0.6); - transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; - } - - .demo-btn { - border: 0; - margin: 0; - outline: 0; - cursor: pointer; - font-weight: 500; - line-height: 1.2; - position: relative; - align-items: center; - display: inline-flex; - min-width: rem2(64px); - font-size: rem2(16px); - text-decoration: none; - box-sizing: border-box; - border-radius: rem2(4px); - justify-content: center; - padding: rem2(12px) rem2(16px); - transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; - color: $White; - background-color: #1976d2; - - &:hover { - background-color: #0052cc; - } - } - - &:hover { - .demo-btn-shadow { - opacity: 1; - } - } -} - -.primary-btn { - border: 0; - outline: 0; - width: 100%; - cursor: pointer; - font-weight: 600; - line-height: 1.2; - position: relative; - align-items: center; - font-size: rem2(16px); - min-width: rem2(64px); - display: inline-flex; - text-decoration: none; - justify-content: center; - border-radius: rem2(4px); - margin-bottom: rem2(8px); - padding: rem2(12px) rem2(16px); - color: $White; - background-color: $B6Color; - - &:hover { - background-color: #0052cc; - } + flex-flow: column; } -.secondary-btn { - outline: 0; +.video-container { width: 100%; - cursor: pointer; - font-weight: 600; - line-height: 1.2; - position: relative; - align-items: center; - display: inline-flex; - font-size: rem2(16px); - min-width: rem2(64px); - text-decoration: none; - box-sizing: border-box; - border-radius: rem2(4px); - margin-bottom: rem2(8px); + display: flex; justify-content: center; - padding: rem2(12px) rem2(16px); - border: rem2(1px) solid #bdbdbd; - color: #1976d2; - background-color: $White; - - &:hover { - background-color: #eee; - } -} - -.btn-img { - width: rem2(18px); - height: rem2(18px); - margin-right: rem2(8px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; -} - -.google-play { - background-image: url('/images/templates/google-play.svg'); -} - -.apple-store { - background-image: url('/images/templates/apple-store.svg'); -} - -.nuget { - background-image: url('/images/templates/nuget.svg'); -} - -.figma { - background-image: url('/images/templates/figma.svg'); -} - -::deep a { - color: $bit-color-primary-main; } diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor new file mode 100644 index 0000000000..d0e4f94d68 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor @@ -0,0 +1,72 @@ +@page "/templates/samples" +@inherits AppComponentBase + + + +
+ Boilerplate Samples + + + We published a few apps using our own bit Boilerplate project template in different platforms. +
+ Two distinct samples that further explain the features in action are included in the project template: +
+ +
+
+
+ + AdminPanel sample +
+
+ + + The AdminPanel sample is a project powered by bit Boilerplate that includes all the necessary parts to create a fully-featured cross-platform admin/management website/app. + +
+ + +
+ +
+
+
+ + Todo sample +
+
+ + + The Todo sample is a project powered by Boilerplate that includes work packages and actions that you can apply to various cross-platform projects. + +
+ + +
+
+ + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss new file mode 100644 index 0000000000..df16fd7d31 --- /dev/null +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02SamplesPage.razor.scss @@ -0,0 +1,188 @@ +@import '../../Styles/abstracts/_colors.scss'; +@import '../../Styles/abstracts/_mixins.scss'; +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; + +.page-container { + @include PageContainer; +} + +.page-flex-container { + width: 100%; + display: flex; + flex-flow: row wrap; + box-sizing: border-box; +} + +.page-content-container { + margin: 0; + flex-grow: 0; + max-width: 66%; + flex-basis: 66%; + flex-direction: row; + box-sizing: border-box; + + &:last-child { + max-width: 34%; + flex-basis: 34%; + padding-left: rem2(48px); + } + + @include lt-xl { + flex-grow: 0; + max-width: 100%; + flex-basis: 100%; + + &:last-child { + padding-left: 0; + max-width: 100%; + flex-basis: 100%; + padding-top: rem2(32px); + } + } +} + +.image-container { + position: relative; + padding: 50% 0 0 0; + margin-bottom: 1rem; + + .template-img { + top: 0; + width: 100%; + height: 100%; + color: #f5f5f5; + display: block; + position: absolute; + border-radius: rem2(8px); + background-color: #f5f5f5; + box-shadow: $bit-box-shadow-callout; + } + + .demo-btn-shadow { + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0; + display: flex; + position: absolute; + align-items: center; + justify-content: center; + border-radius: rem2(8px); + background-color: rgba(25, 118, 210, 0.6); + transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; + } + + .demo-btn { + border: 0; + margin: 0; + outline: 0; + cursor: pointer; + font-weight: 500; + line-height: 1.2; + position: relative; + align-items: center; + display: inline-flex; + min-width: rem2(64px); + font-size: rem2(16px); + text-decoration: none; + box-sizing: border-box; + border-radius: rem2(4px); + justify-content: center; + padding: rem2(12px) rem2(16px); + transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; + color: $White; + background-color: #1976d2; + + &:hover { + background-color: #0052cc; + } + } + + &:hover { + .demo-btn-shadow { + opacity: 1; + } + } +} + +.primary-btn { + border: 0; + outline: 0; + width: 100%; + cursor: pointer; + font-weight: 600; + line-height: 1.2; + position: relative; + align-items: center; + font-size: rem2(16px); + min-width: rem2(64px); + display: inline-flex; + text-decoration: none; + justify-content: center; + border-radius: rem2(4px); + margin-bottom: rem2(8px); + padding: rem2(12px) rem2(16px); + color: $White; + background-color: $B6Color; + + &:hover { + background-color: #0052cc; + } +} + +.secondary-btn { + outline: 0; + width: 100%; + cursor: pointer; + font-weight: 600; + line-height: 1.2; + position: relative; + align-items: center; + display: inline-flex; + font-size: rem2(16px); + min-width: rem2(64px); + text-decoration: none; + box-sizing: border-box; + border-radius: rem2(4px); + margin-bottom: rem2(8px); + justify-content: center; + padding: rem2(12px) rem2(16px); + border: rem2(1px) solid #bdbdbd; + color: #1976d2; + background-color: $White; + + &:hover { + background-color: #eee; + } +} + +.btn-img { + width: rem2(18px); + height: rem2(18px); + margin-right: rem2(8px); + background-size: contain; + background-position: center; + background-repeat: no-repeat; +} + +.google-play { + background-image: url('/images/templates/google-play.svg'); +} + +.apple-store { + background-image: url('/images/templates/apple-store.svg'); +} + +.nuget { + background-image: url('/images/templates/nuget.svg'); +} + +.figma { + background-image: url('/images/templates/figma.svg'); +} + +::deep a { + color: $bit-color-primary-main; +} diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates03CreateProjectPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04ProjectStructurePage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05ProjectStructurePage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05DatabasePage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06DatabasePage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07RunPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates07AppModelsPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08AppModelsPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates08DeploymentTypePage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09DeploymentTypePage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates09CacheMechanismPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10CacheMechanismPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates10DevOpsPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11DevOpsPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates11PlatformIntegrationPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12PlatformIntegrationPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates12SettingsPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13SettingsPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates13ExceptionHandlingPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14ExceptionHandlingPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor.scss b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor.scss similarity index 100% rename from src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates14MultilingualismPage.razor.scss rename to src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates15MultilingualismPage.razor.scss diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs index 7e1eb52819..640b79b666 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/MainLayout.razor.cs @@ -18,6 +18,7 @@ public partial class MainLayout : IDisposable private readonly List templatesNavItems = [ new BitNavItem { Text = "Overview", Url = "/templates/overview", AdditionalUrls = new string[] { "/admin-panel/overview", "/todo-template/overview" } }, + new BitNavItem { Text = "Samples", Url = "/templates/samples" }, new BitNavItem { Text = "Development prerequisites", Url = "/templates/development-prerequisites", AdditionalUrls = new string[] { "/admin-panel/development-prerequisites", "/todo-template/development-prerequisites" } }, new BitNavItem { Text = "Create project", Url = "/templates/create-project", AdditionalUrls = new string[] { "/admin-panel/create-project", "/todo-template/create-project" } }, new BitNavItem { Text = "Project structure", Url = "/templates/project-structure", AdditionalUrls = new string[] { "/admin-panel/project-structure", "/todo-template/project-structure" } }, diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json index c27f6eae7c..04fb89a410 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/compilerconfig.json @@ -84,80 +84,85 @@ "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.css", - "inputFile": "Pages/Templates/Templates02DevelopmentPrerequisitesPage.razor.scss", + "outputFile": "Pages/Templates/Templates02SamplesPage.razor.css", + "inputFile": "Pages/Templates/Templates02SamplesPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates03CreateProjectPage.razor.css", - "inputFile": "Pages/Templates/Templates03CreateProjectPage.razor.scss", + "outputFile": "Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.css", + "inputFile": "Pages/Templates/Templates03DevelopmentPrerequisitesPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates04ProjectStructurePage.razor.css", - "inputFile": "Pages/Templates/Templates04ProjectStructurePage.razor.scss", + "outputFile": "Pages/Templates/Templates04CreateProjectPage.razor.css", + "inputFile": "Pages/Templates/Templates04CreateProjectPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates05DatabasePage.razor.css", - "inputFile": "Pages/Templates/Templates05DatabasePage.razor.scss", + "outputFile": "Pages/Templates/Templates05ProjectStructurePage.razor.css", + "inputFile": "Pages/Templates/Templates05ProjectStructurePage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { "outputFile": "Pages/Templates/Templates06DatabasePage.razor.css", + "inputFile": "Pages/Templates/Templates06DatabasePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates06RunPage.razor.css", - "inputFile": "Pages/Templates/Templates06RunPage.razor.scss", + "outputFile": "Pages/Templates/Templates07RunPage.razor.css", + "inputFile": "Pages/Templates/Templates07RunPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates07AppModelsPage.razor.css", - "inputFile": "Pages/Templates/Templates07AppModelsPage.razor.scss", + "outputFile": "Pages/Templates/Templates08AppModelsPage.razor.css", + "inputFile": "Pages/Templates/Templates08AppModelsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates08DeploymentTypePage.razor.css", - "inputFile": "Pages/Templates/Templates08DeploymentTypePage.razor.scss", + "outputFile": "Pages/Templates/Templates09DeploymentTypePage.razor.css", + "inputFile": "Pages/Templates/Templates09DeploymentTypePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates09CacheMechanismPage.razor.css", - "inputFile": "Pages/Templates/Templates09CacheMechanismPage.razor.scss", + "outputFile": "Pages/Templates/Templates10CacheMechanismPage.razor.css", + "inputFile": "Pages/Templates/Templates10CacheMechanismPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates10DevOpsPage.razor.css", - "inputFile": "Pages/Templates/Templates10DevOpsPage.razor.scss", + "outputFile": "Pages/Templates/Templates11DevOpsPage.razor.css", + "inputFile": "Pages/Templates/Templates11DevOpsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates11PlatformIntegrationPage.razor.css", - "inputFile": "Pages/Templates/Templates11PlatformIntegrationPage.razor.scss", + "outputFile": "Pages/Templates/Templates12PlatformIntegrationPage.razor.css", + "inputFile": "Pages/Templates/Templates12PlatformIntegrationPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates12SettingsPage.razor.css", - "inputFile": "Pages/Templates/Templates12SettingsPage.razor.scss", + "outputFile": "Pages/Templates/Templates13SettingsPage.razor.css", + "inputFile": "Pages/Templates/Templates13SettingsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates13ExceptionHandlingPage.razor.css", - "inputFile": "Pages/Templates/Templates13ExceptionHandlingPage.razor.scss", + "outputFile": "Pages/Templates/Templates14ExceptionHandlingPage.razor.css", + "inputFile": "Pages/Templates/Templates14ExceptionHandlingPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Templates/Templates14MultilingualismPage.razor.css", - "inputFile": "Pages/Templates/Templates14MultilingualismPage.razor.scss", + "outputFile": "Pages/Templates/Templates15MultilingualismPage.razor.css", + "inputFile": "Pages/Templates/Templates15MultilingualismPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, From ff07a15339355216b822df0f02e66016cde192c7 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Tue, 16 Jan 2024 21:02:39 +0330 Subject: [PATCH 31/39] feat(websites): add samples for Butil History methods in Platform website #6598 (#6599) --- .../Pages/Butil/Butil08HistoryPage.razor | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor index 61899b1dfa..e1a1e15bcc 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil08HistoryPage.razor @@ -1,5 +1,6 @@ @page "/butil/history" @inherits AppComponentBase +@inject Bit.Butil.History history GetLength: Returns an Integer representing the number of elements in the session history, including the currently loaded page (MDN).

+ + + + +
+                                @exampleCode1
+                            
+
+ +
+ GetLength +
+
+
History length is: @historyLength
+
+
+
+
+

SetScrollRestoration, GetScrollRestoration: Gets/Sets default scroll restoration behavior on history navigation. This property can be either auto or manual (MDN).

+ + + + +
+                                @exampleCode2
+                            
+
+ +
+ +
+ SetScrollRestoration +
+
+
+
+
+

GetState: Returns an any value representing the state at the top of the history stack (MDN). @@ -44,22 +83,113 @@ GoBack: This asynchronous method goes to the previous page in session history, the same action as when the user clicks the browser's Back button. Calling this method to go back beyond the first page in the session history has no effect and doesn't raise an exception (MDN).

+ + + + +
+                                @exampleCode4
+                            
+
+ +
+ GoBack +
+
+
+
+
+

GoForward: This asynchronous method goes to the next page in session history, the same action as when the user clicks the browser's Forward button. Calling this method to go forward beyond the most recent page in the session history has no effect and doesn't raise an exception (MDN).

+ + + + +
+                                @exampleCode5
+                            
+
+ +
+ GoForward +
+
+
+
+
+

Go: Asynchronously loads a page from the session history, identified by its relative location to the current page, for example -1 for the previous page or 1 for the next page. Calling this method without parameters or a value of 0 reloads the current page (MDN).

+ + + + +
+                                @exampleCode6
+                            
+
+ +
+ +
+ Go +
+
+
+
+
+

PushState: Pushes the given data onto the session history stack with the specified title (and, if provided, URL) (MDN).

+ + + + +
+                                @exampleCode7
+                            
+
+ +
+ +
+ PushState +
+
+
+
+
+

ReplaceState: Updates the most recent entry on the history stack to have the specified data, title, and, if provided, URL (MDN).

+ + + + +
+                                @exampleCode8
+                            
+
+ +
+ +
+ ReplaceState +
+
+
+
+
+

AddPopState, RemovePopState: The popstate event of the Window interface is fired when the active history entry changes while the user navigates the session history (MDN). @@ -68,3 +198,127 @@
+ +@code { + private string? historyLength; + + private bool isScrollRestorationManual; + + private double delta; + + private string pushStateUrl = "butil/history#push-state"; + + private string replaceStateUrl = "butil/history#replace-state"; + + + private async Task GetLength() + { + var result = await history.GetLength(); + historyLength = result.ToString(); + } + + private async Task SetScrollRestoration() + { + await history.SetScrollRestoration(isScrollRestorationManual ? ScrollRestoration.Manual : ScrollRestoration.Auto); + } + + private async Task Go() + { + await history.Go((int)delta); + } + + private async Task PushState() + { + await history.PushState(url: pushStateUrl); + } + + private async Task ReplaceState() + { + await history.ReplaceState(url: replaceStateUrl); + } + + private string exampleCode1 = + @"@inject Bit.Butil.History history + +GetLength + +
History length is: @historyLength
+ +@code { + private string? historyLength; + + private async Task GetLength() + { + var result = await history.GetLength(); + historyLength = result.ToString(); + } +}"; + private string exampleCode2 = + @"@inject Bit.Butil.History history + + + +SetScrollRestoration + +@code { + private bool isScrollRestorationManual; + + private async Task SetScrollRestoration() + { + await history.SetScrollRestoration(isScrollRestorationManual ? ScrollRestoration.Manual : ScrollRestoration.Auto); + } +}"; + private string exampleCode4 = + @"@inject Bit.Butil.History history + + history.GoBack())"">GoBack"; + private string exampleCode5 = + @"@inject Bit.Butil.History history + + history.GoForward())"">GoForward"; + private string exampleCode6 = + @"@inject Bit.Butil.History history + + + +Go + +@code { + private double delta; + + private async Task Go() + { + await history.Go((int)delta); + } +}"; + private string exampleCode7 = + @"@inject Bit.Butil.History history + + + +PushState + +@code { + private string pushStateUrl = ""butil/history#push-state""; + + private async Task PushState() + { + await history.PushState(url: pushStateUrl); + } +}"; + private string exampleCode8 = + @"@inject Bit.Butil.History history + + + +ReplaceState + +@code { + private string replaceStateUrl = ""butil/history#replace-state""; + + private async Task ReplaceState() + { + await history.ReplaceState(url: replaceStateUrl); + } +}"; +} From f6c5255642c68a9f614c8013a96466e899ce1ddb Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Wed, 17 Jan 2024 11:18:55 +0330 Subject: [PATCH 32/39] feat(websites): add samples for Butil Navigator methods in Platform website #6601 (#6602) --- .../Pages/Butil/Butil10NavigatorPage.razor | 599 +++++++++++++++++- 1 file changed, 583 insertions(+), 16 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor index 394dd676cc..66fe4e697c 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil10NavigatorPage.razor @@ -1,5 +1,6 @@ @page "/butil/navigator" @inherits AppComponentBase +@inject Bit.Butil.Navigator navigator Methods
- GetDeviceMemory: Returns the amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024 +
+ GetDeviceMemory:
+ Returns the amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024 (MDN).

+ + + + +
+                                @getDeviceMemoryExampleCode
+                            
+
+ +
+ GetDeviceMemory +
+
+
Device memory is: @deviceMemory
+
+
+
+
+

- GetHardwareConcurrency: Returns the number of logical processor cores available + GetHardwareConcurrency:
+ Returns the number of logical processor cores available (MDN).

+ + + + +
+                                @getHardwareConcurrencyExampleCode
+                            
+
+ +
+ GetHardwareConcurrency +
+
+
Hardware concurrency is: @hardwareConcurrency
+
+
+
+
+

- GetLanguage: Returns a string representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown + GetLanguage:
+ Returns a string representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown (MDN).

+ + + + +
+                                @getLanguageExampleCode
+                            
+
+ +
+ GetLanguage +
+
+
Language: @language
+
+
+
+
+

- GetLanguages: Returns an array of strings representing the languages known to the user, by order of preference + GetLanguages:
+ Returns an array of strings representing the languages known to the user, by order of preference (MDN).

+ + + + +
+                                @getLanguagesExampleCode
+                            
+
+ +
+ GetLanguages +
+
+
Languages: @languages
+
+
+
+
+

- GetMaxTouchPoints: Returns the maximum number of simultaneous touch contact points are supported by the current device + GetMaxTouchPoints:
+ Returns the maximum number of simultaneous touch contact points are supported by the current device (MDN).

+ + + + +
+                                @getMaxTouchPointsExampleCode
+                            
+
+ +
+ GetMaxTouchPoints +
+
+
Max touch points: @maxTouchPoints
+
+
+
+
+

- IsOnLine: Returns a boolean value indicating whether the browser is working online + IsOnLine:
+ Returns a boolean value indicating whether the browser is working online (MDN).

+ + + + +
+                                @isOnLineExampleCode
+                            
+
+ +
+ GetIsOnLine +
+
+
Is OnLine: @isOnLine
+
+
+
+
+

- IsPdfViewerEnabled: Returns true if the browser can display PDF files inline when navigating to them, and false otherwise + IsPdfViewerEnabled:
+ Returns true if the browser can display PDF files inline when navigating to them, and false otherwise (MDN).

+ + + + +
+                                @isPdfViewerEnabledExampleCode
+                            
+
+ +
+ GetIsPdfViewerEnabled +
+
+
Is Pdf viewer enabled: @isPdfViewerEnabled
+
+
+
+
+

- GetUserAgent: Returns the user agent string for the current browser + GetUserAgent:
+ Returns the user agent string for the current browser (MDN).

+ + + + +
+                                @getUserAgentExampleCode
+                            
+
+ +
+ GetUserAgent +
+
+
User agent: @userAgent
+
+
+
+
+

- IsWebDriver: Indicates whether the user agent is controlled by automation + IsWebDriver:
+ Indicates whether the user agent is controlled by automation (MDN). -

+


- CanShare: Returns true if a call to Navigator.share() would succeed + CanShare:
+ Returns true if a call to navigator.Share() would succeed (MDN).

+ + + + +
+                                @canShareExampleCode
+                            
+
+ +
+ GetCanShare +
+
+
Can share: @canShare
+
+
+
+
+

- ClearAppBadge: Clears a badge on the current app's icon and returns a Promise that resolves with undefined + ClearAppBadge:
+ Clears a badge on the current app's icon and returns a Promise that resolves with undefined (MDN).

+ + + + +
+                                @clearAppBadgeExampleCode
+                            
+
+ +
+ ClearAppBadge +
+
+
+
+
+

- SendBeacon: Used to asynchronously transfer a small amount of data using HTTP from the User Agent to a web server + SendBeacon:
+ Used to asynchronously transfer a small amount of data using HTTP from the User Agent to a web server (MDN).

+ + + + +
+                                @sendBeaconExampleCode
+                            
+
+ +
+ SendBeacon +
+
+
+
+
+

- SetAppBadge: Sets a badge on the icon associated with this app and returns a Promise that resolves with undefined + SetAppBadge:
+ Sets a badge on the icon associated with this app and returns a Promise that resolves with undefined (MDN).

+ + + + +
+                                @setAppBadgeExampleCode
+                            
+
+ +
+ SetAppBadge +
+
+
+
+
+

- Share: Invokes the native sharing mechanism of the current platform + Share:
+ Invokes the native sharing mechanism of the current platform (MDN).

+ + + + +
+                                @shareExampleCode
+                            
+
+ +
+ +
+ +
+ +
+ Share +
+
+
+
+
+

- Vibrate: Causes vibration on devices with support for it. Does nothing if vibration support isn't available + Vibrate:
+ Causes vibration on devices with support for it. Does nothing if vibration support isn't available (MDN). +

+ + + + +
+                                @vibrateExampleCode
+                            
+
+ +
+ Vibrate +
+
+
+
+
+ +@code { + private string? deviceMemory; + + private string? hardwareConcurrency; + + private string? language; + + private string? languages; + + private string? maxTouchPoints; + + private string? isOnLine; + + private string? isPdfViewerEnabled; + + private string? userAgent; + + private string? isWebDriver; + + private string? canShare; + + private string? textValue; + private string? titleValue; + private string? urlValue; + + private int[] sosPattern = [100, 30, 100, 30, 100, 30, 200, 30, 200, 30, 200, 30, 100, 30, 100, 30, 100]; + + + private async Task GetDeviceMemory() + { + var result = await navigator.GetDeviceMemory(); + deviceMemory = result.ToString(); + } + + private async Task GetHardwareConcurrency() + { + var result = await navigator.GetHardwareConcurrency(); + hardwareConcurrency = result.ToString(); + } + + private async Task GetLanguage() + { + var result = await navigator.GetLanguage(); + language = result.ToString(); + } + + private async Task GetLanguages() + { + var result = await navigator.GetLanguages(); + languages = string.Join(",", result); + } + + private async Task GetMaxTouchPoints() + { + var result = await navigator.GetMaxTouchPoints(); + maxTouchPoints = result.ToString(); + } + + private async Task GetIsOnLine() + { + var result = await navigator.IsOnLine(); + isOnLine = result.ToString(); + } + + private async Task GetIsPdfViewerEnabled() + { + var result = await navigator.IsPdfViewerEnabled(); + isPdfViewerEnabled = result.ToString(); + } + + private async Task GetUserAgent() + { + var result = await navigator.GetUserAgent(); + userAgent = result.ToString(); + } + + private async Task GetCanShare() + { + var result = await navigator.CanShare(); + canShare = result.ToString(); + } + + private async Task Share() + { + var shareData = new ShareData() + { + Text = textValue, + title = titleValue, + url = urlValue + }; + + await navigator.Share(shareData); + } + + private string getDeviceMemoryExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetDeviceMemory + +
Device memory is: @deviceMemory
+ +@code { + private string? deviceMemory; + + private async Task GetDeviceMemory() + { + var result = await navigator.GetDeviceMemory(); + deviceMemory = result.ToString(); + } +}"; + private string getHardwareConcurrencyExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetHardwareConcurrency + +
Hardware concurrency is: @hardwareConcurrency
+ +@code { + private string? hardwareConcurrency; + + private async Task GetHardwareConcurrency() + { + var result = await navigator.GetHardwareConcurrency(); + hardwareConcurrency = result.ToString(); + } +}"; + private string getLanguageExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetLanguage + +
Language: @language
+ +@code { + private string? language; + + private async Task GetLanguage() + { + var result = await navigator.GetLanguage(); + language = result.ToString(); + } +}"; + private string getLanguagesExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetLanguages + +
Languages: @languages
+ +@code { + private string? languages; + + private async Task GetLanguages() + { + var result = await navigator.GetLanguages(); + languages = string.Join("","", result); + } +}"; + private string getMaxTouchPointsExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetMaxTouchPoints + +
Max touch points: @maxTouchPoints
+ +@code { + private string? maxTouchPoints; + + private async Task GetMaxTouchPoints() + { + var result = await navigator.GetMaxTouchPoints(); + maxTouchPoints = result.ToString(); + } +}"; + private string isOnLineExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetIsOnLine + +
Is OnLine: @isOnLine
+ +@code { + private string? isOnLine; + + private async Task GetIsOnLine() + { + var result = await navigator.IsOnLine(); + isOnLine = result.ToString(); + } +}"; + private string isPdfViewerEnabledExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetIsPdfViewerEnabled + +
Is Pdf viewer enabled: @isPdfViewerEnabled
+ +@code { + private string? isPdfViewerEnabled; + + private async Task GetIsPdfViewerEnabled() + { + var result = await navigator.IsPdfViewerEnabled(); + isPdfViewerEnabled = result.ToString(); + } +}"; + private string getUserAgentExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetUserAgent + +
User agent: @userAgent
+ +@code { + private string? userAgent; + + private async Task GetUserAgent() + { + var result = await navigator.GetUserAgent(); + userAgent = result.ToString(); + } +}"; + private string canShareExampleCode = +@"@inject Bit.Butil.Navigator navigator + +GetCanShare + +
Can share: @canShare
+ +@code { + private string? canShare; + + private async Task CanShare() + { + var result = await navigator.CanShare(); + canShare = result.ToString(); + } +}"; + private string clearAppBadgeExampleCode = +@"@inject Bit.Butil.Navigator navigator + + navigator.ClearAppBadge())"">ClearAppBadge"; + private string sendBeaconExampleCode = +@"@inject Bit.Butil.Navigator navigator + + navigator.SendBeacon())"">SendBeacon"; + private string setAppBadgeExampleCode = +@"@inject Bit.Butil.Navigator navigator + + navigator.SetAppBadge())"">SetAppBadge"; + private string shareExampleCode = +@"@inject Bit.Butil.Navigator navigator + + + + + + + +Share + +@code { + private string? textValue; + private string? titleValue; + private string? urlValue; + + private async Task Share() + { + var shareData = new ShareData() + { + Text = textValue, + title = titleValue, + url = urlValue + }; + + await navigator.Share(shareData); + } +}"; + private string vibrateExampleCode = +@"@inject Bit.Butil.Navigator navigator + + navigator.Vibrate(sosPattern))"">Vibrate + +@code { + private int[] sosPattern = [100, 30, 100, 30, 100, 30, 200, 30, 200, 30, 200, 30, 100, 30, 100, 30, 100]; +}"; +} \ No newline at end of file From 20cf86d1ca5b01597797c595e7f6a2d489033940 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Wed, 17 Jan 2024 13:16:04 +0330 Subject: [PATCH 33/39] feat(bswup): add errorTolerance option to Bswup #6597 (#6603) --- .../Bit.Bswup.Demo/wwwroot/service-worker.js | 7 ++++ .../wwwroot/service-worker.published.js | 7 ++++ .../wwwroot/service-worker.js | 2 +- src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts | 37 +++++++++++++------ src/Bswup/README.md | 1 + 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js index 9688430a63..03182f2aca 100644 --- a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js +++ b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js @@ -4,4 +4,11 @@ self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; self.caseInsensitiveUrl = true; self.precachedAssetsInclude = [/favicon\.ico$/, /icon-512\.png$/, /bit-bw-64\.png$/]; +self.externalAssets = [ + { + "url": "not-found/script.file.js" + } +]; +self.errorTolerance = 'lax'; + self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); diff --git a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js index 4b970a4d99..4728123e84 100644 --- a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js +++ b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js @@ -4,6 +4,13 @@ self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; self.caseInsensitiveUrl = true; self.precachedAssetsInclude = [/favicon\.ico$/, /icon-512\.png$/, /bit-bw-64\.png$/]; +//self.externalAssets = [ +// { +// "url": "not-found/script.file.js" +// } +//]; +//self.errorTolerance = 'lax'; + self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); //// Caution! Be sure you understand the caveats before publishing an application with diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js index fc7bd1b5c3..c2a8834ef5 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js @@ -24,7 +24,7 @@ self.externalAssets = [ "url": "app.css" }, { - "url": "_framework\/blazor.web.js" + "url": "_framework/blazor.web.js" }, { "url": "Bit.Bswup.NewDemo.styles.css" diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts index 5f9742c1a9..efa5d5afd6 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts @@ -21,6 +21,7 @@ interface Window { isPassive: any disablePassiveFirstBoot: any enableIntegrityCheck: any + errorTolerance: any enableDiagnostics: any enableFetchDiagnostics: any } @@ -297,27 +298,39 @@ async function createAssetsCache(ignoreProgressReport = false) { try { const responsePromise = fetch(request); return responsePromise.then(async response => { - if (!response.ok) { - diag('*** addCache - !response.ok:', request); + try { + if (!response.ok) { + diag('*** addCache - !response.ok:', request); + doReport(true); + return Promise.reject(response); + } - return Promise.reject(response.statusText); - } + const cacheUrl = createCacheUrl(asset); + await newCache.put(cacheUrl, response.clone()); - const cacheUrl = createCacheUrl(asset); - await newCache.put(cacheUrl, response.clone()); + doReport(); - if (report) { - const percent = (++current) / total * 100; - sendMessage({ type: 'progress', data: { asset, percent, index: current } }); - } + return response; - return response; + } catch (err) { + diag('*** addCache - put cache err:', err); + doReport(true); + return Promise.reject(err); + } }); } catch (err) { diag('*** addCache - catch err:', err); - + doReport(true); return Promise.reject(err); } + + function doReport(rejected = false) { + if (!report) return; + if (rejected && self.errorTolerance !== 'lax') return; + + const percent = (++current) / total * 100; + sendMessage({ type: 'progress', data: { asset, percent, index: current } }); + } } } diff --git a/src/Bswup/README.md b/src/Bswup/README.md index 8860df4532..ed7afb36a0 100644 --- a/src/Bswup/README.md +++ b/src/Bswup/README.md @@ -158,5 +158,6 @@ The other settings are: - `isPassive`: Enables the Bswup's passive mode. In this mode, the assets won't be cached in advance but rather upon initial request. - `disablePassiveFirstBoot`: Disables downloading the Blazor's boot files in first time of Passive mode. - `enableIntegrityCheck`: Enables the default integrity check available in browsers by setting the `integrity` attribute of the request object created in the service-worker to fetch the assets. +- `errorTolerance`: Determines how the Bswup should handle the errors while downloading assets. Possible values are: `strict`, `lax`, `config`. - `enableDiagnostics`: Enables diagnostics by pushing service-worker logs to the browser console. - `enableFetchDiagnostics`: Enables fetch event diagnostics by pushing service-worker fetch event logs to the browser console. \ No newline at end of file From 77e8ebea7814adbb83c80f714757816e763be488 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Wed, 17 Jan 2024 17:04:33 +0330 Subject: [PATCH 34/39] feat(prerelease): v-8.7.2-pre-02 #6604 (#6605) --- src/Bit.Build.props | 4 ++-- .../Bit.BlazorUI.Demo.Server.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Shared.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Client.Core.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Client.Maui.csproj | 4 ++-- .../Bit.BlazorUI.Demo.Client.Web.csproj | 6 +++--- .../wwwroot/service-worker.published.js | 2 +- src/BlazorUI/Demo/Directory.Build.props | 2 +- .../Bit.Bswup.Demo/wwwroot/service-worker.js | 2 +- .../wwwroot/service-worker.published.js | 2 +- .../wwwroot/service-worker.js | 2 +- .../wwwroot/service-worker.published.js | 2 +- .../Bit.Bswup/Scripts/bit-bswup.progress.ts | 2 +- src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts | 2 +- src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts | 2 +- .../FullDemo/Client/wwwroot/service-worker.js | 2 +- .../Client/wwwroot/service-worker.published.js | 2 +- src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts | 2 +- src/Bup/Bit.Bup/Scripts/bit-bup.ts | 2 +- src/Butil/Bit.Butil/Scripts/butil.ts | 2 +- .../BlazorEmpty.Client/BlazorEmpty.Client.csproj | 8 ++++---- .../BlazorEmpty/BlazorEmpty.csproj | 8 ++++---- .../Boilerplate.Server/Boilerplate.Server.csproj | 4 ++-- .../Boilerplate.Shared/Boilerplate.Shared.csproj | 4 ++-- .../Boilerplate.Client.Core.csproj | 16 ++++++++-------- .../Boilerplate.Client.Maui.csproj | 4 ++-- .../Boilerplate.Client.Web.csproj | 6 +++--- .../wwwroot/service-worker.published.js | 2 +- .../Boilerplate.Client.Windows.csproj | 4 ++-- .../Bit.Boilerplate/src/Directory.Build.props | 2 +- .../Bit.Websites.Careers.Client.csproj | 10 +++++----- .../Bit.Websites.Careers.Server.csproj | 4 ++-- .../Bit.Websites.Careers.Shared.csproj | 4 ++-- src/Websites/Careers/src/Directory.Build.props | 2 +- .../Bit.Websites.Platform.Client.csproj | 12 ++++++------ .../Bit.Websites.Platform.Server.csproj | 4 ++-- .../Bit.Websites.Platform.Shared.csproj | 4 ++-- src/Websites/Platform/src/Directory.Build.props | 2 +- .../Bit.Websites.Sales.Client.csproj | 10 +++++----- .../Bit.Websites.Sales.Server.csproj | 4 ++-- .../Bit.Websites.Sales.Shared.csproj | 4 ++-- src/Websites/Sales/src/Directory.Build.props | 2 +- 42 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/Bit.Build.props b/src/Bit.Build.props index 2331d3280a..f59ae4cff9 100644 --- a/src/Bit.Build.props +++ b/src/Bit.Build.props @@ -27,8 +27,8 @@ 8.7.2 - https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)-pre-01 - $(ReleaseVersion)-pre-01 + https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)-pre-02 + $(ReleaseVersion)-pre-02 $(ReleaseVersion).$([System.DateTime]::Now.ToString(HHmm)) diff --git a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj index b21d89e627..79c98e3ac5 100644 --- a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj +++ b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Bit.BlazorUI.Demo.Server.csproj @@ -5,11 +5,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj index d4811f3e7a..e47ef23418 100644 --- a/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj +++ b/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Shared/Bit.BlazorUI.Demo.Shared.csproj @@ -5,11 +5,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj index 49e7b9b733..0d6f3b6a06 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj @@ -16,11 +16,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj index dc91a5dd2d..cd447aee4d 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Maui/Bit.BlazorUI.Demo.Client.Maui.csproj @@ -81,12 +81,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj index fb6ba0167c..b565b9e684 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Bit.BlazorUI.Demo.Client.Web.csproj @@ -26,12 +26,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js index 3f06fdedf3..e7cb52b05e 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 // https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup self.assetsInclude = []; diff --git a/src/BlazorUI/Demo/Directory.Build.props b/src/BlazorUI/Demo/Directory.Build.props index eda5a0ed53..a0abb1f272 100644 --- a/src/BlazorUI/Demo/Directory.Build.props +++ b/src/BlazorUI/Demo/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 diff --git a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js index 03182f2aca..76db4272d6 100644 --- a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js +++ b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; self.caseInsensitiveUrl = true; diff --git a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js index 4728123e84..6c07ecd2f6 100644 --- a/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js +++ b/src/Bswup/Bit.Bswup.Demo/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; self.caseInsensitiveUrl = true; diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js index c2a8834ef5..d3c3cf77cf 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 // In development, always fetch from the network and do not enable offline support. // This is because caching would make development more difficult (changes would not diff --git a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js index fb30082798..64b88fc742 100644 --- a/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js +++ b/src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo.Client/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 self.assetsInclude = []; self.assetsExclude = [ diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts index 1f46fcef2e..89504f27bc 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.progress.ts @@ -1,4 +1,4 @@ -window['bit-bswup.progress version'] = '8.7.2-pre-01'; +window['bit-bswup.progress version'] = '8.7.2-pre-02'; ; (function () { (window as any).startBswupProgress = (autoReload: boolean, diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts index efa5d5afd6..84e3d02cfc 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.sw.ts @@ -1,4 +1,4 @@ -self['bit-bswup.sw version'] = '8.7.2-pre-01'; +self['bit-bswup.sw version'] = '8.7.2-pre-02'; interface Window { clients: any diff --git a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts index 8e35d6b4d7..0098baffd1 100644 --- a/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts +++ b/src/Bswup/Bit.Bswup/Scripts/bit-bswup.ts @@ -1,4 +1,4 @@ -window['bit-bswup version'] = '8.7.2-pre-01'; +window['bit-bswup version'] = '8.7.2-pre-02'; declare const Blazor: any; diff --git a/src/Bswup/FullDemo/Client/wwwroot/service-worker.js b/src/Bswup/FullDemo/Client/wwwroot/service-worker.js index c0bee703fa..48185f4be2 100644 --- a/src/Bswup/FullDemo/Client/wwwroot/service-worker.js +++ b/src/Bswup/FullDemo/Client/wwwroot/service-worker.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 // In development, always fetch from the network and do not enable offline support. // This is because caching would make development more difficult (changes would not diff --git a/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js b/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js index 67f65fb6a2..f2538296a2 100644 --- a/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js +++ b/src/Bswup/FullDemo/Client/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 self.assetsInclude = []; self.assetsExclude = [/\.scp\.css$/, /weather\.json$/]; diff --git a/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts b/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts index 15d93c681c..ef4cfce1c1 100644 --- a/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts +++ b/src/Bup/Bit.Bup/Scripts/bit-bup.progress.ts @@ -1,4 +1,4 @@ -window['bit-bup.progress version'] = '8.7.2-pre-01'; +window['bit-bup.progress version'] = '8.7.2-pre-02'; ; (function () { (window as any).startBupProgress = (showLogs: boolean, showAssets: boolean, appContainerSelector: string, hideApp: boolean, autoHide: boolean) => { diff --git a/src/Bup/Bit.Bup/Scripts/bit-bup.ts b/src/Bup/Bit.Bup/Scripts/bit-bup.ts index b3ffc0bbf8..920fef0943 100644 --- a/src/Bup/Bit.Bup/Scripts/bit-bup.ts +++ b/src/Bup/Bit.Bup/Scripts/bit-bup.ts @@ -1,4 +1,4 @@ -window['bit-bup version'] = '8.7.2-pre-01'; +window['bit-bup version'] = '8.7.2-pre-02'; declare const Blazor: any; diff --git a/src/Butil/Bit.Butil/Scripts/butil.ts b/src/Butil/Bit.Butil/Scripts/butil.ts index 7a3d098bd5..57c985174e 100644 --- a/src/Butil/Bit.Butil/Scripts/butil.ts +++ b/src/Butil/Bit.Butil/Scripts/butil.ts @@ -1,2 +1,2 @@ var BitButil = BitButil || {}; -BitButil.version = window['bit-butil version'] = '8.7.2-pre-01'; \ No newline at end of file +BitButil.version = window['bit-butil version'] = '8.7.2-pre-02'; \ No newline at end of file diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj index a455ba5233..470ef6e7e9 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty.Client/BlazorEmpty.Client.csproj @@ -1,4 +1,4 @@ - + @@ -15,14 +15,14 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj index a416b136ff..e46e23af2d 100644 --- a/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj +++ b/src/Templates/BlazorEmpty/Bit.BlazorEmpty/BlazorEmpty/BlazorEmpty.csproj @@ -1,4 +1,4 @@ - + @@ -18,14 +18,14 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj index 2281217ab9..b3ce400ef4 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Boilerplate.Server.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj index 9be4269ee8..c11b622249 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Boilerplate.Shared.csproj @@ -5,11 +5,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj index 3ec05273a1..0cdd6c14f0 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj @@ -16,19 +16,19 @@ - - - - + + + + - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj index 33325a7725..e98109877f 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/Boilerplate.Client.Maui.csproj @@ -84,11 +84,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj index 0e8df5e5ce..18c2061d8d 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj @@ -24,12 +24,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js index 13ec76c385..0adc03da25 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js @@ -1,4 +1,4 @@ -// bit version: 8.7.2-pre-01 +// bit version: 8.7.2-pre-02 // https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup self.assetsInclude = []; diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj index c7082652ef..f3661b3c12 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Windows/Boilerplate.Client.Windows.csproj @@ -15,11 +15,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props index e10a70dee3..4abc97ae7f 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props @@ -1,4 +1,4 @@ - + diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj index 2f4324abf5..72cee4145c 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Bit.Websites.Careers.Client.csproj @@ -24,14 +24,14 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj index 5a6236f7c6..7a27c328d6 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Server/Bit.Websites.Careers.Server.csproj @@ -9,11 +9,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj b/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj index ef96c02b63..e5a0d7a9dc 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Shared/Bit.Websites.Careers.Shared.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Careers/src/Directory.Build.props b/src/Websites/Careers/src/Directory.Build.props index b6c5f2fe88..16258d387d 100644 --- a/src/Websites/Careers/src/Directory.Build.props +++ b/src/Websites/Careers/src/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj index 51e0ecc8d1..acea440b61 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj @@ -24,15 +24,15 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj index b4c855131d..a61062f743 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Server/Bit.Websites.Platform.Server.csproj @@ -9,11 +9,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj b/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj index ef96c02b63..e5a0d7a9dc 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Shared/Bit.Websites.Platform.Shared.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Platform/src/Directory.Build.props b/src/Websites/Platform/src/Directory.Build.props index 4cdcf2bf65..555f506a07 100644 --- a/src/Websites/Platform/src/Directory.Build.props +++ b/src/Websites/Platform/src/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj index d5679b92bb..48595ecc32 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj @@ -24,14 +24,14 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj index e03b9b149c..2b428149ab 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Server/Bit.Websites.Sales.Server.csproj @@ -9,11 +9,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj b/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj index ef96c02b63..e5a0d7a9dc 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Shared/Bit.Websites.Sales.Shared.csproj @@ -6,11 +6,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Websites/Sales/src/Directory.Build.props b/src/Websites/Sales/src/Directory.Build.props index 0b692dfe15..738f4f610c 100644 --- a/src/Websites/Sales/src/Directory.Build.props +++ b/src/Websites/Sales/src/Directory.Build.props @@ -1,4 +1,4 @@ - + 12.0 From 17bcfd6fbefb683de44da1167301635ff6d68963 Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Rastegarinia Date: Wed, 17 Jan 2024 18:34:07 +0330 Subject: [PATCH 35/39] feat(websites): add samples for Butil Storage methods in Platform website #6606 (#6607) --- .../Pages/Butil/Butil11StoragePage.razor | 336 +++++++++++++++++- 1 file changed, 334 insertions(+), 2 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor index c3a1bdff33..8c368f25dc 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil11StoragePage.razor @@ -1,5 +1,7 @@ @page "/butil/storage" @inherits AppComponentBase +@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage @@ -31,31 +33,361 @@
Methods
+
GetLength: Returns an integer representing the number of data items stored in the Storage object (MDN).

+ + + + +
+                                @getLengthExampleCode
+                            
+
+ +
+ GetLength +
+
+
LocalStorage length: @localLength
+
+
SessionStorage length: @sessionLength
+
+
+
+
+
+

GetKey: When passed a number n, this method will return the name of the nth key in the storage (MDN).

+ + + + +
+                                @getKeyExampleCode
+                            
+
+ +
+ +
+ GetKey +
+
+
LocalStorage key: @localKey
+
+
SessionStorage key: @sessionKey
+
+
+
+
+
+

GetItem: When passed a key name, will return that key's value (MDN).

+ + + + +
+                                @getItemExampleCode
+                            
+
+ +
+ +
+ +
+
+ GetItem +
+
+
LocalStorage item: @currentLocalItem
+
+
SessionStorage item: @currentSessionItem
+
+
+
+
+
+

SetItem: When passed a key name and value, will add that key to the storage, or update that key's value if it already exists (MDN).

+ + + + +
+                                @setItemExampleCode
+                            
+
+ +
+ +
+ +
+
+ SetItem +
+
+
+
+
+

RemoveItem: When passed a key name, will remove that key from the storage (MDN).

+ + + + +
+                                @removeItemExampleCode
+                            
+
+ +
+ +
+ +
+
+ RemoveItem +
+
+
+
+
+

Clear: When invoked, will empty all keys out of the storage (MDN).

+ + + + +
+                                @clearItemExampleCode
+                            
+
+ +
+ Clear +
+
+
+
+
+ +@code { + private string? localLength; + private string? sessionLength; + + private double keyIndex; + private string? localKey; + private string? sessionKey; + + private string? currentLocalItemKey; + private string? currentSessionItemKey; + private string? currentLocalItem; + private string? currentSessionItem; + + private string? newLocalItemKey; + private string? newSessionItemKey; + + private string? localItemKey; + private string? sessionItemKey; + + + private async Task GetLength() + { + var localResult = await localStorage.GetLength(); + localLength = localResult.ToString(); + + var sessionResult = await sessionStorage.GetLength(); + sessionLength = sessionResult.ToString(); + } + + private async Task GetKey() + { + localKey = await localStorage.GetKey((int)keyIndex); + + sessionKey = await sessionStorage.GetKey((int)keyIndex); + } + + private async Task GetItem() + { + currentLocalItem = await localStorage.GetItem(currentLocalItemKey); + + currentSessionItem = await sessionStorage.GetItem(currentSessionItemKey); + } + + private async Task SetItem() + { + await localStorage.SetItem(newLocalItemKey, newLocalItemKey); + + await sessionStorage.SetItem(newSessionItemKey, newSessionItemKey); + } + + private async Task RemoveItem() + { + await localStorage.RemoveItem(localItemKey); + + await sessionStorage.RemoveItem(sessionItemKey); + } + + private async Task Clear() + { + await localStorage.Clear(); + + await sessionStorage.Clear(); + } + + private string getLengthExampleCode = +@"@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage + +GetLength + +
LocalStorage length: @localLength
+ +
SessionStorage length: @sessionLength
+ +@code { + private string? localLength; + private string? sessionLength; + + private async Task GetLength() + { + var localResult = await localStorage.GetLength(); + localLength = localResult.ToString(); + + var sessionResult = await sessionStorage.GetLength(); + sessionLength = sessionResult.ToString(); + } +}"; + private string getKeyExampleCode = +@"@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage + + + +GetKey + +
LocalStorage key: @localKey
+ +
SessionStorage key: @sessionKey
+ +@code { + private double keyIndex; + private string? localKey; + private string? sessionKey; + + private async Task GetKey() + { + localKey = await localStorage.GetKey((int)keyIndex); + + sessionKey = await sessionStorage.GetKey((int)keyIndex); + } +}"; + private string getItemExampleCode = +@"@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage + + + + + +GetItem + +
LocalStorage item: @currentLocalItem
+ +
SessionStorage item: @currentSessionItem
+ +@code { + private string? currentLocalItemKey; + private string? currentSessionItemKey; + private string? currentLocalItem; + private string? currentSessionItem; + + private async Task GetItem() + { + currentLocalItem = await localStorage.GetItem(currentLocalItemKey); + + currentSessionItem = await sessionStorage.GetItem(currentSessionItemKey); + } +}"; + private string setItemExampleCode = +@"@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage + + + + + +SetItem + +@code { + private string? newLocalItemKey; + private string? newSessionItemKey; + + private async Task SetItem() + { + await localStorage.SetItem(newLocalItemKey, newLocalItemKey); + + await sessionStorage.SetItem(newSessionItemKey, newSessionItemKey); + } +}"; + private string removeItemExampleCode = +@"@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage + + + + + +RemoveItem + +@code { + private string? localItemKey; + private string? sessionItemKey; + + private async Task RemoveItem() + { + await localStorage.RemoveItem(localItemKey); + + await sessionStorage.RemoveItem(sessionItemKey); + } +}"; + private string clearItemExampleCode = +@"@inject Bit.Butil.LocalStorage localStorage +@inject Bit.Butil.SessionStorage sessionStorage + +Clear + +@code { + private async Task Clear() + { + await localStorage.Clear(); + + await sessionStorage.Clear(); + } +}"; +} \ No newline at end of file From 5a4c6f5315762246398565a711c26d2424314416 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Wed, 17 Jan 2024 17:10:45 +0100 Subject: [PATCH 36/39] feat(templates): add Blazor WebAssembly Standalone deployment #6591 (#6592) --- .github/workflows/admin-sample.cd.yml | 9 + .github/workflows/bit.full.ci.yml | 1 + .github/workflows/todo-sample.cd.yml | 46 +++- README.md | 10 +- .../Components/AppBswupProgressBar.razor | 2 +- .../Boilerplate/Bit.Boilerplate/.gitignore | 3 +- .../Boilerplate.Server/Components/App.razor | 4 + .../src/Boilerplate.Server/Program.cs | 2 +- .../Boilerplate.Server/Startup/Middlewares.cs | 12 +- .../Components/Layout/NavMenu.razor.cs | 4 +- .../Boilerplate.Client.Core/Routes.razor | 4 +- .../Services/AppRenderMode.cs | 4 +- .../wwwroot/index.html | 45 ++-- .../Boilerplate.Client.Web.csproj | 110 ++++----- .../Components/AppBswupProgressBar.razor | 2 +- .../Client/Boilerplate.Client.Web/Program.cs | 11 +- .../Properties/launchSettings.json | 15 ++ .../Boilerplate.Client.Web/wwwroot/index.html | 209 ++++++++++++++++++ .../wwwroot/service-worker.js | 43 +++- .../wwwroot/service-worker.published.js | 38 ---- .../Bit.Boilerplate/src/Directory.Build.props | 11 +- .../Services/RenderModeProvider.cs | 2 +- .../Services/RenderModeProvider.cs | 2 +- .../Services/RenderModeProvider.cs | 2 +- 24 files changed, 450 insertions(+), 141 deletions(-) create mode 100644 src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json create mode 100644 src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html delete mode 100644 src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js diff --git a/.github/workflows/admin-sample.cd.yml b/.github/workflows/admin-sample.cd.yml index 15961a161b..035715eeab 100644 --- a/.github/workflows/admin-sample.cd.yml +++ b/.github/workflows/admin-sample.cd.yml @@ -50,6 +50,15 @@ jobs: - name: Install wasm run: cd src && dotnet workload install wasm-tools wasm-experimental + + - name: Configure app render mode + run: | + sed -i 's/Auto;/BlazorWebAssembly;/g' AdminPanel/src/Client/AdminPanel.Client.Core/Services/AppRenderMode.cs + + - name: Configure bswup + run: | + sed -i 's/self.noPrerenderQuery/\/\/ self.noPrerenderQuery/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/service-worker.js + sed -i 's/self.isPassive = self.disablePassiveFirstBoot = true;/self.isPassive = self.disablePassiveFirstBoot = false;/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/service-worker.js - name: Generate CSS/JS files run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore diff --git a/.github/workflows/bit.full.ci.yml b/.github/workflows/bit.full.ci.yml index ecdd8021ae..6e1c7c24ac 100644 --- a/.github/workflows/bit.full.ci.yml +++ b/.github/workflows/bit.full.ci.yml @@ -40,6 +40,7 @@ jobs: dotnet ef database update cd ../../../ dotnet build TodoBPSqlite/TodoBPSqlite.sln -c Release -p:RunAOTCompilation=false + dotnet build TodoBPSqlite/src/Client/TodoBPSqlite.Client.Web/TodoBPSqlite.Client.Web.csproj -c Release -p:BlazorWebAssemblyStandalone=true - name: Release build empty sample + offline db + Win exe run: | diff --git a/.github/workflows/todo-sample.cd.yml b/.github/workflows/todo-sample.cd.yml index 9e15eb5796..a6aad54340 100644 --- a/.github/workflows/todo-sample.cd.yml +++ b/.github/workflows/todo-sample.cd.yml @@ -50,8 +50,13 @@ jobs: - name: Install wasm run: cd src && dotnet workload install wasm-tools wasm-experimental - - name: Enable pre rendering - run: sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs + - name: Configure app render mode + run: | + sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs + sed -i 's/Auto;/BlazorWebAssembly;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs + + - name: Changes for static-todo.bitplatform.dev - Part 1 + run: sed -i 's/http:\/\/localhost:4030/https:\/\/static-todo.bitplatform.dev/g' TodoSample/src/TodoSample.Server/Startup/Middlewares.cs - name: Generate CSS/JS files run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks --no-restore @@ -65,6 +70,23 @@ jobs: name: server-bundle path: ${{env.DOTNET_ROOT}}/server + - name: Changes for static-todo.bitplatform.dev - Part 2 + run: sed -i 's/public static readonly bool PrerenderEnabled = true;/public static readonly bool PrerenderEnabled = false;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs + + - name: Configure bswup + run: | + sed -i 's/self.noPrerenderQuery/\/\/ self.noPrerenderQuery/g' TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.js + sed -i 's/self.isPassive = self.disablePassiveFirstBoot = true;/self.isPassive = self.disablePassiveFirstBoot = false;/g' TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.js + + - name: Publish static todo + run: dotnet publish TodoSample/src/Client/TodoSample.Client.Web/TodoSample.Client.Web.csproj -c Release -p:BlazorWebAssemblyStandalone=true -o ${{env.DOTNET_ROOT}}/static + + - name: Upload static artifact + uses: actions/upload-artifact@v3 + with: + name: static-bundle + path: ${{env.DOTNET_ROOT}}/static + deploy_api_blazor: name: deploy api + blazor needs: build_api_blazor @@ -323,6 +345,26 @@ jobs: api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY }} + - name: Delete App Icon + run: rm TodoSample/src/Client/TodoSample.Client.Maui/Resources/AppIcon/appicon.svg + + - name: Extract App Icon from env + uses: timheuer/base64-to-file@v1 + with: + fileDir: './TodoSample/src/Client/TodoSample.Client.Maui/Resources/AppIcon/' + fileName: 'appicon.svg' + encodedString: ${{ vars.TODO_ICON }} + + - name: Delete App Splash Screen + run: rm TodoSample/src/Client/TodoSample.Client.Maui/Resources/Splash/splash.svg + + - name: Extract App Splash Screen from env + uses: timheuer/base64-to-file@v1 + with: + fileDir: './TodoSample/src/Client/TodoSample.Client.Maui/Resources/Splash/' + fileName: 'splash.svg' + encodedString: ${{ vars.TODO_SPLASH_SCREEN }} + - name: Generate CSS/JS files run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks --no-restore diff --git a/README.md b/README.md index 2e085f37ad..09e2d57fed 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,15 @@ The following apps are our open-source projects powered by the bit platform show | AdminPanel | [![Prerendered PWA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381583-8b8eb895-80c9-4811-9641-57a5a08db163.png)](https://adminpanel.bitplatform.dev) | [![iOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381842-e72976ce-fd20-431d-a677-ca1ed625b83b.png)](https://apps.apple.com/us/app/bit-adminpanel/id6450611349) | [![Android app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381958-24931682-87f6-44fc-a1c7-eecf46387005.png)](https://play.google.com/store/apps/details?id=com.bitplatform.AdminPanel.Template) | [![Windows app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382080-9ae97fea-934c-4097-aca4-124a2aed1595.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-Windows.zip) | [![macOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382211-0d58f9ba-1a1f-4481-a0ca-b23a393cca9f.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-macOS.pkg) | | bitplatform | [![SPA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251395129-71a5a79c-af74-4d4e-a0f7-ed9a15cf2e46.png)](https://bitplatform.dev)| -
+1. [bitplatform.dev](bitplatform.dev): Pre-rendered SPA with Blazor WebAssembly +2. [components.bitplatform.dev](components.bitplatform.dev): Pre-rendered PWA with Blazor Auto +3. [todo.bitplatform.dev](todo.bitplatform.dev): Pre-rendered PWA with Blazor WebAssembly +4. [static-todo.bitplatform.dev](static-todo.bitplatform.dev): PWA with Blazor WebAssembly Standalone (Hosted on Cloudflare Pages) +5. [adminpanel.bitplatform.dev](adminpanel.bitplatform.dev): PWA with Blazor WebAssembly + +[Todo](https://todo.bitplatform.dev) & [Adminpanel](https://adminpanel.bitplatform.dev) web apps will launch their respective Android and iOS applications if you have already installed them, mirroring the behavior of apps like YouTube and Instagram. + +Prerendering combined with PWA functionality delivers an experience akin to that of GitHub and Reddit. The bitplatform solution, seamlessly integrated with the innovative new .NET 8 project structure, stands as the exclusive remedy for such a scenario within the realm of Blazor. # How to contribute? diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor index b494b59b7b..1b46bed028 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor @@ -46,7 +46,7 @@ content: var(--bit-bswup-percent-text, ""); } /* If you want the update to be applied after the user approves the new Pwa version and not automatically, - set AutoReload parameter of BswupProgress to true and uncomment the commented codes in this file: */ + set AutoReload parameter of BswupProgress to false and uncomment the commented codes in this file: */ /* #bit-bswup-reload { top: 38px; diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore b/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore index 9a3e897c1d..5b1a736062 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore @@ -231,4 +231,5 @@ custom.aprof /src/Client/Boilerplate.Client.Core/wwwroot/scripts/app*.js -/src/Boilerplate.Server/*.db* \ No newline at end of file +/src/Boilerplate.Server/*.db* +.env \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor index 8f7e15d3e9..ab4e72478a 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor @@ -35,6 +35,10 @@ + @if (AppRenderMode.PrerenderEnabled is false || noPrerender) + { + + } @if (HttpContext.Request.IsCrawlerClient() is false) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs index 4a370a7e8a..6b98bd92f1 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs @@ -15,4 +15,4 @@ Boilerplate.Server.Startup.Middlewares.Use(app, builder.Environment, builder.Configuration); -app.Run(); +await app.RunAsync(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs index 04ff3382fe..f462e78dbd 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs @@ -41,6 +41,8 @@ public static void Use(WebApplication app, IHostEnvironment env, IConfiguration else { app.UseHttpsRedirection(); + app.UseResponseCaching(); + app.UseResponseCompression(); } Configure_401_403_404_Pages(app); @@ -61,19 +63,13 @@ public static void Use(WebApplication app, IHostEnvironment env, IConfiguration } }); - app.UseCors(options => options.WithOrigins("https://0.0.0.0" /*BlazorHybrid*/, "app://0.0.0.0" /*BlazorHybrid*/) + // 0.0.0.0 origins are essential for the proper functioning of BlazorHybrid's WebView, while localhost:4030 is a prerequisite for BlazorWebAssemblyStandalone testing. + app.UseCors(options => options.WithOrigins("https://0.0.0.0", "app://0.0.0.0", "http://localhost:4030") .AllowAnyHeader().AllowAnyMethod()); app.UseAuthentication(); app.UseAuthorization(); - if (env.IsDevelopment() is false) - { - app.UseResponseCompression(); - } - - app.UseResponseCaching(); - app.UseAntiforgery(); app.UseSwagger(); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs index 01ee1ca00d..30a7684559 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs @@ -6,8 +6,6 @@ namespace Boilerplate.Client.Core.Components.Layout; public partial class NavMenu : IDisposable { - [AutoInject] IUserController userController = default!; - private bool disposed; private bool isSignOutModalOpen; private string? profileImageUrl; @@ -95,7 +93,7 @@ protected override async Task OnInitAsync() await InvokeAsync(StateHasChanged); }); - user = await userController.GetCurrentUser(CurrentCancellationToken); + user = (await HttpClient.GetFromJsonAsync("api/User/GetCurrentUser", AppJsonContext.Default.UserDto, CurrentCancellationToken))!; var access_token = await PrerenderStateService.GetValue(AuthTokenProvider.GetAccessTokenAsync); profileImageUrlBase = $"{Configuration.GetApiServerAddress()}api/Attachment/GetProfileImage?access_token={access_token}&file="; diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor index a5c92e642b..0d50ddee57 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs index 3e6ff9100e..279f9a0cc4 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs @@ -13,7 +13,9 @@ public static class AppRenderMode public static IComponentRenderMode NoPrerenderBlazorWebAssembly => new InteractiveWebAssemblyRenderMode(prerender: false); public static IComponentRenderMode Current => - BuildConfiguration.IsDebug() ? BlazorServer /*For better development experience*/ : Auto; + BuildConfiguration.IsDebug() + ? BlazorServer // For better development experience. + : Auto; // For better production experience. /// /// To enable/disable pwa support, navigate to Directory.Build.props and modify the PwaEnabled flag. diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html index a92ba50224..5fdde0d576 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html @@ -27,85 +27,88 @@ background-color: #0D2960; } - .lds-wrapper { + .bit-lds-grid div { + background-color: #123456; + } + + .bit-lds-wrapper { top: 50%; left: 50%; position: absolute; transform: translate(-50%, -50%); } - .lds-grid { - display: inline-block; - position: relative; + .bit-lds-grid { width: 80px; height: 80px; + position: relative; + display: inline-block; } - .lds-grid div { - position: absolute; + .bit-lds-grid div { width: 16px; height: 16px; + position: absolute; border-radius: 50%; - background: #fff; - animation: lds-grid 1.2s linear infinite; + animation: bit-lds-grid 1.2s linear infinite; } - .lds-grid div:nth-child(1) { + .bit-lds-grid div:nth-child(1) { top: 8px; left: 8px; animation-delay: 0s; } - .lds-grid div:nth-child(2) { + .bit-lds-grid div:nth-child(2) { top: 8px; left: 32px; animation-delay: -0.4s; } - .lds-grid div:nth-child(3) { + .bit-lds-grid div:nth-child(3) { top: 8px; left: 56px; animation-delay: -0.8s; } - .lds-grid div:nth-child(4) { + .bit-lds-grid div:nth-child(4) { top: 32px; left: 8px; animation-delay: -0.4s; } - .lds-grid div:nth-child(5) { + .bit-lds-grid div:nth-child(5) { top: 32px; left: 32px; animation-delay: -0.8s; } - .lds-grid div:nth-child(6) { + .bit-lds-grid div:nth-child(6) { top: 32px; left: 56px; animation-delay: -1.2s; } - .lds-grid div:nth-child(7) { + .bit-lds-grid div:nth-child(7) { top: 56px; left: 8px; animation-delay: -0.8s; } - .lds-grid div:nth-child(8) { + .bit-lds-grid div:nth-child(8) { top: 56px; left: 32px; animation-delay: -1.2s; } - .lds-grid div:nth-child(9) { + .bit-lds-grid div:nth-child(9) { top: 56px; left: 56px; animation-delay: -1.6s; } - @keyframes lds-grid { + @keyframes bit-lds-grid { 0%, 100% { opacity: 1; } @@ -119,8 +122,10 @@
-
-
+
+
+
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj index 18c2061d8d..f7e977615b 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj @@ -1,53 +1,61 @@  - - - net8.0 - - true - false - - - true - true - - false - service-worker-assets.js - false - true - Default - - true - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - + + + net8.0 + + true + false + + true + true + + false + service-worker-assets.js + false + true + Default + + true + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor index e3e2aafd8d..f66ab0e6e3 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor @@ -46,7 +46,7 @@ content: var(--bit-bswup-percent-text, ""); } /* If you want the update to be applied after the user approves the new Pwa version and not automatically, - set AutoReload parameter of BswupProgress to true and uncomment the commented codes in this file: */ + set AutoReload parameter of BswupProgress to false and uncomment the commented codes in this file: */ /* #bit-bswup-reload { top: 38px; diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs index 7f8876f3bb..b58e0c82b7 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs @@ -1,7 +1,16 @@ -using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +//-:cnd:noEmit +#if BlazorWebAssemblyStandalone +using Microsoft.AspNetCore.Components.Web; +#endif +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; var builder = WebAssemblyHostBuilder.CreateDefault(args); +#if BlazorWebAssemblyStandalone +builder.RootComponents.Add("#app-container"); +builder.RootComponents.Add("head::after"); +#endif + builder.Configuration.AddClientConfigurations(); Uri.TryCreate(builder.Configuration.GetApiServerAddress(), UriKind.RelativeOrAbsolute, out var apiServerAddress); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json new file mode 100644 index 0000000000..27ed818356 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json @@ -0,0 +1,15 @@ +{ + "profiles": { + "Boilerplate.Web(BlazorWebAssemblyStandalone)": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "http://localhost:4030", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + }, + "$schema": "http://json.schemastore.org/launchsettings.json" +} \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html new file mode 100644 index 0000000000..859413afa3 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ + + + +
+
+ + +
+ + + + + + + + + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js index 0c4fa6ba58..6bf925d4f1 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js @@ -1,4 +1,39 @@ -// In development, always fetch from the network and do not enable offline support. -// This is because caching would make development more difficult (changes would not -// be reflected on the first load after each change). -self.addEventListener('fetch', () => { }); \ No newline at end of file +// bit version: 8.7.2-pre-01 +// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup + +self.assetsInclude = []; +self.assetsExclude = [ + /bit\.blazorui\.fluent\.css$/, + /bit\.blazorui\.fluent-dark\.css$/, + /bit\.blazorui\.fluent-light\.css$/, + /Client\.Web\.styles\.css$/ // In .NET 8, an inexistent CSS file is inadvertently included in the assets list under the name 'Boilerplate.Client.Web.styles.css.' + // Subsequently, during the download process of assets list files, bswup attempts to retrieve this non - existent CSS file along with others. + // It is imperative that we expunge this file from the assets list. +]; +self.externalAssets = [ + { + "url": "/" + }, + { + url: "_framework/blazor.web.js" + } +]; + +self.serverHandledUrls = [ + /\/api\//, + /\/odata\//, + /\/jobs\//, + /\/core\//, + /\/signalr\//, + /\/healthchecks-ui/, + /\/healthz/, + /\/swagger/ +]; + +self.defaultUrl = "/"; +self.caseInsensitiveUrl = true; +self.noPrerenderQuery = 'no-prerender=true'; +self.isPassive = self.disablePassiveFirstBoot = true; +self.errorTolerance = 'lax'; + +self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js deleted file mode 100644 index 0adc03da25..0000000000 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js +++ /dev/null @@ -1,38 +0,0 @@ -// bit version: 8.7.2-pre-02 -// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup - -self.assetsInclude = []; -self.assetsExclude = [ - /bit\.blazorui\.fluent\.css$/, - /bit\.blazorui\.fluent-dark\.css$/, - /bit\.blazorui\.fluent-light\.css$/, - /Client\.Web\.styles\.css$/ // In .NET 8, an inexistent CSS file is inadvertently included in the assets list under the name 'Boilerplate.Client.Web.styles.css.' - // Subsequently, during the download process of assets list files, bswup attempts to retrieve this non - existent CSS file along with others. - // It is imperative that we expunge this file from the assets list. -]; -self.externalAssets = [ - { - "url": "/" - }, - { - "url": "_framework\/blazor.web.js" - } -]; - -self.serverHandledUrls = [ - /\/api\//, - /\/odata\//, - /\/jobs\//, - /\/core\//, - /\/signalr\//, - /\/healthchecks-ui/, - /\/healthz/, - /\/swagger/ -]; - -self.defaultUrl = "/"; -self.caseInsensitiveUrl = true; -self.noPrerenderQuery = 'no-prerender=true'; -self.isPassive = self.disablePassiveFirstBoot = true; - -self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props index 4abc97ae7f..e756f92b99 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props @@ -11,10 +11,12 @@ en-US true - $(DefineConstants);MultilingualEnabled - false - $(DefineConstants);PwaEnabled + false + + + true 14.0 14.0 @@ -26,6 +28,9 @@ $(DefineConstants);iOS $(DefineConstants);Windows $(DefineConstants);Mac + $(DefineConstants);MultilingualEnabled + $(DefineConstants);BlazorWebAssemblyStandalone + $(DefineConstants);PwaEnabled diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs index 6b2bb37bea..a416851b7a 100644 --- a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs +++ b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs @@ -18,6 +18,6 @@ public static class RenderModeProvider #if DEBUG PrerenderEnabledBlazorServer; // Or BlazorServer, for better development experience. #else - PrerenderEnabledAuto; + PrerenderEnabledBlazorWasm; #endif } diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs index 21bb6f5bd2..ec2dc67902 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs @@ -18,6 +18,6 @@ public static class RenderModeProvider #if DEBUG PrerenderEnabledBlazorServer; // Or BlazorServer, for better development experience. #else - PrerenderEnabledAuto; + PrerenderEnabledBlazorWasm; #endif } diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs index c9adc543cc..fddd756ae2 100644 --- a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs +++ b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs @@ -19,6 +19,6 @@ public static class RenderModeProvider #if DEBUG PrerenderEnabledBlazorServer; // Or BlazorServer, for better development experience. #else - PrerenderEnabledAuto; + PrerenderEnabledBlazorWasm; #endif } From 84655013123e6e10df6db32e9ed4811358acb31e Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Wed, 17 Jan 2024 20:22:36 +0330 Subject: [PATCH 37/39] fix(websites): resolve issues of links without href in Platform website #6568 (#6609) --- .../Shared/Footer.razor | 20 +++++++++---------- .../Shared/Header.razor.scss | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Footer.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Footer.razor index a8d48f6fa2..0a4f8d5677 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Footer.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Shared/Footer.razor @@ -11,26 +11,26 @@