vuejs 1.0.26 → 1.0.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68fd7b450826fa3f0fcb277942086fb1f8aa67e1
4
- data.tar.gz: 720b4b56d10b9dc7baa772a835e8b6941bea379d
3
+ metadata.gz: 0b8fe823b5c0798ab7d7289029b17fbee80c38e2
4
+ data.tar.gz: 05b95e8a0069416315a7ce94c26116307dc89a1b
5
5
  SHA512:
6
- metadata.gz: da22388175330dda8df7daceab3561d0d34e8774cb9e3622a993ba57a32332bea77302fff2dc5dffc8319d92e90690b33c2f59f689d3f9272bf5b31f317f064c
7
- data.tar.gz: 421c595d297b717a6d891134214ea1f831b27aa9bbb9ef8b7d11277b9e4a317459b5cb1b660fa89b6e7e5c1db208a66ebfee2e28e4b76ecf22f0103ba638b69b
6
+ metadata.gz: 0f840bf40a829a362248484d5042ec354f1752f095d16e5dd101bc4c7e9dee0450149f7474a4e319e8248ec805f870a3e00f882479b2638f9634c2b61dfc3e92
7
+ data.tar.gz: 766008ae4e35ad265d7c0b3a65b74625277ec259c5dba45bd46b433f154e9c1a37f55f73d65001ab38c96f339e59918df6818a3acfde6154a28677e18e7bf27f
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Vuejs ships with the latest [Vue.js + router + resource](http://vuejs.org/) and integrate with Rails' asset pipeline. Vue.js is created by Evan You.
4
4
 
5
- The current version is Vue.js (v1.0.24) + vue-router (v0.7.13) + vue-resource (v0.7.4)
5
+ The current version is Vue.js (v1.0.25) + vue-router (v0.7.13) + vue-resource (v0.7.4)
6
6
 
7
7
  > Reactive Components for Modern Web Interfaces
8
8
 
@@ -1,3 +1,3 @@
1
1
  module Vuejs
2
- VERSION = "1.0.26"
2
+ VERSION = "1.0.27"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vue.js v1.0.24
2
+ * Vue.js v1.0.25
3
3
  * (c) 2016 Evan You
4
4
  * Released under the MIT License.
5
5
  */
@@ -402,10 +402,15 @@
402
402
 
403
403
  // UA sniffing for working around browser-specific quirks
404
404
  var UA = inBrowser && window.navigator.userAgent.toLowerCase();
405
+ var isIE = UA && UA.indexOf('trident') > 0;
405
406
  var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
406
407
  var isAndroid = UA && UA.indexOf('android') > 0;
407
408
  var isIos = UA && /(iphone|ipad|ipod|ios)/i.test(UA);
408
- var isWechat = UA && UA.indexOf('micromessenger') > 0;
409
+ var iosVersionMatch = isIos && UA.match(/os ([\d_]+)/);
410
+ var iosVersion = iosVersionMatch && iosVersionMatch[1].split('_');
411
+
412
+ // detecting iOS UIWebView by indexedDB
413
+ var hasMutationObserverBug = iosVersion && Number(iosVersion[0]) >= 9 && Number(iosVersion[1]) >= 3 && !window.indexedDB;
409
414
 
410
415
  var transitionProp = undefined;
411
416
  var transitionEndEvent = undefined;
@@ -446,7 +451,7 @@
446
451
  }
447
452
 
448
453
  /* istanbul ignore if */
449
- if (typeof MutationObserver !== 'undefined' && !(isWechat && isIos)) {
454
+ if (typeof MutationObserver !== 'undefined' && !hasMutationObserverBug) {
450
455
  var counter = 1;
451
456
  var observer = new MutationObserver(nextTickHandler);
452
457
  var textNode = document.createTextNode(counter);
@@ -518,12 +523,12 @@
518
523
 
519
524
  p.put = function (key, value) {
520
525
  var removed;
521
- if (this.size === this.limit) {
522
- removed = this.shift();
523
- }
524
526
 
525
527
  var entry = this.get(key, true);
526
528
  if (!entry) {
529
+ if (this.size === this.limit) {
530
+ removed = this.shift();
531
+ }
527
532
  entry = {
528
533
  key: key
529
534
  };
@@ -768,7 +773,7 @@ var directive = Object.freeze({
768
773
  var unsafeOpen = escapeRegex(config.unsafeDelimiters[0]);
769
774
  var unsafeClose = escapeRegex(config.unsafeDelimiters[1]);
770
775
  tagRE = new RegExp(unsafeOpen + '((?:.|\\n)+?)' + unsafeClose + '|' + open + '((?:.|\\n)+?)' + close, 'g');
771
- htmlRE = new RegExp('^' + unsafeOpen + '.*' + unsafeClose + '$');
776
+ htmlRE = new RegExp('^' + unsafeOpen + '((?:.|\\n)+?)' + unsafeClose + '$');
772
777
  // reset cache
773
778
  cache = new Cache(1000);
774
779
  }
@@ -1555,7 +1560,8 @@ var transition = Object.freeze({
1555
1560
  return (/HTMLUnknownElement/.test(el.toString()) &&
1556
1561
  // Chrome returns unknown for several HTML5 elements.
1557
1562
  // https://code.google.com/p/chromium/issues/detail?id=540526
1558
- !/^(data|time|rtc|rb)$/.test(tag)
1563
+ // Firefox returns unknown for some "Interactive elements."
1564
+ !/^(data|time|rtc|rb|details|dialog|summary)$/.test(tag)
1559
1565
  );
1560
1566
  }
1561
1567
  };
@@ -1891,7 +1897,9 @@ var transition = Object.freeze({
1891
1897
  }
1892
1898
  if (child.mixins) {
1893
1899
  for (var i = 0, l = child.mixins.length; i < l; i++) {
1894
- parent = mergeOptions(parent, child.mixins[i], vm);
1900
+ var mixin = child.mixins[i];
1901
+ var mixinOptions = mixin.prototype instanceof Vue ? mixin.options : mixin;
1902
+ parent = mergeOptions(parent, mixinOptions, vm);
1895
1903
  }
1896
1904
  }
1897
1905
  for (key in parent) {
@@ -2319,10 +2327,13 @@ var transition = Object.freeze({
2319
2327
  hasProto: hasProto,
2320
2328
  inBrowser: inBrowser,
2321
2329
  devtools: devtools,
2330
+ isIE: isIE,
2322
2331
  isIE9: isIE9,
2323
2332
  isAndroid: isAndroid,
2324
2333
  isIos: isIos,
2325
- isWechat: isWechat,
2334
+ iosVersionMatch: iosVersionMatch,
2335
+ iosVersion: iosVersion,
2336
+ hasMutationObserverBug: hasMutationObserverBug,
2326
2337
  get transitionProp () { return transitionProp; },
2327
2338
  get transitionEndEvent () { return transitionEndEvent; },
2328
2339
  get animationProp () { return animationProp; },
@@ -2810,7 +2821,9 @@ var path = Object.freeze({
2810
2821
  var restoreRE = /"(\d+)"/g;
2811
2822
  var pathTestRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*$/;
2812
2823
  var identRE = /[^\w$\.](?:[A-Za-z_$][\w$]*)/g;
2813
- var booleanLiteralRE = /^(?:true|false)$/;
2824
+ var literalValueRE$1 = /^(?:true|false|null|undefined|Infinity|NaN)$/;
2825
+
2826
+ function noop() {}
2814
2827
 
2815
2828
  /**
2816
2829
  * Save / Rewrite / Restore
@@ -2892,7 +2905,7 @@ var path = Object.freeze({
2892
2905
  // save strings and object literal keys
2893
2906
  var body = exp.replace(saveRE, save).replace(wsRE, '');
2894
2907
  // rewrite all paths
2895
- // pad 1 space here becaue the regex matches 1 extra char
2908
+ // pad 1 space here because the regex matches 1 extra char
2896
2909
  body = (' ' + body).replace(identRE, rewrite).replace(restoreRE, restore);
2897
2910
  return makeGetterFn(body);
2898
2911
  }
@@ -2913,7 +2926,15 @@ var path = Object.freeze({
2913
2926
  return new Function('scope', 'return ' + body + ';');
2914
2927
  /* eslint-enable no-new-func */
2915
2928
  } catch (e) {
2916
- 'development' !== 'production' && warn('Invalid expression. ' + 'Generated function body: ' + body);
2929
+ if ('development' !== 'production') {
2930
+ /* istanbul ignore if */
2931
+ if (e.toString().match(/unsafe-eval|CSP/)) {
2932
+ warn('It seems you are using the default build of Vue.js in an environment ' + 'with Content Security Policy that prohibits unsafe-eval. ' + 'Use the CSP-compliant build instead: ' + 'http://vuejs.org/guide/installation.html#CSP-compliant-build');
2933
+ } else {
2934
+ warn('Invalid expression. ' + 'Generated function body: ' + body);
2935
+ }
2936
+ }
2937
+ return noop;
2917
2938
  }
2918
2939
  }
2919
2940
 
@@ -2975,8 +2996,8 @@ var path = Object.freeze({
2975
2996
 
2976
2997
  function isSimplePath(exp) {
2977
2998
  return pathTestRE.test(exp) &&
2978
- // don't treat true/false as paths
2979
- !booleanLiteralRE.test(exp) &&
2999
+ // don't treat literal values as paths
3000
+ !literalValueRE$1.test(exp) &&
2980
3001
  // Math constants e.g. Math.PI, Math.E etc.
2981
3002
  exp.slice(0, 5) !== 'Math.';
2982
3003
  }
@@ -3455,6 +3476,7 @@ var expression = Object.freeze({
3455
3476
 
3456
3477
  var tagRE$1 = /<([\w:-]+)/;
3457
3478
  var entityRE = /&#?\w+?;/;
3479
+ var commentRE = /<!--/;
3458
3480
 
3459
3481
  /**
3460
3482
  * Convert a string template to a DocumentFragment.
@@ -3477,8 +3499,9 @@ var expression = Object.freeze({
3477
3499
  var frag = document.createDocumentFragment();
3478
3500
  var tagMatch = templateString.match(tagRE$1);
3479
3501
  var entityMatch = entityRE.test(templateString);
3502
+ var commentMatch = commentRE.test(templateString);
3480
3503
 
3481
- if (!tagMatch && !entityMatch) {
3504
+ if (!tagMatch && !entityMatch && !commentMatch) {
3482
3505
  // text only, return a single text node.
3483
3506
  frag.appendChild(document.createTextNode(templateString));
3484
3507
  } else {
@@ -4445,7 +4468,7 @@ var template = Object.freeze({
4445
4468
  * the filters. This is passed to and called by the watcher.
4446
4469
  *
4447
4470
  * It is necessary for this to be called during the
4448
- * wathcer's dependency collection phase because we want
4471
+ * watcher's dependency collection phase because we want
4449
4472
  * the v-for to update when the source Object is mutated.
4450
4473
  */
4451
4474
 
@@ -4788,7 +4811,10 @@ var template = Object.freeze({
4788
4811
  },
4789
4812
 
4790
4813
  update: function update(value) {
4791
- this.el.value = _toString(value);
4814
+ // #3029 only update when the value changes. This prevent
4815
+ // browsers from overwriting values like selectionStart
4816
+ value = _toString(value);
4817
+ if (value !== this.el.value) this.el.value = value;
4792
4818
  },
4793
4819
 
4794
4820
  unbind: function unbind() {
@@ -4837,6 +4863,8 @@ var template = Object.freeze({
4837
4863
  var select = {
4838
4864
 
4839
4865
  bind: function bind() {
4866
+ var _this = this;
4867
+
4840
4868
  var self = this;
4841
4869
  var el = this.el;
4842
4870
 
@@ -4868,11 +4896,16 @@ var template = Object.freeze({
4868
4896
  // selectedIndex with value -1 to 0 when the element
4869
4897
  // is appended to a new parent, therefore we have to
4870
4898
  // force a DOM update whenever that happens...
4871
- this.vm.$on('hook:attached', this.forceUpdate);
4899
+ this.vm.$on('hook:attached', function () {
4900
+ nextTick(_this.forceUpdate);
4901
+ });
4872
4902
  },
4873
4903
 
4874
4904
  update: function update(value) {
4875
4905
  var el = this.el;
4906
+ if (!inDoc(el)) {
4907
+ return nextTick(this.forceUpdate);
4908
+ }
4876
4909
  el.selectedIndex = -1;
4877
4910
  var multi = this.multiple && isArray(value);
4878
4911
  var options = el.options;
@@ -6138,7 +6171,7 @@ var template = Object.freeze({
6138
6171
  if (value === undefined) {
6139
6172
  value = getPropDefaultValue(vm, prop);
6140
6173
  }
6141
- value = coerceProp(prop, value);
6174
+ value = coerceProp(prop, value, vm);
6142
6175
  var coerced = value !== rawValue;
6143
6176
  if (!assertProp(prop, value, vm)) {
6144
6177
  value = undefined;
@@ -6257,13 +6290,17 @@ var template = Object.freeze({
6257
6290
  * @return {*}
6258
6291
  */
6259
6292
 
6260
- function coerceProp(prop, value) {
6293
+ function coerceProp(prop, value, vm) {
6261
6294
  var coerce = prop.options.coerce;
6262
6295
  if (!coerce) {
6263
6296
  return value;
6264
6297
  }
6265
- // coerce is a function
6266
- return coerce(value);
6298
+ if (typeof coerce === 'function') {
6299
+ return coerce(value);
6300
+ } else {
6301
+ 'development' !== 'production' && warn('Invalid coerce for prop "' + prop.name + '": expected function, got ' + typeof coerce + '.', vm);
6302
+ return value;
6303
+ }
6267
6304
  }
6268
6305
 
6269
6306
  /**
@@ -6795,10 +6832,9 @@ var template = Object.freeze({
6795
6832
  // resolve on owner vm
6796
6833
  var hooks = resolveAsset(this.vm.$options, 'transitions', id);
6797
6834
  id = id || 'v';
6835
+ oldId = oldId || 'v';
6798
6836
  el.__v_trans = new Transition(el, id, hooks, this.vm);
6799
- if (oldId) {
6800
- removeClass(el, oldId + '-transition');
6801
- }
6837
+ removeClass(el, oldId + '-transition');
6802
6838
  addClass(el, id + '-transition');
6803
6839
  }
6804
6840
  };
@@ -7216,7 +7252,7 @@ var template = Object.freeze({
7216
7252
  if (token.html) {
7217
7253
  replace(node, parseTemplate(value, true));
7218
7254
  } else {
7219
- node.data = value;
7255
+ node.data = _toString(value);
7220
7256
  }
7221
7257
  } else {
7222
7258
  vm._bindDir(token.descriptor, node, host, scope);
@@ -8200,7 +8236,7 @@ var template = Object.freeze({
8200
8236
  };
8201
8237
  }
8202
8238
 
8203
- function noop() {}
8239
+ function noop$1() {}
8204
8240
 
8205
8241
  /**
8206
8242
  * A directive links a DOM element with a piece of data,
@@ -8299,7 +8335,7 @@ var template = Object.freeze({
8299
8335
  }
8300
8336
  };
8301
8337
  } else {
8302
- this._update = noop;
8338
+ this._update = noop$1;
8303
8339
  }
8304
8340
  var preProcess = this._preProcess ? bind(this._preProcess, this) : null;
8305
8341
  var postProcess = this._postProcess ? bind(this._postProcess, this) : null;
@@ -9737,7 +9773,7 @@ var template = Object.freeze({
9737
9773
 
9738
9774
  json: {
9739
9775
  read: function read(value, indent) {
9740
- return typeof value === 'string' ? value : JSON.stringify(value, null, Number(indent) || 2);
9776
+ return typeof value === 'string' ? value : JSON.stringify(value, null, arguments.length > 1 ? indent : 2);
9741
9777
  },
9742
9778
  write: function write(value) {
9743
9779
  try {
@@ -9995,7 +10031,9 @@ var template = Object.freeze({
9995
10031
  }
9996
10032
  }
9997
10033
  if (type === 'component' && isPlainObject(definition)) {
9998
- definition.name = id;
10034
+ if (!definition.name) {
10035
+ definition.name = id;
10036
+ }
9999
10037
  definition = Vue.extend(definition);
10000
10038
  }
10001
10039
  this.options[type + 's'][id] = definition;
@@ -10010,7 +10048,7 @@ var template = Object.freeze({
10010
10048
 
10011
10049
  installGlobalAPI(Vue);
10012
10050
 
10013
- Vue.version = '1.0.24';
10051
+ Vue.version = '1.0.25';
10014
10052
 
10015
10053
  // devtools global hook
10016
10054
  /* istanbul ignore next */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vuejs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.26
4
+ version: 1.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Lim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-12 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler