inputmask-rails 4.0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +50 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +158 -0
  7. data/LICENSE +21 -0
  8. data/README.md +66 -0
  9. data/Rakefile +31 -0
  10. data/inputmask-rails.gemspec +27 -0
  11. data/lib/inputmask-rails.rb +1 -0
  12. data/lib/inputmask/rails.rb +8 -0
  13. data/lib/inputmask/rails/engine.rb +6 -0
  14. data/lib/inputmask/rails/version.rb +6 -0
  15. data/vendor/assets/javascripts/bindings/inputmask.binding.js +33 -0
  16. data/vendor/assets/javascripts/bindings/inputmask.binding.min.js +1 -0
  17. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jqlite.js +129 -0
  18. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jqlite.min.js +1 -0
  19. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jquery.js +19 -0
  20. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jquery.min.js +1 -0
  21. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.js +301 -0
  22. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.min.js +1 -0
  23. data/vendor/assets/javascripts/global/window.js +11 -0
  24. data/vendor/assets/javascripts/global/window.min.js +1 -0
  25. data/vendor/assets/javascripts/inputmask.date.extensions.js +252 -0
  26. data/vendor/assets/javascripts/inputmask.date.extensions.min.js +1 -0
  27. data/vendor/assets/javascripts/inputmask.extensions.js +97 -0
  28. data/vendor/assets/javascripts/inputmask.extensions.min.js +1 -0
  29. data/vendor/assets/javascripts/inputmask.js +2745 -0
  30. data/vendor/assets/javascripts/inputmask.min.js +1 -0
  31. data/vendor/assets/javascripts/inputmask.numeric.extensions.js +553 -0
  32. data/vendor/assets/javascripts/inputmask.numeric.extensions.min.js +1 -0
  33. data/vendor/assets/javascripts/jquery.inputmask.bundle.js +3867 -0
  34. data/vendor/assets/javascripts/jquery.inputmask.bundle.min.js +9 -0
  35. data/vendor/assets/javascripts/jquery.inputmask.js +97 -0
  36. data/vendor/assets/javascripts/jquery.inputmask.min.js +1 -0
  37. metadata +135 -0
@@ -0,0 +1 @@
1
+ 404: Not Found
@@ -0,0 +1,129 @@
1
+ /*!
2
+ * dependencyLibs/inputmask.dependencyLib.jqlite.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2019 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 4.0.9
7
+ */
8
+
9
+ (function(factory) {
10
+ if (typeof define === "function" && define.amd) {
11
+ define([ "jqlite", "../global/window" ], factory);
12
+ } else if (typeof exports === "object") {
13
+ module.exports = factory(require("jqlite"), require("../global/window"));
14
+ } else {
15
+ window.dependencyLib = factory(jqlite, window);
16
+ }
17
+ })(function($, window) {
18
+ var document = window.document;
19
+ function indexOf(list, elem) {
20
+ var i = 0, len = list.length;
21
+ for (;i < len; i++) {
22
+ if (list[i] === elem) {
23
+ return i;
24
+ }
25
+ }
26
+ return -1;
27
+ }
28
+ function isWindow(obj) {
29
+ return obj != null && obj === obj.window;
30
+ }
31
+ function isArraylike(obj) {
32
+ var length = "length" in obj && obj.length, ltype = typeof obj;
33
+ if (ltype === "function" || isWindow(obj)) {
34
+ return false;
35
+ }
36
+ if (obj.nodeType === 1 && length) {
37
+ return true;
38
+ }
39
+ return ltype === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
40
+ }
41
+ $.inArray = function(elem, arr, i) {
42
+ return arr == null ? -1 : indexOf(arr, elem, i);
43
+ };
44
+ $.isFunction = function(obj) {
45
+ return typeof obj === "function";
46
+ };
47
+ $.isArray = Array.isArray;
48
+ $.isPlainObject = function(obj) {
49
+ if (typeof obj !== "object" || obj.nodeType || isWindow(obj)) {
50
+ return false;
51
+ }
52
+ if (obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
53
+ return false;
54
+ }
55
+ return true;
56
+ };
57
+ $.extend = function() {
58
+ var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
59
+ if (typeof target === "boolean") {
60
+ deep = target;
61
+ target = arguments[i] || {};
62
+ i++;
63
+ }
64
+ if (typeof target !== "object" && !$.isFunction(target)) {
65
+ target = {};
66
+ }
67
+ if (i === length) {
68
+ target = this;
69
+ i--;
70
+ }
71
+ for (;i < length; i++) {
72
+ if ((options = arguments[i]) != null) {
73
+ for (name in options) {
74
+ src = target[name];
75
+ copy = options[name];
76
+ if (target === copy) {
77
+ continue;
78
+ }
79
+ if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {
80
+ if (copyIsArray) {
81
+ copyIsArray = false;
82
+ clone = src && $.isArray(src) ? src : [];
83
+ } else {
84
+ clone = src && $.isPlainObject(src) ? src : {};
85
+ }
86
+ target[name] = $.extend(deep, clone, copy);
87
+ } else if (copy !== undefined) {
88
+ target[name] = copy;
89
+ }
90
+ }
91
+ }
92
+ }
93
+ return target;
94
+ };
95
+ $.each = function(obj, callback) {
96
+ var value, i = 0;
97
+ if (isArraylike(obj)) {
98
+ for (var length = obj.length; i < length; i++) {
99
+ value = callback.call(obj[i], i, obj[i]);
100
+ if (value === false) {
101
+ break;
102
+ }
103
+ }
104
+ } else {
105
+ for (i in obj) {
106
+ value = callback.call(obj[i], i, obj[i]);
107
+ if (value === false) {
108
+ break;
109
+ }
110
+ }
111
+ }
112
+ return obj;
113
+ };
114
+ $.data = function(elem, name, data) {
115
+ return $(elem).data(name, data);
116
+ };
117
+ $.Event = $.Event || function CustomEvent(event, params) {
118
+ params = params || {
119
+ bubbles: false,
120
+ cancelable: false,
121
+ detail: undefined
122
+ };
123
+ var evt = document.createEvent("CustomEvent");
124
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
125
+ return evt;
126
+ };
127
+ $.Event.prototype = window.Event.prototype;
128
+ return $;
129
+ });
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * dependencyLibs/inputmask.dependencyLib.jquery.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2019 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 4.0.9
7
+ */
8
+
9
+ (function(factory) {
10
+ if (typeof define === "function" && define.amd) {
11
+ define([ "jquery" ], factory);
12
+ } else if (typeof exports === "object") {
13
+ module.exports = factory(require("jquery"));
14
+ } else {
15
+ window.dependencyLib = factory(jQuery);
16
+ }
17
+ })(function($) {
18
+ return $;
19
+ });
@@ -0,0 +1,301 @@
1
+ /*!
2
+ * dependencyLibs/inputmask.dependencyLib.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2019 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 4.0.9
7
+ */
8
+
9
+ (function(factory) {
10
+ if (typeof define === "function" && define.amd) {
11
+ define([ "../global/window" ], factory);
12
+ } else if (typeof exports === "object") {
13
+ module.exports = factory(require("../global/window"));
14
+ } else {
15
+ window.dependencyLib = factory(window);
16
+ }
17
+ })(function(window) {
18
+ var document = window.document;
19
+ function indexOf(list, elem) {
20
+ var i = 0, len = list.length;
21
+ for (;i < len; i++) {
22
+ if (list[i] === elem) {
23
+ return i;
24
+ }
25
+ }
26
+ return -1;
27
+ }
28
+ function isWindow(obj) {
29
+ return obj != null && obj === obj.window;
30
+ }
31
+ function isArraylike(obj) {
32
+ var length = "length" in obj && obj.length, ltype = typeof obj;
33
+ if (ltype === "function" || isWindow(obj)) {
34
+ return false;
35
+ }
36
+ if (obj.nodeType === 1 && length) {
37
+ return true;
38
+ }
39
+ return ltype === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
40
+ }
41
+ function isValidElement(elem) {
42
+ return elem instanceof Element;
43
+ }
44
+ function DependencyLib(elem) {
45
+ if (elem instanceof DependencyLib) {
46
+ return elem;
47
+ }
48
+ if (!(this instanceof DependencyLib)) {
49
+ return new DependencyLib(elem);
50
+ }
51
+ if (elem !== undefined && elem !== null && elem !== window) {
52
+ this[0] = elem.nodeName ? elem : elem[0] !== undefined && elem[0].nodeName ? elem[0] : document.querySelector(elem);
53
+ if (this[0] !== undefined && this[0] !== null) {
54
+ this[0].eventRegistry = this[0].eventRegistry || {};
55
+ }
56
+ }
57
+ }
58
+ function getWindow(elem) {
59
+ return isWindow(elem) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false;
60
+ }
61
+ DependencyLib.prototype = {
62
+ on: function(events, handler) {
63
+ if (isValidElement(this[0])) {
64
+ var eventRegistry = this[0].eventRegistry, elem = this[0];
65
+ var addEvent = function(ev, namespace) {
66
+ if (elem.addEventListener) {
67
+ elem.addEventListener(ev, handler, false);
68
+ } else if (elem.attachEvent) {
69
+ elem.attachEvent("on" + ev, handler);
70
+ }
71
+ eventRegistry[ev] = eventRegistry[ev] || {};
72
+ eventRegistry[ev][namespace] = eventRegistry[ev][namespace] || [];
73
+ eventRegistry[ev][namespace].push(handler);
74
+ };
75
+ var _events = events.split(" ");
76
+ for (var endx = 0; endx < _events.length; endx++) {
77
+ var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
78
+ addEvent(ev, namespace);
79
+ }
80
+ }
81
+ return this;
82
+ },
83
+ off: function(events, handler) {
84
+ if (isValidElement(this[0])) {
85
+ var eventRegistry = this[0].eventRegistry, elem = this[0];
86
+ var removeEvent = function(ev, namespace, handler) {
87
+ if (ev in eventRegistry === true) {
88
+ if (elem.removeEventListener) {
89
+ elem.removeEventListener(ev, handler, false);
90
+ } else if (elem.detachEvent) {
91
+ elem.detachEvent("on" + ev, handler);
92
+ }
93
+ if (namespace === "global") {
94
+ for (var nmsp in eventRegistry[ev]) {
95
+ eventRegistry[ev][nmsp].splice(eventRegistry[ev][nmsp].indexOf(handler), 1);
96
+ }
97
+ } else {
98
+ eventRegistry[ev][namespace].splice(eventRegistry[ev][namespace].indexOf(handler), 1);
99
+ }
100
+ }
101
+ };
102
+ var resolveNamespace = function(ev, namespace) {
103
+ var evts = [], hndx, hndL;
104
+ if (ev.length > 0) {
105
+ if (handler === undefined) {
106
+ for (hndx = 0, hndL = eventRegistry[ev][namespace].length; hndx < hndL; hndx++) {
107
+ evts.push({
108
+ ev: ev,
109
+ namespace: namespace && namespace.length > 0 ? namespace : "global",
110
+ handler: eventRegistry[ev][namespace][hndx]
111
+ });
112
+ }
113
+ } else {
114
+ evts.push({
115
+ ev: ev,
116
+ namespace: namespace && namespace.length > 0 ? namespace : "global",
117
+ handler: handler
118
+ });
119
+ }
120
+ } else if (namespace.length > 0) {
121
+ for (var evNdx in eventRegistry) {
122
+ for (var nmsp in eventRegistry[evNdx]) {
123
+ if (nmsp === namespace) {
124
+ if (handler === undefined) {
125
+ for (hndx = 0, hndL = eventRegistry[evNdx][nmsp].length; hndx < hndL; hndx++) {
126
+ evts.push({
127
+ ev: evNdx,
128
+ namespace: nmsp,
129
+ handler: eventRegistry[evNdx][nmsp][hndx]
130
+ });
131
+ }
132
+ } else {
133
+ evts.push({
134
+ ev: evNdx,
135
+ namespace: nmsp,
136
+ handler: handler
137
+ });
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ return evts;
144
+ };
145
+ var _events = events.split(" ");
146
+ for (var endx = 0; endx < _events.length; endx++) {
147
+ var nsEvent = _events[endx].split("."), offEvents = resolveNamespace(nsEvent[0], nsEvent[1]);
148
+ for (var i = 0, offEventsL = offEvents.length; i < offEventsL; i++) {
149
+ removeEvent(offEvents[i].ev, offEvents[i].namespace, offEvents[i].handler);
150
+ }
151
+ }
152
+ }
153
+ return this;
154
+ },
155
+ trigger: function(events) {
156
+ if (isValidElement(this[0])) {
157
+ var eventRegistry = this[0].eventRegistry, elem = this[0];
158
+ var _events = typeof events === "string" ? events.split(" ") : [ events.type ];
159
+ for (var endx = 0; endx < _events.length; endx++) {
160
+ var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
161
+ if (document !== undefined && namespace === "global") {
162
+ var evnt, i, params = {
163
+ bubbles: true,
164
+ cancelable: true,
165
+ detail: arguments[1]
166
+ };
167
+ if (document.createEvent) {
168
+ try {
169
+ evnt = new CustomEvent(ev, params);
170
+ } catch (e) {
171
+ evnt = document.createEvent("CustomEvent");
172
+ evnt.initCustomEvent(ev, params.bubbles, params.cancelable, params.detail);
173
+ }
174
+ if (events.type) DependencyLib.extend(evnt, events);
175
+ elem.dispatchEvent(evnt);
176
+ } else {
177
+ evnt = document.createEventObject();
178
+ evnt.eventType = ev;
179
+ evnt.detail = arguments[1];
180
+ if (events.type) DependencyLib.extend(evnt, events);
181
+ elem.fireEvent("on" + evnt.eventType, evnt);
182
+ }
183
+ } else if (eventRegistry[ev] !== undefined) {
184
+ arguments[0] = arguments[0].type ? arguments[0] : DependencyLib.Event(arguments[0]);
185
+ if (namespace === "global") {
186
+ for (var nmsp in eventRegistry[ev]) {
187
+ for (i = 0; i < eventRegistry[ev][nmsp].length; i++) {
188
+ eventRegistry[ev][nmsp][i].apply(elem, arguments);
189
+ }
190
+ }
191
+ } else {
192
+ for (i = 0; i < eventRegistry[ev][namespace].length; i++) {
193
+ eventRegistry[ev][namespace][i].apply(elem, arguments);
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ return this;
200
+ }
201
+ };
202
+ DependencyLib.isFunction = function(obj) {
203
+ return typeof obj === "function";
204
+ };
205
+ DependencyLib.noop = function() {};
206
+ DependencyLib.isArray = Array.isArray;
207
+ DependencyLib.inArray = function(elem, arr, i) {
208
+ return arr == null ? -1 : indexOf(arr, elem, i);
209
+ };
210
+ DependencyLib.valHooks = undefined;
211
+ DependencyLib.isPlainObject = function(obj) {
212
+ if (typeof obj !== "object" || obj.nodeType || isWindow(obj)) {
213
+ return false;
214
+ }
215
+ if (obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
216
+ return false;
217
+ }
218
+ return true;
219
+ };
220
+ DependencyLib.extend = function() {
221
+ var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
222
+ if (typeof target === "boolean") {
223
+ deep = target;
224
+ target = arguments[i] || {};
225
+ i++;
226
+ }
227
+ if (typeof target !== "object" && !DependencyLib.isFunction(target)) {
228
+ target = {};
229
+ }
230
+ if (i === length) {
231
+ target = this;
232
+ i--;
233
+ }
234
+ for (;i < length; i++) {
235
+ if ((options = arguments[i]) != null) {
236
+ for (name in options) {
237
+ src = target[name];
238
+ copy = options[name];
239
+ if (target === copy) {
240
+ continue;
241
+ }
242
+ if (deep && copy && (DependencyLib.isPlainObject(copy) || (copyIsArray = DependencyLib.isArray(copy)))) {
243
+ if (copyIsArray) {
244
+ copyIsArray = false;
245
+ clone = src && DependencyLib.isArray(src) ? src : [];
246
+ } else {
247
+ clone = src && DependencyLib.isPlainObject(src) ? src : {};
248
+ }
249
+ target[name] = DependencyLib.extend(deep, clone, copy);
250
+ } else if (copy !== undefined) {
251
+ target[name] = copy;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ return target;
257
+ };
258
+ DependencyLib.each = function(obj, callback) {
259
+ var value, i = 0;
260
+ if (isArraylike(obj)) {
261
+ for (var length = obj.length; i < length; i++) {
262
+ value = callback.call(obj[i], i, obj[i]);
263
+ if (value === false) {
264
+ break;
265
+ }
266
+ }
267
+ } else {
268
+ for (i in obj) {
269
+ value = callback.call(obj[i], i, obj[i]);
270
+ if (value === false) {
271
+ break;
272
+ }
273
+ }
274
+ }
275
+ return obj;
276
+ };
277
+ DependencyLib.data = function(owner, key, value) {
278
+ if (value === undefined) {
279
+ return owner.__data ? owner.__data[key] : null;
280
+ } else {
281
+ owner.__data = owner.__data || {};
282
+ owner.__data[key] = value;
283
+ }
284
+ };
285
+ if (typeof window.CustomEvent === "function") {
286
+ DependencyLib.Event = window.CustomEvent;
287
+ } else {
288
+ DependencyLib.Event = function(event, params) {
289
+ params = params || {
290
+ bubbles: false,
291
+ cancelable: false,
292
+ detail: undefined
293
+ };
294
+ var evt = document.createEvent("CustomEvent");
295
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
296
+ return evt;
297
+ };
298
+ DependencyLib.Event.prototype = window.Event.prototype;
299
+ }
300
+ return DependencyLib;
301
+ });