(js/css) Update generated files

This commit is contained in:
InverseBot
2017-01-19 01:28:13 -05:00
parent 5300d4185d
commit bb97b57ad7
4 changed files with 88 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/**
* State-based routing for AngularJS
* @version v0.3.2
* @version v0.4.0
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
@@ -563,6 +563,57 @@ function $Resolve( $q, $injector) {
angular.module('ui.router.util').service('$resolve', $Resolve);
/**
* @ngdoc object
* @name ui.router.util.$templateFactoryProvider
*
* @description
* Provider for $templateFactory. Manages which template-loading mechanism to
* use, and will default to the most recent one ($templateRequest on Angular
* versions starting from 1.3, $http otherwise).
*/
function TemplateFactoryProvider() {
var shouldUnsafelyUseHttp = angular.version.minor < 3;
/**
* @ngdoc function
* @name ui.router.util.$templateFactoryProvider#shouldUnsafelyUseHttp
* @methodOf ui.router.util.$templateFactoryProvider
*
* @description
* Forces $templateFactory to use $http instead of $templateRequest. This
* might cause XSS, as $http doesn't enforce the regular security checks for
* templates that have been introduced in Angular 1.3. Note that setting this
* to false on Angular older than 1.3.x will crash, as the $templateRequest
* service (and the security checks) are not implemented on these versions.
*
* See the $sce documentation, section
* <a href="https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates">
* Impact on loading templates</a> for more details about this mechanism.
*
* @param {boolean} value
*/
this.shouldUnsafelyUseHttp = function(value) {
shouldUnsafelyUseHttp = !!value;
};
/**
* @ngdoc object
* @name ui.router.util.$templateFactory
*
* @requires $http
* @requires $templateCache
* @requires $injector
*
* @description
* Service. Manages loading of templates.
*/
this.$get = ['$http', '$templateCache', '$injector', function($http, $templateCache, $injector){
return new TemplateFactory($http, $templateCache, $injector, shouldUnsafelyUseHttp);}];
}
/**
* @ngdoc object
* @name ui.router.util.$templateFactory
@@ -574,8 +625,7 @@ angular.module('ui.router.util').service('$resolve', $Resolve);
* @description
* Service. Manages loading of templates.
*/
$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];
function $TemplateFactory( $http, $templateCache, $injector) {
function TemplateFactory($http, $templateCache, $injector, shouldUnsafelyUseHttp) {
/**
* @ngdoc function
@@ -647,9 +697,15 @@ function $TemplateFactory( $http, $templateCache, $injector) {
this.fromUrl = function (url, params) {
if (isFunction(url)) url = url(params);
if (url == null) return null;
else return $http
.get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
.then(function(response) { return response.data; });
else {
if(!shouldUnsafelyUseHttp) {
return $injector.get('$templateRequest')(url);
} else {
return $http
.get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})
.then(function(response) { return response.data; });
}
}
};
/**
@@ -672,7 +728,7 @@ function $TemplateFactory( $http, $templateCache, $injector) {
};
}
angular.module('ui.router.util').service('$templateFactory', $TemplateFactory);
angular.module('ui.router.util').provider('$templateFactory', TemplateFactoryProvider);
var $$UMFP; // reference to $UrlMatcherFactoryProvider
@@ -1286,7 +1342,7 @@ function $UrlMatcherFactory() {
"int": {
encode: valToString,
decode: function(val) { return parseInt(val, 10); },
is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; },
is: function(val) { return val !== undefined && val !== null && this.decode(val.toString()) === val; },
pattern: /\d+/
},
"bool": {
@@ -3409,6 +3465,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
return $q.reject(error);
});
transition.catch(angular.noop);
return transition;
};
@@ -3452,7 +3509,11 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
if (!isDefined(state)) { return undefined; }
if ($state.$current !== state) { return false; }
return params ? equalForKeys(state.params.$$values(params), $stateParams) : true;
return !params || objectKeys(params).reduce(function(acc, key) {
var paramDef = state.params[key];
return acc && !paramDef || paramDef.type.equals($stateParams[key], params[key]);
}, true);
};
/**
@@ -3528,7 +3589,10 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
}
}
return true;
return objectKeys(params).reduce(function(acc, key) {
var paramDef = state.params[key];
return acc && !paramDef || paramDef.type.equals($stateParams[key], params[key]);
}, true);
};
@@ -4105,12 +4169,21 @@ function $ViewDirectiveFill ( $compile, $controller, $state, $interpolate
priority: -400,
compile: function (tElement) {
var initial = tElement.html();
if (tElement.empty) {
tElement.empty();
} else {
// ng 1.0.0 doesn't have empty(), which cleans up data and handlers
tElement[0].innerHTML = null;
}
return function (scope, $element, attrs) {
var current = $state.$current,
name = getUiViewName(scope, attrs, $element, $interpolate),
locals = current && current.locals[name];
if (! locals) {
$element.html(initial);
$compile($element.contents())(scope);
return;
}

File diff suppressed because one or more lines are too long