@angular/animations 13.1.0-next.3 → 13.2.0-next.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 +151 -148
- package/browser/browser.d.ts +9 -8
- package/browser/testing/testing.d.ts +2 -2
- package/esm2020/browser/src/dsl/animation_ast_builder.mjs +1 -1
- package/esm2020/browser/src/dsl/animation_timeline_builder.mjs +2 -2
- 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 +12 -32
- 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 +151 -148
- package/esm2020/src/version.mjs +3 -16
- package/fesm2015/animations.mjs +151 -148
- 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 +37 -75
- package/fesm2015/browser.mjs.map +1 -1
- package/fesm2020/animations.mjs +151 -148
- 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 +34 -75
- 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.
|
|
2
|
+
* @license Angular v13.2.0-next.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.
|
|
262
|
-
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
244
|
+
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0-next.1", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
245
|
+
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0-next.1", ngImport: i0, type: NoopAnimationDriver });
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0-next.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';
|
|
@@ -1156,15 +1137,8 @@ class ElementInstructionMap {
|
|
|
1156
1137
|
constructor() {
|
|
1157
1138
|
this._map = new Map();
|
|
1158
1139
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
if (instructions) {
|
|
1162
|
-
this._map.delete(element);
|
|
1163
|
-
}
|
|
1164
|
-
else {
|
|
1165
|
-
instructions = [];
|
|
1166
|
-
}
|
|
1167
|
-
return instructions;
|
|
1140
|
+
get(element) {
|
|
1141
|
+
return this._map.get(element) || [];
|
|
1168
1142
|
}
|
|
1169
1143
|
append(element, instructions) {
|
|
1170
1144
|
let existingInstructions = this._map.get(element);
|
|
@@ -1308,7 +1282,7 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1308
1282
|
// these values are not visited in this AST
|
|
1309
1283
|
}
|
|
1310
1284
|
visitAnimateChild(ast, context) {
|
|
1311
|
-
const elementInstructions = context.subInstructions.
|
|
1285
|
+
const elementInstructions = context.subInstructions.get(context.element);
|
|
1312
1286
|
if (elementInstructions) {
|
|
1313
1287
|
const innerContext = context.createSubContext(ast.options);
|
|
1314
1288
|
const startTime = context.currentTimeline.currentTime;
|
|
@@ -2999,6 +2973,7 @@ class TransitionAnimationEngine {
|
|
|
2999
2973
|
});
|
|
3000
2974
|
}
|
|
3001
2975
|
processLeaveNode(element) {
|
|
2976
|
+
var _a;
|
|
3002
2977
|
const details = element[REMOVAL_FLAG];
|
|
3003
2978
|
if (details && details.setForRemoval) {
|
|
3004
2979
|
// this will prevent it from removing it twice
|
|
@@ -3012,7 +2987,7 @@ class TransitionAnimationEngine {
|
|
|
3012
2987
|
}
|
|
3013
2988
|
this._onRemovalComplete(element, details.setForRemoval);
|
|
3014
2989
|
}
|
|
3015
|
-
if (
|
|
2990
|
+
if ((_a = element.classList) === null || _a === void 0 ? void 0 : _a.contains(DISABLED_CLASSNAME)) {
|
|
3016
2991
|
this.markElementAsDisabled(element, false);
|
|
3017
2992
|
}
|
|
3018
2993
|
this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {
|
|
@@ -3187,7 +3162,14 @@ class TransitionAnimationEngine {
|
|
|
3187
3162
|
// instead stretch the first keyframe gap until the animation starts. This is
|
|
3188
3163
|
// important in order to prevent extra initialization styles from being
|
|
3189
3164
|
// required by the user for the animation.
|
|
3190
|
-
|
|
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;
|
|
3191
3173
|
subTimelines.append(element, instruction.timelines);
|
|
3192
3174
|
const tuple = { instruction, player, element };
|
|
3193
3175
|
queuedInstructions.push(tuple);
|
|
@@ -3760,38 +3742,13 @@ function buildRootMap(roots, nodes) {
|
|
|
3760
3742
|
});
|
|
3761
3743
|
return rootMap;
|
|
3762
3744
|
}
|
|
3763
|
-
const CLASSES_CACHE_KEY = '$$classes';
|
|
3764
|
-
function containsClass(element, className) {
|
|
3765
|
-
if (element.classList) {
|
|
3766
|
-
return element.classList.contains(className);
|
|
3767
|
-
}
|
|
3768
|
-
else {
|
|
3769
|
-
const classes = element[CLASSES_CACHE_KEY];
|
|
3770
|
-
return classes && classes[className];
|
|
3771
|
-
}
|
|
3772
|
-
}
|
|
3773
3745
|
function addClass(element, className) {
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
}
|
|
3777
|
-
else {
|
|
3778
|
-
let classes = element[CLASSES_CACHE_KEY];
|
|
3779
|
-
if (!classes) {
|
|
3780
|
-
classes = element[CLASSES_CACHE_KEY] = {};
|
|
3781
|
-
}
|
|
3782
|
-
classes[className] = true;
|
|
3783
|
-
}
|
|
3746
|
+
var _a;
|
|
3747
|
+
(_a = element.classList) === null || _a === void 0 ? void 0 : _a.add(className);
|
|
3784
3748
|
}
|
|
3785
3749
|
function removeClass(element, className) {
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
}
|
|
3789
|
-
else {
|
|
3790
|
-
let classes = element[CLASSES_CACHE_KEY];
|
|
3791
|
-
if (classes) {
|
|
3792
|
-
delete classes[className];
|
|
3793
|
-
}
|
|
3794
|
-
}
|
|
3750
|
+
var _a;
|
|
3751
|
+
(_a = element.classList) === null || _a === void 0 ? void 0 : _a.remove(className);
|
|
3795
3752
|
}
|
|
3796
3753
|
function removeNodesAfterAnimationDone(engine, element, players) {
|
|
3797
3754
|
optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));
|
|
@@ -4342,8 +4299,9 @@ class CssKeyframesDriver {
|
|
|
4342
4299
|
validateStyleProperty(prop) {
|
|
4343
4300
|
return validateStyleProperty(prop);
|
|
4344
4301
|
}
|
|
4345
|
-
matchesElement(
|
|
4346
|
-
return
|
|
4302
|
+
matchesElement(_element, _selector) {
|
|
4303
|
+
// This method is deprecated and no longer in use so we return false.
|
|
4304
|
+
return false;
|
|
4347
4305
|
}
|
|
4348
4306
|
containsElement(elm1, elm2) {
|
|
4349
4307
|
return containsElement(elm1, elm2);
|
|
@@ -4583,10 +4541,13 @@ class WebAnimationsPlayer {
|
|
|
4583
4541
|
beforeDestroy() {
|
|
4584
4542
|
const styles = {};
|
|
4585
4543
|
if (this.hasStarted()) {
|
|
4586
|
-
|
|
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 => {
|
|
4587
4549
|
if (prop != 'offset') {
|
|
4588
|
-
styles[prop] =
|
|
4589
|
-
this._finished ? this._finalKeyframe[prop] : computeStyle(this.element, prop);
|
|
4550
|
+
styles[prop] = this._finished ? finalKeyframe[prop] : computeStyle(this.element, prop);
|
|
4590
4551
|
}
|
|
4591
4552
|
});
|
|
4592
4553
|
}
|
|
@@ -4608,8 +4569,9 @@ class WebAnimationsDriver {
|
|
|
4608
4569
|
validateStyleProperty(prop) {
|
|
4609
4570
|
return validateStyleProperty(prop);
|
|
4610
4571
|
}
|
|
4611
|
-
matchesElement(
|
|
4612
|
-
return
|
|
4572
|
+
matchesElement(_element, _selector) {
|
|
4573
|
+
// This method is deprecated and no longer in use so we return false.
|
|
4574
|
+
return false;
|
|
4613
4575
|
}
|
|
4614
4576
|
containsElement(elm1, elm2) {
|
|
4615
4577
|
return containsElement(elm1, elm2);
|
|
@@ -4692,5 +4654,5 @@ function getElementAnimateFn() {
|
|
|
4692
4654
|
* Generated bundle index. Do not edit.
|
|
4693
4655
|
*/
|
|
4694
4656
|
|
|
4695
|
-
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 };
|
|
4696
4658
|
//# sourceMappingURL=browser.mjs.map
|