rails-angularjs 1.3.14 → 1.3.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/rails-angularjs/version.rb +2 -2
- data/vendor/assets/javascripts/angular-animate.js +1 -1
- data/vendor/assets/javascripts/angular-animate.min.js +1 -1
- data/vendor/assets/javascripts/angular-animate.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-aria.js +19 -4
- data/vendor/assets/javascripts/angular-aria.min.js +8 -7
- data/vendor/assets/javascripts/angular-aria.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-cookies.js +1 -1
- data/vendor/assets/javascripts/angular-cookies.min.js +1 -1
- data/vendor/assets/javascripts/angular-cookies.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-loader.js +2 -2
- data/vendor/assets/javascripts/angular-loader.min.js +2 -2
- data/vendor/assets/javascripts/angular-loader.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-messages.js +4 -3
- data/vendor/assets/javascripts/angular-messages.min.js +1 -1
- data/vendor/assets/javascripts/angular-messages.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-mocks.js +73 -1
- data/vendor/assets/javascripts/angular-resource.js +1 -1
- data/vendor/assets/javascripts/angular-resource.min.js +1 -1
- data/vendor/assets/javascripts/angular-resource.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-route.js +1 -1
- data/vendor/assets/javascripts/angular-route.min.js +1 -1
- data/vendor/assets/javascripts/angular-route.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-sanitize.js +12 -1
- data/vendor/assets/javascripts/angular-sanitize.min.js +1 -1
- data/vendor/assets/javascripts/angular-sanitize.min.js.map +8 -0
- data/vendor/assets/javascripts/angular-scenario.js +177 -49
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular-touch.min.js +1 -1
- data/vendor/assets/javascripts/angular-touch.min.js.map +8 -0
- data/vendor/assets/javascripts/angular.js +177 -49
- data/vendor/assets/javascripts/angular.min.js +242 -241
- data/vendor/assets/javascripts/angular.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-animate.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-animate.min.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-animate.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-aria.js +19 -4
- data/vendor/assets/javascripts/unstable/angular-aria.min.js +8 -7
- data/vendor/assets/javascripts/unstable/angular-aria.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-cookies.js +254 -140
- data/vendor/assets/javascripts/unstable/angular-cookies.min.js +4 -3
- data/vendor/assets/javascripts/unstable/angular-cookies.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-loader.js +2 -2
- data/vendor/assets/javascripts/unstable/angular-loader.min.js +2 -2
- data/vendor/assets/javascripts/unstable/angular-loader.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-messages.js +47 -24
- data/vendor/assets/javascripts/unstable/angular-messages.min.js +6 -7
- data/vendor/assets/javascripts/unstable/angular-messages.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-mocks.js +80 -30
- data/vendor/assets/javascripts/unstable/angular-resource.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-resource.min.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-resource.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-route.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-route.min.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-route.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-sanitize.js +31 -20
- data/vendor/assets/javascripts/unstable/angular-sanitize.min.js +3 -3
- data/vendor/assets/javascripts/unstable/angular-sanitize.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular-scenario.js +378 -230
- data/vendor/assets/javascripts/unstable/angular-touch.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-touch.min.js +1 -1
- data/vendor/assets/javascripts/unstable/angular-touch.min.js.map +8 -0
- data/vendor/assets/javascripts/unstable/angular.js +377 -229
- data/vendor/assets/javascripts/unstable/angular.min.js +278 -277
- data/vendor/assets/javascripts/unstable/angular.min.js.map +8 -0
- metadata +25 -5
@@ -9190,7 +9190,7 @@ return jQuery;
|
|
9190
9190
|
}));
|
9191
9191
|
|
9192
9192
|
/**
|
9193
|
-
* @license AngularJS v1.4.0-beta.
|
9193
|
+
* @license AngularJS v1.4.0-beta.6
|
9194
9194
|
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
9195
9195
|
* License: MIT
|
9196
9196
|
*/
|
@@ -9249,7 +9249,7 @@ function minErr(module, ErrorConstructor) {
|
|
9249
9249
|
return match;
|
9250
9250
|
});
|
9251
9251
|
|
9252
|
-
message += '\nhttp://errors.angularjs.org/1.4.0-beta.
|
9252
|
+
message += '\nhttp://errors.angularjs.org/1.4.0-beta.6/' +
|
9253
9253
|
(module ? module + '/' : '') + code;
|
9254
9254
|
|
9255
9255
|
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
|
@@ -9290,6 +9290,7 @@ function minErr(module, ErrorConstructor) {
|
|
9290
9290
|
extend: true,
|
9291
9291
|
toInt: true,
|
9292
9292
|
inherit: true,
|
9293
|
+
merge: true,
|
9293
9294
|
noop: true,
|
9294
9295
|
identity: true,
|
9295
9296
|
valueFn: true,
|
@@ -9326,6 +9327,8 @@ function minErr(module, ErrorConstructor) {
|
|
9326
9327
|
toJsonReplacer: true,
|
9327
9328
|
toJson: true,
|
9328
9329
|
fromJson: true,
|
9330
|
+
convertTimezoneToLocal: true,
|
9331
|
+
timezoneToOffset: true,
|
9329
9332
|
startingTag: true,
|
9330
9333
|
tryDecodeURIComponent: true,
|
9331
9334
|
parseKeyValue: true,
|
@@ -9346,6 +9349,7 @@ function minErr(module, ErrorConstructor) {
|
|
9346
9349
|
createMap: true,
|
9347
9350
|
|
9348
9351
|
NODE_TYPE_ELEMENT: true,
|
9352
|
+
NODE_TYPE_ATTRIBUTE: true,
|
9349
9353
|
NODE_TYPE_TEXT: true,
|
9350
9354
|
NODE_TYPE_COMMENT: true,
|
9351
9355
|
NODE_TYPE_DOCUMENT: true,
|
@@ -9579,6 +9583,31 @@ function setHashKey(obj, h) {
|
|
9579
9583
|
}
|
9580
9584
|
}
|
9581
9585
|
|
9586
|
+
|
9587
|
+
function baseExtend(dst, objs, deep) {
|
9588
|
+
var h = dst.$$hashKey;
|
9589
|
+
|
9590
|
+
for (var i = 0, ii = objs.length; i < ii; ++i) {
|
9591
|
+
var obj = objs[i];
|
9592
|
+
if (!isObject(obj) && !isFunction(obj)) continue;
|
9593
|
+
var keys = Object.keys(obj);
|
9594
|
+
for (var j = 0, jj = keys.length; j < jj; j++) {
|
9595
|
+
var key = keys[j];
|
9596
|
+
var src = obj[key];
|
9597
|
+
|
9598
|
+
if (deep && isObject(src)) {
|
9599
|
+
if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
|
9600
|
+
baseExtend(dst[key], [src], true);
|
9601
|
+
} else {
|
9602
|
+
dst[key] = src;
|
9603
|
+
}
|
9604
|
+
}
|
9605
|
+
}
|
9606
|
+
|
9607
|
+
setHashKey(dst, h);
|
9608
|
+
return dst;
|
9609
|
+
}
|
9610
|
+
|
9582
9611
|
/**
|
9583
9612
|
* @ngdoc function
|
9584
9613
|
* @name angular.extend
|
@@ -9589,29 +9618,42 @@ function setHashKey(obj, h) {
|
|
9589
9618
|
* Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
|
9590
9619
|
* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
|
9591
9620
|
* by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.
|
9592
|
-
*
|
9621
|
+
*
|
9622
|
+
* **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use
|
9623
|
+
* {@link angular.merge} for this.
|
9593
9624
|
*
|
9594
9625
|
* @param {Object} dst Destination object.
|
9595
9626
|
* @param {...Object} src Source object(s).
|
9596
9627
|
* @returns {Object} Reference to `dst`.
|
9597
9628
|
*/
|
9598
9629
|
function extend(dst) {
|
9599
|
-
|
9630
|
+
return baseExtend(dst, slice.call(arguments, 1), false);
|
9631
|
+
}
|
9632
|
+
|
9633
|
+
|
9634
|
+
/**
|
9635
|
+
* @ngdoc function
|
9636
|
+
* @name angular.merge
|
9637
|
+
* @module ng
|
9638
|
+
* @kind function
|
9639
|
+
*
|
9640
|
+
* @description
|
9641
|
+
* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
|
9642
|
+
* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
|
9643
|
+
* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.
|
9644
|
+
*
|
9645
|
+
* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source
|
9646
|
+
* objects, performing a deep copy.
|
9647
|
+
*
|
9648
|
+
* @param {Object} dst Destination object.
|
9649
|
+
* @param {...Object} src Source object(s).
|
9650
|
+
* @returns {Object} Reference to `dst`.
|
9651
|
+
*/
|
9652
|
+
function merge(dst) {
|
9653
|
+
return baseExtend(dst, slice.call(arguments, 1), true);
|
9654
|
+
}
|
9600
9655
|
|
9601
|
-
for (var i = 1, ii = arguments.length; i < ii; i++) {
|
9602
|
-
var obj = arguments[i];
|
9603
|
-
if (obj) {
|
9604
|
-
var keys = Object.keys(obj);
|
9605
|
-
for (var j = 0, jj = keys.length; j < jj; j++) {
|
9606
|
-
var key = keys[j];
|
9607
|
-
dst[key] = obj[key];
|
9608
|
-
}
|
9609
|
-
}
|
9610
|
-
}
|
9611
9656
|
|
9612
|
-
setHashKey(dst, h);
|
9613
|
-
return dst;
|
9614
|
-
}
|
9615
9657
|
|
9616
9658
|
function toInt(str) {
|
9617
9659
|
return parseInt(str, 10);
|
@@ -9739,6 +9781,12 @@ function isString(value) {return typeof value === 'string';}
|
|
9739
9781
|
* @description
|
9740
9782
|
* Determines if a reference is a `Number`.
|
9741
9783
|
*
|
9784
|
+
* This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
|
9785
|
+
*
|
9786
|
+
* If you wish to exclude these then you can use the native
|
9787
|
+
* [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
|
9788
|
+
* method.
|
9789
|
+
*
|
9742
9790
|
* @param {*} value Reference to check.
|
9743
9791
|
* @returns {boolean} True if `value` is a `Number`.
|
9744
9792
|
*/
|
@@ -10121,10 +10169,11 @@ function equals(o1, o2) {
|
|
10121
10169
|
} else if (isDate(o1)) {
|
10122
10170
|
if (!isDate(o2)) return false;
|
10123
10171
|
return equals(o1.getTime(), o2.getTime());
|
10124
|
-
} else if (isRegExp(o1)
|
10125
|
-
return o1.toString() == o2.toString();
|
10172
|
+
} else if (isRegExp(o1)) {
|
10173
|
+
return isRegExp(o2) ? o1.toString() == o2.toString() : false;
|
10126
10174
|
} else {
|
10127
|
-
if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
|
10175
|
+
if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
|
10176
|
+
isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
|
10128
10177
|
keySet = {};
|
10129
10178
|
for (key in o1) {
|
10130
10179
|
if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
|
@@ -10204,18 +10253,15 @@ var csp = function() {
|
|
10204
10253
|
var jq = function() {
|
10205
10254
|
if (isDefined(jq.name_)) return jq.name_;
|
10206
10255
|
var el;
|
10207
|
-
var i, ii = ngAttrPrefixes.length;
|
10256
|
+
var i, ii = ngAttrPrefixes.length, prefix, name;
|
10208
10257
|
for (i = 0; i < ii; ++i) {
|
10209
|
-
|
10258
|
+
prefix = ngAttrPrefixes[i];
|
10259
|
+
if (el = document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]')) {
|
10260
|
+
name = el.getAttribute(prefix + 'jq');
|
10210
10261
|
break;
|
10211
10262
|
}
|
10212
10263
|
}
|
10213
10264
|
|
10214
|
-
var name;
|
10215
|
-
if (el) {
|
10216
|
-
name = getNgAttribute(el, "jq");
|
10217
|
-
}
|
10218
|
-
|
10219
10265
|
return (jq.name_ = name);
|
10220
10266
|
};
|
10221
10267
|
|
@@ -10328,6 +10374,26 @@ function fromJson(json) {
|
|
10328
10374
|
}
|
10329
10375
|
|
10330
10376
|
|
10377
|
+
function timezoneToOffset(timezone, fallback) {
|
10378
|
+
var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
|
10379
|
+
return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
|
10380
|
+
}
|
10381
|
+
|
10382
|
+
|
10383
|
+
function addDateMinutes(date, minutes) {
|
10384
|
+
date = new Date(date.getTime());
|
10385
|
+
date.setMinutes(date.getMinutes() + minutes);
|
10386
|
+
return date;
|
10387
|
+
}
|
10388
|
+
|
10389
|
+
|
10390
|
+
function convertTimezoneToLocal(date, timezone, reverse) {
|
10391
|
+
reverse = reverse ? -1 : 1;
|
10392
|
+
var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
|
10393
|
+
return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
|
10394
|
+
}
|
10395
|
+
|
10396
|
+
|
10331
10397
|
/**
|
10332
10398
|
* @returns {string} Returns the string representation of the element.
|
10333
10399
|
*/
|
@@ -10456,10 +10522,9 @@ var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
|
|
10456
10522
|
|
10457
10523
|
function getNgAttribute(element, ngAttr) {
|
10458
10524
|
var attr, i, ii = ngAttrPrefixes.length;
|
10459
|
-
element = jqLite(element);
|
10460
10525
|
for (i = 0; i < ii; ++i) {
|
10461
10526
|
attr = ngAttrPrefixes[i] + ngAttr;
|
10462
|
-
if (isString(attr = element.
|
10527
|
+
if (isString(attr = element.getAttribute(attr))) {
|
10463
10528
|
return attr;
|
10464
10529
|
}
|
10465
10530
|
}
|
@@ -10934,6 +10999,7 @@ function createMap() {
|
|
10934
10999
|
}
|
10935
11000
|
|
10936
11001
|
var NODE_TYPE_ELEMENT = 1;
|
11002
|
+
var NODE_TYPE_ATTRIBUTE = 2;
|
10937
11003
|
var NODE_TYPE_TEXT = 3;
|
10938
11004
|
var NODE_TYPE_COMMENT = 8;
|
10939
11005
|
var NODE_TYPE_DOCUMENT = 9;
|
@@ -11349,6 +11415,7 @@ function toDebugString(obj) {
|
|
11349
11415
|
$FilterProvider,
|
11350
11416
|
$InterpolateProvider,
|
11351
11417
|
$IntervalProvider,
|
11418
|
+
$$HashMapProvider,
|
11352
11419
|
$HttpProvider,
|
11353
11420
|
$HttpBackendProvider,
|
11354
11421
|
$LocationProvider,
|
@@ -11368,7 +11435,8 @@ function toDebugString(obj) {
|
|
11368
11435
|
$$RAFProvider,
|
11369
11436
|
$$AsyncCallbackProvider,
|
11370
11437
|
$WindowProvider,
|
11371
|
-
$$jqLiteProvider
|
11438
|
+
$$jqLiteProvider,
|
11439
|
+
$$CookieReaderProvider
|
11372
11440
|
*/
|
11373
11441
|
|
11374
11442
|
|
@@ -11387,11 +11455,11 @@ function toDebugString(obj) {
|
|
11387
11455
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
11388
11456
|
*/
|
11389
11457
|
var version = {
|
11390
|
-
full: '1.4.0-beta.
|
11458
|
+
full: '1.4.0-beta.6', // all of these placeholder strings will be replaced by grunt's
|
11391
11459
|
major: 1, // package task
|
11392
11460
|
minor: 4,
|
11393
11461
|
dot: 0,
|
11394
|
-
codeName: '
|
11462
|
+
codeName: 'cookie-liberation'
|
11395
11463
|
};
|
11396
11464
|
|
11397
11465
|
|
@@ -11400,6 +11468,7 @@ function publishExternalAPI(angular) {
|
|
11400
11468
|
'bootstrap': bootstrap,
|
11401
11469
|
'copy': copy,
|
11402
11470
|
'extend': extend,
|
11471
|
+
'merge': merge,
|
11403
11472
|
'equals': equals,
|
11404
11473
|
'element': jqLite,
|
11405
11474
|
'forEach': forEach,
|
@@ -11522,12 +11591,25 @@ function publishExternalAPI(angular) {
|
|
11522
11591
|
$window: $WindowProvider,
|
11523
11592
|
$$rAF: $$RAFProvider,
|
11524
11593
|
$$asyncCallback: $$AsyncCallbackProvider,
|
11525
|
-
$$jqLite: $$jqLiteProvider
|
11594
|
+
$$jqLite: $$jqLiteProvider,
|
11595
|
+
$$HashMap: $$HashMapProvider,
|
11596
|
+
$$cookieReader: $$CookieReaderProvider
|
11526
11597
|
});
|
11527
11598
|
}
|
11528
11599
|
]);
|
11529
11600
|
}
|
11530
11601
|
|
11602
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
11603
|
+
* Any commits to this file should be reviewed with security in mind. *
|
11604
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
11605
|
+
* An approval from 2 Core members with history of modifying *
|
11606
|
+
* this file is required. *
|
11607
|
+
* *
|
11608
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
11609
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
11610
|
+
* Or gives undesired access to variables likes document or window? *
|
11611
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
11612
|
+
|
11531
11613
|
/* global JQLitePrototype: true,
|
11532
11614
|
addEventListenerFn: true,
|
11533
11615
|
removeEventListenerFn: true,
|
@@ -12115,6 +12197,10 @@ forEach({
|
|
12115
12197
|
},
|
12116
12198
|
|
12117
12199
|
attr: function(element, name, value) {
|
12200
|
+
var nodeType = element.nodeType;
|
12201
|
+
if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {
|
12202
|
+
return;
|
12203
|
+
}
|
12118
12204
|
var lowercasedName = lowercase(name);
|
12119
12205
|
if (BOOLEAN_ATTR[lowercasedName]) {
|
12120
12206
|
if (isDefined(value)) {
|
@@ -12627,6 +12713,12 @@ HashMap.prototype = {
|
|
12627
12713
|
}
|
12628
12714
|
};
|
12629
12715
|
|
12716
|
+
var $$HashMapProvider = [function() {
|
12717
|
+
this.$get = [function() {
|
12718
|
+
return HashMap;
|
12719
|
+
}];
|
12720
|
+
}];
|
12721
|
+
|
12630
12722
|
/**
|
12631
12723
|
* @ngdoc function
|
12632
12724
|
* @module ng
|
@@ -13952,6 +14044,7 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
13952
14044
|
* @return {Promise} the animation callback promise
|
13953
14045
|
*/
|
13954
14046
|
leave: function(element, options) {
|
14047
|
+
applyStyles(element, options);
|
13955
14048
|
element.remove();
|
13956
14049
|
return asyncPromise();
|
13957
14050
|
},
|
@@ -14196,11 +14289,6 @@ function Browser(window, document, $log, $sniffer) {
|
|
14196
14289
|
* @param {function()} callback Function that will be called when no outstanding request
|
14197
14290
|
*/
|
14198
14291
|
self.notifyWhenNoOutstandingRequests = function(callback) {
|
14199
|
-
// force browser to execute all pollFns - this is needed so that cookies and other pollers fire
|
14200
|
-
// at some deterministic time in respect to the test runner's actions. Leaving things up to the
|
14201
|
-
// regular poller would result in flaky tests.
|
14202
|
-
forEach(pollFns, function(pollFn) { pollFn(); });
|
14203
|
-
|
14204
14292
|
if (outstandingRequestCount === 0) {
|
14205
14293
|
callback();
|
14206
14294
|
} else {
|
@@ -14208,44 +14296,6 @@ function Browser(window, document, $log, $sniffer) {
|
|
14208
14296
|
}
|
14209
14297
|
};
|
14210
14298
|
|
14211
|
-
//////////////////////////////////////////////////////////////
|
14212
|
-
// Poll Watcher API
|
14213
|
-
//////////////////////////////////////////////////////////////
|
14214
|
-
var pollFns = [],
|
14215
|
-
pollTimeout;
|
14216
|
-
|
14217
|
-
/**
|
14218
|
-
* @name $browser#addPollFn
|
14219
|
-
*
|
14220
|
-
* @param {function()} fn Poll function to add
|
14221
|
-
*
|
14222
|
-
* @description
|
14223
|
-
* Adds a function to the list of functions that poller periodically executes,
|
14224
|
-
* and starts polling if not started yet.
|
14225
|
-
*
|
14226
|
-
* @returns {function()} the added function
|
14227
|
-
*/
|
14228
|
-
self.addPollFn = function(fn) {
|
14229
|
-
if (isUndefined(pollTimeout)) startPoller(100, setTimeout);
|
14230
|
-
pollFns.push(fn);
|
14231
|
-
return fn;
|
14232
|
-
};
|
14233
|
-
|
14234
|
-
/**
|
14235
|
-
* @param {number} interval How often should browser call poll functions (ms)
|
14236
|
-
* @param {function()} setTimeout Reference to a real or fake `setTimeout` function.
|
14237
|
-
*
|
14238
|
-
* @description
|
14239
|
-
* Configures the poller to run in the specified intervals, using the specified
|
14240
|
-
* setTimeout fn and kicks it off.
|
14241
|
-
*/
|
14242
|
-
function startPoller(interval, setTimeout) {
|
14243
|
-
(function check() {
|
14244
|
-
forEach(pollFns, function(pollFn) { pollFn(); });
|
14245
|
-
pollTimeout = setTimeout(check, interval);
|
14246
|
-
})();
|
14247
|
-
}
|
14248
|
-
|
14249
14299
|
//////////////////////////////////////////////////////////////
|
14250
14300
|
// URL API
|
14251
14301
|
//////////////////////////////////////////////////////////////
|
@@ -14356,11 +14406,19 @@ function Browser(window, document, $log, $sniffer) {
|
|
14356
14406
|
fireUrlChange();
|
14357
14407
|
}
|
14358
14408
|
|
14409
|
+
function getCurrentState() {
|
14410
|
+
try {
|
14411
|
+
return history.state;
|
14412
|
+
} catch (e) {
|
14413
|
+
// MSIE can reportedly throw when there is no state (UNCONFIRMED).
|
14414
|
+
}
|
14415
|
+
}
|
14416
|
+
|
14359
14417
|
// This variable should be used *only* inside the cacheState function.
|
14360
14418
|
var lastCachedState = null;
|
14361
14419
|
function cacheState() {
|
14362
14420
|
// This should be the only place in $browser where `history.state` is read.
|
14363
|
-
cachedState =
|
14421
|
+
cachedState = getCurrentState();
|
14364
14422
|
cachedState = isUndefined(cachedState) ? null : cachedState;
|
14365
14423
|
|
14366
14424
|
// Prevent callbacks fo fire twice if both hashchange & popstate were fired.
|
@@ -14447,89 +14505,6 @@ function Browser(window, document, $log, $sniffer) {
|
|
14447
14505
|
return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : '';
|
14448
14506
|
};
|
14449
14507
|
|
14450
|
-
//////////////////////////////////////////////////////////////
|
14451
|
-
// Cookies API
|
14452
|
-
//////////////////////////////////////////////////////////////
|
14453
|
-
var lastCookies = {};
|
14454
|
-
var lastCookieString = '';
|
14455
|
-
var cookiePath = self.baseHref();
|
14456
|
-
|
14457
|
-
function safeDecodeURIComponent(str) {
|
14458
|
-
try {
|
14459
|
-
return decodeURIComponent(str);
|
14460
|
-
} catch (e) {
|
14461
|
-
return str;
|
14462
|
-
}
|
14463
|
-
}
|
14464
|
-
|
14465
|
-
/**
|
14466
|
-
* @name $browser#cookies
|
14467
|
-
*
|
14468
|
-
* @param {string=} name Cookie name
|
14469
|
-
* @param {string=} value Cookie value
|
14470
|
-
*
|
14471
|
-
* @description
|
14472
|
-
* The cookies method provides a 'private' low level access to browser cookies.
|
14473
|
-
* It is not meant to be used directly, use the $cookie service instead.
|
14474
|
-
*
|
14475
|
-
* The return values vary depending on the arguments that the method was called with as follows:
|
14476
|
-
*
|
14477
|
-
* - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify
|
14478
|
-
* it
|
14479
|
-
* - cookies(name, value) -> set name to value, if value is undefined delete the cookie
|
14480
|
-
* - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that
|
14481
|
-
* way)
|
14482
|
-
*
|
14483
|
-
* @returns {Object} Hash of all cookies (if called without any parameter)
|
14484
|
-
*/
|
14485
|
-
self.cookies = function(name, value) {
|
14486
|
-
var cookieLength, cookieArray, cookie, i, index;
|
14487
|
-
|
14488
|
-
if (name) {
|
14489
|
-
if (value === undefined) {
|
14490
|
-
rawDocument.cookie = encodeURIComponent(name) + "=;path=" + cookiePath +
|
14491
|
-
";expires=Thu, 01 Jan 1970 00:00:00 GMT";
|
14492
|
-
} else {
|
14493
|
-
if (isString(value)) {
|
14494
|
-
cookieLength = (rawDocument.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) +
|
14495
|
-
';path=' + cookiePath).length + 1;
|
14496
|
-
|
14497
|
-
// per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
|
14498
|
-
// - 300 cookies
|
14499
|
-
// - 20 cookies per unique domain
|
14500
|
-
// - 4096 bytes per cookie
|
14501
|
-
if (cookieLength > 4096) {
|
14502
|
-
$log.warn("Cookie '" + name +
|
14503
|
-
"' possibly not set or overflowed because it was too large (" +
|
14504
|
-
cookieLength + " > 4096 bytes)!");
|
14505
|
-
}
|
14506
|
-
}
|
14507
|
-
}
|
14508
|
-
} else {
|
14509
|
-
if (rawDocument.cookie !== lastCookieString) {
|
14510
|
-
lastCookieString = rawDocument.cookie;
|
14511
|
-
cookieArray = lastCookieString.split("; ");
|
14512
|
-
lastCookies = {};
|
14513
|
-
|
14514
|
-
for (i = 0; i < cookieArray.length; i++) {
|
14515
|
-
cookie = cookieArray[i];
|
14516
|
-
index = cookie.indexOf('=');
|
14517
|
-
if (index > 0) { //ignore nameless cookies
|
14518
|
-
name = safeDecodeURIComponent(cookie.substring(0, index));
|
14519
|
-
// the first value that is seen for a cookie is the most
|
14520
|
-
// specific one. values for the same cookie name that
|
14521
|
-
// follow are for less specific paths.
|
14522
|
-
if (lastCookies[name] === undefined) {
|
14523
|
-
lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));
|
14524
|
-
}
|
14525
|
-
}
|
14526
|
-
}
|
14527
|
-
}
|
14528
|
-
return lastCookies;
|
14529
|
-
}
|
14530
|
-
};
|
14531
|
-
|
14532
|
-
|
14533
14508
|
/**
|
14534
14509
|
* @name $browser#defer
|
14535
14510
|
* @param {function()} fn A function, who's execution should be deferred.
|
@@ -14957,7 +14932,7 @@ function $CacheFactoryProvider() {
|
|
14957
14932
|
* the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,
|
14958
14933
|
* element with ng-app attribute), otherwise the template will be ignored.
|
14959
14934
|
*
|
14960
|
-
* Adding via the
|
14935
|
+
* Adding via the `$templateCache` service:
|
14961
14936
|
*
|
14962
14937
|
* ```js
|
14963
14938
|
* var myApp = angular.module('myApp', []);
|
@@ -14985,6 +14960,17 @@ function $TemplateCacheProvider() {
|
|
14985
14960
|
}];
|
14986
14961
|
}
|
14987
14962
|
|
14963
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
14964
|
+
* Any commits to this file should be reviewed with security in mind. *
|
14965
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
14966
|
+
* An approval from 2 Core members with history of modifying *
|
14967
|
+
* this file is required. *
|
14968
|
+
* *
|
14969
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
14970
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
14971
|
+
* Or gives undesired access to variables likes document or window? *
|
14972
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
14973
|
+
|
14988
14974
|
/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
|
14989
14975
|
*
|
14990
14976
|
* DOM-related variables:
|
@@ -15196,7 +15182,8 @@ function $TemplateCacheProvider() {
|
|
15196
15182
|
* Require another directive and inject its controller as the fourth argument to the linking function. The
|
15197
15183
|
* `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
|
15198
15184
|
* injected argument will be an array in corresponding order. If no such directive can be
|
15199
|
-
* found, or if the directive does not have a controller, then an error is raised
|
15185
|
+
* found, or if the directive does not have a controller, then an error is raised (unless no link function
|
15186
|
+
* is specified, in which case error checking is skipped). The name can be prefixed with:
|
15200
15187
|
*
|
15201
15188
|
* * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
|
15202
15189
|
* * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
|
@@ -15331,7 +15318,7 @@ function $TemplateCacheProvider() {
|
|
15331
15318
|
* `templateUrl` declaration or manual compilation inside the compile function.
|
15332
15319
|
* </div>
|
15333
15320
|
*
|
15334
|
-
* <div class="alert alert-
|
15321
|
+
* <div class="alert alert-danger">
|
15335
15322
|
* **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
|
15336
15323
|
* e.g. does not know about the right outer scope. Please use the transclude function that is passed
|
15337
15324
|
* to the link function instead.
|
@@ -15610,7 +15597,7 @@ function $TemplateCacheProvider() {
|
|
15610
15597
|
* @param {string|DOMElement} element Element or HTML string to compile into a template function.
|
15611
15598
|
* @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.
|
15612
15599
|
*
|
15613
|
-
* <div class="alert alert-
|
15600
|
+
* <div class="alert alert-danger">
|
15614
15601
|
* **Note:** Passing a `transclude` function to the $compile function is deprecated, as it
|
15615
15602
|
* e.g. will not use the right outer scope. Please pass the transclude function as a
|
15616
15603
|
* `parentBoundTranscludeFn` to the link function instead.
|
@@ -18153,8 +18140,8 @@ function $HttpProvider() {
|
|
18153
18140
|
**/
|
18154
18141
|
var interceptorFactories = this.interceptors = [];
|
18155
18142
|
|
18156
|
-
this.$get = ['$httpBackend', '
|
18157
|
-
function($httpBackend,
|
18143
|
+
this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',
|
18144
|
+
function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {
|
18158
18145
|
|
18159
18146
|
var defaultCache = $cacheFactory('$http');
|
18160
18147
|
|
@@ -18999,7 +18986,7 @@ function $HttpProvider() {
|
|
18999
18986
|
// send the request to the backend
|
19000
18987
|
if (isUndefined(cachedResp)) {
|
19001
18988
|
var xsrfValue = urlIsSameOrigin(config.url)
|
19002
|
-
?
|
18989
|
+
? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]
|
19003
18990
|
: undefined;
|
19004
18991
|
if (xsrfValue) {
|
19005
18992
|
reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
|
@@ -19554,7 +19541,7 @@ function $InterpolateProvider() {
|
|
19554
19541
|
// all of these properties are undocumented for now
|
19555
19542
|
exp: text, //just for compatibility with regular watchers created via $watch
|
19556
19543
|
expressions: expressions,
|
19557
|
-
$$watchDelegate: function(scope, listener
|
19544
|
+
$$watchDelegate: function(scope, listener) {
|
19558
19545
|
var lastValue;
|
19559
19546
|
return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {
|
19560
19547
|
var currValue = compute(values);
|
@@ -19562,7 +19549,7 @@ function $InterpolateProvider() {
|
|
19562
19549
|
listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);
|
19563
19550
|
}
|
19564
19551
|
lastValue = currValue;
|
19565
|
-
}
|
19552
|
+
});
|
19566
19553
|
}
|
19567
19554
|
});
|
19568
19555
|
}
|
@@ -19653,6 +19640,7 @@ function $IntervalProvider() {
|
|
19653
19640
|
* indefinitely.
|
19654
19641
|
* @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
|
19655
19642
|
* will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
|
19643
|
+
* @param {...*=} Pass additional parameters to the executed function.
|
19656
19644
|
* @returns {promise} A promise which will be notified on each iteration.
|
19657
19645
|
*
|
19658
19646
|
* @example
|
@@ -19746,7 +19734,9 @@ function $IntervalProvider() {
|
|
19746
19734
|
* </example>
|
19747
19735
|
*/
|
19748
19736
|
function interval(fn, delay, count, invokeApply) {
|
19749
|
-
var
|
19737
|
+
var hasParams = arguments.length > 4,
|
19738
|
+
args = hasParams ? sliceArgs(arguments, 4) : [],
|
19739
|
+
setInterval = $window.setInterval,
|
19750
19740
|
clearInterval = $window.clearInterval,
|
19751
19741
|
iteration = 0,
|
19752
19742
|
skipApply = (isDefined(invokeApply) && !invokeApply),
|
@@ -19755,7 +19745,9 @@ function $IntervalProvider() {
|
|
19755
19745
|
|
19756
19746
|
count = isDefined(count) ? count : 0;
|
19757
19747
|
|
19758
|
-
promise.then(null, null, fn)
|
19748
|
+
promise.then(null, null, (!hasParams) ? fn : function() {
|
19749
|
+
fn.apply(null, args);
|
19750
|
+
});
|
19759
19751
|
|
19760
19752
|
promise.$$intervalId = setInterval(function tick() {
|
19761
19753
|
deferred.notify(iteration++);
|
@@ -19859,7 +19851,15 @@ function $LocaleProvider() {
|
|
19859
19851
|
mediumDate: 'MMM d, y',
|
19860
19852
|
shortDate: 'M/d/yy',
|
19861
19853
|
mediumTime: 'h:mm:ss a',
|
19862
|
-
shortTime: 'h:mm a'
|
19854
|
+
shortTime: 'h:mm a',
|
19855
|
+
ERANAMES: [
|
19856
|
+
"Before Christ",
|
19857
|
+
"Anno Domini"
|
19858
|
+
],
|
19859
|
+
ERAS: [
|
19860
|
+
"BC",
|
19861
|
+
"AD"
|
19862
|
+
]
|
19863
19863
|
},
|
19864
19864
|
|
19865
19865
|
pluralCat: function(num) {
|
@@ -20870,6 +20870,7 @@ function $LocationProvider() {
|
|
20870
20870
|
<button ng-click="$log.warn(message)">warn</button>
|
20871
20871
|
<button ng-click="$log.info(message)">info</button>
|
20872
20872
|
<button ng-click="$log.error(message)">error</button>
|
20873
|
+
<button ng-click="$log.debug(message)">debug</button>
|
20873
20874
|
</div>
|
20874
20875
|
</file>
|
20875
20876
|
</example>
|
@@ -21000,6 +21001,17 @@ function $LogProvider() {
|
|
21000
21001
|
}];
|
21001
21002
|
}
|
21002
21003
|
|
21004
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
21005
|
+
* Any commits to this file should be reviewed with security in mind. *
|
21006
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
21007
|
+
* An approval from 2 Core members with history of modifying *
|
21008
|
+
* this file is required. *
|
21009
|
+
* *
|
21010
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
21011
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
21012
|
+
* Or gives undesired access to variables likes document or window? *
|
21013
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
21014
|
+
|
21003
21015
|
var $parseMinErr = minErr('$parse');
|
21004
21016
|
|
21005
21017
|
// Sandboxing Angular Expressions
|
@@ -23573,9 +23585,27 @@ function $RootScopeProvider() {
|
|
23573
23585
|
return TTL;
|
23574
23586
|
};
|
23575
23587
|
|
23588
|
+
function createChildScopeClass(parent) {
|
23589
|
+
function ChildScope() {
|
23590
|
+
this.$$watchers = this.$$nextSibling =
|
23591
|
+
this.$$childHead = this.$$childTail = null;
|
23592
|
+
this.$$listeners = {};
|
23593
|
+
this.$$listenerCount = {};
|
23594
|
+
this.$$watchersCount = 0;
|
23595
|
+
this.$id = nextUid();
|
23596
|
+
this.$$ChildScope = null;
|
23597
|
+
}
|
23598
|
+
ChildScope.prototype = parent;
|
23599
|
+
return ChildScope;
|
23600
|
+
}
|
23601
|
+
|
23576
23602
|
this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',
|
23577
23603
|
function($injector, $exceptionHandler, $parse, $browser) {
|
23578
23604
|
|
23605
|
+
function destroyChildScope($event) {
|
23606
|
+
$event.currentScope.$$destroyed = true;
|
23607
|
+
}
|
23608
|
+
|
23579
23609
|
/**
|
23580
23610
|
* @ngdoc type
|
23581
23611
|
* @name $rootScope.Scope
|
@@ -23699,16 +23729,7 @@ function $RootScopeProvider() {
|
|
23699
23729
|
// Only create a child scope class if somebody asks for one,
|
23700
23730
|
// but cache it to allow the VM to optimize lookups.
|
23701
23731
|
if (!this.$$ChildScope) {
|
23702
|
-
this.$$ChildScope =
|
23703
|
-
this.$$watchers = this.$$nextSibling =
|
23704
|
-
this.$$childHead = this.$$childTail = null;
|
23705
|
-
this.$$listeners = {};
|
23706
|
-
this.$$listenerCount = {};
|
23707
|
-
this.$$watchersCount = 0;
|
23708
|
-
this.$id = nextUid();
|
23709
|
-
this.$$ChildScope = null;
|
23710
|
-
};
|
23711
|
-
this.$$ChildScope.prototype = this;
|
23732
|
+
this.$$ChildScope = createChildScopeClass(this);
|
23712
23733
|
}
|
23713
23734
|
child = new this.$$ChildScope();
|
23714
23735
|
}
|
@@ -23726,13 +23747,9 @@ function $RootScopeProvider() {
|
|
23726
23747
|
// prototypically. In all other cases, this property needs to be set
|
23727
23748
|
// when the parent scope is destroyed.
|
23728
23749
|
// The listener needs to be added after the parent is set
|
23729
|
-
if (isolate || parent != this) child.$on('$destroy',
|
23750
|
+
if (isolate || parent != this) child.$on('$destroy', destroyChildScope);
|
23730
23751
|
|
23731
23752
|
return child;
|
23732
|
-
|
23733
|
-
function destroyChild() {
|
23734
|
-
child.$$destroyed = true;
|
23735
|
-
}
|
23736
23753
|
},
|
23737
23754
|
|
23738
23755
|
/**
|
@@ -24902,6 +24919,17 @@ function $$SanitizeUriProvider() {
|
|
24902
24919
|
};
|
24903
24920
|
}
|
24904
24921
|
|
24922
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
24923
|
+
* Any commits to this file should be reviewed with security in mind. *
|
24924
|
+
* Changes to this file can potentially create security vulnerabilities. *
|
24925
|
+
* An approval from 2 Core members with history of modifying *
|
24926
|
+
* this file is required. *
|
24927
|
+
* *
|
24928
|
+
* Does the change somehow allow for arbitrary javascript to be executed? *
|
24929
|
+
* Or allows for someone to change the prototype of built-in objects? *
|
24930
|
+
* Or gives undesired access to variables likes document or window? *
|
24931
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
24932
|
+
|
24905
24933
|
var $sceMinErr = minErr('$sce');
|
24906
24934
|
|
24907
24935
|
var SCE_CONTEXTS = {
|
@@ -26246,6 +26274,7 @@ function $TimeoutProvider() {
|
|
26246
26274
|
* @param {number=} [delay=0] Delay in milliseconds.
|
26247
26275
|
* @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
|
26248
26276
|
* will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
|
26277
|
+
* @param {...*=} Pass additional parameters to the executed function.
|
26249
26278
|
* @returns {Promise} Promise that will be resolved when the timeout is reached. The value this
|
26250
26279
|
* promise will be resolved with is the return value of the `fn` function.
|
26251
26280
|
*
|
@@ -26257,14 +26286,15 @@ function $TimeoutProvider() {
|
|
26257
26286
|
fn = noop;
|
26258
26287
|
}
|
26259
26288
|
|
26260
|
-
var
|
26289
|
+
var args = sliceArgs(arguments, 3),
|
26290
|
+
skipApply = (isDefined(invokeApply) && !invokeApply),
|
26261
26291
|
deferred = (skipApply ? $$q : $q).defer(),
|
26262
26292
|
promise = deferred.promise,
|
26263
26293
|
timeoutId;
|
26264
26294
|
|
26265
26295
|
timeoutId = $browser.defer(function() {
|
26266
26296
|
try {
|
26267
|
-
deferred.resolve(fn());
|
26297
|
+
deferred.resolve(fn.apply(null, args));
|
26268
26298
|
} catch (e) {
|
26269
26299
|
deferred.reject(e);
|
26270
26300
|
$exceptionHandler(e);
|
@@ -26456,6 +26486,60 @@ function $WindowProvider() {
|
|
26456
26486
|
this.$get = valueFn(window);
|
26457
26487
|
}
|
26458
26488
|
|
26489
|
+
/**
|
26490
|
+
* @name $$cookieReader
|
26491
|
+
* @requires $document
|
26492
|
+
*
|
26493
|
+
* @description
|
26494
|
+
* This is a private service for reading cookies used by $http and ngCookies
|
26495
|
+
*
|
26496
|
+
* @return {Object} a key/value map of the current cookies
|
26497
|
+
*/
|
26498
|
+
function $$CookieReader($document) {
|
26499
|
+
var rawDocument = $document[0];
|
26500
|
+
var lastCookies = {};
|
26501
|
+
var lastCookieString = '';
|
26502
|
+
|
26503
|
+
function safeDecodeURIComponent(str) {
|
26504
|
+
try {
|
26505
|
+
return decodeURIComponent(str);
|
26506
|
+
} catch (e) {
|
26507
|
+
return str;
|
26508
|
+
}
|
26509
|
+
}
|
26510
|
+
|
26511
|
+
return function() {
|
26512
|
+
var cookieArray, cookie, i, index, name;
|
26513
|
+
|
26514
|
+
if (rawDocument.cookie !== lastCookieString) {
|
26515
|
+
lastCookieString = rawDocument.cookie;
|
26516
|
+
cookieArray = lastCookieString.split('; ');
|
26517
|
+
lastCookies = {};
|
26518
|
+
|
26519
|
+
for (i = 0; i < cookieArray.length; i++) {
|
26520
|
+
cookie = cookieArray[i];
|
26521
|
+
index = cookie.indexOf('=');
|
26522
|
+
if (index > 0) { //ignore nameless cookies
|
26523
|
+
name = safeDecodeURIComponent(cookie.substring(0, index));
|
26524
|
+
// the first value that is seen for a cookie is the most
|
26525
|
+
// specific one. values for the same cookie name that
|
26526
|
+
// follow are for less specific paths.
|
26527
|
+
if (lastCookies[name] === undefined) {
|
26528
|
+
lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));
|
26529
|
+
}
|
26530
|
+
}
|
26531
|
+
}
|
26532
|
+
}
|
26533
|
+
return lastCookies;
|
26534
|
+
};
|
26535
|
+
}
|
26536
|
+
|
26537
|
+
$$CookieReader.$inject = ['$document'];
|
26538
|
+
|
26539
|
+
function $$CookieReaderProvider() {
|
26540
|
+
this.$get = $$CookieReader;
|
26541
|
+
}
|
26542
|
+
|
26459
26543
|
/* global currencyFilter: true,
|
26460
26544
|
dateFilter: true,
|
26461
26545
|
filterFilter: true,
|
@@ -26658,6 +26742,9 @@ function $FilterProvider($provide) {
|
|
26658
26742
|
* - `false|undefined`: A short hand for a function which will look for a substring match in case
|
26659
26743
|
* insensitive way.
|
26660
26744
|
*
|
26745
|
+
* Primitive values are converted to strings. Objects are not compared against primitives,
|
26746
|
+
* unless they have a custom `toString` method (e.g. `Date` objects).
|
26747
|
+
*
|
26661
26748
|
* @example
|
26662
26749
|
<example>
|
26663
26750
|
<file name="index.html">
|
@@ -26760,6 +26847,10 @@ function filterFilter() {
|
|
26760
26847
|
};
|
26761
26848
|
}
|
26762
26849
|
|
26850
|
+
function hasCustomToString(obj) {
|
26851
|
+
return isFunction(obj.toString) && obj.toString !== Object.prototype.toString;
|
26852
|
+
}
|
26853
|
+
|
26763
26854
|
// Helper functions for `filterFilter`
|
26764
26855
|
function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
|
26765
26856
|
var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
|
@@ -26769,8 +26860,8 @@ function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
|
|
26769
26860
|
comparator = equals;
|
26770
26861
|
} else if (!isFunction(comparator)) {
|
26771
26862
|
comparator = function(actual, expected) {
|
26772
|
-
if (isObject(
|
26773
|
-
//
|
26863
|
+
if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {
|
26864
|
+
// Should not compare primitives against objects, unless they have custom `toString` method
|
26774
26865
|
return false;
|
26775
26866
|
}
|
26776
26867
|
|
@@ -26791,8 +26882,8 @@ function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
|
|
26791
26882
|
}
|
26792
26883
|
|
26793
26884
|
function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
|
26794
|
-
var actualType = typeof actual;
|
26795
|
-
var expectedType = typeof expected;
|
26885
|
+
var actualType = (actual !== null) ? typeof actual : 'null';
|
26886
|
+
var expectedType = (expected !== null) ? typeof expected : 'null';
|
26796
26887
|
|
26797
26888
|
if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
|
26798
26889
|
return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
|
@@ -26817,7 +26908,7 @@ function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatc
|
|
26817
26908
|
} else if (expectedType === 'object') {
|
26818
26909
|
for (key in expected) {
|
26819
26910
|
var expectedVal = expected[key];
|
26820
|
-
if (isFunction(expectedVal)) {
|
26911
|
+
if (isFunction(expectedVal) || isUndefined(expectedVal)) {
|
26821
26912
|
continue;
|
26822
26913
|
}
|
26823
26914
|
|
@@ -27141,6 +27232,14 @@ function ampmGetter(date, formats) {
|
|
27141
27232
|
return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
|
27142
27233
|
}
|
27143
27234
|
|
27235
|
+
function eraGetter(date, formats) {
|
27236
|
+
return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];
|
27237
|
+
}
|
27238
|
+
|
27239
|
+
function longEraGetter(date, formats) {
|
27240
|
+
return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];
|
27241
|
+
}
|
27242
|
+
|
27144
27243
|
var DATE_FORMATS = {
|
27145
27244
|
yyyy: dateGetter('FullYear', 4),
|
27146
27245
|
yy: dateGetter('FullYear', 2, 0, true),
|
@@ -27167,10 +27266,14 @@ var DATE_FORMATS = {
|
|
27167
27266
|
a: ampmGetter,
|
27168
27267
|
Z: timeZoneGetter,
|
27169
27268
|
ww: weekGetter(2),
|
27170
|
-
w: weekGetter(1)
|
27269
|
+
w: weekGetter(1),
|
27270
|
+
G: eraGetter,
|
27271
|
+
GG: eraGetter,
|
27272
|
+
GGG: eraGetter,
|
27273
|
+
GGGG: longEraGetter
|
27171
27274
|
};
|
27172
27275
|
|
27173
|
-
var DATE_FORMATS_SPLIT = /((?:[^
|
27276
|
+
var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,
|
27174
27277
|
NUMBER_STRING = /^\-?\d+$/;
|
27175
27278
|
|
27176
27279
|
/**
|
@@ -27207,6 +27310,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d
|
|
27207
27310
|
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
|
27208
27311
|
* * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
|
27209
27312
|
* * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
|
27313
|
+
* * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')
|
27314
|
+
* * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')
|
27210
27315
|
*
|
27211
27316
|
* `format` string can also be one of the following predefined
|
27212
27317
|
* {@link guide/i18n localizable formats}:
|
@@ -27327,12 +27432,8 @@ function dateFilter($locale) {
|
|
27327
27432
|
|
27328
27433
|
var dateTimezoneOffset = date.getTimezoneOffset();
|
27329
27434
|
if (timezone) {
|
27330
|
-
|
27331
|
-
|
27332
|
-
date = new Date(date.getTime());
|
27333
|
-
date.setMinutes(date.getMinutes() + dateTimezoneOffset - requestedTimezoneOffset);
|
27334
|
-
dateTimezoneOffset = requestedTimezoneOffset;
|
27335
|
-
}
|
27435
|
+
dateTimezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
|
27436
|
+
date = convertTimezoneToLocal(date, timezone, true);
|
27336
27437
|
}
|
27337
27438
|
forEach(parts, function(value) {
|
27338
27439
|
fn = DATE_FORMATS[value];
|
@@ -27557,6 +27658,43 @@ function limitToFilter() {
|
|
27557
27658
|
* @param {boolean=} reverse Reverse the order of the array.
|
27558
27659
|
* @returns {Array} Sorted copy of the source array.
|
27559
27660
|
*
|
27661
|
+
*
|
27662
|
+
* @example
|
27663
|
+
* The example below demonstrates a simple ngRepeat, where the data is sorted
|
27664
|
+
* by age in descending order (predicate is set to `'-age'`).
|
27665
|
+
* `reverse` is not set, which means it defaults to `false`.
|
27666
|
+
<example module="orderByExample">
|
27667
|
+
<file name="index.html">
|
27668
|
+
<script>
|
27669
|
+
angular.module('orderByExample', [])
|
27670
|
+
.controller('ExampleController', ['$scope', function($scope) {
|
27671
|
+
$scope.friends =
|
27672
|
+
[{name:'John', phone:'555-1212', age:10},
|
27673
|
+
{name:'Mary', phone:'555-9876', age:19},
|
27674
|
+
{name:'Mike', phone:'555-4321', age:21},
|
27675
|
+
{name:'Adam', phone:'555-5678', age:35},
|
27676
|
+
{name:'Julie', phone:'555-8765', age:29}];
|
27677
|
+
}]);
|
27678
|
+
</script>
|
27679
|
+
<div ng-controller="ExampleController">
|
27680
|
+
<table class="friend">
|
27681
|
+
<tr>
|
27682
|
+
<th>Name</th>
|
27683
|
+
<th>Phone Number</th>
|
27684
|
+
<th>Age</th>
|
27685
|
+
</tr>
|
27686
|
+
<tr ng-repeat="friend in friends | orderBy:'-age'">
|
27687
|
+
<td>{{friend.name}}</td>
|
27688
|
+
<td>{{friend.phone}}</td>
|
27689
|
+
<td>{{friend.age}}</td>
|
27690
|
+
</tr>
|
27691
|
+
</table>
|
27692
|
+
</div>
|
27693
|
+
</file>
|
27694
|
+
</example>
|
27695
|
+
*
|
27696
|
+
* The predicate and reverse parameters can be controlled dynamically through scope properties,
|
27697
|
+
* as shown in the next example.
|
27560
27698
|
* @example
|
27561
27699
|
<example module="orderByExample">
|
27562
27700
|
<file name="index.html">
|
@@ -27939,6 +28077,7 @@ var htmlAnchorDirective = valueFn({
|
|
27939
28077
|
* but not on older IEs:
|
27940
28078
|
*
|
27941
28079
|
* ```html
|
28080
|
+
* <!-- See below for an example of ng-disabled being used correctly -->
|
27942
28081
|
* <div ng-init="isDisabled = false">
|
27943
28082
|
* <button disabled="{{isDisabled}}">Disabled</button>
|
27944
28083
|
* </div>
|
@@ -28526,7 +28665,7 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
|
|
28526
28665
|
*
|
28527
28666
|
* # Alias: {@link ng.directive:ngForm `ngForm`}
|
28528
28667
|
*
|
28529
|
-
* In Angular forms can be nested. This means that the outer form is valid when all of the child
|
28668
|
+
* In Angular, forms can be nested. This means that the outer form is valid when all of the child
|
28530
28669
|
* forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
|
28531
28670
|
* Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
|
28532
28671
|
* `<form>` but can be nested. This allows you to have nested forms, which is very useful when
|
@@ -28664,10 +28803,12 @@ var formDirectiveFactory = function(isNgForm) {
|
|
28664
28803
|
name: 'form',
|
28665
28804
|
restrict: isNgForm ? 'EAC' : 'E',
|
28666
28805
|
controller: FormController,
|
28667
|
-
compile: function ngFormCompile(formElement) {
|
28806
|
+
compile: function ngFormCompile(formElement, attr) {
|
28668
28807
|
// Setup initial state of the control
|
28669
28808
|
formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);
|
28670
28809
|
|
28810
|
+
var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);
|
28811
|
+
|
28671
28812
|
return {
|
28672
28813
|
pre: function ngFormPreLink(scope, formElement, attr, controller) {
|
28673
28814
|
// if `action` attr is not present on the form, prevent the default action (submission)
|
@@ -28698,23 +28839,21 @@ var formDirectiveFactory = function(isNgForm) {
|
|
28698
28839
|
});
|
28699
28840
|
}
|
28700
28841
|
|
28701
|
-
var parentFormCtrl = controller.$$parentForm
|
28702
|
-
|
28703
|
-
|
28704
|
-
|
28705
|
-
|
28706
|
-
|
28707
|
-
|
28708
|
-
|
28709
|
-
|
28710
|
-
setter(scope, alias, controller, alias);
|
28711
|
-
parentFormCtrl.$$renameControl(controller, alias);
|
28842
|
+
var parentFormCtrl = controller.$$parentForm;
|
28843
|
+
|
28844
|
+
if (nameAttr) {
|
28845
|
+
setter(scope, controller.$name, controller, controller.$name);
|
28846
|
+
attr.$observe(nameAttr, function(newValue) {
|
28847
|
+
if (controller.$name === newValue) return;
|
28848
|
+
setter(scope, controller.$name, undefined, controller.$name);
|
28849
|
+
parentFormCtrl.$$renameControl(controller, newValue);
|
28850
|
+
setter(scope, controller.$name, controller, controller.$name);
|
28712
28851
|
});
|
28713
28852
|
}
|
28714
28853
|
formElement.on('$destroy', function() {
|
28715
28854
|
parentFormCtrl.$removeControl(controller);
|
28716
|
-
if (
|
28717
|
-
setter(scope,
|
28855
|
+
if (nameAttr) {
|
28856
|
+
setter(scope, attr[nameAttr], undefined, controller.$name);
|
28718
28857
|
}
|
28719
28858
|
extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
|
28720
28859
|
});
|
@@ -29886,8 +30025,8 @@ function createDateInputType(type, regexp, parseDate, format) {
|
|
29886
30025
|
// parser/formatter in the processing chain so that the model
|
29887
30026
|
// contains some different data format!
|
29888
30027
|
var parsedDate = parseDate(value, previousDate);
|
29889
|
-
if (timezone
|
29890
|
-
parsedDate
|
30028
|
+
if (timezone) {
|
30029
|
+
parsedDate = convertTimezoneToLocal(parsedDate, timezone);
|
29891
30030
|
}
|
29892
30031
|
return parsedDate;
|
29893
30032
|
}
|
@@ -29900,9 +30039,8 @@ function createDateInputType(type, regexp, parseDate, format) {
|
|
29900
30039
|
}
|
29901
30040
|
if (isValidDate(value)) {
|
29902
30041
|
previousDate = value;
|
29903
|
-
if (previousDate && timezone
|
29904
|
-
|
29905
|
-
previousDate = new Date(previousDate.getTime() + timezoneOffset);
|
30042
|
+
if (previousDate && timezone) {
|
30043
|
+
previousDate = convertTimezoneToLocal(previousDate, timezone, true);
|
29906
30044
|
}
|
29907
30045
|
return $filter('date')(value, format, timezone);
|
29908
30046
|
} else {
|
@@ -32374,7 +32512,7 @@ var ngIncludeFillContentDirective = ['$compile',
|
|
32374
32512
|
* The `ngInit` directive allows you to evaluate an expression in the
|
32375
32513
|
* current scope.
|
32376
32514
|
*
|
32377
|
-
* <div class="alert alert-
|
32515
|
+
* <div class="alert alert-danger">
|
32378
32516
|
* The only appropriate use of `ngInit` is for aliasing special properties of
|
32379
32517
|
* {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you
|
32380
32518
|
* should use {@link guide/controller controllers} rather than `ngInit`
|
@@ -32687,8 +32825,8 @@ is set to `true`. The parse error is stored in `ngModel.$error.parse`.
|
|
32687
32825
|
* data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
|
32688
32826
|
* collaborate together to achieve the desired result.
|
32689
32827
|
*
|
32690
|
-
*
|
32691
|
-
* contents be edited in place by the user.
|
32828
|
+
* `contenteditable` is an HTML5 attribute, which tells the browser to let the element
|
32829
|
+
* contents be edited in place by the user.
|
32692
32830
|
*
|
32693
32831
|
* We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}
|
32694
32832
|
* module to automatically remove "bad" content like inline event listener (e.g. `<span onclick="...">`).
|
@@ -33651,8 +33789,10 @@ var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/;
|
|
33651
33789
|
* - `getterSetter`: boolean value which determines whether or not to treat functions bound to
|
33652
33790
|
`ngModel` as getters/setters.
|
33653
33791
|
* - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for
|
33654
|
-
* `<input type="date">`, `<input type="time">`, ... .
|
33655
|
-
*
|
33792
|
+
* `<input type="date">`, `<input type="time">`, ... . It understands UTC/GMT and the
|
33793
|
+
* continental US time zone abbreviations, but for general use, use a time zone offset, for
|
33794
|
+
* example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
|
33795
|
+
* If not specified, the timezone of the browser will be used.
|
33656
33796
|
*
|
33657
33797
|
* @example
|
33658
33798
|
|
@@ -34260,6 +34400,11 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
|
|
34260
34400
|
selectValueMap: selectValueMap,
|
34261
34401
|
getOptionFromViewValue: function(value) {
|
34262
34402
|
return selectValueMap[getTrackByValue(value, getLocals(value))];
|
34403
|
+
},
|
34404
|
+
getViewValueFromOption: function(option) {
|
34405
|
+
// If the viewValue could be an object that may be mutated by the application,
|
34406
|
+
// we need to make a copy and not return the reference to the value on the option.
|
34407
|
+
return trackBy ? angular.copy(option.viewValue) : option.viewValue;
|
34263
34408
|
}
|
34264
34409
|
};
|
34265
34410
|
}
|
@@ -34353,7 +34498,7 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
|
|
34353
34498
|
if (selectedOption && !selectedOption.disabled) {
|
34354
34499
|
removeEmptyOption();
|
34355
34500
|
removeUnknownOption();
|
34356
|
-
return selectedOption
|
34501
|
+
return options.getViewValueFromOption(selectedOption);
|
34357
34502
|
}
|
34358
34503
|
return null;
|
34359
34504
|
};
|
@@ -34387,7 +34532,7 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
|
|
34387
34532
|
|
34388
34533
|
forEach(selectedValues, function(value) {
|
34389
34534
|
var option = options.selectValueMap[value];
|
34390
|
-
if (!option.disabled) selections.push(option
|
34535
|
+
if (!option.disabled) selections.push(options.getViewValueFromOption(option));
|
34391
34536
|
});
|
34392
34537
|
|
34393
34538
|
return selections;
|
@@ -34418,6 +34563,10 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
|
|
34418
34563
|
// We will re-render the option elements if the option values or labels change
|
34419
34564
|
scope.$watchCollection(ngOptions.getWatchables, updateOptions);
|
34420
34565
|
|
34566
|
+
// We also need to watch to see if the internals of the model changes, since
|
34567
|
+
// ngModel only watches for object identity change
|
34568
|
+
scope.$watch(attr.ngModel, function() { ngModelCtrl.$render(); }, true);
|
34569
|
+
|
34421
34570
|
// ------------------------------------------------------------------ //
|
34422
34571
|
|
34423
34572
|
|
@@ -34749,7 +34898,6 @@ var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale,
|
|
34749
34898
|
IS_WHEN = /^when(Minus)?(.+)$/;
|
34750
34899
|
|
34751
34900
|
return {
|
34752
|
-
restrict: 'EA',
|
34753
34901
|
link: function(scope, element, attr) {
|
34754
34902
|
var numberExp = attr.count,
|
34755
34903
|
whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs
|