@angular/animations 9.1.0 → 9.1.4

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.
Files changed (100) hide show
  1. package/animations.d.ts +9 -8
  2. package/animations.metadata.json +1 -1
  3. package/browser/browser.d.ts +1 -1
  4. package/browser/browser.metadata.json +1 -1
  5. package/browser/testing/testing.d.ts +1 -1
  6. package/browser/testing/testing.metadata.json +1 -1
  7. package/browser/testing.d.ts +1 -1
  8. package/browser.d.ts +1 -1
  9. package/bundles/animations-browser-testing.umd.js +33 -8
  10. package/bundles/animations-browser-testing.umd.js.map +1 -1
  11. package/bundles/animations-browser-testing.umd.min.js +1 -1
  12. package/bundles/animations-browser-testing.umd.min.js.map +1 -1
  13. package/bundles/animations-browser.umd.js +247 -90
  14. package/bundles/animations-browser.umd.js.map +1 -1
  15. package/bundles/animations-browser.umd.min.js +8 -8
  16. package/bundles/animations-browser.umd.min.js.map +1 -1
  17. package/bundles/animations.umd.js +45 -16
  18. package/bundles/animations.umd.js.map +1 -1
  19. package/bundles/animations.umd.min.js +1 -1
  20. package/bundles/animations.umd.min.js.map +1 -1
  21. package/esm2015/browser/index.js +1 -1
  22. package/esm2015/browser/public_api.js +1 -1
  23. package/esm2015/browser/src/browser.js +1 -1
  24. package/esm2015/browser/src/dsl/animation.js +3 -3
  25. package/esm2015/browser/src/dsl/animation_ast.js +1 -1
  26. package/esm2015/browser/src/dsl/animation_ast_builder.js +18 -8
  27. package/esm2015/browser/src/dsl/animation_timeline_builder.js +28 -11
  28. package/esm2015/browser/src/dsl/animation_timeline_instruction.js +4 -2
  29. package/esm2015/browser/src/dsl/animation_transition_expr.js +1 -1
  30. package/esm2015/browser/src/dsl/animation_transition_factory.js +7 -3
  31. package/esm2015/browser/src/dsl/animation_trigger.js +4 -2
  32. package/esm2015/browser/src/dsl/element_instruction_map.js +7 -3
  33. package/esm2015/browser/src/dsl/style_normalization/animation_style_normalizer.js +4 -2
  34. package/esm2015/browser/src/private_export.js +2 -2
  35. package/esm2015/browser/src/render/animation_driver.js +7 -3
  36. package/esm2015/browser/src/render/animation_engine_instruction.js +3 -2
  37. package/esm2015/browser/src/render/animation_engine_next.js +8 -4
  38. package/esm2015/browser/src/render/css_keyframes/css_keyframes_driver.js +7 -3
  39. package/esm2015/browser/src/render/css_keyframes/css_keyframes_player.js +23 -8
  40. package/esm2015/browser/src/render/css_keyframes/direct_style_player.js +1 -1
  41. package/esm2015/browser/src/render/css_keyframes/element_animation_style_handler.js +10 -4
  42. package/esm2015/browser/src/render/shared.js +4 -2
  43. package/esm2015/browser/src/render/special_cased_styles.js +1 -1
  44. package/esm2015/browser/src/render/timeline_animation_engine.js +6 -4
  45. package/esm2015/browser/src/render/transition_animation_engine.js +77 -34
  46. package/esm2015/browser/src/render/web_animations/web_animations_driver.js +10 -4
  47. package/esm2015/browser/src/render/web_animations/web_animations_player.js +22 -8
  48. package/esm2015/browser/src/util.js +7 -3
  49. package/esm2015/browser/testing/src/mock_animation_driver.js +13 -5
  50. package/esm2015/index.js +1 -1
  51. package/esm2015/public_api.js +1 -1
  52. package/esm2015/src/animation_metadata.js +3 -2
  53. package/esm2015/src/animations.js +2 -2
  54. package/esm2015/src/players/animation_group_player.js +37 -21
  55. package/esm2015/src/players/animation_player.js +25 -11
  56. package/esm2015/src/version.js +1 -1
  57. package/esm5/browser/src/dsl/animation.js +3 -3
  58. package/esm5/browser/src/dsl/animation_ast.js +1 -1
  59. package/esm5/browser/src/dsl/animation_ast_builder.js +18 -8
  60. package/esm5/browser/src/dsl/animation_timeline_builder.js +28 -11
  61. package/esm5/browser/src/dsl/animation_timeline_instruction.js +4 -2
  62. package/esm5/browser/src/dsl/animation_transition_expr.js +1 -1
  63. package/esm5/browser/src/dsl/animation_transition_factory.js +7 -3
  64. package/esm5/browser/src/dsl/animation_trigger.js +6 -4
  65. package/esm5/browser/src/dsl/element_instruction_map.js +7 -3
  66. package/esm5/browser/src/dsl/style_normalization/animation_style_normalizer.js +4 -2
  67. package/esm5/browser/src/private_export.js +2 -2
  68. package/esm5/browser/src/render/animation_driver.js +7 -3
  69. package/esm5/browser/src/render/animation_engine_instruction.js +1 -1
  70. package/esm5/browser/src/render/animation_engine_next.js +5 -3
  71. package/esm5/browser/src/render/css_keyframes/css_keyframes_driver.js +7 -3
  72. package/esm5/browser/src/render/css_keyframes/css_keyframes_player.js +19 -7
  73. package/esm5/browser/src/render/css_keyframes/direct_style_player.js +1 -1
  74. package/esm5/browser/src/render/css_keyframes/element_animation_style_handler.js +10 -4
  75. package/esm5/browser/src/render/shared.js +4 -2
  76. package/esm5/browser/src/render/special_cased_styles.js +1 -1
  77. package/esm5/browser/src/render/timeline_animation_engine.js +6 -4
  78. package/esm5/browser/src/render/transition_animation_engine.js +73 -30
  79. package/esm5/browser/src/render/web_animations/web_animations_driver.js +10 -4
  80. package/esm5/browser/src/render/web_animations/web_animations_player.js +22 -8
  81. package/esm5/browser/src/util.js +7 -3
  82. package/esm5/browser/testing/src/mock_animation_driver.js +13 -5
  83. package/esm5/src/animation_metadata.js +3 -2
  84. package/esm5/src/animations.js +2 -2
  85. package/esm5/src/players/animation_group_player.js +25 -9
  86. package/esm5/src/players/animation_player.js +19 -7
  87. package/esm5/src/version.js +1 -1
  88. package/fesm2015/animations.js +63 -32
  89. package/fesm2015/animations.js.map +1 -1
  90. package/fesm2015/browser/testing.js +13 -5
  91. package/fesm2015/browser/testing.js.map +1 -1
  92. package/fesm2015/browser.js +236 -91
  93. package/fesm2015/browser.js.map +1 -1
  94. package/fesm5/animations.js +45 -16
  95. package/fesm5/animations.js.map +1 -1
  96. package/fesm5/browser/testing.js +13 -5
  97. package/fesm5/browser/testing.js.map +1 -1
  98. package/fesm5/browser.js +227 -87
  99. package/fesm5/browser.js.map +1 -1
  100. package/package.json +2 -2
package/fesm5/browser.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v9.1.0
2
+ * @license Angular v9.1.4
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -137,7 +137,9 @@ var ɵ2 = _query;
137
137
  var _isNode = isNode();
138
138
  if (_isNode || typeof Element !== 'undefined') {
139
139
  // this is well supported in all browsers
140
- _contains = function (elm1, elm2) { return elm1.contains(elm2); };
140
+ _contains = function (elm1, elm2) {
141
+ return elm1.contains(elm2);
142
+ };
141
143
  _matches = (function () {
142
144
  if (_isNode || Element.prototype.matches) {
143
145
  return function (element, selector) { return element.matches(selector); };
@@ -214,11 +216,15 @@ function hypenatePropsObject(object) {
214
216
  var NoopAnimationDriver = /** @class */ (function () {
215
217
  function NoopAnimationDriver() {
216
218
  }
217
- NoopAnimationDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
219
+ NoopAnimationDriver.prototype.validateStyleProperty = function (prop) {
220
+ return validateStyleProperty(prop);
221
+ };
218
222
  NoopAnimationDriver.prototype.matchesElement = function (element, selector) {
219
223
  return matchesElement(element, selector);
220
224
  };
221
- NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
225
+ NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) {
226
+ return containsElement(elm1, elm2);
227
+ };
222
228
  NoopAnimationDriver.prototype.query = function (element, selector, multi) {
223
229
  return invokeQuery(element, selector, multi);
224
230
  };
@@ -326,7 +332,9 @@ function parseTimeExpression(exp, errors, allowNegativeValues) {
326
332
  }
327
333
  function copyObj(obj, destination) {
328
334
  if (destination === void 0) { destination = {}; }
329
- Object.keys(obj).forEach(function (prop) { destination[prop] = obj[prop]; });
335
+ Object.keys(obj).forEach(function (prop) {
336
+ destination[prop] = obj[prop];
337
+ });
330
338
  return destination;
331
339
  }
332
340
  function normalizeStyles(styles) {
@@ -510,7 +518,9 @@ function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles)
510
518
  if (missingStyleProps_1.length) {
511
519
  var _loop_1 = function () {
512
520
  var kf = keyframes[i];
513
- missingStyleProps_1.forEach(function (prop) { kf[prop] = computeStyle(element, prop); });
521
+ missingStyleProps_1.forEach(function (prop) {
522
+ kf[prop] = computeStyle(element, prop);
523
+ });
514
524
  };
515
525
  // tslint:disable-next-line
516
526
  for (var i = 1; i < keyframes.length; i++) {
@@ -723,7 +733,11 @@ var AnimationAstBuilderVisitor = /** @class */ (function () {
723
733
  });
724
734
  return {
725
735
  type: 7 /* Trigger */,
726
- name: metadata.name, states: states, transitions: transitions, queryCount: queryCount, depCount: depCount,
736
+ name: metadata.name,
737
+ states: states,
738
+ transitions: transitions,
739
+ queryCount: queryCount,
740
+ depCount: depCount,
727
741
  options: null
728
742
  };
729
743
  };
@@ -747,7 +761,8 @@ var AnimationAstBuilderVisitor = /** @class */ (function () {
747
761
  });
748
762
  if (missingSubs_1.size) {
749
763
  var missingSubsArr = iteratorToArray(missingSubs_1.values());
750
- context.errors.push("state(\"" + metadata.name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', '));
764
+ context.errors.push("state(\"" + metadata
765
+ .name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', '));
751
766
  }
752
767
  }
753
768
  return {
@@ -878,7 +893,8 @@ var AnimationAstBuilderVisitor = /** @class */ (function () {
878
893
  type: 6 /* Style */,
879
894
  styles: styles,
880
895
  easing: collectedEasing,
881
- offset: metadata.offset, containsDynamicStyles: containsDynamicStyles,
896
+ offset: metadata.offset,
897
+ containsDynamicStyles: containsDynamicStyles,
882
898
  options: null
883
899
  };
884
900
  };
@@ -904,7 +920,8 @@ var AnimationAstBuilderVisitor = /** @class */ (function () {
904
920
  if (collectedEntry) {
905
921
  if (startTime != endTime && startTime >= collectedEntry.startTime &&
906
922
  endTime <= collectedEntry.endTime) {
907
- context.errors.push("The CSS property \"" + prop + "\" that exists between the times of \"" + collectedEntry.startTime + "ms\" and \"" + collectedEntry.endTime + "ms\" is also being animated in a parallel animation between the times of \"" + startTime + "ms\" and \"" + endTime + "ms\"");
923
+ context.errors.push("The CSS property \"" + prop + "\" that exists between the times of \"" + collectedEntry.startTime + "ms\" and \"" + collectedEntry
924
+ .endTime + "ms\" is also being animated in a parallel animation between the times of \"" + startTime + "ms\" and \"" + endTime + "ms\"");
908
925
  updateCollectedStyle = false;
909
926
  }
910
927
  // we always choose the smaller start time value since we
@@ -1014,7 +1031,9 @@ var AnimationAstBuilderVisitor = /** @class */ (function () {
1014
1031
  type: 11 /* Query */,
1015
1032
  selector: selector,
1016
1033
  limit: options.limit || 0,
1017
- optional: !!options.optional, includeSelf: includeSelf, animation: animation,
1034
+ optional: !!options.optional,
1035
+ includeSelf: includeSelf,
1036
+ animation: animation,
1018
1037
  originalSelector: metadata.selector,
1019
1038
  options: normalizeAnimationOptions(metadata.options)
1020
1039
  };
@@ -1028,7 +1047,8 @@ var AnimationAstBuilderVisitor = /** @class */ (function () {
1028
1047
  resolveTiming(metadata.timings, context.errors, true);
1029
1048
  return {
1030
1049
  type: 12 /* Stagger */,
1031
- animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings: timings,
1050
+ animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
1051
+ timings: timings,
1032
1052
  options: null
1033
1053
  };
1034
1054
  };
@@ -1133,7 +1153,9 @@ function createTimelineInstruction(element, keyframes, preStyleProps, postStyleP
1133
1153
  postStyleProps: postStyleProps,
1134
1154
  duration: duration,
1135
1155
  delay: delay,
1136
- totalTime: duration + delay, easing: easing, subTimeline: subTimeline
1156
+ totalTime: duration + delay,
1157
+ easing: easing,
1158
+ subTimeline: subTimeline
1137
1159
  };
1138
1160
  }
1139
1161
 
@@ -1158,8 +1180,12 @@ var ElementInstructionMap = /** @class */ (function () {
1158
1180
  }
1159
1181
  existingInstructions.push.apply(existingInstructions, __spread(instructions));
1160
1182
  };
1161
- ElementInstructionMap.prototype.has = function (element) { return this._map.has(element); };
1162
- ElementInstructionMap.prototype.clear = function () { this._map.clear(); };
1183
+ ElementInstructionMap.prototype.has = function (element) {
1184
+ return this._map.has(element);
1185
+ };
1186
+ ElementInstructionMap.prototype.clear = function () {
1187
+ this._map.clear();
1188
+ };
1163
1189
  return ElementInstructionMap;
1164
1190
  }());
1165
1191
 
@@ -1455,8 +1481,9 @@ var AnimationTimelineBuilderVisitor = /** @class */ (function () {
1455
1481
  var startTime = context.currentTimeline.currentTime;
1456
1482
  var options = (ast.options || {});
1457
1483
  var delay = options.delay ? resolveTimingValue(options.delay) : 0;
1458
- if (delay && (context.previousNode.type === 6 /* Style */ ||
1459
- (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
1484
+ if (delay &&
1485
+ (context.previousNode.type === 6 /* Style */ ||
1486
+ (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
1460
1487
  context.currentTimeline.snapshotCurrentStyles();
1461
1488
  context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
1462
1489
  }
@@ -1544,7 +1571,9 @@ var AnimationTimelineContext = /** @class */ (function () {
1544
1571
  timelines.push(this.currentTimeline);
1545
1572
  }
1546
1573
  Object.defineProperty(AnimationTimelineContext.prototype, "params", {
1547
- get: function () { return this.options.params; },
1574
+ get: function () {
1575
+ return this.options.params;
1576
+ },
1548
1577
  enumerable: true,
1549
1578
  configurable: true
1550
1579
  });
@@ -1580,7 +1609,9 @@ var AnimationTimelineContext = /** @class */ (function () {
1580
1609
  var oldParams_1 = this.options.params;
1581
1610
  if (oldParams_1) {
1582
1611
  var params_1 = options['params'] = {};
1583
- Object.keys(oldParams_1).forEach(function (name) { params_1[name] = oldParams_1[name]; });
1612
+ Object.keys(oldParams_1).forEach(function (name) {
1613
+ params_1[name] = oldParams_1[name];
1614
+ });
1584
1615
  }
1585
1616
  }
1586
1617
  return options;
@@ -1682,9 +1713,13 @@ var TimelineBuilder = /** @class */ (function () {
1682
1713
  return true;
1683
1714
  }
1684
1715
  };
1685
- TimelineBuilder.prototype.getCurrentStyleProperties = function () { return Object.keys(this._currentKeyframe); };
1716
+ TimelineBuilder.prototype.getCurrentStyleProperties = function () {
1717
+ return Object.keys(this._currentKeyframe);
1718
+ };
1686
1719
  Object.defineProperty(TimelineBuilder.prototype, "currentTime", {
1687
- get: function () { return this.startTime + this.duration; },
1720
+ get: function () {
1721
+ return this.startTime + this.duration;
1722
+ },
1688
1723
  enumerable: true,
1689
1724
  configurable: true
1690
1725
  });
@@ -1732,7 +1767,9 @@ var TimelineBuilder = /** @class */ (function () {
1732
1767
  this._globalTimelineStyles[prop] = value;
1733
1768
  this._styleSummary[prop] = { time: this.currentTime, value: value };
1734
1769
  };
1735
- TimelineBuilder.prototype.allowOnlyTimelineStyles = function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; };
1770
+ TimelineBuilder.prototype.allowOnlyTimelineStyles = function () {
1771
+ return this._currentEmptyStepKeyframe !== this._currentKeyframe;
1772
+ };
1736
1773
  TimelineBuilder.prototype.applyEmptyStep = function (easing) {
1737
1774
  var _this = this;
1738
1775
  if (easing) {
@@ -1793,7 +1830,9 @@ var TimelineBuilder = /** @class */ (function () {
1793
1830
  _this._updateStyle(prop, val);
1794
1831
  });
1795
1832
  };
1796
- TimelineBuilder.prototype.getFinalKeyframe = function () { return this._keyframes.get(this.duration); };
1833
+ TimelineBuilder.prototype.getFinalKeyframe = function () {
1834
+ return this._keyframes.get(this.duration);
1835
+ };
1797
1836
  Object.defineProperty(TimelineBuilder.prototype, "properties", {
1798
1837
  get: function () {
1799
1838
  var properties = [];
@@ -1865,7 +1904,9 @@ var SubTimelineBuilder = /** @class */ (function (_super) {
1865
1904
  _this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };
1866
1905
  return _this;
1867
1906
  }
1868
- SubTimelineBuilder.prototype.containsAnimation = function () { return this.keyframes.length > 1; };
1907
+ SubTimelineBuilder.prototype.containsAnimation = function () {
1908
+ return this.keyframes.length > 1;
1909
+ };
1869
1910
  SubTimelineBuilder.prototype.buildKeyframes = function () {
1870
1911
  var keyframes = this.keyframes;
1871
1912
  var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing;
@@ -1924,7 +1965,9 @@ function flattenStyles(input, allStyles) {
1924
1965
  input.forEach(function (token) {
1925
1966
  if (token === '*') {
1926
1967
  allProperties = allProperties || Object.keys(allStyles);
1927
- allProperties.forEach(function (prop) { styles[prop] = AUTO_STYLE; });
1968
+ allProperties.forEach(function (prop) {
1969
+ styles[prop] = AUTO_STYLE;
1970
+ });
1928
1971
  }
1929
1972
  else {
1930
1973
  copyStyles(token, false, styles);
@@ -1939,7 +1982,7 @@ var Animation = /** @class */ (function () {
1939
1982
  var errors = [];
1940
1983
  var ast = buildAnimationAst(_driver, input, errors);
1941
1984
  if (errors.length) {
1942
- var errorMessage = "animation validation failed:\n" + errors.join("\n");
1985
+ var errorMessage = "animation validation failed:\n" + errors.join('\n');
1943
1986
  throw new Error(errorMessage);
1944
1987
  }
1945
1988
  this._animationAst = ast;
@@ -1953,7 +1996,7 @@ var Animation = /** @class */ (function () {
1953
1996
  subInstructions = subInstructions || new ElementInstructionMap();
1954
1997
  var result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);
1955
1998
  if (errors.length) {
1956
- var errorMessage = "animation building failed:\n" + errors.join("\n");
1999
+ var errorMessage = "animation building failed:\n" + errors.join('\n');
1957
2000
  throw new Error(errorMessage);
1958
2001
  }
1959
2002
  return result;
@@ -1982,7 +2025,9 @@ var AnimationStyleNormalizer = /** @class */ (function () {
1982
2025
  var NoopAnimationStyleNormalizer = /** @class */ (function () {
1983
2026
  function NoopAnimationStyleNormalizer() {
1984
2027
  }
1985
- NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) { return propertyName; };
2028
+ NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) {
2029
+ return propertyName;
2030
+ };
1986
2031
  NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {
1987
2032
  return value;
1988
2033
  };
@@ -2071,9 +2116,13 @@ var AnimationTransitionFactory = /** @class */ (function () {
2071
2116
  var postStyleMap = new Map();
2072
2117
  var isRemoval = nextState === 'void';
2073
2118
  var animationOptions = { params: __assign(__assign({}, transitionAnimationParams), nextAnimationParams) };
2074
- var timelines = skipAstBuild ? [] : buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);
2119
+ var timelines = skipAstBuild ?
2120
+ [] :
2121
+ buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);
2075
2122
  var totalTime = 0;
2076
- timelines.forEach(function (tl) { totalTime = Math.max(tl.duration + tl.delay, totalTime); });
2123
+ timelines.forEach(function (tl) {
2124
+ totalTime = Math.max(tl.duration + tl.delay, totalTime);
2125
+ });
2077
2126
  if (errors.length) {
2078
2127
  return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);
2079
2128
  }
@@ -2133,8 +2182,8 @@ function buildTrigger(name, ast) {
2133
2182
  return new AnimationTrigger(name, ast);
2134
2183
  }
2135
2184
  /**
2136
- * @publicApi
2137
- */
2185
+ * @publicApi
2186
+ */
2138
2187
  var AnimationTrigger = /** @class */ (function () {
2139
2188
  function AnimationTrigger(name, ast) {
2140
2189
  var _this = this;
@@ -2154,7 +2203,9 @@ var AnimationTrigger = /** @class */ (function () {
2154
2203
  this.fallbackTransition = createFallbackTransition(name, this.states);
2155
2204
  }
2156
2205
  Object.defineProperty(AnimationTrigger.prototype, "containsQueries", {
2157
- get: function () { return this.ast.queryCount > 0; },
2206
+ get: function () {
2207
+ return this.ast.queryCount > 0;
2208
+ },
2158
2209
  enumerable: true,
2159
2210
  configurable: true
2160
2211
  });
@@ -2212,7 +2263,7 @@ var TimelineAnimationEngine = /** @class */ (function () {
2212
2263
  var errors = [];
2213
2264
  var ast = buildAnimationAst(this._driver, metadata, errors);
2214
2265
  if (errors.length) {
2215
- throw new Error("Unable to build the animation due to the following errors: " + errors.join("\n"));
2266
+ throw new Error("Unable to build the animation due to the following errors: " + errors.join('\n'));
2216
2267
  }
2217
2268
  else {
2218
2269
  this._animations[id] = ast;
@@ -2242,10 +2293,12 @@ var TimelineAnimationEngine = /** @class */ (function () {
2242
2293
  instructions = [];
2243
2294
  }
2244
2295
  if (errors.length) {
2245
- throw new Error("Unable to create the animation due to the following errors: " + errors.join("\n"));
2296
+ throw new Error("Unable to create the animation due to the following errors: " + errors.join('\n'));
2246
2297
  }
2247
2298
  autoStylesMap.forEach(function (styles, element) {
2248
- Object.keys(styles).forEach(function (prop) { styles[prop] = _this._driver.computeStyle(element, prop, AUTO_STYLE); });
2299
+ Object.keys(styles).forEach(function (prop) {
2300
+ styles[prop] = _this._driver.computeStyle(element, prop, AUTO_STYLE);
2301
+ });
2249
2302
  });
2250
2303
  var players = instructions.map(function (i) {
2251
2304
  var styles = autoStylesMap.get(i.element);
@@ -2362,7 +2415,9 @@ var StateValue = /** @class */ (function () {
2362
2415
  }
2363
2416
  }
2364
2417
  Object.defineProperty(StateValue.prototype, "params", {
2365
- get: function () { return this.options.params; },
2418
+ get: function () {
2419
+ return this.options.params;
2420
+ },
2366
2421
  enumerable: true,
2367
2422
  configurable: true
2368
2423
  });
@@ -2514,7 +2569,9 @@ var AnimationTransitionNamespace = /** @class */ (function () {
2514
2569
  this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: isFallbackTransition });
2515
2570
  if (!isFallbackTransition) {
2516
2571
  addClass(element, QUEUED_CLASSNAME);
2517
- player.onStart(function () { removeClass(element, QUEUED_CLASSNAME); });
2572
+ player.onStart(function () {
2573
+ removeClass(element, QUEUED_CLASSNAME);
2574
+ });
2518
2575
  }
2519
2576
  player.onDone(function () {
2520
2577
  var index = _this.players.indexOf(player);
@@ -2536,9 +2593,13 @@ var AnimationTransitionNamespace = /** @class */ (function () {
2536
2593
  AnimationTransitionNamespace.prototype.deregister = function (name) {
2537
2594
  var _this = this;
2538
2595
  delete this._triggers[name];
2539
- this._engine.statesByElement.forEach(function (stateMap, element) { delete stateMap[name]; });
2596
+ this._engine.statesByElement.forEach(function (stateMap, element) {
2597
+ delete stateMap[name];
2598
+ });
2540
2599
  this._elementListeners.forEach(function (listeners, element) {
2541
- _this._elementListeners.set(element, listeners.filter(function (entry) { return entry.name != name; }));
2600
+ _this._elementListeners.set(element, listeners.filter(function (entry) {
2601
+ return entry.name != name;
2602
+ }));
2542
2603
  });
2543
2604
  };
2544
2605
  AnimationTransitionNamespace.prototype.clearElementCache = function (element) {
@@ -2680,7 +2741,9 @@ var AnimationTransitionNamespace = /** @class */ (function () {
2680
2741
  }
2681
2742
  }
2682
2743
  };
2683
- AnimationTransitionNamespace.prototype.insertNode = function (element, parent) { addClass(element, this._hostClassName); };
2744
+ AnimationTransitionNamespace.prototype.insertNode = function (element, parent) {
2745
+ addClass(element, this._hostClassName);
2746
+ };
2684
2747
  AnimationTransitionNamespace.prototype.drainQueuedTransitions = function (microtaskId) {
2685
2748
  var _this = this;
2686
2749
  var instructions = [];
@@ -2760,7 +2823,9 @@ var TransitionAnimationEngine = /** @class */ (function () {
2760
2823
  this.onRemovalComplete = function (element, context) { };
2761
2824
  }
2762
2825
  /** @internal */
2763
- TransitionAnimationEngine.prototype._onRemovalComplete = function (element, context) { this.onRemovalComplete(element, context); };
2826
+ TransitionAnimationEngine.prototype._onRemovalComplete = function (element, context) {
2827
+ this.onRemovalComplete(element, context);
2828
+ };
2764
2829
  Object.defineProperty(TransitionAnimationEngine.prototype, "queuedPlayers", {
2765
2830
  get: function () {
2766
2831
  var players = [];
@@ -2845,7 +2910,9 @@ var TransitionAnimationEngine = /** @class */ (function () {
2845
2910
  });
2846
2911
  this.afterFlushAnimationsDone(function () { return ns.destroy(context); });
2847
2912
  };
2848
- TransitionAnimationEngine.prototype._fetchNamespace = function (id) { return this._namespaceLookup[id]; };
2913
+ TransitionAnimationEngine.prototype._fetchNamespace = function (id) {
2914
+ return this._namespaceLookup[id];
2915
+ };
2849
2916
  TransitionAnimationEngine.prototype.fetchNamespacesByElement = function (element) {
2850
2917
  // normally there should only be one namespace per element, however
2851
2918
  // if @triggers are placed on both the component element and then
@@ -2912,7 +2979,9 @@ var TransitionAnimationEngine = /** @class */ (function () {
2912
2979
  this.collectEnterElement(element);
2913
2980
  }
2914
2981
  };
2915
- TransitionAnimationEngine.prototype.collectEnterElement = function (element) { this.collectedEnterElements.push(element); };
2982
+ TransitionAnimationEngine.prototype.collectEnterElement = function (element) {
2983
+ this.collectedEnterElements.push(element);
2984
+ };
2916
2985
  TransitionAnimationEngine.prototype.markElementAsDisabled = function (element, value) {
2917
2986
  if (value) {
2918
2987
  if (!this.disabledNodes.has(element)) {
@@ -2947,11 +3016,8 @@ var TransitionAnimationEngine = /** @class */ (function () {
2947
3016
  };
2948
3017
  TransitionAnimationEngine.prototype.markElementAsRemoved = function (namespaceId, element, hasAnimation, context) {
2949
3018
  this.collectedLeaveElements.push(element);
2950
- element[REMOVAL_FLAG] = {
2951
- namespaceId: namespaceId,
2952
- setForRemoval: context, hasAnimation: hasAnimation,
2953
- removedBeforeQueried: false
2954
- };
3019
+ element[REMOVAL_FLAG] =
3020
+ { namespaceId: namespaceId, setForRemoval: context, hasAnimation: hasAnimation, removedBeforeQueried: false };
2955
3021
  };
2956
3022
  TransitionAnimationEngine.prototype.listen = function (namespaceId, element, name, phase, callback) {
2957
3023
  if (isElementNode(element)) {
@@ -3070,7 +3136,9 @@ var TransitionAnimationEngine = /** @class */ (function () {
3070
3136
  var quietFns_1 = this._whenQuietFns;
3071
3137
  this._whenQuietFns = [];
3072
3138
  if (players.length) {
3073
- optimizeGroupPlayer(players).onDone(function () { quietFns_1.forEach(function (fn) { return fn(); }); });
3139
+ optimizeGroupPlayer(players).onDone(function () {
3140
+ quietFns_1.forEach(function (fn) { return fn(); });
3141
+ });
3074
3142
  }
3075
3143
  else {
3076
3144
  quietFns_1.forEach(function (fn) { return fn(); });
@@ -3143,7 +3211,9 @@ var TransitionAnimationEngine = /** @class */ (function () {
3143
3211
  var className = leaveNodeMapIds.get(root);
3144
3212
  nodes.forEach(function (node) { return removeClass(node, className); });
3145
3213
  });
3146
- allLeaveNodes.forEach(function (element) { _this.processLeaveNode(element); });
3214
+ allLeaveNodes.forEach(function (element) {
3215
+ _this.processLeaveNode(element);
3216
+ });
3147
3217
  });
3148
3218
  var allPlayers = [];
3149
3219
  var erroneousTransitions = [];
@@ -3419,8 +3489,12 @@ var TransitionAnimationEngine = /** @class */ (function () {
3419
3489
  containsData = true;
3420
3490
  return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;
3421
3491
  };
3422
- TransitionAnimationEngine.prototype.afterFlush = function (callback) { this._flushFns.push(callback); };
3423
- TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) { this._whenQuietFns.push(callback); };
3492
+ TransitionAnimationEngine.prototype.afterFlush = function (callback) {
3493
+ this._flushFns.push(callback);
3494
+ };
3495
+ TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) {
3496
+ this._whenQuietFns.push(callback);
3497
+ };
3424
3498
  TransitionAnimationEngine.prototype._getPreviousPlayers = function (element, isQueriedElement, namespaceId, triggerName, toStateValue) {
3425
3499
  var players = [];
3426
3500
  if (isQueriedElement) {
@@ -3548,7 +3622,9 @@ var TransitionAnimationEngine = /** @class */ (function () {
3548
3622
  });
3549
3623
  // this basically makes all of the callbacks for sub element animations
3550
3624
  // be dependent on the upper players for when they finish
3551
- allSubElements.forEach(function (element) { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); });
3625
+ allSubElements.forEach(function (element) {
3626
+ getOrSetAsInMap(skippedPlayersMap, element, []).push(player);
3627
+ });
3552
3628
  return player;
3553
3629
  };
3554
3630
  TransitionAnimationEngine.prototype._buildPlayer = function (instruction, keyframes, previousPlayers) {
@@ -3588,8 +3664,12 @@ var TransitionAnimationPlayer = /** @class */ (function () {
3588
3664
  this.overrideTotalTime(player.totalTime);
3589
3665
  this.queued = false;
3590
3666
  };
3591
- TransitionAnimationPlayer.prototype.getRealPlayer = function () { return this._player; };
3592
- TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) { this.totalTime = totalTime; };
3667
+ TransitionAnimationPlayer.prototype.getRealPlayer = function () {
3668
+ return this._player;
3669
+ };
3670
+ TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) {
3671
+ this.totalTime = totalTime;
3672
+ };
3593
3673
  TransitionAnimationPlayer.prototype.syncPlayerEvents = function (player) {
3594
3674
  var _this = this;
3595
3675
  var p = this._player;
@@ -3620,23 +3700,39 @@ var TransitionAnimationPlayer = /** @class */ (function () {
3620
3700
  }
3621
3701
  this._player.onDestroy(fn);
3622
3702
  };
3623
- TransitionAnimationPlayer.prototype.init = function () { this._player.init(); };
3624
- TransitionAnimationPlayer.prototype.hasStarted = function () { return this.queued ? false : this._player.hasStarted(); };
3625
- TransitionAnimationPlayer.prototype.play = function () { !this.queued && this._player.play(); };
3626
- TransitionAnimationPlayer.prototype.pause = function () { !this.queued && this._player.pause(); };
3627
- TransitionAnimationPlayer.prototype.restart = function () { !this.queued && this._player.restart(); };
3628
- TransitionAnimationPlayer.prototype.finish = function () { this._player.finish(); };
3703
+ TransitionAnimationPlayer.prototype.init = function () {
3704
+ this._player.init();
3705
+ };
3706
+ TransitionAnimationPlayer.prototype.hasStarted = function () {
3707
+ return this.queued ? false : this._player.hasStarted();
3708
+ };
3709
+ TransitionAnimationPlayer.prototype.play = function () {
3710
+ !this.queued && this._player.play();
3711
+ };
3712
+ TransitionAnimationPlayer.prototype.pause = function () {
3713
+ !this.queued && this._player.pause();
3714
+ };
3715
+ TransitionAnimationPlayer.prototype.restart = function () {
3716
+ !this.queued && this._player.restart();
3717
+ };
3718
+ TransitionAnimationPlayer.prototype.finish = function () {
3719
+ this._player.finish();
3720
+ };
3629
3721
  TransitionAnimationPlayer.prototype.destroy = function () {
3630
3722
  this.destroyed = true;
3631
3723
  this._player.destroy();
3632
3724
  };
3633
- TransitionAnimationPlayer.prototype.reset = function () { !this.queued && this._player.reset(); };
3725
+ TransitionAnimationPlayer.prototype.reset = function () {
3726
+ !this.queued && this._player.reset();
3727
+ };
3634
3728
  TransitionAnimationPlayer.prototype.setPosition = function (p) {
3635
3729
  if (!this.queued) {
3636
3730
  this._player.setPosition(p);
3637
3731
  }
3638
3732
  };
3639
- TransitionAnimationPlayer.prototype.getPosition = function () { return this.queued ? 0 : this._player.getPosition(); };
3733
+ TransitionAnimationPlayer.prototype.getPosition = function () {
3734
+ return this.queued ? 0 : this._player.getPosition();
3735
+ };
3640
3736
  /** @internal */
3641
3737
  TransitionAnimationPlayer.prototype.triggerCallback = function (phaseName) {
3642
3738
  var p = this._player;
@@ -3859,7 +3955,7 @@ var AnimationEngine = /** @class */ (function () {
3859
3955
  var errors = [];
3860
3956
  var ast = buildAnimationAst(this._driver, metadata, errors);
3861
3957
  if (errors.length) {
3862
- throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join("\n - "));
3958
+ throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join('\n - '));
3863
3959
  }
3864
3960
  trigger = buildTrigger(name, ast);
3865
3961
  this._triggerCache[cacheKey] = trigger;
@@ -3911,7 +4007,9 @@ var AnimationEngine = /** @class */ (function () {
3911
4007
  enumerable: true,
3912
4008
  configurable: true
3913
4009
  });
3914
- AnimationEngine.prototype.whenRenderingDone = function () { return this._transitionEngine.whenRenderingDone(); };
4010
+ AnimationEngine.prototype.whenRenderingDone = function () {
4011
+ return this._transitionEngine.whenRenderingDone();
4012
+ };
3915
4013
  return AnimationEngine;
3916
4014
  }());
3917
4015
 
@@ -4054,14 +4152,20 @@ var ElementAnimationStyleHandler = /** @class */ (function () {
4054
4152
  addRemoveAnimationEvent(this._element, this._eventFn, false);
4055
4153
  this._startTime = Date.now();
4056
4154
  };
4057
- ElementAnimationStyleHandler.prototype.pause = function () { playPauseAnimation(this._element, this._name, 'paused'); };
4058
- ElementAnimationStyleHandler.prototype.resume = function () { playPauseAnimation(this._element, this._name, 'running'); };
4155
+ ElementAnimationStyleHandler.prototype.pause = function () {
4156
+ playPauseAnimation(this._element, this._name, 'paused');
4157
+ };
4158
+ ElementAnimationStyleHandler.prototype.resume = function () {
4159
+ playPauseAnimation(this._element, this._name, 'running');
4160
+ };
4059
4161
  ElementAnimationStyleHandler.prototype.setPosition = function (position) {
4060
4162
  var index = findIndexForAnimation(this._element, this._name);
4061
4163
  this._position = position * this._duration;
4062
4164
  setAnimationStyle(this._element, 'Delay', "-" + this._position + "ms", index);
4063
4165
  };
4064
- ElementAnimationStyleHandler.prototype.getPosition = function () { return this._position; };
4166
+ ElementAnimationStyleHandler.prototype.getPosition = function () {
4167
+ return this._position;
4168
+ };
4065
4169
  ElementAnimationStyleHandler.prototype._handleCallback = function (event) {
4066
4170
  var timestamp = event._ngTestManualTimestamp || Date.now();
4067
4171
  var elapsedTime = parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND$1;
@@ -4176,9 +4280,15 @@ var CssKeyframesPlayer = /** @class */ (function () {
4176
4280
  this.totalTime = _duration + _delay;
4177
4281
  this._buildStyler();
4178
4282
  }
4179
- CssKeyframesPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
4180
- CssKeyframesPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
4181
- CssKeyframesPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
4283
+ CssKeyframesPlayer.prototype.onStart = function (fn) {
4284
+ this._onStartFns.push(fn);
4285
+ };
4286
+ CssKeyframesPlayer.prototype.onDone = function (fn) {
4287
+ this._onDoneFns.push(fn);
4288
+ };
4289
+ CssKeyframesPlayer.prototype.onDestroy = function (fn) {
4290
+ this._onDestroyFns.push(fn);
4291
+ };
4182
4292
  CssKeyframesPlayer.prototype.destroy = function () {
4183
4293
  this.init();
4184
4294
  if (this._state >= 4 /* DESTROYED */)
@@ -4213,9 +4323,15 @@ var CssKeyframesPlayer = /** @class */ (function () {
4213
4323
  }
4214
4324
  this._flushDoneFns();
4215
4325
  };
4216
- CssKeyframesPlayer.prototype.setPosition = function (value) { this._styler.setPosition(value); };
4217
- CssKeyframesPlayer.prototype.getPosition = function () { return this._styler.getPosition(); };
4218
- CssKeyframesPlayer.prototype.hasStarted = function () { return this._state >= 2 /* STARTED */; };
4326
+ CssKeyframesPlayer.prototype.setPosition = function (value) {
4327
+ this._styler.setPosition(value);
4328
+ };
4329
+ CssKeyframesPlayer.prototype.getPosition = function () {
4330
+ return this._styler.getPosition();
4331
+ };
4332
+ CssKeyframesPlayer.prototype.hasStarted = function () {
4333
+ return this._state >= 2 /* STARTED */;
4334
+ };
4219
4335
  CssKeyframesPlayer.prototype.init = function () {
4220
4336
  if (this._state >= 1 /* INITIALIZED */)
4221
4337
  return;
@@ -4333,11 +4449,15 @@ var CssKeyframesDriver = /** @class */ (function () {
4333
4449
  this._head = document.querySelector('head');
4334
4450
  this._warningIssued = false;
4335
4451
  }
4336
- CssKeyframesDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
4452
+ CssKeyframesDriver.prototype.validateStyleProperty = function (prop) {
4453
+ return validateStyleProperty(prop);
4454
+ };
4337
4455
  CssKeyframesDriver.prototype.matchesElement = function (element, selector) {
4338
4456
  return matchesElement(element, selector);
4339
4457
  };
4340
- CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
4458
+ CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) {
4459
+ return containsElement(elm1, elm2);
4460
+ };
4341
4461
  CssKeyframesDriver.prototype.query = function (element, selector, multi) {
4342
4462
  return invokeQuery(element, selector, multi);
4343
4463
  };
@@ -4488,9 +4608,15 @@ var WebAnimationsPlayer = /** @class */ (function () {
4488
4608
  // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]
4489
4609
  return element['animate'](keyframes, options);
4490
4610
  };
4491
- WebAnimationsPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
4492
- WebAnimationsPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
4493
- WebAnimationsPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
4611
+ WebAnimationsPlayer.prototype.onStart = function (fn) {
4612
+ this._onStartFns.push(fn);
4613
+ };
4614
+ WebAnimationsPlayer.prototype.onDone = function (fn) {
4615
+ this._onDoneFns.push(fn);
4616
+ };
4617
+ WebAnimationsPlayer.prototype.onDestroy = function (fn) {
4618
+ this._onDestroyFns.push(fn);
4619
+ };
4494
4620
  WebAnimationsPlayer.prototype.play = function () {
4495
4621
  this._buildPlayer();
4496
4622
  if (!this.hasStarted()) {
@@ -4530,7 +4656,9 @@ var WebAnimationsPlayer = /** @class */ (function () {
4530
4656
  this.reset();
4531
4657
  this.play();
4532
4658
  };
4533
- WebAnimationsPlayer.prototype.hasStarted = function () { return this._started; };
4659
+ WebAnimationsPlayer.prototype.hasStarted = function () {
4660
+ return this._started;
4661
+ };
4534
4662
  WebAnimationsPlayer.prototype.destroy = function () {
4535
4663
  if (!this._destroyed) {
4536
4664
  this._destroyed = true;
@@ -4543,10 +4671,16 @@ var WebAnimationsPlayer = /** @class */ (function () {
4543
4671
  this._onDestroyFns = [];
4544
4672
  }
4545
4673
  };
4546
- WebAnimationsPlayer.prototype.setPosition = function (p) { this.domPlayer.currentTime = p * this.time; };
4547
- WebAnimationsPlayer.prototype.getPosition = function () { return this.domPlayer.currentTime / this.time; };
4674
+ WebAnimationsPlayer.prototype.setPosition = function (p) {
4675
+ this.domPlayer.currentTime = p * this.time;
4676
+ };
4677
+ WebAnimationsPlayer.prototype.getPosition = function () {
4678
+ return this.domPlayer.currentTime / this.time;
4679
+ };
4548
4680
  Object.defineProperty(WebAnimationsPlayer.prototype, "totalTime", {
4549
- get: function () { return this._delay + this._duration; },
4681
+ get: function () {
4682
+ return this._delay + this._duration;
4683
+ },
4550
4684
  enumerable: true,
4551
4685
  configurable: true
4552
4686
  });
@@ -4577,18 +4711,24 @@ var WebAnimationsDriver = /** @class */ (function () {
4577
4711
  this._isNativeImpl = /\{\s*\[native\s+code\]\s*\}/.test(getElementAnimateFn().toString());
4578
4712
  this._cssKeyframesDriver = new CssKeyframesDriver();
4579
4713
  }
4580
- WebAnimationsDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
4714
+ WebAnimationsDriver.prototype.validateStyleProperty = function (prop) {
4715
+ return validateStyleProperty(prop);
4716
+ };
4581
4717
  WebAnimationsDriver.prototype.matchesElement = function (element, selector) {
4582
4718
  return matchesElement(element, selector);
4583
4719
  };
4584
- WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
4720
+ WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) {
4721
+ return containsElement(elm1, elm2);
4722
+ };
4585
4723
  WebAnimationsDriver.prototype.query = function (element, selector, multi) {
4586
4724
  return invokeQuery(element, selector, multi);
4587
4725
  };
4588
4726
  WebAnimationsDriver.prototype.computeStyle = function (element, prop, defaultValue) {
4589
4727
  return window.getComputedStyle(element)[prop];
4590
4728
  };
4591
- WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) { this._isNativeImpl = supported; };
4729
+ WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) {
4730
+ this._isNativeImpl = supported;
4731
+ };
4592
4732
  WebAnimationsDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {
4593
4733
  if (previousPlayers === void 0) { previousPlayers = []; }
4594
4734
  var useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;