@angular/animations 4.2.0 → 4.2.4
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/@angular/animations/browser/testing.es5.js +1 -1
- package/@angular/animations/browser/testing.js +1 -1
- package/@angular/animations/browser.es5.js +69 -39
- package/@angular/animations/browser.es5.js.map +1 -1
- package/@angular/animations/browser.js +69 -39
- package/@angular/animations/browser.js.map +1 -1
- package/@angular/animations.es5.js +1 -1
- package/@angular/animations.js +1 -1
- package/browser/src/dsl/animation_ast.d.ts +0 -6
- package/browser/testing.d.ts +1 -1
- package/browser.d.ts +1 -1
- package/bundles/animations-browser-testing.umd.js +2 -2
- package/bundles/animations-browser-testing.umd.min.js +1 -1
- package/bundles/animations-browser.umd.js +70 -40
- package/bundles/animations-browser.umd.js.map +1 -1
- package/bundles/animations-browser.umd.min.js +5 -5
- package/bundles/animations-browser.umd.min.js.map +1 -1
- package/bundles/animations.umd.js +2 -2
- package/bundles/animations.umd.min.js +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v4.2.
|
|
2
|
+
* @license Angular v4.2.4
|
|
3
3
|
* (c) 2010-2017 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -434,12 +434,6 @@ function dashCaseToCamelCase(input) {
|
|
|
434
434
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
/**
|
|
438
|
-
* @license
|
|
439
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
440
|
-
*
|
|
441
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
442
|
-
* found in the LICENSE file at https://angular.io/license
|
|
443
437
|
/**
|
|
444
438
|
* @license
|
|
445
439
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -3574,16 +3568,19 @@ class TransitionAnimationEngine {
|
|
|
3574
3568
|
// the :enter queries match the elements (since the timeline queries
|
|
3575
3569
|
// are fired during instruction building).
|
|
3576
3570
|
const /** @type {?} */ bodyNode = getBodyNode();
|
|
3577
|
-
const /** @type {?} */ allEnterNodes = this.collectedEnterElements
|
|
3578
|
-
|
|
3579
|
-
|
|
3571
|
+
const /** @type {?} */ allEnterNodes = this.collectedEnterElements.length ?
|
|
3572
|
+
collectEnterElements(this.driver, this.collectedEnterElements) :
|
|
3573
|
+
[];
|
|
3574
|
+
const /** @type {?} */ allLeaveNodes = [];
|
|
3575
|
+
const /** @type {?} */ leaveNodesWithoutAnimations = [];
|
|
3580
3576
|
for (let /** @type {?} */ i = 0; i < this.collectedLeaveElements.length; i++) {
|
|
3581
3577
|
const /** @type {?} */ element = this.collectedLeaveElements[i];
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3578
|
+
const /** @type {?} */ details = (element[REMOVAL_FLAG]);
|
|
3579
|
+
if (details && details.setForRemoval) {
|
|
3580
|
+
addClass(element, LEAVE_CLASSNAME);
|
|
3581
|
+
allLeaveNodes.push(element);
|
|
3582
|
+
if (!details.hasAnimation) {
|
|
3583
|
+
leaveNodesWithoutAnimations.push(element);
|
|
3587
3584
|
}
|
|
3588
3585
|
}
|
|
3589
3586
|
}
|
|
@@ -3637,6 +3634,15 @@ class TransitionAnimationEngine {
|
|
|
3637
3634
|
});
|
|
3638
3635
|
});
|
|
3639
3636
|
}
|
|
3637
|
+
// these can only be detected here since we have a map of all the elements
|
|
3638
|
+
// that have animations attached to them...
|
|
3639
|
+
const /** @type {?} */ enterNodesWithoutAnimations = [];
|
|
3640
|
+
for (let /** @type {?} */ i = 0; i < allEnterNodes.length; i++) {
|
|
3641
|
+
const /** @type {?} */ element = allEnterNodes[i];
|
|
3642
|
+
if (!subTimelines.has(element)) {
|
|
3643
|
+
enterNodesWithoutAnimations.push(element);
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3640
3646
|
const /** @type {?} */ allPreviousPlayersMap = new Map();
|
|
3641
3647
|
let /** @type {?} */ sortedParentElements = [];
|
|
3642
3648
|
queuedInstructions.forEach(entry => {
|
|
@@ -3654,10 +3660,10 @@ class TransitionAnimationEngine {
|
|
|
3654
3660
|
allPreviousPlayersMap.forEach(players => players.forEach(player => player.destroy()));
|
|
3655
3661
|
// PRE STAGE: fill the ! styles
|
|
3656
3662
|
const /** @type {?} */ preStylesMap = allPreStyleElements.size ?
|
|
3657
|
-
cloakAndComputeStyles(this.driver,
|
|
3663
|
+
cloakAndComputeStyles(this.driver, enterNodesWithoutAnimations, allPreStyleElements, ɵPRE_STYLE) :
|
|
3658
3664
|
new Map();
|
|
3659
3665
|
// POST STAGE: fill the * styles
|
|
3660
|
-
const /** @type {?} */ postStylesMap = cloakAndComputeStyles(this.driver,
|
|
3666
|
+
const /** @type {?} */ postStylesMap = cloakAndComputeStyles(this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);
|
|
3661
3667
|
const /** @type {?} */ rootPlayers = [];
|
|
3662
3668
|
const /** @type {?} */ subPlayers = [];
|
|
3663
3669
|
queuedInstructions.forEach(entry => {
|
|
@@ -3715,8 +3721,8 @@ class TransitionAnimationEngine {
|
|
|
3715
3721
|
// run through all of the queued removals and see if they
|
|
3716
3722
|
// were picked up by a query. If not then perform the removal
|
|
3717
3723
|
// operation right away unless a parent animation is ongoing.
|
|
3718
|
-
for (let /** @type {?} */ i = 0; i <
|
|
3719
|
-
const /** @type {?} */ element =
|
|
3724
|
+
for (let /** @type {?} */ i = 0; i < allLeaveNodes.length; i++) {
|
|
3725
|
+
const /** @type {?} */ element = allLeaveNodes[i];
|
|
3720
3726
|
const /** @type {?} */ players = queriedElements.get(element);
|
|
3721
3727
|
if (players) {
|
|
3722
3728
|
removeNodesAfterAnimationDone(this, element, players);
|
|
@@ -3737,7 +3743,7 @@ class TransitionAnimationEngine {
|
|
|
3737
3743
|
});
|
|
3738
3744
|
player.play();
|
|
3739
3745
|
});
|
|
3740
|
-
|
|
3746
|
+
allEnterNodes.forEach(element => removeClass(element, ENTER_CLASSNAME));
|
|
3741
3747
|
return rootPlayers;
|
|
3742
3748
|
}
|
|
3743
3749
|
/**
|
|
@@ -4092,7 +4098,7 @@ function normalizeTriggerValue(value) {
|
|
|
4092
4098
|
case 'boolean':
|
|
4093
4099
|
return value ? '1' : '0';
|
|
4094
4100
|
default:
|
|
4095
|
-
return value ? value.toString() : null;
|
|
4101
|
+
return value != null ? value.toString() : null;
|
|
4096
4102
|
}
|
|
4097
4103
|
}
|
|
4098
4104
|
/**
|
|
@@ -4131,27 +4137,51 @@ function filterNodeClasses(driver, rootElement, selector) {
|
|
|
4131
4137
|
return rootElements;
|
|
4132
4138
|
let /** @type {?} */ cursor = rootElement;
|
|
4133
4139
|
let /** @type {?} */ nextCursor = {};
|
|
4140
|
+
let /** @type {?} */ potentialCursorStack = [];
|
|
4134
4141
|
do {
|
|
4135
|
-
|
|
4142
|
+
// 1. query from root
|
|
4143
|
+
nextCursor = cursor ? driver.query(cursor, selector, false)[0] : null;
|
|
4144
|
+
// this is used to avoid the extra matchesElement call when we
|
|
4145
|
+
// know that the element does match based it on being queried
|
|
4146
|
+
let /** @type {?} */ justQueried = !!nextCursor;
|
|
4136
4147
|
if (!nextCursor) {
|
|
4137
|
-
|
|
4138
|
-
if (
|
|
4139
|
-
|
|
4140
|
-
|
|
4148
|
+
const /** @type {?} */ nextPotentialCursor = potentialCursorStack.pop();
|
|
4149
|
+
if (nextPotentialCursor) {
|
|
4150
|
+
// 1a)
|
|
4151
|
+
nextCursor = nextPotentialCursor;
|
|
4152
|
+
}
|
|
4153
|
+
else {
|
|
4154
|
+
cursor = cursor.parentElement;
|
|
4155
|
+
// 1b)
|
|
4156
|
+
if (!cursor)
|
|
4157
|
+
break;
|
|
4158
|
+
// 1c)
|
|
4159
|
+
nextCursor = cursor = cursor.nextElementSibling;
|
|
4160
|
+
continue;
|
|
4161
|
+
}
|
|
4141
4162
|
}
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4163
|
+
// 2. visit the next node
|
|
4164
|
+
while (nextCursor) {
|
|
4165
|
+
const /** @type {?} */ matches = justQueried || driver.matchesElement(nextCursor, selector);
|
|
4166
|
+
justQueried = false;
|
|
4167
|
+
const /** @type {?} */ nextPotentialCursor = nextCursor.nextElementSibling;
|
|
4168
|
+
// 2a)
|
|
4169
|
+
if (!matches) {
|
|
4170
|
+
potentialCursorStack.push(nextPotentialCursor);
|
|
4171
|
+
cursor = nextCursor;
|
|
4172
|
+
break;
|
|
4173
|
+
}
|
|
4174
|
+
// 2b)
|
|
4175
|
+
rootElements.push(nextCursor);
|
|
4176
|
+
nextCursor = nextPotentialCursor;
|
|
4177
|
+
if (nextCursor) {
|
|
4178
|
+
cursor = nextCursor;
|
|
4179
|
+
}
|
|
4180
|
+
else {
|
|
4181
|
+
cursor = cursor.parentElement;
|
|
4182
|
+
if (!cursor)
|
|
4183
|
+
break;
|
|
4184
|
+
nextCursor = cursor = cursor.nextElementSibling;
|
|
4155
4185
|
}
|
|
4156
4186
|
}
|
|
4157
4187
|
} while (nextCursor && nextCursor !== rootElement);
|