├── .github └── workflows │ └── publishToNugetOnMaster.yml ├── .gitignore ├── BlazorTransitionableRoute.sln ├── LICENSE ├── README-EXAMPLE.md ├── README-V1.md ├── README-V2.md ├── README-V3.md ├── README.md ├── demo ├── BlazorTransitionableRouteDemo.gif ├── aspnetcore5.0 │ └── v3 │ │ ├── BlazorTransitionableRouteDemoServer │ │ ├── .dockerignore │ │ ├── App.razor │ │ ├── BlazorTransitionableRouteDemoServer.csproj │ │ ├── BlazorTransitionableRouteDemoServer.sln │ │ ├── Data │ │ │ ├── WeatherForecast.cs │ │ │ └── WeatherForecastService.cs │ │ ├── Dockerfile │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ ├── WeatherDetail.razor │ │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── MainLayout.razor.css │ │ │ ├── MyRouteTransitionInvoker.cs │ │ │ ├── MyViewLayout.razor │ │ │ ├── NavMenu.razor │ │ │ ├── NavMenu.razor.css │ │ │ └── SurveyPrompt.razor │ │ ├── Startup.cs │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ └── jsInterop.js │ │ └── BlazorTransitionableRouteDemoWasm │ │ ├── BlazorTransitionableRouteDemoWasm.sln │ │ ├── Client │ │ ├── App.razor │ │ ├── BlazorTransitionableRouteDemoWasm.Client.csproj │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ └── WeatherDetail.razor │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── MainLayout.razor.css │ │ │ ├── MyViewLayout.razor │ │ │ ├── NavMenu.razor │ │ │ ├── NavMenu.razor.css │ │ │ └── SurveyPrompt.razor │ │ ├── _Imports.razor │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── app.css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ ├── favicon.ico │ │ │ ├── icon-512.png │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ ├── service-worker.js │ │ │ └── service-worker.published.js │ │ ├── Server │ │ ├── BlazorTransitionableRouteDemoWasm.Server.csproj │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ └── Error.cshtml.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ └── Shared │ │ ├── BlazorTransitionableRouteDemoWasm.Shared.csproj │ │ └── WeatherForecast.cs ├── aspnetcore6.0 │ └── v4 │ │ ├── BlazorTransitionableRouteDemoServer │ │ ├── App.razor │ │ ├── Areas │ │ │ └── Identity │ │ │ │ ├── Pages │ │ │ │ ├── Account │ │ │ │ │ └── LogOut.cshtml │ │ │ │ └── Shared │ │ │ │ │ └── _LoginPartial.cshtml │ │ │ │ └── RevalidatingIdentityAuthenticationStateProvider.cs │ │ ├── BlazorTransitionableRouteDemoServer.csproj │ │ ├── BlazorTransitionableRouteDemoServer.sln │ │ ├── Data │ │ │ ├── ApplicationDbContext.cs │ │ │ ├── Migrations │ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ │ ├── WeatherForecast.cs │ │ │ └── WeatherForecastService.cs │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ ├── WeatherDetail.razor │ │ │ ├── _Host.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── launchSettings.json │ │ │ ├── serviceDependencies.json │ │ │ └── serviceDependencies.local.json │ │ ├── Shared │ │ │ ├── LoginDisplay.razor │ │ │ ├── MainLayout.razor │ │ │ ├── MainLayout.razor.css │ │ │ ├── MyAuthorizeRouteView.razor │ │ │ ├── MyViewLayout.razor │ │ │ ├── NavMenu.razor │ │ │ ├── NavMenu.razor.css │ │ │ └── SurveyPrompt.razor │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ └── favicon.ico │ │ └── BlazorTransitionableRouteDemoWasm │ │ ├── BlazorTransitionableRouteDemoWasm.sln │ │ ├── Client │ │ ├── App.razor │ │ ├── BlazorTransitionableRouteDemoWasm.Client.csproj │ │ ├── Pages │ │ │ ├── Authentication.razor │ │ │ ├── Counter.razor │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ └── WeatherDetail.razor │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Shared │ │ │ ├── LoginDisplay.razor │ │ │ ├── MainLayout.razor │ │ │ ├── MainLayout.razor.css │ │ │ ├── MyAuthorizeRouteView.razor │ │ │ ├── MyViewLayout.razor │ │ │ ├── NavMenu.razor │ │ │ ├── NavMenu.razor.css │ │ │ ├── RedirectToLogin.razor │ │ │ └── SurveyPrompt.razor │ │ ├── _Imports.razor │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── app.css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ ├── favicon.ico │ │ │ ├── icon-192.png │ │ │ ├── icon-512.png │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ ├── service-worker.js │ │ │ └── service-worker.published.js │ │ ├── Server │ │ ├── Areas │ │ │ └── Identity │ │ │ │ └── Pages │ │ │ │ └── Shared │ │ │ │ └── _LoginPartial.cshtml │ │ ├── BlazorTransitionableRouteDemoWasm.Server.csproj │ │ ├── Controllers │ │ │ ├── OidcConfigurationController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Data │ │ │ ├── ApplicationDbContext.cs │ │ │ └── Migrations │ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models │ │ │ └── ApplicationUser.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ └── Error.cshtml.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ ├── launchSettings.json │ │ │ ├── serviceDependencies.json │ │ │ └── serviceDependencies.local.json │ │ ├── Readme.txt │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ └── Shared │ │ ├── BlazorTransitionableRouteDemoWasm.Shared.csproj │ │ └── WeatherForecast.cs └── dotnetcore3.1 │ ├── v2 │ ├── BlazorTransitionableRouteDemoServer │ │ ├── App.razor │ │ ├── BlazorTransitionableRouteDemoServer.csproj │ │ ├── BlazorTransitionableRouteDemoServer.sln │ │ ├── Data │ │ │ ├── WeatherForecast.cs │ │ │ └── WeatherForecastService.cs │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── Error.razor │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── MyRouteTransitionInvoker.cs │ │ │ ├── MyViewLayout.razor │ │ │ ├── NavMenu.razor │ │ │ └── SurveyPrompt.razor │ │ ├── Startup.cs │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ └── jsInterop.js │ └── BlazorTransitionableRouteDemoWasm │ │ ├── BlazorTransitionableRouteDemoWasm.sln │ │ ├── Client │ │ ├── App.razor │ │ ├── BlazorTransitionableRouteDemoWasm.Client.csproj │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── FetchData.razor │ │ │ └── Index.razor │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── MyViewLayout.razor │ │ │ ├── NavMenu.razor │ │ │ └── SurveyPrompt.razor │ │ ├── _Imports.razor │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── app.css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ ├── favicon.ico │ │ │ ├── icon-512.png │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ ├── service-worker.js │ │ │ └── service-worker.published.js │ │ ├── Server │ │ ├── BlazorTransitionableRouteDemoWasm.Server.csproj │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ └── Shared │ │ │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ └── Shared │ │ ├── BlazorTransitionableRouteDemoWasm.Shared.csproj │ │ └── WeatherForecast.cs │ └── v3 │ ├── BlazorTransitionableRouteDemoServer │ ├── App.razor │ ├── BlazorTransitionableRouteDemoServer.csproj │ ├── BlazorTransitionableRouteDemoServer.sln │ ├── Data │ │ ├── WeatherForecast.cs │ │ └── WeatherForecastService.cs │ ├── Pages │ │ ├── Counter.razor │ │ ├── Error.razor │ │ ├── FetchData.razor │ │ ├── Index.razor │ │ ├── WeatherDetail.razor │ │ └── _Host.cshtml │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Shared │ │ ├── MainLayout.razor │ │ ├── MyRouteTransitionInvoker.cs │ │ ├── MyViewLayout.razor │ │ ├── NavMenu.razor │ │ └── SurveyPrompt.razor │ ├── Startup.cs │ ├── _Imports.razor │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ │ ├── css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ └── site.css │ │ ├── favicon.ico │ │ └── jsInterop.js │ └── BlazorTransitionableRouteDemoWasm │ ├── BlazorTransitionableRouteDemoWasm.sln │ ├── Client │ ├── App.razor │ ├── BlazorTransitionableRouteDemoWasm.Client.csproj │ ├── Pages │ │ ├── Counter.razor │ │ ├── FetchData.razor │ │ ├── Index.razor │ │ └── WeatherDetail.razor │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Shared │ │ ├── MainLayout.razor │ │ ├── MyViewLayout.razor │ │ ├── NavMenu.razor │ │ └── SurveyPrompt.razor │ ├── _Imports.razor │ └── wwwroot │ │ ├── css │ │ ├── app.css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ └── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ │ ├── favicon.ico │ │ ├── icon-512.png │ │ ├── index.html │ │ ├── manifest.json │ │ ├── service-worker.js │ │ └── service-worker.published.js │ ├── Server │ ├── BlazorTransitionableRouteDemoWasm.Server.csproj │ ├── Controllers │ │ └── WeatherForecastController.cs │ ├── Pages │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── Shared │ │ │ └── _Layout.cshtml │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json │ └── Shared │ ├── BlazorTransitionableRouteDemoWasm.Shared.csproj │ └── WeatherForecast.cs ├── src └── BlazorTransitionableRoute │ ├── BlazorTransitionableRoute.csproj │ ├── DefaultRouteTransitionInvoker.cs │ ├── IJsInterop.cs │ ├── IRouteTransitionInvoker.cs │ ├── ITransitionableLayoutComponent.cs │ ├── JsInterop.cs │ ├── Transition.cs │ ├── TransitionableLayoutComponent.cs │ ├── TransitionableRouteLayout.razor │ ├── TransitionableRoutePrimary.razor │ ├── TransitionableRoutePrimary.razor.cs │ ├── TransitionableRouteSecondary.razor │ ├── TransitionableRouteView.razor │ ├── _Imports.razor │ └── wwwroot │ └── jsInterop.js └── test └── BlazorTransitionableRouteTest ├── BlazorTransitionableRouteTest.csproj ├── StubJsInterop.cs ├── StubJsRuntime.cs ├── StubRouteTransitionInvoker.cs ├── StubType1.cs ├── StubType2.cs ├── StubType3.cs ├── TransitionableRouteFixture.cs ├── TransitionableRouteForgetStateTest.cs └── TransitionableRouteTest.cs /.github/workflows/publishToNugetOnMaster.yml: -------------------------------------------------------------------------------- 1 | name: Publish Packages 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Setup .NET Core 14 | uses: actions/setup-dotnet@v1 15 | with: 16 | dotnet-version: '6.0.x' 17 | - name: Install dependencies 18 | run: dotnet restore 19 | - name: Build 20 | run: dotnet build --configuration Release --no-restore 21 | - name: Publish BlazorTransitionableRoute 22 | uses: brandedoutcast/publish-nuget@v2.5.2 23 | with: 24 | PROJECT_FILE_PATH: src/BlazorTransitionableRoute/BlazorTransitionableRoute.csproj 25 | NUGET_KEY: ${{secrets.NUGET_API_KEY}} 26 | PACKAGE_NAME: BlazorTransitionableRoute 27 | 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 JByfordRew 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /demo/BlazorTransitionableRouteDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/BlazorTransitionableRouteDemo.gif -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Sorry, there's nothing at this address.

14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 74e33aa6-0801-412e-8789-474f918fbcec 6 | Linux 7 | . 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.1.32328.378 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTransitionableRouteDemoServer", "BlazorTransitionableRouteDemoServer.csproj", "{BBE43256-5D4E-4C1A-864C-73A3EC28CAB7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {BBE43256-5D4E-4C1A-864C-73A3EC28CAB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {BBE43256-5D4E-4C1A-864C-73A3EC28CAB7}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {BBE43256-5D4E-4C1A-864C-73A3EC28CAB7}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {BBE43256-5D4E-4C1A-864C-73A3EC28CAB7}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8474EB4A-5E13-48E2-8388-3BB0B652E63E} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorTransitionableRouteDemoServer.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorTransitionableRouteDemoServer.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | EXPOSE 443 7 | 8 | FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 9 | WORKDIR /src 10 | COPY ["BlazorTransitionableRouteDemoServer.csproj", "."] 11 | RUN dotnet restore "./BlazorTransitionableRouteDemoServer.csproj" 12 | COPY . . 13 | WORKDIR "/src/." 14 | RUN dotnet build "BlazorTransitionableRouteDemoServer.csproj" -c Release -o /app/build 15 | 16 | FROM build AS publish 17 | RUN dotnet publish "BlazorTransitionableRouteDemoServer.csproj" -c Release -o /app/publish 18 | 19 | FROM base AS final 20 | WORKDIR /app 21 | COPY --from=publish /app/publish . 22 | ENTRYPOINT ["dotnet", "BlazorTransitionableRouteDemoServer.dll"] -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using Microsoft.Extensions.Logging; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Diagnostics; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace BlazorTransitionableRouteDemoServer.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | [IgnoreAntiforgeryToken] 14 | public class ErrorModel : PageModel 15 | { 16 | public string RequestId { get; set; } 17 | 18 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 19 | 20 | private readonly ILogger _logger; 21 | 22 | public ErrorModel(ILogger logger) 23 | { 24 | _logger = logger; 25 | } 26 | 27 | public void OnGet() 28 | { 29 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/weatherdetail/{Date}/{Temp}/{Summary}" 2 | 3 |

WeatherDetail

4 | 5 |

Date: @Date

6 |

Temp: @Temp

7 |

Summary: @Summary

8 | 9 | @code { 10 | [Parameter] 11 | public string Date { get; set; } 12 | 13 | [Parameter] 14 | public string Temp { get; set; } 15 | 16 | [Parameter] 17 | public string Summary { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Hosting; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace BlazorTransitionableRouteDemoServer 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:48714", 7 | "sslPort": 44373 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorTransitionableRouteDemoServer": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "dotnetRunMessages": "true", 25 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 26 | }, 27 | "Docker": { 28 | "commandName": "Docker", 29 | "launchBrowser": true, 30 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 31 | "publishAllPorts": true, 32 | "useSSL": true 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 |
10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor.css: -------------------------------------------------------------------------------- 1 | .page { 2 | position: relative; 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | .main { 8 | flex: 1; 9 | } 10 | 11 | .sidebar { 12 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 13 | } 14 | 15 | .top-row { 16 | background-color: #f7f7f7; 17 | border-bottom: 1px solid #d6d5d5; 18 | justify-content: flex-end; 19 | height: 3.5rem; 20 | display: flex; 21 | align-items: center; 22 | } 23 | 24 | .top-row ::deep a, .top-row .btn-link { 25 | white-space: nowrap; 26 | margin-left: 1.5rem; 27 | } 28 | 29 | .top-row a:first-child { 30 | overflow: hidden; 31 | text-overflow: ellipsis; 32 | } 33 | 34 | @media (max-width: 640.98px) { 35 | .top-row:not(.auth) { 36 | display: none; 37 | } 38 | 39 | .top-row.auth { 40 | justify-content: space-between; 41 | } 42 | 43 | .top-row a, .top-row .btn-link { 44 | margin-left: 0; 45 | } 46 | } 47 | 48 | @media (min-width: 641px) { 49 | .page { 50 | flex-direction: row; 51 | } 52 | 53 | .sidebar { 54 | width: 250px; 55 | height: 100vh; 56 | position: sticky; 57 | top: 0; 58 | } 59 | 60 | .top-row { 61 | position: sticky; 62 | top: 0; 63 | z-index: 1; 64 | } 65 | 66 | .main > div { 67 | padding-left: 2rem !important; 68 | padding-right: 1.5rem !important; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Shared/MyViewLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits TransitionableLayoutComponent 2 | 3 |
4 | @Body 5 |
6 | 7 | 12 | 13 | @if (!Transition.FirstRender) 14 | { 15 | 20 | } 21 | 22 | @code { 23 | private string transitioningClass => Transition.IntoView ? "transition-in" : "transition-out"; 24 | } -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Shared/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | .navbar-toggler { 2 | background-color: rgba(255, 255, 255, 0.1); 3 | } 4 | 5 | .top-row { 6 | height: 3.5rem; 7 | background-color: rgba(0,0,0,0.4); 8 | } 9 | 10 | .navbar-brand { 11 | font-size: 1.1rem; 12 | } 13 | 14 | .oi { 15 | width: 2rem; 16 | font-size: 1.1rem; 17 | vertical-align: text-top; 18 | top: -2px; 19 | } 20 | 21 | .nav-item { 22 | font-size: 0.9rem; 23 | padding-bottom: 0.5rem; 24 | } 25 | 26 | .nav-item:first-of-type { 27 | padding-top: 1rem; 28 | } 29 | 30 | .nav-item:last-of-type { 31 | padding-bottom: 1rem; 32 | } 33 | 34 | .nav-item ::deep a { 35 | color: #d7d7d7; 36 | border-radius: 4px; 37 | height: 3rem; 38 | display: flex; 39 | align-items: center; 40 | line-height: 3rem; 41 | } 42 | 43 | .nav-item ::deep a.active { 44 | background-color: rgba(255,255,255,0.25); 45 | color: white; 46 | } 47 | 48 | .nav-item ::deep a:hover { 49 | background-color: rgba(255,255,255,0.1); 50 | color: white; 51 | } 52 | 53 | @media (min-width: 641px) { 54 | .navbar-toggler { 55 | display: none; 56 | } 57 | 58 | .collapse { 59 | /* Never collapse the sidebar for wide screens */ 60 | display: block; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using BlazorTransitionableRouteDemoServer 10 | @using BlazorTransitionableRouteDemoServer.Shared 11 | 12 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | .content { 18 | padding-top: 1.1rem; 19 | } 20 | 21 | .valid.modified:not([type=checkbox]) { 22 | outline: 1px solid #26b050; 23 | } 24 | 25 | .invalid { 26 | outline: 1px solid red; 27 | } 28 | 29 | .validation-message { 30 | color: red; 31 | } 32 | 33 | #blazor-error-ui { 34 | background: lightyellow; 35 | bottom: 0; 36 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 37 | display: none; 38 | left: 0; 39 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 40 | position: fixed; 41 | width: 100%; 42 | z-index: 1000; 43 | } 44 | 45 | #blazor-error-ui .dismiss { 46 | cursor: pointer; 47 | position: absolute; 48 | right: 0.75rem; 49 | top: 0.5rem; 50 | } 51 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoServer/wwwroot/jsInterop.js: -------------------------------------------------------------------------------- 1 | window.yourJsInterop = { 2 | transitionFunction: function (effectOut, effectIn) { 3 | 4 | setTimeout(() => { 5 | let transitionIn = document.getElementsByClassName('transition-in')[0]; 6 | let transitionOut = document.getElementsByClassName('transition-out')[0]; 7 | 8 | if (transitionIn && transitionOut) { 9 | 10 | transitionOut.classList.remove('transition-out'); 11 | transitionOut.classList.add( 12 | "animate__" + effectOut, 13 | "animate__faster", 14 | "animate__animated" 15 | ); 16 | 17 | transitionIn.classList.remove('transition-in'); 18 | transitionIn.classList.add( 19 | "animate__" + effectIn, 20 | "animate__faster", 21 | "animate__animated" 22 | ); 23 | } 24 | }, 0); 25 | } 26 | } -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Sorry, there's nothing at this address.

14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/BlazorTransitionableRouteDemoWasm.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | service-worker-assets.js 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Pages/WeatherDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/weatherdetail/{Date}/{Temp}/{Summary}" 2 | 3 |

WeatherDetail

4 | 5 |

Date: @Date

6 |

Temp: @Temp

7 |

Summary: @Summary

8 | 9 | @code { 10 | [Parameter] 11 | public string Date { get; set; } 12 | 13 | [Parameter] 14 | public string Temp { get; set; } 15 | 16 | [Parameter] 17 | public string Summary { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Net.Http; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace BlazorTransitionableRouteDemoWasm.Client 12 | { 13 | public class Program 14 | { 15 | public static async Task Main(string[] args) 16 | { 17 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 18 | builder.RootComponents.Add("#app"); 19 | 20 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 21 | 22 | builder.Services.AddScoped(); 23 | 24 | await builder.Build().RunAsync(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:8353", 7 | "sslPort": 44311 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorTransitionableRouteDemoWasm": { 20 | "commandName": "Project", 21 | "dotnetRunMessages": "true", 22 | "launchBrowser": true, 23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 |
10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | .navbar-toggler { 2 | background-color: rgba(255, 255, 255, 0.1); 3 | } 4 | 5 | .top-row { 6 | height: 3.5rem; 7 | background-color: rgba(0,0,0,0.4); 8 | } 9 | 10 | .navbar-brand { 11 | font-size: 1.1rem; 12 | } 13 | 14 | .oi { 15 | width: 2rem; 16 | font-size: 1.1rem; 17 | vertical-align: text-top; 18 | top: -2px; 19 | } 20 | 21 | .nav-item { 22 | font-size: 0.9rem; 23 | padding-bottom: 0.5rem; 24 | } 25 | 26 | .nav-item:first-of-type { 27 | padding-top: 1rem; 28 | } 29 | 30 | .nav-item:last-of-type { 31 | padding-bottom: 1rem; 32 | } 33 | 34 | .nav-item ::deep a { 35 | color: #d7d7d7; 36 | border-radius: 4px; 37 | height: 3rem; 38 | display: flex; 39 | align-items: center; 40 | line-height: 3rem; 41 | } 42 | 43 | .nav-item ::deep a.active { 44 | background-color: rgba(255,255,255,0.25); 45 | color: white; 46 | } 47 | 48 | .nav-item ::deep a:hover { 49 | background-color: rgba(255,255,255,0.1); 50 | color: white; 51 | } 52 | 53 | @media (min-width: 641px) { 54 | .navbar-toggler { 55 | display: none; 56 | } 57 | 58 | .collapse { 59 | /* Never collapse the sidebar for wide screens */ 60 | display: block; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.Web.Virtualization 7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 8 | @using Microsoft.JSInterop 9 | @using BlazorTransitionableRouteDemoWasm.Client 10 | @using BlazorTransitionableRouteDemoWasm.Client.Shared 11 | 12 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/app.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | .content { 18 | padding-top: 1.1rem; 19 | } 20 | 21 | .valid.modified:not([type=checkbox]) { 22 | outline: 1px solid #26b050; 23 | } 24 | 25 | .invalid { 26 | outline: 1px solid red; 27 | } 28 | 29 | .validation-message { 30 | color: red; 31 | } 32 | 33 | #blazor-error-ui { 34 | background: lightyellow; 35 | bottom: 0; 36 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 37 | display: none; 38 | left: 0; 39 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 40 | position: fixed; 41 | width: 100%; 42 | z-index: 1000; 43 | } 44 | 45 | #blazor-error-ui .dismiss { 46 | cursor: pointer; 47 | position: absolute; 48 | right: 0.75rem; 49 | top: 0.5rem; 50 | } 51 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorTransitionableRouteDemoWasm 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
Loading...
20 | 21 |
22 | An unhandled error has occurred. 23 | Reload 24 | 🗙 25 |
26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorTransitionableRouteDemoWasm", 3 | "short_name": "BlazorTransitionableRouteDemoWasm", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "icons": [ 9 | { 10 | "src": "icon-512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/BlazorTransitionableRouteDemoWasm.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRouteDemoWasm.Shared; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.Extensions.Logging; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace BlazorTransitionableRouteDemoWasm.Server.Controllers 10 | { 11 | [ApiController] 12 | [Route("[controller]")] 13 | public class WeatherForecastController : ControllerBase 14 | { 15 | private static readonly string[] Summaries = new[] 16 | { 17 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 18 | }; 19 | 20 | private readonly ILogger _logger; 21 | 22 | public WeatherForecastController(ILogger logger) 23 | { 24 | _logger = logger; 25 | } 26 | 27 | [HttpGet] 28 | public IEnumerable Get() 29 | { 30 | var rng = new Random(); 31 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 32 | { 33 | Date = DateTime.Now.AddDays(index), 34 | TemperatureC = rng.Next(-20, 55), 35 | Summary = Summaries[rng.Next(Summaries.Length)] 36 | }) 37 | .ToArray(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using Microsoft.Extensions.Logging; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Diagnostics; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace BlazorTransitionableRouteDemoWasm.Server.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | [IgnoreAntiforgeryToken] 14 | public class ErrorModel : PageModel 15 | { 16 | public string RequestId { get; set; } 17 | 18 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 19 | 20 | private readonly ILogger _logger; 21 | 22 | public ErrorModel(ILogger logger) 23 | { 24 | _logger = logger; 25 | } 26 | 27 | public void OnGet() 28 | { 29 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Hosting; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace BlazorTransitionableRouteDemoWasm.Server 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:8353", 7 | "sslPort": 44311 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorTransitionableRouteDemoWasm.Server": { 20 | "commandName": "Project", 21 | "dotnetRunMessages": "true", 22 | "launchBrowser": true, 23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Shared/BlazorTransitionableRouteDemoWasm.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/aspnetcore5.0/v3/BlazorTransitionableRouteDemoWasm/Shared/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlazorTransitionableRouteDemoWasm.Shared 6 | { 7 | public class WeatherForecast 8 | { 9 | public DateTime Date { get; set; } 10 | 11 | public int TemperatureC { get; set; } 12 | 13 | public string Summary { get; set; } 14 | 15 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Not found 16 | 17 |

Sorry, there's nothing at this address.

18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Areas/Identity/Pages/Account/LogOut.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @using Microsoft.AspNetCore.Identity 3 | @attribute [IgnoreAntiforgeryToken] 4 | @inject SignInManager SignInManager 5 | @functions { 6 | public async Task OnPost() 7 | { 8 | if (SignInManager.IsSignedIn(User)) 9 | { 10 | await SignInManager.SignOutAsync(); 11 | } 12 | 13 | return Redirect("~/"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Areas/Identity/Pages/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | 6 | 28 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | aspnet-BlazorTransitionableRouteDemoServer-11461F12-7E71-4527-BBC9-42FF794AAA67 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace BlazorTransitionableRouteDemoServer.Data 5 | { 6 | public class ApplicationDbContext : IdentityDbContext 7 | { 8 | public ApplicationDbContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorTransitionableRouteDemoServer.Data 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorTransitionableRouteDemoServer.Data 2 | { 3 | public class WeatherForecastService 4 | { 5 | private static readonly string[] Summaries = new[] 6 | { 7 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 8 | }; 9 | 10 | public Task GetForecastAsync(DateTime startDate) 11 | { 12 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 13 | { 14 | Date = startDate.AddDays(index), 15 | TemperatureC = Random.Shared.Next(-20, 55), 16 | Summary = Summaries[Random.Shared.Next(Summaries.Length)] 17 | }).ToArray()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 | Counter 4 | 5 |

Counter

6 | 7 |

Current count: @currentCount

8 | 9 | 10 | 11 | @code { 12 | private int currentCount = 0; 13 | 14 | private void IncrementCount() 15 | { 16 | currentCount++; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace BlazorTransitionableRouteDemoServer.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Index 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/weatherdetail/{Date}/{Temp}/{Summary}" 2 | 3 |

WeatherDetail

4 | 5 |

Date: @Date

6 |

Temp: @Temp

7 |

Summary: @Summary

8 | 9 | @code { 10 | [Parameter] 11 | public string Date { get; set; } 12 | 13 | [Parameter] 14 | public string Temp { get; set; } 15 | 16 | [Parameter] 17 | public string Summary { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorTransitionableRouteDemoServer.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = "_Layout"; 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | @namespace BlazorTransitionableRouteDemoServer.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @RenderBody() 19 | 20 |
21 | 22 | An error has occurred. This application may no longer respond until reloaded. 23 | 24 | 25 | An unhandled exception has occurred. See browser dev tools for details. 26 | 27 | Reload 28 | 🗙 29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:14337", 7 | "sslPort": 44320 8 | } 9 | }, 10 | "profiles": { 11 | "BlazorTransitionableRouteDemoServer": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "https://localhost:7061;http://localhost:5061", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | Hello, @context.User.Identity?.Name! 4 |
5 | 6 |
7 |
8 | 9 | Register 10 | Log in 11 | 12 |
13 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | BlazorTransitionableRouteDemoServer 4 | 5 |
6 | 9 | 10 |
11 |
12 | 13 | About 14 |
15 | 16 |
17 | @Body 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/MyAuthorizeRouteView.razor: -------------------------------------------------------------------------------- 1 | @if (Transition?.RouteData != null) 2 | { 3 | 4 | 5 | 6 | } 7 | 8 | @code { 9 | [CascadingParameter] 10 | public Transition Transition { get; set; } 11 | 12 | [Parameter] 13 | public Type DefaultLayout { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  9 | 10 |
11 | 28 |
29 | 30 | @code { 31 | private bool collapseNavMenu = true; 32 | 33 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 34 | 35 | private void ToggleNavMenu() 36 | { 37 | collapseNavMenu = !collapseNavMenu; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | .navbar-toggler { 2 | background-color: rgba(255, 255, 255, 0.1); 3 | } 4 | 5 | .top-row { 6 | height: 3.5rem; 7 | background-color: rgba(0,0,0,0.4); 8 | } 9 | 10 | .navbar-brand { 11 | font-size: 1.1rem; 12 | } 13 | 14 | .oi { 15 | width: 2rem; 16 | font-size: 1.1rem; 17 | vertical-align: text-top; 18 | top: -2px; 19 | } 20 | 21 | .nav-item { 22 | font-size: 0.9rem; 23 | padding-bottom: 0.5rem; 24 | } 25 | 26 | .nav-item:first-of-type { 27 | padding-top: 1rem; 28 | } 29 | 30 | .nav-item:last-of-type { 31 | padding-bottom: 1rem; 32 | } 33 | 34 | .nav-item ::deep a { 35 | color: #d7d7d7; 36 | border-radius: 4px; 37 | height: 3rem; 38 | display: flex; 39 | align-items: center; 40 | line-height: 3rem; 41 | } 42 | 43 | .nav-item ::deep a.active { 44 | background-color: rgba(255,255,255,0.25); 45 | color: white; 46 | } 47 | 48 | .nav-item ::deep a:hover { 49 | background-color: rgba(255,255,255,0.1); 50 | color: white; 51 | } 52 | 53 | @media (min-width: 641px) { 54 | .navbar-toggler { 55 | display: none; 56 | } 57 | 58 | .collapse { 59 | /* Never collapse the sidebar for wide screens */ 60 | display: block; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 | 
2 | 3 | @Title 4 | 5 | 6 | Please take our 7 | brief survey 8 | 9 | and tell us what you think. 10 |
11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string? Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.JSInterop 9 | @using BlazorTransitionableRouteDemoServer 10 | @using BlazorTransitionableRouteDemoServer.Shared 11 | 12 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft.AspNetCore": "Warning" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorTransitionableRouteDemoServer-11461F12-7E71-4527-BBC9-42FF794AAA67;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "AllowedHosts": "*" 12 | } 13 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Not found 16 | 17 |

Sorry, there's nothing at this address.

18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/BlazorTransitionableRouteDemoWasm.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | service-worker-assets.js 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Pages/Authentication.razor: -------------------------------------------------------------------------------- 1 | @page "/authentication/{action}" 2 | @using Microsoft.AspNetCore.Components.WebAssembly.Authentication 3 | 4 | 5 | @code{ 6 | [Parameter] public string? Action { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 | Counter 4 | 5 |

Counter

6 | 7 |

Current count: @currentCount

8 | 9 | 10 | 11 | @code { 12 | private int currentCount = 0; 13 | 14 | private void IncrementCount() 15 | { 16 | currentCount++; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Index 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Pages/WeatherDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/weatherdetail/{Date}/{Temp}/{Summary}" 2 | 3 |

WeatherDetail

4 | 5 |

Date: @Date

6 |

Temp: @Temp

7 |

Summary: @Summary

8 | 9 | @code { 10 | [Parameter] 11 | public string Date { get; set; } 12 | 13 | [Parameter] 14 | public string Temp { get; set; } 15 | 16 | [Parameter] 17 | public string Summary { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Program.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRouteDemoWasm.Client; 2 | using Microsoft.AspNetCore.Components.Web; 3 | using Microsoft.AspNetCore.Components.WebAssembly.Authentication; 4 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 5 | 6 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 7 | builder.RootComponents.Add("#app"); 8 | builder.RootComponents.Add("head::after"); 9 | 10 | builder.Services.AddHttpClient("BlazorTransitionableRouteDemoWasm.ServerAPI", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)) 11 | .AddHttpMessageHandler(); 12 | 13 | // Supply HttpClient instances that include access tokens when making requests to the server project 14 | builder.Services.AddScoped(sp => sp.GetRequiredService().CreateClient("BlazorTransitionableRouteDemoWasm.ServerAPI")); 15 | 16 | builder.Services.AddApiAuthorization(); 17 | 18 | builder.Services.AddScoped(); 19 | 20 | await builder.Build().RunAsync(); 21 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:39551", 7 | "sslPort": 44359 8 | } 9 | }, 10 | "profiles": { 11 | "BlazorTransitionableRouteDemoWasm": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 16 | "applicationUrl": "https://localhost:7179;http://localhost:5179", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Authorization 2 | @using Microsoft.AspNetCore.Components.WebAssembly.Authentication 3 | 4 | @inject NavigationManager Navigation 5 | @inject SignOutSessionStateManager SignOutManager 6 | 7 | 8 | 9 | Hello, @context.User.Identity?.Name! 10 | 11 | 12 | 13 | Register 14 | Log in 15 | 16 | 17 | 18 | @code{ 19 | private async Task BeginSignOut(MouseEventArgs args) 20 | { 21 | await SignOutManager.SetSignOutState(); 22 | Navigation.NavigateTo("authentication/logout"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 |
10 | 11 | About 12 |
13 | 14 |
15 | @Body 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/MyAuthorizeRouteView.razor: -------------------------------------------------------------------------------- 1 | @if (Transition?.RouteData != null) 2 | { 3 | 4 | 5 | 6 | @if (context.User.Identity?.IsAuthenticated != true) 7 | { 8 | 9 | } 10 | else 11 | { 12 |

You are not authorized to access this resource.

13 | } 14 |
15 |
16 |
17 | } 18 | 19 | @code { 20 | [CascadingParameter] 21 | public Transition Transition { get; set; } 22 | 23 | [Parameter] 24 | public Type DefaultLayout { get; set; } 25 | } 26 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  9 | 10 |
11 | 28 |
29 | 30 | @code { 31 | private bool collapseNavMenu = true; 32 | 33 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 34 | 35 | private void ToggleNavMenu() 36 | { 37 | collapseNavMenu = !collapseNavMenu; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | .navbar-toggler { 2 | background-color: rgba(255, 255, 255, 0.1); 3 | } 4 | 5 | .top-row { 6 | height: 3.5rem; 7 | background-color: rgba(0,0,0,0.4); 8 | } 9 | 10 | .navbar-brand { 11 | font-size: 1.1rem; 12 | } 13 | 14 | .oi { 15 | width: 2rem; 16 | font-size: 1.1rem; 17 | vertical-align: text-top; 18 | top: -2px; 19 | } 20 | 21 | .nav-item { 22 | font-size: 0.9rem; 23 | padding-bottom: 0.5rem; 24 | } 25 | 26 | .nav-item:first-of-type { 27 | padding-top: 1rem; 28 | } 29 | 30 | .nav-item:last-of-type { 31 | padding-bottom: 1rem; 32 | } 33 | 34 | .nav-item ::deep a { 35 | color: #d7d7d7; 36 | border-radius: 4px; 37 | height: 3rem; 38 | display: flex; 39 | align-items: center; 40 | line-height: 3rem; 41 | } 42 | 43 | .nav-item ::deep a.active { 44 | background-color: rgba(255,255,255,0.25); 45 | color: white; 46 | } 47 | 48 | .nav-item ::deep a:hover { 49 | background-color: rgba(255,255,255,0.1); 50 | color: white; 51 | } 52 | 53 | @media (min-width: 641px) { 54 | .navbar-toggler { 55 | display: none; 56 | } 57 | 58 | .collapse { 59 | /* Never collapse the sidebar for wide screens */ 60 | display: block; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/RedirectToLogin.razor: -------------------------------------------------------------------------------- 1 | @inject NavigationManager Navigation 2 | 3 | @code { 4 | protected override void OnInitialized() 5 | { 6 | Navigation.NavigateTo($"authentication/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 | 
2 | 3 | @Title 4 | 5 | 6 | Please take our 7 | brief survey 8 | 9 | and tell us what you think. 10 |
11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string? Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.AspNetCore.Components.Web.Virtualization 8 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 9 | @using Microsoft.JSInterop 10 | @using BlazorTransitionableRouteDemoWasm.Client 11 | @using BlazorTransitionableRouteDemoWasm.Client.Shared 12 | 13 | @using BlazorTransitionableRoute 14 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-192.png -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | BlazorTransitionableRouteDemoWasm 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
Loading...
20 | 21 |
22 | An unhandled error has occurred. 23 | Reload 24 | 🗙 25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorTransitionableRouteDemoWasm", 3 | "short_name": "BlazorTransitionableRouteDemoWasm", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "prefer_related_applications": false, 9 | "icons": [ 10 | { 11 | "src": "icon-512.png", 12 | "type": "image/png", 13 | "sizes": "512x512" 14 | }, 15 | { 16 | "src": "icon-192.png", 17 | "type": "image/png", 18 | "sizes": "192x192" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Client/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using BlazorTransitionableRouteDemoWasm.Server.Models 3 | @inject SignInManager SignInManager 4 | @inject UserManager UserManager 5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 6 | 7 | @{ 8 | var returnUrl = "/"; 9 | if (Context.Request.Query.TryGetValue("returnUrl", out var existingUrl)) { 10 | returnUrl = existingUrl; 11 | } 12 | } 13 | 14 | 36 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/BlazorTransitionableRouteDemoWasm.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | BlazorTransitionableRouteDemoWasm.Server-9797A10C-E561-42D7-AF56-79FCCD30DBEF 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Controllers/OidcConfigurationController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.ApiAuthorization.IdentityServer; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | namespace BlazorTransitionableRouteDemoWasm.Server.Controllers 5 | { 6 | public class OidcConfigurationController : Controller 7 | { 8 | private readonly ILogger _logger; 9 | 10 | public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger logger) 11 | { 12 | ClientRequestParametersProvider = clientRequestParametersProvider; 13 | _logger = logger; 14 | } 15 | 16 | public IClientRequestParametersProvider ClientRequestParametersProvider { get; } 17 | 18 | [HttpGet("_configuration/{clientId}")] 19 | public IActionResult GetClientRequestParameters([FromRoute] string clientId) 20 | { 21 | var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId); 22 | return Ok(parameters); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRouteDemoWasm.Shared; 2 | using Microsoft.AspNetCore.Authorization; 3 | using Microsoft.AspNetCore.Mvc; 4 | 5 | namespace BlazorTransitionableRouteDemoWasm.Server.Controllers 6 | { 7 | [Authorize] 8 | [ApiController] 9 | [Route("[controller]")] 10 | public class WeatherForecastController : ControllerBase 11 | { 12 | private static readonly string[] Summaries = new[] 13 | { 14 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 15 | }; 16 | 17 | private readonly ILogger _logger; 18 | 19 | public WeatherForecastController(ILogger logger) 20 | { 21 | _logger = logger; 22 | } 23 | 24 | [HttpGet] 25 | public IEnumerable Get() 26 | { 27 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 28 | { 29 | Date = DateTime.Now.AddDays(index), 30 | TemperatureC = Random.Shared.Next(-20, 55), 31 | Summary = Summaries[Random.Shared.Next(Summaries.Length)] 32 | }) 33 | .ToArray(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRouteDemoWasm.Server.Models; 2 | using Duende.IdentityServer.EntityFramework.Options; 3 | using Microsoft.AspNetCore.ApiAuthorization.IdentityServer; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.Extensions.Options; 6 | 7 | namespace BlazorTransitionableRouteDemoWasm.Server.Data 8 | { 9 | public class ApplicationDbContext : ApiAuthorizationDbContext 10 | { 11 | public ApplicationDbContext( 12 | DbContextOptions options, 13 | IOptions operationalStoreOptions) : base(options, operationalStoreOptions) 14 | { 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Models/ApplicationUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | 3 | namespace BlazorTransitionableRouteDemoWasm.Server.Models 4 | { 5 | public class ApplicationUser : IdentityUser 6 | { 7 | } 8 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace BlazorTransitionableRouteDemoWasm.Server.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:39551", 7 | "sslPort": 44359 8 | } 9 | }, 10 | "profiles": { 11 | "BlazorTransitionableRouteDemoWasm.Server": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 16 | "applicationUrl": "https://localhost:7179;http://localhost:5179", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/Readme.txt: -------------------------------------------------------------------------------- 1 | This code includes a dependency on Duende IdentityServer. 2 | This is an open source product with a reciprocal license agreement. If you plan to use Duende IdentityServer in production this may require a license fee. 3 | To see how to use Azure Active Directory for your identity please see https://aka.ms/aspnetidentityserver 4 | To see if you require a commercial license for Duende IdentityServer please see https://aka.ms/identityserverlicense 5 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "IdentityServer": { 9 | "Key": { 10 | "Type": "Development" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorTransitionableRouteDemoWasm.Server-9797A10C-E561-42D7-AF56-79FCCD30DBEF;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "IdentityServer": { 12 | "Clients": { 13 | "BlazorTransitionableRouteDemoWasm.Client": { 14 | "Profile": "IdentityServerSPA" 15 | } 16 | } 17 | }, 18 | "AllowedHosts": "*" 19 | } 20 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Shared/BlazorTransitionableRouteDemoWasm.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoWasm/Shared/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorTransitionableRouteDemoWasm.Shared 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public string? Summary { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | } 13 | } -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Sorry, there's nothing at this address.

16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.1.32328.378 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTransitionableRouteDemoServer", "BlazorTransitionableRouteDemoServer.csproj", "{98B7D8AA-973B-49FD-9FC6-25186E7A559C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {44E49E28-43A6-4DFA-8B82-6754B50B4C81} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorTransitionableRouteDemoServer.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorTransitionableRouteDemoServer.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

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

-------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | 3 | @using BlazorTransitionableRouteDemoServer.Data 4 | @inject WeatherForecastService ForecastService 5 | 6 |

Weather forecast

7 | 8 |

This component demonstrates fetching data from a service.

9 | 10 | @if (forecasts == null) 11 | { 12 |

Loading...

13 | } 14 | else 15 | { 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach (var forecast in forecasts) 27 | { 28 | 29 | 30 | 31 | 32 | 33 | 34 | } 35 | 36 |
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
37 | } 38 | 39 | @code { 40 | private WeatherForecast[] forecasts; 41 | 42 | protected override async Task OnInitializedAsync() 43 | { 44 | forecasts = await ForecastService.GetForecastAsync(DateTime.Now); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorTransitionableRouteDemoServer.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = null; 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | BlazorTransitionableRouteDemoServer 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | An error has occurred. This application may no longer respond until reloaded. 29 | 30 | 31 | An unhandled exception has occurred. See browser dev tools for details. 32 | 33 | Reload 34 | 🗙 35 |
36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace BlazorTransitionableRouteDemoServer 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:59765", 7 | "sslPort": 44394 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorTransitionableRouteDemoServer": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Shared/MyRouteTransitionInvoker.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRoute; 2 | using Microsoft.JSInterop; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorTransitionableRouteDemoServer.Shared 6 | { 7 | public class MyRouteTransitionInvoker : IRouteTransitionInvoker 8 | { 9 | private readonly IJSRuntime jsRuntime; 10 | 11 | public MyRouteTransitionInvoker(IJSRuntime jsRuntime) 12 | { 13 | this.jsRuntime = jsRuntime; 14 | } 15 | 16 | public async Task InvokeRouteTransitionAsync(Transition transition) 17 | { 18 | await jsRuntime.InvokeVoidAsync("window.yourJsInterop.transitionFunction", transition.Backwards); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Shared/MyViewLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits TransitionableLayoutComponent 2 | 3 |
4 | @Body 5 |
6 | 7 | 12 | 13 | @if (!Transition.FirstRender) 14 | { 15 | 20 | } 21 | 22 | @code { 23 | private string transitioningClass => Transition.IntoView ? "transition-in" : "transition-out"; 24 | } -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorTransitionableRouteDemoServer 9 | @using BlazorTransitionableRouteDemoServer.Shared 10 | 11 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoServer/wwwroot/jsInterop.js: -------------------------------------------------------------------------------- 1 | window.yourJsInterop = { 2 | transitionFunction: function (back) { 3 | 4 | setTimeout(() => { 5 | let transitionIn = document.getElementsByClassName('transition-in')[0]; 6 | let transitionOut = document.getElementsByClassName('transition-out')[0]; 7 | 8 | let direction = back ? "Up" : "Down"; 9 | 10 | if (transitionIn && transitionOut) { 11 | 12 | transitionOut.classList.remove('transition-out'); 13 | transitionOut.classList.add( 14 | "animate__fadeOut" + direction, 15 | "animate__faster", 16 | "animate__animated" 17 | ); 18 | 19 | transitionIn.classList.remove('transition-in'); 20 | transitionIn.classList.add( 21 | "animate__fadeIn" + direction, 22 | "animate__faster", 23 | "animate__animated" 24 | ); 25 | } 26 | }, 0); 27 | } 28 | } -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Sorry, there's nothing at this address.

15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/BlazorTransitionableRouteDemoWasm.Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | service-worker-assets.js 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | @using BlazorTransitionableRouteDemoWasm.Shared 3 | @inject HttpClient Http 4 | 5 |

Weather forecast

6 | 7 |

This component demonstrates fetching data from the server.

8 | 9 | @if (forecasts == null) 10 | { 11 |

Loading...

12 | } 13 | else 14 | { 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @foreach (var forecast in forecasts) 26 | { 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | 35 |
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
36 | } 37 | 38 | @code { 39 | private WeatherForecast[] forecasts; 40 | 41 | protected override async Task OnInitializedAsync() 42 | { 43 | forecasts = await Http.GetFromJsonAsync("WeatherForecast"); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | using System.Text; 6 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 7 | using Microsoft.Extensions.Configuration; 8 | using Microsoft.Extensions.DependencyInjection; 9 | using Microsoft.Extensions.Logging; 10 | using BlazorTransitionableRouteDemoWasm.Client.Shared; 11 | using BlazorTransitionableRoute; 12 | 13 | namespace BlazorTransitionableRouteDemoWasm.Client 14 | { 15 | public class Program 16 | { 17 | public static async Task Main(string[] args) 18 | { 19 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 20 | builder.RootComponents.Add("app"); 21 | 22 | builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 23 | 24 | builder.Services.AddSingleton(); 25 | 26 | await builder.Build().RunAsync(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:58907", 7 | "sslPort": 44377 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorTransitionableRouteDemoWasm": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Shared/MyViewLayout.razor: -------------------------------------------------------------------------------- 1 |  2 | @inherits TransitionableLayoutComponent 3 | 4 |
5 | @Body 6 |
7 | 8 | 13 | 14 | @code { 15 | private string transitioningDirection => Transition.Backwards ? "Up" : "Down"; 16 | 17 | private string transitioningClass => Transition.FirstRender ? "" : Transition.IntoView 18 | ? $"animate__fadeIn{transitioningDirection} animate__faster animate__animated" 19 | : $"animate__fadeOut{transitioningDirection} animate__faster animate__animated"; 20 | } -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 7 | @using Microsoft.JSInterop 8 | @using BlazorTransitionableRouteDemoWasm.Client 9 | @using BlazorTransitionableRouteDemoWasm.Client.Shared 10 | 11 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | BlazorTransitionableRouteDemoWasm 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Loading... 19 | 20 |
21 | An unhandled error has occurred. 22 | Reload 23 | 🗙 24 |
25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorTransitionableRouteDemoWasm", 3 | "short_name": "BlazorTransitionableRouteDemoWasm", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "icons": [ 9 | { 10 | "src": "icon-512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Client/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/BlazorTransitionableRouteDemoWasm.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRouteDemoWasm.Shared; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace BlazorTransitionableRouteDemoWasm.Server.Controllers 10 | { 11 | [ApiController] 12 | [Route("[controller]")] 13 | public class WeatherForecastController : ControllerBase 14 | { 15 | private static readonly string[] Summaries = new[] 16 | { 17 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 18 | }; 19 | 20 | private readonly ILogger logger; 21 | 22 | public WeatherForecastController(ILogger logger) 23 | { 24 | this.logger = logger; 25 | } 26 | 27 | [HttpGet] 28 | public IEnumerable Get() 29 | { 30 | var rng = new Random(); 31 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 32 | { 33 | Date = DateTime.Now.AddDays(index), 34 | TemperatureC = rng.Next(-20, 55), 35 | Summary = Summaries[rng.Next(Summaries.Length)] 36 | }) 37 | .ToArray(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorTransitionableRouteDemoWasm.Server.Pages.ErrorModel 3 | @{ 4 | Layout = "_Layout"; 5 | ViewData["Title"] = "Error"; 6 | } 7 | 8 |

Error.

9 |

An error occurred while processing your request.

10 | 11 | @if (Model.ShowRequestId) 12 | { 13 |

14 | Request ID: @Model.RequestId 15 |

16 | } 17 | 18 |

Development Mode

19 |

20 | Swapping to the Development environment displays detailed information about the error that occurred. 21 |

22 |

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

28 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace BlazorTransitionableRouteDemoWasm.Server.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/Pages/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | @RenderBody() 16 |
17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace BlazorTransitionableRouteDemoWasm.Server 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:58907", 7 | "sslPort": 44377 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorTransitionableRouteDemoWasm.Server": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Shared/BlazorTransitionableRouteDemoWasm.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v2/BlazorTransitionableRouteDemoWasm/Shared/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlazorTransitionableRouteDemoWasm.Shared 6 | { 7 | public class WeatherForecast 8 | { 9 | public DateTime Date { get; set; } 10 | 11 | public int TemperatureC { get; set; } 12 | 13 | public string Summary { get; set; } 14 | 15 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Sorry, there's nothing at this address.

16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/BlazorTransitionableRouteDemoServer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.1.32328.378 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorTransitionableRouteDemoServer", "BlazorTransitionableRouteDemoServer.csproj", "{98B7D8AA-973B-49FD-9FC6-25186E7A559C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {98B7D8AA-973B-49FD-9FC6-25186E7A559C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {44E49E28-43A6-4DFA-8B82-6754B50B4C81} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorTransitionableRouteDemoServer.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorTransitionableRouteDemoServer.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

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

-------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/weatherdetail/{Date}/{Temp}/{Summary}" 2 | 3 |

WeatherDetail

4 | 5 |

Date: @Date

6 |

Temp: @Temp

7 |

Summary: @Summary

8 | 9 | @code { 10 | [Parameter] 11 | public string Date { get; set; } 12 | 13 | [Parameter] 14 | public string Temp { get; set; } 15 | 16 | [Parameter] 17 | public string Summary { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace BlazorTransitionableRouteDemoServer 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:59765", 7 | "sslPort": 44394 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorTransitionableRouteDemoServer": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Shared/MyViewLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits TransitionableLayoutComponent 2 | 3 |
4 | @Body 5 |
6 | 7 | 12 | 13 | @if (!Transition.FirstRender) 14 | { 15 | 20 | } 21 | 22 | @code { 23 | private string transitioningClass => Transition.IntoView ? "transition-in" : "transition-out"; 24 | } -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorTransitionableRouteDemoServer 9 | @using BlazorTransitionableRouteDemoServer.Shared 10 | 11 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoServer/wwwroot/jsInterop.js: -------------------------------------------------------------------------------- 1 | window.yourJsInterop = { 2 | transitionFunction: function (effectOut, effectIn) { 3 | 4 | setTimeout(() => { 5 | let transitionIn = document.getElementsByClassName('transition-in')[0]; 6 | let transitionOut = document.getElementsByClassName('transition-out')[0]; 7 | 8 | if (transitionIn && transitionOut) { 9 | 10 | transitionOut.classList.remove('transition-out'); 11 | transitionOut.classList.add( 12 | "animate__" + effectOut, 13 | "animate__faster", 14 | "animate__animated" 15 | ); 16 | 17 | transitionIn.classList.remove('transition-in'); 18 | transitionIn.classList.add( 19 | "animate__" + effectIn, 20 | "animate__faster", 21 | "animate__animated" 22 | ); 23 | } 24 | }, 0); 25 | } 26 | } -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

Sorry, there's nothing at this address.

15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/BlazorTransitionableRouteDemoWasm.Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | service-worker-assets.js 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Pages/WeatherDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/weatherdetail/{Date}/{Temp}/{Summary}" 2 | 3 |

WeatherDetail

4 | 5 |

Date: @Date

6 |

Temp: @Temp

7 |

Summary: @Summary

8 | 9 | @code { 10 | [Parameter] 11 | public string Date { get; set; } 12 | 13 | [Parameter] 14 | public string Temp { get; set; } 15 | 16 | [Parameter] 17 | public string Summary { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | using System.Text; 6 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 7 | using Microsoft.Extensions.Configuration; 8 | using Microsoft.Extensions.DependencyInjection; 9 | using Microsoft.Extensions.Logging; 10 | using BlazorTransitionableRouteDemoWasm.Client.Shared; 11 | using BlazorTransitionableRoute; 12 | 13 | namespace BlazorTransitionableRouteDemoWasm.Client 14 | { 15 | public class Program 16 | { 17 | public static async Task Main(string[] args) 18 | { 19 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 20 | builder.RootComponents.Add("app"); 21 | 22 | builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 23 | 24 | builder.Services.AddSingleton(); 25 | 26 | await builder.Build().RunAsync(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:58907", 7 | "sslPort": 44377 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorTransitionableRouteDemoWasm": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 7 | @using Microsoft.JSInterop 8 | @using BlazorTransitionableRouteDemoWasm.Client 9 | @using BlazorTransitionableRouteDemoWasm.Client.Shared 10 | 11 | @using BlazorTransitionableRoute -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JByfordRew/BlazorTransitionableRoute/197f197c422e16e1f14f8fba322368bd57281a6c/demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/icon-512.png -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | BlazorTransitionableRouteDemoWasm 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Loading... 19 | 20 |
21 | An unhandled error has occurred. 22 | Reload 23 | 🗙 24 |
25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorTransitionableRouteDemoWasm", 3 | "short_name": "BlazorTransitionableRouteDemoWasm", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "icons": [ 9 | { 10 | "src": "icon-512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Client/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/BlazorTransitionableRouteDemoWasm.Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRouteDemoWasm.Shared; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace BlazorTransitionableRouteDemoWasm.Server.Controllers 10 | { 11 | [ApiController] 12 | [Route("[controller]")] 13 | public class WeatherForecastController : ControllerBase 14 | { 15 | private static readonly string[] Summaries = new[] 16 | { 17 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 18 | }; 19 | 20 | private readonly ILogger logger; 21 | 22 | public WeatherForecastController(ILogger logger) 23 | { 24 | this.logger = logger; 25 | } 26 | 27 | [HttpGet] 28 | public IEnumerable Get() 29 | { 30 | var rng = new Random(); 31 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 32 | { 33 | Date = DateTime.Now.AddDays(index), 34 | TemperatureC = rng.Next(-20, 55), 35 | Summary = Summaries[rng.Next(Summaries.Length)] 36 | }) 37 | .ToArray(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorTransitionableRouteDemoWasm.Server.Pages.ErrorModel 3 | @{ 4 | Layout = "_Layout"; 5 | ViewData["Title"] = "Error"; 6 | } 7 | 8 |

Error.

9 |

An error occurred while processing your request.

10 | 11 | @if (Model.ShowRequestId) 12 | { 13 |

14 | Request ID: @Model.RequestId 15 |

16 | } 17 | 18 |

Development Mode

19 |

20 | Swapping to the Development environment displays detailed information about the error that occurred. 21 |

22 |

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

28 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace BlazorTransitionableRouteDemoWasm.Server.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/Pages/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | @RenderBody() 16 |
17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace BlazorTransitionableRouteDemoWasm.Server 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:58907", 7 | "sslPort": 44377 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "BlazorTransitionableRouteDemoWasm.Server": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Shared/BlazorTransitionableRouteDemoWasm.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/dotnetcore3.1/v3/BlazorTransitionableRouteDemoWasm/Shared/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlazorTransitionableRouteDemoWasm.Shared 6 | { 7 | public class WeatherForecast 8 | { 9 | public DateTime Date { get; set; } 10 | 11 | public int TemperatureC { get; set; } 12 | 13 | public string Summary { get; set; } 14 | 15 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/DefaultRouteTransitionInvoker.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace BlazorTransitionableRoute 4 | { 5 | /// 6 | /// 7 | /// Use this when you handle transition behaviour 8 | /// using Blazor code and not via JavaScript interop. 9 | /// 10 | /// 11 | /// Register with dependency injection for example via 12 | /// Microsoft.Extensions.DependencyInjection.IServiceCollection 13 | /// as AddSingleton with this default implementation. 14 | /// e.g. builder.Services.AddScoped(); 15 | /// 16 | /// 17 | public class DefaultRouteTransitionInvoker : IRouteTransitionInvoker 18 | { 19 | public Task InvokeRouteTransitionAsync(Transition transition) 20 | { 21 | return Task.CompletedTask; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/IJsInterop.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace BlazorTransitionableRoute 4 | { 5 | public interface IJsInterop 6 | { 7 | Task Init(DotNetObjectReference instance, bool isActive) where T : class; 8 | } 9 | } -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/IRouteTransitionInvoker.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace BlazorTransitionableRoute 4 | { 5 | /// 6 | /// 7 | /// Provides the mechanism to implement the transition behaviour 8 | /// when a route transition occurs. 9 | /// 10 | /// 11 | /// An implementation commonly implements a JavaScript interop 12 | /// but could also use Blazor code. 13 | /// 14 | /// 15 | /// Note: if not using interop, consider 16 | /// using the and implement 17 | /// the Blazor code in you view or route container component. 18 | /// 19 | /// 20 | /// It is important to inherit the 21 | /// or implement the for your 22 | /// route container component. This is to access the 23 | /// that is provided via CascadingParameter which will allow your markup to changed 24 | /// for transition css classes or styles etc. 25 | /// 26 | /// 27 | public interface IRouteTransitionInvoker 28 | { 29 | Task InvokeRouteTransitionAsync(Transition transition); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/ITransitionableLayoutComponent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | 3 | namespace BlazorTransitionableRoute 4 | { 5 | /// 6 | /// 7 | /// Optionally implement this interface to get access 8 | /// to the object so you can adjust 9 | /// markup to invoke transition behaviour. 10 | /// 11 | /// 12 | /// Alternatively inherit the . 13 | /// 14 | /// 15 | public interface ITransitionableLayoutComponent 16 | { 17 | /// 18 | /// Contains information on the transition behaviour adjust the view. 19 | /// 20 | [CascadingParameter] 21 | Transition Transition { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/JsInterop.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace BlazorTransitionableRoute 4 | { 5 | public class JsInterop : IJsInterop, IAsyncDisposable 6 | { 7 | private readonly Lazy> moduleTask; 8 | 9 | public JsInterop(IJSRuntime jsRuntime) 10 | { 11 | moduleTask = new(() => jsRuntime.InvokeAsync( 12 | "import", "./_content/BlazorTransitionableRoute/jsInterop.js").AsTask()); 13 | } 14 | 15 | public async Task Init(DotNetObjectReference instance, bool isActive) where T : class 16 | { 17 | var module = await moduleTask.Value; 18 | await module.InvokeVoidAsync("init", instance, isActive); 19 | } 20 | 21 | public async ValueTask DisposeAsync() 22 | { 23 | if (moduleTask.IsValueCreated) 24 | { 25 | var module = await moduleTask.Value; 26 | await module.DisposeAsync(); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/Transition.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace BlazorTransitionableRoute 7 | { 8 | public class Transition 9 | { 10 | private Transition(RouteData routeData, RouteData switchedRouteData, bool intoView, bool backwards, bool firstRender) 11 | { 12 | this.RouteData = routeData; 13 | this.SwitchedRouteData = switchedRouteData; 14 | this.IntoView = intoView; 15 | this.Backwards = backwards; 16 | this.FirstRender = firstRender; 17 | } 18 | 19 | public static Transition Create(RouteData routeData, RouteData switchedRouteData, bool intoView, bool backwards, bool firstRender) 20 | => new Transition(routeData, switchedRouteData, intoView, backwards, firstRender); 21 | 22 | public RouteData RouteData { get; } 23 | public RouteData SwitchedRouteData { get; } 24 | public bool IntoView { get; } 25 | public bool Backwards { get; } 26 | public bool FirstRender { get; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/TransitionableLayoutComponent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | 4 | namespace BlazorTransitionableRoute 5 | { 6 | public class TransitionableLayoutComponent : LayoutComponentBase, ITransitionableLayoutComponent 7 | { 8 | [CascadingParameter] 9 | public Transition Transition{ get; set; } 10 | 11 | protected (Type fromType, Type toType) TransitionType => 12 | (Transition.IntoView ? Transition.SwitchedRouteData.PageType : Transition.RouteData.PageType, 13 | Transition.IntoView ? Transition.RouteData.PageType : Transition.SwitchedRouteData.PageType); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/TransitionableRouteLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits TransitionableLayoutComponent 2 | 3 | 4 | @Body 5 | 6 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/TransitionableRoutePrimary.razor: -------------------------------------------------------------------------------- 1 |  2 | @ChildContent 3 | 4 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/TransitionableRouteSecondary.razor: -------------------------------------------------------------------------------- 1 | @inherits TransitionableRoutePrimary 2 | 3 | 4 | @ChildContent 5 | 6 | 7 | @code { 8 | protected override void OnInitialized() 9 | { 10 | MakeSecondary(); 11 | base.OnInitialized(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/TransitionableRouteView.razor: -------------------------------------------------------------------------------- 1 | @if (Transition?.RouteData != null) 2 | { 3 | 4 | 5 | 6 | } 7 | 8 | @code { 9 | [CascadingParameter] 10 | public Transition Transition { get; set; } 11 | 12 | [Parameter] 13 | public Type DefaultLayout { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/BlazorTransitionableRoute/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Web 2 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/BlazorTransitionableRouteTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/StubJsInterop.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRoute; 2 | using Microsoft.JSInterop; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorTransitionableRouteTest 6 | { 7 | internal class StubJsInterop : IJsInterop 8 | { 9 | public async Task Init(DotNetObjectReference instance, bool isActive) where T : class 10 | { 11 | await Task.CompletedTask; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/StubJsRuntime.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | using System; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorTransitionableRouteTest 7 | { 8 | internal class StubJsRuntime : IJSRuntime 9 | { 10 | public ValueTask InvokeAsync(string identifier, object[] args) 11 | { 12 | return default; 13 | } 14 | 15 | public ValueTask InvokeAsync(string identifier, CancellationToken cancellationToken, object[] args) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/StubRouteTransitionInvoker.cs: -------------------------------------------------------------------------------- 1 | using BlazorTransitionableRoute; 2 | using System.Threading.Tasks; 3 | 4 | namespace BlazorTransitionableRouteTest 5 | { 6 | internal class StubRouteTransitionInvoker : IRouteTransitionInvoker 7 | { 8 | internal bool invoked; 9 | internal Transition transition; 10 | 11 | internal void Reset() 12 | { 13 | invoked = false; 14 | transition = null; 15 | } 16 | 17 | public Task InvokeRouteTransitionAsync(Transition transition) 18 | { 19 | this.invoked = true; 20 | this.transition = transition; 21 | return Task.CompletedTask; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/StubType1.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System; 3 | using System.Threading.Tasks; 4 | 5 | namespace BlazorTransitionableRouteTest 6 | { 7 | internal class StubType1 : IComponent 8 | { 9 | public void Attach(RenderHandle renderHandle) 10 | { 11 | throw new NotImplementedException(); 12 | } 13 | 14 | public Task SetParametersAsync(ParameterView parameters) 15 | { 16 | throw new NotImplementedException(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/StubType2.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorTransitionableRouteTest 2 | { 3 | internal class StubType2 : StubType1 { } 4 | } 5 | -------------------------------------------------------------------------------- /test/BlazorTransitionableRouteTest/StubType3.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorTransitionableRouteTest 2 | { 3 | internal class StubType3 : StubType2 { } 4 | } 5 | --------------------------------------------------------------------------------