Robin Herbots 10 years ago
parent
commit
d5f0ad6872

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.1.64-174",
+  "version": "3.1.64-175",
   "main": [
   "main": [
     "./dist/inputmask/jquery.inputmask.js",
     "./dist/inputmask/jquery.inputmask.js",
     "./dist/inputmask/inputmask.js",
     "./dist/inputmask/inputmask.js",

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
     "name": "jquery_inputmask",
     "name": "jquery_inputmask",
     "repository": "robinherbots/jquery.inputmask",
     "repository": "robinherbots/jquery.inputmask",
     "description": "jquery.inputmask is a jquery plugin which create an input mask.",
     "description": "jquery.inputmask is a jquery plugin which create an input mask.",
-    "version": "3.1.64-174",
+    "version": "3.1.64-175",
     "keywords": [ "jquery", "plugins", "input", "form", "inputmask", "mask" ],
     "keywords": [ "jquery", "plugins", "input", "form", "inputmask", "mask" ],
     "main": "./dist/jquery.inputmask.bundle.js",
     "main": "./dist/jquery.inputmask.bundle.js",
     "scripts": [
     "scripts": [

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
 {
     "name": "robinherbots/jquery.inputmask",
     "name": "robinherbots/jquery.inputmask",
     "description": "jquery.inputmask is a jquery plugin which create an input mask.",
     "description": "jquery.inputmask is a jquery plugin which create an input mask.",
-	"version": "3.1.64-174",
+	"version": "3.1.64-175",
     "type": "library",
     "type": "library",
     "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
     "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
     "homepage": "http://robinherbots.github.io/jquery.inputmask",
     "homepage": "http://robinherbots.github.io/jquery.inputmask",

+ 1 - 1
dist/inputmask/dependencyLib.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);
     "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);

+ 1 - 1
dist/inputmask/inputmask.date.extensions.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/inputmask.extensions.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/inputmask.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("dependencyLib")) : factory(window.dependencyLib || jQuery);
     "function" == typeof define && define.amd ? define([ "dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("dependencyLib")) : factory(window.dependencyLib || jQuery);

+ 12 - 10
dist/inputmask/inputmask.numeric.extensions.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);
@@ -56,8 +56,8 @@
             suffix: "",
             suffix: "",
             rightAlign: !0,
             rightAlign: !0,
             decimalProtect: !0,
             decimalProtect: !0,
-            min: void 0,
-            max: void 0,
+            min: null,
+            max: null,
             step: 1,
             step: 1,
             insertMode: !0,
             insertMode: !0,
             autoUnmask: !1,
             autoUnmask: !1,
@@ -246,8 +246,8 @@
                 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"), 
                 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"), 
                 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 
                 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 
                 processValue = processValue === opts.negationSymbol.front ? processValue + "0" : processValue, 
                 processValue = processValue === opts.negationSymbol.front ? processValue + "0" : processValue, 
-                isFinite(processValue) && (isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)), 
-                isValid && isFinite(opts.min) && (0 >= processValue || processValue.toString().length >= opts.min.toString().length) && (isValid = parseFloat(processValue) >= parseFloat(opts.min), 
+                isFinite(processValue) && (null !== opts.max && isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)), 
+                isValid && null !== opts.min && isFinite(opts.min) && (0 >= processValue || processValue.toString().length >= opts.min.toString().length) && (isValid = parseFloat(processValue) >= parseFloat(opts.min), 
                 isValid || (isValid = $.extend(!0, {
                 isValid || (isValid = $.extend(!0, {
                     refreshFromBuffer: !0,
                     refreshFromBuffer: !0,
                     buffer: (opts.prefix + opts.min).split("")
                     buffer: (opts.prefix + opts.min).split("")
@@ -373,11 +373,13 @@
                     }
                     }
                     var buffer = [];
                     var buffer = [];
                     for (var vp in maskset.validPositions) void 0 !== maskset.validPositions[vp].input && buffer.push(maskset.validPositions[vp].input);
                     for (var vp in maskset.validPositions) void 0 !== maskset.validPositions[vp].input && buffer.push(maskset.validPositions[vp].input);
-                    if (radixInjection && delete maskset.validPositions[radixPos], radixPos > 0 && (matchRslt = buffer.join("").match(opts.regex.integerNPart(opts)), 
-                    matchRslt && radixPos >= position)) if (0 === matchRslt[0].indexOf("0")) canClear = matchRslt.index !== position || "0" === opts.placeholder; else {
-                        var intPart = parseInt(matchRslt[0].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""));
-                        10 > intPart && maskset.validPositions[position] && "0" !== opts.placeholder && (maskset.validPositions[position].input = "0", 
-                        maskset.p = opts.prefix.length + 1, canClear = !1);
+                    if (radixInjection && delete maskset.validPositions[radixPos], radixPos > 0) {
+                        var bufVal = buffer.join("");
+                        if (matchRslt = bufVal.match(opts.regex.integerNPart(opts)), matchRslt && radixPos >= position) if (0 === matchRslt[0].indexOf("0")) canClear = matchRslt.index !== position || "0" === opts.placeholder; else {
+                            var intPart = parseInt(matchRslt[0].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "")), radixPart = parseInt(bufVal.split(opts.radixPoint)[1]);
+                            10 > intPart && maskset.validPositions[position] && ("0" !== opts.placeholder || radixPart > 0) && (maskset.validPositions[position].input = "0", 
+                            maskset.p = opts.prefix.length + 1, canClear = !1);
+                        }
                     }
                     }
                 }
                 }
                 return canClear;
                 return canClear;

+ 1 - 1
dist/inputmask/inputmask.phone.extensions.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/inputmask.regex.extensions.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("inputmask")) : factory(jQuery, window.Inputmask);

+ 1 - 1
dist/inputmask/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jQuery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jQuery"), require("inputmask")) : factory(jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jQuery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jQuery"), require("inputmask")) : factory(jQuery, window.Inputmask);

+ 12 - 10
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);
     "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);
@@ -2066,8 +2066,8 @@
             suffix: "",
             suffix: "",
             rightAlign: !0,
             rightAlign: !0,
             decimalProtect: !0,
             decimalProtect: !0,
-            min: void 0,
-            max: void 0,
+            min: null,
+            max: null,
             step: 1,
             step: 1,
             insertMode: !0,
             insertMode: !0,
             autoUnmask: !1,
             autoUnmask: !1,
@@ -2256,8 +2256,8 @@
                 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"), 
                 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"), 
                 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 
                 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 
                 processValue = processValue === opts.negationSymbol.front ? processValue + "0" : processValue, 
                 processValue = processValue === opts.negationSymbol.front ? processValue + "0" : processValue, 
-                isFinite(processValue) && (isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)), 
-                isValid && isFinite(opts.min) && (0 >= processValue || processValue.toString().length >= opts.min.toString().length) && (isValid = parseFloat(processValue) >= parseFloat(opts.min), 
+                isFinite(processValue) && (null !== opts.max && isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)), 
+                isValid && null !== opts.min && isFinite(opts.min) && (0 >= processValue || processValue.toString().length >= opts.min.toString().length) && (isValid = parseFloat(processValue) >= parseFloat(opts.min), 
                 isValid || (isValid = $.extend(!0, {
                 isValid || (isValid = $.extend(!0, {
                     refreshFromBuffer: !0,
                     refreshFromBuffer: !0,
                     buffer: (opts.prefix + opts.min).split("")
                     buffer: (opts.prefix + opts.min).split("")
@@ -2383,11 +2383,13 @@
                     }
                     }
                     var buffer = [];
                     var buffer = [];
                     for (var vp in maskset.validPositions) void 0 !== maskset.validPositions[vp].input && buffer.push(maskset.validPositions[vp].input);
                     for (var vp in maskset.validPositions) void 0 !== maskset.validPositions[vp].input && buffer.push(maskset.validPositions[vp].input);
-                    if (radixInjection && delete maskset.validPositions[radixPos], radixPos > 0 && (matchRslt = buffer.join("").match(opts.regex.integerNPart(opts)), 
-                    matchRslt && radixPos >= position)) if (0 === matchRslt[0].indexOf("0")) canClear = matchRslt.index !== position || "0" === opts.placeholder; else {
-                        var intPart = parseInt(matchRslt[0].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""));
-                        10 > intPart && maskset.validPositions[position] && "0" !== opts.placeholder && (maskset.validPositions[position].input = "0", 
-                        maskset.p = opts.prefix.length + 1, canClear = !1);
+                    if (radixInjection && delete maskset.validPositions[radixPos], radixPos > 0) {
+                        var bufVal = buffer.join("");
+                        if (matchRslt = bufVal.match(opts.regex.integerNPart(opts)), matchRslt && radixPos >= position) if (0 === matchRslt[0].indexOf("0")) canClear = matchRslt.index !== position || "0" === opts.placeholder; else {
+                            var intPart = parseInt(matchRslt[0].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "")), radixPart = parseInt(bufVal.split(opts.radixPoint)[1]);
+                            10 > intPart && maskset.validPositions[position] && ("0" !== opts.placeholder || radixPart > 0) && (maskset.validPositions[position].input = "0", 
+                            maskset.p = opts.prefix.length + 1, canClear = !1);
+                        }
                     }
                     }
                 }
                 }
                 return canClear;
                 return canClear;

+ 1 - 1
dist/min/inputmask/dependencyLib.min.js

@@ -3,6 +3,6 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.1.64-174
+* Version: 3.1.64-175
 */
 */
 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){var b=a;return window.dependencyLib=b,b});
 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){var b=a;return window.dependencyLib=b,b});

File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/inputmask.date.extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/inputmask.extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/inputmask.min.js


File diff suppressed because it is too large
+ 2 - 2
dist/min/inputmask/inputmask.numeric.extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/inputmask.phone.extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/inputmask.regex.extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/jquery.inputmask.min.js


File diff suppressed because it is too large
+ 2 - 2
dist/min/jquery.inputmask.bundle.min.js


+ 1 - 0
js/inputmask.js

@@ -1383,6 +1383,7 @@
 				}
 				}
 				//Check for a nonmask before the pos
 				//Check for a nonmask before the pos
 				var buffer = getBuffer();
 				var buffer = getBuffer();
+
 				//find previous valid
 				//find previous valid
 				for (var pndx = pos - 1; pndx > -1; pndx--) {
 				for (var pndx = pos - 1; pndx > -1; pndx--) {
 					if (getMaskSet().validPositions[pndx]) {
 					if (getMaskSet().validPositions[pndx]) {

+ 5 - 3
js/inputmask.numeric.extensions.js

@@ -660,13 +660,15 @@ Optional extensions on the jquery.inputmask base
 						}
 						}
 
 
 						if (radixPos > 0) {
 						if (radixPos > 0) {
-							matchRslt = buffer.join("").match(opts.regex.integerNPart(opts));
+							var bufVal = buffer.join("");
+							matchRslt = bufVal.match(opts.regex.integerNPart(opts));
 							if (matchRslt && position <= radixPos) {
 							if (matchRslt && position <= radixPos) {
 								if (matchRslt["0"].indexOf("0") === 0) {
 								if (matchRslt["0"].indexOf("0") === 0) {
 									canClear = matchRslt.index !== position || opts.placeholder === "0";
 									canClear = matchRslt.index !== position || opts.placeholder === "0";
 								} else {
 								} else {
-									var intPart = parseInt(matchRslt["0"].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""));
-									if (intPart < 10 && maskset.validPositions[position] && opts.placeholder !== "0") {
+									var intPart = parseInt(matchRslt["0"].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "")),
+										radixPart = parseInt(bufVal.split(opts.radixPoint)[1]);
+									if (intPart < 10 && maskset.validPositions[position] && (opts.placeholder !== "0" || radixPart > 0)) {
 										maskset.validPositions[position].input = "0";
 										maskset.validPositions[position].input = "0";
 										maskset.p = opts.prefix.length + 1;
 										maskset.p = opts.prefix.length + 1;
 										canClear = false;
 										canClear = false;

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.1.64-174",
+  "version": "3.1.64-175",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "main": "./dist/inputmask/jquery.inputmask.js",
   "main": "./dist/inputmask/jquery.inputmask.js",
   "files": [
   "files": [