@angular/animations 4.4.3 → 4.4.7
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.es5.js.map +1 -1
- package/@angular/animations/browser/testing.js +1 -1
- package/@angular/animations/browser/testing.js.map +1 -1
- package/@angular/animations/browser.es5.js +159 -448
- package/@angular/animations/browser.es5.js.map +1 -1
- package/@angular/animations/browser.js +159 -397
- package/@angular/animations/browser.js.map +1 -1
- package/@angular/animations.es5.js +22 -2
- package/@angular/animations.es5.js.map +1 -1
- package/@angular/animations.js +22 -2
- package/@angular/animations.js.map +1 -1
- package/animations.metadata.json +1 -1
- package/browser/src/dsl/animation_ast.d.ts +31 -61
- package/browser/src/dsl/animation_ast.metadata.json +1 -0
- package/browser/src/dsl/animation_ast_builder.d.ts +3 -3
- package/browser/src/dsl/animation_dsl_visitor.d.ts +14 -15
- package/browser/src/dsl/animation_dsl_visitor.metadata.json +1 -0
- package/browser/src/dsl/animation_timeline_builder.d.ts +6 -6
- package/browser/src/util.d.ts +5 -1
- package/browser/src/util.metadata.json +1 -1
- 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.js.map +1 -1
- package/bundles/animations-browser-testing.umd.min.js +1 -1
- package/bundles/animations-browser-testing.umd.min.js.map +1 -1
- package/bundles/animations-browser.umd.js +160 -449
- package/bundles/animations-browser.umd.js.map +1 -1
- package/bundles/animations-browser.umd.min.js +10 -10
- package/bundles/animations-browser.umd.min.js.map +1 -1
- package/bundles/animations.umd.js +23 -3
- package/bundles/animations.umd.js.map +1 -1
- package/bundles/animations.umd.min.js +3 -3
- package/bundles/animations.umd.min.js.map +1 -1
- package/package.json +2 -2
- package/src/animation_metadata.d.ts +28 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v4.4.
|
|
2
|
+
* @license Angular v4.4.7
|
|
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.4.
|
|
39
|
+
* @license Angular v4.4.7
|
|
40
40
|
* (c) 2010-2017 Google, Inc. https://angular.io/
|
|
41
41
|
* License: MIT
|
|
42
42
|
*/
|
|
@@ -416,380 +416,34 @@ function dashCaseToCamelCase(input) {
|
|
|
416
416
|
function allowPreviousPlayerStylesMerge(duration, delay) {
|
|
417
417
|
return duration === 0 || delay === 0;
|
|
418
418
|
}
|
|
419
|
-
|
|
420
|
-
* @license
|
|
421
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
422
|
-
*
|
|
423
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
424
|
-
* found in the LICENSE file at https://angular.io/license
|
|
425
|
-
*/
|
|
426
|
-
var EMPTY_ANIMATION_OPTIONS = {};
|
|
427
|
-
/**
|
|
428
|
-
* @abstract
|
|
429
|
-
*/
|
|
430
|
-
var Ast = (function () {
|
|
431
|
-
function Ast() {
|
|
432
|
-
this.options = EMPTY_ANIMATION_OPTIONS;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* @abstract
|
|
436
|
-
* @param {?} ast
|
|
437
|
-
* @param {?} context
|
|
438
|
-
* @return {?}
|
|
439
|
-
*/
|
|
440
|
-
Ast.prototype.visit = function (ast, context) { };
|
|
441
|
-
Object.defineProperty(Ast.prototype, "params", {
|
|
442
|
-
/**
|
|
443
|
-
* @return {?}
|
|
444
|
-
*/
|
|
445
|
-
get: function () { return this.options['params'] || null; },
|
|
446
|
-
enumerable: true,
|
|
447
|
-
configurable: true
|
|
448
|
-
});
|
|
449
|
-
return Ast;
|
|
450
|
-
}());
|
|
451
|
-
var TriggerAst = (function (_super) {
|
|
452
|
-
__extends(TriggerAst, _super);
|
|
453
|
-
/**
|
|
454
|
-
* @param {?} name
|
|
455
|
-
* @param {?} states
|
|
456
|
-
* @param {?} transitions
|
|
457
|
-
*/
|
|
458
|
-
function TriggerAst(name, states, transitions) {
|
|
459
|
-
var _this = _super.call(this) || this;
|
|
460
|
-
_this.name = name;
|
|
461
|
-
_this.states = states;
|
|
462
|
-
_this.transitions = transitions;
|
|
463
|
-
_this.queryCount = 0;
|
|
464
|
-
_this.depCount = 0;
|
|
465
|
-
return _this;
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* @param {?} visitor
|
|
469
|
-
* @param {?} context
|
|
470
|
-
* @return {?}
|
|
471
|
-
*/
|
|
472
|
-
TriggerAst.prototype.visit = function (visitor, context) { return visitor.visitTrigger(this, context); };
|
|
473
|
-
return TriggerAst;
|
|
474
|
-
}(Ast));
|
|
475
|
-
var StateAst = (function (_super) {
|
|
476
|
-
__extends(StateAst, _super);
|
|
477
|
-
/**
|
|
478
|
-
* @param {?} name
|
|
479
|
-
* @param {?} style
|
|
480
|
-
*/
|
|
481
|
-
function StateAst(name, style$$1) {
|
|
482
|
-
var _this = _super.call(this) || this;
|
|
483
|
-
_this.name = name;
|
|
484
|
-
_this.style = style$$1;
|
|
485
|
-
return _this;
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* @param {?} visitor
|
|
489
|
-
* @param {?} context
|
|
490
|
-
* @return {?}
|
|
491
|
-
*/
|
|
492
|
-
StateAst.prototype.visit = function (visitor, context) { return visitor.visitState(this, context); };
|
|
493
|
-
return StateAst;
|
|
494
|
-
}(Ast));
|
|
495
|
-
var TransitionAst = (function (_super) {
|
|
496
|
-
__extends(TransitionAst, _super);
|
|
497
|
-
/**
|
|
498
|
-
* @param {?} matchers
|
|
499
|
-
* @param {?} animation
|
|
500
|
-
*/
|
|
501
|
-
function TransitionAst(matchers, animation) {
|
|
502
|
-
var _this = _super.call(this) || this;
|
|
503
|
-
_this.matchers = matchers;
|
|
504
|
-
_this.animation = animation;
|
|
505
|
-
_this.queryCount = 0;
|
|
506
|
-
_this.depCount = 0;
|
|
507
|
-
return _this;
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* @param {?} visitor
|
|
511
|
-
* @param {?} context
|
|
512
|
-
* @return {?}
|
|
513
|
-
*/
|
|
514
|
-
TransitionAst.prototype.visit = function (visitor, context) { return visitor.visitTransition(this, context); };
|
|
515
|
-
return TransitionAst;
|
|
516
|
-
}(Ast));
|
|
517
|
-
var SequenceAst = (function (_super) {
|
|
518
|
-
__extends(SequenceAst, _super);
|
|
519
|
-
/**
|
|
520
|
-
* @param {?} steps
|
|
521
|
-
*/
|
|
522
|
-
function SequenceAst(steps) {
|
|
523
|
-
var _this = _super.call(this) || this;
|
|
524
|
-
_this.steps = steps;
|
|
525
|
-
return _this;
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* @param {?} visitor
|
|
529
|
-
* @param {?} context
|
|
530
|
-
* @return {?}
|
|
531
|
-
*/
|
|
532
|
-
SequenceAst.prototype.visit = function (visitor, context) { return visitor.visitSequence(this, context); };
|
|
533
|
-
return SequenceAst;
|
|
534
|
-
}(Ast));
|
|
535
|
-
var GroupAst = (function (_super) {
|
|
536
|
-
__extends(GroupAst, _super);
|
|
537
|
-
/**
|
|
538
|
-
* @param {?} steps
|
|
539
|
-
*/
|
|
540
|
-
function GroupAst(steps) {
|
|
541
|
-
var _this = _super.call(this) || this;
|
|
542
|
-
_this.steps = steps;
|
|
543
|
-
return _this;
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* @param {?} visitor
|
|
547
|
-
* @param {?} context
|
|
548
|
-
* @return {?}
|
|
549
|
-
*/
|
|
550
|
-
GroupAst.prototype.visit = function (visitor, context) { return visitor.visitGroup(this, context); };
|
|
551
|
-
return GroupAst;
|
|
552
|
-
}(Ast));
|
|
553
|
-
var AnimateAst = (function (_super) {
|
|
554
|
-
__extends(AnimateAst, _super);
|
|
555
|
-
/**
|
|
556
|
-
* @param {?} timings
|
|
557
|
-
* @param {?} style
|
|
558
|
-
*/
|
|
559
|
-
function AnimateAst(timings, style$$1) {
|
|
560
|
-
var _this = _super.call(this) || this;
|
|
561
|
-
_this.timings = timings;
|
|
562
|
-
_this.style = style$$1;
|
|
563
|
-
return _this;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* @param {?} visitor
|
|
567
|
-
* @param {?} context
|
|
568
|
-
* @return {?}
|
|
569
|
-
*/
|
|
570
|
-
AnimateAst.prototype.visit = function (visitor, context) { return visitor.visitAnimate(this, context); };
|
|
571
|
-
return AnimateAst;
|
|
572
|
-
}(Ast));
|
|
573
|
-
var StyleAst = (function (_super) {
|
|
574
|
-
__extends(StyleAst, _super);
|
|
575
|
-
/**
|
|
576
|
-
* @param {?} styles
|
|
577
|
-
* @param {?} easing
|
|
578
|
-
* @param {?} offset
|
|
579
|
-
*/
|
|
580
|
-
function StyleAst(styles, easing, offset) {
|
|
581
|
-
var _this = _super.call(this) || this;
|
|
582
|
-
_this.styles = styles;
|
|
583
|
-
_this.easing = easing;
|
|
584
|
-
_this.offset = offset;
|
|
585
|
-
_this.isEmptyStep = false;
|
|
586
|
-
_this.containsDynamicStyles = false;
|
|
587
|
-
return _this;
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* @param {?} visitor
|
|
591
|
-
* @param {?} context
|
|
592
|
-
* @return {?}
|
|
593
|
-
*/
|
|
594
|
-
StyleAst.prototype.visit = function (visitor, context) { return visitor.visitStyle(this, context); };
|
|
595
|
-
return StyleAst;
|
|
596
|
-
}(Ast));
|
|
597
|
-
var KeyframesAst = (function (_super) {
|
|
598
|
-
__extends(KeyframesAst, _super);
|
|
599
|
-
/**
|
|
600
|
-
* @param {?} styles
|
|
601
|
-
*/
|
|
602
|
-
function KeyframesAst(styles) {
|
|
603
|
-
var _this = _super.call(this) || this;
|
|
604
|
-
_this.styles = styles;
|
|
605
|
-
return _this;
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* @param {?} visitor
|
|
609
|
-
* @param {?} context
|
|
610
|
-
* @return {?}
|
|
611
|
-
*/
|
|
612
|
-
KeyframesAst.prototype.visit = function (visitor, context) { return visitor.visitKeyframes(this, context); };
|
|
613
|
-
return KeyframesAst;
|
|
614
|
-
}(Ast));
|
|
615
|
-
var ReferenceAst = (function (_super) {
|
|
616
|
-
__extends(ReferenceAst, _super);
|
|
617
|
-
/**
|
|
618
|
-
* @param {?} animation
|
|
619
|
-
*/
|
|
620
|
-
function ReferenceAst(animation) {
|
|
621
|
-
var _this = _super.call(this) || this;
|
|
622
|
-
_this.animation = animation;
|
|
623
|
-
return _this;
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* @param {?} visitor
|
|
627
|
-
* @param {?} context
|
|
628
|
-
* @return {?}
|
|
629
|
-
*/
|
|
630
|
-
ReferenceAst.prototype.visit = function (visitor, context) { return visitor.visitReference(this, context); };
|
|
631
|
-
return ReferenceAst;
|
|
632
|
-
}(Ast));
|
|
633
|
-
var AnimateChildAst = (function (_super) {
|
|
634
|
-
__extends(AnimateChildAst, _super);
|
|
635
|
-
function AnimateChildAst() {
|
|
636
|
-
return _super.call(this) || this;
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* @param {?} visitor
|
|
640
|
-
* @param {?} context
|
|
641
|
-
* @return {?}
|
|
642
|
-
*/
|
|
643
|
-
AnimateChildAst.prototype.visit = function (visitor, context) { return visitor.visitAnimateChild(this, context); };
|
|
644
|
-
return AnimateChildAst;
|
|
645
|
-
}(Ast));
|
|
646
|
-
var AnimateRefAst = (function (_super) {
|
|
647
|
-
__extends(AnimateRefAst, _super);
|
|
648
|
-
/**
|
|
649
|
-
* @param {?} animation
|
|
650
|
-
*/
|
|
651
|
-
function AnimateRefAst(animation) {
|
|
652
|
-
var _this = _super.call(this) || this;
|
|
653
|
-
_this.animation = animation;
|
|
654
|
-
return _this;
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
* @param {?} visitor
|
|
658
|
-
* @param {?} context
|
|
659
|
-
* @return {?}
|
|
660
|
-
*/
|
|
661
|
-
AnimateRefAst.prototype.visit = function (visitor, context) { return visitor.visitAnimateRef(this, context); };
|
|
662
|
-
return AnimateRefAst;
|
|
663
|
-
}(Ast));
|
|
664
|
-
var QueryAst = (function (_super) {
|
|
665
|
-
__extends(QueryAst, _super);
|
|
666
|
-
/**
|
|
667
|
-
* @param {?} selector
|
|
668
|
-
* @param {?} limit
|
|
669
|
-
* @param {?} optional
|
|
670
|
-
* @param {?} includeSelf
|
|
671
|
-
* @param {?} animation
|
|
672
|
-
*/
|
|
673
|
-
function QueryAst(selector, limit, optional, includeSelf, animation) {
|
|
674
|
-
var _this = _super.call(this) || this;
|
|
675
|
-
_this.selector = selector;
|
|
676
|
-
_this.limit = limit;
|
|
677
|
-
_this.optional = optional;
|
|
678
|
-
_this.includeSelf = includeSelf;
|
|
679
|
-
_this.animation = animation;
|
|
680
|
-
return _this;
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* @param {?} visitor
|
|
684
|
-
* @param {?} context
|
|
685
|
-
* @return {?}
|
|
686
|
-
*/
|
|
687
|
-
QueryAst.prototype.visit = function (visitor, context) { return visitor.visitQuery(this, context); };
|
|
688
|
-
return QueryAst;
|
|
689
|
-
}(Ast));
|
|
690
|
-
var StaggerAst = (function (_super) {
|
|
691
|
-
__extends(StaggerAst, _super);
|
|
692
|
-
/**
|
|
693
|
-
* @param {?} timings
|
|
694
|
-
* @param {?} animation
|
|
695
|
-
*/
|
|
696
|
-
function StaggerAst(timings, animation) {
|
|
697
|
-
var _this = _super.call(this) || this;
|
|
698
|
-
_this.timings = timings;
|
|
699
|
-
_this.animation = animation;
|
|
700
|
-
return _this;
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
* @param {?} visitor
|
|
704
|
-
* @param {?} context
|
|
705
|
-
* @return {?}
|
|
706
|
-
*/
|
|
707
|
-
StaggerAst.prototype.visit = function (visitor, context) { return visitor.visitStagger(this, context); };
|
|
708
|
-
return StaggerAst;
|
|
709
|
-
}(Ast));
|
|
710
|
-
var TimingAst = (function (_super) {
|
|
711
|
-
__extends(TimingAst, _super);
|
|
712
|
-
/**
|
|
713
|
-
* @param {?} duration
|
|
714
|
-
* @param {?=} delay
|
|
715
|
-
* @param {?=} easing
|
|
716
|
-
*/
|
|
717
|
-
function TimingAst(duration, delay, easing) {
|
|
718
|
-
if (delay === void 0) { delay = 0; }
|
|
719
|
-
if (easing === void 0) { easing = null; }
|
|
720
|
-
var _this = _super.call(this) || this;
|
|
721
|
-
_this.duration = duration;
|
|
722
|
-
_this.delay = delay;
|
|
723
|
-
_this.easing = easing;
|
|
724
|
-
return _this;
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* @param {?} visitor
|
|
728
|
-
* @param {?} context
|
|
729
|
-
* @return {?}
|
|
730
|
-
*/
|
|
731
|
-
TimingAst.prototype.visit = function (visitor, context) { return visitor.visitTiming(this, context); };
|
|
732
|
-
return TimingAst;
|
|
733
|
-
}(Ast));
|
|
734
|
-
var DynamicTimingAst = (function (_super) {
|
|
735
|
-
__extends(DynamicTimingAst, _super);
|
|
736
|
-
/**
|
|
737
|
-
* @param {?} value
|
|
738
|
-
*/
|
|
739
|
-
function DynamicTimingAst(value) {
|
|
740
|
-
var _this = _super.call(this, 0, 0, '') || this;
|
|
741
|
-
_this.value = value;
|
|
742
|
-
return _this;
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* @param {?} visitor
|
|
746
|
-
* @param {?} context
|
|
747
|
-
* @return {?}
|
|
748
|
-
*/
|
|
749
|
-
DynamicTimingAst.prototype.visit = function (visitor, context) { return visitor.visitTiming(this, context); };
|
|
750
|
-
return DynamicTimingAst;
|
|
751
|
-
}(TimingAst));
|
|
752
|
-
/**
|
|
753
|
-
* @license
|
|
754
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
755
|
-
*
|
|
756
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
757
|
-
* found in the LICENSE file at https://angular.io/license
|
|
758
|
-
*/
|
|
759
|
-
/**
|
|
760
|
-
* @param {?} visitor
|
|
761
|
-
* @param {?} node
|
|
762
|
-
* @param {?} context
|
|
763
|
-
* @return {?}
|
|
764
|
-
*/
|
|
765
|
-
function visitAnimationNode(visitor, node, context) {
|
|
419
|
+
function visitDslNode(visitor, node, context) {
|
|
766
420
|
switch (node.type) {
|
|
767
421
|
case 7 /* Trigger */:
|
|
768
|
-
return visitor.visitTrigger(
|
|
422
|
+
return visitor.visitTrigger(node, context);
|
|
769
423
|
case 0 /* State */:
|
|
770
|
-
return visitor.visitState(
|
|
424
|
+
return visitor.visitState(node, context);
|
|
771
425
|
case 1 /* Transition */:
|
|
772
|
-
return visitor.visitTransition(
|
|
426
|
+
return visitor.visitTransition(node, context);
|
|
773
427
|
case 2 /* Sequence */:
|
|
774
|
-
return visitor.visitSequence(
|
|
428
|
+
return visitor.visitSequence(node, context);
|
|
775
429
|
case 3 /* Group */:
|
|
776
|
-
return visitor.visitGroup(
|
|
430
|
+
return visitor.visitGroup(node, context);
|
|
777
431
|
case 4 /* Animate */:
|
|
778
|
-
return visitor.visitAnimate(
|
|
432
|
+
return visitor.visitAnimate(node, context);
|
|
779
433
|
case 5 /* Keyframes */:
|
|
780
|
-
return visitor.visitKeyframes(
|
|
434
|
+
return visitor.visitKeyframes(node, context);
|
|
781
435
|
case 6 /* Style */:
|
|
782
|
-
return visitor.visitStyle(
|
|
436
|
+
return visitor.visitStyle(node, context);
|
|
783
437
|
case 8 /* Reference */:
|
|
784
|
-
return visitor.visitReference(
|
|
438
|
+
return visitor.visitReference(node, context);
|
|
785
439
|
case 9 /* AnimateChild */:
|
|
786
|
-
return visitor.visitAnimateChild(
|
|
440
|
+
return visitor.visitAnimateChild(node, context);
|
|
787
441
|
case 10 /* AnimateRef */:
|
|
788
|
-
return visitor.visitAnimateRef(
|
|
442
|
+
return visitor.visitAnimateRef(node, context);
|
|
789
443
|
case 11 /* Query */:
|
|
790
|
-
return visitor.visitQuery(
|
|
444
|
+
return visitor.visitQuery(node, context);
|
|
791
445
|
case 12 /* Stagger */:
|
|
792
|
-
return visitor.visitStagger(
|
|
446
|
+
return visitor.visitStagger(node, context);
|
|
793
447
|
default:
|
|
794
448
|
throw new Error("Unable to resolve animation metadata node #" + node.type);
|
|
795
449
|
}
|
|
@@ -859,20 +513,28 @@ function parseAnimationAlias(alias, errors) {
|
|
|
859
513
|
return '* => *';
|
|
860
514
|
}
|
|
861
515
|
}
|
|
516
|
+
var TRUE_BOOLEAN_VALUES = new Set();
|
|
517
|
+
TRUE_BOOLEAN_VALUES.add('true');
|
|
518
|
+
TRUE_BOOLEAN_VALUES.add('1');
|
|
519
|
+
var FALSE_BOOLEAN_VALUES = new Set();
|
|
520
|
+
FALSE_BOOLEAN_VALUES.add('false');
|
|
521
|
+
FALSE_BOOLEAN_VALUES.add('0');
|
|
862
522
|
/**
|
|
863
523
|
* @param {?} lhs
|
|
864
524
|
* @param {?} rhs
|
|
865
525
|
* @return {?}
|
|
866
526
|
*/
|
|
867
527
|
function makeLambdaFromStates(lhs, rhs) {
|
|
528
|
+
var /** @type {?} */ LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);
|
|
529
|
+
var /** @type {?} */ RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);
|
|
868
530
|
return function (fromState, toState) {
|
|
869
531
|
var /** @type {?} */ lhsMatch = lhs == ANY_STATE || lhs == fromState;
|
|
870
532
|
var /** @type {?} */ rhsMatch = rhs == ANY_STATE || rhs == toState;
|
|
871
|
-
if (!lhsMatch && typeof fromState === 'boolean') {
|
|
872
|
-
lhsMatch = fromState ? lhs
|
|
533
|
+
if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {
|
|
534
|
+
lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);
|
|
873
535
|
}
|
|
874
|
-
if (!rhsMatch && typeof toState === 'boolean') {
|
|
875
|
-
rhsMatch = toState ? rhs
|
|
536
|
+
if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {
|
|
537
|
+
rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);
|
|
876
538
|
}
|
|
877
539
|
return lhsMatch && rhsMatch;
|
|
878
540
|
};
|
|
@@ -910,7 +572,7 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
910
572
|
AnimationAstBuilderVisitor.prototype.build = function (metadata, errors) {
|
|
911
573
|
var /** @type {?} */ context = new AnimationAstBuilderContext(errors);
|
|
912
574
|
this._resetContextStyleTimingState(context);
|
|
913
|
-
return (
|
|
575
|
+
return (visitDslNode(this, normalizeAnimationEntry(metadata), context));
|
|
914
576
|
};
|
|
915
577
|
/**
|
|
916
578
|
* @param {?} context
|
|
@@ -954,11 +616,11 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
954
616
|
context.errors.push('only state() and transition() definitions can sit inside of a trigger()');
|
|
955
617
|
}
|
|
956
618
|
});
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
619
|
+
return {
|
|
620
|
+
type: 7 /* Trigger */,
|
|
621
|
+
name: metadata.name, states: states, transitions: transitions, queryCount: queryCount, depCount: depCount,
|
|
622
|
+
options: null
|
|
623
|
+
};
|
|
962
624
|
};
|
|
963
625
|
/**
|
|
964
626
|
* @param {?} metadata
|
|
@@ -988,11 +650,12 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
988
650
|
context.errors.push("state(\"" + metadata.name + "\", ...) must define default values for all the following style substitutions: " + missingSubsArr.join(', '));
|
|
989
651
|
}
|
|
990
652
|
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
653
|
+
return {
|
|
654
|
+
type: 0 /* State */,
|
|
655
|
+
name: metadata.name,
|
|
656
|
+
style: styleAst,
|
|
657
|
+
options: astParams ? { params: astParams } : null
|
|
658
|
+
};
|
|
996
659
|
};
|
|
997
660
|
/**
|
|
998
661
|
* @param {?} metadata
|
|
@@ -1002,13 +665,16 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1002
665
|
AnimationAstBuilderVisitor.prototype.visitTransition = function (metadata, context) {
|
|
1003
666
|
context.queryCount = 0;
|
|
1004
667
|
context.depCount = 0;
|
|
1005
|
-
var /** @type {?} */
|
|
668
|
+
var /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
|
|
1006
669
|
var /** @type {?} */ matchers = parseTransitionExpr(metadata.expr, context.errors);
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
670
|
+
return {
|
|
671
|
+
type: 1 /* Transition */,
|
|
672
|
+
matchers: matchers,
|
|
673
|
+
animation: animation,
|
|
674
|
+
queryCount: context.queryCount,
|
|
675
|
+
depCount: context.depCount,
|
|
676
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
677
|
+
};
|
|
1012
678
|
};
|
|
1013
679
|
/**
|
|
1014
680
|
* @param {?} metadata
|
|
@@ -1017,9 +683,11 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1017
683
|
*/
|
|
1018
684
|
AnimationAstBuilderVisitor.prototype.visitSequence = function (metadata, context) {
|
|
1019
685
|
var _this = this;
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
686
|
+
return {
|
|
687
|
+
type: 2 /* Sequence */,
|
|
688
|
+
steps: metadata.steps.map(function (s) { return visitDslNode(_this, s, context); }),
|
|
689
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
690
|
+
};
|
|
1023
691
|
};
|
|
1024
692
|
/**
|
|
1025
693
|
* @param {?} metadata
|
|
@@ -1032,14 +700,16 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1032
700
|
var /** @type {?} */ furthestTime = 0;
|
|
1033
701
|
var /** @type {?} */ steps = metadata.steps.map(function (step) {
|
|
1034
702
|
context.currentTime = currentTime;
|
|
1035
|
-
var /** @type {?} */ innerAst =
|
|
703
|
+
var /** @type {?} */ innerAst = visitDslNode(_this, step, context);
|
|
1036
704
|
furthestTime = Math.max(furthestTime, context.currentTime);
|
|
1037
705
|
return innerAst;
|
|
1038
706
|
});
|
|
1039
707
|
context.currentTime = furthestTime;
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
708
|
+
return {
|
|
709
|
+
type: 3 /* Group */,
|
|
710
|
+
steps: steps,
|
|
711
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
712
|
+
};
|
|
1043
713
|
};
|
|
1044
714
|
/**
|
|
1045
715
|
* @param {?} metadata
|
|
@@ -1049,10 +719,10 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1049
719
|
AnimationAstBuilderVisitor.prototype.visitAnimate = function (metadata, context) {
|
|
1050
720
|
var /** @type {?} */ timingAst = constructTimingAst(metadata.timings, context.errors);
|
|
1051
721
|
context.currentAnimateTimings = timingAst;
|
|
1052
|
-
var /** @type {?} */
|
|
722
|
+
var /** @type {?} */ styleAst;
|
|
1053
723
|
var /** @type {?} */ styleMetadata = metadata.styles ? metadata.styles : _angular_animations.style({});
|
|
1054
724
|
if (styleMetadata.type == 5 /* Keyframes */) {
|
|
1055
|
-
|
|
725
|
+
styleAst = this.visitKeyframes(/** @type {?} */ (styleMetadata), context);
|
|
1056
726
|
}
|
|
1057
727
|
else {
|
|
1058
728
|
var /** @type {?} */ styleMetadata_1 = (metadata.styles);
|
|
@@ -1066,12 +736,17 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1066
736
|
styleMetadata_1 = _angular_animations.style(newStyleData);
|
|
1067
737
|
}
|
|
1068
738
|
context.currentTime += timingAst.duration + timingAst.delay;
|
|
1069
|
-
var /** @type {?} */
|
|
1070
|
-
|
|
1071
|
-
|
|
739
|
+
var /** @type {?} */ _styleAst = this.visitStyle(styleMetadata_1, context);
|
|
740
|
+
_styleAst.isEmptyStep = isEmpty;
|
|
741
|
+
styleAst = _styleAst;
|
|
1072
742
|
}
|
|
1073
743
|
context.currentAnimateTimings = null;
|
|
1074
|
-
return
|
|
744
|
+
return {
|
|
745
|
+
type: 4 /* Animate */,
|
|
746
|
+
timings: timingAst,
|
|
747
|
+
style: styleAst,
|
|
748
|
+
options: null
|
|
749
|
+
};
|
|
1075
750
|
};
|
|
1076
751
|
/**
|
|
1077
752
|
* @param {?} metadata
|
|
@@ -1129,9 +804,13 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1129
804
|
}
|
|
1130
805
|
}
|
|
1131
806
|
});
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
807
|
+
return {
|
|
808
|
+
type: 6 /* Style */,
|
|
809
|
+
styles: styles,
|
|
810
|
+
easing: collectedEasing,
|
|
811
|
+
offset: metadata.offset, containsDynamicStyles: containsDynamicStyles,
|
|
812
|
+
options: null
|
|
813
|
+
};
|
|
1135
814
|
};
|
|
1136
815
|
/**
|
|
1137
816
|
* @param {?} ast
|
|
@@ -1179,9 +858,10 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1179
858
|
*/
|
|
1180
859
|
AnimationAstBuilderVisitor.prototype.visitKeyframes = function (metadata, context) {
|
|
1181
860
|
var _this = this;
|
|
861
|
+
var /** @type {?} */ ast = { type: 5 /* Keyframes */, styles: [], options: null };
|
|
1182
862
|
if (!context.currentAnimateTimings) {
|
|
1183
863
|
context.errors.push("keyframes() must be placed inside of a call to animate()");
|
|
1184
|
-
return
|
|
864
|
+
return ast;
|
|
1185
865
|
}
|
|
1186
866
|
var /** @type {?} */ MAX_KEYFRAME_OFFSET = 1;
|
|
1187
867
|
var /** @type {?} */ totalKeyframesWithOffsets = 0;
|
|
@@ -1228,8 +908,9 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1228
908
|
currentAnimateTimings.duration = durationUpToThisFrame;
|
|
1229
909
|
_this._validateStyleAst(kf, context);
|
|
1230
910
|
kf.offset = offset;
|
|
911
|
+
ast.styles.push(kf);
|
|
1231
912
|
});
|
|
1232
|
-
return
|
|
913
|
+
return ast;
|
|
1233
914
|
};
|
|
1234
915
|
/**
|
|
1235
916
|
* @param {?} metadata
|
|
@@ -1237,10 +918,11 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1237
918
|
* @return {?}
|
|
1238
919
|
*/
|
|
1239
920
|
AnimationAstBuilderVisitor.prototype.visitReference = function (metadata, context) {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
921
|
+
return {
|
|
922
|
+
type: 8 /* Reference */,
|
|
923
|
+
animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
|
|
924
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
925
|
+
};
|
|
1244
926
|
};
|
|
1245
927
|
/**
|
|
1246
928
|
* @param {?} metadata
|
|
@@ -1249,9 +931,10 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1249
931
|
*/
|
|
1250
932
|
AnimationAstBuilderVisitor.prototype.visitAnimateChild = function (metadata, context) {
|
|
1251
933
|
context.depCount++;
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
934
|
+
return {
|
|
935
|
+
type: 9 /* AnimateChild */,
|
|
936
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
937
|
+
};
|
|
1255
938
|
};
|
|
1256
939
|
/**
|
|
1257
940
|
* @param {?} metadata
|
|
@@ -1259,10 +942,11 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1259
942
|
* @return {?}
|
|
1260
943
|
*/
|
|
1261
944
|
AnimationAstBuilderVisitor.prototype.visitAnimateRef = function (metadata, context) {
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
945
|
+
return {
|
|
946
|
+
type: 10 /* AnimateRef */,
|
|
947
|
+
animation: this.visitReference(metadata.animation, context),
|
|
948
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
949
|
+
};
|
|
1266
950
|
};
|
|
1267
951
|
/**
|
|
1268
952
|
* @param {?} metadata
|
|
@@ -1278,13 +962,17 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1278
962
|
context.currentQuerySelector =
|
|
1279
963
|
parentSelector.length ? (parentSelector + ' ' + selector) : selector;
|
|
1280
964
|
getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});
|
|
1281
|
-
var /** @type {?} */
|
|
965
|
+
var /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
|
|
1282
966
|
context.currentQuery = null;
|
|
1283
967
|
context.currentQuerySelector = parentSelector;
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
968
|
+
return {
|
|
969
|
+
type: 11 /* Query */,
|
|
970
|
+
selector: selector,
|
|
971
|
+
limit: options.limit || 0,
|
|
972
|
+
optional: !!options.optional, includeSelf: includeSelf, animation: animation,
|
|
973
|
+
originalSelector: metadata.selector,
|
|
974
|
+
options: normalizeAnimationOptions(metadata.options)
|
|
975
|
+
};
|
|
1288
976
|
};
|
|
1289
977
|
/**
|
|
1290
978
|
* @param {?} metadata
|
|
@@ -1298,8 +986,11 @@ var AnimationAstBuilderVisitor = (function () {
|
|
|
1298
986
|
var /** @type {?} */ timings = metadata.timings === 'full' ?
|
|
1299
987
|
{ duration: 0, delay: 0, easing: 'full' } :
|
|
1300
988
|
resolveTiming(metadata.timings, context.errors, true);
|
|
1301
|
-
|
|
1302
|
-
|
|
989
|
+
return {
|
|
990
|
+
type: 12 /* Stagger */,
|
|
991
|
+
animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings: timings,
|
|
992
|
+
options: null
|
|
993
|
+
};
|
|
1303
994
|
};
|
|
1304
995
|
return AnimationAstBuilderVisitor;
|
|
1305
996
|
}());
|
|
@@ -1387,15 +1078,18 @@ function constructTimingAst(value, errors) {
|
|
|
1387
1078
|
}
|
|
1388
1079
|
else if (typeof value == 'number') {
|
|
1389
1080
|
var /** @type {?} */ duration = resolveTiming(/** @type {?} */ (value), errors).duration;
|
|
1390
|
-
return
|
|
1081
|
+
return makeTimingAst(/** @type {?} */ (duration), 0, '');
|
|
1391
1082
|
}
|
|
1392
1083
|
var /** @type {?} */ strValue = (value);
|
|
1393
1084
|
var /** @type {?} */ isDynamic = strValue.split(/\s+/).some(function (v) { return v.charAt(0) == '{' && v.charAt(1) == '{'; });
|
|
1394
1085
|
if (isDynamic) {
|
|
1395
|
-
|
|
1086
|
+
var /** @type {?} */ ast = (makeTimingAst(0, 0, ''));
|
|
1087
|
+
ast.dynamic = true;
|
|
1088
|
+
ast.strValue = strValue;
|
|
1089
|
+
return (ast);
|
|
1396
1090
|
}
|
|
1397
1091
|
timings = timings || resolveTiming(strValue, errors);
|
|
1398
|
-
return
|
|
1092
|
+
return makeTimingAst(timings.duration, timings.delay, timings.easing);
|
|
1399
1093
|
}
|
|
1400
1094
|
/**
|
|
1401
1095
|
* @param {?} options
|
|
@@ -1413,6 +1107,15 @@ function normalizeAnimationOptions(options) {
|
|
|
1413
1107
|
}
|
|
1414
1108
|
return options;
|
|
1415
1109
|
}
|
|
1110
|
+
/**
|
|
1111
|
+
* @param {?} duration
|
|
1112
|
+
* @param {?} delay
|
|
1113
|
+
* @param {?} easing
|
|
1114
|
+
* @return {?}
|
|
1115
|
+
*/
|
|
1116
|
+
function makeTimingAst(duration, delay, easing) {
|
|
1117
|
+
return { duration: duration, delay: delay, easing: easing };
|
|
1118
|
+
}
|
|
1416
1119
|
/**
|
|
1417
1120
|
* @license
|
|
1418
1121
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -1538,7 +1241,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1538
1241
|
var /** @type {?} */ context = new AnimationTimelineContext(driver, rootElement, subInstructions, errors, []);
|
|
1539
1242
|
context.options = options;
|
|
1540
1243
|
context.currentTimeline.setStyles([startingStyles], null, context.errors, options);
|
|
1541
|
-
|
|
1244
|
+
visitDslNode(this, ast, context);
|
|
1542
1245
|
// this checks to see if an actual animation happened
|
|
1543
1246
|
var /** @type {?} */ timelines = context.timelines.filter(function (timeline) { return timeline.containsAnimation(); });
|
|
1544
1247
|
if (timelines.length && Object.keys(finalStyles).length) {
|
|
@@ -1634,7 +1337,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1634
1337
|
*/
|
|
1635
1338
|
AnimationTimelineBuilderVisitor.prototype.visitReference = function (ast, context) {
|
|
1636
1339
|
context.updateOptions(ast.options, true);
|
|
1637
|
-
ast.animation
|
|
1340
|
+
visitDslNode(this, ast.animation, context);
|
|
1638
1341
|
context.previousNode = ast;
|
|
1639
1342
|
};
|
|
1640
1343
|
/**
|
|
@@ -1651,7 +1354,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1651
1354
|
ctx = context.createSubContext(options);
|
|
1652
1355
|
ctx.transformIntoNewTimeline();
|
|
1653
1356
|
if (options.delay != null) {
|
|
1654
|
-
if (ctx.previousNode
|
|
1357
|
+
if (ctx.previousNode.type == 6 /* Style */) {
|
|
1655
1358
|
ctx.currentTimeline.snapshotCurrentStyles();
|
|
1656
1359
|
ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
|
|
1657
1360
|
}
|
|
@@ -1660,7 +1363,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1660
1363
|
}
|
|
1661
1364
|
}
|
|
1662
1365
|
if (ast.steps.length) {
|
|
1663
|
-
ast.steps.forEach(function (s) { return
|
|
1366
|
+
ast.steps.forEach(function (s) { return visitDslNode(_this, s, ctx); });
|
|
1664
1367
|
// this is here just incase the inner steps only contain or end with a style() call
|
|
1665
1368
|
ctx.currentTimeline.applyStylesToKeyframe();
|
|
1666
1369
|
// this means that some animation function within the sequence
|
|
@@ -1687,7 +1390,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1687
1390
|
if (delay) {
|
|
1688
1391
|
innerContext.delayNextStep(delay);
|
|
1689
1392
|
}
|
|
1690
|
-
|
|
1393
|
+
visitDslNode(_this, s, innerContext);
|
|
1691
1394
|
furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);
|
|
1692
1395
|
innerTimelines.push(innerContext.currentTimeline);
|
|
1693
1396
|
});
|
|
@@ -1703,12 +1406,11 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1703
1406
|
* @param {?} context
|
|
1704
1407
|
* @return {?}
|
|
1705
1408
|
*/
|
|
1706
|
-
AnimationTimelineBuilderVisitor.prototype.
|
|
1707
|
-
if (ast
|
|
1708
|
-
var /** @type {?} */ strValue =
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
return resolveTiming(strValue, context.errors);
|
|
1409
|
+
AnimationTimelineBuilderVisitor.prototype._visitTiming = function (ast, context) {
|
|
1410
|
+
if (((ast)).dynamic) {
|
|
1411
|
+
var /** @type {?} */ strValue = ((ast)).strValue;
|
|
1412
|
+
var /** @type {?} */ timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;
|
|
1413
|
+
return resolveTiming(timingValue, context.errors);
|
|
1712
1414
|
}
|
|
1713
1415
|
else {
|
|
1714
1416
|
return { duration: ast.duration, delay: ast.delay, easing: ast.easing };
|
|
@@ -1720,14 +1422,14 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1720
1422
|
* @return {?}
|
|
1721
1423
|
*/
|
|
1722
1424
|
AnimationTimelineBuilderVisitor.prototype.visitAnimate = function (ast, context) {
|
|
1723
|
-
var /** @type {?} */ timings = context.currentAnimateTimings = this.
|
|
1425
|
+
var /** @type {?} */ timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);
|
|
1724
1426
|
var /** @type {?} */ timeline = context.currentTimeline;
|
|
1725
1427
|
if (timings.delay) {
|
|
1726
1428
|
context.incrementTime(timings.delay);
|
|
1727
1429
|
timeline.snapshotCurrentStyles();
|
|
1728
1430
|
}
|
|
1729
1431
|
var /** @type {?} */ style$$1 = ast.style;
|
|
1730
|
-
if (style$$1
|
|
1432
|
+
if (style$$1.type == 5 /* Keyframes */) {
|
|
1731
1433
|
this.visitKeyframes(style$$1, context);
|
|
1732
1434
|
}
|
|
1733
1435
|
else {
|
|
@@ -1798,7 +1500,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1798
1500
|
var /** @type {?} */ startTime = context.currentTimeline.currentTime;
|
|
1799
1501
|
var /** @type {?} */ options = ((ast.options || {}));
|
|
1800
1502
|
var /** @type {?} */ delay = options.delay ? resolveTimingValue(options.delay) : 0;
|
|
1801
|
-
if (delay && (context.previousNode
|
|
1503
|
+
if (delay && (context.previousNode.type === 6 /* Style */ ||
|
|
1802
1504
|
(startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
|
|
1803
1505
|
context.currentTimeline.snapshotCurrentStyles();
|
|
1804
1506
|
context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
|
|
@@ -1816,7 +1518,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1816
1518
|
if (element === context.element) {
|
|
1817
1519
|
sameElementTimeline = innerContext.currentTimeline;
|
|
1818
1520
|
}
|
|
1819
|
-
ast.animation
|
|
1521
|
+
visitDslNode(_this, ast.animation, innerContext);
|
|
1820
1522
|
// this is here just incase the inner steps only contain or end
|
|
1821
1523
|
// with a style() call (which is here to signal that this is a preparatory
|
|
1822
1524
|
// call to style an element before it is animated again)
|
|
@@ -1859,7 +1561,7 @@ var AnimationTimelineBuilderVisitor = (function () {
|
|
|
1859
1561
|
timeline.delayNextStep(delay);
|
|
1860
1562
|
}
|
|
1861
1563
|
var /** @type {?} */ startingTime = timeline.currentTime;
|
|
1862
|
-
ast.animation
|
|
1564
|
+
visitDslNode(this, ast.animation, context);
|
|
1863
1565
|
context.previousNode = ast;
|
|
1864
1566
|
// time = duration + delay
|
|
1865
1567
|
// the reason why this computation is so complex is because
|
|
@@ -1945,7 +1647,7 @@ var AnimationTimelineContext = (function () {
|
|
|
1945
1647
|
var /** @type {?} */ oldParams_1 = this.options.params;
|
|
1946
1648
|
if (oldParams_1) {
|
|
1947
1649
|
var /** @type {?} */ params_2 = options['params'] = {};
|
|
1948
|
-
Object.keys(
|
|
1650
|
+
Object.keys(oldParams_1).forEach(function (name) { params_2[name] = oldParams_1[name]; });
|
|
1949
1651
|
}
|
|
1950
1652
|
}
|
|
1951
1653
|
return options;
|
|
@@ -2029,7 +1731,11 @@ var AnimationTimelineContext = (function () {
|
|
|
2029
1731
|
}
|
|
2030
1732
|
if (selector.length > 0) {
|
|
2031
1733
|
var /** @type {?} */ multi = limit != 1;
|
|
2032
|
-
|
|
1734
|
+
var /** @type {?} */ elements = this._driver.query(this.element, selector, multi);
|
|
1735
|
+
if (limit !== 0) {
|
|
1736
|
+
elements = elements.slice(0, limit);
|
|
1737
|
+
}
|
|
1738
|
+
results.push.apply(results, elements);
|
|
2033
1739
|
}
|
|
2034
1740
|
if (!optional && results.length == 0) {
|
|
2035
1741
|
errors.push("`query(\"" + originalSelector + "\")` returned zero elements. (Use `query(\"" + originalSelector + "\", { optional: true })` if you wish to allow this.)");
|
|
@@ -2793,8 +2499,15 @@ var AnimationTrigger = (function () {
|
|
|
2793
2499
|
*/
|
|
2794
2500
|
function createFallbackTransition(triggerName, states) {
|
|
2795
2501
|
var /** @type {?} */ matchers = [function (fromState, toState) { return true; }];
|
|
2796
|
-
var /** @type {?} */ animation =
|
|
2797
|
-
var /** @type {?} */ transition =
|
|
2502
|
+
var /** @type {?} */ animation = { type: 2 /* Sequence */, steps: [], options: null };
|
|
2503
|
+
var /** @type {?} */ transition = {
|
|
2504
|
+
type: 1 /* Transition */,
|
|
2505
|
+
animation: animation,
|
|
2506
|
+
matchers: matchers,
|
|
2507
|
+
options: null,
|
|
2508
|
+
queryCount: 0,
|
|
2509
|
+
depCount: 0
|
|
2510
|
+
};
|
|
2798
2511
|
return new AnimationTransitionFactory(triggerName, transition, states);
|
|
2799
2512
|
}
|
|
2800
2513
|
/**
|
|
@@ -3859,7 +3572,7 @@ var TransitionAnimationEngine = (function () {
|
|
|
3859
3572
|
* @return {?}
|
|
3860
3573
|
*/
|
|
3861
3574
|
TransitionAnimationEngine.prototype.reportError = function (errors) {
|
|
3862
|
-
throw new Error("Unable to process animations due to the following failed trigger transitions\n " + errors.join(
|
|
3575
|
+
throw new Error("Unable to process animations due to the following failed trigger transitions\n " + errors.join('\n'));
|
|
3863
3576
|
};
|
|
3864
3577
|
/**
|
|
3865
3578
|
* @param {?} cleanupFns
|
|
@@ -4517,12 +4230,10 @@ function deleteOrUnsetInMap(map, key, value) {
|
|
|
4517
4230
|
* @return {?}
|
|
4518
4231
|
*/
|
|
4519
4232
|
function normalizeTriggerValue(value) {
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
return value != null ? value.toString() : null;
|
|
4525
|
-
}
|
|
4233
|
+
// we use `!= null` here because it's the most simple
|
|
4234
|
+
// way to test against a "falsy" value without mixing
|
|
4235
|
+
// in empty strings or a zero value. DO NOT OPTIMIZE.
|
|
4236
|
+
return value != null ? value : null;
|
|
4526
4237
|
}
|
|
4527
4238
|
/**
|
|
4528
4239
|
* @param {?} node
|