rails-angularjs 1.4.0.pre.rc.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/rails-angularjs/version.rb +1 -1
  4. data/vendor/assets/javascripts/angular-animate.js +179 -42
  5. data/vendor/assets/javascripts/angular-animate.min.js +47 -45
  6. data/vendor/assets/javascripts/angular-animate.min.js.map +3 -3
  7. data/vendor/assets/javascripts/angular-aria.js +1 -1
  8. data/vendor/assets/javascripts/angular-aria.min.js +1 -1
  9. data/vendor/assets/javascripts/angular-cookies.js +1 -1
  10. data/vendor/assets/javascripts/angular-cookies.min.js +1 -1
  11. data/vendor/assets/javascripts/angular-loader.js +2 -2
  12. data/vendor/assets/javascripts/angular-loader.min.js +3 -3
  13. data/vendor/assets/javascripts/angular-loader.min.js.map +1 -1
  14. data/vendor/assets/javascripts/angular-message-format.js +1 -1
  15. data/vendor/assets/javascripts/angular-message-format.min.js +1 -1
  16. data/vendor/assets/javascripts/angular-messages.js +1 -1
  17. data/vendor/assets/javascripts/angular-messages.min.js +1 -1
  18. data/vendor/assets/javascripts/angular-mocks.js +1 -1
  19. data/vendor/assets/javascripts/angular-resource.js +1 -1
  20. data/vendor/assets/javascripts/angular-resource.min.js +1 -1
  21. data/vendor/assets/javascripts/angular-route.js +1 -1
  22. data/vendor/assets/javascripts/angular-route.min.js +1 -1
  23. data/vendor/assets/javascripts/angular-sanitize.js +1 -1
  24. data/vendor/assets/javascripts/angular-sanitize.min.js +1 -1
  25. data/vendor/assets/javascripts/angular-scenario.js +125 -37
  26. data/vendor/assets/javascripts/angular-touch.js +1 -1
  27. data/vendor/assets/javascripts/angular-touch.min.js +1 -1
  28. data/vendor/assets/javascripts/angular.js +125 -37
  29. data/vendor/assets/javascripts/angular.min.js +265 -265
  30. data/vendor/assets/javascripts/angular.min.js.map +2 -2
  31. metadata +4 -4
@@ -9190,7 +9190,7 @@ return jQuery;
9190
9190
  }));
9191
9191
 
9192
9192
  /**
9193
- * @license AngularJS v1.4.0-rc.2
9193
+ * @license AngularJS v1.4.0
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-rc.2/' +
9252
+ message += '\nhttp://errors.angularjs.org/1.4.0/' +
9253
9253
  (module ? module + '/' : '') + code;
9254
9254
 
9255
9255
  for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
@@ -11524,11 +11524,11 @@ function toDebugString(obj) {
11524
11524
  * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
11525
11525
  */
11526
11526
  var version = {
11527
- full: '1.4.0-rc.2', // all of these placeholder strings will be replaced by grunt's
11527
+ full: '1.4.0', // all of these placeholder strings will be replaced by grunt's
11528
11528
  major: 1, // package task
11529
11529
  minor: 4,
11530
11530
  dot: 0,
11531
- codeName: 'rocket-zambonimation'
11531
+ codeName: 'jaracimrman-existence'
11532
11532
  };
11533
11533
 
11534
11534
 
@@ -13953,6 +13953,19 @@ function splitClasses(classes) {
13953
13953
  return obj;
13954
13954
  }
13955
13955
 
13956
+ // if any other type of options value besides an Object value is
13957
+ // passed into the $animate.method() animation then this helper code
13958
+ // will be run which will ignore it. While this patch is not the
13959
+ // greatest solution to this, a lot of existing plugins depend on
13960
+ // $animate to either call the callback (< 1.2) or return a promise
13961
+ // that can be changed. This helper function ensures that the options
13962
+ // are wiped clean incase a callback function is provided.
13963
+ function prepareAnimateOptions(options) {
13964
+ return isObject(options)
13965
+ ? options
13966
+ : {};
13967
+ }
13968
+
13956
13969
  var $$CoreAnimateRunnerProvider = function() {
13957
13970
  this.$get = ['$q', '$$rAF', function($q, $$rAF) {
13958
13971
  function AnimateRunner() {}
@@ -14329,9 +14342,11 @@ var $AnimateProvider = ['$provide', function($provide) {
14329
14342
  * @return {Promise} the animation callback promise
14330
14343
  */
14331
14344
  enter: function(element, parent, after, options) {
14345
+ parent = parent && jqLite(parent);
14346
+ after = after && jqLite(after);
14332
14347
  parent = parent || after.parent();
14333
14348
  domInsert(element, parent, after);
14334
- return $$animateQueue.push(element, 'enter', options);
14349
+ return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));
14335
14350
  },
14336
14351
 
14337
14352
  /**
@@ -14353,9 +14368,11 @@ var $AnimateProvider = ['$provide', function($provide) {
14353
14368
  * @return {Promise} the animation callback promise
14354
14369
  */
14355
14370
  move: function(element, parent, after, options) {
14371
+ parent = parent && jqLite(parent);
14372
+ after = after && jqLite(after);
14356
14373
  parent = parent || after.parent();
14357
14374
  domInsert(element, parent, after);
14358
- return $$animateQueue.push(element, 'move', options);
14375
+ return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));
14359
14376
  },
14360
14377
 
14361
14378
  /**
@@ -14372,7 +14389,7 @@ var $AnimateProvider = ['$provide', function($provide) {
14372
14389
  * @return {Promise} the animation callback promise
14373
14390
  */
14374
14391
  leave: function(element, options) {
14375
- return $$animateQueue.push(element, 'leave', options, function() {
14392
+ return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {
14376
14393
  element.remove();
14377
14394
  });
14378
14395
  },
@@ -14396,7 +14413,7 @@ var $AnimateProvider = ['$provide', function($provide) {
14396
14413
  * @return {Promise} the animation callback promise
14397
14414
  */
14398
14415
  addClass: function(element, className, options) {
14399
- options = options || {};
14416
+ options = prepareAnimateOptions(options);
14400
14417
  options.addClass = mergeClasses(options.addclass, className);
14401
14418
  return $$animateQueue.push(element, 'addClass', options);
14402
14419
  },
@@ -14420,7 +14437,7 @@ var $AnimateProvider = ['$provide', function($provide) {
14420
14437
  * @return {Promise} the animation callback promise
14421
14438
  */
14422
14439
  removeClass: function(element, className, options) {
14423
- options = options || {};
14440
+ options = prepareAnimateOptions(options);
14424
14441
  options.removeClass = mergeClasses(options.removeClass, className);
14425
14442
  return $$animateQueue.push(element, 'removeClass', options);
14426
14443
  },
@@ -14445,7 +14462,7 @@ var $AnimateProvider = ['$provide', function($provide) {
14445
14462
  * @return {Promise} the animation callback promise
14446
14463
  */
14447
14464
  setClass: function(element, add, remove, options) {
14448
- options = options || {};
14465
+ options = prepareAnimateOptions(options);
14449
14466
  options.addClass = mergeClasses(options.addClass, add);
14450
14467
  options.removeClass = mergeClasses(options.removeClass, remove);
14451
14468
  return $$animateQueue.push(element, 'setClass', options);
@@ -14473,7 +14490,7 @@ var $AnimateProvider = ['$provide', function($provide) {
14473
14490
  * @return {Promise} the animation callback promise
14474
14491
  */
14475
14492
  animate: function(element, from, to, className, options) {
14476
- options = options || {};
14493
+ options = prepareAnimateOptions(options);
14477
14494
  options.from = options.from ? extend(options.from, from) : from;
14478
14495
  options.to = options.to ? extend(options.to, to) : to;
14479
14496
 
@@ -19326,7 +19343,7 @@ function $HttpProvider() {
19326
19343
  function createShortMethods(names) {
19327
19344
  forEach(arguments, function(name) {
19328
19345
  $http[name] = function(url, config) {
19329
- return $http(extend(config || {}, {
19346
+ return $http(extend({}, config || {}, {
19330
19347
  method: name,
19331
19348
  url: url
19332
19349
  }));
@@ -19338,7 +19355,7 @@ function $HttpProvider() {
19338
19355
  function createShortMethodsWithData(name) {
19339
19356
  forEach(arguments, function(name) {
19340
19357
  $http[name] = function(url, data, config) {
19341
- return $http(extend(config || {}, {
19358
+ return $http(extend({}, config || {}, {
19342
19359
  method: name,
19343
19360
  url: url,
19344
19361
  data: data
@@ -27279,7 +27296,7 @@ function $FilterProvider($provide) {
27279
27296
  */
27280
27297
  function filterFilter() {
27281
27298
  return function(array, expression, comparator) {
27282
- if (!isArray(array)) {
27299
+ if (!isArrayLike(array)) {
27283
27300
  if (array == null) {
27284
27301
  return array;
27285
27302
  } else {
@@ -27309,7 +27326,7 @@ function filterFilter() {
27309
27326
  return array;
27310
27327
  }
27311
27328
 
27312
- return array.filter(predicateFn);
27329
+ return Array.prototype.filter.call(array, predicateFn);
27313
27330
  };
27314
27331
  }
27315
27332
 
@@ -29403,9 +29420,13 @@ var inputType = {
29403
29420
  * as in the ngPattern directive.
29404
29421
  * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
29405
29422
  * a RegExp found by evaluating the Angular expression given in the attribute value.
29406
- * If the expression evaluates to a RegExp object then this is used directly.
29407
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
29408
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
29423
+ * If the expression evaluates to a RegExp object, then this is used directly.
29424
+ * If the expression evaluates to a string, then it will be converted to a RegExp
29425
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
29426
+ * `new RegExp('^abc$')`.<br />
29427
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
29428
+ * start at the index of the last search's match, thus not taking the whole input value into
29429
+ * account.
29409
29430
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
29410
29431
  * interaction with the input element.
29411
29432
  * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
@@ -29983,9 +30004,13 @@ var inputType = {
29983
30004
  * as in the ngPattern directive.
29984
30005
  * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
29985
30006
  * a RegExp found by evaluating the Angular expression given in the attribute value.
29986
- * If the expression evaluates to a RegExp object then this is used directly.
29987
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
29988
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
30007
+ * If the expression evaluates to a RegExp object, then this is used directly.
30008
+ * If the expression evaluates to a string, then it will be converted to a RegExp
30009
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
30010
+ * `new RegExp('^abc$')`.<br />
30011
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
30012
+ * start at the index of the last search's match, thus not taking the whole input value into
30013
+ * account.
29989
30014
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
29990
30015
  * interaction with the input element.
29991
30016
  *
@@ -30077,9 +30102,13 @@ var inputType = {
30077
30102
  * as in the ngPattern directive.
30078
30103
  * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
30079
30104
  * a RegExp found by evaluating the Angular expression given in the attribute value.
30080
- * If the expression evaluates to a RegExp object then this is used directly.
30081
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
30082
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
30105
+ * If the expression evaluates to a RegExp object, then this is used directly.
30106
+ * If the expression evaluates to a string, then it will be converted to a RegExp
30107
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
30108
+ * `new RegExp('^abc$')`.<br />
30109
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
30110
+ * start at the index of the last search's match, thus not taking the whole input value into
30111
+ * account.
30083
30112
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
30084
30113
  * interaction with the input element.
30085
30114
  *
@@ -30172,9 +30201,13 @@ var inputType = {
30172
30201
  * as in the ngPattern directive.
30173
30202
  * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
30174
30203
  * a RegExp found by evaluating the Angular expression given in the attribute value.
30175
- * If the expression evaluates to a RegExp object then this is used directly.
30176
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
30177
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
30204
+ * If the expression evaluates to a RegExp object, then this is used directly.
30205
+ * If the expression evaluates to a string, then it will be converted to a RegExp
30206
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
30207
+ * `new RegExp('^abc$')`.<br />
30208
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
30209
+ * start at the index of the last search's match, thus not taking the whole input value into
30210
+ * account.
30178
30211
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
30179
30212
  * interaction with the input element.
30180
30213
  *
@@ -30796,9 +30829,15 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
30796
30829
  * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
30797
30830
  * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
30798
30831
  * length.
30799
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
30800
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
30801
- * patterns defined as scope expressions.
30832
+ * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
30833
+ * a RegExp found by evaluating the Angular expression given in the attribute value.
30834
+ * If the expression evaluates to a RegExp object, then this is used directly.
30835
+ * If the expression evaluates to a string, then it will be converted to a RegExp
30836
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
30837
+ * `new RegExp('^abc$')`.<br />
30838
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
30839
+ * start at the index of the last search's match, thus not taking the whole input value into
30840
+ * account.
30802
30841
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
30803
30842
  * interaction with the input element.
30804
30843
  * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
@@ -30829,9 +30868,15 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
30829
30868
  * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
30830
30869
  * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
30831
30870
  * length.
30832
- * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
30833
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
30834
- * patterns defined as scope expressions.
30871
+ * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
30872
+ * a RegExp found by evaluating the Angular expression given in the attribute value.
30873
+ * If the expression evaluates to a RegExp object, then this is used directly.
30874
+ * If the expression evaluates to a string, then it will be converted to a RegExp
30875
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
30876
+ * `new RegExp('^abc$')`.<br />
30877
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
30878
+ * start at the index of the last search's match, thus not taking the whole input value into
30879
+ * account.
30835
30880
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
30836
30881
  * interaction with the input element.
30837
30882
  * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
@@ -36905,7 +36950,7 @@ var SelectController =
36905
36950
  $element.val(value);
36906
36951
  if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy
36907
36952
  } else {
36908
- if (isUndefined(value) && self.emptyOption) {
36953
+ if (value == null && self.emptyOption) {
36909
36954
  self.removeUnknownOption();
36910
36955
  $element.val('');
36911
36956
  } else {
@@ -36958,9 +37003,7 @@ var SelectController =
36958
37003
  * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits such as reducing
36959
37004
  * memory and increasing speed by not creating a new scope for each repeated instance, as well as providing
36960
37005
  * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
36961
- * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound
36962
- * to a non-string value. This is because an option element can only be bound to string values at
36963
- * present.
37006
+ * comprehension expression.
36964
37007
  *
36965
37008
  * When an item in the `<select>` menu is selected, the array element or object property
36966
37009
  * represented by the selected option will be bound to the model identified by the `ngModel`
@@ -36973,6 +37016,51 @@ var SelectController =
36973
37016
  * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
36974
37017
  * option. See example below for demonstration.
36975
37018
  *
37019
+ * <div class="alert alert-info">
37020
+ * The value of a `select` directive used without `ngOptions` is always a string.
37021
+ * When the model needs to be bound to a non-string value, you must either explictly convert it
37022
+ * using a directive (see example below) or use `ngOptions` to specify the set of options.
37023
+ * This is because an option element can only be bound to string values at present.
37024
+ * </div>
37025
+ *
37026
+ * ### Example (binding `select` to a non-string value)
37027
+ *
37028
+ * <example name="select-with-non-string-options" module="nonStringSelect">
37029
+ * <file name="index.html">
37030
+ * <select ng-model="model.id" convert-to-number>
37031
+ * <option value="0">Zero</option>
37032
+ * <option value="1">One</option>
37033
+ * <option value="2">Two</option>
37034
+ * </select>
37035
+ * {{ model }}
37036
+ * </file>
37037
+ * <file name="app.js">
37038
+ * angular.module('nonStringSelect', [])
37039
+ * .run(function($rootScope) {
37040
+ * $rootScope.model = { id: 2 };
37041
+ * })
37042
+ * .directive('convertToNumber', function() {
37043
+ * return {
37044
+ * require: 'ngModel',
37045
+ * link: function(scope, element, attrs, ngModel) {
37046
+ * ngModel.$parsers.push(function(val) {
37047
+ * return parseInt(val, 10);
37048
+ * });
37049
+ * ngModel.$formatters.push(function(val) {
37050
+ * return '' + val;
37051
+ * });
37052
+ * }
37053
+ * };
37054
+ * });
37055
+ * </file>
37056
+ * <file name="protractor.js" type="protractor">
37057
+ * it('should initialize to model', function() {
37058
+ * var select = element(by.css('select'));
37059
+ * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');
37060
+ * });
37061
+ * </file>
37062
+ * </example>
37063
+ *
36976
37064
  */
36977
37065
  var selectDirective = function() {
36978
37066
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.4.0-rc.2
2
+ * @license AngularJS v1.4.0
3
3
  * (c) 2010-2015 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- AngularJS v1.4.0-rc.2
2
+ AngularJS v1.4.0
3
3
  (c) 2010-2015 Google, Inc. http://angularjs.org
4
4
  License: MIT
5
5
  */