128 Commits

Author SHA1 Message Date
Rado Kirov
03d2e5cb1d refactor: Consistently use index access on index signature types. ()
This change helps highlight certain misoptimizations with Closure
compiler. It is also stylistically preferable to consistently use index
access on index sig types.

Roughly, when one sees '.foo' they know it is always checked for typos
in the prop name by the type system (unless 'any'), while "['foo']" is
always not.

Once all angular repos are conforming this will become a tsetse.info
check, enforced by bazel.

PR Close 
2019-02-28 02:49:14 -08:00
Matias Niemelä
a6ae759b46 fix(animations): ensure position and display styles are handled outside of keyframes/web-animations ()
When web-animations and/or CSS keyframes are used for animations certain
CSS style values (such as `display` and `position`) may be ignored by a
keyframe-based animation. Angular should special-case these styles to
ensure that they get applied as inline styles throughout the duration of
the animation.

Closes 
Closes 

Jira Issue: FW-1091
Jira Issue: FW-1092

PR Close 
2019-02-27 11:57:31 -08:00
onlyflix
41e68f7a7a style: change to American English ()
PR Close 
2019-01-29 16:30:25 -08:00
Matias Niemelä
5a582a8afd fix(ivy): ensure element removal triggers host removal animations ()
Prior to this fix Ivy would not execute any animation triggers
that exist as host bindings on an element if it is removed by
the parent template.

PR Close 
2019-01-17 09:58:50 -08:00
levgaas
f1c9d6a81f fix(animations): do not truncate decimals for delay ()
Do not truncate decimals for animation delay if specified in seconds

PR Close 
2018-12-14 15:20:23 -08:00
JoostK
df123e0410 fix(animations): mark actual descendant node as disabled ()
PR Close 
2018-12-14 15:19:56 -08:00
Pete Bacon Darwin
24521f549c docs: convert all @experimental tags to @publicApi tags ()
PR Close 
2018-10-19 14:35:52 -07:00
Greg Magolan
9605456b66 build: refactor ambient node & jasmine types so they are only included where needed ()
PR Close 
2018-08-16 13:46:43 -07:00
Martin Probst
d76531d16e fix(animations): @internal must use JSDoc tags. ()
This change fixes up several comments that accidentally used the JSDoc
tag @internal in regular block comments (`/*` instead of `/**`).

This prevents a problem with Closure Compiler that balks at `@` tags
occuring in regular block comments, because it assumes they were
intended to be tags for the compiler.

When occuring in `/**` JSDoc, tsickle escapes the tags, so they do not
cause problems.

PR Close 
2018-07-18 18:18:04 -04:00
Vikram Subramanian
6e20e0aac8 fix(animations): set animations styles properly on platform-server ()
Animations styles weren't getting properly set on platform-server because of erroneous checks and absence of reflection of style property to attribute on the server.

The fix corrects the check for platform and explicitly reflects the style property to the attribute.

PR Close 
2018-06-25 07:58:11 -07:00
Rado Kirov
c95437f15d build(bazel): Turning on strictPropertyInitialization for Angular. ()
All errors for existing fields have been detected and suppressed with a
`!` assertion.

Issue/24571 is tracking proper clean up of those instances.

One-line change required in ivy/compilation.ts, because it appears that
the new syntax causes tsickle emitted node to no longer track their
original sourceFiles.

PR Close 
2018-06-25 07:57:13 -07:00
Matias Niemelä
e8354edcd2 test(animations): properly reference body node for SSR environments ()
PR Close 
2018-06-20 11:00:41 -07:00
Matias Niemelä
dc4a3d00d0 fix(animations): always render end-state styles for orphaned DOM nodes ()
This patch ensures that any destination animation styling (state values)
are always applied even if the DOM node is not apart of the DOM.

PR Close 
2018-06-08 16:35:26 -07:00
Matias Niemelä
8db928df9d fix(animations): retain trigger-state for nodes that are moved around ()
This patch ensures that if a list of nodes (that contain
animation triggers) are moved around then they will retain their
trigger-value state when animated again at a later point.

PR Close 
2018-06-05 18:29:47 -07:00
Vikram Subramanian
b492b9e12b fix(animations): Fix browser detection logic ()
Element type is being polyfilled on the server now and cannot be used to detect browser environment.

PR Close 
2018-05-30 16:39:09 -07:00
Matias Niemelä
d2a86872a9 fix(animations): do not throw errors when a destroyed component is animated ()
PR Close 
2018-05-11 16:08:14 -04:00
Matias Niemelä
65211f46cf fix(animations): retain state styling for nodes that are moved around ()
PR Close 
2018-05-02 16:58:46 -07:00
Matias Niemelä
da9ff255dd fix(animations): properly clean up queried element styles in safari/edge ()
Prior to this patch, if an element is queried and animated for 0 seconds
(just a style() call and nothing else) then the styles applied would not
be properly cleaned up due to their camelCased nature.

PR Close 
2018-05-02 16:58:24 -07:00
Matias Niemelä
7be7abdebd refactor(animations): use a const enum to avoid compilation side effects ()
This patch is in response to  where a non-const enum was being
compiled as an empty object when used in an animation player when
`ng build --prod` was being processed. This patch is a immediate fix
for the issue and  tracks it.

Closes 

PR Close 
2018-04-17 14:03:01 -07:00
Veres Lajos
de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer ()
PR Close 
2018-03-27 14:51:53 -04:00
Matias Niemelä
e5e1b0da33 fix(animations): treat numeric state name values as strings ()
This patch ensures that if a numeric state name value in an animation
is detected then it will not throw an error. Normally this wouldn't
occur, but some JS optimizers may convert a quoted numeric value
(like "1" to 1) in some cases to save space. This patch makes sure
that Angular doesn't throw an error when this occurs.

PR Close 
2018-03-22 19:00:58 -04:00
Matias Niemelä
f88fba020b fix(animations): avoid animation insertions during router back/refresh ()
Closes 

PR Close 
2018-03-22 17:59:41 -04:00
Matias Niemelä
58b94e6f5e feat(animations): expose element and params within transition matchers ()
PR Close 
2018-03-13 09:42:24 -07:00
Alex Eagle
1e6cc42a01 test: migrate remaining public-api tests to Bazel ()
We now create npm packages to cover all the public api assertions in tools/public_api_guard.
We no longer depend on ts-api-guardian from npm - it is now stale since the repository was archived.
There is no longer a gulp task to enforce or accept the public API, this is in CircleCI as part of running all bazel test targets.

PR Close 
2018-03-09 09:11:40 -08:00
Matias Niemelä
b2f366b3b7 fix(animations): only use the WA-polyfill alongside AnimationBuilder ()
This patch removes the need to include the Web Animations API Polyfill
(web-animations-js) as a dependency. Angular will now fallback to using
CSS Keyframes in the event that `element.animate` is no longer supported
by the browser.

In the event that an application does use `AnimationBuilder` then the
web-animations-js polyfill is required to enable programmatic,
position-based access to an animation.

Closes 

PR Close 
2018-02-22 16:07:53 -08:00
Matias Niemelä
e1bf067090 fix(animations): report correct totalTime value even during noOp animations ()
This patch ensures that if the NoopAnimationsModule is used then it will
correctly report the associated `totalTime` property within the emitted
AnimationEvent instance when an animation event trigger is fired.

BREAKING CHANGE: When animation is trigged within a disabled zone, the
associated event (which an instance of AnimationEvent) will no longer
report the totalTime as 0 (it will emit the actual time of the
animation). To detect if an animation event is reporting a disabled
animation then the `event.disabled` property can be used instead.

PR Close 
2018-02-16 18:03:31 -08:00
Alex Rickabaugh
0a1a397cd7 fix(platform-browser): add @Injectable where it was missing ()
PR Close 
2018-02-12 14:34:59 -08:00
Martin Probst
871ece6123 fix(animations): renaming issue with DOMAnimation. ()
Closure Compiler renames all properties that are "internal" to the
program. `DOMAnimation` however is external, it is a browser API, so its
fields must not be renamed.

This change marks `DOMAnimation` as external using `declare interface`,
which will cause Closure Compiler to back off and prevent renaming of
any of its fields.

PR Close 
2017-12-21 09:44:37 -08:00
Matias Niemelä
13e663c232 fix(animations): ensure multi-level route leave animations are queryable ()
Closes 

PR Close 
2017-12-08 13:44:01 -08:00
Yuan Gao
e544742156 refactor(core): Removed readonly getters and changed to readonly ()
variables

PR Close 
2017-12-08 10:24:19 -08:00
Matias Niemelä
661fdcd3e2 refactor(animations): instantiate Set-matching code with values in constructor ()
For some reason, prior to this fix, the boolean set matching
code (within `animation_transition_expr.ts`) failed to remain
the same when compiled with closure. This refactor makes sure
that the code stays in tact.

Reproduction Details:
Passes without `ng build --prod`: https://burger.stackblitz.io/
Fails with `ng build --prod`: http://burger.fxck.cz/

Closes 

PR Close 
2017-12-07 17:16:21 -08:00
Matias Niemelä
c26e1bba1d fix(animations): ensure the web-animations driver properly handles empty keyframes ()
Closes 

PR Close 
2017-12-07 17:16:02 -08:00
Matias Niemelä
10771d0bd8 fix(animations): support webkit-based vendor prefixes for prop validations ()
Closes 

PR Close 
2017-12-07 17:15:53 -08:00
Matias Niemelä
c2b3792a3b fix(animations): ensure multi-level leave animations work ()
PR Close 
2017-11-28 18:24:41 -06:00
Matias Niemelä
b2a586cee1 fix(animations): ensure multi-level enter animations work ()
PR Close 
2017-11-28 18:24:40 -06:00
Miško Hevery
add5953aa1 Revert "fix(animations): ensure multi-level enter animations work ()"
This reverts commit dd6237ecd97123e8122dd30d6ae1d546fed599b8.
2017-11-28 15:08:44 -06:00
Miško Hevery
6b4c24020d Revert "fix(animations): ensure multi-level leave animations work ()"
This reverts commit 1366762d12e0faa857deb793255099bfe0e0f717.
2017-11-28 15:08:31 -06:00
Matias Niemelä
1366762d12 fix(animations): ensure multi-level leave animations work ()
PR Close 
2017-11-27 16:59:47 -06:00
Matias Niemelä
dd6237ecd9 fix(animations): ensure multi-level enter animations work ()
PR Close 
2017-11-27 16:59:46 -06:00
Matias Niemelä
0e012c9669 fix(animations): always fire inner trigger callbacks even if blocked by parent animations ()
Closes 

PR Close 
2017-11-22 10:38:02 -06:00
Matias Niemelä
1861e416a1 fix(animations): validate against trigger() names that use @ symbols ()
PR Close 
2017-11-16 16:20:09 -06:00
Miško Hevery
f8658cdc38 Revert "fix(animations): always fire inner trigger callbacks even if blocked by parent animations ()"
This reverts commit d47b2a6f706c42c049bf0faf1112c97ecf681c0a.
2017-11-15 17:04:22 -06:00
Matias Niemelä
d47b2a6f70 fix(animations): always fire inner trigger callbacks even if blocked by parent animations ()
Closes 

PR Close 
2017-11-14 15:59:47 -08:00
Matias Niemelä
20aafff092 fix(animations): ensure final state() styles are applied within @.disabled animations ()
Closes 

PR Close 
2017-11-14 11:01:11 -08:00
Bowen Ni
743651f5e8 refactor(animations): uses a loop instead Array.map() which creates and ()
returns a new array that is discarded.

This pattern will become a compilation error in google3.

PR Close 
2017-11-10 13:47:02 -08:00
Tobias Bosch
8d735da5d8 Revert "fix(animations): always fire inner trigger callbacks even if blocked by parent animations ()"
This reverts commit 5a9ed2de272912ac74ed56bfec4bdf4551f7b38e.
As it broke an internal test.
2017-10-18 09:56:59 -07:00
Matias Niemelä
5a9ed2de27 fix(animations): always fire inner trigger callbacks even if blocked by parent animations ()
Closes 

PR Close 
2017-10-17 20:57:57 -07:00
Matias Niemelä
d035175cdb fix(animations): ensure inner :leave animations do not remove node when skipped () ()
PR Close 
2017-10-16 11:13:58 -07:00
Matias Niemelä
f42d317d2f fix(animations): ensure animateChild() works with all inner leave animations () () ()
PR Close 
2017-10-16 11:13:58 -07:00
Chuck Jazdzewski
46992b4bda Revert "fix(animations): ensure animateChild() works with all inner leave animations () ()"
This reverts commit 9130505b57c10dc6f4cd9b12ca47e06c4f429b74.
2017-10-11 10:51:52 -07:00