@angular/animations 9.0.0-rc.6 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,5 +26,5 @@ var Version = /** @class */ (function () {
26
26
  return Version;
27
27
  }());
28
28
  export { Version };
29
- export var VERSION = new Version('9.0.0-rc.6');
29
+ export var VERSION = new Version('9.0.0');
30
30
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUVIOzs7O0dBSUc7QUFDSDtJQUtFLGlCQUFtQixJQUFZO1FBQVosU0FBSSxHQUFKLElBQUksQ0FBUTtRQUM3QixJQUFNLE1BQU0sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQy9CLElBQUksQ0FBQyxLQUFLLEdBQUcsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxLQUFLLEdBQUcsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxLQUFLLEdBQUcsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDekMsQ0FBQztJQUNILGNBQUM7QUFBRCxDQUFDLEFBWEQsSUFXQzs7QUFFRCxNQUFNLENBQUMsSUFBTSxPQUFPLEdBQUcsSUFBSSxPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxu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) 2010-2019 Google LLC. https://angular.io/
2
+ * @license Angular v9.0.0
3
+ * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Angular v9.0.0-rc.6
3
- * (c) 2010-2019 Google LLC. https://angular.io/
2
+ * @license Angular v9.0.0
3
+ * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Angular v9.0.0-rc.6
3
- * (c) 2010-2019 Google LLC. https://angular.io/
2
+ * @license Angular v9.0.0
3
+ * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -4594,14 +4594,15 @@ class AnimationTransitionNamespace {
4594
4594
  * @private
4595
4595
  * @param {?} rootElement
4596
4596
  * @param {?} context
4597
- * @param {?=} animate
4598
4597
  * @return {?}
4599
4598
  */
4600
- _signalRemovalForInnerTriggers(rootElement, context, animate = false) {
4599
+ _signalRemovalForInnerTriggers(rootElement, context) {
4600
+ /** @type {?} */
4601
+ const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);
4601
4602
  // emulate a leave animation for all inner nodes within this node.
4602
4603
  // If there are no animations found for any of the nodes then clear the cache
4603
4604
  // for the element.
4604
- this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true).forEach((/**
4605
+ elements.forEach((/**
4605
4606
  * @param {?} elm
4606
4607
  * @return {?}
4607
4608
  */
@@ -4623,6 +4624,16 @@ class AnimationTransitionNamespace {
4623
4624
  this.clearElementCache(elm);
4624
4625
  }
4625
4626
  }));
4627
+ // If the child elements were removed along with the parent, their animations might not
4628
+ // have completed. Clear all the elements from the cache so we don't end up with a memory leak.
4629
+ this._engine.afterFlushAnimationsDone((/**
4630
+ * @return {?}
4631
+ */
4632
+ () => elements.forEach((/**
4633
+ * @param {?} elm
4634
+ * @return {?}
4635
+ */
4636
+ elm => this.clearElementCache(elm)))));
4626
4637
  }
4627
4638
  /**
4628
4639
  * @param {?} element
@@ -4719,7 +4730,7 @@ class AnimationTransitionNamespace {
4719
4730
  /** @type {?} */
4720
4731
  const engine = this._engine;
4721
4732
  if (element.childElementCount) {
4722
- this._signalRemovalForInnerTriggers(element, context, true);
4733
+ this._signalRemovalForInnerTriggers(element, context);
4723
4734
  }
4724
4735
  // this means that a * => VOID animation was detected and kicked off
4725
4736
  if (this.triggerLeaveAnimation(element, context, true))
@@ -4762,14 +4773,18 @@ class AnimationTransitionNamespace {
4762
4773
  engine.markElementAsRemoved(this.id, element, false, context);
4763
4774
  }
4764
4775
  else {
4765
- // we do this after the flush has occurred such
4766
- // that the callbacks can be fired
4767
- engine.afterFlush((/**
4768
- * @return {?}
4769
- */
4770
- () => this.clearElementCache(element)));
4771
- engine.destroyInnerAnimations(element);
4772
- engine._onRemovalComplete(element, context);
4776
+ /** @type {?} */
4777
+ const removalFlag = element[REMOVAL_FLAG];
4778
+ if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {
4779
+ // we do this after the flush has occurred such
4780
+ // that the callbacks can be fired
4781
+ engine.afterFlush((/**
4782
+ * @return {?}
4783
+ */
4784
+ () => this.clearElementCache(element)));
4785
+ engine.destroyInnerAnimations(element);
4786
+ engine._onRemovalComplete(element, context);
4787
+ }
4773
4788
  }
4774
4789
  }
4775
4790
  /**