@angular/animations 13.1.0-next.1 → 13.1.1
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 +153 -154
- package/browser/browser.d.ts +9 -8
- package/browser/testing/testing.d.ts +2 -2
- package/esm2020/browser/src/dsl/animation_ast_builder.mjs +3 -2
- package/esm2020/browser/src/dsl/animation_timeline_builder.mjs +8 -8
- package/esm2020/browser/src/dsl/element_instruction_map.mjs +3 -10
- package/esm2020/browser/src/private_export.mjs +2 -2
- package/esm2020/browser/src/render/animation_driver.mjs +8 -7
- package/esm2020/browser/src/render/css_keyframes/css_keyframes_driver.mjs +5 -4
- package/esm2020/browser/src/render/shared.mjs +1 -19
- package/esm2020/browser/src/render/transition_animation_engine.mjs +36 -55
- package/esm2020/browser/src/render/web_animations/web_animations_driver.mjs +5 -4
- package/esm2020/browser/src/render/web_animations/web_animations_player.mjs +7 -4
- package/esm2020/browser/src/util.mjs +1 -3
- package/esm2020/browser/testing/src/mock_animation_driver.mjs +4 -4
- package/esm2020/src/animation_metadata.mjs +153 -154
- package/esm2020/src/version.mjs +3 -16
- package/fesm2015/animations.mjs +153 -154
- package/fesm2015/animations.mjs.map +1 -1
- package/fesm2015/browser/testing.mjs +4 -4
- package/fesm2015/browser/testing.mjs.map +1 -1
- package/fesm2015/browser.mjs +69 -105
- package/fesm2015/browser.mjs.map +1 -1
- package/fesm2020/animations.mjs +153 -154
- package/fesm2020/animations.mjs.map +1 -1
- package/fesm2020/browser/testing.mjs +4 -4
- package/fesm2020/browser/testing.mjs.map +1 -1
- package/fesm2020/browser.mjs +66 -105
- package/fesm2020/browser.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2015/browser.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.1.
|
|
2
|
+
* @license Angular v13.1.1
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -126,7 +126,6 @@ function parseTimelineCommand(command) {
|
|
|
126
126
|
return [id, action];
|
|
127
127
|
}
|
|
128
128
|
let _contains = (elm1, elm2) => false;
|
|
129
|
-
let _matches = (element, selector) => false;
|
|
130
129
|
let _query = (element, selector, multi) => {
|
|
131
130
|
return [];
|
|
132
131
|
};
|
|
@@ -148,22 +147,6 @@ if (_isNode || typeof Element !== 'undefined') {
|
|
|
148
147
|
return false;
|
|
149
148
|
};
|
|
150
149
|
}
|
|
151
|
-
_matches = (() => {
|
|
152
|
-
if (_isNode || Element.prototype.matches) {
|
|
153
|
-
return (element, selector) => element.matches(selector);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
const proto = Element.prototype;
|
|
157
|
-
const fn = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||
|
|
158
|
-
proto.oMatchesSelector || proto.webkitMatchesSelector;
|
|
159
|
-
if (fn) {
|
|
160
|
-
return (element, selector) => fn.apply(element, [selector]);
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
return _matches;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
})();
|
|
167
150
|
_query = (element, selector, multi) => {
|
|
168
151
|
let results = [];
|
|
169
152
|
if (multi) {
|
|
@@ -216,7 +199,6 @@ function getBodyNode() {
|
|
|
216
199
|
}
|
|
217
200
|
return null;
|
|
218
201
|
}
|
|
219
|
-
const matchesElement = _matches;
|
|
220
202
|
const containsElement = _contains;
|
|
221
203
|
const invokeQuery = _query;
|
|
222
204
|
function hypenatePropsObject(object) {
|
|
@@ -242,8 +224,9 @@ class NoopAnimationDriver {
|
|
|
242
224
|
validateStyleProperty(prop) {
|
|
243
225
|
return validateStyleProperty(prop);
|
|
244
226
|
}
|
|
245
|
-
matchesElement(
|
|
246
|
-
return
|
|
227
|
+
matchesElement(_element, _selector) {
|
|
228
|
+
// This method is deprecated and no longer in use so we return false.
|
|
229
|
+
return false;
|
|
247
230
|
}
|
|
248
231
|
containsElement(elm1, elm2) {
|
|
249
232
|
return containsElement(elm1, elm2);
|
|
@@ -258,9 +241,9 @@ class NoopAnimationDriver {
|
|
|
258
241
|
return new NoopAnimationPlayer(duration, delay);
|
|
259
242
|
}
|
|
260
243
|
}
|
|
261
|
-
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.
|
|
262
|
-
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.
|
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.
|
|
244
|
+
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
245
|
+
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NoopAnimationDriver });
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NoopAnimationDriver, decorators: [{
|
|
264
247
|
type: Injectable
|
|
265
248
|
}] });
|
|
266
249
|
/**
|
|
@@ -282,8 +265,6 @@ const SUBSTITUTION_EXPR_START = '{{';
|
|
|
282
265
|
const SUBSTITUTION_EXPR_END = '}}';
|
|
283
266
|
const ENTER_CLASSNAME = 'ng-enter';
|
|
284
267
|
const LEAVE_CLASSNAME = 'ng-leave';
|
|
285
|
-
const ENTER_SELECTOR = '.ng-enter';
|
|
286
|
-
const LEAVE_SELECTOR = '.ng-leave';
|
|
287
268
|
const NG_TRIGGER_CLASSNAME = 'ng-trigger';
|
|
288
269
|
const NG_TRIGGER_SELECTOR = '.ng-trigger';
|
|
289
270
|
const NG_ANIMATING_CLASSNAME = 'ng-animating';
|
|
@@ -1054,7 +1035,8 @@ function normalizeSelector(selector) {
|
|
|
1054
1035
|
if (hasAmpersand) {
|
|
1055
1036
|
selector = selector.replace(SELF_TOKEN_REGEX, '');
|
|
1056
1037
|
}
|
|
1057
|
-
// the :enter and :leave
|
|
1038
|
+
// Note: the :enter and :leave aren't normalized here since those
|
|
1039
|
+
// selectors are filled in at runtime during timeline building
|
|
1058
1040
|
selector = selector.replace(/@\*/g, NG_TRIGGER_SELECTOR)
|
|
1059
1041
|
.replace(/@\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.substr(1))
|
|
1060
1042
|
.replace(/:animating/g, NG_ANIMATING_SELECTOR);
|
|
@@ -1155,15 +1137,8 @@ class ElementInstructionMap {
|
|
|
1155
1137
|
constructor() {
|
|
1156
1138
|
this._map = new Map();
|
|
1157
1139
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
if (instructions) {
|
|
1161
|
-
this._map.delete(element);
|
|
1162
|
-
}
|
|
1163
|
-
else {
|
|
1164
|
-
instructions = [];
|
|
1165
|
-
}
|
|
1166
|
-
return instructions;
|
|
1140
|
+
get(element) {
|
|
1141
|
+
return this._map.get(element) || [];
|
|
1167
1142
|
}
|
|
1168
1143
|
append(element, instructions) {
|
|
1169
1144
|
let existingInstructions = this._map.get(element);
|
|
@@ -1229,14 +1204,14 @@ const LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');
|
|
|
1229
1204
|
* [TimelineBuilder]
|
|
1230
1205
|
* This class is responsible for tracking the styles and building a series of keyframe objects for a
|
|
1231
1206
|
* timeline between a start and end time. The builder starts off with an initial timeline and each
|
|
1232
|
-
* time the AST comes across a `group()`, `keyframes()` or a combination of the two
|
|
1207
|
+
* time the AST comes across a `group()`, `keyframes()` or a combination of the two within a
|
|
1233
1208
|
* `sequence()` then it will generate a sub timeline for each step as well as a new one after
|
|
1234
1209
|
* they are complete.
|
|
1235
1210
|
*
|
|
1236
1211
|
* As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub
|
|
1237
1212
|
* timeline was created (based on one of the cases above) then the parent timeline will attempt to
|
|
1238
1213
|
* merge the styles used within the sub timelines into itself (only with group() this will happen).
|
|
1239
|
-
* This happens with a merge operation (much like how the merge works in
|
|
1214
|
+
* This happens with a merge operation (much like how the merge works in mergeSort) and it will only
|
|
1240
1215
|
* copy the most recently used styles from the sub timelines into the parent timeline. This ensures
|
|
1241
1216
|
* that if the styles are used later on in another phase of the animation then they will be the most
|
|
1242
1217
|
* up-to-date values.
|
|
@@ -1261,7 +1236,7 @@ const LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');
|
|
|
1261
1236
|
* from all previous keyframes up until where it is first used. For the timeline keyframe generation
|
|
1262
1237
|
* to properly fill in the style it will place the previous value (the value from the parent
|
|
1263
1238
|
* timeline) or a default value of `*` into the backFill object. Given that each of the keyframe
|
|
1264
|
-
* styles are objects that prototypically
|
|
1239
|
+
* styles are objects that prototypically inherits from the backFill object, this means that if a
|
|
1265
1240
|
* value is added into the backFill then it will automatically propagate any missing values to all
|
|
1266
1241
|
* keyframes. Therefore the missing `height` value will be properly filled into the already
|
|
1267
1242
|
* processed keyframes.
|
|
@@ -1307,7 +1282,7 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1307
1282
|
// these values are not visited in this AST
|
|
1308
1283
|
}
|
|
1309
1284
|
visitAnimateChild(ast, context) {
|
|
1310
|
-
const elementInstructions = context.subInstructions.
|
|
1285
|
+
const elementInstructions = context.subInstructions.get(context.element);
|
|
1311
1286
|
if (elementInstructions) {
|
|
1312
1287
|
const innerContext = context.createSubContext(ast.options);
|
|
1313
1288
|
const startTime = context.currentTimeline.currentTime;
|
|
@@ -1366,7 +1341,7 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1366
1341
|
}
|
|
1367
1342
|
if (ast.steps.length) {
|
|
1368
1343
|
ast.steps.forEach(s => visitDslNode(this, s, ctx));
|
|
1369
|
-
// this is here just
|
|
1344
|
+
// this is here just in case the inner steps only contain or end with a style() call
|
|
1370
1345
|
ctx.currentTimeline.applyStylesToKeyframe();
|
|
1371
1346
|
// this means that some animation function within the sequence
|
|
1372
1347
|
// ended up creating a sub timeline (which means the current
|
|
@@ -1642,7 +1617,7 @@ class AnimationTimelineContext {
|
|
|
1642
1617
|
if (includeSelf) {
|
|
1643
1618
|
results.push(this.element);
|
|
1644
1619
|
}
|
|
1645
|
-
if (selector.length > 0) { // if :self is
|
|
1620
|
+
if (selector.length > 0) { // only if :self is used then the selector can be empty
|
|
1646
1621
|
selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);
|
|
1647
1622
|
selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);
|
|
1648
1623
|
const multi = limit != 1;
|
|
@@ -1887,7 +1862,7 @@ class SubTimelineBuilder extends TimelineBuilder {
|
|
|
1887
1862
|
When the keyframe is stretched then it means that the delay before the animation
|
|
1888
1863
|
starts is gone. Instead the first keyframe is placed at the start of the animation
|
|
1889
1864
|
and it is then copied to where it starts when the original delay is over. This basically
|
|
1890
|
-
means nothing animates during that delay, but the styles are still
|
|
1865
|
+
means nothing animates during that delay, but the styles are still rendered. For this
|
|
1891
1866
|
to work the original offset values that exist in the original keyframes must be "warped"
|
|
1892
1867
|
so that they can take the new keyframe + delay into account.
|
|
1893
1868
|
|
|
@@ -2491,7 +2466,7 @@ class AnimationTransitionNamespace {
|
|
|
2491
2466
|
// only remove the player if it is queued on the EXACT same trigger/namespace
|
|
2492
2467
|
// we only also deal with queued players here because if the animation has
|
|
2493
2468
|
// started then we want to keep the player alive until the flush happens
|
|
2494
|
-
// (which is where the previousPlayers are passed into the new
|
|
2469
|
+
// (which is where the previousPlayers are passed into the new player)
|
|
2495
2470
|
if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {
|
|
2496
2471
|
player.destroy();
|
|
2497
2472
|
}
|
|
@@ -2781,7 +2756,7 @@ class TransitionAnimationEngine {
|
|
|
2781
2756
|
// been inserted so that we know exactly where to place it in
|
|
2782
2757
|
// the namespace list
|
|
2783
2758
|
this.newHostElements.set(hostElement, ns);
|
|
2784
|
-
// given that this host element is
|
|
2759
|
+
// given that this host element is a part of the animation code, it
|
|
2785
2760
|
// may or may not be inserted by a parent node that is of an
|
|
2786
2761
|
// animation renderer type. If this happens then we can still have
|
|
2787
2762
|
// access to this item when we query for :enter nodes. If the parent
|
|
@@ -2846,8 +2821,8 @@ class TransitionAnimationEngine {
|
|
|
2846
2821
|
// normally there should only be one namespace per element, however
|
|
2847
2822
|
// if @triggers are placed on both the component element and then
|
|
2848
2823
|
// its host element (within the component code) then there will be
|
|
2849
|
-
// two namespaces returned. We use a set here to simply
|
|
2850
|
-
//
|
|
2824
|
+
// two namespaces returned. We use a set here to simply deduplicate
|
|
2825
|
+
// the namespaces in case (for the reason described above) there are multiple triggers
|
|
2851
2826
|
const namespaces = new Set();
|
|
2852
2827
|
const elementStates = this.statesByElement.get(element);
|
|
2853
2828
|
if (elementStates) {
|
|
@@ -2998,6 +2973,7 @@ class TransitionAnimationEngine {
|
|
|
2998
2973
|
});
|
|
2999
2974
|
}
|
|
3000
2975
|
processLeaveNode(element) {
|
|
2976
|
+
var _a;
|
|
3001
2977
|
const details = element[REMOVAL_FLAG];
|
|
3002
2978
|
if (details && details.setForRemoval) {
|
|
3003
2979
|
// this will prevent it from removing it twice
|
|
@@ -3011,7 +2987,7 @@ class TransitionAnimationEngine {
|
|
|
3011
2987
|
}
|
|
3012
2988
|
this._onRemovalComplete(element, details.setForRemoval);
|
|
3013
2989
|
}
|
|
3014
|
-
if (
|
|
2990
|
+
if ((_a = element.classList) === null || _a === void 0 ? void 0 : _a.contains(DISABLED_CLASSNAME)) {
|
|
3015
2991
|
this.markElementAsDisabled(element, false);
|
|
3016
2992
|
}
|
|
3017
2993
|
this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {
|
|
@@ -3162,30 +3138,38 @@ class TransitionAnimationEngine {
|
|
|
3162
3138
|
erroneousTransitions.push(instruction);
|
|
3163
3139
|
return;
|
|
3164
3140
|
}
|
|
3165
|
-
// even though the element may not be
|
|
3166
|
-
//
|
|
3141
|
+
// even though the element may not be in the DOM, it may still
|
|
3142
|
+
// be added at a later point (due to the mechanics of content
|
|
3167
3143
|
// projection and/or dynamic component insertion) therefore it's
|
|
3168
|
-
// important
|
|
3144
|
+
// important to still style the element.
|
|
3169
3145
|
if (nodeIsOrphaned) {
|
|
3170
3146
|
player.onStart(() => eraseStyles(element, instruction.fromStyles));
|
|
3171
3147
|
player.onDestroy(() => setStyles(element, instruction.toStyles));
|
|
3172
3148
|
skippedPlayers.push(player);
|
|
3173
3149
|
return;
|
|
3174
3150
|
}
|
|
3175
|
-
// if
|
|
3176
|
-
// an animation and cancel the
|
|
3151
|
+
// if an unmatched transition is queued and ready to go
|
|
3152
|
+
// then it SHOULD NOT render an animation and cancel the
|
|
3153
|
+
// previously running animations.
|
|
3177
3154
|
if (entry.isFallbackTransition) {
|
|
3178
3155
|
player.onStart(() => eraseStyles(element, instruction.fromStyles));
|
|
3179
3156
|
player.onDestroy(() => setStyles(element, instruction.toStyles));
|
|
3180
3157
|
skippedPlayers.push(player);
|
|
3181
3158
|
return;
|
|
3182
3159
|
}
|
|
3183
|
-
// this means that if a parent animation uses this animation as a sub
|
|
3184
|
-
// then it will instruct the timeline builder to
|
|
3185
|
-
// instead stretch the first keyframe gap
|
|
3186
|
-
//
|
|
3187
|
-
// required by the user
|
|
3188
|
-
|
|
3160
|
+
// this means that if a parent animation uses this animation as a sub-trigger
|
|
3161
|
+
// then it will instruct the timeline builder not to add a player delay, but
|
|
3162
|
+
// instead stretch the first keyframe gap until the animation starts. This is
|
|
3163
|
+
// important in order to prevent extra initialization styles from being
|
|
3164
|
+
// required by the user for the animation.
|
|
3165
|
+
const timelines = [];
|
|
3166
|
+
instruction.timelines.forEach(tl => {
|
|
3167
|
+
tl.stretchStartingKeyframe = true;
|
|
3168
|
+
if (!this.disabledNodes.has(tl.element)) {
|
|
3169
|
+
timelines.push(tl);
|
|
3170
|
+
}
|
|
3171
|
+
});
|
|
3172
|
+
instruction.timelines = timelines;
|
|
3189
3173
|
subTimelines.append(element, instruction.timelines);
|
|
3190
3174
|
const tuple = { instruction, player, element };
|
|
3191
3175
|
queuedInstructions.push(tuple);
|
|
@@ -3220,10 +3204,10 @@ class TransitionAnimationEngine {
|
|
|
3220
3204
|
this.reportError(errors);
|
|
3221
3205
|
}
|
|
3222
3206
|
const allPreviousPlayersMap = new Map();
|
|
3223
|
-
// this map
|
|
3224
|
-
// which animation. Further down
|
|
3225
|
-
// the players are built and in doing so
|
|
3226
|
-
// if a sub player is skipped due to a parent player having priority.
|
|
3207
|
+
// this map tells us which element in the DOM tree is contained by
|
|
3208
|
+
// which animation. Further down this map will get populated once
|
|
3209
|
+
// the players are built and in doing so we can use it to efficiently
|
|
3210
|
+
// figure out if a sub player is skipped due to a parent player having priority.
|
|
3227
3211
|
const animationElementMap = new Map();
|
|
3228
3212
|
queuedInstructions.forEach(entry => {
|
|
3229
3213
|
const element = entry.element;
|
|
@@ -3240,13 +3224,13 @@ class TransitionAnimationEngine {
|
|
|
3240
3224
|
prevPlayer.destroy();
|
|
3241
3225
|
});
|
|
3242
3226
|
});
|
|
3243
|
-
// this is a special case for nodes that will be removed
|
|
3227
|
+
// this is a special case for nodes that will be removed either by
|
|
3244
3228
|
// having their own leave animations or by being queried in a container
|
|
3245
3229
|
// that will be removed once a parent animation is complete. The idea
|
|
3246
3230
|
// here is that * styles must be identical to ! styles because of
|
|
3247
3231
|
// backwards compatibility (* is also filled in by default in many places).
|
|
3248
|
-
// Otherwise * styles will return an empty value or auto since the element
|
|
3249
|
-
//
|
|
3232
|
+
// Otherwise * styles will return an empty value or "auto" since the element
|
|
3233
|
+
// passed to getComputedStyle will not be visible (since * === destination)
|
|
3250
3234
|
const replaceNodes = allLeaveNodes.filter(node => {
|
|
3251
3235
|
return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);
|
|
3252
3236
|
});
|
|
@@ -3328,9 +3312,9 @@ class TransitionAnimationEngine {
|
|
|
3328
3312
|
}
|
|
3329
3313
|
}
|
|
3330
3314
|
});
|
|
3331
|
-
// find all of the sub players' corresponding inner animation
|
|
3315
|
+
// find all of the sub players' corresponding inner animation players
|
|
3332
3316
|
subPlayers.forEach(player => {
|
|
3333
|
-
// even if
|
|
3317
|
+
// even if no players are found for a sub animation it
|
|
3334
3318
|
// will still complete itself after the next tick since it's Noop
|
|
3335
3319
|
const playersForElement = skippedPlayersMap.get(player.element);
|
|
3336
3320
|
if (playersForElement && playersForElement.length) {
|
|
@@ -3758,38 +3742,13 @@ function buildRootMap(roots, nodes) {
|
|
|
3758
3742
|
});
|
|
3759
3743
|
return rootMap;
|
|
3760
3744
|
}
|
|
3761
|
-
const CLASSES_CACHE_KEY = '$$classes';
|
|
3762
|
-
function containsClass(element, className) {
|
|
3763
|
-
if (element.classList) {
|
|
3764
|
-
return element.classList.contains(className);
|
|
3765
|
-
}
|
|
3766
|
-
else {
|
|
3767
|
-
const classes = element[CLASSES_CACHE_KEY];
|
|
3768
|
-
return classes && classes[className];
|
|
3769
|
-
}
|
|
3770
|
-
}
|
|
3771
3745
|
function addClass(element, className) {
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
}
|
|
3775
|
-
else {
|
|
3776
|
-
let classes = element[CLASSES_CACHE_KEY];
|
|
3777
|
-
if (!classes) {
|
|
3778
|
-
classes = element[CLASSES_CACHE_KEY] = {};
|
|
3779
|
-
}
|
|
3780
|
-
classes[className] = true;
|
|
3781
|
-
}
|
|
3746
|
+
var _a;
|
|
3747
|
+
(_a = element.classList) === null || _a === void 0 ? void 0 : _a.add(className);
|
|
3782
3748
|
}
|
|
3783
3749
|
function removeClass(element, className) {
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
}
|
|
3787
|
-
else {
|
|
3788
|
-
let classes = element[CLASSES_CACHE_KEY];
|
|
3789
|
-
if (classes) {
|
|
3790
|
-
delete classes[className];
|
|
3791
|
-
}
|
|
3792
|
-
}
|
|
3750
|
+
var _a;
|
|
3751
|
+
(_a = element.classList) === null || _a === void 0 ? void 0 : _a.remove(className);
|
|
3793
3752
|
}
|
|
3794
3753
|
function removeNodesAfterAnimationDone(engine, element, players) {
|
|
3795
3754
|
optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));
|
|
@@ -4340,8 +4299,9 @@ class CssKeyframesDriver {
|
|
|
4340
4299
|
validateStyleProperty(prop) {
|
|
4341
4300
|
return validateStyleProperty(prop);
|
|
4342
4301
|
}
|
|
4343
|
-
matchesElement(
|
|
4344
|
-
return
|
|
4302
|
+
matchesElement(_element, _selector) {
|
|
4303
|
+
// This method is deprecated and no longer in use so we return false.
|
|
4304
|
+
return false;
|
|
4345
4305
|
}
|
|
4346
4306
|
containsElement(elm1, elm2) {
|
|
4347
4307
|
return containsElement(elm1, elm2);
|
|
@@ -4581,10 +4541,13 @@ class WebAnimationsPlayer {
|
|
|
4581
4541
|
beforeDestroy() {
|
|
4582
4542
|
const styles = {};
|
|
4583
4543
|
if (this.hasStarted()) {
|
|
4584
|
-
|
|
4544
|
+
// note: this code is invoked only when the `play` function was called prior to this
|
|
4545
|
+
// (thus `hasStarted` returns true), this implies that the code that initializes
|
|
4546
|
+
// `_finalKeyframe` has also been executed and the non-null assertion can be safely used here
|
|
4547
|
+
const finalKeyframe = this._finalKeyframe;
|
|
4548
|
+
Object.keys(finalKeyframe).forEach(prop => {
|
|
4585
4549
|
if (prop != 'offset') {
|
|
4586
|
-
styles[prop] =
|
|
4587
|
-
this._finished ? this._finalKeyframe[prop] : computeStyle(this.element, prop);
|
|
4550
|
+
styles[prop] = this._finished ? finalKeyframe[prop] : computeStyle(this.element, prop);
|
|
4588
4551
|
}
|
|
4589
4552
|
});
|
|
4590
4553
|
}
|
|
@@ -4606,8 +4569,9 @@ class WebAnimationsDriver {
|
|
|
4606
4569
|
validateStyleProperty(prop) {
|
|
4607
4570
|
return validateStyleProperty(prop);
|
|
4608
4571
|
}
|
|
4609
|
-
matchesElement(
|
|
4610
|
-
return
|
|
4572
|
+
matchesElement(_element, _selector) {
|
|
4573
|
+
// This method is deprecated and no longer in use so we return false.
|
|
4574
|
+
return false;
|
|
4611
4575
|
}
|
|
4612
4576
|
containsElement(elm1, elm2) {
|
|
4613
4577
|
return containsElement(elm1, elm2);
|
|
@@ -4690,5 +4654,5 @@ function getElementAnimateFn() {
|
|
|
4690
4654
|
* Generated bundle index. Do not edit.
|
|
4691
4655
|
*/
|
|
4692
4656
|
|
|
4693
|
-
export { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, CssKeyframesDriver as ɵCssKeyframesDriver, CssKeyframesPlayer as ɵCssKeyframesPlayer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery,
|
|
4657
|
+
export { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, CssKeyframesDriver as ɵCssKeyframesDriver, CssKeyframesPlayer as ɵCssKeyframesPlayer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery, supportsWebAnimations as ɵsupportsWebAnimations, validateStyleProperty as ɵvalidateStyleProperty };
|
|
4694
4658
|
//# sourceMappingURL=browser.mjs.map
|