Files
AdminLTE/plugins/inputmask/inputmask/jquery.inputmask.js
REJack cec053b7bf updated dependencies & copied to plugin/
- updated @fortawesome/fontawesome-free to v5.11.2
- updated @sweetalert2/theme-bootstrap-4 to 2.2.1
- updated @ttskch/select2-bootstrap4-theme to v1.3.2
- updated datatables.net to v1.10.20
- updated datatables.net-autofill-bs4 to v2.3.4
- updated datatables.net-bs4 to v1.10.20
- updated datatables.net-buttons-bs4 to v1.6.1
- updated datatables.net-colreorder-bs4 to v1.5.2
- updated datatables.net-fixedcolumns-bs4 to v3.3.0
- updated datatables.net-fixedheader-bs4 to v3.1.6
- updated datatables.net-keytable-bs4 to v2.5.1
- updated datatables.net-rowgroup-bs4 to v1.1.1
- updated datatables.net-rowreorder-bs4 to v1.2.6
- updated datatables.net-scroller-bs4 to v2.0.1
- updated datatables.net-select-bs4 to v1.3.1
- updated flag-icon-css to v3.4.2
- updated flot to v3.2.13
- updated fs-extra to v8.1.0
- updated inputmask to v4.0.9
- updated overlayscrollbars to v1.10.0
- updated pdfmake to v0.1.60
- updated popper.js to v1.16.0
- updated select2 to v4.0.11
- updated sweetalert2 to v8.18.5
2019-10-21 11:54:16 +02:00

97 lines
3.6 KiB
JavaScript

/*!
* jquery.inputmask.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2019 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 4.0.9
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery", "./inputmask" ], factory);
} else if (typeof exports === "object") {
module.exports = factory(require("jquery"), require("./inputmask"));
} else {
factory(jQuery, window.Inputmask);
}
})(function($, Inputmask) {
if ($.fn.inputmask === undefined) {
$.fn.inputmask = function(fn, options) {
var nptmask, input = this[0];
if (options === undefined) options = {};
if (typeof fn === "string") {
switch (fn) {
case "unmaskedvalue":
return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
case "remove":
return this.each(function() {
if (this.inputmask) this.inputmask.remove();
});
case "getemptymask":
return input && input.inputmask ? input.inputmask.getemptymask() : "";
case "hasMaskedValue":
return input && input.inputmask ? input.inputmask.hasMaskedValue() : false;
case "isComplete":
return input && input.inputmask ? input.inputmask.isComplete() : true;
case "getmetadata":
return input && input.inputmask ? input.inputmask.getmetadata() : undefined;
case "setvalue":
Inputmask.setValue(input, options);
break;
case "option":
if (typeof options === "string") {
if (input && input.inputmask !== undefined) {
return input.inputmask.option(options);
}
} else {
return this.each(function() {
if (this.inputmask !== undefined) {
return this.inputmask.option(options);
}
});
}
break;
default:
options.alias = fn;
nptmask = new Inputmask(options);
return this.each(function() {
nptmask.mask(this);
});
}
} else if (Array.isArray(fn)) {
options.alias = fn;
nptmask = new Inputmask(options);
return this.each(function() {
nptmask.mask(this);
});
} else if (typeof fn == "object") {
nptmask = new Inputmask(fn);
if (fn.mask === undefined && fn.alias === undefined) {
return this.each(function() {
if (this.inputmask !== undefined) {
return this.inputmask.option(fn);
} else nptmask.mask(this);
});
} else {
return this.each(function() {
nptmask.mask(this);
});
}
} else if (fn === undefined) {
return this.each(function() {
nptmask = new Inputmask(options);
nptmask.mask(this);
});
}
};
}
return $.fn.inputmask;
});