vue-autonumeric
Advanced tools
Comparing version 1.2.0 to 1.2.1
## Changelog for vue-autoNumeric | ||
### 1.2.1 | ||
+ Fixes #13 Not working on mobile devices / userInteraction is never set to true on touch devices (iOS / Android) | ||
+ Replace the user interaction tracking system with a simple one where the component AutoNumeric `rawValue` is compared to the watched new `value`. | ||
### 1.2.0 | ||
@@ -4,0 +8,0 @@ + Simplify how the `rawValue` decimal places are set |
/** | ||
* vue-autonumeric v1.2.0 (https://github.com/autoNumeric/vue-autoNumeric) | ||
* vue-autonumeric v1.2.1 (https://github.com/autoNumeric/vue-autoNumeric) | ||
* © 2018 Alexandre Bonneau <alexandre.bonneau@linuxfr.eu> | ||
@@ -339,10 +339,2 @@ * Released under the MIT License. | ||
on: { | ||
keydown: this.setUserInteraction, | ||
paste: this.setUserInteraction, | ||
wheel: this.setUserInteraction, | ||
drop: this.setUserInteraction, | ||
keyup: this.resetUserInteraction, | ||
blur: this.resetUserInteraction, | ||
'autoNumeric:rawValueModified': this.updateVModel | ||
@@ -388,5 +380,3 @@ } | ||
return { | ||
anElement: null, | ||
userInteraction: false | ||
anElement: null | ||
}; | ||
@@ -415,3 +405,2 @@ }, | ||
this.updateVModel(); | ||
this.resetUserInteraction(); | ||
} | ||
@@ -436,8 +425,2 @@ }, | ||
}, | ||
setUserInteraction: function setUserInteraction() { | ||
this.userInteraction = true; | ||
}, | ||
resetUserInteraction: function resetUserInteraction() { | ||
this.userInteraction = false; | ||
}, | ||
manageOptionElement: function manageOptionElement(optionElement) { | ||
@@ -448,3 +431,3 @@ var options = void 0; | ||
if (options === void 0 || options === null) { | ||
console.warn('The given pre-defined options [' + optionElement + '] is not recognized by autoNumeric.\nSwitching back to the default options.'); | ||
console.warn('The given pre-defined options [' + optionElement + '] is not recognized by AutoNumeric.\nSwitching back to the default options.'); | ||
options = defaultOptions; | ||
@@ -477,14 +460,4 @@ } | ||
if (newValue.value !== void 0) { | ||
try { | ||
if (!this.userInteraction) { | ||
if (newValue.value !== oldValue.value) { | ||
this.anElement.set(newValue.value); | ||
} | ||
} | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
this.resetUserInteraction(); | ||
if (newValue.value !== void 0 && this.anElement.getNumber() !== newValue.value && newValue.value !== oldValue.value) { | ||
this.anElement.set(newValue.value); | ||
} | ||
@@ -491,0 +464,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("AutoNumeric")):"function"==typeof define&&define.amd?define("VueAutonumeric",["AutoNumeric"],e):"object"==typeof exports?exports.VueAutonumeric=e(require("AutoNumeric")):t.VueAutonumeric=e(t.AutoNumeric)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}([function(t,e){var n=t.exports={version:"2.5.4"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(7),o=n(8);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(32);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VueAutonumeric=void 0;var r=n(11),o=function(t){return t&&t.__esModule?t:{default:t}}(r);"undefined"!=typeof window&&window.Vue&&Vue.component("vue-autonumeric",o.default),e.VueAutonumeric=o.default,e.default=o.default},function(t,e,n){var r=n(12)(n(13),null,null,null);t.exports=r.exports},function(t,e){t.exports=function(t,e,n,r){var o,i=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(o=t,i=t.default);var c="function"==typeof i?i.options:i;if(e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns),n&&(c._scopeId=n),r){var f=Object.create(c.computed||null);Object.keys(r).forEach(function(t){var e=r[t];f[t]=function(){return e}}),c.computed=f}return{esModule:o,exports:i,options:c}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(14),i=r(o),u=n(16),c=r(u),f=n(43),a=r(f),s={};e.default={name:"VueAutonumeric",render:function(t){var e="input"===this.tag,n=void 0;return n=e?{type:"text",placeholder:this.placeholder}:{contenteditable:!0},t(this.tag,{attrs:n,ref:"autoNumericElement",on:{keydown:this.setUserInteraction,paste:this.setUserInteraction,wheel:this.setUserInteraction,drop:this.setUserInteraction,keyup:this.resetUserInteraction,blur:this.resetUserInteraction,"autoNumeric:rawValueModified":this.updateVModel}})},props:{value:{type:Number,required:!1},options:{type:[Object,String,Array],required:!1,default:function(){return s}},resetOnOptions:{type:Boolean,required:!1,default:!0},placeholder:{type:String,required:!1},tag:{type:String,required:!1,default:"input"}},data:function(){return{anElement:null,userInteraction:!1}},mounted:function(){var t=this,e=void 0;if(Array.isArray(this.options)){var n={};this.options.forEach(function(r){e=t.manageOptionElement(r),n=(0,c.default)(n,e)}),e=n}else e=this.manageOptionElement(this.options);this.anElement=new a.default(this.$refs.autoNumericElement,e),null!==this.value&&""!==this.value&&(this.anElement.set(this.value),this.updateVModel(),this.resetUserInteraction())},computed:{anInfo:function(){return{value:this.value,options:this.options}}},methods:{updateVModel:function(t){null!==this.anElement&&this.$emit("input",this.anElement.getNumber(),t)},setUserInteraction:function(){this.userInteraction=!0},resetUserInteraction:function(){this.userInteraction=!1},manageOptionElement:function(t){var e=void 0;return"string"==typeof t||t instanceof String?void 0!==(e=a.default.getPredefinedOptions()[t])&&null!==e||(console.warn("The given pre-defined options ["+t+"] is not recognized by autoNumeric.\nSwitching back to the default options."),e=s):e=t,e}},watch:{anInfo:function(t,e){if(e.options&&(0,i.default)(t.options)!==(0,i.default)(e.options)){this.resetOnOptions&&this.anElement.options.reset();var n=void 0;n=Array.isArray(t.options)?a.default.mergeOptions(t.options):a.default._getOptionObject(t.options),this.anElement.update(n)}if(void 0!==t.value){try{this.userInteraction||t.value!==e.value&&this.anElement.set(t.value)}catch(t){console.error(t)}this.resetUserInteraction()}}}}},function(t,e,n){t.exports={default:n(15),__esModule:!0}},function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){t.exports={default:n(17),__esModule:!0}},function(t,e,n){n(18),t.exports=n(0).Object.assign},function(t,e,n){var r=n(19);r(r.S+r.F,"Object",{assign:n(29)})},function(t,e,n){var r=n(1),o=n(0),i=n(20),u=n(22),c=n(5),f=function(t,e,n){var a,s,p,l=t&f.F,d=t&f.G,h=t&f.S,v=t&f.P,y=t&f.B,m=t&f.W,x=d?o:o[e]||(o[e]={}),b=x.prototype,g=d?r:h?r[e]:(r[e]||{}).prototype;d&&(n=e);for(a in n)(s=!l&&g&&void 0!==g[a])&&c(x,a)||(p=s?g[a]:n[a],x[a]=d&&"function"!=typeof g[a]?n[a]:y&&s?i(p,r):m&&g[a]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(p):v&&"function"==typeof p?i(Function.call,p):p,v&&((x.virtual||(x.virtual={}))[a]=p,t&f.R&&b&&!b[a]&&u(b,a,p)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(23),o=n(28);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(24),o=n(25),i=n(27),u=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var r=n(30),o=n(40),i=n(41),u=n(42),c=n(7),f=Object.assign;t.exports=!f||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=f({},t)[n]||Object.keys(f({},e)).join("")!=r})?function(t,e){for(var n=u(t),f=arguments.length,a=1,s=o.f,p=i.f;f>a;)for(var l,d=c(arguments[a++]),h=s?r(d).concat(s(d)):r(d),v=h.length,y=0;v>y;)p.call(d,l=h[y++])&&(n[l]=d[l]);return n}:f},function(t,e,n){var r=n(31),o=n(39);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(5),o=n(6),i=n(33)(!1),u=n(36)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),f=0,a=[];for(n in c)n!=u&&r(c,n)&&a.push(n);for(;e.length>f;)r(c,n=e[f++])&&(~i(a,n)||a.push(n));return a}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(6),o=n(34),i=n(35);t.exports=function(t){return function(e,n,u){var c,f=r(e),a=o(f.length),s=i(u,a);if(t&&n!=n){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===n)return t||s||0;return!t&&-1}}},function(t,e,n){var r=n(9),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(9),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(37)("keys"),o=n(38);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(8);t.exports=function(t){return Object(r(t))}},function(e,n){e.exports=t}]).default}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("AutoNumeric")):"function"==typeof define&&define.amd?define("VueAutonumeric",["AutoNumeric"],e):"object"==typeof exports?exports.VueAutonumeric=e(require("AutoNumeric")):t.VueAutonumeric=e(t.AutoNumeric)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}([function(t,e){var n=t.exports={version:"2.5.4"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(7),o=n(8);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(32);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VueAutonumeric=void 0;var r=n(11),o=function(t){return t&&t.__esModule?t:{default:t}}(r);"undefined"!=typeof window&&window.Vue&&Vue.component("vue-autonumeric",o.default),e.VueAutonumeric=o.default,e.default=o.default},function(t,e,n){var r=n(12)(n(13),null,null,null);t.exports=r.exports},function(t,e){t.exports=function(t,e,n,r){var o,u=t=t||{},i=typeof t.default;"object"!==i&&"function"!==i||(o=t,u=t.default);var c="function"==typeof u?u.options:u;if(e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns),n&&(c._scopeId=n),r){var f=Object.create(c.computed||null);Object.keys(r).forEach(function(t){var e=r[t];f[t]=function(){return e}}),c.computed=f}return{esModule:o,exports:u,options:c}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(14),u=r(o),i=n(16),c=r(i),f=n(43),a=r(f),s={};e.default={name:"VueAutonumeric",render:function(t){var e="input"===this.tag,n=void 0;return n=e?{type:"text",placeholder:this.placeholder}:{contenteditable:!0},t(this.tag,{attrs:n,ref:"autoNumericElement",on:{"autoNumeric:rawValueModified":this.updateVModel}})},props:{value:{type:Number,required:!1},options:{type:[Object,String,Array],required:!1,default:function(){return s}},resetOnOptions:{type:Boolean,required:!1,default:!0},placeholder:{type:String,required:!1},tag:{type:String,required:!1,default:"input"}},data:function(){return{anElement:null}},mounted:function(){var t=this,e=void 0;if(Array.isArray(this.options)){var n={};this.options.forEach(function(r){e=t.manageOptionElement(r),n=(0,c.default)(n,e)}),e=n}else e=this.manageOptionElement(this.options);this.anElement=new a.default(this.$refs.autoNumericElement,e),null!==this.value&&""!==this.value&&(this.anElement.set(this.value),this.updateVModel())},computed:{anInfo:function(){return{value:this.value,options:this.options}}},methods:{updateVModel:function(t){null!==this.anElement&&this.$emit("input",this.anElement.getNumber(),t)},manageOptionElement:function(t){var e=void 0;return"string"==typeof t||t instanceof String?void 0!==(e=a.default.getPredefinedOptions()[t])&&null!==e||(console.warn("The given pre-defined options ["+t+"] is not recognized by AutoNumeric.\nSwitching back to the default options."),e=s):e=t,e}},watch:{anInfo:function(t,e){if(e.options&&(0,u.default)(t.options)!==(0,u.default)(e.options)){this.resetOnOptions&&this.anElement.options.reset();var n=void 0;n=Array.isArray(t.options)?a.default.mergeOptions(t.options):a.default._getOptionObject(t.options),this.anElement.update(n)}void 0!==t.value&&this.anElement.getNumber()!==t.value&&t.value!==e.value&&this.anElement.set(t.value)}}}},function(t,e,n){t.exports={default:n(15),__esModule:!0}},function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){t.exports={default:n(17),__esModule:!0}},function(t,e,n){n(18),t.exports=n(0).Object.assign},function(t,e,n){var r=n(19);r(r.S+r.F,"Object",{assign:n(29)})},function(t,e,n){var r=n(1),o=n(0),u=n(20),i=n(22),c=n(5),f=function(t,e,n){var a,s,p,l=t&f.F,d=t&f.G,v=t&f.S,h=t&f.P,y=t&f.B,m=t&f.W,x=d?o:o[e]||(o[e]={}),b=x.prototype,g=d?r:v?r[e]:(r[e]||{}).prototype;d&&(n=e);for(a in n)(s=!l&&g&&void 0!==g[a])&&c(x,a)||(p=s?g[a]:n[a],x[a]=d&&"function"!=typeof g[a]?n[a]:y&&s?u(p,r):m&&g[a]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(p):h&&"function"==typeof p?u(Function.call,p):p,h&&((x.virtual||(x.virtual={}))[a]=p,t&f.R&&b&&!b[a]&&i(b,a,p)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(23),o=n(28);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(24),o=n(25),u=n(27),i=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),o=n(1).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var r=n(30),o=n(40),u=n(41),i=n(42),c=n(7),f=Object.assign;t.exports=!f||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=f({},t)[n]||Object.keys(f({},e)).join("")!=r})?function(t,e){for(var n=i(t),f=arguments.length,a=1,s=o.f,p=u.f;f>a;)for(var l,d=c(arguments[a++]),v=s?r(d).concat(s(d)):r(d),h=v.length,y=0;h>y;)p.call(d,l=v[y++])&&(n[l]=d[l]);return n}:f},function(t,e,n){var r=n(31),o=n(39);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(5),o=n(6),u=n(33)(!1),i=n(36)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),f=0,a=[];for(n in c)n!=i&&r(c,n)&&a.push(n);for(;e.length>f;)r(c,n=e[f++])&&(~u(a,n)||a.push(n));return a}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(6),o=n(34),u=n(35);t.exports=function(t){return function(e,n,i){var c,f=r(e),a=o(f.length),s=u(i,a);if(t&&n!=n){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===n)return t||s||0;return!t&&-1}}},function(t,e,n){var r=n(9),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(9),o=Math.max,u=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):u(t,e)}},function(t,e,n){var r=n(37)("keys"),o=n(38);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(8);t.exports=function(t){return Object(r(t))}},function(e,n){e.exports=t}]).default}); |
import Vue from 'vue'; | ||
import App from './App.vue'; | ||
Vue.config.devtools = true; | ||
Vue.config.debug = true; | ||
Vue.config.silent = false; | ||
Vue.config.productionTip = true; | ||
const app = new Vue({ | ||
@@ -5,0 +10,0 @@ el : '#app', |
{ | ||
"name": "vue-autonumeric", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "An AutoNumeric wrapper for Vue.js", | ||
@@ -42,3 +42,3 @@ "author": "Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>", | ||
"dependencies": { | ||
"autonumeric": "^4.2.9" | ||
"autonumeric": "^4.2.12" | ||
}, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
@@ -19,2 +19,4 @@ ## vue-autoNumeric | ||
Alternatively you can check the [examples](#examples) directly in your browser to see how to integrate the component with Vue and AutoNumeric. | ||
### Installation | ||
@@ -50,3 +52,3 @@ | ||
externals: { | ||
AutoNumeric: 'AutoNumeric', | ||
autonumeric: 'AutoNumeric', | ||
}, | ||
@@ -190,4 +192,14 @@ }; | ||
Moreover, you can check the [shipped examples](https://github.com/autoNumeric/vue-autoNumeric/blob/master/examples/index.html) in your browser, and study its [source here](https://github.com/autoNumeric/vue-autoNumeric/tree/master/examples-src). | ||
#### Examples | ||
You can also check the [shipped examples](https://github.com/autoNumeric/vue-autoNumeric/blob/master/examples/index.html) in your browser, and study their [source here](https://github.com/autoNumeric/vue-autoNumeric/tree/master/examples-src).<br>To do so, first compile the example using: | ||
```bash | ||
# this will build the component *and* the examples | ||
yarn build | ||
``` | ||
Then check the resulting html file in your browser using: | ||
```bash | ||
firefox ./examples/index.html # or `chrome` | ||
``` | ||
### Requirements | ||
@@ -194,0 +206,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1270
251
0
281812
15
Updatedautonumeric@^4.2.12