@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
package/@angular/animations.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
1
|
/**
|
|
8
2
|
* @license
|
|
9
3
|
* Copyright Google Inc. All Rights Reserved.
|
package/browser/testing.d.ts
CHANGED
package/browser.d.ts
CHANGED
|
@@ -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
|
*/
|
|
@@ -36,7 +36,7 @@ function __extends(d, b) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* @license Angular v4.2.
|
|
39
|
+
* @license Angular v4.2.4
|
|
40
40
|
* (c) 2010-2017 Google, Inc. https://angular.io/
|
|
41
41
|
* License: MIT
|
|
42
42
|
*/
|
|
@@ -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
|
*/
|
|
@@ -36,7 +36,7 @@ function __extends(d, b) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* @license Angular v4.2.
|
|
39
|
+
* @license Angular v4.2.4
|
|
40
40
|
* (c) 2010-2017 Google, Inc. https://angular.io/
|
|
41
41
|
* License: MIT
|
|
42
42
|
*/
|
|
@@ -485,12 +485,6 @@ function dashCaseToCamelCase(input) {
|
|
|
485
485
|
return m[1].toUpperCase();
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
|
-
/**
|
|
489
|
-
* @license
|
|
490
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
491
|
-
*
|
|
492
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
493
|
-
* found in the LICENSE file at https://angular.io/license
|
|
494
488
|
/**
|
|
495
489
|
* @license
|
|
496
490
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -3754,16 +3748,19 @@ var TransitionAnimationEngine = (function () {
|
|
|
3754
3748
|
// the :enter queries match the elements (since the timeline queries
|
|
3755
3749
|
// are fired during instruction building).
|
|
3756
3750
|
var /** @type {?} */ bodyNode = getBodyNode();
|
|
3757
|
-
var /** @type {?} */ allEnterNodes = this.collectedEnterElements
|
|
3758
|
-
|
|
3759
|
-
|
|
3751
|
+
var /** @type {?} */ allEnterNodes = this.collectedEnterElements.length ?
|
|
3752
|
+
collectEnterElements(this.driver, this.collectedEnterElements) :
|
|
3753
|
+
[];
|
|
3754
|
+
var /** @type {?} */ allLeaveNodes = [];
|
|
3755
|
+
var /** @type {?} */ leaveNodesWithoutAnimations = [];
|
|
3760
3756
|
for (var /** @type {?} */ i = 0; i < this.collectedLeaveElements.length; i++) {
|
|
3761
3757
|
var /** @type {?} */ element = this.collectedLeaveElements[i];
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3758
|
+
var /** @type {?} */ details = (element[REMOVAL_FLAG]);
|
|
3759
|
+
if (details && details.setForRemoval) {
|
|
3760
|
+
addClass(element, LEAVE_CLASSNAME);
|
|
3761
|
+
allLeaveNodes.push(element);
|
|
3762
|
+
if (!details.hasAnimation) {
|
|
3763
|
+
leaveNodesWithoutAnimations.push(element);
|
|
3767
3764
|
}
|
|
3768
3765
|
}
|
|
3769
3766
|
}
|
|
@@ -3817,6 +3814,15 @@ var TransitionAnimationEngine = (function () {
|
|
|
3817
3814
|
});
|
|
3818
3815
|
});
|
|
3819
3816
|
}
|
|
3817
|
+
// these can only be detected here since we have a map of all the elements
|
|
3818
|
+
// that have animations attached to them...
|
|
3819
|
+
var /** @type {?} */ enterNodesWithoutAnimations = [];
|
|
3820
|
+
for (var /** @type {?} */ i = 0; i < allEnterNodes.length; i++) {
|
|
3821
|
+
var /** @type {?} */ element = allEnterNodes[i];
|
|
3822
|
+
if (!subTimelines.has(element)) {
|
|
3823
|
+
enterNodesWithoutAnimations.push(element);
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3820
3826
|
var /** @type {?} */ allPreviousPlayersMap = new Map();
|
|
3821
3827
|
var /** @type {?} */ sortedParentElements = [];
|
|
3822
3828
|
queuedInstructions.forEach(function (entry) {
|
|
@@ -3834,10 +3840,10 @@ var TransitionAnimationEngine = (function () {
|
|
|
3834
3840
|
allPreviousPlayersMap.forEach(function (players) { return players.forEach(function (player) { return player.destroy(); }); });
|
|
3835
3841
|
// PRE STAGE: fill the ! styles
|
|
3836
3842
|
var /** @type {?} */ preStylesMap = allPreStyleElements.size ?
|
|
3837
|
-
cloakAndComputeStyles(this.driver,
|
|
3843
|
+
cloakAndComputeStyles(this.driver, enterNodesWithoutAnimations, allPreStyleElements, _angular_animations.ɵPRE_STYLE) :
|
|
3838
3844
|
new Map();
|
|
3839
3845
|
// POST STAGE: fill the * styles
|
|
3840
|
-
var /** @type {?} */ postStylesMap = cloakAndComputeStyles(this.driver,
|
|
3846
|
+
var /** @type {?} */ postStylesMap = cloakAndComputeStyles(this.driver, leaveNodesWithoutAnimations, allPostStyleElements, _angular_animations.AUTO_STYLE);
|
|
3841
3847
|
var /** @type {?} */ rootPlayers = [];
|
|
3842
3848
|
var /** @type {?} */ subPlayers = [];
|
|
3843
3849
|
queuedInstructions.forEach(function (entry) {
|
|
@@ -3895,8 +3901,8 @@ var TransitionAnimationEngine = (function () {
|
|
|
3895
3901
|
// run through all of the queued removals and see if they
|
|
3896
3902
|
// were picked up by a query. If not then perform the removal
|
|
3897
3903
|
// operation right away unless a parent animation is ongoing.
|
|
3898
|
-
for (var /** @type {?} */ i = 0; i <
|
|
3899
|
-
var /** @type {?} */ element =
|
|
3904
|
+
for (var /** @type {?} */ i = 0; i < allLeaveNodes.length; i++) {
|
|
3905
|
+
var /** @type {?} */ element = allLeaveNodes[i];
|
|
3900
3906
|
var /** @type {?} */ players = queriedElements.get(element);
|
|
3901
3907
|
if (players) {
|
|
3902
3908
|
removeNodesAfterAnimationDone(this, element, players);
|
|
@@ -3917,7 +3923,7 @@ var TransitionAnimationEngine = (function () {
|
|
|
3917
3923
|
});
|
|
3918
3924
|
player.play();
|
|
3919
3925
|
});
|
|
3920
|
-
|
|
3926
|
+
allEnterNodes.forEach(function (element) { return removeClass(element, ENTER_CLASSNAME); });
|
|
3921
3927
|
return rootPlayers;
|
|
3922
3928
|
};
|
|
3923
3929
|
/**
|
|
@@ -4289,7 +4295,7 @@ function normalizeTriggerValue(value) {
|
|
|
4289
4295
|
case 'boolean':
|
|
4290
4296
|
return value ? '1' : '0';
|
|
4291
4297
|
default:
|
|
4292
|
-
return value ? value.toString() : null;
|
|
4298
|
+
return value != null ? value.toString() : null;
|
|
4293
4299
|
}
|
|
4294
4300
|
}
|
|
4295
4301
|
/**
|
|
@@ -4328,27 +4334,51 @@ function filterNodeClasses(driver, rootElement, selector) {
|
|
|
4328
4334
|
return rootElements;
|
|
4329
4335
|
var /** @type {?} */ cursor = rootElement;
|
|
4330
4336
|
var /** @type {?} */ nextCursor = {};
|
|
4337
|
+
var /** @type {?} */ potentialCursorStack = [];
|
|
4331
4338
|
do {
|
|
4332
|
-
|
|
4339
|
+
// 1. query from root
|
|
4340
|
+
nextCursor = cursor ? driver.query(cursor, selector, false)[0] : null;
|
|
4341
|
+
// this is used to avoid the extra matchesElement call when we
|
|
4342
|
+
// know that the element does match based it on being queried
|
|
4343
|
+
var /** @type {?} */ justQueried = !!nextCursor;
|
|
4333
4344
|
if (!nextCursor) {
|
|
4334
|
-
|
|
4335
|
-
if (
|
|
4336
|
-
|
|
4337
|
-
|
|
4345
|
+
var /** @type {?} */ nextPotentialCursor = potentialCursorStack.pop();
|
|
4346
|
+
if (nextPotentialCursor) {
|
|
4347
|
+
// 1a)
|
|
4348
|
+
nextCursor = nextPotentialCursor;
|
|
4349
|
+
}
|
|
4350
|
+
else {
|
|
4351
|
+
cursor = cursor.parentElement;
|
|
4352
|
+
// 1b)
|
|
4353
|
+
if (!cursor)
|
|
4354
|
+
break;
|
|
4355
|
+
// 1c)
|
|
4356
|
+
nextCursor = cursor = cursor.nextElementSibling;
|
|
4357
|
+
continue;
|
|
4358
|
+
}
|
|
4338
4359
|
}
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4360
|
+
// 2. visit the next node
|
|
4361
|
+
while (nextCursor) {
|
|
4362
|
+
var /** @type {?} */ matches = justQueried || driver.matchesElement(nextCursor, selector);
|
|
4363
|
+
justQueried = false;
|
|
4364
|
+
var /** @type {?} */ nextPotentialCursor = nextCursor.nextElementSibling;
|
|
4365
|
+
// 2a)
|
|
4366
|
+
if (!matches) {
|
|
4367
|
+
potentialCursorStack.push(nextPotentialCursor);
|
|
4368
|
+
cursor = nextCursor;
|
|
4369
|
+
break;
|
|
4370
|
+
}
|
|
4371
|
+
// 2b)
|
|
4372
|
+
rootElements.push(nextCursor);
|
|
4373
|
+
nextCursor = nextPotentialCursor;
|
|
4374
|
+
if (nextCursor) {
|
|
4375
|
+
cursor = nextCursor;
|
|
4376
|
+
}
|
|
4377
|
+
else {
|
|
4378
|
+
cursor = cursor.parentElement;
|
|
4379
|
+
if (!cursor)
|
|
4380
|
+
break;
|
|
4381
|
+
nextCursor = cursor = cursor.nextElementSibling;
|
|
4352
4382
|
}
|
|
4353
4383
|
}
|
|
4354
4384
|
} while (nextCursor && nextCursor !== rootElement);
|