Browse Source

amd support

Robin Herbots 11 years ago
parent
commit
920e4c201f

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.0.58",
+  "version": "3.0.59",
   "main": "./dist/jquery.inputmask.bundle.js",
   "keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 3
 build.minor = 0
-build.revision = 58
+build.revision = 59
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

+ 77 - 22
dist/jquery.inputmask.bundle.js

@@ -3,10 +3,18 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.0.58
+* Version: 3.0.59
 */
 
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask", ['jquery'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     if ($.fn.inputmask === undefined) {
 
         //helper functions
@@ -1797,16 +1805,23 @@
             }
         };
     }
-})(jQuery);
+}));
 /**
 * @license Input Mask plugin for jquery
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.0.58
+* Version: 3.0.59
 */
-
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask-multi", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     if ($.fn.inputmask != undefined) {
         function multiMaskScope(actionObj, masksets, opts) {
             function isInputEventSupported(eventName) {
@@ -2129,17 +2144,25 @@
                 return $.inputmask._fn.call(this, fn, options);
         };
     }
-})(jQuery);
+}));
 /*
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.58
+Version: 3.0.59
 
 Optional extensions on the jquery.inputmask base
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     //extra definitions
     $.extend($.inputmask.defaults.definitions, {
         'A': {
@@ -2250,17 +2273,25 @@ Optional extensions on the jquery.inputmask base
             }
         }
     });
-})(jQuery);
+}));
 /*
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.58
+Version: 3.0.59
 
 Optional extensions on the jquery.inputmask base
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.date.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     //date & time aliases
     $.extend($.inputmask.defaults.definitions, {
         'h': { //hours
@@ -2738,17 +2769,25 @@ Optional extensions on the jquery.inputmask base
             alias: "mm/dd/yyyy"
         }
     });
-})(jQuery);
+}));
 /*
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.58
+Version: 3.0.59
 
 Optional extensions on the jquery.inputmask base
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.numeric.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     //number aliases
     $.extend($.inputmask.defaults.aliases, {
         'numeric': {
@@ -2982,18 +3021,26 @@ Optional extensions on the jquery.inputmask base
             digits: "0"
         }
     });
-})(jQuery);
+}));
 /*
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.58
+Version: 3.0.59
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.regex.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     $.extend($.inputmask.defaults.aliases, { // $(selector).inputmask("Regex", { regex: "[0-9]*"}
         'Regex': {
             mask: "r",
@@ -3169,13 +3216,13 @@ Allows for using regular expressions as a mask
             }
         }
     });
-})(jQuery);
+}));
 /*
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.58
+Version: 3.0.59
 
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks
@@ -3189,7 +3236,15 @@ When using this extension make sure you specify the correct url to get the masks
 
 
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.phone.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     $.extend($.inputmask.defaults.aliases, {
         'phone': {
             url: "phone-codes/phone-codes.json",
@@ -3250,4 +3305,4 @@ When using this extension make sure you specify the correct url to get the masks
             nojumpsThreshold: 4
         }
     });
-})(jQuery);
+}));

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


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


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


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


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


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


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


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


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"mask"
     ],
-    "version": "3.0.58",
+    "version": "3.0.59",
     "author": {
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"

+ 10 - 3
js/jquery.inputmask-multi.js

@@ -5,8 +5,15 @@
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Version: 0.0.0
 */
-
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask-multi", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     if ($.fn.inputmask != undefined) {
         function multiMaskScope(actionObj, masksets, opts) {
             function isInputEventSupported(eventName) {
@@ -329,4 +336,4 @@
                 return $.inputmask._fn.call(this, fn, options);
         };
     }
-})(jQuery);
+}));

+ 10 - 2
js/jquery.inputmask.date.extensions.js

@@ -7,7 +7,15 @@ Version: 0.0.0
 
 Optional extensions on the jquery.inputmask base
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.date.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     //date & time aliases
     $.extend($.inputmask.defaults.definitions, {
         'h': { //hours
@@ -485,4 +493,4 @@ Optional extensions on the jquery.inputmask base
             alias: "mm/dd/yyyy"
         }
     });
-})(jQuery);
+}));

+ 10 - 2
js/jquery.inputmask.extensions.js

@@ -7,7 +7,15 @@ Version: 0.0.0
 
 Optional extensions on the jquery.inputmask base
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     //extra definitions
     $.extend($.inputmask.defaults.definitions, {
         'A': {
@@ -118,4 +126,4 @@ Optional extensions on the jquery.inputmask base
             }
         }
     });
-})(jQuery);
+}));

+ 10 - 2
js/jquery.inputmask.js

@@ -6,7 +6,15 @@
 * Version: 0.0.0
 */
 
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask", ['jquery'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     if ($.fn.inputmask === undefined) {
 
         //helper functions
@@ -1797,4 +1805,4 @@
             }
         };
     }
-})(jQuery);
+}));

+ 10 - 2
js/jquery.inputmask.numeric.extensions.js

@@ -7,7 +7,15 @@ Version: 0.0.0
 
 Optional extensions on the jquery.inputmask base
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.numeric.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     //number aliases
     $.extend($.inputmask.defaults.aliases, {
         'numeric': {
@@ -241,4 +249,4 @@ Optional extensions on the jquery.inputmask base
             digits: "0"
         }
     });
-})(jQuery);
+}));

+ 10 - 2
js/jquery.inputmask.phone.extensions.js

@@ -17,7 +17,15 @@ When using this extension make sure you specify the correct url to get the masks
 
 
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.phone.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     $.extend($.inputmask.defaults.aliases, {
         'phone': {
             url: "phone-codes/phone-codes.json",
@@ -78,4 +86,4 @@ When using this extension make sure you specify the correct url to get the masks
             nojumpsThreshold: 4
         }
     });
-})(jQuery);
+}));

+ 10 - 2
js/jquery.inputmask.regex.extensions.js

@@ -8,7 +8,15 @@ Version: 0.0.0
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
 */
-(function ($) {
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define("jquery.inputmask.regex.extensions", ['jquery', 'jquery.inputmask'], factory);
+    } else {
+        // Browser globals
+        factory(jQuery);
+    }
+}(function ($) {
     $.extend($.inputmask.defaults.aliases, { // $(selector).inputmask("Regex", { regex: "[0-9]*"}
         'Regex': {
             mask: "r",
@@ -184,4 +192,4 @@ Allows for using regular expressions as a mask
             }
         }
     });
-})(jQuery);
+}));