@angular/animations 13.2.3 → 13.2.6
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.
- package/animations.d.ts +1 -1
- package/browser/browser.d.ts +13 -1
- package/browser/testing/testing.d.ts +2 -1
- package/esm2020/browser/src/dsl/animation.mjs +7 -2
- package/esm2020/browser/src/dsl/animation_ast_builder.mjs +14 -7
- package/esm2020/browser/src/private_export.mjs +2 -2
- package/esm2020/browser/src/render/animation_driver.mjs +8 -5
- package/esm2020/browser/src/render/animation_engine_next.mjs +7 -2
- package/esm2020/browser/src/render/shared.mjs +14 -3
- package/esm2020/browser/src/render/timeline_animation_engine.mjs +7 -2
- package/esm2020/browser/src/render/transition_animation_engine.mjs +38 -11
- package/esm2020/browser/src/render/web_animations/web_animations_driver.mjs +5 -2
- package/esm2020/browser/src/warning_helpers.mjs +33 -0
- package/esm2020/browser/testing/src/mock_animation_driver.mjs +5 -2
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/animations.mjs +1 -1
- package/fesm2015/browser/testing.mjs +5 -2
- package/fesm2015/browser/testing.mjs.map +1 -1
- package/fesm2015/browser.mjs +157 -62
- package/fesm2015/browser.mjs.map +1 -1
- package/fesm2020/animations.mjs +1 -1
- package/fesm2020/browser/testing.mjs +5 -2
- package/fesm2020/browser/testing.mjs.map +1 -1
- package/fesm2020/browser.mjs +157 -62
- package/fesm2020/browser.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2020/animations.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.2.
|
|
2
|
+
* @license Angular v13.2.6
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { NoopAnimationPlayer, AUTO_STYLE } from '@angular/animations';
|
|
8
|
-
import { ɵvalidateStyleProperty, ɵcontainsElement, ɵinvokeQuery, ɵallowPreviousPlayerStylesMerge } from '@angular/animations/browser';
|
|
8
|
+
import { ɵvalidateStyleProperty, ɵcontainsElement, ɵgetParentElement, ɵinvokeQuery, ɵallowPreviousPlayerStylesMerge } from '@angular/animations/browser';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -27,6 +27,9 @@ class MockAnimationDriver {
|
|
|
27
27
|
containsElement(elm1, elm2) {
|
|
28
28
|
return ɵcontainsElement(elm1, elm2);
|
|
29
29
|
}
|
|
30
|
+
getParentElement(element) {
|
|
31
|
+
return ɵgetParentElement(element);
|
|
32
|
+
}
|
|
30
33
|
query(element, selector, multi) {
|
|
31
34
|
return ɵinvokeQuery(element, selector, multi);
|
|
32
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/animations/browser/testing/src/mock_animation_driver.ts","../../../../../../../packages/animations/browser/testing/src/testing.ts","../../../../../../../packages/animations/browser/testing/public_api.ts","../../../../../../../packages/animations/browser/testing/index.ts","../../../../../../../packages/animations/browser/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, AUTO_STYLE, NoopAnimationPlayer, ɵStyleData} from '@angular/animations';\nimport {AnimationDriver, ɵallowPreviousPlayerStylesMerge as allowPreviousPlayerStylesMerge, ɵcontainsElement as containsElement, ɵinvokeQuery as invokeQuery, ɵvalidateStyleProperty as validateStyleProperty} from '@angular/animations/browser';\n\n\n/**\n * @publicApi\n */\nexport class MockAnimationDriver implements AnimationDriver {\n static log: AnimationPlayer[] = [];\n\n validateStyleProperty(prop: string): boolean {\n return validateStyleProperty(prop);\n }\n\n matchesElement(_element: any, _selector: string): boolean {\n return false;\n }\n\n containsElement(elm1: any, elm2: any): boolean {\n return containsElement(elm1, elm2);\n }\n\n query(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n\n computeStyle(element: any, prop: string, defaultValue?: string): string {\n return defaultValue || '';\n }\n\n animate(\n element: any, keyframes: {[key: string]: string|number}[], duration: number, delay: number,\n easing: string, previousPlayers: any[] = []): MockAnimationPlayer {\n const player =\n new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers);\n MockAnimationDriver.log.push(<AnimationPlayer>player);\n return player;\n }\n}\n\n/**\n * @publicApi\n */\nexport class MockAnimationPlayer extends NoopAnimationPlayer {\n private __finished = false;\n private __started = false;\n public previousStyles: {[key: string]: string|number} = {};\n private _onInitFns: (() => any)[] = [];\n public currentSnapshot: ɵStyleData = {};\n\n constructor(\n public element: any, public keyframes: {[key: string]: string|number}[],\n public duration: number, public delay: number, public easing: string,\n public previousPlayers: any[]) {\n super(duration, delay);\n\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousPlayers.forEach(player => {\n if (player instanceof MockAnimationPlayer) {\n const styles = player.currentSnapshot;\n Object.keys(styles).forEach(prop => this.previousStyles[prop] = styles[prop]);\n }\n });\n }\n }\n\n /* @internal */\n onInit(fn: () => any) {\n this._onInitFns.push(fn);\n }\n\n /* @internal */\n override init() {\n super.init();\n this._onInitFns.forEach(fn => fn());\n this._onInitFns = [];\n }\n\n override reset() {\n super.reset();\n this.__started = false;\n }\n\n override finish(): void {\n super.finish();\n this.__finished = true;\n }\n\n override destroy(): void {\n super.destroy();\n this.__finished = true;\n }\n\n /* @internal */\n triggerMicrotask() {}\n\n override play(): void {\n super.play();\n this.__started = true;\n }\n\n override hasStarted() {\n return this.__started;\n }\n\n beforeDestroy() {\n const captures: ɵStyleData = {};\n\n Object.keys(this.previousStyles).forEach(prop => {\n captures[prop] = this.previousStyles[prop];\n });\n\n if (this.hasStarted()) {\n // when assembling the captured styles, it's important that\n // we build the keyframe styles in the following order:\n // {other styles within keyframes, ... previousStyles }\n this.keyframes.forEach(kf => {\n Object.keys(kf).forEach(prop => {\n if (prop != 'offset') {\n captures[prop] = this.__finished ? kf[prop] : AUTO_STYLE;\n }\n });\n });\n }\n\n this.currentSnapshot = captures;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {MockAnimationDriver, MockAnimationPlayer} from './mock_animation_driver';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verifcation. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["validateStyleProperty","containsElement","invokeQuery","allowPreviousPlayerStylesMerge"],"mappings":";;;;;;;;;AAAA;;;;;;;AAWA;;;MAGa,mBAAmB;IAG9B,qBAAqB,CAAC,IAAY;QAChC,OAAOA,sBAAqB,CAAC,IAAI,CAAC,CAAC;KACpC;IAED,cAAc,CAAC,QAAa,EAAE,SAAiB;QAC7C,OAAO,KAAK,CAAC;KACd;IAED,eAAe,CAAC,IAAS,EAAE,IAAS;QAClC,OAAOC,gBAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACpC;IAED,KAAK,CAAC,OAAY,EAAE,QAAgB,EAAE,KAAc;QAClD,OAAOC,YAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;KAC9C;IAED,YAAY,CAAC,OAAY,EAAE,IAAY,EAAE,YAAqB;QAC5D,OAAO,YAAY,IAAI,EAAE,CAAC;KAC3B;IAED,OAAO,CACH,OAAY,EAAE,SAA2C,EAAE,QAAgB,EAAE,KAAa,EAC1F,MAAc,EAAE,kBAAyB,EAAE;QAC7C,MAAM,MAAM,GACR,IAAI,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAC1F,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAkB,MAAM,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC;KACf;;
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/animations/browser/testing/src/mock_animation_driver.ts","../../../../../../../packages/animations/browser/testing/src/testing.ts","../../../../../../../packages/animations/browser/testing/public_api.ts","../../../../../../../packages/animations/browser/testing/index.ts","../../../../../../../packages/animations/browser/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, AUTO_STYLE, NoopAnimationPlayer, ɵStyleData} from '@angular/animations';\nimport {AnimationDriver, ɵallowPreviousPlayerStylesMerge as allowPreviousPlayerStylesMerge, ɵcontainsElement as containsElement, ɵgetParentElement as getParentElement, ɵinvokeQuery as invokeQuery, ɵvalidateStyleProperty as validateStyleProperty} from '@angular/animations/browser';\n\n\n/**\n * @publicApi\n */\nexport class MockAnimationDriver implements AnimationDriver {\n static log: AnimationPlayer[] = [];\n\n validateStyleProperty(prop: string): boolean {\n return validateStyleProperty(prop);\n }\n\n matchesElement(_element: any, _selector: string): boolean {\n return false;\n }\n\n containsElement(elm1: any, elm2: any): boolean {\n return containsElement(elm1, elm2);\n }\n\n getParentElement(element: unknown): unknown {\n return getParentElement(element);\n }\n\n query(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n\n computeStyle(element: any, prop: string, defaultValue?: string): string {\n return defaultValue || '';\n }\n\n animate(\n element: any, keyframes: {[key: string]: string|number}[], duration: number, delay: number,\n easing: string, previousPlayers: any[] = []): MockAnimationPlayer {\n const player =\n new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers);\n MockAnimationDriver.log.push(<AnimationPlayer>player);\n return player;\n }\n}\n\n/**\n * @publicApi\n */\nexport class MockAnimationPlayer extends NoopAnimationPlayer {\n private __finished = false;\n private __started = false;\n public previousStyles: {[key: string]: string|number} = {};\n private _onInitFns: (() => any)[] = [];\n public currentSnapshot: ɵStyleData = {};\n\n constructor(\n public element: any, public keyframes: {[key: string]: string|number}[],\n public duration: number, public delay: number, public easing: string,\n public previousPlayers: any[]) {\n super(duration, delay);\n\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousPlayers.forEach(player => {\n if (player instanceof MockAnimationPlayer) {\n const styles = player.currentSnapshot;\n Object.keys(styles).forEach(prop => this.previousStyles[prop] = styles[prop]);\n }\n });\n }\n }\n\n /* @internal */\n onInit(fn: () => any) {\n this._onInitFns.push(fn);\n }\n\n /* @internal */\n override init() {\n super.init();\n this._onInitFns.forEach(fn => fn());\n this._onInitFns = [];\n }\n\n override reset() {\n super.reset();\n this.__started = false;\n }\n\n override finish(): void {\n super.finish();\n this.__finished = true;\n }\n\n override destroy(): void {\n super.destroy();\n this.__finished = true;\n }\n\n /* @internal */\n triggerMicrotask() {}\n\n override play(): void {\n super.play();\n this.__started = true;\n }\n\n override hasStarted() {\n return this.__started;\n }\n\n beforeDestroy() {\n const captures: ɵStyleData = {};\n\n Object.keys(this.previousStyles).forEach(prop => {\n captures[prop] = this.previousStyles[prop];\n });\n\n if (this.hasStarted()) {\n // when assembling the captured styles, it's important that\n // we build the keyframe styles in the following order:\n // {other styles within keyframes, ... previousStyles }\n this.keyframes.forEach(kf => {\n Object.keys(kf).forEach(prop => {\n if (prop != 'offset') {\n captures[prop] = this.__finished ? kf[prop] : AUTO_STYLE;\n }\n });\n });\n }\n\n this.currentSnapshot = captures;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {MockAnimationDriver, MockAnimationPlayer} from './mock_animation_driver';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verifcation. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["validateStyleProperty","containsElement","getParentElement","invokeQuery","allowPreviousPlayerStylesMerge"],"mappings":"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"}
|
package/fesm2020/browser.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.2.
|
|
2
|
+
* @license Angular v13.2.6
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -15,130 +15,130 @@ import { ɵRuntimeError, Injectable } from '@angular/core';
|
|
|
15
15
|
* Use of this source code is governed by an MIT-style license that can be
|
|
16
16
|
* found in the LICENSE file at https://angular.io/license
|
|
17
17
|
*/
|
|
18
|
-
const NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
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 && `The provided timing value "${exp}" is invalid.`);
|
|
21
|
+
return new ɵRuntimeError(3000 /* 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 && 'Duration values below 0 are not allowed for this animation step.');
|
|
24
|
+
return new ɵRuntimeError(3100 /* 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 && 'Delay values below 0 are not allowed for this animation step.');
|
|
27
|
+
return new ɵRuntimeError(3101 /* 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 &&
|
|
30
|
+
return new ɵRuntimeError(3001 /* 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 && `Please provide a value for the animation param ${varName}`);
|
|
34
|
+
return new ɵRuntimeError(3003 /* 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 && `Unable to resolve animation metadata node #${nodeType}`);
|
|
37
|
+
return new ɵRuntimeError(3004 /* 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 && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);
|
|
40
|
+
return new ɵRuntimeError(3005 /* 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 &&
|
|
43
|
+
return new ɵRuntimeError(3006 /* 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 && 'only state() and transition() definitions can sit inside of a trigger()');
|
|
47
|
+
return new ɵRuntimeError(3007 /* 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 &&
|
|
50
|
+
return new ɵRuntimeError(3008 /* 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 && `The provided style string value ${value} is not allowed.`);
|
|
54
|
+
return new ɵRuntimeError(3002 /* 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 &&
|
|
57
|
+
return new ɵRuntimeError(3009 /* 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 &&
|
|
61
|
+
return new ɵRuntimeError(3010 /* 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 && `keyframes() must be placed inside of a call to animate()`);
|
|
65
|
+
return new ɵRuntimeError(3011 /* 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 && `Please ensure that all keyframe offsets are between 0 and 1`);
|
|
68
|
+
return new ɵRuntimeError(3012 /* 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 && `Please ensure that all keyframe offsets are in order`);
|
|
71
|
+
return new ɵRuntimeError(3200 /* 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 && `Not all style() steps within the declared keyframes() contain offsets`);
|
|
74
|
+
return new ɵRuntimeError(3202 /* 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 && `stagger() can only be used inside of query()`);
|
|
77
|
+
return new ɵRuntimeError(3013 /* 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 &&
|
|
80
|
+
return new ɵRuntimeError(3014 /* 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 && `The provided transition expression "${expr}" is not supported`);
|
|
84
|
+
return new ɵRuntimeError(3015 /* 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 && `The transition alias value "${alias}" is not supported`);
|
|
87
|
+
return new ɵRuntimeError(3016 /* 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 && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
90
|
+
return new ɵRuntimeError(3500 /* 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 && `animation building failed:\n${errors.map(err => err.message).join('\n')}`);
|
|
93
|
+
return new ɵRuntimeError(3501 /* 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 &&
|
|
96
|
+
return new ɵRuntimeError(3404 /* 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 &&
|
|
100
|
+
return new ɵRuntimeError(3502 /* 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 &&
|
|
104
|
+
return new ɵRuntimeError(3503 /* 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 && 'The requested animation doesn\'t exist or has already been destroyed');
|
|
108
|
+
return new ɵRuntimeError(3300 /* 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 &&
|
|
111
|
+
return new ɵRuntimeError(3504 /* 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 && `Unable to find the timeline player referenced by ${id}`);
|
|
115
|
+
return new ɵRuntimeError(3301 /* 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 &&
|
|
118
|
+
return new ɵRuntimeError(3302 /* 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 &&
|
|
122
|
+
return new ɵRuntimeError(3303 /* 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 &&
|
|
126
|
+
return new ɵRuntimeError(3400 /* 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 && `The provided animation trigger "${name}" has not been registered!`);
|
|
130
|
+
return new ɵRuntimeError(3401 /* 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 &&
|
|
133
|
+
return new ɵRuntimeError(3402 /* 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 &&
|
|
137
|
+
return new ɵRuntimeError(3403 /* 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 &&
|
|
141
|
+
return new ɵRuntimeError(3505 /* 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
|
|
|
@@ -262,6 +262,14 @@ let _contains = (elm1, elm2) => false;
|
|
|
262
262
|
let _query = (element, selector, multi) => {
|
|
263
263
|
return [];
|
|
264
264
|
};
|
|
265
|
+
let _documentElement = null;
|
|
266
|
+
function getParentElement(element) {
|
|
267
|
+
const parent = element.parentNode || element.host; // consider host to support shadow DOM
|
|
268
|
+
if (parent === _documentElement) {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
return parent;
|
|
272
|
+
}
|
|
265
273
|
// Define utility methods for browsers and platform-server(domino) where Element
|
|
266
274
|
// and utility methods exist.
|
|
267
275
|
const _isNode = isNode();
|
|
@@ -270,12 +278,15 @@ if (_isNode || typeof Element !== 'undefined') {
|
|
|
270
278
|
_contains = (elm1, elm2) => elm1.contains(elm2);
|
|
271
279
|
}
|
|
272
280
|
else {
|
|
281
|
+
// Read the document element in an IIFE that's been marked pure to avoid a top-level property
|
|
282
|
+
// read that may prevent tree-shaking.
|
|
283
|
+
_documentElement = /* @__PURE__ */ (() => document.documentElement)();
|
|
273
284
|
_contains = (elm1, elm2) => {
|
|
274
|
-
while (elm2
|
|
285
|
+
while (elm2) {
|
|
275
286
|
if (elm2 === elm1) {
|
|
276
287
|
return true;
|
|
277
288
|
}
|
|
278
|
-
elm2 = elm2
|
|
289
|
+
elm2 = getParentElement(elm2);
|
|
279
290
|
}
|
|
280
291
|
return false;
|
|
281
292
|
};
|
|
@@ -348,6 +359,9 @@ class NoopAnimationDriver {
|
|
|
348
359
|
containsElement(elm1, elm2) {
|
|
349
360
|
return containsElement(elm1, elm2);
|
|
350
361
|
}
|
|
362
|
+
getParentElement(element) {
|
|
363
|
+
return getParentElement(element);
|
|
364
|
+
}
|
|
351
365
|
query(element, selector, multi) {
|
|
352
366
|
return invokeQuery(element, selector, multi);
|
|
353
367
|
}
|
|
@@ -358,9 +372,9 @@ class NoopAnimationDriver {
|
|
|
358
372
|
return new NoopAnimationPlayer(duration, delay);
|
|
359
373
|
}
|
|
360
374
|
}
|
|
361
|
-
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.
|
|
362
|
-
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.
|
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.
|
|
375
|
+
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
376
|
+
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NoopAnimationDriver });
|
|
377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: NoopAnimationDriver, decorators: [{
|
|
364
378
|
type: Injectable
|
|
365
379
|
}] });
|
|
366
380
|
/**
|
|
@@ -658,6 +672,39 @@ function computeStyle(element, prop) {
|
|
|
658
672
|
return window.getComputedStyle(element)[prop];
|
|
659
673
|
}
|
|
660
674
|
|
|
675
|
+
/**
|
|
676
|
+
* @license
|
|
677
|
+
* Copyright Google LLC All Rights Reserved.
|
|
678
|
+
*
|
|
679
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
680
|
+
* found in the LICENSE file at https://angular.io/license
|
|
681
|
+
*/
|
|
682
|
+
const NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
683
|
+
function createListOfWarnings(warnings) {
|
|
684
|
+
const LINE_START = '\n - ';
|
|
685
|
+
return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`;
|
|
686
|
+
}
|
|
687
|
+
function warnValidation(warnings) {
|
|
688
|
+
NG_DEV_MODE && console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);
|
|
689
|
+
}
|
|
690
|
+
function warnTriggerBuild(name, warnings) {
|
|
691
|
+
NG_DEV_MODE &&
|
|
692
|
+
console.warn(`The animation trigger "${name}" has built with the following warnings:${createListOfWarnings(warnings)}`);
|
|
693
|
+
}
|
|
694
|
+
function warnRegister(warnings) {
|
|
695
|
+
NG_DEV_MODE &&
|
|
696
|
+
console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);
|
|
697
|
+
}
|
|
698
|
+
function triggerParsingWarnings(name, warnings) {
|
|
699
|
+
NG_DEV_MODE &&
|
|
700
|
+
console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);
|
|
701
|
+
}
|
|
702
|
+
function pushUnrecognizedPropertiesWarning(warnings, props) {
|
|
703
|
+
if (ngDevMode && props.length) {
|
|
704
|
+
warnings.push(`The provided CSS properties are not recognized properties supported for animations: ${props.join(', ')}`);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
661
708
|
/**
|
|
662
709
|
* @license
|
|
663
710
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -781,18 +828,22 @@ const SELF_TOKEN_REGEX = new RegExp(`\s*${SELF_TOKEN}\s*,?`, 'g');
|
|
|
781
828
|
*
|
|
782
829
|
* Otherwise an error will be thrown.
|
|
783
830
|
*/
|
|
784
|
-
function buildAnimationAst(driver, metadata, errors) {
|
|
785
|
-
return new AnimationAstBuilderVisitor(driver).build(metadata, errors);
|
|
831
|
+
function buildAnimationAst(driver, metadata, errors, warnings) {
|
|
832
|
+
return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);
|
|
786
833
|
}
|
|
787
834
|
const ROOT_SELECTOR = '';
|
|
788
835
|
class AnimationAstBuilderVisitor {
|
|
789
836
|
constructor(_driver) {
|
|
790
837
|
this._driver = _driver;
|
|
791
838
|
}
|
|
792
|
-
build(metadata, errors) {
|
|
839
|
+
build(metadata, errors, warnings) {
|
|
793
840
|
const context = new AnimationAstBuilderContext(errors);
|
|
794
841
|
this._resetContextStyleTimingState(context);
|
|
795
|
-
|
|
842
|
+
const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);
|
|
843
|
+
if (context.unsupportedCSSPropertiesFound.size) {
|
|
844
|
+
pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);
|
|
845
|
+
}
|
|
846
|
+
return ast;
|
|
796
847
|
}
|
|
797
848
|
_resetContextStyleTimingState(context) {
|
|
798
849
|
context.currentQuerySelector = ROOT_SELECTOR;
|
|
@@ -1005,7 +1056,8 @@ class AnimationAstBuilderVisitor {
|
|
|
1005
1056
|
return;
|
|
1006
1057
|
Object.keys(tuple).forEach(prop => {
|
|
1007
1058
|
if (!this._driver.validateStyleProperty(prop)) {
|
|
1008
|
-
|
|
1059
|
+
delete tuple[prop];
|
|
1060
|
+
context.unsupportedCSSPropertiesFound.add(prop);
|
|
1009
1061
|
return;
|
|
1010
1062
|
}
|
|
1011
1063
|
const collectedStyles = context.collectedStyles[context.currentQuerySelector];
|
|
@@ -1172,6 +1224,7 @@ class AnimationAstBuilderContext {
|
|
|
1172
1224
|
this.currentTime = 0;
|
|
1173
1225
|
this.collectedStyles = {};
|
|
1174
1226
|
this.options = null;
|
|
1227
|
+
this.unsupportedCSSPropertiesFound = new Set();
|
|
1175
1228
|
}
|
|
1176
1229
|
}
|
|
1177
1230
|
function consumeOffset(styles) {
|
|
@@ -2041,10 +2094,14 @@ class Animation {
|
|
|
2041
2094
|
constructor(_driver, input) {
|
|
2042
2095
|
this._driver = _driver;
|
|
2043
2096
|
const errors = [];
|
|
2044
|
-
const
|
|
2097
|
+
const warnings = [];
|
|
2098
|
+
const ast = buildAnimationAst(_driver, input, errors, warnings);
|
|
2045
2099
|
if (errors.length) {
|
|
2046
2100
|
throw validationFailed(errors);
|
|
2047
2101
|
}
|
|
2102
|
+
if (warnings.length) {
|
|
2103
|
+
warnValidation(warnings);
|
|
2104
|
+
}
|
|
2048
2105
|
this._animationAst = ast;
|
|
2049
2106
|
}
|
|
2050
2107
|
buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) {
|
|
@@ -2304,11 +2361,15 @@ class TimelineAnimationEngine {
|
|
|
2304
2361
|
}
|
|
2305
2362
|
register(id, metadata) {
|
|
2306
2363
|
const errors = [];
|
|
2307
|
-
const
|
|
2364
|
+
const warnings = [];
|
|
2365
|
+
const ast = buildAnimationAst(this._driver, metadata, errors, warnings);
|
|
2308
2366
|
if (errors.length) {
|
|
2309
2367
|
throw registerFailed(errors);
|
|
2310
2368
|
}
|
|
2311
2369
|
else {
|
|
2370
|
+
if (warnings.length) {
|
|
2371
|
+
warnRegister(warnings);
|
|
2372
|
+
}
|
|
2312
2373
|
this._animations[id] = ast;
|
|
2313
2374
|
}
|
|
2314
2375
|
}
|
|
@@ -2892,25 +2953,52 @@ class TransitionAnimationEngine {
|
|
|
2892
2953
|
return this._namespaceLookup[namespaceId] = ns;
|
|
2893
2954
|
}
|
|
2894
2955
|
_balanceNamespaceList(ns, hostElement) {
|
|
2895
|
-
const
|
|
2956
|
+
const namespaceList = this._namespaceList;
|
|
2957
|
+
const namespacesByHostElement = this.namespacesByHostElement;
|
|
2958
|
+
const limit = namespaceList.length - 1;
|
|
2896
2959
|
if (limit >= 0) {
|
|
2897
2960
|
let found = false;
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2961
|
+
if (this.driver.getParentElement !== undefined) {
|
|
2962
|
+
// Fast path for when the driver implements `getParentElement`, which allows us to find the
|
|
2963
|
+
// closest ancestor with an existing namespace that we can then insert `ns` after, without
|
|
2964
|
+
// having to inspect all existing namespaces.
|
|
2965
|
+
let ancestor = this.driver.getParentElement(hostElement);
|
|
2966
|
+
while (ancestor) {
|
|
2967
|
+
const ancestorNs = namespacesByHostElement.get(ancestor);
|
|
2968
|
+
if (ancestorNs) {
|
|
2969
|
+
// An animation namespace has been registered for this ancestor, so we insert `ns`
|
|
2970
|
+
// right after it to establish top-down ordering of animation namespaces.
|
|
2971
|
+
const index = namespaceList.indexOf(ancestorNs);
|
|
2972
|
+
namespaceList.splice(index + 1, 0, ns);
|
|
2973
|
+
found = true;
|
|
2974
|
+
break;
|
|
2975
|
+
}
|
|
2976
|
+
ancestor = this.driver.getParentElement(ancestor);
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
else {
|
|
2980
|
+
// Slow path for backwards compatibility if the driver does not implement
|
|
2981
|
+
// `getParentElement`, to be removed once `getParentElement` is a required method.
|
|
2982
|
+
for (let i = limit; i >= 0; i--) {
|
|
2983
|
+
const nextNamespace = namespaceList[i];
|
|
2984
|
+
if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) {
|
|
2985
|
+
namespaceList.splice(i + 1, 0, ns);
|
|
2986
|
+
found = true;
|
|
2987
|
+
break;
|
|
2988
|
+
}
|
|
2904
2989
|
}
|
|
2905
2990
|
}
|
|
2906
2991
|
if (!found) {
|
|
2907
|
-
|
|
2992
|
+
// No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to
|
|
2993
|
+
// ensure that any existing descendants are ordered after `ns`, retaining the desired
|
|
2994
|
+
// top-down ordering.
|
|
2995
|
+
namespaceList.unshift(ns);
|
|
2908
2996
|
}
|
|
2909
2997
|
}
|
|
2910
2998
|
else {
|
|
2911
|
-
|
|
2999
|
+
namespaceList.push(ns);
|
|
2912
3000
|
}
|
|
2913
|
-
|
|
3001
|
+
namespacesByHostElement.set(hostElement, ns);
|
|
2914
3002
|
return ns;
|
|
2915
3003
|
}
|
|
2916
3004
|
register(namespaceId, hostElement) {
|
|
@@ -3951,10 +4039,14 @@ class AnimationEngine {
|
|
|
3951
4039
|
let trigger = this._triggerCache[cacheKey];
|
|
3952
4040
|
if (!trigger) {
|
|
3953
4041
|
const errors = [];
|
|
3954
|
-
const
|
|
4042
|
+
const warnings = [];
|
|
4043
|
+
const ast = buildAnimationAst(this._driver, metadata, errors, warnings);
|
|
3955
4044
|
if (errors.length) {
|
|
3956
4045
|
throw triggerBuildFailed(name, errors);
|
|
3957
4046
|
}
|
|
4047
|
+
if (warnings.length) {
|
|
4048
|
+
warnTriggerBuild(name, warnings);
|
|
4049
|
+
}
|
|
3958
4050
|
trigger = buildTrigger(name, ast, this._normalizer);
|
|
3959
4051
|
this._triggerCache[cacheKey] = trigger;
|
|
3960
4052
|
}
|
|
@@ -4276,6 +4368,9 @@ class WebAnimationsDriver {
|
|
|
4276
4368
|
containsElement(elm1, elm2) {
|
|
4277
4369
|
return containsElement(elm1, elm2);
|
|
4278
4370
|
}
|
|
4371
|
+
getParentElement(element) {
|
|
4372
|
+
return getParentElement(element);
|
|
4373
|
+
}
|
|
4279
4374
|
query(element, selector, multi) {
|
|
4280
4375
|
return invokeQuery(element, selector, multi);
|
|
4281
4376
|
}
|
|
@@ -4341,5 +4436,5 @@ class WebAnimationsDriver {
|
|
|
4341
4436
|
* Generated bundle index. Do not edit.
|
|
4342
4437
|
*/
|
|
4343
4438
|
|
|
4344
|
-
export { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery, validateStyleProperty as ɵvalidateStyleProperty };
|
|
4439
|
+
export { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, validateStyleProperty as ɵvalidateStyleProperty };
|
|
4345
4440
|
//# sourceMappingURL=browser.mjs.map
|