Skip to content

Commit 9e37230

Browse files
committed
upgrade to Vue.js v1.0.26
1 parent 150c1a0 commit 9e37230

File tree

4 files changed

+82
-38
lines changed

4 files changed

+82
-38
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"node_modules"
2727
],
2828
"dependencies": {
29-
"vue": "^1.0.24",
29+
"vue": "^1.0.26",
3030
"bootstrap": "^3.3.6",
3131
"font-awesome": "^4.2.0",
3232
"jquery": "^2.2.4",

demo/demo.all.js

+79-35
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-html-editor v0.2.0
2+
* vue-html-editor v0.2.1
33
* (c) 2016 Haixing Hu
44
* Released under the MIT License.
55
*/
@@ -73,7 +73,7 @@
7373
/***/ function(module, exports, __webpack_require__) {
7474

7575
/* WEBPACK VAR INJECTION */(function(global) {/*!
76-
* Vue.js v1.0.24
76+
* Vue.js v1.0.26
7777
* (c) 2016 Evan You
7878
* Released under the MIT License.
7979
*/
@@ -476,10 +476,15 @@
476476

477477
// UA sniffing for working around browser-specific quirks
478478
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
479+
var isIE = UA && UA.indexOf('trident') > 0;
479480
var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
480481
var isAndroid = UA && UA.indexOf('android') > 0;
481482
var isIos = UA && /(iphone|ipad|ipod|ios)/i.test(UA);
482-
var isWechat = UA && UA.indexOf('micromessenger') > 0;
483+
var iosVersionMatch = isIos && UA.match(/os ([\d_]+)/);
484+
var iosVersion = iosVersionMatch && iosVersionMatch[1].split('_');
485+
486+
// detecting iOS UIWebView by indexedDB
487+
var hasMutationObserverBug = iosVersion && Number(iosVersion[0]) >= 9 && Number(iosVersion[1]) >= 3 && !window.indexedDB;
483488

484489
var transitionProp = undefined;
485490
var transitionEndEvent = undefined;
@@ -520,7 +525,7 @@
520525
}
521526

522527
/* istanbul ignore if */
523-
if (typeof MutationObserver !== 'undefined' && !(isWechat && isIos)) {
528+
if (typeof MutationObserver !== 'undefined' && !hasMutationObserverBug) {
524529
var counter = 1;
525530
var observer = new MutationObserver(nextTickHandler);
526531
var textNode = document.createTextNode(counter);
@@ -592,12 +597,12 @@
592597

593598
p.put = function (key, value) {
594599
var removed;
595-
if (this.size === this.limit) {
596-
removed = this.shift();
597-
}
598600

599601
var entry = this.get(key, true);
600602
if (!entry) {
603+
if (this.size === this.limit) {
604+
removed = this.shift();
605+
}
601606
entry = {
602607
key: key
603608
};
@@ -842,7 +847,7 @@
842847
var unsafeOpen = escapeRegex(config.unsafeDelimiters[0]);
843848
var unsafeClose = escapeRegex(config.unsafeDelimiters[1]);
844849
tagRE = new RegExp(unsafeOpen + '((?:.|\\n)+?)' + unsafeClose + '|' + open + '((?:.|\\n)+?)' + close, 'g');
845-
htmlRE = new RegExp('^' + unsafeOpen + '.*' + unsafeClose + '$');
850+
htmlRE = new RegExp('^' + unsafeOpen + '((?:.|\\n)+?)' + unsafeClose + '$');
846851
// reset cache
847852
cache = new Cache(1000);
848853
}
@@ -1629,7 +1634,8 @@
16291634
return (/HTMLUnknownElement/.test(el.toString()) &&
16301635
// Chrome returns unknown for several HTML5 elements.
16311636
// https://code.google.com/p/chromium/issues/detail?id=540526
1632-
!/^(data|time|rtc|rb)$/.test(tag)
1637+
// Firefox returns unknown for some "Interactive elements."
1638+
!/^(data|time|rtc|rb|details|dialog|summary)$/.test(tag)
16331639
);
16341640
}
16351641
};
@@ -1965,7 +1971,9 @@
19651971
}
19661972
if (child.mixins) {
19671973
for (var i = 0, l = child.mixins.length; i < l; i++) {
1968-
parent = mergeOptions(parent, child.mixins[i], vm);
1974+
var mixin = child.mixins[i];
1975+
var mixinOptions = mixin.prototype instanceof Vue ? mixin.options : mixin;
1976+
parent = mergeOptions(parent, mixinOptions, vm);
19691977
}
19701978
}
19711979
for (key in parent) {
@@ -2393,10 +2401,13 @@
23932401
hasProto: hasProto,
23942402
inBrowser: inBrowser,
23952403
devtools: devtools,
2404+
isIE: isIE,
23962405
isIE9: isIE9,
23972406
isAndroid: isAndroid,
23982407
isIos: isIos,
2399-
isWechat: isWechat,
2408+
iosVersionMatch: iosVersionMatch,
2409+
iosVersion: iosVersion,
2410+
hasMutationObserverBug: hasMutationObserverBug,
24002411
get transitionProp () { return transitionProp; },
24012412
get transitionEndEvent () { return transitionEndEvent; },
24022413
get animationProp () { return animationProp; },
@@ -2884,7 +2895,9 @@
28842895
var restoreRE = /"(\d+)"/g;
28852896
var pathTestRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*$/;
28862897
var identRE = /[^\w$\.](?:[A-Za-z_$][\w$]*)/g;
2887-
var booleanLiteralRE = /^(?:true|false)$/;
2898+
var literalValueRE$1 = /^(?:true|false|null|undefined|Infinity|NaN)$/;
2899+
2900+
function noop() {}
28882901

28892902
/**
28902903
* Save / Rewrite / Restore
@@ -2966,7 +2979,7 @@
29662979
// save strings and object literal keys
29672980
var body = exp.replace(saveRE, save).replace(wsRE, '');
29682981
// rewrite all paths
2969-
// pad 1 space here becaue the regex matches 1 extra char
2982+
// pad 1 space here because the regex matches 1 extra char
29702983
body = (' ' + body).replace(identRE, rewrite).replace(restoreRE, restore);
29712984
return makeGetterFn(body);
29722985
}
@@ -2987,7 +3000,15 @@
29873000
return new Function('scope', 'return ' + body + ';');
29883001
/* eslint-enable no-new-func */
29893002
} catch (e) {
2990-
'development' !== 'production' && warn('Invalid expression. ' + 'Generated function body: ' + body);
3003+
if (true) {
3004+
/* istanbul ignore if */
3005+
if (e.toString().match(/unsafe-eval|CSP/)) {
3006+
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');
3007+
} else {
3008+
warn('Invalid expression. ' + 'Generated function body: ' + body);
3009+
}
3010+
}
3011+
return noop;
29913012
}
29923013
}
29933014

@@ -3049,8 +3070,8 @@
30493070

30503071
function isSimplePath(exp) {
30513072
return pathTestRE.test(exp) &&
3052-
// don't treat true/false as paths
3053-
!booleanLiteralRE.test(exp) &&
3073+
// don't treat literal values as paths
3074+
!literalValueRE$1.test(exp) &&
30543075
// Math constants e.g. Math.PI, Math.E etc.
30553076
exp.slice(0, 5) !== 'Math.';
30563077
}
@@ -3466,7 +3487,7 @@
34663487
}
34673488
var isA = isArray(val);
34683489
var isO = isObject(val);
3469-
if (isA || isO) {
3490+
if ((isA || isO) && Object.isExtensible(val)) {
34703491
if (val.__ob__) {
34713492
var depId = val.__ob__.dep.id;
34723493
if (seen.has(depId)) {
@@ -3529,6 +3550,7 @@
35293550

35303551
var tagRE$1 = /<([\w:-]+)/;
35313552
var entityRE = /&#?\w+?;/;
3553+
var commentRE = /<!--/;
35323554

35333555
/**
35343556
* Convert a string template to a DocumentFragment.
@@ -3551,8 +3573,9 @@
35513573
var frag = document.createDocumentFragment();
35523574
var tagMatch = templateString.match(tagRE$1);
35533575
var entityMatch = entityRE.test(templateString);
3576+
var commentMatch = commentRE.test(templateString);
35543577

3555-
if (!tagMatch && !entityMatch) {
3578+
if (!tagMatch && !entityMatch && !commentMatch) {
35563579
// text only, return a single text node.
35573580
frag.appendChild(document.createTextNode(templateString));
35583581
} else {
@@ -4519,7 +4542,7 @@
45194542
* the filters. This is passed to and called by the watcher.
45204543
*
45214544
* It is necessary for this to be called during the
4522-
* wathcer's dependency collection phase because we want
4545+
* watcher's dependency collection phase because we want
45234546
* the v-for to update when the source Object is mutated.
45244547
*/
45254548

@@ -4862,7 +4885,10 @@
48624885
},
48634886

48644887
update: function update(value) {
4865-
this.el.value = _toString(value);
4888+
// #3029 only update when the value changes. This prevent
4889+
// browsers from overwriting values like selectionStart
4890+
value = _toString(value);
4891+
if (value !== this.el.value) this.el.value = value;
48664892
},
48674893

48684894
unbind: function unbind() {
@@ -4911,6 +4937,8 @@
49114937
var select = {
49124938

49134939
bind: function bind() {
4940+
var _this = this;
4941+
49144942
var self = this;
49154943
var el = this.el;
49164944

@@ -4942,7 +4970,12 @@
49424970
// selectedIndex with value -1 to 0 when the element
49434971
// is appended to a new parent, therefore we have to
49444972
// force a DOM update whenever that happens...
4945-
this.vm.$on('hook:attached', this.forceUpdate);
4973+
this.vm.$on('hook:attached', function () {
4974+
nextTick(_this.forceUpdate);
4975+
});
4976+
if (!inDoc(el)) {
4977+
nextTick(this.forceUpdate);
4978+
}
49464979
},
49474980

49484981
update: function update(value) {
@@ -6212,7 +6245,7 @@
62126245
if (value === undefined) {
62136246
value = getPropDefaultValue(vm, prop);
62146247
}
6215-
value = coerceProp(prop, value);
6248+
value = coerceProp(prop, value, vm);
62166249
var coerced = value !== rawValue;
62176250
if (!assertProp(prop, value, vm)) {
62186251
value = undefined;
@@ -6331,13 +6364,17 @@
63316364
* @return {*}
63326365
*/
63336366

6334-
function coerceProp(prop, value) {
6367+
function coerceProp(prop, value, vm) {
63356368
var coerce = prop.options.coerce;
63366369
if (!coerce) {
63376370
return value;
63386371
}
6339-
// coerce is a function
6340-
return coerce(value);
6372+
if (typeof coerce === 'function') {
6373+
return coerce(value);
6374+
} else {
6375+
'development' !== 'production' && warn('Invalid coerce for prop "' + prop.name + '": expected function, got ' + typeof coerce + '.', vm);
6376+
return value;
6377+
}
63416378
}
63426379

63436380
/**
@@ -6869,10 +6906,9 @@
68696906
// resolve on owner vm
68706907
var hooks = resolveAsset(this.vm.$options, 'transitions', id);
68716908
id = id || 'v';
6909+
oldId = oldId || 'v';
68726910
el.__v_trans = new Transition(el, id, hooks, this.vm);
6873-
if (oldId) {
6874-
removeClass(el, oldId + '-transition');
6875-
}
6911+
removeClass(el, oldId + '-transition');
68766912
addClass(el, id + '-transition');
68776913
}
68786914
};
@@ -7290,7 +7326,7 @@
72907326
if (token.html) {
72917327
replace(node, parseTemplate(value, true));
72927328
} else {
7293-
node.data = value;
7329+
node.data = _toString(value);
72947330
}
72957331
} else {
72967332
vm._bindDir(token.descriptor, node, host, scope);
@@ -8274,7 +8310,7 @@
82748310
};
82758311
}
82768312

8277-
function noop() {}
8313+
function noop$1() {}
82788314

82798315
/**
82808316
* A directive links a DOM element with a piece of data,
@@ -8373,7 +8409,7 @@
83738409
}
83748410
};
83758411
} else {
8376-
this._update = noop;
8412+
this._update = noop$1;
83778413
}
83788414
var preProcess = this._preProcess ? bind(this._preProcess, this) : null;
83798415
var postProcess = this._postProcess ? bind(this._postProcess, this) : null;
@@ -9811,7 +9847,7 @@
98119847

98129848
json: {
98139849
read: function read(value, indent) {
9814-
return typeof value === 'string' ? value : JSON.stringify(value, null, Number(indent) || 2);
9850+
return typeof value === 'string' ? value : JSON.stringify(value, null, arguments.length > 1 ? indent : 2);
98159851
},
98169852
write: function write(value) {
98179853
try {
@@ -9884,7 +9920,13 @@
98849920

98859921
pluralize: function pluralize(value) {
98869922
var args = toArray(arguments, 1);
9887-
return args.length > 1 ? args[value % 10 - 1] || args[args.length - 1] : args[0] + (value === 1 ? '' : 's');
9923+
var length = args.length;
9924+
if (length > 1) {
9925+
var index = value % 10 - 1;
9926+
return index in args ? args[index] : args[length - 1];
9927+
} else {
9928+
return args[0] + (value === 1 ? '' : 's');
9929+
}
98889930
},
98899931

98909932
/**
@@ -10069,7 +10111,9 @@
1006910111
}
1007010112
}
1007110113
if (type === 'component' && isPlainObject(definition)) {
10072-
definition.name = id;
10114+
if (!definition.name) {
10115+
definition.name = id;
10116+
}
1007310117
definition = Vue.extend(definition);
1007410118
}
1007510119
this.options[type + 's'][id] = definition;
@@ -10084,7 +10128,7 @@
1008410128

1008510129
installGlobalAPI(Vue);
1008610130

10087-
Vue.version = '1.0.24';
10131+
Vue.version = '1.0.26';
1008810132

1008910133
// devtools global hook
1009010134
/* istanbul ignore next */

dist/vue-html-editor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-html-editor.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)