ソースを参照

enhance analyseMask for regex: '[0-9]{2}|[0-9]{3}'

Robin Herbots 7 年 前
コミット
dac064b3bf
48 ファイル変更248 行追加59 行削除
  1. 1 1
      bower.json
  2. 1 1
      component.json
  3. 1 1
      composer.json
  4. 1 1
      dist/inputmask/bindings/inputmask.binding.js
  5. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js
  6. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js
  7. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.js
  8. 1 1
      dist/inputmask/global/document.js
  9. 1 1
      dist/inputmask/global/window.js
  10. 1 1
      dist/inputmask/inputmask.date.extensions.js
  11. 1 1
      dist/inputmask/inputmask.extensions.js
  12. 8 4
      dist/inputmask/inputmask.js
  13. 1 1
      dist/inputmask/inputmask.numeric.extensions.js
  14. 1 1
      dist/inputmask/inputmask.phone.extensions.js
  15. 1 1
      dist/inputmask/jquery.inputmask.js
  16. 1 1
      dist/inputmask/phone-codes/phone-be.js
  17. 1 1
      dist/inputmask/phone-codes/phone-ca.js
  18. 1 1
      dist/inputmask/phone-codes/phone-hu.js
  19. 1 1
      dist/inputmask/phone-codes/phone-mx.js
  20. 1 1
      dist/inputmask/phone-codes/phone-nl.js
  21. 1 1
      dist/inputmask/phone-codes/phone-ru.js
  22. 1 1
      dist/inputmask/phone-codes/phone-uk.js
  23. 1 1
      dist/inputmask/phone-codes/phone.js
  24. 8 4
      dist/jquery.inputmask.bundle.js
  25. 1 1
      dist/min/inputmask/bindings/inputmask.binding.min.js
  26. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.min.js
  27. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.min.js
  28. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.min.js
  29. 1 1
      dist/min/inputmask/global/document.min.js
  30. 1 1
      dist/min/inputmask/global/window.min.js
  31. 1 1
      dist/min/inputmask/inputmask.date.extensions.min.js
  32. 1 1
      dist/min/inputmask/inputmask.extensions.min.js
  33. 2 2
      dist/min/inputmask/inputmask.min.js
  34. 1 1
      dist/min/inputmask/inputmask.numeric.extensions.min.js
  35. 1 1
      dist/min/inputmask/inputmask.phone.extensions.min.js
  36. 1 1
      dist/min/inputmask/jquery.inputmask.min.js
  37. 1 1
      dist/min/inputmask/phone-codes/phone-be.min.js
  38. 1 1
      dist/min/inputmask/phone-codes/phone-ca.min.js
  39. 1 1
      dist/min/inputmask/phone-codes/phone-hu.min.js
  40. 1 1
      dist/min/inputmask/phone-codes/phone-mx.min.js
  41. 1 1
      dist/min/inputmask/phone-codes/phone-nl.min.js
  42. 1 1
      dist/min/inputmask/phone-codes/phone-ru.min.js
  43. 1 1
      dist/min/inputmask/phone-codes/phone-uk.min.js
  44. 1 1
      dist/min/inputmask/phone-codes/phone.min.js
  45. 2 2
      dist/min/jquery.inputmask.bundle.min.js
  46. 9 5
      js/inputmask.js
  47. 1 1
      package.json
  48. 177 0
      temp.js

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "inputmask",
   "name": "inputmask",
-  "version": "4.0.0-beta.31",
+  "version": "4.0.0-beta.32",
   "main": [
   "main": [
 	  "./dist/inputmask/inputmask.js",
 	  "./dist/inputmask/inputmask.js",
 	  "./dist/inputmask/inputmask.extensions.js",
 	  "./dist/inputmask/inputmask.extensions.js",

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
 	"name": "inputmask",
 	"name": "inputmask",
 	"repository": "robinherbots/Inputmask",
 	"repository": "robinherbots/Inputmask",
 	"description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
 	"description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
-	"version": "4.0.0-beta.31",
+	"version": "4.0.0-beta.32",
 	"keywords": [
 	"keywords": [
 		"jquery",
 		"jquery",
 		"plugins",
 		"plugins",

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
 {
   "name": "robinherbots/inputmask",
   "name": "robinherbots/inputmask",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
-  "version": "4.0.0-beta.31",
+  "version": "4.0.0-beta.32",
   "type": "library",
   "type": "library",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "homepage": "http://robinherbots.github.io/Inputmask",
   "homepage": "http://robinherbots.github.io/Inputmask",

+ 1 - 1
dist/inputmask/bindings/inputmask.binding.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/global/document.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 "function" == typeof define && define.amd ? define(function() {
 "function" == typeof define && define.amd ? define(function() {

+ 1 - 1
dist/inputmask/global/window.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 "function" == typeof define && define.amd ? define(function() {
 "function" == typeof define && define.amd ? define(function() {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 8 - 4
dist/inputmask/inputmask.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {
@@ -1436,7 +1436,7 @@
                     if (insertTestDefinition(currentOpeningToken = openenings[openenings.length - 1], m), 
                     if (insertTestDefinition(currentOpeningToken = openenings[openenings.length - 1], m), 
                     currentOpeningToken.isAlternator) {
                     currentOpeningToken.isAlternator) {
                         alternator = openenings.pop();
                         alternator = openenings.pop();
-                        for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;
+                        for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup && (alternator.matches[mndx].isGroup = !1);
                         openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator);
                         openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator);
                     }
                     }
                 } else insertTestDefinition(currentToken, m);
                 } else insertTestDefinition(currentToken, m);
@@ -1489,7 +1489,11 @@
                         jit: mqj[1]
                         jit: mqj[1]
                     };
                     };
                     var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches;
                     var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches;
-                    (match = matches.pop()).isAlternator && (matches.push(match), match = (matches = match.matches).pop()), 
+                    if ((match = matches.pop()).isAlternator) {
+                        matches.push(match), matches = match.matches;
+                        var groupToken = new MaskToken(!0), tmpMatch = matches.pop();
+                        matches.push(groupToken), matches = groupToken.matches, match = tmpMatch;
+                    }
                     match.isGroup || (regexMask && null === match.fn && "." === match.def && (match.fn = new RegExp(match.def, opts.casing ? "i" : "")), 
                     match.isGroup || (regexMask && null === match.fn && "." === match.def && (match.fn = new RegExp(match.def, opts.casing ? "i" : "")), 
                     match = groupify([ match ])), matches.push(match), matches.push(quantifier);
                     match = groupify([ match ])), matches.push(match), matches.push(quantifier);
                     break;
                     break;
@@ -1537,7 +1541,7 @@
                 }
                 }
                 var st;
                 var st;
                 return maskToken;
                 return maskToken;
-            }(maskTokens[0]), console.log(JSON.stringify(maskTokens)), maskTokens;
+            }(maskTokens[0]), maskTokens;
         }
         }
     }, Inputmask.extendDefaults = function(options) {
     }, Inputmask.extendDefaults = function(options) {
         $.extend(!0, Inputmask.prototype.defaults, options);
         $.extend(!0, Inputmask.prototype.defaults, options);

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-be.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-ca.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-hu.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-mx.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-nl.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-ru.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-uk.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 8 - 4
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(modules) {
 !function(modules) {
@@ -1475,7 +1475,7 @@
                         if (insertTestDefinition(currentOpeningToken = openenings[openenings.length - 1], m), 
                         if (insertTestDefinition(currentOpeningToken = openenings[openenings.length - 1], m), 
                         currentOpeningToken.isAlternator) {
                         currentOpeningToken.isAlternator) {
                             alternator = openenings.pop();
                             alternator = openenings.pop();
-                            for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;
+                            for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup && (alternator.matches[mndx].isGroup = !1);
                             openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator);
                             openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator);
                         }
                         }
                     } else insertTestDefinition(currentToken, m);
                     } else insertTestDefinition(currentToken, m);
@@ -1528,7 +1528,11 @@
                             jit: mqj[1]
                             jit: mqj[1]
                         };
                         };
                         var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches;
                         var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches;
-                        (match = matches.pop()).isAlternator && (matches.push(match), match = (matches = match.matches).pop()), 
+                        if ((match = matches.pop()).isAlternator) {
+                            matches.push(match), matches = match.matches;
+                            var groupToken = new MaskToken(!0), tmpMatch = matches.pop();
+                            matches.push(groupToken), matches = groupToken.matches, match = tmpMatch;
+                        }
                         match.isGroup || (regexMask && null === match.fn && "." === match.def && (match.fn = new RegExp(match.def, opts.casing ? "i" : "")), 
                         match.isGroup || (regexMask && null === match.fn && "." === match.def && (match.fn = new RegExp(match.def, opts.casing ? "i" : "")), 
                         match = groupify([ match ])), matches.push(match), matches.push(quantifier);
                         match = groupify([ match ])), matches.push(match), matches.push(quantifier);
                         break;
                         break;
@@ -1576,7 +1580,7 @@
                     }
                     }
                     var st;
                     var st;
                     return maskToken;
                     return maskToken;
-                }(maskTokens[0]), console.log(JSON.stringify(maskTokens)), maskTokens;
+                }(maskTokens[0]), maskTokens;
             }
             }
         }, Inputmask.extendDefaults = function(options) {
         }, Inputmask.extendDefaults = function(options) {
             $.extend(!0, Inputmask.prototype.defaults, options);
             $.extend(!0, Inputmask.prototype.defaults, options);

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/bindings/inputmask.binding.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.min.js


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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):window.dependencyLib=e(jQuery)}(function(e){return e});
 !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):window.dependencyLib=e(jQuery)}(function(e){return e});

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.min.js


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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 "function"==typeof define&&define.amd?define(function(){return document}):"object"==typeof exports&&(module.exports=document);
 "function"==typeof define&&define.amd?define(function(){return document}):"object"==typeof exports&&(module.exports=document);

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

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 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: 4.0.0-beta.31
+* Version: 4.0.0-beta.32
 */
 */
 
 
 "function"==typeof define&&define.amd?define(function(){return window}):"object"==typeof exports&&(module.exports=window);
 "function"==typeof define&&define.amd?define(function(){return window}):"object"==typeof exports&&(module.exports=window);

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/inputmask.date.extensions.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/inputmask.extensions.min.js


ファイルの差分が大きいため隠しています
+ 2 - 2
dist/min/inputmask/inputmask.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/inputmask.numeric.extensions.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/inputmask.phone.extensions.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/jquery.inputmask.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-be.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-ca.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-hu.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-mx.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-nl.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-ru.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone-uk.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/min/inputmask/phone-codes/phone.min.js


ファイルの差分が大きいため隠しています
+ 2 - 2
dist/min/jquery.inputmask.bundle.min.js


+ 9 - 5
js/inputmask.js

@@ -405,7 +405,7 @@
                         if (currentOpeningToken.isAlternator) { //handle alternator a | b case
                         if (currentOpeningToken.isAlternator) { //handle alternator a | b case
                             alternator = openenings.pop();
                             alternator = openenings.pop();
                             for (var mndx = 0; mndx < alternator.matches.length; mndx++) {
                             for (var mndx = 0; mndx < alternator.matches.length; mndx++) {
-                                alternator.matches[mndx].isGroup = false; //don't mark alternate groups as group
+                                if (alternator.matches[mndx].isGroup) alternator.matches[mndx].isGroup = false; //don't mark alternate groups as group
                             }
                             }
                             if (openenings.length > 0) {
                             if (openenings.length > 0) {
                                 currentOpeningToken = openenings[openenings.length - 1];
                                 currentOpeningToken = openenings[openenings.length - 1];
@@ -543,9 +543,13 @@
                             var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches;
                             var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches;
                             match = matches.pop();
                             match = matches.pop();
                             if (match.isAlternator) { //handle quantifier in an alternation [0-9]{2}|[0-9]{3}
                             if (match.isAlternator) { //handle quantifier in an alternation [0-9]{2}|[0-9]{3}
-                                matches.push(match);
-                                matches = match.matches;
-                                match = matches.pop();
+                                matches.push(match); //push back alternator
+                                matches = match.matches; //remap target matches
+                                var groupToken = new MaskToken(true);
+                                var tmpMatch = matches.pop();
+                                matches.push(groupToken); //push the group
+                                matches = groupToken.matches;
+                                match = tmpMatch;
                             }
                             }
                             if (!match.isGroup) {
                             if (!match.isGroup) {
                                 if (regexMask && match.fn === null) {
                                 if (regexMask && match.fn === null) {
@@ -616,7 +620,7 @@
                 if (opts.numericInput || opts.isRTL) {
                 if (opts.numericInput || opts.isRTL) {
                     reverseTokens(maskTokens[0]);
                     reverseTokens(maskTokens[0]);
                 }
                 }
-                console.log(JSON.stringify(maskTokens));
+                // console.log(JSON.stringify(maskTokens));
                 return maskTokens;
                 return maskTokens;
             }
             }
         };
         };

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "inputmask",
   "name": "inputmask",
-  "version": "4.0.0-beta.31",
+  "version": "4.0.0-beta.32",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "main": "index.js",
   "main": "index.js",
   "files": [
   "files": [

+ 177 - 0
temp.js

@@ -0,0 +1,177 @@
+[{
+    "matches": [{
+        "matches": [{
+            "matches": [{
+                "matches": [{
+                    "fn": {},
+                    "optionality": false,
+                    "newBlockMarker": true,
+                    "casing": null,
+                    "def": "[0-9]",
+                    "nativeDef": "[0-9]"
+                }],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": true,
+                "isOptional": false,
+                "isQuantifier": false,
+                "isAlternator": false,
+                "quantifier": {"min": 1, "max": 1}
+            }, {
+                "matches": [],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": false,
+                "isOptional": false,
+                "isQuantifier": true,
+                "isAlternator": false,
+                "quantifier": {"min": 2, "max": 2}
+            }],
+            "openGroup": false,
+            "alternatorGroup": false,
+            "isGroup": false,
+            "isOptional": false,
+            "isQuantifier": false,
+            "isAlternator": false,
+            "quantifier": {"min": 1, "max": 1}
+        }, {
+            "matches": [{
+                "matches": [{
+                    "fn": {},
+                    "optionality": false,
+                    "newBlockMarker": true,
+                    "casing": null,
+                    "def": "[0-9]",
+                    "nativeDef": "[0-9]"
+                }],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": true,
+                "isOptional": false,
+                "isQuantifier": false,
+                "isAlternator": false,
+                "quantifier": {"min": 1, "max": 1}
+            }, {
+                "matches": [],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": false,
+                "isOptional": false,
+                "isQuantifier": true,
+                "isAlternator": false,
+                "quantifier": {"min": 3, "max": 3}
+            }],
+            "openGroup": false,
+            "alternatorGroup": false,
+            "isGroup": false,
+            "isOptional": false,
+            "isQuantifier": false,
+            "isAlternator": false,
+            "quantifier": {"min": 1, "max": 1}
+        }],
+        "openGroup": false,
+        "alternatorGroup": false,
+        "isGroup": false,
+        "isOptional": false,
+        "isQuantifier": false,
+        "isAlternator": true,
+        "quantifier": {"min": 1, "max": 1}
+    }],
+    "openGroup": false,
+    "alternatorGroup": false,
+    "isGroup": false,
+    "isOptional": false,
+    "isQuantifier": false,
+    "isAlternator": false,
+    "quantifier": {"min": 1, "max": 1}
+}]
+js\inputmask.js
+:
+623 [{
+    "matches": [{
+        "matches": [{
+            "matches": [{
+                "matches": [{
+                    "fn": {},
+                    "optionality": false,
+                    "newBlockMarker": true,
+                    "casing": null,
+                    "def": "[0-9]",
+                    "nativeDef": "[0-9]"
+                }],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": true,
+                "isOptional": false,
+                "isQuantifier": false,
+                "isAlternator": false,
+                "quantifier": {"min": 1, "max": 1}
+            }, {
+                "matches": [],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": false,
+                "isOptional": false,
+                "isQuantifier": true,
+                "isAlternator": false,
+                "quantifier": {"min": 2, "max": 2}
+            }],
+            "openGroup": false,
+            "alternatorGroup": false,
+            "isGroup": false,
+            "isOptional": false,
+            "isQuantifier": false,
+            "isAlternator": false,
+            "quantifier": {"min": 1, "max": 1}
+        }, {
+            "matches": [{
+                "matches": [{
+                    "fn": {},
+                    "optionality": false,
+                    "newBlockMarker": true,
+                    "casing": null,
+                    "def": "[0-9]",
+                    "nativeDef": "[0-9]",
+                    "isGroup": false
+                }],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": true,
+                "isOptional": false,
+                "isQuantifier": false,
+                "isAlternator": false,
+                "quantifier": {"min": 1, "max": 1}
+            }, {
+                "matches": [],
+                "openGroup": false,
+                "alternatorGroup": false,
+                "isGroup": false,
+                "isOptional": false,
+                "isQuantifier": true,
+                "isAlternator": false,
+                "quantifier": {"min": 3, "max": 3}
+            }],
+            "openGroup": true,
+            "alternatorGroup": false,
+            "isGroup": false,
+            "isOptional": false,
+            "isQuantifier": false,
+            "isAlternator": false,
+            "quantifier": {"min": 1, "max": 1}
+        }],
+        "openGroup": false,
+        "alternatorGroup": false,
+        "isGroup": false,
+        "isOptional": false,
+        "isQuantifier": false,
+        "isAlternator": true,
+        "quantifier": {"min": 1, "max": 1}
+    }],
+    "openGroup": false,
+    "alternatorGroup": false,
+    "isGroup": false,
+    "isOptional": false,
+    "isQuantifier": false,
+    "isAlternator": false,
+    "quantifier": {"min": 1, "max": 1}
+}]