Commit Graph

911 Commits

Author SHA1 Message Date
Tim Blasi 82127571b5 feat(dart/transform): Use the Dart transformer for benchmarks
Remove explicit generation of reflection information in benchmark code
and generate it with the transformer.
2015-04-10 14:01:55 -07:00
Tim Blasi f6e9d1f857 feat(dart/transform): Fix handling of Dart keywords
Use `package:analyzer`'s list of Dart keywords to ensure we are properly
reporting usages of Dart keywords as runtime errors.
2015-04-10 13:43:11 -07:00
Tim Blasi 2cab7c79c3 feat(dart/transform): Allow multiple transformer entry points
- Allow the user to specify multiple entry points to an app.
- Allow the Angular 2 transformer to run without explicit entry points to
generate necessary setters & getters on built-in directives like `For`
and `If`.

Closes #1246
2015-04-10 13:41:26 -07:00
Tim Blasi bba849909c fix(dart/transform): Gracefully handle log calls before init
- Lazily create and use a logger that prints instead of `throw`ing.
- Use this logger in unit tests.
2015-04-10 13:41:26 -07:00
Tim Blasi cac74c73e1 feat(dart/transform): Add stub implementations to Html5LibAdapter
Stub out some methods used in the `CompilerPipeline`.
2015-04-10 13:41:26 -07:00
Tim Blasi f375dbd013 feat(dart/transform): Mark Compiler as Injectable
Necessary to allow runtime access via the `Injector`
2015-04-10 13:41:26 -07:00
Igor Minar ea58ef85fc chore(build): move the js.prod build over to broccoli 2015-04-10 13:11:58 -07:00
Pawel Kozlowski bf7933714a chore(rename): rename View and Template concepts for #1244 2015-04-10 12:00:37 -07:00
Alex Eagle 564477b8a0 chore(build): migrate build.js.cjs to broccoli.
This doesn't do the typescript part of the build yet. Also there is a bit
of hackiness left to resolve in a follow-up change.
2015-04-10 11:39:48 -07:00
Pawel Kozlowski 7e2c04e805 feat: add class directive to a list of directives
Closes #1292
2015-04-10 18:33:51 +02:00
David-Emmanuel Divernois 8fa1539bac feat(keyEvents): support for <div (keyup.enter)="callback()">
This commit adds a plugin for the event manager, to allow a key name to
be appended to the event name (for keyup and keydown events), so that
the callback is only called for that key.

Here are some examples:
 (keydown.shift.enter)
 (keyup.space)
 (keydown.control.shift.a)
 (keyup.f1)

Key names mostly follow the DOM Level 3 event key values:
http://www.w3.org/TR/DOM-Level-3-Events-key/#key-value-tables

There are some limitations to be worked on (cf details
in https://github.com/angular/angular/pull/1136) but for now, this
implementation is reliable for the following keys (by "reliable" I mean
compatible with Chrome and Firefox and not depending on the keyboard
layout):
- alt, control, shift, meta (those keys can be combined with other keys)
- tab, enter, backspace, pause, scrolllock, capslock, numlock
- insert, delete, home, end, pageup, pagedown
- arrowup, arrowdown, arrowleft, arrowright
- latin letters (a-z), function keys (f1-f12)
- numbers on the numeric keypad (but those keys are not correctly simulated
by Chromedriver)

There is a sample to play with in examples/src/key_events/.

close #523
close #1136
2015-04-10 13:29:27 +02:00
vsavkin f45281a10a feat(view): generalized loading of dynamic components 2015-04-09 22:15:42 -07:00
Rado Kirov e9f70293ac feat(query): adds initial implementation of the query api.
Queries allow a directive to inject a live list of directives of a given
type from its LightDom. The injected list is Iterable (in JS and Dart).
It will be Observable when Observables are support in JS, for now it
maintains a simple list of onChange callbacks API.

To support queries, element injectors now maintain a list of
child injectors in the correct DOM order (dynamically updated by
viewports).

For performance reasons we allow only 3 active queries in an injector
subtree. The feature adds no overhead to the application when not
used. Queries walk the injector tree only during dynamic view
addition/removal as triggered by viewport directives.

Syncs changes between viewContainer on the render and logic sides.

Closes #792
2015-04-09 19:07:19 -07:00
vsavkin 61cb99ea42 refactor(change_detection): removed directive and binding mementos 2015-04-09 18:56:19 -07:00
vsavkin 5408a9a72d cleanup(change_detection): removed dead code 2015-04-09 18:56:19 -07:00
Martin Probst 22c1a0d030 fix(benchmarks): Stop working around a Traceur bug. 2015-04-09 18:03:27 -07:00
Martin Probst 8c3007e4b5 fix(build): Remove unused `done` function arguments.
gulp only requires receiving a done argument if a task is not returning
a stream. Doing both is unnecessary and confusing.
2015-04-09 18:03:27 -07:00
Martin Probst 838aa2aaa9 fix(ts2dart): Adjust to new ts2dart API. 2015-04-09 18:03:27 -07:00
Martin Probst 3285ffba16 fix(traceur): Fix a couple of unsupported or incorrect tests. 2015-04-09 18:03:27 -07:00
Martin Probst 17e8857efc feat(dart): Use ts2dart for transpilation in Karma Dart. 2015-04-09 18:03:27 -07:00
Martin Probst 226cbc7db3 feat(dart): Use ts2dart for transpilation.
This switches all transpilation over from using Traceur to using ts2dart, based
on the TypeScript tool chain. Transpilation is a bit slow due to issues with
the gulp integration, but that should be easily fixable once we move to
broccoli.
2015-04-09 18:03:27 -07:00
Martin Probst cc7c7b3321 fix(build): Don't include rtts in the dart build.
The module name actually does not include a trailing slash, so the
folder would show up and be included in the dart pubbuild.
2015-04-09 18:03:26 -07:00
Martin Probst 70cea03b4b fix(build): Only return directories from subDirs() 2015-04-09 18:03:26 -07:00
vsavkin a027912891 cleanup(change_detection): fixed ChangeDetector interface 2015-04-09 17:30:04 -07:00
vsavkin 3bdf669ddf cleanup(change_detection): removed dead code 2015-04-09 17:30:04 -07:00
Alex Eagle b94b04c074 chore(build): Migrate remaining tasks under build.js.dev to broccoli. 2015-04-09 14:09:38 -07:00
Igor Minar cfc5dd830c perf(build): use patched broccoli-funnel version
see: https://github.com/broccolijs/broccoli-funnel/pull/22
2015-04-09 12:48:51 -07:00
Alex Eagle a3097aaf05 chore(build): Migrate build.js.dev fully to broccoli.
The previous change did the ES6 transpile, now we add ES5.
The sourcemaps are broken, but were also broken previously. We'll address that separately.
2015-04-09 11:00:47 -07:00
vsavkin 69c3bff086 feat(change_detection): updated change detection to update directive directly, without the dispatcher 2015-04-08 22:14:50 -07:00
Tobias Bosch 50098767fc refactor(render): use render layer fully
Introduces angular2/src/core/compiler/ViewFactory which
extracts ProtoView.instantiate and replaces ViewPool.

Note: This is a work in progress commit to unblock other commits.
There will be follow ups to add unit tests, remove TODOs, …
2015-04-08 20:51:31 -07:00
Alex Eagle de581ea8b3 chore(build): Move broccoli support to own module.
Add support for multiple pipelines in different Brocfile's.
2015-04-08 10:41:42 -07:00
Peter Bacon Darwin 9f8a9c6fc7 chore(doc-gen): ensure all public exports are rendered in public_docs
Closes #1222
2015-04-08 18:58:44 +02:00
Alex Eagle ad083ed28f fix(repo): .gitignore the broccoli tmp dir 2015-04-08 09:57:24 -07:00
Peter Bacon Darwin 105ba30ce9 chore(doc-gen): improve method signature formatting
Re-use the preformatting from the source code to layout method signatures
more cleanly.
2015-04-08 17:11:34 +02:00
Peter Bacon Darwin ee8bf0b3c0 chore(doc-gen): HTML escape method signatures
Closes #1249
Closes #1257
2015-04-08 17:11:34 +02:00
Pawel Kozlowski 41262f4265 feat(Ruler): introduce Ruler service
Closes #1089

Closes #1253
2015-04-08 11:04:42 +02:00
Rado Kirov c349eb4fa4 fix(bundles): remove work-around rx.js module detection.
Updates rx to the newest version, because a fix is needed.

Closes #1245
2015-04-08 11:01:01 +02:00
Tobias Bosch ca958464c4 refactor(render): create and store render ProtoViewRef in every app ProtoView
Needed to change Renderer.mergeChildComponentProtoViews to not create
new ProtoViews to be able to deal with cyclic references.

This commit is part of using the new render layer in Angular.
2015-04-07 20:27:25 -07:00
Alex Eagle d6003ee0ab chore(build): Add traceur transpiler for broccoli.
This exactly reproduces the output tree from one of the gulp tasks, which is now removed.
Next step is to migrate another sibling task to broccoli.
2015-04-07 16:38:02 -07:00
Alex Eagle bc248e9a15 fix(build) use relative path in file property inside sourcemap 2015-04-07 12:53:06 -07:00
Tim Blasi 42c0171b40 chore(dart/transform): Create targets for serving transformed Dart code
- Allow pub (build|serve) to specify mode
- Update pubbuild.js & pubserve.js to allow the caller to provide a `mode` value.
- Update settings to allow the di benchmark to be transformed to run statically.
2015-04-07 10:57:01 -07:00
Peter Bacon Darwin 1a99090b45 chore(doc-gen): don't show Members heading if no members
Closes #1248
2015-04-07 09:23:19 +02:00
John Arstingstall b7eea4f577 docs(directives): add # to for directive microsyntax example 2015-04-07 08:44:32 +02:00
vsavkin 9c62b5867e benchmark(change_detection): added a new set of benchmarks measuring updating properties 2015-04-06 18:13:20 -07:00
Harry Terkelsen 2560af731a refactor(dart): use Map instead of HashMap
Closes #1202
2015-04-06 17:16:54 +00:00
Victor Berchet 86211eb5f0 doc(directives): add inline documentation
Closes #1240
2015-04-06 17:11:23 +00:00
Pawel Kozlowski a3387b7f48 fix(di): allow injecting static attrs without type annotations
Closes #1226
2015-04-06 12:33:37 +02:00
Victor Berchet 94a48e8640 test(VmTurnZone): provide a stub VmTurnZone for CJS tests 2015-04-06 10:30:17 +02:00
Victor Berchet d8aeb40b49 reafactor(XHR): rename XHRMock to MockXHR for consistency 2015-04-06 10:30:16 +02:00
Victor Berchet 52c55d0ee8 test: convert to using TestBed 2015-04-06 10:30:16 +02:00