The animations packages were duplicating a little bit of code due
to relative imports between entry-points. This caused bundlers to
inline shared functions twice in both FESM outputs.
PR Close#51500
JSDoc comments should start with 2 stars or the annotations would not be picked up by the AIO workflow.
With this fix, the internal methods are no longer visible in the doc.
PR Close#50893
warn developers when they are trying to animate non-animatable CSS
properties so that can more easily understand why something is not being
animated as they would expect it to
resolves#27577
PR Close#45212
The prior approach would consider all existing namespaces from back to front
to find the one that's the closest ancestor for a given host element. An
expensive `contains` operation was used which needed to traverse all the
way up the document root _for each existing namespace_. This commit implements
an optimization where the closest namespace is found by traversing up from
the host element, avoiding repeated DOM traversal.
Closes#45055
PR Close#45057
We were using a number of generic objects as if they were maps and relying on delete to remove
properties. In order to improve performance, these have been switched to native maps.
PR Close#44482
* The `TransitionAnimationEngine` had a fallback where it would store classes directly on a node if it doesn't have a `classList`. Presumably this is to support old browsers or if an animation is set on something like `ng-container`. This information was never used for anything since `containsClass` was never called. These changes simplify the logic to just a null check.
* Deprecates the `AnimationDriver.matchesElement` method, because it was only used in one place which can be replaced with `classList.contains`. We can't remove the method completely, because `AnimationDriver` is a public API. We also can't turn it into a method on the base class in order to remove it from the sub-classes, because it can break apps using `noImplicitOverride` while extending `AnimationDriver`.
PR Close#44378
This commit fixes the state of variable _started on call of reset method.
Earlier behaviour was on call of `reset()` method we are not setting back
`_started` flag's value to false and it created various issue for end user
which were expecting this behaviour as per name of method.
We provided end user `reset()` method, but it was empty method and on call
of it wasn't doing anything. As end user/developer were not able to
reuse animation not animation after call of reset method.
In this PR on call of `reset()` method we are setting flag `_started` value to false
which can be accessed by `hasStarted()`.
Resolves#18140
PR Close#41608
ɵAnimationDriver can be safely removed from private exports as AnimationDriver
is already a public export. Since its already available, we can safely remove
its declaration and migrate its only usage in our repo to rely on the public
AnimationDriver symbol.
PR Close#35690
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#22639
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#22225