Robin Herbots 9 years ago
parent
commit
28e5860452

+ 5 - 4
Gruntfile.js

@@ -1,4 +1,4 @@
-module.exports = function(grunt) {
+module.exports = function (grunt) {
 	function createBanner(fileName) {
 		return "/*!\n" +
 			"* " + fileName + "\n" +
@@ -18,6 +18,7 @@ module.exports = function(grunt) {
 			} else srcFile = srcFile.replace(new RegExp("\\}\\)\\);[\\s]*$"), "})(jQuery, Inputmask);");
 			grunt.file.write(dst, srcFile);
 		}
+
 		var uglifyConfig = {};
 		var srcFiles = grunt.file.expand(path + "/*.js");
 		for (var srcNdx in srcFiles) {
@@ -30,7 +31,7 @@ module.exports = function(grunt) {
 					banner: createBanner(dstFile),
 					beautify: true,
 					mangle: false,
-					preserveComments: "some",
+					preserveComments: false,
 					ASCIIOnly: true
 				}
 			};
@@ -56,7 +57,7 @@ module.exports = function(grunt) {
 				banner: createBanner("jquery.inputmask.bundle.js"),
 				beautify: true,
 				mangle: false,
-				preserveComments: "some",
+				preserveComments: false,
 				ASCIIOnly: true
 			}
 		};
@@ -106,7 +107,7 @@ module.exports = function(grunt) {
 		},
 		nugetpack: {
 			dist: {
-				src: function() {
+				src: function () {
 					return process.platform === "linux" ? 'nuspecs/jquery.inputmask.linux.nuspec' : 'nuspecs/jquery.inputmask.nuspec';
 				}(),
 				dest: 'dist/',

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.3.2-63",
+  "version": "3.3.2-65",
   "main": [
     "./dist/inputmask/inputmask.js"
   ],

+ 1 - 1
component.json

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

+ 1 - 1
composer.json

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

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

@@ -3,24 +3,13 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
-/*
- Input Mask plugin extensions
- http://github.com/RobinHerbots/jquery.inputmask
- Copyright (c) 2010 -  Robin Herbots
- Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 0.0.0-dev
-
- Optional extensions on the jquery.inputmask base
- */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
 }(function($, Inputmask) {
-    //date & time aliases
     return Inputmask.extendDefinitions({
         h: {
-            //hours
             validator: "[01][0-9]|2[0-3]",
             cardinality: 2,
             prevalidator: [ {
@@ -29,7 +18,6 @@
             } ]
         },
         s: {
-            //seconds || minutes
             validator: "[0-5][0-9]",
             cardinality: 2,
             prevalidator: [ {
@@ -38,7 +26,6 @@
             } ]
         },
         d: {
-            //basic day
             validator: "0[1-9]|[12][0-9]|3[01]",
             cardinality: 2,
             prevalidator: [ {
@@ -47,7 +34,6 @@
             } ]
         },
         m: {
-            //basic month
             validator: "0[1-9]|1[012]",
             cardinality: 2,
             prevalidator: [ {
@@ -56,7 +42,6 @@
             } ]
         },
         y: {
-            //basic year
             validator: "(19|20)\\d{2}",
             cardinality: 4,
             prevalidator: [ {
@@ -76,14 +61,11 @@
             placeholder: "dd/mm/yyyy",
             regex: {
                 val1pre: new RegExp("[0-3]"),
-                //daypre
                 val1: new RegExp("0[1-9]|[12][0-9]|3[01]"),
-                //day
                 val2pre: function(separator) {
                     var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
                     return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])");
                 },
-                //monthpre
                 val2: function(separator) {
                     var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
                     return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))");
@@ -132,7 +114,6 @@
             },
             definitions: {
                 "1": {
-                    //val1 ~ day or month
                     validator: function(chrs, maskset, pos, strict, opts) {
                         var isValid = opts.regex.val1.test(chrs);
                         return strict || isValid || chrs.charAt(1) !== opts.separator && "-./".indexOf(chrs.charAt(1)) === -1 || !(isValid = opts.regex.val1.test("0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0", 
@@ -168,7 +149,6 @@
                     } ]
                 },
                 "2": {
-                    //val2 ~ day or month
                     validator: function(chrs, maskset, pos, strict, opts) {
                         var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
                         frontValue.indexOf(opts.placeholder[0]) !== -1 && (frontValue = "01" + opts.separator);
@@ -182,13 +162,10 @@
                             pos: pos,
                             c: chrs.charAt(0)
                         };
-                        //check leap yeap
                         if (opts.mask.indexOf("2") === opts.mask.length - 1 && isValid) {
                             var dayMonthValue = maskset.buffer.join("").substr(4, 4) + chrs;
                             if (dayMonthValue !== opts.leapday) return !0;
                             var year = parseInt(maskset.buffer.join("").substr(0, 4), 10);
-                            //detect leap year
-                            //detect leap year
                             return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
                         }
                         return isValid;
@@ -209,14 +186,11 @@
                     } ]
                 },
                 y: {
-                    //year
                     validator: function(chrs, maskset, pos, strict, opts) {
                         if (opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
                             var dayMonthValue = maskset.buffer.join("").substr(0, 6);
                             if (dayMonthValue !== opts.leapday) return !0;
                             var year = parseInt(chrs, 10);
-                            //detect leap year
-                            //detect leap year
                             return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
                         }
                         return !1;
@@ -254,7 +228,6 @@
                                     var dayMonthValue = maskset.buffer.join("").substr(0, 6);
                                     if (dayMonthValue !== opts.leapday) isValid = !0; else {
                                         var year = parseInt(chrs, 10);
-                                        //detect leap year
                                         isValid = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
                                     }
                                 } else isValid = !1;
@@ -284,20 +257,16 @@
         "mm/dd/yyyy": {
             placeholder: "mm/dd/yyyy",
             alias: "dd/mm/yyyy",
-            //reuse functionality of dd/mm/yyyy alias
             regex: {
                 val2pre: function(separator) {
                     var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
                     return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
                 },
-                //daypre
                 val2: function(separator) {
                     var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
                     return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
                 },
-                //day
                 val1pre: new RegExp("[01]"),
-                //monthpre
                 val1: new RegExp("0[1-9]|1[012]")
             },
             leapday: "02/29/",
@@ -372,21 +341,16 @@
             alias: "dd/mm/yyyy",
             regex: {
                 hrspre: new RegExp("[012]"),
-                //hours pre
                 hrs24: new RegExp("2[0-4]|1[3-9]"),
                 hrs: new RegExp("[01][0-9]|2[0-4]"),
-                //hours
                 ampm: new RegExp("^[a|p|A|P][m|M]"),
                 mspre: new RegExp("[0-5]"),
-                //minutes/seconds pre
                 ms: new RegExp("[0-5][0-9]")
             },
             timeseparator: ":",
             hourFormat: "24",
-            // or 12
             definitions: {
                 h: {
-                    //hours
                     validator: function(chrs, maskset, pos, strict, opts) {
                         if ("24" === opts.hourFormat && 24 === parseInt(chrs, 10)) return maskset.buffer[pos - 1] = "0", 
                         maskset.buffer[pos] = "0", {
@@ -434,7 +398,6 @@
                     } ]
                 },
                 s: {
-                    //seconds || minutes
                     validator: "[0-5][0-9]",
                     cardinality: 2,
                     prevalidator: [ {
@@ -449,7 +412,6 @@
                     } ]
                 },
                 t: {
-                    //am/pm
                     validator: function(chrs, maskset, pos, strict, opts) {
                         return opts.regex.ampm.test(chrs + "m");
                     },

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

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

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

@@ -3,21 +3,11 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
-/*
- Input Mask plugin extensions
- http://github.com/RobinHerbots/jquery.inputmask
- Copyright (c) 2010 -  Robin Herbots
- Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 0.0.0-dev
-
- Optional extensions on the jquery.inputmask base
- */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
 }(function($, Inputmask) {
-    //extra definitions
     return Inputmask.extendDefinitions({
         A: {
             validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
@@ -25,13 +15,11 @@
             casing: "upper"
         },
         "&": {
-            //alfanumeric uppercasing
             validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
             cardinality: 1,
             casing: "upper"
         },
         "#": {
-            //hexadecimal
             validator: "[0-9A-Fa-f]",
             cardinality: 1,
             casing: "upper"
@@ -49,7 +37,6 @@
             autoUnmask: !1
         },
         ip: {
-            //ip-address mask
             mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]",
             definitions: {
                 i: {
@@ -66,9 +53,6 @@
             }
         },
         email: {
-            //https://en.wikipedia.org/wiki/Domain_name#Domain_name_space
-            //https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names
-            //should be extended with the toplevel domains at the end
             mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",
             greedy: !1,
             onBeforePaste: function(pastedValue, opts) {
@@ -93,8 +77,6 @@
         mac: {
             mask: "##:##:##:##:##:##"
         },
-        //https://en.wikipedia.org/wiki/Vehicle_identification_number
-        // see issue #1199
         vin: {
             mask: "V{13}9{4}",
             definitions: {

File diff suppressed because it is too large
+ 80 - 285
dist/inputmask/inputmask.js


+ 8 - 43
dist/inputmask/inputmask.numeric.extensions.js

@@ -3,21 +3,11 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
-/*
- Input Mask plugin extensions
- http://github.com/RobinHerbots/jquery.inputmask
- Copyright (c) 2010 - Robin Herbots
- Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 0.0.0-dev
-
- Optional extensions on the jquery.inputmask base
- */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
 }(function($, Inputmask) {
-    //number aliases
     return Inputmask.extendAliases({
         numeric: {
             mask: function(opts) {
@@ -26,27 +16,20 @@
                     return escapedTxt;
                 }
                 if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat), 
-                opts.repeat = 0, opts.groupSeparator === opts.radixPoint && (//treat equal separator and radixpoint
-                "." === opts.radixPoint ? opts.groupSeparator = "," : "," === opts.radixPoint ? opts.groupSeparator = "." : opts.groupSeparator = ""), 
-                " " === opts.groupSeparator && (//prevent conflict with default skipOptionalPartCharacter
-                opts.skipOptionalPartCharacter = void 0), opts.autoGroup = opts.autoGroup && "" !== opts.groupSeparator, 
+                opts.repeat = 0, opts.groupSeparator === opts.radixPoint && ("." === opts.radixPoint ? opts.groupSeparator = "," : "," === opts.radixPoint ? opts.groupSeparator = "." : opts.groupSeparator = ""), 
+                " " === opts.groupSeparator && (opts.skipOptionalPartCharacter = void 0), opts.autoGroup = opts.autoGroup && "" !== opts.groupSeparator, 
                 opts.autoGroup && ("string" == typeof opts.groupSize && isFinite(opts.groupSize) && (opts.groupSize = parseInt(opts.groupSize)), 
                 isFinite(opts.integerDigits))) {
                     var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize;
                     opts.integerDigits = parseInt(opts.integerDigits) + (0 === mod ? seps - 1 : seps), 
                     opts.integerDigits < 1 && (opts.integerDigits = "*");
                 }
-                //enforce placeholder to single
                 opts.placeholder.length > 1 && (opts.placeholder = opts.placeholder.charAt(0)), 
-                //only allow radixfocus when placeholder = 0
                 "radixFocus" === opts.positionCaretOnClick && "" === opts.placeholder && opts.integerOptional === !1 && (opts.positionCaretOnClick = "lvp"), 
-                opts.definitions[";"] = opts.definitions["~"], //clone integer def for decimals
-                opts.definitions[";"].definitionSymbol = "~", opts.numericInput === !0 && (//finance people input style
-                opts.positionCaretOnClick = "radixFocus" === opts.positionCaretOnClick ? "lvp" : opts.positionCaretOnClick, 
+                opts.definitions[";"] = opts.definitions["~"], opts.definitions[";"].definitionSymbol = "~", 
+                opts.numericInput === !0 && (opts.positionCaretOnClick = "radixFocus" === opts.positionCaretOnClick ? "lvp" : opts.positionCaretOnClick, 
                 opts.digitsOptional = !1, isNaN(opts.digits) && (opts.digits = 2), opts.decimalProtect = !1);
                 var mask = autoEscape(opts.prefix);
-                //enforce greedy false
-                //convert min and max options
                 return mask += "[+]", mask += opts.integerOptional === !0 ? "~{1," + opts.integerDigits + "}" : "~{" + opts.integerDigits + "}", 
                 void 0 !== opts.digits && (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (opts.decimalProtect && (opts.radixPointDefinitionSymbol = ":"), 
                 mask += opts.digitsOptional ? "[" + (opts.decimalProtect ? ":" : opts.radixPoint) + ";{1," + opts.digits + "}]" : (opts.decimalProtect ? ":" : opts.radixPoint) + ";{" + opts.digits + "}"), 
@@ -59,7 +42,6 @@
             placeholder: "",
             greedy: !1,
             digits: "*",
-            //number of fractionalDigits
             digitsOptional: !0,
             radixPoint: ".",
             positionCaretOnClick: "radixFocus",
@@ -70,35 +52,26 @@
             allowMinus: !0,
             negationSymbol: {
                 front: "-",
-                //"("
                 back: ""
             },
             integerDigits: "+",
-            //number of integerDigits
             integerOptional: !0,
             prefix: "",
             suffix: "",
             rightAlign: !0,
             decimalProtect: !0,
-            //do not allow assumption of decimals input without entering the radixpoint
             min: null,
-            //minimum value
             max: null,
-            //maximum value
             step: 1,
             insertMode: !0,
             autoUnmask: !1,
             unmaskAsNumber: !1,
             postFormat: function(buffer, pos, opts) {
-                //this needs to be removed // this is crap
-                // console.log(buffer);
                 opts.numericInput === !0 && (buffer = buffer.reverse(), isFinite(pos) && (pos = buffer.join("").length - pos - 1));
                 var i, l;
-                //position overflow corrections
                 pos = pos >= buffer.length ? buffer.length - 1 : pos < opts.prefix.length ? opts.prefix.length : pos;
                 var charAtPos = buffer[pos], cbuf = buffer.slice();
                 charAtPos === opts.groupSeparator && (cbuf.splice(pos--, 1), charAtPos = cbuf[pos]), 
-                //mark current pos
                 cbuf[pos] = "!";
                 var bufVal = cbuf.join(""), bufValOrigin = bufVal;
                 if (bufVal = bufVal.replace(new RegExp(Inputmask.escapeRegex(opts.suffix) + "$"), ""), 
@@ -114,10 +87,8 @@
                 }
                 bufVal = opts.prefix + bufVal + opts.suffix;
                 var needsRefresh = bufValOrigin !== bufVal;
-                if (needsRefresh) //align the length
-                for (buffer.length = bufVal.length, i = 0, l = bufVal.length; i < l; i++) buffer[i] = bufVal.charAt(i);
+                if (needsRefresh) for (buffer.length = bufVal.length, i = 0, l = bufVal.length; i < l; i++) buffer[i] = bufVal.charAt(i);
                 var newPos = $.inArray("!", bufVal);
-                // console.log("formatted " + buffer + " refresh " + needsRefresh);
                 return buffer[newPos] = charAtPos, newPos = opts.numericInput && isFinite(pos) ? buffer.join("").length - newPos - 1 : newPos, 
                 opts.numericInput && (buffer = buffer.reverse(), $.inArray(opts.radixPoint, buffer) < newPos && buffer.join("").length - opts.suffix.length !== newPos && (newPos -= 1)), 
                 {
@@ -132,11 +103,9 @@
                     var maskedValue = opts.numericInput ? buffer.slice().reverse().join("") : buffer.join(""), processValue = maskedValue.replace(opts.prefix, "");
                     processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 
                     "," === opts.radixPoint && (processValue = processValue.replace(opts.radixPoint, "."));
-                    //handle negation symbol
                     var isNegative = processValue.match(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"));
                     if (isNegative = null !== isNegative && 1 === isNegative.length, processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""), 
                     processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 
-                    //strip placeholder at the end
                     isNaN(opts.placeholder) && (processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), "")), 
                     processValue = processValue === opts.negationSymbol.front ? processValue + "0" : processValue, 
                     "" !== processValue && isFinite(processValue)) {
@@ -273,7 +242,6 @@
                         !isValid && (isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs), 
                         isValid === !0 && (isValid = opts.leadingZeroHandler(chrs, maskset, pos, strict, opts, isSelection), 
                         isValid === !0)))) {
-                            //handle overwrite when fixed precision
                             var radixPosition = $.inArray(opts.radixPoint, maskset.buffer);
                             isValid = radixPosition !== -1 && (opts.digitsOptional === !1 || maskset.validPositions[pos]) && opts.numericInput !== !0 && pos > radixPosition && !strict ? {
                                 pos: pos,
@@ -343,8 +311,7 @@
             },
             isComplete: function(buffer, opts) {
                 var maskedValue = buffer.join(""), bufClone = buffer.slice();
-                if (//verify separator positions
-                opts.postFormat(bufClone, 0, opts), bufClone.join("") !== maskedValue) return !1;
+                if (opts.postFormat(bufClone, 0, opts), bufClone.join("") !== maskedValue) return !1;
                 var processValue = maskedValue.replace(opts.prefix, "");
                 return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 
                 "," === opts.radixPoint && (processValue = processValue.replace(Inputmask.escapeRegex(opts.radixPoint), ".")), 
@@ -355,15 +322,13 @@
                     var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\./g);
                     dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\./g, ""), 
                     initialValue = initialValue.replace(",", opts.radixPoint)) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, ""), 
-                    initialValue = initialValue.replace(".", opts.radixPoint)) : //equal
-                    initialValue = initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue = initialValue.replace(/,/g, "") : initialValue = initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "");
+                    initialValue = initialValue.replace(".", opts.radixPoint)) : initialValue = initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue = initialValue.replace(/,/g, "") : initialValue = initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "");
                 }
                 if (0 === opts.digits && (initialValue.indexOf(".") !== -1 ? initialValue = initialValue.substring(0, initialValue.indexOf(".")) : initialValue.indexOf(",") !== -1 && (initialValue = initialValue.substring(0, initialValue.indexOf(",")))), 
                 "" !== opts.radixPoint && isFinite(opts.digits) && initialValue.indexOf(opts.radixPoint) !== -1) {
                     var valueParts = initialValue.split(opts.radixPoint), decPart = valueParts[1].match(new RegExp("\\d*"))[0];
                     if (parseInt(opts.digits) < decPart.toString().length) {
                         var digitsFactor = Math.pow(10, parseInt(opts.digits));
-                        //make the initialValue a valid javascript number for the parsefloat
                         initialValue = initialValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."), 
                         initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor, 
                         initialValue = initialValue.toString().replace(".", opts.radixPoint);

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

@@ -3,18 +3,8 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
-/*
- Input Mask plugin extensions
- http://github.com/RobinHerbots/jquery.inputmask
- Copyright (c) 2010 -  Robin Herbots
- Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 0.0.0-dev
-
- Phone extension.
-
- */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
 }(function($, Inputmask) {
@@ -39,7 +29,6 @@
                 processedValue;
             },
             onUnMask: function(maskedValue, unmaskedValue, opts) {
-                //implement me
                 return unmaskedValue;
             }
         }

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

@@ -3,30 +3,18 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
-/*
- Input Mask plugin extensions
- http://github.com/RobinHerbots/jquery.inputmask
- Copyright (c) 2010 -  Robin Herbots
- Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- Version: 0.0.0-dev
-
- Regex extensions on the jquery.inputmask base
- Allows for using regular expressions as a mask
- */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
 }(function($, Inputmask) {
     return Inputmask.extendAliases({
-        // $(selector).inputmask("Regex", { regex: "[0-9]*"}
         Regex: {
             mask: "r",
             greedy: !1,
             repeat: "*",
             regex: null,
             regexTokens: null,
-            //Thx to https://github.com/slevithan/regex-colorizer for the tokenizer regex
             tokenizer: /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,
             quantifierFilter: /[0-9]+[^,]/,
             isComplete: function(buffer, opts) {
@@ -44,23 +32,19 @@
                         }
                         function analyseRegex() {
                             var match, m, currentToken = new RegexToken(), opengroups = [];
-                            // The tokenizer regex does most of the tokenization grunt work
                             for (opts.regexTokens = []; match = opts.tokenizer.exec(opts.regex); ) switch (m = match[0], 
                             m.charAt(0)) {
                               case "(":
-                                // Group opening
                                 opengroups.push(new RegexToken((!0)));
                                 break;
 
                               case ")":
-                                // Group closing
                                 groupToken = opengroups.pop(), opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(groupToken) : currentToken.matches.push(groupToken);
                                 break;
 
                               case "{":
                               case "+":
                               case "*":
-                                //Quantifier
                                 var quantifierToken = new RegexToken((!1), (!0));
                                 m = m.replace(/[{}]/g, "");
                                 var mq = m.split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);

+ 3 - 15
dist/inputmask/jquery.inputmask.js

@@ -3,19 +3,11 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
-/*
- * Input Mask plugin for jquery
- * http://github.com/RobinHerbots/jquery.inputmask
- * Copyright (c) 2010 -	Robin Herbots
- * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
- * Version: 0.0.0-dev
- */
 !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($, Inputmask) {
-    //jquery plugin
     return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {
         var nptmask, input = this[0];
         if (void 0 === options && (options = {}), "string" == typeof fn) switch (fn) {
@@ -31,19 +23,16 @@
             return input && input.inputmask ? input.inputmask.getemptymask() : "";
 
           case "hasMaskedValue":
-            //check wheter the returned value is masked or not; currently only works reliable when using jquery.val fn to retrieve the value
             return !(!input || !input.inputmask) && input.inputmask.hasMaskedValue();
 
           case "isComplete":
             return !input || !input.inputmask || input.inputmask.isComplete();
 
           case "getmetadata":
-            //return mask metadata if exists
             return input && input.inputmask ? input.inputmask.getmetadata() : void 0;
 
           case "setvalue":
-            $(input).val(options), input && void 0 === input.inputmask && //reactivate jquery.clone
-            $(input).triggerHandler("setvalue");
+            $(input).val(options), input && void 0 === input.inputmask && $(input).triggerHandler("setvalue");
             break;
 
           case "option":
@@ -63,8 +52,7 @@
             }) : this.each(function() {
                 nptmask.mask(this);
             });
-            if (void 0 === fn) //look for data-inputmask atributes
-            return this.each(function() {
+            if (void 0 === fn) return this.each(function() {
                 nptmask = new Inputmask(options), nptmask.mask(this);
             });
         }

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


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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  Input Mask plugin extensions

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

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

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  Input Mask plugin extensions

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  * Input Mask Core

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  Input Mask plugin extensions

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  Input Mask plugin extensions

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  Input Mask plugin extensions

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  * Input Mask plugin for jquery

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2016 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.3.2-63
+* Version: 3.3.2-65
 */
 /*
  * Input Mask Core

+ 1 - 1
package.json

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