From bdf76a384c5436af217b2576e032fa86add8e2db Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 30 Nov 2019 18:09:42 +0000 Subject: [PATCH] chore(release): 0.5.0 [skip ci] # [0.5.0](https://github.com/cchanxzy/react-currency-input-field/compare/v0.4.1...v0.5.0) (2019-11-30) ### Features * allow name to be added to prop and onChange callback ([#17](https://github.com/cchanxzy/react-currency-input-field/issues/17)) ([25ae63c](https://github.com/cchanxzy/react-currency-input-field/commit/25ae63c21ec50d89ece9f9f2318584e2aa5cde70)) --- CHANGELOG.md | 7 +++++++ dist/index.js | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 621a77b..a84538a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [0.5.0](https://github.com/cchanxzy/react-currency-input-field/compare/v0.4.1...v0.5.0) (2019-11-30) + + +### Features + +* allow name to be added to prop and onChange callback ([#17](https://github.com/cchanxzy/react-currency-input-field/issues/17)) ([25ae63c](https://github.com/cchanxzy/react-currency-input-field/commit/25ae63c21ec50d89ece9f9f2318584e2aa5cde70)) + # Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. diff --git a/dist/index.js b/dist/index.js index 473b412..e40feb9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var u in e)t.d(n,u,function(r){return e[r]}.bind(null,u));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(e,r){e.exports=require("react")},function(e,r,t){"use strict";t.r(r);var n=t(0),u=t.n(n),o=function(e,r){var t=e.split("."),n=t[0],u=t[1],o=r||"",i=e.includes(".")?"."+u:"";return""+o+function(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")}(n)+i},i=function(e){var r=e.allowDecimals,t=void 0===r||r,i=e.id,l=e.className,a=e.decimalsLimit,c=void 0===a?2:a,f=e.defaultValue,d=e.onChange,s=e.placeholder,p=e.prefix,v=Object(n.useState)(f?o(String(f),p):""),b=v[0],m=v[1];return u.a.createElement("input",{type:"string",id:i,className:l,onChange:function(e){var r,n=function(e,r,t,n){var u=function(e){return e.replace(/,/g,"")}(n?e.replace(n,""):e);if(u.includes(".")){var o=u.split("."),i=o[0],l=o[1];return""+i+(r?"."+(t?l.slice(0,t):l):"")}return u}(e.target.value,t,c,p);if(!n)return d(null),m("");r=n,Number(r)<0||isNaN(Number(r))||m(o(n,p)),d(Number(n))},onFocus:function(){return b?b.length:0},placeholder:s,value:b})};r.default=i}]); +module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var u in e)t.d(n,u,function(r){return e[r]}.bind(null,u));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(e,r){e.exports=require("react")},function(e,r,t){"use strict";t.r(r);var n=t(0),u=t.n(n),o=function(e,r){var t=e.split("."),n=t[0],u=t[1],o=r||"",i=e.includes(".")?"."+u:"";return""+o+function(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")}(n)+i},i=function(e){var r=e.allowDecimals,t=void 0===r||r,i=e.id,a=e.name,l=e.className,c=e.decimalsLimit,f=void 0===c?2:c,d=e.defaultValue,s=e.onChange,p=e.placeholder,m=e.prefix,v=Object(n.useState)(d?o(String(d),m):""),b=v[0],g=v[1];return u.a.createElement("input",{type:"string",id:i,name:a,className:l,onChange:function(e){var r,n=function(e,r,t,n){var u=function(e){return e.replace(/,/g,"")}(n?e.replace(n,""):e);if(u.includes(".")){var o=u.split("."),i=o[0],a=o[1];return""+i+(r?"."+(t?a.slice(0,t):a):"")}return u}(e.target.value,t,f,m);if(!n)return s(null,a),g("");r=n,Number(r)<0||isNaN(Number(r))||g(o(n,m)),s(Number(n),a)},onFocus:function(){return b?b.length:0},placeholder:p,value:b,pattern:"[0-9]*"})};r.default=i}]); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package.json b/package.json index 25c1c93..09652b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-currency-input-field", - "version": "0.4.1", + "version": "0.5.0", "description": "React input field component for currency and numbers", "files": [ "dist/**/*"