Update XStatic-Angular to 1.8.2

This is the official 1.8.2 build from angularjs.org.
The most recent changes are included, and ngScenario has been
removed from the project.

Change-Id: Id1e700d56b9394cc648d27f03ffea33171ef7cf2
This commit is contained in:
Tatiana Ovchinnikova 2022-05-25 14:22:41 -05:00
parent 150699b9de
commit 375ee8e424
19 changed files with 13446 additions and 34806 deletions

View File

@ -13,7 +13,7 @@ NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar')
VERSION = '1.8.2' # version of the packaged files, please use the upstream
# version number
BUILD = '1' # our package build number, so we can release new builds
BUILD = '2' # our package build number, so we can release new builds
# with fixes for xstatic stuff.
PACKAGE_VERSION = VERSION + '.' + BUILD # version used for PyPi

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -353,6 +353,17 @@ function concatWithSpace(a,b) {
return a + ' ' + b;
}
var helpers = {
blockTransitions: function(node, duration) {
// we use a negative delay value since it performs blocking
// yet it doesn't kill any existing transitions running on the
// same element which makes this safe for class-based animations
var value = duration ? '-' + duration + 's' : '';
applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);
return [TRANSITION_DELAY_PROP, value];
}
};
var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {
var queue, cancelFn;
@ -414,8 +425,8 @@ var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {
* of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`
* (structural) animation, child elements that also have an active structural animation are not animated.
*
* Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed
* from the DOM (`leave` animation).
* Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).
*
*
* @param {string} ngAnimateChildren If the value is empty, `true` or `on`,
* then child animations are allowed. If the value is `false`, child animations are not allowed.
@ -501,6 +512,8 @@ var $$AnimateChildrenDirective = ['$interpolate', function($interpolate) {
};
}];
/* exported $AnimateCssProvider */
var ANIMATE_TIMER_KEY = '$$animateCss';
/**
@ -2840,6 +2853,64 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
}];
}];
/** @this */
var $$AnimateCacheProvider = function() {
var KEY = '$$ngAnimateParentKey';
var parentCounter = 0;
var cache = Object.create(null);
this.$get = [function() {
return {
cacheKey: function(node, method, addClass, removeClass) {
var parentNode = node.parentNode;
var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
var parts = [parentID, method, node.getAttribute('class')];
if (addClass) {
parts.push(addClass);
}
if (removeClass) {
parts.push(removeClass);
}
return parts.join(' ');
},
containsCachedAnimationWithoutDuration: function(key) {
var entry = cache[key];
// nothing cached, so go ahead and animate
// otherwise it should be a valid animation
return (entry && !entry.isValid) || false;
},
flush: function() {
cache = Object.create(null);
},
count: function(key) {
var entry = cache[key];
return entry ? entry.total : 0;
},
get: function(key) {
var entry = cache[key];
return entry && entry.value;
},
put: function(key, value, isValid) {
if (!cache[key]) {
cache[key] = { total: 1, value: value, isValid: isValid };
} else {
cache[key].total++;
cache[key].value = value;
}
}
};
}];
};
/* exported $$AnimationProvider */
var $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) {
var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
@ -4181,7 +4252,7 @@ angular.module('ngAnimate', [], function initAngularHelpers() {
isFunction = angular.isFunction;
isElement = angular.isElement;
})
.info({ angularVersion: '"1.8.2"' })
.info({ angularVersion: '1.8.2' })
.directive('ngAnimateSwap', ngAnimateSwapDirective)
.directive('ngAnimateChildren', $$AnimateChildrenDirective)

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -63,7 +63,7 @@
var ARIA_DISABLE_ATTR = 'ngAriaDisable';
var ngAriaModule = angular.module('ngAria', ['ng']).
info({ angularVersion: '"1.8.2"' }).
info({ angularVersion: '1.8.2' }).
provider('$aria', $AriaProvider);
/**

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -17,7 +17,7 @@
angular.module('ngCookies', ['ng']).
info({ angularVersion: '"1.8.2"' }).
info({ angularVersion: '1.8.2' }).
/**
* @ngdoc provider
* @name $cookiesProvider

View File

@ -2,8 +2,12 @@
@charset "UTF-8";
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
.ng-cloak, .x-ng-cloak,
[ng\:cloak],
[ng-cloak],
[data-ng-cloak],
[x-ng-cloak],
.ng-cloak,
.x-ng-cloak,
.ng-hide:not(.ng-hide-animate) {
display: none !important;
}

View File

@ -1,13 +1,39 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function() {'use strict';
function isFunction(value) {return typeof value === 'function';};
// NOTE:
// These functions are copied here from `src/Angular.js`, because they are needed inside the
// `angular-loader.js` closure and need to be available before the main `angular.js` script has
// been loaded.
function isFunction(value) {return typeof value === 'function';}
function isDefined(value) {return typeof value !== 'undefined';}
function isNumber(value) {return typeof value === 'number';}
function isObject(value) {return value !== null && typeof value === 'object';}
function isScope(obj) {return obj && obj.$evalAsync && obj.$watch;}
function isUndefined(value) {return typeof value === 'undefined';}
function isWindow(obj) {return obj && obj.window === obj;}
function sliceArgs(args, startIndex) {return Array.prototype.slice.call(args, startIndex || 0);}
function toJsonReplacer(key, value) {
var val = value;
/* global toDebugString: true */
if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
val = undefined;
} else if (isWindow(value)) {
val = '$WINDOW';
} else if (value && window.document === value) {
val = '$DOCUMENT';
} else if (isScope(value)) {
val = '$SCOPE';
}
return val;
}
/* exported toDebugString */
function serializeObject(obj, maxDepth) {
var seen = [];
@ -43,6 +69,67 @@ function toDebugString(obj, maxDepth) {
return obj;
}
/* exported
minErrConfig,
errorHandlingConfig,
isValidObjectMaxDepth
*/
var minErrConfig = {
objectMaxDepth: 5,
urlErrorParamsEnabled: true
};
/**
* @ngdoc function
* @name angular.errorHandlingConfig
* @module ng
* @kind function
*
* @description
* Configure several aspects of error handling in AngularJS if used as a setter or return the
* current configuration if used as a getter. The following options are supported:
*
* - **objectMaxDepth**: The maximum depth to which objects are traversed when stringified for error messages.
*
* Omitted or undefined options will leave the corresponding configuration values unchanged.
*
* @param {Object=} config - The configuration object. May only contain the options that need to be
* updated. Supported keys:
*
* * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a
* non-positive or non-numeric value, removes the max depth limit.
* Default: 5
*
* * `urlErrorParamsEnabled` **{Boolean}** - Specifies whether the generated error url will
* contain the parameters of the thrown error. Disabling the parameters can be useful if the
* generated error url is very long.
*
* Default: true. When used without argument, it returns the current value.
*/
function errorHandlingConfig(config) {
if (isObject(config)) {
if (isDefined(config.objectMaxDepth)) {
minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN;
}
if (isDefined(config.urlErrorParamsEnabled) && isBoolean(config.urlErrorParamsEnabled)) {
minErrConfig.urlErrorParamsEnabled = config.urlErrorParamsEnabled;
}
} else {
return minErrConfig;
}
}
/**
* @private
* @param {Number} maxDepth
* @return {boolean}
*/
function isValidObjectMaxDepth(maxDepth) {
return isNumber(maxDepth) && maxDepth > 0;
}
/**
* @description
*
@ -76,7 +163,7 @@ function toDebugString(obj, maxDepth) {
function minErr(module, ErrorConstructor) {
ErrorConstructor = ErrorConstructor || Error;
var url = 'https://errors.angularjs.org/"1.8.2"/';
var url = 'https://errors.angularjs.org/1.8.2/';
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
var errRegExp = new RegExp(regex, 'g');
@ -548,3 +635,4 @@ setupModuleLoader(window);
* } }
*/
angular.Module;

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -1056,7 +1056,7 @@ var toJson;
var $$stringify;
var ngModule = window['angular']['module']('ngMessageFormat', ['ng']);
ngModule['info']({ 'angularVersion': '"1.8.2"' });
ngModule['info']({ 'angularVersion': '1.8.2' });
ngModule['factory']('$$messageFormat', $$MessageFormatFactory);
ngModule['config'](['$provide', function($provide) {
$interpolateMinErr = window['angular']['$interpolateMinErr'];

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -291,7 +291,7 @@ angular.module('ngMessages', [], function initAngularHelpers() {
isString = angular.isString;
jqLite = angular.element;
})
.info({ angularVersion: '"1.8.2"' })
.info({ angularVersion: '1.8.2' })
/**
* @ngdoc directive

View File

@ -1,12 +1,59 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {
'use strict';
/* global routeToRegExp: true */
/**
* @param {string} path - The path to parse. (It is assumed to have query and hash stripped off.)
* @param {Object} opts - Options.
* @return {Object} - An object containing an array of path parameter names (`keys`) and a regular
* expression (`regexp`) that can be used to identify a matching URL and extract the path
* parameter values.
*
* @description
* Parses the given path, extracting path parameter names and a regular expression to match URLs.
*
* Originally inspired by `pathRexp` in `visionmedia/express/lib/utils.js`.
*/
function routeToRegExp(path, opts) {
var keys = [];
var pattern = path
.replace(/([().])/g, '\\$1')
.replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) {
var optional = option === '?' || option === '*?';
var star = option === '*' || option === '*?';
keys.push({name: key, optional: optional});
slash = slash || '';
return (
(optional ? '(?:' + slash : slash + '(?:') +
(star ? '(.+?)' : '([^/]+)') +
(optional ? '?)?' : ')')
);
})
.replace(/([/$*])/g, '\\$1');
if (opts.ignoreTrailingSlashes) {
pattern = pattern.replace(/\/+$/, '') + '/*';
}
return {
keys: keys,
regexp: new RegExp(
'^' + pattern + '(?:[?#]|$)',
opts.caseInsensitiveMatch ? 'i' : ''
)
};
}
'use strict';
/* global routeToRegExp: false */
/**
@ -904,7 +951,7 @@ angular.mock.TzDate.prototype = Date.prototype;
* You need to require the `ngAnimateMock` module in your test suite for instance `beforeEach(module('ngAnimateMock'))`
*/
angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
.info({ angularVersion: '"1.8.2"' })
.info({ angularVersion: '1.8.2' })
.config(['$provide', function($provide) {
@ -2622,7 +2669,7 @@ angular.module('ngMock', ['ng']).provider({
$provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
$provide.decorator('$controller', createControllerDecorator($compileProvider));
$provide.decorator('$httpBackend', angular.mock.$httpBackendDecorator);
}]).info({ angularVersion: '"1.8.2"' });
}]).info({ angularVersion: '1.8.2' });
/**
* @ngdoc module
@ -2637,7 +2684,7 @@ angular.module('ngMock', ['ng']).provider({
*/
angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
$provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
}]).info({ angularVersion: '"1.8.2"' });
}]).info({ angularVersion: '1.8.2' });
/**
* @ngdoc service
@ -3448,5 +3495,263 @@ angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
}
})(window.jasmine || window.mocha);
'use strict';
(function() {
/**
* @ngdoc function
* @name browserTrigger
* @description
*
* This is a global (window) function that is only available when the {@link ngMock} module is
* included.
*
* It can be used to trigger a native browser event on an element, which is useful for unit testing.
*
*
* @param {Object} element Either a wrapped jQuery/jqLite node or a DOMElement
* @param {string=} eventType Optional event type. If none is specified, the function tries
* to determine the right event type for the element, e.g. `change` for
* `input[text]`.
* @param {Object=} eventData An optional object which contains additional event data that is used
* when creating the event:
*
* - `bubbles`: [Event.bubbles](https://developer.mozilla.org/docs/Web/API/Event/bubbles).
* Not applicable to all events.
*
* - `cancelable`: [Event.cancelable](https://developer.mozilla.org/docs/Web/API/Event/cancelable).
* Not applicable to all events.
*
* - `charcode`: [charCode](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/charcode)
* for keyboard events (keydown, keypress, and keyup).
*
* - `data`: [data](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/data) for
* [CompositionEvents](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent).
*
* - `elapsedTime`: the elapsedTime for
* [TransitionEvent](https://developer.mozilla.org/docs/Web/API/TransitionEvent)
* and [AnimationEvent](https://developer.mozilla.org/docs/Web/API/AnimationEvent).
*
* - `keycode`: [keyCode](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/keycode)
* for keyboard events (keydown, keypress, and keyup).
*
* - `keys`: an array of possible modifier keys (ctrl, alt, shift, meta) for
* [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent) and
* keyboard events (keydown, keypress, and keyup).
*
* - `relatedTarget`: the
* [relatedTarget](https://developer.mozilla.org/docs/Web/API/MouseEvent/relatedTarget)
* for [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent).
*
* - `which`: [which](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/which)
* for keyboard events (keydown, keypress, and keyup).
*
* - `x`: x-coordinates for [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent)
* and [TouchEvent](https://developer.mozilla.org/docs/Web/API/TouchEvent).
*
* - `y`: y-coordinates for [MouseEvent](https://developer.mozilla.org/docs/Web/API/MouseEvent)
* and [TouchEvent](https://developer.mozilla.org/docs/Web/API/TouchEvent).
*
*/
window.browserTrigger = function browserTrigger(element, eventType, eventData) {
if (element && !element.nodeName) element = element[0];
if (!element) return;
eventData = eventData || {};
var relatedTarget = eventData.relatedTarget || element;
var keys = eventData.keys;
var x = eventData.x;
var y = eventData.y;
var inputType = (element.type) ? element.type.toLowerCase() : null,
nodeName = element.nodeName.toLowerCase();
if (!eventType) {
eventType = {
'text': 'change',
'textarea': 'change',
'hidden': 'change',
'password': 'change',
'button': 'click',
'submit': 'click',
'reset': 'click',
'image': 'click',
'checkbox': 'click',
'radio': 'click',
'select-one': 'change',
'select-multiple': 'change',
'_default_': 'click'
}[inputType || '_default_'];
}
if (nodeName === 'option') {
element.parentNode.value = element.value;
element = element.parentNode;
eventType = 'change';
}
keys = keys || [];
function pressed(key) {
return keys.indexOf(key) !== -1;
}
var evnt;
if (/transitionend/.test(eventType)) {
if (window.WebKitTransitionEvent) {
evnt = new window.WebKitTransitionEvent(eventType, eventData);
evnt.initEvent(eventType, eventData.bubbles, true);
} else {
try {
evnt = new window.TransitionEvent(eventType, eventData);
} catch (e) {
evnt = window.document.createEvent('TransitionEvent');
evnt.initTransitionEvent(eventType, eventData.bubbles, null, null, eventData.elapsedTime || 0);
}
}
} else if (/animationend/.test(eventType)) {
if (window.WebKitAnimationEvent) {
evnt = new window.WebKitAnimationEvent(eventType, eventData);
evnt.initEvent(eventType, eventData.bubbles, true);
} else {
try {
evnt = new window.AnimationEvent(eventType, eventData);
} catch (e) {
evnt = window.document.createEvent('AnimationEvent');
evnt.initAnimationEvent(eventType, eventData.bubbles, null, null, eventData.elapsedTime || 0);
}
}
} else if (/touch/.test(eventType) && supportsTouchEvents()) {
evnt = createTouchEvent(element, eventType, x, y);
} else if (/key/.test(eventType)) {
evnt = window.document.createEvent('Events');
evnt.initEvent(eventType, eventData.bubbles, eventData.cancelable);
evnt.view = window;
evnt.ctrlKey = pressed('ctrl');
evnt.altKey = pressed('alt');
evnt.shiftKey = pressed('shift');
evnt.metaKey = pressed('meta');
evnt.keyCode = eventData.keyCode;
evnt.charCode = eventData.charCode;
evnt.which = eventData.which;
} else if (/composition/.test(eventType)) {
try {
evnt = new window.CompositionEvent(eventType, {
data: eventData.data
});
} catch (e) {
// Support: IE9+
evnt = window.document.createEvent('CompositionEvent', {});
evnt.initCompositionEvent(
eventType,
eventData.bubbles,
eventData.cancelable,
window,
eventData.data,
null
);
}
} else {
evnt = window.document.createEvent('MouseEvents');
x = x || 0;
y = y || 0;
evnt.initMouseEvent(eventType, true, true, window, 0, x, y, x, y, pressed('ctrl'),
pressed('alt'), pressed('shift'), pressed('meta'), 0, relatedTarget);
}
/* we're unable to change the timeStamp value directly so this
* is only here to allow for testing where the timeStamp value is
* read */
evnt.$manualTimeStamp = eventData.timeStamp;
if (!evnt) return;
if (!eventData.bubbles || supportsEventBubblingInDetachedTree() || isAttachedToDocument(element)) {
return element.dispatchEvent(evnt);
} else {
triggerForPath(element, evnt);
}
};
function supportsTouchEvents() {
if ('_cached' in supportsTouchEvents) {
return supportsTouchEvents._cached;
}
if (!window.document.createTouch || !window.document.createTouchList) {
supportsTouchEvents._cached = false;
return false;
}
try {
window.document.createEvent('TouchEvent');
} catch (e) {
supportsTouchEvents._cached = false;
return false;
}
supportsTouchEvents._cached = true;
return true;
}
function createTouchEvent(element, eventType, x, y) {
var evnt = new window.Event(eventType);
x = x || 0;
y = y || 0;
var touch = window.document.createTouch(window, element, Date.now(), x, y, x, y);
var touches = window.document.createTouchList(touch);
evnt.touches = touches;
return evnt;
}
function supportsEventBubblingInDetachedTree() {
if ('_cached' in supportsEventBubblingInDetachedTree) {
return supportsEventBubblingInDetachedTree._cached;
}
supportsEventBubblingInDetachedTree._cached = false;
var doc = window.document;
if (doc) {
var parent = doc.createElement('div'),
child = parent.cloneNode();
parent.appendChild(child);
parent.addEventListener('e', function() {
supportsEventBubblingInDetachedTree._cached = true;
});
var evnt = window.document.createEvent('Events');
evnt.initEvent('e', true, true);
child.dispatchEvent(evnt);
}
return supportsEventBubblingInDetachedTree._cached;
}
function triggerForPath(element, evnt) {
var stop = false;
var _stopPropagation = evnt.stopPropagation;
evnt.stopPropagation = function() {
stop = true;
_stopPropagation.apply(evnt, arguments);
};
patchEventTargetForBubbling(evnt, element);
do {
element.dispatchEvent(evnt);
// eslint-disable-next-line no-unmodified-loop-condition
} while (!stop && (element = element.parentNode));
}
function patchEventTargetForBubbling(event, target) {
event._target = target;
Object.defineProperty(event, 'target', {get: function() { return this._target;}});
}
function isAttachedToDocument(element) {
while ((element = element.parentNode)) {
if (element === window) {
return true;
}
}
return false;
}
})();
})(window, window.angular);

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -1269,7 +1269,7 @@ angular.module('ngParseExt', [])
.config(['$parseProvider', function($parseProvider) {
$parseProvider.setIdentifierFns(isValidIdentifierStart, isValidIdentifierContinue);
}])
.info({ angularVersion: '"1.8.2"' });
.info({ angularVersion: '1.8.2' });
})(window, window.angular);

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -497,7 +497,7 @@ function shallowClearAndCopy(src, dst) {
*
*/
angular.module('ngResource', ['ng']).
info({ angularVersion: '"1.8.2"' }).
info({ angularVersion: '1.8.2' }).
provider('$resource', function ResourceProvider() {
var PROTOCOL_AND_IPV6_REGEX = /^https?:\/\/\[[^\]]*][^/]*/;

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -32,6 +32,51 @@ function shallowCopy(src, dst) {
return dst || src;
}
/* global routeToRegExp: true */
/**
* @param {string} path - The path to parse. (It is assumed to have query and hash stripped off.)
* @param {Object} opts - Options.
* @return {Object} - An object containing an array of path parameter names (`keys`) and a regular
* expression (`regexp`) that can be used to identify a matching URL and extract the path
* parameter values.
*
* @description
* Parses the given path, extracting path parameter names and a regular expression to match URLs.
*
* Originally inspired by `pathRexp` in `visionmedia/express/lib/utils.js`.
*/
function routeToRegExp(path, opts) {
var keys = [];
var pattern = path
.replace(/([().])/g, '\\$1')
.replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) {
var optional = option === '?' || option === '*?';
var star = option === '*' || option === '*?';
keys.push({name: key, optional: optional});
slash = slash || '';
return (
(optional ? '(?:' + slash : slash + '(?:') +
(star ? '(.+?)' : '([^/]+)') +
(optional ? '?)?' : ')')
);
})
.replace(/([/$*])/g, '\\$1');
if (opts.ignoreTrailingSlashes) {
pattern = pattern.replace(/\/+$/, '') + '/*';
}
return {
keys: keys,
regexp: new RegExp(
'^' + pattern + '(?:[?#]|$)',
opts.caseInsensitiveMatch ? 'i' : ''
)
};
}
/* global routeToRegExp: false */
/* global shallowCopy: false */
@ -56,7 +101,7 @@ var noop;
/* global -ngRouteModule */
var ngRouteModule = angular.
module('ngRoute', []).
info({ angularVersion: '"1.8.2"' }).
info({ angularVersion: '1.8.2' }).
provider('$route', $RouteProvider).
// Ensure `$route` will be instantiated in time to capture the initial `$locationChangeSuccess`
// event (unless explicitly disabled). This is necessary in case `ngView` is included in an

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -689,7 +689,7 @@ function sanitizeText(chars) {
// define ngSanitize module and register $sanitize service
angular.module('ngSanitize', [])
.provider('$sanitize', $SanitizeProvider)
.info({ angularVersion: '"1.8.2"' });
.info({ angularVersion: '1.8.2' });
/**
* @ngdoc filter

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/**
* @license AngularJS v1.8.2
* (c) 2010-2020 Google, Inc. http://angularjs.org
* (c) 2010-2020 Google LLC. http://angularjs.org
* License: MIT
*/
(function(window, angular) {'use strict';
@ -29,7 +29,7 @@
/* global ngTouch */
var ngTouch = angular.module('ngTouch', []);
ngTouch.info({ angularVersion: '"1.8.2"' });
ngTouch.info({ angularVersion: '1.8.2' });
function nodeName_(element) {
return angular.$$lowercase(element.nodeName || (element[0] && element[0].nodeName));

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"raw":"v1.8.2","major":1,"minor":8,"patch":2,"prerelease":[],"build":[],"version":"1.8.2","codeName":"meteoric-mining","full":"1.8.2","branch":"v1.8.x","cdn":{"raw":"v1.8.2","major":1,"minor":8,"patch":2,"prerelease":[],"build":[],"version":"1.8.2","docsUrl":"http://code.angularjs.org/1.8.2/docs"}}
{"raw":"v1.8.2","major":1,"minor":8,"patch":2,"prerelease":[],"build":[],"version":"1.8.2","codeName":"meteoric-mining","full":"1.8.2","branch":"v1.8.x","cdn":{"raw":"v1.8.1","major":1,"minor":8,"patch":1,"prerelease":[],"build":[],"version":"1.8.1","docsUrl":"http://code.angularjs.org/1.8.1/docs"}}