@angular/animations 13.2.0-next.2 → 14.0.0-next.0
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 +1 -1
- package/browser/testing/testing.d.ts +1 -1
- package/esm2020/browser/src/dsl/animation.mjs +1 -1
- package/esm2020/browser/src/dsl/animation_ast_builder.mjs +1 -1
- package/esm2020/browser/src/dsl/animation_timeline_builder.mjs +16 -5
- package/esm2020/browser/src/dsl/animation_transition_factory.mjs +1 -1
- package/esm2020/browser/src/dsl/animation_transition_instruction.mjs +1 -1
- package/esm2020/browser/src/dsl/animation_trigger.mjs +1 -1
- package/esm2020/browser/src/render/animation_driver.mjs +3 -3
- package/esm2020/browser/src/render/animation_engine_next.mjs +1 -1
- package/esm2020/browser/src/render/shared.mjs +4 -20
- package/esm2020/browser/src/render/timeline_animation_engine.mjs +1 -1
- package/esm2020/browser/src/render/transition_animation_engine.mjs +1 -1
- package/esm2020/browser/src/util.mjs +1 -1
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/animations.mjs +1 -1
- package/fesm2015/browser/testing.mjs +1 -1
- package/fesm2015/browser.mjs +22 -27
- package/fesm2015/browser.mjs.map +1 -1
- package/fesm2020/animations.mjs +1 -1
- package/fesm2020/browser/testing.mjs +1 -1
- package/fesm2020/browser.mjs +22 -27
- package/fesm2020/browser.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2020/animations.mjs
CHANGED
package/fesm2020/browser.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular
|
|
2
|
+
* @license Angular v14.0.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -148,27 +148,11 @@ if (_isNode || typeof Element !== 'undefined') {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
_query = (element, selector, multi) => {
|
|
151
|
-
let results = [];
|
|
152
151
|
if (multi) {
|
|
153
|
-
|
|
154
|
-
// For element queries that return sufficiently large NodeList objects,
|
|
155
|
-
// using spread syntax to populate the results array causes a RangeError
|
|
156
|
-
// due to the call stack limit being reached. `Array.from` can not be used
|
|
157
|
-
// as well, since NodeList is not iterable in IE 11, see
|
|
158
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/NodeList
|
|
159
|
-
// More info is available in #38551.
|
|
160
|
-
const elems = element.querySelectorAll(selector);
|
|
161
|
-
for (let i = 0; i < elems.length; i++) {
|
|
162
|
-
results.push(elems[i]);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
const elm = element.querySelector(selector);
|
|
167
|
-
if (elm) {
|
|
168
|
-
results.push(elm);
|
|
169
|
-
}
|
|
152
|
+
return Array.from(element.querySelectorAll(selector));
|
|
170
153
|
}
|
|
171
|
-
|
|
154
|
+
const elem = element.querySelector(selector);
|
|
155
|
+
return elem ? [elem] : [];
|
|
172
156
|
};
|
|
173
157
|
}
|
|
174
158
|
function containsVendorPrefix(prop) {
|
|
@@ -241,9 +225,9 @@ class NoopAnimationDriver {
|
|
|
241
225
|
return new NoopAnimationPlayer(duration, delay);
|
|
242
226
|
}
|
|
243
227
|
}
|
|
244
|
-
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
245
|
-
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
228
|
+
NoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.0", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
229
|
+
NoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.0", ngImport: i0, type: NoopAnimationDriver });
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.0", ngImport: i0, type: NoopAnimationDriver, decorators: [{
|
|
247
231
|
type: Injectable
|
|
248
232
|
}] });
|
|
249
233
|
/**
|
|
@@ -1263,10 +1247,21 @@ class AnimationTimelineBuilderVisitor {
|
|
|
1263
1247
|
visitDslNode(this, ast, context);
|
|
1264
1248
|
// this checks to see if an actual animation happened
|
|
1265
1249
|
const timelines = context.timelines.filter(timeline => timeline.containsAnimation());
|
|
1266
|
-
if (
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1250
|
+
if (Object.keys(finalStyles).length) {
|
|
1251
|
+
// note: we just want to apply the final styles for the rootElement, so we do not
|
|
1252
|
+
// just apply the styles to the last timeline but the last timeline which
|
|
1253
|
+
// element is the root one (basically `*`-styles are replaced with the actual
|
|
1254
|
+
// state style values only for the root element)
|
|
1255
|
+
let lastRootTimeline;
|
|
1256
|
+
for (let i = timelines.length - 1; i >= 0; i--) {
|
|
1257
|
+
const timeline = timelines[i];
|
|
1258
|
+
if (timeline.element === rootElement) {
|
|
1259
|
+
lastRootTimeline = timeline;
|
|
1260
|
+
break;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {
|
|
1264
|
+
lastRootTimeline.setStyles([finalStyles], null, context.errors, options);
|
|
1270
1265
|
}
|
|
1271
1266
|
}
|
|
1272
1267
|
return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) :
|