jquery-mask-plugin 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +3 -3
- data/Gemfile.lock +44 -40
- data/README.md +1 -1
- data/jquery-mask-plugin.gemspec +2 -2
- data/lib/jquery/mask/plugin/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.mask.min.js +14 -13
- metadata +3 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8db7cd59f0a76183a9f4a6a6ff695a3057692dcaed978eee986e02a00c311d4c
|
4
|
+
data.tar.gz: 4a481e377232aedb9faacc839d2340c74f6f63d6bfc226d8bb00c08831dabaf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c991b841643bcff874396ea76cd04296452dd1349584415bf087c0cabf5316774a57c4aac73de3e7c0a469d4412ff9ab6e19e6f95d209dd14a1f61f3bcd962f1
|
7
|
+
data.tar.gz: 3f4ba0631527364931dc6da2852bdb4d30a8fa0195c53558e8aa6907e881effa85516838f60e0a83cc993b38fc10ad2aeb41bc0c0da18fa6d31a893895544c4e
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,61 +1,62 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jquery-mask-plugin (0.1.
|
5
|
-
railties (> 3.1
|
4
|
+
jquery-mask-plugin (0.1.2)
|
5
|
+
railties (> 3.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (
|
11
|
-
actionview (=
|
12
|
-
activesupport (=
|
13
|
-
rack (~>
|
14
|
-
rack-test (~> 0.6.
|
15
|
-
rails-dom-testing (~>
|
10
|
+
actionpack (5.0.7)
|
11
|
+
actionview (= 5.0.7)
|
12
|
+
activesupport (= 5.0.7)
|
13
|
+
rack (~> 2.0)
|
14
|
+
rack-test (~> 0.6.3)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
17
|
-
actionview (
|
18
|
-
activesupport (=
|
17
|
+
actionview (5.0.7)
|
18
|
+
activesupport (= 5.0.7)
|
19
19
|
builder (~> 3.1)
|
20
20
|
erubis (~> 2.7.0)
|
21
|
-
rails-dom-testing (~>
|
22
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.
|
23
|
-
activesupport (
|
24
|
-
|
25
|
-
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
23
|
+
activesupport (5.0.7)
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
+
i18n (>= 0.7, < 2)
|
26
26
|
minitest (~> 5.1)
|
27
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
28
27
|
tzinfo (~> 1.1)
|
29
|
-
builder (3.2.
|
28
|
+
builder (3.2.3)
|
29
|
+
concurrent-ruby (1.0.5)
|
30
|
+
crass (1.0.4)
|
30
31
|
erubis (2.7.0)
|
31
|
-
i18n (
|
32
|
-
|
33
|
-
loofah (2.
|
32
|
+
i18n (1.1.0)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
|
+
loofah (2.2.2)
|
35
|
+
crass (~> 1.0.2)
|
34
36
|
nokogiri (>= 1.5.9)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
method_source (0.9.0)
|
38
|
+
mini_portile2 (2.3.0)
|
39
|
+
minitest (5.11.3)
|
40
|
+
nokogiri (1.8.4)
|
41
|
+
mini_portile2 (~> 2.3.0)
|
42
|
+
rack (2.0.5)
|
40
43
|
rack-test (0.6.3)
|
41
44
|
rack (>= 1.0)
|
42
|
-
rails-
|
43
|
-
activesupport (>= 4.2.0
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
actionpack (= 4.2.5)
|
52
|
-
activesupport (= 4.2.5)
|
45
|
+
rails-dom-testing (2.0.3)
|
46
|
+
activesupport (>= 4.2.0)
|
47
|
+
nokogiri (>= 1.6)
|
48
|
+
rails-html-sanitizer (1.0.4)
|
49
|
+
loofah (~> 2.2, >= 2.2.2)
|
50
|
+
railties (5.0.7)
|
51
|
+
actionpack (= 5.0.7)
|
52
|
+
activesupport (= 5.0.7)
|
53
|
+
method_source
|
53
54
|
rake (>= 0.8.7)
|
54
55
|
thor (>= 0.18.1, < 2.0)
|
55
56
|
rake (10.4.2)
|
56
|
-
thor (0.
|
57
|
-
thread_safe (0.3.
|
58
|
-
tzinfo (1.2.
|
57
|
+
thor (0.20.0)
|
58
|
+
thread_safe (0.3.6)
|
59
|
+
tzinfo (1.2.5)
|
59
60
|
thread_safe (~> 0.1)
|
60
61
|
|
61
62
|
PLATFORMS
|
@@ -66,5 +67,8 @@ DEPENDENCIES
|
|
66
67
|
jquery-mask-plugin!
|
67
68
|
rake (~> 10.0)
|
68
69
|
|
70
|
+
RUBY VERSION
|
71
|
+
ruby 2.4.1p111
|
72
|
+
|
69
73
|
BUNDLED WITH
|
70
|
-
1.
|
74
|
+
1.16.5
|
data/README.md
CHANGED
data/jquery-mask-plugin.gemspec
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
// jQuery Mask Plugin v1.
|
1
|
+
// jQuery Mask Plugin v1.14.0
|
2
2
|
// github.com/igorescobar/jQuery-Mask-Plugin
|
3
|
-
(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):"object"===typeof exports?module.exports=b(require("jquery")):b(jQuery||Zepto)})(function(b){var y=function(a,
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
c
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):"object"===typeof exports?module.exports=b(require("jquery")):b(jQuery||Zepto)})(function(b){var y=function(a,e,d){var c={invalid:[],getCaret:function(){try{var r,b=0,e=a.get(0),d=document.selection,f=e.selectionStart;if(d&&-1===navigator.appVersion.indexOf("MSIE 10"))r=d.createRange(),r.moveStart("character",-c.val().length),b=r.text.length;else if(f||"0"===f)b=f;return b}catch(g){}},setCaret:function(r){try{if(a.is(":focus")){var c,
|
4
|
+
b=a.get(0);b.setSelectionRange?(b.focus(),b.setSelectionRange(r,r)):(c=b.createTextRange(),c.collapse(!0),c.moveEnd("character",r),c.moveStart("character",r),c.select())}}catch(e){}},events:function(){a.on("keydown.mask",function(c){a.data("mask-keycode",c.keyCode||c.which)}).on(b.jMaskGlobals.useInput?"input.mask":"keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){a.keydown().keyup()},100)}).on("change.mask",function(){a.data("changed",!0)}).on("blur.mask",function(){n===
|
5
|
+
c.val()||a.data("changed")||a.trigger("change");a.data("changed",!1)}).on("blur.mask",function(){n=c.val()}).on("focus.mask",function(a){!0===d.selectOnFocus&&b(a.target).select()}).on("focusout.mask",function(){d.clearIfNotMatch&&!p.test(c.val())&&c.val("")})},getRegexMask:function(){for(var a=[],c,b,d,f,l=0;l<e.length;l++)(c=g.translation[e.charAt(l)])?(b=c.pattern.toString().replace(/.{1}$|^.{1}/g,""),d=c.optional,(c=c.recursive)?(a.push(e.charAt(l)),f={digit:e.charAt(l),pattern:b}):a.push(d||
|
6
|
+
c?b+"?":b)):a.push(e.charAt(l).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));a=a.join("");f&&(a=a.replace(new RegExp("("+f.digit+"(.*"+f.digit+")?)"),"($1)?").replace(new RegExp(f.digit,"g"),f.pattern));return new RegExp(a)},destroyEvents:function(){a.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))},val:function(c){var b=a.is("input")?"val":"text";if(0<arguments.length){if(a[b]()!==c)a[b](c);b=a}else b=a[b]();return b},getMCharsBeforeCount:function(a,c){for(var b=0,d=0,
|
7
|
+
f=e.length;d<f&&d<a;d++)g.translation[e.charAt(d)]||(a=c?a+1:a,b++);return b},caretPos:function(a,b,d,h){return g.translation[e.charAt(Math.min(a-1,e.length-1))]?Math.min(a+d-b-h,d):c.caretPos(a+1,b,d,h)},behaviour:function(d){d=d||window.event;c.invalid=[];var e=a.data("mask-keycode");if(-1===b.inArray(e,g.byPassKeys)){var m=c.getCaret(),h=c.val().length,f=c.getMasked(),l=f.length,k=c.getMCharsBeforeCount(l-1)-c.getMCharsBeforeCount(h-1),n=m<h;c.val(f);n&&(8!==e&&46!==e&&(m=c.caretPos(m,h,l,k)),
|
8
|
+
c.setCaret(m));return c.callbacks(d)}},getMasked:function(a,b){var m=[],h=void 0===b?c.val():b+"",f=0,l=e.length,k=0,n=h.length,q=1,p="push",u=-1,t,w;d.reverse?(p="unshift",q=-1,t=0,f=l-1,k=n-1,w=function(){return-1<f&&-1<k}):(t=l-1,w=function(){return f<l&&k<n});for(;w();){var x=e.charAt(f),v=h.charAt(k),s=g.translation[x];if(s)v.match(s.pattern)?(m[p](v),s.recursive&&(-1===u?u=f:f===t&&(f=u-q),t===u&&(f-=q)),f+=q):s.optional?(f+=q,k-=q):s.fallback?(m[p](s.fallback),f+=q,k-=q):c.invalid.push({p:k,
|
9
|
+
v:v,e:s.pattern}),k+=q;else{if(!a)m[p](x);v===x&&(k+=q);f+=q}}h=e.charAt(t);l!==n+1||g.translation[h]||m.push(h);return m.join("")},callbacks:function(b){var g=c.val(),m=g!==n,h=[g,b,a,d],f=function(a,b,c){"function"===typeof d[a]&&b&&d[a].apply(this,c)};f("onChange",!0===m,h);f("onKeyPress",!0===m,h);f("onComplete",g.length===e.length,h);f("onInvalid",0<c.invalid.length,[g,b,a,c.invalid,d])}};a=b(a);var g=this,n=c.val(),p;e="function"===typeof e?e(c.val(),void 0,a,d):e;g.mask=e;g.options=d;g.remove=
|
10
|
+
function(){var b=c.getCaret();c.destroyEvents();c.val(g.getCleanVal());c.setCaret(b-c.getMCharsBeforeCount(b));return a};g.getCleanVal=function(){return c.getMasked(!0)};g.getMaskedVal=function(a){return c.getMasked(!1,a)};g.init=function(e){e=e||!1;d=d||{};g.clearIfNotMatch=b.jMaskGlobals.clearIfNotMatch;g.byPassKeys=b.jMaskGlobals.byPassKeys;g.translation=b.extend({},b.jMaskGlobals.translation,d.translation);g=b.extend(!0,{},g,d);p=c.getRegexMask();!1===e?(d.placeholder&&a.attr("placeholder",d.placeholder),
|
11
|
+
a.data("mask")&&a.attr("autocomplete","off"),c.destroyEvents(),c.events(),e=c.getCaret(),c.val(c.getMasked()),c.setCaret(e+c.getMCharsBeforeCount(e,!0))):(c.events(),c.val(c.getMasked()))};g.init(!a.is("input"))};b.maskWatchers={};var A=function(){var a=b(this),e={},d=a.attr("data-mask");a.attr("data-mask-reverse")&&(e.reverse=!0);a.attr("data-mask-clearifnotmatch")&&(e.clearIfNotMatch=!0);"true"===a.attr("data-mask-selectonfocus")&&(e.selectOnFocus=!0);if(z(a,d,e))return a.data("mask",new y(this,
|
12
|
+
d,e))},z=function(a,e,d){d=d||{};var c=b(a).data("mask"),g=JSON.stringify;a=b(a).val()||b(a).text();try{return"function"===typeof e&&(e=e(a)),"object"!==typeof c||g(c.options)!==g(d)||c.mask!==e}catch(n){}};b.fn.mask=function(a,e){e=e||{};var d=this.selector,c=b.jMaskGlobals,g=c.watchInterval,c=e.watchInputs||c.watchInputs,n=function(){if(z(this,a,e))return b(this).data("mask",new y(this,a,e))};b(this).each(n);d&&""!==d&&c&&(clearInterval(b.maskWatchers[d]),b.maskWatchers[d]=setInterval(function(){b(document).find(d).each(n)},
|
13
|
+
g));return this};b.fn.masked=function(a){return this.data("mask").getMaskedVal(a)};b.fn.unmask=function(){clearInterval(b.maskWatchers[this.selector]);delete b.maskWatchers[this.selector];return this.each(function(){var a=b(this).data("mask");a&&a.remove().removeData("mask")})};b.fn.cleanVal=function(){return this.data("mask").getCleanVal()};b.applyDataMask=function(a){a=a||b.jMaskGlobals.maskElements;(a instanceof b?a:b(a)).filter(b.jMaskGlobals.dataMaskAttr).each(A)};var p={maskElements:"input,td,span,div",
|
14
|
+
dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,useInput:function(a){var b=document.createElement("div"),d;a="on"+a;d=a in b;d||(b.setAttribute(a,"return;"),d="function"===typeof b[a]);return d}("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};b.jMaskGlobals=b.jMaskGlobals||{};p=b.jMaskGlobals=b.extend(!0,{},p,b.jMaskGlobals);
|
15
|
+
p.dataMask&&b.applyDataMask();setInterval(function(){b.jMaskGlobals.watchDataMask&&b.applyDataMask()},p.watchInterval)});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-mask-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilton Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -45,9 +45,6 @@ dependencies:
|
|
45
45
|
- - ">"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.1'
|
48
|
-
- - "<"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '5.0'
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -55,9 +52,6 @@ dependencies:
|
|
55
52
|
- - ">"
|
56
53
|
- !ruby/object:Gem::Version
|
57
54
|
version: '3.1'
|
58
|
-
- - "<"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '5.0'
|
61
55
|
description: Igor Escobar jquery mask plugin GEM by Ilton Garcia
|
62
56
|
email:
|
63
57
|
- ton.garcia.jr@gmail.com
|
@@ -104,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
98
|
version: '0'
|
105
99
|
requirements: []
|
106
100
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
101
|
+
rubygems_version: 2.7.7
|
108
102
|
signing_key:
|
109
103
|
specification_version: 4
|
110
104
|
summary: Igor Escobar jquery mask plugin GEM by Ilton Garcia
|