Skip to content

Commit b63085a

Browse files
committedMay 9, 2018
Fixes #15 Prop Validation Returns Error if Empty String
Fixes #16 build fails on linux Signed-off-by: Alexandre Bonneau <[email protected]>
1 parent b955d9f commit b63085a

File tree

6 files changed

+26
-14
lines changed

6 files changed

+26
-14
lines changed
 

‎CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## Changelog for vue-autoNumeric
22

3+
### 1.2.3
4+
+ Fixes #15 Prop Validation Returns Error if Empty String
5+
+ Fixes #16 build fails on linux
6+
7+
### 1.2.2
8+
+ Fix the npm bundle size
9+
+ It included a superfluous `.tag.gz` of the component generated by `npm pack`, for testing purpose
10+
311
### 1.2.1
412
+ Fixes #13 Not working on mobile devices / userInteraction is never set to true on touch devices (iOS / Android)
513
+ Replace the user interaction tracking system with a simple one where the component AutoNumeric `rawValue` is compared to the watched new `value`.

‎build/webpack.base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ module.exports = {
7171
externals: {
7272
// This prevent bundling the AutoNumeric library inside the vue-autonumeric component
7373
// cf. https://webpack.js.org/configuration/externals/
74-
autonumeric: 'AutoNumeric',
74+
autonumeric: 'autonumeric',
7575
},
7676
};

‎dist/vue-autonumeric.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/**
2-
* vue-autonumeric v1.2.2 (https://github.com/autoNumeric/vue-autoNumeric)
2+
* vue-autonumeric v1.2.3 (https://github.com/autoNumeric/vue-autoNumeric)
33
* © 2018 Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>
44
* Released under the MIT License.
55
*/
66
(function webpackUniversalModuleDefinition(root, factory) {
77
if(typeof exports === 'object' && typeof module === 'object')
8-
module.exports = factory(require("AutoNumeric"));
8+
module.exports = factory(require("autonumeric"));
99
else if(typeof define === 'function' && define.amd)
10-
define("VueAutonumeric", ["AutoNumeric"], factory);
10+
define("VueAutonumeric", ["autonumeric"], factory);
1111
else if(typeof exports === 'object')
12-
exports["VueAutonumeric"] = factory(require("AutoNumeric"));
12+
exports["VueAutonumeric"] = factory(require("autonumeric"));
1313
else
14-
root["VueAutonumeric"] = factory(root["AutoNumeric"]);
14+
root["VueAutonumeric"] = factory(root["autonumeric"]);
1515
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_43__) {
1616
return /******/ (function(modules) { // webpackBootstrap
1717
/******/ // The module cache
@@ -344,8 +344,10 @@ exports.default = {
344344

345345
props: {
346346
value: {
347-
type: Number,
348-
required: false
347+
required: false,
348+
validator: function validator(val) {
349+
return typeof val === 'number' || val === '' || val === null;
350+
}
349351
},
350352

351353
options: {

‎dist/vue-autonumeric.min.js

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

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-autonumeric",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "An AutoNumeric wrapper for Vue.js",
55
"author": "Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>",
66
"license": "MIT",
@@ -10,7 +10,7 @@
1010
"build:release": "cross-env NODE_ENV=production webpack --config build/webpack.dist.js",
1111
"build:examples": "webpack --config build/webpack.examples.js",
1212
"build": "npm run build:debug && npm run build:release && npm run build:examples",
13-
"clean": "rimraf ./examples/js/examples.bundle.js",
13+
"clean": "rimraf ./examples/js/examples.bundle.js ./dist",
1414
"lint": "eslint --ext .js,.vue src examples-src build",
1515
"lintfix": "eslint --fix --ext .js,.vue src examples-src build"
1616
},

‎src/components/VueAutonumeric.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--
22
vue-autonumeric
33

4-
@version 1.2.2
5-
@date 2018-05-08 UTC 02:15
4+
@version 1.2.3
5+
@date 2018-05-09 UTC 21:30
66

77
@author Alexandre Bonneau
88
@copyright 2018 © Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>
@@ -100,8 +100,10 @@ OTHER DEALINGS IN THE SOFTWARE.
100100

101101
props: {
102102
value: {
103-
type : Number,
104103
required: false,
104+
validator(val) {
105+
return typeof val === 'number' || val === '' || val === null;
106+
},
105107
},
106108

107109
options: {

0 commit comments

Comments
 (0)
Please sign in to comment.