ソースを参照

alternations & update nuspecs

Robin Herbots 9 年 前
コミット
2c70d457e2

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
 - 'casing': 'title' #1277
 
 ### Updates
+- include min files in nuspecs
 - better filter for input targets in inputmask.binder.js
 - improve alternation selection
 - removed nojumps option

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.3.2-88",
+  "version": "3.3.2-89",
   "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-88",
+  "version": "3.3.2-89",
   "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-88",
+  "version": "3.3.2-89",
   "type": "library",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "homepage": "http://robinherbots.github.io/jquery.inputmask",

+ 1 - 1
dist/inputmask/inputmask.date.extensions.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-88
+* Version: 3.3.2-89
 */
 !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);

+ 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-88
+* Version: 3.3.2-89
 */
 !function(factory) {
     "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 @@
 * 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-88
+* Version: 3.3.2-89
 */
 !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);

+ 6 - 5
dist/inputmask/inputmask.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-88
+* Version: 3.3.2-89
 */
 !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);
@@ -413,9 +413,10 @@
                                         altMatch.alternation = altMatch.alternation || loopNdxCnt;
                                         for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) {
                                             var altMatch2 = malternateMatches[ndx2];
-                                            if (("string" != typeof altIndex || $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) && (altMatch.match.def === altMatch2.match.def || opts.keepStatic !== !0 && staticCanMatchDefinition(altMatch, altMatch2))) {
+                                            if (("string" != typeof altIndex || $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) && (altMatch.match.def === altMatch2.match.def || staticCanMatchDefinition(altMatch, altMatch2))) {
                                                 hasMatch = altMatch.match.mask === altMatch2.match.mask, altMatch2.locator[altMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1 && (altMatch2.locator[altMatch.alternation] = altMatch2.locator[altMatch.alternation] + "," + altMatch.locator[altMatch.alternation], 
-                                                altMatch2.alternation = altMatch.alternation);
+                                                altMatch2.alternation = altMatch.alternation, null == altMatch.match.fn && (altMatch2.na = altMatch2.na || altMatch.locator[altMatch.alternation].toString(), 
+                                                altMatch2.na.indexOf(altMatch.locator[altMatch.alternation]) === -1 && (altMatch2.na = altMatch2.na + "," + altMatch.locator[altMatch.alternation])));
                                                 break;
                                             }
                                         }
@@ -590,13 +591,13 @@
                         altNdxs = test.locator[alternation] ? test.locator[alternation].toString().split(",") : [];
                         for (var mndx = 0; mndx < altNdxs.length; mndx++) {
                             var validInputs = [], staticInputsBeforePos = 0, staticInputsBeforePosAlternate = 0, verifyValidInput = !1;
-                            if (decisionTaker < altNdxs[mndx]) {
+                            if (decisionTaker < altNdxs[mndx] && (void 0 === test.na || $.inArray(altNdxs[mndx], test.na.split(",")) === -1)) {
                                 getMaskSet().validPositions[decisionPos] = $.extend(!0, {}, test);
                                 var possibilities = getMaskSet().validPositions[decisionPos].locator;
                                 for (getMaskSet().validPositions[decisionPos].locator[alternation] = parseInt(altNdxs[mndx]), 
                                 null == test.match.fn ? (possibilityPos.input !== test.match.def && (verifyValidInput = !0, 
                                 possibilityPos.generatedInput !== !0 && validInputs.push(possibilityPos.input)), 
-                                staticInputsBeforePosAlternate++, getMaskSet().validPositions[decisionPos].generatedInput = !0, 
+                                staticInputsBeforePosAlternate++, getMaskSet().validPositions[decisionPos].generatedInput = !/[0-9a-bA-Z]/.test(test.match.def), 
                                 getMaskSet().validPositions[decisionPos].input = test.match.def) : getMaskSet().validPositions[decisionPos].input = possibilityPos.input, 
                                 i = decisionPos + 1; i < getLastValidPosition(void 0, !0) + 1; i++) validPos = getMaskSet().validPositions[i], 
                                 validPos && validPos.generatedInput !== !0 && /[0-9a-bA-Z]/.test(validPos.input) ? validInputs.push(validPos.input) : i < pos && staticInputsBeforePos++, 

+ 1 - 1
dist/inputmask/inputmask.numeric.extensions.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-88
+* Version: 3.3.2-89
 */
 !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);

+ 1 - 1
dist/inputmask/inputmask.phone.extensions.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-88
+* Version: 3.3.2-89
 */
 !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);

+ 1 - 1
dist/inputmask/inputmask.regex.extensions.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-88
+* Version: 3.3.2-89
 */
 !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);

+ 1 - 1
dist/inputmask/jquery.inputmask.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-88
+* Version: 3.3.2-89
 */
 !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);

+ 6 - 5
dist/jquery.inputmask.bundle.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-88
+* Version: 3.3.2-89
 */
 !function($) {
     function Inputmask(alias, options) {
@@ -411,9 +411,10 @@
                                         altMatch.alternation = altMatch.alternation || loopNdxCnt;
                                         for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) {
                                             var altMatch2 = malternateMatches[ndx2];
-                                            if (("string" != typeof altIndex || $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) && (altMatch.match.def === altMatch2.match.def || opts.keepStatic !== !0 && staticCanMatchDefinition(altMatch, altMatch2))) {
+                                            if (("string" != typeof altIndex || $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) && (altMatch.match.def === altMatch2.match.def || staticCanMatchDefinition(altMatch, altMatch2))) {
                                                 hasMatch = altMatch.match.mask === altMatch2.match.mask, altMatch2.locator[altMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1 && (altMatch2.locator[altMatch.alternation] = altMatch2.locator[altMatch.alternation] + "," + altMatch.locator[altMatch.alternation], 
-                                                altMatch2.alternation = altMatch.alternation);
+                                                altMatch2.alternation = altMatch.alternation, null == altMatch.match.fn && (altMatch2.na = altMatch2.na || altMatch.locator[altMatch.alternation].toString(), 
+                                                altMatch2.na.indexOf(altMatch.locator[altMatch.alternation]) === -1 && (altMatch2.na = altMatch2.na + "," + altMatch.locator[altMatch.alternation])));
                                                 break;
                                             }
                                         }
@@ -588,13 +589,13 @@
                         altNdxs = test.locator[alternation] ? test.locator[alternation].toString().split(",") : [];
                         for (var mndx = 0; mndx < altNdxs.length; mndx++) {
                             var validInputs = [], staticInputsBeforePos = 0, staticInputsBeforePosAlternate = 0, verifyValidInput = !1;
-                            if (decisionTaker < altNdxs[mndx]) {
+                            if (decisionTaker < altNdxs[mndx] && (void 0 === test.na || $.inArray(altNdxs[mndx], test.na.split(",")) === -1)) {
                                 getMaskSet().validPositions[decisionPos] = $.extend(!0, {}, test);
                                 var possibilities = getMaskSet().validPositions[decisionPos].locator;
                                 for (getMaskSet().validPositions[decisionPos].locator[alternation] = parseInt(altNdxs[mndx]), 
                                 null == test.match.fn ? (possibilityPos.input !== test.match.def && (verifyValidInput = !0, 
                                 possibilityPos.generatedInput !== !0 && validInputs.push(possibilityPos.input)), 
-                                staticInputsBeforePosAlternate++, getMaskSet().validPositions[decisionPos].generatedInput = !0, 
+                                staticInputsBeforePosAlternate++, getMaskSet().validPositions[decisionPos].generatedInput = !/[0-9a-bA-Z]/.test(test.match.def), 
                                 getMaskSet().validPositions[decisionPos].input = test.match.def) : getMaskSet().validPositions[decisionPos].input = possibilityPos.input, 
                                 i = decisionPos + 1; i < getLastValidPosition(void 0, !0) + 1; i++) validPos = getMaskSet().validPositions[i], 
                                 validPos && validPos.generatedInput !== !0 && /[0-9a-bA-Z]/.test(validPos.input) ? validInputs.push(validPos.input) : i < pos && staticInputsBeforePos++, 

+ 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-88
+* Version: 3.3.2-89
 */
 /*
  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-88
+* Version: 3.3.2-89
 */
 !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-88
+* Version: 3.3.2-89
 */
 /*
  Input Mask plugin extensions

+ 6 - 4
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-88
+* Version: 3.3.2-89
 */
 /*
  * Input Mask Core
@@ -94,7 +94,9 @@ var G=a.inArray(f,c.matches)+1;c.matches.length>G&&(f=j(c.matches[G],[G].concat(
 //fuzzy merge matches
 for(var H=0;H<u.length;H++){var I=u[H],J=!1;I.alternation=I.alternation||z;for(var K=0;K<x.length;K++){var L=x[K];
 //verify equality
-if(("string"!=typeof A||a.inArray(I.locator[I.alternation].toString(),E)!==-1)&&(I.match.def===L.match.def||g.keepStatic!==!0&&s(I,L))){J=I.match.mask===L.match.mask,L.locator[I.alternation].toString().indexOf(I.locator[I.alternation])===-1&&(L.locator[I.alternation]=L.locator[I.alternation]+","+I.locator[I.alternation],L.alternation=I.alternation);break}}J||x.push(I)}}"string"==typeof A&&(//filter matches
+if(("string"!=typeof A||a.inArray(I.locator[I.alternation].toString(),E)!==-1)&&(I.match.def===L.match.def||s(I,L))){J=I.match.mask===L.match.mask,L.locator[I.alternation].toString().indexOf(I.locator[I.alternation])===-1&&(L.locator[I.alternation]=L.locator[I.alternation]+","+I.locator[I.alternation],L.alternation=I.alternation,//we pass the alternation index => used in determineLastRequiredPosition
+null==I.match.fn&&(//staticCanMatchDefinition => set no alternate on match
+L.na=L.na||I.locator[I.alternation].toString(),L.na.indexOf(I.locator[I.alternation])===-1&&(L.na=L.na+","+I.locator[I.alternation])));break}}J||x.push(I)}}"string"==typeof A&&(//filter matches
 x=a.map(x,function(b,c){if(isFinite(c)){var d,e=b.alternation,f=b.locator[e].toString().split(",");b.locator[e]=void 0,b.alternation=void 0;for(var g=0;g<f.length;g++)d=a.inArray(f[g],E)!==-1,d&&(//rebuild the locator with valid entries
 void 0!==b.locator[e]?(b.locator[e]+=",",b.locator[e]+=f[g]):b.locator[e]=parseInt(f[g]),b.alternation=e);if(void 0!==b.locator[e])return b}})),n=y.concat(x),k=b,o=n.length>0,//insert a stopelemnt when there is an alternate - needed for non-greedy option
 //cloneback
@@ -126,9 +128,9 @@ return h=a.extend(h,C(v,u,!0)),!1;return(h===!0||void 0!==h.pos||void 0!==h.c)&&
 //find last modified alternation
 j=m().validPositions[t];t>=0;t--)if(i=m().validPositions[t],i&&void 0!==i.alternation){if(e=t,h=m().validPositions[e].alternation,j.locator[i.alternation]!==i.locator[i.alternation])break;j=i}if(void 0!==h){q=parseInt(e);var u=void 0!==j.locator[j.alternation||h]?j.locator[j.alternation||h]:p[0];//no match in the alternations (length mismatch)
 u.length>0&&(//no decision taken ~ take first one as decider
-u=u.split(",")[0]);var v=m().validPositions[q],x=m().validPositions[q-1];a.each(w(q,x?x.locator:void 0,q-1),function(e,i){p=i.locator[h]?i.locator[h].toString().split(","):[];for(var j=0;j<p.length;j++){var t=[],w=0,x=0,y=!1;if(u<p[j]){m().validPositions[q]=a.extend(!0,{},i);var z=m().validPositions[q].locator;for(m().validPositions[q].locator[h]=parseInt(p[j]),//set forced decision
+u=u.split(",")[0]);var v=m().validPositions[q],x=m().validPositions[q-1];a.each(w(q,x?x.locator:void 0,q-1),function(e,i){p=i.locator[h]?i.locator[h].toString().split(","):[];for(var j=0;j<p.length;j++){var t=[],w=0,x=0,y=!1;if(u<p[j]&&(void 0===i.na||a.inArray(p[j],i.na.split(","))===-1)){m().validPositions[q]=a.extend(!0,{},i);var z=m().validPositions[q].locator;for(m().validPositions[q].locator[h]=parseInt(p[j]),//set forced decision
 null==i.match.fn?(v.input!==i.match.def&&(y=!0,//verify that the new definition matches the input
-v.generatedInput!==!0&&t.push(v.input)),x++,m().validPositions[q].generatedInput=!0,m().validPositions[q].input=i.match.def):m().validPositions[q].input=v.input,k=q+1;k<o(void 0,!0)+1;k++)l=m().validPositions[k],l&&l.generatedInput!==!0&&/[0-9a-bA-Z]/.test(l.input)?t.push(l.input):k<b&&w++,delete m().validPositions[k];for(y&&t[0]===i.match.def&&t.shift(),n(!0),//clear getbuffer
+v.generatedInput!==!0&&t.push(v.input)),x++,m().validPositions[q].generatedInput=!/[0-9a-bA-Z]/.test(i.match.def),m().validPositions[q].input=i.match.def):m().validPositions[q].input=v.input,k=q+1;k<o(void 0,!0)+1;k++)l=m().validPositions[k],l&&l.generatedInput!==!0&&/[0-9a-bA-Z]/.test(l.input)?t.push(l.input):k<b&&w++,delete m().validPositions[k];for(y&&t[0]===i.match.def&&t.shift(),n(!0),//clear getbuffer
 s=!0;t.length>0;){var A=t.shift();if(A!==g.skipOptionalPartCharacter&&!(s=C(o(void 0,!0)+1,A,!1,f,!0)))break}if(s){m().validPositions[q].locator=z;//reset forceddecision ~ needed for proper delete
 var B=o(b)+1;for(k=q+1;k<o()+1;k++)l=m().validPositions[k],(void 0===l||null==l.match.fn)&&k<b+(x-w)&&x++;b+=x-w,s=C(b>B?B:b,c,d,f,!0)}if(s)return!1;n(),m().validPositions=a.extend(!0,{},r)}}})}return s}
 //set alternator choice on previous skipped placeholder positions

+ 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-88
+* Version: 3.3.2-89
 */
 /*
  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-88
+* Version: 3.3.2-89
 */
 /*
  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-88
+* Version: 3.3.2-89
 */
 /*
  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-88
+* Version: 3.3.2-89
 */
 /*
  * Input Mask plugin for jquery

+ 6 - 4
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-88
+* Version: 3.3.2-89
 */
 /*
  * Input Mask Core
@@ -94,7 +94,9 @@ var G=a.inArray(f,c.matches)+1;c.matches.length>G&&(f=j(c.matches[G],[G].concat(
 //fuzzy merge matches
 for(var H=0;H<u.length;H++){var I=u[H],J=!1;I.alternation=I.alternation||z;for(var K=0;K<x.length;K++){var L=x[K];
 //verify equality
-if(("string"!=typeof A||a.inArray(I.locator[I.alternation].toString(),E)!==-1)&&(I.match.def===L.match.def||g.keepStatic!==!0&&s(I,L))){J=I.match.mask===L.match.mask,L.locator[I.alternation].toString().indexOf(I.locator[I.alternation])===-1&&(L.locator[I.alternation]=L.locator[I.alternation]+","+I.locator[I.alternation],L.alternation=I.alternation);break}}J||x.push(I)}}"string"==typeof A&&(//filter matches
+if(("string"!=typeof A||a.inArray(I.locator[I.alternation].toString(),E)!==-1)&&(I.match.def===L.match.def||s(I,L))){J=I.match.mask===L.match.mask,L.locator[I.alternation].toString().indexOf(I.locator[I.alternation])===-1&&(L.locator[I.alternation]=L.locator[I.alternation]+","+I.locator[I.alternation],L.alternation=I.alternation,//we pass the alternation index => used in determineLastRequiredPosition
+null==I.match.fn&&(//staticCanMatchDefinition => set no alternate on match
+L.na=L.na||I.locator[I.alternation].toString(),L.na.indexOf(I.locator[I.alternation])===-1&&(L.na=L.na+","+I.locator[I.alternation])));break}}J||x.push(I)}}"string"==typeof A&&(//filter matches
 x=a.map(x,function(b,c){if(isFinite(c)){var d,e=b.alternation,f=b.locator[e].toString().split(",");b.locator[e]=void 0,b.alternation=void 0;for(var g=0;g<f.length;g++)d=a.inArray(f[g],E)!==-1,d&&(//rebuild the locator with valid entries
 void 0!==b.locator[e]?(b.locator[e]+=",",b.locator[e]+=f[g]):b.locator[e]=parseInt(f[g]),b.alternation=e);if(void 0!==b.locator[e])return b}})),n=y.concat(x),k=b,o=n.length>0,//insert a stopelemnt when there is an alternate - needed for non-greedy option
 //cloneback
@@ -126,9 +128,9 @@ return h=a.extend(h,C(v,u,!0)),!1;return(h===!0||void 0!==h.pos||void 0!==h.c)&&
 //find last modified alternation
 j=m().validPositions[t];t>=0;t--)if(i=m().validPositions[t],i&&void 0!==i.alternation){if(e=t,h=m().validPositions[e].alternation,j.locator[i.alternation]!==i.locator[i.alternation])break;j=i}if(void 0!==h){q=parseInt(e);var u=void 0!==j.locator[j.alternation||h]?j.locator[j.alternation||h]:p[0];//no match in the alternations (length mismatch)
 u.length>0&&(//no decision taken ~ take first one as decider
-u=u.split(",")[0]);var v=m().validPositions[q],x=m().validPositions[q-1];a.each(w(q,x?x.locator:void 0,q-1),function(e,i){p=i.locator[h]?i.locator[h].toString().split(","):[];for(var j=0;j<p.length;j++){var t=[],w=0,x=0,y=!1;if(u<p[j]){m().validPositions[q]=a.extend(!0,{},i);var z=m().validPositions[q].locator;for(m().validPositions[q].locator[h]=parseInt(p[j]),//set forced decision
+u=u.split(",")[0]);var v=m().validPositions[q],x=m().validPositions[q-1];a.each(w(q,x?x.locator:void 0,q-1),function(e,i){p=i.locator[h]?i.locator[h].toString().split(","):[];for(var j=0;j<p.length;j++){var t=[],w=0,x=0,y=!1;if(u<p[j]&&(void 0===i.na||a.inArray(p[j],i.na.split(","))===-1)){m().validPositions[q]=a.extend(!0,{},i);var z=m().validPositions[q].locator;for(m().validPositions[q].locator[h]=parseInt(p[j]),//set forced decision
 null==i.match.fn?(v.input!==i.match.def&&(y=!0,//verify that the new definition matches the input
-v.generatedInput!==!0&&t.push(v.input)),x++,m().validPositions[q].generatedInput=!0,m().validPositions[q].input=i.match.def):m().validPositions[q].input=v.input,k=q+1;k<o(void 0,!0)+1;k++)l=m().validPositions[k],l&&l.generatedInput!==!0&&/[0-9a-bA-Z]/.test(l.input)?t.push(l.input):k<b&&w++,delete m().validPositions[k];for(y&&t[0]===i.match.def&&t.shift(),n(!0),//clear getbuffer
+v.generatedInput!==!0&&t.push(v.input)),x++,m().validPositions[q].generatedInput=!/[0-9a-bA-Z]/.test(i.match.def),m().validPositions[q].input=i.match.def):m().validPositions[q].input=v.input,k=q+1;k<o(void 0,!0)+1;k++)l=m().validPositions[k],l&&l.generatedInput!==!0&&/[0-9a-bA-Z]/.test(l.input)?t.push(l.input):k<b&&w++,delete m().validPositions[k];for(y&&t[0]===i.match.def&&t.shift(),n(!0),//clear getbuffer
 s=!0;t.length>0;){var A=t.shift();if(A!==g.skipOptionalPartCharacter&&!(s=C(o(void 0,!0)+1,A,!1,f,!0)))break}if(s){m().validPositions[q].locator=z;//reset forceddecision ~ needed for proper delete
 var B=o(b)+1;for(k=q+1;k<o()+1;k++)l=m().validPositions[k],(void 0===l||null==l.match.fn)&&k<b+(x-w)&&x++;b+=x-w,s=C(b>B?B:b,c,d,f,!0)}if(s)return!1;n(),m().validPositions=a.extend(!0,{},r)}}})}return s}
 //set alternator choice on previous skipped placeholder positions

+ 8 - 4
js/inputmask.js

@@ -1084,12 +1084,16 @@
 											var altMatch2 = malternateMatches[ndx2];
 											//verify equality
 											if (typeof altIndex !== "string" || $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) {
-												//there is no use to generalize the static definition to a mask definition when using keepStatic ~ prevents proper alternating
-												if (altMatch.match.def === altMatch2.match.def || (opts.keepStatic !== true && staticCanMatchDefinition(altMatch, altMatch2))) {
+												if (altMatch.match.def === altMatch2.match.def || staticCanMatchDefinition(altMatch, altMatch2)) {
 													hasMatch = altMatch.match.mask === altMatch2.match.mask;
 													if (altMatch2.locator[altMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1) {
 														altMatch2.locator[altMatch.alternation] = altMatch2.locator[altMatch.alternation] + "," + altMatch.locator[altMatch.alternation];
 														altMatch2.alternation = altMatch.alternation; //we pass the alternation index => used in determineLastRequiredPosition
+														if (altMatch.match.fn == null) { //staticCanMatchDefinition => set no alternate on match
+															altMatch2.na = altMatch2.na || altMatch.locator[altMatch.alternation].toString();
+															if (altMatch2.na.indexOf(altMatch.locator[altMatch.alternation]) === -1)
+																altMatch2.na = altMatch2.na + "," + altMatch.locator[altMatch.alternation];
+														}
 													}
 													break;
 												}
@@ -1473,7 +1477,7 @@
 								staticInputsBeforePos = 0,
 								staticInputsBeforePosAlternate = 0,
 								verifyValidInput = false;
-							if (decisionTaker < altNdxs[mndx]) {
+							if (decisionTaker < altNdxs[mndx] && (test.na === undefined || $.inArray(altNdxs[mndx], test.na.split(",")) === -1)) {
 								getMaskSet().validPositions[decisionPos] = $.extend(true, {}, test);
 								var possibilities = getMaskSet().validPositions[decisionPos].locator;
 								getMaskSet().validPositions[decisionPos].locator[alternation] = parseInt(altNdxs[mndx]); //set forced decision
@@ -1485,7 +1489,7 @@
 										}
 									}
 									staticInputsBeforePosAlternate++;
-									getMaskSet().validPositions[decisionPos].generatedInput = true;
+									getMaskSet().validPositions[decisionPos].generatedInput = !/[0-9a-bA-Z]/.test(test.match.def);
 									getMaskSet().validPositions[decisionPos].input = test.match.def;
 								} else {
 									getMaskSet().validPositions[decisionPos].input = possibilityPos.input;

+ 15 - 1
nuspecs/jquery.inputmask.linux.nuspec

@@ -7,7 +7,7 @@
     <authors>Robin Herbots</authors>
     <owners>Robin Herbots</owners>
     <licenseUrl>http://opensource.org/licenses/mit-license.php</licenseUrl>
-    <projectUrl>https://github.com/RobinHerbots/jquery.inputmask</projectUrl>
+    <projectUrl>https://github.com/RobinHerbots/jquery.inputmask</projectRUrl>
     <requireLicenseAcceptance>true</requireLicenseAcceptance>
     <summary>jquery.inputmask is a jquery plugin which create an input mask.</summary>
     <description>jquery.inputmask is a jquery plugin which create an input mask.</description>
@@ -28,6 +28,20 @@
       target="content/Scripts/jquery.inputmask/jquery.inputmask.js"/>
     <file src="dist/inputmask/inputmask.js"
       target="content/Scripts/jquery.inputmask/inputmask.js"/>
+    <file src="../dist/min/inputmask/inputmask.date.extensions.min.js"
+      target="content/Scripts/jquery.inputmask/inputmask.date.extensions.min.js"/>R
+    <file src="../dist/min/inputmask/inputmask.extensions.min.js"
+      target="content/Scripts/jquery.inputmask/inputmask.extensions.min.js"/>
+    <file src="../dist/min/inputmask/inputmask.numeric.extensions.min.js"
+      target="content/Scripts/jquery.inputmask/inputmask.numeric.extensions.min.js"/>
+    <file src="../dist/min/inputmask/inputmask.regex.extensions.min.js"
+      target="content/Scripts/jquery.inputmask/inputmask.regex.extensions.min.js"/>
+    <file src="../dist/min/inputmask/inputmask.phone.extensions.min.js"
+      target="content/Scripts/jquery.inputmask/inputmask.phone.extensions.min.js"/>
+    <file src="../dist/min/inputmask/jquery.inputmask.min.js"
+      target="content/Scripts/jquery.inputmask/jquery.inputmask.min.js"/>
+    <file src="../dist/min/inputmask/inputmask.min.js"
+      target="content/Scripts/jquery.inputmask/inputmask.min.js"/>
     <file src="../nuspecs/Readme.txt" target="Readme.txt" />
   </files>
 </package>

+ 14 - 0
nuspecs/jquery.inputmask.nuspec

@@ -28,6 +28,20 @@
       target="content\Scripts\jquery.inputmask\jquery.inputmask.js"/>
     <file src="..\dist\inputmask\inputmask.js"
       target="content\Scripts\jquery.inputmask\inputmask.js"/>
+    <file src="..\dist\min\inputmask\inputmask.date.extensions.min.js"
+      target="content\Scripts\jquery.inputmask\inputmask.date.extensions.min.js"/>
+    <file src="..\dist\min\inputmask\inputmask.extensions.min.js"
+      target="content\Scripts\jquery.inputmask\inputmask.extensions.min.js"/>
+    <file src="..\dist\min\inputmask\inputmask.numeric.extensions.min.js"
+      target="content\Scripts\jquery.inputmask\inputmask.numeric.extensions.min.js"/>
+    <file src="..\dist\min\inputmask\inputmask.regex.extensions.min.js"
+      target="content\Scripts\jquery.inputmask\inputmask.regex.extensions.min.js"/>
+    <file src="..\dist\min\inputmask\inputmask.phone.extensions.min.js"
+      target="content\Scripts\jquery.inputmask\inputmask.phone.extensions.min.js"/>
+    <file src="..\dist\min\inputmask\jquery.inputmask.min.js"
+      target="content\Scripts\jquery.inputmask\jquery.inputmask.min.js"/>
+    <file src="..\dist\min\inputmask\inputmask.min.js"
+      target="content\Scripts\jquery.inputmask\inputmask.min.js"/>
     <file src="..\nuspecs\Readme.txt" target="Readme.txt" />
   </files>
 </package>

+ 1 - 1
package.json

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