Robin Herbots 10 years ago
parent
commit
2f3033ad10

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.2.5-3",
+  "version": "3.2.5-5",
   "main": [
   "main": [
     "./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.2.5-3",
+  "version": "3.2.5-5",
   "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.2.5-3",
+  "version": "3.2.5-5",
   "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/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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function(factory) {
 !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" == 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);

+ 1 - 1
dist/inputmask/inputmask.dependencyLib.jquery.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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !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.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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function(factory) {
 !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" == 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);

+ 3 - 4
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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery")) : factory(window.dependencyLib || jQuery);
     "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery")) : factory(window.dependencyLib || jQuery);
@@ -448,8 +448,7 @@
                         def: ""
                         def: ""
                     },
                     },
                     locator: []
                     locator: []
-                }), getMaskSet().tests[pos] = $.extend(!0, [], matches), console.log(pos + " - " + JSON.stringify(matches)), 
-                getMaskSet().tests[pos];
+                }), getMaskSet().tests[pos] = $.extend(!0, [], matches), getMaskSet().tests[pos];
             }
             }
         }
         }
         function getBufferTemplate() {
         function getBufferTemplate() {
@@ -592,7 +591,7 @@
                     caret: seekNext(maskPos)
                     caret: seekNext(maskPos)
                 };
                 };
             }
             }
-            if (result === !1 && opts.keepStatic && isComplete(buffer) && (result = alternate(pos, c, strict, fromSetValid)), 
+            if (result === !1 && opts.keepStatic && (result = alternate(pos, c, strict, fromSetValid)), 
             result === !0 && (result = {
             result === !0 && (result = {
                 pos: maskPos
                 pos: maskPos
             }), $.isFunction(opts.postValidation) && result !== !1 && !strict) {
             }), $.isFunction(opts.postValidation) && result !== !1 && !strict) {

+ 1 - 1
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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function(factory) {
 !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" == 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);

+ 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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function(factory) {
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(window.dependencyLib || 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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function(factory) {
 !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" == 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);

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

@@ -3,21 +3,16 @@
 * 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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !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);
 }(function($, Inputmask) {
 }(function($, Inputmask) {
     return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {
     return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {
-        var nptmask, input;
+        var nptmask, input = this[0];
         if (options = options || {}, "string" == typeof fn) switch (fn) {
         if (options = options || {}, "string" == typeof fn) switch (fn) {
-          case "mask":
-            return nptmask = new Inputmask(options), this.each(function() {
-                nptmask.mask(this);
-            });
-
           case "unmaskedvalue":
           case "unmaskedvalue":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
+            return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
 
 
           case "remove":
           case "remove":
             return this.each(function() {
             return this.each(function() {
@@ -25,27 +20,26 @@
             });
             });
 
 
           case "getemptymask":
           case "getemptymask":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.getemptymask() : "";
+            return input && input.inputmask ? input.inputmask.getemptymask() : "";
 
 
           case "hasMaskedValue":
           case "hasMaskedValue":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.hasMaskedValue() : !1;
+            return input && input.inputmask ? input.inputmask.hasMaskedValue() : !1;
 
 
           case "isComplete":
           case "isComplete":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.isComplete() : !0;
+            return input && input.inputmask ? input.inputmask.isComplete() : !0;
 
 
           case "getmetadata":
           case "getmetadata":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.getmetadata() : void 0;
+            return input && input.inputmask ? input.inputmask.getmetadata() : void 0;
 
 
           case "setvalue":
           case "setvalue":
-            input = this.jquery && this.length > 0 ? this[0] : this, $(input).val(options), 
-            void 0 !== input.inputmask && $(input).triggerHandler("setvalue.inputmask");
+            $(input).val(options), input && void 0 !== input.inputmask && $(input).triggerHandler("setvalue.inputmask");
             break;
             break;
 
 
           case "option":
           case "option":
             if ("string" != typeof options) return this.each(function() {
             if ("string" != typeof options) return this.each(function() {
                 return void 0 !== this.inputmask ? this.inputmask.option(options) : void 0;
                 return void 0 !== this.inputmask ? this.inputmask.option(options) : void 0;
             });
             });
-            if (input = this.jquery && this.length > 0 ? this[0] : this, void 0 !== input.inputmask) return input.inputmask.option(options);
+            if (input && void 0 !== input.inputmask) return input.inputmask.option(options);
             break;
             break;
 
 
           default:
           default:

+ 11 - 18
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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !function($) {
 !function($) {
     function Inputmask(alias, options) {
     function Inputmask(alias, options) {
@@ -446,8 +446,7 @@
                         def: ""
                         def: ""
                     },
                     },
                     locator: []
                     locator: []
-                }), getMaskSet().tests[pos] = $.extend(!0, [], matches), console.log(pos + " - " + JSON.stringify(matches)), 
-                getMaskSet().tests[pos];
+                }), getMaskSet().tests[pos] = $.extend(!0, [], matches), getMaskSet().tests[pos];
             }
             }
         }
         }
         function getBufferTemplate() {
         function getBufferTemplate() {
@@ -590,7 +589,7 @@
                     caret: seekNext(maskPos)
                     caret: seekNext(maskPos)
                 };
                 };
             }
             }
-            if (result === !1 && opts.keepStatic && isComplete(buffer) && (result = alternate(pos, c, strict, fromSetValid)), 
+            if (result === !1 && opts.keepStatic && (result = alternate(pos, c, strict, fromSetValid)), 
             result === !0 && (result = {
             result === !0 && (result = {
                 pos: maskPos
                 pos: maskPos
             }), $.isFunction(opts.postValidation) && result !== !1 && !strict) {
             }), $.isFunction(opts.postValidation) && result !== !1 && !strict) {
@@ -1398,15 +1397,10 @@
     return window.Inputmask = Inputmask, Inputmask;
     return window.Inputmask = Inputmask, Inputmask;
 }(jQuery), function($, Inputmask) {
 }(jQuery), function($, Inputmask) {
     return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {
     return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {
-        var nptmask, input;
+        var nptmask, input = this[0];
         if (options = options || {}, "string" == typeof fn) switch (fn) {
         if (options = options || {}, "string" == typeof fn) switch (fn) {
-          case "mask":
-            return nptmask = new Inputmask(options), this.each(function() {
-                nptmask.mask(this);
-            });
-
           case "unmaskedvalue":
           case "unmaskedvalue":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
+            return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
 
 
           case "remove":
           case "remove":
             return this.each(function() {
             return this.each(function() {
@@ -1414,27 +1408,26 @@
             });
             });
 
 
           case "getemptymask":
           case "getemptymask":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.getemptymask() : "";
+            return input && input.inputmask ? input.inputmask.getemptymask() : "";
 
 
           case "hasMaskedValue":
           case "hasMaskedValue":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.hasMaskedValue() : !1;
+            return input && input.inputmask ? input.inputmask.hasMaskedValue() : !1;
 
 
           case "isComplete":
           case "isComplete":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.isComplete() : !0;
+            return input && input.inputmask ? input.inputmask.isComplete() : !0;
 
 
           case "getmetadata":
           case "getmetadata":
-            return input = this.jquery && this.length > 0 ? this[0] : this, input.inputmask ? input.inputmask.getmetadata() : void 0;
+            return input && input.inputmask ? input.inputmask.getmetadata() : void 0;
 
 
           case "setvalue":
           case "setvalue":
-            input = this.jquery && this.length > 0 ? this[0] : this, $(input).val(options), 
-            void 0 !== input.inputmask && $(input).triggerHandler("setvalue.inputmask");
+            $(input).val(options), input && void 0 !== input.inputmask && $(input).triggerHandler("setvalue.inputmask");
             break;
             break;
 
 
           case "option":
           case "option":
             if ("string" != typeof options) return this.each(function() {
             if ("string" != typeof options) return this.each(function() {
                 return void 0 !== this.inputmask ? this.inputmask.option(options) : void 0;
                 return void 0 !== this.inputmask ? this.inputmask.option(options) : void 0;
             });
             });
-            if (input = this.jquery && this.length > 0 ? this[0] : this, void 0 !== input.inputmask) return input.inputmask.option(options);
+            if (input && void 0 !== input.inputmask) return input.inputmask.option(options);
             break;
             break;
 
 
           default:
           default:

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


+ 1 - 1
dist/min/inputmask/inputmask.dependencyLib.jquery.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.2.5-3
+* Version: 3.2.5-5
 */
 */
 !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});
 !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});

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
+ 3 - 3
dist/min/inputmask/inputmask.min.js


File diff suppressed because it is too large
+ 1 - 1
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
+ 2 - 2
dist/min/inputmask/jquery.inputmask.min.js


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


+ 1 - 1
js/inputmask.js

@@ -1175,7 +1175,7 @@
 						});
 						});
 					}
 					}
 					getMaskSet().tests[pos] = $.extend(true, [], matches); //set a clone to prevent overwriting some props
 					getMaskSet().tests[pos] = $.extend(true, [], matches); //set a clone to prevent overwriting some props
-					console.log(pos + " - " + JSON.stringify(matches));
+					// console.log(pos + " - " + JSON.stringify(matches));
 					return getMaskSet().tests[pos];
 					return getMaskSet().tests[pos];
 				}
 				}
 			}
 			}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.2.5-3",
+  "version": "3.2.5-5",
   "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": [