1
1
/**
2
- * @license AngularJS v1.7.6
2
+ * @license AngularJS v1.7.7
3
3
* (c) 2010-2018 Google, Inc. http://angularjs.org
4
4
* License: MIT
5
5
*/
@@ -99,7 +99,7 @@ function isValidObjectMaxDepth(maxDepth) {
99
99
function minErr(module, ErrorConstructor) {
100
100
ErrorConstructor = ErrorConstructor || Error;
101
101
102
- var url = 'https://errors.angularjs.org/1.7.6 /';
102
+ var url = 'https://errors.angularjs.org/1.7.7 /';
103
103
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
104
104
var errRegExp = new RegExp(regex, 'g');
105
105
@@ -535,8 +535,8 @@ function extend(dst) {
535
535
* sinceVersion="1.6.5"
536
536
* This function is deprecated, but will not be removed in the 1.x lifecycle.
537
537
* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not
538
- * supported by this function. We suggest
539
- * using [lodash's merge()](https://lodash.com/docs/4.17.4#merge) instead .
538
+ * supported by this function. We suggest using another, similar library for all-purpose merging,
539
+ * such as [lodash's merge()](https://lodash.com/docs/4.17.4#merge).
540
540
*
541
541
* @knownIssue
542
542
* This is a list of (known) object types that are not handled correctly by this function:
@@ -545,6 +545,8 @@ function extend(dst) {
545
545
* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient)
546
546
* - AngularJS {@link $rootScope.Scope scopes};
547
547
*
548
+ * `angular.merge` also does not support merging objects with circular references.
549
+ *
548
550
* @param {Object} dst Destination object.
549
551
* @param {...Object} src Source object(s).
550
552
* @returns {Object} Reference to `dst`.
@@ -922,7 +924,9 @@ function arrayRemove(array, value) {
922
924
* @kind function
923
925
*
924
926
* @description
925
- * Creates a deep copy of `source`, which should be an object or an array.
927
+ * Creates a deep copy of `source`, which should be an object or an array. This functions is used
928
+ * internally, mostly in the change-detection code. It is not intended as an all-purpose copy
929
+ * function, and has several limitations (see below).
926
930
*
927
931
* * If no destination is supplied, a copy of the object or array is created.
928
932
* * If a destination is provided, all of its elements (for arrays) or properties (for objects)
@@ -937,6 +941,25 @@ function arrayRemove(array, value) {
937
941
* and on `destination`) will be ignored.
938
942
* </div>
939
943
*
944
+ * <div class="alert alert-warning">
945
+ * `angular.copy` does not check if destination and source are of the same type. It's the
946
+ * developer's responsibility to make sure they are compatible.
947
+ * </div>
948
+ *
949
+ * @knownIssue
950
+ * This is a non-exhaustive list of object types / features that are not handled correctly by
951
+ * `angular.copy`. Note that since this functions is used by the change detection code, this
952
+ * means binding or watching objects of these types (or that include these types) might not work
953
+ * correctly.
954
+ * - [`File`](https://developer.mozilla.org/docs/Web/API/File)
955
+ * - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)
956
+ * - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData)
957
+ * - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream)
958
+ * - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)
959
+ * - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)
960
+ * - ['getter'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/
961
+ * [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)`
962
+ *
940
963
* @param {*} source The source that will be used to make a copy. Can be any type, including
941
964
* primitives, `null`, and `undefined`.
942
965
* @param {(Object|Array)=} destination Destination into which the source is copied. If provided,
@@ -2782,11 +2805,11 @@ function toDebugString(obj, maxDepth) {
2782
2805
var version = {
2783
2806
// These placeholder strings will be replaced by grunt's `build` task.
2784
2807
// They need to be double- or single-quoted.
2785
- full: '1.7.6 ',
2808
+ full: '1.7.7 ',
2786
2809
major: 1,
2787
2810
minor: 7,
2788
- dot: 6 ,
2789
- codeName: 'gravity-manipulation '
2811
+ dot: 7 ,
2812
+ codeName: 'kingly-exiting '
2790
2813
};
2791
2814
2792
2815
@@ -2936,7 +2959,7 @@ function publishExternalAPI(angular) {
2936
2959
});
2937
2960
}
2938
2961
])
2939
- .info({ angularVersion: '1.7.6 ' });
2962
+ .info({ angularVersion: '1.7.7 ' });
2940
2963
}
2941
2964
2942
2965
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -24158,7 +24181,6 @@ var htmlAnchorDirective = valueFn({
24158
24181
</file>
24159
24182
</example>
24160
24183
*
24161
- * @element INPUT
24162
24184
* @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
24163
24185
* then the `disabled` attribute will be set on the element
24164
24186
*/
@@ -26060,8 +26082,10 @@ var inputType = {
26060
26082
*
26061
26083
* <div class="alert alert-warning">
26062
26084
* **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex
26063
- * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can
26064
- * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})
26085
+ * used in Chromium, which may not fulfill your app's requirements.
26086
+ * If you need stricter (e.g. requiring a top-level domain), or more relaxed validation
26087
+ * (e.g. allowing IPv6 address literals) you can use `ng-pattern` or
26088
+ * modify the built-in validators (see the {@link guide/forms Forms guide}).
26065
26089
* </div>
26066
26090
*
26067
26091
* @param {string} ngModel Assignable AngularJS expression to data-bind to.
@@ -35875,17 +35899,17 @@ var requiredDirective = ['$parse', function($parse) {
35875
35899
require: '?ngModel',
35876
35900
link: function(scope, elm, attr, ctrl) {
35877
35901
if (!ctrl) return;
35878
- var oldVal = attr.required || $parse(attr.ngRequired)(scope);
35902
+ var value = attr.required || $parse(attr.ngRequired)(scope);
35879
35903
35880
35904
attr.required = true; // force truthy in case we are on non input element
35881
35905
35882
35906
ctrl.$validators.required = function(modelValue, viewValue) {
35883
- return !attr.required || !ctrl.$isEmpty(viewValue);
35907
+ return !value || !ctrl.$isEmpty(viewValue);
35884
35908
};
35885
35909
35886
- attr.$observe('required', function(val ) {
35887
- if (oldVal !== val ) {
35888
- oldVal = val ;
35910
+ attr.$observe('required', function(newVal ) {
35911
+ if (value !== newVal ) {
35912
+ value = newVal ;
35889
35913
ctrl.$validate();
35890
35914
}
35891
35915
});
0 commit comments