Commit Graph

187 Commits

Author SHA1 Message Date
Safia Abdalla c4703acfa7
Enable reading and editing from same Configuration object (#20647) 2020-04-10 09:59:05 -07:00
Safia Abdalla e67e7a08ca
Remove WebAssemblyLoggerFactory and refactor logging setup (#20432)
**Changes in this PR**
 - Replaces `WebAssemblyLoggerFactory` with `LoggerFactory` from logging extensions package
 - Moves WebAssemblyConsoleLogger and PrependMessageLogger to provider model

Now that we are using the standard `LoggerFactory` support for config options like `SetMinimumLevel` and `AddProvider` is available.

Compared to what is currently in the `blazor-wasm` branch, the changes in this PR add an additional 12 kb to the total compressed size.

Addresses #19737
2020-04-03 10:22:05 -07:00
Steve Sanderson 113cb5422d
Support JsonStringEnumConverter. Fixes #19086 (#20446)
* Fix serializing enums. Fixes #19086

* Add E2E test
2020-04-02 16:09:34 +01:00
Steve Sanderson 05ee136e87 Rename site.css to app.css. Fixes #19779 2020-03-31 12:31:57 +01:00
Pranav K 82d05ae785
Add support for loading satellite assemblies (#20033)
* Add support for loading satellite assemblies

Fixes #17016
2020-03-26 13:58:00 -07:00
Pranav K cb6858fe31
Update to using System.Net.Http.Json (#20195) 2020-03-26 10:13:23 -07:00
Pranav K de2fa4c69c Update versions
* Update Blazor version to preview4
* Update ASP.NET Core references to 3.1.3
* Remove DisableImplicitComponentsAnalyzers workaround
2020-03-25 15:59:17 -07:00
Pranav K 47536a3c14
Blazor wasm preview4 (#20117)
* Restore public API contract on WebAssemblyJSRuntime (#19968)

* Shrink icon-512.png (#19999)

* Use custom DebugProxyHost to initialize DebugProxy config (#19980)

Addresses #19909

* Spruce up WebAssemblyHostEnvironment interface and use (#20008)

* Load .dlls/.wasm/.pdb in parallel with dotnet.*.js. Fixes #18898 (#20029)

* Add BaseAddress property to WebAssemblyHostEnvironment (#20019)

- Adds `BaseAddress` to `IWebAssemblyHostEnvironment`
- Uses unmarshalled APIs to extract application host
- Move NavigationManager initialization to startup code
- Fix subdir mapping in ClientSideHostingTest

Addresses #19910

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Safia Abdalla <safia@safia.rocks>
Co-authored-by: Safia Abdalla <safia@microsoft.com>
2020-03-25 01:51:55 +00:00
Steve Sanderson 9343d2bca0
Log unhandled exceptions to custom logger (#19606) 2020-03-13 10:40:02 +00:00
Pranav K 147c39289a
Add support for configuration (#19544)
* Add support for configuration

Fixes https://github.com/dotnet/aspnetcore/issues/18675
2020-03-12 11:38:06 -07:00
Pranav K 7ba8d06717
BlazorWASM: API review (#19219)
Fixes https://github.com/dotnet/aspnetcore/issues/13174
2020-02-21 12:58:02 -08:00
Javier Calvarro Nelson 9ded8e17d4
Change MapBlazorWebAssemblyApplication to UseBlazorFrameworkFiles (#19198) 2020-02-21 04:20:41 -08:00
Marlon Regenhardt 6a85855fbb
[Blazor][Wasm] Move HttpClient from default services to Program.Main (#19119)
* [Blazor][Wasm] Move HttpClient from default services to extension method (#16929)

* Apply suggestions from code review

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
2020-02-20 10:47:49 -08:00
Javier Calvarro Nelson c39bc6a6bd
[Blazor] Move to MapBlazorWebAssemblyApplication (#19147)
Move to MapBlazorWebAssemblyApplication as the way to map blazor files into a hosted application.
2020-02-19 23:56:43 -08:00
Javier Calvarro Nelson 0e155fd7ca
[Fixes #12588][Blazor] Move Blazor to use Static Web Assets (#18409)
* [Blazor] Move Blazor to use Static Web Assets
* Plugs-in Blazor wasm through the static web assets infrastructure.
* Avoids the need for a custom Blazor.config file.
* Removes broken auto-rebuild and debug support.
* Removes unnecessary server-side Blazor helpers.
2020-02-19 04:05:03 -08:00
Pranav K c935e9aa2d
Blazor WebAssembly package renames (#19026)
Fixes https://github.com/dotnet/aspnetcore/issues/18384
2020-02-18 10:54:28 -08:00
Javier Calvarro Nelson 0dbb01bd8c
[Blazor] Adds an authentication library for Blazor webassembly (#18851)
* Adds a Microsoft.AspNetCore.Components.WebAssembly.Authentication
  library for performing authentication in Blazor webassembly.
* Includes a default implementation that supports OIDC capable IdPs
  using oidc-client.js
* Includes multiple primitives to deal with authentication flows and
  supports acquiring access tokens to call APIs.
  * RemoteAuthenticatorView is responsible for handling authentication
    operations at the user interface level.
  * RemoteAuthenticatorService is responsible for handling the lower
    level authentication details by using JavaScript interop to interact
    with the underlying javascript library implementing the auth protocol.
  * SignOutSessionStateManager handles CSRF protection for the logout
    path.
  * IAccessTokenProvider handles provisioning access tokens to call APIs.
2020-02-17 14:36:57 -08:00
Pranav K f54902f169
Purge the blazor-wasm branch 2020-02-03 17:49:41 -08:00
Ryan Nowak 3111032dc0 Rework of Blazor startup experience
Fixes: #16874

This is a significant simplication of our startup code model for Blazor
wasm with the goal of removing concepts that don't make much sense here.
Previously in this area we've tried to be consistent with ASP.NET Core
on the server, but it's not helping up much in WASM.

We're still leveraging some of the lessons from server-size ASP.NET
(hello CreateDefaultBuilder) but consistency is no longer a goal.

This change actually makes a bunch of scenarios better (rather than
removing features) - it's now possible to access services from the
application's DI scope and initialize them before the UI is shown
`RunAsync`.

This change also adds configuration in a central way. There's nothing in
this change that populates configuration in an automatic way, that will
come next.
2020-01-21 15:48:49 -08:00
Steve Sanderson 3a93704737
Support async main (#17673) 2019-12-12 15:05:12 +00:00
Javier Calvarro Nelson e3dcd41304
[Blazor] Pins the SDK version to 3.1 and forces Blazor projects to compile against it (#17479) 2019-11-28 23:12:44 +01:00
Steve Sanderson 5b30797592
Blazor WebAssembly move to netstandard2.1 (#16808)
* Now works on ns2.1, but links too much

* Now only link System.* assemblies

* Clean up. Also link Microsoft.Extensions.* now too, since it works.

* x-plat slash consistency

* Change all Blazor.* projects to netstandard2.1

* Further TFM updates

* Stop linking Microsoft.Extensions for now, since it requires a more detailed treatment to avoid breaking things
2019-11-12 16:16:40 +00:00
Kevin Pilch 5195d15939 Update some tests 2019-11-05 11:24:48 -08:00
dotnet-maestro[bot] 3c140121de
[release/3.1] Update dependencies from 3 repositories (#16685)
* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20191030.2

- Microsoft.EntityFrameworkCore.Tools - 3.1.0-preview3.19530.2
- Microsoft.EntityFrameworkCore.SqlServer - 3.1.0-preview3.19530.2
- dotnet-ef - 3.1.0-preview3.19530.2
- Microsoft.EntityFrameworkCore - 3.1.0-preview3.19530.2
- Microsoft.EntityFrameworkCore.InMemory - 3.1.0-preview3.19530.2
- Microsoft.EntityFrameworkCore.Relational - 3.1.0-preview3.19530.2
- Microsoft.EntityFrameworkCore.Sqlite - 3.1.0-preview3.19530.2

* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20191030.3

- Microsoft.EntityFrameworkCore.Tools - 3.1.0-preview3.19530.3
- Microsoft.EntityFrameworkCore.SqlServer - 3.1.0-preview3.19530.3
- dotnet-ef - 3.1.0-preview3.19530.3
- Microsoft.EntityFrameworkCore - 3.1.0-preview3.19530.3
- Microsoft.EntityFrameworkCore.InMemory - 3.1.0-preview3.19530.3
- Microsoft.EntityFrameworkCore.Relational - 3.1.0-preview3.19530.3
- Microsoft.EntityFrameworkCore.Sqlite - 3.1.0-preview3.19530.3

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20191030.4

- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.1.0-preview3.19530.4
- Microsoft.AspNetCore.Razor.Language - 3.1.0-preview3.19530.4
- Microsoft.CodeAnalysis.Razor - 3.1.0-preview3.19530.4
- Microsoft.NET.Sdk.Razor - 3.1.0-preview3.19530.4

* Dependency coherency updates

- Microsoft.AspNetCore.Analyzer.Testing - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.Memory - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.SqlServer - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.CommandLineUtils.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Binder - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.CommandLine - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.FileExtensions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Ini - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Json - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.KeyPerFile - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.UserSecrets - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration.Xml - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Configuration - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DependencyInjection - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.DiagnosticAdapter - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Composite - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Embedded - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileProviders.Physical - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.FileSystemGlobbing - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Hosting - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Http - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Localization - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Abstractions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.AzureAppServices - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Configuration - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Console - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Debug - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventSource - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.EventLog - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.TraceSource - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging.Testing - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ObjectPool - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options.DataAnnotations - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Options - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Primitives - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.TypeNameHelper.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.ValueStopwatch.Sources - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.WebEncoders - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Internal.Extensions.Refs - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.JSInterop - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Mono.WebAssembly.Interop - 3.1.0-preview2.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.Extensions.Logging - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Internal.AspNetCore.Analyzers - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)
- Microsoft.AspNetCore.Testing - 3.1.0-preview3.19530.4 (parent: Microsoft.EntityFrameworkCore)

* Update dependencies from https://github.com/aspnet/Blazor build 20191031.1

- Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview3.19531.1

* React to Mono WebAssembly changes for 3.1 preview 3
2019-10-31 13:47:48 +00:00
Steve Sanderson 0faf339143
Fix mouse events occurring on children of a disabled form field (#16671)
* Add E2E tests, some of which fail to represent the issue

* Implement handling for disableable mouse events, making the new E2E tests pass
2019-10-31 09:29:15 +00:00
Javier Calvarro Nelson bf846cb845
[Blazor][Fixes #14959] NavLink match should be case-insensitive (#15401) 2019-10-25 17:46:03 +02:00
Pranav K c298c94fe1
Validation fixes for Blazor (#14972)
* Validation fixes for Blazor

* Ensure validation result that are not associated with a member are recorded. Fixes https://github.com/aspnet/AspNetCore/issues/10643
* Add support for showing model-specific errors to ValidationSummary
* Add support for nested validation and a more suitable CompareAttribute. Fixes https://github.com/aspnet/AspNetCore/issues/10526
2019-10-18 11:26:17 -07:00
Steve Sanderson 1b2c44313b In Blazor Server template, show login UI on small screens too. Fixes #13003 2019-10-17 06:10:18 +01:00
Adrian Wright e8c9952a2b Add .sidebar to .nav-item so to just target the nav in the template and not any other .nav-item's in the html 2019-10-17 03:36:08 +01:00
Steve Sanderson d3f1f5a6ea Make InputBase respond to validation state notifications (#14818)
* InputBase subscribes to OnValidationStateChanged. Fixes #11914

* E2E test
2019-10-16 11:35:34 -07:00
Javier Calvarro Nelson efc2f024f3
[Blazor][Fixes #14959] Update navlink to perform case-insensitive matches (#14991)
Otherwise the link doesn't get highlighted even though the route matches (routing is case insensitive).
2019-10-16 19:04:19 +02:00
Pranav K 30b31d7086
Account for Layout ordering in Blazor (#15001)
The server requires that clients send descriptors in sequence. Since MVC executes
Layouts in an inside-out manner, modify the client to explicitly order descriptors

Fixes https://github.com/aspnet/AspNetCore/issues/14474
2019-10-15 13:17:58 -07:00
Pranav K d299ae2491
Introduce ComponentTagHelper (#14592)
* Introduce ComponentTagHelper
Fixes https://github.com/aspnet/AspNetCore/issues/13726
2019-10-11 15:59:52 -07:00
Pranav K 79a1769e47
fixup 2019-10-11 13:46:45 -07:00
Pranav K d1faff4126
Fixup 2019-10-11 13:32:47 -07:00
Javier Calvarro Nelson 80d019d726
Introduce ComponentTagHelper
Fixes https://github.com/aspnet/AspNetCore/issues/13726
2019-10-11 13:32:46 -07:00
Adrian Wright 0cf058711f Rename class "error-ui" to "blazor-error-ui" 2019-10-10 19:57:23 +01:00
Ryan Brandenburg a68c961a58
Dev exception notifications (#14636)
Blazor dev exception notification
2019-10-09 16:37:57 -07:00
Ryan Brandenburg c3ccf5ba7f
InputNumber Long (#14741)
InputNumber Long
2019-10-07 16:12:48 -07:00
William Godbe 79f04eb14d
Merge pull request #14682 from dotnet-maestro-bot/merge/release/3.1-preview1-to-release/3.1
[automated] Merge branch 'release/3.1-preview1' => 'release/3.1'
2019-10-03 10:17:06 -07:00
Javier Calvarro Nelson cca42d9624 [Blazor][Fixes #13357] input type=time reseting value (#14379)
* [Blazor] input type=time reseting value
* Normalizes values on the client and sends proper dates and times to
  the server.
* Normalizes values applied from the server to the client.
* Introduces @bind and @bind-value support for inputs of types
  datetime-local, month, time.

Fixes #13357

* Update JS
2019-10-02 15:21:00 -07:00
Pranav K 9e84abec47
Add a few tests for generic JSInterop (#14626)
Fixes https://github.com/aspnet/AspNetCore/issues/9061
2019-10-02 12:44:39 -07:00
Javier Calvarro Nelson 6bc4d27bfa Support parameters on server-side rendered components
Fixes https://github.com/aspnet/AspNetCore/issues/14433
2019-10-01 16:09:06 -07:00
Pranav K 29a1d50e02 Throw when UseAuthorization is incorrectly configured
* Update AuthZ & Cors middlewares to only set endpoint routing metadata when
  executing in the context of endpoint routing
* Add analyzers for incorrect UseAuth use

Fixes https://github.com/aspnet/AspNetCore/issues/14049
2019-10-01 16:08:24 -07:00
Steve Sanderson 0d30083aab E2E tests for navigation+preventDefault 2019-10-01 14:49:59 -07:00
Steve Sanderson 6f8b31bdb1 Move navigation preventDefault tests to their own page 2019-10-01 14:49:59 -07:00
Steve Sanderson 62f596c2bd Actual event bubbling E2E tests 2019-10-01 14:49:59 -07:00
Steve Sanderson 47d1ffce05 E2E scenario code for preventDefault+navigation 2019-10-01 14:49:59 -07:00
Steve Sanderson 05c284fe26 Add some E2E scenario code for bubbling 2019-10-01 14:49:59 -07:00
Javier Calvarro Nelson 82f385892a
[Blazor][Fixes #7694] Makes NavLink NOOP when a null href link is provided (#14372) 2019-09-24 16:55:24 +02:00