@angular/animations 12.2.0-next.2 → 12.2.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 +1 -1
- package/browser/browser.d.ts +3 -2
- package/browser/testing/testing.d.ts +1 -1
- package/browser/testing.d.ts +1 -1
- package/browser.d.ts +1 -1
- package/bundles/animations-browser-testing.umd.js +1 -1
- package/bundles/animations-browser.umd.js +19 -19
- package/bundles/animations-browser.umd.js.map +1 -1
- package/bundles/animations.umd.js +1 -1
- package/esm2015/browser/src/dsl/animation_transition_factory.js +6 -3
- package/esm2015/browser/src/dsl/animation_trigger.js +8 -13
- package/esm2015/browser/src/render/animation_engine_next.js +6 -5
- package/esm2015/src/version.js +1 -1
- package/fesm2015/animations.js +1 -1
- package/fesm2015/browser/testing.js +1 -1
- package/fesm2015/browser.js +18 -19
- package/fesm2015/browser.js.map +1 -1
- package/package.json +2 -2
package/animations.d.ts
CHANGED
package/browser/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.2.
|
|
2
|
+
* @license Angular v12.2.1
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -116,11 +116,12 @@ export declare class ɵAnimation {
|
|
|
116
116
|
export declare class ɵAnimationEngine {
|
|
117
117
|
private bodyNode;
|
|
118
118
|
private _driver;
|
|
119
|
+
private _normalizer;
|
|
119
120
|
private _transitionEngine;
|
|
120
121
|
private _timelineEngine;
|
|
121
122
|
private _triggerCache;
|
|
122
123
|
onRemovalComplete: (element: any, context: any) => void;
|
|
123
|
-
constructor(bodyNode: any, _driver: AnimationDriver,
|
|
124
|
+
constructor(bodyNode: any, _driver: AnimationDriver, _normalizer: ɵAnimationStyleNormalizer);
|
|
124
125
|
registerTrigger(componentId: string, namespaceId: string, hostElement: any, name: string, metadata: AnimationTriggerMetadata): void;
|
|
125
126
|
register(namespaceId: string, hostElement: any): void;
|
|
126
127
|
destroy(namespaceId: string, context: any): void;
|
package/browser/testing.d.ts
CHANGED
package/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.2.
|
|
2
|
+
* @license Angular v12.2.1
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2481,11 +2481,13 @@
|
|
|
2481
2481
|
return matchFns.some(function (fn) { return fn(currentState, nextState, element, params); });
|
|
2482
2482
|
}
|
|
2483
2483
|
var AnimationStateStyles = /** @class */ (function () {
|
|
2484
|
-
function AnimationStateStyles(styles, defaultParams) {
|
|
2484
|
+
function AnimationStateStyles(styles, defaultParams, normalizer) {
|
|
2485
2485
|
this.styles = styles;
|
|
2486
2486
|
this.defaultParams = defaultParams;
|
|
2487
|
+
this.normalizer = normalizer;
|
|
2487
2488
|
}
|
|
2488
2489
|
AnimationStateStyles.prototype.buildStyles = function (params, errors) {
|
|
2490
|
+
var _this = this;
|
|
2489
2491
|
var finalStyles = {};
|
|
2490
2492
|
var combinedParams = copyObj(this.defaultParams);
|
|
2491
2493
|
Object.keys(params).forEach(function (key) {
|
|
@@ -2502,7 +2504,9 @@
|
|
|
2502
2504
|
if (val.length > 1) {
|
|
2503
2505
|
val = interpolateParams(val, combinedParams, errors);
|
|
2504
2506
|
}
|
|
2505
|
-
|
|
2507
|
+
var normalizedProp = _this.normalizer.normalizePropertyName(prop, errors);
|
|
2508
|
+
val = _this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);
|
|
2509
|
+
finalStyles[normalizedProp] = val;
|
|
2506
2510
|
});
|
|
2507
2511
|
}
|
|
2508
2512
|
});
|
|
@@ -2511,32 +2515,27 @@
|
|
|
2511
2515
|
return AnimationStateStyles;
|
|
2512
2516
|
}());
|
|
2513
2517
|
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
*/
|
|
2517
|
-
function buildTrigger(name, ast) {
|
|
2518
|
-
return new AnimationTrigger(name, ast);
|
|
2518
|
+
function buildTrigger(name, ast, normalizer) {
|
|
2519
|
+
return new AnimationTrigger(name, ast, normalizer);
|
|
2519
2520
|
}
|
|
2520
|
-
/**
|
|
2521
|
-
* @publicApi
|
|
2522
|
-
*/
|
|
2523
2521
|
var AnimationTrigger = /** @class */ (function () {
|
|
2524
|
-
function AnimationTrigger(name, ast) {
|
|
2522
|
+
function AnimationTrigger(name, ast, _normalizer) {
|
|
2525
2523
|
var _this = this;
|
|
2526
2524
|
this.name = name;
|
|
2527
2525
|
this.ast = ast;
|
|
2526
|
+
this._normalizer = _normalizer;
|
|
2528
2527
|
this.transitionFactories = [];
|
|
2529
2528
|
this.states = {};
|
|
2530
2529
|
ast.states.forEach(function (ast) {
|
|
2531
2530
|
var defaultParams = (ast.options && ast.options.params) || {};
|
|
2532
|
-
_this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);
|
|
2531
|
+
_this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams, _normalizer);
|
|
2533
2532
|
});
|
|
2534
2533
|
balanceProperties(this.states, 'true', '1');
|
|
2535
2534
|
balanceProperties(this.states, 'false', '0');
|
|
2536
2535
|
ast.transitions.forEach(function (ast) {
|
|
2537
2536
|
_this.transitionFactories.push(new AnimationTransitionFactory(name, ast, _this.states));
|
|
2538
2537
|
});
|
|
2539
|
-
this.fallbackTransition = createFallbackTransition(name, this.states);
|
|
2538
|
+
this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);
|
|
2540
2539
|
}
|
|
2541
2540
|
Object.defineProperty(AnimationTrigger.prototype, "containsQueries", {
|
|
2542
2541
|
get: function () {
|
|
@@ -2554,7 +2553,7 @@
|
|
|
2554
2553
|
};
|
|
2555
2554
|
return AnimationTrigger;
|
|
2556
2555
|
}());
|
|
2557
|
-
function createFallbackTransition(triggerName, states) {
|
|
2556
|
+
function createFallbackTransition(triggerName, states, normalizer) {
|
|
2558
2557
|
var matchers = [function (fromState, toState) { return true; }];
|
|
2559
2558
|
var animation = { type: 2 /* Sequence */, steps: [], options: null };
|
|
2560
2559
|
var transition = {
|
|
@@ -4273,15 +4272,16 @@
|
|
|
4273
4272
|
}
|
|
4274
4273
|
|
|
4275
4274
|
var AnimationEngine = /** @class */ (function () {
|
|
4276
|
-
function AnimationEngine(bodyNode, _driver,
|
|
4275
|
+
function AnimationEngine(bodyNode, _driver, _normalizer) {
|
|
4277
4276
|
var _this = this;
|
|
4278
4277
|
this.bodyNode = bodyNode;
|
|
4279
4278
|
this._driver = _driver;
|
|
4279
|
+
this._normalizer = _normalizer;
|
|
4280
4280
|
this._triggerCache = {};
|
|
4281
4281
|
// this method is designed to be overridden by the code that uses this engine
|
|
4282
4282
|
this.onRemovalComplete = function (element, context) { };
|
|
4283
|
-
this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver,
|
|
4284
|
-
this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver,
|
|
4283
|
+
this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, _normalizer);
|
|
4284
|
+
this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, _normalizer);
|
|
4285
4285
|
this._transitionEngine.onRemovalComplete = function (element, context) { return _this.onRemovalComplete(element, context); };
|
|
4286
4286
|
}
|
|
4287
4287
|
AnimationEngine.prototype.registerTrigger = function (componentId, namespaceId, hostElement, name, metadata) {
|
|
@@ -4293,7 +4293,7 @@
|
|
|
4293
4293
|
if (errors.length) {
|
|
4294
4294
|
throw new Error("The animation trigger \"" + name + "\" has failed to build due to the following errors:\n - " + errors.join('\n - '));
|
|
4295
4295
|
}
|
|
4296
|
-
trigger = buildTrigger(name, ast);
|
|
4296
|
+
trigger = buildTrigger(name, ast, this._normalizer);
|
|
4297
4297
|
this._triggerCache[cacheKey] = trigger;
|
|
4298
4298
|
}
|
|
4299
4299
|
this._transitionEngine.registerTrigger(namespaceId, name, trigger);
|