|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2015 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 3.1.62-42
|
|
|
+* Version: 3.1.62-45
|
|
|
*/
|
|
|
!function($) {
|
|
|
function isInputEventSupported(eventName) {
|
|
|
@@ -270,7 +270,7 @@
|
|
|
}
|
|
|
function getTestTemplate(pos, ndxIntlzr, tstPs) {
|
|
|
var testPos = getMaskSet().validPositions[pos];
|
|
|
- if (void 0 == testPos) for (var testPositions = getTests(pos, ndxIntlzr, tstPs), lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp] || getTests(0)[0], lvTestAltArr = void 0 != lvTest.alternation ? lvTest.locator[lvTest.alternation].split(",") : [], ndx = 0; ndx < testPositions.length && (testPos = testPositions[ndx],
|
|
|
+ if (void 0 == testPos) for (var testPositions = getTests(pos, ndxIntlzr, tstPs), lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp] || getTests(0, void 0, void 0)[0], lvTestAltArr = void 0 != lvTest.alternation ? lvTest.locator[lvTest.alternation].split(",") : [], ndx = 0; ndx < testPositions.length && (testPos = testPositions[ndx],
|
|
|
!(testPos.match && (opts.greedy && testPos.match.optionalQuantifier !== !0 || (testPos.match.optionality === !1 || testPos.match.newBlockMarker === !1) && testPos.match.optionalQuantifier !== !0) && (void 0 == lvTest.alternation || void 0 != testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAltArr)))); ndx++) ;
|
|
|
return testPos;
|
|
|
}
|
|
|
@@ -284,7 +284,7 @@
|
|
|
}
|
|
|
return valid;
|
|
|
}
|
|
|
- function getTests(pos, ndxIntlzr, tstPs) {
|
|
|
+ function getTests(pos, ndxIntlzr, tstPs, cacheable) {
|
|
|
function ResolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) {
|
|
|
function handleMatch(match, loopNdx, quantifierRecurse) {
|
|
|
if (testPos > 1e4) return alert("jquery.inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + getMaskSet().mask),
|
|
|
@@ -2140,9 +2140,12 @@
|
|
|
},
|
|
|
insertMode: !0,
|
|
|
autoUnmask: !1,
|
|
|
+ unmaskAsNumber: !1,
|
|
|
onUnMask: function(maskedValue, unmaskedValue, opts) {
|
|
|
var processValue = maskedValue.replace(opts.prefix, "");
|
|
|
- return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), "g"), "");
|
|
|
+ return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
|
|
|
+ opts.unmaskAsNumber ? (processValue = processValue.replace($.inputmask.escapeRegex.call(this, opts.radixPoint), "."),
|
|
|
+ Number(processValue)) : processValue;
|
|
|
},
|
|
|
isComplete: function(buffer, opts) {
|
|
|
var maskedValue = buffer.join(""), bufClone = buffer.slice();
|