Commit Graph

618 Commits

Author SHA1 Message Date
Matt Ferderer 34971c9569 Update Steve Sanderson's demo to latest NDC talk
Steve recently did another NDC talk which is much more up to date. Suggesting that one be linked to instead of the older talk.
2018-06-06 16:35:41 -07:00
Steve Sanderson f7e2327378 Bump version to 0.5.0-preview1-* 2018-06-06 15:12:53 +01:00
Steve Sanderson 783edcbf4c Don't preventDefault on events. Fixes #803 2018-06-06 13:44:53 +01:00
Steve Sanderson 2492d00e75 Stylistic tweaks 2018-06-06 13:44:14 +01:00
Rémi BOURGAREL 3610068929 manages when users clicks on a link with the control button pushed. issue #867 2018-06-06 13:44:14 +01:00
Steve Sanderson 4427b3b773 Add more struct readonlyness hints 2018-06-06 11:49:55 +01:00
Todd Lang 1e866f7672 Refactoring SimpleJson.EatWhiteSpace
-Replacing arbitrary length IndexOf call with unrolled switch statement
-Reduces deserialization runtime on ~310KB test data from 13s to 5s.
2018-06-06 11:12:18 +01:00
Ryan Nowak c5c1b375ec Add more properties 2018-06-05 20:03:04 -07:00
Daniel Roth 13849a6739 Fix base type of UIErrorEventArgs 2018-06-05 20:03:04 -07:00
Ryan Nowak cb186f494a Add type checking for component parameters
Introduces a new primitive used by the compiler for type checking. Type
checking applies to component parameters when setting the value directly
and when using bind. This is nice because it also adds error checking
for bind.
2018-06-05 19:58:50 -07:00
Javier Calvarro Nelson 5cb544ece8 Improved interoperability
* Add support for invoking async JavaScript functions from .NET.
* Add support for invoking .NET methods from JavaScript.
* Add support for invoking async .NET methods from JavaScript.
2018-06-05 16:09:59 -07:00
Javier Calvarro Nelson a3a76c2e9a Update README.md
Indicate where and what version of Java to get.
2018-06-05 09:39:59 -07:00
Suchiman a3776b2a20 Add support for binding long / float / double / decimal 2018-06-05 16:42:31 +01:00
Ryan Nowak 1724c1bcbc Fix #316
This change should hopefully end the MSBuild craziness that happens when
you add a file to the project using the VS Add Item dialog.

VS apparently has a behavior that intentionally tries to make sure the
added file is only included in a single itemgroup. So when Blazor
defines an itemgroup at the top level of scope with the same members as
Content - VS does some gymnastics to prevent it working.

The workaround is to defer the initialization of our itemgroup.
2018-06-05 08:35:47 -07:00
Daniel Roth 5916d93118 Update survey links for 0.4.0 2018-06-01 09:17:12 -07:00
Ryan Nowak 5b40e3e121 Update versions to 2.1.0 (rtm) 2018-05-31 20:58:09 -07:00
Steve Sanderson 0e3b437dc1 Move <TemplateBlazorPackageVersion> prop to dependencies.props 2018-05-30 11:54:50 +01:00
Steve Sanderson b32c88c0d6 Remove suggestion to reference ASP.NET CI dev feed from readme 2018-05-29 17:18:58 +01:00
Suchiman 0e5f9c2562 Use RestoreAdditionalProjectSources instead of RestoreSources
- The former is additive while the latter replaces the existing sources
2018-05-29 17:16:45 +01:00
Nikolei, Stefan 54eda39cb8 Update Anglesharp 2018-05-29 17:08:01 +01:00
Steve Sanderson 5dc5404570 Add notes on how to upgrade Mono, plus modify some files to make future
upgrades simpler
2018-05-24 15:55:01 +01:00
Steve Sanderson 353da42cce Clean up use of relative URLs. Fixes #844 and #845 (#878)
* Handle links to empty-string href, resolved against base href

Needed to change the URLs used in E2E tests to be able to cover this (i.e., removed the /RouterTest prefixes so the default relative URL became an empty string)

* Change links in StandaloneApp sample to be relative

* Standardize on base URIs having trailing slash everywhere

Hence also change terminology from "base URI prefix" to simply "base URI"

* Handle link highlighting when visiting base-href-but-without-trailing-slash

* Removing leading slashes from base-relative URLs in templates
2018-05-24 09:54:43 +01:00
Steve Sanderson 7f3ba97fb7 Handle ChildContent that starts with an HTML element. Fixes #875 2018-05-23 15:57:48 +01:00
Steve Sanderson 9c567a0be4 Remove license notices from template output. Fixes #824 2018-05-23 11:12:48 +01:00
Robin Sue b5128a7efd Add support for sending and receiving arbitrary HttpContent, refs #479 (#815)
* Add support for zero copy byte array marshalling

* Add support for sending arbitrary HttpContent, refs #479

* Fix unit test to set ContentType correctly

* Add support for receiving binary data

* Compare header case insensitive

* Add unit test for binary http requests
2018-05-23 10:16:27 +01:00
Ryan Nowak e801707706 Add regression test for 609 2018-05-22 13:58:04 -07:00
Ryan Nowak 3af9f4abd9 Update Korebuild 2018-05-22 13:53:14 -07:00
Ryan Nowak c6148b6fe6 Fix #784 - allow complex content for HTML
The logic that binds event handlers was interfering with the code that
prevents component properties from receiving complex content.

This check was a little overzealous.
2018-05-22 11:58:46 -07:00
Ryan Nowak 9aed80aaed Refactor VS references
Changing to a different set of references for tooling. This is a more
conservative set and will be less likely to break in the future.
2018-05-22 11:10:15 -07:00
Ryan Nowak a88b24ed76 Resolves #297
Removes the workaround for #297 and sets the langauge version to
experimental.

This will require 2.1.0-rc of Razor.
2018-05-22 11:10:15 -07:00
Ryan Nowak eeed731587 Update ASP.NET Core dependencies to RC 2018-05-22 11:10:15 -07:00
Attila Hajdrik 480691d3ed Convert the member names to camelCase for interfaces/class/types getting marshalled to C# side. 2018-05-22 13:19:09 +01:00
Gutemberg Ribeiro ad501dc77f Event payloads for DOM event types 2018-05-22 13:12:55 +01:00
Steve Sanderson 866368192f Remove launchSettings.json from standalone template now we support
running on IISExpress by default

This reverts commit 84e6d259af314a9564521033d069dd30ac1fe8e8.
2018-05-22 13:02:59 +01:00
Steve Sanderson e33cb4a354 Simple autorebuild mechanism for hosted apps (#787)
* Simple autorebuild mechanism for hosted apps

* CR feedback: DI changes; use Directory.EnumerateFiles

* CR feedback: Ensure FileSystemWatcher isn't GCed
2018-05-22 13:02:36 +01:00
Ryan Nowak e4cf7a6d3e Fix #773 (for real this time)
The problem is that the new HTML rewrite pass was traversing into
attributes of all kinds and would turn any HTML content inside those
attributes into elements where possible. The solution is to not do
that.
2018-05-14 10:47:36 -07:00
Ryan Nowak 3142217bec Fix #745 - allow multiple implements directives
The pass for this was 'break'ing after the first directive for no real
reason. Oops.
2018-05-08 14:06:22 -07:00
Ryan Nowak e1c2efb5ce Add tests for #773
This doesn't seem to repro anymore after fixing #772. Adding tests
anyway.
2018-05-08 13:38:23 -07:00
Ryan Nowak 3f5d25d314 Fix 773
We weren't handling a few cases that can occur during typing correctly.
Our passes that look at the content of attributes need to be prepared
for it to be empty in cases where the attribute has been partially
typed in the editor.

I added a smoke test for this that attempts to simulate typing and found
another issue to fix.

The end result of this is that the design for this kind of code is
simpler and takes a more 'brute-force' approach to understanding
attributes. I think this is a good change based on the problems with how
this code has been written today, there are too many possible cases to
try and have the code express and document them all.
2018-05-08 12:39:18 -07:00
Steve Sanderson 37788f3c9d In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751)
* In Blazor cshtml files, auto-import Microsoft.AspNetCore.Blazor and Microsoft.AspNetCore.Blazor.Components. Fixes #749

* Remove redundant @using directives from tests

* Update assertion in test

* Update all affected baselines
2018-05-05 17:55:08 +01:00
Suchiman 2192e00da5 Don't schedule StateHasChanged if async lifecycle events complete synchronously, fixes #760 2018-05-05 17:41:07 +01:00
Attila Hajdrik 043556d111 Add support for pointer events
Change oncontextmenu event from pointerevent to mouseevent (based on MDN docs) - it
2018-05-04 16:29:00 -07:00
Emiel Koning 6d872377ef typo
Just a small typo... ;-)
2018-05-04 10:42:28 -07:00
Steve Sanderson 20e43adac5 camelCase all the JSONs (#746)
* Add camelCase utility

* Use camelCase when JSON-serializing (but not for dictionary keys)

* Make JSON deserialization treat member names case-insensitively (but retain case on dictionary keys)

* Use camelCase in JSON in the samples and templates

* Reverse the order of the params for the camelcase test because it's weird otherwise

* CR feedback
2018-05-04 16:14:38 +01:00
Mark Dickinson f9ab9cc6e5 Added readFloatField 2018-05-04 15:12:26 +01:00
Steve Sanderson 27a676c4c7 Update TemplateBlazorPackageVersion in development 2018-05-04 09:13:18 +01:00
Ryan Nowak b390ae0c1c Rewrite of HTML handling for Blazor
This change replaces the parsing of HTML that we perform during the code
generation phase, which parsing of HTML during the IR lowering phase.
The main benefit of this change is that the structure of the HTML is
reflected in the IR tree, allowing us to do more more advance
transformations.

As an example, see how the the handling of `<script>` tags is now a
separate pass.

As an aside from this I also redesigned the structure of component IR
nodes to match the new HTML element nodes. Passes are now more easily
aware of the nodes they are expected to handle and are more easily aware
of the difference between a component and element. This still isn't as
clean as I would like, but I think it's a reasonable improvement.

Another benefit of this is that the code generation is much simpler and
requires much less bookkeeping and statefulness.
2018-05-03 21:56:03 -07:00
Steve Sanderson b4e70e72a0 Disable autorebuild in hosted projects due to VS 15.7pre5+ issue 2018-05-02 18:34:16 +01:00
Ryan Nowak 6a28aa99c6 remove inadvertant test code 2018-05-02 11:07:52 +01:00
Ryan Nowak 87375f6ba1 Add support for most (if not all events)
This change adds tag helpers and defines event types for all of the DOM
events we could find. You'll find it much easier now to subcribe to
these events.

While we did define new event types, we didn't substantially expand the
set of data that we serialize for events. We're looking for feedback on
what is most critical to have, and looking for contributions adding
those data and tests.
2018-05-02 11:07:49 +01:00