Commit Graph

377 Commits

Author SHA1 Message Date
Kara Erickson e76a570908 refactor(ivy): remove LNode (#26426)
PR Close #26426
2018-10-15 11:20:32 -07:00
Kara Erickson 931e603f80 refactor(ivy): revert LNode.data into LViewData[HOST] (#26424)
PR Close #26424
2018-10-15 10:17:12 -07:00
Kara Erickson 735dfd3b1a refactor(ivy): replace LNode.dynamicLContainerNode with flat LContainers (#26407)
PR Close #26407
2018-10-11 21:07:21 -07:00
Pawel Kozlowski 6a64ac4151 fix(ivy): Renderer2 should not use a special injection fn (#26369)
PR Close #26369
2018-10-11 14:12:03 -07:00
Andrew Kushnir e5644204dc fix(ivy): removing unnecessary assert in getOrCreateNodeInjector function (#26305)
PR Close #26305
2018-10-09 16:52:00 -07:00
Kara Erickson 7ea5161d4d refactor(ivy): merge directives into LViewData (#26316)
PR Close #26316
2018-10-09 16:46:00 -07:00
Kara Erickson b0879046b7 test(ivy): add testing utility to replace loadDirective (#26316)
PR Close #26316
2018-10-09 16:46:00 -07:00
Kara Erickson 8f25321787 refactor(ivy): update context discovery to prep for dir merge (#26262)
PR Close #26262
2018-10-05 13:39:30 -07:00
Kara Erickson 51dfdd5dd1 fix(ivy): sync view with blueprint when necessary (#26263)
PR Close #26263
2018-10-05 13:39:03 -07:00
Pawel Kozlowski fdaf573073 feat(ivy): expose node injector as part of debug context (#26210)
PR Close #26210
2018-10-04 10:12:02 -07:00
Alex Rickabaugh 36d6e6076e feat(ivy): support template type check narrowing for *ngFor and *ngIf (#26203)
This commit adds an ngTemplateGuard_ngIf static method to the NgIf
directive and an ngTemplateContextGuard static method to NgFor. The
function of these two static methods is to enable type narrowing
within generated type checking code for consumers of the directives.

PR Close #26203
2018-10-04 10:11:17 -07:00
Alex Rickabaugh 79466baef8 fix(ivy): remove metadata from *Def and introduce *DefWithMeta types (#26203)
Previously in Ivy, metadata for directives/components/modules/etc was
carried in .d.ts files inside type information encoded on the
DirectiveDef, ComponentDef, NgModuleDef, etc types of Ivy definition
fields. This works well, but has the side effect of complicating Ivy's
runtime code as these extra generic type parameters had to be specified
as <any> throughout the codebase. *DefInternal types were introduced
previously to mitigate this issue, but that's the wrong way to solve
the problem.

This commit returns *Def types to their original form, with no metadata
attached. Instead, new *DefWithMeta types are introduced that alias the
plain definition types and add extra generic parameters. This way the
only code that needs to deal with the extra metadata parameters is the
compiler code that reads and writes them - the existence of this metadata
is transparent to the runtime, as it should be.

PR Close #26203
2018-10-04 10:11:17 -07:00
Kara Erickson 730679964f refactor(ivy): flatten LInjector into LViewData (#26220)
PR Close #26220
2018-10-03 15:27:57 -07:00
Andrew Kushnir cb59d87489 feat(ivy): compiler support to generate QUERY_READ_FROM_NODE calls (#26171)
PR Close #26171
2018-10-03 12:28:23 -07:00
Matias Niemelä ab379ab72a refactor(ivy): always use styling helper methods when comparing values (#26149)
PR Close #26149
2018-10-01 09:35:22 -07:00
Matias Niemelä 32e479ffec refactor(ivy): reorganize styling and player files (#26149)
PR Close #26149
2018-10-01 09:35:22 -07:00
Matias Niemelä 391c708d7e fix(ivy): ensure [style]/[class] bindings identity check the previous value (#26149)
PR Close #26149
2018-10-01 09:35:22 -07:00
Matias Niemelä c51331689f refactor(ivy): rename stylingProp => styleProp (#26149)
PR Close #26149
2018-10-01 09:35:22 -07:00
Kara Erickson 68fadd9b97 refactor(ivy): replace LNode.nodeInjector with TNode.injectorIndex (#26177)
PR Close #26177
2018-10-01 09:34:52 -07:00
Igor Minar 9993c72335 feat: add support for TypeScript 3.1 (#26151)
PR Close #26151
2018-09-28 09:34:51 -07:00
Pawel Kozlowski 5f6900ecc0 feat(ivy): add ability to inspect local refs through context discovery (#26117)
PR Close #26117
2018-09-27 12:00:53 -07:00
Misko Hevery 632b19d5c2 fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir add1198b88 fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir 0ed2df2a36 fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir bc1f2d6411 fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir d7326d81ba fixup! feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Andrew Kushnir b286abeabe feat(ivy): adding support for ngNonBindable attribute 2018-09-27 11:52:07 -07:00
Kara Erickson 15a2b8f622 fix(ivy): wrapper fns arent necessary anymore (#26108)
PR Close #26108
2018-09-26 00:03:16 -07:00
Kara Erickson 6a62ed2245 fix(ivy): objects like ElementRef should not use a special injection fn (#26064)
PR Close #26064
2018-09-25 12:51:29 -07:00
Matias Niemelä 0c344715e5 feat(ivy): expose a series of helpful application inspection tools (#25919)
PR Close #25919
2018-09-25 09:46:12 -07:00
Matias Niemelä 82a14dc107 feat(ivy): provide groundwork for animations in core (#25234)
PR Close #25234
2018-09-21 14:51:24 -07:00
Kara Erickson d5f47d6b71 refactor(ivy): special injection tokens should not be cached (#26048)
PR Close #26048
2018-09-20 18:02:08 -07:00
Adam Plumer 3fb0da2de5 feat(platform-server): update domino to v2.1.0 (#25564)
PR Close #25564
2018-09-19 16:07:36 -07:00
Greg Magolan b99d7ed5bf build(bazel): update to rules_typescript 0.17.0 & rules_nodejs 0.13.4 (#25920)
PR Close #25920
2018-09-18 13:05:38 -07:00
Kara Erickson 5653874683 fix(ivy): events should not mark views dirty by default (#25969)
PR Close #25969
2018-09-17 13:02:39 -07:00
Kara Erickson aedebaf025 refactor(ivy): remove LNode.tNode (#25958)
PR Close #25958
2018-09-14 16:16:28 -07:00
Matias Niemelä 10a656fc38 refactor(ivy): ensure hello world doesn't pull in context discovery creation code (#25895)
PR Close #25895
2018-09-12 13:25:12 -04:00
Alex Rickabaugh a9099e8f70 fix(ivy): ensure Ivy *Ref classes derive from view engine equivalents (#25775)
Various user code uses 'instanceof' to check whether a particular instance
is a TemplateRef, ElementRef, etc. Ivy needs to work with these checks.

PR Close #25775
2018-09-11 06:53:22 -07:00
Matias Niemelä e3633888ed feat(ivy): support animation @triggers in templates (#25849)
PR Close #25849
2018-09-10 13:59:27 -07:00
Kara Erickson 83a1334876 refactor(ivy): migrate previousOrParentNode to use TNodes (#25829)
PR Close #25829
2018-09-07 16:06:17 -07:00
Matias Niemelä 62be8c2e2f feat(ivy): allow combined context discovery for components, directives and elements (#25754)
PR Close #25754
2018-09-07 14:14:56 -07:00
Matias Niemelä d2dfd48be0 feat(ivy): patch animations into metadata (#25828)
PR Close #25828
2018-09-07 13:46:06 -07:00
Alex Rickabaugh a417b2b419 fix(ivy): detect frozen flyweight objects in definitions and unfreeze (#25755)
defineComponent() and friends can return a flyweight EMPTY object for
specific fields when they contain no data. InheritDefinitionFeature
was attempting to write into these flyweight objects, which have been
protected with Object.freeze().

This commit adds detection to InheritDefinitionFeature to identify the
frozen objects.

PR Close #25755
2018-09-05 09:27:41 -07:00
Pawel Kozlowski 34be51898d fix(ivy): support host bindings on dynamically created components (#25765)
PR Close #25765
2018-08-31 13:36:53 -07:00
Marc Laval 00f13110be feat(ivy): support injecting Renderer2 (#25523)
PR Close #25523
2018-08-31 09:42:36 -07:00
Pawel Kozlowski 371df35624 fix(ivy): register to directive outputs on ng-template / ng-container (#25698)
Runtime part of #25697

PR Close #25698
2018-08-30 21:22:01 -07:00
Pawel Kozlowski 0386c44acc fix(ivy): inject attributes for directives on ng-template / ng-container (#25697)
PR Close #25697
2018-08-28 14:34:59 -04:00
Matias Niemelä 0024d68add feat(ivy): add support for resolving view data from a DOM node (#25627)
PR Close #25627
2018-08-27 21:15:29 -04:00
Pawel Kozlowski 8fa099158e fix(ivy): allow queries for ng-container without read option (#25617)
PR Close #25617
2018-08-24 11:52:50 -04:00
Pawel Kozlowski b00038c847 fix(ivy): inject ViewContainerRef for directives on ng-container (#25617)
PR Close #25617
2018-08-24 11:52:50 -04:00
George Kalpakas 18f129f536 build: upgrade Chromium and ChromeDriver to latest versions (#25602)
PR Close #25602
2018-08-24 11:48:40 -04:00
Matias Niemelä a37bcc3bfe feat(ivy): bridge component styles into the component renderer (#25255)
PR Close #25255
2018-08-23 16:51:15 -04:00
Kara Erickson d5b70e0c66 fix(ivy): create LViewData from blueprint (#25587)
PR Close #25587
2018-08-22 15:58:42 -04:00
Kara Erickson 831e71ea3c fix(ivy): host bindings should support array/object literals (#25583)
PR Close #25583
2018-08-21 10:48:42 -07:00
Ben Lesh f54f3856cb feat(ivy): add query inheritance (#25556)
Adds inheritance handling for the following:

- viewQuery
- contentQueries
- contentQueriesRefresh

PR Close #25556
2018-08-20 16:36:22 -07:00
Kara Erickson 21a14407f6 refactor(ivy): generate vars in component defs (#25562)
PR Close #25562
2018-08-20 11:08:10 -07:00
Kara Erickson f2aa9c6a7f refactor(ivy): use generated consts value to set binding index (#25533)
PR Close #25533
2018-08-17 14:32:55 -07:00
Kara Erickson 4708cb91ef refactor(ivy): remove reserveSlots instruction (#25533)
PR Close #25533
2018-08-17 14:32:55 -07:00
Pawel Kozlowski 31f0f5b3c3 feat(ivy): add support for local refs on ng-template (#25482)
PR Close #25482
2018-08-17 09:58:07 -07:00
Kara Erickson 6482f6f0fe refactor(ivy): separate container into 2 instructions (#25509)
PR Close #25509
2018-08-16 13:47:14 -07:00
Miško Hevery 9ee6702fa9 refactor(ivy): remove short instruction names as they provide no value (#25493)
PR Close #25493
2018-08-16 11:04:34 -07:00
Ben Lesh a0a29fdd27 feat(ivy): Add AOT handling for bare classes with Input and Output decorators (#25367)
PR Close #25367
2018-08-14 16:36:18 -07:00
Pawel Kozlowski 9117fa199c test(ivy): activate local references canonical spec (#25462)
PR Close #25462
2018-08-14 12:01:55 -07:00
Pawel Kozlowski 0c4209f4b9 refactor(ivy): harmonize container and element / elementContainer signatures (#25458)
PR Close #25458
2018-08-14 12:01:23 -07:00
Victor Berchet 85106375ac refactor(ivy): misc cleanup (#25369)
PR Close #25369
2018-08-14 11:58:47 -07:00
Miško Hevery 2016afdbff fix(ivy): remove ivy dependency on ViewEngine's resolveRendererType2 (#25396)
PR Close #25396
2018-08-10 13:32:04 -07:00
Kara Erickson 409860a4da fix(ivy): queries should be restored when view changes (#25415)
PR Close #25415
2018-08-10 09:13:16 -07:00
Kara Erickson 2b128a47b9 refactor(ivy): queries should not rely on LNode (#25415)
PR Close #25415
2018-08-10 09:13:16 -07:00
Alex Rickabaugh 5be186035f feat(ivy): enable inheritance of factory functions in definitions (#25392)
This commit creates an API for factory functions which allows them
to be inherited from one another. To do so, it differentiates between
the factory function as a wrapper for a constructor and the factory
function in ngInjectableDefs which is determined by a default
provider.

The new form is:

factory: (t?) => new (t || SomeType)(inject(Dep1), inject(Dep2))

The 't' parameter allows for constructor inheritance. A subclass with
no declared constructor inherits its constructor from the superclass.
With the 't' parameter, a subclass can call the superclass' factory
function and use it to create an instance of the subclass.

For @Injectables with configured providers, the factory function is
of the form:

factory: (t?) => t ? constructorInject(t) : provider();

where constructorInject(t) creates an instance of 't' using the
naturally declared constructor of the type, and where provider()
creates an instance of the base type using the special declared
provider on @Injectable.

PR Close #25392
2018-08-09 09:58:13 -07:00
Pawel Kozlowski 9c92a6fc7a test(ivy): add test for <ng-container> and shallow queries (#25379)
PR Close #25379
2018-08-09 07:35:01 -07:00
Pawel Kozlowski af9ced9026 fix(ivy): project ng-container nodes (#25354)
PR Close #25354
2018-08-07 12:02:48 -07:00
Pawel Kozlowski dbdbbdbe86 fix(ivy): support ng-container inside another ng-container (#25346)
PR Close #25346
2018-08-07 11:48:42 -07:00
Pawel Kozlowski 3355502f2f fix(ivy): support ng-container at the root of a view with delayed insertion (#25329)
PR Close #25329
2018-08-06 13:47:44 -07:00
Victor Berchet afa6b9e794 fix(ivy): execute the optional begin and end methods of the rendererFactory (#25273)
This is required to i.e. flush animations when using a Renderer2.
`rf.begin()` and `rf.end()` around the change detection.

PR Close #25273
2018-08-03 10:17:13 -07:00
Victor Berchet b38931b484 fix(ivy): use devModeEqual in no change mode (#25252)
To avoid the unfamous error `Expression has changed after it was checked.`

PR Close #25252
2018-08-02 22:57:28 -07:00
Kara Erickson 1fb7111da1 fix(ivy): content query results should be available in content hooks (#25271)
PR Close #25271
2018-08-02 19:32:09 -07:00
Pawel Kozlowski c2c12e52fe feat(ivy): support ng-container as a child of an already inserted view (#25227)
PR Close #25227
2018-08-02 18:50:03 -07:00
Pawel Kozlowski 28c7a4efbc feat(ivy): add basic support for ng-container (#25227)
This commit adds basic support for <ng-container> - most of the
functionality should work as long as <ng-container> is a child of
a regular element.

PR Close #25227
2018-08-02 18:50:03 -07:00
Kara Erickson c8a4fb1faf fix(ivy): walk declaration views in listener (#25228)
PR Close #25228
2018-07-31 16:35:20 -07:00
Ben Lesh 64516da6b0 feat(ivy): support inheriting input/output from bare base class (#25094)
PR Close #25094
2018-07-31 16:25:11 -07:00
Miško Hevery 6e2a1877ab refactor(core): remove withBody from public testing API (#25171)
PR Close #25171
2018-07-31 15:09:32 -07:00
Victor Berchet 36648293a8 refactor(ivy): misc (#25174)
PR Close #25174
2018-07-30 16:59:48 -07:00
Marc Laval cd89eb8404 feat(ivy): implement the getters of ViewContainerRef (#25174)
BREAKING CHANGE: ViewContainerRef.parentInjector is deprecated without replacement

PR Close #25174
2018-07-30 16:59:48 -07:00
Kara Erickson 2ef777b0b2 fix(ivy): convert context code into a tree-shakable instruction (#24943)
PR Close #24943
2018-07-30 15:54:11 -07:00
Kara Erickson fe14f180a6 fix(compiler): update compiler to flatten nested template fns (#24943)
PR Close #24943
2018-07-30 15:54:11 -07:00
Kara Erickson 87419097da fix(ivy): flatten template fns for nested views (#24943)
PR Close #24943
2018-07-30 15:54:11 -07:00
Victor Berchet 6a797d5401 refactor(ivy): `element` and `ElementStart` retuns `void` (#25173)
use `loadElement` to load an element when needed in specs

PR Close #25173
2018-07-27 17:22:18 -07:00
Victor Berchet 89e8b6fc0e refactor(ivy): update specs to make use of the `element()` instruction (#25173)
PR Close #25173
2018-07-27 17:22:18 -07:00
Victor Berchet 7f59170f77 refactor(ivy): use `element()` where applicable in di_spec (#25166)
For future ref
Search `elementStart\(([^)]+)\);\s*\n\s*elementEnd\(\);`
Replace `element($1)`

PR Close #25166
2018-07-27 18:47:13 -04:00
Victor Berchet 15df853622 fix(ivy): walk the node injector tree and then the module injector tree (#25166)
- `directiveInjector()` is used to inject anything in the directive / component
/ pipe factories so adding `InjectionToken<T>` as a supported token type.
- `getOrCreateInjectable()` should search first in the node injector tree and
then in the module injector tree (was either or before the PR).

PR Close #25166
2018-07-27 18:47:13 -04:00
Olivier Combe 1ceddb6290 fix(ivy): support re-order embedded templates (#24805)
PR Close #24805
2018-07-24 16:41:05 -07:00
Olivier Combe 22731a7588 refactor(ivy): split i18nInterpolation into 8 functions (#24805)
PR Close #24805
2018-07-24 16:41:05 -07:00
Olivier Combe 72dd10f78f refactor(ivy): cleanup runtime i18n code (#24805)
Fixes #24785

PR Close #24805
2018-07-24 16:41:05 -07:00
Marc Laval 445b9a5627 feat(ivy): support ViewContainerRef.createComponent() (#24997)
PR Close #24997
2018-07-24 08:23:23 -07:00
Matias Niemelä 169e9dd2c8 feat(ivy): bridge compile instructions to include sanitization helpers (#24938)
PR Close #24938
2018-07-23 08:49:52 -07:00
Pawel Kozlowski 56b3f1703e fix(ivy): invoke lifecycle hooks of directives placed on ng-template (#24899)
PR Close #24899
2018-07-20 10:45:51 -07:00
Matias Niemelä ba3eb8b654 feat(ivy): properly apply class="", [class], [class.foo] and [attr.class] bindings (#24822)
PR Close #24822
2018-07-17 16:33:25 -04:00
Alex Rickabaugh cde0b4b361 fix(ivy): *Def types are private (ɵ) symbols (#24738)
On accident a few of the definition types were emitted as public API
symbols. Much of the Ivy API surface is still prefixed with ɵ,
indicating it's a private API. The definition types should be private
for now.

PR Close #24738
2018-07-12 16:36:35 -04:00
Pawel Kozlowski 0399c6972a refactor(ivy): remove content query creation from directive factories (#24811)
PR Close #24811
2018-07-12 16:32:33 -04:00
Kara Erickson 3a19f70d1c refactor(ivy): replace pNextOrParent with TNode props (#24752)
PR Close #24752
2018-07-10 11:12:27 -07:00