1
1
/**
2
- * @license AngularJS v1.6.9-build.5548 +sha.4c97df5
2
+ * @license AngularJS v1.6.9-build.5549 +sha.a8830d2
3
3
* (c) 2010-2018 Google, Inc. http://angularjs.org
4
4
* License: MIT
5
5
*/
@@ -106,7 +106,7 @@ function minErr(module, ErrorConstructor) {
106
106
return match;
107
107
});
108
108
109
- message += '\nhttp://errors.angularjs.org/1.6.9-build.5548 +sha.4c97df5 /' +
109
+ message += '\nhttp://errors.angularjs.org/1.6.9-build.5549 +sha.a8830d2 /' +
110
110
(module ? module + '/' : '') + code;
111
111
112
112
for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
@@ -2780,7 +2780,7 @@ function toDebugString(obj, maxDepth) {
2780
2780
var version = {
2781
2781
// These placeholder strings will be replaced by grunt's `build` task.
2782
2782
// They need to be double- or single-quoted.
2783
- full: '1.6.9-build.5548 +sha.4c97df5 ',
2783
+ full: '1.6.9-build.5549 +sha.a8830d2 ',
2784
2784
major: 1,
2785
2785
minor: 6,
2786
2786
dot: 9,
@@ -2930,7 +2930,7 @@ function publishExternalAPI(angular) {
2930
2930
});
2931
2931
}
2932
2932
])
2933
- .info({ angularVersion: '1.6.9-build.5548 +sha.4c97df5 ' });
2933
+ .info({ angularVersion: '1.6.9-build.5549 +sha.a8830d2 ' });
2934
2934
}
2935
2935
2936
2936
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -22225,6 +22225,7 @@ function sliceFn(input, begin, end) {
22225
22225
* index: ...
22226
22226
* }
22227
22227
* ```
22228
+ * **Note:** `null` values use `'null'` as their type.
22228
22229
* 2. The comparator function is used to sort the items, based on the derived values, types and
22229
22230
* indices.
22230
22231
*
@@ -22259,11 +22260,15 @@ function sliceFn(input, begin, end) {
22259
22260
*
22260
22261
* The default, built-in comparator should be sufficient for most usecases. In short, it compares
22261
22262
* numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to
22262
- * using their index in the original collection, and sorts values of different types by type.
22263
+ * using their index in the original collection, sorts values of different types by type and puts
22264
+ * `undefined` and `null` values at the end of the sorted list.
22263
22265
*
22264
22266
* More specifically, it follows these steps to determine the relative order of items:
22265
22267
*
22266
- * 1. If the compared values are of different types, compare the types themselves alphabetically.
22268
+ * 1. If the compared values are of different types:
22269
+ * - If one of the values is undefined, consider it "greater than" the other.
22270
+ * - Else if one of the values is null, consider it "greater than" the other.
22271
+ * - Else compare the types themselves alphabetically.
22267
22272
* 2. If both values are of type `string`, compare them alphabetically in a case- and
22268
22273
* locale-insensitive way.
22269
22274
* 3. If both values are objects, compare their indices instead.
@@ -22274,9 +22279,10 @@ function sliceFn(input, begin, end) {
22274
22279
*
22275
22280
* **Note:** If you notice numbers not being sorted as expected, make sure they are actually being
22276
22281
* saved as numbers and not strings.
22277
- * **Note:** For the purpose of sorting, `null` values are treated as the string `'null'` (i.e.
22278
- * `type: 'string'`, `value: 'null'`). This may cause unexpected sort order relative to
22279
- * other values.
22282
+ * **Note:** For the purpose of sorting, `null` and `undefined` are considered "greater than"
22283
+ * any other value (with undefined "greater than" null). This effectively means that `null`
22284
+ * and `undefined` values end up at the end of a list sorted in ascending order.
22285
+ * **Note:** `null` values use `'null'` as their type to be able to distinguish them from objects.
22280
22286
*
22281
22287
* @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.
22282
22288
* @param {(Function|string|Array.<Function|string>)=} expression - A predicate (or list of
@@ -22843,8 +22849,7 @@ function orderByFilter($parse) {
22843
22849
function getPredicateValue(value, index) {
22844
22850
var type = typeof value;
22845
22851
if (value === null) {
22846
- type = 'string';
22847
- value = 'null';
22852
+ type = 'null';
22848
22853
} else if (type === 'object') {
22849
22854
value = objectValue(value);
22850
22855
}
@@ -22875,7 +22880,11 @@ function orderByFilter($parse) {
22875
22880
result = value1 < value2 ? -1 : 1;
22876
22881
}
22877
22882
} else {
22878
- result = type1 < type2 ? -1 : 1;
22883
+ result = (type1 === 'undefined') ? 1 :
22884
+ (type2 === 'undefined') ? -1 :
22885
+ (type1 === 'null') ? 1 :
22886
+ (type2 === 'null') ? -1 :
22887
+ (type1 < type2) ? -1 : 1;
22879
22888
}
22880
22889
22881
22890
return result;
@@ -25376,9 +25385,9 @@ function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
25376
25385
deferListener(event, this, this.value);
25377
25386
});
25378
25387
25379
- // if user modifies input value using context menu in IE, we need "paste" and "cut " events to catch it
25388
+ // if user modifies input value using context menu in IE, we need "paste", "cut" and "drop " events to catch it
25380
25389
if ($sniffer.hasEvent('paste')) {
25381
- element.on('paste cut', deferListener);
25390
+ element.on('paste cut drop ', deferListener);
25382
25391
}
25383
25392
}
25384
25393
0 commit comments