angularjs-rails 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -6
- data/lib/angularjs-rails/version.rb +2 -2
- data/vendor/assets/javascripts/angular-animate.js +373 -309
- data/vendor/assets/javascripts/angular-aria.js +1 -1
- data/vendor/assets/javascripts/angular-cookies.js +2 -2
- data/vendor/assets/javascripts/angular-loader.js +4 -4
- data/vendor/assets/javascripts/angular-message-format.js +1 -1
- data/vendor/assets/javascripts/angular-messages.js +1 -1
- data/vendor/assets/javascripts/angular-mocks.js +13 -16
- data/vendor/assets/javascripts/angular-resource.js +1 -1
- data/vendor/assets/javascripts/angular-route.js +1 -1
- data/vendor/assets/javascripts/angular-sanitize.js +2 -2
- data/vendor/assets/javascripts/angular-scenario.js +546 -294
- data/vendor/assets/javascripts/angular-touch.js +1 -1
- data/vendor/assets/javascripts/angular.js +541 -301
- data/vendor/assets/javascripts/unstable/angular2.js +19310 -17231
- metadata +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.4.
|
2
|
+
* @license AngularJS v1.4.4
|
3
3
|
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -48,7 +48,7 @@ angular.module('ngCookies', ['ng']).
|
|
48
48
|
* - **secure** - `{boolean}` - The cookie will be available only in secured connection.
|
49
49
|
*
|
50
50
|
* Note: by default the address that appears in your `<base>` tag will be used as path.
|
51
|
-
* This is
|
51
|
+
* This is important so that cookies will be visible for all routes in case html5mode is enabled
|
52
52
|
*
|
53
53
|
**/
|
54
54
|
var defaults = this.defaults = {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.4.
|
2
|
+
* @license AngularJS v1.4.4
|
3
3
|
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -59,7 +59,7 @@ function minErr(module, ErrorConstructor) {
|
|
59
59
|
return match;
|
60
60
|
});
|
61
61
|
|
62
|
-
message += '\nhttp://errors.angularjs.org/1.4.
|
62
|
+
message += '\nhttp://errors.angularjs.org/1.4.4/' +
|
63
63
|
(module ? module + '/' : '') + code;
|
64
64
|
|
65
65
|
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
|
@@ -109,8 +109,8 @@ function setupModuleLoader(window) {
|
|
109
109
|
* All modules (angular core or 3rd party) that should be available to an application must be
|
110
110
|
* registered using this mechanism.
|
111
111
|
*
|
112
|
-
*
|
113
|
-
*
|
112
|
+
* Passing one argument retrieves an existing {@link angular.Module},
|
113
|
+
* whereas passing more than one argument creates a new {@link angular.Module}
|
114
114
|
*
|
115
115
|
*
|
116
116
|
* # Module
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.4.
|
2
|
+
* @license AngularJS v1.4.4
|
3
3
|
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -762,20 +762,23 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
|
|
762
762
|
|
763
763
|
.config(['$provide', function($provide) {
|
764
764
|
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
};
|
765
|
+
$provide.factory('$$forceReflow', function() {
|
766
|
+
function reflowFn() {
|
767
|
+
reflowFn.totalReflows++;
|
768
|
+
}
|
769
|
+
reflowFn.totalReflows = 0;
|
770
|
+
return reflowFn;
|
772
771
|
});
|
773
772
|
|
774
|
-
$provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF',
|
775
|
-
function($delegate, $timeout, $browser, $$rAF) {
|
773
|
+
$provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF', '$$forceReflow',
|
774
|
+
function($delegate, $timeout, $browser, $$rAF, $$forceReflow) {
|
775
|
+
|
776
776
|
var animate = {
|
777
777
|
queue: [],
|
778
778
|
cancel: $delegate.cancel,
|
779
|
+
get reflows() {
|
780
|
+
return $$forceReflow.totalReflows;
|
781
|
+
},
|
779
782
|
enabled: $delegate.enabled,
|
780
783
|
triggerCallbackEvents: function() {
|
781
784
|
$$rAF.flush();
|
@@ -786,12 +789,6 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
|
|
786
789
|
triggerCallbacks: function() {
|
787
790
|
this.triggerCallbackEvents();
|
788
791
|
this.triggerCallbackPromise();
|
789
|
-
},
|
790
|
-
triggerReflow: function() {
|
791
|
-
angular.forEach(reflowQueue, function(fn) {
|
792
|
-
fn();
|
793
|
-
});
|
794
|
-
reflowQueue = [];
|
795
792
|
}
|
796
793
|
};
|
797
794
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license AngularJS v1.4.
|
2
|
+
* @license AngularJS v1.4.4
|
3
3
|
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
4
|
* License: MIT
|
5
5
|
*/
|
@@ -631,7 +631,7 @@ angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
|
|
631
631
|
*/
|
632
632
|
angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
|
633
633
|
var LINKY_URL_REGEXP =
|
634
|
-
/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"
|
634
|
+
/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
|
635
635
|
MAILTO_REGEXP = /^mailto:/i;
|
636
636
|
|
637
637
|
return function(text, target) {
|
@@ -9190,7 +9190,7 @@ return jQuery;
|
|
9190
9190
|
}));
|
9191
9191
|
|
9192
9192
|
/**
|
9193
|
-
* @license AngularJS v1.4.
|
9193
|
+
* @license AngularJS v1.4.4
|
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.
|
9252
|
+
message += '\nhttp://errors.angularjs.org/1.4.4/' +
|
9253
9253
|
(module ? module + '/' : '') + code;
|
9254
9254
|
|
9255
9255
|
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
|
@@ -9615,6 +9615,8 @@ function baseExtend(dst, objs, deep) {
|
|
9615
9615
|
if (deep && isObject(src)) {
|
9616
9616
|
if (isDate(src)) {
|
9617
9617
|
dst[key] = new Date(src.valueOf());
|
9618
|
+
} else if (isRegExp(src)) {
|
9619
|
+
dst[key] = new RegExp(src);
|
9618
9620
|
} else {
|
9619
9621
|
if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
|
9620
9622
|
baseExtend(dst[key], [src], true);
|
@@ -10245,22 +10247,39 @@ function equals(o1, o2) {
|
|
10245
10247
|
}
|
10246
10248
|
|
10247
10249
|
var csp = function() {
|
10248
|
-
if (isDefined(csp.
|
10250
|
+
if (!isDefined(csp.rules)) {
|
10249
10251
|
|
10250
|
-
var active = !!(document.querySelector('[ng-csp]') ||
|
10251
|
-
document.querySelector('[data-ng-csp]'));
|
10252
10252
|
|
10253
|
-
|
10253
|
+
var ngCspElement = (document.querySelector('[ng-csp]') ||
|
10254
|
+
document.querySelector('[data-ng-csp]'));
|
10255
|
+
|
10256
|
+
if (ngCspElement) {
|
10257
|
+
var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
|
10258
|
+
ngCspElement.getAttribute('data-ng-csp');
|
10259
|
+
csp.rules = {
|
10260
|
+
noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),
|
10261
|
+
noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)
|
10262
|
+
};
|
10263
|
+
} else {
|
10264
|
+
csp.rules = {
|
10265
|
+
noUnsafeEval: noUnsafeEval(),
|
10266
|
+
noInlineStyle: false
|
10267
|
+
};
|
10268
|
+
}
|
10269
|
+
}
|
10270
|
+
|
10271
|
+
return csp.rules;
|
10272
|
+
|
10273
|
+
function noUnsafeEval() {
|
10254
10274
|
try {
|
10255
10275
|
/* jshint -W031, -W054 */
|
10256
10276
|
new Function('');
|
10257
10277
|
/* jshint +W031, +W054 */
|
10278
|
+
return false;
|
10258
10279
|
} catch (e) {
|
10259
|
-
|
10280
|
+
return true;
|
10260
10281
|
}
|
10261
10282
|
}
|
10262
|
-
|
10263
|
-
return (csp.isActive_ = active);
|
10264
10283
|
};
|
10265
10284
|
|
10266
10285
|
/**
|
@@ -10492,13 +10511,19 @@ function tryDecodeURIComponent(value) {
|
|
10492
10511
|
* @returns {Object.<string,boolean|Array>}
|
10493
10512
|
*/
|
10494
10513
|
function parseKeyValue(/**string*/keyValue) {
|
10495
|
-
var obj = {}
|
10514
|
+
var obj = {};
|
10496
10515
|
forEach((keyValue || "").split('&'), function(keyValue) {
|
10516
|
+
var splitPoint, key, val;
|
10497
10517
|
if (keyValue) {
|
10498
|
-
|
10499
|
-
|
10518
|
+
key = keyValue = keyValue.replace(/\+/g,'%20');
|
10519
|
+
splitPoint = keyValue.indexOf('=');
|
10520
|
+
if (splitPoint !== -1) {
|
10521
|
+
key = keyValue.substring(0, splitPoint);
|
10522
|
+
val = keyValue.substring(splitPoint + 1);
|
10523
|
+
}
|
10524
|
+
key = tryDecodeURIComponent(key);
|
10500
10525
|
if (isDefined(key)) {
|
10501
|
-
|
10526
|
+
val = isDefined(val) ? tryDecodeURIComponent(val) : true;
|
10502
10527
|
if (!hasOwnProperty.call(obj, key)) {
|
10503
10528
|
obj[key] = val;
|
10504
10529
|
} else if (isArray(obj[key])) {
|
@@ -11094,8 +11119,8 @@ function setupModuleLoader(window) {
|
|
11094
11119
|
* All modules (angular core or 3rd party) that should be available to an application must be
|
11095
11120
|
* registered using this mechanism.
|
11096
11121
|
*
|
11097
|
-
*
|
11098
|
-
*
|
11122
|
+
* Passing one argument retrieves an existing {@link angular.Module},
|
11123
|
+
* whereas passing more than one argument creates a new {@link angular.Module}
|
11099
11124
|
*
|
11100
11125
|
*
|
11101
11126
|
* # Module
|
@@ -11436,7 +11461,6 @@ function toDebugString(obj) {
|
|
11436
11461
|
/* global angularModule: true,
|
11437
11462
|
version: true,
|
11438
11463
|
|
11439
|
-
$LocaleProvider,
|
11440
11464
|
$CompileProvider,
|
11441
11465
|
|
11442
11466
|
htmlAnchorDirective,
|
@@ -11453,7 +11477,6 @@ function toDebugString(obj) {
|
|
11453
11477
|
ngClassDirective,
|
11454
11478
|
ngClassEvenDirective,
|
11455
11479
|
ngClassOddDirective,
|
11456
|
-
ngCspDirective,
|
11457
11480
|
ngCloakDirective,
|
11458
11481
|
ngControllerDirective,
|
11459
11482
|
ngFormDirective,
|
@@ -11490,6 +11513,7 @@ function toDebugString(obj) {
|
|
11490
11513
|
|
11491
11514
|
$AnchorScrollProvider,
|
11492
11515
|
$AnimateProvider,
|
11516
|
+
$CoreAnimateCssProvider,
|
11493
11517
|
$$CoreAnimateQueueProvider,
|
11494
11518
|
$$CoreAnimateRunnerProvider,
|
11495
11519
|
$BrowserProvider,
|
@@ -11498,6 +11522,7 @@ function toDebugString(obj) {
|
|
11498
11522
|
$DocumentProvider,
|
11499
11523
|
$ExceptionHandlerProvider,
|
11500
11524
|
$FilterProvider,
|
11525
|
+
$$ForceReflowProvider,
|
11501
11526
|
$InterpolateProvider,
|
11502
11527
|
$IntervalProvider,
|
11503
11528
|
$$HashMapProvider,
|
@@ -11541,11 +11566,11 @@ function toDebugString(obj) {
|
|
11541
11566
|
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
|
11542
11567
|
*/
|
11543
11568
|
var version = {
|
11544
|
-
full: '1.4.
|
11569
|
+
full: '1.4.4', // all of these placeholder strings will be replaced by grunt's
|
11545
11570
|
major: 1, // package task
|
11546
11571
|
minor: 4,
|
11547
|
-
dot:
|
11548
|
-
codeName: '
|
11572
|
+
dot: 4,
|
11573
|
+
codeName: 'pylon-requirement'
|
11549
11574
|
};
|
11550
11575
|
|
11551
11576
|
|
@@ -11584,11 +11609,6 @@ function publishExternalAPI(angular) {
|
|
11584
11609
|
});
|
11585
11610
|
|
11586
11611
|
angularModule = setupModuleLoader(window);
|
11587
|
-
try {
|
11588
|
-
angularModule('ngLocale');
|
11589
|
-
} catch (e) {
|
11590
|
-
angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
|
11591
|
-
}
|
11592
11612
|
|
11593
11613
|
angularModule('ng', ['ngLocale'], ['$provide',
|
11594
11614
|
function ngModule($provide) {
|
@@ -11651,6 +11671,7 @@ function publishExternalAPI(angular) {
|
|
11651
11671
|
$provide.provider({
|
11652
11672
|
$anchorScroll: $AnchorScrollProvider,
|
11653
11673
|
$animate: $AnimateProvider,
|
11674
|
+
$animateCss: $CoreAnimateCssProvider,
|
11654
11675
|
$$animateQueue: $$CoreAnimateQueueProvider,
|
11655
11676
|
$$AnimateRunner: $$CoreAnimateRunnerProvider,
|
11656
11677
|
$browser: $BrowserProvider,
|
@@ -11659,6 +11680,7 @@ function publishExternalAPI(angular) {
|
|
11659
11680
|
$document: $DocumentProvider,
|
11660
11681
|
$exceptionHandler: $ExceptionHandlerProvider,
|
11661
11682
|
$filter: $FilterProvider,
|
11683
|
+
$$forceReflow: $$ForceReflowProvider,
|
11662
11684
|
$interpolate: $InterpolateProvider,
|
11663
11685
|
$interval: $IntervalProvider,
|
11664
11686
|
$http: $HttpProvider,
|
@@ -12878,7 +12900,7 @@ var $$HashMapProvider = [function() {
|
|
12878
12900
|
* Implicit module which gets automatically added to each {@link auto.$injector $injector}.
|
12879
12901
|
*/
|
12880
12902
|
|
12881
|
-
var FN_ARGS = /^
|
12903
|
+
var FN_ARGS = /^[^\(]*\(\s*([^\)]*)\)/m;
|
12882
12904
|
var FN_ARG_SPLIT = /,/;
|
12883
12905
|
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
|
12884
12906
|
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
|
@@ -13534,6 +13556,7 @@ function createInjector(modulesToLoad, strictDi) {
|
|
13534
13556
|
// Module Loading
|
13535
13557
|
////////////////////////////////////
|
13536
13558
|
function loadModules(modulesToLoad) {
|
13559
|
+
assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');
|
13537
13560
|
var runBlocks = [], moduleFn;
|
13538
13561
|
forEach(modulesToLoad, function(module) {
|
13539
13562
|
if (loadedModules.get(module)) return;
|
@@ -14043,31 +14066,31 @@ var $$CoreAnimateQueueProvider = function() {
|
|
14043
14066
|
};
|
14044
14067
|
|
14045
14068
|
function addRemoveClassesPostDigest(element, add, remove) {
|
14046
|
-
var data = postDigestQueue.get(element);
|
14047
|
-
var classVal;
|
14069
|
+
var classVal, data = postDigestQueue.get(element);
|
14048
14070
|
|
14049
14071
|
if (!data) {
|
14050
14072
|
postDigestQueue.put(element, data = {});
|
14051
14073
|
postDigestElements.push(element);
|
14052
14074
|
}
|
14053
14075
|
|
14054
|
-
|
14055
|
-
|
14056
|
-
|
14057
|
-
|
14058
|
-
|
14059
|
-
|
14060
|
-
|
14061
|
-
|
14062
|
-
|
14063
|
-
|
14064
|
-
|
14065
|
-
|
14066
|
-
|
14067
|
-
|
14068
|
-
}
|
14076
|
+
var updateData = function(classes, value) {
|
14077
|
+
var changed = false;
|
14078
|
+
if (classes) {
|
14079
|
+
classes = isString(classes) ? classes.split(' ') :
|
14080
|
+
isArray(classes) ? classes : [];
|
14081
|
+
forEach(classes, function(className) {
|
14082
|
+
if (className) {
|
14083
|
+
changed = true;
|
14084
|
+
data[className] = value;
|
14085
|
+
}
|
14086
|
+
});
|
14087
|
+
}
|
14088
|
+
return changed;
|
14089
|
+
};
|
14069
14090
|
|
14070
|
-
|
14091
|
+
var classesAdded = updateData(add, true);
|
14092
|
+
var classesRemoved = updateData(remove, false);
|
14093
|
+
if ((!classesAdded && !classesRemoved) || postDigestElements.length > 1) return;
|
14071
14094
|
|
14072
14095
|
$rootScope.$$postDigest(function() {
|
14073
14096
|
forEach(postDigestElements, function(element) {
|
@@ -14526,15 +14549,88 @@ var $AnimateProvider = ['$provide', function($provide) {
|
|
14526
14549
|
}];
|
14527
14550
|
}];
|
14528
14551
|
|
14529
|
-
|
14530
|
-
|
14531
|
-
|
14532
|
-
|
14533
|
-
|
14534
|
-
|
14552
|
+
/**
|
14553
|
+
* @ngdoc service
|
14554
|
+
* @name $animateCss
|
14555
|
+
* @kind object
|
14556
|
+
*
|
14557
|
+
* @description
|
14558
|
+
* This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,
|
14559
|
+
* then the `$animateCss` service will actually perform animations.
|
14560
|
+
*
|
14561
|
+
* Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.
|
14562
|
+
*/
|
14563
|
+
var $CoreAnimateCssProvider = function() {
|
14564
|
+
this.$get = ['$$rAF', '$q', function($$rAF, $q) {
|
14565
|
+
|
14566
|
+
var RAFPromise = function() {};
|
14567
|
+
RAFPromise.prototype = {
|
14568
|
+
done: function(cancel) {
|
14569
|
+
this.defer && this.defer[cancel === true ? 'reject' : 'resolve']();
|
14570
|
+
},
|
14571
|
+
end: function() {
|
14572
|
+
this.done();
|
14573
|
+
},
|
14574
|
+
cancel: function() {
|
14575
|
+
this.done(true);
|
14576
|
+
},
|
14577
|
+
getPromise: function() {
|
14578
|
+
if (!this.defer) {
|
14579
|
+
this.defer = $q.defer();
|
14580
|
+
}
|
14581
|
+
return this.defer.promise;
|
14582
|
+
},
|
14583
|
+
then: function(f1,f2) {
|
14584
|
+
return this.getPromise().then(f1,f2);
|
14585
|
+
},
|
14586
|
+
'catch': function(f1) {
|
14587
|
+
return this.getPromise().catch(f1);
|
14588
|
+
},
|
14589
|
+
'finally': function(f1) {
|
14590
|
+
return this.getPromise().finally(f1);
|
14591
|
+
}
|
14592
|
+
};
|
14593
|
+
|
14594
|
+
return function(element, options) {
|
14595
|
+
if (options.from) {
|
14596
|
+
element.css(options.from);
|
14597
|
+
options.from = null;
|
14598
|
+
}
|
14599
|
+
|
14600
|
+
var closed, runner = new RAFPromise();
|
14601
|
+
return {
|
14602
|
+
start: run,
|
14603
|
+
end: run
|
14535
14604
|
};
|
14605
|
+
|
14606
|
+
function run() {
|
14607
|
+
$$rAF(function() {
|
14608
|
+
close();
|
14609
|
+
if (!closed) {
|
14610
|
+
runner.done();
|
14611
|
+
}
|
14612
|
+
closed = true;
|
14613
|
+
});
|
14614
|
+
return runner;
|
14615
|
+
}
|
14616
|
+
|
14617
|
+
function close() {
|
14618
|
+
if (options.addClass) {
|
14619
|
+
element.addClass(options.addClass);
|
14620
|
+
options.addClass = null;
|
14621
|
+
}
|
14622
|
+
if (options.removeClass) {
|
14623
|
+
element.removeClass(options.removeClass);
|
14624
|
+
options.removeClass = null;
|
14625
|
+
}
|
14626
|
+
if (options.to) {
|
14627
|
+
element.css(options.to);
|
14628
|
+
options.to = null;
|
14629
|
+
}
|
14630
|
+
}
|
14631
|
+
};
|
14536
14632
|
}];
|
14537
|
-
}
|
14633
|
+
};
|
14538
14634
|
|
14539
14635
|
/* global stripHash: true */
|
14540
14636
|
|
@@ -15698,7 +15794,7 @@ function $TemplateCacheProvider() {
|
|
15698
15794
|
* otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.
|
15699
15795
|
*
|
15700
15796
|
* Note that you can also require the directive's own controller - it will be made available like
|
15701
|
-
*
|
15797
|
+
* any other controller.
|
15702
15798
|
*
|
15703
15799
|
* * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
|
15704
15800
|
* This is the same as the `$transclude`
|
@@ -15724,7 +15820,7 @@ function $TemplateCacheProvider() {
|
|
15724
15820
|
*
|
15725
15821
|
* ### Transclusion
|
15726
15822
|
*
|
15727
|
-
* Transclusion is the process of extracting a collection of DOM
|
15823
|
+
* Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and
|
15728
15824
|
* copying them to another part of the DOM, while maintaining their connection to the original AngularJS
|
15729
15825
|
* scope from where they were taken.
|
15730
15826
|
*
|
@@ -16479,7 +16575,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
16479
16575
|
|
16480
16576
|
listeners.push(fn);
|
16481
16577
|
$rootScope.$evalAsync(function() {
|
16482
|
-
if (!listeners.$$inter && attrs.hasOwnProperty(key)) {
|
16578
|
+
if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {
|
16483
16579
|
// no one registered attribute interpolation function, so lets call it manually
|
16484
16580
|
fn(attrs[key]);
|
16485
16581
|
}
|
@@ -17858,24 +17954,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
17858
17954
|
lastValue,
|
17859
17955
|
parentGet, parentSet, compare;
|
17860
17956
|
|
17861
|
-
if (!hasOwnProperty.call(attrs, attrName)) {
|
17862
|
-
// In the case of user defined a binding with the same name as a method in Object.prototype but didn't set
|
17863
|
-
// the corresponding attribute. We need to make sure subsequent code won't access to the prototype function
|
17864
|
-
attrs[attrName] = undefined;
|
17865
|
-
}
|
17866
|
-
|
17867
17957
|
switch (mode) {
|
17868
17958
|
|
17869
17959
|
case '@':
|
17870
|
-
if (!
|
17871
|
-
destination[scopeName] =
|
17960
|
+
if (!optional && !hasOwnProperty.call(attrs, attrName)) {
|
17961
|
+
destination[scopeName] = attrs[attrName] = void 0;
|
17872
17962
|
}
|
17873
|
-
|
17874
17963
|
attrs.$observe(attrName, function(value) {
|
17875
|
-
|
17964
|
+
if (isString(value)) {
|
17965
|
+
destination[scopeName] = value;
|
17966
|
+
}
|
17876
17967
|
});
|
17877
17968
|
attrs.$$observers[attrName].$$scope = scope;
|
17878
|
-
if (attrs[attrName]) {
|
17969
|
+
if (isString(attrs[attrName])) {
|
17879
17970
|
// If the attribute has been provided then we trigger an interpolation to ensure
|
17880
17971
|
// the value is there for use in the link fn
|
17881
17972
|
destination[scopeName] = $interpolate(attrs[attrName])(scope);
|
@@ -17883,11 +17974,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
17883
17974
|
break;
|
17884
17975
|
|
17885
17976
|
case '=':
|
17886
|
-
if (
|
17887
|
-
|
17977
|
+
if (!hasOwnProperty.call(attrs, attrName)) {
|
17978
|
+
if (optional) break;
|
17979
|
+
attrs[attrName] = void 0;
|
17888
17980
|
}
|
17889
|
-
|
17981
|
+
if (optional && !attrs[attrName]) break;
|
17890
17982
|
|
17983
|
+
parentGet = $parse(attrs[attrName]);
|
17891
17984
|
if (parentGet.literal) {
|
17892
17985
|
compare = equals;
|
17893
17986
|
} else {
|
@@ -17926,7 +18019,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
17926
18019
|
break;
|
17927
18020
|
|
17928
18021
|
case '&':
|
17929
|
-
|
18022
|
+
// Don't assign Object.prototype method to scope
|
18023
|
+
parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;
|
17930
18024
|
|
17931
18025
|
// Don't assign noop to destination if expression is not valid
|
17932
18026
|
if (parentGet === noop && optional) break;
|
@@ -18303,6 +18397,29 @@ function $ExceptionHandlerProvider() {
|
|
18303
18397
|
}];
|
18304
18398
|
}
|
18305
18399
|
|
18400
|
+
var $$ForceReflowProvider = function() {
|
18401
|
+
this.$get = ['$document', function($document) {
|
18402
|
+
return function(domNode) {
|
18403
|
+
//the line below will force the browser to perform a repaint so
|
18404
|
+
//that all the animated elements within the animation frame will
|
18405
|
+
//be properly updated and drawn on screen. This is required to
|
18406
|
+
//ensure that the preparation animation is properly flushed so that
|
18407
|
+
//the active state picks up from there. DO NOT REMOVE THIS LINE.
|
18408
|
+
//DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH
|
18409
|
+
//WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND
|
18410
|
+
//WILL TAKE YEARS AWAY FROM YOUR LIFE.
|
18411
|
+
if (domNode) {
|
18412
|
+
if (!domNode.nodeType && domNode instanceof jqLite) {
|
18413
|
+
domNode = domNode[0];
|
18414
|
+
}
|
18415
|
+
} else {
|
18416
|
+
domNode = $document[0].body;
|
18417
|
+
}
|
18418
|
+
return domNode.offsetWidth + 1;
|
18419
|
+
};
|
18420
|
+
}];
|
18421
|
+
};
|
18422
|
+
|
18306
18423
|
var APPLICATION_JSON = 'application/json';
|
18307
18424
|
var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
|
18308
18425
|
var JSON_START = /^\[|^\{(?!\{)/;
|
@@ -18311,6 +18428,12 @@ var JSON_ENDS = {
|
|
18311
18428
|
'{': /}$/
|
18312
18429
|
};
|
18313
18430
|
var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/;
|
18431
|
+
var $httpMinErr = minErr('$http');
|
18432
|
+
var $httpMinErrLegacyFn = function(method) {
|
18433
|
+
return function() {
|
18434
|
+
throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);
|
18435
|
+
};
|
18436
|
+
};
|
18314
18437
|
|
18315
18438
|
function serializeValue(v) {
|
18316
18439
|
if (isObject(v)) {
|
@@ -18411,8 +18534,8 @@ function $HttpParamSerializerJQLikeProvider() {
|
|
18411
18534
|
function serialize(toSerialize, prefix, topLevel) {
|
18412
18535
|
if (toSerialize === null || isUndefined(toSerialize)) return;
|
18413
18536
|
if (isArray(toSerialize)) {
|
18414
|
-
forEach(toSerialize, function(value) {
|
18415
|
-
serialize(value, prefix + '[]');
|
18537
|
+
forEach(toSerialize, function(value, index) {
|
18538
|
+
serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');
|
18416
18539
|
});
|
18417
18540
|
} else if (isObject(toSerialize) && !isDate(toSerialize)) {
|
18418
18541
|
forEachSorted(toSerialize, function(value, key) {
|
@@ -18633,6 +18756,30 @@ function $HttpProvider() {
|
|
18633
18756
|
return useApplyAsync;
|
18634
18757
|
};
|
18635
18758
|
|
18759
|
+
var useLegacyPromise = true;
|
18760
|
+
/**
|
18761
|
+
* @ngdoc method
|
18762
|
+
* @name $httpProvider#useLegacyPromiseExtensions
|
18763
|
+
* @description
|
18764
|
+
*
|
18765
|
+
* Configure `$http` service to return promises without the shorthand methods `success` and `error`.
|
18766
|
+
* This should be used to make sure that applications work without these methods.
|
18767
|
+
*
|
18768
|
+
* Defaults to false. If no value is specified, returns the current configured value.
|
18769
|
+
*
|
18770
|
+
* @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods.
|
18771
|
+
*
|
18772
|
+
* @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
|
18773
|
+
* otherwise, returns the current configured value.
|
18774
|
+
**/
|
18775
|
+
this.useLegacyPromiseExtensions = function(value) {
|
18776
|
+
if (isDefined(value)) {
|
18777
|
+
useLegacyPromise = !!value;
|
18778
|
+
return this;
|
18779
|
+
}
|
18780
|
+
return useLegacyPromise;
|
18781
|
+
};
|
18782
|
+
|
18636
18783
|
/**
|
18637
18784
|
* @ngdoc property
|
18638
18785
|
* @name $httpProvider#interceptors
|
@@ -18699,17 +18846,15 @@ function $HttpProvider() {
|
|
18699
18846
|
*
|
18700
18847
|
* ## General usage
|
18701
18848
|
* The `$http` service is a function which takes a single argument — a configuration object —
|
18702
|
-
* that is used to generate an HTTP request and returns a {@link ng.$q promise}
|
18703
|
-
* with two $http specific methods: `success` and `error`.
|
18849
|
+
* that is used to generate an HTTP request and returns a {@link ng.$q promise}.
|
18704
18850
|
*
|
18705
18851
|
* ```js
|
18706
18852
|
* // Simple GET request example :
|
18707
18853
|
* $http.get('/someUrl').
|
18708
|
-
*
|
18854
|
+
* then(function(response) {
|
18709
18855
|
* // this callback will be called asynchronously
|
18710
18856
|
* // when the response is available
|
18711
|
-
* })
|
18712
|
-
* error(function(data, status, headers, config) {
|
18857
|
+
* }, function(response) {
|
18713
18858
|
* // called asynchronously if an error occurs
|
18714
18859
|
* // or server returns response with an error status.
|
18715
18860
|
* });
|
@@ -18718,21 +18863,23 @@ function $HttpProvider() {
|
|
18718
18863
|
* ```js
|
18719
18864
|
* // Simple POST request example (passing data) :
|
18720
18865
|
* $http.post('/someUrl', {msg:'hello word!'}).
|
18721
|
-
*
|
18866
|
+
* then(function(response) {
|
18722
18867
|
* // this callback will be called asynchronously
|
18723
18868
|
* // when the response is available
|
18724
|
-
* })
|
18725
|
-
* error(function(data, status, headers, config) {
|
18869
|
+
* }, function(response) {
|
18726
18870
|
* // called asynchronously if an error occurs
|
18727
18871
|
* // or server returns response with an error status.
|
18728
18872
|
* });
|
18729
18873
|
* ```
|
18730
18874
|
*
|
18875
|
+
* The response object has these properties:
|
18731
18876
|
*
|
18732
|
-
*
|
18733
|
-
*
|
18734
|
-
*
|
18735
|
-
*
|
18877
|
+
* - **data** – `{string|Object}` – The response body transformed with the transform
|
18878
|
+
* functions.
|
18879
|
+
* - **status** – `{number}` – HTTP status code of the response.
|
18880
|
+
* - **headers** – `{function([headerName])}` – Header getter function.
|
18881
|
+
* - **config** – `{Object}` – The configuration object that was used to generate the request.
|
18882
|
+
* - **statusText** – `{string}` – HTTP status text of the response.
|
18736
18883
|
*
|
18737
18884
|
* A response status code between 200 and 299 is considered a success status and
|
18738
18885
|
* will result in the success callback being called. Note that if the response is a redirect,
|
@@ -18756,8 +18903,8 @@ function $HttpProvider() {
|
|
18756
18903
|
* request data must be passed in for POST/PUT requests.
|
18757
18904
|
*
|
18758
18905
|
* ```js
|
18759
|
-
* $http.get('/someUrl').
|
18760
|
-
* $http.post('/someUrl', data).
|
18906
|
+
* $http.get('/someUrl').then(successCallback);
|
18907
|
+
* $http.post('/someUrl', data).then(successCallback);
|
18761
18908
|
* ```
|
18762
18909
|
*
|
18763
18910
|
* Complete list of shortcut methods:
|
@@ -18771,6 +18918,14 @@ function $HttpProvider() {
|
|
18771
18918
|
* - {@link ng.$http#patch $http.patch}
|
18772
18919
|
*
|
18773
18920
|
*
|
18921
|
+
* ## Deprecation Notice
|
18922
|
+
* <div class="alert alert-danger">
|
18923
|
+
* The `$http` legacy promise methods `success` and `error` have been deprecated.
|
18924
|
+
* Use the standard `then` method instead.
|
18925
|
+
* If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to
|
18926
|
+
* `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.
|
18927
|
+
* </div>
|
18928
|
+
*
|
18774
18929
|
* ## Setting HTTP Headers
|
18775
18930
|
*
|
18776
18931
|
* The $http service will automatically add certain HTTP headers to all requests. These defaults
|
@@ -18814,7 +18969,7 @@ function $HttpProvider() {
|
|
18814
18969
|
* data: { test: 'test' }
|
18815
18970
|
* }
|
18816
18971
|
*
|
18817
|
-
* $http(req).
|
18972
|
+
* $http(req).then(function(){...}, function(){...});
|
18818
18973
|
* ```
|
18819
18974
|
*
|
18820
18975
|
* ## Transforming Requests and Responses
|
@@ -19046,7 +19201,6 @@ function $HttpProvider() {
|
|
19046
19201
|
* In order to prevent collisions in environments where multiple Angular apps share the
|
19047
19202
|
* same domain or subdomain, we recommend that each application uses unique cookie name.
|
19048
19203
|
*
|
19049
|
-
*
|
19050
19204
|
* @param {object} config Object describing the request to be made and how it should be
|
19051
19205
|
* processed. The object has following properties:
|
19052
19206
|
*
|
@@ -19091,20 +19245,9 @@ function $HttpProvider() {
|
|
19091
19245
|
* - **responseType** - `{string}` - see
|
19092
19246
|
* [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).
|
19093
19247
|
*
|
19094
|
-
* @returns {HttpPromise} Returns a {@link ng.$q
|
19095
|
-
*
|
19096
|
-
* method takes two arguments a success and an error callback which will be called with a
|
19097
|
-
* response object. The `success` and `error` methods take a single argument - a function that
|
19098
|
-
* will be called when the request succeeds or fails respectively. The arguments passed into
|
19099
|
-
* these functions are destructured representation of the response object passed into the
|
19100
|
-
* `then` method. The response object has these properties:
|
19248
|
+
* @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object
|
19249
|
+
* when the request succeeds or fails.
|
19101
19250
|
*
|
19102
|
-
* - **data** – `{string|Object}` – The response body transformed with the transform
|
19103
|
-
* functions.
|
19104
|
-
* - **status** – `{number}` – HTTP status code of the response.
|
19105
|
-
* - **headers** – `{function([headerName])}` – Header getter function.
|
19106
|
-
* - **config** – `{Object}` – The configuration object that was used to generate the request.
|
19107
|
-
* - **statusText** – `{string}` – HTTP status text of the response.
|
19108
19251
|
*
|
19109
19252
|
* @property {Array.<Object>} pendingRequests Array of config objects for currently pending
|
19110
19253
|
* requests. This is primarily meant to be used for debugging purposes.
|
@@ -19146,13 +19289,12 @@ function $HttpProvider() {
|
|
19146
19289
|
$scope.response = null;
|
19147
19290
|
|
19148
19291
|
$http({method: $scope.method, url: $scope.url, cache: $templateCache}).
|
19149
|
-
|
19150
|
-
$scope.status = status;
|
19151
|
-
$scope.data = data;
|
19152
|
-
})
|
19153
|
-
|
19154
|
-
$scope.
|
19155
|
-
$scope.status = status;
|
19292
|
+
then(function(response) {
|
19293
|
+
$scope.status = response.status;
|
19294
|
+
$scope.data = response.data;
|
19295
|
+
}, function(response) {
|
19296
|
+
$scope.data = response.data || "Request failed";
|
19297
|
+
$scope.status = response.status;
|
19156
19298
|
});
|
19157
19299
|
};
|
19158
19300
|
|
@@ -19257,23 +19399,28 @@ function $HttpProvider() {
|
|
19257
19399
|
promise = promise.then(thenFn, rejectFn);
|
19258
19400
|
}
|
19259
19401
|
|
19260
|
-
|
19261
|
-
|
19402
|
+
if (useLegacyPromise) {
|
19403
|
+
promise.success = function(fn) {
|
19404
|
+
assertArgFn(fn, 'fn');
|
19262
19405
|
|
19263
|
-
|
19264
|
-
|
19265
|
-
|
19266
|
-
|
19267
|
-
|
19406
|
+
promise.then(function(response) {
|
19407
|
+
fn(response.data, response.status, response.headers, config);
|
19408
|
+
});
|
19409
|
+
return promise;
|
19410
|
+
};
|
19268
19411
|
|
19269
|
-
|
19270
|
-
|
19412
|
+
promise.error = function(fn) {
|
19413
|
+
assertArgFn(fn, 'fn');
|
19271
19414
|
|
19272
|
-
|
19273
|
-
|
19274
|
-
|
19275
|
-
|
19276
|
-
|
19415
|
+
promise.then(null, function(response) {
|
19416
|
+
fn(response.data, response.status, response.headers, config);
|
19417
|
+
});
|
19418
|
+
return promise;
|
19419
|
+
};
|
19420
|
+
} else {
|
19421
|
+
promise.success = $httpMinErrLegacyFn('success');
|
19422
|
+
promise.error = $httpMinErrLegacyFn('error');
|
19423
|
+
}
|
19277
19424
|
|
19278
19425
|
return promise;
|
19279
19426
|
|
@@ -19652,7 +19799,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
|
|
19652
19799
|
xhr.onload = function requestLoaded() {
|
19653
19800
|
var statusText = xhr.statusText || '';
|
19654
19801
|
|
19655
|
-
// responseText is the old-school way of retrieving response (supported by
|
19802
|
+
// responseText is the old-school way of retrieving response (supported by IE9)
|
19656
19803
|
// response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
|
19657
19804
|
var response = ('response' in xhr) ? xhr.response : xhr.responseText;
|
19658
19805
|
|
@@ -20290,7 +20437,7 @@ function $IntervalProvider() {
|
|
20290
20437
|
* @description
|
20291
20438
|
* Cancels a task associated with the `promise`.
|
20292
20439
|
*
|
20293
|
-
* @param {
|
20440
|
+
* @param {Promise=} promise returned by the `$interval` function.
|
20294
20441
|
* @returns {boolean} Returns `true` if the task was successfully canceled.
|
20295
20442
|
*/
|
20296
20443
|
interval.cancel = function(promise) {
|
@@ -20317,75 +20464,6 @@ function $IntervalProvider() {
|
|
20317
20464
|
*
|
20318
20465
|
* * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
|
20319
20466
|
*/
|
20320
|
-
function $LocaleProvider() {
|
20321
|
-
this.$get = function() {
|
20322
|
-
return {
|
20323
|
-
id: 'en-us',
|
20324
|
-
|
20325
|
-
NUMBER_FORMATS: {
|
20326
|
-
DECIMAL_SEP: '.',
|
20327
|
-
GROUP_SEP: ',',
|
20328
|
-
PATTERNS: [
|
20329
|
-
{ // Decimal Pattern
|
20330
|
-
minInt: 1,
|
20331
|
-
minFrac: 0,
|
20332
|
-
maxFrac: 3,
|
20333
|
-
posPre: '',
|
20334
|
-
posSuf: '',
|
20335
|
-
negPre: '-',
|
20336
|
-
negSuf: '',
|
20337
|
-
gSize: 3,
|
20338
|
-
lgSize: 3
|
20339
|
-
},{ //Currency Pattern
|
20340
|
-
minInt: 1,
|
20341
|
-
minFrac: 2,
|
20342
|
-
maxFrac: 2,
|
20343
|
-
posPre: '\u00A4',
|
20344
|
-
posSuf: '',
|
20345
|
-
negPre: '(\u00A4',
|
20346
|
-
negSuf: ')',
|
20347
|
-
gSize: 3,
|
20348
|
-
lgSize: 3
|
20349
|
-
}
|
20350
|
-
],
|
20351
|
-
CURRENCY_SYM: '$'
|
20352
|
-
},
|
20353
|
-
|
20354
|
-
DATETIME_FORMATS: {
|
20355
|
-
MONTH:
|
20356
|
-
'January,February,March,April,May,June,July,August,September,October,November,December'
|
20357
|
-
.split(','),
|
20358
|
-
SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
|
20359
|
-
DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),
|
20360
|
-
SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),
|
20361
|
-
AMPMS: ['AM','PM'],
|
20362
|
-
medium: 'MMM d, y h:mm:ss a',
|
20363
|
-
'short': 'M/d/yy h:mm a',
|
20364
|
-
fullDate: 'EEEE, MMMM d, y',
|
20365
|
-
longDate: 'MMMM d, y',
|
20366
|
-
mediumDate: 'MMM d, y',
|
20367
|
-
shortDate: 'M/d/yy',
|
20368
|
-
mediumTime: 'h:mm:ss a',
|
20369
|
-
shortTime: 'h:mm a',
|
20370
|
-
ERANAMES: [
|
20371
|
-
"Before Christ",
|
20372
|
-
"Anno Domini"
|
20373
|
-
],
|
20374
|
-
ERAS: [
|
20375
|
-
"BC",
|
20376
|
-
"AD"
|
20377
|
-
]
|
20378
|
-
},
|
20379
|
-
|
20380
|
-
pluralCat: function(num) {
|
20381
|
-
if (num === 1) {
|
20382
|
-
return 'one';
|
20383
|
-
}
|
20384
|
-
return 'other';
|
20385
|
-
}
|
20386
|
-
};
|
20387
|
-
};
|
20388
|
-
}
|
20389
20467
|
|
20390
20468
|
var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
|
20391
20469
|
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
|
@@ -20476,12 +20554,12 @@ function serverBase(url) {
|
|
20476
20554
|
*
|
20477
20555
|
* @constructor
|
20478
20556
|
* @param {string} appBase application base URL
|
20557
|
+
* @param {string} appBaseNoFile application base URL stripped of any filename
|
20479
20558
|
* @param {string} basePrefix url path prefix
|
20480
20559
|
*/
|
20481
|
-
function LocationHtml5Url(appBase, basePrefix) {
|
20560
|
+
function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {
|
20482
20561
|
this.$$html5 = true;
|
20483
20562
|
basePrefix = basePrefix || '';
|
20484
|
-
var appBaseNoFile = stripFile(appBase);
|
20485
20563
|
parseAbsoluteUrl(appBase, this);
|
20486
20564
|
|
20487
20565
|
|
@@ -20555,10 +20633,10 @@ function LocationHtml5Url(appBase, basePrefix) {
|
|
20555
20633
|
*
|
20556
20634
|
* @constructor
|
20557
20635
|
* @param {string} appBase application base URL
|
20636
|
+
* @param {string} appBaseNoFile application base URL stripped of any filename
|
20558
20637
|
* @param {string} hashPrefix hashbang prefix
|
20559
20638
|
*/
|
20560
|
-
function LocationHashbangUrl(appBase, hashPrefix) {
|
20561
|
-
var appBaseNoFile = stripFile(appBase);
|
20639
|
+
function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {
|
20562
20640
|
|
20563
20641
|
parseAbsoluteUrl(appBase, this);
|
20564
20642
|
|
@@ -20667,14 +20745,13 @@ function LocationHashbangUrl(appBase, hashPrefix) {
|
|
20667
20745
|
*
|
20668
20746
|
* @constructor
|
20669
20747
|
* @param {string} appBase application base URL
|
20748
|
+
* @param {string} appBaseNoFile application base URL stripped of any filename
|
20670
20749
|
* @param {string} hashPrefix hashbang prefix
|
20671
20750
|
*/
|
20672
|
-
function LocationHashbangInHtml5Url(appBase, hashPrefix) {
|
20751
|
+
function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
|
20673
20752
|
this.$$html5 = true;
|
20674
20753
|
LocationHashbangUrl.apply(this, arguments);
|
20675
20754
|
|
20676
|
-
var appBaseNoFile = stripFile(appBase);
|
20677
|
-
|
20678
20755
|
this.$$parseLinkUrl = function(url, relHref) {
|
20679
20756
|
if (relHref && relHref[0] === '#') {
|
20680
20757
|
// special case for links to hash fragments:
|
@@ -20704,7 +20781,7 @@ function LocationHashbangInHtml5Url(appBase, hashPrefix) {
|
|
20704
20781
|
hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
|
20705
20782
|
|
20706
20783
|
this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
|
20707
|
-
// include hashPrefix in $$absUrl when $$url is empty so
|
20784
|
+
// include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'
|
20708
20785
|
this.$$absUrl = appBase + hashPrefix + this.$$url;
|
20709
20786
|
};
|
20710
20787
|
|
@@ -21213,7 +21290,9 @@ function $LocationProvider() {
|
|
21213
21290
|
appBase = stripHash(initialUrl);
|
21214
21291
|
LocationMode = LocationHashbangUrl;
|
21215
21292
|
}
|
21216
|
-
|
21293
|
+
var appBaseNoFile = stripFile(appBase);
|
21294
|
+
|
21295
|
+
$location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);
|
21217
21296
|
$location.$$parseLinkUrl(initialUrl, initialUrl);
|
21218
21297
|
|
21219
21298
|
$location.$$state = $browser.state();
|
@@ -21293,6 +21372,13 @@ function $LocationProvider() {
|
|
21293
21372
|
|
21294
21373
|
// update $location when $browser url changes
|
21295
21374
|
$browser.onUrlChange(function(newUrl, newState) {
|
21375
|
+
|
21376
|
+
if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {
|
21377
|
+
// If we are navigating outside of the app then force a reload
|
21378
|
+
$window.location.href = newUrl;
|
21379
|
+
return;
|
21380
|
+
}
|
21381
|
+
|
21296
21382
|
$rootScope.$evalAsync(function() {
|
21297
21383
|
var oldUrl = $location.absUrl();
|
21298
21384
|
var oldState = $location.$$state;
|
@@ -23142,29 +23228,6 @@ Parser.prototype = {
|
|
23142
23228
|
}
|
23143
23229
|
};
|
23144
23230
|
|
23145
|
-
//////////////////////////////////////////////////
|
23146
|
-
// Parser helper functions
|
23147
|
-
//////////////////////////////////////////////////
|
23148
|
-
|
23149
|
-
function setter(obj, path, setValue, fullExp) {
|
23150
|
-
ensureSafeObject(obj, fullExp);
|
23151
|
-
|
23152
|
-
var element = path.split('.'), key;
|
23153
|
-
for (var i = 0; element.length > 1; i++) {
|
23154
|
-
key = ensureSafeMemberName(element.shift(), fullExp);
|
23155
|
-
var propertyObj = ensureSafeObject(obj[key], fullExp);
|
23156
|
-
if (!propertyObj) {
|
23157
|
-
propertyObj = {};
|
23158
|
-
obj[key] = propertyObj;
|
23159
|
-
}
|
23160
|
-
obj = propertyObj;
|
23161
|
-
}
|
23162
|
-
key = ensureSafeMemberName(element.shift(), fullExp);
|
23163
|
-
ensureSafeObject(obj[key], fullExp);
|
23164
|
-
obj[key] = setValue;
|
23165
|
-
return setValue;
|
23166
|
-
}
|
23167
|
-
|
23168
23231
|
var getterFnCacheDefault = createMap();
|
23169
23232
|
var getterFnCacheExpensive = createMap();
|
23170
23233
|
|
@@ -23233,13 +23296,14 @@ function $ParseProvider() {
|
|
23233
23296
|
var cacheDefault = createMap();
|
23234
23297
|
var cacheExpensive = createMap();
|
23235
23298
|
|
23236
|
-
this.$get = ['$filter',
|
23299
|
+
this.$get = ['$filter', function($filter) {
|
23300
|
+
var noUnsafeEval = csp().noUnsafeEval;
|
23237
23301
|
var $parseOptions = {
|
23238
|
-
csp:
|
23302
|
+
csp: noUnsafeEval,
|
23239
23303
|
expensiveChecks: false
|
23240
23304
|
},
|
23241
23305
|
$parseOptionsExpensive = {
|
23242
|
-
csp:
|
23306
|
+
csp: noUnsafeEval,
|
23243
23307
|
expensiveChecks: true
|
23244
23308
|
};
|
23245
23309
|
|
@@ -23714,8 +23778,11 @@ function qFactory(nextTick, exceptionHandler) {
|
|
23714
23778
|
this.$$state = { status: 0 };
|
23715
23779
|
}
|
23716
23780
|
|
23717
|
-
Promise.prototype
|
23781
|
+
extend(Promise.prototype, {
|
23718
23782
|
then: function(onFulfilled, onRejected, progressBack) {
|
23783
|
+
if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {
|
23784
|
+
return this;
|
23785
|
+
}
|
23719
23786
|
var result = new Deferred();
|
23720
23787
|
|
23721
23788
|
this.$$state.pending = this.$$state.pending || [];
|
@@ -23736,7 +23803,7 @@ function qFactory(nextTick, exceptionHandler) {
|
|
23736
23803
|
return handleCallback(error, false, callback);
|
23737
23804
|
}, progressBack);
|
23738
23805
|
}
|
23739
|
-
};
|
23806
|
+
});
|
23740
23807
|
|
23741
23808
|
//Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native
|
23742
23809
|
function simpleBind(context, fn) {
|
@@ -23783,7 +23850,7 @@ function qFactory(nextTick, exceptionHandler) {
|
|
23783
23850
|
this.notify = simpleBind(this, this.notify);
|
23784
23851
|
}
|
23785
23852
|
|
23786
|
-
Deferred.prototype
|
23853
|
+
extend(Deferred.prototype, {
|
23787
23854
|
resolve: function(val) {
|
23788
23855
|
if (this.promise.$$state.status) return;
|
23789
23856
|
if (val === this.promise) {
|
@@ -23846,7 +23913,7 @@ function qFactory(nextTick, exceptionHandler) {
|
|
23846
23913
|
});
|
23847
23914
|
}
|
23848
23915
|
}
|
23849
|
-
};
|
23916
|
+
});
|
23850
23917
|
|
23851
23918
|
/**
|
23852
23919
|
* @ngdoc method
|
@@ -23929,6 +23996,9 @@ function qFactory(nextTick, exceptionHandler) {
|
|
23929
23996
|
* the promise comes from a source that can't be trusted.
|
23930
23997
|
*
|
23931
23998
|
* @param {*} value Value or a promise
|
23999
|
+
* @param {Function=} successCallback
|
24000
|
+
* @param {Function=} errorCallback
|
24001
|
+
* @param {Function=} progressCallback
|
23932
24002
|
* @returns {Promise} Returns a promise of the passed value or promise
|
23933
24003
|
*/
|
23934
24004
|
|
@@ -23948,6 +24018,9 @@ function qFactory(nextTick, exceptionHandler) {
|
|
23948
24018
|
* Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.
|
23949
24019
|
*
|
23950
24020
|
* @param {*} value Value or a promise
|
24021
|
+
* @param {Function=} successCallback
|
24022
|
+
* @param {Function=} errorCallback
|
24023
|
+
* @param {Function=} progressCallback
|
23951
24024
|
* @returns {Promise} Returns a promise of the passed value or promise
|
23952
24025
|
*/
|
23953
24026
|
var resolve = when;
|
@@ -24203,12 +24276,9 @@ function $RootScopeProvider() {
|
|
24203
24276
|
* A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
|
24204
24277
|
* {@link auto.$injector $injector}. Child scopes are created using the
|
24205
24278
|
* {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
|
24206
|
-
* compiled HTML template is executed.)
|
24279
|
+
* compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for
|
24280
|
+
* an in-depth introduction and usage examples.
|
24207
24281
|
*
|
24208
|
-
* Here is a simple scope snippet to show how you can interact with the scope.
|
24209
|
-
* ```html
|
24210
|
-
* <file src="./test/ng/rootScopeSpec.js" tag="docs1" />
|
24211
|
-
* ```
|
24212
24282
|
*
|
24213
24283
|
* # Inheritance
|
24214
24284
|
* A scope can inherit from a parent scope, as in this example:
|
@@ -24370,9 +24440,9 @@ function $RootScopeProvider() {
|
|
24370
24440
|
*
|
24371
24441
|
*
|
24372
24442
|
* If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
|
24373
|
-
* you can register a `watchExpression` function with no `listener`. (
|
24374
|
-
*
|
24375
|
-
*
|
24443
|
+
* you can register a `watchExpression` function with no `listener`. (Be prepared for
|
24444
|
+
* multiple calls to your `watchExpression` because it will execute multiple times in a
|
24445
|
+
* single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)
|
24376
24446
|
*
|
24377
24447
|
* After a watcher is registered with the scope, the `listener` fn is called asynchronously
|
24378
24448
|
* (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
|
@@ -25134,11 +25204,14 @@ function $RootScopeProvider() {
|
|
25134
25204
|
$apply: function(expr) {
|
25135
25205
|
try {
|
25136
25206
|
beginPhase('$apply');
|
25137
|
-
|
25207
|
+
try {
|
25208
|
+
return this.$eval(expr);
|
25209
|
+
} finally {
|
25210
|
+
clearPhase();
|
25211
|
+
}
|
25138
25212
|
} catch (e) {
|
25139
25213
|
$exceptionHandler(e);
|
25140
25214
|
} finally {
|
25141
|
-
clearPhase();
|
25142
25215
|
try {
|
25143
25216
|
$rootScope.$digest();
|
25144
25217
|
} catch (e) {
|
@@ -26054,10 +26127,10 @@ function $SceDelegateProvider() {
|
|
26054
26127
|
* - There are exactly **two wildcard sequences** - `*` and `**`. All other characters
|
26055
26128
|
* match themselves.
|
26056
26129
|
* - `*`: matches zero or more occurrences of any character other than one of the following 6
|
26057
|
-
* characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '
|
26130
|
+
* characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use
|
26058
26131
|
* in a whitelist.
|
26059
26132
|
* - `**`: matches zero or more occurrences of *any* character. As such, it's not
|
26060
|
-
*
|
26133
|
+
* appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.
|
26061
26134
|
* http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
|
26062
26135
|
* not have been the intention.) Its usage at the very end of the path is ok. (e.g.
|
26063
26136
|
* http://foo.example.com/templates/**).
|
@@ -26065,11 +26138,11 @@ function $SceDelegateProvider() {
|
|
26065
26138
|
* - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
|
26066
26139
|
* (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
|
26067
26140
|
* accidentally introduce a bug when one updates a complex expression (imho, all regexes should
|
26068
|
-
* have good test coverage
|
26141
|
+
* have good test coverage). For instance, the use of `.` in the regex is correct only in a
|
26069
26142
|
* small number of cases. A `.` character in the regex used when matching the scheme or a
|
26070
26143
|
* subdomain could be matched against a `:` or literal `.` that was likely not intended. It
|
26071
26144
|
* is highly recommended to use the string patterns and only fall back to regular expressions
|
26072
|
-
*
|
26145
|
+
* as a last resort.
|
26073
26146
|
* - The regular expression must be an instance of RegExp (i.e. not a string.) It is
|
26074
26147
|
* matched against the **entire** *normalized / absolute URL* of the resource being tested
|
26075
26148
|
* (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
|
@@ -26079,7 +26152,7 @@ function $SceDelegateProvider() {
|
|
26079
26152
|
* remember to escape your regular expression (and be aware that you might need more than
|
26080
26153
|
* one level of escaping depending on your templating engine and the way you interpolated
|
26081
26154
|
* the value.) Do make use of your platform's escaping mechanism as it might be good
|
26082
|
-
* enough before coding your own.
|
26155
|
+
* enough before coding your own. E.g. Ruby has
|
26083
26156
|
* [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
|
26084
26157
|
* and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
|
26085
26158
|
* Javascript lacks a similar built in function for escaping. Take a look at Google
|
@@ -26967,20 +27040,13 @@ var originUrl = urlResolve(window.location.href);
|
|
26967
27040
|
*
|
26968
27041
|
* Implementation Notes for IE
|
26969
27042
|
* ---------------------------
|
26970
|
-
* IE
|
27043
|
+
* IE <= 10 normalizes the URL when assigned to the anchor node similar to the other
|
26971
27044
|
* browsers. However, the parsed components will not be set if the URL assigned did not specify
|
26972
27045
|
* them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We
|
26973
27046
|
* work around that by performing the parsing in a 2nd step by taking a previously normalized
|
26974
27047
|
* URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the
|
26975
27048
|
* properties such as protocol, hostname, port, etc.
|
26976
27049
|
*
|
26977
|
-
* IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one
|
26978
|
-
* uses the inner HTML approach to assign the URL as part of an HTML snippet -
|
26979
|
-
* http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL.
|
26980
|
-
* Unfortunately, setting img[src] to something like "javascript:foo" on IE throws an exception.
|
26981
|
-
* Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that
|
26982
|
-
* method and IE < 8 is unsupported.
|
26983
|
-
*
|
26984
27050
|
* References:
|
26985
27051
|
* http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
|
26986
27052
|
* http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
|
@@ -27260,6 +27326,7 @@ function $FilterProvider($provide) {
|
|
27260
27326
|
* your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
|
27261
27327
|
* (`myapp_subsection_filterx`).
|
27262
27328
|
* </div>
|
27329
|
+
* @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.
|
27263
27330
|
* @returns {Object} Registered filter instance, or if a map of filters was provided then a map
|
27264
27331
|
* of the registered filter instances.
|
27265
27332
|
*/
|
@@ -27607,9 +27674,9 @@ function getTypeForFilter(val) {
|
|
27607
27674
|
}
|
27608
27675
|
element(by.model('amount')).clear();
|
27609
27676
|
element(by.model('amount')).sendKeys('-1234');
|
27610
|
-
expect(element(by.id('currency-default')).getText()).toBe('
|
27611
|
-
expect(element(by.id('currency-custom')).getText()).toBe('
|
27612
|
-
expect(element(by.id('currency-no-fractions')).getText()).toBe('
|
27677
|
+
expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');
|
27678
|
+
expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');
|
27679
|
+
expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');
|
27613
27680
|
});
|
27614
27681
|
</file>
|
27615
27682
|
</example>
|
@@ -28449,6 +28516,10 @@ function orderByFilter($parse) {
|
|
28449
28516
|
if (sortPredicate.length === 0) { sortPredicate = ['+']; }
|
28450
28517
|
|
28451
28518
|
var predicates = processPredicates(sortPredicate, reverseOrder);
|
28519
|
+
// Add a predicate at the end that evaluates to the element index. This makes the
|
28520
|
+
// sort stable as it works as a tie-breaker when all the input predicates cannot
|
28521
|
+
// distinguish between two elements.
|
28522
|
+
predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
|
28452
28523
|
|
28453
28524
|
// The next three lines are a version of a Swartzian Transform idiom from Perl
|
28454
28525
|
// (sometimes called the Decorate-Sort-Undecorate idiom)
|
@@ -29494,7 +29565,7 @@ function FormController(element, attrs, $scope, $animate, $interpolate) {
|
|
29494
29565
|
* related scope, under this name.
|
29495
29566
|
*/
|
29496
29567
|
var formDirectiveFactory = function(isNgForm) {
|
29497
|
-
return ['$timeout', function($timeout) {
|
29568
|
+
return ['$timeout', '$parse', function($timeout, $parse) {
|
29498
29569
|
var formDirective = {
|
29499
29570
|
name: 'form',
|
29500
29571
|
restrict: isNgForm ? 'EAC' : 'E',
|
@@ -29536,21 +29607,21 @@ var formDirectiveFactory = function(isNgForm) {
|
|
29536
29607
|
}
|
29537
29608
|
|
29538
29609
|
var parentFormCtrl = controller.$$parentForm;
|
29610
|
+
var setter = nameAttr ? getSetter(controller.$name) : noop;
|
29539
29611
|
|
29540
29612
|
if (nameAttr) {
|
29541
|
-
setter(scope, controller
|
29613
|
+
setter(scope, controller);
|
29542
29614
|
attr.$observe(nameAttr, function(newValue) {
|
29543
29615
|
if (controller.$name === newValue) return;
|
29544
|
-
setter(scope,
|
29616
|
+
setter(scope, undefined);
|
29545
29617
|
parentFormCtrl.$$renameControl(controller, newValue);
|
29546
|
-
setter
|
29618
|
+
setter = getSetter(controller.$name);
|
29619
|
+
setter(scope, controller);
|
29547
29620
|
});
|
29548
29621
|
}
|
29549
29622
|
formElement.on('$destroy', function() {
|
29550
29623
|
parentFormCtrl.$removeControl(controller);
|
29551
|
-
|
29552
|
-
setter(scope, attr[nameAttr], undefined, controller.$name);
|
29553
|
-
}
|
29624
|
+
setter(scope, undefined);
|
29554
29625
|
extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
|
29555
29626
|
});
|
29556
29627
|
}
|
@@ -29559,6 +29630,14 @@ var formDirectiveFactory = function(isNgForm) {
|
|
29559
29630
|
};
|
29560
29631
|
|
29561
29632
|
return formDirective;
|
29633
|
+
|
29634
|
+
function getSetter(expression) {
|
29635
|
+
if (expression === '') {
|
29636
|
+
//create an assignable expression, so forms with an empty name can be renamed later
|
29637
|
+
return $parse('this[""]').assign;
|
29638
|
+
}
|
29639
|
+
return $parse(expression).assign || noop;
|
29640
|
+
}
|
29562
29641
|
}];
|
29563
29642
|
};
|
29564
29643
|
|
@@ -29571,7 +29650,7 @@ var ngFormDirective = formDirectiveFactory(true);
|
|
29571
29650
|
DIRTY_CLASS: false,
|
29572
29651
|
UNTOUCHED_CLASS: false,
|
29573
29652
|
TOUCHED_CLASS: false,
|
29574
|
-
|
29653
|
+
ngModelMinErr: false,
|
29575
29654
|
*/
|
29576
29655
|
|
29577
29656
|
// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
|
@@ -30693,7 +30772,11 @@ function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
|
30693
30772
|
element.on('change', listener);
|
30694
30773
|
|
30695
30774
|
ctrl.$render = function() {
|
30696
|
-
|
30775
|
+
// Workaround for Firefox validation #12102.
|
30776
|
+
var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;
|
30777
|
+
if (element.val() !== value) {
|
30778
|
+
element.val(value);
|
30779
|
+
}
|
30697
30780
|
};
|
30698
30781
|
}
|
30699
30782
|
|
@@ -30804,7 +30887,7 @@ function createDateInputType(type, regexp, parseDate, format) {
|
|
30804
30887
|
|
30805
30888
|
ctrl.$formatters.push(function(value) {
|
30806
30889
|
if (value && !isDate(value)) {
|
30807
|
-
throw
|
30890
|
+
throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);
|
30808
30891
|
}
|
30809
30892
|
if (isValidDate(value)) {
|
30810
30893
|
previousDate = value;
|
@@ -30880,7 +30963,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
|
|
30880
30963
|
ctrl.$formatters.push(function(value) {
|
30881
30964
|
if (!ctrl.$isEmpty(value)) {
|
30882
30965
|
if (!isNumber(value)) {
|
30883
|
-
throw
|
30966
|
+
throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);
|
30884
30967
|
}
|
30885
30968
|
value = value.toString();
|
30886
30969
|
}
|
@@ -30973,7 +31056,7 @@ function parseConstantExpr($parse, context, name, expression, fallback) {
|
|
30973
31056
|
if (isDefined(expression)) {
|
30974
31057
|
parseFn = $parse(expression);
|
30975
31058
|
if (!parseFn.constant) {
|
30976
|
-
throw
|
31059
|
+
throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
|
30977
31060
|
'`{1}`.', name, expression);
|
30978
31061
|
}
|
30979
31062
|
return parseFn(context);
|
@@ -32259,27 +32342,29 @@ var ngControllerDirective = [function() {
|
|
32259
32342
|
*
|
32260
32343
|
* @element html
|
32261
32344
|
* @description
|
32262
|
-
*
|
32345
|
+
*
|
32346
|
+
* Angular has some features that can break certain
|
32347
|
+
* [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.
|
32348
|
+
*
|
32349
|
+
* If you intend to implement these rules then you must tell Angular not to use these features.
|
32263
32350
|
*
|
32264
32351
|
* This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.
|
32265
32352
|
*
|
32266
|
-
* CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).
|
32267
|
-
* For Angular to be CSP compatible there are only two things that we need to do differently:
|
32268
32353
|
*
|
32269
|
-
*
|
32270
|
-
* - don't inject custom stylesheet into the document
|
32354
|
+
* The following rules affect Angular:
|
32271
32355
|
*
|
32272
|
-
*
|
32273
|
-
*
|
32274
|
-
*
|
32275
|
-
* be raised.
|
32356
|
+
* * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions
|
32357
|
+
* (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%
|
32358
|
+
* increase in the speed of evaluating Angular expressions.
|
32276
32359
|
*
|
32277
|
-
*
|
32278
|
-
*
|
32279
|
-
* To make
|
32360
|
+
* * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular
|
32361
|
+
* makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).
|
32362
|
+
* To make these directives work when a CSP rule is blocking inline styles, you must link to the
|
32363
|
+
* `angular-csp.css` in your HTML manually.
|
32280
32364
|
*
|
32281
|
-
* Angular tries to autodetect if CSP is
|
32282
|
-
*
|
32365
|
+
* If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval
|
32366
|
+
* and automatically deactivates this feature in the {@link $parse} service. This autodetection,
|
32367
|
+
* however, triggers a CSP error to be logged in the console:
|
32283
32368
|
*
|
32284
32369
|
* ```
|
32285
32370
|
* Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
|
@@ -32288,11 +32373,39 @@ var ngControllerDirective = [function() {
|
|
32288
32373
|
* ```
|
32289
32374
|
*
|
32290
32375
|
* This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
|
32291
|
-
* directive on
|
32292
|
-
*
|
32376
|
+
* directive on an element of the HTML document that appears before the `<script>` tag that loads
|
32377
|
+
* the `angular.js` file.
|
32293
32378
|
*
|
32294
32379
|
* *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*
|
32295
32380
|
*
|
32381
|
+
* You can specify which of the CSP related Angular features should be deactivated by providing
|
32382
|
+
* a value for the `ng-csp` attribute. The options are as follows:
|
32383
|
+
*
|
32384
|
+
* * no-inline-style: this stops Angular from injecting CSS styles into the DOM
|
32385
|
+
*
|
32386
|
+
* * no-unsafe-eval: this stops Angular from optimising $parse with unsafe eval of strings
|
32387
|
+
*
|
32388
|
+
* You can use these values in the following combinations:
|
32389
|
+
*
|
32390
|
+
*
|
32391
|
+
* * No declaration means that Angular will assume that you can do inline styles, but it will do
|
32392
|
+
* a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions
|
32393
|
+
* of Angular.
|
32394
|
+
*
|
32395
|
+
* * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline
|
32396
|
+
* styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions
|
32397
|
+
* of Angular.
|
32398
|
+
*
|
32399
|
+
* * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject
|
32400
|
+
* inline styles. E.g. `<body ng-csp="no-unsafe-eval">`.
|
32401
|
+
*
|
32402
|
+
* * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can
|
32403
|
+
* run eval - no automcatic check for unsafe eval will occur. E.g. `<body ng-csp="no-inline-style">`
|
32404
|
+
*
|
32405
|
+
* * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject
|
32406
|
+
* styles nor use eval, which is the same as an empty: ng-csp.
|
32407
|
+
* E.g.`<body ng-csp="no-inline-style;no-unsafe-eval">`
|
32408
|
+
*
|
32296
32409
|
* @example
|
32297
32410
|
* This example shows how to apply the `ngCsp` directive to the `html` tag.
|
32298
32411
|
```html
|
@@ -32424,7 +32537,7 @@ var ngControllerDirective = [function() {
|
|
32424
32537
|
|
32425
32538
|
// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
|
32426
32539
|
// bootstrap the system (before $parse is instantiated), for this reason we just have
|
32427
|
-
// the csp
|
32540
|
+
// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc
|
32428
32541
|
|
32429
32542
|
/**
|
32430
32543
|
* @ngdoc directive
|
@@ -33540,8 +33653,7 @@ var VALID_CLASS = 'ng-valid',
|
|
33540
33653
|
TOUCHED_CLASS = 'ng-touched',
|
33541
33654
|
PENDING_CLASS = 'ng-pending';
|
33542
33655
|
|
33543
|
-
|
33544
|
-
var $ngModelMinErr = new minErr('ngModel');
|
33656
|
+
var ngModelMinErr = minErr('ngModel');
|
33545
33657
|
|
33546
33658
|
/**
|
33547
33659
|
* @ngdoc type
|
@@ -33792,7 +33904,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
33792
33904
|
}
|
33793
33905
|
};
|
33794
33906
|
} else if (!parsedNgModel.assign) {
|
33795
|
-
throw
|
33907
|
+
throw ngModelMinErr('nonassign', "Expression '{0}' is non-assignable. Element: {1}",
|
33796
33908
|
$attr.ngModel, startingTag($element));
|
33797
33909
|
}
|
33798
33910
|
};
|
@@ -34123,7 +34235,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
|
|
34123
34235
|
forEach(ctrl.$asyncValidators, function(validator, name) {
|
34124
34236
|
var promise = validator(modelValue, viewValue);
|
34125
34237
|
if (!isPromiseLike(promise)) {
|
34126
|
-
throw
|
34238
|
+
throw ngModelMinErr("$asyncValidators",
|
34127
34239
|
"Expected asynchronous validator to return a promise but got '{0}' instead.", promise);
|
34128
34240
|
}
|
34129
34241
|
setValidity(name, undefined);
|
@@ -34977,7 +35089,7 @@ var ngOptionsMinErr = minErr('ngOptions');
|
|
34977
35089
|
* Consider the following example:
|
34978
35090
|
*
|
34979
35091
|
* ```html
|
34980
|
-
* <select ng-options="item.subItem as item.label for item in values track by item.id" ng-model="selected">
|
35092
|
+
* <select ng-options="item.subItem as item.label for item in values track by item.id" ng-model="selected"></select>
|
34981
35093
|
* ```
|
34982
35094
|
*
|
34983
35095
|
* ```js
|
@@ -35439,7 +35551,7 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
|
|
35439
35551
|
|
35440
35552
|
forEach(selectedValues, function(value) {
|
35441
35553
|
var option = options.selectValueMap[value];
|
35442
|
-
if (!option.disabled) selections.push(options.getViewValueFromOption(option));
|
35554
|
+
if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));
|
35443
35555
|
});
|
35444
35556
|
|
35445
35557
|
return selections;
|
@@ -37535,6 +37647,146 @@ var minlengthDirective = function() {
|
|
37535
37647
|
};
|
37536
37648
|
};
|
37537
37649
|
|
37650
|
+
if (window.angular.bootstrap) {
|
37651
|
+
//AngularJS is already loaded, so we can return here...
|
37652
|
+
console.log('WARNING: Tried to load angular more than once.');
|
37653
|
+
return;
|
37654
|
+
}
|
37655
|
+
|
37656
|
+
//try to bind to jquery now so that one can write jqLite(document).ready()
|
37657
|
+
//but we will rebind on bootstrap again.
|
37658
|
+
bindJQuery();
|
37659
|
+
|
37660
|
+
publishExternalAPI(angular);
|
37661
|
+
|
37662
|
+
angular.module("ngLocale", [], ["$provide", function($provide) {
|
37663
|
+
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
|
37664
|
+
function getDecimals(n) {
|
37665
|
+
n = n + '';
|
37666
|
+
var i = n.indexOf('.');
|
37667
|
+
return (i == -1) ? 0 : n.length - i - 1;
|
37668
|
+
}
|
37669
|
+
|
37670
|
+
function getVF(n, opt_precision) {
|
37671
|
+
var v = opt_precision;
|
37672
|
+
|
37673
|
+
if (undefined === v) {
|
37674
|
+
v = Math.min(getDecimals(n), 3);
|
37675
|
+
}
|
37676
|
+
|
37677
|
+
var base = Math.pow(10, v);
|
37678
|
+
var f = ((n * base) | 0) % base;
|
37679
|
+
return {v: v, f: f};
|
37680
|
+
}
|
37681
|
+
|
37682
|
+
$provide.value("$locale", {
|
37683
|
+
"DATETIME_FORMATS": {
|
37684
|
+
"AMPMS": [
|
37685
|
+
"AM",
|
37686
|
+
"PM"
|
37687
|
+
],
|
37688
|
+
"DAY": [
|
37689
|
+
"Sunday",
|
37690
|
+
"Monday",
|
37691
|
+
"Tuesday",
|
37692
|
+
"Wednesday",
|
37693
|
+
"Thursday",
|
37694
|
+
"Friday",
|
37695
|
+
"Saturday"
|
37696
|
+
],
|
37697
|
+
"ERANAMES": [
|
37698
|
+
"Before Christ",
|
37699
|
+
"Anno Domini"
|
37700
|
+
],
|
37701
|
+
"ERAS": [
|
37702
|
+
"BC",
|
37703
|
+
"AD"
|
37704
|
+
],
|
37705
|
+
"FIRSTDAYOFWEEK": 6,
|
37706
|
+
"MONTH": [
|
37707
|
+
"January",
|
37708
|
+
"February",
|
37709
|
+
"March",
|
37710
|
+
"April",
|
37711
|
+
"May",
|
37712
|
+
"June",
|
37713
|
+
"July",
|
37714
|
+
"August",
|
37715
|
+
"September",
|
37716
|
+
"October",
|
37717
|
+
"November",
|
37718
|
+
"December"
|
37719
|
+
],
|
37720
|
+
"SHORTDAY": [
|
37721
|
+
"Sun",
|
37722
|
+
"Mon",
|
37723
|
+
"Tue",
|
37724
|
+
"Wed",
|
37725
|
+
"Thu",
|
37726
|
+
"Fri",
|
37727
|
+
"Sat"
|
37728
|
+
],
|
37729
|
+
"SHORTMONTH": [
|
37730
|
+
"Jan",
|
37731
|
+
"Feb",
|
37732
|
+
"Mar",
|
37733
|
+
"Apr",
|
37734
|
+
"May",
|
37735
|
+
"Jun",
|
37736
|
+
"Jul",
|
37737
|
+
"Aug",
|
37738
|
+
"Sep",
|
37739
|
+
"Oct",
|
37740
|
+
"Nov",
|
37741
|
+
"Dec"
|
37742
|
+
],
|
37743
|
+
"WEEKENDRANGE": [
|
37744
|
+
5,
|
37745
|
+
6
|
37746
|
+
],
|
37747
|
+
"fullDate": "EEEE, MMMM d, y",
|
37748
|
+
"longDate": "MMMM d, y",
|
37749
|
+
"medium": "MMM d, y h:mm:ss a",
|
37750
|
+
"mediumDate": "MMM d, y",
|
37751
|
+
"mediumTime": "h:mm:ss a",
|
37752
|
+
"short": "M/d/yy h:mm a",
|
37753
|
+
"shortDate": "M/d/yy",
|
37754
|
+
"shortTime": "h:mm a"
|
37755
|
+
},
|
37756
|
+
"NUMBER_FORMATS": {
|
37757
|
+
"CURRENCY_SYM": "$",
|
37758
|
+
"DECIMAL_SEP": ".",
|
37759
|
+
"GROUP_SEP": ",",
|
37760
|
+
"PATTERNS": [
|
37761
|
+
{
|
37762
|
+
"gSize": 3,
|
37763
|
+
"lgSize": 3,
|
37764
|
+
"maxFrac": 3,
|
37765
|
+
"minFrac": 0,
|
37766
|
+
"minInt": 1,
|
37767
|
+
"negPre": "-",
|
37768
|
+
"negSuf": "",
|
37769
|
+
"posPre": "",
|
37770
|
+
"posSuf": ""
|
37771
|
+
},
|
37772
|
+
{
|
37773
|
+
"gSize": 3,
|
37774
|
+
"lgSize": 3,
|
37775
|
+
"maxFrac": 2,
|
37776
|
+
"minFrac": 2,
|
37777
|
+
"minInt": 1,
|
37778
|
+
"negPre": "-\u00a4",
|
37779
|
+
"negSuf": "",
|
37780
|
+
"posPre": "\u00a4",
|
37781
|
+
"posSuf": ""
|
37782
|
+
}
|
37783
|
+
]
|
37784
|
+
},
|
37785
|
+
"id": "en-us",
|
37786
|
+
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
|
37787
|
+
});
|
37788
|
+
}]);
|
37789
|
+
|
37538
37790
|
/**
|
37539
37791
|
* Setup file for the Scenario.
|
37540
37792
|
* Must be first in the compilation/bootstrap list.
|
@@ -39768,5 +40020,5 @@ if (config.autotest) {
|
|
39768
40020
|
})(window, document);
|
39769
40021
|
|
39770
40022
|
|
39771
|
-
!window.angular.$$csp() && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak,\n.ng-hide:not(.ng-hide-animate) {\n display: none !important;\n}\n\nng\\:form {\n display: block;\n}\n\n.ng-animate-shim {\n visibility:hidden;\n}\n\n.ng-anchor {\n position:absolute;\n}\n</style>');
|
39772
|
-
!window.angular.$$csp() && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";\n/* CSS Document */\n\n/** Structure */\nbody {\n font-family: Arial, sans-serif;\n margin: 0;\n font-size: 14px;\n}\n\n#system-error {\n font-size: 1.5em;\n text-align: center;\n}\n\n#json, #xml {\n display: none;\n}\n\n#header {\n position: fixed;\n width: 100%;\n}\n\n#specs {\n padding-top: 50px;\n}\n\n#header .angular {\n font-family: Courier New, monospace;\n font-weight: bold;\n}\n\n#header h1 {\n font-weight: normal;\n float: left;\n font-size: 30px;\n line-height: 30px;\n margin: 0;\n padding: 10px 10px;\n height: 30px;\n}\n\n#application h2,\n#specs h2 {\n margin: 0;\n padding: 0.5em;\n font-size: 1.1em;\n}\n\n#status-legend {\n margin-top: 10px;\n margin-right: 10px;\n}\n\n#header,\n#application,\n.test-info,\n.test-actions li {\n overflow: hidden;\n}\n\n#application {\n margin: 10px;\n}\n\n#application iframe {\n width: 100%;\n height: 758px;\n}\n\n#application .popout {\n float: right;\n}\n\n#application iframe {\n border: none;\n}\n\n.tests li,\n.test-actions li,\n.test-it li,\n.test-it ol,\n.status-display {\n list-style-type: none;\n}\n\n.tests,\n.test-it ol,\n.status-display {\n margin: 0;\n padding: 0;\n}\n\n.test-info {\n margin-left: 1em;\n margin-top: 0.5em;\n border-radius: 8px 0 0 8px;\n -webkit-border-radius: 8px 0 0 8px;\n -moz-border-radius: 8px 0 0 8px;\n cursor: pointer;\n}\n\n.test-info:hover .test-name {\n text-decoration: underline;\n}\n\n.test-info .closed:before {\n content: \'\\25b8\\00A0\';\n}\n\n.test-info .open:before {\n content: \'\\25be\\00A0\';\n font-weight: bold;\n}\n\n.test-it ol {\n margin-left: 2.5em;\n}\n\n.status-display,\n.status-display li {\n float: right;\n}\n\n.status-display li {\n padding: 5px 10px;\n}\n\n.timer-result,\n.test-title {\n display: inline-block;\n margin: 0;\n padding: 4px;\n}\n\n.test-actions .test-title,\n.test-actions .test-result {\n display: table-cell;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n.test-actions {\n display: table;\n}\n\n.test-actions li {\n display: table-row;\n}\n\n.timer-result {\n width: 4em;\n padding: 0 10px;\n text-align: right;\n font-family: monospace;\n}\n\n.test-it pre,\n.test-actions pre {\n clear: left;\n color: black;\n margin-left: 6em;\n}\n\n.test-describe {\n padding-bottom: 0.5em;\n}\n\n.test-describe .test-describe {\n margin: 5px 5px 10px 2em;\n}\n\n.test-actions .status-pending .test-title:before {\n content: \'\\00bb\\00A0\';\n}\n\n.scrollpane {\n max-height: 20em;\n overflow: auto;\n}\n\n/** Colors */\n\n#header {\n background-color: #F2C200;\n}\n\n#specs h2 {\n border-top: 2px solid #BABAD1;\n}\n\n#specs h2,\n#application h2 {\n background-color: #efefef;\n}\n\n#application {\n border: 1px solid #BABAD1;\n}\n\n.test-describe .test-describe {\n border-left: 1px solid #BABAD1;\n border-right: 1px solid #BABAD1;\n border-bottom: 1px solid #BABAD1;\n}\n\n.status-display {\n border: 1px solid #777;\n}\n\n.status-display .status-pending,\n.status-pending .test-info {\n background-color: #F9EEBC;\n}\n\n.status-display .status-success,\n.status-success .test-info {\n background-color: #B1D7A1;\n}\n\n.status-display .status-failure,\n.status-failure .test-info {\n background-color: #FF8286;\n}\n\n.status-display .status-error,\n.status-error .test-info {\n background-color: black;\n color: white;\n}\n\n.test-actions .status-success .test-title {\n color: #30B30A;\n}\n\n.test-actions .status-failure .test-title {\n color: #DF0000;\n}\n\n.test-actions .status-error .test-title {\n color: black;\n}\n\n.test-actions .timer-result {\n color: #888;\n}\n</style>');
|
40023
|
+
!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak,\n.ng-hide:not(.ng-hide-animate) {\n display: none !important;\n}\n\nng\\:form {\n display: block;\n}\n\n.ng-animate-shim {\n visibility:hidden;\n}\n\n.ng-anchor {\n position:absolute;\n}\n</style>');
|
40024
|
+
!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";\n/* CSS Document */\n\n/** Structure */\nbody {\n font-family: Arial, sans-serif;\n margin: 0;\n font-size: 14px;\n}\n\n#system-error {\n font-size: 1.5em;\n text-align: center;\n}\n\n#json, #xml {\n display: none;\n}\n\n#header {\n position: fixed;\n width: 100%;\n}\n\n#specs {\n padding-top: 50px;\n}\n\n#header .angular {\n font-family: Courier New, monospace;\n font-weight: bold;\n}\n\n#header h1 {\n font-weight: normal;\n float: left;\n font-size: 30px;\n line-height: 30px;\n margin: 0;\n padding: 10px 10px;\n height: 30px;\n}\n\n#application h2,\n#specs h2 {\n margin: 0;\n padding: 0.5em;\n font-size: 1.1em;\n}\n\n#status-legend {\n margin-top: 10px;\n margin-right: 10px;\n}\n\n#header,\n#application,\n.test-info,\n.test-actions li {\n overflow: hidden;\n}\n\n#application {\n margin: 10px;\n}\n\n#application iframe {\n width: 100%;\n height: 758px;\n}\n\n#application .popout {\n float: right;\n}\n\n#application iframe {\n border: none;\n}\n\n.tests li,\n.test-actions li,\n.test-it li,\n.test-it ol,\n.status-display {\n list-style-type: none;\n}\n\n.tests,\n.test-it ol,\n.status-display {\n margin: 0;\n padding: 0;\n}\n\n.test-info {\n margin-left: 1em;\n margin-top: 0.5em;\n border-radius: 8px 0 0 8px;\n -webkit-border-radius: 8px 0 0 8px;\n -moz-border-radius: 8px 0 0 8px;\n cursor: pointer;\n}\n\n.test-info:hover .test-name {\n text-decoration: underline;\n}\n\n.test-info .closed:before {\n content: \'\\25b8\\00A0\';\n}\n\n.test-info .open:before {\n content: \'\\25be\\00A0\';\n font-weight: bold;\n}\n\n.test-it ol {\n margin-left: 2.5em;\n}\n\n.status-display,\n.status-display li {\n float: right;\n}\n\n.status-display li {\n padding: 5px 10px;\n}\n\n.timer-result,\n.test-title {\n display: inline-block;\n margin: 0;\n padding: 4px;\n}\n\n.test-actions .test-title,\n.test-actions .test-result {\n display: table-cell;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n.test-actions {\n display: table;\n}\n\n.test-actions li {\n display: table-row;\n}\n\n.timer-result {\n width: 4em;\n padding: 0 10px;\n text-align: right;\n font-family: monospace;\n}\n\n.test-it pre,\n.test-actions pre {\n clear: left;\n color: black;\n margin-left: 6em;\n}\n\n.test-describe {\n padding-bottom: 0.5em;\n}\n\n.test-describe .test-describe {\n margin: 5px 5px 10px 2em;\n}\n\n.test-actions .status-pending .test-title:before {\n content: \'\\00bb\\00A0\';\n}\n\n.scrollpane {\n max-height: 20em;\n overflow: auto;\n}\n\n/** Colors */\n\n#header {\n background-color: #F2C200;\n}\n\n#specs h2 {\n border-top: 2px solid #BABAD1;\n}\n\n#specs h2,\n#application h2 {\n background-color: #efefef;\n}\n\n#application {\n border: 1px solid #BABAD1;\n}\n\n.test-describe .test-describe {\n border-left: 1px solid #BABAD1;\n border-right: 1px solid #BABAD1;\n border-bottom: 1px solid #BABAD1;\n}\n\n.status-display {\n border: 1px solid #777;\n}\n\n.status-display .status-pending,\n.status-pending .test-info {\n background-color: #F9EEBC;\n}\n\n.status-display .status-success,\n.status-success .test-info {\n background-color: #B1D7A1;\n}\n\n.status-display .status-failure,\n.status-failure .test-info {\n background-color: #FF8286;\n}\n\n.status-display .status-error,\n.status-error .test-info {\n background-color: black;\n color: white;\n}\n\n.test-actions .status-success .test-title {\n color: #30B30A;\n}\n\n.test-actions .status-failure .test-title {\n color: #DF0000;\n}\n\n.test-actions .status-error .test-title {\n color: black;\n}\n\n.test-actions .timer-result {\n color: #888;\n}\n</style>');
|