use-mask-input 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/example/App.example.d.ts +3 -0
  2. package/dist/{useMaskInput.test.d.ts → example/index.d.ts} +0 -0
  3. package/dist/index.js +1 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.modern.js +1 -2
  6. package/dist/index.modern.js.map +1 -1
  7. package/dist/useMaskInput.d.ts +3 -3
  8. package/node_modules/inputmask/README.md +109 -79
  9. package/node_modules/inputmask/bundle.js +6 -5
  10. package/node_modules/inputmask/dist/inputmask.es6.js +5 -0
  11. package/node_modules/inputmask/dist/inputmask.js +2892 -2608
  12. package/node_modules/inputmask/dist/inputmask.min.js +3 -3
  13. package/node_modules/inputmask/dist/jquery.inputmask.js +2829 -2534
  14. package/node_modules/inputmask/dist/jquery.inputmask.min.js +3 -3
  15. package/node_modules/inputmask/lib/bindings/inputmask.es6.js +5 -0
  16. package/node_modules/inputmask/lib/canUseDOM.js +7 -0
  17. package/node_modules/inputmask/lib/defaults.js +101 -0
  18. package/node_modules/inputmask/lib/definitions.js +13 -0
  19. package/node_modules/inputmask/lib/dependencyLibs/data.js +8 -0
  20. package/node_modules/inputmask/lib/dependencyLibs/events.js +199 -0
  21. package/node_modules/inputmask/lib/dependencyLibs/extend.js +58 -0
  22. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.jquery.js +4 -3
  23. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.js +12 -343
  24. package/node_modules/inputmask/lib/environment.js +9 -0
  25. package/node_modules/inputmask/lib/escapeRegex.js +4 -0
  26. package/node_modules/inputmask/lib/eventhandlers.js +513 -0
  27. package/node_modules/inputmask/lib/eventruler.js +124 -0
  28. package/node_modules/inputmask/lib/extensions/inputmask.date.extensions.js +552 -385
  29. package/node_modules/inputmask/lib/extensions/inputmask.extensions.js +116 -97
  30. package/node_modules/inputmask/lib/extensions/inputmask.numeric.extensions.js +594 -565
  31. package/node_modules/inputmask/lib/global/window.js +2 -6
  32. package/node_modules/inputmask/lib/inputHandling.js +252 -0
  33. package/node_modules/inputmask/lib/inputmask.js +129 -126
  34. package/node_modules/inputmask/lib/inputmaskElement.js +26 -20
  35. package/node_modules/inputmask/lib/jquery.inputmask.js +3 -1
  36. package/node_modules/inputmask/lib/keycode.json +6 -1
  37. package/node_modules/inputmask/lib/mask-lexer.js +467 -0
  38. package/node_modules/inputmask/lib/mask.js +244 -0
  39. package/node_modules/inputmask/lib/masktoken.js +13 -0
  40. package/node_modules/inputmask/lib/polyfills/Array.includes.js +48 -0
  41. package/node_modules/inputmask/lib/polyfills/Object.getPrototypeOf.js +7 -0
  42. package/node_modules/inputmask/lib/positioning.js +348 -0
  43. package/node_modules/inputmask/lib/validation-tests.js +597 -0
  44. package/node_modules/inputmask/lib/validation.js +664 -0
  45. package/node_modules/inputmask/package.json +41 -71
  46. package/package.json +40 -43
  47. package/node_modules/inputmask/CHANGELOG.md +0 -714
  48. package/node_modules/inputmask/index.js +0 -1
  49. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.jqlite.js +0 -170
  50. package/node_modules/inputmask/lib/maskScope.js +0 -2498
  51. package/node_modules/inputmask/lib/maskset.js +0 -466
@@ -1 +0,0 @@
1
- module.exports = require("./dist/inputmask");
@@ -1,170 +0,0 @@
1
- /*
2
- Input Mask plugin dependencyLib
3
- http://github.com/RobinHerbots/jquery.inputmask
4
- Copyright (c) Robin Herbots
5
- Licensed under the MIT license
6
- */
7
- var $ = require("jqlite"), window = require("../global/window"), document = window.document;
8
- // Use a stripped-down indexOf as it's faster than native
9
- // http://jsperf.com/thor-indexof-vs-for/5
10
- function indexOf(list, elem) {
11
- var i = 0,
12
- len = list.length;
13
- for (; i < len; i++) {
14
- if (list[i] === elem) {
15
- return i;
16
- }
17
- }
18
- return -1;
19
- }
20
-
21
-
22
- function isWindow(obj) {
23
- return obj != null && obj === obj.window;
24
- }
25
-
26
- function isArraylike(obj) {
27
- // Support: iOS 8.2 (not reproducible in simulator)
28
- // `in` check used to prevent JIT error (gh-2145)
29
- // hasOwn isn't used here due to false negatives
30
- // regarding Nodelist length in IE
31
- var length = "length" in obj && obj.length,
32
- ltype = typeof obj;
33
-
34
- if (ltype === "function" || isWindow(obj)) {
35
- return false;
36
- }
37
-
38
- if (obj.nodeType === 1 && length) {
39
- return true;
40
- }
41
-
42
- return ltype === "array" || length === 0 ||
43
- typeof length === "number" && length > 0 && (length - 1) in obj;
44
- }
45
-
46
- $.inArray = function (elem, arr, i) {
47
- return arr == null ? -1 : indexOf(arr, elem, i);
48
- };
49
- $.isFunction = function (obj) {
50
- return typeof obj === "function";
51
- };
52
- $.isArray = Array.isArray;
53
- $.isPlainObject = function (obj) {
54
- // Not plain objects:
55
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
56
- // - DOM nodes
57
- // - window
58
- if (typeof obj !== "object" || obj.nodeType || isWindow(obj)) {
59
- return false;
60
- }
61
-
62
- if (obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
63
- return false;
64
- }
65
-
66
- // If the function hasn't returned already, we're confident that
67
- // |obj| is a plain object, created by {} or constructed with new Object
68
- return true;
69
- };
70
- $.extend = function () {
71
- var options, name, src, copy, copyIsArray, clone,
72
- target = arguments[0] || {},
73
- i = 1,
74
- length = arguments.length,
75
- deep = false;
76
-
77
- // Handle a deep copy situation
78
- if (typeof target === "boolean") {
79
- deep = target;
80
-
81
- // Skip the boolean and the target
82
- target = arguments[i] || {};
83
- i++;
84
- }
85
-
86
- // Handle case when target is a string or something (possible in deep copy)
87
- if (typeof target !== "object" && !$.isFunction(target)) {
88
- target = {};
89
- }
90
-
91
- // Extend jQuery itself if only one argument is passed
92
- if (i === length) {
93
- target = this;
94
- i--;
95
- }
96
-
97
- for (; i < length; i++) {
98
- // Only deal with non-null/undefined values
99
- if ((options = arguments[i]) != null) {
100
- // Extend the base object
101
- for (name in options) {
102
- src = target[name];
103
- copy = options[name];
104
-
105
- // Prevent never-ending loop
106
- if (target === copy) {
107
- continue;
108
- }
109
-
110
- // Recurse if we're merging plain objects or arrays
111
- if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {
112
- if (copyIsArray) {
113
- copyIsArray = false;
114
- clone = src && $.isArray(src) ? src : [];
115
-
116
- } else {
117
- clone = src && $.isPlainObject(src) ? src : {};
118
- }
119
-
120
- // Never move original objects, clone them
121
- target[name] = $.extend(deep, clone, copy);
122
-
123
- // Don't bring in undefined values
124
- } else if (copy !== undefined) {
125
- target[name] = copy;
126
- }
127
- }
128
- }
129
- }
130
-
131
- // Return the modified object
132
- return target;
133
- };
134
- $.each = function (obj, callback) {
135
- var value, i = 0;
136
-
137
- if (isArraylike(obj)) {
138
- for (var length = obj.length; i < length; i++) {
139
- value = callback.call(obj[i], i, obj[i]);
140
- if (value === false) {
141
- break;
142
- }
143
- }
144
- } else {
145
- for (i in obj) {
146
- value = callback.call(obj[i], i, obj[i]);
147
- if (value === false) {
148
- break;
149
- }
150
- }
151
- }
152
-
153
- return obj;
154
- };
155
- $.data = function (elem, name, data) {
156
- return $(elem).data(name, data);
157
- };
158
- $.Event = $.Event || function CustomEvent(event, params) {
159
- params = params || {
160
- bubbles: false,
161
- cancelable: false,
162
- detail: undefined
163
- };
164
- var evt = document.createEvent("CustomEvent");
165
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
166
- return evt;
167
- };
168
- $.Event.prototype = window.Event.prototype;
169
-
170
- module.exports = $;