From eb28c3b137c8a0d61377087c9a04b820151b0b7c Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 30 Apr 2015 18:30:11 +0200 Subject: update deps --- js/vendor/angular-animate/.bower.json | 10 +- js/vendor/angular-animate/angular-animate.js | 369 +++++++++--- js/vendor/angular-animate/angular-animate.min.js | 88 +-- .../angular-animate/angular-animate.min.js.map | 4 +- js/vendor/angular-animate/bower.json | 4 +- js/vendor/angular-animate/package.json | 2 +- js/vendor/angular-mocks/.bower.json | 10 +- js/vendor/angular-mocks/angular-mocks.js | 2 +- js/vendor/angular-mocks/bower.json | 4 +- js/vendor/angular-mocks/package.json | 2 +- js/vendor/angular-route/.bower.json | 10 +- js/vendor/angular-route/angular-route.js | 2 +- js/vendor/angular-route/angular-route.min.js | 2 +- js/vendor/angular-route/bower.json | 4 +- js/vendor/angular-route/package.json | 2 +- js/vendor/angular-sanitize/.bower.json | 10 +- js/vendor/angular-sanitize/angular-sanitize.js | 2 +- js/vendor/angular-sanitize/angular-sanitize.min.js | 2 +- js/vendor/angular-sanitize/bower.json | 4 +- js/vendor/angular-sanitize/package.json | 2 +- js/vendor/angular/.bower.json | 8 +- js/vendor/angular/angular.js | 630 ++++++++++++++------- js/vendor/angular/angular.min.js | 537 +++++++++--------- js/vendor/angular/angular.min.js.gzip | Bin 50718 -> 50995 bytes js/vendor/angular/angular.min.js.map | 6 +- js/vendor/angular/bower.json | 2 +- js/vendor/angular/package.json | 2 +- js/vendor/es6-shim/.bower.json | 8 +- js/vendor/es6-shim/CHANGELOG.md | 17 + js/vendor/es6-shim/bower.json | 2 +- js/vendor/es6-shim/component.json | 2 +- js/vendor/es6-shim/es6-sham.js | 20 +- js/vendor/es6-shim/es6-sham.map | 2 +- js/vendor/es6-shim/es6-sham.min.js | 2 +- js/vendor/es6-shim/es6-shim.js | 500 ++++++++-------- js/vendor/es6-shim/es6-shim.map | 2 +- js/vendor/es6-shim/es6-shim.min.js | 5 +- js/vendor/es6-shim/package.json | 6 +- js/vendor/jquery/.bower.json | 9 +- js/vendor/jquery/bower.json | 3 +- js/vendor/jquery/dist/jquery.js | 13 +- js/vendor/jquery/dist/jquery.min.js | 8 +- js/vendor/jquery/dist/jquery.min.map | 2 +- js/vendor/jquery/src/core.js | 7 +- 44 files changed, 1413 insertions(+), 915 deletions(-) (limited to 'js') diff --git a/js/vendor/angular-animate/.bower.json b/js/vendor/angular-animate/.bower.json index 0f44e04c4..dc1346b69 100644 --- a/js/vendor/angular-animate/.bower.json +++ b/js/vendor/angular-animate/.bower.json @@ -1,17 +1,17 @@ { "name": "angular-animate", - "version": "1.4.0-rc.0", + "version": "1.4.0-rc.1", "main": "./angular-animate.js", "ignore": [], "dependencies": { - "angular": "1.4.0-rc.0" + "angular": "1.4.0-rc.1" }, "homepage": "https://github.com/angular/bower-angular-animate", - "_release": "1.4.0-rc.0", + "_release": "1.4.0-rc.1", "_resolution": { "type": "version", - "tag": "v1.4.0-rc.0", - "commit": "a75c362178f4aac89b1daf1d8e9711f47ffa96da" + "tag": "v1.4.0-rc.1", + "commit": "872a7357132b252b0856edeea082d6e57d516ea7" }, "_source": "git://github.com/angular/bower-angular-animate.git", "_target": "~1.4.*", diff --git a/js/vendor/angular-animate/angular-animate.js b/js/vendor/angular-animate/angular-animate.js index c6e8fb592..66fc23934 100644 --- a/js/vendor/angular-animate/angular-animate.js +++ b/js/vendor/angular-animate/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.4.0-rc.0 + * @license AngularJS v1.4.0-rc.1 * (c) 2010-2015 Google, Inc. http://angularjs.org * License: MIT */ @@ -27,6 +27,13 @@ var isPromiseLike = function(p) { return p && p.then ? true : false; } +function assertArg(arg, name, reason) { + if (!arg) { + throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); + } + return arg; +} + function mergeClasses(a,b) { if (!a && !b) return ''; if (!a) return b; @@ -115,7 +122,6 @@ function applyAnimationClassesFactory($$jqLite) { } if (options.removeClass) { $$removeClass($$jqLite, element, options.removeClass); - element.removeClass(options.removeClass); options.removeClass = null; } } @@ -417,19 +423,7 @@ var $$AnimateChildrenDirective = [function() { * start: Function, * * // ends (aborts) the animation - * end: Function, - * - * // the total number of seconds that the animation will run for - * duration: Number, - * - * // the total number of seconds that the animation will delay for before starting - * delay: Number, - * - * // whether or not transitions were detected and will therefore be used for the animation - * transitions: Boolean, - * - * // whether or not keyframe animations were detected and will therefore be used for the animation - * keyframes: Boolean + * end: Function * } * ``` * @@ -481,6 +475,7 @@ var $$AnimateChildrenDirective = [function() { * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.}) * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`) + * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occuring on the classes being added and removed.) * * @return {null|object} an object with a start method and details about the animation. If no animation is detected then a value of `null` will be returned. * @@ -753,9 +748,12 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND //WILL TAKE YEARS AWAY FROM YOUR LIFE. var width = bod.offsetWidth + 1; - forEach(rafWaitQueue, function(cb) { - cb(width); - }); + + // we use a for loop to ensure that if the queue is changed + // during this looping then it will consider new requests + for (var i = 0; i < rafWaitQueue.length; i++) { + rafWaitQueue[i](width); + } rafWaitQueue.length = 0; }); } @@ -823,6 +821,17 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { addRemoveClassName += pendClasses(options.removeClass, '-remove'); } + // there may be a situation where a structural animation is combined together + // with CSS classes that need to resolve before the animation is computed. + // However this means that there is no explicit CSS code to block the animation + // from happening (by setting 0s none in the class name). If this is the case + // we need to apply the classes before the first rAF so we know to continue if + // there actually is a detected transition or keyframe animation + if (options.applyClassesEarly && addRemoveClassName.length) { + applyAnimationClasses(element, options); + addRemoveClassName = ''; + } + var setupClasses = [structuralClassName, addRemoveClassName].join(' ').trim(); var fullClassName = classes + ' ' + setupClasses; var activeClasses = pendClasses(setupClasses, '-active'); @@ -904,10 +913,10 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { flags.applyTransitionDuration = hasToStyles && ( (flags.hasTransitions && !flags.hasTransitionAll) || (flags.hasAnimations && !flags.hasTransitions)); - flags.applyAnimationDuration = options.duration && flags.hasAnimations; - flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions); - flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations; - flags.recalculateTimingStyles = addRemoveClassName.length > 0; + flags.applyAnimationDuration = options.duration && flags.hasAnimations; + flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions); + flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations; + flags.recalculateTimingStyles = addRemoveClassName.length > 0; if (flags.applyTransitionDuration || flags.applyAnimationDuration) { maxDuration = options.duration ? parseFloat(options.duration) : maxDuration; @@ -926,42 +935,6 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { } } - flags.transitionClassBlock = timings.transitionProperty === 'none' && - timings.transitionDuration === 0; - - // there may be a situation where a structural animation is combined together - // with CSS classes that need to resolve before the animation is computed. - // However this means that there is no explicit CSS code to block the animation - // from happening (by setting 0s none in the class name). If this is the case - // we need to apply the classes before the first rAF so we know to continue if - // there actually is a detected transition or keyframe animation - var applyClassesEarly = maxDuration === 0 - && isStructural - && addRemoveClassName.length > 0 - && !flags.transitionClassBlock; - - // this is an early check to avoid having to do another call to getComputedStyle - // call which is expensive. GCS calls are cached to speed things up. - if (!applyClassesEarly && maxDuration === 0 && !flags.recalculateTimingStyles) { - close(); - return false; - } - - if (applyClassesEarly) { - applyAnimationClasses(element, options); - - // no need to calculate this anymore - flags.recalculateTimingStyles = false; - - fullClassName = node.className + ' ' + setupClasses; - cacheKey = gcsHashFn(node, fullClassName); - - timings = computeTimings(node, fullClassName, cacheKey); - relativeDelay = timings.maxDelay; - maxDelay = Math.max(relativeDelay, 0); - maxDuration = timings.maxDuration; - } - if (maxDuration === 0 && !flags.recalculateTimingStyles) { close(); return false; @@ -983,9 +956,8 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { stagger.animationDuration === 0; } - if (flags.blockTransition) { - applyAnimationFromStyles(element, options); - } else { + applyAnimationFromStyles(element, options); + if (!flags.blockTransition) { blockTransitions(node, false); } @@ -1300,27 +1272,39 @@ var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationPro rootBodyElement.append(clone); - var animatorOut = prepareOutAnimation(); + var animatorIn, animatorOut = prepareOutAnimation(); + + // the user may not end up using the `out` animation and + // only making use of the `in` animation or vice-versa. + // In either case we should allow this and not assume the + // animation is over unless both animations are not used. if (!animatorOut) { - return end(); + animatorIn = prepareInAnimation(); + if (!animatorIn) { + return end(); + } } + var startingAnimator = animatorOut || animatorIn; + return { start: function() { var runner; - var currentAnimation = animatorOut.start(); + var currentAnimation = startingAnimator.start(); currentAnimation.done(function() { currentAnimation = null; - var animatorIn = prepareInAnimation(); - if (animatorIn) { - currentAnimation = animatorIn.start(); - currentAnimation.done(function() { - currentAnimation = null; - end(); - runner.complete(); - }); - return currentAnimation; + if (!animatorIn) { + animatorIn = prepareInAnimation(); + if (animatorIn) { + currentAnimation = animatorIn.start(); + currentAnimation.done(function() { + currentAnimation = null; + end(); + runner.complete(); + }); + return currentAnimation; + } } // in the event that there is no `in` animation end(); @@ -1446,8 +1430,13 @@ var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationPro function prepareRegularAnimation(animationDetails) { var element = animationDetails.element; var options = animationDetails.options || {}; + options.structural = animationDetails.structural; + // structural animations ensure that the CSS classes are always applied + // before the detection starts. + options.applyClassesEarly = options.structural; + // we special case the leave animation since we want to ensure that // the element is removed as soon as the animation is over. Otherwise // a flicker might appear or the element may not be removed at all @@ -1771,6 +1760,7 @@ var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProv }]; var NG_ANIMATE_ATTR_NAME = 'data-ng-animate'; +var NG_ANIMATE_PIN_DATA = '$ngAnimatePin'; var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { var PRE_DIGEST_STATE = 1; var RUNNING_STATE = 2; @@ -1937,6 +1927,12 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { } }, + pin: function(element, parentElement) { + assertArg(isElement(element), 'element', 'not an element'); + assertArg(isElement(parentElement), 'parentElement', 'not an element'); + element.data(NG_ANIMATE_PIN_DATA, parentElement); + }, + push: function(element, event, options, domOperation) { options = options || {}; options.domOperation = domOperation; @@ -2020,7 +2016,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { var className = [node.className, options.addClass, options.removeClass].join(' '); if (!isAnimatableClassName(className)) { - runner.end(); + close(); return runner; } @@ -2151,6 +2147,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { // it, otherwise if it's the same then the end result will be the same too if (animationCancelled || (isStructural && animationDetails.event !== event)) { options.domOperation(); + runner.end(); } return; @@ -2245,7 +2242,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { // animations to properly function (otherwise any CSS selectors may not work) function examineParentAnimation(node, animationDetails) { // enter/leave/move always have priority - if (animationDetails.structural) return; + if (animationDetails.structural || !hasAnimationClasses(animationDetails.options)) return; if (animationDetails.state === RUNNING_STATE) { animationDetails.runner.end(); @@ -2260,7 +2257,18 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { var parentAnimationDetected = false; var animateChildren; + var parentHost = element.data(NG_ANIMATE_PIN_DATA); + if (parentHost) { + parent = parentHost; + } + while (parent && parent.length) { + if (!rootElementDetected) { + // angular doesn't want to attempt to animate elements outside of the application + // therefore we need to ensure that the rootElement is an ancestor of the current element + rootElementDetected = isMatchingElement(parent, $rootElement); + } + var parentNode = parent[0]; if (parentNode.nodeType !== ELEMENT_NODE) { // no point in inspecting the #document element @@ -2289,6 +2297,12 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { // angular doesn't want to attempt to animate elements outside of the application // therefore we need to ensure that the rootElement is an ancestor of the current element rootElementDetected = isMatchingElement(parent, $rootElement); + if (!rootElementDetected) { + parentHost = parent.data(NG_ANIMATE_PIN_DATA); + if (parentHost) { + parent = parentHost; + } + } } if (!bodyElementDetected) { @@ -3149,6 +3163,207 @@ var $$AnimationProvider = ['$animateProvider', function($animateProvider) { * * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}. * + * ## Animation Anchoring (via `ng-animate-ref`) + * + * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between + * structural areas of an application (like views) by pairing up elements using an attribute + * called `ng-animate-ref`. + * + * Let's say for example we have two views that are managed by `ng-view` and we want to show + * that there is a relationship between two components situated in different views. By using the + * `ng-animate-ref` attribute we can identify that the two components are paired together and we + * can then attach an animation, which is triggered when the view changes. + * + * ```html + * + *
+ *
+ * + * + * + * + * + * + * + * + * ``` + * + * Now, when the view changes (once the link is clicked), ngAnimate will examine the + * HTML contents to see if there is a match reference between any components in the view + * that is leaving and the view that is entering. It will then attempt to trigger a CSS + * animation on the `.view-animation-anchor` CSS class (notice how `.view-animation` is + * a shared CSS class on the ng-view element? This means that view-animation will apply to + * both the enter and leave animations). + * + * The two images match since they share the same ref value. ngAnimate will now apply a + * suffixed version of each of the shared CSS classes with `-anchor`. Therefore we will + * have a shared class of `view-animation-anchor` which we can use to setup our transition animation. + * + * We can now attach a transition onto the `.view-animation-anchor` CSS class and then + * ngAnimate will handle the entire transition for us as well as the addition and removal of + * any changes of CSS classes between the elements: + * + * ```css + * .view-animation-anchor { + * /* this animation will last for 1 second since there are + * two phases to the animation (an `in` and an `out` phase) */ + * transition:0.5s linear all; + * } + * ``` + * + * There are two stages for an anchor animation: `out` and `in`. The `out` stage happens first and that + * is when the element is animated away from its origin. Once that animation is over then the `in` stage + * occurs which animates the element to its destination. The reason why there are two animations is to + * give enough time for the enter animation on the new element to be ready. + * + * The example above sets up a transition for both the in and out phases, but we can also target the out or + * in phases directly via `ng-anchor-out` and `ng-anchor-in`. + * + * ```css + * .view-animation-anchor.ng-anchor-out { + * transition: 0.5s linear all; + * + * /* the scale will be applied during the out animation, + * but will be animated away when the in animation runs */ + * transform: scale(1.2); + * } + * + * .view-animation-anchor.ng-anchor-in { + * transition: 1s linear all; + * } + * ``` + * + * + * + * + * ### Anchoring Demo + * + + + Home +
+
+
+
+
+ + angular.module('anchoringExample', ['ngAnimate', 'ngRoute']) + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/', { + templateUrl: 'home.html', + controller: 'HomeController as home' + }); + $routeProvider.when('/profile/:id', { + templateUrl: 'profile.html', + controller: 'ProfileController as profile' + }); + }]) + .run(['$rootScope', function($rootScope) { + $rootScope.records = [ + { id:1, title: "Miss Beulah Roob" }, + { id:2, title: "Trent Morissette" }, + { id:3, title: "Miss Ava Pouros" }, + { id:4, title: "Rod Pouros" }, + { id:5, title: "Abdul Rice" }, + { id:6, title: "Laurie Rutherford Sr." }, + { id:7, title: "Nakia McLaughlin" }, + { id:8, title: "Jordon Blanda DVM" }, + { id:9, title: "Rhoda Hand" }, + { id:10, title: "Alexandrea Sauer" } + ]; + }]) + .controller('HomeController', [function() { + //empty + }]) + .controller('ProfileController', ['$rootScope', '$routeParams', function($rootScope, $routeParams) { + var index = parseInt($routeParams.id, 10); + var record = $rootScope.records[index - 1]; + + this.title = record.title; + this.id = record.id; + }]); + + +

Welcome to the home page

+

Please click on an element

+ + {{ record.title }} + +
+ +
+ {{ profile.title }} +
+
+ + .record { + display:block; + font-size:20px; + } + .profile { + background:black; + color:white; + font-size:100px; + } + .view-container { + position:relative; + } + .view-container > .view.ng-animate { + position:absolute; + top:0; + left:0; + width:100%; + min-height:500px; + } + .view.ng-enter { + transition:0.5s linear all; + transform:translateX(100%); + } + .view.ng-enter.ng-enter-active { + transform:translateX(0%); + } + .view.ng-leave { + transition:0.5s linear all; + } + .view.ng-leave.ng-leave-active { + transform:translateX(-100%); + } + .view-anchor { + transition:0.5s linear all; + } + +
+ * + * ### How is the element transported? + * + * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting + * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element + * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The + * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match + * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied + * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class + * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element + * will become visible since the shim class will be removed. + * + * ### How is the morphing handled? + * + * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out + * what CSS classes differ between the starting element and the destination element. These different CSS classes + * will be added/removed on the anchor element and a transition will be applied (the transition that is provided + * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will + * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that + * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since + * the cloned element is placed inside of root element which is likely close to the body element). + * + * Note that if the root element is on the `` element then the cloned node will be placed inside of body. + * * * ## Using $animate in your directive code * @@ -3224,12 +3439,12 @@ var $$AnimationProvider = ['$animateProvider', function($animateProvider) { * anymore.) * * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering - * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our `ng-view` element and we wanted our + * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view * routing controller to hook into that: * * ```js * ngModule.controller('HomePageController', ['$animate', function($animate) { - * $animate.on('enter', '[ng-view]', function(element) { + * $animate.on('enter', ngViewElement, function(element) { * // the animation for this route has completed * }]); * }]) diff --git a/js/vendor/angular-animate/angular-animate.min.js b/js/vendor/angular-animate/angular-animate.min.js index 0a615089e..878798ed0 100644 --- a/js/vendor/angular-animate/angular-animate.min.js +++ b/js/vendor/angular-animate/angular-animate.min.js @@ -1,49 +1,49 @@ /* - AngularJS v1.4.0-rc.0 + AngularJS v1.4.0-rc.1 (c) 2010-2015 Google, Inc. http://angularjs.org License: MIT */ -(function(H,s,$){'use strict';function sa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;aa(a)&&(a=a.join(" "));aa(b)&&(b=b.join(" "));return a+" "+b}function Aa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function ca(a,b,c){var d="";a=aa(a)?a:a&&T(a)&&a.length?a.split(/\s+/):[];p(a,function(a,t){a&&0=L&&b>=A&&(x=!0,l())}if(!K){var k,q=[],h=function(a){if(x)C&&a&&(C=!1,l());else if(C=!a,w.animationDuration)if(a=ma(r,C),C)u.push(a);else{var b=u,c=b.indexOf(a);0<=a&&b.splice(c,1)}},n=0=J&&b>=G&&(L=!0,l())}if(!H){var h,p=[],n=function(a){if(L)v&&a&&(v=!1,l());else if(v=!a,y.animationDuration)if(a=ka(w,v),v)k.push(a);else{var b=k,c=b.indexOf(a);0<=a&&b.splice(c,1)}},x=0< +S&&(y.transitionDuration&&0===R.transitionDuration||y.animationDuration&&0===R.animationDuration)&&Math.max(R.animationDelay,R.transitionDelay);x?B(b,Math.floor(x*S*1E3),!1):b();A.resume=function(){n(!0)};A.pause=function(){n(!1)}}}var w=a[0];c=ga(c);var k=[],n=a.attr("class"),h=Aa(c),H,v,L,p,A,t,J,G,E;if(0===c.duration||!x.animations&&!x.transitions)l();else{var C=c.event&&V(c.event)?c.event.join(" "):c.event,P="",M="";C&&c.structural?P=Z(C,"ng-",!0):C&&(P=C);c.addClass&&(M+=Z(c.addClass,"-add")); +c.removeClass&&(M.length&&(M+=" "),M+=Z(c.removeClass,"-remove"));c.applyClassesEarly&&M.length&&(W(a,c),M="");var X=[P,M].join(" ").trim(),ea=n