@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
@@ -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
  */
@@ -78,10 +78,11 @@
78
78
  }
79
79
 
80
80
  function __awaiter(thisArg, _arguments, P, generator) {
81
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
81
82
  return new (P || (P = Promise))(function (resolve, reject) {
82
83
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
83
84
  function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
84
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
85
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
85
86
  step((generator = generator.apply(thisArg, _arguments || [])).next());
86
87
  });
87
88
  }
@@ -119,14 +120,15 @@
119
120
  }
120
121
 
121
122
  function __values(o) {
122
- var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
123
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
123
124
  if (m) return m.call(o);
124
- return {
125
+ if (o && typeof o.length === "number") return {
125
126
  next: function () {
126
127
  if (o && i >= o.length) o = void 0;
127
128
  return { value: o && o[i++], done: !o };
128
129
  }
129
130
  };
131
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
130
132
  }
131
133
 
132
134
  function __read(o, n) {
@@ -205,6 +207,21 @@
205
207
 
206
208
  function __importDefault(mod) {
207
209
  return (mod && mod.__esModule) ? mod : { default: mod };
210
+ }
211
+
212
+ function __classPrivateFieldGet(receiver, privateMap) {
213
+ if (!privateMap.has(receiver)) {
214
+ throw new TypeError("attempted to get private field on non-instance");
215
+ }
216
+ return privateMap.get(receiver);
217
+ }
218
+
219
+ function __classPrivateFieldSet(receiver, privateMap, value) {
220
+ if (!privateMap.has(receiver)) {
221
+ throw new TypeError("attempted to set private field on non-instance");
222
+ }
223
+ privateMap.set(receiver, value);
224
+ return value;
208
225
  }
209
226
 
210
227
  function isBrowser() {
@@ -336,7 +353,9 @@
336
353
  var _isNode = isNode();
337
354
  if (_isNode || typeof Element !== 'undefined') {
338
355
  // this is well supported in all browsers
339
- _contains = function (elm1, elm2) { return elm1.contains(elm2); };
356
+ _contains = function (elm1, elm2) {
357
+ return elm1.contains(elm2);
358
+ };
340
359
  _matches = (function () {
341
360
  if (_isNode || Element.prototype.matches) {
342
361
  return function (element, selector) { return element.matches(selector); };
@@ -413,11 +432,15 @@
413
432
  var NoopAnimationDriver = /** @class */ (function () {
414
433
  function NoopAnimationDriver() {
415
434
  }
416
- NoopAnimationDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
435
+ NoopAnimationDriver.prototype.validateStyleProperty = function (prop) {
436
+ return validateStyleProperty(prop);
437
+ };
417
438
  NoopAnimationDriver.prototype.matchesElement = function (element, selector) {
418
439
  return matchesElement(element, selector);
419
440
  };
420
- NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
441
+ NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) {
442
+ return containsElement(elm1, elm2);
443
+ };
421
444
  NoopAnimationDriver.prototype.query = function (element, selector, multi) {
422
445
  return invokeQuery(element, selector, multi);
423
446
  };
@@ -525,7 +548,9 @@
525
548
  }
526
549
  function copyObj(obj, destination) {
527
550
  if (destination === void 0) { destination = {}; }
528
- Object.keys(obj).forEach(function (prop) { destination[prop] = obj[prop]; });
551
+ Object.keys(obj).forEach(function (prop) {
552
+ destination[prop] = obj[prop];
553
+ });
529
554
  return destination;
530
555
  }
531
556
  function normalizeStyles(styles) {
@@ -709,7 +734,9 @@
709
734
  if (missingStyleProps_1.length) {
710
735
  var _loop_1 = function () {
711
736
  var kf = keyframes[i];
712
- missingStyleProps_1.forEach(function (prop) { kf[prop] = computeStyle(element, prop); });
737
+ missingStyleProps_1.forEach(function (prop) {
738
+ kf[prop] = computeStyle(element, prop);
739
+ });
713
740
  };
714
741
  // tslint:disable-next-line
715
742
  for (var i = 1; i < keyframes.length; i++) {
@@ -922,7 +949,11 @@
922
949
  });
923
950
  return {
924
951
  type: 7 /* Trigger */,
925
- name: metadata.name, states: states, transitions: transitions, queryCount: queryCount, depCount: depCount,
952
+ name: metadata.name,
953
+ states: states,
954
+ transitions: transitions,
955
+ queryCount: queryCount,
956
+ depCount: depCount,
926
957
  options: null
927
958
  };
928
959
  };
@@ -946,7 +977,8 @@
946
977
  });
947
978
  if (missingSubs_1.size) {
948
979
  var missingSubsArr = iteratorToArray(missingSubs_1.values());
949
- context.errors.push("state(\"" + metadata.name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', '));
980
+ context.errors.push("state(\"" + metadata
981
+ .name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', '));
950
982
  }
951
983
  }
952
984
  return {
@@ -1077,7 +1109,8 @@
1077
1109
  type: 6 /* Style */,
1078
1110
  styles: styles,
1079
1111
  easing: collectedEasing,
1080
- offset: metadata.offset, containsDynamicStyles: containsDynamicStyles,
1112
+ offset: metadata.offset,
1113
+ containsDynamicStyles: containsDynamicStyles,
1081
1114
  options: null
1082
1115
  };
1083
1116
  };
@@ -1103,7 +1136,8 @@
1103
1136
  if (collectedEntry) {
1104
1137
  if (startTime != endTime && startTime >= collectedEntry.startTime &&
1105
1138
  endTime <= collectedEntry.endTime) {
1106
- 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\"");
1139
+ context.errors.push("The CSS property \"" + prop + "\" that exists between the times of \"" + collectedEntry.startTime + "ms\" and \"" + collectedEntry
1140
+ .endTime + "ms\" is also being animated in a parallel animation between the times of \"" + startTime + "ms\" and \"" + endTime + "ms\"");
1107
1141
  updateCollectedStyle = false;
1108
1142
  }
1109
1143
  // we always choose the smaller start time value since we
@@ -1213,7 +1247,9 @@
1213
1247
  type: 11 /* Query */,
1214
1248
  selector: selector,
1215
1249
  limit: options.limit || 0,
1216
- optional: !!options.optional, includeSelf: includeSelf, animation: animation,
1250
+ optional: !!options.optional,
1251
+ includeSelf: includeSelf,
1252
+ animation: animation,
1217
1253
  originalSelector: metadata.selector,
1218
1254
  options: normalizeAnimationOptions(metadata.options)
1219
1255
  };
@@ -1227,7 +1263,8 @@
1227
1263
  resolveTiming(metadata.timings, context.errors, true);
1228
1264
  return {
1229
1265
  type: 12 /* Stagger */,
1230
- animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings: timings,
1266
+ animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
1267
+ timings: timings,
1231
1268
  options: null
1232
1269
  };
1233
1270
  };
@@ -1332,7 +1369,9 @@
1332
1369
  postStyleProps: postStyleProps,
1333
1370
  duration: duration,
1334
1371
  delay: delay,
1335
- totalTime: duration + delay, easing: easing, subTimeline: subTimeline
1372
+ totalTime: duration + delay,
1373
+ easing: easing,
1374
+ subTimeline: subTimeline
1336
1375
  };
1337
1376
  }
1338
1377
 
@@ -1357,8 +1396,12 @@
1357
1396
  }
1358
1397
  existingInstructions.push.apply(existingInstructions, __spread(instructions));
1359
1398
  };
1360
- ElementInstructionMap.prototype.has = function (element) { return this._map.has(element); };
1361
- ElementInstructionMap.prototype.clear = function () { this._map.clear(); };
1399
+ ElementInstructionMap.prototype.has = function (element) {
1400
+ return this._map.has(element);
1401
+ };
1402
+ ElementInstructionMap.prototype.clear = function () {
1403
+ this._map.clear();
1404
+ };
1362
1405
  return ElementInstructionMap;
1363
1406
  }());
1364
1407
 
@@ -1654,8 +1697,9 @@
1654
1697
  var startTime = context.currentTimeline.currentTime;
1655
1698
  var options = (ast.options || {});
1656
1699
  var delay = options.delay ? resolveTimingValue(options.delay) : 0;
1657
- if (delay && (context.previousNode.type === 6 /* Style */ ||
1658
- (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
1700
+ if (delay &&
1701
+ (context.previousNode.type === 6 /* Style */ ||
1702
+ (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
1659
1703
  context.currentTimeline.snapshotCurrentStyles();
1660
1704
  context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
1661
1705
  }
@@ -1743,7 +1787,9 @@
1743
1787
  timelines.push(this.currentTimeline);
1744
1788
  }
1745
1789
  Object.defineProperty(AnimationTimelineContext.prototype, "params", {
1746
- get: function () { return this.options.params; },
1790
+ get: function () {
1791
+ return this.options.params;
1792
+ },
1747
1793
  enumerable: true,
1748
1794
  configurable: true
1749
1795
  });
@@ -1779,7 +1825,9 @@
1779
1825
  var oldParams_1 = this.options.params;
1780
1826
  if (oldParams_1) {
1781
1827
  var params_1 = options['params'] = {};
1782
- Object.keys(oldParams_1).forEach(function (name) { params_1[name] = oldParams_1[name]; });
1828
+ Object.keys(oldParams_1).forEach(function (name) {
1829
+ params_1[name] = oldParams_1[name];
1830
+ });
1783
1831
  }
1784
1832
  }
1785
1833
  return options;
@@ -1881,9 +1929,13 @@
1881
1929
  return true;
1882
1930
  }
1883
1931
  };
1884
- TimelineBuilder.prototype.getCurrentStyleProperties = function () { return Object.keys(this._currentKeyframe); };
1932
+ TimelineBuilder.prototype.getCurrentStyleProperties = function () {
1933
+ return Object.keys(this._currentKeyframe);
1934
+ };
1885
1935
  Object.defineProperty(TimelineBuilder.prototype, "currentTime", {
1886
- get: function () { return this.startTime + this.duration; },
1936
+ get: function () {
1937
+ return this.startTime + this.duration;
1938
+ },
1887
1939
  enumerable: true,
1888
1940
  configurable: true
1889
1941
  });
@@ -1931,7 +1983,9 @@
1931
1983
  this._globalTimelineStyles[prop] = value;
1932
1984
  this._styleSummary[prop] = { time: this.currentTime, value: value };
1933
1985
  };
1934
- TimelineBuilder.prototype.allowOnlyTimelineStyles = function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; };
1986
+ TimelineBuilder.prototype.allowOnlyTimelineStyles = function () {
1987
+ return this._currentEmptyStepKeyframe !== this._currentKeyframe;
1988
+ };
1935
1989
  TimelineBuilder.prototype.applyEmptyStep = function (easing) {
1936
1990
  var _this = this;
1937
1991
  if (easing) {
@@ -1992,7 +2046,9 @@
1992
2046
  _this._updateStyle(prop, val);
1993
2047
  });
1994
2048
  };
1995
- TimelineBuilder.prototype.getFinalKeyframe = function () { return this._keyframes.get(this.duration); };
2049
+ TimelineBuilder.prototype.getFinalKeyframe = function () {
2050
+ return this._keyframes.get(this.duration);
2051
+ };
1996
2052
  Object.defineProperty(TimelineBuilder.prototype, "properties", {
1997
2053
  get: function () {
1998
2054
  var properties = [];
@@ -2064,7 +2120,9 @@
2064
2120
  _this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };
2065
2121
  return _this;
2066
2122
  }
2067
- SubTimelineBuilder.prototype.containsAnimation = function () { return this.keyframes.length > 1; };
2123
+ SubTimelineBuilder.prototype.containsAnimation = function () {
2124
+ return this.keyframes.length > 1;
2125
+ };
2068
2126
  SubTimelineBuilder.prototype.buildKeyframes = function () {
2069
2127
  var keyframes = this.keyframes;
2070
2128
  var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing;
@@ -2123,7 +2181,9 @@
2123
2181
  input.forEach(function (token) {
2124
2182
  if (token === '*') {
2125
2183
  allProperties = allProperties || Object.keys(allStyles);
2126
- allProperties.forEach(function (prop) { styles[prop] = animations.AUTO_STYLE; });
2184
+ allProperties.forEach(function (prop) {
2185
+ styles[prop] = animations.AUTO_STYLE;
2186
+ });
2127
2187
  }
2128
2188
  else {
2129
2189
  copyStyles(token, false, styles);
@@ -2138,7 +2198,7 @@
2138
2198
  var errors = [];
2139
2199
  var ast = buildAnimationAst(_driver, input, errors);
2140
2200
  if (errors.length) {
2141
- var errorMessage = "animation validation failed:\n" + errors.join("\n");
2201
+ var errorMessage = "animation validation failed:\n" + errors.join('\n');
2142
2202
  throw new Error(errorMessage);
2143
2203
  }
2144
2204
  this._animationAst = ast;
@@ -2152,7 +2212,7 @@
2152
2212
  subInstructions = subInstructions || new ElementInstructionMap();
2153
2213
  var result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);
2154
2214
  if (errors.length) {
2155
- var errorMessage = "animation building failed:\n" + errors.join("\n");
2215
+ var errorMessage = "animation building failed:\n" + errors.join('\n');
2156
2216
  throw new Error(errorMessage);
2157
2217
  }
2158
2218
  return result;
@@ -2181,7 +2241,9 @@
2181
2241
  var NoopAnimationStyleNormalizer = /** @class */ (function () {
2182
2242
  function NoopAnimationStyleNormalizer() {
2183
2243
  }
2184
- NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) { return propertyName; };
2244
+ NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) {
2245
+ return propertyName;
2246
+ };
2185
2247
  NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {
2186
2248
  return value;
2187
2249
  };
@@ -2270,9 +2332,13 @@
2270
2332
  var postStyleMap = new Map();
2271
2333
  var isRemoval = nextState === 'void';
2272
2334
  var animationOptions = { params: __assign(__assign({}, transitionAnimationParams), nextAnimationParams) };
2273
- var timelines = skipAstBuild ? [] : buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);
2335
+ var timelines = skipAstBuild ?
2336
+ [] :
2337
+ buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);
2274
2338
  var totalTime = 0;
2275
- timelines.forEach(function (tl) { totalTime = Math.max(tl.duration + tl.delay, totalTime); });
2339
+ timelines.forEach(function (tl) {
2340
+ totalTime = Math.max(tl.duration + tl.delay, totalTime);
2341
+ });
2276
2342
  if (errors.length) {
2277
2343
  return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);
2278
2344
  }
@@ -2332,8 +2398,8 @@
2332
2398
  return new AnimationTrigger(name, ast);
2333
2399
  }
2334
2400
  /**
2335
- * @publicApi
2336
- */
2401
+ * @publicApi
2402
+ */
2337
2403
  var AnimationTrigger = /** @class */ (function () {
2338
2404
  function AnimationTrigger(name, ast) {
2339
2405
  var _this = this;
@@ -2353,7 +2419,9 @@
2353
2419
  this.fallbackTransition = createFallbackTransition(name, this.states);
2354
2420
  }
2355
2421
  Object.defineProperty(AnimationTrigger.prototype, "containsQueries", {
2356
- get: function () { return this.ast.queryCount > 0; },
2422
+ get: function () {
2423
+ return this.ast.queryCount > 0;
2424
+ },
2357
2425
  enumerable: true,
2358
2426
  configurable: true
2359
2427
  });
@@ -2411,7 +2479,7 @@
2411
2479
  var errors = [];
2412
2480
  var ast = buildAnimationAst(this._driver, metadata, errors);
2413
2481
  if (errors.length) {
2414
- throw new Error("Unable to build the animation due to the following errors: " + errors.join("\n"));
2482
+ throw new Error("Unable to build the animation due to the following errors: " + errors.join('\n'));
2415
2483
  }
2416
2484
  else {
2417
2485
  this._animations[id] = ast;
@@ -2441,10 +2509,12 @@
2441
2509
  instructions = [];
2442
2510
  }
2443
2511
  if (errors.length) {
2444
- throw new Error("Unable to create the animation due to the following errors: " + errors.join("\n"));
2512
+ throw new Error("Unable to create the animation due to the following errors: " + errors.join('\n'));
2445
2513
  }
2446
2514
  autoStylesMap.forEach(function (styles, element) {
2447
- Object.keys(styles).forEach(function (prop) { styles[prop] = _this._driver.computeStyle(element, prop, animations.AUTO_STYLE); });
2515
+ Object.keys(styles).forEach(function (prop) {
2516
+ styles[prop] = _this._driver.computeStyle(element, prop, animations.AUTO_STYLE);
2517
+ });
2448
2518
  });
2449
2519
  var players = instructions.map(function (i) {
2450
2520
  var styles = autoStylesMap.get(i.element);
@@ -2561,7 +2631,9 @@
2561
2631
  }
2562
2632
  }
2563
2633
  Object.defineProperty(StateValue.prototype, "params", {
2564
- get: function () { return this.options.params; },
2634
+ get: function () {
2635
+ return this.options.params;
2636
+ },
2565
2637
  enumerable: true,
2566
2638
  configurable: true
2567
2639
  });
@@ -2713,7 +2785,9 @@
2713
2785
  this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: isFallbackTransition });
2714
2786
  if (!isFallbackTransition) {
2715
2787
  addClass(element, QUEUED_CLASSNAME);
2716
- player.onStart(function () { removeClass(element, QUEUED_CLASSNAME); });
2788
+ player.onStart(function () {
2789
+ removeClass(element, QUEUED_CLASSNAME);
2790
+ });
2717
2791
  }
2718
2792
  player.onDone(function () {
2719
2793
  var index = _this.players.indexOf(player);
@@ -2735,9 +2809,13 @@
2735
2809
  AnimationTransitionNamespace.prototype.deregister = function (name) {
2736
2810
  var _this = this;
2737
2811
  delete this._triggers[name];
2738
- this._engine.statesByElement.forEach(function (stateMap, element) { delete stateMap[name]; });
2812
+ this._engine.statesByElement.forEach(function (stateMap, element) {
2813
+ delete stateMap[name];
2814
+ });
2739
2815
  this._elementListeners.forEach(function (listeners, element) {
2740
- _this._elementListeners.set(element, listeners.filter(function (entry) { return entry.name != name; }));
2816
+ _this._elementListeners.set(element, listeners.filter(function (entry) {
2817
+ return entry.name != name;
2818
+ }));
2741
2819
  });
2742
2820
  };
2743
2821
  AnimationTransitionNamespace.prototype.clearElementCache = function (element) {
@@ -2879,7 +2957,9 @@
2879
2957
  }
2880
2958
  }
2881
2959
  };
2882
- AnimationTransitionNamespace.prototype.insertNode = function (element, parent) { addClass(element, this._hostClassName); };
2960
+ AnimationTransitionNamespace.prototype.insertNode = function (element, parent) {
2961
+ addClass(element, this._hostClassName);
2962
+ };
2883
2963
  AnimationTransitionNamespace.prototype.drainQueuedTransitions = function (microtaskId) {
2884
2964
  var _this = this;
2885
2965
  var instructions = [];
@@ -2959,7 +3039,9 @@
2959
3039
  this.onRemovalComplete = function (element, context) { };
2960
3040
  }
2961
3041
  /** @internal */
2962
- TransitionAnimationEngine.prototype._onRemovalComplete = function (element, context) { this.onRemovalComplete(element, context); };
3042
+ TransitionAnimationEngine.prototype._onRemovalComplete = function (element, context) {
3043
+ this.onRemovalComplete(element, context);
3044
+ };
2963
3045
  Object.defineProperty(TransitionAnimationEngine.prototype, "queuedPlayers", {
2964
3046
  get: function () {
2965
3047
  var players = [];
@@ -3044,7 +3126,9 @@
3044
3126
  });
3045
3127
  this.afterFlushAnimationsDone(function () { return ns.destroy(context); });
3046
3128
  };
3047
- TransitionAnimationEngine.prototype._fetchNamespace = function (id) { return this._namespaceLookup[id]; };
3129
+ TransitionAnimationEngine.prototype._fetchNamespace = function (id) {
3130
+ return this._namespaceLookup[id];
3131
+ };
3048
3132
  TransitionAnimationEngine.prototype.fetchNamespacesByElement = function (element) {
3049
3133
  // normally there should only be one namespace per element, however
3050
3134
  // if @triggers are placed on both the component element and then
@@ -3111,7 +3195,9 @@
3111
3195
  this.collectEnterElement(element);
3112
3196
  }
3113
3197
  };
3114
- TransitionAnimationEngine.prototype.collectEnterElement = function (element) { this.collectedEnterElements.push(element); };
3198
+ TransitionAnimationEngine.prototype.collectEnterElement = function (element) {
3199
+ this.collectedEnterElements.push(element);
3200
+ };
3115
3201
  TransitionAnimationEngine.prototype.markElementAsDisabled = function (element, value) {
3116
3202
  if (value) {
3117
3203
  if (!this.disabledNodes.has(element)) {
@@ -3146,11 +3232,8 @@
3146
3232
  };
3147
3233
  TransitionAnimationEngine.prototype.markElementAsRemoved = function (namespaceId, element, hasAnimation, context) {
3148
3234
  this.collectedLeaveElements.push(element);
3149
- element[REMOVAL_FLAG] = {
3150
- namespaceId: namespaceId,
3151
- setForRemoval: context, hasAnimation: hasAnimation,
3152
- removedBeforeQueried: false
3153
- };
3235
+ element[REMOVAL_FLAG] =
3236
+ { namespaceId: namespaceId, setForRemoval: context, hasAnimation: hasAnimation, removedBeforeQueried: false };
3154
3237
  };
3155
3238
  TransitionAnimationEngine.prototype.listen = function (namespaceId, element, name, phase, callback) {
3156
3239
  if (isElementNode(element)) {
@@ -3269,7 +3352,9 @@
3269
3352
  var quietFns_1 = this._whenQuietFns;
3270
3353
  this._whenQuietFns = [];
3271
3354
  if (players.length) {
3272
- optimizeGroupPlayer(players).onDone(function () { quietFns_1.forEach(function (fn) { return fn(); }); });
3355
+ optimizeGroupPlayer(players).onDone(function () {
3356
+ quietFns_1.forEach(function (fn) { return fn(); });
3357
+ });
3273
3358
  }
3274
3359
  else {
3275
3360
  quietFns_1.forEach(function (fn) { return fn(); });
@@ -3342,7 +3427,9 @@
3342
3427
  var className = leaveNodeMapIds.get(root);
3343
3428
  nodes.forEach(function (node) { return removeClass(node, className); });
3344
3429
  });
3345
- allLeaveNodes.forEach(function (element) { _this.processLeaveNode(element); });
3430
+ allLeaveNodes.forEach(function (element) {
3431
+ _this.processLeaveNode(element);
3432
+ });
3346
3433
  });
3347
3434
  var allPlayers = [];
3348
3435
  var erroneousTransitions = [];
@@ -3618,8 +3705,12 @@
3618
3705
  containsData = true;
3619
3706
  return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;
3620
3707
  };
3621
- TransitionAnimationEngine.prototype.afterFlush = function (callback) { this._flushFns.push(callback); };
3622
- TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) { this._whenQuietFns.push(callback); };
3708
+ TransitionAnimationEngine.prototype.afterFlush = function (callback) {
3709
+ this._flushFns.push(callback);
3710
+ };
3711
+ TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) {
3712
+ this._whenQuietFns.push(callback);
3713
+ };
3623
3714
  TransitionAnimationEngine.prototype._getPreviousPlayers = function (element, isQueriedElement, namespaceId, triggerName, toStateValue) {
3624
3715
  var players = [];
3625
3716
  if (isQueriedElement) {
@@ -3747,7 +3838,9 @@
3747
3838
  });
3748
3839
  // this basically makes all of the callbacks for sub element animations
3749
3840
  // be dependent on the upper players for when they finish
3750
- allSubElements.forEach(function (element) { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); });
3841
+ allSubElements.forEach(function (element) {
3842
+ getOrSetAsInMap(skippedPlayersMap, element, []).push(player);
3843
+ });
3751
3844
  return player;
3752
3845
  };
3753
3846
  TransitionAnimationEngine.prototype._buildPlayer = function (instruction, keyframes, previousPlayers) {
@@ -3787,8 +3880,12 @@
3787
3880
  this.overrideTotalTime(player.totalTime);
3788
3881
  this.queued = false;
3789
3882
  };
3790
- TransitionAnimationPlayer.prototype.getRealPlayer = function () { return this._player; };
3791
- TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) { this.totalTime = totalTime; };
3883
+ TransitionAnimationPlayer.prototype.getRealPlayer = function () {
3884
+ return this._player;
3885
+ };
3886
+ TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) {
3887
+ this.totalTime = totalTime;
3888
+ };
3792
3889
  TransitionAnimationPlayer.prototype.syncPlayerEvents = function (player) {
3793
3890
  var _this = this;
3794
3891
  var p = this._player;
@@ -3819,23 +3916,39 @@
3819
3916
  }
3820
3917
  this._player.onDestroy(fn);
3821
3918
  };
3822
- TransitionAnimationPlayer.prototype.init = function () { this._player.init(); };
3823
- TransitionAnimationPlayer.prototype.hasStarted = function () { return this.queued ? false : this._player.hasStarted(); };
3824
- TransitionAnimationPlayer.prototype.play = function () { !this.queued && this._player.play(); };
3825
- TransitionAnimationPlayer.prototype.pause = function () { !this.queued && this._player.pause(); };
3826
- TransitionAnimationPlayer.prototype.restart = function () { !this.queued && this._player.restart(); };
3827
- TransitionAnimationPlayer.prototype.finish = function () { this._player.finish(); };
3919
+ TransitionAnimationPlayer.prototype.init = function () {
3920
+ this._player.init();
3921
+ };
3922
+ TransitionAnimationPlayer.prototype.hasStarted = function () {
3923
+ return this.queued ? false : this._player.hasStarted();
3924
+ };
3925
+ TransitionAnimationPlayer.prototype.play = function () {
3926
+ !this.queued && this._player.play();
3927
+ };
3928
+ TransitionAnimationPlayer.prototype.pause = function () {
3929
+ !this.queued && this._player.pause();
3930
+ };
3931
+ TransitionAnimationPlayer.prototype.restart = function () {
3932
+ !this.queued && this._player.restart();
3933
+ };
3934
+ TransitionAnimationPlayer.prototype.finish = function () {
3935
+ this._player.finish();
3936
+ };
3828
3937
  TransitionAnimationPlayer.prototype.destroy = function () {
3829
3938
  this.destroyed = true;
3830
3939
  this._player.destroy();
3831
3940
  };
3832
- TransitionAnimationPlayer.prototype.reset = function () { !this.queued && this._player.reset(); };
3941
+ TransitionAnimationPlayer.prototype.reset = function () {
3942
+ !this.queued && this._player.reset();
3943
+ };
3833
3944
  TransitionAnimationPlayer.prototype.setPosition = function (p) {
3834
3945
  if (!this.queued) {
3835
3946
  this._player.setPosition(p);
3836
3947
  }
3837
3948
  };
3838
- TransitionAnimationPlayer.prototype.getPosition = function () { return this.queued ? 0 : this._player.getPosition(); };
3949
+ TransitionAnimationPlayer.prototype.getPosition = function () {
3950
+ return this.queued ? 0 : this._player.getPosition();
3951
+ };
3839
3952
  /** @internal */
3840
3953
  TransitionAnimationPlayer.prototype.triggerCallback = function (phaseName) {
3841
3954
  var p = this._player;
@@ -4058,7 +4171,7 @@
4058
4171
  var errors = [];
4059
4172
  var ast = buildAnimationAst(this._driver, metadata, errors);
4060
4173
  if (errors.length) {
4061
- throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join("\n - "));
4174
+ throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join('\n - '));
4062
4175
  }
4063
4176
  trigger = buildTrigger(name, ast);
4064
4177
  this._triggerCache[cacheKey] = trigger;
@@ -4110,7 +4223,9 @@
4110
4223
  enumerable: true,
4111
4224
  configurable: true
4112
4225
  });
4113
- AnimationEngine.prototype.whenRenderingDone = function () { return this._transitionEngine.whenRenderingDone(); };
4226
+ AnimationEngine.prototype.whenRenderingDone = function () {
4227
+ return this._transitionEngine.whenRenderingDone();
4228
+ };
4114
4229
  return AnimationEngine;
4115
4230
  }());
4116
4231
 
@@ -4253,14 +4368,20 @@
4253
4368
  addRemoveAnimationEvent(this._element, this._eventFn, false);
4254
4369
  this._startTime = Date.now();
4255
4370
  };
4256
- ElementAnimationStyleHandler.prototype.pause = function () { playPauseAnimation(this._element, this._name, 'paused'); };
4257
- ElementAnimationStyleHandler.prototype.resume = function () { playPauseAnimation(this._element, this._name, 'running'); };
4371
+ ElementAnimationStyleHandler.prototype.pause = function () {
4372
+ playPauseAnimation(this._element, this._name, 'paused');
4373
+ };
4374
+ ElementAnimationStyleHandler.prototype.resume = function () {
4375
+ playPauseAnimation(this._element, this._name, 'running');
4376
+ };
4258
4377
  ElementAnimationStyleHandler.prototype.setPosition = function (position) {
4259
4378
  var index = findIndexForAnimation(this._element, this._name);
4260
4379
  this._position = position * this._duration;
4261
4380
  setAnimationStyle(this._element, 'Delay', "-" + this._position + "ms", index);
4262
4381
  };
4263
- ElementAnimationStyleHandler.prototype.getPosition = function () { return this._position; };
4382
+ ElementAnimationStyleHandler.prototype.getPosition = function () {
4383
+ return this._position;
4384
+ };
4264
4385
  ElementAnimationStyleHandler.prototype._handleCallback = function (event) {
4265
4386
  var timestamp = event._ngTestManualTimestamp || Date.now();
4266
4387
  var elapsedTime = parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND$1;
@@ -4375,9 +4496,15 @@
4375
4496
  this.totalTime = _duration + _delay;
4376
4497
  this._buildStyler();
4377
4498
  }
4378
- CssKeyframesPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
4379
- CssKeyframesPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
4380
- CssKeyframesPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
4499
+ CssKeyframesPlayer.prototype.onStart = function (fn) {
4500
+ this._onStartFns.push(fn);
4501
+ };
4502
+ CssKeyframesPlayer.prototype.onDone = function (fn) {
4503
+ this._onDoneFns.push(fn);
4504
+ };
4505
+ CssKeyframesPlayer.prototype.onDestroy = function (fn) {
4506
+ this._onDestroyFns.push(fn);
4507
+ };
4381
4508
  CssKeyframesPlayer.prototype.destroy = function () {
4382
4509
  this.init();
4383
4510
  if (this._state >= 4 /* DESTROYED */)
@@ -4412,9 +4539,15 @@
4412
4539
  }
4413
4540
  this._flushDoneFns();
4414
4541
  };
4415
- CssKeyframesPlayer.prototype.setPosition = function (value) { this._styler.setPosition(value); };
4416
- CssKeyframesPlayer.prototype.getPosition = function () { return this._styler.getPosition(); };
4417
- CssKeyframesPlayer.prototype.hasStarted = function () { return this._state >= 2 /* STARTED */; };
4542
+ CssKeyframesPlayer.prototype.setPosition = function (value) {
4543
+ this._styler.setPosition(value);
4544
+ };
4545
+ CssKeyframesPlayer.prototype.getPosition = function () {
4546
+ return this._styler.getPosition();
4547
+ };
4548
+ CssKeyframesPlayer.prototype.hasStarted = function () {
4549
+ return this._state >= 2 /* STARTED */;
4550
+ };
4418
4551
  CssKeyframesPlayer.prototype.init = function () {
4419
4552
  if (this._state >= 1 /* INITIALIZED */)
4420
4553
  return;
@@ -4532,11 +4665,15 @@
4532
4665
  this._head = document.querySelector('head');
4533
4666
  this._warningIssued = false;
4534
4667
  }
4535
- CssKeyframesDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
4668
+ CssKeyframesDriver.prototype.validateStyleProperty = function (prop) {
4669
+ return validateStyleProperty(prop);
4670
+ };
4536
4671
  CssKeyframesDriver.prototype.matchesElement = function (element, selector) {
4537
4672
  return matchesElement(element, selector);
4538
4673
  };
4539
- CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
4674
+ CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) {
4675
+ return containsElement(elm1, elm2);
4676
+ };
4540
4677
  CssKeyframesDriver.prototype.query = function (element, selector, multi) {
4541
4678
  return invokeQuery(element, selector, multi);
4542
4679
  };
@@ -4687,9 +4824,15 @@
4687
4824
  // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]
4688
4825
  return element['animate'](keyframes, options);
4689
4826
  };
4690
- WebAnimationsPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
4691
- WebAnimationsPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
4692
- WebAnimationsPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };
4827
+ WebAnimationsPlayer.prototype.onStart = function (fn) {
4828
+ this._onStartFns.push(fn);
4829
+ };
4830
+ WebAnimationsPlayer.prototype.onDone = function (fn) {
4831
+ this._onDoneFns.push(fn);
4832
+ };
4833
+ WebAnimationsPlayer.prototype.onDestroy = function (fn) {
4834
+ this._onDestroyFns.push(fn);
4835
+ };
4693
4836
  WebAnimationsPlayer.prototype.play = function () {
4694
4837
  this._buildPlayer();
4695
4838
  if (!this.hasStarted()) {
@@ -4729,7 +4872,9 @@
4729
4872
  this.reset();
4730
4873
  this.play();
4731
4874
  };
4732
- WebAnimationsPlayer.prototype.hasStarted = function () { return this._started; };
4875
+ WebAnimationsPlayer.prototype.hasStarted = function () {
4876
+ return this._started;
4877
+ };
4733
4878
  WebAnimationsPlayer.prototype.destroy = function () {
4734
4879
  if (!this._destroyed) {
4735
4880
  this._destroyed = true;
@@ -4742,10 +4887,16 @@
4742
4887
  this._onDestroyFns = [];
4743
4888
  }
4744
4889
  };
4745
- WebAnimationsPlayer.prototype.setPosition = function (p) { this.domPlayer.currentTime = p * this.time; };
4746
- WebAnimationsPlayer.prototype.getPosition = function () { return this.domPlayer.currentTime / this.time; };
4890
+ WebAnimationsPlayer.prototype.setPosition = function (p) {
4891
+ this.domPlayer.currentTime = p * this.time;
4892
+ };
4893
+ WebAnimationsPlayer.prototype.getPosition = function () {
4894
+ return this.domPlayer.currentTime / this.time;
4895
+ };
4747
4896
  Object.defineProperty(WebAnimationsPlayer.prototype, "totalTime", {
4748
- get: function () { return this._delay + this._duration; },
4897
+ get: function () {
4898
+ return this._delay + this._duration;
4899
+ },
4749
4900
  enumerable: true,
4750
4901
  configurable: true
4751
4902
  });
@@ -4776,18 +4927,24 @@
4776
4927
  this._isNativeImpl = /\{\s*\[native\s+code\]\s*\}/.test(getElementAnimateFn().toString());
4777
4928
  this._cssKeyframesDriver = new CssKeyframesDriver();
4778
4929
  }
4779
- WebAnimationsDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };
4930
+ WebAnimationsDriver.prototype.validateStyleProperty = function (prop) {
4931
+ return validateStyleProperty(prop);
4932
+ };
4780
4933
  WebAnimationsDriver.prototype.matchesElement = function (element, selector) {
4781
4934
  return matchesElement(element, selector);
4782
4935
  };
4783
- WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
4936
+ WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) {
4937
+ return containsElement(elm1, elm2);
4938
+ };
4784
4939
  WebAnimationsDriver.prototype.query = function (element, selector, multi) {
4785
4940
  return invokeQuery(element, selector, multi);
4786
4941
  };
4787
4942
  WebAnimationsDriver.prototype.computeStyle = function (element, prop, defaultValue) {
4788
4943
  return window.getComputedStyle(element)[prop];
4789
4944
  };
4790
- WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) { this._isNativeImpl = supported; };
4945
+ WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) {
4946
+ this._isNativeImpl = supported;
4947
+ };
4791
4948
  WebAnimationsDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {
4792
4949
  if (previousPlayers === void 0) { previousPlayers = []; }
4793
4950
  var useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;