浏览代码

amd support

Robin Herbots 11 年之前
父节点
当前提交
920e4c201f

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "jquery.inputmask",
   "name": "jquery.inputmask",
-  "version": "3.0.58",
+  "version": "3.0.59",
   "main": "./dist/jquery.inputmask.bundle.js",
   "main": "./dist/jquery.inputmask.bundle.js",
   "keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
   "keywords" : ["jQuery", "plugins", "input", "form", "inputmask", "mask"],
   "description": "jquery.inputmask is a jquery plugin which create an input 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.major = 3
 build.minor = 0
 build.minor = 0
-build.revision = 58
+build.revision = 59
 
 
 target = jquery.inputmask.bundle.js
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.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
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Copyright (c) 2010 - 2014 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.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) {
     if ($.fn.inputmask === undefined) {
 
 
         //helper functions
         //helper functions
@@ -1797,16 +1805,23 @@
             }
             }
         };
         };
     }
     }
-})(jQuery);
+}));
 /**
 /**
 * @license Input Mask plugin for jquery
 * @license Input Mask plugin for jquery
 * http://github.com/RobinHerbots/jquery.inputmask
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Copyright (c) 2010 - 2014 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.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) {
     if ($.fn.inputmask != undefined) {
         function multiMaskScope(actionObj, masksets, opts) {
         function multiMaskScope(actionObj, masksets, opts) {
             function isInputEventSupported(eventName) {
             function isInputEventSupported(eventName) {
@@ -2129,17 +2144,25 @@
                 return $.inputmask._fn.call(this, fn, options);
                 return $.inputmask._fn.call(this, fn, options);
         };
         };
     }
     }
-})(jQuery);
+}));
 /*
 /*
 Input Mask plugin extensions
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 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.0.58
+Version: 3.0.59
 
 
 Optional extensions on the jquery.inputmask base
 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
     //extra definitions
     $.extend($.inputmask.defaults.definitions, {
     $.extend($.inputmask.defaults.definitions, {
         'A': {
         'A': {
@@ -2250,17 +2273,25 @@ Optional extensions on the jquery.inputmask base
             }
             }
         }
         }
     });
     });
-})(jQuery);
+}));
 /*
 /*
 Input Mask plugin extensions
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 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.0.58
+Version: 3.0.59
 
 
 Optional extensions on the jquery.inputmask base
 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
     //date & time aliases
     $.extend($.inputmask.defaults.definitions, {
     $.extend($.inputmask.defaults.definitions, {
         'h': { //hours
         'h': { //hours
@@ -2738,17 +2769,25 @@ Optional extensions on the jquery.inputmask base
             alias: "mm/dd/yyyy"
             alias: "mm/dd/yyyy"
         }
         }
     });
     });
-})(jQuery);
+}));
 /*
 /*
 Input Mask plugin extensions
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 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.0.58
+Version: 3.0.59
 
 
 Optional extensions on the jquery.inputmask base
 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
     //number aliases
     $.extend($.inputmask.defaults.aliases, {
     $.extend($.inputmask.defaults.aliases, {
         'numeric': {
         'numeric': {
@@ -2982,18 +3021,26 @@ Optional extensions on the jquery.inputmask base
             digits: "0"
             digits: "0"
         }
         }
     });
     });
-})(jQuery);
+}));
 /*
 /*
 Input Mask plugin extensions
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 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.0.58
+Version: 3.0.59
 
 
 Regex extensions on the jquery.inputmask base
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
 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]*"}
     $.extend($.inputmask.defaults.aliases, { // $(selector).inputmask("Regex", { regex: "[0-9]*"}
         'Regex': {
         'Regex': {
             mask: "r",
             mask: "r",
@@ -3169,13 +3216,13 @@ Allows for using regular expressions as a mask
             }
             }
         }
         }
     });
     });
-})(jQuery);
+}));
 /*
 /*
 Input Mask plugin extensions
 Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Copyright (c) 2010 - 2014 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.0.58
+Version: 3.0.59
 
 
 Phone extension.
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks
 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, {
     $.extend($.inputmask.defaults.aliases, {
         'phone': {
         'phone': {
             url: "phone-codes/phone-codes.json",
             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
             nojumpsThreshold: 4
         }
         }
     });
     });
-})(jQuery);
+}));

文件差异内容过多而无法显示
+ 105 - 104
dist/jquery.inputmask.bundle.min.js


文件差异内容过多而无法显示
+ 12 - 12
dist/min/jquery.inputmask-multi.js


文件差异内容过多而无法显示
+ 17 - 17
dist/min/jquery.inputmask.date.extensions.js


文件差异内容过多而无法显示
+ 4 - 4
dist/min/jquery.inputmask.extensions.js


文件差异内容过多而无法显示
+ 56 - 55
dist/min/jquery.inputmask.js


文件差异内容过多而无法显示
+ 9 - 9
dist/min/jquery.inputmask.numeric.extensions.js


文件差异内容过多而无法显示
+ 2 - 2
dist/min/jquery.inputmask.phone.extensions.js


文件差异内容过多而无法显示
+ 6 - 5
dist/min/jquery.inputmask.regex.extensions.js


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"inputmask",
 		"mask"
 		"mask"
     ],
     ],
-    "version": "3.0.58",
+    "version": "3.0.59",
     "author": {
     "author": {
         "name": "Robin Herbots",
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"
         "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)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Version: 0.0.0
 * 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) {
     if ($.fn.inputmask != undefined) {
         function multiMaskScope(actionObj, masksets, opts) {
         function multiMaskScope(actionObj, masksets, opts) {
             function isInputEventSupported(eventName) {
             function isInputEventSupported(eventName) {
@@ -329,4 +336,4 @@
                 return $.inputmask._fn.call(this, fn, options);
                 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
 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
     //date & time aliases
     $.extend($.inputmask.defaults.definitions, {
     $.extend($.inputmask.defaults.definitions, {
         'h': { //hours
         'h': { //hours
@@ -485,4 +493,4 @@ Optional extensions on the jquery.inputmask base
             alias: "mm/dd/yyyy"
             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
 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
     //extra definitions
     $.extend($.inputmask.defaults.definitions, {
     $.extend($.inputmask.defaults.definitions, {
         'A': {
         '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
 * 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) {
     if ($.fn.inputmask === undefined) {
 
 
         //helper functions
         //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
 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
     //number aliases
     $.extend($.inputmask.defaults.aliases, {
     $.extend($.inputmask.defaults.aliases, {
         'numeric': {
         'numeric': {
@@ -241,4 +249,4 @@ Optional extensions on the jquery.inputmask base
             digits: "0"
             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, {
     $.extend($.inputmask.defaults.aliases, {
         'phone': {
         'phone': {
             url: "phone-codes/phone-codes.json",
             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
             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
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
 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]*"}
     $.extend($.inputmask.defaults.aliases, { // $(selector).inputmask("Regex", { regex: "[0-9]*"}
         'Regex': {
         'Regex': {
             mask: "r",
             mask: "r",
@@ -184,4 +192,4 @@ Allows for using regular expressions as a mask
             }
             }
         }
         }
     });
     });
-})(jQuery);
+}));