@angular/animations 14.0.0-next.9 → 14.0.0-rc.2

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 (31) hide show
  1. package/browser/{browser.d.ts → index.d.ts} +240 -239
  2. package/browser/testing/{testing.d.ts → index.d.ts} +48 -47
  3. package/esm2020/browser/src/dsl/animation_ast_builder.mjs +39 -38
  4. package/esm2020/browser/src/dsl/animation_timeline_builder.mjs +4 -4
  5. package/esm2020/browser/src/dsl/animation_timeline_instruction.mjs +2 -2
  6. package/esm2020/browser/src/dsl/animation_transition_instruction.mjs +2 -2
  7. package/esm2020/browser/src/dsl/animation_trigger.mjs +3 -3
  8. package/esm2020/browser/src/error_helpers.mjs +37 -37
  9. package/esm2020/browser/src/render/animation_driver.mjs +3 -3
  10. package/esm2020/browser/src/render/special_cased_styles.mjs +8 -8
  11. package/esm2020/browser/src/render/web_animations/web_animations_driver.mjs +7 -3
  12. package/esm2020/browser/src/util.mjs +13 -13
  13. package/esm2020/browser/src/warning_helpers.mjs +2 -2
  14. package/esm2020/src/animation_metadata.mjs +14 -14
  15. package/esm2020/src/version.mjs +1 -1
  16. package/fesm2015/animations.mjs +14 -14
  17. package/fesm2015/animations.mjs.map +1 -1
  18. package/fesm2015/browser/testing.mjs +50 -50
  19. package/fesm2015/browser/testing.mjs.map +1 -1
  20. package/fesm2015/browser.mjs +112 -107
  21. package/fesm2015/browser.mjs.map +1 -1
  22. package/fesm2020/animations.mjs +14 -14
  23. package/fesm2020/animations.mjs.map +1 -1
  24. package/fesm2020/browser/testing.mjs +50 -50
  25. package/fesm2020/browser/testing.mjs.map +1 -1
  26. package/fesm2020/browser.mjs +112 -107
  27. package/fesm2020/browser.mjs.map +1 -1
  28. package/{animations.d.ts → index.d.ts} +1618 -1617
  29. package/package.json +6 -6
  30. package/browser/package.json +0 -10
  31. package/browser/testing/package.json +0 -9
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.9
2
+ * @license Angular v14.0.0-rc.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -18,127 +18,127 @@ import { ɵRuntimeError, Injectable } from '@angular/core';
18
18
  const NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;
19
19
  const LINE_START = '\n - ';
20
20
  function invalidTimingValue(exp) {
21
- return new ɵRuntimeError(3000 /* INVALID_TIMING_VALUE */, NG_DEV_MODE$1 && `The provided timing value "${exp}" is invalid.`);
21
+ return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, NG_DEV_MODE$1 && `The provided timing value "${exp}" is invalid.`);
22
22
  }
23
23
  function negativeStepValue() {
24
- return new ɵRuntimeError(3100 /* NEGATIVE_STEP_VALUE */, NG_DEV_MODE$1 && 'Duration values below 0 are not allowed for this animation step.');
24
+ return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, NG_DEV_MODE$1 && 'Duration values below 0 are not allowed for this animation step.');
25
25
  }
26
26
  function negativeDelayValue() {
27
- return new ɵRuntimeError(3101 /* NEGATIVE_DELAY_VALUE */, NG_DEV_MODE$1 && 'Delay values below 0 are not allowed for this animation step.');
27
+ return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, NG_DEV_MODE$1 && 'Delay values below 0 are not allowed for this animation step.');
28
28
  }
29
29
  function invalidStyleParams(varName) {
30
- return new ɵRuntimeError(3001 /* INVALID_STYLE_PARAMS */, NG_DEV_MODE$1 &&
30
+ return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, NG_DEV_MODE$1 &&
31
31
  `Unable to resolve the local animation param ${varName} in the given list of values`);
32
32
  }
33
33
  function invalidParamValue(varName) {
34
- return new ɵRuntimeError(3003 /* INVALID_PARAM_VALUE */, NG_DEV_MODE$1 && `Please provide a value for the animation param ${varName}`);
34
+ return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, NG_DEV_MODE$1 && `Please provide a value for the animation param ${varName}`);
35
35
  }
36
36
  function invalidNodeType(nodeType) {
37
- return new ɵRuntimeError(3004 /* INVALID_NODE_TYPE */, NG_DEV_MODE$1 && `Unable to resolve animation metadata node #${nodeType}`);
37
+ return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, NG_DEV_MODE$1 && `Unable to resolve animation metadata node #${nodeType}`);
38
38
  }
39
39
  function invalidCssUnitValue(userProvidedProperty, value) {
40
- return new ɵRuntimeError(3005 /* INVALID_CSS_UNIT_VALUE */, NG_DEV_MODE$1 && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
40
+ return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, NG_DEV_MODE$1 && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
41
41
  }
42
42
  function invalidTrigger() {
43
- return new ɵRuntimeError(3006 /* INVALID_TRIGGER */, NG_DEV_MODE$1 &&
43
+ return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, NG_DEV_MODE$1 &&
44
44
  'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\'@foo\', [...]))');
45
45
  }
46
46
  function invalidDefinition() {
47
- return new ɵRuntimeError(3007 /* INVALID_DEFINITION */, NG_DEV_MODE$1 && 'only state() and transition() definitions can sit inside of a trigger()');
47
+ return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, NG_DEV_MODE$1 && 'only state() and transition() definitions can sit inside of a trigger()');
48
48
  }
49
49
  function invalidState(metadataName, missingSubs) {
50
- return new ɵRuntimeError(3008 /* INVALID_STATE */, NG_DEV_MODE$1 &&
50
+ return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, NG_DEV_MODE$1 &&
51
51
  `state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);
52
52
  }
53
53
  function invalidStyleValue(value) {
54
- return new ɵRuntimeError(3002 /* INVALID_STYLE_VALUE */, NG_DEV_MODE$1 && `The provided style string value ${value} is not allowed.`);
54
+ return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, NG_DEV_MODE$1 && `The provided style string value ${value} is not allowed.`);
55
55
  }
56
56
  function invalidProperty(prop) {
57
- return new ɵRuntimeError(3009 /* INVALID_PROPERTY */, NG_DEV_MODE$1 &&
57
+ return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, NG_DEV_MODE$1 &&
58
58
  `The provided animation property "${prop}" is not a supported CSS property for animations`);
59
59
  }
60
60
  function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {
61
- return new ɵRuntimeError(3010 /* INVALID_PARALLEL_ANIMATION */, NG_DEV_MODE$1 &&
61
+ return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, NG_DEV_MODE$1 &&
62
62
  `The CSS property "${prop}" that exists between the times of "${firstStart}ms" and "${firstEnd}ms" is also being animated in a parallel animation between the times of "${secondStart}ms" and "${secondEnd}ms"`);
63
63
  }
64
64
  function invalidKeyframes() {
65
- return new ɵRuntimeError(3011 /* INVALID_KEYFRAMES */, NG_DEV_MODE$1 && `keyframes() must be placed inside of a call to animate()`);
65
+ return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, NG_DEV_MODE$1 && `keyframes() must be placed inside of a call to animate()`);
66
66
  }
67
67
  function invalidOffset() {
68
- return new ɵRuntimeError(3012 /* INVALID_OFFSET */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are between 0 and 1`);
68
+ return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are between 0 and 1`);
69
69
  }
70
70
  function keyframeOffsetsOutOfOrder() {
71
- return new ɵRuntimeError(3200 /* KEYFRAME_OFFSETS_OUT_OF_ORDER */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are in order`);
71
+ return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, NG_DEV_MODE$1 && `Please ensure that all keyframe offsets are in order`);
72
72
  }
73
73
  function keyframesMissingOffsets() {
74
- return new ɵRuntimeError(3202 /* KEYFRAMES_MISSING_OFFSETS */, NG_DEV_MODE$1 && `Not all style() steps within the declared keyframes() contain offsets`);
74
+ return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, NG_DEV_MODE$1 && `Not all style() steps within the declared keyframes() contain offsets`);
75
75
  }
76
76
  function invalidStagger() {
77
- return new ɵRuntimeError(3013 /* INVALID_STAGGER */, NG_DEV_MODE$1 && `stagger() can only be used inside of query()`);
77
+ return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, NG_DEV_MODE$1 && `stagger() can only be used inside of query()`);
78
78
  }
79
79
  function invalidQuery(selector) {
80
- return new ɵRuntimeError(3014 /* INVALID_QUERY */, NG_DEV_MODE$1 &&
80
+ return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, NG_DEV_MODE$1 &&
81
81
  `\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`);
82
82
  }
83
83
  function invalidExpression(expr) {
84
- return new ɵRuntimeError(3015 /* INVALID_EXPRESSION */, NG_DEV_MODE$1 && `The provided transition expression "${expr}" is not supported`);
84
+ return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, NG_DEV_MODE$1 && `The provided transition expression "${expr}" is not supported`);
85
85
  }
86
86
  function invalidTransitionAlias(alias) {
87
- return new ɵRuntimeError(3016 /* INVALID_TRANSITION_ALIAS */, NG_DEV_MODE$1 && `The transition alias value "${alias}" is not supported`);
87
+ return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, NG_DEV_MODE$1 && `The transition alias value "${alias}" is not supported`);
88
88
  }
89
89
  function validationFailed(errors) {
90
- return new ɵRuntimeError(3500 /* VALIDATION_FAILED */, NG_DEV_MODE$1 && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`);
90
+ return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, NG_DEV_MODE$1 && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`);
91
91
  }
92
92
  function buildingFailed(errors) {
93
- return new ɵRuntimeError(3501 /* BUILDING_FAILED */, NG_DEV_MODE$1 && `animation building failed:\n${errors.map(err => err.message).join('\n')}`);
93
+ return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, NG_DEV_MODE$1 && `animation building failed:\n${errors.map(err => err.message).join('\n')}`);
94
94
  }
95
95
  function triggerBuildFailed(name, errors) {
96
- return new ɵRuntimeError(3404 /* TRIGGER_BUILD_FAILED */, NG_DEV_MODE$1 &&
96
+ return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, NG_DEV_MODE$1 &&
97
97
  `The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors.map(err => err.message).join('\n - ')}`);
98
98
  }
99
99
  function animationFailed(errors) {
100
- return new ɵRuntimeError(3502 /* ANIMATION_FAILED */, NG_DEV_MODE$1 &&
100
+ return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, NG_DEV_MODE$1 &&
101
101
  `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);
102
102
  }
103
103
  function registerFailed(errors) {
104
- return new ɵRuntimeError(3503 /* REGISTRATION_FAILED */, NG_DEV_MODE$1 &&
104
+ return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, NG_DEV_MODE$1 &&
105
105
  `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\n')}`);
106
106
  }
107
107
  function missingOrDestroyedAnimation() {
108
- return new ɵRuntimeError(3300 /* MISSING_OR_DESTROYED_ANIMATION */, NG_DEV_MODE$1 && 'The requested animation doesn\'t exist or has already been destroyed');
108
+ return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, NG_DEV_MODE$1 && 'The requested animation doesn\'t exist or has already been destroyed');
109
109
  }
110
110
  function createAnimationFailed(errors) {
111
- return new ɵRuntimeError(3504 /* CREATE_ANIMATION_FAILED */, NG_DEV_MODE$1 &&
111
+ return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, NG_DEV_MODE$1 &&
112
112
  `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\n')}`);
113
113
  }
114
114
  function missingPlayer(id) {
115
- return new ɵRuntimeError(3301 /* MISSING_PLAYER */, NG_DEV_MODE$1 && `Unable to find the timeline player referenced by ${id}`);
115
+ return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, NG_DEV_MODE$1 && `Unable to find the timeline player referenced by ${id}`);
116
116
  }
117
117
  function missingTrigger(phase, name) {
118
- return new ɵRuntimeError(3302 /* MISSING_TRIGGER */, NG_DEV_MODE$1 &&
118
+ return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, NG_DEV_MODE$1 &&
119
119
  `Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`);
120
120
  }
121
121
  function missingEvent(name) {
122
- return new ɵRuntimeError(3303 /* MISSING_EVENT */, NG_DEV_MODE$1 &&
122
+ return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, NG_DEV_MODE$1 &&
123
123
  `Unable to listen on the animation trigger "${name}" because the provided event is undefined!`);
124
124
  }
125
125
  function unsupportedTriggerEvent(phase, name) {
126
- return new ɵRuntimeError(3400 /* UNSUPPORTED_TRIGGER_EVENT */, NG_DEV_MODE$1 &&
126
+ return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, NG_DEV_MODE$1 &&
127
127
  `The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`);
128
128
  }
129
129
  function unregisteredTrigger(name) {
130
- return new ɵRuntimeError(3401 /* UNREGISTERED_TRIGGER */, NG_DEV_MODE$1 && `The provided animation trigger "${name}" has not been registered!`);
130
+ return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, NG_DEV_MODE$1 && `The provided animation trigger "${name}" has not been registered!`);
131
131
  }
132
132
  function triggerTransitionsFailed(errors) {
133
- return new ɵRuntimeError(3402 /* TRIGGER_TRANSITIONS_FAILED */, NG_DEV_MODE$1 &&
133
+ return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, NG_DEV_MODE$1 &&
134
134
  `Unable to process animations due to the following failed trigger transitions\n ${errors.map(err => err.message).join('\n')}`);
135
135
  }
136
136
  function triggerParsingFailed(name, errors) {
137
- return new ɵRuntimeError(3403 /* TRIGGER_PARSING_FAILED */, NG_DEV_MODE$1 &&
137
+ return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, NG_DEV_MODE$1 &&
138
138
  `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);
139
139
  }
140
140
  function transitionFailed(name, errors) {
141
- return new ɵRuntimeError(3505 /* TRANSITION_FAILED */, NG_DEV_MODE$1 &&
141
+ return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, NG_DEV_MODE$1 &&
142
142
  `@${name} has failed due to:\n ${errors.map(err => err.message).join('\n- ')}`);
143
143
  }
144
144
 
@@ -580,9 +580,9 @@ class NoopAnimationDriver {
580
580
  return new NoopAnimationPlayer(duration, delay);
581
581
  }
582
582
  }
583
- NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
584
- NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: NoopAnimationDriver });
585
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: NoopAnimationDriver, decorators: [{
583
+ NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-rc.2", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
584
+ NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-rc.2", ngImport: i0, type: NoopAnimationDriver });
585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-rc.2", ngImport: i0, type: NoopAnimationDriver, decorators: [{
586
586
  type: Injectable
587
587
  }] });
588
588
  /**
@@ -856,31 +856,31 @@ function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles)
856
856
  }
857
857
  function visitDslNode(visitor, node, context) {
858
858
  switch (node.type) {
859
- case 7 /* Trigger */:
859
+ case 7 /* AnimationMetadataType.Trigger */:
860
860
  return visitor.visitTrigger(node, context);
861
- case 0 /* State */:
861
+ case 0 /* AnimationMetadataType.State */:
862
862
  return visitor.visitState(node, context);
863
- case 1 /* Transition */:
863
+ case 1 /* AnimationMetadataType.Transition */:
864
864
  return visitor.visitTransition(node, context);
865
- case 2 /* Sequence */:
865
+ case 2 /* AnimationMetadataType.Sequence */:
866
866
  return visitor.visitSequence(node, context);
867
- case 3 /* Group */:
867
+ case 3 /* AnimationMetadataType.Group */:
868
868
  return visitor.visitGroup(node, context);
869
- case 4 /* Animate */:
869
+ case 4 /* AnimationMetadataType.Animate */:
870
870
  return visitor.visitAnimate(node, context);
871
- case 5 /* Keyframes */:
871
+ case 5 /* AnimationMetadataType.Keyframes */:
872
872
  return visitor.visitKeyframes(node, context);
873
- case 6 /* Style */:
873
+ case 6 /* AnimationMetadataType.Style */:
874
874
  return visitor.visitStyle(node, context);
875
- case 8 /* Reference */:
875
+ case 8 /* AnimationMetadataType.Reference */:
876
876
  return visitor.visitReference(node, context);
877
- case 9 /* AnimateChild */:
877
+ case 9 /* AnimationMetadataType.AnimateChild */:
878
878
  return visitor.visitAnimateChild(node, context);
879
- case 10 /* AnimateRef */:
879
+ case 10 /* AnimationMetadataType.AnimateRef */:
880
880
  return visitor.visitAnimateRef(node, context);
881
- case 11 /* Query */:
881
+ case 11 /* AnimationMetadataType.Query */:
882
882
  return visitor.visitQuery(node, context);
883
- case 12 /* Stagger */:
883
+ case 12 /* AnimationMetadataType.Stagger */:
884
884
  return visitor.visitStagger(node, context);
885
885
  default:
886
886
  throw invalidNodeType(node.type);
@@ -918,7 +918,7 @@ function triggerParsingWarnings(name, warnings) {
918
918
  console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);
919
919
  }
920
920
  function pushUnrecognizedPropertiesWarning(warnings, props) {
921
- if (ngDevMode && props.length) {
921
+ if (props.length) {
922
922
  warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);
923
923
  }
924
924
  }
@@ -1063,12 +1063,13 @@ class AnimationAstBuilderVisitor {
1063
1063
  const context = new AnimationAstBuilderContext(errors);
1064
1064
  this._resetContextStyleTimingState(context);
1065
1065
  const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);
1066
- if (context.unsupportedCSSPropertiesFound.size) {
1067
- pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);
1068
- }
1069
- if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
1070
- context.nonAnimatableCSSPropertiesFound.size) {
1071
- pushNonAnimatablePropertiesWarning(warnings, [...context.nonAnimatableCSSPropertiesFound.keys()]);
1066
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
1067
+ if (context.unsupportedCSSPropertiesFound.size) {
1068
+ pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);
1069
+ }
1070
+ if (context.nonAnimatableCSSPropertiesFound.size) {
1071
+ pushNonAnimatablePropertiesWarning(warnings, [...context.nonAnimatableCSSPropertiesFound.keys()]);
1072
+ }
1072
1073
  }
1073
1074
  return ast;
1074
1075
  }
@@ -1088,7 +1089,7 @@ class AnimationAstBuilderVisitor {
1088
1089
  }
1089
1090
  metadata.definitions.forEach(def => {
1090
1091
  this._resetContextStyleTimingState(context);
1091
- if (def.type == 0 /* State */) {
1092
+ if (def.type == 0 /* AnimationMetadataType.State */) {
1092
1093
  const stateDef = def;
1093
1094
  const name = stateDef.name;
1094
1095
  name.toString().split(/\s*,\s*/).forEach(n => {
@@ -1097,7 +1098,7 @@ class AnimationAstBuilderVisitor {
1097
1098
  });
1098
1099
  stateDef.name = name;
1099
1100
  }
1100
- else if (def.type == 1 /* Transition */) {
1101
+ else if (def.type == 1 /* AnimationMetadataType.Transition */) {
1101
1102
  const transition = this.visitTransition(def, context);
1102
1103
  queryCount += transition.queryCount;
1103
1104
  depCount += transition.depCount;
@@ -1108,7 +1109,7 @@ class AnimationAstBuilderVisitor {
1108
1109
  }
1109
1110
  });
1110
1111
  return {
1111
- type: 7 /* Trigger */,
1112
+ type: 7 /* AnimationMetadataType.Trigger */,
1112
1113
  name: metadata.name,
1113
1114
  states,
1114
1115
  transitions,
@@ -1140,7 +1141,7 @@ class AnimationAstBuilderVisitor {
1140
1141
  }
1141
1142
  }
1142
1143
  return {
1143
- type: 0 /* State */,
1144
+ type: 0 /* AnimationMetadataType.State */,
1144
1145
  name: metadata.name,
1145
1146
  style: styleAst,
1146
1147
  options: astParams ? { params: astParams } : null
@@ -1152,7 +1153,7 @@ class AnimationAstBuilderVisitor {
1152
1153
  const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
1153
1154
  const matchers = parseTransitionExpr(metadata.expr, context.errors);
1154
1155
  return {
1155
- type: 1 /* Transition */,
1156
+ type: 1 /* AnimationMetadataType.Transition */,
1156
1157
  matchers,
1157
1158
  animation,
1158
1159
  queryCount: context.queryCount,
@@ -1162,7 +1163,7 @@ class AnimationAstBuilderVisitor {
1162
1163
  }
1163
1164
  visitSequence(metadata, context) {
1164
1165
  return {
1165
- type: 2 /* Sequence */,
1166
+ type: 2 /* AnimationMetadataType.Sequence */,
1166
1167
  steps: metadata.steps.map(s => visitDslNode(this, s, context)),
1167
1168
  options: normalizeAnimationOptions(metadata.options)
1168
1169
  };
@@ -1178,7 +1179,7 @@ class AnimationAstBuilderVisitor {
1178
1179
  });
1179
1180
  context.currentTime = furthestTime;
1180
1181
  return {
1181
- type: 3 /* Group */,
1182
+ type: 3 /* AnimationMetadataType.Group */,
1182
1183
  steps,
1183
1184
  options: normalizeAnimationOptions(metadata.options)
1184
1185
  };
@@ -1188,7 +1189,7 @@ class AnimationAstBuilderVisitor {
1188
1189
  context.currentAnimateTimings = timingAst;
1189
1190
  let styleAst;
1190
1191
  let styleMetadata = metadata.styles ? metadata.styles : style({});
1191
- if (styleMetadata.type == 5 /* Keyframes */) {
1192
+ if (styleMetadata.type == 5 /* AnimationMetadataType.Keyframes */) {
1192
1193
  styleAst = this.visitKeyframes(styleMetadata, context);
1193
1194
  }
1194
1195
  else {
@@ -1209,7 +1210,7 @@ class AnimationAstBuilderVisitor {
1209
1210
  }
1210
1211
  context.currentAnimateTimings = null;
1211
1212
  return {
1212
- type: 4 /* Animate */,
1213
+ type: 4 /* AnimationMetadataType.Animate */,
1213
1214
  timings: timingAst,
1214
1215
  style: styleAst,
1215
1216
  options: null
@@ -1255,7 +1256,7 @@ class AnimationAstBuilderVisitor {
1255
1256
  }
1256
1257
  });
1257
1258
  return {
1258
- type: 6 /* Style */,
1259
+ type: 6 /* AnimationMetadataType.Style */,
1259
1260
  styles,
1260
1261
  easing: collectedEasing,
1261
1262
  offset: metadata.offset,
@@ -1274,19 +1275,20 @@ class AnimationAstBuilderVisitor {
1274
1275
  if (typeof tuple === 'string')
1275
1276
  return;
1276
1277
  tuple.forEach((value, prop) => {
1277
- if (!this._driver.validateStyleProperty(prop)) {
1278
- tuple.delete(prop);
1279
- context.unsupportedCSSPropertiesFound.add(prop);
1280
- return;
1281
- }
1282
- if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
1283
- this._driver.validateAnimatableStyleProperty) {
1284
- if (!this._driver.validateAnimatableStyleProperty(prop)) {
1285
- context.nonAnimatableCSSPropertiesFound.add(prop);
1286
- // note: non animatable properties are not removed for the tuple just in case they are
1287
- // categorized as non animatable but can actually be animated
1278
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
1279
+ if (!this._driver.validateStyleProperty(prop)) {
1280
+ tuple.delete(prop);
1281
+ context.unsupportedCSSPropertiesFound.add(prop);
1288
1282
  return;
1289
1283
  }
1284
+ if (this._driver.validateAnimatableStyleProperty) {
1285
+ if (!this._driver.validateAnimatableStyleProperty(prop)) {
1286
+ context.nonAnimatableCSSPropertiesFound.add(prop);
1287
+ // note: non animatable properties are not removed for the tuple just in case they are
1288
+ // categorized as non animatable but can actually be animated
1289
+ return;
1290
+ }
1291
+ }
1290
1292
  }
1291
1293
  // This is guaranteed to have a defined Map at this querySelector location making it
1292
1294
  // safe to add the assertion here. It is set as a default empty map in prior methods.
@@ -1314,7 +1316,7 @@ class AnimationAstBuilderVisitor {
1314
1316
  });
1315
1317
  }
1316
1318
  visitKeyframes(metadata, context) {
1317
- const ast = { type: 5 /* Keyframes */, styles: [], options: null };
1319
+ const ast = { type: 5 /* AnimationMetadataType.Keyframes */, styles: [], options: null };
1318
1320
  if (!context.currentAnimateTimings) {
1319
1321
  context.errors.push(invalidKeyframes());
1320
1322
  return ast;
@@ -1370,7 +1372,7 @@ class AnimationAstBuilderVisitor {
1370
1372
  }
1371
1373
  visitReference(metadata, context) {
1372
1374
  return {
1373
- type: 8 /* Reference */,
1375
+ type: 8 /* AnimationMetadataType.Reference */,
1374
1376
  animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
1375
1377
  options: normalizeAnimationOptions(metadata.options)
1376
1378
  };
@@ -1378,13 +1380,13 @@ class AnimationAstBuilderVisitor {
1378
1380
  visitAnimateChild(metadata, context) {
1379
1381
  context.depCount++;
1380
1382
  return {
1381
- type: 9 /* AnimateChild */,
1383
+ type: 9 /* AnimationMetadataType.AnimateChild */,
1382
1384
  options: normalizeAnimationOptions(metadata.options)
1383
1385
  };
1384
1386
  }
1385
1387
  visitAnimateRef(metadata, context) {
1386
1388
  return {
1387
- type: 10 /* AnimateRef */,
1389
+ type: 10 /* AnimationMetadataType.AnimateRef */,
1388
1390
  animation: this.visitReference(metadata.animation, context),
1389
1391
  options: normalizeAnimationOptions(metadata.options)
1390
1392
  };
@@ -1402,7 +1404,7 @@ class AnimationAstBuilderVisitor {
1402
1404
  context.currentQuery = null;
1403
1405
  context.currentQuerySelector = parentSelector;
1404
1406
  return {
1405
- type: 11 /* Query */,
1407
+ type: 11 /* AnimationMetadataType.Query */,
1406
1408
  selector,
1407
1409
  limit: options.limit || 0,
1408
1410
  optional: !!options.optional,
@@ -1420,7 +1422,7 @@ class AnimationAstBuilderVisitor {
1420
1422
  { duration: 0, delay: 0, easing: 'full' } :
1421
1423
  resolveTiming(metadata.timings, context.errors, true);
1422
1424
  return {
1423
- type: 12 /* Stagger */,
1425
+ type: 12 /* AnimationMetadataType.Stagger */,
1424
1426
  animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
1425
1427
  timings,
1426
1428
  options: null
@@ -1479,11 +1481,10 @@ function consumeOffset(styles) {
1479
1481
  return offset;
1480
1482
  }
1481
1483
  function constructTimingAst(value, errors) {
1482
- let timings = null;
1483
1484
  if (value.hasOwnProperty('duration')) {
1484
- timings = value;
1485
+ return value;
1485
1486
  }
1486
- else if (typeof value == 'number') {
1487
+ if (typeof value == 'number') {
1487
1488
  const duration = resolveTiming(value, errors).duration;
1488
1489
  return makeTimingAst(duration, 0, '');
1489
1490
  }
@@ -1495,7 +1496,7 @@ function constructTimingAst(value, errors) {
1495
1496
  ast.strValue = strValue;
1496
1497
  return ast;
1497
1498
  }
1498
- timings = timings || resolveTiming(strValue, errors);
1499
+ const timings = resolveTiming(strValue, errors);
1499
1500
  return makeTimingAst(timings.duration, timings.delay, timings.easing);
1500
1501
  }
1501
1502
  function normalizeAnimationOptions(options) {
@@ -1516,7 +1517,7 @@ function makeTimingAst(duration, delay, easing) {
1516
1517
 
1517
1518
  function createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {
1518
1519
  return {
1519
- type: 1 /* TimelineAnimation */,
1520
+ type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,
1520
1521
  element,
1521
1522
  keyframes,
1522
1523
  preStyleProps,
@@ -1736,7 +1737,7 @@ class AnimationTimelineBuilderVisitor {
1736
1737
  ctx = context.createSubContext(options);
1737
1738
  ctx.transformIntoNewTimeline();
1738
1739
  if (options.delay != null) {
1739
- if (ctx.previousNode.type == 6 /* Style */) {
1740
+ if (ctx.previousNode.type == 6 /* AnimationMetadataType.Style */) {
1740
1741
  ctx.currentTimeline.snapshotCurrentStyles();
1741
1742
  ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
1742
1743
  }
@@ -1795,7 +1796,7 @@ class AnimationTimelineBuilderVisitor {
1795
1796
  timeline.snapshotCurrentStyles();
1796
1797
  }
1797
1798
  const style = ast.style;
1798
- if (style.type == 5 /* Keyframes */) {
1799
+ if (style.type == 5 /* AnimationMetadataType.Keyframes */) {
1799
1800
  this.visitKeyframes(style, context);
1800
1801
  }
1801
1802
  else {
@@ -1851,7 +1852,7 @@ class AnimationTimelineBuilderVisitor {
1851
1852
  const options = (ast.options || {});
1852
1853
  const delay = options.delay ? resolveTimingValue(options.delay) : 0;
1853
1854
  if (delay &&
1854
- (context.previousNode.type === 6 /* Style */ ||
1855
+ (context.previousNode.type === 6 /* AnimationMetadataType.Style */ ||
1855
1856
  (startTime == 0 && context.currentTimeline.hasCurrentStyleProperties()))) {
1856
1857
  context.currentTimeline.snapshotCurrentStyles();
1857
1858
  context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
@@ -2430,7 +2431,7 @@ class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {
2430
2431
  */
2431
2432
  function createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {
2432
2433
  return {
2433
- type: 0 /* TransitionAnimation */,
2434
+ type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,
2434
2435
  element,
2435
2436
  triggerName,
2436
2437
  isRemovalTransition,
@@ -2581,9 +2582,9 @@ class AnimationTrigger {
2581
2582
  }
2582
2583
  function createFallbackTransition(triggerName, states, normalizer) {
2583
2584
  const matchers = [(fromState, toState) => true];
2584
- const animation = { type: 2 /* Sequence */, steps: [], options: null };
2585
+ const animation = { type: 2 /* AnimationMetadataType.Sequence */, steps: [], options: null };
2585
2586
  const transition = {
2586
- type: 1 /* Transition */,
2587
+ type: 1 /* AnimationMetadataType.Transition */,
2587
2588
  animation,
2588
2589
  matchers,
2589
2590
  options: null,
@@ -4368,7 +4369,7 @@ class SpecialCasedStyles {
4368
4369
  this._element = _element;
4369
4370
  this._startStyles = _startStyles;
4370
4371
  this._endStyles = _endStyles;
4371
- this._state = 0 /* Pending */;
4372
+ this._state = 0 /* SpecialCasedStylesState.Pending */;
4372
4373
  let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);
4373
4374
  if (!initialStyles) {
4374
4375
  SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());
@@ -4376,27 +4377,27 @@ class SpecialCasedStyles {
4376
4377
  this._initialStyles = initialStyles;
4377
4378
  }
4378
4379
  start() {
4379
- if (this._state < 1 /* Started */) {
4380
+ if (this._state < 1 /* SpecialCasedStylesState.Started */) {
4380
4381
  if (this._startStyles) {
4381
4382
  setStyles(this._element, this._startStyles, this._initialStyles);
4382
4383
  }
4383
- this._state = 1 /* Started */;
4384
+ this._state = 1 /* SpecialCasedStylesState.Started */;
4384
4385
  }
4385
4386
  }
4386
4387
  finish() {
4387
4388
  this.start();
4388
- if (this._state < 2 /* Finished */) {
4389
+ if (this._state < 2 /* SpecialCasedStylesState.Finished */) {
4389
4390
  setStyles(this._element, this._initialStyles);
4390
4391
  if (this._endStyles) {
4391
4392
  setStyles(this._element, this._endStyles);
4392
4393
  this._endStyles = null;
4393
4394
  }
4394
- this._state = 1 /* Started */;
4395
+ this._state = 1 /* SpecialCasedStylesState.Started */;
4395
4396
  }
4396
4397
  }
4397
4398
  destroy() {
4398
4399
  this.finish();
4399
- if (this._state < 3 /* Destroyed */) {
4400
+ if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {
4400
4401
  SpecialCasedStyles.initialStylesByElement.delete(this._element);
4401
4402
  if (this._startStyles) {
4402
4403
  eraseStyles(this._element, this._startStyles);
@@ -4407,7 +4408,7 @@ class SpecialCasedStyles {
4407
4408
  this._endStyles = null;
4408
4409
  }
4409
4410
  setStyles(this._element, this._initialStyles);
4410
- this._state = 3 /* Destroyed */;
4411
+ this._state = 3 /* SpecialCasedStylesState.Destroyed */;
4411
4412
  }
4412
4413
  }
4413
4414
  }
@@ -4589,11 +4590,15 @@ class WebAnimationsPlayer {
4589
4590
 
4590
4591
  class WebAnimationsDriver {
4591
4592
  validateStyleProperty(prop) {
4592
- return validateStyleProperty(prop);
4593
+ // Perform actual validation in dev mode only, in prod mode this check is a noop.
4594
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
4595
+ return validateStyleProperty(prop);
4596
+ }
4597
+ return true;
4593
4598
  }
4594
4599
  validateAnimatableStyleProperty(prop) {
4595
4600
  // Perform actual validation in dev mode only, in prod mode this check is a noop.
4596
- if (ngDevMode) {
4601
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
4597
4602
  const cssProp = camelCaseToDashCase(prop);
4598
4603
  return validateWebAnimatableStyleProperty(cssProp);
4599
4604
  }