Skip to content

Commit 06fe458

Browse files
committed
v3.0.0
1 parent 5a3f45f commit 06fe458

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 3.0.0 / 2015-10-23
2+
13
**Breaking change:** Now uses a `mask` prop to define the input mask instead of `pattern`, to avoid preventing use of the the HTML5 `pattern` attribute in conjunction with the input mask.
24

35
**Breaking change:** React >= 0.14 is now required.

dist/react-maskedinput.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* react-maskedinput 2.0.0 (dev build at Wed, 07 Oct 2015 20:24:28 GMT) - https://github.com/insin/react-maskedinput
2+
* react-maskedinput 3.0.0 - https://github.com/insin/react-maskedinput
33
* MIT Licensed
44
*/
55
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.MaskedInput = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
@@ -23,7 +23,7 @@ function isRedo(e) {
2323

2424
var MaskedInput = React.createClass({displayName: "MaskedInput",
2525
propTypes: {
26-
pattern: React.PropTypes.string.isRequired,
26+
mask: React.PropTypes.string.isRequired,
2727

2828
formatCharacters: React.PropTypes.object,
2929
placeholderChar: React.PropTypes.string
@@ -37,7 +37,7 @@ var MaskedInput = React.createClass({displayName: "MaskedInput",
3737

3838
componentWillMount:function() {
3939
var options = {
40-
pattern: this.props.pattern,
40+
pattern: this.props.mask,
4141
value: this.props.value,
4242
formatCharacters: this.props.formatCharacters
4343
}
@@ -48,8 +48,8 @@ var MaskedInput = React.createClass({displayName: "MaskedInput",
4848
},
4949

5050
componentWillReceiveProps:function(nextProps) {
51-
if (this.props.pattern !== nextProps.pattern) {
52-
this.mask.setPattern(nextProps.pattern, {value: this.mask.getRawValue()})
51+
if (this.props.mask !== nextProps.mask) {
52+
this.mask.setPattern(nextProps.mask, {value: this.mask.getRawValue()})
5353
}
5454
},
5555

@@ -155,7 +155,7 @@ var MaskedInput = React.createClass({displayName: "MaskedInput",
155155
},
156156

157157
render:function() {
158-
var $__0= this.props,pattern=$__0.pattern,formatCharacters=$__0.formatCharacters,size=$__0.size,placeholder=$__0.placeholder,props=(function(source, exclusion) {var rest = {};var hasOwn = Object.prototype.hasOwnProperty;if (source == null) {throw new TypeError();}for (var key in source) {if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {rest[key] = source[key];}}return rest;})($__0,{pattern:1,formatCharacters:1,size:1,placeholder:1})
158+
var $__0= this.props,mask=$__0.mask,formatCharacters=$__0.formatCharacters,size=$__0.size,placeholder=$__0.placeholder,props=(function(source, exclusion) {var rest = {};var hasOwn = Object.prototype.hasOwnProperty;if (source == null) {throw new TypeError();}for (var key in source) {if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {rest[key] = source[key];}}return rest;})($__0,{mask:1,formatCharacters:1,size:1,placeholder:1})
159159
var patternLength = this.mask.pattern.length
160160
return React.createElement("input", React.__spread({}, props,
161161
{ref: function(r) {return this.input = r;}.bind(this),

0 commit comments

Comments
 (0)